sqllogictest
Artifact Content
Not logged in

Artifact ef8c3dbd25b0e6d7b5c44f15a55108e0b8ac5b16:


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 * + 28 FROM tab0 AS cor0
----
2492
672
980

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col2 - col2 col1 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT + + col1 * ( col0 ) + col2 * + ( - col2 ) * col0 FROM tab0 AS cor0
----
-24072
-590337
3360

query I rowsort
SELECT + col0 + 61 AS col0 FROM tab0 AS cor0
----
150
85
96

query I rowsort
SELECT - col2 * 9 + - col1 FROM tab0 cor0
----
-106
-383
-829

query I rowsort
SELECT - 82 * 14 AS col0 FROM tab1 AS cor0
----
-1148
-1148
-1148

query I rowsort
SELECT col0 + 86 AS col2 FROM tab2 AS cor0
----
164
165
93

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

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

skipif mysql # not compatible
query I rowsort label-8
SELECT ALL cor0.col2 * col1 * - CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - 65 * col2 AS col2 FROM tab0 AS cor0
----
2145
5330
65

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

query I rowsort
SELECT DISTINCT - - 5 * + col2 + 92 FROM tab0 AS cor0
----
257
502
97

query I rowsort
SELECT ALL ( - col0 + 85 ) FROM tab2
----
6
7
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-13
SELECT col0 + col0 DIV + 58 FROM tab1
----
3
65
81

skipif mysql # not compatible
query I rowsort label-13
SELECT col0 + col0 / + 58 FROM tab1
----
3
65
81

query I rowsort
SELECT + 31 + - col2 FROM tab2 AS cor0
----
-7
4
5

query I rowsort
SELECT ALL - 34 * col1 + ( 52 ) AS col2 FROM tab2 AS cor0
----
-1002
-1954
-526

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

query I rowsort
SELECT ALL - 51 * cor0.col0 FROM tab2 AS cor0
----
-357
-3978
-4029

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

query I rowsort
SELECT ALL - col0 * cor0.col2 + + 48 * col1 * - col1 FROM tab1 AS cor0
----
-15792
-32610
-8448

query I rowsort
SELECT + col2 + - 89 FROM tab2 AS cor0
----
-51
-62
-63

onlyif mysql # use DIV operator for integer division
query I rowsort label-21
SELECT - 75 DIV 67 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 60fdd6924bb763d6aca00ba74935ef4b

skipif mysql # not compatible
query I rowsort label-21
SELECT - 75 / 67 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 60fdd6924bb763d6aca00ba74935ef4b

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-23
SELECT DISTINCT + col0 + + col2 DIV - col1 FROM tab1 AS cor0
----
1
59
73

skipif mysql # not compatible
query I rowsort label-23
SELECT DISTINCT + col0 + + col2 / - col1 FROM tab1 AS cor0
----
1
59
73

query I rowsort
SELECT - col2 + col2 * col1 * + col0 AS col1 FROM tab1 AS cor0
----
36423
4158
99744

query I rowsort
SELECT ALL + 20 * col1 FROM tab0 AS cor0
----
1720
1820
1940

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

skipif mysql # not compatible
query I rowsort label-26
SELECT DISTINCT + col2 / col1 + + col2 AS col0 FROM tab0 AS cor0
----
1
33
82

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-28
SELECT ALL col1 DIV + 8 + col2 - col2 AS col0 FROM tab0
----
10
11
12

skipif mysql # not compatible
query I rowsort label-28
SELECT ALL col1 / + 8 + col2 - col2 AS col0 FROM tab0
----
10
11
12

query I rowsort
SELECT - + ( - col0 ) * col0 * col1 + cor0.col1 * + cor0.col0 FROM tab2 AS cor0
----
107440
1736
363558

query I rowsort
SELECT DISTINCT - 23 + 89 * col0 FROM tab1 AS cor0
----
244
5673
7097

query I rowsort
SELECT + 90 * col0 - tab1.col2 FROM tab1
----
216
5703
7104

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

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

query I rowsort
SELECT 67 * col1 * col2 - - 49 FROM tab2
----
102827
43331
56128

query I rowsort
SELECT ALL 98 + - ( col2 ) * col1 * col1 FROM tab2
----
-10884
-25849
-90408

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

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

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

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

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

query I rowsort
SELECT - 96 * - 84 * col1 AS col2 FROM tab2
----
137088
249984
475776

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

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

query I rowsort
SELECT ALL col1 - tab0.col2 FROM tab0
----
53
9
96

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

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

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

query I rowsort
SELECT + col1 * col1 + - col0 + col1 FROM tab1
----
102
46
699

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

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

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

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

query I rowsort
SELECT col2 * col0 + + col1 * col0 * - col0 FROM tab1
----
-37312
-72
-75520

query I rowsort
SELECT - 78 + ( col2 ) * col1 FROM tab0
----
19
2760
7384

query I rowsort
SELECT ALL + 70 * + col2 * col2 AS col2 FROM tab2
----
101080
47320
51030

query I rowsort
SELECT DISTINCT 42 + + col0 AS col2 FROM tab0 AS cor0
----
131
66
77

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

query I rowsort
SELECT ALL - 87 * col2 AS col2 FROM tab2
----
-2262
-2349
-3306

query I rowsort
SELECT 54 + + col1 AS col1 FROM tab0
----
140
145
151

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

query I rowsort
SELECT - 36 + + col0 * cor0.col2 FROM tab1 AS cor0
----
126
3612
7644

query I rowsort
SELECT DISTINCT cor0.col1 + + col1 * + col2 * - col1 AS col0 FROM tab0 AS cor0
----
-243982
-678951
-9312

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

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-66
SELECT 72 DIV + col0 FROM tab0 AS cor0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-66
SELECT 72 / + col0 FROM tab0 AS cor0
----
0
2
3

query III rowsort
SELECT * FROM tab0 WHERE ( NULL ) = NULL
----

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

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

query I rowsort
SELECT ALL - col0 * col1 - col1 * col2 AS col0 FROM tab1
----
-1210
-1482
-2288

query I rowsort
SELECT DISTINCT col0 * + col0 - tab0.col1 FROM tab0
----
1128
490
7830

onlyif mysql # use DIV operator for integer division
query I rowsort label-72
SELECT - col2 - col2 DIV + col0 col2 FROM tab1
----
-57
-72
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-72
SELECT - col2 - col2 / + col0 col2 FROM tab1
----
-57
-72
-97

query III rowsort
SELECT * FROM tab2 cor0 WHERE NULL NOT BETWEEN NULL AND col0
----

query I rowsort
SELECT col0 * + col2 FROM tab0 WHERE NULL IN ( col0 )
----

query I rowsort
SELECT ALL - col2 FROM tab2 WHERE + col1 > ( col2 * col0 )
----

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

query III rowsort
SELECT * FROM tab0 WHERE NULL BETWEEN NULL AND NULL
----

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - col0 + tab0.col2 * + col0 + col2 FROM tab0
----
1
7291
801

query I rowsort
SELECT + tab2.col1 + - col1 * + tab2.col1 * col2 + - col0 AS col2 FROM tab2
----
-11044
-25923
-90525

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

query I rowsort
SELECT ALL col2 * + col1 - + col1 * - tab0.col1 AS col2 FROM tab0
----
10234
15743
9506

query I rowsort
SELECT DISTINCT + cor0.col2 + col2 + + cor0.col1 FROM tab1 AS cor0
----
124
134
205

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

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

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

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

query I rowsort
SELECT ALL - cor0.col0 * col0 + col2 + col0 FROM tab1 AS cor0
----
-3975
-6224
48

query I rowsort
SELECT ALL - - cor0.col1 * + col0 * - col1 + col1 * col0 + col0 * cor0.col2 FROM tab0 cor0
----
-174648
-325885
-721612

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

query I rowsort
SELECT col1 + + col0 * + col0 + - col2 AS col1 FROM tab2 cor0
----
53
6117
6220

query I rowsort
SELECT ALL tab1.col1 * cor0.col2 AS col2 FROM tab1 cor0 CROSS JOIN tab1
----
9 values hashing to e15c44d5a431966f2851e6bf4041b374

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

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

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

query I rowsort
SELECT ALL cor0.col0 * 69 - col1 FROM tab0 AS cor0
----
1570
2318
6050

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-102
SELECT DISTINCT ( - col0 ) + - col0 DIV cor0.col2 FROM tab1 AS cor0
----
-3
-65
-80

skipif mysql # not compatible
query I rowsort label-102
SELECT DISTINCT ( - col0 ) + - col0 / cor0.col2 FROM tab1 AS cor0
----
-3
-65
-80

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

query I rowsort
SELECT DISTINCT 20 + col1 AS col0 FROM tab0 cor0
----
106
111
117

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 13 ) * col2 * col0 + col0 col1 FROM tab0
----
-10272
-420
-94785

query I rowsort
SELECT DISTINCT - 99 * col0 * + col2 AS col2 FROM tab2
----
-18711
-200772
-297198

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

query I rowsort
SELECT + 85 * - tab0.col2 AS col0 FROM tab0
----
-2805
-6970
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-111
SELECT - - cor0.col1 DIV 88 AS col0 FROM tab0 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-111
SELECT - - cor0.col1 / 88 AS col0 FROM tab0 AS cor0
----
0
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-112
SELECT + cor0.col2 DIV - 92 FROM tab1, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-112
SELECT + cor0.col2 / - 92 FROM tab1, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

onlyif mysql # use DIV operator for integer division
query I rowsort label-113
SELECT DISTINCT 13 DIV - col1 AS col1 FROM tab1
----
-1
0

skipif mysql # not compatible
query I rowsort label-113
SELECT DISTINCT 13 / - col1 AS col1 FROM tab1
----
-1
0

query I rowsort
SELECT DISTINCT - col1 + + tab2.col0 + col2 * + col2 AS col0 FROM tab2
----
1506
695
705

query I rowsort
SELECT + col1 * - col2 + cor0.col1 * - col2 FROM tab2 AS cor0
----
-1292
-1674
-3068

query I rowsort
SELECT - + 75 + - cor0.col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 188b4b579f5a7b513be74fbbbd9431e0

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-118
SELECT col0 DIV 58 - col0 AS col0 FROM tab0
----
-24
-35
-88

skipif mysql # not compatible
query I rowsort label-118
SELECT col0 / 58 - col0 AS col0 FROM tab0
----
-24
-35
-88

query I rowsort
SELECT col0 + 89 * + tab1.col1 * - tab1.col1 FROM tab1
----
-14961
-60161
-8836

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

query I rowsort
SELECT DISTINCT col0 + + 90 * ( + tab2.col1 ) + 99 AS col0 FROM tab2
----
1708
2896
5487

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-122
SELECT col2 + CAST( 88 AS SIGNED ) FROM tab1 cor0
----
142
145
184

skipif mysql # not compatible
query I rowsort label-122
SELECT col2 + CAST ( 88 AS INTEGER ) FROM tab1 cor0
----
142
145
184

onlyif mysql # use DIV operator for integer division
query I rowsort label-123
SELECT + cor0.col1 + cor0.col0 DIV - col1 FROM tab1 AS cor0
----
26
4
7

skipif mysql # not compatible
query I rowsort label-123
SELECT + cor0.col1 + cor0.col0 / - col1 FROM tab1 AS cor0
----
26
4
7

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

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

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

query I rowsort
SELECT ALL - col1 + - 96 * + tab2.col0 FROM tab2
----
-703
-7547
-7601

query I rowsort
SELECT DISTINCT - + col2 * col1 + - 18 FROM tab2 cor0
----
-1552
-664
-855

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-130
SELECT + col2 * - ( 72 * + cor0.col1 ) + + col2 DIV col2 FROM tab1 cor0
----
-101087
-41039
-89855

skipif mysql # not compatible
query I rowsort label-130
SELECT + col2 * - ( 72 * + cor0.col1 ) + + col2 / col2 FROM tab1 cor0
----
-101087
-41039
-89855

query I rowsort
SELECT col0 * + col0 + - cor0.col1 * - col0 FROM tab2 AS cor0
----
10686
266
7584

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-134
SELECT ALL col1 * + CAST( col1 AS SIGNED ) FROM tab2 AS cor0
----
289
3481
961

skipif mysql # not compatible
query I rowsort label-134
SELECT ALL col1 * + CAST ( col1 AS INTEGER ) FROM tab2 AS cor0
----
289
3481
961

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + 76 col1 FROM tab1
----
102
86
89

query I rowsort
SELECT + cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

onlyif mysql # use DIV operator for integer division
query I rowsort label-138
SELECT + - cor0.col2 DIV ( col1 ) + + col2 * - col0 FROM tab1 AS cor0
----
-164
-3653
-7687

skipif mysql # not compatible
query I rowsort label-138
SELECT + - cor0.col2 / ( col1 ) + + col2 * - col0 FROM tab1 AS cor0
----
-164
-3653
-7687

query I rowsort
SELECT ALL col0 * + 12 AS col2 FROM tab1 AS cor0
----
36
768
960

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + col2 ) + - col2 * col1 col2 FROM tab1 cor0
----
-1152
-1350
-513

query I rowsort
SELECT - - 34 * cor0.col1 FROM tab0 AS cor0
----
2924
3094
3298

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

query I rowsort
SELECT + 38 * col2 * col1 AS col0 FROM tab2 cor0
----
24548
31806
58292

query I rowsort
SELECT - 62 * col0 FROM tab0 cor0
----
-1488
-2170
-5518

query I rowsort
SELECT DISTINCT - ( - 59 + col1 ) * + col2 FROM tab0
----
-2624
-38
-891

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-150
SELECT DISTINCT col1 * col0 + col1 DIV + col1 AS col2 FROM tab0 AS cor0
----
2065
3396
8100

skipif mysql # not compatible
query I rowsort label-150
SELECT DISTINCT col1 * col0 + col1 / + col1 AS col2 FROM tab0 AS cor0
----
2065
3396
8100

query I rowsort
SELECT ALL cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

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

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

query I rowsort
SELECT ALL - col1 + + 38 * col0 * col1 FROM tab0 AS cor0
----
128913
307671
78346

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

skipif mysql # not compatible
query I rowsort label-154
SELECT ALL - CAST ( 82 AS INTEGER ) FROM tab2 AS cor0
----
-82
-82
-82

query I rowsort
SELECT ( col0 ) - col0 AS col1 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-156
SELECT + col0 + - col2 + tab0.col1 DIV - 84 AS col0 FROM tab0
----
-10
33
6

skipif mysql # not compatible
query I rowsort label-156
SELECT + col0 + - col2 + tab0.col1 / - 84 AS col0 FROM tab0
----
-10
33
6

query I rowsort
SELECT + + 11 AS col1 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 69116737f3f57e2e3273f6dbb04d036c

query I rowsort
SELECT ALL + - ( cor0.col1 ) * cor0.col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 9be0dab92dd50faf37ee99ac8db7c57d

query I rowsort
SELECT ALL 95 * - col1 + - col2 * - col0 * col0 FROM tab1 AS cor0
----
-1984
232522
613165

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

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

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

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

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

query I rowsort
SELECT DISTINCT + + cor0.col1 * 9 AS col0 FROM tab1 AS cor0
----
117
234
90

query I rowsort
SELECT DISTINCT + + col1 + 52 FROM tab0 AS cor0
----
138
143
149

query I rowsort
SELECT col0 + - 90 * - col2 AS col2 FROM tab0 AS cor0
----
125
2994
7469

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * ( 50 ) - col2 col1 FROM tab1 AS cor0
----
2646
2793
4704

onlyif mysql # use DIV operator for integer division
query I rowsort label-167
SELECT - 84 DIV tab1.col1 FROM tab1
----
-3
-6
-8

skipif mysql # not compatible
query I rowsort label-167
SELECT - 84 / tab1.col1 FROM tab1
----
-3
-6
-8

query I rowsort
SELECT DISTINCT col0 * + tab2.col0 - + 1 FROM tab2
----
48
6083
6240

onlyif mysql # use DIV operator for integer division
query I rowsort label-169
SELECT - col1 - col0 DIV 86 AS col0 FROM tab0
----
-86
-92
-97

skipif mysql # not compatible
query I rowsort label-169
SELECT - col1 - col0 / 86 AS col0 FROM tab0
----
-86
-92
-97

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

skipif mysql # not compatible
query I rowsort label-170
SELECT ALL col0 / col0 - ( col1 ) * + col0 FROM tab0
----
-2063
-3394
-8098

query I rowsort
SELECT col1 * col2 * col1 FROM tab1
----
16224
36504
5700

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ( + col1 + CAST ( + col0 AS REAL ) ) col2 FROM tab0
----
110
132
180

query I rowsort
SELECT ALL 81 * 82 FROM tab1 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 01549614939a7d2aa5ed3efd400de73c

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

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

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-178
SELECT - + cor0.col0 * - CAST( 72 AS SIGNED ) - - col0 FROM tab0 AS cor0
----
1752
2555
6497

skipif mysql # not compatible
query I rowsort label-178
SELECT - + cor0.col0 * - CAST ( 72 AS INTEGER ) - - col0 FROM tab0 AS cor0
----
1752
2555
6497

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

query I rowsort
SELECT col1 * + col1 - - 54 FROM tab1 AS cor0
----
154
223
730

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

query I rowsort
SELECT DISTINCT - - 6 * + col1 AS col2 FROM tab1 AS cor0
----
156
60
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + cor0.col0 * + 99 + col0 * 36 * - col0 col0 FROM tab0 AS cor0
----
-23112
-293967
-47565

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

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

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

query I rowsort
SELECT DISTINCT ( 24 ) + - col0 FROM tab2 AS cor0
----
-54
-55
17

query I rowsort
SELECT ALL - 88 * - col1 + - cor0.col0 AS col0 FROM tab1 AS cor0
----
1064
2285
816

onlyif mysql # use DIV operator for integer division
query I rowsort label-188
SELECT ALL col1 DIV 20 AS col0 FROM tab2 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-188
SELECT ALL col1 / 20 AS col0 FROM tab2 AS cor0
----
0
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 78 + col2 * col0 col0 FROM tab0 AS cor0
----
113
7376
870

query I rowsort
SELECT - + 81 * + ( col2 ) FROM tab2 AS cor0
----
-2106
-2187
-3078

query I rowsort
SELECT + ( col1 * - col1 ) + ( ( - col0 ) ) * + 43 AS col1 FROM tab0
----
-10914
-12108
-8428

query I rowsort
SELECT 69 + tab2.col0 * col0 AS col0 FROM tab2
----
118
6153
6310

query I rowsort
SELECT - + 25 + - col2 FROM tab2 cor0
----
-51
-52
-63

query I rowsort
SELECT + + 24 + col1 FROM tab1 AS cor0
----
34
37
50

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

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

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

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

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

query I rowsort
SELECT + - ( + col2 ) + + 63 AS col2 FROM tab2 AS cor0
----
25
36
37

query I rowsort
SELECT DISTINCT 68 * + tab2.col0 AS col1 FROM tab2
----
476
5304
5372

query I rowsort
SELECT ALL - - col1 - 17 * - 92 AS col1 FROM tab2 AS cor0
----
1581
1595
1623

onlyif mysql # use DIV operator for integer division
query I rowsort label-202
SELECT - 19 DIV col0 - - col0 col2 FROM tab1
----
-3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-202
SELECT - 19 / col0 - - col0 col2 FROM tab1
----
-3
64
80

query I rowsort
SELECT + 48 AS col0 FROM tab0
----
48
48
48

query I rowsort
SELECT + 35 AS col2 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 0d13dfd4c4a9d51ace3582c31cadcdbc

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-206
SELECT + col0 DIV - col2 + + col2 + cor0.col2 AS col0 FROM tab1 AS cor0
----
108
113
192

skipif mysql # not compatible
query I rowsort label-206
SELECT + col0 / - col2 + + col2 + cor0.col2 AS col0 FROM tab1 AS cor0
----
108
113
192

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

query I rowsort
SELECT DISTINCT tab0.col2 * + cor0.col0 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 819103d3cf87b5ea7ab7d6e1018478a0

query I rowsort
SELECT DISTINCT - tab2.col1 * - 4 * + col0 AS col0 FROM tab2
----
18408
5372
868

query I rowsort
SELECT ALL - tab0.col2 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT + 90 AS col1 FROM tab0, tab0 cor0
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

query I rowsort
SELECT + 96 * col0 AS col2 FROM tab2 AS cor0
----
672
7488
7584

query I rowsort
SELECT cor2.col0 AS col1 FROM tab2, tab0 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab2 AS cor2
----
243 values hashing to 455e4df3bf7b0fa681c56e89df1a761f

query I rowsort
SELECT ( 85 + tab1.col2 ) AS col2 FROM tab1
----
139
142
181

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

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

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

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

skipif mysql # not compatible
query I rowsort label-217
SELECT col1 / 97 FROM tab0 AS cor0
----
0
0
1

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

query I rowsort
SELECT + 37 * - 33 FROM tab1 AS cor0
----
-1221
-1221
-1221

query I rowsort
SELECT DISTINCT - tab1.col0 - - 73 FROM tab1, tab0 AS cor0
----
-7
70
9

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

query I rowsort
SELECT DISTINCT + 81 * cor0.col2 FROM tab0, tab0 AS cor0, tab1 cor1
----
2673
6642
81

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

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

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

query I rowsort
SELECT ALL - tab2.col0 + 52 * - col0 FROM tab2
----
-371
-4134
-4187

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

query I rowsort
SELECT ALL + col2 * col2 + + 3 AS col0 FROM tab0
----
1092
4
6727

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 88 col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

query I rowsort
SELECT col2 * ( - col2 * + cor0.col0 ) FROM tab2 AS cor0
----
-114076
-5103
-52728

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

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

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

skipif mysql # not compatible
query I rowsort label-235
SELECT ALL + + 42 / col1 + - cor0.col0 AS col0 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT ALL - + 33 * col0 AS col2 FROM tab0 AS cor0
----
-1155
-2937
-792

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

skipif mysql # not compatible
query I rowsort label-237
SELECT + + 35 / - col1 FROM tab1 AS cor0
----
-1
-2
-3

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

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

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

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

query I rowsort
SELECT ALL - 62 + col1 * + col0 + cor0.col1 * + 69 FROM tab0 cor0
----
10026
14316
7936

query I rowsort
SELECT DISTINCT - col2 * - col2 * col1 + col1 + 4 AS col0 FROM tab0
----
198
611979
93744

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - col0 * col2 col2 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT + cor0.col0 + - 32 * + col0 FROM tab0 cor0
----
-1085
-2759
-744

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

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

query I rowsort
SELECT ALL - - 56 * col0 AS col0 FROM tab2 AS cor0
----
392
4368
4424

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

skipif mysql # not compatible
query I rowsort label-250
SELECT ALL 13 / col0 AS col0 FROM tab2 AS cor0
----
0
0
1

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

query I rowsort
SELECT ALL col2 * col2 + 15 FROM tab2 cor0
----
1459
691
744

query I rowsort
SELECT - 49 * - col0 + + col2 AS col2 FROM tab2 cor0
----
370
3848
3909

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 1 + col1 col2 FROM tab2 AS cor0
----
18
32
60

query I rowsort
SELECT DISTINCT + 25 - - cor0.col0 AS col2 FROM tab1, tab1 AS cor0
----
105
28
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 46 * tab1.col1 col0 FROM tab1
----
1196
460
598

query I rowsort
SELECT + ( - 54 ) FROM tab1
----
-54
-54
-54

query I rowsort
SELECT DISTINCT - ( cor0.col1 ) + 95 AS col0 FROM tab1 AS cor0
----
69
82
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * col0 + - cor0.col0 col2 FROM tab2 AS cor0
----
42
6006
6162

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - col0 * - col2 col1 FROM tab2 AS cor0
----
1323
158184
237158

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

query I rowsort
SELECT 95 * + col0 AS col1 FROM tab2
----
665
7410
7505

query I rowsort
SELECT + 63 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to c3eea92c46f2c49716f386a58b575025

onlyif mysql # use DIV operator for integer division
query I rowsort label-266
SELECT - col2 + - ( + col2 ) DIV + col1 FROM tab1 AS cor0
----
-103
-56
-62

skipif mysql # not compatible
query I rowsort label-266
SELECT - col2 + - ( + col2 ) / + col1 FROM tab1 AS cor0
----
-103
-56
-62

query I rowsort
SELECT DISTINCT col1 + + ( + ( + col2 ) * + cor0.col2 ) + + 63 FROM tab2 AS cor0
----
1524
798
823

query I rowsort
SELECT DISTINCT - - cor0.col0 * 74 + cor0.col1 + - col2 * + 13 AS col1 FROM tab0 cor0
----
1433
2674
5611

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

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

skipif mysql # not compatible
query I rowsort label-270
SELECT 85 / col1 AS col1 FROM tab0
----
0
0
0

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

query I rowsort
SELECT DISTINCT - col2 + 82 * + 24 FROM tab1 AS cor0
----
1872
1911
1914

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

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

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

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

query I rowsort
SELECT - col0 * col0 + - col2 * col2 AS col1 FROM tab2 AS cor0
----
-6760
-7685
-778

query I rowsort
SELECT + cor0.col2 - 54 FROM tab2 AS cor0
----
-16
-27
-28

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-279
SELECT + ( + col1 ) DIV - 95 AS col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-279
SELECT + ( + col1 ) / - 95 AS col2 FROM tab1
----
0
0
0

query I rowsort
SELECT 83 * + tab0.col0 FROM tab0
----
1992
2905
7387

onlyif mysql # use DIV operator for integer division
query I rowsort label-281
SELECT ALL + 94 DIV + col0 + ( tab1.col1 + col1 ) FROM tab1
----
21
27
83

skipif mysql # not compatible
query I rowsort label-281
SELECT ALL + 94 / + col0 + ( tab1.col1 + col1 ) FROM tab1
----
21
27
83

query I rowsort
SELECT ALL 62 - col1 AS col2 FROM tab2
----
3
31
45

query I rowsort
SELECT - 6 FROM tab1, tab1 cor0
----
9 values hashing to e92b2679faac7be63701967e3f0c0934

query I rowsort
SELECT DISTINCT tab2.col2 + 4 AS col1 FROM tab2
----
30
31
42

query I rowsort
SELECT ALL - col1 * + ( ( - col0 ) ) + - 12 + col0 FROM tab2 AS cor0
----
1410
212
4668

query I rowsort
SELECT ALL + col1 * col2 - - 51 AS col1 FROM tab2 AS cor0
----
1585
697
888

query I rowsort
SELECT ALL - col0 * col2 + - 93 + + col0 FROM tab1 AS cor0
----
-252
-3677
-7693

query I rowsort
SELECT ALL col1 * - col1 - col0 * + col0 FROM tab1 AS cor0
----
-4196
-6569
-685

query I rowsort
SELECT + - col2 * col2 + 62 + + col2 * + col2 FROM tab1 AS cor0
----
62
62
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-290
SELECT 18 DIV - 24 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-290
SELECT 18 / - 24 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-294
SELECT CAST( col0 AS SIGNED ) - col1 * col1 FROM tab2
----
-210
-3403
-954

skipif mysql # not compatible
query I rowsort label-294
SELECT CAST ( col0 AS INTEGER ) - col1 * col1 FROM tab2
----
-210
-3403
-954

query I rowsort
SELECT - col0 - 7 FROM tab0
----
-31
-42
-96

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

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

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

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

query I rowsort
SELECT - 15 * 2 AS col0 FROM tab0 AS cor0
----
-30
-30
-30

query I rowsort
SELECT DISTINCT + col2 * - col1 + + col0 + - cor0.col2 FROM tab2 AS cor0
----
-1482
-605
-857

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

query I rowsort
SELECT ALL + tab2.col2 * col2 FROM tab2
----
1444
676
729

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

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

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

query I rowsort
SELECT DISTINCT + ( col0 ) + 74 * + col0 AS col0 FROM tab0
----
1800
2625
6675

query I rowsort
SELECT ALL - tab1.col2 AS col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query I rowsort
SELECT DISTINCT col2 * tab2.col2 + + 60 AS col2 FROM tab2
----
1504
736
789

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-309
SELECT - 40 * + tab0.col0 DIV ( - col0 ) + col1 + - col1 FROM tab0
----
40
40
40

skipif mysql # not compatible
query I rowsort label-309
SELECT - 40 * + tab0.col0 / ( - col0 ) + col1 + - col1 FROM tab0
----
40
40
40

query I rowsort
SELECT + col2 + col1 + + 11 FROM tab1
----
120
78
91

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

query I rowsort
SELECT col2 * - col1 * 97 FROM tab1 AS cor0
----
-121056
-136188
-55290

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 DISTINCT col2 * col1 col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL + 85 + col0 * col0 AS col0 FROM tab1 AS cor0
----
4181
6485
94

query I rowsort
SELECT 47 FROM tab0, tab1 AS cor0, tab2, tab0 AS cor1
----
81 values hashing to 5c7a6f591fb2a38893dafe56c4b9b97f

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

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

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

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

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

query I rowsort
SELECT - - cor0.col1 + ( + col0 ) * col2 + col2 * col0 FROM tab0 AS cor0
----
14687
167
1670

query I rowsort
SELECT DISTINCT - cor0.col0 + ( - col0 ) + col1 AS col0 FROM tab1 AS cor0
----
-118
-147
20

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

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

query I rowsort
SELECT 84 FROM tab0, tab0 AS cor0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

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

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

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

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

skipif mysql # not compatible
query I rowsort label-327
SELECT + - col0 / + 92 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + + 53 * - 33 * + col2 AS col0 FROM tab0 cor0
----
-143418
-1749
-57717

onlyif mysql # use DIV operator for integer division
query I rowsort label-329
SELECT + CAST( - 33 AS SIGNED ) DIV col1 FROM tab2 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-329
SELECT + CAST ( - 33 AS INTEGER ) / col1 FROM tab2 AS cor0
----
-1
-1
0

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

query I rowsort
SELECT + 55 * 56 AS col1 FROM tab0 cor0
----
3080
3080
3080

onlyif mysql # use DIV operator for integer division
query I rowsort label-332
SELECT tab2.col1 + col2 + ( col1 ) DIV col0 AS col2 FROM tab2
----
55
62
85

skipif mysql # not compatible
query I rowsort label-332
SELECT tab2.col1 + col2 + ( col1 ) / col0 AS col2 FROM tab2
----
55
62
85

query I rowsort
SELECT DISTINCT + cor0.col1 + 33 FROM tab0, tab2 AS cor0
----
50
64
92

query I rowsort
SELECT + + 99 * + col1 FROM tab2 AS cor0
----
1683
3069
5841

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

query IIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0 WHERE NULL NOT IN ( + cor0.col1 )
----

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

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

query I rowsort
SELECT DISTINCT + 51 * col2 FROM tab2 AS cor0
----
1326
1377
1938

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-343
SELECT ALL - col1 DIV 73 + - col0 FROM tab0 AS cor0
----
-25
-36
-90

skipif mysql # not compatible
query I rowsort label-343
SELECT ALL - col1 / 73 + - col0 FROM tab0 AS cor0
----
-25
-36
-90

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

query I rowsort
SELECT ALL + col2 + - 89 * - 68 + col0 FROM tab0 AS cor0
----
6088
6109
6223

query I rowsort
SELECT DISTINCT - col1 * col1 + - ( col0 ) FROM tab2
----
-3559
-368
-968

query I rowsort
SELECT + col2 * - ( + 70 ) AS col2 FROM tab0 AS cor0
----
-2310
-5740
-70

query I rowsort
SELECT col2 + col2 * ( tab0.col0 * col1 ) AS col1 FROM tab0
----
3396
664200
68145

query I rowsort
SELECT - col1 * ( 47 ) - + col2 AS col1 FROM tab2
----
-1484
-2799
-837

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

query I rowsort
SELECT - cor0.col1 * - 78 AS col1 FROM tab2 AS cor0
----
1326
2418
4602

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

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

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

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

query I rowsort
SELECT DISTINCT - + col0 * ( - cor0.col1 ) + + 59 FROM tab1 cor0
----
1099
137
699

query I rowsort
SELECT - - 90 - col1 AS col1 FROM tab1 AS cor0
----
64
77
80

query I rowsort
SELECT DISTINCT - col1 * 47 AS col2 FROM tab1
----
-1222
-470
-611

query I rowsort
SELECT DISTINCT + ( 76 ) * + col2 FROM tab1
----
4104
4332
7296

query I rowsort
SELECT - col1 + + 56 AS col2 FROM tab1
----
30
43
46

query I rowsort
SELECT DISTINCT 40 * col2 AS col1 FROM tab2
----
1040
1080
1520

query I rowsort
SELECT - 10 FROM tab1, tab2 AS cor0
----
9 values hashing to f68f33032846e21ee6b2c668fc10355e

query I rowsort
SELECT ALL + ( 0 + + col2 * 14 ) AS col0 FROM tab2
----
364
378
532

query I rowsort
SELECT + 38 * tab2.col2 AS col2 FROM tab2
----
1026
1444
988

query I rowsort
SELECT ALL - col2 + + col0 + col2 FROM tab1 cor0
----
3
64
80

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-366
SELECT ALL cor0.col1 DIV cor0.col1 + + CAST( col0 * col0 AS SIGNED ) FROM tab1 AS cor0
----
10
4097
6401

skipif mysql # not compatible
query I rowsort label-366
SELECT ALL cor0.col1 / cor0.col1 + + CAST ( col0 * col0 AS INTEGER ) FROM tab1 AS cor0
----
10
4097
6401

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-368
SELECT ALL ( ( - col0 ) ) * col0 * + 54 - + col2 * + CAST( + col1 AS SIGNED ) FROM tab0
----
-33942
-435196
-66247

skipif mysql # not compatible
query I rowsort label-368
SELECT ALL ( ( - col0 ) ) * col0 * + 54 - + col2 * + CAST ( + col1 AS INTEGER ) FROM tab0
----
-33942
-435196
-66247

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

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

query I rowsort
SELECT ( col0 ) * col2 * + col0 AS col0 FROM tab2
----
1323
158184
237158

query I rowsort
SELECT DISTINCT + col1 * + 18 - - col2 AS col2 FROM tab1
----
237
330
522

query I rowsort
SELECT + 16 * col1 AS col2 FROM tab0
----
1376
1456
1552

query I rowsort
SELECT tab2.col2 * 70 FROM tab2
----
1820
1890
2660

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

query I rowsort
SELECT + col0 + 39 * col0 - col1 * 13 FROM tab2 AS cor0
----
-123
2353
2939

query I rowsort
SELECT + ( col0 ) * - tab0.col2 + col0 + - 83 * col0 AS col0 FROM tab0
----
-14596
-2760
-2905

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

query I rowsort
SELECT DISTINCT - col0 * col2 * - ( 76 ) FROM tab0 AS cor0
----
2660
554648
60192

query I rowsort
SELECT - col2 * + col0 * 3 AS col2 FROM tab2 AS cor0
----
-567
-6084
-9006

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + - col1 * - cor0.col0 col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT + ( - col2 ) * - cor0.col1 * - col0 + cor0.col0 AS col0 FROM tab0 AS cor0
----
-3360
-664029
-68088

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-387
SELECT + + col1 DIV col1 + ( - 68 ) AS col1 FROM tab0 AS cor0
----
-67
-67
-67

skipif mysql # not compatible
query I rowsort label-387
SELECT + + col1 / col1 + ( - 68 ) AS col1 FROM tab0 AS cor0
----
-67
-67
-67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 77 * - cor0.col2 * - col2 col0 FROM tab2 AS cor0
----
111188
52052
56133

query I rowsort
SELECT ALL + 99 * + col2 * col2 FROM tab0 AS cor0
----
107811
665676
99

query I rowsort
SELECT + col0 + + col1 * - cor0.col2 * col0 FROM tab2 cor0
----
-119574
-50955
-5852

query I rowsort
SELECT + + col0 + - col2 * ( col2 ) * 84 FROM tab2 AS cor0
----
-121217
-56706
-61229

query I rowsort
SELECT DISTINCT - + col0 + - col1 * - cor0.col1 FROM tab2 AS cor0
----
210
3403
954

onlyif mysql # use DIV operator for integer division
query I rowsort label-393
SELECT ALL + - col2 + - col1 DIV col1 FROM tab2 AS cor0
----
-27
-28
-39

skipif mysql # not compatible
query I rowsort label-393
SELECT ALL + - col2 + - col1 / col1 FROM tab2 AS cor0
----
-27
-28
-39

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

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

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

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

query I rowsort
SELECT DISTINCT + col1 * ( col0 ) + col0 AS col2 FROM tab1 AS cor0
----
1120
704
81

query IIIIII rowsort
SELECT ALL * FROM tab1, tab2 cor0 WHERE NOT NULL BETWEEN NULL AND NULL
----

query I rowsort
SELECT - 64 + col0 AS col0 FROM tab1 AS cor0
----
-61
0
16

query I rowsort
SELECT + cor0.col0 * + 12 FROM tab1, tab1 AS cor0
----
9 values hashing to 4d11d73bea933b26450aca686f453b51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-401
SELECT DISTINCT CAST( 69 AS SIGNED ) FROM tab0 AS cor0
----
69

skipif mysql # not compatible
query I rowsort label-401
SELECT DISTINCT CAST ( 69 AS INTEGER ) FROM tab0 AS cor0
----
69

query I rowsort
SELECT - - 72 * col0 + col1 * - 16 FROM tab0 AS cor0
----
352
4952
968

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

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

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

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

query I rowsort
SELECT + col2 * 83 + - col0 AS col0 FROM tab0 cor0
----
2715
48
6717

query I rowsort
SELECT cor0.col1 * + 68 AS col0 FROM tab2 AS cor0
----
1156
2108
4012

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( col2 ) + col1 col2 FROM tab2 AS cor0
----
-21
33
4

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

query I rowsort
SELECT ALL - ( - col2 ) * col2 - col0 FROM tab0 AS cor0
----
-34
1065
6635

query I rowsort
SELECT DISTINCT - 55 + - col0 FROM tab2 AS cor0
----
-133
-134
-62

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

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

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

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

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

query I rowsort
SELECT ALL + col0 * col2 * col2 + ( col0 ) * col2 FROM tab1 AS cor0
----
211584
744960
8910

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 + - ( + col1 ) * + 83 col2 FROM tab1 AS cor0
----
-1175
-2212
-887

query I rowsort
SELECT DISTINCT - 26 * cor0.col1 FROM tab2 AS cor0
----
-1534
-442
-806

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

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

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

query I rowsort
SELECT - col0 * col1 + 39 AS col1 FROM tab0 AS cor0
----
-2025
-3356
-8060

query I rowsort
SELECT ( tab2.col2 + + col2 ) * ( + col2 ) FROM tab2
----
1352
1458
2888

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + 57 + - col1 col0 FROM tab1 AS cor0
----
-197
-3658
-4573

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

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

query I rowsort
SELECT ALL + col2 + 93 AS col2 FROM tab1 cor0
----
147
150
189

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * - col2 + + col0 col1 FROM tab0
----
1113
36
6813

query I rowsort
SELECT ALL 43 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to ee5108f6248be48c54e069545f81c5d9

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-435
SELECT DISTINCT - col1 * ( col0 + + col0 ) DIV - 19 AS col1 FROM tab1 AS cor0
----
109
67
8

skipif mysql # not compatible
query I rowsort label-435
SELECT DISTINCT - col1 * ( col0 + + col0 ) / - 19 AS col1 FROM tab1 AS cor0
----
109
67
8

query I rowsort
SELECT - + col0 * 17 FROM tab0 AS cor0
----
-1513
-408
-595

query I rowsort
SELECT ALL + + col0 + 70 AS col1 FROM tab0 AS cor0
----
105
159
94

query I rowsort
SELECT + tab1.col0 + col2 * 19 FROM tab1
----
1029
1147
1904

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

query I rowsort
SELECT col1 * 48 FROM tab1 AS cor0
----
1248
480
624

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

query I rowsort
SELECT - 19 * - col1 + + col0 AS col2 FROM tab0 AS cor0
----
1658
1818
1878

query I rowsort
SELECT + + 47 + + col0 AS col2 FROM tab2 AS cor0
----
125
126
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 67 + col2 * col0 col1 FROM tab2 cor0
----
2095
256
3069

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

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

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

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

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

query I rowsort
SELECT + 97 FROM tab1, tab1 AS cor0
----
9 values hashing to 5e0d31ac41981bcdf6a665538a71a09c

onlyif mysql # use DIV operator for integer division
query I rowsort label-450
SELECT - col2 DIV + 97 + 58 * col0 * + col0 AS col2 FROM tab2
----
2842
352872
361978

skipif mysql # not compatible
query I rowsort label-450
SELECT - col2 / + 97 + 58 * col0 * + col0 AS col2 FROM tab2
----
2842
352872
361978

query I rowsort
SELECT col1 + 18 * - col1 + + col2 * + col0 * + col0 AS col0 FROM tab0 AS cor0
----
-424
17546
647975

query I rowsort
SELECT - 77 + + 74 + - col0 FROM tab2 AS cor0
----
-10
-81
-82

query I rowsort
SELECT DISTINCT - tab1.col2 - 10 FROM tab1
----
-106
-64
-67

query I rowsort
SELECT + 79 * cor0.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 648d66fb956fc6f56908417b53d1a5d1

query I rowsort
SELECT 87 * + 3 * col0 FROM tab2
----
1827
20358
20619

query I rowsort
SELECT ALL col1 * - 42 AS col2 FROM tab2
----
-1302
-2478
-714

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-458
SELECT + col1 DIV 23 FROM tab0
----
3
3
4

skipif mysql # not compatible
query I rowsort label-458
SELECT + col1 / 23 FROM tab0
----
3
3
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-459
SELECT CAST( 71 AS SIGNED ) * - col1 AS col1 FROM tab2
----
-1207
-2201
-4189

skipif mysql # not compatible
query I rowsort label-459
SELECT CAST ( 71 AS INTEGER ) * - col1 AS col1 FROM tab2
----
-1207
-2201
-4189

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

query I rowsort
SELECT ALL - - ( - col1 ) - col1 AS col2 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT DISTINCT + 95 * col1 * col0 FROM tab1 AS cor0
----
60800
7410
98800

query I rowsort
SELECT ALL + 17 * - col2 - + col0 FROM tab2 AS cor0
----
-466
-520
-725

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-467
SELECT col1 * col1 DIV col2 AS col1 FROM tab0
----
100
224
9409

skipif mysql # not compatible
query I rowsort label-467
SELECT col1 * col1 / col2 AS col1 FROM tab0
----
100
224
9409

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

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

query I rowsort
SELECT col0 - tab0.col0 FROM tab0
----
0
0
0

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

skipif mysql # not compatible
query I rowsort label-471
SELECT DISTINCT - tab1.col2 + tab1.col2 - + col0 / + col1 FROM tab1
----
-6
0

query I rowsort
SELECT ALL col1 * + col2 * - col2 FROM tab0
----
-611884
-93654
-97

query I rowsort
SELECT + col1 + + cor0.col2 + - col2 * col2 AS col1 FROM tab0 AS cor0
----
-6551
-970
97

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-479
SELECT DISTINCT - col0 DIV tab2.col0 FROM tab2
----
-1

skipif mysql # not compatible
query I rowsort label-479
SELECT DISTINCT - col0 / tab2.col0 FROM tab2
----
-1

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * + cor0.col2 - col2 col1 FROM tab2 AS cor0
----
162
2002
2964

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

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

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

query I rowsort
SELECT DISTINCT col2 * ( - 26 ) FROM tab2 AS cor0
----
-676
-702
-988

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-489
SELECT + col2 + 56 DIV - col0 + col0 AS col1 FROM tab2
----
104
117
26

skipif mysql # not compatible
query I rowsort label-489
SELECT + col2 + 56 / - col0 + col0 AS col1 FROM tab2
----
104
117
26

query I rowsort
SELECT ALL col1 - + col1 * 69 AS col1 FROM tab2
----
-1156
-2108
-4012

onlyif mysql # use DIV operator for integer division
query I rowsort label-491
SELECT + col2 * col1 DIV + col0 + col1 AS col1 FROM tab2
----
150
25
78

skipif mysql # not compatible
query I rowsort label-491
SELECT + col2 * col1 / + col0 + col1 AS col1 FROM tab2
----
150
25
78

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

query I rowsort
SELECT - col2 * 62 - - col2 AS col2 FROM tab2 cor0
----
-1586
-1647
-2318

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

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

query I rowsort
SELECT + cor0.col2 - + 40 AS col1 FROM tab2 AS cor0
----
-13
-14
-2

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

query I rowsort
SELECT ALL - tab1.col2 * + col1 + 81 FROM tab1
----
-1167
-1323
-489

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

query I rowsort
SELECT DISTINCT - 3 + - col2 FROM tab2
----
-29
-30
-41

onlyif mysql # use DIV operator for integer division
query I rowsort label-501
SELECT DISTINCT + col1 + - 26 DIV col2 AS col1 FROM tab0
----
71
86
91

skipif mysql # not compatible
query I rowsort label-501
SELECT DISTINCT + col1 + - 26 / col2 AS col1 FROM tab0
----
71
86
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-502
SELECT tab0.col2 DIV 48 FROM tab0, tab1 cor0, tab1 AS cor1
----
27 values hashing to 953562d3ce2a62a1679a1ae0451294c6

skipif mysql # not compatible
query I rowsort label-502
SELECT tab0.col2 / 48 FROM tab0, tab1 cor0, tab1 AS cor1
----
27 values hashing to 953562d3ce2a62a1679a1ae0451294c6

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

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

query I rowsort
SELECT + 97 * col0 FROM tab2
----
679
7566
7663

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

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

query I rowsort
SELECT DISTINCT + 82 + col2 FROM tab2
----
108
109
120

onlyif mysql # use DIV operator for integer division
query I rowsort label-508
SELECT DISTINCT 39 + col0 + col0 DIV + 3 FROM tab0
----
157
71
85

skipif mysql # not compatible
query I rowsort label-508
SELECT DISTINCT 39 + col0 + col0 / + 3 FROM tab0
----
157
71
85

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 59 + cor0.col2 col1 FROM tab2 AS cor0
----
85
86
97

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

query I rowsort
SELECT DISTINCT - 21 AS col0 FROM tab2 AS cor0
----
-21

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 18 + col0 col1 FROM tab1 cor0
----
-15
46
62

query I rowsort
SELECT DISTINCT - + col0 * col2 - 91 FROM tab1 AS cor0
----
-253
-3739
-7771

query I rowsort
SELECT DISTINCT - 94 * col1 - - ( + col0 ) * + cor0.col2 AS col2 FROM tab1 AS cor0
----
-2282
2708
6458

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

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

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

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

query I rowsort
SELECT ALL - ( - cor0.col2 ) + 8 FROM tab0 AS cor0
----
41
9
90

query I rowsort
SELECT + ( col2 ) * + 16 FROM tab1 cor0
----
1536
864
912

query I rowsort
SELECT DISTINCT + 55 * + col1 FROM tab2 AS cor0
----
1705
3245
935

query I rowsort
SELECT DISTINCT - col0 * + col0 + 9 + + col2 FROM tab1 AS cor0
----
-4030
-6295
54

query I rowsort
SELECT col1 * + 39 AS col1 FROM tab0 AS cor0
----
3354
3549
3783

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-530
SELECT + col1 / 29 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL 95 * col0 FROM tab1
----
285
6080
7600

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-534
SELECT ALL - col0 + col0 DIV - col0 AS col0 FROM tab1 AS cor0
----
-4
-65
-81

skipif mysql # not compatible
query I rowsort label-534
SELECT ALL - col0 + col0 / - col0 AS col0 FROM tab1 AS cor0
----
-4
-65
-81

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

query I rowsort
SELECT ALL - col2 + col0 + cor0.col0 AS col0 FROM tab1 AS cor0
----
-48
64
71

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

query I rowsort
SELECT DISTINCT + 53 + col0 * col0 + + col2 FROM tab1 AS cor0
----
116
4206
6549

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-543
SELECT DISTINCT + + col2 DIV - col2 + - col1 + 35 FROM tab0 AS cor0
----
-52
-57
-63

skipif mysql # not compatible
query I rowsort label-543
SELECT DISTINCT + + col2 / - col2 + - col1 + 35 FROM tab0 AS cor0
----
-52
-57
-63

query I rowsort
SELECT 63 + - 67 FROM tab1 AS cor0
----
-4
-4
-4

query I rowsort
SELECT ALL + col2 + 85 * - col1 AS col1 FROM tab2 AS cor0
----
-1407
-2608
-4989

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-547
SELECT ALL CAST( - col0 AS SIGNED ) * - col1 AS col2 FROM tab0 cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-547
SELECT ALL CAST ( - col0 AS INTEGER ) * - col1 AS col2 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT ALL col2 - ( ( - col2 ) ) * + col2 FROM tab0
----
1122
2
6806

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

query I rowsort
SELECT + - ( + col0 ) + - col0 + col1 * col0 AS col2 FROM tab0 AS cor0
----
2016
3325
7921

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-554
SELECT - cor0.col1 * col0 + col2 + 89 DIV col0 AS col0 FROM tab0 AS cor0
----
-2028
-3392
-8016

skipif mysql # not compatible
query I rowsort label-554
SELECT - cor0.col1 * col0 + col2 + 89 / col0 AS col0 FROM tab0 AS cor0
----
-2028
-3392
-8016

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

query I rowsort
SELECT ALL - col2 + col1 * - 39 AS col1 FROM tab0 AS cor0
----
-3387
-3631
-3784

query I rowsort
SELECT ALL ( col0 ) * - tab2.col1 + 20 + 15 AS col0 FROM tab2
----
-1308
-182
-4567

query I rowsort
SELECT ALL 94 * col1 + + col0 AS col0 FROM tab0 AS cor0
----
8108
8643
9153

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

query I rowsort
SELECT DISTINCT - - ( + 99 ) * - col1 AS col1 FROM tab1 AS cor0
----
-1287
-2574
-990

query I rowsort
SELECT + - col2 - 41 * - col0 FROM tab0 AS cor0
----
1434
3567
951

query I rowsort
SELECT ALL - + col2 + 75 AS col2 FROM tab2 AS cor0
----
37
48
49

query I rowsort
SELECT DISTINCT + - 60 - - 61 AS col0 FROM tab2 AS cor0
----
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-564
SELECT - 4 * + ( col2 ) DIV CAST( + col1 * + cor0.col0 AS SIGNED ) FROM tab0 AS cor0
----
0
0
0

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

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

query I rowsort
SELECT ALL ( + col1 ) * + col0 + - ( - col2 ) * col0 AS col1 FROM tab2 AS cor0
----
406
4345
6630

query I rowsort
SELECT ALL + + col0 * + col2 + col2 - 51 FROM tab2 AS cor0
----
165
2003
2989

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

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

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

query I rowsort
SELECT + - cor0.col0 * + 39 AS col2 FROM tab2 AS cor0
----
-273
-3042
-3081

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

query I rowsort
SELECT ALL + - col1 * col1 + + 47 + - col1 AS col2 FROM tab0 cor0
----
-7435
-8325
-9459

query I rowsort
SELECT DISTINCT - cor1.col2 + - 66 * 83 AS col0 FROM tab1, tab1 cor0, tab0 AS cor1, tab1 AS cor2
----
-5479
-5511
-5560

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

skipif mysql # not compatible
query I rowsort label-575
SELECT DISTINCT - cor0.col1 / + 26 FROM tab2, tab1 AS cor0
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col2 col0 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
1
33
82

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

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-584
SELECT ALL - col1 DIV - ( col0 ) FROM tab1 cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-584
SELECT ALL - col1 / - ( col0 ) FROM tab1 cor0
----
0
0
8

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

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

query I rowsort
SELECT ( - 40 ) FROM tab2 AS cor0
----
-40
-40
-40

query I rowsort
SELECT ALL col1 * - ( 27 * + tab2.col2 ) FROM tab2
----
-17442
-22599
-41418

query I rowsort
SELECT ALL ( - 61 ) * col2 FROM tab0
----
-2013
-5002
-61

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

query I rowsort
SELECT - cor0.col1 * - 97 AS col1 FROM tab1 AS cor0
----
1261
2522
970

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

query I rowsort
SELECT - 44 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 38f05fdaaf15e64b62f27cd96f73fb79

query I rowsort
SELECT + ( 76 ) * - cor0.col0 FROM tab2, tab2 AS cor0
----
9 values hashing to ca8e051800d63941b6ac2ce7339fd068

query I rowsort
SELECT + - col2 + - 28 FROM tab0 AS cor0
----
-110
-29
-61

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

skipif mysql # not compatible
query I rowsort
SELECT col1 * - CAST ( - col1 AS REAL ) FROM tab1 AS cor0
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-597
SELECT col0 * 5 + - col2 DIV + cor0.col1 AS col2 FROM tab1 AS cor0
----
13
315
393

skipif mysql # not compatible
query I rowsort label-597
SELECT col0 * 5 + - col2 / + cor0.col1 AS col2 FROM tab1 AS cor0
----
13
315
393

onlyif mysql # use DIV operator for integer division
query I rowsort label-598
SELECT col1 DIV col2 + + col2 DIV + col1 AS col0 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-598
SELECT col1 / col2 + + col2 / + col1 AS col0 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT DISTINCT 78 - - col2 FROM tab1 AS cor0
----
132
135
174

onlyif mysql # use DIV operator for integer division
query I rowsort label-600
SELECT DISTINCT - col2 * - col0 * ( col1 ) + col1 DIV - 4 FROM tab2 AS cor0
----
119638
51030
5852

skipif mysql # not compatible
query I rowsort label-600
SELECT DISTINCT - col2 * - col0 * ( col1 ) + col1 / - 4 FROM tab2 AS cor0
----
119638
51030
5852

query I rowsort
SELECT DISTINCT ( col1 ) - + 5 FROM tab1 AS cor0
----
21
5
8

query I rowsort
SELECT ALL 49 - + col0 FROM tab0 cor0
----
-40
14
25

query I rowsort
SELECT DISTINCT + col0 * col1 * - 36 + 83 AS col1 FROM tab0 AS cor0
----
-122137
-291481
-74221

onlyif mysql # use DIV operator for integer division
query I rowsort label-604
SELECT ALL - col2 + cor0.col1 + - cor0.col2 DIV + col0 AS col1 FROM tab0 AS cor0
----
52
9
96

skipif mysql # not compatible
query I rowsort label-604
SELECT ALL - col2 + cor0.col1 + - cor0.col2 / + col0 AS col1 FROM tab0 AS cor0
----
52
9
96

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

query I rowsort
SELECT ALL + tab2.col2 + - tab2.col2 FROM tab2
----
0
0
0

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

query I rowsort
SELECT - col0 * - col1 + - col0 * + 30 FROM tab0 AS cor0
----
1344
2345
5429

query I rowsort
SELECT - 31 + col0 AS col0 FROM tab0
----
-7
4
58

query I rowsort
SELECT ALL - col1 * col1 + cor0.col0 * - col0 + + 35 * 45 AS col1 FROM tab2 AS cor0
----
-4955
-7990
565

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

query I rowsort
SELECT DISTINCT - col0 * + col2 + + 87 * col0 FROM tab1 AS cor0
----
-720
1920
99

query I rowsort
SELECT ALL + + cor0.col2 + - 84 * col0 FROM tab2 AS cor0
----
-561
-6526
-6598

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

query I rowsort
SELECT col0 - col1 * - col2 FROM tab1
----
1328
1407
634

query I rowsort
SELECT DISTINCT col0 - col0 * tab1.col0 * - col1 AS col1 FROM tab1
----
237
41024
83280

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

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

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

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

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NULL <> + col0
----

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

query I rowsort
SELECT ALL col2 FROM tab1 WHERE NOT col1 IN ( + col0 * + col1 )
----
54
57
96

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

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

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

query I rowsort
SELECT DISTINCT - col0 * col0 + col2 * + tab0.col1 AS col2 FROM tab0
----
-1128
-459
2262

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

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

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

query I rowsort
SELECT ALL - col1 * col1 + - col0 * - tab1.col0 AS col1 FROM tab1
----
-667
3996
6231

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT NULL NOT IN ( tab1.col2 )
----

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-634
SELECT ALL + col0 + col2 * tab1.col1 DIV col2 FROM tab1
----
29
74
93

skipif mysql # not compatible
query I rowsort label-634
SELECT ALL + col0 + col2 * tab1.col1 / col2 FROM tab1
----
29
74
93

query I rowsort
SELECT ALL - tab2.col2 - - tab2.col0 * col0 FROM tab2
----
22
6058
6203

query I rowsort
SELECT col2 * - tab1.col2 + col1 + col2 * col1 FROM tab1
----
-1486
-2669
-7955

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-639
SELECT DISTINCT col2 DIV + col1 + col2 * col2 + - 51 * - tab2.col2 AS col2 FROM tab2
----
2002
2106
3384

skipif mysql # not compatible
query I rowsort label-639
SELECT DISTINCT col2 / + col1 + col2 * col2 + - 51 * - tab2.col2 AS col2 FROM tab2
----
2002
2106
3384

query I rowsort
SELECT DISTINCT 80 + 24 * - col2 + col1 FROM tab0
----
-1797
-626
153

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

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

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

query I rowsort
SELECT + + ( - col1 ) * - 20 FROM tab1 AS cor0
----
200
260
520

query I rowsort
SELECT - col0 * 71 FROM tab2
----
-497
-5538
-5609

query I rowsort
SELECT 75 AS col2 FROM tab1, tab2 cor0
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

query I rowsort
SELECT ALL 70 * 14 AS col0 FROM tab1
----
980
980
980

onlyif mysql # use DIV operator for integer division
query I rowsort label-647
SELECT col0 DIV - 13 FROM tab2 cor0
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-647
SELECT col0 / - 13 FROM tab2 cor0
----
-6
-6
0

query I rowsort
SELECT DISTINCT cor0.col0 + + 95 FROM tab0 AS cor0
----
119
130
184

query I rowsort
SELECT col2 * col1 + + col2 FROM tab1
----
1344
1458
627

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 26 * - col1 + + col0 col0 FROM tab2 AS cor0
----
1612
521
813

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + col0 * ( col2 ) col0 FROM tab1 AS cor0
----
136
3638
7667

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 + col2 + + col1 * - ( - col2 ) AS col1 FROM tab1 AS cor0
----
1344
1458
627

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-657
SELECT DISTINCT + 65 DIV - col1 - - 45 * + col0 AS col1 FROM tab1 cor0
----
133
2874
3595

skipif mysql # not compatible
query I rowsort label-657
SELECT DISTINCT + 65 / - col1 - - 45 * + col0 AS col1 FROM tab1 cor0
----
133
2874
3595

onlyif mysql # use DIV operator for integer division
query I rowsort label-658
SELECT cor0.col0 + col2 DIV col0 FROM tab1 AS cor0
----
21
64
81

skipif mysql # not compatible
query I rowsort label-658
SELECT cor0.col0 + col2 / col0 FROM tab1 AS cor0
----
21
64
81

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-662
SELECT DISTINCT cor0.col2 + - col2 * - col1 DIV col1 + - 23 * - cor0.col2 AS col0 FROM tab0 AS cor0
----
2050
25
825

skipif mysql # not compatible
query I rowsort label-662
SELECT DISTINCT cor0.col2 + - col2 * - col1 / col1 + - 23 * - cor0.col2 AS col0 FROM tab0 AS cor0
----
2050
25
825

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

query I rowsort
SELECT ALL col2 * 48 + - 51 AS col2 FROM tab2 AS cor0
----
1197
1245
1773

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + ( + 19 ) col0 FROM tab0 AS cor0
----
108
43
54

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

skipif mysql # not compatible
query I rowsort label-666
SELECT ALL - + col2 + CAST ( + col1 AS INTEGER ) FROM tab0 cor0
----
53
9
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-667
SELECT ALL col1 DIV cor0.col0 + + 4 AS col2 FROM tab0 AS cor0
----
5
6
7

skipif mysql # not compatible
query I rowsort label-667
SELECT ALL col1 / cor0.col0 + + 4 AS col2 FROM tab0 AS cor0
----
5
6
7

query I rowsort
SELECT ALL - - col2 * + 92 + + col2 AS col0 FROM tab0 AS cor0
----
3069
7626
93

query I rowsort
SELECT + - col1 + 34 - - col2 AS col2 FROM tab1 AS cor0
----
117
62
81

query I rowsort
SELECT DISTINCT + col1 * - 49 FROM tab2 AS cor0
----
-1519
-2891
-833

query I rowsort
SELECT ALL + cor0.col1 * - 87 AS col2 FROM tab0 AS cor0
----
-7482
-7917
-8439

query I rowsort
SELECT DISTINCT - col2 + + 34 AS col1 FROM tab1 AS cor0
----
-20
-23
-62

query I rowsort
SELECT DISTINCT + ( - 8 ) + + col1 FROM tab0 AS cor0
----
78
83
89

query I rowsort
SELECT - col2 + - cor0.col2 * col2 * 45 AS col1 FROM tab1 cor0
----
-131274
-146262
-414816

onlyif mysql # use DIV operator for integer division
query I rowsort label-675
SELECT - - ( 36 ) DIV - col0 AS col2 FROM tab2 AS cor0
----
-5
0
0

skipif mysql # not compatible
query I rowsort label-675
SELECT - - ( 36 ) / - col0 AS col2 FROM tab2 AS cor0
----
-5
0
0

query I rowsort
SELECT DISTINCT - ( col0 ) + + col1 * 5 AS col1 FROM tab1 AS cor0
----
-14
-15
127

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

query I rowsort
SELECT col0 * + col1 + col1 + col2 AS col0 FROM tab0
----
2183
3493
8272

onlyif mysql # use DIV operator for integer division
query I rowsort label-679
SELECT DISTINCT - col1 DIV ( - tab1.col1 ) + col1 - 75 AS col1 FROM tab1
----
-48
-61
-64

skipif mysql # not compatible
query I rowsort label-679
SELECT DISTINCT - col1 / ( - tab1.col1 ) + col1 - 75 AS col1 FROM tab1
----
-48
-61
-64

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

query I rowsort
SELECT DISTINCT col2 - ( - 85 ) AS col1 FROM tab0
----
118
167
86

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-683
SELECT DISTINCT 57 DIV col2 FROM tab1
----
0
1

skipif mysql # not compatible
query I rowsort label-683
SELECT DISTINCT 57 / col2 FROM tab1
----
0
1

query I rowsort
SELECT - 86 AS col2 FROM tab2
----
-86
-86
-86

query I rowsort
SELECT DISTINCT + cor1.col1 FROM tab1, tab0 cor0, tab0 AS cor1
----
86
91
97

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

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

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

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

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

query I rowsort
SELECT col0 * - cor0.col0 + 5 * cor0.col2 + - 20 FROM tab2 AS cor0
----
-5974
-6071
66

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

query I rowsort
SELECT col0 * 38 FROM tab2 AS cor0
----
266
2964
3002

query I rowsort
SELECT ALL - col2 * + col2 + - col0 + ( - col2 ) FROM tab2 AS cor0
----
-1561
-763
-780

query I rowsort
SELECT DISTINCT - + 96 * col2 AS col2 FROM tab0 cor0
----
-3168
-7872
-96

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

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

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

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

query I rowsort
SELECT col1 + col0 + col0 FROM tab2 AS cor0
----
175
215
45

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

skipif mysql # not compatible
query I rowsort label-699
SELECT + 84 / - col0 FROM tab1 cor0
----
-1
-1
-28

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

query I rowsort
SELECT DISTINCT - + 6 + col2 AS col1 FROM tab2 AS cor0
----
20
21
32

query I rowsort
SELECT DISTINCT + 50 * + ( - col2 ) * 28 - + 13 AS col2 FROM tab2 AS cor0
----
-36413
-37813
-53213

query I rowsort
SELECT ALL - 18 * + cor0.col2 AS col0 FROM tab1 AS cor0
----
-1026
-1728
-972

query I rowsort
SELECT + col0 * 36 FROM tab0 AS cor0
----
1260
3204
864

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

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

query I rowsort
SELECT 87 * - col1 AS col1 FROM tab2 AS cor0
----
-1479
-2697
-5133

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-710
SELECT DISTINCT CAST ( NULL AS INTEGER ) * 85 * - tab0.col2 col2 FROM tab0
----
NULL

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

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

query I rowsort
SELECT 96 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 22c5141a629f0ef396738ee2c8be6303

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

query I rowsort
SELECT ALL + + 24 + - col0 * + col1 FROM tab0 AS cor0
----
-2040
-3371
-8075

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 56 * col0 col0 FROM tab0 cor0
----
1344
1960
4984

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

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

query I rowsort
SELECT ALL + 8 * + col1 FROM tab1 AS cor0
----
104
208
80

query I rowsort
SELECT ALL - - cor0.col2 + 8 AS col1 FROM tab1 AS cor0
----
104
62
65

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 * ( + 22 ) col1 FROM tab1 AS cor0
----
220
286
572

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * 95 col1 FROM tab0 AS cor0
----
8170
8645
9215

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-725
SELECT DISTINCT + col2 + col1 DIV col2 FROM tab0 AS cor0
----
35
83
98

skipif mysql # not compatible
query I rowsort label-725
SELECT DISTINCT + col2 + col1 / col2 FROM tab0 AS cor0
----
35
83
98

query I rowsort
SELECT ALL 79 * cor0.col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 6646573ec3d7b7e653272e873993a6b1

query I rowsort
SELECT 14 * + 17 FROM tab0
----
238
238
238

query I rowsort
SELECT + 55 * col0 * - col1 FROM tab2
----
-11935
-253110
-73865

query I rowsort
SELECT - 81 - + 80 AS col1 FROM tab1 AS cor0
----
-161
-161
-161

onlyif mysql # use DIV operator for integer division
query I rowsort label-730
SELECT + col0 + - col1 - + col0 DIV ( + col1 ) AS col1 FROM tab0
----
-2
-62
-62

skipif mysql # not compatible
query I rowsort label-730
SELECT + col0 + - col1 - + col0 / ( + col1 ) AS col1 FROM tab0
----
-2
-62
-62

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

query I rowsort
SELECT ALL col2 * - 36 FROM tab1 AS cor0
----
-1944
-2052
-3456

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + + col1 col1 FROM tab2 AS cor0
----
-21
33
4

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

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

query I rowsort
SELECT ALL col0 * + col2 * 87 AS col1 FROM tab1 AS cor0
----
14094
317376
668160

query I rowsort
SELECT + cor0.col2 + 91 FROM tab2 AS cor0
----
117
118
129

onlyif mysql # use DIV operator for integer division
query I rowsort label-739
SELECT DISTINCT - col2 + + 50 DIV + 5 FROM tab1 AS cor0
----
-44
-47
-86

skipif mysql # not compatible
query I rowsort label-739
SELECT DISTINCT - col2 + + 50 / + 5 FROM tab1 AS cor0
----
-44
-47
-86

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-743
SELECT ALL - CAST ( col0 AS INTEGER ) * cor0.col1 AS col2 FROM tab2 cor0
----
-1343
-217
-4602

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

query I rowsort
SELECT + 81 + col1 AS col1 FROM tab0 cor0
----
167
172
178

onlyif mysql # use DIV operator for integer division
query I rowsort label-746
SELECT DISTINCT 20 DIV + cor0.col0 + + 56 FROM tab0, tab2 AS cor0
----
56
58

skipif mysql # not compatible
query I rowsort label-746
SELECT DISTINCT 20 / + cor0.col0 + + 56 FROM tab0, tab2 AS cor0
----
56
58

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

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

query I rowsort
SELECT - - cor0.col1 * ( col1 ) * 48 FROM tab2 AS cor0
----
13872
167088
46128

query I rowsort
SELECT ALL - col0 - 34 * - col2 AS col2 FROM tab0 cor0
----
-1
1098
2699

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

skipif mysql # not compatible
query I rowsort label-751
SELECT - col0 + - 60 / col0 AS col0 FROM tab2 AS cor0
----
-15
-78
-79

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

query I rowsort
SELECT ALL - + cor0.col0 + col2 + col1 * ( + 60 ) * - col2 AS col1 FROM tab2 AS cor0
----
-38801
-50200
-92092

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

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

query I rowsort
SELECT + col1 * + col1 - ( - 6 ) AS col1 FROM tab2
----
295
3487
967

query I rowsort
SELECT - col2 + + col2 + + 32 * ( col0 ) FROM tab2
----
224
2496
2528

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

query I rowsort
SELECT - ( - col0 ) + 35 AS col1 FROM tab2 AS cor0
----
113
114
42

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

query I rowsort
SELECT + cor0.col0 * col2 * 9 AS col2 FROM tab2 AS cor0
----
1701
18252
27018

query I rowsort
SELECT ALL - cor0.col2 * 37 * 67 + col0 FROM tab1 AS cor0
----
-133863
-141239
-237904

onlyif mysql # use DIV operator for integer division
query I rowsort label-762
SELECT col0 DIV 66 + + col1 * - col1 FROM tab0 cor0
----
-7396
-8280
-9409

skipif mysql # not compatible
query I rowsort label-762
SELECT col0 / 66 + + col1 * - col1 FROM tab0 cor0
----
-7396
-8280
-9409

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

query I rowsort
SELECT cor0.col0 + + 5 FROM tab0 AS cor0
----
29
40
94

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

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

query I rowsort
SELECT DISTINCT - col1 * 57 + - 72 FROM tab2 cor0
----
-1041
-1839
-3435

query I rowsort
SELECT ( + col2 * + ( col2 ) ) - - col1 * + col0 FROM tab1
----
10256
2994
3889

query I rowsort
SELECT DISTINCT 25 + - tab0.col0 * col1 FROM tab0
----
-2039
-3370
-8074

query I rowsort
SELECT ALL + 68 AS col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 10aa25f1c6b97582c34521ac6452e0b4

query I rowsort
SELECT ALL + 74 * col0 - 54 AS col2 FROM tab1
----
168
4682
5866

onlyif mysql # use DIV operator for integer division
query I rowsort label-772
SELECT ALL - tab1.col1 - + col1 DIV ( + 71 ) FROM tab1
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-772
SELECT ALL - tab1.col1 - + col1 / ( + 71 ) FROM tab1
----
-10
-13
-26

query I rowsort
SELECT DISTINCT 14 + 33 FROM tab1, tab2 AS cor0
----
47

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

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

query I rowsort
SELECT 56 * + tab0.col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 3ca9c7c38885a43841d7bdad2123bb71

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

query I rowsort
SELECT col1 * 41 + + col2 FROM tab0
----
3559
3813
3978

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

query I rowsort
SELECT + tab2.col1 + 21 FROM tab2
----
38
52
80

query I rowsort
SELECT DISTINCT - tab2.col1 * 68 + col1 * - col2 AS col1 FROM tab2
----
-1802
-2945
-5546

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

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

query I rowsort
SELECT DISTINCT tab1.col0 + + 85 * cor0.col0 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 4912f3c908fbb7b76bd734c214d577a3

query I rowsort
SELECT + tab1.col2 + - ( 36 ) AS col0 FROM tab1
----
18
21
60

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

query I rowsort
SELECT DISTINCT + tab2.col2 + 24 FROM tab2
----
50
51
62

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

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

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

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

query I rowsort
SELECT ALL 43 * - 25 AS col1 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to f1b6aaace8ae2b976a5f2f9926b3e64e

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

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

query I rowsort
SELECT DISTINCT cor0.col2 * 40 + 6 * - tab1.col0 AS col2 FROM tab1, tab2 cor0, tab1 cor1
----
9 values hashing to 977d2e6c636bc2b71004fae88a9b15f2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-793
SELECT + - CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-793
SELECT + - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

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

query I rowsort
SELECT 8 * cor0.col0 FROM tab0 AS cor0
----
192
280
712

onlyif mysql # use DIV operator for integer division
query I rowsort label-796
SELECT ALL 97 DIV - col2 + + col1 * 32 col0 FROM tab0 AS cor0
----
2750
2911
3007

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-796
SELECT ALL 97 / - col2 + + col1 * 32 col0 FROM tab0 AS cor0
----
2750
2911
3007

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 22 * col1 + - 47 col1 FROM tab2 AS cor0
----
-1345
-421
-729

query I rowsort
SELECT ALL 24 * col2 - - col1 FROM tab2 cor0
----
679
683
929

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

query I rowsort
SELECT + 84 * + col0 FROM tab0 AS cor0
----
2016
2940
7476

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

skipif mysql # not compatible
query I rowsort label-802
SELECT ALL + col1 / col1 + ( - col2 ) / col0 AS col2 FROM tab2 AS cor0
----
-2
1
1

query I rowsort
SELECT DISTINCT - ( col0 ) * 41 - - col0 FROM tab0 AS cor0
----
-1400
-3560
-960

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

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

query I rowsort
SELECT 21 * + cor0.col1 FROM tab1 AS cor0
----
210
273
546

query I rowsort
SELECT - 61 * - col2 AS col1 FROM tab0 AS cor0
----
2013
5002
61

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

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

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

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

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

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

query I rowsort
SELECT ALL - tab1.col1 AS col2 FROM tab1, tab0 cor0
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query I rowsort
SELECT ALL - 35 + + 6 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 0cc9ddad93fc783055518ae4b6be054b

query I rowsort
SELECT - col1 * + col2 * 42 + cor0.col2 FROM tab2 AS cor0
----
-27094
-35127
-64402

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

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

query I rowsort
SELECT ALL + 91 + + col0 * col0 AS col1 FROM tab0 AS cor0
----
1316
667
8012

query I rowsort
SELECT + ( col2 ) + ( + col1 + + col0 ) AS col0 FROM tab1 AS cor0
----
131
189
83

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

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

query I rowsort
SELECT DISTINCT + 25 AS col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
25

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

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

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

query I rowsort
SELECT ALL col0 + + 66 FROM tab0
----
101
155
90

query I rowsort
SELECT + - col2 * ( col1 * col0 ) + - col2 AS col0 FROM tab1 AS cor0
----
-36537
-4266
-99936

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - col2 + ( 67 ) FROM tab1 AS cor0
----
-29
10
13

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

skipif mysql # not compatible
query I rowsort label-833
SELECT + col1 * CAST ( - col0 * - col2 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
36480
4212
99840

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

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

query I rowsort
SELECT 19 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( - col0 AS REAL ) * col0 AS col1 FROM tab0 cor0
----
-1225
-576
-7921

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col1 + - col2 col0 FROM tab0 AS cor0
----
2031
3394
8017

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

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

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

query I rowsort
SELECT ALL - 54 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 71e27a12767d3a987ce05e4d6edad211

query I rowsort
SELECT ALL - col1 * col2 + + col2 * - cor0.col1 FROM tab2 AS cor0
----
-1292
-1674
-3068

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

query I rowsort
SELECT ALL + col1 * col1 + col0 FROM tab0 cor0
----
7420
8370
9444

query I rowsort
SELECT ALL - col0 * col1 + - col0 + col2 AS col2 FROM tab0 AS cor0
----
-2055
-3429
-8106

query I rowsort
SELECT - col2 * - ( + 64 ) AS col0 FROM tab0 AS cor0
----
2112
5248
64

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-850
SELECT + col0 DIV + cor0.col2 + - col1 * col2 * - ( 72 * + cor0.col0 ) FROM tab0 AS cor0
----
244475
47816497
4904064

skipif mysql # not compatible
query I rowsort label-850
SELECT + col0 / + cor0.col2 + - col1 * col2 * - ( 72 * + cor0.col0 ) FROM tab0 AS cor0
----
244475
47816497
4904064

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

query I rowsort
SELECT tab1.col1 * + tab1.col2 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 16ae0e1090cb09b93854a4788f17716b

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-854
SELECT DISTINCT 2 * - col1 - - col1 DIV - 95 FROM tab0
----
-172
-182
-195

skipif mysql # not compatible
query I rowsort label-854
SELECT DISTINCT 2 * - col1 - - col1 / - 95 FROM tab0
----
-172
-182
-195

query I rowsort
SELECT - 11 + col0 + - col1 AS col0 FROM tab0
----
-13
-73
-73

query I rowsort
SELECT DISTINCT + 96 + col2 - + tab1.col2 FROM tab1
----
96

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-858
SELECT ALL col1 + col1 DIV col0 col2 FROM tab2
----
17
35
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-858
SELECT ALL col1 + col1 / col0 col2 FROM tab2
----
17
35
59

query I rowsort
SELECT ALL tab1.col2 * col0 * col2 + col1 FROM tab1
----
207946
737293
8774

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-861
SELECT DISTINCT tab1.col2 * - col2 + tab1.col2 DIV 69 AS col1 FROM tab1
----
-2916
-3249
-9215

skipif mysql # not compatible
query I rowsort label-861
SELECT DISTINCT tab1.col2 * - col2 + tab1.col2 / 69 AS col1 FROM tab1
----
-2916
-3249
-9215

onlyif mysql # use DIV operator for integer division
query I rowsort label-862
SELECT - col1 DIV col0 + + ( 78 ) FROM tab2
----
74
78
78

skipif mysql # not compatible
query I rowsort label-862
SELECT - col1 / col0 + + ( 78 ) FROM tab2
----
74
78
78

query I rowsort
SELECT + col2 * - col2 + col0 AS col1 FROM tab0
----
-1065
-6635
34

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

query I rowsort
SELECT DISTINCT + ( + col2 ) + - 10 FROM tab2 AS cor0
----
16
17
28

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

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

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

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

query I rowsort
SELECT ALL + 73 + col0 * col1 FROM tab0 AS cor0
----
2137
3468
8172

query I rowsort
SELECT ALL 33 * + col2 FROM tab2 AS cor0
----
1254
858
891

query I rowsort
SELECT ALL 51 * + 64 FROM tab1, tab0 cor0, tab1 AS cor1
----
27 values hashing to acbd2f791dca1be871f035f2038f1eec

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 33 + - col0 col0 FROM tab2 AS cor0
----
-111
-112
-40

onlyif mysql # use DIV operator for integer division
query I rowsort label-872
SELECT DISTINCT 43 + cor0.col0 DIV col1 FROM tab1 AS cor0
----
43
49

skipif mysql # not compatible
query I rowsort label-872
SELECT DISTINCT 43 + cor0.col0 / col1 FROM tab1 AS cor0
----
43
49

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

query I rowsort
SELECT DISTINCT 72 * 5 AS col2 FROM tab0, tab0 cor0
----
360

query I rowsort
SELECT DISTINCT col2 * 50 AS col0 FROM tab0
----
1650
4100
50

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-877
SELECT ALL + col1 * - CAST ( NULL AS INTEGER ) + - 17 col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 17 * - col1 + col0 + - col1 * col2 * col1 col0 FROM tab1 AS cor0
----
-16365
-36943
-5806

query I rowsort
SELECT DISTINCT 14 * - 13 AS col2 FROM tab2 cor0
----
-182

query I rowsort
SELECT DISTINCT ( - col1 ) * col0 * col0 FROM tab2 cor0
----
-106097
-1519
-358956

query I rowsort
SELECT + cor0.col2 * + cor0.col0 + + col1 + + col0 FROM tab2 AS cor0
----
2165
227
3098

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 - - col0 * - col1 col2 FROM tab1 cor0
----
-1120
-704
-81

query I rowsort
SELECT DISTINCT - col0 * - 6 FROM tab1 AS cor0
----
18
384
480

onlyif mysql # use DIV operator for integer division
query I rowsort label-888
SELECT - 62 * - col1 + + col0 * - ( - ( cor0.col2 ) ) + - 3 DIV - col1 AS col1 FROM tab2 AS cor0
----
2111
4056
5686

skipif mysql # not compatible
query I rowsort label-888
SELECT - 62 * - col1 + + col0 * - ( - ( cor0.col2 ) ) + - 3 / - col1 AS col1 FROM tab2 AS cor0
----
2111
4056
5686

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

skipif mysql # not compatible
query I rowsort label-889
SELECT + col1 / - col0 - - col0 FROM tab2 AS cor0
----
3
78
79

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

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

query I rowsort
SELECT ALL - + 80 FROM tab0 cor0
----
-80
-80
-80

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

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

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

query I rowsort
SELECT DISTINCT 45 * + col2 * - cor0.col2 FROM tab2 AS cor0
----
-30420
-32805
-64980

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * 83 col2 FROM tab0 AS cor0
----
-1992
-2905
-7387

query I rowsort
SELECT DISTINCT - + 42 + - col0 FROM tab1 AS cor0
----
-106
-122
-45

query I rowsort
SELECT DISTINCT col1 * + col0 + cor0.col1 * - cor0.col2 * col1 FROM tab0 AS cor0
----
-242004
-6014
-670943

query I rowsort
SELECT - 10 + - cor0.col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 89ab1f225d49b7d859ef647134aab56f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-900
SELECT DISTINCT CAST( cor0.col1 AS SIGNED ) AS col2 FROM tab0, tab1 AS cor0, tab2 AS cor1, tab0 cor2
----
10
13
26

skipif mysql # not compatible
query I rowsort label-900
SELECT DISTINCT CAST ( cor0.col1 AS INTEGER ) AS col2 FROM tab0, tab1 AS cor0, tab2 AS cor1, tab0 cor2
----
10
13
26

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

query I rowsort
SELECT ALL 22 - cor0.col0 * - col0 FROM tab2 AS cor0
----
6106
6263
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-903
SELECT + - cor0.col0 * col0 - - 70 * + col1 DIV + col1 col2 FROM tab1 cor0
----
-4026
-6330
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-903
SELECT + - cor0.col0 * col0 - - 70 * + col1 / + col1 col2 FROM tab1 cor0
----
-4026
-6330
61

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

query I rowsort
SELECT - col2 + col0 - col1 * + col1 FROM tab1 AS cor0
----
-185
-727
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-906
SELECT + CAST( - col0 AS SIGNED ) DIV tab1.col0 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-906
SELECT + CAST ( - col0 AS INTEGER ) / tab1.col0 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT 55 * + col2 AS col2 FROM tab1
----
2970
3135
5280

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

query I rowsort
SELECT ALL + ( - tab2.col1 ) + col2 + + col1 * ( col0 ) FROM tab2
----
1364
213
4569

query I rowsort
SELECT - col2 * 86 * - col0 AS col1 FROM tab1
----
13932
313728
660480

query I rowsort
SELECT DISTINCT col2 * col1 + - 35 FROM tab0 AS cor0
----
2803
62
7427

query I rowsort
SELECT ALL + col2 - + col0 * col0 * cor0.col2 FROM tab0 AS cor0
----
-1224
-18975
-649440

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

query I rowsort
SELECT - col1 * + col2 + - 63 FROM tab0 AS cor0
----
-160
-2901
-7525

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

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

query I rowsort
SELECT + col2 + - 51 * col0 FROM tab0 AS cor0
----
-1191
-1784
-4457

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

query I rowsort
SELECT DISTINCT col2 * 9 - ( + col2 ) * col0 AS col1 FROM tab2 AS cor0
----
-1794
-2660
54

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

query I rowsort
SELECT DISTINCT - 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-921
SELECT ALL - col0 + + CAST( + col0 AS SIGNED ) FROM tab1 AS cor0
----
0
0
0

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

query I rowsort
SELECT - col1 + - 87 AS col1 FROM tab0 AS cor0
----
-173
-178
-184

query I rowsort
SELECT ( - col0 ) + - 23 AS col1 FROM tab0
----
-112
-47
-58

onlyif mysql # use DIV operator for integer division
query I rowsort label-924
SELECT + col2 DIV - col0 + ( - 43 + + col2 ) FROM tab2
----
-17
-19
-5

skipif mysql # not compatible
query I rowsort label-924
SELECT + col2 / - col0 + ( - 43 + + col2 ) FROM tab2
----
-17
-19
-5

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

query I rowsort
SELECT - 40 + + tab1.col0 + - 56 AS col0 FROM tab1
----
-16
-32
-93

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

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

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

query I rowsort
SELECT - - col0 + - 95 FROM tab0 AS cor0
----
-6
-60
-71

onlyif mysql # use DIV operator for integer division
query I rowsort label-930
SELECT col1 DIV col2 + col1 * col0 * - tab0.col0 AS col2 FROM tab0
----
-118728
-49534
-720810

skipif mysql # not compatible
query I rowsort label-930
SELECT col1 / col2 + col1 * col0 * - tab0.col0 AS col2 FROM tab0
----
-118728
-49534
-720810

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

query I rowsort
SELECT col1 - 61 FROM tab1
----
-35
-48
-51

query I rowsort
SELECT ALL 0 AS col0 FROM tab1, tab2 cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-935
SELECT + col1 + 53 * col1 DIV + col2 AS col2 FROM tab1 cor0
----
19
20
51

skipif mysql # not compatible
query I rowsort label-935
SELECT + col1 + 53 * col1 / + col2 AS col2 FROM tab1 cor0
----
19
20
51

query I rowsort
SELECT + ( + cor0.col1 ) + - cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 5fc5fcec216468c99d1c0eaf371b3149

query I rowsort
SELECT ALL - cor1.col2 + + cor0.col2 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 78ee409ace216f2d5d943a54975c94c1

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

query I rowsort
SELECT + 38 + + 33 FROM tab1 AS cor0
----
71
71
71

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

skipif mysql # not compatible
query I rowsort label-940
SELECT + CAST ( - col0 AS INTEGER ) * - col1 * + col0 AS col0 FROM tab0 AS cor0
----
118825
49536
720811

query I rowsort
SELECT DISTINCT - 48 + 97 AS col2 FROM tab2 AS cor0
----
49

query I rowsort
SELECT DISTINCT 73 * col0 AS col2 FROM tab2 AS cor0
----
511
5694
5767

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-945
SELECT CAST( 8 AS SIGNED ) * cor0.col1 AS col2 FROM tab0 AS cor0
----
688
728
776

skipif mysql # not compatible
query I rowsort label-945
SELECT CAST ( 8 AS INTEGER ) * cor0.col1 AS col2 FROM tab0 AS cor0
----
688
728
776

query I rowsort
SELECT ALL 35 * col0 * + col1 + cor0.col0 FROM tab0 AS cor0
----
118860
283554
72264

query I rowsort
SELECT - col2 * 78 FROM tab2 AS cor0
----
-2028
-2106
-2964

query I rowsort
SELECT DISTINCT + 45 + - col0 AS col1 FROM tab0 AS cor0
----
-44
10
21

query I rowsort
SELECT DISTINCT - 19 FROM tab2, tab2 AS cor0
----
-19

query I rowsort
SELECT ALL - col1 * - 31 * col1 AS col0 FROM tab2
----
107911
29791
8959

query I rowsort
SELECT - 64 * - col0 AS col0 FROM tab1 AS cor0
----
192
4096
5120

query I rowsort
SELECT + cor0.col2 * col2 + 13 FROM tab1 AS cor0
----
2929
3262
9229

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

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

skipif mysql # not compatible
query I rowsort label-954
SELECT ( col2 ) / cor0.col0 + + col0 AS col2 FROM tab0 AS cor0
----
25
35
89

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

query I rowsort
SELECT ALL col1 * + 45 AS col1 FROM tab0
----
3870
4095
4365

query I rowsort
SELECT - 75 - + 70 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to c79967bbfe31387e6d92241fdf1b18ff

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

query I rowsort
SELECT col1 * col0 - - 9 FROM tab1 AS cor0
----
1049
649
87

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-961
SELECT tab1.col2 DIV tab1.col1 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-961
SELECT tab1.col2 / tab1.col1 FROM tab1
----
2
5
7

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

skipif mysql # not compatible
query I rowsort label-962
SELECT 0 / tab1.col2 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL 71 * col0 FROM tab0
----
1704
2485
6319

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col0 * ( col0 ) + + 8 col0 FROM tab1 AS cor0
----
-19
-262136
-511992

query I rowsort
SELECT + col1 - - col2 * + 38 FROM tab2 AS cor0
----
1047
1057
1461

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 + 84 col1 FROM tab0 cor0
----
170
175
181

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-970
SELECT DISTINCT + col0 DIV 96 + 38 FROM tab1 AS cor0
----
38

skipif mysql # not compatible
query I rowsort label-970
SELECT DISTINCT + col0 / 96 + 38 FROM tab1 AS cor0
----
38

query I rowsort
SELECT DISTINCT + col2 * 48 + 58 FROM tab0 AS cor0
----
106
1642
3994

query I rowsort
SELECT + - cor0.col1 * cor0.col0 + 50 AS col0 FROM tab1 AS cor0
----
-28
-590
-990

query I rowsort
SELECT ALL - cor0.col2 + 67 FROM tab0 AS cor0
----
-15
34
66

query I rowsort
SELECT DISTINCT col2 * + ( 62 ) + - col1 FROM tab0 AS cor0
----
-35
1960
4993

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

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

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

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

query I rowsort
SELECT + 76 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 30b8941a700cffd5b983116383bd42d5

query I rowsort
SELECT + + col2 * - ( cor0.col2 ) - - col0 AS col0 FROM tab0 AS cor0
----
-1065
-6635
34

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

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

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

query I rowsort
SELECT ALL + col1 + + 66 FROM tab2 AS cor0
----
125
83
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-984
SELECT + col2 - + 41 * col0 DIV - col2 FROM tab0 AS cor0
----
126
1436
62

skipif mysql # not compatible
query I rowsort label-984
SELECT + col2 - + 41 * col0 / - col2 FROM tab0 AS cor0
----
126
1436
62

query I rowsort
SELECT ALL cor0.col1 + ( 54 + + col1 ) * + col0 FROM tab2 AS cor0
----
5626
626
8873

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

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

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

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

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

query I rowsort
SELECT ALL + 23 * col0 FROM tab2
----
161
1794
1817

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

query I rowsort
SELECT + 38 AS col0 FROM tab1, tab0 cor0
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

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

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

skipif mysql # not compatible
query I rowsort label-994
SELECT + - CAST ( cor0.col0 AS INTEGER ) FROM tab2 AS cor0
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 99 ) + - col1 col2 FROM tab2 AS cor0
----
-116
-130
-158

query I rowsort
SELECT + 75 + 86 + + col2 AS col0 FROM tab2 AS cor0
----
187
188
199

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

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

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

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

query I rowsort
SELECT DISTINCT - 83 + col2 + 5 * + col2 FROM tab2 AS cor0
----
145
73
79

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

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

query I rowsort
SELECT - col1 - tab1.col0 * + col0 * + col0 AS col0 FROM tab1
----
-262154
-512013
-53

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

skipif mysql # not compatible
query I rowsort label-1005
SELECT DISTINCT col0 + col2 / col2 FROM tab0
----
25
36
90

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

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

query I rowsort
SELECT col0 + + tab2.col2 + col2 * + col0 AS col0 FROM tab2
----
2132
223
3119

query I rowsort
SELECT DISTINCT tab2.col0 * tab2.col2 AS col1 FROM tab2 WHERE NULL <> NULL
----

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + + col2 + - tab2.col1 col1 FROM tab2
----
100
3
45

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1014
SELECT - col2 DIV col1 AS col0 FROM tab1
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-1014
SELECT - col2 / col1 AS col0 FROM tab1
----
-2
-5
-7

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

query I rowsort
SELECT DISTINCT + col2 + col1 + col1 FROM tab0
----
195
205
264

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1018
SELECT - 84 * col1 DIV ( + ( + col0 ) ) col2 FROM tab2 AS cor0
----
-18
-372
-63

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1018
SELECT - 84 * col1 / ( + ( + col0 ) ) col2 FROM tab2 AS cor0
----
-18
-372
-63

query I rowsort
SELECT - ( cor0.col0 ) * ( + col1 * - col0 ) + - col1 AS col1 FROM tab2 AS cor0
----
106080
1488
358897

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

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

query I rowsort
SELECT DISTINCT - col0 * + col0 + - col2 + col1 * tab0.col1 AS col1 FROM tab0
----
278
6787
8183

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

query I rowsort
SELECT ALL col0 * - col0 AS col2 FROM tab0
----
-1225
-576
-7921

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

query I rowsort
SELECT ALL + tab0.col2 * + col1 * col1 + col0 + + col0 * col1 FROM tab0
----
12839
246156
687230

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

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

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

query I rowsort
SELECT DISTINCT + col2 * - col2 + col1 FROM tab0 AS cor0
----
-1003
-6633
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-1031
SELECT ALL - col0 DIV - col2 + - col2 FROM tab0
----
-33
-81
34

skipif mysql # not compatible
query I rowsort label-1031
SELECT ALL - col0 / - col2 + - col2 FROM tab0
----
-33
-81
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col2 + col1 col0 FROM tab2
----
-21
33
4

query I rowsort
SELECT ALL col0 + - col2 * col2 * - col2 FROM tab1 cor0
----
157467
185257
884816

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 41 + - cor0.col2 col1 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
-123
-42
-74

onlyif mysql # use DIV operator for integer division
query I rowsort label-1036
SELECT ALL ( cor0.col1 ) * col1 - + col2 * col0 DIV - col0 AS col1 FROM tab1 cor0
----
157
265
730

skipif mysql # not compatible
query I rowsort label-1036
SELECT ALL ( cor0.col1 ) * col1 - + col2 * col0 / - col0 AS col1 FROM tab1 cor0
----
157
265
730

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

query I rowsort
SELECT DISTINCT + col0 * - 81 FROM tab0 AS cor0
----
-1944
-2835
-7209

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * + 4 col2 FROM tab2 cor0
----
124
236
68

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 44 col1 FROM tab0, tab1 AS cor0
----
9 values hashing to ab2bc2b9f8baa300df7755e5980a319d

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

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

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

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

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

query I rowsort
SELECT - - 62 * + col2 FROM tab2 AS cor0
----
1612
1674
2356

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - col2 * + col1 col0 FROM tab1 AS cor0
----
-1235
-1378
-560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - 38 + col0 col0 FROM tab2 AS cor0
----
1185
2320
725

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

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

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

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

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

query I rowsort
SELECT DISTINCT - col2 + - col0 * - 26 FROM tab1
----
1607
1984
24

query I rowsort
SELECT DISTINCT - col0 * - tab2.col0 + col2 AS col1 FROM tab2
----
6110
6279
76

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

query I rowsort
SELECT ALL col1 + + col1 * col0 * - col1 + - tab1.col0 FROM tab1
----
-13587
-2005
-6454

onlyif mysql # use DIV operator for integer division
query I rowsort label-1060
SELECT col2 + ( 92 ) DIV col0 FROM tab0 AS cor0
----
3
36
83

skipif mysql # not compatible
query I rowsort label-1060
SELECT col2 + ( 92 ) / col0 FROM tab0 AS cor0
----
3
36
83

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1063
SELECT + + col2 * - col2 + col2 DIV col1 - - col2 AS col2 FROM tab1 cor0
----
-2860
-3187
-9113

skipif mysql # not compatible
query I rowsort label-1063
SELECT + + col2 * - col2 + col2 / col1 - - col2 AS col2 FROM tab1 cor0
----
-2860
-3187
-9113

onlyif mysql # use DIV operator for integer division
query I rowsort label-1064
SELECT + - col2 + col2 DIV - 62 AS col1 FROM tab0 AS cor0
----
-1
-33
-83

skipif mysql # not compatible
query I rowsort label-1064
SELECT + - col2 + col2 / - 62 AS col1 FROM tab0 AS cor0
----
-1
-33
-83

query I rowsort
SELECT + col2 * col1 + - 22 FROM tab2 AS cor0
----
1512
624
815

query I rowsort
SELECT 22 + + col1 + - ( col1 + col1 ) FROM tab0 AS cor0
----
-64
-69
-75

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

query I rowsort
SELECT DISTINCT + ( + col0 ) * col1 * 60 AS col1 FROM tab1
----
38400
4680
62400

query I rowsort
SELECT ALL + 27 * cor0.col1 * - col2 FROM tab2 AS cor0
----
-17442
-22599
-41418

onlyif mysql # use DIV operator for integer division
query I rowsort label-1070
SELECT ALL + 78 * + col1 + 70 DIV - 54 col0 FROM tab2 AS cor0
----
1325
2417
4601

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1070
SELECT ALL + 78 * + col1 + 70 / - 54 col0 FROM tab2 AS cor0
----
1325
2417
4601

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

query I rowsort
SELECT ALL - cor0.col0 * - col1 + - 49 FROM tab1 AS cor0
----
29
591
991

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col0 FROM tab0 cor0
----
1
33
82

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

query I rowsort
SELECT ALL col1 * 63 * col2 FROM tab1
----
35910
78624
88452

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

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

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

query I rowsort
SELECT ALL - - col1 + + cor0.col2 + col2 FROM tab0 AS cor0
----
152
255
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + + 33 + - col2 * + col1 col2 FROM tab0 AS cor0
----
-161
-2891
-7520

query I rowsort
SELECT DISTINCT + - ( col1 ) * + col2 - col2 FROM tab1 AS cor0
----
-1344
-1458
-627

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * - col0 + col0 * + 29 col2 FROM tab2 AS cor0
----
-14
-2340
948

query I rowsort
SELECT ALL - 10 + col1 AS col1 FROM tab0 AS cor0
----
76
81
87

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

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

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

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

query I rowsort
SELECT ALL 23 * cor1.col1 - cor1.col2 AS col2 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 6a57534b30b86577058c710241e3e0f6

query I rowsort
SELECT + - 47 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 6942a0d9558277afd0d00408d65cf5aa

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1092
SELECT ALL + col0 * CAST( - col2 AS SIGNED ) * col1 - + ( 59 ) FROM tab0 AS cor0
----
-3454
-664177
-68171

skipif mysql # not compatible
query I rowsort label-1092
SELECT ALL + col0 * CAST ( - col2 AS INTEGER ) * col1 - + ( 59 ) FROM tab0 AS cor0
----
-3454
-664177
-68171

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1096
SELECT ALL + col0 DIV + tab0.col0 + 49 col1 FROM tab0
----
50
50
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1096
SELECT ALL + col0 / + tab0.col0 + 49 col1 FROM tab0
----
50
50
50

query I rowsort
SELECT + col0 * - 8 FROM tab0 cor0
----
-192
-280
-712

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

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

query I rowsort
SELECT DISTINCT - + cor0.col0 * 69 + - 18 * col2 * - 90 AS col0 FROM tab0 AS cor0
----
-795
126699
51804

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

query I rowsort
SELECT col0 * 82 AS col1 FROM tab1 AS cor0
----
246
5248
6560

query I rowsort
SELECT DISTINCT 93 + col2 AS col2 FROM tab0 AS cor0
----
126
175
94

query I rowsort
SELECT ALL - + 76 * + col2 + col0 AS col0 FROM tab1 AS cor0
----
-4101
-4268
-7216

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

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

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

query I rowsort
SELECT col2 * col1 + + col1 + col0 FROM tab1 AS cor0
----
1341
1433
644

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

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

query I rowsort
SELECT ALL + - 3 AS col2 FROM tab2 AS cor0
----
-3
-3
-3

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

query I rowsort
SELECT ALL - 57 + + cor0.col0 FROM tab1 AS cor0
----
-54
23
7

query I rowsort
SELECT ALL - 10 * col2 AS col2 FROM tab1 AS cor0
----
-540
-570
-960

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

query I rowsort
SELECT ALL + 10 * - col2 FROM tab1 AS cor0
----
-540
-570
-960

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

query I rowsort
SELECT + col0 + 36 FROM tab0 cor0
----
125
60
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * col2 col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL + col2 * 12 AS col1 FROM tab2 cor0
----
312
324
456

query I rowsort
SELECT DISTINCT + col1 * cor0.col1 + + col0 + col2 AS col2 FROM tab2 AS cor0
----
3585
406
995

query I rowsort
SELECT ALL col2 * col0 + - cor0.col0 + 72 * - col2 FROM tab0 AS cor0
----
-1608
-72
1305

query I rowsort
SELECT ALL - 74 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 5a477330c946251f814fbbfd08e77c28

query I rowsort
SELECT - col0 + + col0 + + col1 AS col0 FROM tab1
----
10
13
26

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

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

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

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

query I rowsort
SELECT DISTINCT col2 + 84 AS col1 FROM tab2
----
110
111
122

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

query I rowsort
SELECT DISTINCT + - col1 + - col2 * + 31 + + col2 FROM tab1 AS cor0
----
-1646
-1720
-2893

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

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

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

query I rowsort
SELECT ALL 47 * tab2.col2 + + tab2.col2 AS col0 FROM tab2
----
1248
1296
1824

query I rowsort
SELECT DISTINCT 5 AS col2 FROM tab2
----
5

query I rowsort
SELECT DISTINCT ( + 25 ) + col2 * + 71 AS col1 FROM tab2
----
1871
1942
2723

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1136
SELECT ALL + 4 + col0 + col2 * CAST( col2 AS SIGNED ) * col0 FROM tab0
----
26164
598529
74

skipif mysql # not compatible
query I rowsort label-1136
SELECT ALL + 4 + col0 + col2 * CAST ( col2 AS INTEGER ) * col0 FROM tab0
----
26164
598529
74

query I rowsort
SELECT - 53 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 2876418587c77a182d88db2907b0a51a

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

query I rowsort
SELECT col1 + col1 * + ( + col0 * + col0 ) FROM tab1 AS cor0
----
260
40970
83213

query I rowsort
SELECT - col1 * cor0.col1 + cor0.col2 AS col1 FROM tab0 AS cor0
----
-7363
-8199
-9408

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( col2 + col0 AS REAL ) FROM tab2
----
104
117
34

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

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

query I rowsort
SELECT DISTINCT - 82 * + col2 FROM tab0 AS cor0
----
-2706
-6724
-82

query I rowsort
SELECT ALL + ( cor1.col2 ) FROM tab0, tab1, tab0 AS cor0, tab0 cor1
----
81 values hashing to e938777ebffc2e3e9c0cdfaa4f732c05

query I rowsort
SELECT col2 + - col0 + + tab2.col0 * col1 FROM tab2
----
1302
237
4550

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1149
SELECT DISTINCT tab2.col2 DIV + 22 col0 FROM tab2, tab1, tab2 cor0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1149
SELECT DISTINCT tab2.col2 / + 22 col0 FROM tab2, tab1, tab2 cor0
----
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-1150
SELECT - col0 * col2 + + col1 * 2 DIV col0 + col2 * 17 * - col0 FROM tab0 AS cor0
----
-131362
-14249
-625

skipif mysql # not compatible
query I rowsort label-1150
SELECT - col0 * col2 + + col1 * 2 / col0 + col2 * 17 * - col0 FROM tab0 AS cor0
----
-131362
-14249
-625

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

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

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

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

query I rowsort
SELECT ALL 85 - 71 FROM tab0, tab0 AS cor0 CROSS JOIN tab1
----
27 values hashing to 409c1790b702540dd9dc067c1965b7c0

query I rowsort
SELECT col1 * col1 + cor0.col1 * - 4 * 43 AS col2 FROM tab2 AS cor0
----
-2635
-4371
-6667

query I rowsort
SELECT col1 + ( + 7 ) - col1 * tab0.col0 FROM tab0
----
-1971
-3291
-8001

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

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

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

query I rowsort
SELECT + + 3 + - ( col1 + + 64 ) FROM tab0 AS cor0
----
-147
-152
-158

query I rowsort
SELECT ALL + 51 + 55 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to e3a970c661a05070afa8a3ed8dca742e

query I rowsort
SELECT ALL - col0 * ( + ( - col1 ) ) + cor0.col1 * + col0 + - col1 FROM tab1 cor0
----
1270
130
2067

query I rowsort
SELECT ALL - + col1 * + col2 - - ( col2 ) * - 62 FROM tab2 AS cor0
----
-2511
-3002
-3146

query I rowsort
SELECT ALL - 53 AS col2 FROM tab1
----
-53
-53
-53

onlyif mysql # use DIV operator for integer division
query I rowsort label-1164
SELECT DISTINCT - col0 DIV 82 - + col2 FROM tab0
----
-1
-33
-83

skipif mysql # not compatible
query I rowsort label-1164
SELECT DISTINCT - col0 / 82 - + col2 FROM tab0
----
-1
-33
-83

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

query I rowsort
SELECT ALL col2 - - ( + col2 + col1 ) AS col1 FROM tab1
----
124
134
205

query I rowsort
SELECT + col0 * + 69 AS col1 FROM tab2
----
483
5382
5451

query I rowsort
SELECT 56 AS col1 FROM tab0, tab2 cor0
----
9 values hashing to 9c4523312174730bbc525b9977aa99fa

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

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

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

query I rowsort
SELECT ALL ( - 75 ) * tab0.col0 AS col0 FROM tab0
----
-1800
-2625
-6675

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1173
SELECT - CAST ( - col1 AS INTEGER ) col1 FROM tab0 AS cor0
----
86
91
97

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

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

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

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

query I rowsort
SELECT + - 66 * + cor0.col2 + - 1 * - col1 AS col0 FROM tab0 AS cor0
----
-2092
-5321
31

query I rowsort
SELECT - ( 74 ) FROM tab1
----
-74
-74
-74

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-1182
SELECT + col0 / col2 + col2 / col2 AS col1 FROM tab1
----
1
1
2

query I rowsort
SELECT - 89 + col2 FROM tab2
----
-51
-62
-63

query I rowsort
SELECT + 24 * + cor0.col1 + + col0 AS col1 FROM tab1 AS cor0
----
304
392
627

query I rowsort
SELECT + 6 * - col1 AS col2 FROM tab1 AS cor0
----
-156
-60
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-1186
SELECT DISTINCT 91 DIV col0 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-1186
SELECT DISTINCT 91 / col0 FROM tab0 AS cor0
----
1
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + 84 col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 01e57787628064ac063a43fd0abbbe4f

query I rowsort
SELECT DISTINCT 45 * + col1 AS col2 FROM tab0 AS cor0
----
3870
4095
4365

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

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 # use DIV operator for integer division
query I rowsort label-1191
SELECT DISTINCT + col1 DIV ( col1 ) AS col0 FROM tab0 AS cor0
----
1

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT + tab0.col0 * col1 + - 61 AS col1 FROM tab0
----
2003
3334
8038

onlyif mysql # use DIV operator for integer division
query I rowsort label-1198
SELECT - - cor0.col2 * col1 DIV + 29 FROM tab0 cor0
----
257
3
97

skipif mysql # not compatible
query I rowsort label-1198
SELECT - - cor0.col2 * col1 / + 29 FROM tab0 cor0
----
257
3
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-1199
SELECT DISTINCT - 7 DIV + col0 FROM tab2
----
-1
0

skipif mysql # not compatible
query I rowsort label-1199
SELECT DISTINCT - 7 / + col0 FROM tab2
----
-1
0

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

query I rowsort
SELECT DISTINCT 1 * 30 AS col0 FROM tab2 AS cor0
----
30

onlyif mysql # use DIV operator for integer division
query I rowsort label-1202
SELECT - + col0 * - 14 - col2 DIV 39 FROM tab0 AS cor0
----
1244
336
490

skipif mysql # not compatible
query I rowsort label-1202
SELECT - + col0 * - 14 - col2 / 39 FROM tab0 AS cor0
----
1244
336
490

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

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

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

query I rowsort
SELECT DISTINCT + 14 * + ( - col0 + ( col1 ) ) AS col2 FROM tab1 AS cor0
----
-756
-938
322

query I rowsort
SELECT 21 + col2 FROM tab2 cor0
----
47
48
59

query I rowsort
SELECT 48 * col0 + - col1 AS col0 FROM tab1 AS cor0
----
118
3062
3827

query I rowsort
SELECT - 13 AS col2 FROM tab1, tab0, tab2 AS cor0, tab2 AS cor1
----
81 values hashing to d1ee13c6e23ea99b2cf17e8ca7cf45ee

query I rowsort
SELECT ALL + 16 + - col1 FROM tab2 AS cor0
----
-1
-15
-43

query I rowsort
SELECT DISTINCT cor0.col1 * + col0 + col2 * - 91 AS col2 FROM tab2 AS cor0
----
-2115
-2240
2236

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 57 + col2 col1 FROM tab1 AS cor0
----
111
114
153

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1215
SELECT DISTINCT + 19 + - col2 * col2 DIV ( + col2 ) AS col2 FROM tab1 AS cor0
----
-35
-38
-77

skipif mysql # not compatible
query I rowsort label-1215
SELECT DISTINCT + 19 + - col2 * col2 / ( + col2 ) AS col2 FROM tab1 AS cor0
----
-35
-38
-77

onlyif mysql # use DIV operator for integer division
query I rowsort label-1216
SELECT 22 DIV tab0.col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-1216
SELECT 22 / tab0.col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT DISTINCT col1 + - 46 FROM tab1
----
-20
-33
-36

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

query I rowsort
SELECT 53 + + col2 * col1 * - col0 FROM tab0 AS cor0
----
-3342
-664065
-68059

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 + col1 + + col0 col2 FROM tab2
----
113
196
69

query I rowsort
SELECT + 12 FROM tab0, tab1 cor0, tab2 AS cor1
----
27 values hashing to 702478c53caf2f7ebb9fff96d800f5a6

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

query I rowsort
SELECT col0 * + 64 + 55 FROM tab0
----
1591
2295
5751

query I rowsort
SELECT tab2.col1 + col1 + col0 FROM tab2
----
113
196
69

query I rowsort
SELECT + 89 AS col2 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 860d55eb6785972467218a9c3badb5ad

query I rowsort
SELECT DISTINCT - col2 * - col2 + - col2 FROM tab2
----
1406
650
702

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

query I rowsort
SELECT DISTINCT + col1 + col0 * - ( - col2 ) AS col1 FROM tab2
----
2087
220
3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-1230
SELECT DISTINCT col0 + + 88 DIV + col1 AS col2 FROM tab1 cor0
----
6
72
86

skipif mysql # not compatible
query I rowsort label-1230
SELECT DISTINCT col0 + + 88 / + col1 AS col2 FROM tab1 cor0
----
6
72
86

query I rowsort
SELECT col2 + 29 * col1 FROM tab1
----
347
473
808

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

query I rowsort
SELECT 71 AS col1 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 95a6ff35b7b8f00868fb58bcaa32d0c2

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1235
SELECT DISTINCT + - CAST( - cor0.col2 AS SIGNED ) + + col0 FROM tab2 AS cor0
----
104
117
34

skipif mysql # not compatible
query I rowsort label-1235
SELECT DISTINCT + - CAST ( - cor0.col2 AS INTEGER ) + + col0 FROM tab2 AS cor0
----
104
117
34

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - col0 * col1 col1 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT - 7 + - col2 FROM tab2
----
-33
-34
-45

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

query I rowsort
SELECT ALL + 89 - col2 FROM tab1 AS cor0
----
-7
32
35

query I rowsort
SELECT col1 + 18 AS col1 FROM tab2 cor0
----
35
49
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-1242
SELECT ALL + col0 DIV + col2 + tab0.col0 * col2 + + col0 FROM tab0
----
105
7388
816

skipif mysql # not compatible
query I rowsort label-1242
SELECT ALL + col0 / + col2 + tab0.col0 * col2 + + col0 FROM tab0
----
105
7388
816

query I rowsort
SELECT tab1.col2 FROM tab1, tab1 AS cor0, tab0, tab1 AS cor1
----
81 values hashing to 9d355f1f2edc347a359dad00d2d3f886

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

query I rowsort
SELECT ALL 42 * + col0 + ( - col2 ) * + col2 AS col2 FROM tab0
----
-2986
-81
1469

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 + col2 + ( col0 + col1 * + 83 ) col2 FROM tab0
----
7228
7806
8088

query I rowsort
SELECT - 32 - col0 FROM tab0 AS cor0
----
-121
-56
-67

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 + 74 FROM tab1 cor0
----
174
243
750

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

query I rowsort
SELECT + + 87 * col0 + ( col1 ) FROM tab2 AS cor0
----
640
6845
6890

query I rowsort
SELECT - 27 * - col1 FROM tab1 AS cor0
----
270
351
702

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

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

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

query I rowsort
SELECT DISTINCT 86 * col0 AS col2 FROM tab0 AS cor0
----
2064
3010
7654

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

query I rowsort
SELECT col1 + + col2 - - col2 FROM tab2 AS cor0
----
111
85
93

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

query I rowsort
SELECT - + 32 + cor0.col0 * + 5 FROM tab2, tab0 AS cor0
----
9 values hashing to 54b4eb93bfd85cba3c3f62bdf3880039

query I rowsort
SELECT DISTINCT + col1 * + 70 AS col2 FROM tab2 AS cor0
----
1190
2170
4130

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * col1 - + col1 * 84 * - tab1.col2 col0 FROM tab1
----
105001
118612
47980

query I rowsort
SELECT DISTINCT col1 + + col1 * 28 FROM tab1 AS cor0
----
290
377
754

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1263
SELECT + col0 + + col0 DIV col0 + cor0.col2 FROM tab2 AS cor0
----
105
118
35

skipif mysql # not compatible
query I rowsort label-1263
SELECT + col0 + + col0 / col0 + cor0.col2 FROM tab2 AS cor0
----
105
118
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-1264
SELECT - col0 + + 5 - + col0 DIV col1 AS col2 FROM tab0 AS cor0
----
-19
-30
-84

skipif mysql # not compatible
query I rowsort label-1264
SELECT - col0 + + 5 - + col0 / col1 AS col2 FROM tab0 AS cor0
----
-19
-30
-84

query I rowsort
SELECT col2 * col2 + 50 AS col1 FROM tab2 AS cor0
----
1494
726
779

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

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

query I rowsort
SELECT col0 + - col2 - col1 * + cor0.col2 * - 52 AS col0 FROM tab0 AS cor0
----
147567
388031
5078

query I rowsort
SELECT - - col0 - + 59 FROM tab0 AS cor0
----
-24
-35
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + col0 + + 5 col2 FROM tab0 cor0
----
1230
581
7926

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

query I rowsort
SELECT cor0.col2 + ( + ( col2 ) + col2 ) FROM tab2 AS cor0
----
114
78
81

query I rowsort
SELECT + + col0 * + 5 AS col2 FROM tab2 AS cor0
----
35
390
395

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

query I rowsort
SELECT ALL 1 FROM tab0, tab0 AS cor0, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to 2a004dce2d308bae163576f54ee1a3fc

query I rowsort
SELECT 76 * - 8 + col1 * - 98 FROM tab1 AS cor0
----
-1588
-1882
-3156

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

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

query I rowsort
SELECT ALL - col2 * + col2 + - col0 * col2 FROM tab1 AS cor0
----
-16896
-3078
-6897

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

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

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

query I rowsort
SELECT col2 + col0 * - tab0.col1 * - 30 FROM tab0
----
101851
243052
61953

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

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

query I rowsort
SELECT ALL + 51 * + cor0.col2 + - 12 * col0 FROM tab1 AS cor0
----
2139
2718
3936

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1287
SELECT ALL - + 48 DIV + col0 FROM tab2 AS cor0
----
-6
0
0

skipif mysql # not compatible
query I rowsort label-1287
SELECT ALL - + 48 / + col0 FROM tab2 AS cor0
----
-6
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 47 + col1 * col2 - - col1 * + col2 col1 FROM tab1 AS cor0
----
1187
2543
2855

query I rowsort
SELECT 31 + + cor0.col2 FROM tab1 AS cor0
----
127
85
88

query I rowsort
SELECT - - 64 * col2 FROM tab0 AS cor0
----
2112
5248
64

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - col0 - + 12 FROM tab2
----
-19
-90
-91

query I rowsort
SELECT - col1 * col2 + - col0 * + tab1.col0 AS col1 FROM tab1
----
-1413
-4666
-7648

query I rowsort
SELECT + 47 * + tab1.col2 FROM tab1
----
2538
2679
4512

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

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 + col2 * + col0 * + col1 col2 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT + 87 * col0 AS col1 FROM tab2
----
609
6786
6873

query I rowsort
SELECT DISTINCT ( col1 + ( col1 ) ) * col1 AS col2 FROM tab2
----
1922
578
6962

query I rowsort
SELECT col1 * - 51 AS col0 FROM tab2 cor0
----
-1581
-3009
-867

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

skipif mysql # not compatible
query I rowsort label-1308
SELECT DISTINCT + col2 + CAST ( NULL AS REAL ) * + 56 FROM tab1
----
NULL

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

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

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

query I rowsort
SELECT ALL + col1 + col1 + - col2 FROM tab0
----
100
139
193

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

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

query I rowsort
SELECT + col1 + - col2 * + col0 + - col0 * col2 FROM tab2
----
-347
-3997
-5987

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-1320
SELECT + col0 + - col0 / + col1 FROM tab1 AS cor0
----
3
58
74

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

query I rowsort
SELECT - + col0 * - col0 + + col0 * col2 FROM tab0 AS cor0
----
1260
1368
15219

onlyif mysql # use DIV operator for integer division
query I rowsort label-1323
SELECT ALL - col0 * + cor0.col0 - col2 DIV col0 AS col0 FROM tab0 AS cor0
----
-1225
-577
-7921

skipif mysql # not compatible
query I rowsort label-1323
SELECT ALL - col0 * + cor0.col0 - col2 / col0 AS col0 FROM tab0 AS cor0
----
-1225
-577
-7921

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

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

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

skipif mysql # not compatible
query I rowsort label-1326
SELECT DISTINCT - col1 + col2 / + col1 AS col0 FROM tab0 AS cor0
----
-86
-91
-97

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

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

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

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

query I rowsort
SELECT DISTINCT - 8 + + col1 FROM tab0 AS cor0
----
78
83
89

query I rowsort
SELECT DISTINCT 90 * col0 FROM tab1 AS cor0
----
270
5760
7200

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

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

query I rowsort
SELECT DISTINCT - + 4 + + col0 * col0 AS col1 FROM tab2 AS cor0
----
45
6080
6237

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

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

query I rowsort
SELECT + tab2.col2 * - col2 + - col1 - col2 * col0 AS col2 FROM tab2
----
-2763
-4463
-949

query I rowsort
SELECT + col2 * col0 * col2 + - col2 - col0 * + col1 AS col1 FROM tab0
----
-3361
24039
590255

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

query I rowsort
SELECT col1 + - col1 * 74 * ( - col2 * + col1 + col2 ) FROM tab2 AS cor0
----
1858171
6583987
764881

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1341
SELECT - col2 - col0 DIV - 50 FROM tab1 AS cor0
----
-54
-56
-95

skipif mysql # not compatible
query I rowsort label-1341
SELECT - col2 - col0 / - 50 FROM tab1 AS cor0
----
-54
-56
-95

query I rowsort
SELECT DISTINCT - 85 + - col2 AS col2 FROM tab1 cor0
----
-139
-142
-181

query I rowsort
SELECT DISTINCT ( - col1 ) * col1 + 10 * col0 AS col0 FROM tab0 AS cor0
----
-7156
-7391
-9059

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

query I rowsort
SELECT ALL + + 70 + col2 * + col2 AS col2 FROM tab2 AS cor0
----
1514
746
799

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

query I rowsort
SELECT ALL + 21 AS col2 FROM tab2 AS cor0
----
21
21
21

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

skipif mysql # not compatible
query I rowsort label-1348
SELECT DISTINCT 29 + col1 / - ( col1 ) AS col0 FROM tab0 AS cor0
----
28

query I rowsort
SELECT - 58 AS col0 FROM tab2, tab1, tab2 AS cor0, tab1 AS cor1
----
81 values hashing to 897f42d096eff3935f4f50603850c23b

query I rowsort
SELECT ALL col1 - + 42 AS col0 FROM tab1
----
-16
-29
-32

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1351
SELECT ALL + CAST ( NULL AS INTEGER ) * col2 + - col0 * - 58 * - col1 col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 70 FROM tab1, tab0 AS cor0
----
9 values hashing to 35707a5d99c98b2657c084a50ff1b073

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1353
SELECT ALL - 8 / 56 + tab1.col2 * CAST( NULL AS DECIMAL ) AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1353
SELECT ALL - 8 / 56 + tab1.col2 * CAST ( NULL AS REAL ) AS col2 FROM tab1
----
NULL
NULL
NULL

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

query I rowsort
SELECT ALL tab1.col1 + tab1.col2 * - 83 AS col2 FROM tab1
----
-4456
-4721
-7955

onlyif mysql # use DIV operator for integer division
query I rowsort label-1356
SELECT ALL 87 DIV + cor0.col1 AS col1 FROM tab1 AS cor0
----
3
6
8

skipif mysql # not compatible
query I rowsort label-1356
SELECT ALL 87 / + cor0.col1 AS col1 FROM tab1 AS cor0
----
3
6
8

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1358
SELECT - col2 DIV + col0 + + 43 AS col2 FROM tab2 AS cor0
----
40
43
43

skipif mysql # not compatible
query I rowsort label-1358
SELECT - col2 / + col0 + + 43 AS col2 FROM tab2 AS cor0
----
40
43
43

query I rowsort
SELECT ALL - + col1 + col1 * col1 * col2 AS col0 FROM tab1 cor0
----
16211
36478
5690

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

query I rowsort
SELECT DISTINCT + - cor0.col0 + + col0 * 81 AS col1 FROM tab2 AS cor0
----
560
6240
6320

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

query I rowsort
SELECT + tab1.col1 + - 40 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to cae7b26f3cc522216cedd505d6806a81

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT col1 * 95 - - col2 AS col1 FROM tab2 cor0
----
1653
2972
5631

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

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

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

skipif mysql # not compatible
query I rowsort label-1373
SELECT ALL CAST ( col2 AS INTEGER ) * + col2 - col2 * + cor0.col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + + col2 * col2 - - col0 AS col0 FROM tab0 AS cor0
----
1113
36
6813

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

query I rowsort
SELECT DISTINCT + - col0 * 65 FROM tab1 AS cor0
----
-195
-4160
-5200

query I rowsort
SELECT DISTINCT + 74 * 77 * col0 FROM tab0 AS cor0
----
136752
199430
507122

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

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

query I rowsort
SELECT 77 + col0 * col2 + - tab0.col0 * col1 AS col2 FROM tab0
----
-1195
-3283
-724

query I rowsort
SELECT + 54 - - col2 FROM tab1 AS cor0
----
108
111
150

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

query I rowsort
SELECT ALL + 64 * 2 FROM tab0
----
128
128
128

query I rowsort
SELECT 44 * + 75 AS col0 FROM tab2 AS cor0
----
3300
3300
3300

query I rowsort
SELECT + + ( 10 ) * col2 * ( col2 * col0 ) FROM tab1 AS cor0
----
2079360
7372800
87480

query I rowsort
SELECT ALL + 64 FROM tab0 cor0
----
64
64
64

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1387
SELECT ALL CAST( 21 AS SIGNED ) * + cor0.col0 AS col0 FROM tab0 AS cor0
----
1869
504
735

skipif mysql # not compatible
query I rowsort label-1387
SELECT ALL CAST ( 21 AS INTEGER ) * + cor0.col0 AS col0 FROM tab0 AS cor0
----
1869
504
735

query I rowsort
SELECT - col1 * 69 FROM tab2 AS cor0
----
-1173
-2139
-4071

query I rowsort
SELECT + col1 + 22 * col2 AS col2 FROM tab0 AS cor0
----
119
1895
812

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

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

query I rowsort
SELECT - + 3 - col1 AS col2 FROM tab0 AS cor0
----
-100
-89
-94

query I rowsort
SELECT DISTINCT + 53 - col0 FROM tab2 AS cor0
----
-25
-26
46

query I rowsort
SELECT + - col1 * cor0.col0 - + 52 AS col1 FROM tab1 AS cor0
----
-1092
-130
-692

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

query I rowsort
SELECT - col1 + 55 FROM tab2 cor0
----
-4
24
38

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

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

query I rowsort
SELECT ALL col1 * + 27 + cor0.col0 * - col2 + + col0 FROM tab2 AS cor0
----
-2464
-357
655

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

query I rowsort
SELECT 32 + cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to bc864405d82044acb10e4dc51a55a37c

query I rowsort
SELECT ALL - - col2 * + 45 + col2 AS col2 FROM tab0 cor0
----
1518
3772
46

query I rowsort
SELECT - col0 * col0 + 10 FROM tab2 AS cor0
----
-39
-6074
-6231

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

query I rowsort
SELECT + tab0.col2 * col2 + col2 * col2 AS col1 FROM tab0
----
13448
2
2178

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

skipif mysql # not compatible
query I rowsort label-1405
SELECT + col1 * CAST ( col1 AS INTEGER ) + - col0 AS col2 FROM tab2
----
210
3403
954

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

skipif mysql # not compatible
query I rowsort label-1406
SELECT DISTINCT col0 / - 98 AS col0 FROM tab1
----
0

query I rowsort
SELECT ALL + col1 * 25 AS col0 FROM tab2
----
1475
425
775

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

skipif mysql # not compatible
query I rowsort
SELECT ALL col2 * + CAST ( ( + col2 ) AS REAL ) + - 8 AS col0 FROM tab1
----
2908
3241
9208

query I rowsort
SELECT DISTINCT - cor1.col2 FROM tab1 cor0 CROSS JOIN tab0, tab0 AS cor1
----
-1
-33
-82

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

query I rowsort
SELECT col0 + col0 + col2 FROM tab1
----
185
256
60

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

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

skipif mysql # not compatible
query I rowsort label-1414
SELECT col1 + CAST ( + col2 AS INTEGER ) * + col0 FROM tab1 AS cor0
----
188
3658
7693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 * + 76 col1 FROM tab0 AS cor0
----
6536
6916
7372

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

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

query I rowsort
SELECT col0 * - cor0.col0 + - col0 * + 10 AS col0 FROM tab1 AS cor0
----
-39
-4736
-7200

query I rowsort
SELECT - - ( col0 ) * + cor0.col0 * ( col0 + col2 ) AS col1 FROM tab2 AS cor0
----
1666
632736
730197

query I rowsort
SELECT - col1 * - 14 AS col2 FROM tab1 AS cor0
----
140
182
364

query I rowsort
SELECT + 47 + + col0 FROM tab1 AS cor0
----
111
127
50

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

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

query I rowsort
SELECT - col2 + + 51 AS col0 FROM tab0 AS cor0
----
-31
18
50

query I rowsort
SELECT DISTINCT - col1 * 0 AS col1 FROM tab2 AS cor0
----
0

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

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

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

query I rowsort
SELECT - + cor0.col0 - 11 FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to adc8b395778bf2e0291278db49d60aca

onlyif mysql # use DIV operator for integer division
query I rowsort label-1428
SELECT - col1 - col2 DIV ( + col1 ) AS col2 FROM tab1
----
-15
-20
-28

skipif mysql # not compatible
query I rowsort label-1428
SELECT - col1 - col2 / ( + col1 ) AS col2 FROM tab1
----
-15
-20
-28

onlyif mysql # use DIV operator for integer division
query I rowsort label-1429
SELECT DISTINCT + - 77 DIV cor1.col2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
-2
-77
0

skipif mysql # not compatible
query I rowsort label-1429
SELECT DISTINCT + - 77 / cor1.col2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
-2
-77
0

query I rowsort
SELECT DISTINCT col0 + - 52 + - 96 FROM tab0
----
-113
-124
-59

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

query I rowsort
SELECT ALL col0 + 46 FROM tab0
----
135
70
81

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

skipif mysql # not compatible
query I rowsort
SELECT ALL + - col0 / - CAST ( col0 AS REAL ) FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT ALL tab2.col0 + - 22 AS col2 FROM tab2
----
-15
56
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + + col0 * col2 col2 FROM tab0
----
36
7380
825

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

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

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

query I rowsort
SELECT DISTINCT - col1 * col0 + ( 45 ) AS col2 FROM tab2 AS cor0
----
-1298
-172
-4557

query I rowsort
SELECT DISTINCT - + ( - cor0.col1 ) * 33 * col2 + col0 * col0 AS col2 FROM tab2 AS cor0
----
27559
27670
56706

query I rowsort
SELECT - col2 * - 82 * - tab2.col0 + - 25 FROM tab2
----
-15523
-166321
-246189

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

skipif mysql # not compatible
query I rowsort label-1442
SELECT - - CAST ( - col1 AS INTEGER ) + + col2 AS col1 FROM tab2 cor0
----
-33
-4
21

query I rowsort
SELECT ALL - 77 FROM tab0, tab1 AS cor0
----
9 values hashing to 3a24155cb91ceff1e67bb51c07b72107

query I rowsort
SELECT 66 - 97 AS col0 FROM tab1
----
-31
-31
-31

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

query I rowsort
SELECT - + 37 * + col2 AS col2 FROM tab2 AS cor0
----
-1406
-962
-999

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

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

query I rowsort
SELECT col2 * + cor0.col1 * - 68 AS col1 FROM tab1 AS cor0
----
-38760
-84864
-95472

query I rowsort
SELECT DISTINCT - 10 * col0 + 29 FROM tab2 AS cor0
----
-41
-751
-761

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

query I rowsort
SELECT ALL - 56 + + col2 - col0 FROM tab0 AS cor0
----
-47
-63
-90

onlyif mysql # use DIV operator for integer division
query I rowsort label-1453
SELECT DISTINCT + 11 DIV 95 AS col2 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-1453
SELECT DISTINCT + 11 / 95 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT + 49 * - 2 AS col2 FROM tab1 AS cor0
----
-98
-98
-98

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT + tab0.col1 * + col0 * + col0 FROM tab0
----
118825
49536
720811

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

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

query I rowsort
SELECT DISTINCT col0 + ( + col0 + - 84 ) FROM tab1 AS cor0
----
-78
44
76

query I rowsort
SELECT - + 75 + col2 AS col0 FROM tab1 AS cor0
----
-18
-21
21

query I rowsort
SELECT col2 + col0 + + col0 AS col2 FROM tab2 AS cor0
----
182
196
41

query I rowsort
SELECT 36 * + col1 FROM tab1 cor0
----
360
468
936

query I rowsort
SELECT - 8 * col0 - - col1 AS col0 FROM tab2 AS cor0
----
-25
-565
-615

query I rowsort
SELECT 18 - - cor0.col1 * - cor0.col1 * - col0 AS col2 FROM tab1 AS cor0
----
13538
2046
6418

query I rowsort
SELECT ALL col2 * - col0 * - col0 + ( - col1 * + col1 ) AS col2 FROM tab1
----
-190
233372
614231

query I rowsort
SELECT ALL tab0.col2 + + 90 + - tab0.col0 FROM tab0
----
56
83
99

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1472
SELECT ALL cor0.col1 + - CAST( + 94 + + col2 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-41
-85
2

skipif mysql # not compatible
query I rowsort label-1472
SELECT ALL cor0.col1 + - CAST ( + 94 + + col2 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-41
-85
2

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

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

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

query I rowsort
SELECT + cor0.col0 + 34 * - col0 * col2 AS col0 FROM tab0 AS cor0
----
-1155
-248043
-26904

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 66 + col1 col1 FROM tab2
----
125
83
97

query I rowsort
SELECT DISTINCT col1 + tab1.col1 * + 5 FROM tab1
----
156
60
78

query I rowsort
SELECT ALL - 2 + col1 AS col0 FROM tab1
----
11
24
8

query I rowsort
SELECT ALL + - col2 + - 55 AS col0 FROM tab1 AS cor0
----
-109
-112
-151

onlyif mysql # use DIV operator for integer division
query I rowsort label-1481
SELECT + col0 + + cor0.col1 DIV + col1 AS col1 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-1481
SELECT + col0 + + cor0.col1 / + col1 AS col1 FROM tab0 AS cor0
----
25
36
90

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

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

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

query I rowsort
SELECT ALL - 23 * - col1 * tab2.col2 FROM tab2
----
14858
19251
35282

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

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

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

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

query I rowsort
SELECT + 17 * col0 AS col1 FROM tab0 AS cor0
----
1513
408
595

query I rowsort
SELECT + + 47 * col1 AS col0 FROM tab2 AS cor0
----
1457
2773
799

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

query I rowsort
SELECT ALL 29 * - col2 AS col2 FROM tab1 AS cor0
----
-1566
-1653
-2784

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

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

query I rowsort
SELECT ALL 39 * - col2 FROM tab2 AS cor0
----
-1014
-1053
-1482

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

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

query I rowsort
SELECT ALL + 12 FROM tab2, tab2 cor0, tab0 AS cor1
----
27 values hashing to 702478c53caf2f7ebb9fff96d800f5a6

query I rowsort
SELECT + ( - col2 ) * - col0 + - col0 + cor0.col0 * + 17 FROM tab1 AS cor0
----
210
4672
8960

onlyif mysql # use DIV operator for integer division
query I rowsort label-1497
SELECT col1 DIV - 47 + - 4 * col2 col2 FROM tab1 AS cor0
----
-216
-228
-384

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1497
SELECT col1 / - 47 + - 4 * col2 col2 FROM tab1 AS cor0
----
-216
-228
-384

skipif mysql # not compatible
query I rowsort
SELECT col0 * CAST ( - 68 AS REAL ) AS col0 FROM tab2 cor0
----
-476
-5304
-5372

query I rowsort
SELECT - - col2 + + col2 * 90 FROM tab2 AS cor0
----
2366
2457
3458

query I rowsort
SELECT ALL + col1 * + col2 + col2 FROM tab1
----
1344
1458
627

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

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

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

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

query I rowsort
SELECT ALL 66 + - tab1.col0 * col0 - + tab1.col2 FROM tab1
----
-4087
-6430
3

query I rowsort
SELECT + 99 * col2 + + col0 * col0 + col0 AS col1 FROM tab1
----
15984
5358
9803

query I rowsort
SELECT col1 * - col2 - + col2 * - ( - cor0.col1 ) FROM tab1 cor0
----
-1140
-2496
-2808

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

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

query I rowsort
SELECT 33 + col1 + col1 * - col0 AS col2 FROM tab1 AS cor0
----
-19
-597
-994

query I rowsort
SELECT ALL + + 60 * col0 AS col0 FROM tab2 cor0
----
420
4680
4740

query I rowsort
SELECT ALL + - col0 * col2 + col1 + + col2 * - col0 AS col0 FROM tab2 AS cor0
----
-347
-3997
-5987

query I rowsort
SELECT + col0 + col1 * col1 * col0 AS col1 FROM tab0
----
177528
329350
737098

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

query I rowsort
SELECT + 26 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to ede8226bb7e602e221f9d98345b4da37

query I rowsort
SELECT cor0.col2 * - 80 * + col0 AS col0 FROM tab0 cor0
----
-2800
-583840
-63360

query I rowsort
SELECT ALL - + 20 * + col1 AS col0 FROM tab0 AS cor0
----
-1720
-1820
-1940

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

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

query I rowsort
SELECT 16 * 95 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 9f98ddb3b8cf9fd1bb47ad9701328137

query I rowsort
SELECT ALL + 2 AS col2 FROM tab2, tab1, tab2 AS cor0, tab0
----
81 values hashing to 6d1be3904d6870ba21bc766b979d1110

query I rowsort
SELECT DISTINCT + - cor0.col2 + 65 FROM tab0 AS cor0
----
-17
32
64

query I rowsort
SELECT ALL + - 33 * 26 + - col2 FROM tab0 AS cor0
----
-859
-891
-940

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

query I rowsort
SELECT ALL - + col1 + ( cor0.col0 ) * + 39 FROM tab2 AS cor0
----
242
2983
3064

query I rowsort
SELECT DISTINCT 43 + + 52 FROM tab0 cor0
----
95

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1525
SELECT - CAST( - col1 * col1 AS SIGNED ) AS col2 FROM tab2
----
289
3481
961

skipif mysql # not compatible
query I rowsort label-1525
SELECT - CAST ( - col1 * col1 AS INTEGER ) AS col2 FROM tab2
----
289
3481
961

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1531
SELECT DISTINCT 73 DIV cor0.col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-1531
SELECT DISTINCT 73 / cor0.col1 FROM tab1 AS cor0
----
2
5
7

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

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

query I rowsort
SELECT ALL ( tab1.col1 ) * 29 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 8628da6f83598c36bd2d971cda67264e

query I rowsort
SELECT ALL col1 * 98 AS col2 FROM tab2 AS cor0
----
1666
3038
5782

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

query I rowsort
SELECT ALL - col1 - ( + 42 + col1 ) * col0 AS col2 FROM tab0 cor0
----
-11928
-3158
-4962

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - 91 col2 FROM tab2 AS cor0
----
-12
-13
-84

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1541
SELECT - col0 + + ( col1 + col1 ) * 78 DIV col1 AS col0 FROM tab2 AS cor0
----
149
77
78

skipif mysql # not compatible
query I rowsort label-1541
SELECT - col0 + + ( col1 + col1 ) * 78 / col1 AS col0 FROM tab2 AS cor0
----
149
77
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-1542
SELECT + col0 DIV - 9 + - cor0.col2 * + cor0.col2 col1 FROM tab1 AS cor0
----
-2916
-3256
-9224

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1542
SELECT + col0 / - 9 + - cor0.col2 * + cor0.col2 col1 FROM tab1 AS cor0
----
-2916
-3256
-9224

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

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

query I rowsort
SELECT DISTINCT - col0 * + 43 + - col2 FROM tab1 AS cor0
----
-183
-2809
-3536

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

query I rowsort
SELECT ALL - cor0.col2 * + 72 FROM tab0 cor0
----
-2376
-5904
-72

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

query I rowsort
SELECT DISTINCT 53 + - col2 * ( - col0 ) AS col0 FROM tab0
----
7351
845
88

query I rowsort
SELECT ALL + ( col1 * - col1 ) + 23 AS col1 FROM tab0
----
-7373
-8258
-9386

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * col0 * + 34 col2 FROM tab1
----
124032
261120
5508

query I rowsort
SELECT + 8 AS col1 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 33069adc3c1142d31511ec88fcfa40af

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * - 5 + + col0 col1 FROM tab1
----
-12
-256
-320

query I rowsort
SELECT DISTINCT 63 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
63

onlyif mysql # use DIV operator for integer division
query I rowsort label-1554
SELECT + + col2 DIV + 92 + 2 FROM tab2 AS cor0
----
2
2
2

skipif mysql # not compatible
query I rowsort label-1554
SELECT + + col2 / + 92 + 2 FROM tab2 AS cor0
----
2
2
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-1555
SELECT - cor0.col2 * 41 + + col1 * - cor0.col1 + 2 * cor0.col2 DIV col0 AS col1 FROM tab2 AS cor0
----
-1847
-2061
-4547

skipif mysql # not compatible
query I rowsort label-1555
SELECT - cor0.col2 * 41 + + col1 * - cor0.col1 + 2 * cor0.col2 / col0 AS col1 FROM tab2 AS cor0
----
-1847
-2061
-4547

query I rowsort
SELECT ALL - - col0 * - ( - col0 ) * + col0 + + 28 FROM tab2 AS cor0
----
371
474580
493067

query I rowsort
SELECT + col2 * col0 + - col0 * + col2 * 94 FROM tab1 AS cor0
----
-15066
-339264
-714240

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1561
SELECT + + col2 DIV col1 col0 FROM tab1 AS cor0
----
2
5
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1561
SELECT + + col2 / col1 col0 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT DISTINCT + 53 * col2 AS col1 FROM tab0 cor0
----
1749
4346
53

query I rowsort
SELECT ALL - - cor0.col0 + + 82 FROM tab1 AS cor0
----
146
162
85

query I rowsort
SELECT - col2 + 46 * 79 FROM tab0 AS cor0
----
3552
3601
3633

query I rowsort
SELECT ALL - col0 - - 10 * + 93 FROM tab1 AS cor0
----
850
866
927

query I rowsort
SELECT - col2 * + 9 AS col0 FROM tab1 AS cor0
----
-486
-513
-864

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1569
SELECT ALL + - CAST( NULL AS DECIMAL ) * tab2.col1 + cor0.col2 AS col0 FROM tab2, tab1 AS cor0, tab1, tab0 cor1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-1569
SELECT ALL + - CAST ( NULL AS REAL ) * tab2.col1 + cor0.col2 AS col0 FROM tab2, tab1 AS cor0, tab1, tab0 cor1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

onlyif mysql # use DIV operator for integer division
query I rowsort label-1570
SELECT ALL - - col2 + col2 DIV 42 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-1570
SELECT ALL - - col2 + col2 / 42 FROM tab2 AS cor0
----
26
27
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1571
SELECT ALL - col2 + CAST( NULL AS SIGNED ) / col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1571
SELECT ALL - col2 + CAST ( NULL AS INTEGER ) / col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 * col1 * + col2 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT col2 * + col2 + 0 AS col0 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT col0 * - ( cor0.col2 ) FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT + - col0 * + 66 FROM tab1 cor0
----
-198
-4224
-5280

query I rowsort
SELECT DISTINCT - cor0.col0 * - col0 + col2 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT ALL - col2 * cor0.col0 AS col0 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT - 47 + 51 * cor0.col0 FROM tab1 cor0
----
106
3217
4033

query I rowsort
SELECT ALL 33 * col1 AS col2 FROM tab1 AS cor0
----
330
429
858

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1580
SELECT - 98 + - ( - col0 + - CAST( col1 AS SIGNED ) ) AS col1 FROM tab0 AS cor0
----
12
34
82

skipif mysql # not compatible
query I rowsort label-1580
SELECT - 98 + - ( - col0 + - CAST ( col1 AS INTEGER ) ) AS col1 FROM tab0 AS cor0
----
12
34
82

query I rowsort
SELECT ALL + 5 AS col0 FROM tab1 AS cor0
----
5
5
5

query I rowsort
SELECT - 56 * - col1 + - col0 FROM tab1 AS cor0
----
1453
496
648

query I rowsort
SELECT DISTINCT - + col2 * - 67 FROM tab2 AS cor0
----
1742
1809
2546

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1584
SELECT - + CAST( - col2 AS SIGNED ) * col2 FROM tab1 cor0
----
2916
3249
9216

skipif mysql # not compatible
query I rowsort label-1584
SELECT - + CAST ( - col2 AS INTEGER ) * col2 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT col1 + + col0 * - cor0.col0 FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT ALL + 6 * col0 AS col2 FROM tab1 AS cor0
----
18
384
480

onlyif mysql # use DIV operator for integer division
query I rowsort label-1587
SELECT ALL - + col2 + 45 * + col1 DIV col1 AS col2 FROM tab0 AS cor0
----
-37
12
44

skipif mysql # not compatible
query I rowsort label-1587
SELECT ALL - + col2 + 45 * + col1 / col1 AS col2 FROM tab0 AS cor0
----
-37
12
44

query I rowsort
SELECT DISTINCT col1 * + col0 + col2 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT + + ( + ( + col2 ) ) + col1 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT + 22 * col2 + - col2 FROM tab0 AS cor0
----
1722
21
693

query I rowsort
SELECT ALL - col0 + - cor0.col1 * col2 AS col2 FROM tab0 AS cor0
----
-132
-2862
-7551

query I rowsort
SELECT DISTINCT + 22 + - col0 FROM tab0 AS cor0
----
-13
-2
-67

query I rowsort
SELECT ALL col2 * + 30 + col1 AS col0 FROM tab0 AS cor0
----
1076
127
2551

query I rowsort
SELECT + - 91 FROM tab0 AS cor0
----
-91
-91
-91

query I rowsort
SELECT DISTINCT ( + ( + col0 ) ) FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL 18 AS col0 FROM tab1, tab0 AS cor0 CROSS JOIN tab0
----
27 values hashing to 903ac227935c1532300db45a8537c595

query I rowsort
SELECT ( col1 ) * + col1 AS col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT + 69 * - col2 FROM tab0 AS cor0
----
-2277
-5658
-69

query I rowsort
SELECT - - col2 * + col1 + + col2 AS col1 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT 36 * - col2 * 69 FROM tab2 AS cor0
----
-64584
-67068
-94392

query I rowsort
SELECT col0 * col2 + col2 + + 84 FROM tab2 cor0
----
2138
300
3124

onlyif mysql # use DIV operator for integer division
query I rowsort label-1602
SELECT - 66 DIV col0 FROM tab0 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-1602
SELECT - 66 / col0 FROM tab0 AS cor0
----
-1
-2
0

query I rowsort
SELECT col2 * 21 + col1 + - col1 * tab0.col0 FROM tab0
----
-1285
-3277
-6286

query I rowsort
SELECT ALL - tab0.col2 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT + + ( - col0 ) + + 60 FROM tab1 AS cor0
----
-20
-4
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1606
SELECT CAST( - ( + col0 ) AS SIGNED ) * col2 + - col0 * + col1 + col2 col2 FROM tab2
----
-379
-4307
-6604

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1606
SELECT CAST ( - ( + col0 ) AS INTEGER ) * col2 + - col0 * + col1 + col2 col2 FROM tab2
----
-379
-4307
-6604

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1607
SELECT - col1 + CAST( NULL AS SIGNED ) + col0 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1607
SELECT - col1 + CAST ( NULL AS INTEGER ) + col0 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 61 FROM tab2, tab0 AS cor0, tab0 cor1
----
27 values hashing to 8d4dfe649433a599fc4b10830cc7ce55

onlyif mysql # use DIV operator for integer division
query I rowsort label-1609
SELECT DISTINCT + ( col0 ) DIV cor0.col1 AS col2 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-1609
SELECT DISTINCT + ( col0 ) / cor0.col1 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - cor0.col1 + col2 + col1 * + col1 FROM tab0 AS cor0
----
7343
8272
9313

query I rowsort
SELECT - ( + cor1.col2 ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT + - 50 AS col1 FROM tab2 cor0
----
-50
-50
-50

query I rowsort
SELECT - col0 * - col2 + - col2 AS col2 FROM tab2 cor0
----
162
2002
2964

query I rowsort
SELECT ALL ( - 64 ) AS col0 FROM tab1 AS cor0
----
-64
-64
-64

onlyif mysql # use DIV operator for integer division
query I rowsort label-1615
SELECT + - 20 DIV col1 - + col2 AS col0 FROM tab2 AS cor0
----
-26
-27
-39

skipif mysql # not compatible
query I rowsort label-1615
SELECT + - 20 / col1 - + col2 AS col0 FROM tab2 AS cor0
----
-26
-27
-39

query I rowsort
SELECT + ( col0 ) - - col0 FROM tab1 cor0
----
128
160
6

query I rowsort
SELECT DISTINCT - col2 - col0 AS col0 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT ALL + 93 * - col0 FROM tab2 AS cor0
----
-651
-7254
-7347

query I rowsort
SELECT DISTINCT - col2 * + ( col0 ) + - col2 FROM tab2 cor0
----
-2054
-216
-3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-1620
SELECT - - col2 DIV + col2 AS col2 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1620
SELECT - - col2 / + col2 AS col2 FROM tab1 cor0
----
1
1
1

query I rowsort
SELECT ALL - cor0.col1 + - col1 * 61 AS col1 FROM tab1 AS cor0
----
-1612
-620
-806

query I rowsort
SELECT - col0 * 11 AS col1 FROM tab0 AS cor0
----
-264
-385
-979

query I rowsort
SELECT ALL col0 + ( col1 ) AS col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT + col1 * - 84 FROM tab2 AS cor0
----
-1428
-2604
-4956

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 * - col1 * ( cor0.col0 * col1 ) col0 FROM tab0 AS cor0
----
-11526025
-4260096
-65593801

query I rowsort
SELECT ALL - col1 * 48 FROM tab2 cor0
----
-1488
-2832
-816

query I rowsort
SELECT 37 - col0 FROM tab0
----
-52
13
2

query I rowsort
SELECT ALL 93 FROM tab1, tab0 cor0
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1629
SELECT + + col0 * CAST( col1 AS SIGNED ) FROM tab1 AS cor0
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-1629
SELECT + + col0 * CAST ( col1 AS INTEGER ) FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - col0 + + 67 FROM tab1 AS cor0
----
-13
3
64

onlyif mysql # use DIV operator for integer division
query I rowsort label-1631
SELECT DISTINCT col2 DIV col1 + 88 FROM tab0 AS cor0
----
88

skipif mysql # not compatible
query I rowsort label-1631
SELECT DISTINCT col2 / col1 + 88 FROM tab0 AS cor0
----
88

query I rowsort
SELECT - col1 - col0 * + col0 FROM tab2
----
-6143
-6258
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * ( - col2 ) + col1 * - 39 col2 FROM tab2 AS cor0
----
-1020
-273
2339

query I rowsort
SELECT ALL 50 AS col0 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 314aace40e704c20a6be06204a329f80

onlyif mysql # use DIV operator for integer division
query I rowsort label-1635
SELECT col0 - col1 DIV col0 AS col2 FROM tab0
----
21
33
88

skipif mysql # not compatible
query I rowsort label-1635
SELECT col0 - col1 / col0 AS col2 FROM tab0
----
21
33
88

query I rowsort
SELECT ALL tab2.col1 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT + - 84 AS col0 FROM tab1 AS cor0
----
-84
-84
-84

query I rowsort
SELECT 66 + - col0 FROM tab2
----
-12
-13
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-1639
SELECT + col0 + + col0 DIV col1 AS col2 FROM tab2
----
7
79
83

skipif mysql # not compatible
query I rowsort label-1639
SELECT + col0 + + col0 / col1 AS col2 FROM tab2
----
7
79
83

query I rowsort
SELECT + - col1 * col2 * col1 + + col0 * + col0 FROM tab1 cor0
----
-1604
-36495
-9824

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 61 + col2 * col2 col2 FROM tab1 AS cor0
----
2855
3188
9155

query I rowsort
SELECT + 85 + + cor0.col1 AS col2 FROM tab2 AS cor0
----
102
116
144

query I rowsort
SELECT DISTINCT + + 90 FROM tab0 AS cor0
----
90

query I rowsort
SELECT ALL cor0.col2 * + col2 + + col0 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT + 4 * + col2 FROM tab1 AS cor0
----
216
228
384

query I rowsort
SELECT DISTINCT col2 - + col0 AS col0 FROM tab2 cor0
----
-41
-52
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-1647
SELECT ALL - col0 DIV - col0 + col1 AS col2 FROM tab2 AS cor0
----
18
32
60

skipif mysql # not compatible
query I rowsort label-1647
SELECT ALL - col0 / - col0 + col1 AS col2 FROM tab2 AS cor0
----
18
32
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-1648
SELECT DISTINCT - col2 + + col0 * col1 DIV col2 + cor0.col0 AS col2 FROM tab1 AS cor0
----
-50
-6
18

skipif mysql # not compatible
query I rowsort label-1648
SELECT DISTINCT - col2 + + col0 * col1 / col2 + cor0.col0 AS col2 FROM tab1 AS cor0
----
-50
-6
18

query I rowsort
SELECT ALL col0 - cor0.col0 * - col1 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT ALL col0 + col0 + + col1 * - col1 FROM tab2 AS cor0
----
-131
-3325
-947

query I rowsort
SELECT col0 * col0 + - col1 - - col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL + - 5 FROM tab0 cor0
----
-5
-5
-5

query I rowsort
SELECT ALL 48 + col1 AS col1 FROM tab1
----
58
61
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-1654
SELECT ( + col1 ) + - col0 DIV + tab1.col0 FROM tab1
----
12
25
9

skipif mysql # not compatible
query I rowsort label-1654
SELECT ( + col1 ) + - col0 / + tab1.col0 FROM tab1
----
12
25
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-1655
SELECT ALL tab2.col1 + + tab2.col0 DIV - col0 + col2 AS col1 FROM tab2
----
54
57
84

skipif mysql # not compatible
query I rowsort label-1655
SELECT ALL tab2.col1 + + tab2.col0 / - col0 + col2 AS col1 FROM tab2
----
54
57
84

query I rowsort
SELECT DISTINCT + 37 * col2 + - col1 * - col0 FROM tab0
----
11133
3285
3432

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1657
SELECT - + CAST( NULL AS SIGNED ) + col2 col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1657
SELECT - + CAST ( NULL AS INTEGER ) + col2 col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col0 + cor0.col2 * - col1 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT + 82 + - cor0.col2 FROM tab0 AS cor0
----
0
49
81

query I rowsort
SELECT ALL + ( + col1 ) FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT DISTINCT 4 * - col1 + col2 * + col2 AS col1 FROM tab0 AS cor0
----
-387
6360
745

query I rowsort
SELECT DISTINCT - col1 + + col1 * col1 FROM tab1 AS cor0
----
156
650
90

query I rowsort
SELECT ALL + col1 * - col0 + col1 AS col2 FROM tab1 AS cor0
----
-1027
-52
-630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 46 * + col2 col0 FROM tab1
----
-2484
-2622
-4416

query I rowsort
SELECT DISTINCT - 3 * col0 FROM tab1 AS cor0
----
-192
-240
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-1666
SELECT DISTINCT 45 DIV cor0.col2 AS col1 FROM tab0 AS cor0
----
0
1
45

skipif mysql # not compatible
query I rowsort label-1666
SELECT DISTINCT 45 / cor0.col2 AS col1 FROM tab0 AS cor0
----
0
1
45

query I rowsort
SELECT ALL + col1 * col2 + col0 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT - 22 AS col0 FROM tab1 AS cor0
----
-22
-22
-22

query I rowsort
SELECT ALL + - col1 - cor0.col0 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT ALL col1 + col0 * cor0.col0 FROM tab1 AS cor0
----
35
4106
6413

query I rowsort
SELECT ALL + col1 + + 11 + + col0 AS col1 FROM tab1
----
104
40
85

query I rowsort
SELECT DISTINCT - col2 + + 27 * col0 FROM tab2
----
162
2080
2095

query I rowsort
SELECT DISTINCT + col1 * 0 + col1 * + tab0.col0 FROM tab0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 27 + + col0 col1 FROM tab2
----
105
106
34

query I rowsort
SELECT ALL + 9 + - 63 * - tab1.col0 + + col0 AS col0 FROM tab1
----
201
4105
5129

query I rowsort
SELECT ALL 0 + tab1.col2 FROM tab1
----
54
57
96

query I rowsort
SELECT ALL - col2 + ( col0 ) AS col2 FROM tab2
----
-20
41
52

query I rowsort
SELECT - col2 * + col1 + col1 * + 61 FROM tab2 cor0
----
1054
2065
391

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab1, tab2 AS cor2
----
3645 values hashing to c3f17e238f07c9d20c4ee001084f26c7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1680
SELECT + + 36 + col2 * - col2 + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1680
SELECT + + 36 + col2 * - col2 + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1681
SELECT ALL - + CAST( tab2.col1 AS SIGNED ) AS col1 FROM tab2, tab0 cor0, tab0, tab0 AS cor1
----
81 values hashing to b7a1b38fe8e4f34388e3be1f52601ae5

skipif mysql # not compatible
query I rowsort label-1681
SELECT ALL - + CAST ( tab2.col1 AS INTEGER ) AS col1 FROM tab2, tab0 cor0, tab0, tab0 AS cor1
----
81 values hashing to b7a1b38fe8e4f34388e3be1f52601ae5

query I rowsort
SELECT - ( + tab0.col2 ) AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

onlyif mysql # use DIV operator for integer division
query I rowsort label-1683
SELECT DISTINCT 90 DIV col0 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-1683
SELECT DISTINCT 90 / col0 FROM tab0
----
1
2
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-1684
SELECT - tab0.col2 DIV col1 + - col1 FROM tab0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-1684
SELECT - tab0.col2 / col1 + - col1 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT ALL 67 * + col1 FROM tab0
----
5762
6097
6499

onlyif mysql # use DIV operator for integer division
query I rowsort label-1686
SELECT ( col0 ) * + col0 * + col1 + + col2 * col2 DIV + ( + col0 ) AS col0 FROM tab1
----
1206
41010
83315

skipif mysql # not compatible
query I rowsort label-1686
SELECT ( col0 ) * + col0 * + col1 + + col2 * col2 / + ( + col0 ) AS col0 FROM tab1
----
1206
41010
83315

query I rowsort
SELECT ALL col0 * - 87 FROM tab0
----
-2088
-3045
-7743

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1688
SELECT - CAST( - col1 AS SIGNED ) * + col1 FROM tab1
----
100
169
676

skipif mysql # not compatible
query I rowsort label-1688
SELECT - CAST ( - col1 AS INTEGER ) * + col1 FROM tab1
----
100
169
676

query I rowsort
SELECT - col2 * col1 + - 88 AS col1 FROM tab2
----
-1622
-734
-925

onlyif mysql # use DIV operator for integer division
query I rowsort label-1690
SELECT DISTINCT col0 + + col2 DIV CAST( 96 AS SIGNED ) AS col1 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-1690
SELECT DISTINCT col0 + + col2 / CAST ( 96 AS INTEGER ) AS col1 FROM tab0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1691
SELECT DISTINCT col1 + col2 * - CAST( NULL AS SIGNED ) * 48 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-1691
SELECT DISTINCT col1 + col2 * - CAST ( NULL AS INTEGER ) * 48 FROM tab0
----
NULL

query I rowsort
SELECT - col1 * + tab1.col0 * col2 AS col2 FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT ALL + ( col0 ) + - 30 FROM tab0
----
-6
5
59

query I rowsort
SELECT DISTINCT - 52 * cor0.col1 AS col1 FROM tab2, tab1, tab2 AS cor0
----
-1612
-3068
-884

onlyif mysql # use DIV operator for integer division
query I rowsort label-1695
SELECT DISTINCT ( col0 ) + 1 DIV + 34 AS col0 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-1695
SELECT DISTINCT ( col0 ) + 1 / + 34 AS col0 FROM tab1
----
3
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1696
SELECT ALL - - col2 * CAST( NULL AS SIGNED ) + + col1 * + col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1696
SELECT ALL - - col2 * CAST ( NULL AS INTEGER ) + + col1 * + col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 * col0 + - cor0.col2 * col0 AS col0 FROM tab0 AS cor0
----
-216
1190
623

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1698
SELECT + cor0.col1 + CAST( NULL AS SIGNED ) AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1698
SELECT + cor0.col1 + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col0 * 73 FROM tab0 AS cor0
----
1752
2555
6497

query I rowsort
SELECT ALL cor0.col0 + 73 + + col1 * cor0.col2 FROM tab0 AS cor0
----
205
2935
7624

query I rowsort
SELECT - 47 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 6942a0d9558277afd0d00408d65cf5aa

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1702
SELECT + + col1 + - CAST( NULL AS SIGNED ) * 85 * cor0.col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1702
SELECT + + col1 + - CAST ( NULL AS INTEGER ) * 85 * cor0.col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 + - col2 AS col1 FROM tab0 cor0
----
-164
-2
-66

query I rowsort
SELECT col0 * 79 FROM tab2 AS cor0
----
553
6162
6241

query I rowsort
SELECT ALL col2 + col2 * + 12 FROM tab0 AS cor0
----
1066
13
429

query I rowsort
SELECT + col0 - col1 * + col1 FROM tab0 AS cor0
----
-7372
-8192
-9374

query I rowsort
SELECT - col0 * - 32 AS col1 FROM tab2
----
224
2496
2528

query I rowsort
SELECT ALL col1 - + 88 * col2 FROM tab1
----
-4726
-5006
-8435

query I rowsort
SELECT - col1 - - 73 AS col1 FROM tab2 AS cor0
----
14
42
56

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1710
SELECT - - CAST( + col2 AS SIGNED ) + col0 AS col1 FROM tab0 AS cor0
----
171
36
57

skipif mysql # not compatible
query I rowsort label-1710
SELECT - - CAST ( + col2 AS INTEGER ) + col0 AS col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT - 74 * - 99 FROM tab1 AS cor0
----
7326
7326
7326

query I rowsort
SELECT - + col2 + - col2 AS col2 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT 72 * - col2 + - col2 AS col2 FROM tab0 AS cor0
----
-2409
-5986
-73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1714
SELECT DISTINCT - col1 * - CAST( col1 * + col1 AS SIGNED ) FROM tab1
----
1000
17576
2197

skipif mysql # not compatible
query I rowsort label-1714
SELECT DISTINCT - col1 * - CAST ( col1 * + col1 AS INTEGER ) FROM tab1
----
1000
17576
2197

query I rowsort
SELECT ALL ( 43 ) AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 199105619049271147956de52e7f5ed4

onlyif mysql # use DIV operator for integer division
query I rowsort label-1716
SELECT ALL - col1 + 59 DIV cor0.col0 AS col0 FROM tab0 AS cor0
----
-84
-91
-96

skipif mysql # not compatible
query I rowsort label-1716
SELECT ALL - col1 + 59 / cor0.col0 AS col0 FROM tab0 AS cor0
----
-84
-91
-96

query I rowsort
SELECT ALL + 38 * 9 AS col1 FROM tab1 AS cor0
----
342
342
342

query I rowsort
SELECT + cor0.col0 * - col0 + col2 AS col0 FROM tab1 AS cor0
----
-4039
-6304
45

query I rowsort
SELECT ALL - 41 + col1 * + col0 AS col0 FROM tab2 cor0
----
1302
176
4561

onlyif mysql # use DIV operator for integer division
query I rowsort label-1720
SELECT 7 DIV - col2 FROM tab0 AS cor0
----
-7
0
0

skipif mysql # not compatible
query I rowsort label-1720
SELECT 7 / - col2 FROM tab0 AS cor0
----
-7
0
0

query I rowsort
SELECT ALL 23 * + col2 AS col2 FROM tab1 AS cor0
----
1242
1311
2208

query I rowsort
SELECT + 30 AS col2 FROM tab1 AS cor0
----
30
30
30

onlyif mysql # use DIV operator for integer division
query I rowsort label-1723
SELECT + 0 DIV col1 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1723
SELECT + 0 / col1 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT 44 * + col0 * col2 FROM tab1 cor0
----
160512
337920
7128

onlyif mysql # use DIV operator for integer division
query I rowsort label-1725
SELECT - 50 DIV col2 col1 FROM tab0 AS cor0
----
-1
-50
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1725
SELECT - 50 / col2 col1 FROM tab0 AS cor0
----
-1
-50
0

query I rowsort
SELECT - col0 * 90 * - col2 FROM tab1 cor0
----
14580
328320
691200

query I rowsort
SELECT + col0 + col2 + - col2 AS col0 FROM tab1 cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-1728
SELECT col2 * col2 + 72 DIV + col1 AS col2 FROM tab1 AS cor0
----
2918
3256
9221

skipif mysql # not compatible
query I rowsort label-1728
SELECT col2 * col2 + 72 / + col1 AS col2 FROM tab1 AS cor0
----
2918
3256
9221

query I rowsort
SELECT DISTINCT - + col0 + col0 AS col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL + col1 + col0 * col2 + col2 FROM tab1 AS cor0
----
242
3715
7789

query I rowsort
SELECT + - col0 * - col1 + + 30 AS col2 FROM tab0 AS cor0
----
2094
3425
8129

query I rowsort
SELECT DISTINCT - - cor0.col2 + cor0.col0 + - cor0.col1 AS col2 FROM tab0 cor0
----
-29
-61
80

query I rowsort
SELECT - 43 + + col2 + - col1 FROM tab1 cor0
----
-15
4
40

query I rowsort
SELECT DISTINCT + - col1 + col2 + - col0 FROM tab1 AS cor0
----
-17
25
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-1735
SELECT DISTINCT + col2 + col2 DIV 58 FROM tab0 cor0
----
1
33
83

skipif mysql # not compatible
query I rowsort label-1735
SELECT DISTINCT + col2 + col2 / 58 FROM tab0 cor0
----
1
33
83

query I rowsort
SELECT DISTINCT - + 46 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
-46

query I rowsort
SELECT ALL - - col0 + - cor0.col0 * 36 FROM tab2 AS cor0
----
-245
-2730
-2765

skipif mysql # not compatible
query I rowsort
SELECT ALL col1 + CAST ( col1 AS REAL ) * col2 * - 92 AS col1 FROM tab1 AS cor0
----
-114803
-129142
-52430

onlyif mysql # use DIV operator for integer division
query I rowsort label-1739
SELECT ALL - col0 DIV + col0 col1 FROM tab1 AS cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1739
SELECT ALL - col0 / + col0 col1 FROM tab1 AS cor0
----
-1
-1
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1740
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col1 FROM tab0, tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1740
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col1 FROM tab0, tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1741
SELECT - tab0.col2 DIV - ( ( tab0.col2 ) ) FROM tab0, tab2 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

skipif mysql # not compatible
query I rowsort label-1741
SELECT - tab0.col2 / - ( ( tab0.col2 ) ) FROM tab0, tab2 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 22 col2 FROM tab2
----
-22
-22
-22

query I rowsort
SELECT ALL cor0.col2 + - 40 AS col0 FROM tab0 AS cor0
----
-39
-7
42

query I rowsort
SELECT col1 * + ( col0 ) + col2 * + ( col2 ) + - 43 FROM tab1 AS cor0
----
10213
2951
3846

query I rowsort
SELECT 53 FROM tab2, tab1 AS cor0, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to 63949b5362442f48bd29195397a57dad

onlyif mysql # use DIV operator for integer division
query I rowsort label-1746
SELECT DISTINCT + 67 DIV - col0 FROM tab2 AS cor0
----
-9
0

skipif mysql # not compatible
query I rowsort label-1746
SELECT DISTINCT + 67 / - col0 FROM tab2 AS cor0
----
-9
0

query I rowsort
SELECT DISTINCT + 75 AS col1 FROM tab2, tab0, tab1 AS cor0
----
75

query I rowsort
SELECT ALL 38 * - col0 * col0 FROM tab0
----
-21888
-300998
-46550

query I rowsort
SELECT + 71 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to c1aace5d5fe27721cc925552513c85c0

query I rowsort
SELECT cor0.col2 * col2 + col1 * - col2 AS col1 FROM tab1 AS cor0
----
1512
2679
7968

query I rowsort
SELECT + 3 + - cor0.col1 * - 85 FROM tab2 AS cor0
----
1448
2638
5018

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 CROSS JOIN tab0, tab2, tab2 AS cor1
----
3645 values hashing to 42d854e4c33cb5afd5528228bff9250d

query I rowsort
SELECT - col1 + col0 * col0 + col2 AS col0 FROM tab2
----
45
6051
6262

query I rowsort
SELECT + 61 - ( col1 ) FROM tab0 AS cor0
----
-25
-30
-36

query I rowsort
SELECT DISTINCT - ( col0 ) + col1 AS col0 FROM tab1
----
-54
-67
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 0 * - col0 col0 FROM tab0
----
0

query I rowsort
SELECT DISTINCT col2 + col2 * ( tab2.col2 ) * - col0 AS col2 FROM tab2
----
-114038
-5076
-52702

query I rowsort
SELECT DISTINCT - 22 AS col0 FROM tab1
----
-22

query I rowsort
SELECT - col1 * col1 + col1 * + 66 AS col2 FROM tab0
----
-1720
-2275
-3007

query I rowsort
SELECT ALL cor1.col1 * + 61 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 86ad322ab690fae692344a42a0d894c1

query I rowsort
SELECT - 56 + col1 FROM tab0
----
30
35
41

query I rowsort
SELECT + col2 + + col0 * - 12 FROM tab0 AS cor0
----
-255
-419
-986

query I rowsort
SELECT ALL + 85 + col2 * - 99 AS col0 FROM tab2 AS cor0
----
-2489
-2588
-3677

onlyif mysql # use DIV operator for integer division
query I rowsort label-1764
SELECT ALL + ( col1 ) + + 31 * 67 + + col1 DIV - col2 AS col2 FROM tab0 AS cor0
----
2077
2161
2167

skipif mysql # not compatible
query I rowsort label-1764
SELECT ALL + ( col1 ) + + 31 * 67 + + col1 / - col2 AS col2 FROM tab0 AS cor0
----
2077
2161
2167

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + 78 + + 65 col1 FROM tab1
----
-1963
-715
-949

query I rowsort
SELECT - col0 * ( - col1 ) AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - col0 * col1 - cor0.col0 AS col2 FROM tab1 AS cor0
----
-1120
-704
-81

onlyif mysql # use DIV operator for integer division
query I rowsort label-1768
SELECT 89 * + col2 + col2 DIV + 12 col0 FROM tab2 AS cor0
----
2316
2405
3385

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1768
SELECT 89 * + col2 + col2 / + 12 col0 FROM tab2 AS cor0
----
2316
2405
3385

query I rowsort
SELECT DISTINCT - col1 + + 65 * - col2 * ( + 91 * col1 ) FROM tab1 AS cor0
----
-3371560
-7381933
-8304686

query I rowsort
SELECT ALL 89 * - col0 * col0 + cor0.col1 * - col1 FROM tab0 AS cor0
----
-118434
-58660
-713250

query I rowsort
SELECT - ( 60 ) FROM tab2 AS cor0
----
-60
-60
-60

query I rowsort
SELECT ALL - + ( col1 ) - cor0.col1 AS col1 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT col2 * col2 - - col0 AS col1 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT ALL - 36 - + 93 * + col2 FROM tab2 AS cor0
----
-2454
-2547
-3570

query I rowsort
SELECT - + 86 + ( - col2 ) AS col2 FROM tab1 AS cor0
----
-140
-143
-182

query I rowsort
SELECT DISTINCT + + cor0.col1 + + cor0.col2 * - col0 AS col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT - tab2.col2 - col1 * col1 FROM tab2
----
-327
-3507
-988

query I rowsort
SELECT col2 - tab1.col2 FROM tab1
----
0
0
0

query I rowsort
SELECT ( + col1 ) - col0 * - col0 * - col2 AS col2 FROM tab0 AS cor0
----
-1128
-18922
-649431

query I rowsort
SELECT - + ( 73 ) AS col2 FROM tab2 AS cor0
----
-73
-73
-73

query I rowsort
SELECT ALL - + ( 7 ) * col0 FROM tab2 cor0
----
-49
-546
-553

query I rowsort
SELECT DISTINCT - - cor0.col2 + + col0 AS col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT col1 FROM tab2 AS cor0 WHERE NOT + col1 + col2 <> NULL
----

query I rowsort
SELECT ALL + col0 FROM tab0 WHERE NOT NULL NOT IN ( + col1 )
----

query I rowsort
SELECT + col0 + + tab2.col1 + + col2 * + col2 FROM tab2
----
1540
767
813

onlyif mysql # use DIV operator for integer division
query I rowsort label-1786
SELECT - col0 DIV col2 + + col2 * - col2 + - col2 FROM tab1
----
-2970
-3307
-9312

skipif mysql # not compatible
query I rowsort label-1786
SELECT - col0 / col2 + + col2 * - col2 + - col2 FROM tab1
----
-2970
-3307
-9312

onlyif mysql # use DIV operator for integer division
query I rowsort label-1787
SELECT col0 DIV + col0 + + col0 FROM tab1 AS cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-1787
SELECT col0 / + col0 + + col0 FROM tab1 AS cor0
----
4
65
81

query III rowsort
SELECT ALL * FROM tab1 AS cor0 WHERE NOT ( NULL ) BETWEEN + col2 AND NULL
----

query I rowsort
SELECT - col0 * - col2 + - col1 * col0 FROM tab1 AS cor0
----
3008
6640
84

query I rowsort
SELECT ALL col1 * + tab2.col0 AS col2 FROM tab2
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col1 * + tab0.col0 col2 FROM tab0
----
177504
329315
737009

query I rowsort
SELECT - col2 AS col0 FROM tab2 WHERE NOT ( + col2 + col2 / col1 ) IN ( tab2.col1 )
----
-26
-27
-38

query I rowsort
SELECT col2 * - col2 + tab0.col1 FROM tab0
----
-1003
-6633
96

query I rowsort
SELECT ALL + col1 AS col2 FROM tab1 WHERE NOT NULL NOT BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT + col1 FROM tab2 WHERE NOT NULL BETWEEN NULL AND NULL
----

query I rowsort
SELECT col1 * - tab2.col1 - - col0 * col1 AS col2 FROM tab2
----
-744
1054
1121

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * cor0.col2 * col1 col0 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT col0 * col0 + col0 AS col0 FROM tab2
----
56
6162
6320

query I rowsort
SELECT ALL + col0 - - tab2.col1 * - col1 AS col1 FROM tab2
----
-210
-3403
-954

query I rowsort
SELECT ALL - col2 + - col1 + col2 AS col2 FROM tab1 AS cor0
----
-10
-13
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-1801
SELECT + col1 + - col2 DIV - tab0.col0 + col1 AS col1 FROM tab0
----
173
182
194

skipif mysql # not compatible
query I rowsort label-1801
SELECT + col1 + - col2 / - tab0.col0 + col1 AS col1 FROM tab0
----
173
182
194

query I rowsort
SELECT - col0 * col1 FROM tab1 WHERE ( NULL ) NOT IN ( + col0 * - col2 )
----

query I rowsort
SELECT ALL + tab1.col1 AS col0 FROM tab2, tab0 AS cor0 CROSS JOIN tab1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

onlyif mysql # use DIV operator for integer division
query I rowsort label-1804
SELECT DISTINCT col1 + + col0 DIV + col2 + col2 AS col1 FROM tab1
----
109
68
80

skipif mysql # not compatible
query I rowsort label-1804
SELECT DISTINCT col1 + + col0 / + col2 + col2 AS col1 FROM tab1
----
109
68
80

query I rowsort
SELECT ALL col2 * - col1 + col2 + + tab0.col2 FROM tab0
----
-2772
-7298
-95

query I rowsort
SELECT ALL + col1 - col2 * - col0 * col2 AS col1 FROM tab2 AS cor0
----
114093
5134
52787

onlyif mysql # use DIV operator for integer division
query I rowsort label-1807
SELECT ALL + col1 + col2 + col1 DIV - col0 AS col0 FROM tab0 AS cor0
----
116
172
96

skipif mysql # not compatible
query I rowsort label-1807
SELECT ALL + col1 + col2 + col1 / - col0 AS col0 FROM tab0 AS cor0
----
116
172
96

query I rowsort
SELECT ALL - cor0.col1 + col1 + - col0 * cor0.col1 * - col2 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT DISTINCT - col2 * cor0.col2 + col0 + col2 FROM tab1 AS cor0
----
-2859
-3128
-9040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * col2 col0 FROM tab2
----
1444
676
729

query I rowsort
SELECT + + tab1.col1 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT DISTINCT col1 * + col1 * + col2 FROM tab0
----
244068
679042
9409

query I rowsort
SELECT ALL + col2 * 34 FROM tab2 AS cor0
----
1292
884
918

query I rowsort
SELECT + - 57 AS col1 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 0b74bbd7631afe9b2eeb9f18b9dc6505

query I rowsort
SELECT col0 + + ( - col1 ) * col1 AS col2 FROM tab2 AS cor0
----
-210
-3403
-954

query I rowsort
SELECT - col1 - 41 AS col0 FROM tab2 AS cor0
----
-100
-58
-72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1817
SELECT ALL - CAST( NULL AS SIGNED ) FROM tab0 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-1817
SELECT ALL - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + + col1 col2 FROM tab2 AS cor0
----
118
34
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-1819
SELECT - col2 DIV CAST( col1 * + col0 AS SIGNED ) - + ( col0 ) AS col0 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-1819
SELECT - col2 / CAST ( col1 * + col0 AS INTEGER ) - + ( col0 ) AS col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - + col0 + col2 * col1 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT DISTINCT col1 - col1 * - tab1.col1 FROM tab1
----
110
182
702

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT + col2 <> NULL
----

query I rowsort
SELECT DISTINCT col0 * col1 * + tab1.col2 + col2 AS col1 FROM tab1
----
36537
4266
99936

onlyif mysql # use DIV operator for integer division
query I rowsort label-1824
SELECT + col2 + + col2 DIV - col2 AS col1 FROM tab0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-1824
SELECT + col2 + + col2 / - col2 AS col1 FROM tab0
----
0
32
81

query I rowsort
SELECT ALL - col2 AS col2 FROM tab1 WHERE NOT NULL < NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - col0 + - tab2.col0 col0 FROM tab2
----
-1422
-224
-4680

query I rowsort
SELECT ALL col2 * col2 * col1 FROM tab0
----
611884
93654
97

query I rowsort
SELECT ALL + col1 - col1 AS col1 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1829
SELECT DISTINCT - col1 + col0 DIV col0 FROM tab2
----
-16
-30
-58

skipif mysql # not compatible
query I rowsort label-1829
SELECT DISTINCT - col1 + col0 / col0 FROM tab2
----
-16
-30
-58

query I rowsort
SELECT - col1 + + tab0.col2 + col0 FROM tab0
----
-29
-61
80

query I rowsort
SELECT DISTINCT - col2 - col2 FROM tab0
----
-164
-2
-66

query III rowsort
SELECT * FROM tab0 WHERE NULL < ( + col2 )
----

query I rowsort
SELECT ALL + 18 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 903ac227935c1532300db45a8537c595

query I rowsort
SELECT - + col1 + cor0.col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT 82 * col0 * + ( col1 ) AS col2 FROM tab0 AS cor0
----
169248
278390
664118

query I rowsort
SELECT - 10 AS col1 FROM tab2 AS cor0
----
-10
-10
-10

query I rowsort
SELECT ALL col1 - + col1 * col0 AS col2 FROM tab1
----
-1027
-52
-630

query I rowsort
SELECT - col1 FROM tab0 WHERE col1 * + col2 NOT IN ( - col2 * col2 )
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 - + col1 col0 FROM tab1
----
0

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT NULL NOT IN ( - col1 )
----

query I rowsort
SELECT - col0 * - tab0.col2 * - tab0.col1 FROM tab0
----
-3395
-664118
-68112

query I rowsort
SELECT - 68 - - cor0.col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 6cb7e7aed19922fa3c36739a0a28832f

query I rowsort
SELECT ALL col2 + + 74 * - col2 AS col1 FROM tab0
----
-2409
-5986
-73

query I rowsort
SELECT ALL col2 * col1 + col2 FROM tab0
----
2871
7544
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 4 col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

query I rowsort
SELECT DISTINCT ( - col1 ) + - col2 FROM tab2 cor0
----
-55
-58
-85

query I rowsort
SELECT ALL 50 + - col0 FROM tab1 AS cor0
----
-14
-30
47

query I rowsort
SELECT ALL + - 88 * - col0 FROM tab1 AS cor0
----
264
5632
7040

query I rowsort
SELECT ALL - - col0 * col0 + - col2 + 1 AS col2 FROM tab1 AS cor0
----
-44
4040
6305

query I rowsort
SELECT ALL + col1 * ( cor0.col0 ) + - 10 * - 48 * + col1 AS col0 FROM tab0 AS cor0
----
43344
49955
51779

query I rowsort
SELECT DISTINCT + - 11 FROM tab1 cor0
----
-11

query I rowsort
SELECT DISTINCT + - col1 + ( col0 ) * - 80 AS col2 FROM tab2 AS cor0
----
-591
-6299
-6337

query I rowsort
SELECT ( + cor0.col2 ) AS col0 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT - ( col1 ) * + col1 + ( - col0 ) * + col0 FROM tab1 AS cor0
----
-4196
-6569
-685

query I rowsort
SELECT DISTINCT - - col1 * - col0 - cor0.col1 FROM tab1 cor0
----
-104
-1053
-650

query I rowsort
SELECT + 31 * col1 + - col2 FROM tab0 AS cor0
----
2633
2739
3006

query I rowsort
SELECT DISTINCT - + col0 - col2 AS col2 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT 31 + + 76 AS col1 FROM tab0 AS cor0
----
107
107
107

onlyif mysql # use DIV operator for integer division
query I rowsort label-1859
SELECT DISTINCT - col1 DIV col0 + - col0 AS col1 FROM tab2 AS cor0
----
-11
-78
-79

skipif mysql # not compatible
query I rowsort label-1859
SELECT DISTINCT - col1 / col0 + - col0 AS col1 FROM tab2 AS cor0
----
-11
-78
-79

query I rowsort
SELECT ALL - + col1 + col2 * col2 AS col2 FROM tab0 AS cor0
----
-96
1003
6633

query I rowsort
SELECT ALL + col1 + 99 FROM tab0 AS cor0
----
185
190
196

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * + col2 + + col0 col2 FROM tab0 AS cor0
----
1113
36
6813

query I rowsort
SELECT ALL - - ( - cor0.col2 ) * - col0 - + 43 AS col1 FROM tab0 AS cor0
----
-8
7255
749

query I rowsort
SELECT DISTINCT - col2 + col2 * + col2 FROM tab1 cor0
----
2862
3192
9120

query I rowsort
SELECT ALL + ( + col1 ) + - cor0.col0 AS col0 FROM tab1 AS cor0
----
-54
-67
23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1866
SELECT - CAST( + col0 AS SIGNED ) AS col0 FROM tab0 cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-1866
SELECT - CAST ( + col0 AS INTEGER ) AS col0 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT ALL - + 57 + 96 * - col1 FROM tab0 AS cor0
----
-8313
-8793
-9369

query I rowsort
SELECT DISTINCT ( col1 ) + + cor0.col0 - col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT 74 + col1 - + 47 FROM tab0
----
113
118
124

query I rowsort
SELECT - 60 * + 52 + + cor0.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to d18004c3bc8fb6c06c129301af24ba25

query I rowsort
SELECT DISTINCT + 6 * - col0 FROM tab1 AS cor0
----
-18
-384
-480

query I rowsort
SELECT ALL - cor0.col1 * col0 + + col2 FROM tab1 cor0
----
-24
-583
-944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + + 88 * col0 col1 FROM tab0 AS cor0
----
2026
2983
7741

query I rowsort
SELECT DISTINCT col1 + col1 * + col2 AS col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT + + col1 + + 33 AS col2 FROM tab0 AS cor0
----
119
124
130

onlyif mysql # use DIV operator for integer division
query I rowsort label-1876
SELECT ALL + col0 DIV ( + col2 ) + + col2 * col2 FROM tab0 AS cor0
----
1089
36
6725

skipif mysql # not compatible
query I rowsort label-1876
SELECT ALL + col0 / ( + col2 ) + + col2 * col2 FROM tab0 AS cor0
----
1089
36
6725

query I rowsort
SELECT + cor0.col1 + col2 * 67 FROM tab1 AS cor0
----
3644
3829
6445

query I rowsort
SELECT - cor0.col0 * col2 + col2 * col2 FROM tab0 AS cor0
----
-34
-574
297

onlyif mysql # use DIV operator for integer division
query I rowsort label-1879
SELECT DISTINCT cor0.col0 DIV 28 + col1 * + col2 FROM tab2 AS cor0
----
1536
648
837

skipif mysql # not compatible
query I rowsort label-1879
SELECT DISTINCT cor0.col0 / 28 + col1 * + col2 FROM tab2 AS cor0
----
1536
648
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col1 * + col0 col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - cor0.col1 * - col2 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - + col0 + col2 * - cor0.col0 + col0 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-1883
SELECT DISTINCT - cor0.col1 DIV ( - col0 ) AS col1 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-1883
SELECT DISTINCT - cor0.col1 / ( - col0 ) AS col1 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT - col1 + col1 * - ( + col1 * ( + 35 ) ) AS col0 FROM tab2 AS cor0
----
-10132
-121894
-33666

query I rowsort
SELECT col1 + + 8 * col2 * + col0 AS col0 FROM tab1 AS cor0
----
1322
29194
61453

query I rowsort
SELECT DISTINCT col1 * 31 + - col0 * - col0 FROM tab2 AS cor0
----
1010
6768
7913

query I rowsort
SELECT ALL + col1 * col2 + cor0.col2 AS col2 FROM tab2 AS cor0
----
1560
684
864

onlyif mysql # use DIV operator for integer division
query I rowsort label-1888
SELECT + col1 * + 99 - + col2 DIV cor0.col1 col1 FROM tab2 AS cor0
----
1681
3069
5841

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1888
SELECT + col1 * + 99 - + col2 / cor0.col1 col1 FROM tab2 AS cor0
----
1681
3069
5841

query I rowsort
SELECT ALL cor0.col2 + ( - 9 ) FROM tab1 AS cor0
----
45
48
87

query I rowsort
SELECT + 39 AS col0 FROM tab2
----
39
39
39

query I rowsort
SELECT - 79 - col2 FROM tab2
----
-105
-106
-117

query I rowsort
SELECT + col2 * ( 48 ) FROM tab2 AS cor0
----
1248
1296
1824

query I rowsort
SELECT ALL - col2 + - ( - 39 ) * col2 FROM tab1 AS cor0
----
2052
2166
3648

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1894
SELECT - col1 * CAST( + col0 + col2 AS SIGNED ) * ( + col1 ) FROM tab2 AS cor0
----
-32674
-33813
-362024

skipif mysql # not compatible
query I rowsort label-1894
SELECT - col1 * CAST ( + col0 + col2 AS INTEGER ) * ( + col1 ) FROM tab2 AS cor0
----
-32674
-33813
-362024

query I rowsort
SELECT + + ( col2 ) + col1 * + col1 FROM tab2 AS cor0
----
327
3507
988

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1896
SELECT ALL + col1 + CAST( tab1.col1 AS SIGNED ) + col1 * + 31 col0 FROM tab1
----
330
429
858

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1896
SELECT ALL + col1 + CAST ( tab1.col1 AS INTEGER ) + col1 * + 31 col0 FROM tab1
----
330
429
858

query I rowsort
SELECT - 72 + - cor1.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to d8491b9800a2a3adf0930121eb517ac6

query I rowsort
SELECT 20 + + 14 AS col2 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 4e2ca147a59e0d5661c28cf3e5431caa

query I rowsort
SELECT DISTINCT - cor0.col2 + + col0 AS col0 FROM tab1 AS cor0
----
-16
-51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-1900
SELECT ALL col0 DIV - col1 - - col2 FROM tab1 cor0
----
51
54
90

skipif mysql # not compatible
query I rowsort label-1900
SELECT ALL col0 / - col1 - - col2 FROM tab1 cor0
----
51
54
90

query I rowsort
SELECT - + cor0.col0 * - col1 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL + - cor0.col0 * cor0.col0 AS col0 FROM tab2 AS cor0
----
-49
-6084
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * col2 col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL - 98 FROM tab1, tab1 AS cor0, tab2 cor1
----
27 values hashing to 9b0655947ad21e0b95a137a474fa6a1f

query I rowsort
SELECT ALL 14 + + col2 AS col2 FROM tab0
----
15
47
96

query I rowsort
SELECT cor1.col0 AS col0 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT ALL + cor0.col2 + - cor0.col2 + - 65 FROM tab1, tab2 AS cor0
----
9 values hashing to 744531575c1b6461ed2916d4940e4d23

query I rowsort
SELECT - col2 + col1 * col2 AS col0 FROM tab1
----
1152
1350
513

query I rowsort
SELECT 29 + + col2 * - ( col1 ) FROM tab1
----
-1219
-1375
-541

query I rowsort
SELECT DISTINCT - cor0.col2 + - col2 * - col0 FROM tab0 AS cor0
----
34
7216
759

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1911
SELECT DISTINCT 99 * + cor0.col0 + CAST( NULL AS SIGNED ) * col2 AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1911
SELECT DISTINCT 99 * + cor0.col0 + CAST ( NULL AS INTEGER ) * col2 AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + - 65 + col2 AS col2 FROM tab2 AS cor0
----
-27
-38
-39

query I rowsort
SELECT ALL - 70 + cor0.col0 * - 5 AS col1 FROM tab2 AS cor0
----
-105
-460
-465

query I rowsort
SELECT DISTINCT ( col1 ) + + 18 * + 71 AS col2 FROM tab1 AS cor0
----
1288
1291
1304

onlyif mysql # use DIV operator for integer division
query I rowsort label-1915
SELECT + 16 DIV - col0 FROM tab1 AS cor0
----
-5
0
0

skipif mysql # not compatible
query I rowsort label-1915
SELECT + 16 / - col0 FROM tab1 AS cor0
----
-5
0
0

query I rowsort
SELECT ALL + ( col1 ) + col2 * + col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT 63 * col0 * col0 AS col1 FROM tab0 cor0
----
36288
499023
77175

query I rowsort
SELECT DISTINCT 94 FROM tab2, tab0 AS cor0
----
94

query I rowsort
SELECT DISTINCT - - col0 + col1 * col0 AS col1 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT DISTINCT - - cor0.col2 * - col2 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT - + col1 * + col2 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT - 5 * - col0 AS col2 FROM tab1
----
15
320
400

query I rowsort
SELECT 57 AS col2 FROM tab2 AS cor0
----
57
57
57

query I rowsort
SELECT ALL + + col1 * col2 + cor0.col2 AS col1 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT ALL col2 + - ( col1 ) * - cor0.col2 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT - col1 + - col0 + col2 FROM tab0 AS cor0
----
-131
-77
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-1927
SELECT + col0 DIV + ( col2 + cor0.col0 ) AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1927
SELECT + col0 / + ( col2 + cor0.col0 ) AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT col2 + 94 * + col0 FROM tab2 AS cor0
----
685
7358
7464

query I rowsort
SELECT DISTINCT 76 AS col2 FROM tab0, tab0 AS cor0
----
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col1 * + cor0.col0 col2 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT - + 38 + - col1 AS col0 FROM tab2 AS cor0
----
-55
-69
-97

query I rowsort
SELECT col0 * col1 + + ( col2 ) AS col1 FROM tab0
----
2097
3396
8181

query I rowsort
SELECT + + ( 46 ) * cor0.col1 FROM tab0 AS cor0
----
3956
4186
4462

query I rowsort
SELECT + - ( col0 ) AS col2 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT ALL - col1 * + 59 FROM tab0
----
-5074
-5369
-5723

query I rowsort
SELECT DISTINCT + 24 AS col1 FROM tab0, tab0 AS cor0, tab2 cor1
----
24

query I rowsort
SELECT DISTINCT - ( 96 ) FROM tab1, tab1 AS cor0
----
-96

query I rowsort
SELECT ALL + cor0.col2 * cor0.col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ( - ( col0 ) ) AS col0 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT + 38 + + col1 AS col1 FROM tab1 cor0
----
48
51
64

query I rowsort
SELECT DISTINCT 12 * col1 + - col2 AS col0 FROM tab1 cor0
----
258
60
63

onlyif mysql # use DIV operator for integer division
query I rowsort label-1942
SELECT col0 DIV 58 FROM tab2 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-1942
SELECT col0 / 58 FROM tab2 AS cor0
----
0
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - ( col1 ) col2 FROM tab1 AS cor0
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col2 FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT ( + 81 * - col1 ) FROM tab2
----
-1377
-2511
-4779

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1946
SELECT CAST( - tab2.col2 AS SIGNED ) AS col0 FROM tab2
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-1946
SELECT CAST ( - tab2.col2 AS INTEGER ) AS col0 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT ALL - col1 * col2 + + col1 AS col0 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT DISTINCT - 70 FROM tab1, tab2, tab2 AS cor0
----
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-1949
SELECT + ( col1 ) + col1 DIV ( - 27 ) AS col0 FROM tab2
----
17
30
57

skipif mysql # not compatible
query I rowsort label-1949
SELECT + ( col1 ) + col1 / ( - 27 ) AS col0 FROM tab2
----
17
30
57

query I rowsort
SELECT + 47 AS col1 FROM tab0, tab1, tab2 AS cor0, tab2
----
81 values hashing to 5c7a6f591fb2a38893dafe56c4b9b97f

onlyif mysql # use DIV operator for integer division
query I rowsort label-1951
SELECT + 98 DIV tab0.col0 AS col1 FROM tab0
----
1
2
4

skipif mysql # not compatible
query I rowsort label-1951
SELECT + 98 / tab0.col0 AS col1 FROM tab0
----
1
2
4

query I rowsort
SELECT - - col0 * col2 + + col2 FROM tab0 AS cor0
----
36
7380
825

skipif mysql # not compatible
query I rowsort
SELECT + - col1 * + CAST ( 32 AS REAL ) + - col2 + + 34 FROM tab1 AS cor0
----
-343
-478
-852

query I rowsort
SELECT 73 * col1 FROM tab0
----
6278
6643
7081

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 33 * col0 col1 FROM tab1
----
2112
2640
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1956
SELECT - col2 * CAST( NULL AS SIGNED ) / + col0 + col2 col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1956
SELECT - col2 * CAST ( NULL AS INTEGER ) / + col0 + col2 col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1957
SELECT + col0 * col1 DIV 17 + - cor0.col1 AS col0 FROM tab0 cor0
----
102
35
385

skipif mysql # not compatible
query I rowsort label-1957
SELECT + col0 * col1 / 17 + - cor0.col1 AS col0 FROM tab0 cor0
----
102
35
385

query I rowsort
SELECT + col1 + ( cor0.col0 ) AS col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT - 69 * col2 AS col1 FROM tab1
----
-3726
-3933
-6624

query I rowsort
SELECT DISTINCT - 56 AS col1 FROM tab2, tab2 AS cor0
----
-56

query I rowsort
SELECT ALL + 35 + cor0.col0 AS col2 FROM tab0 AS cor0
----
124
59
70

query I rowsort
SELECT DISTINCT - + 90 FROM tab1 AS cor0
----
-90

query I rowsort
SELECT - tab0.col1 - + 25 FROM tab0
----
-111
-116
-122

onlyif mysql # use DIV operator for integer division
query I rowsort label-1964
SELECT - col2 DIV - col0 - + tab1.col1 AS col1 FROM tab1
----
-10
-12
-8

skipif mysql # not compatible
query I rowsort label-1964
SELECT - col2 / - col0 - + tab1.col1 AS col1 FROM tab1
----
-10
-12
-8

onlyif mysql # use DIV operator for integer division
query I rowsort label-1965
SELECT col2 DIV - tab1.col2 AS col0 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1965
SELECT col2 / - tab1.col2 AS col0 FROM tab1
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 75 + - col2 * 4 + - col1 col0 FROM tab1
----
-163
-167
-322

onlyif mysql # use DIV operator for integer division
query I rowsort label-1967
SELECT + - col0 DIV col2 + - col1 AS col2 FROM tab1 AS cor0
----
-11
-13
-26

skipif mysql # not compatible
query I rowsort label-1967
SELECT + - col0 / col2 + - col1 AS col2 FROM tab1 AS cor0
----
-11
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - ( col0 ) * + 48 col2 FROM tab0 AS cor0
----
-1152
-1680
-4272

query I rowsort
SELECT ALL - + col0 + col0 * col2 * + col1 AS col1 FROM tab1 AS cor0
----
36416
4209
99760

query I rowsort
SELECT ALL ( + cor0.col0 ) + ( col1 ) AS col2 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL + col2 * + col2 - 94 FROM tab0 AS cor0
----
-93
6630
995

query I rowsort
SELECT + ( + cor0.col1 ) - - col0 * cor0.col1 FROM tab0 cor0
----
2150
3492
8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-1973
SELECT - cor0.col1 DIV + cor0.col0 + + ( + ( col1 ) ) * col1 FROM tab2 AS cor0
----
289
3481
957

skipif mysql # not compatible
query I rowsort label-1973
SELECT - cor0.col1 / + cor0.col0 + + ( + ( col1 ) ) * col1 FROM tab2 AS cor0
----
289
3481
957

query I rowsort
SELECT ALL 1 * - cor0.col1 + - ( + 34 * + col1 ) FROM tab2 AS cor0
----
-1085
-2065
-595

query I rowsort
SELECT col1 * col2 * col1 + col0 AS col1 FROM tab2 AS cor0
----
11061
25954
90584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * - col2 + - cor0.col0 col1 FROM tab1 cor0
----
1168
1401
506

query I rowsort
SELECT + col2 * 20 FROM tab0 AS cor0
----
1640
20
660

query I rowsort
SELECT col2 * ( col0 + + col2 ) AS col1 FROM tab0 AS cor0
----
14022
1881
36

query I rowsort
SELECT DISTINCT ( + col1 ) * - cor0.col2 AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL - ( - 77 ) AS col0 FROM tab2 AS cor0
----
77
77
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 86 + + col1 * col2 - 90 col1 FROM tab2 AS cor0
----
1530
642
833

query I rowsort
SELECT - ( + cor0.col0 ) * col2 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL - 39 - + 19 FROM tab0 AS cor0
----
-58
-58
-58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 70 + + 97 col1 FROM tab2 AS cor0
----
167
167
167

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( 32 AS REAL ) AS col1 FROM tab2 cor0
----
32
32
32

query I rowsort
SELECT ALL - 7 * col0 FROM tab1 AS cor0
----
-21
-448
-560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1987
SELECT DISTINCT + CAST( NULL AS SIGNED ) * 27 AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1987
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * 27 AS col2 FROM tab1 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1988
SELECT ALL - cor0.col2 * 8 DIV col0 AS col1 FROM tab1 AS cor0
----
-144
-7
-9

skipif mysql # not compatible
query I rowsort label-1988
SELECT ALL - cor0.col2 * 8 / col0 AS col1 FROM tab1 AS cor0
----
-144
-7
-9

query I rowsort
SELECT cor0.col2 + - 95 * + col2 AS col1 FROM tab2 AS cor0
----
-2444
-2538
-3572

query I rowsort
SELECT ALL + + col2 + 46 FROM tab1 AS cor0
----
100
103
142

query I rowsort
SELECT col1 * + cor0.col1 AS col0 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT DISTINCT - col0 * - 26 FROM tab2 AS cor0
----
182
2028
2054

query I rowsort
SELECT + + col0 * 7 AS col1 FROM tab1 AS cor0
----
21
448
560

query I rowsort
SELECT - - col0 + col0 * col1 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT ( cor0.col1 ) FROM tab1, tab2 AS cor0, tab1 AS cor1
----
17
31
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1996
SELECT DISTINCT + 6 + cor0.col1 * - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1996
SELECT DISTINCT + 6 + cor0.col1 * - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL 67 - col1 FROM tab0 AS cor0
----
-19
-24
-30

query I rowsort
SELECT ALL - 13 * + col2 AS col2 FROM tab2 AS cor0
----
-338
-351
-494

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * - col2 col1 FROM tab2 AS cor0
----
1444
676
729

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 cor0 CROSS JOIN tab0, tab1 cor1
----
972 values hashing to 0210050fb1701e2797a9b17e1ebac91e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2001
SELECT - - col2 * + 25 * cor0.col2 + col0 + CAST( NULL AS SIGNED ) AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2001
SELECT - - col2 * + 25 * cor0.col2 + col0 + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 + + 38 * col1 FROM tab2 AS cor0
----
1209
2301
663

query I rowsort
SELECT + col1 + 81 * + col2 FROM tab1 AS cor0
----
4400
4627
7789

query I rowsort
SELECT DISTINCT cor0.col0 + - 9 * cor0.col0 AS col0 FROM tab0 AS cor0
----
-192
-280
-712

query I rowsort
SELECT DISTINCT - col2 * + col1 * 62 AS col2 FROM tab1 AS cor0
----
-35340
-77376
-87048

query I rowsort
SELECT ALL + 17 + 76 FROM tab2, tab0, tab2 AS cor0, tab1
----
81 values hashing to bed80270d2bd273301f8ff63d7ef9f43

onlyif mysql # use DIV operator for integer division
query I rowsort label-2007
SELECT - tab1.col2 + - col0 DIV + tab1.col2 AS col2 FROM tab1
----
-54
-58
-96

skipif mysql # not compatible
query I rowsort label-2007
SELECT - tab1.col2 + - col0 / + tab1.col2 AS col2 FROM tab1
----
-54
-58
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2008
SELECT DISTINCT col2 + + CAST( NULL AS SIGNED ) * + col0 + col1 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-2008
SELECT DISTINCT col2 + + CAST ( NULL AS INTEGER ) * + col0 + col1 FROM tab2
----
NULL

query I rowsort
SELECT DISTINCT - col1 + 91 * 97 AS col1 FROM tab2
----
8768
8796
8810

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1, tab2 AS cor0, tab0 cor1
----
972 values hashing to 58757c5bbbd4217c03cf2ac0b6126e55

query I rowsort
SELECT DISTINCT + col1 * + 43 * - tab2.col0 FROM tab2
----
-197886
-57749
-9331

query I rowsort
SELECT + col2 + ( col1 ) FROM tab0
----
119
173
98

query I rowsort
SELECT DISTINCT - + 34 * + col0 FROM tab0 AS cor0
----
-1190
-3026
-816

onlyif mysql # use DIV operator for integer division
query I rowsort label-2014
SELECT ALL + + 55 + - cor0.col1 DIV - cor0.col1 FROM tab0 AS cor0
----
56
56
56

skipif mysql # not compatible
query I rowsort label-2014
SELECT ALL + + 55 + - cor0.col1 / - cor0.col1 FROM tab0 AS cor0
----
56
56
56

query I rowsort
SELECT ALL + col1 * ( - col1 ) AS col2 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT DISTINCT - col2 + 29 AS col2 FROM tab2 AS cor0
----
-9
2
3

query I rowsort
SELECT DISTINCT + col1 + + col0 + cor0.col0 FROM tab0 AS cor0
----
134
167
269

query I rowsort
SELECT + - col0 * - ( - col1 ) + - col1 AS col0 FROM tab0 AS cor0
----
-2150
-3492
-8190

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col2 / - CAST ( 64 AS REAL ) FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT + 69 AS col1 FROM tab0, tab2, tab0 AS cor0, tab1
----
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-2021
SELECT ALL col0 * + 0 DIV + col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2021
SELECT ALL col0 * + 0 / + col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - 52 * - 1 AS col2 FROM tab1
----
52

query I rowsort
SELECT ALL ( - col0 ) AS col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

query I rowsort
SELECT - col2 + + 64 FROM tab0 cor0
----
-18
31
63

query I rowsort
SELECT + cor0.col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT - - 64 * - cor0.col0 FROM tab2 AS cor0
----
-448
-4992
-5056

onlyif mysql # use DIV operator for integer division
query I rowsort label-2028
SELECT 67 + ( + col0 ) DIV + col0 AS col2 FROM tab0 AS cor0
----
68
68
68

skipif mysql # not compatible
query I rowsort label-2028
SELECT 67 + ( + col0 ) / + col0 AS col2 FROM tab0 AS cor0
----
68
68
68

query I rowsort
SELECT - 63 + col1 FROM tab1 AS cor0
----
-37
-50
-53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + - col2 * - col0 col2 FROM tab1 AS cor0
----
136
3638
7667

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( - cor0.col1 ) col0 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT ALL cor0.col0 * + col0 + + cor0.col0 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT + col1 + cor0.col0 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT ALL + 11 + + col0 FROM tab0 AS cor0
----
100
35
46

query I rowsort
SELECT ( tab0.col1 * - col2 ) + col1 - tab0.col0 FROM tab0
----
-2776
-35
-7460

query I rowsort
SELECT col0 * col0 + 84 FROM tab2 AS cor0
----
133
6168
6325

query I rowsort
SELECT ALL - tab0.col1 * - tab0.col0 + 23 * 88 FROM tab0
----
10123
4088
5419

onlyif mysql # use DIV operator for integer division
query I rowsort label-2038
SELECT ALL col0 DIV + col0 + - col2 * - col0 AS col0 FROM tab2 AS cor0
----
190
2029
3003

skipif mysql # not compatible
query I rowsort label-2038
SELECT ALL col0 / + col0 + - col2 * - col0 AS col0 FROM tab2 AS cor0
----
190
2029
3003

onlyif mysql # use DIV operator for integer division
query I rowsort label-2039
SELECT cor0.col1 * cor0.col1 + - col2 DIV 43 FROM tab1 AS cor0
----
167
675
99

skipif mysql # not compatible
query I rowsort label-2039
SELECT cor0.col1 * cor0.col1 + - col2 / 43 FROM tab1 AS cor0
----
167
675
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-2040
SELECT DISTINCT - col1 - col0 DIV col0 AS col1 FROM tab0 AS cor0
----
-87
-92
-98

skipif mysql # not compatible
query I rowsort label-2040
SELECT DISTINCT - col1 - col0 / col0 AS col1 FROM tab0 AS cor0
----
-87
-92
-98

query I rowsort
SELECT ALL + col1 * col1 + - 47 FROM tab0 AS cor0
----
7349
8234
9362

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2042
SELECT + col0 * + col1 + ( - col1 * CAST( - col0 AS SIGNED ) ) FROM tab2 AS cor0
----
2686
434
9204

skipif mysql # not compatible
query I rowsort label-2042
SELECT + col0 * + col1 + ( - col1 * CAST ( - col0 AS INTEGER ) ) FROM tab2 AS cor0
----
2686
434
9204

query I rowsort
SELECT + col2 + + cor0.col0 AS col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL + + col0 + col0 + + col1 * - col0 FROM tab0 AS cor0
----
-2016
-3325
-7921

query I rowsort
SELECT DISTINCT + col0 * cor0.col0 + col1 + col2 FROM tab1 AS cor0
----
4163
6509
89

query I rowsort
SELECT ALL + cor0.col0 + + col1 * col2 * + col1 FROM tab2 AS cor0
----
11061
25954
90584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 + + 27 col2 FROM tab0 AS cor0
----
-59
-64
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-2048
SELECT col0 * - 0 DIV - col2 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2048
SELECT col0 * - 0 / - col2 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - 68 + + col2 FROM tab1 AS cor0
----
-11
-14
28

query I rowsort
SELECT - 88 * - ( col0 ) + ( 17 ) * - col1 - cor0.col2 * cor0.col2 FROM tab1 AS cor0
----
-2397
-3094
2213

query I rowsort
SELECT col1 + - 14 FROM tab1 AS cor0
----
-1
-4
12

query I rowsort
SELECT - ( col2 ) * - col1 AS col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT - cor0.col1 + - col0 - + col1 * + col2 AS col2 FROM tab0 AS cor0
----
-229
-2948
-7642

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( + col1 AS REAL ) * col0 * + 70 - col1 * col1 FROM tab1 AS cor0
----
-44900
-6136
-72969

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2055
SELECT - CAST( + col2 AS SIGNED ) + - cor0.col2 AS col2 FROM tab1 AS cor0
----
-108
-114
-192

skipif mysql # not compatible
query I rowsort label-2055
SELECT - CAST ( + col2 AS INTEGER ) + - cor0.col2 AS col2 FROM tab1 AS cor0
----
-108
-114
-192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 33 * + 73 - - col1 col2 FROM tab0 cor0
----
-2312
-2318
-2323

query I rowsort
SELECT ALL - 17 * cor0.col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 4809fa9604e2772ef8b92e64bc1c01e8

onlyif mysql # use DIV operator for integer division
query I rowsort label-2058
SELECT DISTINCT + col0 - ( + tab2.col0 ) DIV - col1 FROM tab2
----
7
79
83

skipif mysql # not compatible
query I rowsort label-2058
SELECT DISTINCT + col0 - ( + tab2.col0 ) / - col1 FROM tab2
----
7
79
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2059
SELECT - CAST( col2 AS SIGNED ) + col1 AS col1 FROM tab2 cor0
----
-21
33
4

skipif mysql # not compatible
query I rowsort label-2059
SELECT - CAST ( col2 AS INTEGER ) + col1 AS col1 FROM tab2 cor0
----
-21
33
4

query I rowsort
SELECT + 81 * col1 FROM tab2 AS cor0
----
1377
2511
4779

query I rowsort
SELECT ALL - + 66 AS col2 FROM tab1 cor0
----
-66
-66
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 39 * + col0 - cor0.col0 col2 FROM tab1 AS cor0
----
-120
-2560
-3200

query I rowsort
SELECT ALL + ( - col1 ) * col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT ALL col2 + + 33 FROM tab0 AS cor0
----
115
34
66

query I rowsort
SELECT DISTINCT - - 54 * 65 FROM tab2 AS cor0
----
3510

query I rowsort
SELECT ( cor0.col0 * 34 ) AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 74d5d97c3e957ab3da5e0a80d49b43b6

query I rowsort
SELECT + + col0 * col2 + col0 + + 21 FROM tab0 AS cor0
----
7408
837
91

query I rowsort
SELECT ALL 61 * col2 FROM tab1 AS cor0
----
3294
3477
5856

query I rowsort
SELECT DISTINCT - + col2 * cor0.col2 + 85 AS col0 FROM tab0 AS cor0
----
-1004
-6639
84

query I rowsort
SELECT ALL + - 95 - - col1 * col2 FROM tab0 AS cor0
----
2
2743
7367

query I rowsort
SELECT DISTINCT 26 * - col0 FROM tab0
----
-2314
-624
-910

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2072
SELECT ALL col0 + - CAST( NULL AS SIGNED ) * col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2072
SELECT ALL col0 + - CAST ( NULL AS INTEGER ) * col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col0 * col1 col1 FROM tab2
----
106097
1519
358956

query I rowsort
SELECT DISTINCT cor0.col0 * - ( + 71 ) AS col0 FROM tab2 AS cor0
----
-497
-5538
-5609

query I rowsort
SELECT ALL col0 + - col2 + col2 * + cor0.col2 FROM tab2 AS cor0
----
1485
709
728

query I rowsort
SELECT DISTINCT - + col1 * 79 + - col0 * + col2 + - col1 * cor0.col0 FROM tab2 AS cor0
----
-11291
-2855
-5688

query I rowsort
SELECT ALL + - col2 * + col2 * col1 + col0 AS col1 FROM tab0 AS cor0
----
-611795
-62
-93630

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2078
SELECT DISTINCT - col1 * + ( - col2 ) + col2 * - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2078
SELECT DISTINCT - col1 * + ( - col2 ) + col2 * - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT - + col0 * 36 AS col1 FROM tab2 AS cor0
----
-252
-2808
-2844

query I rowsort
SELECT ALL + + col1 * col1 + + col2 * + cor0.col0 FROM tab2 AS cor0
----
1150
3291
5509

query I rowsort
SELECT ALL - cor0.col2 * - col1 + col2 + col2 FROM tab0 cor0
----
2904
7626
99

query I rowsort
SELECT col0 * 24 FROM tab2 AS cor0
----
168
1872
1896

query I rowsort
SELECT + + col2 * ( + col1 ) AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + col0 + ( - 52 ) AS col1 FROM tab2
----
-45
26
27

query I rowsort
SELECT - 31 * col1 FROM tab2 AS cor0
----
-1829
-527
-961

query I rowsort
SELECT + col1 * + 98 AS col2 FROM tab2
----
1666
3038
5782

query I rowsort
SELECT DISTINCT - col1 * - 72 AS col1 FROM tab1 AS cor0
----
1872
720
936

query I rowsort
SELECT ALL - cor0.col0 * col1 + cor0.col1 AS col2 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT ALL - col2 * + col1 + col2 FROM tab0 AS cor0
----
-2805
-7380
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2090
SELECT cor0.col2 * ( - col1 ) / CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2090
SELECT cor0.col2 * ( - col1 ) / CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2091
SELECT tab1.col1 + + ( - col0 ) * - CAST( NULL AS SIGNED ) AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2091
SELECT tab1.col1 + + ( - col0 ) * - CAST ( NULL AS INTEGER ) AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT 5 * cor0.col0 + col0 AS col0 FROM tab1 AS cor0
----
18
384
480

query I rowsort
SELECT ALL - - 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 + + 67 * cor0.col2 col2 FROM tab1 AS cor0
----
3618
3819
6432

query I rowsort
SELECT ALL + - 4 FROM tab1 AS cor0
----
-4
-4
-4

query I rowsort
SELECT DISTINCT + col2 + 27 FROM tab2 AS cor0
----
53
54
65

query I rowsort
SELECT DISTINCT + ( + col1 ) + 40 * 82 AS col1 FROM tab2
----
3297
3311
3339

query I rowsort
SELECT tab1.col1 + col2 + col0 AS col0 FROM tab1
----
131
189
83

query I rowsort
SELECT DISTINCT + 81 AS col1 FROM tab1 AS cor0
----
81

query I rowsort
SELECT - + col2 + col2 * 29 + col1 FROM tab0 AS cor0
----
1010
125
2387

query I rowsort
SELECT + + 63 + col1 FROM tab1 AS cor0
----
73
76
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + col2 * col2 col0 FROM tab0 AS cor0
----
1175
6815
98

query I rowsort
SELECT col2 + + col1 * - 25 FROM tab2 AS cor0
----
-1449
-387
-748

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 15 + - col2 col0 FROM tab0 AS cor0
----
-18
-67
14

query I rowsort
SELECT DISTINCT - + 29 AS col1 FROM tab2 AS cor0
----
-29

query I rowsort
SELECT DISTINCT col1 * col2 - col0 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT DISTINCT 19 * col0 FROM tab2 AS cor0
----
133
1482
1501

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 - - col2 * col1 col1 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT ALL - col1 + + col0 * + col0 FROM tab1 AS cor0
----
-17
4086
6387

query I rowsort
SELECT - col0 * + col1 - - col1 * 29 FROM tab1 AS cor0
----
-350
-663
676

query I rowsort
SELECT DISTINCT - - cor0.col2 * 62 AS col1 FROM tab1 cor0
----
3348
3534
5952

query I rowsort
SELECT + col2 + - col1 AS col0 FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT ALL - 93 AS col0 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to ea79c61f7a02d25805171f5e85229fba

query I rowsort
SELECT ALL - + col0 * - 87 AS col2 FROM tab1 AS cor0
----
261
5568
6960

query I rowsort
SELECT - cor0.col0 * 7 FROM tab0 AS cor0
----
-168
-245
-623

query I rowsort
SELECT cor0.col2 * + cor0.col1 + + col1 AS col2 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT + col0 + + col2 * 21 + - col2 AS col0 FROM tab0
----
1729
55
684

query I rowsort
SELECT DISTINCT - tab2.col2 * col0 + col0 AS col2 FROM tab2
----
-182
-1950
-2923

onlyif mysql # use DIV operator for integer division
query I rowsort label-2119
SELECT col1 * - col2 + - col2 DIV + col1 AS col0 FROM tab1 AS cor0
----
-1255
-1406
-575

skipif mysql # not compatible
query I rowsort label-2119
SELECT col1 * - col2 + - col2 / + col1 AS col0 FROM tab1 AS cor0
----
-1255
-1406
-575

onlyif mysql # use DIV operator for integer division
query I rowsort label-2120
SELECT - + col2 * col1 + + col0 DIV + col1 AS col1 FROM tab1 AS cor0
----
-1242
-1404
-564

skipif mysql # not compatible
query I rowsort label-2120
SELECT - + col2 * col1 + + col0 / + col1 AS col1 FROM tab1 AS cor0
----
-1242
-1404
-564

query I rowsort
SELECT - col2 * col1 * - col1 + cor0.col1 AS col1 FROM tab1 AS cor0
----
16237
36530
5710

query I rowsort
SELECT col1 * col2 + + col2 AS col2 FROM tab0 AS cor0
----
2871
7544
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-2123
SELECT ALL - col2 DIV - col0 FROM tab0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2123
SELECT ALL - col2 / - col0 FROM tab0
----
0
0
1

query I rowsort
SELECT DISTINCT - col2 + + col0 FROM tab2 AS cor0 WHERE ( NULL ) <> ( NULL ) OR + col0 * col2 > NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2125
SELECT col0 DIV - cor0.col0 AS col2 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2125
SELECT col0 / - cor0.col0 AS col2 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + col1 * col0 * - col2 + col2 AS col1 FROM tab2 AS cor0
----
-119626
-50996
-5832

query I rowsort
SELECT ALL + col1 AS col0 FROM tab0 WHERE NOT NULL < col0
----

query I rowsort
SELECT ALL col0 / - col1 + + col0 AS col0 FROM tab1 WHERE col2 NOT IN ( col2 + col2 - + col2 )
----

query I rowsort
SELECT DISTINCT - col2 + col1 * + col0 * + col2 + col0 FROM tab0
----
3429
664125
68103

query I rowsort
SELECT ALL + 39 * + tab1.col0 + + col0 * col1 FROM tab1
----
195
3136
4160

onlyif mysql # use DIV operator for integer division
query I rowsort label-2131
SELECT + col0 DIV + col1 col1 FROM tab1
----
0
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2131
SELECT + col0 / + col1 col1 FROM tab1
----
0
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * tab0.col2 col1 FROM tab0
----
-1
-1089
-6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-2133
SELECT ALL col0 DIV + tab1.col0 AS col2 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2133
SELECT ALL col0 / + tab1.col0 AS col2 FROM tab1
----
1
1
1

query IIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0 WHERE NULL < NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2135
SELECT col1 + + col0 * col0 DIV - col0 FROM tab0 AS cor0
----
2
62
62

skipif mysql # not compatible
query I rowsort label-2135
SELECT col1 + + col0 * col0 / - col0 FROM tab0 AS cor0
----
2
62
62

query III rowsort
SELECT * FROM tab1 WHERE NOT col0 <= ( + col2 )
----
64
10
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 col2 FROM tab0 WHERE NOT ( + col2 ) NOT IN ( - col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2138
SELECT ALL col0 DIV + col1 AS col1 FROM tab2
----
0
1
4

skipif mysql # not compatible
query I rowsort label-2138
SELECT ALL col0 / + col1 AS col1 FROM tab2
----
0
1
4

query I rowsort
SELECT DISTINCT - tab1.col0 AS col1 FROM tab1 WHERE NULL = NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2140
SELECT + col2 DIV col1 - col1 * col1 FROM tab2
----
-287
-3481
-961

skipif mysql # not compatible
query I rowsort label-2140
SELECT + col2 / col1 - col1 * col1 FROM tab2
----
-287
-3481
-961

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT NULL NOT BETWEEN NULL AND tab0.col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2142
SELECT - col2 DIV + col0 + - col0 * + col1 * + col2 AS col2 FROM tab1
----
-36480
-4230
-99841

skipif mysql # not compatible
query I rowsort label-2142
SELECT - col2 / + col0 + - col0 * + col1 * + col2 AS col2 FROM tab1
----
-36480
-4230
-99841

query I rowsort
SELECT - tab0.col0 * + tab0.col2 * + col0 AS col2 FROM tab0
----
-1225
-19008
-649522

query I rowsort
SELECT DISTINCT col2 + - col1 * col2 + tab1.col0 AS col0 FROM tab1
----
-1072
-1347
-449

onlyif mysql # use DIV operator for integer division
query I rowsort label-2145
SELECT DISTINCT - col1 DIV col1 AS col1 FROM tab0
----
-1

skipif mysql # not compatible
query I rowsort label-2145
SELECT DISTINCT - col1 / col1 AS col1 FROM tab0
----
-1

query I rowsort
SELECT DISTINCT col2 + col2 + + col2 FROM tab1
----
162
171
288

onlyif mysql # use DIV operator for integer division
query I rowsort label-2147
SELECT DISTINCT col2 DIV - col0 col1 FROM tab0
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2147
SELECT DISTINCT col2 / - col0 col1 FROM tab0
----
-1
0

query I rowsort
SELECT ALL col1 + - col0 * + tab1.col1 + - col1 FROM tab1
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + col2 ) * ( col1 ) col0 FROM tab0 cor0
----
2838
7462
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2150
SELECT ALL CAST( NULL AS SIGNED ) col1 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2150
SELECT ALL CAST ( NULL AS INTEGER ) col1 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2151
SELECT 24 * + col1 / - CAST( NULL AS SIGNED ) + + col2 * col2 + + col0 * + 86 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2151
SELECT 24 * + col1 / - CAST ( NULL AS INTEGER ) + + col2 * col2 + + col0 * + 86 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * + col0 * - col2 AS col1 FROM tab0 cor0
----
-1225
-19008
-649522

query I rowsort
SELECT col2 + - col2 * - 65 AS col0 FROM tab1 AS cor0
----
3564
3762
6336

query I rowsort
SELECT DISTINCT + col2 * col2 * - ( - ( - cor0.col1 ) ) AS col0 FROM tab1 AS cor0
----
-119808
-32490
-75816

query I rowsort
SELECT DISTINCT - col1 * + col2 * - col1 + - col2 FROM tab2
----
10944
25920
90480

query I rowsort
SELECT ALL col2 + + col0 * 98 * col2 FROM tab2 AS cor0
----
18549
198770
294234

query I rowsort
SELECT - 13 * col1 + col0 FROM tab2 AS cor0
----
-142
-396
-689

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT ( NULL ) = - col1
----

query I rowsort
SELECT DISTINCT - col1 - - col2 * col1 FROM tab0
----
0
2752
7371

query I rowsort
SELECT - col0 + tab0.col2 * col2 + col1 AS col0 FROM tab0
----
1151
63
6726

query I rowsort
SELECT cor0.col0 + - col2 FROM tab2 AS cor0 WHERE NOT NULL > col1 * col0
----

query I rowsort
SELECT ALL - col2 + - col2 * - col0 * - col0 - tab1.col0 FROM tab1
----
-233593
-543
-614576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + col1 * col1 + col0 col0 FROM tab2
----
3585
406
995

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE - col0 NOT BETWEEN NULL AND ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2165
SELECT col1 + + col1 * col2 DIV + col0 FROM tab2
----
150
25
78

skipif mysql # not compatible
query I rowsort label-2165
SELECT col1 + + col1 * col2 / + col0 FROM tab2
----
150
25
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + col1 col0 FROM tab2
----
-21
33
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col1 col2 FROM tab0 WHERE NOT - col0 > NULL
----

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT col1 * col1 BETWEEN ( - col2 ) AND ( - col1 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT ALL col1 * + col0 - tab2.col0 * col2 AS col2 FROM tab2
----
-1659
2574
28

query I rowsort
SELECT - col2 + - col1 * col0 * col0 FROM tab2
----
-106135
-1546
-358982

query I rowsort
SELECT tab2.col0 + col1 * + 59 AS col2 FROM tab2
----
1082
1836
3559

onlyif mysql # use DIV operator for integer division
query I rowsort label-2172
SELECT DISTINCT - - col1 DIV - cor0.col0 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-2172
SELECT DISTINCT - - col1 / - cor0.col0 FROM tab0 AS cor0
----
-1
-2
-3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2173
SELECT + CAST( NULL AS SIGNED ) FROM tab2, tab2 cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-2173
SELECT + CAST ( NULL AS INTEGER ) FROM tab2, tab2 cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL - - 89 FROM tab2 AS cor0
----
89
89
89

query I rowsort
SELECT - 83 * + col0 FROM tab2 AS cor0
----
-581
-6474
-6557

query I rowsort
SELECT col1 * + cor0.col0 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2177
SELECT ALL - col0 * CAST( + col0 AS SIGNED ) FROM tab0 AS cor0
----
-1225
-576
-7921

skipif mysql # not compatible
query I rowsort label-2177
SELECT ALL - col0 * CAST ( + col0 AS INTEGER ) FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT ALL - col0 + 1 + - col2 AS col2 FROM tab0 AS cor0
----
-170
-35
-56

query I rowsort
SELECT DISTINCT - - col2 + 81 AS col2 FROM tab0 AS cor0
----
114
163
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-2180
SELECT DISTINCT - col2 DIV col0 + col2 * col2 AS col0 FROM tab1 cor0
----
2898
3249
9215

skipif mysql # not compatible
query I rowsort label-2180
SELECT DISTINCT - col2 / col0 + col2 * col2 AS col0 FROM tab1 cor0
----
2898
3249
9215

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 + + col1 col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - cor0.col2 * + 46 FROM tab0 AS cor0
----
-1518
-3772
-46

query I rowsort
SELECT ALL + - cor0.col2 * + col0 + + ( col1 ) AS col1 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT ALL - 53 AS col1 FROM tab1
----
-53
-53
-53

query I rowsort
SELECT ALL - + cor0.col1 - - cor0.col0 * 81 AS col0 FROM tab1 AS cor0
----
217
5174
6467

query I rowsort
SELECT DISTINCT + col1 * - cor0.col2 + - col1 + + col1 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL ( - col2 ) * col1 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT - + 90 * - col1 AS col2 FROM tab1 AS cor0
----
1170
2340
900

query I rowsort
SELECT + col2 - + col0 * + col2 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT + col2 * - ( - cor0.col0 ) + - ( col0 ) * col2 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT col1 - - 78 AS col2 FROM tab2 AS cor0
----
109
137
95

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2192
SELECT ( + col2 ) * - cor0.col1 * - CAST( col1 AS SIGNED ) + col1 FROM tab2 AS cor0
----
10999
25978
90565

skipif mysql # not compatible
query I rowsort label-2192
SELECT ( + col2 ) * - cor0.col1 * - CAST ( col1 AS INTEGER ) + col1 FROM tab2 AS cor0
----
10999
25978
90565

query I rowsort
SELECT col0 * ( col1 ) AS col0 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-2194
SELECT - col2 DIV + col1 + col1 col1 FROM tab0 AS cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2194
SELECT - col2 / + col1 + col1 col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT - col0 * + 30 FROM tab1
----
-1920
-2400
-90

onlyif mysql # use DIV operator for integer division
query I rowsort label-2196
SELECT col0 DIV + 45 AS col2 FROM tab2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-2196
SELECT col0 / + 45 AS col2 FROM tab2
----
0
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2197
SELECT ALL + + CAST( NULL AS SIGNED ) / + 27 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2197
SELECT ALL + + CAST ( NULL AS INTEGER ) / + 27 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2198
SELECT - - col1 + - 55 DIV - col0 AS col2 FROM tab0 AS cor0
----
88
91
98

skipif mysql # not compatible
query I rowsort label-2198
SELECT - - col1 + - 55 / - col0 AS col2 FROM tab0 AS cor0
----
88
91
98

query I rowsort
SELECT ALL - col0 + + col2 + + col0 AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL col0 * - 82 AS col0 FROM tab1 cor0
----
-246
-5248
-6560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + 78 + col1 ) col2 FROM tab0
----
164
169
175

query I rowsort
SELECT ALL + cor0.col0 * col1 - - col1 * col2 FROM tab2 AS cor0
----
1054
1989
6136

onlyif mysql # use DIV operator for integer division
query I rowsort label-2203
SELECT - col1 DIV 79 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2203
SELECT - col1 / 79 FROM tab0 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2204
SELECT + - 41 * col2 DIV - col1 AS col2 FROM tab2 AS cor0
----
18
35
91

skipif mysql # not compatible
query I rowsort label-2204
SELECT + - 41 * col2 / - col1 AS col2 FROM tab2 AS cor0
----
18
35
91

query I rowsort
SELECT 33 * - col2 AS col1 FROM tab1 AS cor0
----
-1782
-1881
-3168

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2206
SELECT ALL + CAST( NULL AS SIGNED ) + col2 * col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2206
SELECT ALL + CAST ( NULL AS INTEGER ) + col2 * col0 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + col2 * col0 col1 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT ALL - - 80 + + col2 AS col1 FROM tab1 cor0
----
134
137
176

query I rowsort
SELECT DISTINCT - cor0.col2 + - col1 FROM tab0 cor0
----
-119
-173
-98

query I rowsort
SELECT ALL ( + col1 ) * ( 47 + cor0.col1 ) FROM tab1 AS cor0
----
1898
570
780

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2211
SELECT + ( - col0 ) * - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2211
SELECT + ( - col0 ) * - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 23 + + col2 AS col0 FROM tab0
----
-22
10
59

query I rowsort
SELECT ALL col2 + col0 * tab0.col1 FROM tab0
----
2097
3396
8181

query I rowsort
SELECT 67 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

query I rowsort
SELECT ALL + + 43 + + col1 AS col2 FROM tab2 AS cor0
----
102
60
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + col1 * col0 col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT DISTINCT - 10 + + cor0.col1 * col2 AS col0 FROM tab2 AS cor0
----
1524
636
827

query I rowsort
SELECT DISTINCT - 28 * col1 + ( + col0 + col1 ) FROM tab0 AS cor0
----
-2298
-2368
-2584

query I rowsort
SELECT DISTINCT + col2 + + cor0.col0 * 0 AS col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL ( col0 ) * col2 + + cor0.col1 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab0, tab0 cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT DISTINCT + 88 * - cor0.col1 * 70 FROM tab1 AS cor0
----
-160160
-61600
-80080

query I rowsort
SELECT ALL col0 * cor0.col1 + 6 FROM tab1 AS cor0
----
1046
646
84

query I rowsort
SELECT - cor1.col2 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT ALL + - cor0.col0 + + 31 * ( - col2 * col2 ) - - col0 AS col1 FROM tab0 AS cor0
----
-208444
-31
-33759

query I rowsort
SELECT ALL + - col2 * + col0 + 73 AS col1 FROM tab0 AS cor0
----
-719
-7225
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-2227
SELECT + - 68 * col2 DIV + col0 col2 FROM tab2 AS cor0
----
-22
-262
-32

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2227
SELECT + - 68 * col2 / + col0 col2 FROM tab2 AS cor0
----
-22
-262
-32

query I rowsort
SELECT DISTINCT 42 * - 18 + col0 FROM tab2 AS cor0
----
-677
-678
-749

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2229
SELECT DISTINCT + CAST( NULL AS SIGNED ) * - col1 AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2229
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * - col1 AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - ( cor0.col2 ) * + col2 - 21 AS col2 FROM tab2 AS cor0
----
-1465
-697
-750

query I rowsort
SELECT - col1 - col2 * + col1 * - col1 AS col0 FROM tab1 AS cor0
----
16211
36478
5690

onlyif mysql # use DIV operator for integer division
query I rowsort label-2232
SELECT + col2 + + col1 + col0 DIV - tab1.col0 FROM tab1
----
108
66
79

skipif mysql # not compatible
query I rowsort label-2232
SELECT + col2 + + col1 + col0 / - tab1.col0 FROM tab1
----
108
66
79

query I rowsort
SELECT - - 0 + + ( + col0 * - col0 ) AS col1 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT - - 73 AS col1 FROM tab1 AS cor0
----
73

query I rowsort
SELECT DISTINCT 55 * - col2 + col1 * + 63 AS col0 FROM tab2 AS cor0
----
-1019
2287
468

query I rowsort
SELECT DISTINCT - cor1.col1 AS col0 FROM tab1, tab2 AS cor0, tab2 AS cor1, tab0 AS cor2
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-2237
SELECT DISTINCT - col0 DIV + col2 FROM tab0 AS cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-2237
SELECT DISTINCT - col0 / + col2 FROM tab0 AS cor0
----
-1
-35
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2238
SELECT ALL 3 DIV cor0.col1 col0 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2238
SELECT ALL 3 / cor0.col1 col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2239
SELECT cor0.col1 - - CAST( NULL AS DECIMAL ) FROM tab2, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2239
SELECT cor0.col1 - - CAST ( NULL AS REAL ) FROM tab2, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT + 38 AS col1 FROM tab0 AS cor0
----
38

query I rowsort
SELECT ( 80 ) AS col1 FROM tab1 AS cor0
----
80
80
80

query I rowsort
SELECT ALL - 47 - - col0 FROM tab0 AS cor0
----
-12
-23
42

query I rowsort
SELECT - col1 + - 93 * + 22 * col0 AS col2 FROM tab0 cor0
----
-182185
-49190
-71707

query I rowsort
SELECT ALL cor0.col1 + 8 * - col2 AS col2 FROM tab2 AS cor0
----
-149
-185
-287

query I rowsort
SELECT DISTINCT - col2 + col0 + cor0.col1 FROM tab1 cor0
----
-25
-3
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - 84 * + col2 col1 FROM tab2 AS cor0
----
-2125
-2237
-3175

query I rowsort
SELECT + - col0 + 67 * cor0.col0 AS col2 FROM tab2 AS cor0
----
462
5148
5214

query I rowsort
SELECT + col0 + cor0.col2 AS col0 FROM tab0 cor0
----
171
36
57

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 cor0 CROSS JOIN tab1, tab1 AS cor1, tab0 AS cor2
----
972 values hashing to 43f0c51511c8642d19190fd4dfcf905a

query I rowsort
SELECT - cor0.col2 + - col0 * + col1 + cor0.col1 AS col1 FROM tab0 AS cor0
----
-2011
-3299
-8090

query I rowsort
SELECT + - col0 + 3 AS col0 FROM tab0 AS cor0
----
-21
-32
-86

query I rowsort
SELECT - col2 + - 88 - 19 * col2 AS col1 FROM tab2 AS cor0
----
-608
-628
-848

query I rowsort
SELECT + 81 * - cor0.col2 + col2 AS col0 FROM tab2 AS cor0
----
-2080
-2160
-3040

query I rowsort
SELECT ( col0 ) * cor0.col2 + + ( - 91 ) AS col2 FROM tab0 AS cor0
----
-56
701
7207

onlyif mysql # use DIV operator for integer division
query I rowsort label-2255
SELECT + + 64 * cor0.col2 + col2 DIV + col2 AS col0 FROM tab1 AS cor0
----
3457
3649
6145

skipif mysql # not compatible
query I rowsort label-2255
SELECT + + 64 * cor0.col2 + col2 / + col2 AS col0 FROM tab1 AS cor0
----
3457
3649
6145

query I rowsort
SELECT ALL 55 FROM tab0 cor0 CROSS JOIN tab0, tab0 cor1, tab1 AS cor2
----
81 values hashing to c59acfbb70996777fa5053195838c3d6

query I rowsort
SELECT ALL - 17 * 64 FROM tab0, tab2 AS cor0
----
9 values hashing to 04dbc0c6b2653737e871a9c798145d0a

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 cor0 CROSS JOIN tab0, tab0 AS cor1, tab1 cor2
----
972 values hashing to 88213a0de4c0a44aaefe8bbffbcaf44a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col2 * - col1 col2 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT - - 5 * col1 FROM tab2 cor0
----
155
295
85

query I rowsort
SELECT ALL 68 * cor0.col2 * cor0.col2 AS col0 FROM tab1 AS cor0
----
198288
220932
626688

onlyif mysql # use DIV operator for integer division
query I rowsort label-2262
SELECT DISTINCT - cor0.col0 DIV col1 + CAST( col2 AS SIGNED ) FROM tab0 cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-2262
SELECT DISTINCT - cor0.col0 / col1 + CAST ( col2 AS INTEGER ) FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT col2 * + col0 * + col0 AS col1 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT ALL + col0 * 10 FROM tab2
----
70
780
790

query I rowsort
SELECT DISTINCT 31 + col0 * - 74 AS col2 FROM tab1
----
-191
-4705
-5889

query I rowsort
SELECT DISTINCT - col2 * + col1 + 24 FROM tab0 cor0
----
-2814
-73
-7438

query I rowsort
SELECT ALL ( col0 ) * col0 + + col1 AS col0 FROM tab2 AS cor0
----
6143
6258
80

query I rowsort
SELECT DISTINCT + tab0.col0 * col0 AS col2 FROM tab0
----
1225
576
7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-2269
SELECT DISTINCT col1 DIV + col2 AS col0 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-2269
SELECT DISTINCT col1 / + col2 AS col0 FROM tab1
----
0

query I rowsort
SELECT ALL - col0 * 23 FROM tab1 AS cor0
----
-1472
-1840
-69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + 1 col0 FROM tab2 AS cor0
----
27
28
39

query I rowsort
SELECT DISTINCT col1 * ( 2 ) + cor0.col0 AS col0 FROM tab0 AS cor0
----
196
229
271

query I rowsort
SELECT DISTINCT tab0.col1 + + cor0.col0 AS col2 FROM tab0, tab1, tab0 AS cor0
----
110
115
121
126
132
175
180
186

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2274
SELECT CAST( 11 AS SIGNED ) AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to f4d199584b44732f1a897e6691b4ea00

skipif mysql # not compatible
query I rowsort label-2274
SELECT CAST ( 11 AS INTEGER ) AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to f4d199584b44732f1a897e6691b4ea00

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 - col1 * 15 col0 FROM tab1
----
-140
-182
-364

onlyif mysql # use DIV operator for integer division
query I rowsort label-2276
SELECT + col1 DIV - 88 AS col2 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2276
SELECT + col1 / - 88 AS col2 FROM tab2
----
0
0
0

query I rowsort
SELECT - 24 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 797d0f7c145f8ac623924448c714bbcc

query I rowsort
SELECT ALL ( tab1.col2 ) FROM tab1, tab1 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT col2 + - 10 * - col0 FROM tab2
----
806
828
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2280
SELECT cor0.col0 + + CAST( + 79 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
157
158
86

skipif mysql # not compatible
query I rowsort label-2280
SELECT cor0.col0 + + CAST ( + 79 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
157
158
86

query I rowsort
SELECT ALL 66 AS col1 FROM tab0
----
66
66
66

query I rowsort
SELECT - + cor0.col1 + - 36 FROM tab2 cor0
----
-53
-67
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-2283
SELECT 56 DIV col2 - col2 FROM tab0
----
-32
-82
55

skipif mysql # not compatible
query I rowsort label-2283
SELECT 56 / col2 - col2 FROM tab0
----
-32
-82
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 53 ) * col1 * - col1 col0 FROM tab0 AS cor0
----
391988
438893
498677

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 95 col0 FROM tab0 AS cor0
----
-95
-95
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-2286
SELECT DISTINCT col0 * - col1 - col2 DIV col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort label-2286
SELECT DISTINCT col0 * - col1 - col2 / col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort
SELECT ALL + - col0 * + col1 + - CAST ( col0 AS REAL ) FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT - - 84 * - col1 + cor0.col2 FROM tab0 cor0
----
-7191
-7562
-8147

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2289
SELECT ALL - 91 + col0 * - CAST( - col1 * - col1 AS SIGNED ) + - ( - col2 ) FROM tab1 AS cor0
----
-13515
-2065
-6434

skipif mysql # not compatible
query I rowsort label-2289
SELECT ALL - 91 + col0 * - CAST ( - col1 * - col1 AS INTEGER ) + - ( - col2 ) FROM tab1 AS cor0
----
-13515
-2065
-6434

query I rowsort
SELECT ALL - col0 + + col0 * - col2 AS col0 FROM tab1
----
-165
-3712
-7760

query I rowsort
SELECT col1 * + 5 AS col0 FROM tab2
----
155
295
85

query I rowsort
SELECT col0 * col0 * tab2.col1 FROM tab2
----
106097
1519
358956

query I rowsort
SELECT 4 * - 53 AS col0 FROM tab2
----
-212
-212
-212

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + col2 ) + + col0 col1 FROM tab2
----
104
117
34

query I rowsort
SELECT + col1 * + 18 FROM tab0 AS cor0
----
1548
1638
1746

query I rowsort
SELECT DISTINCT - - col2 + col1 + col0 FROM tab2 AS cor0
----
134
163
65

query I rowsort
SELECT DISTINCT col0 * col1 + col0 FROM tab0 AS cor0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-2298
SELECT ALL - - ( - 8 ) DIV cor0.col0 + - col1 DIV - col0 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-2298
SELECT ALL - - ( - 8 ) / cor0.col0 + - col1 / - col0 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT ALL - col2 + 11 * + col1 AS col0 FROM tab0 cor0
----
1066
913
919

query I rowsort
SELECT - + 36 * cor0.col2 + - col2 + + 38 * cor0.col0 * col2 FROM tab2 AS cor0
----
112670
6183
76102

query I rowsort
SELECT 92 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to c64cb7a81da51f4be0b6906a223e8817

query I rowsort
SELECT DISTINCT + col2 * + col1 - + col1 AS col0 FROM tab0
----
0
2752
7371

query I rowsort
SELECT col0 + + col2 + - col1 AS col1 FROM tab2
----
100
3
45

query I rowsort
SELECT ALL + col2 * col0 + + cor0.col1 - + ( col1 ) AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT 2 * + col2 FROM tab2 AS cor0
----
52
54
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * 29 col1 FROM tab2 AS cor0
----
203
2262
2291

query I rowsort
SELECT DISTINCT - col0 + - 70 FROM tab1 AS cor0
----
-134
-150
-73

query I rowsort
SELECT DISTINCT + col0 * - col2 + - col1 FROM tab2 AS cor0
----
-2087
-220
-3019

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2309
SELECT + + col2 * - CAST( 49 AS SIGNED ) - col0 AS col2 FROM tab2 AS cor0
----
-1330
-1352
-1941

skipif mysql # not compatible
query I rowsort label-2309
SELECT + + col2 * - CAST ( 49 AS INTEGER ) - col0 AS col2 FROM tab2 AS cor0
----
-1330
-1352
-1941

query I rowsort
SELECT ALL - col1 * ( 18 ) + cor0.col2 FROM tab1 AS cor0
----
-123
-138
-414

query I rowsort
SELECT DISTINCT col2 * + col2 + + col2 + - col1 AS col2 FROM tab1 AS cor0
----
2944
3296
9299

onlyif mysql # use DIV operator for integer division
query I rowsort label-2312
SELECT ALL + col0 DIV col2 col2 FROM tab0 cor0
----
0
1
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2312
SELECT ALL + col0 / col2 col2 FROM tab0 cor0
----
0
1
35

query I rowsort
SELECT DISTINCT - + cor0.col2 * - col0 AS col0 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-2314
SELECT ALL col2 * + ( col1 ) + col1 * cor0.col2 DIV + 86 + + col1 FROM tab1 AS cor0
----
1275
1446
586

skipif mysql # not compatible
query I rowsort label-2314
SELECT ALL col2 * + ( col1 ) + col1 * cor0.col2 / + 86 + + col1 FROM tab1 AS cor0
----
1275
1446
586

query I rowsort
SELECT DISTINCT col0 * cor0.col0 - ( - col0 ) FROM tab2 cor0
----
56
6162
6320

query I rowsort
SELECT ALL - col2 + col1 * col2 AS col0 FROM tab2 cor0
----
1508
608
810

query I rowsort
SELECT DISTINCT + - col0 - col1 AS col0 FROM tab0 AS cor0
----
-110
-132
-180

onlyif mysql # use DIV operator for integer division
query I rowsort label-2318
SELECT ALL - col0 DIV - col0 + - 87 * col0 * col2 - + col0 * col2 FROM tab2 cor0
----
-16631
-178463
-264175

skipif mysql # not compatible
query I rowsort label-2318
SELECT ALL - col0 / - col0 + - 87 * col0 * col2 - + col0 * col2 FROM tab2 cor0
----
-16631
-178463
-264175

query I rowsort
SELECT DISTINCT 29 - col2 * - 94 AS col0 FROM tab0
----
123
3131
7737

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

onlyif mysql # use DIV operator for integer division
query I rowsort label-2321
SELECT DISTINCT + tab0.col0 * col1 - col0 DIV col2 col0 FROM tab0
----
2064
3360
8098

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2321
SELECT DISTINCT + tab0.col0 * col1 - col0 / col2 col0 FROM tab0
----
2064
3360
8098

query I rowsort
SELECT col0 * 99 + + 97 AS col0 FROM tab0 AS cor0
----
2473
3562
8908

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + 71 * + 17 col0 FROM tab2 AS cor0
----
1233
1234
1245

query I rowsort
SELECT DISTINCT + col2 * 76 + - col1 * col2 * 86 AS col2 FROM tab1 cor0
----
-100032
-116640
-44688

onlyif mysql # use DIV operator for integer division
query I rowsort label-2325
SELECT - col2 + + 25 DIV - 77 AS col1 FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-2325
SELECT - col2 + + 25 / - 77 AS col1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT + col1 * + 9 + - 9 AS col2 FROM tab2 AS cor0
----
144
270
522

query I rowsort
SELECT ALL + + col2 + 48 AS col2 FROM tab0 AS cor0
----
130
49
81

query I rowsort
SELECT ALL cor0.col1 + col2 * + ( cor0.col0 ) FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT DISTINCT - col2 - 55 AS col0 FROM tab0 AS cor0
----
-137
-56
-88

query I rowsort
SELECT DISTINCT - col0 + + ( tab0.col2 ) AS col0 FROM tab0
----
-34
-7
9

query I rowsort
SELECT + cor0.col0 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT - col1 * col0 * - col1 FROM tab1
----
13520
2028
6400

query I rowsort
SELECT DISTINCT + 90 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-2334
SELECT DISTINCT + col2 * col1 DIV col1 - + cor0.col0 AS col0 FROM tab1 AS cor0
----
-7
16
51

skipif mysql # not compatible
query I rowsort label-2334
SELECT DISTINCT + col2 * col1 / col1 - + cor0.col0 AS col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT - ( 2 ) * col0 + - col1 AS col2 FROM tab1 cor0
----
-138
-173
-32

query I rowsort
SELECT + cor0.col2 * col2 + col0 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT ( 14 ) FROM tab1 AS cor0
----
14
14
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + + 17 col0 FROM tab0
----
106
41
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-2339
SELECT ALL - col2 + + col1 DIV ( col1 ) AS col1 FROM tab1
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-2339
SELECT ALL - col2 + + col1 / ( col1 ) AS col1 FROM tab1
----
-53
-56
-95

query I rowsort
SELECT + col0 * 64 FROM tab0
----
1536
2240
5696

query I rowsort
SELECT ALL + col1 + + 26 AS col0 FROM tab1
----
36
39
52

query I rowsort
SELECT ALL col1 + - 9 FROM tab2
----
22
50
8

query I rowsort
SELECT ALL + + 59 + + col2 * 82 * + col1 AS col2 FROM tab2 AS cor0
----
125847
53031
68693

onlyif mysql # use DIV operator for integer division
query I rowsort label-2344
SELECT - + col0 + - col0 DIV 60 FROM tab0 AS cor0
----
-24
-35
-90

skipif mysql # not compatible
query I rowsort label-2344
SELECT - + col0 + - col0 / 60 FROM tab0 AS cor0
----
-24
-35
-90

query I rowsort
SELECT DISTINCT - + 10 AS col2 FROM tab2 AS cor0
----
-10

onlyif mysql # use DIV operator for integer division
query I rowsort label-2346
SELECT + cor0.col0 + col1 DIV cor0.col0 FROM tab1 cor0
----
11
64
80

skipif mysql # not compatible
query I rowsort label-2346
SELECT + cor0.col0 + col1 / cor0.col0 FROM tab1 cor0
----
11
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + + col2 col0 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL - + col0 + + col0 * col0 FROM tab1 AS cor0
----
4032
6
6320

query I rowsort
SELECT DISTINCT - + col1 * col2 + + col1 + col0 FROM tab1 AS cor0
----
-1155
-1375
-496

query I rowsort
SELECT + tab2.col2 - - 3 AS col2 FROM tab2
----
29
30
41

onlyif mysql # use DIV operator for integer division
query I rowsort label-2351
SELECT - col0 DIV col1 + col1 AS col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-2351
SELECT - col0 / col1 + col1 AS col1 FROM tab0
----
86
91
97

query I rowsort
SELECT DISTINCT - 77 AS col2 FROM tab2, tab0 AS cor0
----
-77

query I rowsort
SELECT - - ( col2 ) + 0 * col0 + col1 * - ( + col0 ) FROM tab2 AS cor0
----
-1305
-190
-4576

onlyif mysql # use DIV operator for integer division
query I rowsort label-2354
SELECT ALL - 34 + tab0.col1 + col2 DIV - col1 FROM tab0
----
52
57
63

skipif mysql # not compatible
query I rowsort label-2354
SELECT ALL - 34 + tab0.col1 + col2 / - col1 FROM tab0
----
52
57
63

query I rowsort
SELECT DISTINCT col0 * col1 + + col0 + tab1.col0 FROM tab1
----
1200
768
84

query I rowsort
SELECT + + 95 * 65 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 80c7f370a7f482698d9b20493be09727

query I rowsort
SELECT + col2 * - ( - col0 + - col0 ) AS col0 FROM tab1 AS cor0
----
15360
324
7296

query I rowsort
SELECT + 38 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

onlyif mysql # use DIV operator for integer division
query I rowsort label-2359
SELECT ALL - + ( cor0.col2 ) DIV - col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2359
SELECT ALL - + ( cor0.col2 ) / - col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + 22 + + col0 * - 28 AS col1 FROM tab0 cor0
----
-1002
-2514
-694

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2361
SELECT + CAST( NULL AS SIGNED ) + + 37 AS col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-2361
SELECT + CAST ( NULL AS INTEGER ) + + 37 AS col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT + 89 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT DISTINCT - col0 * col2 + - 98 AS col0 FROM tab0 AS cor0
----
-133
-7396
-890

query I rowsort
SELECT + col1 * col0 + 95 - - col1 FROM tab2 cor0
----
1455
343
4756

query I rowsort
SELECT col2 * col2 - col2 * + col2 * col1 AS col2 FROM tab0 AS cor0
----
-605160
-92565
-96

query I rowsort
SELECT + 17 * - col2 + + 75 AS col2 FROM tab0
----
-1319
-486
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 - + col2 col0 FROM tab0
----
53
9
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2368
SELECT + 61 DIV col2 + + cor0.col0 AS col1 FROM tab0 AS cor0
----
25
89
96

skipif mysql # not compatible
query I rowsort label-2368
SELECT + 61 / col2 + + cor0.col0 AS col1 FROM tab0 AS cor0
----
25
89
96

query I rowsort
SELECT - 30 + col0 * col1 AS col0 FROM tab2 cor0
----
1313
187
4572

query I rowsort
SELECT ALL - col0 + col2 + + col1 AS col2 FROM tab2 AS cor0
----
-24
51
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 - + cor0.col0 * - col0 col1 FROM tab2 AS cor0
----
6110
6279
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-2372
SELECT + - cor0.col1 * - col1 DIV col1 + - 76 DIV - col0 FROM tab2 AS cor0
----
17
41
59

skipif mysql # not compatible
query I rowsort label-2372
SELECT + - cor0.col1 * - col1 / col1 + - 76 / - col0 FROM tab2 AS cor0
----
17
41
59

query I rowsort
SELECT + ( + col0 ) + + 50 - col0 AS col2 FROM tab2 cor0
----
50
50
50

query I rowsort
SELECT + cor0.col0 * col2 + 40 FROM tab2 AS cor0
----
2068
229
3042

query I rowsort
SELECT DISTINCT + + col0 + ( + col2 ) AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - + cor0.col1 * col1 * col2 FROM tab2 AS cor0
----
-10982
-25947
-90506

query I rowsort
SELECT DISTINCT cor0.col0 * 12 + col0 FROM tab2 AS cor0
----
1014
1027
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * ( 23 ) col0 FROM tab0 AS cor0
----
2047
552
805

query I rowsort
SELECT ALL col1 - - col0 AS col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT + - col0 * 52 AS col1 FROM tab1 AS cor0
----
-156
-3328
-4160

query I rowsort
SELECT DISTINCT cor1.col2 FROM tab1, tab1 AS cor0, tab0 cor1
----
1
33
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2382
SELECT - + CAST( + col1 AS SIGNED ) * col2 * 55 AS col2 FROM tab2 AS cor0
----
-35530
-46035
-84370

skipif mysql # not compatible
query I rowsort label-2382
SELECT - + CAST ( + col1 AS INTEGER ) * col2 * 55 AS col2 FROM tab2 AS cor0
----
-35530
-46035
-84370

query I rowsort
SELECT DISTINCT + 58 AS col1 FROM tab2, tab2 AS cor0
----
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-2384
SELECT - col2 DIV - 13 AS col2 FROM tab2 AS cor0
----
2
2
2

skipif mysql # not compatible
query I rowsort label-2384
SELECT - col2 / - 13 AS col2 FROM tab2 AS cor0
----
2
2
2

query I rowsort
SELECT + + col1 + + 67 AS col1 FROM tab1 AS cor0
----
77
80
93

query I rowsort
SELECT + col1 + + col2 * - col1 AS col1 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT ALL + cor0.col1 + ( - col1 ) * col1 FROM tab0 cor0
----
-7310
-8190
-9312

query I rowsort
SELECT 81 * - col1 AS col2 FROM tab1 cor0
----
-1053
-2106
-810

query I rowsort
SELECT DISTINCT - cor0.col2 AS col2 FROM tab0, tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT ( ( - col1 ) ) * col0 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL - ( 50 ) FROM tab0 AS cor0
----
-50
-50
-50

query I rowsort
SELECT + - 20 * col0 AS col2 FROM tab1 AS cor0
----
-1280
-1600
-60

query I rowsort
SELECT ALL - - 39 * cor0.col0 FROM tab1 AS cor0
----
117
2496
3120

onlyif mysql # use DIV operator for integer division
query I rowsort label-2394
SELECT DISTINCT + ( ( cor0.col1 ) ) DIV - col2 AS col0 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-2394
SELECT DISTINCT + ( ( cor0.col1 ) ) / - col2 AS col0 FROM tab1 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 53 col2 FROM tab1 AS cor0
----
-53
-53
-53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2396
SELECT - CAST( - 67 AS SIGNED ) * - cor0.col1 AS col1 FROM tab0 AS cor0
----
-5762
-6097
-6499

skipif mysql # not compatible
query I rowsort label-2396
SELECT - CAST ( - 67 AS INTEGER ) * - cor0.col1 AS col1 FROM tab0 AS cor0
----
-5762
-6097
-6499

query I rowsort
SELECT ALL ( - 36 ) * cor0.col2 FROM tab0 cor0
----
-1188
-2952
-36

query I rowsort
SELECT ( + 51 ) * - cor0.col2 FROM tab0 AS cor0
----
-1683
-4182
-51

query I rowsort
SELECT DISTINCT + + col1 * col2 * col1 FROM tab1 AS cor0
----
16224
36504
5700

query I rowsort
SELECT + col1 * - 99 * + cor0.col1 FROM tab0 AS cor0
----
-732204
-819819
-931491

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT DISTINCT - - col1 + - col2 * 32 FROM tab2 AS cor0
----
-1199
-773
-833

query I rowsort
SELECT - - col0 * + col1 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - col0 * cor0.col1 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT - ( 67 ) FROM tab1
----
-67
-67
-67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * 11 col1 FROM tab0 AS cor0
----
1001
1067
946

query I rowsort
SELECT ALL - - cor0.col0 + - col0 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2408
SELECT - col2 * 63 + col2 DIV col2 AS col0 FROM tab0 AS cor0
----
-2078
-5165
-62

skipif mysql # not compatible
query I rowsort label-2408
SELECT - col2 * 63 + col2 / col2 AS col0 FROM tab0 AS cor0
----
-2078
-5165
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-2409
SELECT col1 DIV - col0 + col0 AS col2 FROM tab2 AS cor0
----
3
78
79

skipif mysql # not compatible
query I rowsort label-2409
SELECT col1 / - col0 + col0 AS col2 FROM tab2 AS cor0
----
3
78
79

query I rowsort
SELECT + + col0 + 19 FROM tab0 AS cor0
----
108
43
54

query I rowsort
SELECT DISTINCT + col0 + - col2 AS col1 FROM tab1 AS cor0
----
-16
-51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-2412
SELECT ALL - tab0.col0 DIV tab0.col0 col1 FROM tab0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2412
SELECT ALL - tab0.col0 / tab0.col0 col1 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT + 81 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 0a85639e0dddbffdab2cb16b027cb360

onlyif mysql # use DIV operator for integer division
query I rowsort label-2414
SELECT DISTINCT + col1 DIV + col1 AS col2 FROM tab2
----
1

skipif mysql # not compatible
query I rowsort label-2414
SELECT DISTINCT + col1 / + col1 AS col2 FROM tab2
----
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2415
SELECT DISTINCT + col1 DIV ( 90 ) col1 FROM tab2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2415
SELECT DISTINCT + col1 / ( 90 ) col1 FROM tab2
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2416
SELECT + col1 * + CAST( col0 AS SIGNED ) FROM tab1
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-2416
SELECT + col1 * + CAST ( col0 AS INTEGER ) FROM tab1
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-2417
SELECT - col1 DIV + 83 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2417
SELECT - col1 / + 83 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2418
SELECT 37 DIV 60 col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2418
SELECT 37 / 60 col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * col2 + col2 * + col0 col1 FROM tab1 AS cor0
----
15360
324
7296

onlyif mysql # use DIV operator for integer division
query I rowsort label-2420
SELECT DISTINCT - col2 DIV - col2 + ( + 42 ) * + col2 + - col1 AS col2 FROM tab1 AS cor0
----
2243
2385
4020

skipif mysql # not compatible
query I rowsort label-2420
SELECT DISTINCT - col2 / - col2 + ( + 42 ) * + col2 + - col1 AS col2 FROM tab1 AS cor0
----
2243
2385
4020

onlyif mysql # use DIV operator for integer division
query I rowsort label-2421
SELECT col0 * - col0 DIV - col0 + cor0.col1 FROM tab1 cor0
----
29
74
93

skipif mysql # not compatible
query I rowsort label-2421
SELECT col0 * - col0 / - col0 + cor0.col1 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT ALL - - ( cor0.col0 ) + + 10 FROM tab0 AS cor0
----
34
45
99

query I rowsort
SELECT + col0 * tab2.col2 * col2 - 68 AS col2 FROM tab2
----
114008
5035
52660

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 47 col2 FROM tab2
----
-47
-47
-47

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2425
SELECT DISTINCT - CAST( NULL AS SIGNED ) + col2 * tab0.col2 * tab0.col0 - + col1 AS col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-2425
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + col2 * tab0.col2 * tab0.col0 - + col1 AS col0 FROM tab0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2426
SELECT DISTINCT - CAST( NULL AS DECIMAL ) AS col2 FROM tab0, tab2 cor0 CROSS JOIN tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-2426
SELECT DISTINCT - CAST ( NULL AS REAL ) AS col2 FROM tab0, tab2 cor0 CROSS JOIN tab1
----
NULL

query I rowsort
SELECT DISTINCT + 86 AS col1 FROM tab2, tab2 AS cor0
----
86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2428
SELECT ALL col2 * - col2 * - CAST( NULL AS DECIMAL ) + 53 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2428
SELECT ALL col2 * - col2 * - CAST ( NULL AS REAL ) + 53 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 98 FROM tab1, tab0, tab0 AS cor0
----
-98

query I rowsort
SELECT - 68 + + tab0.col1 FROM tab0
----
18
23
29

query I rowsort
SELECT tab1.col0 + + col0 * - col0 + - col0 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT ALL 58 + - col2 FROM tab0
----
-24
25
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-2433
SELECT 84 DIV col0 AS col0 FROM tab2 cor0
----
1
1
12

skipif mysql # not compatible
query I rowsort label-2433
SELECT 84 / col0 AS col0 FROM tab2 cor0
----
1
1
12

query I rowsort
SELECT ALL + + 1 + + col1 FROM tab0 AS cor0
----
87
92
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2435
SELECT ALL + tab1.col0 * col1 + + CAST( NULL AS SIGNED ) + tab1.col1 AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2435
SELECT ALL + tab1.col0 * col1 + + CAST ( NULL AS INTEGER ) + tab1.col1 AS col2 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2436
SELECT ALL - 27 + col0 DIV CAST( 87 + col2 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-27
-27
-27

skipif mysql # not compatible
query I rowsort label-2436
SELECT ALL - 27 + col0 / CAST ( 87 + col2 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-27
-27
-27

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2, tab0 cor0, tab0 AS cor1
----
972 values hashing to 09b120a8ff13ebafea7af10c2152241b

query I rowsort
SELECT DISTINCT - col2 * - cor0.col2 + col2 + col2 * col1 AS col2 FROM tab1 AS cor0
----
10560
3876
4374

query I rowsort
SELECT + col1 * + col1 + 7 FROM tab2
----
296
3488
968

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab2, tab1, tab0 cor0
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT - col2 - col0 * 70 * col2 FROM tab1
----
-11394
-255417
-537696

query I rowsort
SELECT col0 * - col2 + + 69 FROM tab2
----
-120
-1959
-2933

onlyif mysql # use DIV operator for integer division
query I rowsort label-2443
SELECT cor0.col0 DIV ( - cor0.col0 ) FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2443
SELECT cor0.col0 / ( - cor0.col0 ) FROM tab1 AS cor0
----
-1
-1
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2444
SELECT - + CAST( + ( col2 ) AS SIGNED ) * col1 + - col2 * col0 AS col2 FROM tab2 cor0
----
-1026
-3562
-3648

skipif mysql # not compatible
query I rowsort label-2444
SELECT - + CAST ( + ( col2 ) AS INTEGER ) * col1 + - col2 * col0 AS col2 FROM tab2 cor0
----
-1026
-3562
-3648

query I rowsort
SELECT + + col1 * - 34 AS col1 FROM tab2 AS cor0
----
-1054
-2006
-578

query I rowsort
SELECT DISTINCT + 39 AS col1 FROM tab2 AS cor0
----
39

query I rowsort
SELECT DISTINCT 15 AS col0 FROM tab0, tab2 AS cor0
----
15

query I rowsort
SELECT ALL 85 * col0 FROM tab2 AS cor0
----
595
6630
6715

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( col1 AS REAL ) * + col0 + - col2 + + 50 AS col2 FROM tab2 AS cor0
----
1355
240
4626

query I rowsort
SELECT col2 + + 5 FROM tab2 AS cor0
----
31
32
43

query I rowsort
SELECT DISTINCT - + ( col2 ) + + col2 AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL col0 + + ( col2 ) FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL - col1 * + col0 AS col2 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + 69 * + col0 FROM tab2 AS cor0
----
483
5382
5451

query I rowsort
SELECT DISTINCT - 34 * + col0 AS col2 FROM tab2 AS cor0
----
-238
-2652
-2686

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2456
SELECT + CAST( NULL AS DECIMAL ) * ( - col0 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2456
SELECT + CAST ( NULL AS REAL ) * ( - col0 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 + + col2 * + col0 * ( 87 ) FROM tab2 AS cor0
----
16450
176514
261253

query I rowsort
SELECT - 3 FROM tab1, tab2 AS cor0
----
9 values hashing to 95b6b9b4aae5cc2d9545db9f8940b2dc

query I rowsort
SELECT ALL - 45 FROM tab2, tab0 AS cor0
----
9 values hashing to 71160abf09589695379a70558726f0ba

query I rowsort
SELECT ALL + - col1 + cor0.col2 FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT ALL col2 + + col0 + + col1 FROM tab1 AS cor0
----
131
189
83

query I rowsort
SELECT DISTINCT - - col2 + - 88 * col2 + + col1 AS col1 FROM tab1 AS cor0
----
-4672
-4949
-8339

query I rowsort
SELECT ALL col1 - - col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT col2 * col0 + + col2 FROM tab1 AS cor0
----
216
3705
7776

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 7 col2 FROM tab1 AS cor0
----
7
7
7

query I rowsort
SELECT ALL + 50 + col1 FROM tab1 AS cor0
----
60
63
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-2467
SELECT ALL + - 80 + - cor0.col2 DIV col0 AS col0 FROM tab1 cor0
----
-80
-81
-98

skipif mysql # not compatible
query I rowsort label-2467
SELECT ALL + - 80 + - cor0.col2 / col0 AS col0 FROM tab1 cor0
----
-80
-81
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-2468
SELECT DISTINCT + col1 + - col1 DIV - col0 FROM tab2 cor0
----
17
35
59

skipif mysql # not compatible
query I rowsort label-2468
SELECT DISTINCT + col1 + - col1 / - col0 FROM tab2 cor0
----
17
35
59

query I rowsort
SELECT ALL col0 + + col0 * col0 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT - 48 + - col2 AS col0 FROM tab1 AS cor0
----
-102
-105
-144

query I rowsort
SELECT 0 + - 79 * col0 * tab1.col2 FROM tab1
----
-12798
-288192
-606720

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2472
SELECT - CAST( col0 AS SIGNED ) + col2 AS col0 FROM tab2
----
-41
-52
20

skipif mysql # not compatible
query I rowsort label-2472
SELECT - CAST ( col0 AS INTEGER ) + col2 AS col0 FROM tab2
----
-41
-52
20

query I rowsort
SELECT - 67 + - col0 AS col1 FROM tab2 AS cor0
----
-145
-146
-74

query I rowsort
SELECT DISTINCT col0 * 83 - col1 FROM tab2 AS cor0
----
550
6415
6540

onlyif mysql # use DIV operator for integer division
query I rowsort label-2475
SELECT DISTINCT + - col0 - - col1 DIV + 45 FROM tab0 AS cor0
----
-23
-33
-87

skipif mysql # not compatible
query I rowsort label-2475
SELECT DISTINCT + - col0 - - col1 / + 45 FROM tab0 AS cor0
----
-23
-33
-87

onlyif mysql # use DIV operator for integer division
query I rowsort label-2476
SELECT + + col0 + + cor0.col2 DIV ( col1 ) FROM tab1 AS cor0
----
5
69
87

skipif mysql # not compatible
query I rowsort label-2476
SELECT + + col0 + + cor0.col2 / ( col1 ) FROM tab1 AS cor0
----
5
69
87

onlyif mysql # use DIV operator for integer division
query I rowsort label-2477
SELECT ALL cor0.col2 + - ( - col2 + col1 ) DIV - col1 FROM tab1 AS cor0
----
53
53
90

skipif mysql # not compatible
query I rowsort label-2477
SELECT ALL cor0.col2 + - ( - col2 + col1 ) / - col1 FROM tab1 AS cor0
----
53
53
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-2478
SELECT DISTINCT - col0 DIV ( + 43 ) - + col1 * - cor0.col2 * + col2 FROM tab2 AS cor0
----
22599
24547
39883

skipif mysql # not compatible
query I rowsort label-2478
SELECT DISTINCT - col0 / ( + 43 ) - + col1 * - cor0.col2 * + col2 FROM tab2 AS cor0
----
22599
24547
39883

query I rowsort
SELECT ALL + col1 + ( col0 ) * - col2 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT + col0 + + ( + col0 + + col0 ) * + col1 AS col1 FROM tab1 AS cor0
----
1344
159
2160

query I rowsort
SELECT + col1 + - col0 * + 71 AS col1 FROM tab2
----
-466
-5479
-5592

query I rowsort
SELECT ALL + col2 * + 43 + + col1 FROM tab1 AS cor0
----
2348
2461
4141

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2483
SELECT ALL col1 * - CAST( cor0.col2 * - col2 AS SIGNED ) FROM tab2 AS cor0
----
22599
24548
39884

skipif mysql # not compatible
query I rowsort label-2483
SELECT ALL col1 * - CAST ( cor0.col2 * - col2 AS INTEGER ) FROM tab2 AS cor0
----
22599
24548
39884

query I rowsort
SELECT DISTINCT - + col0 + + cor0.col1 * + col2 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT col2 * + col0 * + col0 + cor0.col1 FROM tab2 cor0
----
1354
158243
237175

query I rowsort
SELECT col2 * 18 * + cor0.col0 FROM tab0 AS cor0
----
131364
14256
630

query I rowsort
SELECT ALL col2 * - 1 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT - col2 + + 32 AS col1 FROM tab2 AS cor0
----
-6
5
6

query I rowsort
SELECT + + col2 + col1 * col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT + 3 + 23 FROM tab0 AS cor0
----
26
26
26

query I rowsort
SELECT + 85 * + col2 + col0 FROM tab1 AS cor0
----
4593
4909
8240

query I rowsort
SELECT - - ( cor0.col0 ) * col0 * - cor0.col0 AS col2 FROM tab1 AS cor0
----
-262144
-27
-512000

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2493
SELECT CAST( NULL AS SIGNED ) + + col1 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2493
SELECT CAST ( NULL AS INTEGER ) + + col1 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab0, tab0 cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

skipif mysql # not compatible
query I rowsort
SELECT ALL - ( + col2 ) * CAST ( + col1 + col1 AS REAL ) AS col1 FROM tab2
----
-1292
-1674
-3068

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2, tab1 cor0, tab0 AS cor1
----
972 values hashing to 67c5300bc5cba0be4f54a444dc6f05b9

query I rowsort
SELECT DISTINCT col0 * - 74 FROM tab1
----
-222
-4736
-5920

query I rowsort
SELECT col0 * + 72 AS col2 FROM tab0 AS cor0
----
1728
2520
6408

query I rowsort
SELECT DISTINCT + - col1 - col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT + + cor0.col2 + col2 * - col1 AS col2 FROM tab1 cor0
----
-1152
-1350
-513

query I rowsort
SELECT ALL 23 - 13 AS col2 FROM tab1 AS cor0
----
10
10
10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 90 * + col2 + - col2 * col0 col0 FROM tab0 AS cor0
----
-125
-14678
-3762

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2503
SELECT DISTINCT col0 * + col2 + + col1 + CAST( NULL AS SIGNED ) * + cor0.col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2503
SELECT DISTINCT col0 * + col2 + + col1 + CAST ( NULL AS INTEGER ) * + cor0.col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - col0 + 59 * col1 + + col1 FROM tab2 cor0
----
1853
3462
941

query I rowsort
SELECT DISTINCT + ( col1 ) - col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT - - 8 FROM tab1 cor0
----
8
8
8

query I rowsort
SELECT + - 37 * col0 * - col2 + 51 FROM tab0 AS cor0
----
1346
270077
29355

query I rowsort
SELECT + + 19 AS col1 FROM tab1 AS cor0
----
19
19
19

query I rowsort
SELECT col1 * + col0 AS col2 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT 22 + + 95 AS col2 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to f1f4efb6dceca1c325983962bcf259d3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2511
SELECT - 29 + + col2 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2511
SELECT - 29 + + col2 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 58 col0 FROM tab1, tab1 AS cor0
----
58

query I rowsort
SELECT 97 + cor0.col2 FROM tab0 AS cor0
----
130
179
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-2514
SELECT + col2 * + cor0.col0 + - cor0.col1 DIV cor0.col1 FROM tab1 AS cor0
----
161
3647
7679

skipif mysql # not compatible
query I rowsort label-2514
SELECT + col2 * + cor0.col0 + - cor0.col1 / cor0.col1 FROM tab1 AS cor0
----
161
3647
7679

onlyif mysql # use DIV operator for integer division
query I rowsort label-2515
SELECT ALL - col2 + col0 DIV + col0 AS col1 FROM tab1 AS cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-2515
SELECT ALL - col2 + col0 / + col0 AS col1 FROM tab1 AS cor0
----
-53
-56
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + col0 ) * + ( cor0.col2 ) col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT cor0.col2 * cor0.col1 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT - + 40 + - col1 AS col2 FROM tab2 AS cor0
----
-57
-71
-99

onlyif mysql # use DIV operator for integer division
query I rowsort label-2519
SELECT - col1 DIV - 52 + - col1 DIV col1 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2519
SELECT - col1 / - 52 + - col1 / col1 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - cor0.col0 + - ( - col1 * + col0 ) FROM tab2 AS cor0
----
1264
210
4524

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col0 + col2 col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT + col1 + 14 * col2 AS col1 FROM tab2 AS cor0
----
409
423
549

query I rowsort
SELECT - cor1.col1 FROM tab1, tab0 AS cor0, tab0 cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT + 37 AS col0 FROM tab0
----
37
37
37

query I rowsort
SELECT + col1 * 59 * + col1 FROM tab2 AS cor0
----
17051
205379
56699

query I rowsort
SELECT + 50 + - col2 * + col1 AS col2 FROM tab1
----
-1198
-1354
-520

query I rowsort
SELECT DISTINCT tab1.col1 * col2 * - col0 AS col1 FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT col0 + + ( col0 ) * col0 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT ALL - - ( cor0.col2 ) * col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT + col0 * - 21 * - col1 FROM tab0
----
170079
43344
71295

query I rowsort
SELECT col2 * - tab2.col0 * + col0 AS col0 FROM tab2
----
-1323
-158184
-237158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( - col2 ) + + col1 col0 FROM tab2 cor0
----
-21
33
4

query I rowsort
SELECT + 67 + col0 * - 38 FROM tab1 AS cor0
----
-2365
-2973
-47

query I rowsort
SELECT cor0.col2 * - col2 + ( col2 ) * cor0.col1 FROM tab0 AS cor0
----
1749
738
96

query I rowsort
SELECT - col0 * 37 + - col0 FROM tab0
----
-1330
-3382
-912

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + - 16 - - col1 col0 FROM tab0
----
156
166
178

query I rowsort
SELECT + 83 + + 7 - + col2 FROM tab1
----
-6
33
36

query I rowsort
SELECT ALL + col0 + + col0 * cor0.col1 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT DISTINCT + col1 + + col2 + + col0 AS col1 FROM tab2 AS cor0
----
134
163
65

query I rowsort
SELECT ALL + + col2 * + 27 * col0 FROM tab2 AS cor0
----
5103
54756
81054

query I rowsort
SELECT ALL + - col1 - + col0 AS col0 FROM tab2 cor0
----
-137
-38
-96

query I rowsort
SELECT - - 23 * 82 FROM tab1 AS cor0
----
1886
1886
1886

query I rowsort
SELECT DISTINCT - 72 + - 21 * + col1 FROM tab2 AS cor0
----
-1311
-429
-723

query I rowsort
SELECT + ( - col1 ) + - cor0.col1 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT ALL - 75 + 81 AS col2 FROM tab0 AS cor0
----
6
6
6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2546
SELECT - - CAST( col0 AS SIGNED ) FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-2546
SELECT - - CAST ( col0 AS INTEGER ) FROM tab2 AS cor0
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( + 51 ) col1 FROM tab2 AS cor0
----
-51

query I rowsort
SELECT ALL + + 81 * - 23 FROM tab2 AS cor0
----
-1863
-1863
-1863

query I rowsort
SELECT DISTINCT - + ( col1 ) + col0 * col1 AS col1 FROM tab0 AS cor0
----
1978
3298
8008

query I rowsort
SELECT ALL - ( 66 ) - cor0.col2 * ( + col2 + + cor0.col2 ) FROM tab2 cor0
----
-1418
-1524
-2954

query I rowsort
SELECT DISTINCT + ( col2 ) * - col2 + col2 AS col1 FROM tab1 AS cor0
----
-2862
-3192
-9120

query I rowsort
SELECT DISTINCT - 44 * + col1 + col1 + col1 AS col1 FROM tab0 AS cor0
----
-3612
-3822
-4074

query I rowsort
SELECT DISTINCT col0 * - col0 - ( + 38 ) AS col0 FROM tab2 cor0
----
-6122
-6279
-87

query I rowsort
SELECT DISTINCT - col1 + col2 * + col1 FROM tab1 cor0
----
1235
1378
560

query I rowsort
SELECT + col2 * - col2 - col2 AS col0 FROM tab2 AS cor0
----
-1482
-702
-756

query I rowsort
SELECT DISTINCT col0 + col2 - 66 FROM tab1 AS cor0
----
-9
110
55

query I rowsort
SELECT - 83 + ( col0 ) FROM tab2
----
-4
-5
-76

query I rowsort
SELECT DISTINCT + col1 - 4 AS col1 FROM tab1 AS cor0
----
22
6
9

query I rowsort
SELECT ALL col0 * ( col1 ) + + col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT ALL + col0 + - col2 * + 97 AS col0 FROM tab1 AS cor0
----
-5235
-5465
-9232

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2561
SELECT DISTINCT col0 * CAST( - 26 AS SIGNED ) FROM tab2 AS cor0
----
-182
-2028
-2054

skipif mysql # not compatible
query I rowsort label-2561
SELECT DISTINCT col0 * CAST ( - 26 AS INTEGER ) FROM tab2 AS cor0
----
-182
-2028
-2054

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2562
SELECT ALL + + col1 * CAST( NULL AS SIGNED ) col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2562
SELECT ALL + + col1 * CAST ( NULL AS INTEGER ) col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2563
SELECT DISTINCT + col2 * CAST( NULL AS DECIMAL ) AS col1 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2563
SELECT DISTINCT + col2 * CAST ( NULL AS REAL ) AS col1 FROM tab0 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * - col0 col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT + tab1.col1 * col1 * + col0 + col0 * - tab1.col2 AS col0 FROM tab1
----
1866
2752
5840

onlyif mysql # use DIV operator for integer division
query I rowsort label-2566
SELECT ALL col1 DIV - 78 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2566
SELECT ALL col1 / - 78 FROM tab2
----
0
0
0

query I rowsort
SELECT col0 + col2 * + col0 AS col0 FROM tab0
----
70
7387
816

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2568
SELECT col1 * + CAST( + col0 AS SIGNED ) AS col2 FROM tab2
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-2568
SELECT col1 * + CAST ( + col0 AS INTEGER ) AS col2 FROM tab2
----
1343
217
4602

query I rowsort
SELECT 64 FROM tab0, tab1 AS cor0
----
9 values hashing to 60ab040e931c5c85db7ba19364eacc8e

query I rowsort
SELECT - 85 + col2 FROM tab2 AS cor0
----
-47
-58
-59

query I rowsort
SELECT col1 * col2 * - col1 + - col1 AS col1 FROM tab0 AS cor0
----
-244154
-679133
-9506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col1 ) * cor0.col0 + col2 + + ( col0 ) * col1 * col1 col1 FROM tab0 AS cor0
----
179601
332711
745190

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( col0 AS REAL ) AS col2 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2574
SELECT ALL col1 DIV tab1.col2 AS col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2574
SELECT ALL col1 / tab1.col2 AS col2 FROM tab1
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2575
SELECT - CAST( NULL AS SIGNED ) FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-2575
SELECT - CAST ( NULL AS INTEGER ) FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT cor0.col2 + cor0.col0 * - col1 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT DISTINCT ( + 90 ) + col2 * col0 * - 17 AS col1 FROM tab0 AS cor0
----
-123976
-13374
-505

query I rowsort
SELECT - 33 * + ( - col2 ) FROM tab1 AS cor0
----
1782
1881
3168

onlyif mysql # use DIV operator for integer division
query I rowsort label-2579
SELECT ALL tab2.col1 + + tab2.col2 DIV ( - 56 ) AS col1 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-2579
SELECT ALL tab2.col1 + + tab2.col2 / ( - 56 ) AS col1 FROM tab2
----
17
31
59

query I rowsort
SELECT ALL - col2 * + col2 + - tab2.col2 AS col1 FROM tab2
----
-1482
-702
-756

onlyif mysql # use DIV operator for integer division
query I rowsort label-2581
SELECT ALL - col1 * col0 + tab0.col1 * ( - col1 ) DIV tab0.col1 + col1 FROM tab0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort label-2581
SELECT ALL - col1 * col0 + tab0.col1 * ( - col1 ) / tab0.col1 + col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT - 30 + - col2 AS col0 FROM tab2
----
-56
-57
-68

query I rowsort
SELECT ALL 59 + tab2.col1 * col0 AS col0 FROM tab2
----
1402
276
4661

query I rowsort
SELECT ALL - 5 + + tab0.col1 AS col0 FROM tab0
----
81
86
92

query I rowsort
SELECT ALL + cor0.col2 * col1 + 21 AS col0 FROM tab0 AS cor0
----
118
2859
7483

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2586
SELECT ALL - col2 + cor0.col1 * - CAST( NULL AS SIGNED ) - col1 * + col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2586
SELECT ALL - col2 + cor0.col1 * - CAST ( NULL AS INTEGER ) - col1 * + col1 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 * 97 + - cor0.col0 FROM tab1 AS cor0
----
1181
2519
906

query I rowsort
SELECT - col0 * - 75 AS col2 FROM tab0 AS cor0
----
1800
2625
6675

query I rowsort
SELECT ALL - - cor0.col2 * ( + cor0.col2 ) FROM tab0 AS cor0
----
1
1089
6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 + ( - col0 ) col1 FROM tab0 cor0
----
2
62
62

query I rowsort
SELECT + - cor0.col2 + cor0.col0 FROM tab2 AS cor0
----
-20
41
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-2592
SELECT + col0 DIV + 59 + col0 FROM tab0 AS cor0
----
24
35
90

skipif mysql # not compatible
query I rowsort label-2592
SELECT + col0 / + 59 + col0 FROM tab0 AS cor0
----
24
35
90

query I rowsort
SELECT - col2 * col0 + + 29 FROM tab2 AS cor0
----
-160
-1999
-2973

query I rowsort
SELECT + cor0.col1 * + col2 + - col0 AS col0 FROM tab1 AS cor0
----
1168
1401
506

onlyif mysql # use DIV operator for integer division
query I rowsort label-2595
SELECT col1 + + 87 DIV + 4 AS col2 FROM tab0 AS cor0
----
107
112
118

skipif mysql # not compatible
query I rowsort label-2595
SELECT col1 + + 87 / + 4 AS col2 FROM tab0 AS cor0
----
107
112
118

query I rowsort
SELECT + col0 * - ( 65 ) * col2 + 10 * - 42 FROM tab0 AS cor0
----
-2695
-474790
-51900

query I rowsort
SELECT + + 42 * col1 FROM tab1 AS cor0
----
1092
420
546

onlyif mysql # use DIV operator for integer division
query I rowsort label-2598
SELECT - 69 DIV cor0.col0 AS col0 FROM tab2 cor0
----
-9
0
0

skipif mysql # not compatible
query I rowsort label-2598
SELECT - 69 / cor0.col0 AS col0 FROM tab2 cor0
----
-9
0
0

query I rowsort
SELECT - 54 * - col0 FROM tab2 AS cor0
----
378
4212
4266

query I rowsort
SELECT + cor0.col0 + + col2 * + cor0.col1 AS col1 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT - 8 AS col1 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 852581644118629bf652b1aa4b8f4363

query I rowsort
SELECT ALL col2 + + col0 * - col0 + 49 AS col0 FROM tab0
----
-1175
-494
-7790

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col1 + - col0 col1 FROM tab1
----
576
75
960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 + col0 col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT 11 * col2 + col1 FROM tab0 AS cor0
----
108
449
993

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 64 * - cor0.col1 col0 FROM tab2 AS cor0
----
1088
1984
3776

query I rowsort
SELECT - 55 * cor0.col1 * col2 + cor0.col2 * - col2 AS col0 FROM tab0 cor0
----
-157179
-417134
-5336

query I rowsort
SELECT DISTINCT - col0 * - col1 * + 31 AS col2 FROM tab2 AS cor0
----
142662
41633
6727

query I rowsort
SELECT DISTINCT - ( col2 * ( - 38 ) ) AS col1 FROM tab1
----
2052
2166
3648

query I rowsort
SELECT DISTINCT - + col2 * col1 * col2 - cor0.col1 * col1 AS col2 FROM tab1 AS cor0
----
-119977
-32590
-76492

query I rowsort
SELECT ALL + col1 + ( - 58 ) * col0 AS col2 FROM tab2 AS cor0
----
-375
-4465
-4565

onlyif mysql # use DIV operator for integer division
query I rowsort label-2612
SELECT DISTINCT + - col1 + + col0 + - col0 * col0 DIV + col0 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-2612
SELECT DISTINCT + - col1 + + col0 + - col0 * col0 / + col0 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT - col0 + + 8 * col2 FROM tab0 AS cor0
----
-27
240
567

query I rowsort
SELECT DISTINCT - 17 AS col0 FROM tab0
----
-17

query I rowsort
SELECT + - ( col1 ) AS col0 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT + 17 * col0 + + col1 FROM tab1 cor0
----
1098
1373
77

query I rowsort
SELECT - col0 + + cor0.col1 + col0 * ( + col2 ) FROM tab0 AS cor0
----
7300
854
97

query I rowsort
SELECT - - ( col0 ) * cor0.col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT ALL col2 * col1 + - col1 AS col0 FROM tab0
----
0
2752
7371

onlyif mysql # use DIV operator for integer division
query I rowsort label-2620
SELECT DISTINCT col1 DIV 88 col1 FROM tab1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2620
SELECT DISTINCT col1 / 88 col1 FROM tab1
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2621
SELECT - tab1.col0 DIV + col0 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2621
SELECT - tab1.col0 / + col0 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT ALL + col0 + ( + 97 ) AS col0 FROM tab1
----
100
161
177

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2623
SELECT ALL - tab2.col1 + CAST( NULL AS SIGNED ) AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2623
SELECT ALL - tab2.col1 + CAST ( NULL AS INTEGER ) AS col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 33 * - 30 AS col2 FROM tab1
----
990

query I rowsort
SELECT - 14 * - ( + cor0.col2 ) AS col0 FROM tab2 AS cor0
----
364
378
532

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2626
SELECT - CAST( col1 AS SIGNED ) + col2 - + 53 AS col0 FROM tab0 AS cor0
----
-106
-149
-62

skipif mysql # not compatible
query I rowsort label-2626
SELECT - CAST ( col1 AS INTEGER ) + col2 - + 53 AS col0 FROM tab0 AS cor0
----
-106
-149
-62

query I rowsort
SELECT col0 * 16 + + cor0.col2 + col1 * col2 AS col0 FROM tab0 AS cor0
----
3255
658
8968

query I rowsort
SELECT + col1 * col1 + + col2 - - col2 AS col1 FROM tab1 AS cor0
----
214
361
784

onlyif mysql # use DIV operator for integer division
query I rowsort label-2629
SELECT ALL + - 66 DIV col0 FROM tab0 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-2629
SELECT ALL + - 66 / col0 FROM tab0 AS cor0
----
-1
-2
0

query I rowsort
SELECT DISTINCT 32 * col0 + col2 + 85 * col1 FROM tab1 AS cor0
----
2360
2955
3761

query I rowsort
SELECT + ( + col2 ) + - col1 * ( col2 * 67 ) AS col0 FROM tab0 cor0
----
-190113
-499872
-6498

query I rowsort
SELECT DISTINCT - - 24 * + col1 + - 59 AS col0 FROM tab0 AS cor0
----
2005
2125
2269

onlyif mysql # use DIV operator for integer division
query I rowsort label-2633
SELECT cor0.col1 DIV + col2 + 97 * col2 * - col2 AS col2 FROM tab1 AS cor0
----
-282852
-315153
-893952

skipif mysql # not compatible
query I rowsort label-2633
SELECT cor0.col1 / + col2 + 97 * col2 * - col2 AS col2 FROM tab1 AS cor0
----
-282852
-315153
-893952

query I rowsort
SELECT - col1 * 91 FROM tab1
----
-1183
-2366
-910

query I rowsort
SELECT ALL - col2 + + tab1.col1 AS col1 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT - ( col2 ) + - ( col2 ) FROM tab0
----
-164
-2
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 32 * + col0 col0 FROM tab0 AS cor0
----
-1120
-2848
-768

onlyif mysql # use DIV operator for integer division
query I rowsort label-2638
SELECT DISTINCT - col1 + - cor0.col2 DIV col0 + + 37 * col1 col0 FROM tab0 AS cor0
----
3095
3276
3492

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2638
SELECT DISTINCT - col1 + - cor0.col2 / col0 + + 37 * col1 col0 FROM tab0 AS cor0
----
3095
3276
3492

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 36 * - cor0.col1 col2 FROM tab1 AS cor0
----
360
468
936

onlyif mysql # use DIV operator for integer division
query I rowsort label-2640
SELECT - cor0.col0 * col0 DIV + col2 col2 FROM tab0 AS cor0
----
-1225
-17
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2640
SELECT - cor0.col0 * col0 / + col2 col2 FROM tab0 AS cor0
----
-1225
-17
-96

query I rowsort
SELECT col2 * col2 - - 39 FROM tab1 AS cor0
----
2955
3288
9255

query I rowsort
SELECT - col0 * - col1 + 2 FROM tab1 AS cor0
----
1042
642
80

query I rowsort
SELECT ALL + - cor0.col1 * - col0 AS col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - + 63 * cor0.col2 * col1 AS col2 FROM tab2 AS cor0
----
-40698
-52731
-96642

query I rowsort
SELECT DISTINCT + cor1.col2 AS col0 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
54
57
96

query I rowsort
SELECT + + col1 + + 58 FROM tab1 cor0
----
68
71
84

query I rowsort
SELECT - col0 + + 42 FROM tab0 AS cor0
----
-47
18
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-2648
SELECT - 64 + cor0.col2 DIV - col2 AS col0 FROM tab1 AS cor0
----
-65
-65
-65

skipif mysql # not compatible
query I rowsort label-2648
SELECT - 64 + cor0.col2 / - col2 AS col0 FROM tab1 AS cor0
----
-65
-65
-65

onlyif mysql # use DIV operator for integer division
query I rowsort label-2649
SELECT DISTINCT + + 89 + - 23 DIV col0 AS col2 FROM tab0 AS cor0
----
89

skipif mysql # not compatible
query I rowsort label-2649
SELECT DISTINCT + + 89 + - 23 / col0 AS col2 FROM tab0 AS cor0
----
89

query I rowsort
SELECT ALL + 63 AS col1 FROM tab2, tab0 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to 29cdb8d01f1c3eb072511674b1c6d5fd

query I rowsort
SELECT + 2 * + 31 FROM tab0 AS cor0
----
62
62
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2652
SELECT CAST( NULL AS SIGNED ) * + cor0.col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2652
SELECT CAST ( NULL AS INTEGER ) * + cor0.col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * col1 col0 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT col1 + + col1 * + col1 * 54 FROM tab2 AS cor0
----
15623
188033
51925

query I rowsort
SELECT ALL + col1 * - cor0.col1 + - 71 AS col0 FROM tab1 AS cor0
----
-171
-240
-747

query I rowsort
SELECT DISTINCT - - 17 * col1 + col1 - + col2 AS col1 FROM tab2 AS cor0
----
1036
268
531

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2657
SELECT ALL + col1 + - col0 * CAST( + col2 AS SIGNED ) FROM tab2 cor0
----
-158
-1969
-2985

skipif mysql # not compatible
query I rowsort label-2657
SELECT ALL + col1 + - col0 * CAST ( + col2 AS INTEGER ) FROM tab2 cor0
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT - col0 * + col2 + - ( + col1 ) AS col0 FROM tab2 AS cor0
----
-2087
-220
-3019

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 81 col1 FROM tab2 cor0
----
81
81
81

query I rowsort
SELECT + - 54 * col2 + - ( + col2 ) AS col0 FROM tab1 AS cor0
----
-2970
-3135
-5280

query I rowsort
SELECT ALL - + cor0.col1 + - 47 AS col2 FROM tab2 AS cor0
----
-106
-64
-78

query I rowsort
SELECT + cor0.col1 * 66 AS col1 FROM tab2 AS cor0
----
1122
2046
3894

query I rowsort
SELECT DISTINCT - col0 * + col0 + - col0 FROM tab2 cor0
----
-56
-6162
-6320

query I rowsort
SELECT - - col0 + + 57 * + col1 AS col0 FROM tab1 cor0
----
1485
634
821

query I rowsort
SELECT + + cor0.col1 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT ALL - + 28 AS col0 FROM tab1 AS cor0
----
-28
-28
-28

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2667
SELECT ALL + CAST( + col0 AS SIGNED ) - - col2 AS col2 FROM tab1 AS cor0
----
121
176
57

skipif mysql # not compatible
query I rowsort label-2667
SELECT ALL + CAST ( + col0 AS INTEGER ) - - col2 AS col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0, tab2 AS cor0, tab0 cor1
----
17
31
59

query I rowsort
SELECT - col0 + 94 FROM tab0
----
5
59
70

query I rowsort
SELECT ALL - col0 + - 65 FROM tab2
----
-143
-144
-72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2671
SELECT + CAST( col0 AS SIGNED ) + - col1 AS col0 FROM tab1
----
-23
54
67

skipif mysql # not compatible
query I rowsort label-2671
SELECT + CAST ( col0 AS INTEGER ) + - col1 AS col0 FROM tab1
----
-23
54
67

query I rowsort
SELECT + 26 + - 41 * - col2 + + 73 * + col0 FROM tab0
----
2622
3131
9885

query I rowsort
SELECT ALL - col1 + 82 AS col1 FROM tab1
----
56
69
72

query I rowsort
SELECT DISTINCT + 43 AS col1 FROM tab2 cor0
----
43

query I rowsort
SELECT ALL + col1 * 2 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT col0 * col2 + col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT ALL + - 50 AS col1 FROM tab1 AS cor0
----
-50
-50
-50

onlyif mysql # use DIV operator for integer division
query I rowsort label-2678
SELECT + ( col1 ) DIV col1 + ( - 29 ) + - col0 FROM tab1 cor0
----
-108
-31
-92

skipif mysql # not compatible
query I rowsort label-2678
SELECT + ( col1 ) / col1 + ( - 29 ) + - col0 FROM tab1 cor0
----
-108
-31
-92

query I rowsort
SELECT DISTINCT + ( 58 ) + cor0.col0 FROM tab1 cor0
----
122
138
61

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2680
SELECT CAST( NULL AS SIGNED ) FROM tab0, tab0 AS cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-2680
SELECT CAST ( NULL AS INTEGER ) FROM tab0, tab0 AS cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2681
SELECT - + CAST( NULL AS SIGNED ) AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2681
SELECT - + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 18 * cor0.col0 AS col1 FROM tab1 AS cor0
----
1152
1440
54

query I rowsort
SELECT DISTINCT - 71 + col1 AS col2 FROM tab1 cor0
----
-45
-58
-61

query I rowsort
SELECT DISTINCT - col2 * + col1 - - 13 * + col1 * cor0.col2 AS col2 FROM tab2 AS cor0
----
10044
18408
7752

query I rowsort
SELECT DISTINCT col0 * col0 + + col2 AS col2 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT - - ( + col0 ) AS col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT 97 + - col2 AS col1 FROM tab0
----
15
64
96

query I rowsort
SELECT ALL ( - col2 ) + col1 FROM tab0
----
53
9
96

query I rowsort
SELECT ALL + 20 + - col1 FROM tab1
----
-6
10
7

query I rowsort
SELECT ALL 8 * col2 * col0 + col0 * col0 * + col2 AS col2 FROM tab1
----
1782
262656
675840

query I rowsort
SELECT col1 * + col2 + + 97 FROM tab1 AS cor0
----
1345
1501
667

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 65 col0 FROM tab1 AS cor0
----
65
65
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 33 + cor0.col1 col2 FROM tab1 AS cor0
----
43
46
59

query I rowsort
SELECT ALL - col2 * col1 AS col0 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT col2 + col1 * - 98 AS col1 FROM tab0 AS cor0
----
-8395
-8836
-9505

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2696
SELECT - ( + col1 ) + CAST( NULL AS SIGNED ) col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2696
SELECT - ( + col1 ) + CAST ( NULL AS INTEGER ) col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 * 54 + col2 AS col1 FROM tab1 AS cor0
----
216
3513
4416

query I rowsort
SELECT ALL col1 + - col0 + 76 * + col0 FROM tab1
----
251
4810
6013

query I rowsort
SELECT - 87 * + col1 FROM tab2
----
-1479
-2697
-5133

query I rowsort
SELECT + - col1 * 36 AS col0 FROM tab0 cor0
----
-3096
-3276
-3492

onlyif mysql # use DIV operator for integer division
query I rowsort label-2701
SELECT ALL - col1 DIV 30 AS col1 FROM tab2
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-2701
SELECT ALL - col1 / 30 AS col1 FROM tab2
----
-1
-1
0

query I rowsort
SELECT 19 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

query I rowsort
SELECT ALL + + cor0.col0 * col2 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ( 72 ) AS col2 FROM tab0 AS cor0
----
72
72
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-2705
SELECT ALL + 43 DIV col1 FROM tab1 AS cor0
----
1
3
4

skipif mysql # not compatible
query I rowsort label-2705
SELECT ALL + 43 / col1 FROM tab1 AS cor0
----
1
3
4

query I rowsort
SELECT DISTINCT - 12 AS col1 FROM tab2 AS cor0
----
-12

onlyif mysql # use DIV operator for integer division
query I rowsort label-2707
SELECT - 42 DIV - col2 AS col2 FROM tab0 AS cor0
----
0
1
42

skipif mysql # not compatible
query I rowsort label-2707
SELECT - 42 / - col2 AS col2 FROM tab0 AS cor0
----
0
1
42

query I rowsort
SELECT ALL - + ( 58 ) * - col1 FROM tab0 AS cor0
----
4988
5278
5626

onlyif mysql # use DIV operator for integer division
query I rowsort label-2709
SELECT ALL 36 DIV ( col1 * + 61 ) AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2709
SELECT ALL 36 / ( col1 * + 61 ) AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT 31 + 8 AS col0 FROM tab1 cor0
----
39
39
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 86 + + cor0.col0 col1 FROM tab0 AS cor0
----
-51
-62
3

query I rowsort
SELECT DISTINCT col0 * - 63 AS col1 FROM tab0 cor0
----
-1512
-2205
-5607

query I rowsort
SELECT - col2 * - col0 - col1 * + ( 2 ) FROM tab1 AS cor0
----
110
3628
7654

query I rowsort
SELECT col2 * - col2 * - col0 AS col0 FROM tab2
----
114076
5103
52728

query I rowsort
SELECT DISTINCT + 70 * cor0.col1 FROM tab2, tab0 AS cor0, tab0 cor1
----
6020
6370
6790

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + col0 ) col0 FROM tab0 AS cor0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2717
SELECT - CAST( NULL AS SIGNED ) * col1 + col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2717
SELECT - CAST ( NULL AS INTEGER ) * col1 + col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 1 + - col1 * - col0 * - cor0.col1 AS col0 FROM tab2 AS cor0
----
-22830
-271517
-6726

query I rowsort
SELECT - col1 * + 12 + + col0 FROM tab0 AS cor0
----
-1003
-1008
-1129

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * 54 col2 FROM tab0 AS cor0
----
-1782
-4428
-54

query I rowsort
SELECT ALL ( + cor0.col1 ) + cor0.col1 AS col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT DISTINCT - - 72 * ( col1 ) FROM tab2 AS cor0
----
1224
2232
4248

query I rowsort
SELECT ALL col1 * 92 FROM tab1 AS cor0
----
1196
2392
920

skipif mysql # not compatible
query I rowsort
SELECT ALL + CAST ( col2 AS REAL ) + col0 FROM tab0 AS cor0
----
171
36
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2725
SELECT DISTINCT + + CAST( NULL AS DECIMAL ) + col2 AS col1 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2725
SELECT DISTINCT + + CAST ( NULL AS REAL ) + col2 AS col1 FROM tab2 cor0
----
NULL

query I rowsort
SELECT col1 + + 79 AS col2 FROM tab1 cor0
----
105
89
92

query I rowsort
SELECT + 88 * col1 AS col1 FROM tab1 AS cor0
----
1144
2288
880

query I rowsort
SELECT - cor0.col1 * + col2 AS col0 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ( - col2 ) + - col2 * - 41 FROM tab2 AS cor0
----
1040
1080
1520

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2730
SELECT + + col1 * CAST( + col2 AS SIGNED ) FROM tab2 AS cor0
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-2730
SELECT + + col1 * CAST ( + col2 AS INTEGER ) FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL 65 FROM tab0 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 8bef2ea1f05f3514633f851312bdd805

query I rowsort
SELECT DISTINCT 69 AS col1 FROM tab2
----
69

query I rowsort
SELECT DISTINCT - cor0.col2 * 26 FROM tab0 AS cor0
----
-2132
-26
-858

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * + 29 col0 FROM tab0 cor0
----
1015
2581
696

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2735
SELECT DISTINCT - - col0 * + CAST( NULL AS SIGNED ) col0 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2735
SELECT DISTINCT - - col0 * + CAST ( NULL AS INTEGER ) col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL - + col2 * 71 AS col2 FROM tab1 AS cor0
----
-3834
-4047
-6816

query I rowsort
SELECT - col1 * + 3 FROM tab0 AS cor0
----
-258
-273
-291

onlyif mysql # use DIV operator for integer division
query I rowsort label-2738
SELECT - col0 DIV ( cor0.col0 * col1 ) AS col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2738
SELECT - col0 / ( cor0.col0 * col1 ) AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - - cor0.col1 * 29 AS col1 FROM tab0 AS cor0
----
2494
2639
2813

query I rowsort
SELECT ALL + col2 * + col0 + - col2 * + col0 * + ( 57 ) AS col1 FROM tab2 AS cor0
----
-10584
-113568
-168112

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2741
SELECT DISTINCT col0 * + CAST( + col2 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-2741
SELECT DISTINCT col0 * + CAST ( + col2 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-2742
SELECT - - col1 DIV col0 AS col2 FROM tab2 AS cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-2742
SELECT - - col1 / col0 AS col2 FROM tab2 AS cor0
----
0
0
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2743
SELECT DISTINCT - col0 * + CAST( NULL AS SIGNED ) * col2 AS col0 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2743
SELECT DISTINCT - col0 * + CAST ( NULL AS INTEGER ) * col2 AS col0 FROM tab1 cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2744
SELECT ALL + - col0 + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2744
SELECT ALL + - col0 + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 * + 12 FROM tab0 AS cor0
----
-12
-396
-984

query I rowsort
SELECT + col2 * col0 * - col0 FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT DISTINCT col0 + 22 * + col0 FROM tab0 AS cor0
----
2047
552
805

query I rowsort
SELECT DISTINCT 55 FROM tab0, tab0 cor0
----
55

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2749
SELECT - col0 * CAST( + 81 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-1944
-2835
-7209

skipif mysql # not compatible
query I rowsort label-2749
SELECT - col0 * CAST ( + 81 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-1944
-2835
-7209

query I rowsort
SELECT + 19 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

query I rowsort
SELECT - 16 * + 69 AS col1 FROM tab0
----
-1104
-1104
-1104

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - cor0.col0 + + col1 + cor0.col2 col2 FROM tab2 cor0
----
-24
51
7

query I rowsort
SELECT ALL tab0.col0 * + 49 + col0 * + ( col2 + col2 ) FROM tab0
----
1785
18957
2760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 54 + + 19 col2 FROM tab2
----
73

query I rowsort
SELECT + 55 + + col0 AS col0 FROM tab1
----
119
135
58

query I rowsort
SELECT + 49 * - col2 * - col2 AS col1 FROM tab0 AS cor0
----
329476
49
53361

query I rowsort
SELECT DISTINCT - - col1 * cor0.col2 + cor0.col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT ALL col2 * col2 + - cor0.col0 + - col2 FROM tab0 cor0
----
-35
1032
6553

query I rowsort
SELECT DISTINCT 48 FROM tab1, tab1 AS cor0, tab2 cor1
----
48

query I rowsort
SELECT + + 10 FROM tab0 AS cor0
----
10
10
10

query I rowsort
SELECT + 66 + 93 FROM tab2 AS cor0
----
159
159
159

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2762
SELECT CAST( - col1 AS SIGNED ) + - col0 col0 FROM tab2 AS cor0
----
-137
-38
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2762
SELECT CAST ( - col1 AS INTEGER ) + - col0 col0 FROM tab2 AS cor0
----
-137
-38
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2763
SELECT ALL col2 + col1 * col2 DIV 69 col0 FROM tab2 AS cor0
----
39
47
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2763
SELECT ALL col2 + col1 * col2 / 69 col0 FROM tab2 AS cor0
----
39
47
48

query I rowsort
SELECT DISTINCT - ( + col0 ) * + col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT 94 * col2 + - col1 AS col2 FROM tab2 AS cor0
----
2385
2507
3555

query I rowsort
SELECT ALL - ( - cor0.col1 ) FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT - ( col1 ) + - col0 FROM tab1 AS cor0
----
-29
-74
-93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2768
SELECT ALL - col2 + CAST( col0 AS SIGNED ) AS col2 FROM tab1
----
-16
-51
7

skipif mysql # not compatible
query I rowsort label-2768
SELECT ALL - col2 + CAST ( col0 AS INTEGER ) AS col2 FROM tab1
----
-16
-51
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - 73 col2 FROM tab0
----
-40
-72
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2770
SELECT DISTINCT - col1 + - CAST( NULL AS SIGNED ) * + col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-2770
SELECT DISTINCT - col1 + - CAST ( NULL AS INTEGER ) * + col1 FROM tab1
----
NULL

query I rowsort
SELECT ALL col1 * 66 + ( tab2.col0 ) * 91 FROM tab2
----
10992
2683
8311

query I rowsort
SELECT + cor1.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT - - col1 * - 45 FROM tab0 AS cor0
----
-3870
-4095
-4365

query I rowsort
SELECT ( + 86 ) * col0 FROM tab1 AS cor0
----
258
5504
6880

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2775
SELECT + - CAST( + col1 AS SIGNED ) * col0 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort label-2775
SELECT + - CAST ( + col1 AS INTEGER ) * col0 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2776
SELECT ALL + CAST( NULL AS SIGNED ) * col0 AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2776
SELECT ALL + CAST ( NULL AS INTEGER ) * col0 AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col1 + + col2 * + col2 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT DISTINCT 42 * - col0 * + cor0.col2 AS col2 FROM tab2 AS cor0
----
-126084
-7938
-85176

query I rowsort
SELECT - 28 + - col2 * col0 AS col2 FROM tab0 AS cor0
----
-63
-7326
-820

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 69 col2 FROM tab2
----
69

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2781
SELECT ALL - CAST( NULL AS SIGNED ) * cor0.col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2781
SELECT ALL - CAST ( NULL AS INTEGER ) * cor0.col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2782
SELECT DISTINCT - 60 * col1 DIV - col1 AS col2 FROM tab1 AS cor0
----
60

skipif mysql # not compatible
query I rowsort label-2782
SELECT DISTINCT - 60 * col1 / - col1 AS col2 FROM tab1 AS cor0
----
60

query I rowsort
SELECT DISTINCT + col2 * - col1 + + col1 AS col2 FROM tab0 AS cor0
----
-2752
-7371
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 0 col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT + col0 * cor0.col2 + col0 * 54 + col2 FROM tab1 cor0
----
12096
378
7161

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 1 * col1 col2 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT ALL + - col0 * + 52 + col1 * - col0 AS col0 FROM tab2 AS cor0
----
-5451
-581
-8658

query I rowsort
SELECT ALL + col1 * - 58 FROM tab2 AS cor0
----
-1798
-3422
-986

query I rowsort
SELECT ALL - col2 + - col0 * col2 FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT ALL - col1 + - 87 AS col2 FROM tab2
----
-104
-118
-146

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2791
SELECT ALL col2 + - CAST( col1 AS SIGNED ) * + tab2.col1 + 28 FROM tab2
----
-223
-3427
-906

skipif mysql # not compatible
query I rowsort label-2791
SELECT ALL col2 + - CAST ( col1 AS INTEGER ) * + tab2.col1 + 28 FROM tab2
----
-223
-3427
-906

query I rowsort
SELECT DISTINCT + tab0.col1 + + col0 AS col0 FROM tab0
----
110
132
180

query I rowsort
SELECT + col0 * ( - col0 ) FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT + col1 * + ( + 22 + col0 ) * - col1 AS col0 FROM tab2
----
-27869
-29189
-348100

query I rowsort
SELECT DISTINCT + col0 + - 33 * + ( col1 ) FROM tab0 AS cor0
----
-2814
-2914
-3166

query I rowsort
SELECT + - cor0.col2 + 46 AS col0 FROM tab0 AS cor0
----
-36
13
45

query I rowsort
SELECT DISTINCT + col2 * 24 + ( col2 ) AS col1 FROM tab2
----
650
675
950

query I rowsort
SELECT col0 + - ( 33 ) AS col2 FROM tab0 cor0
----
-9
2
56

query I rowsort
SELECT DISTINCT cor0.col1 + ( - col2 ) AS col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT ALL + cor0.col1 + col1 * col2 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT - col2 - + col2 * - col2 FROM tab0 AS cor0
----
0
1056
6642

query I rowsort
SELECT + 94 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to b0ffb7527f4fbf44f30945e1ccb58c24

query I rowsort
SELECT + 56 * - col2 + - col1 AS col2 FROM tab0 cor0
----
-153
-1934
-4683

query I rowsort
SELECT 86 + - col0 FROM tab1 AS cor0
----
22
6
83

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0, tab0 AS cor1, tab2, tab1 AS cor2
----
3645 values hashing to 7ccb6e2515d95809a8c30b73a5cf5f46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - col1 ) * + 48 col0 FROM tab1 AS cor0
----
-1248
-480
-624

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 18 col1 FROM tab2 AS cor0
----
18
18
18

query I rowsort
SELECT DISTINCT 85 AS col1 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
85

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0, tab2 cor1, tab1, tab0 cor2
----
3645 values hashing to b803f2d602a28da5cf35ddc7c7fa2eeb

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * + col0 * - col0 col0 FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT - + col0 * + ( col0 ) FROM tab2 cor0
----
-49
-6084
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * + col2 col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL col2 * col1 + - ( col0 * + col1 ) FROM tab2 AS cor0
----
-3068
-697
620

query I rowsort
SELECT + 65 * + col0 AS col1 FROM tab2 cor0
----
455
5070
5135

query I rowsort
SELECT DISTINCT - + col2 * col0 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT + - cor0.col2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

query I rowsort
SELECT + tab1.col0 * col1 - tab1.col1 * + col2 * col1 AS col1 FROM tab1
----
-15184
-36426
-5060

onlyif mysql # use DIV operator for integer division
query I rowsort label-2818
SELECT - 51 DIV - col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2818
SELECT - 51 / - col1 FROM tab0
----
0
0
0

query I rowsort
SELECT + - 23 * tab2.col2 FROM tab2, tab0, tab1 AS cor0, tab1
----
81 values hashing to 1de06c9051777aaf54f53fa0fe036aa2

query I rowsort
SELECT tab2.col1 * - ( col0 * col0 ) - tab2.col2 AS col0 FROM tab2
----
-106135
-1546
-358982

onlyif mysql # use DIV operator for integer division
query I rowsort label-2821
SELECT + - 46 DIV cor0.col1 FROM tab2, tab2 AS cor0
----
9 values hashing to ccd77e2770d5a834e59c1674defa88fa

skipif mysql # not compatible
query I rowsort label-2821
SELECT + - 46 / cor0.col1 FROM tab2, tab2 AS cor0
----
9 values hashing to ccd77e2770d5a834e59c1674defa88fa

query I rowsort
SELECT - 85 AS col0 FROM tab1 AS cor0
----
-85
-85
-85

query I rowsort
SELECT ALL 35 * col2 FROM tab2
----
1330
910
945

query I rowsort
SELECT ALL - 91 * + col1 AS col2 FROM tab1 AS cor0
----
-1183
-2366
-910

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - 77 * - col1 col0 FROM tab0 AS cor0
----
6646
7096
7504

query I rowsort
SELECT DISTINCT cor0.col0 + + 89 FROM tab1 AS cor0
----
153
169
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-2827
SELECT ALL + + col0 DIV - col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2827
SELECT ALL + + col0 / - col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2828
SELECT - col0 DIV - col1 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2828
SELECT - col0 / - col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT - + col0 * 98 * col0 FROM tab1 AS cor0
----
-401408
-627200
-882

query I rowsort
SELECT ALL 86 * + cor0.col0 FROM tab0 AS cor0
----
2064
3010
7654

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col0 + 15 col2 FROM tab2
----
-63
-64
8

query I rowsort
SELECT + col2 * + tab2.col2 AS col2 FROM tab2
----
1444
676
729

query I rowsort
SELECT - tab2.col0 * - 47 AS col2 FROM tab2
----
329
3666
3713

query I rowsort
SELECT col0 + - 98 * + tab2.col0 FROM tab2
----
-679
-7566
-7663

query I rowsort
SELECT DISTINCT - ( col0 + col0 ) FROM tab1
----
-128
-160
-6

query I rowsort
SELECT ALL cor0.col0 + - col0 * + col2 FROM tab0 AS cor0
----
-7209
-768
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2837
SELECT DISTINCT - 34 DIV - col2 + - col1 AS col1 FROM tab0 AS cor0
----
-63
-85
-91

skipif mysql # not compatible
query I rowsort label-2837
SELECT DISTINCT - 34 / - col2 + - col1 AS col1 FROM tab0 AS cor0
----
-63
-85
-91

query I rowsort
SELECT - - col0 * - cor0.col1 + col1 * + col2 AS col2 FROM tab2 AS cor0
----
-3068
-697
620

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + cor0.col0 * 41 - + col0 * + 7 col0 FROM tab2 AS cor0
----
-336
-3744
-3792

query I rowsort
SELECT + + cor0.col0 * + col0 + - col2 * 27 AS col0 FROM tab0 AS cor0
----
-315
1198
5707

query I rowsort
SELECT ALL + 56 + + col0 FROM tab0 AS cor0
----
145
80
91

query I rowsort
SELECT ALL - + cor0.col1 + ( + cor0.col0 ) FROM tab1 cor0
----
-23
54
67

query I rowsort
SELECT + 37 AS col0 FROM tab0 cor0
----
37
37
37

query I rowsort
SELECT DISTINCT - 6 FROM tab2, tab2 AS cor0, tab2 cor1, tab1 AS cor2
----
-6

query I rowsort
SELECT ALL + col0 + - col0 + - col1 * + col1 AS col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT + col0 * - col2 + 79 * col2 FROM tab1 AS cor0
----
-96
4104
855

query I rowsort
SELECT DISTINCT + - col0 - col2 AS col2 FROM tab1 cor0
----
-121
-176
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-2848
SELECT DISTINCT cor0.col1 DIV + cor0.col0 - - 47 * cor0.col2 col0 FROM tab0 AS cor0
----
1554
3855
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2848
SELECT DISTINCT cor0.col1 / + cor0.col0 - - 47 * cor0.col2 col0 FROM tab0 AS cor0
----
1554
3855
49

query I rowsort
SELECT DISTINCT - 1 + cor0.col2 AS col2 FROM tab0 AS cor0
----
0
32
81

query I rowsort
SELECT DISTINCT - 6 * + col2 AS col1 FROM tab0 AS cor0
----
-198
-492
-6

query I rowsort
SELECT - col2 - - col1 * col1 FROM tab2
----
251
3455
934

query I rowsort
SELECT DISTINCT - ( col0 * - col2 + - col0 ) FROM tab2
----
196
2106
3081

onlyif mysql # use DIV operator for integer division
query I rowsort label-2853
SELECT - col1 + col2 DIV - col0 FROM tab0 AS cor0
----
-87
-91
-97

skipif mysql # not compatible
query I rowsort label-2853
SELECT - col1 + col2 / - col0 FROM tab0 AS cor0
----
-87
-91
-97

query I rowsort
SELECT ALL - col2 + cor0.col0 * + 79 AS col0 FROM tab1 AS cor0
----
183
4999
6224

query I rowsort
SELECT ALL col0 + - ( + 3 ) * - col0 FROM tab0 cor0
----
140
356
96

query I rowsort
SELECT col2 + col2 - - col2 * col2 AS col0 FROM tab0 AS cor0
----
1155
3
6888

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 * + ( + 31 ) col0 FROM tab2 AS cor0
----
-217
-2418
-2449

query I rowsort
SELECT - + col1 + + ( col0 ) FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT - col1 + + 49 FROM tab2 cor0
----
-10
18
32

query I rowsort
SELECT 81 * + col0 AS col1 FROM tab1
----
243
5184
6480

query I rowsort
SELECT DISTINCT - tab0.col1 * + col0 * + 22 FROM tab0
----
-178178
-45408
-74690

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + 9 - - cor0.col0 * col1 col2 FROM tab0 AS cor0
----
2049
3369
8019

onlyif mysql # use DIV operator for integer division
query I rowsort label-2863
SELECT DISTINCT - col2 DIV col2 + cor0.col0 AS col1 FROM tab1 AS cor0
----
2
63
79

skipif mysql # not compatible
query I rowsort label-2863
SELECT DISTINCT - col2 / col2 + cor0.col0 AS col1 FROM tab1 AS cor0
----
2
63
79

query I rowsort
SELECT ALL col1 * + ( col2 ) + - col2 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT ALL - col0 * + ( + cor0.col0 ) - col0 * + col1 FROM tab2 AS cor0
----
-10686
-266
-7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-2866
SELECT ALL col0 * - cor0.col2 + + col2 * col1 DIV - ( + col1 + + col2 ) AS col1 FROM tab0 AS cor0
----
-35
-7341
-815

skipif mysql # not compatible
query I rowsort label-2866
SELECT ALL col0 * - cor0.col2 + + col2 * col1 / - ( + col1 + + col2 ) AS col1 FROM tab0 AS cor0
----
-35
-7341
-815

query I rowsort
SELECT + col0 + 51 FROM tab2 AS cor0
----
129
130
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-2868
SELECT DISTINCT - tab1.col2 DIV + ( + tab1.col1 * col1 ) + + col0 * col0 col0 FROM tab1
----
4096
6400
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2868
SELECT DISTINCT - tab1.col2 / + ( + tab1.col1 * col1 ) + + col0 * col0 col0 FROM tab1
----
4096
6400
9

query I rowsort
SELECT ALL - col2 + - 71 * col1 AS col0 FROM tab1 AS cor0
----
-1019
-1900
-767

query I rowsort
SELECT ALL col2 * col0 * col2 FROM tab2 AS cor0
----
114076
5103
52728

query I rowsort
SELECT DISTINCT + col2 * + 50 AS col2 FROM tab2 AS cor0
----
1300
1350
1900

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * - cor0.col1 * - col2 col2 FROM tab0 AS cor0
----
3395
664118
68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-2873
SELECT ALL + col1 DIV + ( cor0.col1 ) AS col0 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2873
SELECT ALL + col1 / + ( cor0.col1 ) AS col0 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT tab2.col2 + - col0 AS col0 FROM tab2
----
-41
-52
20

query I rowsort
SELECT col2 - - tab1.col1 * + col1 FROM tab1
----
157
265
730

query I rowsort
SELECT DISTINCT - col1 * ( col2 ) AS col2 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT - + cor0.col1 * 38 - + col1 AS col1 FROM tab2 AS cor0
----
-1209
-2301
-663

query I rowsort
SELECT 49 + + 75 FROM tab0 AS cor0
----
124
124
124

query I rowsort
SELECT DISTINCT + tab2.col2 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-2880
SELECT tab0.col0 DIV + ( + col0 ) AS col2 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2880
SELECT tab0.col0 / + ( + col0 ) AS col2 FROM tab0
----
1
1
1

query I rowsort
SELECT DISTINCT - col0 * 87 FROM tab1
----
-261
-5568
-6960

query I rowsort
SELECT ALL 98 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

onlyif mysql # use DIV operator for integer division
query I rowsort label-2883
SELECT col0 DIV CAST( - tab2.col0 AS SIGNED ) FROM tab2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2883
SELECT col0 / CAST ( - tab2.col0 AS INTEGER ) FROM tab2
----
-1
-1
-1

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab0 AS cor2, tab1 AS cor3
----
3645 values hashing to f9101173abc9e524c6310e6c0eeefb0c

query I rowsort
SELECT - cor0.col2 * - col2 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT col1 * - col1 + col1 + col2 FROM tab1 AS cor0
----
-33
-596
-60

onlyif mysql # use DIV operator for integer division
query I rowsort label-2887
SELECT DISTINCT + - 30 DIV - cor0.col2 AS col0 FROM tab1 cor0
----
0

skipif mysql # not compatible
query I rowsort label-2887
SELECT DISTINCT + - 30 / - cor0.col2 AS col0 FROM tab1 cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2888
SELECT - ( - col2 ) * 54 DIV + 37 FROM tab1 AS cor0
----
140
78
83

skipif mysql # not compatible
query I rowsort label-2888
SELECT - ( - col2 ) * 54 / + 37 FROM tab1 AS cor0
----
140
78
83

query I rowsort
SELECT ALL cor0.col2 * col1 + col0 AS col0 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT col2 + - col0 * - col0 FROM tab2
----
6110
6279
76

query I rowsort
SELECT ALL + tab1.col0 + - col2 * col2 FROM tab1
----
-2913
-3185
-9136

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col0 * - col1 col1 FROM tab0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col0 * 19 col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 699296a3061c930701cf2dc6d47c8cae

query I rowsort
SELECT 55 + - col1 FROM tab1
----
29
42
45

query I rowsort
SELECT 83 FROM tab0, tab0 AS cor0, tab2 cor1
----
27 values hashing to 002a717a3d902d97220759065fb107c3

query I rowsort
SELECT + 8 * + col2 + col0 AS col0 FROM tab0 AS cor0
----
288
43
745

query I rowsort
SELECT DISTINCT + - 28 FROM tab2 cor0
----
-28

query I rowsort
SELECT ALL - ( col0 ) * + col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT - 33 + 94 AS col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 8d4dfe649433a599fc4b10830cc7ce55

onlyif mysql # use DIV operator for integer division
query I rowsort label-2900
SELECT DISTINCT col0 + - col0 DIV 52 FROM tab0 AS cor0
----
24
35
88

skipif mysql # not compatible
query I rowsort label-2900
SELECT DISTINCT col0 + - col0 / 52 FROM tab0 AS cor0
----
24
35
88

query I rowsort
SELECT + + 58 + - col2 * cor0.col2 AS col0 FROM tab2 AS cor0
----
-1386
-618
-671

query I rowsort
SELECT DISTINCT ( - 93 ) FROM tab2, tab1 AS cor0, tab2 cor1
----
-93

query I rowsort
SELECT ALL col1 * - col0 + - col2 AS col1 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT DISTINCT - col2 + ( - col0 ) * + col0 AS col2 FROM tab0 AS cor0
----
-1226
-609
-8003

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2905
SELECT DISTINCT tab2.col2 * - CAST( + col0 AS SIGNED ) * - tab2.col2 AS col2 FROM tab2
----
114076
5103
52728

skipif mysql # not compatible
query I rowsort label-2905
SELECT DISTINCT tab2.col2 * - CAST ( + col0 AS INTEGER ) * - tab2.col2 AS col2 FROM tab2
----
114076
5103
52728

onlyif mysql # use DIV operator for integer division
query I rowsort label-2906
SELECT ALL - col2 DIV + 91 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2906
SELECT ALL - col2 / + 91 FROM tab2
----
0
0
0

query I rowsort
SELECT + cor0.col2 * + ( 96 ) FROM tab1 AS cor0
----
5184
5472
9216

query I rowsort
SELECT - col2 * + col0 * col2 AS col1 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT - tab2.col2 * tab1.col1 AS col1 FROM tab2, tab0, tab0 AS cor0, tab1
----
81 values hashing to 02435d0d6b91397f07a6ab6a00002270

query I rowsort
SELECT - - 34 + 10 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 0cc3e52e781e46962291c3060c6ae73b

query I rowsort
SELECT ALL 87 AS col1 FROM tab0, tab0 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to 969f31ae779866644763e8a07f1ec501

query I rowsort
SELECT ALL ( col0 * - col0 ) FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT - col2 * 1 * + col0 AS col0 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT ALL - + 59 + col2 FROM tab2 cor0
----
-21
-32
-33

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2915
SELECT + CAST( col0 AS SIGNED ) + - cor0.col0 AS col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2915
SELECT + CAST ( col0 AS INTEGER ) + - cor0.col0 AS col2 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2916
SELECT ALL + CAST( - ( col2 ) AS SIGNED ) + + ( - 86 ) * col1 FROM tab0 AS cor0
----
-7429
-7908
-8343

skipif mysql # not compatible
query I rowsort label-2916
SELECT ALL + CAST ( - ( col2 ) AS INTEGER ) + + ( - 86 ) * col1 FROM tab0 AS cor0
----
-7429
-7908
-8343

query I rowsort
SELECT - ( col1 ) * 1 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT 59 AS col0 FROM tab0 cor0
----
59
59
59

query I rowsort
SELECT ALL col0 * - cor0.col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL - ( cor0.col2 ) * + ( col2 ) * col2 - - col0 AS col0 FROM tab0 AS cor0
----
-35913
-551279
34

query I rowsort
SELECT ALL ( col1 + - col1 * col1 ) FROM tab0
----
-7310
-8190
-9312

onlyif mysql # use DIV operator for integer division
query I rowsort label-2922
SELECT - col1 DIV - col0 FROM tab2 cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-2922
SELECT - col1 / - col0 FROM tab2 cor0
----
0
0
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + col1 + col1 col1 FROM tab2 AS cor0
----
144
72
89

query I rowsort
SELECT ALL col0 * col2 + - col0 AS col1 FROM tab2 cor0
----
182
1950
2923

query I rowsort
SELECT + - col0 * col2 AS col2 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT cor0.col2 * - col1 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ( - col0 ) * - col2 AS col0 FROM tab1
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col1 * col0 col0 FROM tab0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * col1 col1 FROM tab2
----
1343
217
4602

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT - cor0.col0 FROM tab1, tab2 AS cor0 WHERE NOT NULL BETWEEN NULL AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2932
SELECT + col0 - col1 * col1 DIV col1 AS col1 FROM tab1
----
-23
54
67

skipif mysql # not compatible
query I rowsort label-2932
SELECT + col0 - col1 * col1 / col1 AS col1 FROM tab1
----
-23
54
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-2933
SELECT col2 * - tab1.col0 - col1 DIV - tab1.col2 AS col1 FROM tab1
----
-162
-3648
-7680

skipif mysql # not compatible
query I rowsort label-2933
SELECT col2 * - tab1.col0 - col1 / - tab1.col2 AS col1 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( ( col1 ) AS REAL ) * col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT DISTINCT ( 19 ) AS col1 FROM tab0
----
19

query I rowsort
SELECT DISTINCT 79 + col1 FROM tab0 AS cor0
----
165
170
176

query I rowsort
SELECT + ( + col1 ) * + col2 + col1 * col1 AS col0 FROM tab1 AS cor0
----
1417
2080
670

query I rowsort
SELECT col2 * - 6 FROM tab1
----
-324
-342
-576

query I rowsort
SELECT ALL col2 * col0 * col2 AS col1 FROM tab0
----
26136
35
598436

query I rowsort
SELECT + ( 9 ) * + col2 AS col2 FROM tab0
----
297
738
9

query I rowsort
SELECT - 52 * ( col0 ) AS col2 FROM tab1
----
-156
-3328
-4160

query I rowsort
SELECT + ( + ( + col1 ) ) * - col2 AS col0 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT col1 * 0 AS col0 FROM tab1
----
0

query I rowsort
SELECT DISTINCT - ( col1 + - col1 ) AS col2 FROM tab0
----
0

query I rowsort
SELECT ALL + col2 * + tab0.col0 + - col1 FROM tab0
----
-62
706
7207

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col0 ) * col2 col1 FROM tab2 cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + - col0 col1 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT ALL - tab1.col1 * + tab1.col1 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT - 53 * - cor0.col0 FROM tab1 AS cor0
----
159
3392
4240

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - col2 * - col0 col1 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT + 90 + col2 * - col1 AS col0 FROM tab1 AS cor0
----
-1158
-1314
-480

query I rowsort
SELECT + 82 + col2 * + cor0.col0 FROM tab2 AS cor0
----
2110
271
3084

query I rowsort
SELECT 62 * col0 + + col0 FROM tab1 AS cor0
----
189
4032
5040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * - tab1.col2 col2 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT - col1 + + col1 + - col1 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT DISTINCT tab2.col2 * col1 + col1 - col0 FROM tab2
----
1515
584
861

query I rowsort
SELECT + col2 * tab2.col0 * col0 FROM tab2
----
1323
158184
237158

query I rowsort
SELECT ALL col2 * - col0 * col1 AS col0 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT ALL col0 + - col1 - - col1 AS col2 FROM tab1 WHERE NOT - col0 + - col1 NOT IN ( - col0 )
----

query I rowsort
SELECT DISTINCT + col2 + col2 + col1 AS col0 FROM tab2
----
111
85
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-2963
SELECT DISTINCT col1 + - tab2.col0 DIV col1 - + col0 * - col0 FROM tab2
----
6142
6254
80

skipif mysql # not compatible
query I rowsort label-2963
SELECT DISTINCT col1 + - tab2.col0 / col1 - + col0 * - col0 FROM tab2
----
6142
6254
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2964
SELECT col1 DIV + tab0.col1 AS col0 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2964
SELECT col1 / + tab0.col1 AS col0 FROM tab0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2965
SELECT - col2 * + tab0.col2 DIV + col2 FROM tab0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-2965
SELECT - col2 * + tab0.col2 / + col2 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT ALL - col1 * col0 * col2 AS col0 FROM tab1
----
-36480
-4212
-99840

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NULL < ( NULL )
----

query I rowsort
SELECT ALL tab2.col0 * col0 * col0 FROM tab2
----
343
474552
493039

query III rowsort
SELECT * FROM tab0 WHERE + col0 * col1 + - col2 * col1 IN ( + col0 * col1 + + col2 + col2 * col0 )
----

query I rowsort
SELECT DISTINCT + col1 + - col1 * col1 AS col2 FROM tab2 WHERE NULL < ( col2 * col0 / - col1 )
----

query I rowsort
SELECT ALL - tab0.col1 + col2 AS col0 FROM tab0 WHERE NOT NULL BETWEEN ( - col1 * - col2 ) AND NULL
----

query I rowsort
SELECT DISTINCT col0 * col1 - + col0 AS col2 FROM tab0
----
2040
3360
8010

query I rowsort
SELECT ALL tab1.col2 * col2 + + col1 * col0 AS col0 FROM tab1
----
10256
2994
3889

query I rowsort
SELECT col0 + + col1 * col1 AS col2 FROM tab1
----
164
249
679

query I rowsort
SELECT DISTINCT tab0.col0 + - col2 AS col0 FROM tab0
----
-9
34
7

query I rowsort
SELECT + col2 * tab2.col0 AS col0 FROM tab2
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 * - col1 col2 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT - tab1.col0 * - col0 + col2 * col0 FROM tab1
----
14080
171
7744

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + - col2 col0 FROM tab2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col2 + col2 col2 FROM tab2
----
-1508
-608
-810

query I rowsort
SELECT - col2 * + col0 + - tab2.col2 AS col1 FROM tab2
----
-2054
-216
-3040

query I rowsort
SELECT tab2.col0 * col2 + col1 + + tab2.col2 FROM tab2
----
2113
247
3057

query I rowsort
SELECT col1 - - col0 * - col1 * - cor0.col2 FROM tab1 AS cor0
----
36490
4238
99853

query I rowsort
SELECT - + col2 + + cor0.col0 AS col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT col0 - + col0 AS col1 FROM tab0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - tab0.col1 col2 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT col2 * col2 + + col0 FROM tab2 cor0
----
1523
736
754

query I rowsort
SELECT DISTINCT + col2 + col1 * col0 AS col1 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT ALL + col1 * - col2 - - col2 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT ALL - col1 + - col0 * + col0 - col2 FROM tab0 AS cor0
----
-1323
-695
-8094

onlyif mysql # use DIV operator for integer division
query I rowsort label-2991
SELECT DISTINCT col2 DIV col0 + cor0.col0 * col1 FROM tab1 AS cor0
----
1041
640
96

skipif mysql # not compatible
query I rowsort label-2991
SELECT DISTINCT col2 / col0 + cor0.col0 * col1 FROM tab1 AS cor0
----
1041
640
96

query I rowsort
SELECT ALL - col2 * - col2 + - col2 - col2 * cor0.col1 FROM tab2 cor0
----
-135
-884
760

query IIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0 WHERE NOT NULL < ( NULL )
----

query I rowsort
SELECT DISTINCT col0 + col0 + - cor0.col0 AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL - col0 * + col2 + - col1 + cor0.col2 AS col2 FROM tab0 AS cor0
----
-131
-7307
-845

query I rowsort
SELECT ALL col2 + - col1 + col0 * cor0.col1 AS col1 FROM tab1 AS cor0
----
106
1123
687

query I rowsort
SELECT ALL - col1 * col1 + + col1 FROM tab0 AS cor0
----
-7310
-8190
-9312

query I rowsort
SELECT + col0 FROM tab2 AS cor0 WHERE NULL NOT BETWEEN col0 AND NULL
----

query I rowsort
SELECT col0 + + col2 * + col1 + col2 FROM tab1
----
1424
1461
691

query III rowsort
SELECT ALL * FROM tab0 WHERE - col0 NOT BETWEEN NULL AND NULL
----

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3001
SELECT CAST( NULL AS DECIMAL ) * + 87 + + col0 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3001
SELECT CAST ( NULL AS REAL ) * + 87 + + col0 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( - col0 AS REAL ) + tab1.col0 AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT - col0 * col0 + - col2 * - col0 FROM tab1
----
-448
1280
153

query I rowsort
SELECT ALL + 47 * - col0 * col1 AS col0 FROM tab2 AS cor0
----
-10199
-216294
-63121

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3005
SELECT DISTINCT - CAST( - col2 AS SIGNED ) * - col2 + CAST( NULL AS DECIMAL ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3005
SELECT DISTINCT - CAST ( - col2 AS INTEGER ) * - col2 + CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT 59 + + col2 FROM tab1 AS cor0
----
113
116
155

query I rowsort
SELECT ALL - + col1 * col1 + + col0 AS col2 FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT - 90 * ( col0 ) FROM tab0 AS cor0
----
-2160
-3150
-8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 63 * + col2 col0 FROM tab1 AS cor0
----
-3402
-3591
-6048

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0, tab2 cor1, tab2, tab2 cor2
----
3645 values hashing to f1fc3f16747aca82b54b2b759d1f5ea2

query I rowsort
SELECT DISTINCT - 11 + col1 FROM tab0 AS cor0
----
75
80
86

query I rowsort
SELECT - col1 + + cor0.col2 * + col0 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT ALL - col1 + + col1 + + col2 FROM tab2 AS cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col2 * 79 col1 FROM tab2 cor0
----
-121186
-51034
-66123

query I rowsort
SELECT DISTINCT 58 AS col2 FROM tab2
----
58

query I rowsort
SELECT DISTINCT + tab2.col2 * - col0 AS col1 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT ALL col0 * - col2 - - col0 AS col0 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT ALL col0 * + 95 + + col1 FROM tab0 AS cor0
----
2366
3422
8546

query I rowsort
SELECT ALL - col2 + - ( + col2 ) FROM tab1 AS cor0
----
-108
-114
-192

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3020
SELECT DISTINCT - cor0.col1 * + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3020
SELECT DISTINCT - cor0.col1 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + col1 * - col2 * + col1 + + col0 * + 58 FROM tab0 AS cor0
----
-242676
-673880
-7379

query I rowsort
SELECT cor0.col1 * 68 + 59 AS col1 FROM tab1 AS cor0
----
1827
739
943

query I rowsort
SELECT DISTINCT + col2 + - ( col1 ) * + cor0.col1 FROM tab1 AS cor0
----
-43
-622
-73

query I rowsort
SELECT + col2 + 41 FROM tab0 AS cor0
----
123
42
74

query I rowsort
SELECT DISTINCT - + col0 + + ( cor0.col0 ) * + col0 * col2 FROM tab1 AS cor0
----
233408
483
614320

onlyif mysql # use DIV operator for integer division
query I rowsort label-3026
SELECT DISTINCT col2 DIV - 39 FROM tab0 AS cor0
----
-2
0

skipif mysql # not compatible
query I rowsort label-3026
SELECT DISTINCT col2 / - 39 FROM tab0 AS cor0
----
-2
0

query I rowsort
SELECT ALL 27 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

query I rowsort
SELECT + - 31 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to f4b05206ee2fc0cf8007d9c3514885fa

query I rowsort
SELECT col1 + - ( - cor0.col0 ) FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT + + 44 FROM tab1 cor0
----
44
44
44

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab2 AS cor2, tab1 AS cor3
----
3645 values hashing to 15ae1b54cae2dcf5c6eef7f1d15689eb

query I rowsort
SELECT - col0 * + col0 + + 11 FROM tab0
----
-1214
-565
-7910

query I rowsort
SELECT + col1 + - cor0.col0 * cor0.col2 FROM tab2 cor0
----
-158
-1969
-2985

query I rowsort
SELECT + ( 80 ) * + cor0.col2 AS col1 FROM tab1 AS cor0
----
4320
4560
7680

query I rowsort
SELECT - 49 * 43 AS col1 FROM tab0 AS cor0
----
-2107
-2107
-2107

query I rowsort
SELECT cor0.col2 + col2 * col0 AS col1 FROM tab2 cor0
----
2054
216
3040

query I rowsort
SELECT + - 2 * - cor0.col0 AS col1 FROM tab1 AS cor0
----
128
160
6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3038
SELECT + - CAST( NULL AS SIGNED ) * 62 col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3038
SELECT + - CAST ( NULL AS INTEGER ) * 62 col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 * + 39 AS col1 FROM tab1 AS cor0
----
-2106
-2223
-3744

query I rowsort
SELECT - 95 + - col2 * + cor0.col0 FROM tab0 AS cor0
----
-130
-7393
-887

query I rowsort
SELECT ALL 82 AS col2 FROM tab0, tab2 AS cor0, tab1, tab1 cor1
----
81 values hashing to 660751b3166f5cb8964b7ef659605795

onlyif mysql # use DIV operator for integer division
query I rowsort label-3042
SELECT DISTINCT - col0 DIV - cor0.col1 - + col1 AS col0 FROM tab1 AS cor0
----
-26
-4
-7

skipif mysql # not compatible
query I rowsort label-3042
SELECT DISTINCT - col0 / - cor0.col1 - + col1 AS col0 FROM tab1 AS cor0
----
-26
-4
-7

query I rowsort
SELECT ALL + cor0.col0 + - cor0.col2 AS col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT - 4 FROM tab1
----
-4

query I rowsort
SELECT ALL - - 78 AS col1 FROM tab2, tab2 AS cor0, tab0, tab1 cor1
----
81 values hashing to f0487ba81d377516702723e098c02ba1

query I rowsort
SELECT - 99 * col2 - col2 FROM tab1
----
-5400
-5700
-9600

query I rowsort
SELECT - 79 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to c9cc9510604e093bd158ca33928acaed

query I rowsort
SELECT DISTINCT col2 + col2 + col1 FROM tab0
----
152
255
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3049
SELECT col2 * CAST( NULL AS SIGNED ) + col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3049
SELECT col2 * CAST ( NULL AS INTEGER ) + col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * - tab1.col0 col1 FROM tab1
----
-4096
-6400
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-3051
SELECT cor0.col0 + col0 DIV - col2 FROM tab1 AS cor0
----
3
63
80

skipif mysql # not compatible
query I rowsort label-3051
SELECT cor0.col0 + col0 / - col2 FROM tab1 AS cor0
----
3
63
80

query I rowsort
SELECT + col2 + - 28 * col2 FROM tab0 AS cor0
----
-2214
-27
-891

query I rowsort
SELECT DISTINCT + col0 + col1 * ( - 78 ) AS col1 FROM tab0
----
-6684
-7009
-7531

query I rowsort
SELECT ALL ( + tab0.col0 ) + col0 AS col1 FROM tab0
----
178
48
70

query I rowsort
SELECT col2 * - col0 + 55 * col2 AS col0 FROM tab1 cor0
----
-2400
-513
2808

query I rowsort
SELECT ALL 49 AS col2 FROM tab1 AS cor0
----
49
49
49

query I rowsort
SELECT - + col1 + col0 * col1 AS col0 FROM tab0 AS cor0
----
1978
3298
8008

query I rowsort
SELECT ALL - - cor0.col2 + - col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT 57 + col2 FROM tab1 AS cor0
----
111
114
153

query I rowsort
SELECT ALL + + col1 + - col0 AS col0 FROM tab0 cor0
----
2
62
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-3061
SELECT col1 * col1 + 4 DIV col1 FROM tab2 AS cor0
----
289
3481
961

skipif mysql # not compatible
query I rowsort label-3061
SELECT col1 * col1 + 4 / col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT DISTINCT + - cor0.col0 * + col0 + + col1 FROM tab0 AS cor0
----
-1128
-490
-7830

onlyif mysql # use DIV operator for integer division
query I rowsort label-3063
SELECT + col2 DIV - col0 + + col0 AS col0 FROM tab2 AS cor0
----
4
78
79

skipif mysql # not compatible
query I rowsort label-3063
SELECT + col2 / - col0 + + col0 AS col0 FROM tab2 AS cor0
----
4
78
79

query I rowsort
SELECT col1 * ( 1 ) FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL - - col2 + - col0 * col0 FROM tab1 AS cor0
----
-4039
-6304
45

query I rowsort
SELECT + + col1 * 89 + col0 AS col1 FROM tab0 AS cor0
----
7678
8188
8668

query I rowsort
SELECT ALL cor0.col2 + - 65 * - col2 * - col2 FROM tab0 AS cor0
----
-436978
-64
-70752

onlyif mysql # use DIV operator for integer division
query I rowsort label-3068
SELECT DISTINCT + - col1 * col2 * col0 + + col2 DIV ( col0 ) - col0 * 52 AS col1 FROM tab2 cor0
----
-123708
-55142
-6220

skipif mysql # not compatible
query I rowsort label-3068
SELECT DISTINCT + - col1 * col2 * col0 + + col2 / ( col0 ) - col0 * 52 AS col1 FROM tab2 cor0
----
-123708
-55142
-6220

query I rowsort
SELECT DISTINCT - col0 * col0 * - col2 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT 31 + 60 AS col0 FROM tab0 AS cor0
----
91
91
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-3071
SELECT ALL + ( - 58 ) DIV + col0 AS col2 FROM tab2 AS cor0
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-3071
SELECT ALL + ( - 58 ) / + col0 AS col2 FROM tab2 AS cor0
----
-8
0
0

query I rowsort
SELECT col0 * col1 + + col1 + - 67 * col1 FROM tab0 AS cor0
----
-3007
-3612
2093

onlyif mysql # use DIV operator for integer division
query I rowsort label-3073
SELECT col0 + + col1 DIV - col1 + - col1 DIV + col1 AS col2 FROM tab2 AS cor0
----
5
76
77

skipif mysql # not compatible
query I rowsort label-3073
SELECT col0 + + col1 / - col1 + - col1 / + col1 AS col2 FROM tab2 AS cor0
----
5
76
77

query I rowsort
SELECT ALL + + ( - cor0.col1 ) * col1 AS col0 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT col1 + - col1 * - col0 AS col2 FROM tab0 AS cor0
----
2150
3492
8190

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3076
SELECT ALL + CAST( NULL AS SIGNED ) * - 14 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3076
SELECT ALL + CAST ( NULL AS INTEGER ) * - 14 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - tab2.col0 AS col2 FROM tab2, tab0, tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL col2 * 17 FROM tab1
----
1632
918
969

query I rowsort
SELECT DISTINCT - 59 + col0 FROM tab1 AS cor0
----
-56
21
5

query I rowsort
SELECT DISTINCT + + col0 * + col1 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL 48 + col2 + col0 FROM tab1 AS cor0
----
105
169
224

query I rowsort
SELECT ALL + col0 - + col1 AS col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT 83 - + col2 FROM tab0
----
1
50
82

query I rowsort
SELECT DISTINCT col2 - col1 * - col0 FROM tab0
----
2097
3396
8181

query I rowsort
SELECT ALL + 36 * tab2.col0 - col1 * - ( - ( col1 ) ) FROM tab2
----
-673
-709
2555

query I rowsort
SELECT DISTINCT ( ( - col1 ) ) - col1 FROM tab2
----
-118
-34
-62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3087
SELECT - 74 + col1 / col1 - - CAST( NULL AS SIGNED ) * + col2 AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3087
SELECT - 74 + col1 / col1 - - CAST ( NULL AS INTEGER ) * + col2 AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 + col0 * 41 * 40 FROM tab2 AS cor0
----
11449
127861
129543

query I rowsort
SELECT DISTINCT - - 12 FROM tab2 AS cor0
----
12

onlyif mysql # use DIV operator for integer division
query I rowsort label-3090
SELECT + 97 + - col1 * col1 DIV 92 FROM tab2 AS cor0
----
60
87
94

skipif mysql # not compatible
query I rowsort label-3090
SELECT + 97 + - col1 * col1 / 92 FROM tab2 AS cor0
----
60
87
94

query I rowsort
SELECT ALL 78 * col1 * + col1 - col2 FROM tab2
----
22504
271492
74931

query I rowsort
SELECT ALL 39 * - col0 + col2 * col1 AS col0 FROM tab0
----
-1268
1902
3991

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 32 * - col2 col1 FROM tab1
----
-1728
-1824
-3072

query I rowsort
SELECT + 86 - col2 FROM tab0 AS cor0
----
4
53
85

query I rowsort
SELECT ALL col0 * + col0 FROM tab2 cor0
----
49
6084
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * col1 + 39 col0 FROM tab2
----
1382
256
4641

query I rowsort
SELECT DISTINCT + 91 + - 57 FROM tab1, tab0 AS cor0
----
34

query I rowsort
SELECT DISTINCT + 26 AS col0 FROM tab2, tab1 AS cor0
----
26

query I rowsort
SELECT ALL - - col1 + col1 * - col0 AS col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT ALL - tab2.col1 * + ( - col0 ) FROM tab2
----
1343
217
4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3101
SELECT + CAST( NULL AS SIGNED ) * 66 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3101
SELECT + CAST ( NULL AS INTEGER ) * 66 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * - 98 * col1 col2 FROM tab0
----
-278124
-731276
-9506

query I rowsort
SELECT DISTINCT - col1 * 92 FROM tab0
----
-7912
-8372
-8924

onlyif mysql # use DIV operator for integer division
query I rowsort label-3104
SELECT DISTINCT col2 DIV CAST( + col1 AS SIGNED ) AS col2 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-3104
SELECT DISTINCT col2 / CAST ( + col1 AS INTEGER ) AS col2 FROM tab1
----
2
5
7

query I rowsort
SELECT + col2 + 54 * + 2 FROM tab2
----
134
135
146

query I rowsort
SELECT ALL 10 * col1 * + col2 AS col1 FROM tab2 AS cor0
----
15340
6460
8370

query I rowsort
SELECT DISTINCT - 94 * col1 AS col1 FROM tab1 cor0
----
-1222
-2444
-940

query I rowsort
SELECT + col1 * - 91 AS col1 FROM tab0 AS cor0
----
-7826
-8281
-8827

query I rowsort
SELECT DISTINCT + 97 + 27 FROM tab2 AS cor0
----
124

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * - col2 col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT - col0 * 18 + + col0 AS col1 FROM tab0 AS cor0
----
-1513
-408
-595

query I rowsort
SELECT + cor0.col0 * 16 FROM tab2 AS cor0
----
112
1248
1264

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( cor0.col0 ) + + cor0.col1 * - col2 col2 FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT ALL + ( + 11 ) + col1 FROM tab1 AS cor0
----
21
24
37

query I rowsort
SELECT DISTINCT 98 * + 93 FROM tab1 cor0
----
9114

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * col0 col0 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-3117
SELECT - col1 DIV col0 + + col0 AS col2 FROM tab0
----
21
33
88

skipif mysql # not compatible
query I rowsort label-3117
SELECT - col1 / col0 + + col0 AS col2 FROM tab0
----
21
33
88

query I rowsort
SELECT ALL + + 80 * cor0.col2 FROM tab2, tab0, tab2 cor0
----
27 values hashing to f515d9c8a268d6963f99405785466cbb

query I rowsort
SELECT 60 * col1 AS col1 FROM tab2
----
1020
1860
3540

query I rowsort
SELECT ALL + 83 AS col1 FROM tab1 AS cor0
----
83
83
83

query I rowsort
SELECT DISTINCT col2 * - cor0.col1 AS col1 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT - col1 * + col0 AS col1 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - - cor0.col0 + col0 * + col1 + - cor0.col0 FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-3124
SELECT + cor0.col0 DIV + ( ( col0 ) ) AS col1 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3124
SELECT + cor0.col0 / + ( ( col0 ) ) AS col1 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT + tab1.col0 * - ( col0 ) FROM tab1
----
-4096
-6400
-9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3126
SELECT - col0 * - CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3126
SELECT - col0 * - CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 + + ( col1 ) FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT + + col1 * + 89 * col0 FROM tab1 AS cor0
----
56960
6942
92560

query I rowsort
SELECT ALL - - col0 + 86 * - col2 FROM tab2 AS cor0
----
-2158
-2315
-3189

onlyif mysql # use DIV operator for integer division
query I rowsort label-3130
SELECT DISTINCT + cor0.col2 DIV ( col1 ) AS col0 FROM tab2 cor0
----
0
2

skipif mysql # not compatible
query I rowsort label-3130
SELECT DISTINCT + cor0.col2 / ( col1 ) AS col0 FROM tab2 cor0
----
0
2

query I rowsort
SELECT DISTINCT - col0 + 49 * + 97 AS col2 FROM tab1 AS cor0
----
4673
4689
4750

query I rowsort
SELECT ALL ( tab2.col0 ) * - col1 + col0 FROM tab2
----
-1264
-210
-4524

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col2 + - 78 + col2 * - col0 col2 FROM tab2
----
-2080
-240
-3042

query I rowsort
SELECT - + 13 + - col2 FROM tab1 AS cor0
----
-109
-67
-70

query I rowsort
SELECT ALL - 91 + 2 * + cor0.col0 FROM tab0 AS cor0
----
-21
-43
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 7 * cor0.col1 + col0 * + col2 * + col2 col2 FROM tab0 AS cor0
----
26738
599073
714

query I rowsort
SELECT ALL - cor0.col2 + - 60 AS col0 FROM tab2 AS cor0
----
-86
-87
-98

query I rowsort
SELECT ALL - col0 + + 60 AS col1 FROM tab1 AS cor0
----
-20
-4
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + col1 ) col0 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3140
SELECT ALL + col1 * 35 - + col0 DIV - ( + col2 ) FROM tab0 cor0
----
3010
3186
3430

skipif mysql # not compatible
query I rowsort label-3140
SELECT ALL + col1 * 35 - + col0 / - ( + col2 ) FROM tab0 cor0
----
3010
3186
3430

query I rowsort
SELECT ALL - - col2 + - col2 AS col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT col0 + + 7 AS col1 FROM tab1 AS cor0
----
10
71
87

query I rowsort
SELECT 71 - 19 FROM tab1 AS cor0
----
52
52
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-3144
SELECT DISTINCT - col1 + + col0 DIV col0 FROM tab0 AS cor0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-3144
SELECT DISTINCT - col1 + + col0 / col0 FROM tab0 AS cor0
----
-85
-90
-96

query I rowsort
SELECT ALL + - 41 + - col0 * col2 FROM tab1 cor0
----
-203
-3689
-7721

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col0 + - cor0.col0 col2 FROM tab0 AS cor0
----
1190
552
7832

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * - col0 + col2 * - col1 col2 FROM tab1 AS cor0
----
-1566
-4218
-8928

query I rowsort
SELECT + 82 + - col0 AS col2 FROM tab1 AS cor0
----
18
2
79

query I rowsort
SELECT + col1 * cor0.col1 AS col0 FROM tab2 cor0
----
289
3481
961

query I rowsort
SELECT + 20 - + col2 FROM tab0 AS cor0
----
-13
-62
19

query I rowsort
SELECT ALL - col2 * + col2 + 15 + - ( + col1 ) * ( 11 * col1 + col0 ) AS col0 FROM tab2 AS cor0
----
-11502
-43554
-5951

query I rowsort
SELECT - + col2 + - col2 * + ( col2 ) FROM tab1 AS cor0
----
-2970
-3306
-9312

query I rowsort
SELECT - - ( col2 ) * 40 - - col2 AS col1 FROM tab1 AS cor0
----
2214
2337
3936

query I rowsort
SELECT - col1 - col2 * + col2 AS col0 FROM tab1 AS cor0
----
-2942
-3259
-9229

query I rowsort
SELECT - col1 + + col2 FROM tab2 cor0
----
-33
-4
21

query I rowsort
SELECT + col2 + - col0 * + 93 + col2 AS col2 FROM tab1 AS cor0
----
-171
-5838
-7248

query I rowsort
SELECT + col1 + + 86 AS col0 FROM tab0 AS cor0
----
172
177
183

query IIIIII rowsort
SELECT ALL * FROM tab2, tab1 AS cor0 WHERE NOT NULL <> NULL
----

query I rowsort
SELECT - tab0.col2 * + col2 AS col2 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT - 13 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 1c6aaa07ba8d3dc01ee616e16bef60f2

query I rowsort
SELECT 38 * - ( + col2 * ( + col0 ) ) FROM tab2 cor0
----
-114076
-7182
-77064

query I rowsort
SELECT + + 4 * - col0 FROM tab0 AS cor0
----
-140
-356
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 26 * col2 * col0 col2 FROM tab2 cor0
----
4914
52728
78052

query I rowsort
SELECT - col2 * - 14 FROM tab0 AS cor0
----
1148
14
462

query I rowsort
SELECT cor0.col0 + col2 * + col1 FROM tab2 AS cor0
----
1612
725
844

onlyif mysql # use DIV operator for integer division
query I rowsort label-3166
SELECT ALL - CAST( - col0 AS SIGNED ) * col2 DIV col0 + + col2 + tab2.col1 FROM tab2
----
111
85
93

skipif mysql # not compatible
query I rowsort label-3166
SELECT ALL - CAST ( - col0 AS INTEGER ) * col2 / col0 + + col2 + tab2.col1 FROM tab2
----
111
85
93

query I rowsort
SELECT ALL - col2 + - col1 * - col1 * + col0 FROM tab2
----
22793
271492
6700

onlyif mysql # use DIV operator for integer division
query I rowsort label-3168
SELECT ALL + ( col2 ) DIV col2 + - col0 FROM tab0
----
-23
-34
-88

skipif mysql # not compatible
query I rowsort label-3168
SELECT ALL + ( col2 ) / col2 + - col0 FROM tab0
----
-23
-34
-88

query I rowsort
SELECT - col1 * 24 * tab2.col0 FROM tab2
----
-110448
-32232
-5208

query I rowsort
SELECT ALL - col2 * - col1 * col0 + col1 + + col1 FROM tab2
----
119770
51068
5921

query I rowsort
SELECT ALL 3 + col0 FROM tab1
----
6
67
83

query I rowsort
SELECT cor0.col0 * 83 FROM tab1 AS cor0
----
249
5312
6640

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3173
SELECT DISTINCT + CAST( NULL AS SIGNED ) - + 1 AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3173
SELECT DISTINCT + CAST ( NULL AS INTEGER ) - + 1 AS col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + cor1.col0 FROM tab0, tab1 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

query I rowsort
SELECT DISTINCT - 0 FROM tab2, tab1 AS cor0, tab2 AS cor1, tab0 AS cor2
----
0

query I rowsort
SELECT ALL + 91 AS col2 FROM tab2
----
91
91
91

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3177
SELECT col1 / + CAST( NULL AS DECIMAL ) + - col2 AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3177
SELECT col1 / + CAST ( NULL AS REAL ) + - col2 AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 + + 49 * + col1 FROM tab1 AS cor0
----
1277
554
717

onlyif mysql # use DIV operator for integer division
query I rowsort label-3179
SELECT - col2 DIV ( + cor0.col1 ) - col0 AS col2 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-3179
SELECT - col2 / ( + cor0.col1 ) - col0 AS col2 FROM tab0 AS cor0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * 50 - + col1 col0 FROM tab1
----
2674
2840
4787

query I rowsort
SELECT + 13 - cor0.col2 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 985e1ee456f873486077429301955321

query I rowsort
SELECT - col2 + - 97 FROM tab1 AS cor0
----
-151
-154
-193

query I rowsort
SELECT ALL ( + col1 ) * - col0 + col0 AS col2 FROM tab2
----
-1264
-210
-4524

onlyif mysql # use DIV operator for integer division
query I rowsort label-3184
SELECT DISTINCT - 84 * - tab0.col1 * - col1 + - col0 DIV col1 + col0 * + col2 FROM tab0
----
-620472
-688306
-790321

skipif mysql # not compatible
query I rowsort label-3184
SELECT DISTINCT - 84 * - tab0.col1 * - col1 + - col0 / col1 + col0 * + col2 FROM tab0
----
-620472
-688306
-790321

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3185
SELECT + col1 / + col0 + col1 * - CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3185
SELECT + col1 / + col0 + col1 * - CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT 79 + - col2 FROM tab2 AS cor0
----
41
52
53

query I rowsort
SELECT DISTINCT 86 AS col2 FROM tab0 AS cor0
----
86

onlyif mysql # use DIV operator for integer division
query I rowsort label-3188
SELECT + col2 DIV cor0.col2 AS col2 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3188
SELECT + col2 / cor0.col2 AS col2 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT ALL + - ( col1 ) AS col0 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT + ( col0 ) AS col0 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT DISTINCT col2 * 63 FROM tab0 AS cor0
----
2079
5166
63

query I rowsort
SELECT + + 59 + col2 + + col0 * - col2 FROM tab1 AS cor0
----
-3532
-49
-7525

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab2, tab0 AS cor0, tab0 cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

onlyif mysql # use DIV operator for integer division
query I rowsort label-3194
SELECT - col0 DIV col2 + 7 * tab0.col0 DIV col2 FROM tab0
----
210
5
6

skipif mysql # not compatible
query I rowsort label-3194
SELECT - col0 / col2 + 7 * tab0.col0 / col2 FROM tab0
----
210
5
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-3195
SELECT ALL + col0 * - col2 + - col0 * col1 - 67 DIV col1 AS col1 FROM tab1 AS cor0
----
-242
-4294
-8725

skipif mysql # not compatible
query I rowsort label-3195
SELECT ALL + col0 * - col2 + - col0 * col1 - 67 / col1 AS col1 FROM tab1 AS cor0
----
-242
-4294
-8725

query I rowsort
SELECT + - col2 + cor0.col2 * 1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col1 * - 55 + + col0 * - col0 AS col1 FROM tab1 AS cor0
----
-1439
-4646
-7115

query I rowsort
SELECT DISTINCT + col1 + col0 + col2 * col1 AS col0 FROM tab2 AS cor0
----
1671
742
875

query I rowsort
SELECT DISTINCT - + col1 + - 64 AS col0 FROM tab1 AS cor0
----
-74
-77
-90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3200
SELECT - col2 + - CAST( + col0 AS SIGNED ) FROM tab2 AS cor0
----
-104
-117
-34

skipif mysql # not compatible
query I rowsort label-3200
SELECT - col2 + - CAST ( + col0 AS INTEGER ) FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT ALL + - col2 - + 48 AS col0 FROM tab1 AS cor0
----
-102
-105
-144

onlyif mysql # use DIV operator for integer division
query I rowsort label-3202
SELECT + col0 - + col2 DIV + 61 AS col2 FROM tab1 AS cor0
----
3
64
79

skipif mysql # not compatible
query I rowsort label-3202
SELECT + col0 - + col2 / + 61 AS col2 FROM tab1 AS cor0
----
3
64
79

query I rowsort
SELECT + - col1 * col1 - - col0 * - col1 FROM tab0 AS cor0
----
-12804
-16380
-9460

query I rowsort
SELECT - col2 + 9 FROM tab2 AS cor0
----
-17
-18
-29

query I rowsort
SELECT - col0 + 66 AS col0 FROM tab1 AS cor0
----
-14
2
63

onlyif mysql # use DIV operator for integer division
query I rowsort label-3206
SELECT + cor0.col0 DIV col1 - + col2 * + col2 FROM tab1 AS cor0
----
-2916
-3243
-9210

skipif mysql # not compatible
query I rowsort label-3206
SELECT + cor0.col0 / col1 - + col2 * + col2 FROM tab1 AS cor0
----
-2916
-3243
-9210

query I rowsort
SELECT ALL - - col2 + col2 - col0 FROM tab0 cor0
----
-33
42
75

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3208
SELECT ALL col0 * col1 * + CAST( NULL AS DECIMAL ) col1 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3208
SELECT ALL col0 * col1 * + CAST ( NULL AS REAL ) col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col1 * + 73 AS col0 FROM tab2 AS cor0
----
-1241
-2263
-4307

query I rowsort
SELECT cor1.col1 FROM tab2, tab0 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to 8c9db501a604ea66e3b5e5598f3f2a91

query I rowsort
SELECT ALL 47 * cor1.col0 + 25 * - cor0.col2 AS col1 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to d4c704c4f7be6f58c228f7ecadf6a557

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col2 * tab0.col2 col1 FROM tab0
----
1113
36
6813

query I rowsort
SELECT ALL + col0 * col2 * col2 - - col0 AS col0 FROM tab0 cor0
----
26160
598525
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-3214
SELECT ALL - col1 DIV - cor0.col0 AS col2 FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-3214
SELECT ALL - col1 / - cor0.col0 AS col2 FROM tab1 AS cor0
----
0
0
8

query I rowsort
SELECT + 50 FROM tab2, tab1 AS cor0, tab0 cor1
----
27 values hashing to 314aace40e704c20a6be06204a329f80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * col0 col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT + 79 AS col0 FROM tab1, tab1 AS cor0
----
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3218
SELECT DISTINCT - - col1 + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3218
SELECT DISTINCT - - col1 + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL - 32 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to ef8f93119983b962f4c81381ebf4b1e6

query I rowsort
SELECT col1 * ( + 15 ) - - tab2.col1 FROM tab2
----
272
496
944

query I rowsort
SELECT ALL + + col0 + 61 AS col0 FROM tab0 AS cor0
----
150
85
96

query I rowsort
SELECT ALL - ( - col2 ) + + col0 * col2 FROM tab2 AS cor0
----
2054
216
3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-3223
SELECT ALL + 52 + + cor0.col1 DIV + col0 FROM tab0 AS cor0
----
53
54
55

skipif mysql # not compatible
query I rowsort label-3223
SELECT ALL + 52 + + cor0.col1 / + col0 FROM tab0 AS cor0
----
53
54
55

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3224
SELECT + CAST( 12 AS SIGNED ) - - col0 FROM tab2 cor0
----
19
90
91

skipif mysql # not compatible
query I rowsort label-3224
SELECT + CAST ( 12 AS INTEGER ) - - col0 FROM tab2 cor0
----
19
90
91

query I rowsort
SELECT ALL 10 * - 47 + + col1 FROM tab0 AS cor0
----
-373
-379
-384

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3226
SELECT + col2 * + col1 + col0 * + CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3226
SELECT + col2 * + col1 + 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-3227
SELECT ALL + CAST( + 13 AS SIGNED ) AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 184e52d7aa5aa66591291e39c67a3dfb

skipif mysql # not compatible
query I rowsort label-3227
SELECT ALL + CAST ( + 13 AS INTEGER ) AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 184e52d7aa5aa66591291e39c67a3dfb

query I rowsort
SELECT col0 - + ( - tab1.col0 ) * + col0 FROM tab1
----
12
4160
6480

onlyif mysql # use DIV operator for integer division
query I rowsort label-3229
SELECT col0 * col2 DIV ( cor0.col0 * cor0.col0 ) FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-3229
SELECT col0 * col2 / ( cor0.col0 * cor0.col0 ) FROM tab1 AS cor0
----
0
1
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-3230
SELECT - ( cor0.col2 ) * col1 DIV + 24 FROM tab2 AS cor0
----
-26
-34
-63

skipif mysql # not compatible
query I rowsort label-3230
SELECT - ( cor0.col2 ) * col1 / + 24 FROM tab2 AS cor0
----
-26
-34
-63

query I rowsort
SELECT ALL - + col2 * + col1 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT - 43 * col1 AS col0 FROM tab1 AS cor0
----
-1118
-430
-559

query I rowsort
SELECT ( + ( + col1 ) ) FROM tab2
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * - col1 + col1 * col2 col2 FROM tab2 AS cor0
----
-124
-1947
357

query I rowsort
SELECT ALL + ( - col0 ) FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT 31 + col0 FROM tab1 AS cor0
----
111
34
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col1 * col1 + - col2 col2 FROM tab0 AS cor0
----
7363
8199
9408

onlyif mysql # use DIV operator for integer division
query I rowsort label-3238
SELECT DISTINCT - + col2 DIV - col0 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-3238
SELECT DISTINCT - + col2 / - col0 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT + + 14 + cor0.col2 * 85 + + col2 AS col1 FROM tab2 AS cor0
----
2250
2336
3282

query I rowsort
SELECT ALL 23 * - col0 * - col1 + 84 * col1 AS col0 FROM tab1
----
15560
25012
3978

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3241
SELECT DISTINCT CAST( NULL AS SIGNED ) * col0 + col1 * CAST( NULL AS SIGNED ) + - 79 AS col2 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-3241
SELECT DISTINCT CAST ( NULL AS INTEGER ) * col0 + col1 * CAST ( NULL AS INTEGER ) + - 79 AS col2 FROM tab0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * - col2 col0 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT + 28 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

query I rowsort
SELECT - + 97 AS col1 FROM tab2 AS cor0
----
-97
-97
-97

query I rowsort
SELECT ALL - + col2 * + col2 AS col0 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT - col2 + + col2 * - 44 * + col1 AS col1 FROM tab1 AS cor0
----
-25137
-55008
-61830

query I rowsort
SELECT - - 95 AS col2 FROM tab2 AS cor0
----
95
95
95

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3248
SELECT + - col1 * col1 + - CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3248
SELECT + - col1 * col1 + - CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 + - col0 + col0 AS col1 FROM tab0
----
1
33
82

query I rowsort
SELECT DISTINCT col1 * col0 + col1 FROM tab1
----
104
1053
650

query I rowsort
SELECT tab2.col1 - tab2.col1 * col2 AS col2 FROM tab2 WHERE NOT ( NULL ) < ( col2 )
----

query I rowsort
SELECT - col0 * col1 + ( 99 ) FROM tab1 AS cor0
----
-541
-941
21

query I rowsort
SELECT DISTINCT - cor0.col1 + cor0.col2 AS col0 FROM tab0, tab1, tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT - 30 AS col2 FROM tab1
----
-30
-30
-30

query I rowsort
SELECT DISTINCT + ( + col2 + + col2 ) FROM tab2
----
52
54
76

query III rowsort
SELECT * FROM tab2 WHERE NOT + col2 IN ( col1 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL < col2
----

query I rowsort
SELECT - tab2.col2 FROM tab2 WHERE NULL >= NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3259
SELECT col0 + tab0.col1 DIV col0 FROM tab0
----
27
37
90

skipif mysql # not compatible
query I rowsort label-3259
SELECT col0 + tab0.col1 / col0 FROM tab0
----
27
37
90

query I rowsort
SELECT tab1.col0 - col0 AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT - col2 - - col1 * col0 AS col2 FROM tab0
----
2031
3394
8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-3262
SELECT ALL col2 + col0 DIV col0 AS col1 FROM tab0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-3262
SELECT ALL col2 + col0 / col0 AS col1 FROM tab0
----
2
34
83

query I rowsort
SELECT DISTINCT tab1.col0 + col0 * tab1.col2 AS col2 FROM tab1
----
165
3712
7760

query III rowsort
SELECT * FROM tab1 WHERE ( - col1 + col2 ) IN ( + col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3265
SELECT col1 DIV - col0 + - col0 FROM tab0
----
-27
-37
-90

skipif mysql # not compatible
query I rowsort label-3265
SELECT col1 / - col0 + - col0 FROM tab0
----
-27
-37
-90

query I rowsort
SELECT DISTINCT col0 - - col0 AS col1 FROM tab1
----
128
160
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-3267
SELECT DISTINCT + tab1.col1 DIV col1 + col2 AS col0 FROM tab1
----
55
58
97

skipif mysql # not compatible
query I rowsort label-3267
SELECT DISTINCT + tab1.col1 / col1 + col2 AS col0 FROM tab1
----
55
58
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3268
SELECT ALL - col1 DIV + col1 AS col1 FROM tab2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3268
SELECT ALL - col1 / + col1 AS col1 FROM tab2
----
-1
-1
-1

query I rowsort
SELECT col1 - - col0 * - tab2.col0 AS col0 FROM tab2
----
-18
-6025
-6224

onlyif mysql # use DIV operator for integer division
query I rowsort label-3270
SELECT ALL - col2 DIV + col1 + + col2 col1 FROM tab1
----
52
52
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3270
SELECT ALL - col2 / + col1 + + col2 col1 FROM tab1
----
52
52
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 47 col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 6942a0d9558277afd0d00408d65cf5aa

query I rowsort
SELECT DISTINCT + 39 * + 21 AS col0 FROM tab1, tab0, tab1 AS cor0
----
819

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col0 col0 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT DISTINCT - tab1.col2 * col2 * col1 AS col1 FROM tab1
----
-119808
-32490
-75816

query I rowsort
SELECT DISTINCT + ( col1 * + col1 ) AS col0 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT + - 68 + + col0 * col2 AS col2 FROM tab0 cor0
----
-33
7230
724

onlyif mysql # use DIV operator for integer division
query I rowsort label-3277
SELECT ALL - col2 - - col1 DIV 56 FROM tab2
----
-25
-27
-38

skipif mysql # not compatible
query I rowsort label-3277
SELECT ALL - col2 - - col1 / 56 FROM tab2
----
-25
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-3278
SELECT - cor0.col1 * col0 + - col2 * - col2 - col1 DIV col0 FROM tab1 AS cor0
----
2609
2830
8176

skipif mysql # not compatible
query I rowsort label-3278
SELECT - cor0.col1 * col0 + - col2 * - col2 - col1 / col0 FROM tab1 AS cor0
----
2609
2830
8176

query I rowsort
SELECT + 14 * col1 FROM tab0 AS cor0
----
1204
1274
1358

query I rowsort
SELECT - cor0.col0 + - col1 + - 92 FROM tab2 cor0
----
-130
-188
-229

query I rowsort
SELECT 35 * - col1 - + col2 * - cor0.col2 * - col1 AS col1 FROM tab1 cor0
----
-120263
-32840
-76726

query I rowsort
SELECT DISTINCT - - col1 * cor0.col0 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - - col1 * cor0.col2 + col1 * - col2 - + col2 * ( + col1 ) FROM tab0 AS cor0
----
-2838
-7462
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 84 + col1 col0 FROM tab1 AS cor0
----
110
94
97

query I rowsort
SELECT ALL + + col2 * col0 + - 41 FROM tab2 cor0
----
148
1987
2961

query I rowsort
SELECT + - col1 + cor0.col0 * 84 AS col2 FROM tab1 AS cor0
----
226
5366
6707

query I rowsort
SELECT DISTINCT col1 * + ( - col2 * + col2 ) - - 0 * col2 FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT ALL - + col1 + col0 * + col2 FROM tab0 AS cor0
----
-62
706
7207

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - col2 + + col1 col1 FROM tab2 cor0
----
-1427
-617
-698

query I rowsort
SELECT - col1 * 5 * col1 + col2 FROM tab2 AS cor0
----
-1407
-17379
-4778

query I rowsort
SELECT - col1 + + ( - 52 ) * - col0 FROM tab1 AS cor0
----
130
3318
4147

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab1 cor2, tab0 AS cor3
----
3645 values hashing to 9d746e15fdb5adcb43a7518cd9743eb3

query I rowsort
SELECT - - 75 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

query I rowsort
SELECT DISTINCT - 27 AS col1 FROM tab0 AS cor0
----
-27

query I rowsort
SELECT ALL col1 * cor0.col0 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL 35 AS col0 FROM tab1 AS cor0
----
35
35
35

query I rowsort
SELECT DISTINCT 57 FROM tab1 AS cor0
----
57

query I rowsort
SELECT ALL 13 - - col1 AS col2 FROM tab1 AS cor0
----
23
26
39

query I rowsort
SELECT ALL 73 + col0 FROM tab2 AS cor0
----
151
152
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-3300
SELECT ALL col1 DIV col1 + + cor0.col0 * - cor0.col1 + - col0 AS col0 FROM tab0 AS cor0
----
-2087
-3429
-8187

skipif mysql # not compatible
query I rowsort label-3300
SELECT ALL col1 / col1 + + cor0.col0 * - cor0.col1 + - col0 AS col0 FROM tab0 AS cor0
----
-2087
-3429
-8187

query I rowsort
SELECT DISTINCT + 24 * col2 AS col2 FROM tab0 AS cor0
----
1968
24
792

query I rowsort
SELECT DISTINCT + - 74 FROM tab1 AS cor0
----
-74

query I rowsort
SELECT ALL - 86 FROM tab2, tab1 AS cor0
----
9 values hashing to 9ac806793c03d3a6b5e3a3029d20e4da

query I rowsort
SELECT ALL + 85 * + col2 * tab1.col2 AS col1 FROM tab1
----
247860
276165
783360

query I rowsort
SELECT ALL - 2 AS col2 FROM tab0 cor0
----
-2
-2
-2

query I rowsort
SELECT ALL - col0 - - tab1.col1 * - col2 AS col1 FROM tab1
----
-1328
-1407
-634

query I rowsort
SELECT DISTINCT - tab2.col2 AS col1 FROM tab2, tab1 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT - col0 * - col0 * col1 + col0 AS col1 FROM tab0
----
118860
49560
720900

query I rowsort
SELECT ALL col2 + - tab1.col0 * col0 - col0 * tab1.col1 AS col0 FROM tab1
----
-33
-4679
-7344

query I rowsort
SELECT + col2 * col1 + + col1 + + col2 FROM tab0
----
195
2957
7635

query I rowsort
SELECT DISTINCT + ( col0 ) + col1 + col1 * col1 AS col1 FROM tab1
----
174
262
705

query I rowsort
SELECT ALL - ( + col1 ) * + col1 AS col2 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT - + cor0.col2 + col2 + - col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL + 99 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

query I rowsort
SELECT DISTINCT tab1.col2 * + 92 + - 5 FROM tab1
----
4963
5239
8827

query I rowsort
SELECT col1 + + ( 83 ) AS col2 FROM tab2
----
100
114
142

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3317
SELECT + CAST( col0 * - col0 AS SIGNED ) + + col1 FROM tab0
----
-1128
-490
-7830

skipif mysql # not compatible
query I rowsort label-3317
SELECT + CAST ( col0 * - col0 AS INTEGER ) + + col1 FROM tab0
----
-1128
-490
-7830

query I rowsort
SELECT 35 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3319
SELECT - CAST( + col1 AS SIGNED ) + + col0 * + col1 AS col2 FROM tab0 AS cor0
----
1978
3298
8008

skipif mysql # not compatible
query I rowsort label-3319
SELECT - CAST ( + col1 AS INTEGER ) + + col0 * + col1 AS col2 FROM tab0 AS cor0
----
1978
3298
8008

query I rowsort
SELECT DISTINCT ( + col0 ) + cor0.col0 - col1 FROM tab0 cor0
----
-27
-38
87

query I rowsort
SELECT tab2.col1 / col1 AS col1 FROM tab2 WHERE NULL < - col2 - - col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3322
SELECT - col1 DIV + tab0.col1 + col1 * col0 * col2 AS col2 FROM tab0
----
3394
664117
68111

skipif mysql # not compatible
query I rowsort label-3322
SELECT - col1 / + tab0.col1 + col1 * col0 * col2 AS col2 FROM tab0
----
3394
664117
68111

query I rowsort
SELECT + col0 * col1 + col2 * cor0.col2 + col0 FROM tab1 AS cor0
----
10336
2997
3953

query I rowsort
SELECT + col1 + - col2 + - col0 * - col0 AS col1 FROM tab2 AS cor0
----
53
6117
6220

onlyif mysql # use DIV operator for integer division
query I rowsort label-3325
SELECT ALL col0 DIV col1 + col2 AS col2 FROM tab2 AS cor0
----
27
27
42

skipif mysql # not compatible
query I rowsort label-3325
SELECT ALL col0 / col1 + col2 AS col2 FROM tab2 AS cor0
----
27
27
42

query I rowsort
SELECT - col1 * + col2 * + col1 FROM tab1 AS cor0
----
-16224
-36504
-5700

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL < col1 - col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3328
SELECT - col1 DIV - cor0.col2 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-3328
SELECT - col1 / - cor0.col2 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT cor0.col1 * col1 * - cor0.col1 AS col0 FROM tab0 AS cor0
----
-636056
-753571
-912673

query I rowsort
SELECT DISTINCT - col0 + col1 + col0 AS col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT - col0 - + col2 * + col0 AS col1 FROM tab0
----
-70
-7387
-816

onlyif mysql # use DIV operator for integer division
query I rowsort label-3332
SELECT DISTINCT + + cor0.col0 * - col2 - + col1 DIV col2 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif mysql # not compatible
query I rowsort label-3332
SELECT DISTINCT + + cor0.col0 * - col2 - + col1 / col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL col2 * col2 + col2 AS col0 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT col0 * + col0 - col2 FROM tab1 cor0
----
-45
4039
6304

query I rowsort
SELECT DISTINCT + col2 * + col1 * col1 + - col2 AS col0 FROM tab1 AS cor0
----
16128
36450
5643

onlyif mysql # use DIV operator for integer division
query I rowsort label-3336
SELECT DISTINCT col1 + + col1 DIV col0 FROM tab0
----
89
92
99

skipif mysql # not compatible
query I rowsort label-3336
SELECT DISTINCT col1 + + col1 / col0 FROM tab0
----
89
92
99

query I rowsort
SELECT col0 * col2 + - col0 + + col0 * col0 FROM tab1
----
14000
168
7680

query I rowsort
SELECT + col0 + col0 + - col1 AS col2 FROM tab0
----
-27
-38
87

query I rowsort
SELECT ALL - col2 * + col2 + col0 FROM tab2
----
-1365
-598
-722

query I rowsort
SELECT ALL - col0 + - col1 * col2 AS col0 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT DISTINCT + col0 * - col0 + col2 FROM tab0 cor0
----
-1224
-543
-7839

query I rowsort
SELECT - + cor0.col0 * + cor0.col0 + col1 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT - - col2 + cor0.col0 * - col0 FROM tab2 AS cor0
----
-22
-6058
-6203

query I rowsort
SELECT ALL + col2 * - col1 + - col2 AS col2 FROM tab2 AS cor0
----
-1560
-684
-864

query I rowsort
SELECT ALL + col0 + col0 * cor0.col1 AS col2 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT + + col2 + col2 + col0 FROM tab1 AS cor0
----
111
178
272

query I rowsort
SELECT + + col0 + - cor0.col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT - cor0.col0 * + col1 + - col2 AS col2 FROM tab0 cor0
----
-2097
-3396
-8181

query I rowsort
SELECT DISTINCT - col2 * + tab2.col0 + col2 * + col2 FROM tab2
----
-1352
-1558
540

onlyif mysql # use DIV operator for integer division
query I rowsort label-3350
SELECT ALL - + col0 + col1 DIV - col1 FROM tab0 AS cor0
----
-25
-36
-90

skipif mysql # not compatible
query I rowsort label-3350
SELECT ALL - + col0 + col1 / - col1 FROM tab0 AS cor0
----
-25
-36
-90

query I rowsort
SELECT DISTINCT - col1 + - col0 AS col0 FROM tab1 AS cor0
----
-29
-74
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-3352
SELECT DISTINCT col1 + tab0.col1 DIV col2 AS col2 FROM tab0
----
194
88
92

skipif mysql # not compatible
query I rowsort label-3352
SELECT DISTINCT col1 + tab0.col1 / col2 AS col2 FROM tab0
----
194
88
92

query I rowsort
SELECT col1 * + col0 * col0 - col1 * col2 FROM tab2
----
105451
357422
682

query I rowsort
SELECT ALL - col1 + col2 * col2 AS col1 FROM tab1
----
2890
3239
9203

query I rowsort
SELECT ALL col0 + + col0 * col0 * col2 FROM tab1
----
233536
489
614480

query I rowsort
SELECT col0 - col0 * + col1 FROM tab0
----
-2040
-3360
-8010

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3357
SELECT - + col1 * CAST( NULL AS SIGNED ) - - col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3357
SELECT - + col1 * CAST ( NULL AS INTEGER ) - - col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + col1 - ( - 96 ) AS col2 FROM tab1 AS cor0
----
106
109
122

query I rowsort
SELECT ALL - col0 - col2 AS col2 FROM tab0 AS cor0
----
-171
-36
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * ( + col0 + col2 ) col2 FROM tab2 AS cor0
----
2704
4446
918

query I rowsort
SELECT - tab1.col0 * + 14 FROM tab1
----
-1120
-42
-896

onlyif mysql # use DIV operator for integer division
query I rowsort label-3362
SELECT ALL + col0 * col2 DIV col0 - - col1 FROM tab1 AS cor0
----
109
67
80

skipif mysql # not compatible
query I rowsort label-3362
SELECT ALL + col0 * col2 / col0 - - col1 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-3363
SELECT - col0 + + 27 DIV - col1 FROM tab1 AS cor0
----
-4
-66
-82

skipif mysql # not compatible
query I rowsort label-3363
SELECT - col0 + + 27 / - col1 FROM tab1 AS cor0
----
-4
-66
-82

query I rowsort
SELECT 35 * - col0 - col1 AS col1 FROM tab1 AS cor0
----
-131
-2250
-2813

query I rowsort
SELECT + + 38 + - col1 * col1 FROM tab2 AS cor0
----
-251
-3443
-923

onlyif mysql # use DIV operator for integer division
query I rowsort label-3366
SELECT - col2 * - 83 - col1 DIV col1 AS col0 FROM tab2 AS cor0
----
2157
2240
3153

skipif mysql # not compatible
query I rowsort label-3366
SELECT - col2 * - 83 - col1 / col1 AS col0 FROM tab2 AS cor0
----
2157
2240
3153

query I rowsort
SELECT + + 54 FROM tab1 AS cor0
----
54
54
54

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3368
SELECT CAST( 50 AS SIGNED ) + col2 AS col2 FROM tab2 AS cor0
----
76
77
88

skipif mysql # not compatible
query I rowsort label-3368
SELECT CAST ( 50 AS INTEGER ) + col2 AS col2 FROM tab2 AS cor0
----
76
77
88

query I rowsort
SELECT ALL + col0 + + col0 + - col1 FROM tab2
----
-17
141
97

query I rowsort
SELECT DISTINCT + 21 FROM tab1 AS cor0
----
21

query I rowsort
SELECT + + cor0.col0 * - col0 AS col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT + ( - cor0.col2 ) FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT + + 98 + + col1 * - 93 AS col2 FROM tab0 AS cor0
----
-7900
-8365
-8923

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 7 col0 FROM tab1 AS cor0
----
7
7
7

query I rowsort
SELECT - cor0.col2 * - col2 FROM tab1 cor0
----
2916
3249
9216

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3376
SELECT ALL - col1 + + col0 * CAST( NULL AS DECIMAL ) / col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3376
SELECT ALL - col1 + + col0 * CAST ( NULL AS REAL ) / col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col2 + - col1 - - col0 FROM tab1 AS cor0
----
-29
-3
-77

query I rowsort
SELECT + 98 * + col1 AS col1 FROM tab1 cor0
----
1274
2548
980

query I rowsort
SELECT DISTINCT - + 71 * cor0.col1 FROM tab0 AS cor0
----
-6106
-6461
-6887

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + ( + col2 ) col0 FROM tab2
----
55
58
85

query I rowsort
SELECT tab2.col2 - + tab2.col2 AS col2 FROM tab2
----
0
0
0

query I rowsort
SELECT col1 * + col2 * col1 + 38 FROM tab2
----
11020
25985
90544

query I rowsort
SELECT ALL + + cor0.col0 + + col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL col2 * - col1 - - cor0.col2 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT tab0.col0 FROM tab0, tab2 AS cor0, tab2, tab1 AS cor1
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

query I rowsort
SELECT + col1 * ( 62 ) * + col0 FROM tab2 AS cor0
----
13454
285324
83266

query I rowsort
SELECT col2 * - 72 FROM tab2 AS cor0
----
-1872
-1944
-2736

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * col1 col0 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT 5 AS col2 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 6797d40099023779b89feb627d94a3e7

query I rowsort
SELECT DISTINCT col2 * + tab2.col0 FROM tab2
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3392
SELECT + cor0.col0 * + CAST( NULL AS SIGNED ) AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3392
SELECT + cor0.col0 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * - 0 - + 11 FROM tab1
----
-11
-11
-11

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab1 AS cor2
----
3645 values hashing to e5255b2277726ba4514ff55622dec830

query I rowsort
SELECT + 22 FROM tab2, tab0 AS cor0 CROSS JOIN tab0
----
27 values hashing to 7dda382e7c08428abac8600fd696eb3e

onlyif mysql # use DIV operator for integer division
query I rowsort label-3396
SELECT ALL ( col1 ) DIV + col0 AS col0 FROM tab2
----
0
0
4

skipif mysql # not compatible
query I rowsort label-3396
SELECT ALL ( col1 ) / + col0 AS col0 FROM tab2
----
0
0
4

query I rowsort
SELECT col0 + col1 + col1 AS col1 FROM tab2
----
113
196
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-3398
SELECT DISTINCT + 66 DIV 57 FROM tab2 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-3398
SELECT DISTINCT + 66 / 57 FROM tab2 AS cor0
----
1

query I rowsort
SELECT - ( col2 ) * + col2 AS col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT ALL col0 * + col2 + col0 * 15 AS col2 FROM tab0 AS cor0
----
1152
560
8633

query I rowsort
SELECT DISTINCT 64 AS col1 FROM tab1 AS cor0
----
64

query I rowsort
SELECT ALL - - ( col1 ) * col0 AS col2 FROM tab1 cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-3403
SELECT + col0 * + col1 DIV col1 AS col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3403
SELECT + col0 * + col1 / col1 AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - col1 * - 87 FROM tab1 AS cor0
----
1131
2262
870

onlyif mysql # use DIV operator for integer division
query I rowsort label-3405
SELECT + - 66 DIV - col2 FROM tab1 cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-3405
SELECT + - 66 / - col2 FROM tab1 cor0
----
0
1
1

query I rowsort
SELECT + 63 * col1 FROM tab2 AS cor0
----
1071
1953
3717

onlyif mysql # use DIV operator for integer division
query I rowsort label-3407
SELECT DISTINCT CAST( + col0 AS SIGNED ) DIV tab0.col2 FROM tab0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-3407
SELECT DISTINCT CAST ( + col0 AS INTEGER ) / tab0.col2 FROM tab0
----
0
1
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-3408
SELECT DISTINCT 92 DIV + cor1.col1 AS col0 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
0
1

skipif mysql # not compatible
query I rowsort label-3408
SELECT DISTINCT 92 / + cor1.col1 AS col0 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
0
1

query I rowsort
SELECT + col1 * col1 * 79 FROM tab0 AS cor0
----
584284
654199
743311

query I rowsort
SELECT - cor0.col2 + col1 + col2 FROM tab2 AS cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 56 + + cor0.col0 col2 FROM tab0 AS cor0
----
145
80
91

query I rowsort
SELECT - 0 + - 39 FROM tab1 cor0
----
-39
-39
-39

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3413
SELECT DISTINCT CAST( + 24 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
24

skipif mysql # not compatible
query I rowsort label-3413
SELECT DISTINCT CAST ( + 24 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-3414
SELECT DISTINCT col1 * 8 DIV + col0 AS col1 FROM tab1 AS cor0
----
1
69

skipif mysql # not compatible
query I rowsort label-3414
SELECT DISTINCT col1 * 8 / + col0 AS col1 FROM tab1 AS cor0
----
1
69

skipif mysql # not compatible
query I rowsort
SELECT ALL + + col2 + + ( col2 ) * CAST ( 42 AS REAL ) AS col2 FROM tab1 AS cor0
----
2322
2451
4128

query I rowsort
SELECT - - cor0.col2 + 94 FROM tab0 AS cor0
----
127
176
95

query I rowsort
SELECT ALL col2 * col1 + cor0.col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT ALL + col2 + - 64 * - cor0.col1 AS col2 FROM tab0 AS cor0
----
5537
5906
6209

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - ( - col1 ) + + col0 * - ( 1 ) col0 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT ALL col1 * + col2 AS col1 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3421
SELECT CAST( + col1 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-3421
SELECT CAST ( + col1 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-3422
SELECT ALL + CAST( + col2 AS SIGNED ) DIV - col2 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3422
SELECT ALL + CAST ( + col2 AS INTEGER ) / - col2 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + 52 * 96 AS col1 FROM tab2 AS cor0
----
4992
4992
4992

query I rowsort
SELECT DISTINCT - - 56 * 78 FROM tab0 AS cor0
----
4368

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3425
SELECT DISTINCT - - CAST( col2 AS SIGNED ) + col1 + - col0 * 71 AS col1 FROM tab0 AS cor0
----
-1585
-2387
-6146

skipif mysql # not compatible
query I rowsort label-3425
SELECT DISTINCT - - CAST ( col2 AS INTEGER ) + col1 + - col0 * 71 AS col1 FROM tab0 AS cor0
----
-1585
-2387
-6146

query I rowsort
SELECT ALL 2 + col2 AS col1 FROM tab0 AS cor0
----
3
35
84

query I rowsort
SELECT ALL col0 - + col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT cor1.col1 AS col1 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT + col1 + + cor0.col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL 17 * + col2 AS col1 FROM tab1 AS cor0
----
1632
918
969

query I rowsort
SELECT ALL + + col0 + - 82 AS col0 FROM tab2 AS cor0
----
-3
-4
-75

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 cor0, tab2 AS cor1, tab1 AS cor2
----
972 values hashing to 75a813ebd5ec5ec2e67a66d0593ff763

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3433
SELECT - col1 * CAST( NULL AS SIGNED ) + + 6 * - col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3433
SELECT - col1 * CAST ( NULL AS INTEGER ) + + 6 * - col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort
SELECT ALL - - col2 + CAST ( + cor0.col0 AS REAL ) * - col1 AS col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT DISTINCT - col2 * ( ( cor0.col1 ) ) FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT + 68 * tab0.col2 * - col0 AS col0 FROM tab0
----
-2380
-496264
-53856

query I rowsort
SELECT ALL - col2 + - col2 + col1 * - col2 FROM tab0
----
-2904
-7626
-99

query I rowsort
SELECT ALL col1 + ( 47 ) AS col2 FROM tab1
----
57
60
73

query I rowsort
SELECT ALL + col2 + - 76 * + col0 AS col0 FROM tab0
----
-1791
-2659
-6682

query I rowsort
SELECT DISTINCT + 28 AS col2 FROM tab2, tab1 AS cor0
----
28

query I rowsort
SELECT ALL - col2 + col1 + col1 * col2 FROM tab1
----
1165
1376
523

onlyif mysql # use DIV operator for integer division
query I rowsort label-3442
SELECT ALL - tab0.col2 * col2 + - col0 DIV col2 col2 FROM tab0
----
-1089
-36
-6725

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3442
SELECT ALL - tab0.col2 * col2 + - col0 / col2 col2 FROM tab0
----
-1089
-36
-6725

query I rowsort
SELECT + - col1 * col1 + - col1 AS col0 FROM tab0 AS cor0
----
-7482
-8372
-9506

onlyif mysql # use DIV operator for integer division
query I rowsort label-3444
SELECT + 3 DIV 87 + - col0 * - col1 AS col0 FROM tab2 AS cor0
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-3444
SELECT + 3 / 87 + - col0 * - col1 AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + col2 * + col2 + tab1.col0 FROM tab1
----
2919
3313
9296

onlyif mysql # use DIV operator for integer division
query I rowsort label-3446
SELECT DISTINCT + 28 DIV - 78 FROM tab2
----
0

skipif mysql # not compatible
query I rowsort label-3446
SELECT DISTINCT + 28 / - 78 FROM tab2
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3447
SELECT + cor0.col2 DIV cor0.col0 AS col2 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3447
SELECT + cor0.col2 / cor0.col0 AS col2 FROM tab0 AS cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3448
SELECT DISTINCT + col0 + 26 DIV col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3448
SELECT DISTINCT + col0 + 26 / col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL - + ( + col1 ) * - col0 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL - 76 FROM tab0 AS cor0
----
-76
-76
-76

query I rowsort
SELECT - + cor0.col1 * - cor0.col0 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL - 50 * cor0.col1 * col0 AS col0 FROM tab2 AS cor0
----
-10850
-230100
-67150

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3453
SELECT DISTINCT - + CAST( NULL AS SIGNED ) * col0 AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3453
SELECT DISTINCT - + CAST ( NULL AS INTEGER ) * col0 AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT col2 * col2 * + tab0.col1 + + col0 AS col0 FROM tab0
----
132
611973
93678

query I rowsort
SELECT 42 * + col2 + - ( ( col2 ) ) + - col2 AS col2 FROM tab2
----
1040
1080
1520

query I rowsort
SELECT DISTINCT + 86 - col0 AS col0 FROM tab0
----
-3
51
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-3457
SELECT - ( col2 ) DIV ( + col1 + col0 * + col0 ) FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3457
SELECT - ( col2 ) / ( + col1 + col0 * + col0 ) FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3458
SELECT ALL + col0 + - col2 DIV col0 + + col2 DIV - col0 AS col0 FROM tab1 AS cor0
----
-33
64
78

skipif mysql # not compatible
query I rowsort label-3458
SELECT ALL + col0 + - col2 / col0 + + col2 / - col0 AS col0 FROM tab1 AS cor0
----
-33
64
78

query I rowsort
SELECT DISTINCT - + 99 + col2 AS col2 FROM tab2 AS cor0
----
-61
-72
-73

query I rowsort
SELECT DISTINCT 10 AS col0 FROM tab1
----
10

onlyif mysql # use DIV operator for integer division
query I rowsort label-3461
SELECT ALL - cor0.col2 DIV - ( 31 + - col2 ) FROM tab1 AS cor0
----
-1
-2
-2

skipif mysql # not compatible
query I rowsort label-3461
SELECT ALL - cor0.col2 / - ( 31 + - col2 ) FROM tab1 AS cor0
----
-1
-2
-2

query I rowsort
SELECT + + col0 + - 83 FROM tab2 AS cor0
----
-4
-5
-76

onlyif mysql # use DIV operator for integer division
query I rowsort label-3463
SELECT ALL col2 DIV col1 + + 72 FROM tab2 AS cor0
----
72
72
74

skipif mysql # not compatible
query I rowsort label-3463
SELECT ALL col2 / col1 + + 72 FROM tab2 AS cor0
----
72
72
74

query I rowsort
SELECT col1 * + 71 + col1 FROM tab1 AS cor0
----
1872
720
936

query I rowsort
SELECT DISTINCT - col0 * + 58 AS col0 FROM tab0 cor0
----
-1392
-2030
-5162

onlyif mysql # use DIV operator for integer division
query I rowsort label-3466
SELECT col1 + + col1 DIV + 65 AS col2 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-3466
SELECT col1 + + col1 / + 65 AS col2 FROM tab2 AS cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * + 98 col0 FROM tab1 AS cor0
----
1274
2548
980

query I rowsort
SELECT DISTINCT + col2 * - col2 + col2 * + col0 FROM tab2 AS cor0
----
-540
1352
1558

query I rowsort
SELECT - col1 + col2 * 42 AS col1 FROM tab1 AS cor0
----
2242
2384
4019

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3470
SELECT ALL cor0.col1 * - CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3470
SELECT ALL cor0.col1 * - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - col2 + - col0 - - 77 AS col0 FROM tab1 cor0
----
-44
-99
20

query I rowsort
SELECT ALL + col1 - col2 AS col2 FROM tab2
----
-21
33
4

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2, tab0 AS cor0 WHERE ( NULL ) NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT - 29 AS col0 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 56a8aa9e4c5d3c934d1853afeb22653e

query I rowsort
SELECT + col2 + - col1 + col2 FROM tab1
----
104
179
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-3476
SELECT DISTINCT + col2 DIV + 15 FROM tab2 AS cor0
----
1
2

skipif mysql # not compatible
query I rowsort label-3476
SELECT DISTINCT + col2 / + 15 FROM tab2 AS cor0
----
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - 36 col0 FROM tab1 AS cor0
----
-33
28
44

query I rowsort
SELECT + 71 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to c1aace5d5fe27721cc925552513c85c0

query I rowsort
SELECT col0 * - col2 * + 47 FROM tab0 AS cor0
----
-1645
-343006
-37224

query I rowsort
SELECT ( tab0.col2 ) AS col2 FROM tab0
----
1
33
82

query I rowsort
SELECT ALL + + 33 + col2 * cor0.col1 AS col2 FROM tab2 AS cor0
----
1567
679
870

query I rowsort
SELECT - + ( - col1 ) * col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL 48 * col0 AS col0 FROM tab1
----
144
3072
3840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * cor0.col1 * - col1 col1 FROM tab1 AS cor0
----
13520
2028
6400

query I rowsort
SELECT cor0.col2 * - 68 FROM tab2, tab0 AS cor0
----
9 values hashing to 3452369445287b3fdb4ef1c2f2be37af

query I rowsort
SELECT DISTINCT col2 * 24 AS col2 FROM tab0
----
1968
24
792

query I rowsort
SELECT - tab0.col0 * 48 AS col1 FROM tab0
----
-1152
-1680
-4272

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3488
SELECT DISTINCT col0 * CAST( col1 AS SIGNED ) col0 FROM tab2
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3488
SELECT DISTINCT col0 * CAST ( col1 AS INTEGER ) col0 FROM tab2
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-3489
SELECT DISTINCT - col1 DIV 34 FROM tab0
----
-2

skipif mysql # not compatible
query I rowsort label-3489
SELECT DISTINCT - col1 / 34 FROM tab0
----
-2

query I rowsort
SELECT col2 * 2 + col2 + - cor0.col1 AS col1 FROM tab0 AS cor0
----
-94
13
155

query I rowsort
SELECT cor0.col2 + - col2 + col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT col2 * 36 FROM tab2 AS cor0
----
1368
936
972

query I rowsort
SELECT cor0.col1 + ( col1 ) * + col1 * - 67 FROM tab0 AS cor0
----
-495446
-554736
-630306

onlyif mysql # use DIV operator for integer division
query I rowsort label-3494
SELECT 53 DIV - cor0.col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-3494
SELECT 53 / - cor0.col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT + - col1 * + col1 AS col1 FROM tab0 cor0
----
-7396
-8281
-9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3496
SELECT cor0.col2 + - CAST( NULL AS DECIMAL ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3496
SELECT cor0.col2 + - CAST ( NULL AS REAL ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( ( col2 ) ) * - ( col0 ) FROM tab0 cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-3498
SELECT - ( + col1 ) DIV + col1 + - col1 + + 87 * - col0 * col1 FROM tab1 AS cor0
----
-55691
-6813
-90494

skipif mysql # not compatible
query I rowsort label-3498
SELECT - ( + col1 ) / + col1 + - col1 + + 87 * - col0 * col1 FROM tab1 AS cor0
----
-55691
-6813
-90494

query I rowsort
SELECT - col1 * col0 + - cor0.col2 + ( - col1 ) FROM tab0 AS cor0
----
-2183
-3493
-8272

onlyif mysql # use DIV operator for integer division
query I rowsort label-3500
SELECT ALL - - 12 DIV col2 FROM tab0 AS cor0
----
0
0
12

skipif mysql # not compatible
query I rowsort label-3500
SELECT ALL - - 12 / col2 FROM tab0 AS cor0
----
0
0
12

query I rowsort
SELECT DISTINCT - ( col1 ) * + col0 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3502
SELECT + CAST( 55 AS SIGNED ) col2 FROM tab0 AS cor0
----
55
55
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3502
SELECT + CAST ( 55 AS INTEGER ) col2 FROM tab0 AS cor0
----
55
55
55

onlyif mysql # use DIV operator for integer division
query I rowsort label-3503
SELECT + cor0.col2 + col1 DIV - col1 FROM tab1 AS cor0
----
53
56
95

skipif mysql # not compatible
query I rowsort label-3503
SELECT + cor0.col2 + col1 / - col1 FROM tab1 AS cor0
----
53
56
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-3504
SELECT - 65 DIV col0 AS col2 FROM tab0 cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-3504
SELECT - 65 / col0 AS col2 FROM tab0 cor0
----
-1
-2
0

query I rowsort
SELECT + col1 + 93 FROM tab2
----
110
124
152

query I rowsort
SELECT ALL col0 * 17 FROM tab0
----
1513
408
595

query I rowsort
SELECT ALL 43 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 199105619049271147956de52e7f5ed4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3508
SELECT CAST( col2 AS SIGNED ) + cor0.col0 * 43 FROM tab2 AS cor0
----
328
3380
3435

skipif mysql # not compatible
query I rowsort label-3508
SELECT CAST ( col2 AS INTEGER ) + cor0.col0 * 43 FROM tab2 AS cor0
----
328
3380
3435

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + 36 col0 FROM tab1 AS cor0
----
132
90
93

query I rowsort
SELECT ALL + ( - tab2.col0 * + col2 ) + + ( col0 ) * - col1 AS col0 FROM tab2
----
-406
-4345
-6630

query I rowsort
SELECT ALL col0 + + col0 * col1 AS col2 FROM tab1
----
1120
704
81

query I rowsort
SELECT + tab2.col2 * 57 FROM tab2
----
1482
1539
2166

query I rowsort
SELECT DISTINCT - - col0 * col1 + col2 AS col0 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT DISTINCT ( + col1 ) + + col0 * col1 FROM tab0 AS cor0
----
2150
3492
8190

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3515
SELECT CAST( NULL AS SIGNED ) FROM tab2, tab1 AS cor0, tab0 AS cor1, tab0 cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-3515
SELECT CAST ( NULL AS INTEGER ) FROM tab2, tab1 AS cor0, tab0 AS cor1, tab0 cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col2 ) col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT 44 + - col2 AS col1 FROM tab1 AS cor0
----
-10
-13
-52

skipif mysql # not compatible
query I rowsort
SELECT ALL col1 * col2 + - col2 + CAST ( + col0 AS REAL ) FROM tab0 AS cor0
----
131
2829
7469

query I rowsort
SELECT - 30 + - cor0.col1 FROM tab1 AS cor0
----
-40
-43
-56

query I rowsort
SELECT col0 * 53 + cor0.col2 FROM tab1 AS cor0
----
213
3449
4336

query I rowsort
SELECT + 84 + col0 AS col2 FROM tab1 AS cor0
----
148
164
87

query I rowsort
SELECT DISTINCT - + 50 + + col0 AS col0 FROM tab0 AS cor0
----
-15
-26
39

onlyif mysql # use DIV operator for integer division
query I rowsort label-3523
SELECT DISTINCT + col0 DIV - cor0.col0 col0 FROM tab1 AS cor0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3523
SELECT DISTINCT + col0 / - cor0.col0 col0 FROM tab1 AS cor0
----
-1

query I rowsort
SELECT + col2 * + col1 + + col2 AS col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT ALL col2 + + col1 * - col0 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT - - 14 + - col0 AS col1 FROM tab1 AS cor0
----
-50
-66
11

onlyif mysql # use DIV operator for integer division
query I rowsort label-3527
SELECT DISTINCT - ( col2 ) DIV 62 AS col2 FROM tab2 cor0
----
0

skipif mysql # not compatible
query I rowsort label-3527
SELECT DISTINCT - ( col2 ) / 62 AS col2 FROM tab2 cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 78 * - col2 col2 FROM tab1 AS cor0
----
-4212
-4446
-7488

query I rowsort
SELECT ( + col2 ) * + col2 AS col1 FROM tab2
----
1444
676
729

query I rowsort
SELECT + col0 - cor0.col0 * + col2 FROM tab2 AS cor0
----
-182
-1950
-2923

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 - 33 col0 FROM tab1 AS cor0
----
-129
-87
-90

query I rowsort
SELECT + col1 * col0 + - col0 AS col0 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT - col0 * + cor0.col2 + + 12 AS col1 FROM tab2 AS cor0
----
-177
-2016
-2990

query I rowsort
SELECT col1 * ( + 78 ) FROM tab1 AS cor0
----
1014
2028
780

query I rowsort
SELECT - col2 + 60 FROM tab1 cor0
----
-36
3
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-3536
SELECT + 56 DIV tab1.col2 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3536
SELECT + 56 / tab1.col2 FROM tab1
----
0
0
1

query I rowsort
SELECT cor0.col1 + col1 * col1 + cor0.col1 AS col0 FROM tab2 AS cor0
----
1023
323
3599

query I rowsort
SELECT + col0 * + tab1.col0 * - col2 FROM tab1
----
-233472
-486
-614400

query I rowsort
SELECT DISTINCT col1 + + col0 + + 97 FROM tab0
----
207
229
277

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3540
SELECT ALL col0 + - col1 * CAST( - tab0.col1 AS SIGNED ) * col2 + 98 FROM tab0
----
244190
679229
9542

skipif mysql # not compatible
query I rowsort label-3540
SELECT ALL col0 + - col1 * CAST ( - tab0.col1 AS INTEGER ) * col2 + 98 FROM tab0
----
244190
679229
9542

query I rowsort
SELECT - + col0 + 68 AS col1 FROM tab0 AS cor0
----
-21
33
44

query I rowsort
SELECT + + col1 - col1 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + col2 * col1 + - col0 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT - tab1.col1 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT col0 - - ( + col0 ) * + col0 FROM tab1
----
12
4160
6480

query I rowsort
SELECT + tab2.col2 + 76 FROM tab2, tab2 AS cor0
----
9 values hashing to b8ebeb180893a49fe94827361140fff9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + + col0 col0 FROM tab2
----
14
156
158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 7 * + tab0.col0 col0 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 41c825d86021ba0fddfe0a182ab763d7

query I rowsort
SELECT - tab0.col1 AS col2 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT - - col2 * + col2 AS col2 FROM tab1 cor0
----
2916
3249
9216

skipif mysql # not compatible
query I rowsort
SELECT ALL + col2 * col0 + - CAST ( col2 * - col0 AS REAL ) + - tab1.col1 * 65 FROM tab1
----
-1366
14515
6646

query I rowsort
SELECT ALL + 58 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 9ee363c6ac19cfdb8a50c7dfd5cc2b8a

query I rowsort
SELECT ALL - 93 + col0 FROM tab1
----
-13
-29
-90

query I rowsort
SELECT + col0 * + 75 FROM tab2 AS cor0
----
525
5850
5925

onlyif mysql # use DIV operator for integer division
query I rowsort label-3555
SELECT DISTINCT col1 * ( + col0 ) DIV col0 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-3555
SELECT DISTINCT col1 * ( + col0 ) / col0 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3556
SELECT DISTINCT - - col0 + CAST( ( col2 ) AS SIGNED ) AS col1 FROM tab1 AS cor0
----
121
176
57

skipif mysql # not compatible
query I rowsort label-3556
SELECT DISTINCT - - col0 + CAST ( ( col2 ) AS INTEGER ) AS col1 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3557
SELECT + col2 * CAST( + 7 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
182
189
266

skipif mysql # not compatible
query I rowsort label-3557
SELECT + col2 * CAST ( + 7 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
182
189
266

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3558
SELECT + - col1 + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3558
SELECT + - col1 + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 + - col2 * col1 AS col2 FROM tab2 cor0
----
-1456
-567
-830

query I rowsort
SELECT - col2 + - col0 * - col0 * + col2 AS col0 FROM tab0 AS cor0
----
1224
18975
649440

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * - col0 + col1 col2 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT + col1 * 77 * col0 AS col1 FROM tab2 AS cor0
----
103411
16709
354354

query I rowsort
SELECT ALL + - col0 + 69 + + 61 FROM tab2 AS cor0
----
123
51
52

query I rowsort
SELECT DISTINCT - col2 * ( + col2 ) * + col0 AS col2 FROM tab1 AS cor0
----
-207936
-737280
-8748

query I rowsort
SELECT - + col0 * + ( cor0.col0 ) * col0 + col0 AS col0 FROM tab1 AS cor0
----
-24
-262080
-511920

query I rowsort
SELECT - col1 + + col0 * - col0 FROM tab2 AS cor0
----
-6143
-6258
-80

query I rowsort
SELECT - col0 * col0 + col1 AS col1 FROM tab0 cor0
----
-1128
-490
-7830

query I rowsort
SELECT + + 15 * - col0 AS col1 FROM tab2 AS cor0
----
-105
-1170
-1185

query I rowsort
SELECT DISTINCT - cor0.col2 * + col2 + col0 - 96 * col1 * col2 FROM tab0 AS cor0
----
-273513
-722987
-9278

query I rowsort
SELECT DISTINCT 20 AS col2 FROM tab1 cor0
----
20

query I rowsort
SELECT ALL - col1 + - 45 FROM tab0 AS cor0
----
-131
-136
-142

query I rowsort
SELECT DISTINCT - ( 0 ) FROM tab2 AS cor0
----
0

query I rowsort
SELECT - cor0.col1 + + 8 FROM tab1 cor0
----
-18
-2
-5

query I rowsort
SELECT DISTINCT + - 64 + col2 FROM tab2 cor0
----
-26
-37
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-3575
SELECT + col2 * col0 * col0 + 44 DIV cor0.col1 FROM tab0 AS cor0
----
1225
19008
649522

skipif mysql # not compatible
query I rowsort label-3575
SELECT + col2 * col0 * col0 + 44 / cor0.col1 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT ALL cor0.col1 * 68 - - col1 FROM tab0 AS cor0
----
5934
6279
6693

query I rowsort
SELECT DISTINCT col2 * + 96 FROM tab2 cor0
----
2496
2592
3648

query I rowsort
SELECT DISTINCT + 17 FROM tab1 cor0
----
17

query I rowsort
SELECT ALL + 19 * col0 + col2 FROM tab2 AS cor0
----
1508
1539
160

query I rowsort
SELECT - cor0.col1 * - cor0.col2 + cor0.col0 * cor0.col0 * cor0.col2 FROM tab2 AS cor0
----
159718
2160
237804

query I rowsort
SELECT DISTINCT + - 60 AS col1 FROM tab1 AS cor0
----
-60

query I rowsort
SELECT DISTINCT 0 AS col2 FROM tab0 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + col0 + 8 * - 74 * - col0 col1 FROM tab2 AS cor0
----
4361
48111
50778

query I rowsort
SELECT - 14 * col2 AS col0 FROM tab1 AS cor0
----
-1344
-756
-798

query I rowsort
SELECT ALL 89 * + col2 FROM tab2 AS cor0
----
2314
2403
3382

query I rowsort
SELECT ALL - + 29 AS col1 FROM tab1 AS cor0
----
-29
-29
-29

query I rowsort
SELECT ALL - 33 * + col2 FROM tab2 AS cor0
----
-1254
-858
-891

query I rowsort
SELECT + 3 * col0 - - ( + col1 ) AS col0 FROM tab1 cor0
----
202
253
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-3589
SELECT DISTINCT + col0 DIV + col0 + 27 FROM tab0 AS cor0
----
28

skipif mysql # not compatible
query I rowsort label-3589
SELECT DISTINCT + col0 / + col0 + 27 FROM tab0 AS cor0
----
28

query I rowsort
SELECT ALL + col1 * - col2 + col2 AS col1 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT DISTINCT - - col0 + col0 AS col2 FROM tab0 AS cor0
----
178
48
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-3592
SELECT ALL - col0 DIV col0 + ( col2 ) * - col2 AS col1 FROM tab1 AS cor0
----
-2917
-3250
-9217

skipif mysql # not compatible
query I rowsort label-3592
SELECT ALL - col0 / col0 + ( col2 ) * - col2 AS col1 FROM tab1 AS cor0
----
-2917
-3250
-9217

query I rowsort
SELECT DISTINCT + col2 * - cor0.col1 + - col2 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT - 64 + col0 + + col2 * + col1 AS col2 FROM tab1
----
1264
1343
570

query I rowsort
SELECT ( col1 ) * col1 + + tab2.col0 * + tab2.col2 AS col2 FROM tab2
----
1150
3291
5509

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3596
SELECT CAST( 55 AS SIGNED ) + - col2 AS col1 FROM tab1
----
-2
-41
1

skipif mysql # not compatible
query I rowsort label-3596
SELECT CAST ( 55 AS INTEGER ) + - col2 AS col1 FROM tab1
----
-2
-41
1

query I rowsort
SELECT - 33 * + col2 FROM tab2 AS cor0
----
-1254
-858
-891

query I rowsort
SELECT + cor0.col0 * 67 FROM tab1, tab0 AS cor0
----
9 values hashing to 70746115e976785364af9f753170c6b4

query I rowsort
SELECT DISTINCT 8 + col0 FROM tab2
----
15
86
87

query I rowsort
SELECT col2 * col0 + - 97 FROM tab1
----
3551
65
7583

query I rowsort
SELECT - 56 * col2 AS col1 FROM tab1
----
-3024
-3192
-5376

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3602
SELECT - ( + 85 ) + col0 * + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3602
SELECT - ( + 85 ) + col0 * + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3603
SELECT col2 * col2 - col1 DIV + tab1.col2 FROM tab1
----
2916
3249
9216

skipif mysql # not compatible
query I rowsort label-3603
SELECT col2 * col2 - col1 / + tab1.col2 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT DISTINCT + + col2 + ( - col1 ) * col0 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT ALL - ( 40 ) + col1 FROM tab2 AS cor0
----
-23
-9
19

query I rowsort
SELECT - col1 * + ( col2 ) FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL 14 FROM tab2, tab2 cor0, tab1 AS cor1
----
27 values hashing to 409c1790b702540dd9dc067c1965b7c0

query I rowsort
SELECT ALL - cor1.col2 FROM tab0 cor0 CROSS JOIN tab2, tab0 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3609
SELECT CAST( 90 AS SIGNED ) AS col1 FROM tab1
----
90
90
90

skipif mysql # not compatible
query I rowsort label-3609
SELECT CAST ( 90 AS INTEGER ) AS col1 FROM tab1
----
90
90
90

query I rowsort
SELECT 16 * col2 + col1 AS col0 FROM tab1
----
1549
890
922

onlyif mysql # use DIV operator for integer division
query I rowsort label-3611
SELECT col1 + - col2 DIV col1 FROM tab2
----
15
31
59

skipif mysql # not compatible
query I rowsort label-3611
SELECT col1 + - col2 / col1 FROM tab2
----
15
31
59

query I rowsort
SELECT ALL + + cor0.col1 * ( + col1 ) AS col0 FROM tab2 AS cor0
----
289
3481
961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 37 col2 FROM tab2, tab1 AS cor0
----
9 values hashing to ed4644af7729c2425ea6cc3d84c6504f

query I rowsort
SELECT ALL + 87 * ( + col1 ) AS col0 FROM tab1 AS cor0
----
1131
2262
870

query I rowsort
SELECT ALL + cor0.col2 - - ( col0 ) * + cor0.col0 AS col1 FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT ALL - 17 AS col2 FROM tab0
----
-17
-17
-17

query I rowsort
SELECT ALL - 33 * + 97 AS col2 FROM tab1 AS cor0
----
-3201
-3201
-3201

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 + + cor1.col2 col1 FROM tab1, tab2 AS cor0, tab2 cor1
----
104
105
106
116
117
33
34
45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3619
SELECT - cor0.col1 + - CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3619
SELECT - cor0.col1 + - CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 + - ( + 40 ) FROM tab0 AS cor0
----
46
51
57

query I rowsort
SELECT DISTINCT 93 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
93

query I rowsort
SELECT ALL + col0 * - tab0.col1 AS col0 FROM tab0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * + tab2.col1 col2 FROM tab2
----
289
3481
961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + + 38 col0 FROM tab2 AS cor0
----
0
11
12

query I rowsort
SELECT ALL ( + col2 * col2 ) + - col0 + - 19 * - col0 AS col2 FROM tab2
----
2080
2866
855

onlyif mysql # use DIV operator for integer division
query I rowsort label-3626
SELECT DISTINCT - 50 DIV col0 + col1 DIV col2 FROM tab0
----
0
1
96

skipif mysql # not compatible
query I rowsort label-3626
SELECT DISTINCT - 50 / col0 + col1 / col2 FROM tab0
----
0
1
96

query I rowsort
SELECT DISTINCT ( + col1 ) + - col1 AS col0 FROM tab2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( - col1 ) * + tab0.col1 + + ( col1 ) col0 FROM tab0
----
-7310
-8190
-9312

query I rowsort
SELECT ALL + tab2.col1 + col1 + col2 FROM tab2
----
144
72
89

query I rowsort
SELECT ( - col0 ) + tab0.col1 + + tab0.col0 AS col0 FROM tab0
----
86
91
97

query I rowsort
SELECT DISTINCT 40 AS col1 FROM tab1 AS cor0
----
40

onlyif mysql # use DIV operator for integer division
query I rowsort label-3632
SELECT DISTINCT - ( col0 ) DIV - col0 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-3632
SELECT DISTINCT - ( col0 ) / - col0 FROM tab0 AS cor0
----
1

query I rowsort
SELECT + 67 AS col0 FROM tab0
----
67
67
67

query I rowsort
SELECT - col1 + - col0 * cor0.col2 AS col1 FROM tab2 AS cor0
----
-2087
-220
-3019

query I rowsort
SELECT DISTINCT - - col0 + col2 AS col1 FROM tab2 cor0
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-3636
SELECT + 17 DIV + cor0.col0 FROM tab1 AS cor0
----
0
0
5

skipif mysql # not compatible
query I rowsort label-3636
SELECT + 17 / + cor0.col0 FROM tab1 AS cor0
----
0
0
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-3637
SELECT DISTINCT - col2 * col1 DIV ( - ( - col2 ) ) AS col0 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-3637
SELECT DISTINCT - col2 * col1 / ( - ( - col2 ) ) AS col0 FROM tab0 AS cor0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3638
SELECT + col0 DIV col1 AS col2 FROM tab1 cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-3638
SELECT + col0 / col1 AS col2 FROM tab1 cor0
----
0
6
6

query I rowsort
SELECT + + 19 * col1 AS col2 FROM tab0 AS cor0
----
1634
1729
1843

onlyif mysql # use DIV operator for integer division
query I rowsort label-3640
SELECT col0 * col2 DIV col2 - - col1 FROM tab0 AS cor0
----
110
132
180

skipif mysql # not compatible
query I rowsort label-3640
SELECT col0 * col2 / col2 - - col1 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-3641
SELECT + cor0.col1 DIV - col1 FROM tab0 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3641
SELECT + cor0.col1 / - col1 FROM tab0 cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - col1 * + col2 * - ( + col1 ) AS col0 FROM tab0
----
244068
679042
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-3643
SELECT + 43 DIV col0 AS col1 FROM tab1
----
0
0
14

skipif mysql # not compatible
query I rowsort label-3643
SELECT + 43 / col0 AS col1 FROM tab1
----
0
0
14

query I rowsort
SELECT + + col1 * col0 * + cor0.col1 + + col0 * + col0 FROM tab1 AS cor0
----
10496
19920
2037

onlyif mysql # use DIV operator for integer division
query I rowsort label-3645
SELECT col2 * + tab0.col1 - ( - 43 ) DIV + col2 FROM tab0
----
140
2839
7462

skipif mysql # not compatible
query I rowsort label-3645
SELECT col2 * + tab0.col1 - ( - 43 ) / + col2 FROM tab0
----
140
2839
7462

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 55 * col0 col1 FROM tab1 cor0
----
165
3520
4400

query I rowsort
SELECT col1 + - cor0.col2 + 71 FROM tab0 AS cor0
----
124
167
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + 14 col1 FROM tab0 cor0
----
103
38
49

query I rowsort
SELECT - col0 * + ( col2 ) + col0 * col0 AS col2 FROM tab2 AS cor0
----
-140
3239
4056

query I rowsort
SELECT col1 + - ( - col0 ) FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT col1 * 18 + - ( cor0.col0 ) AS col1 FROM tab2 cor0
----
227
551
984

query I rowsort
SELECT - col1 * - ( + col2 + col1 ) FROM tab2 AS cor0
----
1798
5015
935

query I rowsort
SELECT + - col0 + 16 FROM tab2 cor0
----
-62
-63
9

query I rowsort
SELECT ALL 56 AS col2 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to b5ba4b44e3deadce1edb30e76df61200

query I rowsort
SELECT ( tab1.col1 + - ( tab1.col0 ) ) * col1 AS col2 FROM tab1
----
-540
-871
598

onlyif mysql # use DIV operator for integer division
query I rowsort label-3656
SELECT ALL cor0.col0 DIV - 70 + 40 * + col1 * col0 FROM tab0 AS cor0
----
135800
323959
82560

skipif mysql # not compatible
query I rowsort label-3656
SELECT ALL cor0.col0 / - 70 + 40 * + col1 * col0 FROM tab0 AS cor0
----
135800
323959
82560

query I rowsort
SELECT + - col2 * ( + col1 ) + - col1 * cor0.col2 AS col2 FROM tab2 AS cor0
----
-1292
-1674
-3068

query I rowsort
SELECT ALL 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-3659
SELECT ALL - col1 DIV ( + cor0.col0 ) + + col1 AS col0 FROM tab2 AS cor0
----
17
27
59

skipif mysql # not compatible
query I rowsort label-3659
SELECT ALL - col1 / ( + cor0.col0 ) + + col1 AS col0 FROM tab2 AS cor0
----
17
27
59

query I rowsort
SELECT + col0 + + 19 * 9 FROM tab0 cor0
----
195
206
260

query I rowsort
SELECT - - 48 FROM tab1 AS cor0
----
48
48
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 90 + - 72 col2 FROM tab1 AS cor0
----
18
18
18

query I rowsort
SELECT + col2 * ( col1 ) AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT 97 FROM tab1, tab1 cor0
----
9 values hashing to 5e0d31ac41981bcdf6a665538a71a09c

query I rowsort
SELECT ALL 55 + col0 FROM tab0
----
144
79
90

query I rowsort
SELECT + 79 AS col0 FROM tab2, tab0 cor0, tab0 AS cor1
----
27 values hashing to 4857f2e1b1dbd184de4827f145dd02a1

query I rowsort
SELECT col1 + - 71 AS col0 FROM tab1 AS cor0
----
-45
-58
-61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + tab0.col2 col2 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT col2 * - ( - ( + col0 ) ) * + col1 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT DISTINCT + col0 - - col0 AS col1 FROM tab2
----
14
156
158

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( col0 AS REAL ) * - col0 * col1 + col2 FROM tab1 AS cor0
----
288
41017
83296

query I rowsort
SELECT ALL ( 95 ) AS col1 FROM tab0 AS cor0
----
95
95
95

query I rowsort
SELECT + 67 + ( col0 ) FROM tab0 AS cor0
----
102
156
91

query I rowsort
SELECT + col2 * col1 * col0 + tab1.col1 + + 9 AS col0 FROM tab1
----
36499
4247
99862

query I rowsort
SELECT col0 * ( tab0.col0 * - col2 ) - 0 AS col1 FROM tab0
----
-1225
-19008
-649522

query I rowsort
SELECT ( tab0.col0 ) FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT DISTINCT col1 - ( col1 ) AS col2 FROM tab1
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3678
SELECT CAST( + 84 AS SIGNED ) AS col0 FROM tab0
----
84
84
84

skipif mysql # not compatible
query I rowsort label-3678
SELECT CAST ( + 84 AS INTEGER ) AS col0 FROM tab0
----
84
84
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-3679
SELECT DISTINCT 52 DIV tab0.col2 + col2 AS col1 FROM tab0
----
34
53
82

skipif mysql # not compatible
query I rowsort label-3679
SELECT DISTINCT 52 / tab0.col2 + col2 AS col1 FROM tab0
----
34
53
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-3680
SELECT 1 * - col1 DIV + col2 + + tab1.col2 AS col2 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-3680
SELECT 1 * - col1 / + col2 + + tab1.col2 AS col2 FROM tab1
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3681
SELECT DISTINCT - col1 + + tab0.col1 DIV + tab0.col0 + col1 AS col1 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-3681
SELECT DISTINCT - col1 + + tab0.col1 / + tab0.col0 + col1 AS col1 FROM tab0
----
1
2
3

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0 CROSS JOIN tab2, tab1, tab1 AS cor1
----
3645 values hashing to 199388980dc5177ebebcfdbc0408ba02

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3683
SELECT ALL + - CAST( - cor0.col1 AS SIGNED ) + + col2 FROM tab1 AS cor0
----
109
67
80

skipif mysql # not compatible
query I rowsort label-3683
SELECT ALL + - CAST ( - cor0.col1 AS INTEGER ) + + col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT - col2 - + col0 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT ALL - 86 + + cor0.col1 FROM tab1 AS cor0
----
-60
-73
-76

query I rowsort
SELECT + col2 * col0 - + cor0.col2 * col1 AS col1 FROM tab0 AS cor0
----
-164
-2046
-62

query I rowsort
SELECT DISTINCT ( - 86 ) * + col1 - col1 FROM tab0 AS cor0
----
-7482
-7917
-8439

query I rowsort
SELECT DISTINCT + 14 + 69 * - cor0.col1 * + 44 AS col1 FROM tab0 AS cor0
----
-261082
-276262
-294478

onlyif mysql # use DIV operator for integer division
query I rowsort label-3689
SELECT CAST( col0 AS SIGNED ) DIV col1 + col0 - 86 * - col0 FROM tab0 cor0
----
2088
3045
7743

skipif mysql # not compatible
query I rowsort label-3689
SELECT CAST ( col0 AS INTEGER ) / col1 + col0 - 86 * - col0 FROM tab0 cor0
----
2088
3045
7743

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 78 + 84 col2 FROM tab1 AS cor0
----
162
162
162

query I rowsort
SELECT DISTINCT + 11 AS col0 FROM tab1 cor0
----
11

query I rowsort
SELECT DISTINCT + 33 * col1 FROM tab1 AS cor0
----
330
429
858

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3693
SELECT - CAST( - col1 AS SIGNED ) * cor0.col2 + - col0 * cor0.col0 AS col1 FROM tab0 cor0
----
-1128
-459
2262

skipif mysql # not compatible
query I rowsort label-3693
SELECT - CAST ( - col1 AS INTEGER ) * cor0.col2 + - col0 * cor0.col0 AS col1 FROM tab0 cor0
----
-1128
-459
2262

query I rowsort
SELECT ALL 65 * col0 FROM tab1 AS cor0
----
195
4160
5200

query I rowsort
SELECT + - ( col2 ) + - col0 * + col0 + + col2 * - col0 AS col1 FROM tab0 cor0
----
-1261
-1401
-15301

query I rowsort
SELECT DISTINCT - col1 * col2 * col0 AS col0 FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT + tab2.col0 * col0 * - col2 AS col1 FROM tab2
----
-1323
-158184
-237158

query I rowsort
SELECT 48 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col1 * 98 col0 FROM tab2 AS cor0
----
131614
21266
450996

query I rowsort
SELECT DISTINCT ( + 0 ) AS col0 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3701
SELECT DISTINCT + + col0 + col0 * - ( cor0.col1 ) * + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3701
SELECT DISTINCT + + col0 + col0 * - ( cor0.col1 ) * + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 48 col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

query I rowsort
SELECT ALL - col0 + + ( - 44 ) * col1 AS col1 FROM tab0 AS cor0
----
-3808
-4093
-4303

query I rowsort
SELECT ALL cor0.col1 * 18 FROM tab0 AS cor0
----
1548
1638
1746

query I rowsort
SELECT ALL cor0.col0 FROM tab1, tab0 AS cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

skipif mysql # not compatible
query I rowsort
SELECT col0 * - CAST ( col0 AS REAL ) AS col2 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL + + col0 * + 56 + - col0 + - col0 FROM tab2 AS cor0
----
378
4212
4266

query I rowsort
SELECT ALL - col2 + + 93 * col2 + col0 FROM tab1 AS cor0
----
4971
5308
8912

query I rowsort
SELECT DISTINCT 97 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3710
SELECT ALL CAST( NULL AS SIGNED ) + + tab0.col0 col1 FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3710
SELECT ALL CAST ( NULL AS INTEGER ) + + tab0.col0 col1 FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + ( - col0 ) col0 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3712
SELECT DISTINCT + col2 DIV - 35 + + col1 col0 FROM tab2 AS cor0
----
16
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3712
SELECT DISTINCT + col2 / - 35 + + col1 col0 FROM tab2 AS cor0
----
16
31
59

query I rowsort
SELECT ALL + - cor0.col1 * + 23 AS col2 FROM tab2 AS cor0
----
-1357
-391
-713

query I rowsort
SELECT ALL + col0 + col2 * - col1 FROM tab0 AS cor0
----
-2814
-62
-7373

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3715
SELECT DISTINCT + + col2 * CAST( NULL AS SIGNED ) - col1 * - col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3715
SELECT DISTINCT + + col2 * CAST ( NULL AS INTEGER ) - col1 * - col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL col0 * col1 - + col1 AS col2 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT + col0 + - 70 FROM tab1 AS cor0
----
-6
-67
10

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3718
SELECT ALL - + col2 + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3718
SELECT ALL - + col2 + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 * 31 FROM tab2 AS cor0
----
217
2418
2449

query I rowsort
SELECT DISTINCT - + col1 + col0 + + 82 * col2 FROM tab1 AS cor0
----
4405
4728
7939

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3721
SELECT ALL - col1 * - CAST( - 63 AS SIGNED ) + col1 FROM tab2 cor0
----
-1054
-1922
-3658

skipif mysql # not compatible
query I rowsort label-3721
SELECT ALL - col1 * - CAST ( - 63 AS INTEGER ) + col1 FROM tab2 cor0
----
-1054
-1922
-3658

query I rowsort
SELECT + cor0.col1 + cor0.col1 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to e205c60b0806256e15ecb6a115a429b3

query I rowsort
SELECT + - col2 + 73 * col2 - + col2 * + col1 FROM tab0 AS cor0
----
-1558
-25
-462

query I rowsort
SELECT ALL - cor0.col0 + col1 * col1 * + cor0.col2 AS col2 FROM tab0 AS cor0
----
244044
678953
9374

query I rowsort
SELECT ALL + 69 * col0 FROM tab0 AS cor0
----
1656
2415
6141

query I rowsort
SELECT - - 22 + col1 FROM tab0 AS cor0
----
108
113
119

query I rowsort
SELECT ( + 39 ) AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 5ecc4d3de68ae828a2d522dff8571cbf

query I rowsort
SELECT col0 + 99 FROM tab2 AS cor0
----
106
177
178

query I rowsort
SELECT ALL 55 + - col2 FROM tab2 AS cor0
----
17
28
29

query I rowsort
SELECT - 40 - 50 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to c0d96679aba507520916e8654e5a6618

query I rowsort
SELECT ALL 14 * cor0.col0 AS col0 FROM tab1 AS cor0
----
1120
42
896

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 36 col2 FROM tab1 cor0
----
-36
-36
-36

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3733
SELECT DISTINCT - - ( + col1 ) * CAST( NULL AS SIGNED ) / + ( col2 ) FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3733
SELECT DISTINCT - - ( + col1 ) * CAST ( NULL AS INTEGER ) / + ( col2 ) FROM tab2 cor0
----
NULL

query I rowsort
SELECT DISTINCT col0 * + col0 + + 72 * - col1 FROM tab2 AS cor0
----
-2183
1836
5017

query I rowsort
SELECT DISTINCT - - col2 * col2 + + 53 AS col0 FROM tab1 AS cor0
----
2969
3302
9269

query I rowsort
SELECT DISTINCT + ( col1 ) * + col0 FROM tab1 cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-3737
SELECT - 35 * col1 + + col2 DIV - col2 AS col1 FROM tab1 AS cor0
----
-351
-456
-911

skipif mysql # not compatible
query I rowsort label-3737
SELECT - 35 * col1 + + col2 / - col2 AS col1 FROM tab1 AS cor0
----
-351
-456
-911

query I rowsort
SELECT DISTINCT - 74 AS col0 FROM tab2
----
-74

query I rowsort
SELECT - tab1.col1 - + col1 AS col0 FROM tab1
----
-20
-26
-52

query I rowsort
SELECT - col0 + 16 FROM tab1 cor0
----
-48
-64
13

query I rowsort
SELECT DISTINCT - 82 FROM tab2
----
-82

query I rowsort
SELECT cor0.col0 * - col2 + + col0 * col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT + col1 * col0 + ( 61 ) FROM tab2 AS cor0
----
1404
278
4663

query I rowsort
SELECT + 84 + + col2 * - 7 FROM tab0 AS cor0
----
-147
-490
77

query I rowsort
SELECT + 16 * col2 + - col2 FROM tab2 AS cor0
----
390
405
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-3746
SELECT - - col0 DIV - col1 + cor0.col1 AS col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-3746
SELECT - - col0 / - col1 + cor0.col1 AS col1 FROM tab0 AS cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col0 * + col2 + col2 + - col1 col2 FROM tab1 AS cor0
----
190
3695
7763

query I rowsort
SELECT col0 * ( + col2 ) + col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT + + col0 + - col0 + col1 AS col2 FROM tab0 AS cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + - col1 col0 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT - ( ( col0 ) ) AS col0 FROM tab2 AS cor0
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col0 * - col1 col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - - 73 AS col2 FROM tab2 AS cor0
----
73
73
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-3754
SELECT col0 DIV 98 + col0 * 35 + col0 AS col1 FROM tab0
----
1260
3204
864

skipif mysql # not compatible
query I rowsort label-3754
SELECT col0 / 98 + col0 * 35 + col0 AS col1 FROM tab0
----
1260
3204
864

query I rowsort
SELECT + col2 + col1 * - col2 FROM tab0
----
-2805
-7380
-96

query I rowsort
SELECT + + 92 - col2 * - col0 * col2 FROM tab2 AS cor0
----
114168
5195
52820

query I rowsort
SELECT ALL 54 * + 49 FROM tab0
----
2646
2646
2646

query I rowsort
SELECT + - ( + col0 ) * - cor0.col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT - - 64 * cor0.col0 AS col1 FROM tab1 AS cor0
----
192
4096
5120

query I rowsort
SELECT DISTINCT + col0 + col2 + - 29 FROM tab0 AS cor0
----
142
28
7

query I rowsort
SELECT DISTINCT + col2 - + tab1.col1 * + col0 FROM tab1
----
-24
-583
-944

query I rowsort
SELECT DISTINCT - col0 - col1 FROM tab0
----
-110
-132
-180

onlyif mysql # use DIV operator for integer division
query I rowsort label-3763
SELECT 63 + col2 + ( + col0 ) DIV col1 AS col2 FROM tab2
----
105
90
90

skipif mysql # not compatible
query I rowsort label-3763
SELECT 63 + col2 + ( + col0 ) / col1 AS col2 FROM tab2
----
105
90
90

query I rowsort
SELECT ALL + 44 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 0cc3e52e781e46962291c3060c6ae73b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col1 ) - - col1 col2 FROM tab2
----
118
34
62

query I rowsort
SELECT + 67 + tab2.col0 FROM tab2
----
145
146
74

query I rowsort
SELECT col0 + col2 + - 87 FROM tab0
----
-30
-51
84

query I rowsort
SELECT ALL col0 + + col2 * col2 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT ( 38 + tab0.col2 ) AS col1 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 91c43a3764668aabbed05d7c769d5cfa

query I rowsort
SELECT DISTINCT - 90 AS col2 FROM tab1, tab1 AS cor0
----
-90

query I rowsort
SELECT DISTINCT - col2 * - 9 FROM tab2
----
234
243
342

query I rowsort
SELECT DISTINCT + 61 FROM tab0, tab2 AS cor0
----
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col1 + - ( - col2 ) col0 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT - 87 + - 35 * col2 FROM tab0 AS cor0
----
-122
-1242
-2957

query I rowsort
SELECT col2 + 2 AS col0 FROM tab1
----
56
59
98

query I rowsort
SELECT + + col1 * 86 FROM tab1 AS cor0
----
1118
2236
860

query I rowsort
SELECT DISTINCT + 35 FROM tab1 AS cor0
----
35

query I rowsort
SELECT DISTINCT + ( cor0.col2 ) AS col0 FROM tab1 AS cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3779
SELECT - col1 * 43 DIV + col1 FROM tab2 AS cor0
----
-43
-43
-43

skipif mysql # not compatible
query I rowsort label-3779
SELECT - col1 * 43 / + col1 FROM tab2 AS cor0
----
-43
-43
-43

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3780
SELECT DISTINCT + CAST( NULL AS SIGNED ) * + col2 + col0 AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3780
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * + col2 + col0 AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ( + 73 ) AS col0 FROM tab1 AS cor0
----
73
73
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-3782
SELECT ALL - cor0.col2 DIV col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3782
SELECT ALL - cor0.col2 / col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + - col1 * col0 + - col0 * + col0 FROM tab0 AS cor0
----
-16020
-2640
-4620

onlyif mysql # use DIV operator for integer division
query I rowsort label-3784
SELECT ALL + col0 DIV ( - 67 ) FROM tab2
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-3784
SELECT ALL + col0 / ( - 67 ) FROM tab2
----
-1
-1
0

query I rowsort
SELECT - col1 * + col1 + + col0 AS col2 FROM tab1
----
-36
-673
-89

query I rowsort
SELECT + col0 * ( - col2 ) FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT + 19 FROM tab2, tab1 cor0
----
19

query I rowsort
SELECT DISTINCT cor0.col1 + col2 * col2 + col1 * - col1 FROM tab1 cor0
----
2266
3159
9060

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col1 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT ALL - - col2 + col1 * 1 + col0 AS col2 FROM tab0 AS cor0
----
133
143
262

query I rowsort
SELECT DISTINCT col1 * + ( cor0.col2 ) AS col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + - cor0.col2 * col0 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - - cor0.col0 + col1 * + col2 AS col2 FROM tab0 AS cor0
----
132
2862
7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-3794
SELECT + CAST( + col2 AS SIGNED ) - col1 DIV - col0 FROM tab0 AS cor0
----
3
36
83

skipif mysql # not compatible
query I rowsort label-3794
SELECT + CAST ( + col2 AS INTEGER ) - col1 / - col0 FROM tab0 AS cor0
----
3
36
83

query I rowsort
SELECT DISTINCT - col0 - col2 * 62 * - tab1.col2 FROM tab1
----
180789
201374
571312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 - - 56 col0 FROM tab1
----
66
69
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-3797
SELECT + col0 DIV col1 + - 85 - col0 AS col1 FROM tab0
----
-109
-120
-174

skipif mysql # not compatible
query I rowsort label-3797
SELECT + col0 / col1 + - 85 - col0 AS col1 FROM tab0
----
-109
-120
-174

query I rowsort
SELECT tab2.col1 + ( col2 ) AS col2 FROM tab2
----
55
58
85

query I rowsort
SELECT DISTINCT - col1 * 31 AS col1 FROM tab0 AS cor0
----
-2666
-2821
-3007

onlyif mysql # use DIV operator for integer division
query I rowsort label-3800
SELECT + + col1 DIV + 31 AS col0 FROM tab2 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-3800
SELECT + + col1 / + 31 AS col0 FROM tab2 AS cor0
----
0
1
1

query I rowsort
SELECT cor0.col1 + + col0 - - col1 * + col1 AS col0 FROM tab0 AS cor0
----
7506
8461
9541

query I rowsort
SELECT ALL + + col1 * + col1 AS col0 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT + ( - cor0.col0 ) + col2 * col2 * col1 FROM tab1 AS cor0
----
119728
32426
75813

query I rowsort
SELECT DISTINCT col1 - + 32 AS col2 FROM tab2
----
-1
-15
27

query I rowsort
SELECT DISTINCT tab1.col0 - - col0 AS col0 FROM tab1
----
128
160
6

query I rowsort
SELECT DISTINCT - col0 * cor0.col2 * cor0.col0 + - cor0.col1 * col1 AS col0 FROM tab1 cor0
----
-1162
-233572
-614569

query I rowsort
SELECT DISTINCT ( col1 ) * 92 + - col1 * + cor0.col0 FROM tab2 AS cor0
----
221
2635
826

query I rowsort
SELECT ALL - 70 * + col2 - + 9 FROM tab2 AS cor0
----
-1829
-1899
-2669

query I rowsort
SELECT ALL - ( + col2 ) * col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT + 15 AS col2 FROM tab2
----
15

onlyif mysql # use DIV operator for integer division
query I rowsort label-3811
SELECT DISTINCT - - col0 DIV cor0.col2 + 2 * col0 + + col1 FROM tab1 cor0
----
139
173
32

skipif mysql # not compatible
query I rowsort label-3811
SELECT DISTINCT - - col0 / cor0.col2 + 2 * col0 + + col1 FROM tab1 cor0
----
139
173
32

query I rowsort
SELECT ALL + 83 + - col0 * ( col2 ) FROM tab2 AS cor0
----
-106
-1945
-2919

query I rowsort
SELECT DISTINCT col1 * - col1 + + col1 * + col0 FROM tab2 AS cor0
----
-744
1054
1121

query I rowsort
SELECT DISTINCT + col0 - - col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT ALL + cor0.col0 * + cor0.col1 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-3816
SELECT ALL ( + col2 ) DIV col1 AS col1 FROM tab2 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-3816
SELECT ALL ( + col2 ) / col1 AS col1 FROM tab2 AS cor0
----
0
0
2

query I rowsort
SELECT 23 * - col1 + col0 FROM tab2
----
-1279
-312
-706

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3818
SELECT ALL - CAST( NULL AS DECIMAL ) AS col0 FROM tab1, tab2, tab1 cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-3818
SELECT ALL - CAST ( NULL AS REAL ) AS col0 FROM tab1, tab2, tab1 cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 72 col2 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 92cc3d5daa550304e96c1542787691c7

query I rowsort
SELECT DISTINCT col0 + 56 FROM tab0
----
145
80
91

query I rowsort
SELECT DISTINCT - 72 FROM tab1
----
-72

onlyif mysql # use DIV operator for integer division
query I rowsort label-3822
SELECT ALL col0 DIV - col1 + - cor0.col2 * col1 * - col1 FROM tab1 AS cor0
----
16218
36504
5694

skipif mysql # not compatible
query I rowsort label-3822
SELECT ALL col0 / - col1 + - cor0.col2 * col1 * - col1 FROM tab1 AS cor0
----
16218
36504
5694

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col1 ) col0 FROM tab0
----
86
91
97

query I rowsort
SELECT ALL - col2 * - col1 * - 17 FROM tab2
----
-10982
-14229
-26078

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col2 * - tab2.col1 col0 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT ALL + cor0.col2 - + tab0.col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 0b65e3a549910903b0e666f5e0860c54

query I rowsort
SELECT DISTINCT 41 AS col2 FROM tab0
----
41

query I rowsort
SELECT ALL + 60 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 1d2ab302ae60f95b15e68cf89083b162

query I rowsort
SELECT + col0 * - 48 FROM tab2 AS cor0
----
-336
-3744
-3792

query I rowsort
SELECT ALL cor0.col2 * ( 26 ) FROM tab1 AS cor0
----
1404
1482
2496

query I rowsort
SELECT DISTINCT - col1 + 27 AS col2 FROM tab0 AS cor0
----
-59
-64
-70

query I rowsort
SELECT - col0 * 33 AS col2 FROM tab2 AS cor0
----
-231
-2574
-2607

onlyif mysql # use DIV operator for integer division
query I rowsort label-3833
SELECT - + cor0.col0 DIV + cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 7f2a5fc2898a88767c733b591f601e94

skipif mysql # not compatible
query I rowsort label-3833
SELECT - + cor0.col0 / + cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 7f2a5fc2898a88767c733b591f601e94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3834
SELECT + col1 + + CAST( NULL AS SIGNED ) / - cor0.col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3834
SELECT + col1 + + CAST ( NULL AS INTEGER ) / - cor0.col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 30 FROM tab2, tab1 cor0 CROSS JOIN tab1, tab0 AS cor1
----
30

query I rowsort
SELECT ALL - - 0 + 75 FROM tab0 AS cor0
----
75
75
75

query I rowsort
SELECT + col0 * - col1 + col2 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT DISTINCT - + ( col0 ) + - col0 FROM tab0 cor0
----
-178
-48
-70

query I rowsort
SELECT - + ( 65 ) - - col2 * + cor0.col1 FROM tab0 AS cor0
----
2773
32
7397

query I rowsort
SELECT - - col0 + 49 FROM tab0 AS cor0
----
138
73
84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3841
SELECT + - CAST( ( col0 ) AS SIGNED ) * col1 * + 71 FROM tab0 AS cor0
----
-146544
-241045
-575029

skipif mysql # not compatible
query I rowsort label-3841
SELECT + - CAST ( ( col0 ) AS INTEGER ) * col1 * + 71 FROM tab0 AS cor0
----
-146544
-241045
-575029

query I rowsort
SELECT + ( - 35 ) FROM tab1 AS cor0
----
-35
-35
-35

query I rowsort
SELECT DISTINCT - - 51 * - col2 FROM tab0 AS cor0
----
-1683
-4182
-51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + 99 col2 FROM tab0 AS cor0
----
123
134
188

onlyif mysql # use DIV operator for integer division
query I rowsort label-3845
SELECT ALL + 36 + col1 * col0 DIV - col1 FROM tab1 AS cor0
----
-28
-44
33

skipif mysql # not compatible
query I rowsort label-3845
SELECT ALL + 36 + col1 * col0 / - col1 FROM tab1 AS cor0
----
-28
-44
33

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3846
SELECT ALL + CAST( + 2 AS SIGNED ) * col1 + - col0 col1 FROM tab1 cor0
----
-44
-54
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3846
SELECT ALL + CAST ( + 2 AS INTEGER ) * col1 + - col0 col1 FROM tab1 cor0
----
-44
-54
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * col1 col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - - cor0.col2 * col2 * + 71 AS col2 FROM tab1 AS cor0
----
207036
230679
654336

query I rowsort
SELECT DISTINCT - + 41 * col2 FROM tab1 cor0
----
-2214
-2337
-3936

query I rowsort
SELECT - cor0.col2 * - col1 + - col0 * col2 + col2 FROM tab0 cor0
----
2079
246
63

query I rowsort
SELECT - + 52 AS col1 FROM tab2 AS cor0
----
-52
-52
-52

query I rowsort
SELECT ALL - + col0 + + col2 * cor0.col1 FROM tab2 AS cor0
----
1456
567
830

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3853
SELECT ALL - cor0.col2 * + cor0.col1 * - CAST( NULL AS SIGNED ) col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3853
SELECT ALL - cor0.col2 * + cor0.col1 * - CAST ( NULL AS INTEGER ) col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3854
SELECT DISTINCT 70 + col1 DIV 18 AS col1 FROM tab1 cor0
----
70
71

skipif mysql # not compatible
query I rowsort label-3854
SELECT DISTINCT 70 + col1 / 18 AS col1 FROM tab1 cor0
----
70
71

query I rowsort
SELECT col1 * - col2 + col0 AS col2 FROM tab0 cor0
----
-2814
-62
-7373

query I rowsort
SELECT + - 42 * - cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 24522a847b44e4ab85b1227024816378

onlyif mysql # use DIV operator for integer division
query I rowsort label-3857
SELECT + tab1.col2 DIV - col2 col1 FROM tab1
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3857
SELECT + tab1.col2 / - col2 col1 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT ALL - col1 + 45 + 55 AS col2 FROM tab0
----
14
3
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-3859
SELECT col2 DIV + cor0.col0 AS col0 FROM tab2 AS cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-3859
SELECT col2 / + cor0.col0 AS col0 FROM tab2 AS cor0
----
0
0
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-3860
SELECT + - cor0.col2 DIV - col2 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3860
SELECT + - cor0.col2 / - col2 FROM tab0 AS cor0
----
1
1
1

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab2 cor2
----
972 values hashing to 1e9d01970ae508486ddabec967bb176c

query I rowsort
SELECT DISTINCT + col0 * - cor0.col1 + 4 * - col1 + - ( + col2 ) AS col1 FROM tab0 AS cor0
----
-2441
-3784
-8545

query I rowsort
SELECT ALL - - col2 * + 48 AS col0 FROM tab0 AS cor0
----
1584
3936
48

query I rowsort
SELECT DISTINCT - 76 - + col1 AS col2 FROM tab2
----
-107
-135
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col2 ) - + col1 col1 FROM tab0 AS cor0
----
-119
-173
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3866
SELECT + col0 DIV + col0 AS col1 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3866
SELECT + col0 / + col0 AS col1 FROM tab2 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col2 + col0 col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT ALL - 34 + col2 AS col1 FROM tab2 AS cor0
----
-7
-8
4

query I rowsort
SELECT DISTINCT + 59 * - col1 * - col1 + ( col1 ) + + 96 AS col0 FROM tab0 AS cor0
----
436546
488766
555324

query I rowsort
SELECT - col2 * - 98 FROM tab0 cor0
----
3234
8036
98

query I rowsort
SELECT ALL + 10 AS col2 FROM tab1
----
10
10
10

query I rowsort
SELECT + 37 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to a10b03e72860b949bdff53827700a9a8

query I rowsort
SELECT + col1 + 27 AS col1 FROM tab2 AS cor0
----
44
58
86

query I rowsort
SELECT ALL - col2 * - cor0.col2 AS col1 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT col2 + col2 * + cor0.col2 * + col2 FROM tab0 AS cor0
----
2
35970
551450

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * col1 col0 FROM tab1 AS cor0
----
100
169
676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 12 col1 FROM tab1, tab2 AS cor0
----
9 values hashing to d4f5a8e032294c3b9342821617800972

query I rowsort
SELECT ALL col0 * + col0 * 72 AS col1 FROM tab2
----
3528
438048
449352

query I rowsort
SELECT col1 - + 41 AS col1 FROM tab2
----
-10
-24
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-3880
SELECT tab1.col1 DIV col1 - - col2 FROM tab1
----
55
58
97

skipif mysql # not compatible
query I rowsort label-3880
SELECT tab1.col1 / col1 - - col2 FROM tab1
----
55
58
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col0 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - tab2.col2 + - col1 ) * + ( + ( - col0 ) * col2 ) col2 FROM tab2
----
10962
165110
172380

query I rowsort
SELECT + col0 * - col2 + - ( - col0 ) FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT DISTINCT 50 AS col2 FROM tab0 AS cor0
----
50

query I rowsort
SELECT tab2.col2 * - 5 FROM tab2
----
-130
-135
-190

query I rowsort
SELECT + + col1 * + cor0.col2 AS col1 FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-3887
SELECT DISTINCT + tab2.col2 DIV col0 + - col0 AS col2 FROM tab2
----
-4
-78
-79

skipif mysql # not compatible
query I rowsort label-3887
SELECT DISTINCT + tab2.col2 / col0 + - col0 AS col2 FROM tab2
----
-4
-78
-79

query I rowsort
SELECT + 71 + col1 * - col1 AS col0 FROM tab1 AS cor0
----
-29
-605
-98

query I rowsort
SELECT ( cor0.col1 ) * col0 + + ( col0 ) FROM tab0 cor0
----
2088
3430
8188

query I rowsort
SELECT col2 * col0 + - col2 * - 24 FROM tab0
----
1584
59
9266

query I rowsort
SELECT ALL 39 * - tab2.col0 AS col0 FROM tab2, tab1 cor0
----
9 values hashing to 2f89175542e728d5ab302aa43f99de7a

query I rowsort
SELECT ALL col1 * - tab0.col0 AS col2 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT + col2 + 44 FROM tab1
----
101
140
98

query I rowsort
SELECT DISTINCT col1 * + 64 AS col2 FROM tab0
----
5504
5824
6208

onlyif mysql # use DIV operator for integer division
query I rowsort label-3895
SELECT DISTINCT + 80 DIV 49 FROM tab1
----
1

skipif mysql # not compatible
query I rowsort label-3895
SELECT DISTINCT + 80 / 49 FROM tab1
----
1

query I rowsort
SELECT DISTINCT - + 30 * + col1 + cor0.col0 FROM tab0 AS cor0
----
-2556
-2641
-2875

query I rowsort
SELECT ALL - col2 + - cor0.col0 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT ALL + + col2 * + col1 - + col2 AS col1 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT DISTINCT 77 * col0 FROM tab0 AS cor0
----
1848
2695
6853

query I rowsort
SELECT ALL cor1.col0 + - 98 AS col2 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to aec7526aa8d77ddee7718b8d0ee20b5d

query I rowsort
SELECT DISTINCT + - 27 FROM tab2 cor0
----
-27

query I rowsort
SELECT ALL + - 36 + - ( col2 ) FROM tab2 AS cor0
----
-62
-63
-74

query I rowsort
SELECT DISTINCT 11 * + col2 AS col2 FROM tab0 AS cor0
----
11
363
902

query I rowsort
SELECT + - col0 * - col1 * - col1 FROM tab2 AS cor0
----
-22831
-271518
-6727

query I rowsort
SELECT ALL + col0 * - col2 AS col2 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL 71 * - cor0.col2 FROM tab0 AS cor0
----
-2343
-5822
-71

query I rowsort
SELECT DISTINCT - 8 * - col0 + 90 FROM tab0 AS cor0
----
282
370
802

query I rowsort
SELECT DISTINCT 64 AS col0 FROM tab1 AS cor0
----
64

query I rowsort
SELECT + 15 * col2 AS col1 FROM tab1 AS cor0
----
1440
810
855

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + cor0.col1 * cor0.col1 col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT col1 * - cor0.col2 * + 2 FROM tab2 AS cor0
----
-1292
-1674
-3068

query I rowsort
SELECT ALL + 51 FROM tab1 cor0
----
51
51
51

query I rowsort
SELECT + 37 + - tab1.col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 853bc4cd4c03d975c598eac83ec7d3f8

query I rowsort
SELECT - + col0 * + cor0.col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL + + 85 + col0 * - col1 FROM tab2 cor0
----
-1258
-132
-4517

query I rowsort
SELECT ALL + col1 + - cor0.col0 AS col1 FROM tab2 AS cor0
----
-19
-62
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-3917
SELECT ALL - + col1 DIV ( + col0 ) + - col1 DIV + col0 + cor0.col2 FROM tab0 AS cor0
----
-3
27
80

skipif mysql # not compatible
query I rowsort label-3917
SELECT ALL - + col1 / ( + col0 ) + - col1 / + col0 + cor0.col2 FROM tab0 AS cor0
----
-3
27
80

query I rowsort
SELECT DISTINCT + col0 * col2 - col0 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT - col1 + - 92 FROM tab0 AS cor0
----
-178
-183
-189

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3920
SELECT DISTINCT - col1 + CAST( col1 AS SIGNED ) * col2 * ( col1 ) FROM tab2 AS cor0
----
10965
25916
90447

skipif mysql # not compatible
query I rowsort label-3920
SELECT DISTINCT - col1 + CAST ( col1 AS INTEGER ) * col2 * ( col1 ) FROM tab2 AS cor0
----
10965
25916
90447

query I rowsort
SELECT + col2 * 25 + - col1 FROM tab2 AS cor0
----
591
644
933

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3922
SELECT ALL col0 + + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3922
SELECT ALL col0 + + 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-3923
SELECT - - col1 + col0 DIV - col0 AS col1 FROM tab2 AS cor0
----
16
30
58

skipif mysql # not compatible
query I rowsort label-3923
SELECT - - col1 + col0 / - col0 AS col1 FROM tab2 AS cor0
----
16
30
58

query I rowsort
SELECT col2 + - ( cor0.col2 ) AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col1 + col2 * - col2 * - col2 AS col1 FROM tab0 AS cor0
----
36023
551459
98

query I rowsort
SELECT DISTINCT + col2 + + cor0.col2 + col1 AS col0 FROM tab2 AS cor0
----
111
85
93

skipif mysql # not compatible
query I rowsort
SELECT ALL cor0.col2 * CAST ( + col2 AS REAL ) * col0 - - 18 AS col0 FROM tab2 AS cor0
----
114094
5121
52746

query I rowsort
SELECT + + col0 * - 95 FROM tab2 AS cor0
----
-665
-7410
-7505

query I rowsort
SELECT - - cor0.col1 + - col1 * col2 FROM tab2 cor0
----
-1475
-629
-806

query I rowsort
SELECT DISTINCT + + cor0.col0 + col0 AS col1 FROM tab0 AS cor0
----
178
48
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3931
SELECT - - CAST( NULL AS SIGNED ) / col2 + - col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3931
SELECT - - CAST ( NULL AS INTEGER ) / col2 + - col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor0.col1 * + col0 + - col0 + col0 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT + col0 + col1 * ( - col0 * - col2 ) FROM tab1
----
36544
4215
99920

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3934
SELECT DISTINCT + col2 / CAST( NULL AS DECIMAL ) + tab1.col0 AS col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-3934
SELECT DISTINCT + col2 / CAST ( NULL AS REAL ) + tab1.col0 AS col1 FROM tab1
----
NULL

query I rowsort
SELECT tab0.col2 + - ( ( + col0 ) ) FROM tab0
----
-34
-7
9

query I rowsort
SELECT DISTINCT - col0 + + tab1.col0 * - 72 FROM tab1
----
-219
-4672
-5840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col2 + - col1 col0 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT - col0 * 23 AS col2 FROM tab0 AS cor0
----
-2047
-552
-805

query I rowsort
SELECT - - 62 * + col0 AS col0 FROM tab2 cor0
----
434
4836
4898

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 31 + - cor0.col0 col1 FROM tab2 cor0
----
-47
-48
24

query I rowsort
SELECT ALL - - ( - ( + col1 ) ) * - col0 AS col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + - col1 * 82 + + col2 FROM tab1 cor0
----
-2078
-763
-970

query I rowsort
SELECT - col0 * + 31 AS col0 FROM tab1 AS cor0
----
-1984
-2480
-93

query I rowsort
SELECT ALL - col2 + + ( - col1 ) AS col2 FROM tab1
----
-109
-67
-80

query I rowsort
SELECT - tab1.col0 + + col0 + tab1.col1 FROM tab1
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3946
SELECT + col0 * CAST( NULL AS DECIMAL ) col2 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3946
SELECT + col0 * CAST ( NULL AS REAL ) col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col2 * 23 + col0 FROM tab0
----
1975
58
783

query I rowsort
SELECT - 18 FROM tab1, tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1
----
81 values hashing to 4b8f1109b78a52c6ee572810d1973a42

query I rowsort
SELECT ALL ( + cor0.col0 ) FROM tab1, tab0 AS cor0, tab0, tab0 AS cor1
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

query I rowsort
SELECT DISTINCT + 37 * 29 FROM tab2 AS cor0
----
1073

query I rowsort
SELECT - col1 * + 31 + col0 AS col2 FROM tab0 AS cor0
----
-2642
-2732
-2972

onlyif mysql # use DIV operator for integer division
query I rowsort label-3952
SELECT DISTINCT - col2 DIV + 51 AS col1 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-3952
SELECT DISTINCT - col2 / + 51 AS col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL + - ( 73 ) + - col0 FROM tab2 AS cor0
----
-151
-152
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-3954
SELECT ( + col0 ) + col2 DIV - cor0.col0 AS col0 FROM tab2 AS cor0
----
4
78
79

skipif mysql # not compatible
query I rowsort label-3954
SELECT ( + col0 ) + col2 / - cor0.col0 AS col0 FROM tab2 AS cor0
----
4
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-3955
SELECT + - col1 + + col2 DIV col0 FROM tab2 AS cor0
----
-17
-28
-59

skipif mysql # not compatible
query I rowsort label-3955
SELECT + - col1 + + col2 / col0 FROM tab2 AS cor0
----
-17
-28
-59

query I rowsort
SELECT DISTINCT - cor0.col2 + - cor0.col1 FROM tab1, tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT - + col1 * 47 + col1 FROM tab2 AS cor0
----
-1426
-2714
-782

query I rowsort
SELECT ALL - 50 * cor0.col0 AS col0 FROM tab0 AS cor0
----
-1200
-1750
-4450

query I rowsort
SELECT ALL col0 * tab0.col0 AS col0 FROM tab0
----
1225
576
7921

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3960
SELECT ALL - cor0.col0 / + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3960
SELECT ALL - cor0.col0 / + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 + 65 - col0 AS col1 FROM tab1 AS cor0
----
-2
11
88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3962
SELECT - + col2 - CAST( + col0 AS SIGNED ) AS col1 FROM tab0 cor0
----
-171
-36
-57

skipif mysql # not compatible
query I rowsort label-3962
SELECT - + col2 - CAST ( + col0 AS INTEGER ) AS col1 FROM tab0 cor0
----
-171
-36
-57

query I rowsort
SELECT DISTINCT + + col0 + col1 AS col2 FROM tab1 cor0
----
29
74
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3964
SELECT ALL col2 + - CAST( NULL AS SIGNED ) * 39 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3964
SELECT ALL col2 + - CAST ( NULL AS INTEGER ) * 39 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - cor1.col1 FROM tab2, tab1 AS cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to 96e9ef2950805bca93a295eeea43ef5b

query I rowsort
SELECT DISTINCT ( col0 ) + - 23 AS col0 FROM tab2 AS cor0
----
-16
55
56

query I rowsort
SELECT ALL - + 6 AS col2 FROM tab2 AS cor0
----
-6
-6
-6

query I rowsort
SELECT DISTINCT + col0 + col1 * 2 FROM tab0 cor0
----
196
229
271

query I rowsort
SELECT ALL + ( - cor0.col2 ) + 50 * - col0 - - col0 AS col1 FROM tab0 AS cor0
----
-1209
-1716
-4443

query I rowsort
SELECT DISTINCT col1 * ( tab1.col1 ) AS col0 FROM tab1
----
100
169
676

query I rowsort
SELECT + 46 + cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 028ec7a3ec611943d199f681981bcdda

query I rowsort
SELECT DISTINCT ( tab1.col1 ) AS col2 FROM tab1
----
10
13
26

query I rowsort
SELECT + + 63 * col0 FROM tab2 AS cor0
----
441
4914
4977

query I rowsort
SELECT ALL 87 * col1 * - tab2.col1 AS col2 FROM tab2
----
-25143
-302847
-83607

query I rowsort
SELECT DISTINCT + col2 * 28 FROM tab1 AS cor0
----
1512
1596
2688

query I rowsort
SELECT - cor0.col0 * 23 + + col1 * cor0.col1 AS col0 FROM tab1 AS cor0
----
-1372
-1671
607

query I rowsort
SELECT - - 16 * col2 FROM tab1 AS cor0
----
1536
864
912

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3978
SELECT + CAST( - col1 AS SIGNED ) FROM tab2
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-3978
SELECT + CAST ( - col1 AS INTEGER ) FROM tab2
----
-17
-31
-59

query I rowsort
SELECT ALL + 32 + - col1 AS col2 FROM tab2
----
-27
1
15

query I rowsort
SELECT - col0 + cor0.col2 * col1 FROM tab2 AS cor0
----
1456
567
830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 31 col0 FROM tab1, tab1 AS cor0
----
-31

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3982
SELECT CAST( NULL AS SIGNED ) + - col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3982
SELECT CAST ( NULL AS INTEGER ) + - col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT 46 * - tab1.col1 + col2 FROM tab1
----
-1142
-403
-502

query I rowsort
SELECT DISTINCT col2 + + col2 * - col1 FROM tab2
----
-1508
-608
-810

query I rowsort
SELECT DISTINCT - 56 * - col2 FROM tab1 AS cor0
----
3024
3192
5376

query I rowsort
SELECT ALL - + col1 + col0 + col0 FROM tab0 cor0
----
-27
-38
87

query I rowsort
SELECT DISTINCT + 58 * 63 + - col0 AS col0 FROM tab2 cor0
----
3575
3576
3647

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3988
SELECT DISTINCT + CAST( col1 AS SIGNED ) - col0 AS col0 FROM tab1 AS cor0
----
-54
-67
23

skipif mysql # not compatible
query I rowsort label-3988
SELECT DISTINCT + CAST ( col1 AS INTEGER ) - col0 AS col0 FROM tab1 AS cor0
----
-54
-67
23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3989
SELECT - col1 * col1 + - col2 * + CAST( col0 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-15579
-8188
-9444

skipif mysql # not compatible
query I rowsort label-3989
SELECT - col1 * col1 + - col2 * + CAST ( col0 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-15579
-8188
-9444

query I rowsort
SELECT + - cor0.col2 * + 7 AS col2 FROM tab1 AS cor0
----
-378
-399
-672

query I rowsort
SELECT + ( cor0.col2 ) AS col2 FROM tab2 AS cor0
----
26
27
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3992
SELECT - col2 + - col2 * CAST( col1 AS SIGNED ) * col0 AS col0 FROM tab2 AS cor0
----
-119678
-51072
-5886

skipif mysql # not compatible
query I rowsort label-3992
SELECT - col2 + - col2 * CAST ( col1 AS INTEGER ) * col0 AS col0 FROM tab2 AS cor0
----
-119678
-51072
-5886

query I rowsort
SELECT DISTINCT 40 + + col1 * col0 AS col1 FROM tab2 AS cor0
----
1383
257
4642

onlyif mysql # use DIV operator for integer division
query I rowsort label-3994
SELECT ALL + col0 DIV col2 AS col1 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3994
SELECT ALL + col0 / col2 AS col1 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT ALL ( + col2 ) + 11 AS col0 FROM tab0 AS cor0
----
12
44
93

query I rowsort
SELECT col2 + col2 + + cor0.col0 FROM tab1 AS cor0
----
111
178
272

query I rowsort
SELECT ALL - + ( + col0 ) * col0 * - cor0.col1 AS col0 FROM tab1 AS cor0
----
234
40960
83200

onlyif mysql # use DIV operator for integer division
query I rowsort label-3998
SELECT - - col0 DIV col2 - 49 FROM tab1 AS cor0
----
-48
-49
-49

skipif mysql # not compatible
query I rowsort label-3998
SELECT - - col0 / col2 - 49 FROM tab1 AS cor0
----
-48
-49
-49

onlyif mysql # use DIV operator for integer division
query I rowsort label-3999
SELECT + col0 DIV ( + col0 ) FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3999
SELECT + col0 / ( + col0 ) FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT - 2 AS col2 FROM tab2, tab2 cor0, tab0 AS cor1
----
-2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 81 + + 79 * col1 col1 FROM tab1 AS cor0
----
1973
709
946

query I rowsort
SELECT DISTINCT - - col2 + 92 AS col0 FROM tab2 cor0
----
118
119
130

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4003
SELECT ALL col2 * + CAST( NULL AS DECIMAL ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4003
SELECT ALL col2 * + CAST ( NULL AS REAL ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * 44 AS col0 FROM tab1
----
132
2816
3520

query I rowsort
SELECT ALL - - 78 * - col1 + col0 AS col2 FROM tab0 AS cor0
----
-6684
-7009
-7531

query I rowsort
SELECT DISTINCT - ( + 29 ) * + col1 AS col1 FROM tab1 cor0
----
-290
-377
-754

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4007
SELECT + CAST( - 8 AS SIGNED ) FROM tab0 AS cor0
----
-8
-8
-8

skipif mysql # not compatible
query I rowsort label-4007
SELECT + CAST ( - 8 AS INTEGER ) FROM tab0 AS cor0
----
-8
-8
-8

query I rowsort
SELECT + 62 * + cor0.col0 * col1 AS col1 FROM tab1 AS cor0
----
39680
4836
64480

query I rowsort
SELECT DISTINCT + - ( col1 ) * col1 + 96 * + cor0.col0 AS col1 FROM tab0 AS cor0
----
-5092
-6049
263

query I rowsort
SELECT ALL + 7 FROM tab1 cor0
----
7
7
7

query I rowsort
SELECT - cor0.col0 + + 17 * - col0 FROM tab0 AS cor0
----
-1602
-432
-630

skipif mysql # not compatible
query I rowsort
SELECT ALL - col0 * CAST ( - 2 AS REAL ) - col2 AS col1 FROM tab0
----
15
69
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4013
SELECT 92 * tab0.col2 DIV - tab0.col0 col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 96876391f9f80c1e1d69e4f8de25986e

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4013
SELECT 92 * tab0.col2 / - tab0.col0 col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 96876391f9f80c1e1d69e4f8de25986e

query I rowsort
SELECT + 96 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 22c5141a629f0ef396738ee2c8be6303

query IIIIIIIII rowsort
SELECT * FROM tab2, tab0, tab1 AS cor0 WHERE NULL BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL + 0 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT ( cor0.col0 ) AS col0 FROM tab1 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

onlyif mysql # use DIV operator for integer division
query I rowsort label-4018
SELECT DISTINCT col1 DIV col0 + - 89 AS col2 FROM tab1
----
-81
-89

skipif mysql # not compatible
query I rowsort label-4018
SELECT DISTINCT col1 / col0 + - 89 AS col2 FROM tab1
----
-81
-89

query I rowsort
SELECT - col0 + col0 - col2 AS col1 FROM tab1
----
-54
-57
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4020
SELECT ALL - + col2 + - CAST( col2 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-52
-54
-76

skipif mysql # not compatible
query I rowsort label-4020
SELECT ALL - + col2 + - CAST ( col2 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-52
-54
-76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4021
SELECT col2 * + CAST( NULL AS DECIMAL ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4021
SELECT col2 * + CAST ( NULL AS REAL ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ( - 25 ) FROM tab2, tab0 AS cor0
----
9 values hashing to 40ac8fd000b2e49317aed2411077839e

query I rowsort
SELECT col1 + + ( + 64 ) AS col0 FROM tab0 AS cor0
----
150
155
161

query I rowsort
SELECT ALL - col2 + - col1 * 48 FROM tab1 AS cor0
----
-1302
-537
-720

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 + ( 9 ) * col1 + 0 col2 FROM tab0 cor0
----
737
741
872

query I rowsort
SELECT ALL + 92 FROM tab0, tab2 cor0
----
9 values hashing to 516fa45c8b06f9f67d6e500bfd435c1a

query I rowsort
SELECT DISTINCT col0 - col1 * col2 AS col0 FROM tab0
----
-2814
-62
-7373

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4028
SELECT DISTINCT CAST( + ( col1 ) AS SIGNED ) * - CAST( - col1 * col0 AS SIGNED ) - 57 * col2 FROM tab1
----
-1050
3151
8048

skipif mysql # not compatible
query I rowsort label-4028
SELECT DISTINCT CAST ( + ( col1 ) AS INTEGER ) * - CAST ( - col1 * col0 AS INTEGER ) - 57 * col2 FROM tab1
----
-1050
3151
8048

onlyif mysql # use DIV operator for integer division
query I rowsort label-4029
SELECT 18 DIV + tab1.col1 + col1 * col1 * - col0 - + col0 FROM tab1
----
-13599
-2031
-6463

skipif mysql # not compatible
query I rowsort label-4029
SELECT 18 / + tab1.col1 + col1 * col1 * - col0 - + col0 FROM tab1
----
-13599
-2031
-6463

query I rowsort
SELECT - - 27 AS col0 FROM tab2 AS cor0
----
27
27
27

query I rowsort
SELECT DISTINCT ( col2 ) + col1 + - 5 * + col2 FROM tab1 AS cor0
----
-190
-218
-371

query I rowsort
SELECT - cor2.col0 FROM tab0, tab2 AS cor0, tab1 AS cor1, tab2, tab2 AS cor2
----
243 values hashing to b2b584cb071e1d63bf99874835e1bfc4

query I rowsort
SELECT ALL - + ( - 1 ) FROM tab2 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4034
SELECT + 89 DIV col1 FROM tab1 cor0
----
3
6
8

skipif mysql # not compatible
query I rowsort label-4034
SELECT + 89 / col1 FROM tab1 cor0
----
3
6
8

query I rowsort
SELECT DISTINCT + 24 AS col2 FROM tab2 cor0
----
24

query I rowsort
SELECT DISTINCT - - col2 + + cor0.col0 FROM tab0 cor0
----
171
36
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4037
SELECT - col0 * + col0 + CAST( 85 AS SIGNED ) FROM tab2 AS cor0
----
-5999
-6156
36

skipif mysql # not compatible
query I rowsort label-4037
SELECT - col0 * + col0 + CAST ( 85 AS INTEGER ) FROM tab2 AS cor0
----
-5999
-6156
36

query I rowsort
SELECT DISTINCT + + 45 * - col0 AS col2 FROM tab1 AS cor0
----
-135
-2880
-3600

query I rowsort
SELECT ALL - - 8 * col1 AS col1 FROM tab2 AS cor0
----
136
248
472

onlyif mysql # use DIV operator for integer division
query I rowsort label-4040
SELECT DISTINCT + col1 DIV + col2 + 27 * col0 AS col0 FROM tab0 cor0
----
1042
2404
650

skipif mysql # not compatible
query I rowsort label-4040
SELECT DISTINCT + col1 / + col2 + 27 * col0 AS col0 FROM tab0 cor0
----
1042
2404
650

onlyif mysql # use DIV operator for integer division
query I rowsort label-4041
SELECT ALL col0 + col2 DIV ( col1 ) - col1 FROM tab0 AS cor0
----
-2
-62
-62

skipif mysql # not compatible
query I rowsort label-4041
SELECT ALL col0 + col2 / ( col1 ) - col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT - 68 + - col2 FROM tab1 AS cor0
----
-122
-125
-164

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4043
SELECT DISTINCT 95 + col0 * CAST( ( col1 ) AS SIGNED ) FROM tab2 AS cor0
----
1438
312
4697

skipif mysql # not compatible
query I rowsort label-4043
SELECT DISTINCT 95 + col0 * CAST ( ( col1 ) AS INTEGER ) FROM tab2 AS cor0
----
1438
312
4697

query I rowsort
SELECT ALL + - col1 + - col1 * col1 FROM tab2 cor0
----
-306
-3540
-992

query I rowsort
SELECT - + col0 * col0 + + cor0.col2 AS col2 FROM tab1 cor0
----
-4039
-6304
45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4046
SELECT ALL CAST( NULL AS DECIMAL ) / - 7 + tab2.col0 - 18 * 82 * - col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4046
SELECT ALL CAST ( NULL AS REAL ) / - 7 + tab2.col0 - 18 * 82 * - col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + 82 * - col2 AS col0 FROM tab2 cor0
----
2132
2214
3116

onlyif mysql # use DIV operator for integer division
query I rowsort label-4048
SELECT - + col1 * cor0.col2 DIV cor0.col1 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-4048
SELECT - + col1 * cor0.col2 / cor0.col1 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT - col0 + - col1 * + 26 - cor0.col1 AS col2 FROM tab2 cor0
----
-1671
-538
-844

onlyif mysql # use DIV operator for integer division
query I rowsort label-4050
SELECT DISTINCT - col0 DIV + col0 AS col0 FROM tab1 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-4050
SELECT DISTINCT - col0 / + col0 AS col0 FROM tab1 AS cor0
----
-1

query I rowsort
SELECT ALL 31 + + col0 AS col0 FROM tab2 AS cor0
----
109
110
38

query I rowsort
SELECT DISTINCT - 27 AS col2 FROM tab0 cor0
----
-27

query I rowsort
SELECT + - col2 * col2 + + col1 AS col0 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT col1 * 67 + col1 * cor0.col0 AS col0 FROM tab2 AS cor0
----
2294
2482
8555

query I rowsort
SELECT + cor0.col0 * - cor0.col1 + - col0 FROM tab1 AS cor0
----
-1120
-704
-81

onlyif mysql # use DIV operator for integer division
query I rowsort label-4056
SELECT - col2 DIV 86 AS col1 FROM tab2 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4056
SELECT - col2 / 86 AS col1 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT + - col0 + 38 * - col2 AS col2 FROM tab1 AS cor0
----
-2055
-2230
-3728

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4058
SELECT - - cor0.col1 * - 47 * - cor0.col2 + col2 * - CAST( col0 AS SIGNED ) FROM tab1 AS cor0
----
23142
50976
65826

skipif mysql # not compatible
query I rowsort label-4058
SELECT - - cor0.col1 * - 47 * - cor0.col2 + col2 * - CAST ( col0 AS INTEGER ) FROM tab1 AS cor0
----
23142
50976
65826

query I rowsort
SELECT ALL col2 + col1 * 74 AS col1 FROM tab0
----
6397
6816
7179

query I rowsort
SELECT ALL + col1 * col2 * + col2 + - col2 AS col2 FROM tab1
----
119712
32433
75762

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4061
SELECT ALL CAST( NULL AS SIGNED ) * cor0.col0 AS col1 FROM tab1, tab1 cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-4061
SELECT ALL CAST ( NULL AS INTEGER ) * cor0.col0 AS col1 FROM tab1, tab1 cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT - col1 * 9 + 85 AS col2 FROM tab1 AS cor0
----
-149
-32
-5

query I rowsort
SELECT ALL - ( - tab1.col0 ) + - col0 + ( tab1.col0 + + 26 ) * tab1.col1 AS col2 FROM tab1
----
1378
754
900

query I rowsort
SELECT DISTINCT + 16 * - tab1.col2 + col1 AS col0 FROM tab1
----
-1523
-838
-902

query I rowsort
SELECT col1 + col1 + + 69 * - 3 FROM tab1
----
-155
-181
-187

query I rowsort
SELECT ALL col0 + col1 + + col1 AS col2 FROM tab0
----
196
229
271

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 81 * + col1 col1 FROM tab2
----
1377
2511
4779

query I rowsort
SELECT DISTINCT + - 91 * col1 * - cor0.col1 + col1 AS col0 FROM tab0 AS cor0
----
673122
753662
856316

query I rowsort
SELECT ALL - + col2 * col2 + cor0.col2 AS col2 FROM tab0 cor0
----
-1056
-6642
0

query I rowsort
SELECT - ( + cor0.col2 ) + - col2 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT DISTINCT - + 54 * - 59 AS col1 FROM tab0 cor0
----
3186

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-4073
SELECT DISTINCT + - 56 * col1 + + col2 + ( - col2 ) DIV + col2 FROM tab0 AS cor0
----
-4784
-5015
-5432

skipif mysql # not compatible
query I rowsort label-4073
SELECT DISTINCT + - 56 * col1 + + col2 + ( - col2 ) / + col2 FROM tab0 AS cor0
----
-4784
-5015
-5432

query I rowsort
SELECT DISTINCT + + ( + col0 ) * + col1 + + col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT - - 44 + 14 AS col0 FROM tab1 AS cor0
----
58
58
58

query I rowsort
SELECT ALL - ( ( col1 ) ) AS col0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT col1 * - 44 + col1 + - col1 * col0 AS col2 FROM tab2 AS cor0
----
-1550
-2074
-7139

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4078
SELECT - + CAST( 87 AS SIGNED ) * + col0 FROM tab1 cor0
----
-261
-5568
-6960

skipif mysql # not compatible
query I rowsort label-4078
SELECT - + CAST ( 87 AS INTEGER ) * + col0 FROM tab1 cor0
----
-261
-5568
-6960

onlyif mysql # use DIV operator for integer division
query I rowsort label-4079
SELECT ALL col0 DIV col2 - col1 * + 36 * col0 FROM tab0 AS cor0
----
-122185
-291563
-74304

skipif mysql # not compatible
query I rowsort label-4079
SELECT ALL col0 / col2 - col1 * + 36 * col0 FROM tab0 AS cor0
----
-122185
-291563
-74304

onlyif mysql # use DIV operator for integer division
query I rowsort label-4080
SELECT DISTINCT tab0.col2 DIV + cor0.col1 AS col2 FROM tab0, tab0 AS cor0, tab2 cor1
----
0

skipif mysql # not compatible
query I rowsort label-4080
SELECT DISTINCT tab0.col2 / + cor0.col1 AS col2 FROM tab0, tab0 AS cor0, tab2 cor1
----
0

query I rowsort
SELECT ALL + col1 + + col0 * + col1 FROM tab1
----
104
1053
650

onlyif mysql # use DIV operator for integer division
query I rowsort label-4082
SELECT DISTINCT + col1 DIV col1 - + tab2.col2 * - tab2.col2 AS col0 FROM tab2
----
1445
677
730

skipif mysql # not compatible
query I rowsort label-4082
SELECT DISTINCT + col1 / col1 - + tab2.col2 * - tab2.col2 AS col0 FROM tab2
----
1445
677
730

query I rowsort
SELECT + tab0.col1 * tab0.col1 * col1 FROM tab0 WHERE NOT col0 < NULL
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE ( + col0 + col2 * col0 ) <= col1 * tab2.col1
----
7
31
27
78
59
26

query I rowsort
SELECT tab0.col0 * col2 AS col0 FROM tab0 WHERE NOT NULL NOT IN ( + col1 + - col1 / + tab0.col2 )
----

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 + col0 * - col1 + + col1 * - col2 AS col1 FROM tab0
----
-15561
-3492
-4902

query I rowsort
SELECT ALL col1 * + tab2.col2 + - col1 FROM tab2
----
1475
629
806

query I rowsort
SELECT + tab1.col0 * col1 - - col1 * + col0 * col0 FROM tab1
----
312
41600
84240

query I rowsort
SELECT ALL - col1 - + col2 * col1 AS col1 FROM tab2
----
-1593
-663
-868

onlyif mysql # use DIV operator for integer division
query I rowsort label-4091
SELECT DISTINCT + col0 DIV + col0 + - col2 FROM tab1
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-4091
SELECT DISTINCT + col0 / + col0 + - col2 FROM tab1
----
-53
-56
-95

query I rowsort
SELECT ALL - col2 + + col1 AS col0 FROM tab2
----
-21
33
4

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE - col2 >= ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + col1 * col2 col0 FROM tab1 WHERE NOT ( + col1 ) <= col2
----

query I rowsort
SELECT DISTINCT - col1 + - col0 FROM tab2 WHERE NOT col2 IN ( + col2 )
----

query I rowsort
SELECT DISTINCT + col0 AS col1 FROM tab1 WHERE NOT NULL = col0
----

query III rowsort
SELECT ALL * FROM tab0 WHERE + col0 NOT IN ( + col0 + + col2 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

onlyif mysql # use DIV operator for integer division
query I rowsort label-4098
SELECT DISTINCT + col1 DIV - col0 + - col1 col1 FROM tab2
----
-17
-35
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4098
SELECT DISTINCT + col1 / - col0 + - col1 col1 FROM tab2
----
-17
-35
-59

query I rowsort
SELECT + tab1.col2 + + col2 FROM tab1
----
108
114
192

query I rowsort
SELECT DISTINCT col1 * + col2 + col1 * col0 * col2 AS col0 FROM tab1
----
101088
37050
5616

onlyif mysql # use DIV operator for integer division
query I rowsort label-4101
SELECT col1 + + tab1.col0 DIV col2 FROM tab1
----
11
13
26

skipif mysql # not compatible
query I rowsort label-4101
SELECT col1 + + tab1.col0 / col2 FROM tab1
----
11
13
26

query I rowsort
SELECT ALL + col0 - - col0 * tab1.col0 FROM tab1
----
12
4160
6480

query I rowsort
SELECT - col1 - - col0 AS col0 FROM tab1
----
-23
54
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-4104
SELECT ALL + col1 DIV + col1 + - col1 DIV col0 FROM tab2
----
-3
1
1

skipif mysql # not compatible
query I rowsort label-4104
SELECT ALL + col1 / + col1 + - col1 / col0 FROM tab2
----
-3
1
1

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT ( NULL ) < NULL
----

query I rowsort
SELECT DISTINCT - tab0.col1 + col1 * col0 * col0 FROM tab0
----
118728
49450
720720

onlyif mysql # use DIV operator for integer division
query I rowsort label-4107
SELECT DISTINCT - col1 DIV tab1.col2 + tab1.col1 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-4107
SELECT DISTINCT - col1 / tab1.col2 + tab1.col1 FROM tab1
----
10
13
26

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NULL NOT IN ( tab0.col2 + - tab0.col2 * - col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4109
SELECT + col2 * col1 DIV + col2 AS col1 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-4109
SELECT + col2 * col1 / + col2 AS col1 FROM tab1
----
10
13
26

query I rowsort
SELECT DISTINCT col1 * + col0 * + col0 FROM tab0
----
118825
49536
720811

query III rowsort
SELECT * FROM tab2 WHERE NOT ( NULL ) NOT IN ( - col0 * - col1 + - col1 )
----

query I rowsort
SELECT ALL + col1 * - col2 + + tab0.col2 + + col0 FROM tab0 WHERE NOT ( col0 ) = NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4113
SELECT DISTINCT - tab2.col1 DIV - col0 - col1 FROM tab2
----
-17
-27
-59

skipif mysql # not compatible
query I rowsort label-4113
SELECT DISTINCT - tab2.col1 / - col0 - col1 FROM tab2
----
-17
-27
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - col2 * - col0 col2 FROM tab1
----
108
3591
7584

query I rowsort
SELECT + col0 FROM tab2 WHERE NOT NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT cor0.col2 AS col0 FROM tab2 AS cor0 WHERE ( NULL ) IN ( + col2 * - col2 + col1 * cor0.col1 )
----

query I rowsort
SELECT - ( - 98 ) + + col2 FROM tab2 AS cor0
----
124
125
136

query I rowsort
SELECT ALL col2 + 33 * + col1 AS col1 FROM tab1 AS cor0
----
387
525
912

query I rowsort
SELECT tab2.col1 * + ( 85 ) FROM tab2
----
1445
2635
5015

onlyif mysql # use DIV operator for integer division
query I rowsort label-4120
SELECT ALL - 66 DIV - 90 col1 FROM tab2 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to 1f117f467f45d8c6b7553e2e3c842942

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4120
SELECT ALL - 66 / - 90 col1 FROM tab2 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to 1f117f467f45d8c6b7553e2e3c842942

onlyif mysql # use DIV operator for integer division
query I rowsort label-4121
SELECT - col2 + col1 DIV col1 FROM tab2 AS cor0
----
-25
-26
-37

skipif mysql # not compatible
query I rowsort label-4121
SELECT - col2 + col1 / col1 FROM tab2 AS cor0
----
-25
-26
-37

query I rowsort
SELECT + col0 * - col0 + - col0 AS col1 FROM tab0 AS cor0
----
-1260
-600
-8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-4123
SELECT - - col0 DIV col1 + 71 - + cor0.col1 * cor0.col0 * 81 FROM tab2 AS cor0
----
-108708
-17506
-372690

skipif mysql # not compatible
query I rowsort label-4123
SELECT - - col0 / col1 + 71 - + cor0.col1 * cor0.col0 * 81 FROM tab2 AS cor0
----
-108708
-17506
-372690

query I rowsort
SELECT - 32 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to ef8f93119983b962f4c81381ebf4b1e6

query I rowsort
SELECT ALL - col1 + + col2 * 66 - col0 AS col0 FROM tab1
----
3535
3688
6243

query I rowsort
SELECT - - 33 + + 94 * + col2 FROM tab1 AS cor0
----
5109
5391
9057

query I rowsort
SELECT + - 33 * + 13 AS col1 FROM tab2 cor0
----
-429
-429
-429

query I rowsort
SELECT ALL + 42 + 98 FROM tab2
----
140
140
140

query I rowsort
SELECT ALL 22 + 41 FROM tab2
----
63
63
63

query I rowsort
SELECT + - col0 + cor0.col2 AS col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT - ( 33 ) AS col1 FROM tab2 cor0
----
-33
-33
-33

query I rowsort
SELECT + ( col2 ) + col2 AS col1 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT + col2 + + cor0.col0 * col1 AS col2 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT + 70 * col0 FROM tab1 AS cor0
----
210
4480
5600

query I rowsort
SELECT ALL + ( - 68 ) FROM tab1 cor0
----
-68
-68
-68

query I rowsort
SELECT ALL ( cor0.col2 ) + - col0 * + 57 AS col2 FROM tab1 AS cor0
----
-117
-3591
-4464

onlyif mysql # use DIV operator for integer division
query I rowsort label-4137
SELECT col1 - col1 DIV col2 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-4137
SELECT col1 - col1 / col2 FROM tab1
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4138
SELECT DISTINCT col1 * col0 + - CAST( NULL AS DECIMAL ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4138
SELECT DISTINCT col1 * col0 + - CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + 16 + col1 FROM tab0 AS cor0
----
102
107
113

onlyif mysql # use DIV operator for integer division
query I rowsort label-4140
SELECT ALL + col0 * col2 DIV col2 AS col0 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-4140
SELECT ALL + col0 * col2 / col2 AS col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT col0 + 86 AS col1 FROM tab1 AS cor0
----
150
166
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4142
SELECT ALL - + col0 * - CAST( NULL AS SIGNED ) AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4142
SELECT ALL - + col0 * - CAST ( NULL AS INTEGER ) AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 * - col2 * + ( + col2 ) + - col2 * + col0 FROM tab0 AS cor0
----
-34
35145
544070

query I rowsort
SELECT - col0 * col1 + 82 - + col1 FROM tab2 AS cor0
----
-1278
-166
-4579

onlyif mysql # use DIV operator for integer division
query I rowsort label-4145
SELECT col1 * col0 * 37 - + cor0.col1 * col0 DIV - col0 AS col1 FROM tab1 AS cor0
----
23690
2912
38493

skipif mysql # not compatible
query I rowsort label-4145
SELECT col1 * col0 * 37 - + cor0.col1 * col0 / - col0 AS col1 FROM tab1 AS cor0
----
23690
2912
38493

query I rowsort
SELECT - + col0 * cor0.col1 + + 8 FROM tab0 AS cor0
----
-2056
-3387
-8091

query I rowsort
SELECT ALL col0 * + col0 * + cor0.col0 FROM tab1 cor0
----
262144
27
512000

query I rowsort
SELECT ALL col0 * - 4 FROM tab2 AS cor0
----
-28
-312
-316

onlyif mysql # use DIV operator for integer division
query I rowsort label-4149
SELECT ALL - cor0.col1 DIV 22 + 71 FROM tab1, tab1 AS cor0
----
9 values hashing to 6fe4fe0585facdd463c3283ed96bac97

skipif mysql # not compatible
query I rowsort label-4149
SELECT ALL - cor0.col1 / 22 + 71 FROM tab1, tab1 AS cor0
----
9 values hashing to 6fe4fe0585facdd463c3283ed96bac97

query I rowsort
SELECT DISTINCT - + 72 * - col1 AS col1 FROM tab0 cor0
----
6192
6552
6984

query I rowsort
SELECT ALL + col1 + col1 + col2 FROM tab1 AS cor0
----
106
122
77

query I rowsort
SELECT DISTINCT + 88 * col0 AS col2 FROM tab0 AS cor0
----
2112
3080
7832

query I rowsort
SELECT 40 * - col2 + - col2 AS col2 FROM tab0 AS cor0
----
-1353
-3362
-41

query I rowsort
SELECT DISTINCT - ( 13 ) FROM tab2 AS cor0
----
-13

query I rowsort
SELECT ALL + 93 + col1 AS col0 FROM tab0 AS cor0
----
179
184
190

query I rowsort
SELECT ALL cor0.col0 + cor0.col1 * col1 AS col2 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT DISTINCT col2 - - 64 FROM tab1
----
118
121
160

onlyif mysql # use DIV operator for integer division
query I rowsort label-4158
SELECT + col2 DIV - 22 + + 57 + col2 FROM tab0
----
136
58
89

skipif mysql # not compatible
query I rowsort label-4158
SELECT + col2 / - 22 + + 57 + col2 FROM tab0
----
136
58
89

query I rowsort
SELECT ALL col2 - + 44 AS col0 FROM tab2
----
-17
-18
-6

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 cor0 CROSS JOIN tab1, tab1 AS cor1, tab2, tab2 AS cor2
----
3645 values hashing to 803a5565701c4ced6bba69940782c17a

query I rowsort
SELECT ALL - tab2.col2 * + 2 + col2 FROM tab2
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-4162
SELECT ALL 8 DIV - tab2.col1 + col0 FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort label-4162
SELECT ALL 8 / - tab2.col1 + col0 FROM tab2
----
7
78
79

query I rowsort
SELECT ALL ( tab0.col2 ) + col0 * tab0.col2 FROM tab0
----
36
7380
825

query I rowsort
SELECT ALL 94 * col0 * col1 + tab2.col2 AS col0 FROM tab2
----
126280
20425
432614

query I rowsort
SELECT ALL - col2 * - col0 + col1 * - tab0.col1 + + col2 AS col0 FROM tab0
----
-6571
-901
-9373

query I rowsort
SELECT - col0 * col1 + + col0 FROM tab0
----
-2040
-3360
-8010

query I rowsort
SELECT ALL 63 + col2 AS col1 FROM tab1
----
117
120
159

query I rowsort
SELECT - tab2.col2 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

onlyif mysql # use DIV operator for integer division
query I rowsort label-4169
SELECT DISTINCT + col1 DIV - 97 col0 FROM tab0 cor0
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4169
SELECT DISTINCT + col1 / - 97 col0 FROM tab0 cor0
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + col1 col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL col2 * - ( col1 ) + cor0.col1 * - col2 AS col0 FROM tab2 AS cor0
----
-1292
-1674
-3068

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 - cor0.col1 * col0 col0 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT ALL 39 * col1 AS col2 FROM tab2
----
1209
2301
663

query I rowsort
SELECT col1 * col0 + + 23 AS col2 FROM tab1
----
101
1063
663

query I rowsort
SELECT DISTINCT - - col1 - + 80 * - col0 FROM tab0 cor0
----
2006
2897
7211

onlyif mysql # use DIV operator for integer division
query I rowsort label-4176
SELECT tab1.col0 + - 52 * 86 + tab1.col1 DIV col0 FROM tab1
----
-4392
-4408
-4461

skipif mysql # not compatible
query I rowsort label-4176
SELECT tab1.col0 + - 52 * 86 + tab1.col1 / col0 FROM tab1
----
-4392
-4408
-4461

query I rowsort
SELECT DISTINCT + col2 + - ( col0 ) * - col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT ALL + col1 * + 31 + col2 AS col2 FROM tab2 AS cor0
----
1855
565
988

onlyif mysql # use DIV operator for integer division
query I rowsort label-4179
SELECT - col2 DIV + 53 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4179
SELECT - col2 / + 53 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL + col0 * 59 - - col0 * col1 AS col1 FROM tab0 AS cor0
----
13350
3480
5460

query I rowsort
SELECT cor0.col2 * ( ( - col0 ) ) * - col0 FROM tab2 AS cor0
----
1323
158184
237158

query I rowsort
SELECT ALL - col1 + - ( ( - col1 ) ) * col0 FROM tab2 AS cor0
----
1326
186
4543

onlyif mysql # use DIV operator for integer division
query I rowsort label-4183
SELECT DISTINCT - cor0.col2 + - ( - 98 ) DIV + col2 AS col0 FROM tab1 AS cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-4183
SELECT DISTINCT - cor0.col2 + - ( - 98 ) / + col2 AS col0 FROM tab1 AS cor0
----
-53
-56
-95

query I rowsort
SELECT ALL cor0.col1 * - ( col1 ) FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT DISTINCT + col2 + - col2 * - col1 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT - + col1 * + cor0.col1 AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT NULL IN ( col2 * col2 ) AND NOT ( NULL ) = NULL
----

query I rowsort
SELECT DISTINCT col0 * col0 * col0 FROM tab1
----
262144
27
512000

query I rowsort
SELECT + tab2.col0 + - tab2.col1 AS col2 FROM tab2
----
-24
19
62

query I rowsort
SELECT ALL + col2 * + col1 * - tab0.col2 AS col0 FROM tab0
----
-611884
-93654
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4191
SELECT ALL + + col1 DIV col1 + col1 AS col2 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-4191
SELECT ALL + + col1 / col1 + col1 AS col2 FROM tab1 AS cor0
----
11
14
27

query I rowsort
SELECT ALL col0 * col0 + col1 AS col2 FROM tab1 AS cor0
----
35
4106
6413

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 + col1 col1 FROM tab0 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4194
SELECT col1 * - col2 DIV cor0.col2 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-4194
SELECT col1 * - col2 / cor0.col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT + col0 * col1 + + col1 + - cor0.col0 AS col0 FROM tab1 AS cor0
----
101
586
973

query I rowsort
SELECT - - 63 * + col0 + + col0 FROM tab1 AS cor0
----
192
4096
5120

query I rowsort
SELECT ALL col1 * col0 + col2 AS col2 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT ALL - - 49 FROM tab1 cor0
----
49
49
49

query I rowsort
SELECT DISTINCT - - cor0.col0 + col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT + 36 + - col0 AS col1 FROM tab0 AS cor0
----
-53
1
12

query I rowsort
SELECT DISTINCT + - cor0.col2 + + col1 * col2 + + col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT + col1 * col1 * + col0 + - col1 FROM tab1 AS cor0
----
13507
2002
6390

query I rowsort
SELECT ALL - col1 - col0 * + col1 AS col0 FROM tab2 AS cor0
----
-1360
-248
-4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-4204
SELECT + ( + col2 ) DIV - col0 + - col2 FROM tab1 AS cor0
----
-57
-72
-97

skipif mysql # not compatible
query I rowsort label-4204
SELECT + ( + col2 ) / - col0 + - col2 FROM tab1 AS cor0
----
-57
-72
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4205
SELECT ALL - + 12 + col0 DIV - col1 FROM tab0 AS cor0
----
-12
-12
-12

skipif mysql # not compatible
query I rowsort label-4205
SELECT ALL - + 12 + col0 / - col1 FROM tab0 AS cor0
----
-12
-12
-12

onlyif mysql # use DIV operator for integer division
query I rowsort label-4206
SELECT + cor0.col2 DIV col2 col0 FROM tab0 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4206
SELECT + cor0.col2 / col2 col0 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT + 76 AS col2 FROM tab2
----
76

query I rowsort
SELECT DISTINCT 51 * col1 FROM tab0
----
4386
4641
4947

query I rowsort
SELECT DISTINCT + col1 * col1 - col1 FROM tab2
----
272
3422
930

query I rowsort
SELECT - 28 * col1 AS col1 FROM tab0
----
-2408
-2548
-2716

query I rowsort
SELECT DISTINCT tab0.col0 * col2 AS col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT + 2 * + col2 AS col2 FROM tab0
----
164
2
66

query I rowsort
SELECT 70 * col2 FROM tab1
----
3780
3990
6720

query I rowsort
SELECT + 33 + - cor0.col1 - + col0 FROM tab2 AS cor0
----
-104
-5
-63

query I rowsort
SELECT - + col1 * - col1 + ( col2 ) * col1 * col0 FROM tab2 AS cor0
----
123133
51323
6820

onlyif mysql # use DIV operator for integer division
query I rowsort label-4216
SELECT col2 DIV - col1 col1 FROM tab2 AS cor0
----
-2
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4216
SELECT col2 / - col1 col1 FROM tab2 AS cor0
----
-2
0
0

query I rowsort
SELECT ALL - 53 FROM tab1, tab2 AS cor0
----
9 values hashing to fee5c00ad71c23e23683a32c71fe6e7d

query I rowsort
SELECT - + col2 * col1 + - 0 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT - - col0 * 97 FROM tab0 AS cor0
----
2328
3395
8633

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4220
SELECT col1 + - CAST( NULL AS SIGNED ) * col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4220
SELECT col1 + - CAST ( NULL AS INTEGER ) * col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4221
SELECT - col1 * CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4221
SELECT - col1 * CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4222
SELECT DISTINCT + 73 DIV col1 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-4222
SELECT DISTINCT + 73 / col1 FROM tab0
----
0

query I rowsort
SELECT 62 * + col2 FROM tab1
----
3348
3534
5952

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4224
SELECT - col0 * - CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4224
SELECT - col0 * - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * col0 col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ( + cor0.col0 ) + cor0.col2 * - col2 * - 12 FROM tab0 AS cor0
----
13092
47
80777

query I rowsort
SELECT ALL - 22 FROM tab1, tab2 cor0, tab2, tab0 AS cor1
----
81 values hashing to a0e2414933a8871692e3623f463e9d4b

onlyif mysql # use DIV operator for integer division
query I rowsort label-4228
SELECT + col0 * col0 DIV - col1 FROM tab2 AS cor0
----
-1
-103
-367

skipif mysql # not compatible
query I rowsort label-4228
SELECT + col0 * col0 / - col1 FROM tab2 AS cor0
----
-1
-103
-367

query I rowsort
SELECT + 5 + - 48 * + col0 FROM tab0 AS cor0
----
-1147
-1675
-4267

query I rowsort
SELECT - ( 70 ) * + col2 AS col2 FROM tab1 AS cor0
----
-3780
-3990
-6720

query I rowsort
SELECT + col2 + col2 * + 43 FROM tab1
----
2376
2508
4224

query I rowsort
SELECT + - cor1.col0 * + ( + 18 ) + - cor0.col0 AS col2 FROM tab1 cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 8e34a2649d8a92279510691b688c56d8

onlyif mysql # use DIV operator for integer division
query I rowsort label-4233
SELECT tab1.col0 DIV col2 AS col1 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4233
SELECT tab1.col0 / col2 AS col1 FROM tab1
----
0
0
1

query I rowsort
SELECT ALL 87 FROM tab2, tab2 AS cor0
----
9 values hashing to fa0cdd86483844cda3bb806e032d5c64

query I rowsort
SELECT DISTINCT - col2 * + 73 AS col2 FROM tab0
----
-2409
-5986
-73

query I rowsort
SELECT DISTINCT - 43 * + col0 + - ( col2 ) * col0 FROM tab1 AS cor0
----
-11120
-291
-6400

onlyif mysql # use DIV operator for integer division
query I rowsort label-4237
SELECT ALL + col2 DIV - col0 col1 FROM tab1 AS cor0
----
-1
-18
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4237
SELECT ALL + col2 / - col0 col1 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT DISTINCT + 65 * col2 + 64 * col1 AS col1 FROM tab2 AS cor0
----
3558
3739
5466

query I rowsort
SELECT 60 + - col2 FROM tab0 AS cor0
----
-22
27
59

query I rowsort
SELECT ALL + 87 + + col2 AS col1 FROM tab0 cor0
----
120
169
88

query I rowsort
SELECT ALL - 91 * - col0 FROM tab1 AS cor0
----
273
5824
7280

query I rowsort
SELECT DISTINCT col1 * + col0 + - col1 AS col0 FROM tab1 AS cor0
----
1027
52
630

onlyif mysql # use DIV operator for integer division
query I rowsort label-4243
SELECT ALL + col0 - col2 DIV 7 AS col1 FROM tab1 AS cor0
----
-4
56
67

skipif mysql # not compatible
query I rowsort label-4243
SELECT ALL + col0 - col2 / 7 AS col1 FROM tab1 AS cor0
----
-4
56
67

query I rowsort
SELECT ALL - col1 * - col0 * - cor0.col1 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT DISTINCT 88 * + col0 + col0 * - col1 AS col2 FROM tab1 AS cor0
----
186
4992
6000

query I rowsort
SELECT ALL + 88 AS col1 FROM tab0 AS cor0
----
88
88
88

query I rowsort
SELECT DISTINCT - ( + col2 ) * col1 + 69 * col0 FROM tab0 AS cor0
----
-1182
-1321
2318

query I rowsort
SELECT ALL + - 54 * col2 AS col0 FROM tab0 cor0
----
-1782
-4428
-54

query I rowsort
SELECT DISTINCT cor0.col1 + col0 AS col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL col2 + + col2 * - ( + 83 * - col2 + - ( cor0.col1 ) ) FROM tab0 AS cor0
----
181
565636
93258

query I rowsort
SELECT ALL 94 - + col2 AS col2 FROM tab0
----
12
61
93

query I rowsort
SELECT ALL 64 + col0 * + 1 - - col1 AS col0 FROM tab0
----
174
196
244

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4253
SELECT - 78 * cor0.col2 + + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4253
SELECT - 78 * cor0.col2 + + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( + cor1.col0 ) AS col1 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
7
78
79

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0, tab1 AS cor1, tab1, tab0 cor2
----
3645 values hashing to 0cc433e09ad9e61562b7840dd1db6f57

query I rowsort
SELECT ALL 64 * cor0.col2 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to ae3d56abe7a621bdd86d1268fc3db87b

query I rowsort
SELECT DISTINCT - + col2 - + 49 FROM tab0 cor0
----
-131
-50
-82

query I rowsort
SELECT + 85 FROM tab0, tab0 AS cor0, tab2, tab0 AS cor1
----
81 values hashing to 5e8deeabad7bbbaf313fcdcb4adc75eb

query I rowsort
SELECT ALL tab1.col1 * col0 + col1 FROM tab1
----
104
1053
650

query I rowsort
SELECT DISTINCT 6 AS col0 FROM tab0, tab2, tab0 AS cor0
----
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 47 col0 FROM tab1
----
47

query I rowsort
SELECT - 2 * col2 FROM tab0 AS cor0
----
-164
-2
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 42 col1 FROM tab0 AS cor0
----
-42

query I rowsort
SELECT DISTINCT - ( ( + col0 ) ) * col0 + col2 FROM tab0 AS cor0
----
-1224
-543
-7839

query I rowsort
SELECT - 54 * 35 FROM tab0 cor0
----
-1890
-1890
-1890

query I rowsort
SELECT + - col0 * 50 AS col2 FROM tab1 cor0
----
-150
-3200
-4000

query I rowsort
SELECT - 88 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 467301f887614eb7beda22c561b0fad2

query I rowsort
SELECT ALL - col0 * 25 FROM tab2 AS cor0
----
-175
-1950
-1975

query I rowsort
SELECT DISTINCT - col0 * ( - col0 ) FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT ALL - col2 * col2 + - col0 * + col0 AS col0 FROM tab1 AS cor0
----
-15616
-2925
-7345

query I rowsort
SELECT + col1 + + 55 AS col1 FROM tab1 cor0
----
65
68
81

query I rowsort
SELECT - col2 * - ( 19 ) AS col2 FROM tab0 AS cor0
----
1558
19
627

query I rowsort
SELECT ALL col1 * 28 FROM tab1 AS cor0
----
280
364
728

query I rowsort
SELECT DISTINCT col0 + ( + col0 ) * - col0 AS col2 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT DISTINCT col2 * col0 * ( cor0.col2 * + col0 ) + + col1 AS col0 FROM tab2 cor0
----
35752
4112843
9012021

query I rowsort
SELECT DISTINCT + col0 * - ( cor0.col0 ) + col1 AS col2 FROM tab0 AS cor0
----
-1128
-490
-7830

onlyif mysql # use DIV operator for integer division
query I rowsort label-4277
SELECT - col0 DIV - 5 FROM tab2 AS cor0
----
1
15
15

skipif mysql # not compatible
query I rowsort label-4277
SELECT - col0 / - 5 FROM tab2 AS cor0
----
1
15
15

query I rowsort
SELECT ALL + col1 * ( cor0.col2 * - col2 ) AS col2 FROM tab1 AS cor0
----
-119808
-32490
-75816

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4279
SELECT - CAST( col2 AS SIGNED ) * - col1 + - col1 AS col1 FROM tab0 AS cor0
----
0
2752
7371

skipif mysql # not compatible
query I rowsort label-4279
SELECT - CAST ( col2 AS INTEGER ) * - col1 + - col1 AS col1 FROM tab0 AS cor0
----
0
2752
7371

onlyif mysql # use DIV operator for integer division
query I rowsort label-4280
SELECT ALL - - 48 DIV + col1 + + col0 - + CAST( + cor0.col2 AS SIGNED ) * col0 AS col2 FROM tab2 AS cor0
----
-181
-1950
-2921

skipif mysql # not compatible
query I rowsort label-4280
SELECT ALL - - 48 / + col1 + + col0 - + CAST ( + cor0.col2 AS INTEGER ) * col0 AS col2 FROM tab2 AS cor0
----
-181
-1950
-2921

query I rowsort
SELECT ALL cor0.col1 * + col1 + - col0 FROM tab0 cor0
----
7372
8192
9374

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
24
35
89

query I rowsort
SELECT ALL - col2 * cor0.col1 + + cor0.col2 AS col1 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT + col1 + col1 * + col0 AS col1 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT + 14 * + col1 + col2 * - col1 AS col1 FROM tab1 AS cor0
----
-1040
-1066
-430

query I rowsort
SELECT ALL col1 + - col0 AS col0 FROM tab0 cor0
----
2
62
62

query I rowsort
SELECT DISTINCT + + ( col2 ) + ( + col1 ) AS col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT - + col2 + cor0.col0 + - col2 FROM tab0 AS cor0
----
-42
-75
33

query I rowsort
SELECT - + cor0.col1 + + col1 * 14 AS col0 FROM tab2 AS cor0
----
221
403
767

query I rowsort
SELECT 82 * - tab2.col1 + - ( 8 ) AS col1 FROM tab2
----
-1402
-2550
-4846

query I rowsort
SELECT ALL - col0 * col0 + 20 FROM tab0 AS cor0
----
-1205
-556
-7901

query I rowsort
SELECT col2 + - col2 * + 26 AS col2 FROM tab1
----
-1350
-1425
-2400

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT DISTINCT - 58 FROM tab2, tab0, tab1 AS cor0
----
-58

query I rowsort
SELECT DISTINCT 39 AS col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
39

query I rowsort
SELECT ALL + 10 * + 11 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to ebfbd032a0a7b9ce9f54a2516c43134d

query I rowsort
SELECT ALL col0 + + 37 * + col1 * col2 FROM tab0 AS cor0
----
105030
276183
3624

query I rowsort
SELECT ALL col0 + - ( col1 ) FROM tab0
----
-2
-62
-62

query I rowsort
SELECT 83 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 18f405c31a0fb47ce3cc9f7effa8855c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 29 col0 FROM tab0
----
29
29
29

query I rowsort
SELECT DISTINCT - col1 + col1 * - col1 FROM tab0 AS cor0
----
-7482
-8372
-9506

query I rowsort
SELECT ALL + 57 - col1 FROM tab0 cor0
----
-29
-34
-40

query I rowsort
SELECT DISTINCT - 60 + cor0.col0 FROM tab2 AS cor0
----
-53
18
19

query I rowsort
SELECT ALL - 60 - col0 FROM tab2 AS cor0
----
-138
-139
-67

query I rowsort
SELECT ALL + cor0.col0 + col2 FROM tab0 cor0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 12 * + col1 col1 FROM tab1 AS cor0
----
120
156
312

query I rowsort
SELECT DISTINCT 17 AS col2 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
17

onlyif mysql # use DIV operator for integer division
query I rowsort label-4308
SELECT col1 * + col0 + - cor0.col1 DIV 11 AS col2 FROM tab0 AS cor0
----
2057
3387
8091

skipif mysql # not compatible
query I rowsort label-4308
SELECT col1 * + col0 + - cor0.col1 / 11 AS col2 FROM tab0 AS cor0
----
2057
3387
8091

query I rowsort
SELECT col0 * + col1 + col0 AS col1 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT + - col2 * + col0 + + ( cor0.col0 ) FROM tab2 AS cor0
----
-182
-1950
-2923

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4311
SELECT - CAST( 79 AS SIGNED ) FROM tab2, tab2 AS cor0
----
9 values hashing to 1b7b0b34fe3431fb409719624d12791f

skipif mysql # not compatible
query I rowsort label-4311
SELECT - CAST ( 79 AS INTEGER ) FROM tab2, tab2 AS cor0
----
9 values hashing to 1b7b0b34fe3431fb409719624d12791f

query I rowsort
SELECT tab0.col2 - col1 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT - ( + 77 ) AS col1 FROM tab2, tab0 cor0
----
9 values hashing to 3a24155cb91ceff1e67bb51c07b72107

query I rowsort
SELECT - + col1 + 68 AS col2 FROM tab0 AS cor0
----
-18
-23
-29

query I rowsort
SELECT 36 * ( + col2 ) + - col1 AS col1 FROM tab0 AS cor0
----
-61
1102
2861

query I rowsort
SELECT ALL - 89 * 67 FROM tab0 AS cor0
----
-5963
-5963
-5963

query I rowsort
SELECT DISTINCT - 89 * col2 FROM tab0 AS cor0
----
-2937
-7298
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 37 col1 FROM tab2 cor0
----
37

query I rowsort
SELECT - - 42 + col0 * - col0 * - col1 AS col1 FROM tab0 AS cor0
----
118867
49578
720853

query I rowsort
SELECT col0 - + col1 AS col0 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT + 1 + col1 AS col1 FROM tab0 AS cor0
----
87
92
98

query I rowsort
SELECT ( - 79 ) * + col2 + ( col0 ) FROM tab1 cor0
----
-4263
-4439
-7504

query I rowsort
SELECT - + 60 + col2 + col1 FROM tab2 AS cor0
----
-2
-5
25

query I rowsort
SELECT cor0.col1 + - col1 + - col0 FROM tab1 AS cor0
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 52 col2 FROM tab1 AS cor0
----
-52
-52
-52

query I rowsort
SELECT - 8 * cor0.col2 * - ( 66 ) AS col0 FROM tab1 AS cor0
----
28512
30096
50688

query I rowsort
SELECT - 88 * + col0 FROM tab1 AS cor0
----
-264
-5632
-7040

query I rowsort
SELECT + col1 + col1 * - col1 AS col0 FROM tab2 AS cor0
----
-272
-3422
-930

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4329
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col2 FROM tab2, tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4329
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col2 FROM tab2, tab1 AS cor0
----
NULL

query I rowsort
SELECT + col0 * - ( - col1 ) AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT + 17 + - 59 FROM tab0, tab1 AS cor0
----
-42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + col0 * - col2 col1 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT ALL + col1 * - 26 * col2 + + col2 * - 28 * - col2 FROM tab1 AS cor0
----
225600
45144
76152

onlyif mysql # use DIV operator for integer division
query I rowsort label-4334
SELECT ALL - col0 DIV col2 FROM tab0 cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-4334
SELECT ALL - col0 / col2 FROM tab0 cor0
----
-1
-35
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4335
SELECT ALL col2 DIV + col0 + 51 FROM tab2 AS cor0
----
51
51
54

skipif mysql # not compatible
query I rowsort label-4335
SELECT ALL col2 / + col0 + 51 FROM tab2 AS cor0
----
51
51
54

query I rowsort
SELECT ALL + col2 * - 54 FROM tab1
----
-2916
-3078
-5184

onlyif mysql # use DIV operator for integer division
query I rowsort label-4337
SELECT - col0 DIV ( col1 ) AS col0 FROM tab2 AS cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-4337
SELECT - col0 / ( col1 ) AS col0 FROM tab2 AS cor0
----
-1
-4
0

query I rowsort
SELECT ALL - col1 * col0 + - ( col0 ) AS col1 FROM tab0 AS cor0
----
-2088
-3430
-8188

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4339
SELECT ALL col2 + - CAST( NULL AS SIGNED ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4339
SELECT ALL col2 + - CAST ( NULL AS INTEGER ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - col1 + cor0.col1 AS col1 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT DISTINCT col0 + col2 * cor0.col1 FROM tab1 AS cor0
----
1328
1407
634

onlyif mysql # use DIV operator for integer division
query I rowsort label-4342
SELECT DISTINCT col2 DIV cor0.col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-4342
SELECT DISTINCT col2 / cor0.col1 FROM tab1 AS cor0
----
2
5
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4343
SELECT DISTINCT col1 + - CAST( NULL AS SIGNED ) / col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4343
SELECT DISTINCT col1 + - CAST ( NULL AS INTEGER ) / col0 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( - col2 ) * + col0 col0 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4345
SELECT DISTINCT - CAST( + cor0.col2 AS SIGNED ) FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-4345
SELECT DISTINCT - CAST ( + cor0.col2 AS INTEGER ) FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT - 66 * - col0 FROM tab1 AS cor0
----
198
4224
5280

query I rowsort
SELECT ALL - - col1 * - col0 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL - col0 + 79 FROM tab2 AS cor0
----
0
1
72

query I rowsort
SELECT ALL cor0.col0 * + col1 + - col1 AS col2 FROM tab2 AS cor0
----
1326
186
4543

onlyif mysql # use DIV operator for integer division
query I rowsort label-4350
SELECT DISTINCT - col0 DIV col1 + ( + col1 ) * + col0 * + ( col2 * + col2 ) - + 98 DIV col1 AS col2 FROM tab0 AS cor0
----
2247695
3394
54457675

skipif mysql # not compatible
query I rowsort label-4350
SELECT DISTINCT - col0 / col1 + ( + col1 ) * + col0 * + ( col2 * + col2 ) - + 98 / col1 AS col2 FROM tab0 AS cor0
----
2247695
3394
54457675

query I rowsort
SELECT ALL - col0 + - cor0.col1 * 16 AS col2 FROM tab2 AS cor0
----
-1022
-351
-503

query I rowsort
SELECT ALL + 86 + - col1 FROM tab0 AS cor0
----
-11
-5
0

query I rowsort
SELECT DISTINCT - 90 + + col0 FROM tab2 AS cor0
----
-11
-12
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-4354
SELECT 79 DIV - 79 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 84da757b1b7b0069ce25607f39bc08d9

skipif mysql # not compatible
query I rowsort label-4354
SELECT 79 / - 79 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 84da757b1b7b0069ce25607f39bc08d9

query I rowsort
SELECT ALL + cor0.col2 + - col1 * cor0.col0 AS col1 FROM tab0 AS cor0
----
-2031
-3394
-8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-4356
SELECT col0 DIV - 71 FROM tab0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4356
SELECT col0 / - 71 FROM tab0
----
-1
0
0

query I rowsort
SELECT ALL 48 * + col0 + col2 * col1 AS col2 FROM tab1
----
1548
3642
5088

query I rowsort
SELECT ALL ( - col0 ) + + col0 * + col0 FROM tab0
----
1190
552
7832

query I rowsort
SELECT DISTINCT - 68 AS col2 FROM tab1, tab1 AS cor0 CROSS JOIN tab2, tab2 AS cor1
----
-68

query I rowsort
SELECT ALL - 62 * - 45 AS col2 FROM tab2 cor0
----
2790
2790
2790

query I rowsort
SELECT - 20 + + col2 AS col1 FROM tab1 AS cor0
----
34
37
76

query I rowsort
SELECT + col1 + col0 + - cor0.col2 AS col2 FROM tab2 AS cor0
----
11
111
58

query I rowsort
SELECT DISTINCT + - 6 AS col1 FROM tab0 AS cor0
----
-6

query I rowsort
SELECT ALL + 56 * + 95 AS col1 FROM tab2 AS cor0
----
5320
5320
5320

query I rowsort
SELECT ALL + - col0 + + col0 * 64 AS col1 FROM tab0 AS cor0
----
1512
2205
5607

query I rowsort
SELECT + + col2 * col1 * 83 AS col0 FROM tab1 AS cor0
----
103584
116532
47310

onlyif mysql # use DIV operator for integer division
query I rowsort label-4367
SELECT + - 25 DIV col0 AS col1 FROM tab2 AS cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-4367
SELECT + - 25 / col0 AS col1 FROM tab2 AS cor0
----
-3
0
0

query I rowsort
SELECT 86 AS col2 FROM tab0, tab2 cor0
----
9 values hashing to 2d8c3a0d19ea51447f83cd18b49fee19

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4369
SELECT DISTINCT + col2 * - CAST( NULL AS SIGNED ) + 82 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-4369
SELECT DISTINCT + col2 * - CAST ( NULL AS INTEGER ) + 82 FROM tab0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4370
SELECT cor0.col1 DIV cor0.col1 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4370
SELECT cor0.col1 / cor0.col1 FROM tab1 cor0
----
1
1
1

query I rowsort
SELECT ALL col0 * col1 * - col2 FROM tab0 cor0
----
-3395
-664118
-68112

query I rowsort
SELECT DISTINCT - col1 * + 53 AS col1 FROM tab2 AS cor0
----
-1643
-3127
-901

query I rowsort
SELECT 2 AS col0 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 535345c50a19fdab97ce05d1837b1f09

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4374
SELECT col1 * - CAST( NULL AS DECIMAL ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4374
SELECT col1 * - CAST ( NULL AS REAL ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col0 * 16 + - col0 FROM tab2
----
-119
-1326
-1343

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + + col0 col0 FROM tab1 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4377
SELECT ALL col1 DIV - 1 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-4377
SELECT ALL col1 / - 1 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT - col2 * 86 + 77 AS col0 FROM tab0 AS cor0
----
-2761
-6975
-9

query I rowsort
SELECT ALL - - cor0.col0 + - 92 FROM tab1 AS cor0
----
-12
-28
-89

query I rowsort
SELECT - col0 * 65 + + col2 FROM tab0 AS cor0
----
-1527
-2274
-5703

onlyif mysql # use DIV operator for integer division
query I rowsort label-4381
SELECT DISTINCT - col2 DIV ( 16 ) FROM tab1 AS cor0
----
-3
-6

skipif mysql # not compatible
query I rowsort label-4381
SELECT DISTINCT - col2 / ( 16 ) FROM tab1 AS cor0
----
-3
-6

query I rowsort
SELECT + + col1 + + col1 + + col1 FROM tab0 AS cor0
----
258
273
291

query I rowsort
SELECT ALL - 0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT 80 * - col0 + col1 FROM tab2 AS cor0
----
-529
-6181
-6303

query I rowsort
SELECT DISTINCT - + ( + col1 ) + col2 + col1 * col2 FROM tab2 AS cor0
----
1501
667
833

query I rowsort
SELECT col1 * + cor0.col1 + col0 * 72 FROM tab1 cor0
----
4708
5929
892

query I rowsort
SELECT DISTINCT 16 * + col1 FROM tab2 AS cor0
----
272
496
944

onlyif mysql # use DIV operator for integer division
query I rowsort label-4388
SELECT col0 DIV - col2 + col0 AS col0 FROM tab0 AS cor0
----
0
24
88

skipif mysql # not compatible
query I rowsort label-4388
SELECT col0 / - col2 + col0 AS col0 FROM tab0 AS cor0
----
0
24
88

query I rowsort
SELECT ALL + + cor0.col2 + 53 FROM tab2 AS cor0
----
79
80
91

query I rowsort
SELECT ALL + cor0.col2 + col1 * col1 AS col0 FROM tab0 AS cor0
----
7429
8363
9410

onlyif mysql # use DIV operator for integer division
query I rowsort label-4391
SELECT DISTINCT - - cor0.col2 + + 57 DIV - col1 FROM tab1 cor0
----
52
92

skipif mysql # not compatible
query I rowsort label-4391
SELECT DISTINCT - - cor0.col2 + + 57 / - col1 FROM tab1 cor0
----
52
92

query I rowsort
SELECT DISTINCT - col2 * + col1 + - col0 * tab0.col0 FROM tab0
----
-1322
-15383
-3414

query I rowsort
SELECT + tab1.col0 + + 24 AS col2 FROM tab1
----
104
27
88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4394
SELECT ALL col0 + + CAST( NULL AS DECIMAL ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4394
SELECT ALL col0 + + CAST ( NULL AS REAL ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT + tab1.col2 + ( col1 ) AS col1 FROM tab1
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-4396
SELECT + col1 * col0 + + col0 DIV col1 AS col2 FROM tab2
----
1347
217
4603

skipif mysql # not compatible
query I rowsort label-4396
SELECT + col1 * col0 + + col0 / col1 AS col2 FROM tab2
----
1347
217
4603

query I rowsort
SELECT DISTINCT 38 * col0 + col0 FROM tab0 AS cor0
----
1365
3471
936

query I rowsort
SELECT + - ( col0 ) AS col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT + - cor0.col2 FROM tab1, tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT + + col2 + col1 * + col1 AS col0 FROM tab1 AS cor0
----
157
265
730

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4401
SELECT DISTINCT - col0 / CAST( NULL AS SIGNED ) + 54 * col0 * + ( col1 ) AS col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-4401
SELECT DISTINCT - col0 / CAST ( NULL AS INTEGER ) + 54 * col0 * + ( col1 ) AS col2 FROM tab1
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4402
SELECT + CAST( NULL AS SIGNED ) + ( col1 ) col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4402
SELECT + CAST ( NULL AS INTEGER ) + ( col1 ) col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col0 * + ( tab1.col1 ) FROM tab1
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-4404
SELECT - col1 + col1 DIV col2 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-4404
SELECT - col1 + col1 / col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT - ( + col0 + tab2.col2 * + 39 ) AS col2 FROM tab2
----
-1060
-1092
-1561

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0, tab1 AS cor0, tab0 cor1
----
972 values hashing to 5e655b1287771868a8f868574a94d749

query I rowsort
SELECT - ( col1 + col0 ) * - 54 * tab0.col0 FROM tab0
----
142560
249480
865080

query I rowsort
SELECT + col0 * 93 FROM tab1
----
279
5952
7440

query I rowsort
SELECT col0 * - col1 + - col0 AS col2 FROM tab0 cor0
----
-2088
-3430
-8188

query I rowsort
SELECT 3 AS col2 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 3e22859a313d85a6146c6df5f23d77cf

query I rowsort
SELECT DISTINCT - tab0.col1 * + cor0.col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 3e351fdfa2fd88779f2d7b6136dc00d1

query I rowsort
SELECT - tab2.col0 + - col1 * + col2 * tab2.col1 FROM tab2
----
-11061
-25954
-90584

query I rowsort
SELECT col2 + col0 * col2 + col1 FROM tab1
----
242
3715
7789

query I rowsort
SELECT DISTINCT + tab1.col1 + tab1.col2 * + col0 FROM tab1
----
188
3658
7693

onlyif mysql # use DIV operator for integer division
query I rowsort label-4415
SELECT DISTINCT col2 + - ( col0 ) + + col0 DIV + col0 AS col0 FROM tab0 AS cor0
----
-33
-6
10

skipif mysql # not compatible
query I rowsort label-4415
SELECT DISTINCT col2 + - ( col0 ) + + col0 / + col0 AS col0 FROM tab0 AS cor0
----
-33
-6
10

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 + + col0 - + cor0.col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - + col2 * col1 - + col0 * - col2 FROM tab0 AS cor0
----
-164
-2046
-62

query I rowsort
SELECT DISTINCT col1 + + 87 FROM tab0 AS cor0
----
173
178
184

query I rowsort
SELECT DISTINCT + - col2 + + 32 AS col2 FROM tab2 AS cor0
----
-6
5
6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4421
SELECT ALL - col0 - CAST( + col0 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
-128
-160
-6

skipif mysql # not compatible
query I rowsort label-4421
SELECT ALL - col0 - CAST ( + col0 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-128
-160
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-4422
SELECT + - col1 DIV 51 + cor0.col1 * col1 FROM tab0 AS cor0
----
7395
8280
9408

skipif mysql # not compatible
query I rowsort label-4422
SELECT + - col1 / 51 + cor0.col1 * col1 FROM tab0 AS cor0
----
7395
8280
9408

query I rowsort
SELECT ALL col0 + 18 FROM tab0 AS cor0
----
107
42
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + cor0.col1 col1 FROM tab2 cor0
----
118
34
62

query III rowsort
SELECT ALL * FROM tab0 AS cor0 WHERE NOT col2 * + col2 BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT DISTINCT cor0.col0 * - col1 + + col2 AS col2 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT + col1 + - col2 + col0 FROM tab1 WHERE NOT NULL <= col0
----

query I rowsort
SELECT col0 + col0 * + col1 * col0 AS col1 FROM tab0
----
118860
49560
720900

query III rowsort
SELECT * FROM tab2 WHERE - col0 IN ( + col0 )
----

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE - col1 * + col1 NOT IN ( - col1 + + col2 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT DISTINCT cor0.col0 + col2 AS col2 FROM tab2 AS cor0 WHERE NOT col0 NOT IN ( cor0.col1 ) OR NULL IN ( col2 )
----

query I rowsort
SELECT - col1 * - col0 + col0 AS col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT DISTINCT + - col0 * col0 + + col1 AS col2 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT ALL col1 * - cor0.col1 + col0 * + col0 AS col2 FROM tab2 AS cor0
----
-912
2603
5952

query I rowsort
SELECT - tab2.col0 + + col2 * tab2.col1 FROM tab2
----
1456
567
830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + tab1.col1 col0 FROM tab1
----
100
169
676

query I rowsort
SELECT - tab0.col2 AS col2 FROM tab1, tab2 AS cor0 CROSS JOIN tab0
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT DISTINCT col2 * - col1 + - col2 * - col1 FROM tab1
----
0

query I rowsort
SELECT ALL cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab2
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT DISTINCT col2 * col1 + - col0 AS col0 FROM tab0
----
2814
62
7373

query I rowsort
SELECT + col1 * col0 + col0 AS col1 FROM tab0 cor0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-4442
SELECT - cor0.col2 DIV col2 + + col2 FROM tab1 cor0
----
53
56
95

skipif mysql # not compatible
query I rowsort label-4442
SELECT - cor0.col2 / col2 + + col2 FROM tab1 cor0
----
53
56
95

query I rowsort
SELECT - + col0 + - col1 AS col2 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT 32 - col0 AS col2 FROM tab0
----
-3
-57
8

query I rowsort
SELECT tab0.col1 * col0 AS col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT ALL - tab0.col2 + + tab0.col1 * col1 * tab0.col1 FROM tab0
----
636023
753489
912672

query I rowsort
SELECT ALL 65 + + col1 FROM tab2
----
124
82
96

query I rowsort
SELECT + tab0.col0 + col2 * + col0 FROM tab0
----
70
7387
816

query I rowsort
SELECT + 10 FROM tab2, tab2 cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to bf75e71325a06683558cf93fd725ad16

query I rowsort
SELECT + col1 * + col0 * col2 + col0 FROM tab0
----
3430
664207
68136

query I rowsort
SELECT + 28 AS col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 8a39580587f2831072e93c319ff94bbf

query I rowsort
SELECT ALL - tab2.col1 * 50 FROM tab2, tab0 cor0
----
9 values hashing to 503b7b917f9f8df21bc1eaf4d8891bc3

query I rowsort
SELECT ALL col1 + + col1 * col0 * col0 AS col1 FROM tab0 AS cor0
----
118922
49622
720902

query I rowsort
SELECT ALL - + col2 + col0 AS col1 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT ALL + col0 - col2 FROM tab2 cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT - col2 + - col2 * + col0 FROM tab0 cor0
----
-36
-7380
-825

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4457
SELECT ALL - col0 * CAST( col0 AS SIGNED ) AS col1 FROM tab1
----
-4096
-6400
-9

skipif mysql # not compatible
query I rowsort label-4457
SELECT ALL - col0 * CAST ( col0 AS INTEGER ) AS col1 FROM tab1
----
-4096
-6400
-9

skipif mysql # not compatible
query I rowsort
SELECT ALL col1 * - CAST ( - col0 AS REAL ) FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT ALL - + col2 * ( + col2 * col2 ) AS col2 FROM tab0 AS cor0
----
-1
-35937
-551368

query I rowsort
SELECT col0 + + ( col0 ) AS col2 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT DISTINCT - col0 * 2 AS col0 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT ALL cor0.col1 * + ( - 81 ) FROM tab1 cor0
----
-1053
-2106
-810

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col0 * + col2 col2 FROM tab1 AS cor0
----
233472
486
614400

query I rowsort
SELECT ALL - + cor0.col2 - + ( + col2 + - cor0.col2 ) AS col0 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT - cor0.col0 * ( + cor0.col2 ) * + col0 AS col2 FROM tab1 AS cor0
----
-233472
-486
-614400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * col2 + + col1 + cor0.col0 col2 FROM tab0 AS cor0
----
229
2948
7642

query I rowsort
SELECT - col2 * col0 + + 84 FROM tab0 AS cor0
----
-708
-7214
49

query I rowsort
SELECT ALL col2 + + col2 + + col0 AS col1 FROM tab2
----
130
155
61

onlyif mysql # use DIV operator for integer division
query I rowsort label-4469
SELECT - col1 DIV + col2 + - tab1.col0 FROM tab1
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-4469
SELECT - col1 / + col2 + - tab1.col0 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT DISTINCT col1 + col1 + - col1 AS col2 FROM tab1
----
10
13
26

query I rowsort
SELECT ALL col0 + - col2 + col2 * + col1 * + col1 FROM tab2
----
11023
25927
90558

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT ( NULL ) IN ( + col2 * col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4473
SELECT - tab0.col0 DIV tab0.col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4473
SELECT - tab0.col0 / tab0.col1 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT + col0 + - col1 + col1 FROM tab0
----
24
35
89

query I rowsort
SELECT + col1 * col2 * tab0.col0 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT ALL - col0 + + tab0.col1 + tab0.col0 * - col2 AS col2 FROM tab0
----
-7296
-730
27

query I rowsort
SELECT ALL - tab2.col0 + col2 * + tab2.col2 FROM tab2
----
1365
598
722

query III rowsort
SELECT * FROM tab1 WHERE NOT col1 + + col2 NOT BETWEEN ( + col0 ) AND + col0
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 - col2 * col1 col0 FROM tab2
----
-1456
-567
-830

query I rowsort
SELECT ALL col2 - tab0.col0 FROM tab0
----
-34
-7
9

query I rowsort
SELECT DISTINCT + col1 + col2 AS col2 FROM tab2
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-4482
SELECT - col1 DIV + col1 + col2 FROM tab1
----
53
56
95

skipif mysql # not compatible
query I rowsort label-4482
SELECT - col1 / + col1 + col2 FROM tab1
----
53
56
95

query I rowsort
SELECT DISTINCT + col1 * + col0 * col1 FROM tab2
----
22831
271518
6727

query I rowsort
SELECT col1 + tab1.col0 AS col2 FROM tab1
----
29
74
93

query I rowsort
SELECT - 13 * - col1 * + 82 FROM tab0 AS cor0
----
103402
91676
97006

query I rowsort
SELECT + - cor0.col0 * col2 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT - 80 + cor0.col2 * ( col0 * col0 ) FROM tab2 AS cor0
----
1243
158104
237078

query I rowsort
SELECT + col0 * + col1 + cor0.col0 FROM tab2 AS cor0
----
1422
224
4680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + col2 + - col1 col0 FROM tab0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4490
SELECT DISTINCT + col1 * col0 DIV + col1 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-4490
SELECT DISTINCT + col1 * col0 / + col1 FROM tab1
----
3
64
80

query I rowsort
SELECT + col1 + - tab1.col2 * - col2 + col0 AS col0 FROM tab1
----
2945
3323
9309

onlyif mysql # use DIV operator for integer division
query I rowsort label-4492
SELECT ALL col0 DIV + col1 AS col1 FROM tab1
----
0
6
6

skipif mysql # not compatible
query I rowsort label-4492
SELECT ALL col0 / + col1 AS col1 FROM tab1
----
0
6
6

query I rowsort
SELECT col0 * - tab1.col0 + tab1.col2 AS col1 FROM tab1
----
-4039
-6304
45

query I rowsort
SELECT + col1 * - col0 + + tab2.col1 AS col1 FROM tab2
----
-1326
-186
-4543

query I rowsort
SELECT + col0 + ( 42 ) FROM tab0 AS cor0
----
131
66
77

query I rowsort
SELECT - + col2 + 75 AS col0 FROM tab0 cor0
----
-7
42
74

query I rowsort
SELECT ALL col1 * - 85 + + ( cor0.col0 ) AS col1 FROM tab2 AS cor0
----
-1366
-2628
-4937

query I rowsort
SELECT DISTINCT - col1 * 72 FROM tab0 cor0
----
-6192
-6552
-6984

query I rowsort
SELECT + - col0 + 49 AS col0 FROM tab2 AS cor0
----
-29
-30
42

query I rowsort
SELECT - col0 * col1 + - col0 FROM tab1 AS cor0
----
-1120
-704
-81

onlyif mysql # use DIV operator for integer division
query I rowsort label-4501
SELECT DISTINCT 33 DIV - col0 + + tab0.col1 * 38 AS col1 FROM tab0
----
3267
3458
3686

skipif mysql # not compatible
query I rowsort label-4501
SELECT DISTINCT 33 / - col0 + + tab0.col1 * 38 AS col1 FROM tab0
----
3267
3458
3686

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab2, tab1, tab2 AS cor0
----
7
78
79

query I rowsort
SELECT col0 * - tab1.col0 - 99 * - col1 AS col2 FROM tab1
----
-3106
-5113
2565

query I rowsort
SELECT ALL cor1.col0 + + cor1.col1 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 30d7054d1d16cc0cd2af7741ad06735e

query I rowsort
SELECT ALL col0 * + col1 + col1 AS col1 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT tab2.col0 * + tab2.col2 + 28 FROM tab2
----
2056
217
3030

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab0 AS cor2
----
10
13
26

query I rowsort
SELECT + col0 + + 71 * + 54 FROM tab2
----
3841
3912
3913

query I rowsort
SELECT DISTINCT cor0.col0 * 18 FROM tab0 AS cor0
----
1602
432
630

query I rowsort
SELECT ALL + col1 * + col0 + + col1 * col0 FROM tab1 cor0
----
1280
156
2080

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4511
SELECT DISTINCT - - col0 + + CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4511
SELECT DISTINCT - - col0 + + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT col2 * - cor0.col0 * + col2 AS col0 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT DISTINCT + col1 * col0 + 9 - col0 AS col2 FROM tab1 AS cor0
----
585
84
969

query I rowsort
SELECT ALL - col1 + + col2 * - col0 FROM tab0
----
-132
-7389
-878

query I rowsort
SELECT - + 54 FROM tab1, tab2 cor0
----
9 values hashing to 4ecdb0f1b85f0d4fdc3a826efd9f2342

query I rowsort
SELECT 4 * + col1 FROM tab1
----
104
40
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-4517
SELECT ALL - col2 DIV col0 - - col1 * col1 * 26 FROM tab0
----
192295
215306
244634

skipif mysql # not compatible
query I rowsort label-4517
SELECT ALL - col2 / col0 - - col1 * col1 * 26 FROM tab0
----
192295
215306
244634

query I rowsort
SELECT col1 + - ( + col0 ) * - col2 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT DISTINCT - + ( 46 ) + cor0.col2 FROM tab0 AS cor0
----
-13
-45
36

query I rowsort
SELECT ALL col2 + col0 * + col2 AS col2 FROM tab0 AS cor0
----
36
7380
825

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4521
SELECT + CAST( - col2 AS SIGNED ) * col2 FROM tab0 AS cor0
----
-1
-1089
-6724

skipif mysql # not compatible
query I rowsort label-4521
SELECT + CAST ( - col2 AS INTEGER ) * col2 FROM tab0 AS cor0
----
-1
-1089
-6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-4522
SELECT + 74 + - col0 DIV + tab2.col1 AS col2 FROM tab2
----
70
73
74

skipif mysql # not compatible
query I rowsort label-4522
SELECT + 74 + - col0 / + tab2.col1 AS col2 FROM tab2
----
70
73
74

query I rowsort
SELECT DISTINCT + col0 * + col1 AS col2 FROM tab1
----
1040
640
78

query I rowsort
SELECT - cor0.col1 - + col1 FROM tab1 AS cor0
----
-20
-26
-52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4525
SELECT ALL 45 * col1 + + CAST( NULL AS SIGNED ) * + ( - col1 + - tab1.col1 ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4525
SELECT ALL 45 * col1 + + CAST ( NULL AS INTEGER ) * + ( - col1 + - tab1.col1 ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - col1 * cor0.col0 AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT + 4 * col2 FROM tab1 AS cor0
----
216
228
384

onlyif mysql # use DIV operator for integer division
query I rowsort label-4528
SELECT - col2 + + col1 DIV cor0.col0 FROM tab0 AS cor0
----
-30
-81
1

skipif mysql # not compatible
query I rowsort label-4528
SELECT - col2 + + col1 / cor0.col0 FROM tab0 AS cor0
----
-30
-81
1

query I rowsort
SELECT - col2 * col2 + - col1 * col0 AS col0 FROM tab1 AS cor0
----
-10256
-2994
-3889

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4530
SELECT DISTINCT 45 + + col1 * - CAST( NULL AS SIGNED ) + col1 AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4530
SELECT DISTINCT 45 + + col1 * - CAST ( NULL AS INTEGER ) + col1 AS col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + - col2 * - col2 AS col1 FROM tab1 cor0
----
2916
3249
9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * tab1.col0 * + col2 col2 FROM tab1
----
-36480
-4212
-99840

onlyif mysql # use DIV operator for integer division
query I rowsort label-4533
SELECT - col0 * col2 DIV col0 AS col0 FROM tab2
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-4533
SELECT - col0 * col2 / col0 AS col0 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT - - 84 * col2 AS col2 FROM tab0 AS cor0
----
2772
6888
84

query I rowsort
SELECT 15 * col1 AS col0 FROM tab1 AS cor0
----
150
195
390

query I rowsort
SELECT col0 + + cor0.col0 - - cor0.col0 FROM tab0 AS cor0
----
105
267
72

query I rowsort
SELECT ALL + + cor0.col1 * col0 AS col2 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT + 54 + col1 + + col0 AS col0 FROM tab1 AS cor0
----
128
147
83

query I rowsort
SELECT - + col1 - col1 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT - col1 + - col0 + - col0 FROM tab2
----
-175
-215
-45

query I rowsort
SELECT cor0.col2 * + col0 + col2 AS col1 FROM tab0 cor0
----
36
7380
825

query I rowsort
SELECT - col2 * col2 + cor0.col1 * - col2 FROM tab1 AS cor0
----
-10464
-3819
-4320

query I rowsort
SELECT 73 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to e5fbf5d129b181bacd6113bbc8732496

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4544
SELECT + CAST( NULL AS SIGNED ) * ( col2 ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4544
SELECT + CAST ( NULL AS INTEGER ) * ( col2 ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col0 + + cor0.col2 * + cor0.col1 * col0 FROM tab1 cor0
----
36416
4209
99760

query I rowsort
SELECT + + col0 * + 84 AS col0 FROM tab0 cor0
----
2016
2940
7476

query I rowsort
SELECT + - 75 AS col1 FROM tab2 AS cor0
----
-75
-75
-75

query I rowsort
SELECT + ( + col1 ) * cor0.col2 AS col0 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT + col1 * + col1 * col2 AS col2 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT 75 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

query I rowsort
SELECT DISTINCT + col0 * + 26 * + col2 AS col2 FROM tab2
----
4914
52728
78052

query I rowsort
SELECT + col2 + + col1 * + tab2.col1 FROM tab2
----
327
3507
988

query I rowsort
SELECT 66 * + col2 FROM tab2
----
1716
1782
2508

query I rowsort
SELECT 90 FROM tab0, tab1 AS cor0, tab1 cor1, tab2 AS cor2
----
81 values hashing to 3b4644ef0734ed220952cae7e0648c4b

query I rowsort
SELECT ALL - + cor0.col2 + - col2 AS col2 FROM tab2 cor0
----
-52
-54
-76

query I rowsort
SELECT DISTINCT col0 * + cor0.col2 + cor0.col0 + - col0 * col2 * + cor0.col2 FROM tab2 AS cor0
----
-110995
-4907
-50622

onlyif mysql # use DIV operator for integer division
query I rowsort label-4557
SELECT - col0 + - col0 DIV - col0 AS col1 FROM tab1 AS cor0
----
-2
-63
-79

skipif mysql # not compatible
query I rowsort label-4557
SELECT - col0 + - col0 / - col0 AS col1 FROM tab1 AS cor0
----
-2
-63
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-4558
SELECT - + 65 DIV - col0 + col2 + ( - col0 ) FROM tab2 AS cor0
----
-41
-52
29

skipif mysql # not compatible
query I rowsort label-4558
SELECT - + 65 / - col0 + col2 + ( - col0 ) FROM tab2 AS cor0
----
-41
-52
29

query I rowsort
SELECT ALL + - 83 * + col1 + col2 + col2 * - 10 * col0 AS col0 FROM tab2 AS cor0
----
-25151
-31393
-4436

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + + col1 col0 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT + 7 * - col1 AS col1 FROM tab2 AS cor0
----
-119
-217
-413

query I rowsort
SELECT DISTINCT + ( + col0 ) * + col2 AS col2 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * col2 * col1 col0 FROM tab0 cor0
----
-611884
-93654
-97

query I rowsort
SELECT DISTINCT + 55 * - col2 FROM tab2 AS cor0
----
-1430
-1485
-2090

onlyif mysql # use DIV operator for integer division
query I rowsort label-4565
SELECT DISTINCT + tab1.col1 DIV tab1.col1 AS col2 FROM tab1
----
1

skipif mysql # not compatible
query I rowsort label-4565
SELECT DISTINCT + tab1.col1 / tab1.col1 AS col2 FROM tab1
----
1

query I rowsort
SELECT 87 AS col0 FROM tab0, tab2 cor0
----
9 values hashing to fa0cdd86483844cda3bb806e032d5c64

onlyif mysql # use DIV operator for integer division
query I rowsort label-4567
SELECT DISTINCT - ( + col1 ) DIV col1 + col1 AS col1 FROM tab0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-4567
SELECT DISTINCT - ( + col1 ) / col1 + col1 AS col1 FROM tab0
----
85
90
96

query I rowsort
SELECT ALL - col1 + ( + tab1.col2 ) AS col2 FROM tab1
----
28
47
83

query I rowsort
SELECT ALL 84 AS col1 FROM tab1, tab2 cor0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + col2 * - col2 col1 FROM tab1 cor0
----
-2970
-3306
-9312

query I rowsort
SELECT col0 + col2 * col0 AS col2 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT col0 - cor0.col1 * + cor0.col2 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT ALL + col1 - ( - cor0.col2 ) FROM tab2 AS cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-4574
SELECT - col0 DIV + ( col2 ) - col2 AS col1 FROM tab1 AS cor0
----
-54
-58
-96

skipif mysql # not compatible
query I rowsort label-4574
SELECT - col0 / + ( col2 ) - col2 AS col1 FROM tab1 AS cor0
----
-54
-58
-96

query I rowsort
SELECT - col0 - + col1 * + col2 AS col1 FROM tab1 AS cor0
----
-1328
-1407
-634

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4576
SELECT + + col2 * - CAST( cor0.col2 AS SIGNED ) * - col1 FROM tab1 cor0
----
119808
32490
75816

skipif mysql # not compatible
query I rowsort label-4576
SELECT + + col2 * - CAST ( cor0.col2 AS INTEGER ) * - col1 FROM tab1 cor0
----
119808
32490
75816

query I rowsort
SELECT - col2 * - col2 + 21 * - cor0.col2 AS col2 FROM tab1 cor0
----
1782
2052
7200

query I rowsort
SELECT DISTINCT col0 * + col0 + - 26 AS col1 FROM tab0 AS cor0
----
1199
550
7895

query I rowsort
SELECT DISTINCT 38 * - col1 + 17 AS col0 FROM tab0
----
-3251
-3441
-3669

query I rowsort
SELECT col0 * 87 AS col1 FROM tab0
----
2088
3045
7743

query I rowsort
SELECT + + 76 + ( + col0 ) FROM tab2 AS cor0
----
154
155
83

query I rowsort
SELECT ALL + - col0 + - cor0.col0 + col0 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT ALL - 29 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 0cc9ddad93fc783055518ae4b6be054b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * + 9 * + tab2.col1 + - col0 col0 FROM tab2
----
13728
5735
7526

query I rowsort
SELECT - + col1 - - 70 FROM tab1 AS cor0
----
44
57
60

query I rowsort
SELECT + col2 + - ( ( col2 ) ) * - col2 * cor0.col1 FROM tab0 AS cor0
----
611966
93687
98

query I rowsort
SELECT DISTINCT + - cor0.col0 - cor0.col2 AS col1 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT col1 * - col0 + + cor0.col1 * col1 - col1 AS col2 FROM tab1 AS cor0
----
-550
-884
572

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 98 * - col1 col1 FROM tab0 AS cor0
----
8428
8918
9506

onlyif mysql # use DIV operator for integer division
query I rowsort label-4590
SELECT DISTINCT - col2 DIV - 42 AS col2 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4590
SELECT DISTINCT - col2 / - 42 AS col2 FROM tab2 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4591
SELECT DISTINCT + + CAST( - col1 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-4591
SELECT DISTINCT + + CAST ( - col1 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT + 44 * - col0 + + col2 FROM tab0 cor0
----
-1023
-1539
-3834

query I rowsort
SELECT DISTINCT ( 86 ) * + col1 FROM tab1 AS cor0
----
1118
2236
860

query I rowsort
SELECT + 1 AS col2 FROM tab2, tab1 cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

onlyif mysql # use DIV operator for integer division
query I rowsort label-4595
SELECT ALL tab2.col0 * ( + col1 ) * + col2 + + col0 DIV - 44 AS col2 FROM tab2
----
119651
51033
5859

skipif mysql # not compatible
query I rowsort label-4595
SELECT ALL tab2.col0 * ( + col1 ) * + col2 + + col0 / - 44 AS col2 FROM tab2
----
119651
51033
5859

query I rowsort
SELECT col1 + col1 + col2 FROM tab0
----
195
205
264

query I rowsort
SELECT - col0 + - ( + col0 ) AS col1 FROM tab1
----
-128
-160
-6

query I rowsort
SELECT DISTINCT - col2 + tab1.col0 + + 19 * col2 AS col0 FROM tab1
----
1090
1808
975

query I rowsort
SELECT DISTINCT - 79 AS col0 FROM tab2, tab0 cor0
----
-79

query I rowsort
SELECT + col2 + 17 FROM tab0
----
18
50
99

query I rowsort
SELECT - col1 + + col0 + - col1 AS col0 FROM tab0
----
-148
-159
-93

query I rowsort
SELECT DISTINCT col0 - col0 * col0 FROM tab2
----
-42
-6006
-6162

query I rowsort
SELECT ALL tab0.col0 + 92 + tab0.col0 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to ecf7fc7a658d509e636e72d5b56ebb39

query I rowsort
SELECT DISTINCT - col0 + col1 AS col2 FROM tab2
----
-19
-62
24

query I rowsort
SELECT DISTINCT + + col2 + 60 + col2 FROM tab1 AS cor0
----
168
174
252

query I rowsort
SELECT + + col0 * + col0 + + col0 * + col0 * + 31 FROM tab2 AS cor0
----
1568
194688
199712

query I rowsort
SELECT DISTINCT - col0 * + col0 * col2 + ( cor0.col1 ) AS col0 FROM tab0 AS cor0
----
-1128
-18922
-649431

query I rowsort
SELECT ALL - 92 - + 20 * - col1 AS col2 FROM tab0 AS cor0
----
1628
1728
1848

query I rowsort
SELECT DISTINCT + + ( - col0 ) * + col1 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + + 99 AS col2 FROM tab1 AS cor0
----
99
99
99

query I rowsort
SELECT DISTINCT + - col0 * - col2 * + cor0.col0 + ( 88 ) FROM tab1 AS cor0
----
233560
574
614488

query I rowsort
SELECT ALL cor0.col2 + + cor0.col1 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-4613
SELECT + col2 DIV - 1 + col1 AS col0 FROM tab2 AS cor0
----
-21
33
4

skipif mysql # not compatible
query I rowsort label-4613
SELECT + col2 / - 1 + col1 AS col0 FROM tab2 AS cor0
----
-21
33
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - ( 57 ) * + col2 col0 FROM tab2 cor0
----
1482
1539
2166

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4615
SELECT DISTINCT - + CAST( - 93 AS SIGNED ) + - col0 AS col2 FROM tab0 AS cor0
----
4
58
69

skipif mysql # not compatible
query I rowsort label-4615
SELECT DISTINCT - + CAST ( - 93 AS INTEGER ) + - col0 AS col2 FROM tab0 AS cor0
----
4
58
69

query I rowsort
SELECT ALL tab2.col1 * + tab2.col2 AS col2 FROM tab2
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col2 * + col2 col1 FROM tab2
----
1482
702
756

query I rowsort
SELECT DISTINCT 11 * col0 * + col1 FROM tab0
----
22704
37345
89089

query I rowsort
SELECT + col0 - + tab0.col1 * + 80 AS col1 FROM tab0
----
-6856
-7191
-7725

query I rowsort
SELECT 64 AS col2 FROM tab0, tab1 AS cor0, tab1 cor1
----
27 values hashing to c8b19f4c3ff38700cd2bb8a077bf29b9

query I rowsort
SELECT DISTINCT + col1 * + ( - cor0.col1 ) * col2 FROM tab2 AS cor0
----
-10982
-25947
-90506

query I rowsort
SELECT + - col2 * col2 - + col1 AS col2 FROM tab1 AS cor0
----
-2942
-3259
-9229

query I rowsort
SELECT + cor0.col2 * col0 * - col2 FROM tab2 AS cor0
----
-114076
-5103
-52728

onlyif mysql # use DIV operator for integer division
query I rowsort label-4624
SELECT ALL cor1.col0 DIV 50 FROM tab0, tab1 AS cor0, tab0 cor1, tab1 AS cor2
----
81 values hashing to 0b11509574b38a6005fbf722b6afa708

skipif mysql # not compatible
query I rowsort label-4624
SELECT ALL cor1.col0 / 50 FROM tab0, tab1 AS cor0, tab0 cor1, tab1 AS cor2
----
81 values hashing to 0b11509574b38a6005fbf722b6afa708

query I rowsort
SELECT col0 * - ( - col1 ) FROM tab2 AS cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 * + col2 * - col2 col1 FROM tab0 AS cor0
----
26136
35
598436

query I rowsort
SELECT DISTINCT + col2 * - ( - col1 ) AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + col1 * + 16 AS col2 FROM tab0 cor0
----
1376
1456
1552

query I rowsort
SELECT DISTINCT + ( col0 ) + 17 * - 81 FROM tab1 AS cor0
----
-1297
-1313
-1374

query I rowsort
SELECT ALL - + col2 * cor0.col1 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ( cor0.col2 ) * + col2 + 45 FROM tab1 AS cor0
----
2961
3294
9261

query I rowsort
SELECT ALL - 92 + + col0 AS col1 FROM tab1 AS cor0
----
-12
-28
-89

query I rowsort
SELECT - col2 * col0 + - col0 AS col1 FROM tab2 AS cor0
----
-196
-2106
-3081

query I rowsort
SELECT ALL - cor0.col2 * col1 * - ( col0 ) FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT ALL col2 * + col1 + + col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT 71 + - col1 FROM tab1 AS cor0
----
45
58
61

query I rowsort
SELECT - + cor0.col1 + col1 * 72 AS col2 FROM tab0 cor0
----
6106
6461
6887

query I rowsort
SELECT DISTINCT cor0.col1 + + col1 AS col0 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT ALL ( col1 ) * col2 * 64 AS col0 FROM tab2 AS cor0
----
41344
53568
98176

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 - + col0 col0 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT ( col0 ) + + col1 FROM tab2
----
137
38
96

query I rowsort
SELECT DISTINCT col0 - ( + col0 ) FROM tab2
----
0

query I rowsort
SELECT + 67 AS col2 FROM tab2 AS cor0
----
67
67
67

query I rowsort
SELECT + + cor0.col0 - - col0 * + 8 FROM tab1 AS cor0
----
27
576
720

onlyif mysql # use DIV operator for integer division
query I rowsort label-4645
SELECT ALL col1 + col2 DIV + ( 62 ) + col1 col1 FROM tab0
----
172
183
194

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4645
SELECT ALL col1 + col2 / + ( 62 ) + col1 col1 FROM tab0
----
172
183
194

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4646
SELECT - - col1 + CAST( NULL AS DECIMAL ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4646
SELECT - - col1 + CAST ( NULL AS REAL ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 + + 23 * + col1 FROM tab1 cor0
----
287
395
652

query I rowsort
SELECT DISTINCT - ( 70 ) + + cor0.col2 * 54 AS col1 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
-16
1712
4358

query I rowsort
SELECT 8 AS col0 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 33069adc3c1142d31511ec88fcfa40af

onlyif mysql # use DIV operator for integer division
query I rowsort label-4650
SELECT DISTINCT 99 DIV col1 AS col2 FROM tab0
----
1

skipif mysql # not compatible
query I rowsort label-4650
SELECT DISTINCT 99 / col1 AS col2 FROM tab0
----
1

query I rowsort
SELECT + ( col0 + col2 ) FROM tab1
----
121
176
57

query I rowsort
SELECT + 25 + col0 FROM tab2
----
103
104
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 90 col0 FROM tab2, tab0 AS cor0
----
9 values hashing to f6f26b9a04da14807208b93d507095c5

query I rowsort
SELECT ALL - ( + col0 ) + col0 + col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT cor2.col2 * + 95 AS col2 FROM tab1, tab1 AS cor0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to c0893f36c8c8ecb6971c6a7d8005de79

query I rowsort
SELECT DISTINCT + ( - 75 ) - - col1 AS col0 FROM tab1 AS cor0
----
-49
-62
-65

query I rowsort
SELECT + + ( - col0 ) + - col1 FROM tab1 AS cor0
----
-29
-74
-93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4658
SELECT DISTINCT + + 12 + + col2 - col1 * CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4658
SELECT DISTINCT + + 12 + + col2 - col1 * CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + 86 * col1 AS col0 FROM tab0 AS cor0
----
7396
7826
8342

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab0, tab1, tab2 AS cor0
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-4661
SELECT DISTINCT + ( col1 ) + col1 + - ( + col0 + col2 ) DIV + 56 AS col0 FROM tab2 cor0
----
117
32
62

skipif mysql # not compatible
query I rowsort label-4661
SELECT DISTINCT + ( col1 ) + col1 + - ( + col0 + col2 ) / + 56 AS col0 FROM tab2 cor0
----
117
32
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4662
SELECT CAST( col2 AS SIGNED ) FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-4662
SELECT CAST ( col2 AS INTEGER ) FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT + ( col0 ) + - col1 * - col2 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT DISTINCT col2 * - col0 * col2 FROM tab1
----
-207936
-737280
-8748

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4665
SELECT DISTINCT + - CAST( NULL AS SIGNED ) * col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4665
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) * col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL + 67 + + 87 AS col1 FROM tab0 AS cor0
----
154
154
154

query I rowsort
SELECT ALL 68 + ( col0 ) FROM tab0 AS cor0
----
103
157
92

query I rowsort
SELECT - col0 * + 83 + 0 FROM tab2
----
-581
-6474
-6557

query I rowsort
SELECT DISTINCT - col0 * ( col1 ) * col1 AS col0 FROM tab0
----
-177504
-329315
-737009

query I rowsort
SELECT col0 + col1 * - ( - col2 + - col2 ) AS col0 FROM tab0 AS cor0
----
15013
229
5700

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0, tab2 AS cor1, tab2, tab2 AS cor2
----
3645 values hashing to f23c9ebf4a57b11b108cf933fe3c62aa

query I rowsort
SELECT col2 * 68 + 61 FROM tab0 AS cor0
----
129
2305
5637

query I rowsort
SELECT - col0 * + 39 * - 66 FROM tab2 AS cor0
----
18018
200772
203346

query I rowsort
SELECT DISTINCT + col2 + 82 * - 7 FROM tab0 cor0
----
-492
-541
-573

query I rowsort
SELECT DISTINCT - col2 * 36 AS col2 FROM tab2 AS cor0
----
-1368
-936
-972

query I rowsort
SELECT + + col1 * 71 FROM tab0 AS cor0
----
6106
6461
6887

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 99 * - col1 col2 FROM tab0 AS cor0
----
8514
9009
9603

query I rowsort
SELECT - - 85 * 26 AS col2 FROM tab0 AS cor0
----
2210
2210
2210

query I rowsort
SELECT col0 * 78 FROM tab0 cor0
----
1872
2730
6942

onlyif mysql # use DIV operator for integer division
query I rowsort label-4680
SELECT 8 DIV - col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4680
SELECT 8 / - col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 32 * 51 * - col2 FROM tab2 cor0
----
-42432
-44064
-62016

onlyif mysql # use DIV operator for integer division
query I rowsort label-4682
SELECT DISTINCT - col0 DIV - 28 FROM tab1 cor0
----
0
2

skipif mysql # not compatible
query I rowsort label-4682
SELECT DISTINCT - col0 / - 28 FROM tab1 cor0
----
0
2

query I rowsort
SELECT - 41 * + col0 + col1 FROM tab1 AS cor0
----
-2614
-3267
-97

query I rowsort
SELECT ALL col2 * - 20 * ( col1 ) FROM tab0
----
-149240
-1940
-56760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4685
SELECT + CAST( NULL AS SIGNED ) * - col2 * - cor0.col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4685
SELECT + CAST ( NULL AS INTEGER ) * - col2 * - cor0.col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + 90 + col0 * ( col0 ) FROM tab1 AS cor0
----
-81
4006
6310

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 - + col2 col2 FROM tab0
----
-9
34
7

query I rowsort
SELECT - col1 + ( col1 ) AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col2 + - ( cor0.col2 ) FROM tab1 cor0
----
-108
-114
-192

query I rowsort
SELECT + col0 * col1 + - 54 FROM tab0 AS cor0
----
2010
3341
8045

query I rowsort
SELECT ALL col1 + - 92 FROM tab1
----
-66
-79
-82

query I rowsort
SELECT + 17 AS col1 FROM tab1, tab0 cor0
----
9 values hashing to 43298e43365fccb5146ea32003753c92

query I rowsort
SELECT ALL + ( - cor0.col0 ) FROM tab1, tab1 cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4694
SELECT DISTINCT + cor0.col0 + CAST( NULL AS SIGNED ) col0 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4694
SELECT DISTINCT + cor0.col0 + CAST ( NULL AS INTEGER ) col0 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - cor0.col1 * + 73 * + 43 + + col1 * - col2 col0 FROM tab2 AS cor0
----
183667
52717
96472

query I rowsort
SELECT - cor0.col2 + + 83 AS col1 FROM tab2 AS cor0
----
45
56
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4697
SELECT ALL - col1 + - CAST( + col0 AS SIGNED ) col1 FROM tab1 cor0
----
-29
-74
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4697
SELECT ALL - col1 + - CAST ( + col0 AS INTEGER ) col1 FROM tab1 cor0
----
-29
-74
-93

query I rowsort
SELECT DISTINCT - col2 * col1 * col0 + + col2 FROM tab0 AS cor0
----
-3394
-664036
-68079

query I rowsort
SELECT col2 * col2 - col2 AS col2 FROM tab0
----
0
1056
6642

query I rowsort
SELECT - + col0 + 32 FROM tab1 AS cor0
----
-32
-48
29

query I rowsort
SELECT ALL - 21 * + 44 AS col2 FROM tab0
----
-924
-924
-924

query I rowsort
SELECT - ( + cor0.col0 ) * col1 AS col1 FROM tab0 cor0
----
-2064
-3395
-8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4703
SELECT DISTINCT CAST( NULL AS SIGNED ) * + 36 AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4703
SELECT DISTINCT CAST ( NULL AS INTEGER ) * + 36 AS col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + 94 * + col2 * cor0.col1 + 18 FROM tab1 AS cor0
----
117330
131994
53598

onlyif mysql # use DIV operator for integer division
query I rowsort label-4705
SELECT - col0 DIV + cor0.col0 + col2 + col1 AS col0 FROM tab0 AS cor0
----
118
172
97

skipif mysql # not compatible
query I rowsort label-4705
SELECT - col0 / + cor0.col0 + col2 + col1 AS col0 FROM tab0 AS cor0
----
118
172
97

query I rowsort
SELECT ALL - ( + col2 ) * col2 AS col1 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT + col2 - - col0 * - 4 FROM tab0 AS cor0
----
-139
-274
-63

query I rowsort
SELECT ALL - - col1 * + col1 + + col0 FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT ALL + cor0.col0 + + col0 - col2 AS col0 FROM tab1 AS cor0
----
-48
64
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + cor0.col1 * col0 col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT col1 - col2 AS col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT - + 53 * col0 - + ( - 0 ) AS col1 FROM tab1 AS cor0
----
-159
-3392
-4240

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4713
SELECT + 49 * col2 + + ( col0 ) * - col0 - - CAST( 72 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-1104
-3831
1113

skipif mysql # not compatible
query I rowsort label-4713
SELECT + 49 * col2 + + ( col0 ) * - col0 - - CAST ( 72 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-1104
-3831
1113

query I rowsort
SELECT ALL - cor0.col0 + + col0 * col0 FROM tab0 cor0
----
1190
552
7832

query I rowsort
SELECT DISTINCT + + col1 * + col0 * col0 FROM tab2 AS cor0
----
106097
1519
358956

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 90 col1 FROM tab0 AS cor0
----
90
90
90

query I rowsort
SELECT DISTINCT 93 AS col2 FROM tab1, tab2 AS cor0
----
93

query I rowsort
SELECT ALL - col1 * - tab0.col1 FROM tab0
----
7396
8281
9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4719
SELECT ALL + CAST( NULL AS SIGNED ) * - 80 AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4719
SELECT ALL + CAST ( NULL AS INTEGER ) * - 80 AS col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT 65 * col1 - 0 * col0 AS col1 FROM tab0 cor0
----
5590
5915
6305

onlyif mysql # use DIV operator for integer division
query I rowsort label-4721
SELECT col0 * col1 DIV col2 FROM tab1
----
1
10
11

skipif mysql # not compatible
query I rowsort label-4721
SELECT col0 * col1 / col2 FROM tab1
----
1
10
11

query I rowsort
SELECT + 3 * col1 AS col2 FROM tab0
----
258
273
291

query I rowsort
SELECT ALL + - ( cor0.col2 ) AS col2 FROM tab2 AS cor0
----
-26
-27
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - col0 col0 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT + - cor0.col2 * cor0.col2 FROM tab2 AS cor0
----
-1444
-676
-729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4726
SELECT DISTINCT - + col0 + col1 * CAST( + col2 AS SIGNED ) FROM tab2 AS cor0
----
1456
567
830

skipif mysql # not compatible
query I rowsort label-4726
SELECT DISTINCT - + col0 + col1 * CAST ( + col2 AS INTEGER ) FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT + + 73 + + col1 AS col1 FROM tab0 AS cor0
----
159
164
170

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 cor0, tab1 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 44545a6297aa29bb730ffb907c13bc58

query I rowsort
SELECT ALL 8 * - cor0.col0 * - col1 FROM tab2 AS cor0
----
10744
1736
36816

query I rowsort
SELECT col1 + - col2 AS col0 FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT + + cor0.col2 + 94 * cor0.col0 FROM tab0 AS cor0
----
2289
3291
8448

query I rowsort
SELECT DISTINCT - col0 * - col1 - ( - tab1.col1 ) FROM tab1
----
104
1053
650

query I rowsort
SELECT - col1 + + col0 * + col2 FROM tab0
----
-62
706
7207

onlyif mysql # use DIV operator for integer division
query I rowsort label-4734
SELECT - col1 DIV - col2 + col0 * col0 * tab0.col1 + col2 FROM tab0
----
118923
49571
720894

skipif mysql # not compatible
query I rowsort label-4734
SELECT - col1 / - col2 + col0 * col0 * tab0.col1 + col2 FROM tab0
----
118923
49571
720894

query I rowsort
SELECT DISTINCT + 54 + col0 AS col2 FROM tab2
----
132
133
61

query I rowsort
SELECT - 94 AS col0 FROM tab2
----
-94
-94
-94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4737
SELECT 63 - - col2 * + CAST( - col0 AS SIGNED ) FROM tab0
----
-7235
-729
28

skipif mysql # not compatible
query I rowsort label-4737
SELECT 63 - - col2 * + CAST ( - col0 AS INTEGER ) FROM tab0
----
-7235
-729
28

query I rowsort
SELECT DISTINCT + col1 - col1 AS col2 FROM tab1
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4739
SELECT col1 * - col2 + CAST( NULL AS SIGNED ) * col2 + + col0 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4739
SELECT col1 * - col2 + CAST ( NULL AS INTEGER ) * col2 + + col0 AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 48 + col1 FROM tab0 AS cor0
----
38
43
49

query I rowsort
SELECT DISTINCT cor0.col2 + 77 * - col0 * + col1 AS col2 FROM tab0 AS cor0
----
-158895
-261414
-623541

query I rowsort
SELECT ALL + ( - col2 ) + col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT - + 41 AS col1 FROM tab1 AS cor0
----
-41
-41
-41

query I rowsort
SELECT ALL - 53 + + col0 FROM tab2 AS cor0
----
-46
25
26

query I rowsort
SELECT - + ( 78 ) FROM tab0 AS cor0
----
-78
-78
-78

query I rowsort
SELECT DISTINCT - + col1 * + cor0.col1 + col2 AS col2 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT DISTINCT ( 93 ) FROM tab1 AS cor0
----
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4748
SELECT DISTINCT + CAST( NULL AS SIGNED ) * col2 * + col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4748
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * col2 * + col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - ( + col1 ) + + col2 * col2 FROM tab2 AS cor0
----
1427
617
698

onlyif mysql # use DIV operator for integer division
query I rowsort label-4750
SELECT ALL 11 DIV 33 + col2 * + col0 FROM tab2 AS cor0
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-4750
SELECT ALL 11 / 33 + col2 * + col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT col1 * - cor0.col0 - col0 AS col2 FROM tab1 cor0
----
-1120
-704
-81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4752
SELECT DISTINCT col1 + CAST( NULL AS SIGNED ) FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-4752
SELECT DISTINCT col1 + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL

query I rowsort
SELECT - 14 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to d321461994ba49c3a70fa6373032fc94

query I rowsort
SELECT ALL + 80 + - col0 * cor0.col2 FROM tab2 AS cor0
----
-109
-1948
-2922

query I rowsort
SELECT + 37 + col2 FROM tab1 AS cor0
----
133
91
94

query I rowsort
SELECT DISTINCT + + col0 + col2 + - col0 * + col2 AS col2 FROM tab2 AS cor0
----
-155
-1924
-2885

query I rowsort
SELECT - 29 FROM tab1, tab2 cor0
----
9 values hashing to 0cc9ddad93fc783055518ae4b6be054b

query I rowsort
SELECT ALL + 19 * - 32 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 7cde764c9b0ca4d8d7deb5cd555ee30c

query I rowsort
SELECT col2 * tab1.col0 + col2 * col2 FROM tab1
----
16896
3078
6897

query I rowsort
SELECT ALL - - col1 + ( col0 ) * col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT cor0.col0 * 92 FROM tab1 AS cor0
----
276
5888
7360

query I rowsort
SELECT 59 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

query I rowsort
SELECT ALL + col1 * tab0.col0 AS col2 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
3
64
80

query I rowsort
SELECT ( ( + col1 ) ) + cor0.col0 + col0 FROM tab1 AS cor0
----
138
173
32

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4766
SELECT - ( ( col1 ) ) * + CAST( col0 AS SIGNED ) - col0 * col0 AS col2 FROM tab1 AS cor0
----
-4736
-7440
-87

skipif mysql # not compatible
query I rowsort label-4766
SELECT - ( ( col1 ) ) * + CAST ( col0 AS INTEGER ) - col0 * col0 AS col2 FROM tab1 AS cor0
----
-4736
-7440
-87

query I rowsort
SELECT + 6 + cor0.col2 FROM tab0 AS cor0
----
39
7
88

query I rowsort
SELECT ALL + + ( ( + col0 ) ) * col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT - - col0 * + 87 FROM tab1 AS cor0
----
261
5568
6960

onlyif mysql # use DIV operator for integer division
query I rowsort label-4770
SELECT DISTINCT - - col0 + - col0 + col1 DIV 34 AS col1 FROM tab2 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-4770
SELECT DISTINCT - - col0 + - col0 + col1 / 34 AS col1 FROM tab2 AS cor0
----
0
1

query I rowsort
SELECT + col2 * col0 + + 43 AS col2 FROM tab1 AS cor0
----
205
3691
7723

query I rowsort
SELECT + col0 + cor0.col0 + ( col0 ) FROM tab0 cor0
----
105
267
72

query I rowsort
SELECT ALL + 84 * col1 FROM tab1 cor0
----
1092
2184
840

query I rowsort
SELECT DISTINCT - 28 * col0 AS col1 FROM tab0
----
-2492
-672
-980

query I rowsort
SELECT + 97 * - cor0.col2 * + col0 FROM tab0 AS cor0
----
-3395
-707906
-76824

query I rowsort
SELECT + - col2 * cor0.col1 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4777
SELECT col2 * CAST( col0 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-4777
SELECT col2 * CAST ( col0 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + ( - col2 ) * + col2 col1 FROM tab0 AS cor0
----
-1056
-6642
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4779
SELECT - col2 + 32 * col1 DIV - col0 FROM tab1 AS cor0
----
-101
-331
-62

skipif mysql # not compatible
query I rowsort label-4779
SELECT - col2 + 32 * col1 / - col0 FROM tab1 AS cor0
----
-101
-331
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-4780
SELECT - col0 * - 73 + + col1 DIV + col1 + + col0 FROM tab0 AS cor0
----
1777
2591
6587

skipif mysql # not compatible
query I rowsort label-4780
SELECT - col0 * - 73 + + col1 / + col1 + + col0 FROM tab0 AS cor0
----
1777
2591
6587

query I rowsort
SELECT + col1 * col2 + - 59 + + cor0.col1 FROM tab2 AS cor0
----
1534
604
809

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4782
SELECT + col0 + + CAST( + col1 + + col1 AS SIGNED ) AS col0 FROM tab2 cor0
----
113
196
69

skipif mysql # not compatible
query I rowsort label-4782
SELECT + col0 + + CAST ( + col1 + + col1 AS INTEGER ) AS col0 FROM tab2 cor0
----
113
196
69

query I rowsort
SELECT col0 * ( cor0.col1 ) + col0 AS col2 FROM tab0 AS cor0
----
2088
3430
8188

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col0 col2 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT ALL ( - ( - cor1.col2 ) ) FROM tab2 cor0 CROSS JOIN tab1, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to 9d355f1f2edc347a359dad00d2d3f886

query I rowsort
SELECT ALL ( 89 ) AS col0 FROM tab1 AS cor0
----
89
89
89

query I rowsort
SELECT - ( + col1 ) * col0 * cor0.col0 AS col2 FROM tab0 AS cor0
----
-118825
-49536
-720811

onlyif mysql # use DIV operator for integer division
query I rowsort label-4788
SELECT DISTINCT col2 + col2 DIV + col1 FROM tab1 cor0
----
103
56
62

skipif mysql # not compatible
query I rowsort label-4788
SELECT DISTINCT col2 + col2 / + col1 FROM tab1 cor0
----
103
56
62

query I rowsort
SELECT DISTINCT + - col2 * - 73 AS col2 FROM tab0 cor0
----
2409
5986
73

query I rowsort
SELECT + 51 + col0 AS col2 FROM tab2 cor0
----
129
130
58

query I rowsort
SELECT DISTINCT tab0.col1 + ( + col2 ) * - col2 * - ( 26 ) AS col2 FROM tab0
----
123
174915
28400

query I rowsort
SELECT cor0.col2 + col1 * - col1 FROM tab0 AS cor0
----
-7363
-8199
-9408

query I rowsort
SELECT - - 92 FROM tab0, tab2 AS cor0
----
9 values hashing to 516fa45c8b06f9f67d6e500bfd435c1a

onlyif mysql # use DIV operator for integer division
query I rowsort label-4794
SELECT - 70 DIV + 73 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4794
SELECT - 70 / + 73 FROM tab2
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4795
SELECT ALL - cor0.col1 * + CAST( NULL AS SIGNED ) + + 46 FROM tab1, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4795
SELECT ALL - cor0.col1 * + CAST ( NULL AS INTEGER ) + + 46 FROM tab1, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - - col0 * - col2 + + col1 AS col1 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT + 88 * col1 FROM tab1
----
1144
2288
880

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 44 col0 FROM tab2
----
-44
-44
-44

query I rowsort
SELECT DISTINCT - 62 AS col1 FROM tab1
----
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 * col0 col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT 26 + + col0 * + col2 FROM tab0 AS cor0
----
61
7324
818

query I rowsort
SELECT ALL + ( col0 ) AS col0 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT 20 + - col0 FROM tab2 AS cor0
----
-58
-59
13

query I rowsort
SELECT - col0 - ( 26 ) * - col2 * ( + 33 ) AS col0 FROM tab1
----
46329
48842
82288

query I rowsort
SELECT DISTINCT - col0 * + ( col2 ) FROM tab0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-4806
SELECT DISTINCT + CAST( col2 AS SIGNED ) + + col2 DIV 51 FROM tab0
----
1
33
83

skipif mysql # not compatible
query I rowsort label-4806
SELECT DISTINCT + CAST ( col2 AS INTEGER ) + + col2 / 51 FROM tab0
----
1
33
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-4807
SELECT + 37 DIV 27 - + col1 FROM tab1
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-4807
SELECT + 37 / 27 - + col1 FROM tab1
----
-12
-25
-9

query I rowsort
SELECT DISTINCT ( + col1 * col2 ) - - col2 AS col1 FROM tab2
----
1560
684
864

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor1.col2 col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
1
33
82

query I rowsort
SELECT DISTINCT col1 * col2 - col1 * - col1 FROM tab0
----
10234
15743
9506

query I rowsort
SELECT ALL - ( + col0 ) * - col0 + col0 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT - ( 94 ) AS col0 FROM tab2 AS cor0
----
-94
-94
-94

query I rowsort
SELECT ALL 70 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to c76157a7a7ec18de56823b2058b49f32

query I rowsort
SELECT - - col1 * col0 * - col1 FROM tab0 AS cor0
----
-177504
-329315
-737009

query I rowsort
SELECT - cor1.col2 AS col1 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query I rowsort
SELECT ALL - tab2.col1 + + col2 * + ( col2 ) AS col2 FROM tab2
----
1427
617
698

query I rowsort
SELECT DISTINCT - 88 AS col1 FROM tab1, tab0, tab1 AS cor0
----
-88

query I rowsort
SELECT DISTINCT - - col0 + ( 52 ) FROM tab0 AS cor0
----
141
76
87

query I rowsort
SELECT ALL - + cor0.col2 * + col0 + - cor0.col2 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT ALL - - col0 - ( 17 * col1 ) AS col1 FROM tab0 AS cor0
----
-1438
-1458
-1614

query I rowsort
SELECT DISTINCT + tab1.col0 * tab1.col1 * + tab1.col0 AS col0 FROM tab1
----
234
40960
83200

query I rowsort
SELECT DISTINCT - col0 + 94 AS col0 FROM tab0 AS cor0
----
5
59
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4823
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col2 FROM tab2, tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4823
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col2 FROM tab2, tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4824
SELECT DISTINCT col2 DIV + col1 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-4824
SELECT DISTINCT col2 / + col1 FROM tab1
----
2
5
7

query I rowsort
SELECT ALL col1 + - col2 * col1 AS col0 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT DISTINCT col1 + 15 * - col2 * - col1 + + col0 FROM tab2 AS cor0
----
12593
23147
9786

query I rowsort
SELECT ALL col1 * cor0.col1 * - col2 AS col1 FROM tab1 AS cor0
----
-16224
-36504
-5700

onlyif mysql # use DIV operator for integer division
query I rowsort label-4828
SELECT col0 + - col1 DIV 4 FROM tab1 AS cor0
----
-3
62
77

skipif mysql # not compatible
query I rowsort label-4828
SELECT col0 + - col1 / 4 FROM tab1 AS cor0
----
-3
62
77

query I rowsort
SELECT - col2 + 70 + col0 * + col0 FROM tab0 AS cor0
----
1294
613
7909

query I rowsort
SELECT ALL - + cor0.col0 * col0 AS col2 FROM tab1 cor0
----
-4096
-6400
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * - col1 col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT cor1.col0 AS col0 FROM tab1, tab0 cor0, tab2 AS cor1
----
7
78
79

query I rowsort
SELECT - - 67 * + col0 FROM tab0 AS cor0
----
1608
2345
5963

query I rowsort
SELECT DISTINCT col0 * col2 * - col2 FROM tab0 AS cor0
----
-26136
-35
-598436

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 - + 7 * col0 col1 FROM tab0 AS cor0
----
-135
-244
-541

query I rowsort
SELECT + 90 * + col2 FROM tab0 AS cor0
----
2970
7380
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-4837
SELECT ALL + - col0 DIV + 23 AS col2 FROM tab1 cor0
----
-2
-3
0

skipif mysql # not compatible
query I rowsort label-4837
SELECT ALL + - col0 / + 23 AS col2 FROM tab1 cor0
----
-2
-3
0

query I rowsort
SELECT - 23 AS col1 FROM tab0 cor0
----
-23
-23
-23

query I rowsort
SELECT DISTINCT + col0 * 45 * col2 FROM tab2 AS cor0
----
135090
8505
91260

query I rowsort
SELECT ALL 99 * + 44 AS col0 FROM tab0 AS cor0
----
4356
4356
4356

query I rowsort
SELECT - col2 + col2 * cor0.col2 AS col1 FROM tab0 AS cor0
----
0
1056
6642

query I rowsort
SELECT - 74 + - col1 AS col0 FROM tab0 AS cor0
----
-160
-165
-171

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * ( col2 ) col0 FROM tab2
----
1534
646
837

query I rowsort
SELECT col1 * + ( + 60 ) + col0 FROM tab1
----
1563
664
860

query I rowsort
SELECT + + cor0.col2 * col0 + cor0.col2 AS col1 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT + + col2 * col0 + ( - 30 ) * + col2 AS col0 FROM tab2 AS cor0
----
-621
1248
1862

query I rowsort
SELECT DISTINCT - + col0 * + col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - + 0 + + col2 AS col2 FROM tab0 AS cor0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-4849
SELECT col2 + col0 * col2 + - col2 DIV cor0.col1 AS col2 FROM tab2 AS cor0
----
2054
216
3038

skipif mysql # not compatible
query I rowsort label-4849
SELECT col2 + col0 * col2 + - col2 / cor0.col1 AS col2 FROM tab2 AS cor0
----
2054
216
3038

query I rowsort
SELECT col0 * col1 + col2 + + col2 AS col1 FROM tab0 AS cor0
----
2130
3397
8263

query I rowsort
SELECT - + col0 * col1 * col2 + - ( - col2 ) FROM tab2 cor0
----
-119626
-50996
-5832

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 80 col2 FROM tab0 AS cor0
----
80
80
80

query I rowsort
SELECT ALL col1 * cor0.col2 + ( - col1 + col2 ) FROM tab1 AS cor0
----
1331
1432
617

query I rowsort
SELECT + 4 AS col0 FROM tab1
----
4
4
4

query I rowsort
SELECT - + 60 * col0 * + col2 + + col0 + col2 AS col0 FROM tab2 AS cor0
----
-11306
-121576
-180003

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 12 col0 FROM tab2 AS cor0
----
12

query I rowsort
SELECT ALL + - 59 + col2 AS col1 FROM tab2 AS cor0
----
-21
-32
-33

query I rowsort
SELECT DISTINCT col0 + col2 * ( col0 ) FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT col2 * + 43 + + 68 AS col1 FROM tab0 AS cor0
----
111
1487
3594

query I rowsort
SELECT ALL - - col1 + ( - col2 ) + - col2 FROM tab0 cor0
----
-73
20
95

query I rowsort
SELECT - tab2.col0 + col2 FROM tab2
----
-41
-52
20

query I rowsort
SELECT DISTINCT + 63 + + col2 AS col1 FROM tab0
----
145
64
96

query I rowsort
SELECT ALL + - 14 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to d321461994ba49c3a70fa6373032fc94

query I rowsort
SELECT + 16 + cor0.col0 AS col0 FROM tab2 AS cor0
----
23
94
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + ( col1 ) col1 FROM tab1 AS cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * - col1 col0 FROM tab0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT - 14 FROM tab0, tab1 AS cor0
----
-14

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4868
SELECT - CAST( NULL AS SIGNED ) * - col0 AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4868
SELECT - CAST ( NULL AS INTEGER ) * - col0 AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ( + 81 ) AS col2 FROM tab2
----
81
81
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-4870
SELECT DISTINCT - + ( col0 ) DIV - col1 FROM tab1 cor0
----
0
6

skipif mysql # not compatible
query I rowsort label-4870
SELECT DISTINCT - + ( col0 ) / - col1 FROM tab1 cor0
----
0
6

query I rowsort
SELECT ( cor0.col1 ) AS col0 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 93 col1 FROM tab2, tab0 AS cor0
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

query I rowsort
SELECT ( col1 ) * col1 AS col1 FROM tab1
----
100
169
676

query I rowsort
SELECT - 36 + + cor0.col2 FROM tab1 AS cor0
----
18
21
60

query I rowsort
SELECT ALL - + ( + cor0.col0 ) * 5 + 48 + - col2 FROM tab1 AS cor0
----
-21
-329
-448

query I rowsort
SELECT ALL + col2 + - col1 * col0 AS col0 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT DISTINCT + + ( col1 ) * col2 - - col0 FROM tab0 AS cor0
----
132
2862
7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-4878
SELECT col2 + - 34 * 44 + + col2 DIV - col1 FROM tab1
----
-1407
-1444
-1444

skipif mysql # not compatible
query I rowsort label-4878
SELECT col2 + - 34 * 44 + + col2 / - col1 FROM tab1
----
-1407
-1444
-1444

query I rowsort
SELECT + col1 + 12 - col2 FROM tab1 AS cor0
----
-16
-35
-71

query I rowsort
SELECT DISTINCT - col2 + cor0.col0 * + col1 AS col1 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT DISTINCT col0 + - col0 * - col2 * col1 FROM tab1 AS cor0
----
36544
4215
99920

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col1 + - col0 col1 FROM tab0 AS cor0
----
7372
8192
9374

onlyif mysql # use DIV operator for integer division
query I rowsort label-4883
SELECT ALL - 67 DIV - col2 AS col0 FROM tab0 AS cor0
----
0
2
67

skipif mysql # not compatible
query I rowsort label-4883
SELECT ALL - 67 / - col2 AS col0 FROM tab0 AS cor0
----
0
2
67

query I rowsort
SELECT DISTINCT + - 9 * - col2 + + col0 AS col1 FROM tab2 AS cor0
----
250
312
421

query I rowsort
SELECT ( + 28 ) * - col0 FROM tab1 AS cor0
----
-1792
-2240
-84

query I rowsort
SELECT DISTINCT 60 * + col2 AS col2 FROM tab0 AS cor0
----
1980
4920
60

query I rowsort
SELECT DISTINCT - - cor0.col0 * + col1 AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL + 65 + col0 FROM tab1 AS cor0
----
129
145
68

query I rowsort
SELECT + + col0 * - cor0.col2 + - cor0.col2 FROM tab2 cor0
----
-2054
-216
-3040

query I rowsort
SELECT ALL col0 * 6 + col2 + + col0 AS col1 FROM tab0
----
201
246
705

query I rowsort
SELECT - + col0 + - col0 * cor0.col0 FROM tab0 AS cor0
----
-1260
-600
-8010

query I rowsort
SELECT + col2 * 26 FROM tab0 AS cor0
----
2132
26
858

query I rowsort
SELECT - col0 + 35 FROM tab0 AS cor0
----
-54
0
11

onlyif mysql # use DIV operator for integer division
query I rowsort label-4894
SELECT + cor0.col2 + + col0 DIV + col1 FROM tab2 cor0
----
27
27
42

skipif mysql # not compatible
query I rowsort label-4894
SELECT + cor0.col2 + + col0 / + col1 FROM tab2 cor0
----
27
27
42

query I rowsort
SELECT ( + col0 ) * + col0 * + 40 - + col1 AS col2 FROM tab2 AS cor0
----
1929
243301
249623

query I rowsort
SELECT - - ( + ( - cor0.col0 ) ) * - col2 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-4897
SELECT - ( cor0.col2 ) DIV - col1 FROM tab2 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-4897
SELECT - ( cor0.col2 ) / - col1 FROM tab2 AS cor0
----
0
0
2

query I rowsort
SELECT col0 * - col2 * col1 - col0 FROM tab0 AS cor0
----
-3430
-664207
-68136

query I rowsort
SELECT ( + cor0.col0 ) + col0 * + ( + col1 + - col1 ) FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL - 7 * col1 FROM tab1 AS cor0
----
-182
-70
-91

query I rowsort
SELECT 74 * - col1 + - ( - col1 ) + col0 AS col0 FROM tab0 AS cor0
----
-6254
-6554
-7046

query I rowsort
SELECT - + col1 * + col0 + 91 + - col2 FROM tab0 cor0
----
-2006
-3305
-8090

query I rowsort
SELECT ALL 34 AS col2 FROM tab0, tab2 AS cor0, tab1 cor1
----
27 values hashing to 4e2ca147a59e0d5661c28cf3e5431caa

onlyif mysql # use DIV operator for integer division
query I rowsort label-4904
SELECT - + col2 DIV + cor0.col0 FROM tab2 cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-4904
SELECT - + col2 / + cor0.col0 FROM tab2 cor0
----
-3
0
0

query I rowsort
SELECT ( - col2 ) * + col2 AS col1 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT + col2 + - col1 * col2 FROM tab1
----
-1152
-1350
-513

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( + cor0.col1 ) col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT col0 * ( - col2 ) + - col2 AS col2 FROM tab0
----
-36
-7380
-825

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4909
SELECT - ( - 89 ) / - col2 + + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4909
SELECT - ( - 89 ) / - col2 + + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col2 * - 49 + col2 FROM tab1
----
-2592
-2736
-4608

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4911
SELECT DISTINCT + col1 + + CAST( NULL AS DECIMAL ) + + col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4911
SELECT DISTINCT + col1 + + CAST ( NULL AS REAL ) + + col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT 35 AS col1 FROM tab0, tab0 AS cor0
----
35

query I rowsort
SELECT ALL cor0.col0 * ( col0 ) + - col0 AS col1 FROM tab1 AS cor0
----
4032
6
6320

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4914
SELECT ALL + cor0.col0 * - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4914
SELECT ALL + cor0.col0 * - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4915
SELECT ALL col1 * col0 DIV col0 AS col2 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-4915
SELECT ALL col1 * col0 / col0 AS col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT - col0 * 12 AS col1 FROM tab1
----
-36
-768
-960

query I rowsort
SELECT ALL - col2 * ( + col0 ) AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-4918
SELECT + - col2 DIV 69 col1 FROM tab1 AS cor0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4918
SELECT + - col2 / 69 col1 FROM tab1 AS cor0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 * col2 col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - col1 + + cor0.col1 + col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT - col2 * - ( - 28 ) + col1 + + col1 AS col0 FROM tab1 AS cor0
----
-1460
-1576
-2662

query I rowsort
SELECT + - col1 * - ( ( - col0 ) ) FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + col1 + - 4 * 25 AS col2 FROM tab1 AS cor0
----
-74
-87
-90

onlyif mysql # use DIV operator for integer division
query I rowsort label-4924
SELECT cor0.col1 DIV col1 AS col0 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4924
SELECT cor0.col1 / col1 AS col0 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT ALL + col0 * - col1 * - col1 AS col2 FROM tab0 AS cor0
----
177504
329315
737009

onlyif mysql # use DIV operator for integer division
query I rowsort label-4926
SELECT + 80 + - 61 DIV - col0 AS col0 FROM tab2 AS cor0
----
80
80
88

skipif mysql # not compatible
query I rowsort label-4926
SELECT + 80 + - 61 / - col0 AS col0 FROM tab2 AS cor0
----
80
80
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-4927
SELECT + 44 DIV + col0 FROM tab1 cor0
----
0
0
14

skipif mysql # not compatible
query I rowsort label-4927
SELECT + 44 / + col0 FROM tab1 cor0
----
0
0
14

query I rowsort
SELECT DISTINCT col0 * 90 AS col2 FROM tab0 AS cor0
----
2160
3150
8010

query I rowsort
SELECT DISTINCT + col2 * - cor0.col1 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT 44 AS col1 FROM tab2, tab2 AS cor0
----
44

query I rowsort
SELECT 3 * tab1.col1 AS col0 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 1bfd0bdb39079ad5efc6c5f3817529bb

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4932
SELECT + CAST( + 79 AS SIGNED ) FROM tab0, tab1 AS cor0
----
9 values hashing to 40a2261caa2c5cdbfd80965d7df1231f

skipif mysql # not compatible
query I rowsort label-4932
SELECT + CAST ( + 79 AS INTEGER ) FROM tab0, tab1 AS cor0
----
9 values hashing to 40a2261caa2c5cdbfd80965d7df1231f

query I rowsort
SELECT - col0 * + 42 + + col2 FROM tab1
----
-2631
-3264
-72

query I rowsort
SELECT DISTINCT - 60 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
-60

query I rowsort
SELECT col1 - ( - col1 ) FROM tab1
----
20
26
52

query I rowsort
SELECT + col2 * 42 + 3 AS col2 FROM tab0
----
1389
3447
45

query I rowsort
SELECT DISTINCT - col2 + + col0 * - col0 AS col1 FROM tab1 AS cor0
----
-4153
-63
-6496

query I rowsort
SELECT ALL - ( col1 ) + cor0.col0 - - col0 FROM tab0 AS cor0
----
-27
-38
87

query I rowsort
SELECT DISTINCT - - 90 * col0 + 20 AS col1 FROM tab0 AS cor0
----
2180
3170
8030

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4940
SELECT + 95 + col1 * CAST( NULL AS SIGNED ) + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4940
SELECT + 95 + col1 * CAST ( NULL AS INTEGER ) + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - col2 * - col0 * + 52 AS col0 FROM tab0 cor0
----
-1820
-379496
-41184

query I rowsort
SELECT DISTINCT + col1 * cor0.col1 + col2 + col1 FROM tab0 cor0
----
7515
8454
9507

query I rowsort
SELECT - - col2 * col2 + + 97 FROM tab2 cor0
----
1541
773
826

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 87 * tab1.col0 col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 4d0b0ec86108721922dc078e68ec75d9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4945
SELECT + + col1 * col1 + CAST( NULL AS SIGNED ) + - 42 * - col0 col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4945
SELECT + + col1 * col1 + CAST ( NULL AS INTEGER ) + - 42 * - col0 col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col2 * + tab2.col1 * + col1 + + col2 * col0 FROM tab2
----
-25758
-7980
-88478

query I rowsort
SELECT DISTINCT - 79 + tab0.col0 FROM tab0, tab2, tab1 AS cor0
----
-44
-55
10

onlyif mysql # use DIV operator for integer division
query I rowsort label-4948
SELECT ALL 46 * col0 DIV - col2 + + 16 DIV - col0 AS col1 FROM tab1
----
-38
-51
-7

skipif mysql # not compatible
query I rowsort label-4948
SELECT ALL 46 * col0 / - col2 + + 16 / - col0 AS col1 FROM tab1
----
-38
-51
-7

query I rowsort
SELECT - ( col1 ) - col1 FROM tab1
----
-20
-26
-52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 77 col2 FROM tab1
----
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 33 col2 FROM tab1
----
33
33
33

query I rowsort
SELECT ALL col2 + tab2.col1 + - 6 FROM tab2
----
49
52
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + col2 col0 FROM tab1
----
0
0
0

query I rowsort
SELECT - col0 + 76 AS col2 FROM tab1 AS cor0
----
-4
12
73

query I rowsort
SELECT - tab2.col1 + + col1 * col1 FROM tab2
----
272
3422
930

query I rowsort
SELECT 4 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

query I rowsort
SELECT tab2.col0 + - col1 * + col1 AS col1 FROM tab2
----
-210
-3403
-954

query I rowsort
SELECT ALL - - col2 + + 37 * 53 AS col1 FROM tab1 AS cor0
----
2015
2018
2057

query I rowsort
SELECT ALL + cor0.col2 - + col2 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col2 + + 99 AS col0 FROM tab2 AS cor0
----
125
126
137

query I rowsort
SELECT DISTINCT - col0 * - 37 + cor0.col2 AS col2 FROM tab2 AS cor0
----
286
2912
2961

query I rowsort
SELECT DISTINCT col0 * - ( - col1 ) + + tab0.col0 FROM tab0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT + tab2.col1 + col1 * - col1 FROM tab2
----
-272
-3422
-930

query I rowsort
SELECT + 64 AS col0 FROM tab0, tab1 cor0
----
9 values hashing to 60ab040e931c5c85db7ba19364eacc8e

query I rowsort
SELECT DISTINCT - 39 + tab2.col2 FROM tab2
----
-1
-12
-13

query I rowsort
SELECT ALL + 97 + - col0 FROM tab2
----
18
19
90

query I rowsort
SELECT ( + 51 ) AS col1 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 02a7de94365b8cb5b5cb92c4b1d1e7c5

onlyif mysql # use DIV operator for integer division
query I rowsort label-4968
SELECT - col1 DIV - 32 AS col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4968
SELECT - col1 / - 32 AS col2 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT - - cor0.col0 + - col1 * + col1 FROM tab0 cor0
----
-7372
-8192
-9374

query I rowsort
SELECT ALL + col0 + - cor0.col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ( cor0.col2 ) * col2 + - col1 * col2 AS col1 FROM tab0 AS cor0
----
-1749
-738
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * + cor0.col1 col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - cor0.col1 * col2 + - col1 + - col2 * col2 FROM tab1 cor0
----
-10477
-3829
-4346

query I rowsort
SELECT DISTINCT + cor0.col0 * col2 - col1 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT - col0 - - col2 * + col0 * cor0.col2 FROM tab0 AS cor0
----
0
26112
598347

query I rowsort
SELECT DISTINCT - - col0 - - cor0.col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT col1 * - col2 + + col2 * ( + col2 ) FROM tab2 AS cor0
----
-108
-858
798

query I rowsort
SELECT + cor0.col1 * col0 + + 92 FROM tab1 AS cor0
----
1132
170
732

query I rowsort
SELECT DISTINCT + col1 - 60 AS col0 FROM tab0
----
26
31
37

query I rowsort
SELECT + 83 * + col0 AS col0 FROM tab2 AS cor0
----
581
6474
6557

query I rowsort
SELECT DISTINCT - 17 + - col0 FROM tab1 AS cor0
----
-20
-81
-97

query I rowsort
SELECT + + col0 * col0 + + 7 AS col1 FROM tab2 cor0
----
56
6091
6248

query I rowsort
SELECT ALL + + 68 FROM tab2 AS cor0
----
68
68
68

query I rowsort
SELECT col2 + col0 * col0 AS col2 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT ALL + - col1 + + col2 * 34 FROM tab2 AS cor0
----
1275
825
887

query I rowsort
SELECT - ( cor0.col1 ) * col2 + - col1 AS col2 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT ALL col2 * + col1 - + 60 AS col1 FROM tab1 AS cor0
----
1188
1344
510

query I rowsort
SELECT - 84 * - col0 + - cor0.col2 FROM tab2 cor0
----
561
6526
6598

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4989
SELECT + cor0.col0 + + 17 * + col1 + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4989
SELECT + cor0.col0 + + 17 * + col1 + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4990
SELECT ALL - - CAST( NULL AS SIGNED ) * col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4990
SELECT ALL - - CAST ( NULL AS INTEGER ) * col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + 91 * col2 + - col1 AS col1 FROM tab1 cor0
----
4888
5177
8723

query I rowsort
SELECT ALL col2 + - 64 + col2 * - col1 AS col2 FROM tab2
----
-1572
-672
-874

query I rowsort
SELECT ( + 4 ) * col2 FROM tab0 AS cor0
----
132
328
4

query I rowsort
SELECT ALL + tab0.col1 AS col2 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col2 col0 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT ALL - 94 * + col2 AS col1 FROM tab2
----
-2444
-2538
-3572

query I rowsort
SELECT - col0 + - col1 * + col1 AS col1 FROM tab1 AS cor0
----
-164
-249
-679

query I rowsort
SELECT + 20 * col0 * + col0 FROM tab1 cor0
----
128000
180
81920

query I rowsort
SELECT + ( - col1 ) * - tab1.col1 FROM tab1
----
100
169
676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5000
SELECT CAST( NULL AS SIGNED ) * 46 FROM tab2, tab0, tab0 cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-5000
SELECT CAST ( NULL AS INTEGER ) * 46 FROM tab2, tab0, tab0 cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5001
SELECT ALL + CAST( NULL AS SIGNED ) * 10 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5001
SELECT ALL + CAST ( NULL AS INTEGER ) * 10 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 76 col1 FROM tab2
----
76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5003
SELECT 84 * col0 + + CAST( + 92 AS SIGNED ) * + col2 AS col1 FROM tab0
----
15020
3032
5052

skipif mysql # not compatible
query I rowsort label-5003
SELECT 84 * col0 + + CAST ( + 92 AS INTEGER ) * + col2 AS col1 FROM tab0
----
15020
3032
5052

query I rowsort
SELECT 9 + col1 FROM tab1
----
19
22
35

query I rowsort
SELECT + cor0.col2 + 32 FROM tab1, tab1 AS cor0
----
9 values hashing to bd556a765488872c9747389e1941bc76

query I rowsort
SELECT ALL col0 * col0 + ( cor0.col1 ) FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT DISTINCT col0 * col1 + + col1 AS col0 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT + col0 * + ( - col2 ) AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-5009
SELECT + col1 - col0 DIV + col2 FROM tab0 AS cor0
----
62
86
90

skipif mysql # not compatible
query I rowsort label-5009
SELECT + col1 - col0 / + col2 FROM tab0 AS cor0
----
62
86
90

query I rowsort
SELECT ALL - + col0 + + 47 FROM tab1 AS cor0
----
-17
-33
44

query I rowsort
SELECT + col2 + ( col2 ) FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT + - col0 - ( col0 ) FROM tab1 AS cor0
----
-128
-160
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-5013
SELECT - cor0.col2 DIV - 1 col2 FROM tab1 AS cor0
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5013
SELECT - cor0.col2 / - 1 col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL - col1 + + 92 FROM tab0 cor0
----
-5
1
6

query I rowsort
SELECT - + col0 + cor0.col0 AS col0 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col1 * - 33 AS col2 FROM tab0 AS cor0
----
-2838
-3003
-3201

query I rowsort
SELECT DISTINCT + cor0.col0 * col0 + + col2 + + col0 AS col0 FROM tab2 AS cor0
----
6188
6358
83

query I rowsort
SELECT - col0 * - ( tab2.col2 ) AS col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT 39 AS col2 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to ed2ebd9def3e2c38aa46cb3af60fe229

query I rowsort
SELECT ALL - col1 + col1 + + col0 AS col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT - ( - col1 ) - cor0.col1 AS col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT ( - col2 ) * - cor0.col0 * - col0 AS col1 FROM tab2 AS cor0
----
-1323
-158184
-237158

query I rowsort
SELECT 74 - + 6 * + col1 * - 47 FROM tab0 AS cor0
----
24326
25736
27428

query I rowsort
SELECT DISTINCT + 31 * 63 - - col1 AS col1 FROM tab0 AS cor0
----
2039
2044
2050

query I rowsort
SELECT - cor0.col0 * col2 + col1 AS col0 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT - 7 + tab2.col2 AS col1 FROM tab2, tab1 AS cor0
----
19
20
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col0 ) + + col1 col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT 56 * cor0.col0 * + col1 + + ( col1 ) AS col1 FROM tab0 cor0
----
115670
190217
453635

query I rowsort
SELECT 11 + - col2 FROM tab0 AS cor0
----
-22
-71
10

query I rowsort
SELECT 80 * cor0.col2 - col0 AS col1 FROM tab0 AS cor0
----
2616
45
6471

query I rowsort
SELECT + 90 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

query I rowsort
SELECT 38 * tab2.col0 FROM tab2, tab0 AS cor0, tab0, tab0 AS cor1
----
81 values hashing to 797c6f304259c3c5d20460f214324f9f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5033
SELECT DISTINCT - CAST( NULL AS SIGNED ) * col1 col2 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5033
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * col1 col2 FROM tab2 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5034
SELECT CAST( NULL AS SIGNED ) - + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5034
SELECT CAST ( NULL AS INTEGER ) - + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 + cor0.col1 * col1 AS col1 FROM tab2 AS cor0
----
306
3540
992

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5036
SELECT ALL CAST( 9 AS SIGNED ) + cor0.col0 FROM tab0 cor0
----
33
44
98

skipif mysql # not compatible
query I rowsort label-5036
SELECT ALL CAST ( 9 AS INTEGER ) + cor0.col0 FROM tab0 cor0
----
33
44
98

query I rowsort
SELECT 75 AS col2 FROM tab0 AS cor0
----
75
75
75

query I rowsort
SELECT ALL + - col1 * - ( - col2 ) FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + 73 + col1 + cor0.col1 * - col1 FROM tab2 cor0
----
-199
-3349
-857

query I rowsort
SELECT - - col0 + - col1 AS col1 FROM tab1 cor0
----
-23
54
67

query I rowsort
SELECT + ( - col1 ) + col2 AS col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT + cor0.col1 * - cor0.col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT + col2 * - 3 * + 20 AS col0 FROM tab2 AS cor0
----
-1560
-1620
-2280

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * + col1 col0 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT ALL + - col2 * + ( cor0.col1 ) FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT tab0.col2 * - 2 + col1 * col0 AS col0 FROM tab0
----
1998
3393
7935

query I rowsort
SELECT DISTINCT col1 * col1 + - tab2.col0 FROM tab2
----
210
3403
954

query I rowsort
SELECT - ( col1 ) + + col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT ALL - - col0 + + 1 * + col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT ( + 67 ) * col2 FROM tab1 AS cor0
----
3618
3819
6432

query I rowsort
SELECT + - col2 * - 86 * - col1 + col1 FROM tab1 AS cor0
----
-107315
-120718
-49010

query I rowsort
SELECT ALL - 16 + col2 * col1 FROM tab0 AS cor0
----
2822
7446
81

query I rowsort
SELECT + ( col1 ) * col0 AS col0 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT - 69 * col1 + - col2 * - col1 AS col1 FROM tab0 AS cor0
----
-3096
-6596
1183

query I rowsort
SELECT ALL - 5 AS col1 FROM tab1 AS cor0
----
-5
-5
-5

query I rowsort
SELECT DISTINCT col1 * + col1 + 49 + - col0 FROM tab1 AS cor0
----
138
722
85

query I rowsort
SELECT ALL cor0.col1 * cor0.col0 - col0 AS col0 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT DISTINCT 84 + col2 * 9 FROM tab2 AS cor0
----
318
327
426

query I rowsort
SELECT ALL - - col2 + col2 - - col2 * + col2 * col1 FROM tab2 AS cor0
----
22653
24624
39936

query I rowsort
SELECT - col0 + 79 FROM tab0 AS cor0
----
-10
44
55

onlyif mysql # use DIV operator for integer division
query I rowsort label-5061
SELECT col0 DIV + col0 + + col2 FROM tab1
----
55
58
97

skipif mysql # not compatible
query I rowsort label-5061
SELECT col0 / + col0 + + col2 FROM tab1
----
55
58
97

query I rowsort
SELECT + col2 + 77 AS col1 FROM tab0 AS cor0
----
110
159
78

query I rowsort
SELECT ALL + cor0.col0 + cor0.col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 882fef197e3b41358c58e24f2db2f2e1

query I rowsort
SELECT col0 * ( + col2 ) FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT + - col1 * 7 AS col1 FROM tab1 AS cor0
----
-182
-70
-91

query I rowsort
SELECT - col0 + 63 FROM tab1 AS cor0
----
-1
-17
60

query I rowsort
SELECT - tab1.col2 * - 85 FROM tab1
----
4590
4845
8160

query I rowsort
SELECT col2 * - ( - col0 ) AS col1 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5069
SELECT DISTINCT + CAST( 77 AS SIGNED ) FROM tab1 AS cor0
----
77

skipif mysql # not compatible
query I rowsort label-5069
SELECT DISTINCT + CAST ( 77 AS INTEGER ) FROM tab1 AS cor0
----
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-5070
SELECT DISTINCT + 21 DIV ( col0 ) FROM tab2 AS cor0
----
0
3

skipif mysql # not compatible
query I rowsort label-5070
SELECT DISTINCT + 21 / ( col0 ) FROM tab2 AS cor0
----
0
3

query I rowsort
SELECT ALL + col2 + 81 AS col2 FROM tab1 AS cor0
----
135
138
177

query IIIIIIIII rowsort
SELECT * FROM tab1, tab2, tab2 AS cor0 WHERE NOT NULL >= NULL
----

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5073
SELECT DISTINCT col0 + CAST( col1 AS SIGNED ) * + col0 + - col2 FROM tab1
----
1024
27
647

skipif mysql # not compatible
query I rowsort label-5073
SELECT DISTINCT col0 + CAST ( col1 AS INTEGER ) * + col0 + - col2 FROM tab1
----
1024
27
647

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5074
SELECT col2 / CAST( NULL AS SIGNED ) + col0 + col0 AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5074
SELECT col2 / CAST ( NULL AS INTEGER ) + col0 + col0 AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT col2 + col0 * - ( - col2 * - 98 + col2 ) FROM tab0
----
-3464
-722420
-78375

query I rowsort
SELECT ALL + tab2.col0 * + ( 33 ) + col1 FROM tab2
----
262
2624
2633

query I rowsort
SELECT col1 + col0 - + col2 FROM tab2
----
11
111
58

query I rowsort
SELECT col1 * 6 AS col0 FROM tab0
----
516
546
582

query I rowsort
SELECT ALL - col2 * - 38 AS col2 FROM tab1
----
2052
2166
3648

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( - 43 AS REAL ) AS col0 FROM tab2, tab1 cor0
----
9 values hashing to ab0c314d2b589ccedb9a875beeb1f86a

query I rowsort
SELECT + col2 + - 28 + + tab1.col2 AS col2 FROM tab1
----
164
80
86

query I rowsort
SELECT DISTINCT col1 + col1 - col2 FROM tab1
----
-2
-37
-70

query I rowsort
SELECT ALL - - cor0.col1 + - col1 AS col0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5084
SELECT DISTINCT CAST( - col2 AS SIGNED ) + - col1 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5084
SELECT DISTINCT CAST ( - col2 AS INTEGER ) + - col1 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL - - 15 AS col1 FROM tab0 AS cor0
----
15
15
15

query I rowsort
SELECT DISTINCT + col1 + col1 * - col1 AS col2 FROM tab0 AS cor0
----
-7310
-8190
-9312

query I rowsort
SELECT + col0 * col0 * + col0 + col2 AS col0 FROM tab1 AS cor0
----
262201
512096
81

query I rowsort
SELECT DISTINCT + col2 - - tab1.col1 * tab1.col1 * + col0 FROM tab1
----
13616
2082
6457

query I rowsort
SELECT ALL + 28 + - col2 * col0 FROM tab2
----
-161
-2000
-2974

query I rowsort
SELECT DISTINCT 47 * - col1 + col2 * 9 FROM tab2
----
-1214
-2539
-457

onlyif mysql # use DIV operator for integer division
query I rowsort label-5091
SELECT DISTINCT ( + 90 ) + col0 DIV + col2 AS col0 FROM tab1
----
90
91

skipif mysql # not compatible
query I rowsort label-5091
SELECT DISTINCT ( + 90 ) + col0 / + col2 AS col0 FROM tab1
----
90
91

query I rowsort
SELECT DISTINCT + ( - 30 ) AS col0 FROM tab0
----
-30

query I rowsort
SELECT - cor1.col1 FROM tab0, tab1 AS cor0, tab0 cor1, tab2 AS cor2
----
81 values hashing to 786a240f80bef6f9c6a190e92cd4f9e8

query I rowsort
SELECT ALL + 84 * 97 AS col1 FROM tab0 cor0
----
8148
8148
8148

query I rowsort
SELECT ALL col1 * 13 FROM tab1
----
130
169
338

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5096
SELECT ALL CAST( NULL AS DECIMAL ) * - col2 col1 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5096
SELECT ALL CAST ( NULL AS REAL ) * - col2 col1 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5097
SELECT ALL - 74 DIV - ( col1 ) AS col1 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-5097
SELECT ALL - 74 / - ( col1 ) AS col1 FROM tab1
----
2
5
7

query I rowsort
SELECT ALL - 78 AS col0 FROM tab2
----
-78
-78
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 8 col2 FROM tab2
----
8
8
8

query I rowsort
SELECT - + col1 + - ( - col0 ) AS col2 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT - 80 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 26dbcc98d4b4e864ffa31be685a5dfbd

onlyif mysql # use DIV operator for integer division
query I rowsort label-5102
SELECT col0 DIV - col0 + tab2.col0 AS col0 FROM tab2
----
6
77
78

skipif mysql # not compatible
query I rowsort label-5102
SELECT col0 / - col0 + tab2.col0 AS col0 FROM tab2
----
6
77
78

query I rowsort
SELECT col2 * 97 - ( + col0 ) * col2 AS col0 FROM tab1 AS cor0
----
1632
1881
5076

onlyif mysql # use DIV operator for integer division
query I rowsort label-5104
SELECT ALL + col1 + - 54 DIV + col0 col1 FROM tab1 cor0
----
10
13
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5104
SELECT ALL + col1 + - 54 / + col0 col1 FROM tab1 cor0
----
10
13
8

query I rowsort
SELECT DISTINCT - col0 + 55 * + ( - col0 ) AS col1 FROM tab0 AS cor0
----
-1344
-1960
-4984

onlyif mysql # use DIV operator for integer division
query I rowsort label-5106
SELECT + col1 DIV + 93 col0 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5106
SELECT + col1 / + 93 col0 FROM tab2
----
0
0
0

query I rowsort
SELECT - - col1 * col1 + col1 * col1 AS col2 FROM tab0 AS cor0
----
14792
16562
18818

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - col1 - + col1 col0 FROM tab1 AS cor0
----
-104
-1053
-650

query I rowsort
SELECT - + col2 + - col2 AS col1 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT DISTINCT + col2 * + 9 * - 37 + cor0.col1 FROM tab2 AS cor0
----
-12637
-8599
-8960

query I rowsort
SELECT ALL + - col0 + + ( col2 ) * col2 FROM tab0 cor0
----
-34
1065
6635

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5112
SELECT DISTINCT cor0.col2 * + CAST( NULL AS SIGNED ) + col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5112
SELECT DISTINCT cor0.col2 * + CAST ( NULL AS INTEGER ) + col0 FROM tab2 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5113
SELECT ALL + col1 + CAST( 41 * col2 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
1125
1138
1575

skipif mysql # not compatible
query I rowsort label-5113
SELECT ALL + col1 + CAST ( 41 * col2 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
1125
1138
1575

onlyif mysql # use DIV operator for integer division
query I rowsort label-5114
SELECT DISTINCT - col1 + + col2 DIV + 54 AS col0 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-5114
SELECT DISTINCT - col1 + + col2 / + 54 AS col0 FROM tab2 AS cor0
----
-17
-31
-59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5115
SELECT ALL - col1 + + CAST( 27 + - col0 AS SIGNED ) / - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5115
SELECT ALL - col1 + + CAST ( 27 + - col0 AS INTEGER ) / - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 32 * col1 * + cor0.col0 - 14 col0 FROM tab0 AS cor0
----
-108654
-259182
-66062

query I rowsort
SELECT 49 + - cor0.col0 AS col0 FROM tab1 cor0
----
-15
-31
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 * col2 col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - col2 + cor0.col0 * - col0 + + col1 AS col0 FROM tab1 AS cor0
----
-37
-4143
-6483

query I rowsort
SELECT col1 * + cor0.col0 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT col2 + + cor0.col1 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT + - col2 * + col0 AS col1 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT col2 * - 63 AS col2 FROM tab1 AS cor0
----
-3402
-3591
-6048

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5124
SELECT + col1 + + CAST( + col1 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
118
34
62

skipif mysql # not compatible
query I rowsort label-5124
SELECT + col1 + + CAST ( + col1 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT 23 + + col1 AS col2 FROM tab0 AS cor0
----
109
114
120

query I rowsort
SELECT cor0.col0 * 81 AS col0 FROM tab0 AS cor0
----
1944
2835
7209

query I rowsort
SELECT col0 * ( + cor0.col2 ) AS col1 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-5128
SELECT ALL + col2 * - 24 + - col0 DIV col2 + - col2 FROM tab0 cor0
----
-2051
-60
-825

skipif mysql # not compatible
query I rowsort label-5128
SELECT ALL + col2 * - 24 + - col0 / col2 + - col2 FROM tab0 cor0
----
-2051
-60
-825

query I rowsort
SELECT ( 44 ) AS col0 FROM tab1 AS cor0
----
44
44
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 92 * 37 col0 FROM tab0 AS cor0
----
-3404

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5131
SELECT ALL CAST( NULL AS SIGNED ) * - col1 + - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5131
SELECT ALL CAST ( NULL AS INTEGER ) * - col1 + - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col2 + 21 FROM tab0 AS cor0
----
-12
-61
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( - col1 ) * col0 + + col1 * + 1 col1 FROM tab0 cor0
----
-1978
-3298
-8008

query I rowsort
SELECT + ( 86 ) AS col0 FROM tab1 AS cor0
----
86
86
86

query I rowsort
SELECT 85 FROM tab0, tab1 AS cor0, tab1 cor1
----
27 values hashing to e4cf94cf0cc632acff30ad1dac617cb7

query I rowsort
SELECT - - 8 * 49 AS col2 FROM tab2 cor0
----
392
392
392

query I rowsort
SELECT + + 11 * 94 AS col1 FROM tab0 AS cor0
----
1034
1034
1034

query I rowsort
SELECT ALL - col0 * col1 * col2 FROM tab0
----
-3395
-664118
-68112

query I rowsort
SELECT ALL 12 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to d4f5a8e032294c3b9342821617800972

query I rowsort
SELECT col1 * - col2 + - col2 + col2 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT col1 + cor0.col0 AS col0 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT ALL - 88 + + col2 * col0 AS col0 FROM tab1 AS cor0
----
3560
74
7592

query I rowsort
SELECT ALL cor0.col0 + cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to f65167375aa80cc8b3f3f8987d2662a3

query I rowsort
SELECT ALL col1 * 29 * - tab1.col2 FROM tab1
----
-16530
-36192
-40716

onlyif mysql # use DIV operator for integer division
query I rowsort label-5145
SELECT DISTINCT 80 DIV col2 - + col0 FROM tab0 cor0
----
-22
-89
45

skipif mysql # not compatible
query I rowsort label-5145
SELECT DISTINCT 80 / col2 - + col0 FROM tab0 cor0
----
-22
-89
45

query I rowsort
SELECT ALL col0 + - cor0.col1 + col0 AS col0 FROM tab2 AS cor0
----
-17
141
97

query I rowsort
SELECT ( col1 ) * col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + - 26 AS col1 FROM tab0 AS cor0
----
-26
-26
-26

query I rowsort
SELECT + 66 AS col0 FROM tab2
----
66
66
66

query I rowsort
SELECT - col1 * col1 - 28 * col1 AS col1 FROM tab0
----
-10829
-12125
-9804

query I rowsort
SELECT cor0.col0 + col2 * 43 FROM tab0 AS cor0
----
1443
3615
78

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab2, tab2 cor1, tab2 AS cor2
----
972 values hashing to 958533d1a7bf61199ed7c03eadf37f9a

query I rowsort
SELECT + tab1.col0 * + 4 FROM tab1
----
12
256
320

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5154
SELECT ALL - - col1 / CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5154
SELECT ALL - - col1 / CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5155
SELECT + col2 + + col2 DIV col0 AS col2 FROM tab1 AS cor0
----
57
72
97

skipif mysql # not compatible
query I rowsort label-5155
SELECT + col2 + + col2 / col0 AS col2 FROM tab1 AS cor0
----
57
72
97

query I rowsort
SELECT DISTINCT + 20 FROM tab2, tab0 AS cor0
----
20

query I rowsort
SELECT DISTINCT + 15 AS col2 FROM tab2, tab2 AS cor0
----
15

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5158
SELECT ( - col0 ) * + col2 + - CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5158
SELECT ( - col0 ) * + col2 + - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab2, tab1 cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT - 34 + col0 AS col0 FROM tab0 AS cor0
----
-10
1
55

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5161
SELECT DISTINCT + cor0.col2 + CAST( NULL AS SIGNED ) * + col1 AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5161
SELECT DISTINCT + cor0.col2 + CAST ( NULL AS INTEGER ) * + col1 AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL col1 * 59 + - col0 * - col0 FROM tab0 AS cor0
----
13290
5650
6948

onlyif mysql # use DIV operator for integer division
query I rowsort label-5163
SELECT 55 DIV col0 + CAST( + ( + col2 ) AS SIGNED ) * ( - col2 ) + col2 FROM tab0
----
-1054
-6642
1

skipif mysql # not compatible
query I rowsort label-5163
SELECT 55 / col0 + CAST ( + ( + col2 ) AS INTEGER ) * ( - col2 ) + col2 FROM tab0
----
-1054
-6642
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-5164
SELECT + + col0 DIV - col0 - col2 AS col0 FROM tab2 AS cor0
----
-27
-28
-39

skipif mysql # not compatible
query I rowsort label-5164
SELECT + + col0 / - col0 - col2 AS col0 FROM tab2 AS cor0
----
-27
-28
-39

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5165
SELECT DISTINCT + col2 * - col1 * CAST( col1 AS SIGNED ) + + tab2.col1 FROM tab2
----
-10965
-25916
-90447

skipif mysql # not compatible
query I rowsort label-5165
SELECT DISTINCT + col2 * - col1 * CAST ( col1 AS INTEGER ) + + tab2.col1 FROM tab2
----
-10965
-25916
-90447

onlyif mysql # use DIV operator for integer division
query I rowsort label-5166
SELECT ALL + col0 DIV col1 + + col2 DIV + col2 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5166
SELECT ALL + col0 / col1 + + col2 / + col2 FROM tab0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-5167
SELECT ( col0 ) DIV CAST( col0 AS SIGNED ) AS col2 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5167
SELECT ( col0 ) / CAST ( col0 AS INTEGER ) AS col2 FROM tab1
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col0 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col2 * 65 + - col2 col2 FROM tab0
----
2088
29
5159

query I rowsort
SELECT ALL - 5 AS col0 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 4f346dd2f65047c836c6957f80f0ef9e

onlyif mysql # use DIV operator for integer division
query I rowsort label-5171
SELECT ALL - cor0.col2 DIV 41 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

skipif mysql # not compatible
query I rowsort label-5171
SELECT ALL - cor0.col2 / 41 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT + col2 + + col1 - + col1 AS col2 FROM tab0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-5173
SELECT DISTINCT col1 + col0 - 59 DIV col1 FROM tab2
----
136
37
93

skipif mysql # not compatible
query I rowsort label-5173
SELECT DISTINCT col1 + col0 - 59 / col1 FROM tab2
----
136
37
93

query I rowsort
SELECT DISTINCT col1 * - col1 - + col1 AS col1 FROM tab1
----
-110
-182
-702

query I rowsort
SELECT col2 * col0 + col2 * col0 FROM tab0
----
14596
1584
70

query I rowsort
SELECT DISTINCT + col0 + + 89 * 64 * - col2 FROM tab0
----
-187944
-466983
-5661

query I rowsort
SELECT col2 * 62 * + cor0.col1 AS col2 FROM tab2 AS cor0
----
40052
51894
95108

query I rowsort
SELECT ALL - col2 * + 46 + col1 FROM tab2 AS cor0
----
-1137
-1211
-1731

query I rowsort
SELECT DISTINCT - - col1 + 21 AS col1 FROM tab1 AS cor0
----
31
34
47

query I rowsort
SELECT ALL - - col0 + col0 * col2 FROM tab0 AS cor0
----
70
7387
816

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5181
SELECT ALL - col2 + - CAST( NULL AS SIGNED ) + 55 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5181
SELECT ALL - col2 + - CAST ( NULL AS INTEGER ) + 55 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 + - col0 + cor0.col2 * col2 AS col0 FROM tab1 cor0
----
2910
3121
9056

query I rowsort
SELECT DISTINCT - col2 * + 6 AS col2 FROM tab0 cor0
----
-198
-492
-6

query I rowsort
SELECT DISTINCT + - col1 + + col1 * col1 FROM tab1 AS cor0
----
156
650
90

query I rowsort
SELECT + col0 + ( ( col2 ) ) * + ( + col1 ) AS col2 FROM tab2 cor0
----
1612
725
844

query I rowsort
SELECT col0 * 16 + col1 + + cor0.col2 * ( 62 ) AS col1 FROM tab1 cor0
----
3422
4568
7245

query I rowsort
SELECT DISTINCT + ( + 45 ) * + col2 AS col0 FROM tab2
----
1170
1215
1710

query I rowsort
SELECT - 27 - + col0 FROM tab2
----
-105
-106
-34

query I rowsort
SELECT - - 54 + col2 AS col0 FROM tab0 AS cor0
----
136
55
87

query I rowsort
SELECT + + col2 * ( col0 ) FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ( 17 ) FROM tab0 AS cor0
----
17
17
17

query I rowsort
SELECT DISTINCT - 51 * + col0 AS col1 FROM tab0 AS cor0
----
-1224
-1785
-4539

query I rowsort
SELECT DISTINCT 33 + + col2 FROM tab1
----
129
87
90

query I rowsort
SELECT DISTINCT + tab2.col0 + + col0 * col1 AS col1 FROM tab2
----
1422
224
4680

query I rowsort
SELECT + col2 * - cor0.col2 - - cor0.col2 FROM tab0 cor0
----
-1056
-6642
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - cor0.col1 col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL - 13 AS col1 FROM tab2 AS cor0
----
-13
-13
-13

onlyif mysql # use DIV operator for integer division
query I rowsort label-5198
SELECT DISTINCT - + cor0.col2 DIV col0 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-5198
SELECT DISTINCT - + cor0.col2 / col0 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT 79 + + col0 AS col2 FROM tab0 AS cor0
----
103
114
168

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + cor0.col1 * - col2 col1 FROM tab1 AS cor0
----
-119808
-32490
-75816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 7 * + col1 col0 FROM tab2
----
119
217
413

query I rowsort
SELECT DISTINCT - 85 * + col2 FROM tab1 AS cor0
----
-4590
-4845
-8160

query I rowsort
SELECT + - 38 * - col2 FROM tab1 cor0
----
2052
2166
3648

query I rowsort
SELECT ALL - - col1 * + col1 FROM tab2 cor0
----
289
3481
961

onlyif mysql # use DIV operator for integer division
query I rowsort label-5205
SELECT DISTINCT + + 64 DIV col0 AS col1 FROM tab2 AS cor0
----
0
9

skipif mysql # not compatible
query I rowsort label-5205
SELECT DISTINCT + + 64 / col0 AS col1 FROM tab2 AS cor0
----
0
9

query I rowsort
SELECT ( col2 ) * col2 AS col0 FROM tab2 AS cor0
----
1444
676
729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5207
SELECT - ( + col0 ) * + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5207
SELECT - ( + col0 ) * + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - 5 + + col1 FROM tab0 AS cor0
----
102
91
96

query I rowsort
SELECT ALL + 60 * + col0 - cor0.col2 AS col1 FROM tab1 AS cor0
----
126
3783
4704

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 + + col2 col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT - + 7 AS col1 FROM tab0 AS cor0
----
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * + 10 + col1 + col2 * + 53 col0 FROM tab1 AS cor0
----
3131
3148
5231

query I rowsort
SELECT + col0 * - 1 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT ALL - col0 * + ( cor0.col0 ) AS col1 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL - col2 * col1 * - ( - 90 ) AS col0 FROM tab2
----
-138060
-58140
-75330

query I rowsort
SELECT ALL + + ( col0 ) + - col0 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - 57 + 32 + - col0 AS col0 FROM tab0 AS cor0
----
-114
-49
-60

query I rowsort
SELECT ALL - + 4 * cor0.col1 + cor0.col2 FROM tab1 AS cor0
----
-50
17
44

query I rowsort
SELECT DISTINCT ( + col0 ) * - col0 FROM tab1 AS cor0
----
-4096
-6400
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col0 ) * cor0.col0 col1 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL 41 AS col1 FROM tab2 cor0
----
41
41
41

query I rowsort
SELECT DISTINCT + col2 + 36 * + cor0.col1 AS col2 FROM tab1 AS cor0
----
417
564
990

query I rowsort
SELECT col1 * 96 * - col1 FROM tab1 AS cor0
----
-16224
-64896
-9600

query I rowsort
SELECT ALL ( col0 ) * + col0 FROM tab2
----
49
6084
6241

query I rowsort
SELECT DISTINCT + tab2.col2 * 59 AS col0 FROM tab2
----
1534
1593
2242

query I rowsort
SELECT col2 * - col2 * cor0.col1 FROM tab0 cor0
----
-611884
-93654
-97

query I rowsort
SELECT - - col1 + col1 * cor0.col1 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT DISTINCT - 16 AS col2 FROM tab2, tab0 AS cor0
----
-16

onlyif mysql # use DIV operator for integer division
query I rowsort label-5229
SELECT DISTINCT - col0 * col1 DIV col1 col1 FROM tab0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5229
SELECT DISTINCT - col0 * col1 / col1 col1 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT + col0 * - col1 * + col0 FROM tab2
----
-106097
-1519
-358956

query I rowsort
SELECT - 0 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT - 18 * - col0 AS col1 FROM tab0 AS cor0
----
1602
432
630

query I rowsort
SELECT ALL + cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5234
SELECT ALL - CAST( col2 AS SIGNED ) - col0 / CAST( NULL AS SIGNED ) col1 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5234
SELECT ALL - CAST ( col2 AS INTEGER ) - col0 / CAST ( NULL AS INTEGER ) col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT 24 - + col1 FROM tab2 AS cor0
----
-35
-7
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 39 col1 FROM tab1
----
39
39
39

query I rowsort
SELECT DISTINCT - 35 AS col0 FROM tab2
----
-35

query I rowsort
SELECT DISTINCT tab2.col2 AS col2 FROM tab2, tab0 AS cor0
----
26
27
38

query I rowsort
SELECT col1 + - col0 * + 19 AS col1 FROM tab0 AS cor0
----
-1600
-370
-568

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * cor0.col2 + - col1 col0 FROM tab0 AS cor0
----
-1175
-6815
-98

query I rowsort
SELECT ALL - + ( + col2 ) + col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT ALL + 56 AS col0 FROM tab2
----
56
56
56

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5243
SELECT + col2 + CAST( + ( + col0 ) AS SIGNED ) AS col1 FROM tab0 AS cor0
----
171
36
57

skipif mysql # not compatible
query I rowsort label-5243
SELECT + col2 + CAST ( + ( + col0 ) AS INTEGER ) AS col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT - col1 + col2 * - col2 AS col2 FROM tab2
----
-1461
-735
-760

query I rowsort
SELECT ALL + col0 + - 53 AS col2 FROM tab1
----
-50
11
27

query I rowsort
SELECT ALL col0 + - 30 AS col1 FROM tab1
----
-27
34
50

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5247
SELECT ALL + + col2 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5247
SELECT ALL + + col2 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 56 AS col1 FROM tab2, tab1 cor0
----
9 values hashing to 9c4523312174730bbc525b9977aa99fa

query I rowsort
SELECT - + col1 + - ( - 46 ) AS col1 FROM tab2 AS cor0
----
-13
15
29

query I rowsort
SELECT + col2 * + col0 + - col2 AS col2 FROM tab0 cor0
----
34
7216
759

query I rowsort
SELECT DISTINCT - col2 + - ( - col1 ) * cor0.col0 FROM tab2 AS cor0
----
1305
190
4576

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5252
SELECT + col0 * + CAST( NULL AS DECIMAL ) AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5252
SELECT + col0 * + CAST ( NULL AS REAL ) AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5253
SELECT ALL - - cor0.col1 DIV col0 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-5253
SELECT ALL - - cor0.col1 / col0 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT - ( col2 ) + col0 AS col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ALL col1 + col0 * cor0.col0 AS col2 FROM tab1 AS cor0
----
35
4106
6413

query I rowsort
SELECT ALL + 24 + + ( + col1 ) FROM tab2 cor0
----
41
55
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-5257
SELECT ALL ( + 3 ) DIV col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5257
SELECT ALL ( + 3 ) / col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + + cor0.col0 + 81 AS col2 FROM tab1 AS cor0
----
145
161
84

query I rowsort
SELECT DISTINCT + ( - col0 ) * + col2 AS col0 FROM tab2 cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-5260
SELECT ALL + col0 * col2 + + col0 DIV col1 FROM tab1
----
162
3654
7686

skipif mysql # not compatible
query I rowsort label-5260
SELECT ALL + col0 * col2 + + col0 / col1 FROM tab1
----
162
3654
7686

query I rowsort
SELECT col2 + ( + 94 ) FROM tab2
----
120
121
132

query I rowsort
SELECT DISTINCT 29 + tab2.col1 AS col1 FROM tab2, tab0 AS cor0
----
46
60
88

query I rowsort
SELECT DISTINCT col0 * - 82 FROM tab1
----
-246
-5248
-6560

query I rowsort
SELECT - - col0 * col1 + - col2 AS col0 FROM tab1 AS cor0
----
24
583
944

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5265
SELECT DISTINCT ( - col1 ) * - CAST( NULL AS SIGNED ) - 61 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5265
SELECT DISTINCT ( - col1 ) * - CAST ( NULL AS INTEGER ) - 61 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - col1 + + col2 + col0 * + cor0.col2 FROM tab0 AS cor0
----
-61
7289
739

query I rowsort
SELECT - col0 + col0 * col1 FROM tab1 cor0
----
576
75
960

query I rowsort
SELECT + 21 + col1 AS col1 FROM tab2 AS cor0
----
38
52
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5269
SELECT - CAST( col0 AS SIGNED ) * + col2 AS col1 FROM tab1
----
-162
-3648
-7680

skipif mysql # not compatible
query I rowsort label-5269
SELECT - CAST ( col0 AS INTEGER ) * + col2 AS col1 FROM tab1
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-5270
SELECT ALL - col1 DIV tab0.col0 AS col0 FROM tab0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-5270
SELECT ALL - col1 / tab0.col0 AS col0 FROM tab0
----
-1
-2
-3

onlyif mysql # use DIV operator for integer division
query I rowsort label-5271
SELECT 9 DIV col0 col2 FROM tab1 cor0
----
0
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5271
SELECT 9 / col0 col2 FROM tab1 cor0
----
0
0
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5272
SELECT ALL col1 * + col0 * + CAST( - col0 * - col0 AS SIGNED ) FROM tab2 cor0
----
10633
27998568
8381663

skipif mysql # not compatible
query I rowsort label-5272
SELECT ALL col1 * + col0 * + CAST ( - col0 * - col0 AS INTEGER ) FROM tab2 cor0
----
10633
27998568
8381663

query I rowsort
SELECT - cor0.col0 * + cor0.col0 FROM tab1 cor0
----
-4096
-6400
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-5274
SELECT tab1.col1 DIV ( col0 * 6 ) AS col0 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5274
SELECT tab1.col1 / ( col0 * 6 ) AS col0 FROM tab1
----
0
0
1

query I rowsort
SELECT DISTINCT tab2.col1 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT - col0 + + CAST ( + col1 AS REAL ) + + col2 col0 FROM tab1 AS cor0
----
29
3
77

query I rowsort
SELECT + + 13 * col2 AS col1 FROM tab1 cor0
----
1248
702
741

query I rowsort
SELECT col2 * - col0 * + 54 + col2 * cor0.col2 FROM tab1 cor0
----
-193743
-405504
-5832

query I rowsort
SELECT ALL col2 * - col2 FROM tab0 cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT col2 + + col0 + col2 * cor0.col0 FROM tab2 AS cor0
----
2132
223
3119

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * cor0.col2 col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - col0 * col2 + col1 AS col2 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT ALL + col2 * col1 + - col2 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT ALL + col2 + col2 + col2 AS col1 FROM tab1 AS cor0
----
162
171
288

onlyif mysql # use DIV operator for integer division
query I rowsort label-5285
SELECT + col0 + - col0 DIV + col1 FROM tab2 AS cor0
----
7
75
77

skipif mysql # not compatible
query I rowsort label-5285
SELECT + col0 + - col0 / + col1 FROM tab2 AS cor0
----
7
75
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-5286
SELECT ALL - col2 + col0 DIV col0 col0 FROM tab1 AS cor0
----
-53
-56
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5286
SELECT ALL - col2 + col0 / col0 col0 FROM tab1 AS cor0
----
-53
-56
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-5287
SELECT cor0.col1 DIV + col1 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5287
SELECT cor0.col1 / + col1 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT ALL - col1 * col0 + + col1 * col1 + col1 AS col2 FROM tab1
----
-530
-858
624

onlyif mysql # use DIV operator for integer division
query I rowsort label-5289
SELECT col2 + - tab1.col0 - col1 * col0 DIV + tab1.col1 FROM tab1
----
-64
-71
48

skipif mysql # not compatible
query I rowsort label-5289
SELECT col2 + - tab1.col0 - col1 * col0 / + tab1.col1 FROM tab1
----
-64
-71
48

query I rowsort
SELECT tab1.col0 * + col2 + col1 * + col2 + - col0 * col0 FROM tab1
----
122
1557
2528

query I rowsort
SELECT ALL col0 * - col2 + - tab2.col0 + + tab2.col1 AS col1 FROM tab2
----
-165
-2047
-3064

query I rowsort
SELECT ALL col1 * col1 + - col0 AS col2 FROM tab2 AS cor0
----
210
3403
954

query I rowsort
SELECT DISTINCT + col1 * - col2 + - col2 AS col1 FROM tab2
----
-1560
-684
-864

query I rowsort
SELECT DISTINCT - col1 + + cor0.col1 + col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL - col2 AS col0 FROM tab0 WHERE NULL NOT IN ( tab0.col0 + - col2 * tab0.col1 )
----

query I rowsort
SELECT DISTINCT + col2 + col0 * col1 * col1 FROM tab0
----
177537
329316
737091

query I rowsort
SELECT DISTINCT col0 + + col1 * + col1 AS col2 FROM tab2
----
3559
368
968

query I rowsort
SELECT ALL - tab0.col1 + col0 AS col2 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT ALL col2 AS col1 FROM tab2 WHERE NOT NULL IN ( + col0 )
----

query I rowsort
SELECT DISTINCT + col0 + - tab2.col2 FROM tab2
----
-20
41
52

query I rowsort
SELECT ALL + tab1.col2 * col2 - col0 FROM tab1
----
2913
3185
9136

query I rowsort
SELECT ALL col0 + + col0 AS col0 FROM tab1
----
128
160
6

query I rowsort
SELECT DISTINCT + col1 + col1 * cor0.col1 * + 92 FROM tab2 AS cor0
----
26605
320311
88443

query I rowsort
SELECT ALL + col1 * col1 + col0 + - 39 AS col1 FROM tab2 AS cor0
----
329
3520
929

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 53 col1 FROM tab2 AS cor0
----
-53
-53
-53

onlyif mysql # use DIV operator for integer division
query I rowsort label-5306
SELECT col0 * + col0 + col1 + - col2 DIV col0 AS col2 FROM tab2
----
6143
6258
77

skipif mysql # not compatible
query I rowsort label-5306
SELECT col0 * + col0 + col1 + - col2 / col0 AS col2 FROM tab2
----
6143
6258
77

query I rowsort
SELECT ALL - col1 * - col2 + col1 AS col0 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT 68 FROM tab2 cor0
----
68
68
68

onlyif mysql # use DIV operator for integer division
query I rowsort label-5309
SELECT col0 DIV + cor0.col0 AS col2 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5309
SELECT col0 / + cor0.col0 AS col2 FROM tab2 AS cor0
----
1
1
1

query III rowsort
SELECT ALL * FROM tab0 AS cor0 WHERE NOT + col1 * col0 + + col1 * col0 * col1 IN ( - col1 * col1 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE NOT NULL > NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 * cor0.col1 col2 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL - col2 - - col1 AS col0 FROM tab2
----
-21
33
4

query I rowsort
SELECT + col1 * - col2 * tab0.col2 FROM tab0
----
-611884
-93654
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + tab0.col2 - tab0.col1 * col0 col2 FROM tab0
----
-3298
-637
774

query I rowsort
SELECT DISTINCT - col0 + col0 * + col1 AS col0 FROM tab0
----
2040
3360
8010

query I rowsort
SELECT - col1 * col0 - - tab1.col2 AS col0 FROM tab1
----
-24
-583
-944

query III rowsort
SELECT * FROM tab2 AS cor0 WHERE NULL <> NULL
----

query I rowsort
SELECT - col0 * col2 + - col0 AS col2 FROM tab2 AS cor0
----
-196
-2106
-3081

query I rowsort
SELECT - col2 * - col2 * - col0 AS col1 FROM tab1 AS cor0
----
-207936
-737280
-8748

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * col1 col0 FROM tab0 AS cor0
----
2838
7462
97

query III rowsort
SELECT * FROM tab1 WHERE ( NULL ) <> - col2 * - col2
----

query I rowsort
SELECT ALL + col1 * col1 * - col0 FROM tab2
----
-22831
-271518
-6727

query I rowsort
SELECT col0 - - tab1.col2 FROM tab1
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-5325
SELECT DISTINCT + col1 + col1 * col0 DIV tab1.col2 AS col2 FROM tab1
----
21
23
27

skipif mysql # not compatible
query I rowsort label-5325
SELECT DISTINCT + col1 + col1 * col0 / tab1.col2 AS col2 FROM tab1
----
21
23
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-5326
SELECT col2 + + col2 * col0 DIV - col1 AS col0 FROM tab1
----
-307
-494
48

skipif mysql # not compatible
query I rowsort label-5326
SELECT col2 + + col2 * col0 / - col1 AS col0 FROM tab1
----
-307
-494
48

query I rowsort
SELECT ALL - col2 + + col0 FROM tab0 WHERE NOT ( col0 * col2 ) IN ( + col2 )
----
-9
34
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-5328
SELECT col2 + col0 DIV + col0 col0 FROM tab0
----
2
34
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5328
SELECT col2 + col0 / + col0 col0 FROM tab0
----
2
34
83

query III rowsort
SELECT * FROM tab2 WHERE NOT col0 * + col0 + - col1 NOT IN ( - col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * - col0 col2 FROM tab2
----
49
6084
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + col0 - col0 * col0 col2 FROM tab0
----
-1152
-15842
-2450

query I rowsort
SELECT col2 * + col0 + - col1 * col0 FROM tab2 WHERE + col0 + + col2 * - col1 <> ( col2 )
----
-2574
-28
1659

query I rowsort
SELECT DISTINCT + tab2.col2 * + col1 * col1 FROM tab2
----
10982
25947
90506

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE ( NULL ) >= ( + col1 )
----

query I rowsort
SELECT ( col0 ) + ( + 90 ) FROM tab0 AS cor0
----
114
125
179

query I rowsort
SELECT col1 * col2 + col2 AS col1 FROM tab0 AS cor0
----
2871
7544
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-5337
SELECT cor0.col1 DIV + tab0.col0 FROM tab0, tab1 AS cor0
----
9 values hashing to c4e43d9ff41356e674e60539ea3e6f36

skipif mysql # not compatible
query I rowsort label-5337
SELECT cor0.col1 / + tab0.col0 FROM tab0, tab1 AS cor0
----
9 values hashing to c4e43d9ff41356e674e60539ea3e6f36

onlyif mysql # use DIV operator for integer division
query I rowsort label-5338
SELECT DISTINCT tab2.col2 DIV + col1 AS col2 FROM tab2
----
0
2

skipif mysql # not compatible
query I rowsort label-5338
SELECT DISTINCT tab2.col2 / + col1 AS col2 FROM tab2
----
0
2

query I rowsort
SELECT - ( + col2 * + 6 ) FROM tab1
----
-324
-342
-576

onlyif mysql # use DIV operator for integer division
query I rowsort label-5340
SELECT col0 * - col1 DIV col1 AS col1 FROM tab1 cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-5340
SELECT col0 * - col1 / col1 AS col1 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT - 51 * + col2 FROM tab0
----
-1683
-4182
-51

query I rowsort
SELECT DISTINCT col2 + tab2.col1 AS col2 FROM tab2
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-5343
SELECT + tab0.col2 + - col0 DIV - col0 FROM tab0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-5343
SELECT + tab0.col2 + - col0 / - col0 FROM tab0
----
2
34
83

query I rowsort
SELECT DISTINCT + col1 * - tab1.col0 * + tab1.col1 + - col0 AS col2 FROM tab1
----
-13600
-2031
-6464

query I rowsort
SELECT ALL col1 + ( + col1 ) AS col1 FROM tab2
----
118
34
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5346
SELECT + col0 * CAST( NULL AS SIGNED ) AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5346
SELECT + col0 * CAST ( NULL AS INTEGER ) AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - col0 * 38 - 91 FROM tab0 AS cor0
----
1239
3291
821

query I rowsort
SELECT ALL - 83 * - col2 + + cor0.col2 AS col0 FROM tab0 AS cor0
----
2772
6888
84

query I rowsort
SELECT DISTINCT + col0 + ( - col0 * + col2 ) AS col1 FROM tab2 AS cor0
----
-182
-1950
-2923

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5350
SELECT DISTINCT + + CAST( NULL AS SIGNED ) + - 56 * + col1 - + 75 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5350
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) + - 56 * + col1 - + 75 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT col2 * + cor0.col0 + cor0.col2 AS col1 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT + 7 AS col0 FROM tab0 AS cor0
----
7
7
7

query I rowsort
SELECT + ( + col1 ) * + col2 * - ( col0 ) + cor0.col1 AS col1 FROM tab0 AS cor0
----
-3298
-664027
-68026

query I rowsort
SELECT + ( 3 ) + - col0 FROM tab0 AS cor0
----
-21
-32
-86

query I rowsort
SELECT col2 + + 73 FROM tab1 cor0
----
127
130
169

onlyif mysql # use DIV operator for integer division
query I rowsort label-5356
SELECT ( col2 ) DIV - col2 + - col1 FROM tab0 AS cor0
----
-87
-92
-98

skipif mysql # not compatible
query I rowsort label-5356
SELECT ( col2 ) / - col2 + - col1 FROM tab0 AS cor0
----
-87
-92
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-5357
SELECT + - col1 + 44 DIV col0 FROM tab0 AS cor0
----
-85
-91
-96

skipif mysql # not compatible
query I rowsort label-5357
SELECT + - col1 + 44 / col0 FROM tab0 AS cor0
----
-85
-91
-96

query I rowsort
SELECT col0 + - col1 * col0 FROM tab2
----
-1264
-210
-4524

onlyif mysql # use DIV operator for integer division
query I rowsort label-5359
SELECT - col1 DIV + ( + col1 ) - - col2 * col0 AS col1 FROM tab2
----
188
2027
3001

skipif mysql # not compatible
query I rowsort label-5359
SELECT - col1 / + ( + col1 ) - - col2 * col0 AS col1 FROM tab2
----
188
2027
3001

query I rowsort
SELECT DISTINCT - 60 + + 39 FROM tab0
----
-21

query I rowsort
SELECT + 58 * tab0.col0 + + col0 * col0 - col1 * + col1 AS col1 FROM tab0
----
-5428
-6154
4802

query I rowsort
SELECT 35 * col1 AS col0 FROM tab1
----
350
455
910

query I rowsort
SELECT - 27 * - col0 + - col0 FROM tab1 AS cor0
----
1664
2080
78

query I rowsort
SELECT - col0 + - cor0.col2 * - col0 AS col1 FROM tab2 cor0
----
182
1950
2923

query I rowsort
SELECT + + cor0.col2 + + col1 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT col2 + + cor0.col2 AS col0 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT - col2 * - cor0.col2 * + col0 AS col0 FROM tab2 AS cor0
----
114076
5103
52728

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 94 col2 FROM tab0 cor0
----
94
94
94

query I rowsort
SELECT 15 + - col0 * + col0 FROM tab2 AS cor0
----
-34
-6069
-6226

query I rowsort
SELECT + 21 * col1 * col0 + + col0 AS col1 FROM tab1 AS cor0
----
13504
1641
21920

query I rowsort
SELECT cor0.col1 FROM tab0, tab2 AS cor0, tab1 cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT ALL - ( + tab2.col0 * col2 ) AS col2 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT + + col2 + col0 AS col0 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-5374
SELECT ALL - - col0 DIV col0 AS col0 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5374
SELECT ALL - - col0 / col0 AS col0 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT + - 18 * col2 + + col0 AS col1 FROM tab1 AS cor0
----
-1648
-962
-969

query I rowsort
SELECT - + ( + cor0.col1 ) FROM tab2 AS cor0
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-5377
SELECT ALL - - col2 + col2 * col0 DIV col0 FROM tab2 AS cor0
----
52
54
76

skipif mysql # not compatible
query I rowsort label-5377
SELECT ALL - - col2 + col2 * col0 / col0 FROM tab2 AS cor0
----
52
54
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col1 col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - - cor0.col2 * - 59 + col2 AS col0 FROM tab1 cor0
----
-3132
-3306
-5568

query I rowsort
SELECT col1 + 52 FROM tab0
----
138
143
149

onlyif mysql # use DIV operator for integer division
query I rowsort label-5381
SELECT ALL + col0 DIV + col2 AS col2 FROM tab0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-5381
SELECT ALL + col0 / + col2 AS col2 FROM tab0
----
0
1
35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5382
SELECT + - col2 + - CAST( 34 AS SIGNED ) * - cor0.col2 FROM tab1 AS cor0
----
1782
1881
3168

skipif mysql # not compatible
query I rowsort label-5382
SELECT + - col2 + - CAST ( 34 AS INTEGER ) * - cor0.col2 FROM tab1 AS cor0
----
1782
1881
3168

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 * ( - col0 ) col0 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-5384
SELECT ( + col0 ) DIV - 32 + - col0 AS col2 FROM tab1
----
-3
-66
-82

skipif mysql # not compatible
query I rowsort label-5384
SELECT ( + col0 ) / - 32 + - col0 AS col2 FROM tab1
----
-3
-66
-82

query I rowsort
SELECT + - col1 * - col0 AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + cor0.col2 + col0 + col0 FROM tab2 AS cor0
----
182
196
41

query I rowsort
SELECT ALL + + col0 + 45 AS col0 FROM tab0 AS cor0
----
134
69
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5388
SELECT - col2 DIV - 6 AS col1 FROM tab0
----
0
13
5

skipif mysql # not compatible
query I rowsort label-5388
SELECT - col2 / - 6 AS col1 FROM tab0
----
0
13
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-5389
SELECT + col2 DIV + 82 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5389
SELECT + col2 / + 82 FROM tab1
----
0
0
1

query I rowsort
SELECT col2 * 77 FROM tab1
----
4158
4389
7392

query I rowsort
SELECT DISTINCT col0 * 48 FROM tab2
----
336
3744
3792

query I rowsort
SELECT ALL - col0 * - tab1.col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT ALL + cor0.col0 * cor0.col0 + + col2 - cor0.col2 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT - col2 * + ( col0 ) - + col2 FROM tab0 AS cor0
----
-36
-7380
-825

query I rowsort
SELECT col2 * col0 * - col1 FROM tab0 cor0
----
-3395
-664118
-68112

query I rowsort
SELECT + col0 + + cor0.col0 * - 34 AS col2 FROM tab0 AS cor0
----
-1155
-2937
-792

query I rowsort
SELECT ALL - col2 * + 33 FROM tab2 AS cor0
----
-1254
-858
-891

onlyif mysql # use DIV operator for integer division
query I rowsort label-5398
SELECT ALL + col2 - cor0.col0 DIV - 23 FROM tab2 AS cor0
----
27
29
41

skipif mysql # not compatible
query I rowsort label-5398
SELECT ALL + col2 - cor0.col0 / - 23 FROM tab2 AS cor0
----
27
29
41

onlyif mysql # use DIV operator for integer division
query I rowsort label-5399
SELECT ALL col0 + + col1 DIV col1 AS col0 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-5399
SELECT ALL col0 + + col1 / col1 AS col0 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT DISTINCT - ( - col0 ) + - cor0.col0 * + 22 AS col2 FROM tab0 AS cor0
----
-1869
-504
-735

query I rowsort
SELECT - ( cor0.col0 ) * col0 AS col2 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL col1 - + 71 FROM tab0 AS cor0
----
15
20
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 52 col2 FROM tab2 AS cor0
----
-52
-52
-52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5404
SELECT CAST( - col0 AS SIGNED ) * cor0.col0 FROM tab0 AS cor0
----
-1225
-576
-7921

skipif mysql # not compatible
query I rowsort label-5404
SELECT CAST ( - col0 AS INTEGER ) * cor0.col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT - 45 * col1 * + col0 AS col2 FROM tab1 AS cor0
----
-28800
-3510
-46800

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( + cor0.col2 ) + col0 col0 FROM tab1 cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-5407
SELECT ALL col1 DIV col2 + col2 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-5407
SELECT ALL col1 / col2 + col2 FROM tab1 AS cor0
----
54
57
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5408
SELECT DISTINCT CAST( NULL AS SIGNED ) - - col1 AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5408
SELECT DISTINCT CAST ( NULL AS INTEGER ) - - col1 AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL + col0 * 44 FROM tab0 AS cor0
----
1056
1540
3916

query I rowsort
SELECT DISTINCT col1 * col2 + - col1 FROM tab0 AS cor0
----
0
2752
7371

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5411
SELECT ALL - CAST( NULL AS DECIMAL ) - cor0.col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5411
SELECT ALL - CAST ( NULL AS REAL ) - cor0.col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - col1 + cor0.col2 * col2 AS col1 FROM tab1 cor0
----
2890
3239
9203

query I rowsort
SELECT DISTINCT - + col1 * + ( + col2 ) FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT - 69 * + cor0.col0 FROM tab0 AS cor0
----
-1656
-2415
-6141

query I rowsort
SELECT + 54 + + 81 FROM tab0 AS cor0
----
135
135
135

query I rowsort
SELECT + tab1.col2 + - col0 AS col1 FROM tab1
----
-7
16
51

query I rowsort
SELECT DISTINCT col1 * cor0.col1 AS col0 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT - cor0.col2 * - col2 + col2 FROM tab2 AS cor0
----
1482
702
756

query I rowsort
SELECT + ( col2 ) * col1 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT cor0.col2 + - col1 * ( col0 ) AS col2 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT - col0 * + col1 * - 34 FROM tab0 AS cor0
----
115430
275366
70176

query I rowsort
SELECT ALL - + cor0.col1 + cor0.col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT 41 * - col0 FROM tab0 cor0
----
-1435
-3649
-984

query I rowsort
SELECT - col1 + cor0.col2 * col1 + + col2 FROM tab1 AS cor0
----
1331
1432
617

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col2 AS col1 FROM tab0 AS cor0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - ( - cor0.col0 ) * - ( - col2 ) col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL 19 + col0 AS col0 FROM tab1 AS cor0
----
22
83
99

query I rowsort
SELECT ALL + ( - col0 ) + + col0 * + col0 FROM tab0 AS cor0
----
1190
552
7832

query I rowsort
SELECT DISTINCT - 88 + - col0 AS col0 FROM tab1 cor0
----
-152
-168
-91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 85 + - col0 col0 FROM tab2 AS cor0
----
-163
-164
-92

query I rowsort
SELECT ALL - 41 * col0 AS col2 FROM tab0 AS cor0
----
-1435
-3649
-984

onlyif mysql # use DIV operator for integer division
query I rowsort label-5432
SELECT ALL + col2 DIV + col1 AS col1 FROM tab2 cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-5432
SELECT ALL + col2 / + col1 AS col1 FROM tab2 cor0
----
0
0
2

query I rowsort
SELECT + + cor0.col2 + + col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT + cor0.col2 * cor0.col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - 46 + col2 * 24 AS col0 FROM tab2 AS cor0
----
578
602
866

query I rowsort
SELECT ALL + + 28 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

query I rowsort
SELECT col0 * 97 FROM tab2 AS cor0
----
679
7566
7663

query I rowsort
SELECT + + col1 + col1 + col0 AS col0 FROM tab1 AS cor0
----
106
55
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-5439
SELECT + + col0 + + col0 DIV col1 + col2 FROM tab2 AS cor0
----
105
121
34

skipif mysql # not compatible
query I rowsort label-5439
SELECT + + col0 + + col0 / col1 + col2 FROM tab2 AS cor0
----
105
121
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-5440
SELECT - col1 DIV - col0 + ( + col2 ) * col2 AS col1 FROM tab1 AS cor0
----
2924
3249
9216

skipif mysql # not compatible
query I rowsort label-5440
SELECT - col1 / - col0 + ( + col2 ) * col2 AS col1 FROM tab1 AS cor0
----
2924
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-5441
SELECT - + col2 + - col1 DIV + col2 FROM tab0 AS cor0
----
-35
-83
-98

skipif mysql # not compatible
query I rowsort label-5441
SELECT - + col2 + - col1 / + col2 FROM tab0 AS cor0
----
-35
-83
-98

query I rowsort
SELECT + ( - col2 ) + + 83 AS col1 FROM tab2
----
45
56
57

query I rowsort
SELECT tab1.col0 + col2 * 25 * - col0 AS col2 FROM tab1
----
-191920
-4047
-91136

onlyif mysql # use DIV operator for integer division
query I rowsort label-5444
SELECT ALL + - col0 DIV col1 FROM tab2 cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-5444
SELECT ALL + - col0 / col1 FROM tab2 cor0
----
-1
-4
0

query I rowsort
SELECT col0 + - col2 * tab1.col2 + col2 * + col2 * - tab1.col0 AS col0 FROM tab1
----
-11661
-211121
-746416

query I rowsort
SELECT - cor0.col1 * - col0 + 42 AS col0 FROM tab2 AS cor0
----
1385
259
4644

query I rowsort
SELECT DISTINCT 3 AS col0 FROM tab0, tab1 AS cor0 CROSS JOIN tab2
----
3

query I rowsort
SELECT DISTINCT + col0 * 57 + col0 AS col0 FROM tab0 AS cor0
----
1392
2030
5162

query IIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 cor0 CROSS JOIN tab2 AS cor1
----
243 values hashing to 5ac29bd6e3a9e69ed9c73ca7a34114f7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5450
SELECT + ( cor0.col1 ) + CAST( + 54 * tab1.col0 AS SIGNED ) FROM tab1, tab2 AS cor0
----
9 values hashing to 3d4dd3656c9631737c89ebd106b46658

skipif mysql # not compatible
query I rowsort label-5450
SELECT + ( cor0.col1 ) + CAST ( + 54 * tab1.col0 AS INTEGER ) FROM tab1, tab2 AS cor0
----
9 values hashing to 3d4dd3656c9631737c89ebd106b46658

query I rowsort
SELECT + 41 * col2 FROM tab0 cor0
----
1353
3362
41

query I rowsort
SELECT + 81 + + col1 FROM tab2 AS cor0
----
112
140
98

query I rowsort
SELECT 44 * + col1 AS col2 FROM tab1
----
1144
440
572

query I rowsort
SELECT ALL col0 * - col0 * 71 + + 77 + col0 FROM tab0 AS cor0
----
-40795
-562225
-86863

query I rowsort
SELECT DISTINCT cor0.col0 + 61 AS col2 FROM tab1, tab0 AS cor0
----
150
85
96

query I rowsort
SELECT 58 * col0 + + 44 + - col0 FROM tab1 cor0
----
215
3692
4604

onlyif mysql # use DIV operator for integer division
query I rowsort label-5457
SELECT - cor0.col2 DIV col2 AS col1 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5457
SELECT - cor0.col2 / col2 AS col1 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT - 86 + 20 * - col1 FROM tab2 AS cor0
----
-1266
-426
-706

query I rowsort
SELECT col1 + + cor0.col0 * + col0 FROM tab0 AS cor0
----
1322
662
8012

onlyif mysql # use DIV operator for integer division
query I rowsort label-5460
SELECT + col1 DIV + 85 + - cor0.col1 FROM tab0 AS cor0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-5460
SELECT + col1 / + 85 + - cor0.col1 FROM tab0 AS cor0
----
-85
-90
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 + - col0 col0 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT col0 + 12 * col0 AS col2 FROM tab0 cor0
----
1157
312
455

query I rowsort
SELECT + col1 * - col1 + col2 FROM tab0 AS cor0
----
-7363
-8199
-9408

query I rowsort
SELECT - - 4 * col2 + + col0 * - 15 AS col0 FROM tab1 AS cor0
----
-732
-816
171

query I rowsort
SELECT + + col2 * + cor0.col0 + col2 AS col0 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT DISTINCT + + 23 FROM tab0 AS cor0
----
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-5467
SELECT cor0.col1 + col2 DIV 79 FROM tab1 AS cor0
----
10
14
26

skipif mysql # not compatible
query I rowsort label-5467
SELECT cor0.col1 + col2 / 79 FROM tab1 AS cor0
----
10
14
26

query I rowsort
SELECT ( col0 + - col2 * col0 ) FROM tab0
----
-7209
-768
0

query I rowsort
SELECT ALL - - cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT col0 + + 31 AS col1 FROM tab2 AS cor0
----
109
110
38

query I rowsort
SELECT 66 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 897b6122ac98340b78905f39d81897fc

query I rowsort
SELECT - col1 + + 40 - + col0 * + col2 AS col0 FROM tab0 AS cor0
----
-7349
-838
-92

query I rowsort
SELECT 92 * col0 + - col0 * - 95 FROM tab0
----
16643
4488
6545

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col0 col1 FROM tab1
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5475
SELECT DISTINCT + CAST( NULL AS SIGNED ) * 62 FROM tab1, tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5475
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * 62 FROM tab1, tab1 AS cor0
----
NULL

query I rowsort
SELECT col1 * cor0.col0 * - col2 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT col2 * 82 FROM tab1
----
4428
4674
7872

query I rowsort
SELECT DISTINCT 95 AS col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
95

query I rowsort
SELECT ALL ( + col2 ) + + cor0.col0 * - 57 FROM tab2 AS cor0
----
-372
-4420
-4465

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5480
SELECT ALL CAST( col1 AS SIGNED ) + - col1 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5480
SELECT ALL CAST ( col1 AS INTEGER ) + - col1 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - 87 AS col1 FROM tab0 AS cor0
----
-87

onlyif mysql # use DIV operator for integer division
query I rowsort label-5482
SELECT col0 * - 69 + + col2 DIV + col0 FROM tab1
----
-189
-4416
-5519

skipif mysql # not compatible
query I rowsort label-5482
SELECT col0 * - 69 + + col2 / + col0 FROM tab1
----
-189
-4416
-5519

query I rowsort
SELECT - ( - tab0.col2 ) AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT col0 * 25 FROM tab0
----
2225
600
875

query I rowsort
SELECT + col2 * tab2.col2 + - col0 FROM tab2
----
1365
598
722

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5486
SELECT ALL + CAST( NULL AS SIGNED ) + col2 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5486
SELECT ALL + CAST ( NULL AS INTEGER ) + col2 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 16 + + col2 - - col0 AS col1 FROM tab2
----
101
18
88

query I rowsort
SELECT - col0 * + ( - col1 ) AS col1 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT ALL + 80 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 878f012d707aab113cedaf56e6c52e94

query I rowsort
SELECT DISTINCT + tab1.col2 * + tab1.col2 AS col0 FROM tab1, tab0 AS cor0
----
2916
3249
9216

query I rowsort
SELECT col1 - - 96 * col2 FROM tab2
----
2555
2623
3665

query I rowsort
SELECT DISTINCT + col1 * col1 + - col0 + - col0 * ( 40 * cor0.col2 ) FROM tab0 AS cor0
----
-24308
-283728
7974

onlyif mysql # use DIV operator for integer division
query I rowsort label-5493
SELECT DISTINCT col1 DIV - cor0.col2 + + col0 col2 FROM tab1 cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5493
SELECT DISTINCT col1 / - cor0.col2 + + col0 col2 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT cor0.col1 * ( col1 ) * - cor0.col1 AS col2 FROM tab1 AS cor0
----
-1000
-17576
-2197

query I rowsort
SELECT ALL col2 - ( - cor0.col0 ) FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT ALL - col1 * 14 + col2 AS col1 FROM tab1 AS cor0
----
-310
-83
-86

query I rowsort
SELECT DISTINCT col0 + + col1 AS col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL tab0.col1 + 16 FROM tab0
----
102
107
113

query I rowsort
SELECT - col2 - - tab0.col0 AS col0 FROM tab0
----
-9
34
7

query I rowsort
SELECT ALL col0 * col0 + col0 * - tab0.col1 FROM tab0
----
-1488
-178
-2170

query I rowsort
SELECT ( - 77 ) + + col2 AS col2 FROM tab0
----
-44
-76
5

query I rowsort
SELECT col1 * + 31 + col2 * + col1 AS col0 FROM tab0
----
10283
3104
5504

query I rowsort
SELECT - - 55 + 59 FROM tab0 AS cor0
----
114
114
114

query I rowsort
SELECT DISTINCT col1 + + 33 FROM tab2 cor0
----
50
64
92

query I rowsort
SELECT DISTINCT + 8 + cor0.col2 FROM tab0 AS cor0
----
41
9
90

query I rowsort
SELECT ALL - col0 + col2 * col1 * ( + col1 ) FROM tab2
----
10903
25940
90428

query I rowsort
SELECT ALL tab1.col0 + 92 FROM tab1
----
156
172
95

query I rowsort
SELECT - + tab2.col2 * - 5 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 823472bf54551366136818d08149d04e

onlyif mysql # use DIV operator for integer division
query I rowsort label-5509
SELECT ALL - + 74 + col2 DIV - 8 FROM tab1 cor0
----
-80
-81
-86

skipif mysql # not compatible
query I rowsort label-5509
SELECT ALL - + 74 + col2 / - 8 FROM tab1 cor0
----
-80
-81
-86

query I rowsort
SELECT DISTINCT + - col2 + - col1 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT - col0 + - col2 * col1 AS col0 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT ALL - 78 * col2 + ( 31 ) + col2 FROM tab0 AS cor0
----
-2510
-46
-6283

query I rowsort
SELECT DISTINCT - cor0.col1 * col0 + col2 * col1 FROM tab1 AS cor0
----
-70
1326
208

query I rowsort
SELECT ALL - 56 - col1 FROM tab1 cor0
----
-66
-69
-82

query I rowsort
SELECT ALL tab0.col0 + 30 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 46813c6d930c7ba318789e5b0c307e41

query I rowsort
SELECT 99 + col0 * 41 AS col2 FROM tab0 AS cor0
----
1083
1534
3748

query I rowsort
SELECT DISTINCT col0 + - col1 * - 89 FROM tab0 cor0
----
7678
8188
8668

onlyif mysql # use DIV operator for integer division
query I rowsort label-5518
SELECT ALL col0 * col1 + col2 DIV col2 AS col1 FROM tab1 AS cor0
----
1041
641
79

skipif mysql # not compatible
query I rowsort label-5518
SELECT ALL col0 * col1 + col2 / col2 AS col1 FROM tab1 AS cor0
----
1041
641
79

query I rowsort
SELECT - cor0.col2 * col1 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT - + cor0.col2 * - col1 + + 31 FROM tab0 AS cor0
----
128
2869
7493

query I rowsort
SELECT ALL col0 + + col1 * col0 FROM tab0 AS cor0
----
2088
3430
8188

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( - col2 ) + ( - col1 ) col0 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT + col2 + 36 AS col2 FROM tab0 cor0
----
118
37
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-5524
SELECT - + col2 + - ( - 25 ) DIV cor0.col1 + col2 FROM tab2 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5524
SELECT - + col2 + - ( - 25 ) / cor0.col1 + col2 FROM tab2 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort
SELECT ALL - col1 * - CAST ( col0 AS REAL ) FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT + col2 - - col0 AS col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT - cor0.col2 * 66 FROM tab2 AS cor0
----
-1716
-1782
-2508

onlyif mysql # use DIV operator for integer division
query I rowsort label-5528
SELECT ALL col2 * CAST( - col2 AS SIGNED ) DIV col2 FROM tab0 cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-5528
SELECT ALL col2 * CAST ( - col2 AS INTEGER ) / col2 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT ALL + col0 * 3 AS col1 FROM tab2 AS cor0
----
21
234
237

query I rowsort
SELECT col1 * - 53 + cor0.col1 FROM tab2 AS cor0
----
-1612
-3068
-884

onlyif mysql # use DIV operator for integer division
query I rowsort label-5531
SELECT DISTINCT col1 DIV cor0.col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5531
SELECT DISTINCT col1 / cor0.col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL + col0 + cor0.col1 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT - col2 * col1 + + cor0.col0 * col1 AS col2 FROM tab0 AS cor0
----
-774
3298
637

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + 80 col0 FROM tab2 AS cor0
----
106
107
118

query I rowsort
SELECT + cor0.col1 * - col1 - 94 * + col0 AS col2 FROM tab0 AS cor0
----
-12699
-16647
-9652

query I rowsort
SELECT DISTINCT + col0 * col1 + + 3 * + cor0.col2 FROM tab2 AS cor0
----
1457
298
4680

query I rowsort
SELECT DISTINCT cor0.col1 - col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL - col0 * - cor0.col2 - col2 * + col0 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT col2 * + cor0.col0 + col1 AS col1 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT DISTINCT 58 AS col1 FROM tab0 AS cor0
----
58

query I rowsort
SELECT + + 28 * - col2 + + col0 FROM tab2 AS cor0
----
-650
-749
-985

query I rowsort
SELECT 50 * + 80 * + col1 + col0 FROM tab0 AS cor0
----
344024
364089
388035

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5543
SELECT CAST( + col2 AS SIGNED ) * cor0.col1 * 43 + + col1 FROM tab0 AS cor0
----
122120
320957
4268

skipif mysql # not compatible
query I rowsort label-5543
SELECT CAST ( + col2 AS INTEGER ) * cor0.col1 * 43 + + col1 FROM tab0 AS cor0
----
122120
320957
4268

query I rowsort
SELECT ( + col0 ) + - col1 * ( + 29 ) AS col2 FROM tab2 AS cor0
----
-1633
-414
-892

query I rowsort
SELECT + + 30 + cor0.col1 * col0 AS col2 FROM tab2 AS cor0
----
1373
247
4632

query I rowsort
SELECT DISTINCT col2 + col1 + - cor0.col0 FROM tab2 cor0
----
-24
51
7

query I rowsort
SELECT + 51 + + col0 + - col2 FROM tab2 AS cor0
----
103
31
92

query I rowsort
SELECT DISTINCT + 96 + 40 * - col2 FROM tab1 cor0
----
-2064
-2184
-3744

query I rowsort
SELECT - 23 + - 46 FROM tab2 AS cor0
----
-69
-69
-69

onlyif mysql # use DIV operator for integer division
query I rowsort label-5550
SELECT cor0.col2 DIV col2 AS col2 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5550
SELECT cor0.col2 / col2 AS col2 FROM tab1 cor0
----
1
1
1

query I rowsort
SELECT ALL + col2 * 9 FROM tab2 AS cor0
----
234
243
342

query I rowsort
SELECT + 13 + + col2 FROM tab0 cor0
----
14
46
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( col1 ) * col1 col2 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT - col0 + col1 - col2 FROM tab2 AS cor0
----
-100
-3
-45

query I rowsort
SELECT - col0 * col0 - col1 AS col1 FROM tab0 AS cor0
----
-1322
-662
-8012

onlyif mysql # use DIV operator for integer division
query I rowsort label-5556
SELECT + col0 * ( - cor0.col2 ) - col0 DIV - col1 AS col0 FROM tab1 AS cor0
----
-162
-3642
-7674

skipif mysql # not compatible
query I rowsort label-5556
SELECT + col0 * ( - cor0.col2 ) - col0 / - col1 AS col0 FROM tab1 AS cor0
----
-162
-3642
-7674

onlyif mysql # use DIV operator for integer division
query I rowsort label-5557
SELECT + col2 DIV ( col2 ) - 34 AS col2 FROM tab0 AS cor0
----
-33
-33
-33

skipif mysql # not compatible
query I rowsort label-5557
SELECT + col2 / ( col2 ) - 34 AS col2 FROM tab0 AS cor0
----
-33
-33
-33

query I rowsort
SELECT + 0 * col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL tab1.col1 AS col1 FROM tab1, tab1 cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT + + 45 * cor0.col0 AS col0 FROM tab0 AS cor0
----
1080
1575
4005

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + cor0.col0 * - 76 * 45 col2 FROM tab2 AS cor0
----
-23967
-266786
-270218

query I rowsort
SELECT + + col2 * + cor0.col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT 96 AS col0 FROM tab1, tab2 AS cor0
----
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5564
SELECT DISTINCT - CAST( NULL AS SIGNED ) FROM tab0, tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5564
SELECT DISTINCT - CAST ( NULL AS INTEGER ) FROM tab0, tab2 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5565
SELECT ALL col1 * - CAST( NULL AS SIGNED ) + - 2 * cor0.col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5565
SELECT ALL col1 * - CAST ( NULL AS INTEGER ) + - 2 * cor0.col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 43 col0 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to ee5108f6248be48c54e069545f81c5d9

query I rowsort
SELECT DISTINCT + ( + col1 + col0 ) AS col1 FROM tab0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * col2 + col2 col1 FROM tab1
----
-2862
-3192
-9120

query I rowsort
SELECT DISTINCT + 57 * cor0.col2 FROM tab0, tab0 AS cor0
----
1881
4674
57

query I rowsort
SELECT col1 * - 31 AS col0 FROM tab0
----
-2666
-2821
-3007

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 + 90 + - 57 col2 FROM tab2 AS cor0
----
59
60
71

query I rowsort
SELECT ALL + + col2 + - 73 FROM tab0 AS cor0
----
-40
-72
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-5573
SELECT cor0.col2 DIV - CAST( col2 AS SIGNED ) FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5573
SELECT cor0.col2 / - CAST ( col2 AS INTEGER ) FROM tab1 AS cor0
----
-1
-1
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5574
SELECT + col0 * + CAST( 68 AS SIGNED ) FROM tab2 AS cor0
----
476
5304
5372

skipif mysql # not compatible
query I rowsort label-5574
SELECT + col0 * + CAST ( 68 AS INTEGER ) FROM tab2 AS cor0
----
476
5304
5372

query I rowsort
SELECT DISTINCT + 22 AS col1 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
22

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5576
SELECT DISTINCT CAST( + 20 * - tab0.col1 AS SIGNED ) FROM tab0, tab2 AS cor0
----
-1720
-1820
-1940

skipif mysql # not compatible
query I rowsort label-5576
SELECT DISTINCT CAST ( + 20 * - tab0.col1 AS INTEGER ) FROM tab0, tab2 AS cor0
----
-1720
-1820
-1940

onlyif mysql # use DIV operator for integer division
query I rowsort label-5577
SELECT - + col0 DIV 71 col1 FROM tab1 AS cor0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5577
SELECT - + col0 / 71 col1 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT ALL cor1.col0 FROM tab0 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + tab1.col2 col1 FROM tab1
----
2916
3249
9216

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5580
SELECT ALL - CAST( + 40 AS SIGNED ) AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to f02f17e9bc17e514af018c6f245ed7a9

skipif mysql # not compatible
query I rowsort label-5580
SELECT ALL - CAST ( + 40 AS INTEGER ) AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to f02f17e9bc17e514af018c6f245ed7a9

query I rowsort
SELECT + ( + cor1.col2 ) + cor1.col2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to b24047a4766c1dbbfa5abb9df45d1883

query I rowsort
SELECT + 84 + + cor0.col0 AS col1 FROM tab0 AS cor0
----
108
119
173

query I rowsort
SELECT DISTINCT - + 47 FROM tab2, tab2 AS cor0
----
-47

query I rowsort
SELECT DISTINCT + col2 + + ( 39 ) AS col2 FROM tab2
----
65
66
77

query I rowsort
SELECT ALL + - col1 + + ( ( + col2 ) ) + 70 FROM tab0 cor0
----
-26
17
61

query I rowsort
SELECT DISTINCT col1 * - ( col0 ) FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT + 60 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to a97561e17ecaa618227c75a57b268f33

query I rowsort
SELECT + cor1.col2 FROM tab2, tab2 AS cor0, tab1 cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT ALL tab1.col1 * 4 FROM tab1
----
104
40
52

query I rowsort
SELECT DISTINCT - ( col2 ) + col0 AS col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT cor0.col1 * cor0.col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - + ( col0 ) * col0 AS col1 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL 67 FROM tab1, tab2 cor0
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5594
SELECT + CAST( + col0 * col2 AS SIGNED ) AS col0 FROM tab2
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-5594
SELECT + CAST ( + col0 * col2 AS INTEGER ) AS col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT - - col1 + - col1 * col0 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT + ( - ( col1 ) * + 18 ) FROM tab0
----
-1548
-1638
-1746

query I rowsort
SELECT ALL - 63 FROM tab2, tab1 AS cor0
----
9 values hashing to 5a7845ef6e239561caf9a17a28e274b5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * cor0.col1 * 81 col1 FROM tab2 cor0
----
108783
17577
372762

query I rowsort
SELECT DISTINCT - + ( - col2 ) + + 79 FROM tab0 AS cor0
----
112
161
80

query I rowsort
SELECT ALL - 45 FROM tab1 cor0
----
-45
-45
-45

query I rowsort
SELECT ALL + 84 + col2 AS col2 FROM tab2 AS cor0
----
110
111
122

query I rowsort
SELECT ALL + 83 AS col0 FROM tab1
----
83
83
83

query I rowsort
SELECT ALL - ( cor0.col1 ) * col2 * col0 AS col0 FROM tab1 cor0
----
-36480
-4212
-99840

query I rowsort
SELECT ALL 34 + col0 FROM tab0 AS cor0
----
123
58
69

query I rowsort
SELECT ALL ( 29 ) FROM tab2, tab0 cor0, tab1 cor1
----
27 values hashing to 4c56285992bcb76e1aac22e6d23d1318

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5606
SELECT CAST( + col0 * - col1 AS SIGNED ) AS col2 FROM tab2
----
-1343
-217
-4602

skipif mysql # not compatible
query I rowsort label-5606
SELECT CAST ( + col0 * - col1 AS INTEGER ) AS col2 FROM tab2
----
-1343
-217
-4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5607
SELECT + col1 + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5607
SELECT + col1 + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 64 * + col1 FROM tab1
----
1664
640
832

query I rowsort
SELECT 84 * col0 + col2 FROM tab1
----
306
5433
6816

onlyif mysql # use DIV operator for integer division
query I rowsort label-5610
SELECT ALL + ( col0 ) DIV 90 AS col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5610
SELECT ALL + ( col0 ) / 90 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL + 50 AS col2 FROM tab1
----
50
50
50

query I rowsort
SELECT + col0 * - col0 * + tab0.col0 AS col1 FROM tab0
----
-13824
-42875
-704969

query I rowsort
SELECT - ( cor0.col0 ) * - cor0.col0 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 458b4c13e6825f9686b15a38663930f4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + 12 * col2 col0 FROM tab2 AS cor0
----
286
297
418

query I rowsort
SELECT - 69 * - 36 AS col2 FROM tab1 AS cor0
----
2484
2484
2484

query I rowsort
SELECT DISTINCT - 40 * 43 FROM tab2 cor0
----
-1720

query I rowsort
SELECT ALL + - 58 + col1 FROM tab1 AS cor0
----
-32
-45
-48

query I rowsort
SELECT DISTINCT - col2 * 21 + col2 * 67 AS col1 FROM tab1 cor0
----
2484
2622
4416

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5619
SELECT - CAST( NULL AS DECIMAL ) * col2 + col2 * col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5619
SELECT - CAST ( NULL AS REAL ) * col2 + col2 * col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5620
SELECT ALL CAST( NULL AS DECIMAL ) col2 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-5620
SELECT ALL CAST ( NULL AS REAL ) col2 FROM tab1, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT col2 * col1 * col0 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT col1 - 82 FROM tab1
----
-56
-69
-72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5623
SELECT col0 + - CAST( NULL AS SIGNED ) * col0 + - col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5623
SELECT col0 + - CAST ( NULL AS INTEGER ) * col0 + - col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 * 66 FROM tab0
----
1584
2310
5874

query I rowsort
SELECT DISTINCT + cor1.col2 * - 90 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
-2970
-7380
-90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5626
SELECT - CAST( NULL AS SIGNED ) * + col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5626
SELECT - CAST ( NULL AS INTEGER ) * + col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 42 + + 38 FROM tab0 AS cor0
----
-4
-4
-4

query I rowsort
SELECT + col2 + 31 * - col2 FROM tab0 AS cor0
----
-2460
-30
-990

query I rowsort
SELECT - + cor0.col0 * col0 + col0 + + col2 * + 90 AS col1 FROM tab2 AS cor0
----
-2742
-3666
2388

query I rowsort
SELECT + 4 FROM tab1 cor0
----
4
4
4

query I rowsort
SELECT DISTINCT - col0 * col0 AS col1 FROM tab0 cor0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-5632
SELECT + + col0 DIV - col2 AS col2 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-5632
SELECT + + col0 / - col2 AS col2 FROM tab1 AS cor0
----
-1
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5633
SELECT + cor0.col2 + col2 DIV + cor0.col2 AS col2 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-5633
SELECT + cor0.col2 + col2 / + cor0.col2 AS col2 FROM tab0 AS cor0
----
2
34
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-5634
SELECT ALL - - col0 DIV - col0 AS col0 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5634
SELECT ALL - - col0 / - col0 AS col0 FROM tab2 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-5635
SELECT DISTINCT + col1 DIV col0 AS col1 FROM tab0 cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-5635
SELECT DISTINCT + col1 / col0 AS col1 FROM tab0 cor0
----
1
2
3

query IIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0 WHERE NULL IN ( cor0.col1 )
----

query I rowsort
SELECT col0 * + col0 + - col1 FROM tab0 AS cor0
----
1128
490
7830

query I rowsort
SELECT - col0 * col1 * col2 AS col1 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT ALL tab2.col0 + + col1 + + col2 AS col1 FROM tab2
----
134
163
65

query I rowsort
SELECT ALL + col1 + + tab0.col2 + - tab0.col0 FROM tab0
----
63
84
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-5641
SELECT DISTINCT - col0 DIV col0 + tab1.col1 FROM tab1
----
12
25
9

skipif mysql # not compatible
query I rowsort label-5641
SELECT DISTINCT - col0 / col0 + tab1.col1 FROM tab1
----
12
25
9

query I rowsort
SELECT ALL col2 * col1 + col2 + col1 FROM tab2
----
1619
701
895

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col0 * - tab0.col1 + + col0 * - tab0.col2 col1 FROM tab0
----
1272
3360
801

query I rowsort
SELECT tab1.col2 * + col0 * + col2 + - col1 + col0 FROM tab1
----
207990
737347
8725

query I rowsort
SELECT DISTINCT - tab1.col0 + + tab1.col1 * col1 FROM tab1
----
36
673
89

query I rowsort
SELECT DISTINCT tab0.col1 + tab0.col1 * - col1 AS col0 FROM tab0
----
-7310
-8190
-9312

query I rowsort
SELECT ALL - col0 + col0 + col1 AS col2 FROM tab2
----
17
31
59

query I rowsort
SELECT + col0 + tab0.col2 * col2 FROM tab0
----
1113
36
6813

query IIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0 WHERE - cor0.col2 <= ( NULL )
----

query I rowsort
SELECT + 52 - col2 AS col1 FROM tab0
----
-30
19
51

query I rowsort
SELECT - + cor0.col2 * col0 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT - + 65 * + col2 FROM tab2 AS cor0
----
-1690
-1755
-2470

onlyif mysql # use DIV operator for integer division
query I rowsort label-5653
SELECT ALL - - col0 + - col0 DIV - col1 AS col2 FROM tab2 AS cor0
----
7
79
83

skipif mysql # not compatible
query I rowsort label-5653
SELECT ALL - - col0 + - col0 / - col1 AS col2 FROM tab2 AS cor0
----
7
79
83

query I rowsort
SELECT DISTINCT - 10 AS col2 FROM tab2 AS cor0
----
-10

onlyif mysql # use DIV operator for integer division
query I rowsort label-5655
SELECT ALL + tab2.col1 DIV + col1 AS col1 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5655
SELECT ALL + tab2.col1 / + col1 AS col1 FROM tab2
----
1
1
1

query I rowsort
SELECT col1 * + 38 + - tab2.col2 AS col0 FROM tab2
----
1151
2216
608

query I rowsort
SELECT col0 + - col1 * - col2 * - col1 AS col0 FROM tab2
----
-10903
-25940
-90428

query I rowsort
SELECT DISTINCT 21 * - col2 + + col0 FROM tab0
----
-1633
-669
14

query I rowsort
SELECT cor0.col1 * col0 - - col0 FROM tab2 cor0
----
1422
224
4680

query I rowsort
SELECT ALL 38 + + col1 * + col0 AS col2 FROM tab1 AS cor0
----
1078
116
678

query I rowsort
SELECT ALL + col1 * - col0 + - col1 * col0 * col0 + col2 AS col0 FROM tab0
----
-122219
-51567
-728828

onlyif mysql # use DIV operator for integer division
query I rowsort label-5662
SELECT 62 + col2 DIV col0 AS col1 FROM tab0 AS cor0
----
62
62
63

skipif mysql # not compatible
query I rowsort label-5662
SELECT 62 + col2 / col0 AS col1 FROM tab0 AS cor0
----
62
62
63

query I rowsort
SELECT DISTINCT + col2 * col1 * + col1 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT DISTINCT col2 + col0 + + col1 FROM tab2 AS cor0
----
134
163
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-5665
SELECT + 23 + + cor0.col2 DIV col1 FROM tab0 AS cor0
----
23
23
23

skipif mysql # not compatible
query I rowsort label-5665
SELECT + 23 + + cor0.col2 / col1 FROM tab0 AS cor0
----
23
23
23

query I rowsort
SELECT - cor0.col1 * - cor0.col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT col1 * col1 - + col0 FROM tab2 AS cor0
----
210
3403
954

query I rowsort
SELECT DISTINCT 18 * - col2 + - cor0.col1 + col0 AS col1 FROM tab0 cor0
----
-1478
-656
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5669
SELECT ALL 38 DIV - col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5669
SELECT ALL 38 / - col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + col1 * - col1 + col1 FROM tab0 AS cor0
----
-7310
-8190
-9312

query I rowsort
SELECT DISTINCT col1 + col1 * cor0.col0 AS col1 FROM tab2 cor0
----
1360
248
4661

query I rowsort
SELECT - col0 - - col0 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL col1 * col0 + + col2 AS col0 FROM tab1
----
1136
132
697

query I rowsort
SELECT DISTINCT - col0 + + col1 * + col0 AS col0 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT ALL - cor0.col2 * cor0.col2 + col0 * - col1 * col0 AS col0 FROM tab2 AS cor0
----
-107541
-2248
-359632

query I rowsort
SELECT ALL - col2 - - col2 * tab0.col0 AS col2 FROM tab0
----
34
7216
759

query I rowsort
SELECT + col2 FROM tab2 WHERE NOT NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT col0 * + col1 + tab2.col2 * + col2 - + col0 FROM tab2
----
2708
5200
939

onlyif mysql # use DIV operator for integer division
query I rowsort label-5679
SELECT + col2 DIV col0 + col1 * + col2 AS col0 FROM tab0
----
2839
7462
97

skipif mysql # not compatible
query I rowsort label-5679
SELECT + col2 / col0 + col1 * + col2 AS col0 FROM tab0
----
2839
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5680
SELECT ALL col0 DIV + col0 + tab1.col2 + - col0 AS col0 FROM tab1
----
-6
17
52

skipif mysql # not compatible
query I rowsort label-5680
SELECT ALL col0 / + col0 + tab1.col2 + - col0 AS col0 FROM tab1
----
-6
17
52

query I rowsort
SELECT - col1 AS col1 FROM tab2 WHERE NOT NULL NOT IN ( col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5682
SELECT ALL + col1 DIV - tab0.col0 FROM tab0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-5682
SELECT ALL + col1 / - tab0.col0 FROM tab0
----
-1
-2
-3

query I rowsort
SELECT DISTINCT - col1 + col1 - col2 AS col0 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT ALL tab1.col2 * - col2 + col2 FROM tab1
----
-2862
-3192
-9120

query I rowsort
SELECT ALL col1 * col0 + col0 * - col1 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5686
SELECT + col1 DIV - col1 + col0 FROM tab2
----
6
77
78

skipif mysql # not compatible
query I rowsort label-5686
SELECT + col1 / - col1 + col0 FROM tab2
----
6
77
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-5687
SELECT + col1 * col2 DIV col0 AS col1 FROM tab0
----
118
2
83

skipif mysql # not compatible
query I rowsort label-5687
SELECT + col1 * col2 / col0 AS col1 FROM tab0
----
118
2
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-5688
SELECT ALL col1 DIV tab0.col2 AS col0 FROM tab0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-5688
SELECT ALL col1 / tab0.col2 AS col0 FROM tab0
----
1
2
97

query I rowsort
SELECT DISTINCT - col2 * tab2.col0 + - col0 AS col0 FROM tab2
----
-196
-2106
-3081

query III rowsort
SELECT * FROM tab2 WHERE ( col1 ) NOT IN ( col0 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

onlyif mysql # use DIV operator for integer division
query I rowsort label-5691
SELECT - col1 DIV + tab1.col1 + col1 AS col2 FROM tab1
----
12
25
9

skipif mysql # not compatible
query I rowsort label-5691
SELECT - col1 / + tab1.col1 + col1 AS col2 FROM tab1
----
12
25
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 * col0 - col2 col0 FROM tab0
----
1224
543
7839

query I rowsort
SELECT ALL + col1 * col1 * - tab2.col2 + col1 - - tab2.col0 * col2 AS col0 FROM tab2
----
-25727
-7963
-88419

query I rowsort
SELECT DISTINCT tab1.col1 * col0 + col2 * + col1 + - tab1.col1 AS col2 FROM tab1
----
1200
1456
2275

query I rowsort
SELECT + col1 - col1 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT col2 * tab0.col2 * tab0.col2 FROM tab0
----
1
35937
551368

query I rowsort
SELECT col0 * - col1 + - col1 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT + cor0.col2 * - col2 + col1 FROM tab1 AS cor0
----
-2890
-3239
-9203

query I rowsort
SELECT DISTINCT + col0 + col1 * cor0.col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT - + cor0.col1 + + col0 + - col0 * - cor0.col2 AS col1 FROM tab0 AS cor0
----
-27
7296
730

query I rowsort
SELECT + - col2 * - col1 AS col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT cor0.col1 * - col0 * col0 AS col1 FROM tab1 AS cor0
----
-234
-40960
-83200

query I rowsort
SELECT - col2 + + tab1.col0 + col1 AS col0 FROM tab1 WHERE NOT NULL <> NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5704
SELECT col1 DIV - col0 + col0 FROM tab2
----
3
78
79

skipif mysql # not compatible
query I rowsort label-5704
SELECT col1 / - col0 + col0 FROM tab2
----
3
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * col2 col1 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT ALL 87 * 8 * cor0.col2 AS col0 FROM tab2 AS cor0
----
18096
18792
26448

query I rowsort
SELECT ALL + 45 * - col0 FROM tab0 cor0
----
-1080
-1575
-4005

onlyif mysql # use DIV operator for integer division
query I rowsort label-5708
SELECT DISTINCT + 44 DIV + cor0.col0 FROM tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-5708
SELECT DISTINCT + 44 / + cor0.col0 FROM tab0 AS cor0
----
0
1

query I rowsort
SELECT col2 + + col2 * + col1 FROM tab1 AS cor0
----
1344
1458
627

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 92 col2 FROM tab0 AS cor0
----
-92
-92
-92

query I rowsort
SELECT - 63 + col2 * + col2 AS col2 FROM tab0 AS cor0
----
-62
1026
6661

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 92 col2 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
-92

query I rowsort
SELECT ALL 72 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

query I rowsort
SELECT DISTINCT 90 FROM tab2, tab2 AS cor0 CROSS JOIN tab1
----
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-5715
SELECT + tab2.col2 * tab2.col2 DIV - tab2.col0 AS col0 FROM tab2
----
-104
-18
-8

skipif mysql # not compatible
query I rowsort label-5715
SELECT + tab2.col2 * tab2.col2 / - tab2.col0 AS col0 FROM tab2
----
-104
-18
-8

query I rowsort
SELECT DISTINCT col1 * 11 FROM tab0
----
1001
1067
946

query I rowsort
SELECT - cor1.col2 FROM tab1, tab1 cor0, tab2 cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT + 71 * - cor0.col0 FROM tab0 AS cor0
----
-1704
-2485
-6319

query I rowsort
SELECT 12 * 21 FROM tab0 cor0
----
252
252
252

query I rowsort
SELECT - + 75 * - cor0.col2 AS col1 FROM tab2 AS cor0
----
1950
2025
2850

query I rowsort
SELECT cor0.col0 * col1 * col1 AS col0 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT + 85 + tab1.col0 AS col0 FROM tab1
----
149
165
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-5723
SELECT DISTINCT + col0 DIV 85 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-5723
SELECT DISTINCT + col0 / 85 FROM tab1
----
0

query I rowsort
SELECT + + 32 + - col2 AS col1 FROM tab0 AS cor0
----
-1
-50
31

query I rowsort
SELECT + 57 * col2 AS col2 FROM tab1 AS cor0
----
3078
3249
5472

query I rowsort
SELECT cor0.col2 AS col0 FROM tab1, tab2 cor0, tab1 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT col0 - ( + col1 ) FROM tab0
----
-2
-62
-62

query I rowsort
SELECT ALL + col1 * + 22 FROM tab0 AS cor0
----
1892
2002
2134

query I rowsort
SELECT ALL - + 10 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to f68f33032846e21ee6b2c668fc10355e

onlyif mysql # use DIV operator for integer division
query I rowsort label-5730
SELECT ALL col2 DIV col1 AS col0 FROM tab2 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-5730
SELECT ALL col2 / col1 AS col0 FROM tab2 AS cor0
----
0
0
2

query I rowsort
SELECT col0 + - cor0.col0 * 38 AS col2 FROM tab0 cor0
----
-1295
-3293
-888

query I rowsort
SELECT + col1 * + col2 + + ( cor0.col1 ) AS col0 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT ALL cor0.col2 * cor0.col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL col1 * - col1 - + col1 AS col1 FROM tab1 AS cor0
----
-110
-182
-702

onlyif mysql # use DIV operator for integer division
query I rowsort label-5735
SELECT DISTINCT - col0 DIV - cor0.col0 + + col1 * col0 AS col2 FROM tab1 cor0
----
1041
641
79

skipif mysql # not compatible
query I rowsort label-5735
SELECT DISTINCT - col0 / - cor0.col0 + + col1 * col0 AS col2 FROM tab1 cor0
----
1041
641
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5736
SELECT DISTINCT + + col2 * + CAST( col1 AS SIGNED ) + + col1 * + col0 * col1 AS col0 FROM tab2 AS cor0
----
23477
273052
7564

skipif mysql # not compatible
query I rowsort label-5736
SELECT DISTINCT + + col2 * + CAST ( col1 AS INTEGER ) + + col1 * + col0 * col1 AS col0 FROM tab2 AS cor0
----
23477
273052
7564

query I rowsort
SELECT ALL + col2 * cor0.col1 + cor0.col0 AS col2 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT - ( + 35 ) * + cor0.col0 FROM tab2 AS cor0
----
-245
-2730
-2765

query I rowsort
SELECT DISTINCT col1 * + col2 + - col0 + cor0.col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT + ( + 34 ) * - col2 * col0 - + cor0.col0 AS col2 FROM tab0 AS cor0
----
-1225
-248221
-26952

query I rowsort
SELECT DISTINCT - + col0 - 32 FROM tab0 AS cor0
----
-121
-56
-67

query I rowsort
SELECT ALL - 52 FROM tab2, tab2 AS cor0
----
9 values hashing to 9500afe5646d620d5e8943351a29d082

query I rowsort
SELECT ALL - col2 + + 33 + + col0 AS col2 FROM tab2 AS cor0
----
13
74
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-5744
SELECT ALL + cor0.col0 + col1 DIV col2 + col1 FROM tab1 cor0
----
29
74
93

skipif mysql # not compatible
query I rowsort label-5744
SELECT ALL + cor0.col0 + col1 / col2 + col1 FROM tab1 cor0
----
29
74
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5745
SELECT - CAST( NULL AS SIGNED ) * + col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5745
SELECT - CAST ( NULL AS INTEGER ) * + col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5746
SELECT ALL - CAST( NULL AS DECIMAL ) * + col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5746
SELECT ALL - CAST ( NULL AS REAL ) * + col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - ( - cor0.col2 ) + 20 FROM tab1 AS cor0
----
-34
-37
-76

query I rowsort
SELECT ALL + 85 * + cor0.col0 + + col1 FROM tab0 AS cor0
----
2126
3072
7656

query I rowsort
SELECT + + ( - col0 ) + 63 AS col2 FROM tab0 AS cor0
----
-26
28
39

query I rowsort
SELECT DISTINCT + col0 + col2 * 51 FROM tab1 AS cor0
----
2757
2971
4976

onlyif mysql # use DIV operator for integer division
query I rowsort label-5751
SELECT + col2 * - col2 + + col0 DIV + 69 AS col1 FROM tab0 AS cor0
----
-1
-1089
-6723

skipif mysql # not compatible
query I rowsort label-5751
SELECT + col2 * - col2 + + col0 / + 69 AS col1 FROM tab0 AS cor0
----
-1
-1089
-6723

query I rowsort
SELECT - cor0.col0 + - 87 * 91 FROM tab1, tab1 cor0
----
9 values hashing to 458b442ac14c1ca60c919b618453a2bd

query I rowsort
SELECT DISTINCT col0 + 83 * cor0.col0 + - cor0.col2 AS col2 FROM tab1 cor0
----
198
5319
6624

query I rowsort
SELECT ALL cor0.col2 - + col0 AS col2 FROM tab1 AS cor0
----
-7
16
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-5755
SELECT ALL cor0.col0 DIV 93 + + col0 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-5755
SELECT ALL cor0.col0 / 93 + + col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT + col1 + + col2 * + ( col2 ) FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT DISTINCT + + col0 * + ( - 18 ) * + col1 AS col0 FROM tab1 AS cor0
----
-11520
-1404
-18720

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5758
SELECT DISTINCT cor0.col1 * + CAST( - col1 AS SIGNED ) FROM tab0 cor0
----
-7396
-8281
-9409

skipif mysql # not compatible
query I rowsort label-5758
SELECT DISTINCT cor0.col1 * + CAST ( - col1 AS INTEGER ) FROM tab0 cor0
----
-7396
-8281
-9409

query I rowsort
SELECT - 58 + col0 FROM tab1
----
-55
22
6

query I rowsort
SELECT DISTINCT - 93 * col1 + ( - ( col1 ) * - col1 ) FROM tab2
----
-1292
-1922
-2006

query I rowsort
SELECT + col1 * col0 + + 71 FROM tab1
----
1111
149
711

query I rowsort
SELECT 48 + - col1 - 73 AS col0 FROM tab2
----
-42
-56
-84

query I rowsort
SELECT - 60 * + col1 AS col2 FROM tab0
----
-5160
-5460
-5820

query I rowsort
SELECT DISTINCT + 96 AS col0 FROM tab1, tab0, tab2 AS cor0
----
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5765
SELECT DISTINCT col2 * - col0 - col1 DIV + tab0.col0 AS col1 FROM tab0
----
-37
-7299
-795

skipif mysql # not compatible
query I rowsort label-5765
SELECT DISTINCT col2 * - col0 - col1 / + tab0.col0 AS col1 FROM tab0
----
-37
-7299
-795

query I rowsort
SELECT ALL + cor0.col1 * + col0 AS col2 FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-5767
SELECT col2 + + col1 * col0 DIV col2 AS col1 FROM tab1
----
106
55
68

skipif mysql # not compatible
query I rowsort label-5767
SELECT col2 + + col1 * col0 / col2 AS col1 FROM tab1
----
106
55
68

query I rowsort
SELECT + 55 - - col1 AS col2 FROM tab1 AS cor0
----
65
68
81

query I rowsort
SELECT - cor0.col0 FROM tab1, tab2 cor0
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * - col0 col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + 89 * col2 FROM tab0 AS cor0
----
2937
7298
89

query I rowsort
SELECT + - 40 * col0 FROM tab2 AS cor0
----
-280
-3120
-3160

query IIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0 WHERE NOT NULL < NULL
----

query I rowsort
SELECT + + 42 * col0 FROM tab0 cor0
----
1008
1470
3738

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 18 col0 FROM tab2 AS cor0
----
18

query I rowsort
SELECT ALL - 3 * col2 + 22 AS col1 FROM tab1 cor0
----
-140
-149
-266

onlyif mysql # use DIV operator for integer division
query I rowsort label-5777
SELECT col0 * + col1 + - col1 - col1 DIV + cor0.col2 FROM tab0 AS cor0
----
1976
3201
8007

skipif mysql # not compatible
query I rowsort label-5777
SELECT col0 * + col1 + - col1 - col1 / + cor0.col2 FROM tab0 AS cor0
----
1976
3201
8007

query I rowsort
SELECT DISTINCT tab1.col1 - + tab1.col0 AS col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT ALL + col2 * + col0 + + col0 * col2 AS col1 FROM tab0 AS cor0
----
14596
1584
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-5780
SELECT tab2.col0 DIV - col1 FROM tab2
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-5780
SELECT tab2.col0 / - col1 FROM tab2
----
-1
-4
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5781
SELECT tab0.col2 * - tab0.col1 + - CAST( - col1 AS SIGNED ) FROM tab0
----
-2752
-7371
0

skipif mysql # not compatible
query I rowsort label-5781
SELECT tab0.col2 * - tab0.col1 + - CAST ( - col1 AS INTEGER ) FROM tab0
----
-2752
-7371
0

query I rowsort
SELECT tab2.col2 + col0 + ( col0 ) FROM tab2
----
182
196
41

query I rowsort
SELECT ( + col0 ) + cor0.col1 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-5784
SELECT ALL cor0.col1 DIV + 8 FROM tab2 AS cor0
----
2
3
7

skipif mysql # not compatible
query I rowsort label-5784
SELECT ALL cor0.col1 / + 8 FROM tab2 AS cor0
----
2
3
7

query I rowsort
SELECT ALL col2 + + 65 FROM tab1 AS cor0
----
119
122
161

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5786
SELECT DISTINCT - CAST( 87 AS SIGNED ) * + cor0.col0 FROM tab0 cor0
----
-2088
-3045
-7743

skipif mysql # not compatible
query I rowsort label-5786
SELECT DISTINCT - CAST ( 87 AS INTEGER ) * + cor0.col0 FROM tab0 cor0
----
-2088
-3045
-7743

onlyif mysql # use DIV operator for integer division
query I rowsort label-5787
SELECT ALL + - cor0.col2 + + cor0.col0 DIV col0 FROM tab0 AS cor0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-5787
SELECT ALL + - cor0.col2 + + cor0.col0 / col0 FROM tab0 AS cor0
----
-32
-81
0

query I rowsort
SELECT + 52 * + col2 FROM tab2 AS cor0
----
1352
1404
1976

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5789
SELECT + - CAST( NULL AS DECIMAL ) * + col2 * col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5789
SELECT + - CAST ( NULL AS REAL ) * + col2 * col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + 56 * - col1 FROM tab1 AS cor0
----
-1456
-560
-728

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5791
SELECT DISTINCT + col1 + - CAST( - col0 + - col0 AS SIGNED ) FROM tab0
----
134
167
269

skipif mysql # not compatible
query I rowsort label-5791
SELECT DISTINCT + col1 + - CAST ( - col0 + - col0 AS INTEGER ) FROM tab0
----
134
167
269

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5792
SELECT col2 * - CAST( NULL AS SIGNED ) AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5792
SELECT col2 * - CAST ( NULL AS INTEGER ) AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT - tab2.col1 * + ( - tab2.col2 ) FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT - col2 + + ( + tab1.col0 ) + + col0 FROM tab1
----
-48
64
71

query I rowsort
SELECT col2 * ( 88 * col0 ) - - 86 AS col1 FROM tab2
----
16718
178550
264262

query I rowsort
SELECT - 7 * + ( col1 * - 70 ) - ( col2 ) FROM tab0
----
42107
44508
47529

query I rowsort
SELECT + tab2.col2 * - 79 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to d70bd9f6e20da79f8c1d7747e8af98fd

query I rowsort
SELECT DISTINCT ( - col1 ) * + col0 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT ALL - - col2 + - ( - col0 ) FROM tab2 AS cor0
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-5800
SELECT + cor0.col0 DIV + cor0.col2 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-5800
SELECT + cor0.col0 / + cor0.col2 FROM tab0 AS cor0
----
0
1
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-5801
SELECT DISTINCT - + 97 DIV 82 FROM tab2 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-5801
SELECT DISTINCT - + 97 / 82 FROM tab2 AS cor0
----
-1

query I rowsort
SELECT + col2 * col2 * col2 FROM tab2 AS cor0
----
17576
19683
54872

query I rowsort
SELECT + 33 + - col0 * col0 * - 24 FROM tab0
----
13857
190137
29433

query I rowsort
SELECT + 57 + cor0.col2 FROM tab2, tab2 AS cor0
----
9 values hashing to d283bc33cff1745030d73c0b42486473

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5805
SELECT - CAST( NULL AS SIGNED ) FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-5805
SELECT - CAST ( NULL AS INTEGER ) FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT + col0 + col0 + + col2 FROM tab1 cor0
----
185
256
60

query I rowsort
SELECT + 45 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 14cec871edc37b5056cda01c8331fdca

query I rowsort
SELECT ALL - col1 * col0 * col0 FROM tab2
----
-106097
-1519
-358956

query I rowsort
SELECT + - col2 + + col0 AS col2 FROM tab1 AS cor0
----
-16
-51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-5810
SELECT - 19 DIV + col1 AS col2 FROM tab2 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-5810
SELECT - 19 / + col1 AS col2 FROM tab2 AS cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT - col1 + + col2 + + col0 FROM tab2 AS cor0
----
100
3
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-5812
SELECT ALL + col2 * - col2 DIV 1 + - col2 FROM tab2 AS cor0
----
-1482
-702
-756

skipif mysql # not compatible
query I rowsort label-5812
SELECT ALL + col2 * - col2 / 1 + - col2 FROM tab2 AS cor0
----
-1482
-702
-756

query I rowsort
SELECT ALL - + 29 * col1 * col2 FROM tab0 AS cor0
----
-216398
-2813
-82302

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab0 cor2, tab1 AS cor3
----
3645 values hashing to 5d64bf87effa587b137e9591cd2c54bf

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5815
SELECT + CAST( NULL AS SIGNED ) FROM tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab0 cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-5815
SELECT + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab0 cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT ALL - 0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT DISTINCT - + col1 * + 23 + col2 FROM tab1 cor0
----
-173
-203
-544

query I rowsort
SELECT ALL - cor0.col0 - ( 25 ) AS col2 FROM tab2 AS cor0
----
-103
-104
-32

onlyif mysql # use DIV operator for integer division
query I rowsort label-5819
SELECT + col2 * - col2 + - col1 DIV - col0 AS col1 FROM tab2 AS cor0
----
-1444
-676
-725

skipif mysql # not compatible
query I rowsort label-5819
SELECT + col2 * - col2 + - col1 / - col0 AS col1 FROM tab2 AS cor0
----
-1444
-676
-725

query I rowsort
SELECT ALL col2 * col2 - - col0 AS col0 FROM tab2 AS cor0
----
1523
736
754

onlyif mysql # use DIV operator for integer division
query I rowsort label-5821
SELECT - col0 + + cor0.col0 DIV + col2 FROM tab1 AS cor0
----
-3
-63
-80

skipif mysql # not compatible
query I rowsort label-5821
SELECT - col0 + + cor0.col0 / + col2 FROM tab1 AS cor0
----
-3
-63
-80

query I rowsort
SELECT ALL col1 - ( - ( col0 ) + - col2 ) FROM tab2 AS cor0
----
134
163
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-5823
SELECT DISTINCT - col0 DIV - ( + col2 * - col0 ) + col0 FROM tab1 cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-5823
SELECT DISTINCT - col0 / - ( + col2 * - col0 ) + col0 FROM tab1 cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * + 28 col2 FROM tab2 AS cor0
----
-1064
-728
-756

query I rowsort
SELECT ALL + col2 + col2 * + col2 FROM tab2 AS cor0
----
1482
702
756

query I rowsort
SELECT DISTINCT + col0 + - 13 FROM tab0 AS cor0
----
11
22
76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5827
SELECT - col2 * CAST( - 62 AS SIGNED ) + + col2 AS col0 FROM tab1 AS cor0
----
3402
3591
6048

skipif mysql # not compatible
query I rowsort label-5827
SELECT - col2 * CAST ( - 62 AS INTEGER ) + + col2 AS col0 FROM tab1 AS cor0
----
3402
3591
6048

query I rowsort
SELECT DISTINCT col0 * col2 + + ( cor0.col1 ) FROM tab0 AS cor0
----
132
7389
878

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5829
SELECT DISTINCT - - CAST( NULL AS SIGNED ) * 40 - - col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5829
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) * 40 - - col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - col0 + col0 AS col0 FROM tab1 cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5831
SELECT + cor0.col1 + - col0 DIV col1 FROM tab1 AS cor0
----
26
4
7

skipif mysql # not compatible
query I rowsort label-5831
SELECT + cor0.col1 + - col0 / col1 FROM tab1 AS cor0
----
26
4
7

query I rowsort
SELECT + col1 + 44 FROM tab1 AS cor0
----
54
57
70

query I rowsort
SELECT ALL + + col2 + + 54 FROM tab1 AS cor0
----
108
111
150

onlyif mysql # use DIV operator for integer division
query I rowsort label-5834
SELECT DISTINCT + col0 + col0 DIV + col0 col2 FROM tab0 AS cor0
----
25
36
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5834
SELECT DISTINCT + col0 + col0 / + col0 col2 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT + ( col2 ) + col1 AS col2 FROM tab0 cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-5836
SELECT ALL - col0 DIV + 65 + col2 FROM tab1 cor0
----
54
57
95

skipif mysql # not compatible
query I rowsort label-5836
SELECT ALL - col0 / + 65 + col2 FROM tab1 cor0
----
54
57
95

query I rowsort
SELECT + cor0.col0 * - col0 + + col1 AS col2 FROM tab1 AS cor0
----
-4086
-6387
17

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0, tab2 cor1, tab2 cor2
----
972 values hashing to f94a4a64ac54a61fc21f78e2b831ebee

query I rowsort
SELECT - col0 * ( 0 * col2 ) AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT col1 + col1 * col2 + col2 FROM tab2 AS cor0
----
1619
701
895

onlyif mysql # use DIV operator for integer division
query I rowsort label-5841
SELECT col0 DIV - 32 FROM tab2 AS cor0
----
-2
-2
0

skipif mysql # not compatible
query I rowsort label-5841
SELECT col0 / - 32 FROM tab2 AS cor0
----
-2
-2
0

query I rowsort
SELECT DISTINCT - col2 + ( col1 ) * col0 AS col0 FROM tab0 AS cor0
----
2031
3394
8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-5843
SELECT + - cor0.col2 DIV + ( + col0 ) + col0 FROM tab2 AS cor0
----
4
78
79

skipif mysql # not compatible
query I rowsort label-5843
SELECT + - cor0.col2 / + ( + col0 ) + col0 FROM tab2 AS cor0
----
4
78
79

query I rowsort
SELECT ( 8 ) * - tab2.col1 + + 78 FROM tab2, tab2 AS cor0
----
9 values hashing to 714109deac885de0d94fb7d85d392743

query I rowsort
SELECT ALL - ( + col0 ) * col0 AS col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT - 89 + col0 * + cor0.col2 * - 38 FROM tab1 AS cor0
----
-138713
-291929
-6245

query I rowsort
SELECT - 64 FROM tab1, tab1 AS cor0
----
9 values hashing to 601ec439a72fb4786a9cb7a6547ace5e

query I rowsort
SELECT + col1 * + col1 + col1 FROM tab1
----
110
182
702

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * col0 col1 FROM tab1
----
-4096
-6400
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col0 + + col0 col1 FROM tab0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-5851
SELECT col0 DIV col1 + + 22 FROM tab2 AS cor0
----
22
23
26

skipif mysql # not compatible
query I rowsort label-5851
SELECT col0 / col1 + + 22 FROM tab2 AS cor0
----
22
23
26

query I rowsort
SELECT - + col2 * + cor0.col1 * col2 + 25 AS col2 FROM tab2 cor0
----
-22574
-24523
-39859

query I rowsort
SELECT ALL col2 * col0 + - tab2.col2 AS col2 FROM tab2
----
162
2002
2964

query I rowsort
SELECT - col0 * + col2 * tab0.col1 + - col2 FROM tab0
----
-3396
-664200
-68145

query I rowsort
SELECT DISTINCT col0 * col0 + + tab2.col2 AS col0 FROM tab2
----
6110
6279
76

query I rowsort
SELECT DISTINCT + col0 + + tab1.col1 * col2 AS col0 FROM tab1
----
1328
1407
634

query I rowsort
SELECT col0 * + col0 + col1 * - col2 AS col0 FROM tab1
----
-1395
3526
5152

query I rowsort
SELECT cor1.col0 FROM tab0, tab1 AS cor0, tab0 cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT + tab2.col0 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT DISTINCT col2 + + tab2.col2 FROM tab2
----
52
54
76

query I rowsort
SELECT ALL 35 * - tab0.col2 AS col2 FROM tab0
----
-1155
-2870
-35

onlyif mysql # use DIV operator for integer division
query I rowsort label-5862
SELECT ALL 42 * col2 DIV + col0 AS col0 FROM tab0
----
1
38
57

skipif mysql # not compatible
query I rowsort label-5862
SELECT ALL 42 * col2 / + col0 AS col0 FROM tab0
----
1
38
57

query I rowsort
SELECT + - ( col0 ) * 15 + + 30 + col1 FROM tab0 AS cor0
----
-1214
-244
-398

query I rowsort
SELECT tab2.col0 + - col0 * ( col1 ) * - col0 FROM tab2
----
106176
1526
359034

query I rowsort
SELECT - col0 * col2 * - tab0.col2 + + 28 + col2 AS col1 FROM tab0
----
26197
598546
64

query I rowsort
SELECT ( + col0 * ( col0 ) ) + + col2 FROM tab1
----
4153
63
6496

query I rowsort
SELECT DISTINCT - col2 + - col0 * + col2 + col1 FROM tab1 AS cor0
----
-190
-3695
-7763

query I rowsort
SELECT + + cor0.col2 + ( + cor0.col1 ) * col0 AS col1 FROM tab0 AS cor0
----
2097
3396
8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-5869
SELECT + col2 * cor0.col2 - ( col1 ) DIV col2 AS col1 FROM tab1 AS cor0
----
2916
3249
9216

skipif mysql # not compatible
query I rowsort label-5869
SELECT + col2 * cor0.col2 - ( col1 ) / col2 AS col1 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ALL col1 + + ( col2 + tab2.col2 ) * 68 FROM tab2
----
3595
3703
5185

query I rowsort
SELECT + tab0.col1 * 0 AS col0 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5872
SELECT + col2 * - ( col2 ) + - cor0.col0 + ( 84 ) DIV col2 FROM tab1 AS cor0
----
-2918
-3312
-9296

skipif mysql # not compatible
query I rowsort label-5872
SELECT + col2 * - ( col2 ) + - cor0.col0 + ( 84 ) / col2 FROM tab1 AS cor0
----
-2918
-3312
-9296

query I rowsort
SELECT ALL - col0 + col0 * + col0 AS col0 FROM tab2 AS cor0
----
42
6006
6162

query I rowsort
SELECT ALL col1 + col1 + col0 FROM tab1 cor0
----
106
55
84

query I rowsort
SELECT + col0 * - 25 AS col1 FROM tab2 AS cor0
----
-175
-1950
-1975

query I rowsort
SELECT DISTINCT + col1 * + ( - col0 ) FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - 25 * - tab2.col1 FROM tab2
----
1475
425
775

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5878
SELECT - CAST( ( col0 ) AS SIGNED ) FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-5878
SELECT - CAST ( ( col0 ) AS INTEGER ) FROM tab2 AS cor0
----
-7
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-5879
SELECT DISTINCT + ( - col0 ) - col2 DIV col2 FROM tab0 AS cor0
----
-25
-36
-90

skipif mysql # not compatible
query I rowsort label-5879
SELECT DISTINCT + ( - col0 ) - col2 / col2 FROM tab0 AS cor0
----
-25
-36
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * cor0.col0 col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ( col0 ) * - cor0.col2 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL 23 - col2 FROM tab0 AS cor0
----
-10
-59
22

query I rowsort
SELECT - + col2 + col1 * ( 18 ) * col0 FROM tab1 AS cor0
----
11463
1350
18624

query I rowsort
SELECT col0 * - cor0.col1 + col0 * + col2 FROM tab0 AS cor0
----
-1272
-3360
-801

query I rowsort
SELECT ALL ( + col2 ) + col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT DISTINCT cor0.col1 * + col1 + col0 AS col0 FROM tab1 cor0
----
164
249
679

query I rowsort
SELECT DISTINCT - cor0.col2 * + col0 + ( + cor0.col1 ) FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT ( - col2 ) + - col0 * cor0.col1 AS col0 FROM tab1 AS cor0
----
-1136
-132
-697

query I rowsort
SELECT col1 + col0 * + 49 * col0 AS col0 FROM tab1 AS cor0
----
200714
313613
467

query I rowsort
SELECT - - 47 FROM tab0 cor0
----
47
47
47

query I rowsort
SELECT DISTINCT + 5 - - col1 AS col2 FROM tab1 cor0
----
15
18
31

query I rowsort
SELECT + col2 * + col1 + - cor0.col2 AS col1 FROM tab0 AS cor0
----
2805
7380
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 6 * - col1 col1 FROM tab1 AS cor0
----
156
60
78

query I rowsort
SELECT DISTINCT col2 + col1 * + col1 + - 58 * + col0 FROM tab2 AS cor0
----
-1017
-4255
582

query I rowsort
SELECT 56 * col2 - - 28 * - col2 AS col0 FROM tab0 cor0
----
2296
28
924

query I rowsort
SELECT ALL + 10 AS col0 FROM tab2
----
10
10
10

onlyif mysql # use DIV operator for integer division
query I rowsort label-5897
SELECT ALL - + col2 DIV - col0 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-5897
SELECT ALL - + col2 / - col0 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT - col2 * + col2 - col2 FROM tab1 AS cor0
----
-2970
-3306
-9312

query I rowsort
SELECT ALL + cor0.col0 * col0 + - ( + col1 ) FROM tab0 AS cor0
----
1128
490
7830

query I rowsort
SELECT DISTINCT cor0.col1 * col0 + 62 AS col0 FROM tab0 AS cor0
----
2126
3457
8161

onlyif mysql # use DIV operator for integer division
query I rowsort label-5901
SELECT - col1 DIV tab1.col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5901
SELECT - col1 / tab1.col2 FROM tab1
----
0
0
0

query I rowsort
SELECT 23 * 55 FROM tab1 AS cor0 CROSS JOIN tab0, tab0 AS cor1
----
27 values hashing to 07a683e8a72083359bd4d3983da31fab

query I rowsort
SELECT col0 + 52 * - 9 AS col1 FROM tab1
----
-388
-404
-465

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5904
SELECT DISTINCT - col0 * CAST( - col0 * col2 AS SIGNED ) FROM tab0 AS cor0
----
1225
19008
649522

skipif mysql # not compatible
query I rowsort label-5904
SELECT DISTINCT - col0 * CAST ( - col0 * col2 AS INTEGER ) FROM tab0 AS cor0
----
1225
19008
649522

onlyif mysql # use DIV operator for integer division
query I rowsort label-5905
SELECT ALL + - col1 DIV 33 AS col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5905
SELECT ALL + - col1 / 33 AS col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5906
SELECT - col2 + + CAST( NULL AS DECIMAL ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5906
SELECT - col2 + + CAST ( NULL AS REAL ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col0 * 80 FROM tab1 AS cor0
----
-240
-5120
-6400

query I rowsort
SELECT DISTINCT + ( + cor0.col0 ) FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT 62 + col2 FROM tab2 AS cor0
----
100
88
89

query I rowsort
SELECT DISTINCT + col0 + col1 + - cor0.col2 AS col2 FROM tab0 cor0
----
131
77
98

query I rowsort
SELECT DISTINCT + 19 + 61 AS col2 FROM tab2 AS cor0
----
80

query I rowsort
SELECT - 72 + + cor0.col1 FROM tab2, tab2 AS cor0, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to 63c809029b6d3523c3400f0c9df9ab69

query I rowsort
SELECT ALL ( 59 + col1 ) AS col0 FROM tab2
----
118
76
90

query I rowsort
SELECT + + col2 * + ( - col0 ) AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + col1 * 2 + col2 * - 26 FROM tab2 AS cor0
----
-558
-640
-954

query I rowsort
SELECT DISTINCT + 59 AS col2 FROM tab1, tab2 AS cor0
----
59

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( col1 AS REAL ) + - cor0.col2 FROM tab2 AS cor0
----
-55
-58
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-5918
SELECT + cor0.col0 + col1 DIV - ( col1 + col0 ) AS col0 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-5918
SELECT + cor0.col0 + col1 / - ( col1 + col0 ) AS col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT - + 65 + + col2 AS col2 FROM tab0 AS cor0
----
-32
-64
17

query I rowsort
SELECT ALL + - 78 * - col0 + - 45 * col0 AS col1 FROM tab1 AS cor0
----
2112
2640
99

query I rowsort
SELECT col0 + col1 * 11 AS col2 FROM tab0 AS cor0
----
1090
1102
970

query I rowsort
SELECT ALL 54 * + cor0.col1 AS col1 FROM tab1 AS cor0
----
1404
540
702

query I rowsort
SELECT DISTINCT - cor0.col2 * - col1 FROM tab2 cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + ( - col0 ) * col1 col2 FROM tab1 AS cor0
----
-576
-75
-960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5925
SELECT - col0 * CAST( + col1 AS SIGNED ) + col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

skipif mysql # not compatible
query I rowsort label-5925
SELECT - col0 * CAST ( + col1 AS INTEGER ) + col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT - col1 + + 66 FROM tab2 AS cor0
----
35
49
7

query I rowsort
SELECT DISTINCT + cor0.col1 - + col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT + col2 * - 76 AS col1 FROM tab2 AS cor0
----
-1976
-2052
-2888

onlyif mysql # use DIV operator for integer division
query I rowsort label-5929
SELECT ALL + - col0 DIV col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5929
SELECT ALL + - col0 / col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - cor0.col1 + - ( + col2 * cor0.col1 + - cor0.col1 ) FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT - 72 + + col2 AS col0 FROM tab0
----
-39
-71
10

query I rowsort
SELECT DISTINCT col2 + + tab0.col1 AS col1 FROM tab0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-5933
SELECT DISTINCT + col0 DIV col0 + + ( col0 + - col1 ) AS col1 FROM tab0
----
-1
-61

skipif mysql # not compatible
query I rowsort label-5933
SELECT DISTINCT + col0 / col0 + + ( col0 + - col1 ) AS col1 FROM tab0
----
-1
-61

query I rowsort
SELECT DISTINCT - + cor0.col1 * - col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT + col1 * 66 AS col2 FROM tab2 AS cor0
----
1122
2046
3894

query I rowsort
SELECT + - col1 * + 80 AS col0 FROM tab1 AS cor0
----
-1040
-2080
-800

query I rowsort
SELECT + col2 * - 66 AS col2 FROM tab0 AS cor0
----
-2178
-5412
-66

query I rowsort
SELECT ALL tab1.col1 + + col2 AS col1 FROM tab1
----
109
67
80

query I rowsort
SELECT col2 * col1 * 35 + - col1 * col0 * col2 AS col0 FROM tab1 AS cor0
----
-16530
-56160
44928

query I rowsort
SELECT + 16 * ( col2 ) AS col2 FROM tab1 AS cor0
----
1536
864
912

query I rowsort
SELECT col1 * + 78 AS col2 FROM tab1
----
1014
2028
780

query I rowsort
SELECT + 62 AS col1 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 4911b1417a3797d23dd8f38b6ed05c1b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5943
SELECT DISTINCT + tab2.col2 * CAST( col0 AS SIGNED ) col0 FROM tab2
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5943
SELECT DISTINCT + tab2.col2 * CAST ( col0 AS INTEGER ) col0 FROM tab2
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-5944
SELECT DISTINCT + col2 DIV - 33 AS col2 FROM tab1
----
-1
-2

skipif mysql # not compatible
query I rowsort label-5944
SELECT DISTINCT + col2 / - 33 AS col2 FROM tab1
----
-1
-2

query I rowsort
SELECT ALL - ( + col2 ) * col0 + + col0 FROM tab0
----
-7209
-768
0

query I rowsort
SELECT - col1 * cor0.col0 + + col1 AS col2 FROM tab1 cor0
----
-1027
-52
-630

query I rowsort
SELECT DISTINCT ( - col1 * + col0 + - 15 ) AS col1 FROM tab2
----
-1358
-232
-4617

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col2 * col2 col0 FROM tab0
----
1
35937
551368

query I rowsort
SELECT 43 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 199105619049271147956de52e7f5ed4

onlyif mysql # use DIV operator for integer division
query I rowsort label-5950
SELECT col0 DIV 71 col0 FROM tab0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5950
SELECT col0 / 71 col0 FROM tab0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col2 + - col1 col0 FROM tab2
----
-33
-4
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - tab1.col0 col1 FROM tab1, tab0 AS cor0, tab2, tab2 AS cor1
----
81 values hashing to 08e380e50b0cb64601bc84e5254deef4

query I rowsort
SELECT DISTINCT - 73 AS col1 FROM tab1
----
-73

query I rowsort
SELECT - - col0 - + col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT - cor0.col2 * - cor0.col1 - col2 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT - + 98 * col1 + cor0.col1 * + col2 FROM tab1 AS cor0
----
-1144
-26
-410

query I rowsort
SELECT ALL 21 + - col0 AS col2 FROM tab1 AS cor0
----
-43
-59
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-5958
SELECT DISTINCT - + 24 DIV cor0.col2 + col2 * col2 AS col1 FROM tab0 AS cor0
----
-23
1089
6724

skipif mysql # not compatible
query I rowsort label-5958
SELECT DISTINCT - + 24 / cor0.col2 + col2 * col2 AS col1 FROM tab0 AS cor0
----
-23
1089
6724

query I rowsort
SELECT DISTINCT col0 + - ( col0 ) * col0 FROM tab0
----
-1190
-552
-7832

query I rowsort
SELECT ( + col2 ) + + col2 * tab1.col2 * + col2 FROM tab1
----
157518
185250
884832

query I rowsort
SELECT col0 + - col2 - + col2 AS col2 FROM tab2
----
-47
26
3

query I rowsort
SELECT - col1 * col1 + - col0 AS col1 FROM tab1
----
-164
-249
-679

query I rowsort
SELECT DISTINCT + col2 + + col2 AS col0 FROM tab0
----
164
2
66

query I rowsort
SELECT 57 - col2 * col0 FROM tab0
----
-7241
-735
22

query I rowsort
SELECT - col2 * 64 + + col0 AS col0 FROM tab2 AS cor0
----
-1586
-1721
-2353

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5966
SELECT DISTINCT - CAST( - 99 AS SIGNED ) + - col1 * col0 AS col0 FROM tab1
----
-541
-941
21

skipif mysql # not compatible
query I rowsort label-5966
SELECT DISTINCT - CAST ( - 99 AS INTEGER ) + - col1 * col0 AS col0 FROM tab1
----
-541
-941
21

query I rowsort
SELECT + + ( + col1 ) AS col2 FROM tab1 AS cor0
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5968
SELECT + col0 / col0 + - CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5968
SELECT + col0 / col0 + - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col2 + col0 * 73 AS col0 FROM tab1 AS cor0
----
273
4729
5936

query I rowsort
SELECT ALL + + 16 FROM tab2 AS cor0
----
16
16
16

query I rowsort
SELECT DISTINCT + col1 * cor0.col1 + col2 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT DISTINCT col1 + col2 * + col1 AS col0 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT - - 19 * col2 + 51 AS col1 FROM tab0 AS cor0
----
1609
678
70

query I rowsort
SELECT DISTINCT + + col0 - col2 AS col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT - + col1 + col1 * - ( cor0.col0 ) FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT ALL + col0 * + col0 - + col1 FROM tab1 AS cor0
----
-17
4086
6387

query I rowsort
SELECT ALL + - col2 * col2 * 92 AS col1 FROM tab0 AS cor0
----
-100188
-618608
-92

query I rowsort
SELECT ALL - + cor0.col1 + + col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT - - col0 * - col2 + col0 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT - col0 - + 71 * 72 AS col2 FROM tab2 AS cor0
----
-5119
-5190
-5191

query I rowsort
SELECT col0 * 40 AS col0 FROM tab1 AS cor0
----
120
2560
3200

query I rowsort
SELECT + col1 + 9 FROM tab0 AS cor0
----
100
106
95

query I rowsort
SELECT + - col2 + - col0 AS col0 FROM tab1 cor0
----
-121
-176
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5984
SELECT DISTINCT col1 + CAST( NULL AS SIGNED ) + 92 * col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5984
SELECT DISTINCT col1 + CAST ( NULL AS INTEGER ) + 92 * col1 FROM tab0 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5985
SELECT CAST( NULL AS SIGNED ) * + col2 + col1 * - 70 * - col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5985
SELECT CAST ( NULL AS INTEGER ) * + col2 + col1 * - 70 * - col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col0 * + 47 + col1 * - col1 AS col1 FROM tab0 AS cor0
----
-11054
-12464
-8524

query I rowsort
SELECT - cor0.col0 * + 72 FROM tab1, tab1 AS cor0
----
9 values hashing to a7850e5ba276288fbd70c3d21a222b10

query I rowsort
SELECT - tab2.col2 + 72 FROM tab2
----
34
45
46

onlyif mysql # use DIV operator for integer division
query I rowsort label-5989
SELECT DISTINCT - + 2 DIV col1 AS col1 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5989
SELECT DISTINCT - + 2 / col1 AS col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL + + 90 FROM tab1 AS cor0
----
90
90
90

query I rowsort
SELECT ( + col2 ) + - cor0.col1 - col1 AS col0 FROM tab0 AS cor0
----
-100
-139
-193

query I rowsort
SELECT DISTINCT + col1 + + col2 * col2 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT ALL + 67 AS col2 FROM tab0 AS cor0
----
67
67
67

query I rowsort
SELECT cor0.col1 + + col2 + - col2 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT DISTINCT + - ( + 99 ) * cor0.col1 AS col1 FROM tab1 AS cor0
----
-1287
-2574
-990

onlyif mysql # use DIV operator for integer division
query I rowsort label-5996
SELECT + CAST( cor0.col2 AS SIGNED ) + + col1 DIV + col2 FROM tab0 AS cor0
----
35
83
98

skipif mysql # not compatible
query I rowsort label-5996
SELECT + CAST ( cor0.col2 AS INTEGER ) + + col1 / + col2 FROM tab0 AS cor0
----
35
83
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-5997
SELECT - 55 DIV + cor0.col2 + col2 - cor0.col0 FROM tab0 AS cor0
----
-7
-89
8

skipif mysql # not compatible
query I rowsort label-5997
SELECT - 55 / + cor0.col2 + col2 - cor0.col0 FROM tab0 AS cor0
----
-7
-89
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-5998
SELECT ALL + - cor0.col2 DIV + col1 FROM tab2 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-5998
SELECT ALL + - cor0.col2 / + col1 FROM tab2 AS cor0
----
-2
0
0

query I rowsort
SELECT - - 18 AS col2 FROM tab2 AS cor0
----
18
18
18

query I rowsort
SELECT DISTINCT 89 AS col0 FROM tab1 cor0
----
89

query I rowsort
SELECT + - 20 * - col2 + + cor0.col2 * 36 AS col2 FROM tab0 AS cor0
----
1848
4592
56

query I rowsort
SELECT - + 42 + - col0 * + cor0.col0 - ( - col1 * + col0 + + col2 ) FROM tab1 AS cor0
----
-27
-3555
-5498

query I rowsort
SELECT 55 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 1626bd3008abd9f18cc88cdecf7b64d0

query I rowsort
SELECT DISTINCT - 50 * - 29 FROM tab2 AS cor0
----
1450

onlyif mysql # use DIV operator for integer division
query I rowsort label-6005
SELECT ALL 38 * col0 DIV col0 AS col1 FROM tab0 AS cor0
----
38
38
38

skipif mysql # not compatible
query I rowsort label-6005
SELECT ALL 38 * col0 / col0 AS col1 FROM tab0 AS cor0
----
38
38
38

query I rowsort
SELECT + 36 * 47 FROM tab1 cor0
----
1692
1692
1692

query I rowsort
SELECT DISTINCT + - col1 + col0 * - cor0.col1 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT ALL - + col2 * + col0 + col1 AS col0 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT - col1 * - col1 * + col2 AS col0 FROM tab0 AS cor0
----
244068
679042
9409

query I rowsort
SELECT + col1 * + col2 + - col2 - col1 AS col2 FROM tab1
----
1139
1324
503

query I rowsort
SELECT DISTINCT col0 * col2 + - cor0.col2 FROM tab1 cor0
----
108
3591
7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-6012
SELECT + col1 + col1 DIV cor0.col0 AS col2 FROM tab1 AS cor0
----
10
13
34

skipif mysql # not compatible
query I rowsort label-6012
SELECT + col1 + col1 / cor0.col0 AS col2 FROM tab1 AS cor0
----
10
13
34

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 cor0 CROSS JOIN tab0, tab0 AS cor1, tab1 AS cor2
----
3645 values hashing to ea1a922b7fccb9d184b31eb4689e063b

query I rowsort
SELECT DISTINCT + - 16 - + ( - col2 ) * 83 FROM tab0 AS cor0
----
2723
67
6790

query I rowsort
SELECT DISTINCT - + col1 * - 56 FROM tab1 AS cor0
----
1456
560
728

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - ( - 74 ) * col2 - + cor0.col1 col2 FROM tab1 AS cor0
----
-4022
-4228
-7117

query I rowsort
SELECT DISTINCT + 66 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
66

query I rowsort
SELECT col0 + 58 * col1 * col1 FROM tab0 AS cor0
----
428992
480387
545757

query I rowsort
SELECT DISTINCT - + col2 + ( col1 ) * col2 AS col0 FROM tab0 cor0
----
2805
7380
96

query I rowsort
SELECT ALL - + cor0.col2 * + col1 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6021
SELECT + col0 * CAST( col0 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
49
6084
6241

skipif mysql # not compatible
query I rowsort label-6021
SELECT + col0 * CAST ( col0 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
49
6084
6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-6022
SELECT col1 DIV col1 + + 9 AS col1 FROM tab2
----
10
10
10

skipif mysql # not compatible
query I rowsort label-6022
SELECT col1 / col1 + + 9 AS col1 FROM tab2
----
10
10
10

onlyif mysql # use DIV operator for integer division
query I rowsort label-6023
SELECT ALL tab1.col2 DIV - col1 AS col1 FROM tab1
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-6023
SELECT ALL tab1.col2 / - col1 AS col1 FROM tab1
----
-2
-5
-7

query I rowsort
SELECT - col0 * col0 - col1 * col0 AS col0 FROM tab2
----
-10686
-266
-7584

query I rowsort
SELECT DISTINCT col0 + - col0 * cor0.col1 AS col1 FROM tab1 AS cor0
----
-576
-75
-960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6026
SELECT + CAST( 36 AS SIGNED ) * cor0.col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 92bfadad54c69d48f6b95ecc2e86f4fe

skipif mysql # not compatible
query I rowsort label-6026
SELECT + CAST ( 36 AS INTEGER ) * cor0.col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 92bfadad54c69d48f6b95ecc2e86f4fe

query I rowsort
SELECT 22 AS col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 7dda382e7c08428abac8600fd696eb3e

query I rowsort
SELECT + col1 * + 34 AS col1 FROM tab2 AS cor0
----
1054
2006
578

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 * col2 col1 FROM tab0 cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-6030
SELECT - col0 DIV ( - cor0.col2 ) AS col1 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6030
SELECT - col0 / ( - cor0.col2 ) AS col1 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT - - ( col1 ) * col0 + col1 + col1 AS col2 FROM tab2 cor0
----
1377
279
4720

query I rowsort
SELECT + 30 + - col1 + col2 * col1 AS col0 FROM tab0 AS cor0
----
2782
30
7401

onlyif mysql # use DIV operator for integer division
query I rowsort label-6033
SELECT 86 DIV col0 FROM tab0 AS cor0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-6033
SELECT 86 / col0 FROM tab0 AS cor0
----
0
2
3

query I rowsort
SELECT - 96 + + col0 * 62 + - col2 AS col2 FROM tab2 AS cor0
----
311
4714
4764

query I rowsort
SELECT 45 + col2 FROM tab1
----
102
141
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-6036
SELECT ALL col2 DIV + tab0.col2 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6036
SELECT ALL col2 / + tab0.col2 FROM tab0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-6037
SELECT ALL col1 * tab1.col0 DIV + col1 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-6037
SELECT ALL col1 * tab1.col0 / + col1 FROM tab1
----
3
64
80

query I rowsort
SELECT ALL + col2 * - col2 + - ( 43 ) AS col1 FROM tab0 AS cor0
----
-1132
-44
-6767

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6039
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab0, tab0 AS cor0, tab1 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-6039
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab0, tab0 AS cor0, tab1 AS cor1
----
NULL

query I rowsort
SELECT ALL - 10 * col0 FROM tab0 AS cor0
----
-240
-350
-890

query I rowsort
SELECT ALL + - 42 + + cor0.col0 * - col2 FROM tab2 cor0
----
-2070
-231
-3044

query I rowsort
SELECT ALL - col2 + cor0.col0 * 30 FROM tab0 AS cor0
----
1049
2588
687

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6043
SELECT ALL - 4 * col1 + CAST( col1 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
-177
-51
-93

skipif mysql # not compatible
query I rowsort label-6043
SELECT ALL - 4 * col1 + CAST ( col1 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-177
-51
-93

query I rowsort
SELECT DISTINCT col2 + + tab2.col1 AS col0 FROM tab2
----
55
58
85

query I rowsort
SELECT DISTINCT + tab0.col2 + col1 AS col2 FROM tab0
----
119
173
98

query I rowsort
SELECT col2 + + col2 * + tab1.col1 + col2 FROM tab1
----
1440
1512
684

query I rowsort
SELECT + col2 * col0 + + col0 FROM tab2
----
196
2106
3081

onlyif mysql # use DIV operator for integer division
query I rowsort label-6048
SELECT col2 DIV - 12 FROM tab0
----
-2
-6
0

skipif mysql # not compatible
query I rowsort label-6048
SELECT col2 / - 12 FROM tab0
----
-2
-6
0

query I rowsort
SELECT DISTINCT - col1 + col2 * - col2 AS col1 FROM tab1
----
-2942
-3259
-9229

onlyif mysql # use DIV operator for integer division
query I rowsort label-6050
SELECT ALL + col0 DIV col1 + - col2 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-6050
SELECT ALL + col0 / col1 + - col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT - cor0.col0 * 67 AS col0 FROM tab1 cor0
----
-201
-4288
-5360

query I rowsort
SELECT DISTINCT - + cor0.col2 * + col1 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-6053
SELECT ALL + - col1 DIV + col0 AS col2 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-6053
SELECT ALL + - col1 / + col0 AS col2 FROM tab2 AS cor0
----
-4
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6054
SELECT DISTINCT - col0 + + 99 DIV col0 FROM tab0
----
-20
-33
-88

skipif mysql # not compatible
query I rowsort label-6054
SELECT DISTINCT - col0 + + 99 / col0 FROM tab0
----
-20
-33
-88

query I rowsort
SELECT ALL col2 + col0 * + 78 FROM tab1
----
288
5049
6336

query I rowsort
SELECT col1 * col1 + ( - col2 ) FROM tab2
----
251
3455
934

query I rowsort
SELECT - col1 + - col1 + 27 * col1 FROM tab1
----
250
325
650

query I rowsort
SELECT + + col2 + ( col0 ) FROM tab0 AS cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-6059
SELECT - col2 DIV col0 + col1 * ( - col2 ) * + col0 AS col1 FROM tab1 AS cor0
----
-36480
-4230
-99841

skipif mysql # not compatible
query I rowsort label-6059
SELECT - col2 / col0 + col1 * ( - col2 ) * + col0 AS col1 FROM tab1 AS cor0
----
-36480
-4230
-99841

query I rowsort
SELECT ALL col2 + 94 * cor0.col1 + - 41 * - col0 FROM tab0 AS cor0
----
10554
12285
9101

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6061
SELECT ( + ( + cor0.col1 ) ) * CAST( NULL AS DECIMAL ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6061
SELECT ( + ( + cor0.col1 ) ) * CAST ( NULL AS REAL ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 14 + - col2 FROM tab1 cor0
----
-40
-43
-82

query I rowsort
SELECT ALL + - col2 - + 57 * col1 FROM tab2 AS cor0
----
-1007
-1794
-3389

query I rowsort
SELECT + + col0 * col0 + col1 * col1 AS col0 FROM tab1 AS cor0
----
4196
6569
685

onlyif mysql # use DIV operator for integer division
query I rowsort label-6065
SELECT DISTINCT + - col2 + - col1 DIV + col0 + - cor0.col1 AS col1 FROM tab2 AS cor0
----
-55
-62
-85

skipif mysql # not compatible
query I rowsort label-6065
SELECT DISTINCT + - col2 + - col1 / + col0 + - cor0.col1 AS col1 FROM tab2 AS cor0
----
-55
-62
-85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6066
SELECT DISTINCT CAST( NULL AS DECIMAL ) * - col1 AS col2 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-6066
SELECT DISTINCT CAST ( NULL AS REAL ) * - col1 AS col2 FROM tab0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 72 + 29 * + col0 * - 5 col2 FROM tab1 AS cor0
----
-11528
-363
-9208

query I rowsort
SELECT ALL - - col2 * - col0 * col0 AS col1 FROM tab2 AS cor0
----
-1323
-158184
-237158

onlyif mysql # use DIV operator for integer division
query I rowsort label-6069
SELECT + col2 + - 89 DIV col1 AS col2 FROM tab2 cor0
----
25
25
33

skipif mysql # not compatible
query I rowsort label-6069
SELECT + col2 + - 89 / col1 AS col2 FROM tab2 cor0
----
25
25
33

query I rowsort
SELECT + + 11 * 19 + + col0 FROM tab2 AS cor0
----
216
287
288

query I rowsort
SELECT DISTINCT - ( 93 ) + - col0 FROM tab0 AS cor0
----
-117
-128
-182

query I rowsort
SELECT DISTINCT + col1 + 53 AS col2 FROM tab2 AS cor0
----
112
70
84

query I rowsort
SELECT - ( - col2 ) * col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + ( col0 ) - - col1 * - col0 AS col1 FROM tab0 AS cor0
----
-2040
-3360
-8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-6075
SELECT ALL col0 DIV + 5 - 64 * col0 FROM tab2
----
-447
-4977
-5041

skipif mysql # not compatible
query I rowsort label-6075
SELECT ALL col0 / + 5 - 64 * col0 FROM tab2
----
-447
-4977
-5041

query I rowsort
SELECT - ( - tab0.col1 ) AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT - 52 * - 23 AS col2 FROM tab0 AS cor0
----
1196
1196
1196

query I rowsort
SELECT ALL cor0.col2 * + ( col2 ) + 89 + - 95 * - col2 FROM tab2 AS cor0
----
3235
3383
5143

query I rowsort
SELECT ALL + - 84 + - col1 + col1 * + ( col0 ) FROM tab0 AS cor0
----
1894
3214
7924

query I rowsort
SELECT ALL + col2 * - 32 AS col2 FROM tab0
----
-1056
-2624
-32

query I rowsort
SELECT - + col2 + - col2 * cor0.col0 FROM tab0 AS cor0
----
-36
-7380
-825

query I rowsort
SELECT + - 7 * - col2 AS col2 FROM tab1 AS cor0
----
378
399
672

query I rowsort
SELECT - 8 + col0 AS col1 FROM tab1 cor0
----
-5
56
72

query I rowsort
SELECT + ( 63 ) AS col2 FROM tab0 AS cor0
----
63
63
63

query I rowsort
SELECT + 14 * cor0.col0 + col2 AS col1 FROM tab2 AS cor0
----
1118
1144
125

query I rowsort
SELECT - col0 * col0 + - col0 * + ( - col2 ) * cor0.col2 FROM tab1 AS cor0
----
203840
730880
8739

query I rowsort
SELECT 56 * col1 FROM tab2 AS cor0
----
1736
3304
952

query I rowsort
SELECT - - ( + col1 ) + + col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT - col0 + + col1 * - col0 + - tab1.col2 FROM tab1
----
-1216
-135
-761

query I rowsort
SELECT - tab0.col0 * + 5 * + 51 AS col1 FROM tab0, tab2 cor0, tab0 AS cor1
----
27 values hashing to 903b9a54a99701128d1ec3ddf5867776

query I rowsort
SELECT DISTINCT 32 FROM tab0, tab2 AS cor0
----
32

query I rowsort
SELECT - ( col1 ) + - cor0.col0 AS col2 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT ALL - col1 * - 73 AS col0 FROM tab0 AS cor0
----
6278
6643
7081

query I rowsort
SELECT col2 * - ( + col1 ) FROM tab0 AS cor0
----
-2838
-7462
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + col2 * - 88 col2 FROM tab1 AS cor0
----
-4749
-4952
-8368

query I rowsort
SELECT + cor0.col1 * + col2 AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL col2 + - col0 * + 21 FROM tab1 AS cor0
----
-1287
-1584
-9

query I rowsort
SELECT ALL + col2 * ( col0 ) AS col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT + + ( - cor0.col1 ) FROM tab1, tab2, tab0 cor0
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT DISTINCT + col1 * 43 AS col1 FROM tab2
----
1333
2537
731

query I rowsort
SELECT DISTINCT - col1 * 25 FROM tab0 AS cor0
----
-2150
-2275
-2425

query I rowsort
SELECT cor0.col0 + 26 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to add73cf7b931fe14311d41975a804266

onlyif mysql # use DIV operator for integer division
query I rowsort label-6103
SELECT DISTINCT col1 + cor0.col0 DIV - col1 AS col2 FROM tab2 AS cor0
----
13
31
58

skipif mysql # not compatible
query I rowsort label-6103
SELECT DISTINCT col1 + cor0.col0 / - col1 AS col2 FROM tab2 AS cor0
----
13
31
58

query I rowsort
SELECT DISTINCT - col2 - + tab0.col0 FROM tab0
----
-171
-36
-57

query I rowsort
SELECT + - 91 FROM tab2 cor0
----
-91
-91
-91

query I rowsort
SELECT ALL 67 AS col1 FROM tab0
----
67
67
67

query I rowsort
SELECT + - col0 * + 69 * col0 FROM tab2 AS cor0
----
-3381
-419796
-430629

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6108
SELECT + col2 - CAST( cor0.col1 AS SIGNED ) FROM tab0 AS cor0
----
-53
-9
-96

skipif mysql # not compatible
query I rowsort label-6108
SELECT + col2 - CAST ( cor0.col1 AS INTEGER ) FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL - + col0 * + 97 AS col1 FROM tab2 AS cor0
----
-679
-7566
-7663

query I rowsort
SELECT DISTINCT - - col1 * ( 58 ) * cor0.col0 + + 79 * 35 AS col1 FROM tab2 AS cor0
----
15351
269681
80659

query I rowsort
SELECT ALL + col1 * - cor0.col2 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT - col0 * + col0 + - ( col0 ) FROM tab2 AS cor0
----
-56
-6162
-6320

query I rowsort
SELECT - col1 * + 26 FROM tab2 cor0
----
-1534
-442
-806

query I rowsort
SELECT - col1 * + cor0.col0 - - col0 AS col0 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT + + cor0.col1 + + col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT + cor0.col2 + - ( col2 ) AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL 32 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to d30a2acbf33c88274474306936d3227b

query I rowsort
SELECT + col2 * + 38 FROM tab0 AS cor0
----
1254
3116
38

query I rowsort
SELECT - 90 * - 44 AS col0 FROM tab2 AS cor0
----
3960
3960
3960

query I rowsort
SELECT col2 + 43 * - cor0.col0 FROM tab1 AS cor0
----
-2695
-3344
-75

query I rowsort
SELECT - ( - col1 ) * col1 FROM tab0 AS cor0
----
7396
8281
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * ( - col1 + 95 * col0 ) col0 FROM tab1 AS cor0
----
388480
606960
777

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 + + col1 col0 FROM tab2 AS cor0
----
55
58
85

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0, tab2 cor1, tab2, tab0 AS cor2
----
3645 values hashing to 35998cdc87c8b13ea047f14c9f5dc8d6

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 cor0 CROSS JOIN tab2, tab1, tab1 AS cor1
----
3645 values hashing to 6156c969b7e054b8a333fdb86aee82f2

query I rowsort
SELECT ALL - 60 AS col1 FROM tab0 AS cor0
----
-60
-60
-60

query I rowsort
SELECT ALL 76 + + cor0.col2 AS col2 FROM tab2 cor0
----
102
103
114

query I rowsort
SELECT 8 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 33069adc3c1142d31511ec88fcfa40af

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 21 * cor0.col0 col1 FROM tab1 AS cor0
----
1344
1680
63

query I rowsort
SELECT ALL - 74 + + col1 AS col1 FROM tab1 AS cor0
----
-48
-61
-64

onlyif mysql # use DIV operator for integer division
query I rowsort label-6131
SELECT DISTINCT + col1 DIV + col0 AS col1 FROM tab2 AS cor0
----
0
4

skipif mysql # not compatible
query I rowsort label-6131
SELECT DISTINCT + col1 / + col0 AS col1 FROM tab2 AS cor0
----
0
4

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab1, tab1 AS cor0, tab0, tab2 AS cor1
----
54
57
96

query I rowsort
SELECT ALL 2 * cor0.col1 + 49 - col0 * - col2 AS col1 FROM tab1 cor0
----
263
3717
7755

query I rowsort
SELECT ALL + col1 * col2 + + cor0.col1 FROM tab0 AS cor0
----
194
2924
7553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 - + col1 col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT ( + col1 ) AS col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL - + 39 * col1 AS col2 FROM tab0 AS cor0
----
-3354
-3549
-3783

query I rowsort
SELECT ALL + - 48 + cor0.col2 * + 53 FROM tab0 cor0
----
1701
4298
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-6139
SELECT ALL - 79 + col0 DIV 96 FROM tab1 AS cor0
----
-79
-79
-79

skipif mysql # not compatible
query I rowsort label-6139
SELECT ALL - 79 + col0 / 96 FROM tab1 AS cor0
----
-79
-79
-79

query I rowsort
SELECT DISTINCT col1 + col0 * + col0 AS col0 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT ALL - - 47 FROM tab0, tab0 cor0, tab1 AS cor1, tab1, tab0 AS cor2
----
243 values hashing to 79962577c0add9c47b55da7472585e96

query I rowsort
SELECT DISTINCT + + 14 * col0 FROM tab1 AS cor0
----
1120
42
896

query I rowsort
SELECT + - ( - col1 ) * col0 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL + + 39 FROM tab0 AS cor0
----
39
39
39

query I rowsort
SELECT DISTINCT + col0 * 65 + col1 AS col1 FROM tab0 cor0
----
1646
2372
5876

query I rowsort
SELECT DISTINCT - - ( col0 ) AS col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT + - col0 * ( - col1 ) FROM tab0 AS cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col1 * col2 col0 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL col1 * + 62 * col0 FROM tab0 AS cor0
----
127968
210490
502138

onlyif mysql # use DIV operator for integer division
query I rowsort label-6150
SELECT - - cor0.col0 DIV - cor0.col0 + - col2 * 21 + col1 col2 FROM tab1 AS cor0
----
-1109
-1188
-2004

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6150
SELECT - - cor0.col0 / - cor0.col0 + - col2 * 21 + col1 col2 FROM tab1 AS cor0
----
-1109
-1188
-2004

query I rowsort
SELECT ALL - 38 * + col1 + + col1 AS col2 FROM tab2 AS cor0
----
-1147
-2183
-629

query I rowsort
SELECT col1 + 25 FROM tab0
----
111
116
122

query I rowsort
SELECT ALL col0 + - col1 * + col1 * + col2 AS col0 FROM tab2
----
-10903
-25940
-90428

query I rowsort
SELECT DISTINCT + + 12 AS col1 FROM tab2, tab1, tab1 AS cor0
----
12

query I rowsort
SELECT DISTINCT + col2 * - 0 AS col0 FROM tab2
----
0

query I rowsort
SELECT DISTINCT ( col1 ) + - col2 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT + col2 * - ( + col2 ) AS col0 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT 90 * 24 + - col0 * + col2 FROM tab0
----
-5138
1368
2125

onlyif mysql # use DIV operator for integer division
query I rowsort label-6159
SELECT + + col2 DIV - ( col2 ) + + col0 * 55 + col1 DIV - col2 AS col2 FROM tab0 AS cor0
----
1317
1827
4893

skipif mysql # not compatible
query I rowsort label-6159
SELECT + + col2 / - ( col2 ) + + col0 * 55 + col1 / - col2 AS col2 FROM tab0 AS cor0
----
1317
1827
4893

query I rowsort
SELECT 81 - col1 AS col2 FROM tab1
----
55
68
71

query I rowsort
SELECT DISTINCT col1 * col2 * - col2 FROM tab0
----
-611884
-93654
-97

query I rowsort
SELECT + 66 * tab2.col2 FROM tab2, tab0 cor0
----
9 values hashing to a51772a0f3f89a84175b3afd1cea6249

query I rowsort
SELECT DISTINCT + col0 * col1 - cor0.col2 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT cor0.col1 * + col2 + col1 AS col0 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT ALL col1 * + 1 + col1 AS col2 FROM tab1 AS cor0
----
20
26
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6166
SELECT CAST( 4 AS SIGNED ) + + col0 * + col2 AS col2 FROM tab2 AS cor0
----
193
2032
3006

skipif mysql # not compatible
query I rowsort label-6166
SELECT CAST ( 4 AS INTEGER ) + + col0 * + col2 AS col2 FROM tab2 AS cor0
----
193
2032
3006

query I rowsort
SELECT DISTINCT 68 + 90 * - col2 FROM tab0 AS cor0
----
-22
-2902
-7312

query I rowsort
SELECT ALL - - 48 * cor0.col0 + + col0 AS col2 FROM tab1 AS cor0
----
147
3136
3920

query I rowsort
SELECT ALL col2 + 47 FROM tab2 cor0
----
73
74
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6170
SELECT DISTINCT - 92 + + col0 - cor0.col0 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6170
SELECT DISTINCT - 92 + + col0 - cor0.col0 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6171
SELECT - - CAST( col1 AS SIGNED ) * cor0.col0 - 14 * - 54 col0 FROM tab1 cor0
----
1396
1796
834

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6171
SELECT - - CAST ( col1 AS INTEGER ) * cor0.col0 - 14 * - 54 col0 FROM tab1 cor0
----
1396
1796
834

query I rowsort
SELECT + + 14 * - col0 FROM tab2 AS cor0
----
-1092
-1106
-98

query I rowsort
SELECT - col0 * - col2 + + col1 * col2 - + ( - col0 + col2 ) FROM tab0 cor0
----
14767
166
3621

query I rowsort
SELECT col0 + col2 + + ( col1 ) AS col2 FROM tab1
----
131
189
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-6175
SELECT - + col2 DIV - 68 - col2 * col0 AS col0 FROM tab0 AS cor0
----
-35
-7297
-792

skipif mysql # not compatible
query I rowsort label-6175
SELECT - + col2 / - 68 - col2 * col0 AS col0 FROM tab0 AS cor0
----
-35
-7297
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 68 + 97 col0 FROM tab1 AS cor0
----
165
165
165

query I rowsort
SELECT - - col0 + - col1 AS col0 FROM tab1 cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT - cor1.col2 + 84 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
-12
27
30

query I rowsort
SELECT DISTINCT + 55 AS col2 FROM tab0, tab2 cor0
----
55

query I rowsort
SELECT DISTINCT col2 * + 86 FROM tab1 AS cor0
----
4644
4902
8256

query I rowsort
SELECT DISTINCT + cor0.col1 + + col0 * + col1 AS col2 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT - 56 AS col2 FROM tab1 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 3d3dab400eef93c098acbbba3fc9bdc6

query I rowsort
SELECT 98 * + cor0.col0 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 753de708ba8e1269d416f3cc04b85e0c

query I rowsort
SELECT + col2 - - col0 * 17 FROM tab1
----
105
1145
1456

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6185
SELECT ALL CAST( NULL AS SIGNED ) AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-6185
SELECT ALL CAST ( NULL AS INTEGER ) AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL + cor0.col0 * cor0.col0 + + 65 AS col0 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to abc08d619839f6d41c1a927495968c6b

query I rowsort
SELECT col0 * 72 FROM tab1
----
216
4608
5760

query I rowsort
SELECT + tab2.col0 * + ( tab2.col1 ) + col2 + col1 AS col2 FROM tab2
----
1398
275
4687

query I rowsort
SELECT DISTINCT + col2 + + 35 FROM tab2
----
61
62
73

query I rowsort
SELECT - - col0 * 31 AS col1 FROM tab0 AS cor0
----
1085
2759
744

query I rowsort
SELECT DISTINCT col1 * ( 58 ) AS col1 FROM tab1 AS cor0
----
1508
580
754

query I rowsort
SELECT DISTINCT + + col2 + - col0 * - cor0.col2 AS col1 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT DISTINCT - col0 + - col2 + ( col1 ) FROM tab2
----
-100
-3
-45

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 cor0 CROSS JOIN tab1, tab2 AS cor1, tab0 AS cor2
----
972 values hashing to 9a5ab925af18e11f7748f3b2e722ff3d

query I rowsort
SELECT 23 AS col1 FROM tab1 AS cor0
----
23
23
23

query I rowsort
SELECT ALL + 98 * - col0 FROM tab1 AS cor0
----
-294
-6272
-7840

query I rowsort
SELECT ALL - col1 * + 20 + col0 - col2 AS col2 FROM tab2
----
-1128
-299
-640

onlyif mysql # use DIV operator for integer division
query I rowsort label-6198
SELECT ALL - col0 DIV + 95 - + col1 * col2 * 96 AS col2 FROM tab0
----
-272448
-716352
-9312

skipif mysql # not compatible
query I rowsort label-6198
SELECT ALL - col0 / + 95 - + col1 * col2 * 96 AS col2 FROM tab0
----
-272448
-716352
-9312

query I rowsort
SELECT 73 + + col0 - col1 FROM tab1 AS cor0
----
127
140
50

query I rowsort
SELECT + 34 + cor0.col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 9f11e16e5a127401006df5d5e3f9af14

query I rowsort
SELECT ALL ( tab1.col2 ) FROM tab1, tab2 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT + + ( 23 ) FROM tab1 AS cor0
----
23
23
23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6203
SELECT + - CAST( 70 AS SIGNED ) * cor0.col1 + + col0 - 85 * col0 AS col1 FROM tab0 AS cor0
----
-13846
-8036
-9730

skipif mysql # not compatible
query I rowsort label-6203
SELECT + - CAST ( 70 AS INTEGER ) * cor0.col1 + + col0 - 85 * col0 AS col1 FROM tab0 AS cor0
----
-13846
-8036
-9730

onlyif mysql # use DIV operator for integer division
query I rowsort label-6204
SELECT col1 DIV cor0.col2 + - col2 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-6204
SELECT col1 / cor0.col2 + - col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT 88 AS col1 FROM tab2 AS cor0
----
88
88
88

query I rowsort
SELECT DISTINCT + col1 + + col2 * + col1 AS col2 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT ALL - 50 * + col1 - + 30 AS col2 FROM tab2 cor0
----
-1580
-2980
-880

query I rowsort
SELECT + - 40 + col0 FROM tab2 AS cor0
----
-33
38
39

query I rowsort
SELECT DISTINCT + 89 + - col1 * - col1 * col2 FROM tab0 AS cor0
----
244157
679131
9498

query I rowsort
SELECT col1 + ( col0 ) FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT - col2 * ( + col0 ) AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT ( col0 + ( + col0 ) ) AS col2 FROM tab2
----
14
156
158

query I rowsort
SELECT ALL 52 * + col0 FROM tab0
----
1248
1820
4628

query I rowsort
SELECT - - cor0.col2 * - 72 + col0 AS col0 FROM tab0 AS cor0
----
-2352
-37
-5815

query I rowsort
SELECT ALL + cor0.col2 + + col1 * cor0.col0 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT - + cor0.col0 + - col0 * 99 * + col0 FROM tab2 AS cor0
----
-4858
-602394
-617938

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * + cor0.col0 col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT col1 * + col0 + col0 FROM tab0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-6219
SELECT - tab0.col2 + col0 * tab0.col1 DIV col1 FROM tab0
----
-9
34
7

skipif mysql # not compatible
query I rowsort label-6219
SELECT - tab0.col2 + col0 * tab0.col1 / col1 FROM tab0
----
-9
34
7

query I rowsort
SELECT DISTINCT - 8 + col1 * ( - col0 * + col2 ) AS col2 FROM tab2 AS cor0
----
-119660
-51042
-5867

query I rowsort
SELECT - - 68 + col0 * col1 FROM tab2 AS cor0
----
1411
285
4670

query I rowsort
SELECT DISTINCT + 46 + - col1 AS col0 FROM tab2 AS cor0
----
-13
15
29

query I rowsort
SELECT ALL - col0 + col1 * - 17 * + col2 FROM tab2 AS cor0
----
-11061
-14236
-26156

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 + - col0 col2 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL col0 * + 97 AS col1 FROM tab2 cor0
----
679
7566
7663

query I rowsort
SELECT ALL col0 * + 84 + - cor0.col1 + - col1 * 52 * ( + col2 ) FROM tab2 AS cor0
----
-26973
-42967
-73275

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + col1 col0 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT + col1 * 78 - - 58 * - col2 FROM tab2 AS cor0
----
-878
3094
852

query I rowsort
SELECT ALL - cor0.col2 * 87 + - col2 FROM tab1 AS cor0
----
-4752
-5016
-8448

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0, tab0 AS cor0, tab2 cor1
----
972 values hashing to d41be7437523f0dba2158c7f0439f329

query I rowsort
SELECT ALL + 11 AS col0 FROM tab0
----
11
11
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col1 ) * tab0.col1 col1 FROM tab0
----
7396
8281
9409

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT NULL BETWEEN + col1 AND - col2
----

query I rowsort
SELECT - col1 * + col1 - - tab1.col1 FROM tab1
----
-156
-650
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col2 + + col2 col1 FROM tab0
----
-2805
-7380
-96

query I rowsort
SELECT DISTINCT + col0 + tab0.col1 AS col1 FROM tab0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-6237
SELECT col0 * + col0 + + col2 DIV col1 FROM tab2
----
49
6084
6243

skipif mysql # not compatible
query I rowsort label-6237
SELECT col0 * + col0 + + col2 / col1 FROM tab2
----
49
6084
6243

query I rowsort
SELECT + col0 * col1 * + col0 - + col0 FROM tab2
----
106018
1512
358878

query I rowsort
SELECT - col2 AS col2 FROM tab1 WHERE NOT NULL NOT IN ( col2 )
----

query I rowsort
SELECT tab1.col2 * col0 + col0 AS col1 FROM tab1
----
165
3712
7760

query I rowsort
SELECT ALL col1 + - col1 * + tab2.col0 * col1 AS col1 FROM tab2
----
-22814
-271459
-6696

query I rowsort
SELECT col1 + - col1 * col1 * col1 AS col0 FROM tab2
----
-205320
-29760
-4896

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT NULL BETWEEN + col1 AND ( NULL )
----

query I rowsort
SELECT ALL + col2 * col2 * + col2 - + col1 FROM tab0
----
-96
35851
551277

query I rowsort
SELECT DISTINCT - col0 * - col2 + - tab2.col2 AS col0 FROM tab2
----
162
2002
2964

query I rowsort
SELECT col2 + col2 * tab2.col1 AS col2 FROM tab2
----
1560
684
864

query III rowsort
SELECT ALL * FROM tab1 WHERE col2 <= col1 + - col1 * tab1.col1
----

query I rowsort
SELECT + tab0.col0 * - col2 AS col2 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT col0 - col2 * - col2 FROM tab1
----
2919
3313
9296

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL BETWEEN NULL AND ( + col0 )
----

query I rowsort
SELECT DISTINCT - col1 FROM tab1 WHERE NULL NOT BETWEEN - col1 AND - col1 * - col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + - col2 col0 FROM tab0
----
-9
34
7

query I rowsort
SELECT col2 AS col2 FROM tab1 WHERE NOT NULL IN ( - tab1.col1 / col1 )
----

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT ( NULL ) NOT BETWEEN col1 AND col0
----

query I rowsort
SELECT DISTINCT col2 * tab2.col2 + - col0 AS col0 FROM tab2
----
1365
598
722

query I rowsort
SELECT col0 - + col0 AS col1 FROM tab1
----
0
0
0

query III rowsort
SELECT ALL * FROM tab2 WHERE NULL = col2
----

query I rowsort
SELECT ALL col0 * + col0 * col2 - col0 AS col1 FROM tab1
----
233408
483
614320

query I rowsort
SELECT - col0 * + col2 AS col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT col0 + - 49 * - col1 + - ( 95 * + col0 + + col2 ) FROM tab2
----
-4467
-6631
834

query I rowsort
SELECT col0 + + 90 AS col0 FROM tab1
----
154
170
93

query I rowsort
SELECT + 78 + + col0 FROM tab0
----
102
113
167

query I rowsort
SELECT ALL + 33 + col1 + - col2 FROM tab1
----
-14
-50
5

query I rowsort
SELECT ALL 69 + + 42 AS col0 FROM tab2 AS cor0
----
111
111
111

query I rowsort
SELECT ALL + 24 FROM tab1 cor0
----
24
24
24

query I rowsort
SELECT - 54 + 20 FROM tab1 AS cor0
----
-34
-34
-34

query I rowsort
SELECT DISTINCT ( + 62 ) AS col1 FROM tab2 AS cor0
----
62

query I rowsort
SELECT DISTINCT 10 AS col2 FROM tab1, tab1 AS cor0
----
10

query I rowsort
SELECT tab1.col1 + + col1 AS col2 FROM tab1
----
20
26
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col0 col2 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 33 col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 8035c665a75d22be5922be1a4e574e03

onlyif mysql # use DIV operator for integer division
query I rowsort label-6272
SELECT ALL - - col0 DIV cor0.col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6272
SELECT ALL - - col0 / cor0.col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col1 * - col0 + col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-6274
SELECT DISTINCT - col1 + col2 DIV + 6 FROM tab2 AS cor0
----
-11
-27
-55

skipif mysql # not compatible
query I rowsort label-6274
SELECT DISTINCT - col1 + col2 / + 6 FROM tab2 AS cor0
----
-11
-27
-55

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6275
SELECT - ( col1 ) / CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6275
SELECT - ( col1 ) / CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + col1 + col0 FROM tab1 cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-6277
SELECT DISTINCT + + cor0.col2 DIV + cor0.col1 col1 FROM tab1 AS cor0
----
2
5
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6277
SELECT DISTINCT + + cor0.col2 / + cor0.col1 col1 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT DISTINCT - 15 + col2 AS col2 FROM tab0 AS cor0
----
-14
18
67

query I rowsort
SELECT ALL + 15 + - cor0.col1 AS col2 FROM tab0 AS cor0
----
-71
-76
-82

query I rowsort
SELECT ALL 40 + col1 FROM tab1 cor0
----
50
53
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-6281
SELECT - 13 DIV - 28 FROM tab2, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-6281
SELECT - 13 / - 28 FROM tab2, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT + col1 * + ( col2 ) + cor0.col2 AS col2 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT ALL cor0.col0 * 20 AS col0 FROM tab2 cor0
----
140
1560
1580

onlyif mysql # use DIV operator for integer division
query I rowsort label-6284
SELECT DISTINCT + col1 DIV 77 AS col0 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6284
SELECT DISTINCT + col1 / 77 AS col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT col2 - 57 * col1 FROM tab2 AS cor0
----
-1740
-3337
-931

query I rowsort
SELECT ALL + cor0.col0 - ( - col0 + - col2 ) FROM tab2 cor0
----
182
196
41

query I rowsort
SELECT col0 - 7 * col1 AS col0 FROM tab2 AS cor0
----
-210
-335
-40

query I rowsort
SELECT + - 25 + col0 FROM tab0 AS cor0
----
-1
10
64

query I rowsort
SELECT DISTINCT 26 * + 59 + - col0 AS col2 FROM tab1 AS cor0
----
1454
1470
1531

query I rowsort
SELECT + ( 42 ) + - col0 * + ( - 44 ) FROM tab1 AS cor0
----
174
2858
3562

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6291
SELECT DISTINCT - CAST( NULL AS SIGNED ) * - col2 + col1 * + cor0.col0 AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6291
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * - col2 + col1 * + cor0.col0 AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + 88 * col0 + + col0 AS col0 FROM tab0 AS cor0
----
2136
3115
7921

query I rowsort
SELECT DISTINCT - + ( col2 ) * - cor0.col2 + + 0 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ALL - + col1 * col1 + - col0 - + cor0.col2 AS col2 FROM tab2 AS cor0
----
-3585
-406
-995

query I rowsort
SELECT ALL + 71 + + col0 FROM tab0 AS cor0
----
106
160
95

query I rowsort
SELECT - col0 * + 63 + + col0 AS col0 FROM tab2 AS cor0
----
-434
-4836
-4898

query I rowsort
SELECT ALL + 79 + + cor0.col0 FROM tab2 AS cor0
----
157
158
86

query I rowsort
SELECT ALL - ( - col1 ) + + 83 * col1 FROM tab0
----
7224
7644
8148

query I rowsort
SELECT DISTINCT - ( cor0.col1 ) * col1 + 46 FROM tab2 AS cor0
----
-243
-3435
-915

query I rowsort
SELECT ALL 36 * + col2 FROM tab2 AS cor0
----
1368
936
972

query I rowsort
SELECT - 53 FROM tab2 AS cor0
----
-53
-53
-53

query I rowsort
SELECT DISTINCT col2 + col1 * 4 AS col2 FROM tab0 AS cor0
----
377
389
446

query I rowsort
SELECT DISTINCT + + col0 * cor0.col0 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT + cor0.col0 * col2 * cor0.col2 AS col0 FROM tab2 cor0
----
114076
5103
52728

query I rowsort
SELECT + - 35 * col1 FROM tab1 AS cor0
----
-350
-455
-910

query I rowsort
SELECT - + col0 * - ( - 32 ) + col1 AS col2 FROM tab0 AS cor0
----
-1023
-2757
-682

query I rowsort
SELECT + + col2 + 99 AS col2 FROM tab0 AS cor0
----
100
132
181

query I rowsort
SELECT DISTINCT - - 91 FROM tab1 AS cor0
----
91

query I rowsort
SELECT ALL + 44 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to ab2bc2b9f8baa300df7755e5980a319d

query I rowsort
SELECT ALL col0 * 94 AS col2 FROM tab1 AS cor0
----
282
6016
7520

query I rowsort
SELECT ALL - 77 AS col0 FROM tab2 cor0
----
-77
-77
-77

query I rowsort
SELECT DISTINCT - 35 + 42 AS col2 FROM tab2 AS cor0
----
7

query I rowsort
SELECT - cor0.col1 + + 61 FROM tab1 AS cor0
----
35
48
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-6314
SELECT DISTINCT 80 DIV cor0.col0 - - col2 FROM tab1 AS cor0
----
58
80
97

skipif mysql # not compatible
query I rowsort label-6314
SELECT DISTINCT 80 / cor0.col0 - - col2 FROM tab1 AS cor0
----
58
80
97

query I rowsort
SELECT DISTINCT + ( ( col1 ) ) AS col0 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT + 40 * - col2 + - col2 + col1 AS col1 FROM tab1 AS cor0
----
-2188
-2327
-3923

query I rowsort
SELECT - col1 * col1 + - col1 + col1 AS col2 FROM tab1 AS cor0
----
-100
-169
-676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6318
SELECT ALL - CAST( - col0 * col2 AS SIGNED ) FROM tab2
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-6318
SELECT ALL - CAST ( - col0 * col2 AS INTEGER ) FROM tab2
----
189
2028
3002

query I rowsort
SELECT ALL ( col2 ) * col1 AS col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT + col1 + 76 AS col2 FROM tab0
----
162
167
173

query I rowsort
SELECT + 6 + - col2 AS col2 FROM tab1
----
-48
-51
-90

query I rowsort
SELECT ALL ( col2 ) * col0 AS col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT ALL col1 * 72 AS col0 FROM tab2
----
1224
2232
4248

query I rowsort
SELECT + cor0.col0 * + cor0.col2 AS col1 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 71 * + col1 + + col0 col1 FROM tab0
----
6130
6550
6922

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab0 cor2
----
3645 values hashing to 0cc433e09ad9e61562b7840dd1db6f57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 + - 94 col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
-118
-129
-183

query I rowsort
SELECT DISTINCT + col2 * + tab0.col0 AS col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT 66 * + col0 * 90 AS col0 FROM tab0 AS cor0
----
142560
207900
528660

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0, tab1 cor1, tab0, tab1 AS cor2
----
3645 values hashing to f9101173abc9e524c6310e6c0eeefb0c

query I rowsort
SELECT - - ( 77 ) FROM tab0 AS cor0
----
77
77
77

query I rowsort
SELECT DISTINCT col0 + 71 * + col2 FROM tab1
----
3837
4111
6896

query I rowsort
SELECT ALL - col0 + 1 FROM tab0
----
-23
-34
-88

query I rowsort
SELECT DISTINCT cor0.col2 * 11 AS col1 FROM tab0 AS cor0
----
11
363
902

query I rowsort
SELECT col0 * - 85 * + 27 FROM tab0 AS cor0
----
-204255
-55080
-80325

onlyif mysql # use DIV operator for integer division
query I rowsort label-6336
SELECT ALL - - ( col2 ) DIV cor0.col1 + + col0 * - col2 + col0 AS col0 FROM tab0 cor0
----
-7209
-768
0

skipif mysql # not compatible
query I rowsort label-6336
SELECT ALL - - ( col2 ) / cor0.col1 + + col0 * - col2 + col0 AS col0 FROM tab0 cor0
----
-7209
-768
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 3 * + ( + cor0.col1 ) col0 FROM tab1 AS cor0
----
-30
-39
-78

query I rowsort
SELECT DISTINCT + - col2 + - 80 * - col1 AS col0 FROM tab1 AS cor0
----
2026
743
944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 78 col0 FROM tab0 AS cor0
----
78
78
78

query I rowsort
SELECT - col0 + col1 AS col2 FROM tab2 cor0
----
-19
-62
24

query I rowsort
SELECT - 7 AS col1 FROM tab2 AS cor0
----
-7
-7
-7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6342
SELECT - - CAST( NULL AS SIGNED ) * cor0.col1 + col2 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-6342
SELECT - - CAST ( NULL AS INTEGER ) * cor0.col1 + col2 col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col0 + - 97 AS col0 FROM tab2 AS cor0
----
-18
-19
-90

query I rowsort
SELECT cor0.col0 * - col2 + 77 FROM tab2 AS cor0
----
-112
-1951
-2925

onlyif mysql # use DIV operator for integer division
query I rowsort label-6345
SELECT ALL - - col2 DIV + col0 - + col1 FROM tab1 AS cor0
----
-10
-12
-8

skipif mysql # not compatible
query I rowsort label-6345
SELECT ALL - - col2 / + col0 - + col1 FROM tab1 AS cor0
----
-10
-12
-8

query I rowsort
SELECT col1 * 94 * + col1 FROM tab0 AS cor0
----
695224
778414
884446

query I rowsort
SELECT ALL + - ( col1 ) + + col2 AS col2 FROM tab2 cor0
----
-33
-4
21

query I rowsort
SELECT ALL col2 - + col2 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - - ( - col0 ) + col1 AS col1 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT + - col1 * 70 FROM tab1 AS cor0
----
-1820
-700
-910

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6351
SELECT DISTINCT + + CAST( ( + col2 ) AS SIGNED ) AS col0 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-6351
SELECT DISTINCT + + CAST ( ( + col2 ) AS INTEGER ) AS col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT + + col1 + + col2 * col2 + 94 * - col2 FROM tab1 AS cor0
----
-2099
-2134
205

query I rowsort
SELECT + col2 + 41 FROM tab0
----
123
42
74

query I rowsort
SELECT + col1 * col0 + ( 30 + col0 ) * - col0 AS col1 FROM tab1 cor0
----
-21
-5376
-7760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 71 * col2 * - 25 - ( col0 ) col1 FROM tab2 AS cor0
----
-46228
-47932
-67529

query I rowsort
SELECT 87 + - col0 * col2 FROM tab0 AS cor0
----
-705
-7211
52

query I rowsort
SELECT - col1 * + col2 + - col1 * 66 FROM tab1 cor0
----
-1230
-2106
-3120

onlyif mysql # use DIV operator for integer division
query I rowsort label-6358
SELECT ALL col1 + + col1 DIV - 14 AS col1 FROM tab1 AS cor0
----
10
13
25

skipif mysql # not compatible
query I rowsort label-6358
SELECT ALL col1 + + col1 / - 14 AS col1 FROM tab1 AS cor0
----
10
13
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col0 + + ( col1 ) col2 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT + ( 95 ) * - col2 FROM tab1
----
-5130
-5415
-9120

query I rowsort
SELECT ALL - - 20 FROM tab2, tab1, tab2 cor0
----
27 values hashing to 0a35fe98f3e7d5fc8ff2ae815bd20ef4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 + + cor0.col2 * + 37 col2 FROM tab2 cor0
----
1389
903
968

query I rowsort
SELECT ALL - col1 * - col0 + tab1.col1 * col0 AS col0 FROM tab1
----
1280
156
2080

query I rowsort
SELECT - col2 * - cor0.col0 + col0 AS col0 FROM tab0 AS cor0
----
70
7387
816

onlyif mysql # use DIV operator for integer division
query I rowsort label-6365
SELECT + 99 DIV col0 FROM tab1 cor0
----
1
1
33

skipif mysql # not compatible
query I rowsort label-6365
SELECT + 99 / col0 FROM tab1 cor0
----
1
1
33

query I rowsort
SELECT - col2 * + col0 AS col2 FROM tab1 cor0
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * 17 col1 FROM tab0 AS cor0
----
-1462
-1547
-1649

query I rowsort
SELECT ALL col2 * + col2 - tab1.col1 * + col1 AS col1 FROM tab1
----
2240
3149
9047

onlyif mysql # use DIV operator for integer division
query I rowsort label-6369
SELECT DISTINCT - - col0 + - col0 DIV - col1 FROM tab0 cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-6369
SELECT DISTINCT - - col0 + - col0 / - col1 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT + + col0 + - ( + 79 * + col1 + 79 ) AS col2 FROM tab1 AS cor0
----
-1026
-2130
-805

query I rowsort
SELECT + col0 + + col0 + 26 * col2 FROM tab0 AS cor0
----
2310
906
96

query I rowsort
SELECT DISTINCT - col1 * + col1 * + col1 + 28 AS col1 FROM tab1
----
-17548
-2169
-972

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + col2 * + 24 * col2 + col1 col2 FROM tab0
----
120
161385
26189

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to 73edaf471aef3f42e9a0b0be98b79374

onlyif mysql # use DIV operator for integer division
query I rowsort label-6375
SELECT DISTINCT - col1 + + ( + col0 + + col0 ) DIV - 91 FROM tab1 AS cor0
----
-11
-14
-26

skipif mysql # not compatible
query I rowsort label-6375
SELECT DISTINCT - col1 + + ( + col0 + + col0 ) / - 91 FROM tab1 AS cor0
----
-11
-14
-26

query I rowsort
SELECT - col2 + + 49 * ( - col2 ) FROM tab2 AS cor0
----
-1300
-1350
-1900

query I rowsort
SELECT - col2 * - col2 + - col2 AS col2 FROM tab0 AS cor0
----
0
1056
6642

onlyif mysql # use DIV operator for integer division
query I rowsort label-6378
SELECT ALL - col2 DIV 22 AS col0 FROM tab1 AS cor0
----
-2
-2
-4

skipif mysql # not compatible
query I rowsort label-6378
SELECT ALL - col2 / 22 AS col0 FROM tab1 AS cor0
----
-2
-2
-4

query I rowsort
SELECT + col0 * ( col2 * col1 ) + col2 FROM tab1 cor0
----
36537
4266
99936

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6380
SELECT + - col1 * CAST( NULL AS DECIMAL ) * - ( + col1 ) + - ( col1 ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6380
SELECT + - col1 * CAST ( NULL AS REAL ) * - ( + col1 ) + - ( col1 ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - cor0.col2 * ( col0 ) FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-6382
SELECT DISTINCT col0 + - 63 * col1 DIV + col0 FROM tab1 AS cor0
----
-543
55
70

skipif mysql # not compatible
query I rowsort label-6382
SELECT DISTINCT col0 + - 63 * col1 / + col0 FROM tab1 AS cor0
----
-543
55
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6383
SELECT col0 * CAST( NULL AS DECIMAL ) + col0 + col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6383
SELECT col0 * CAST ( NULL AS REAL ) + col0 + col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col2 + + col0 * col0 AS col0 FROM tab1 cor0
----
4153
63
6496

query I rowsort
SELECT DISTINCT - - col0 * cor0.col2 + cor0.col1 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT - col1 + 42 FROM tab2
----
-17
11
25

query I rowsort
SELECT ( - 31 ) * cor0.col1 FROM tab2 AS cor0
----
-1829
-527
-961

query I rowsort
SELECT - col1 * 62 FROM tab0 AS cor0
----
-5332
-5642
-6014

query I rowsort
SELECT DISTINCT + ( 42 ) * + col1 * + ( - col0 ) AS col2 FROM tab2 AS cor0
----
-193284
-56406
-9114

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6390
SELECT DISTINCT CAST( NULL AS SIGNED ) * col0 * + tab1.col0 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-6390
SELECT DISTINCT CAST ( NULL AS INTEGER ) * col0 * + tab1.col0 FROM tab1
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6391
SELECT + 2 DIV - cor0.col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6391
SELECT + 2 / - cor0.col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 70 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to c76157a7a7ec18de56823b2058b49f32

query I rowsort
SELECT + col0 + col2 + col0 AS col1 FROM tab2
----
182
196
41

onlyif mysql # use DIV operator for integer division
query I rowsort label-6394
SELECT - - 76 * col1 DIV + col0 AS col2 FROM tab0 AS cor0
----
210
272
77

skipif mysql # not compatible
query I rowsort label-6394
SELECT - - 76 * col1 / + col0 AS col2 FROM tab0 AS cor0
----
210
272
77

query I rowsort
SELECT DISTINCT - 59 * + col0 + - col1 AS col1 FROM tab2
----
-444
-4661
-4678

query I rowsort
SELECT DISTINCT + - ( col1 ) * 46 + col1 * cor0.col2 FROM tab0 AS cor0
----
-1118
-4365
3276

onlyif mysql # use DIV operator for integer division
query I rowsort label-6397
SELECT + 74 * + col0 + CAST( - col0 AS SIGNED ) DIV cor0.col1 FROM tab2 AS cor0
----
518
5771
5842

skipif mysql # not compatible
query I rowsort label-6397
SELECT + 74 * + col0 + CAST ( - col0 AS INTEGER ) / cor0.col1 FROM tab2 AS cor0
----
518
5771
5842

query I rowsort
SELECT ALL - + 98 FROM tab0 AS cor0
----
-98
-98
-98

query I rowsort
SELECT - - 67 + col2 FROM tab0 cor0
----
100
149
68

query I rowsort
SELECT ALL + 17 * cor0.col2 AS col0 FROM tab2 AS cor0
----
442
459
646

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * 14 * - 60 + + col1 * ( col1 ) col1 FROM tab2
----
-13991
-25079
-46079

onlyif mysql # use DIV operator for integer division
query I rowsort label-6402
SELECT DISTINCT + col1 DIV + ( - tab1.col0 ) FROM tab1
----
-8
0

skipif mysql # not compatible
query I rowsort label-6402
SELECT DISTINCT + col1 / + ( - tab1.col0 ) FROM tab1
----
-8
0

query I rowsort
SELECT + col1 * col0 + col0 * col1 FROM tab0 AS cor0
----
16198
4128
6790

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 74 col0 FROM tab0, tab1 cor0, tab1 AS cor1
----
27 values hashing to 5a477330c946251f814fbbfd08e77c28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 15 col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 1172c9a62bdad7db0def9205c06ee1f2

query I rowsort
SELECT + ( col2 ) * - cor0.col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT 59 AS col2 FROM tab0 AS cor0
----
59
59
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-6408
SELECT - ( 12 ) DIV col0 FROM tab2 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-6408
SELECT - ( 12 ) / col0 FROM tab2 AS cor0
----
-1
0
0

query I rowsort
SELECT col0 * + 53 * col2 FROM tab1 AS cor0
----
193344
407040
8586

query I rowsort
SELECT + 7 * - col0 AS col2 FROM tab2 cor0
----
-49
-546
-553

onlyif mysql # use DIV operator for integer division
query I rowsort label-6411
SELECT - col2 DIV 1 AS col0 FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-6411
SELECT - col2 / 1 AS col0 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT - ( 18 ) AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
-18

query I rowsort
SELECT DISTINCT + ( col1 ) + + col1 - 43 AS col0 FROM tab1 AS cor0
----
-17
-23
9

query I rowsort
SELECT DISTINCT + + 53 - + col1 FROM tab0 AS cor0
----
-33
-38
-44

query I rowsort
SELECT + + col0 * - col2 + + col0 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT ALL - ( cor0.col1 ) + + col0 + col0 * + col1 FROM tab0 AS cor0
----
2002
3333
8097

query I rowsort
SELECT DISTINCT col1 * cor0.col1 + col0 * col1 AS col0 FROM tab1 AS cor0
----
1209
740
754

query I rowsort
SELECT + col1 + + cor0.col0 * col1 AS col0 FROM tab0 AS cor0
----
2150
3492
8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-6419
SELECT ALL - col1 DIV + col2 + + col0 AS col2 FROM tab0 AS cor0
----
-62
22
88

skipif mysql # not compatible
query I rowsort label-6419
SELECT ALL - col1 / + col2 + + col0 AS col2 FROM tab0 AS cor0
----
-62
22
88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6420
SELECT ALL - + col2 * col0 + CAST( col1 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
-136
-3638
-7667

skipif mysql # not compatible
query I rowsort label-6420
SELECT ALL - + col2 * col0 + CAST ( col1 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-136
-3638
-7667

onlyif mysql # use DIV operator for integer division
query I rowsort label-6421
SELECT - col2 * cor0.col2 + col2 + - col2 DIV ( - col0 ) AS col0 FROM tab0 AS cor0
----
-1055
-6642
0

skipif mysql # not compatible
query I rowsort label-6421
SELECT - col2 * cor0.col2 + col2 + - col2 / ( - col0 ) AS col0 FROM tab0 AS cor0
----
-1055
-6642
0

query I rowsort
SELECT DISTINCT - col0 * - col2 AS col1 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-6423
SELECT col2 + - col1 * 41 + col1 DIV - cor0.col1 FROM tab1 cor0
----
-1013
-354
-438

skipif mysql # not compatible
query I rowsort label-6423
SELECT col2 + - col1 * 41 + col1 / - cor0.col1 FROM tab1 cor0
----
-1013
-354
-438

query I rowsort
SELECT + - col0 * col0 * ( col0 ) AS col1 FROM tab0 cor0
----
-13824
-42875
-704969

query I rowsort
SELECT - col2 + - ( col1 ) * + col1 * - 83 FROM tab1 AS cor0
----
13931
56054
8243

query I rowsort
SELECT cor0.col1 + col1 * col2 AS col1 FROM tab1 AS cor0
----
1261
1430
580

skipif mysql # not compatible
query I rowsort
SELECT col0 + CAST ( + col0 AS REAL ) * - col0 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT + cor0.col1 * 73 + col1 + col1 FROM tab2 AS cor0
----
1275
2325
4425

query I rowsort
SELECT - + col2 + ( 34 ) FROM tab0 AS cor0
----
-48
1
33

query I rowsort
SELECT 20 + col0 FROM tab2 AS cor0
----
27
98
99

query I rowsort
SELECT DISTINCT + + col2 * + 72 + + col2 * - 70 * cor0.col1 FROM tab1 AS cor0
----
-35796
-80448
-94392

skipif mysql # not compatible
query I rowsort
SELECT ALL + CAST ( + 39 AS REAL ) + + col2 * - 77 AS col2 FROM tab1 cor0
----
-4119
-4350
-7353

query I rowsort
SELECT - col0 * + 65 + col0 AS col2 FROM tab0 AS cor0
----
-1536
-2240
-5696

query I rowsort
SELECT ALL cor2.col1 AS col1 FROM tab0, tab2 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to 8c9db501a604ea66e3b5e5598f3f2a91

query I rowsort
SELECT - + 76 + + col0 FROM tab0 cor0
----
-41
-52
13

query I rowsort
SELECT - 93 AS col0 FROM tab0 AS cor0
----
-93
-93
-93

query I rowsort
SELECT DISTINCT ( + col0 + col2 ) * col1 * - col0 FROM tab1
----
-183040
-4446
-77440

query I rowsort
SELECT - 44 FROM tab1, tab2 AS cor0
----
9 values hashing to 07457d9e571e036a9a3a0f5a5a2e1ef2

query I rowsort
SELECT ALL 13 * + col1 AS col0 FROM tab2
----
221
403
767

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6440
SELECT col0 * + col1 + - CAST( + 98 + col1 AS SIGNED ) FROM tab0 AS cor0
----
1880
3200
7910

skipif mysql # not compatible
query I rowsort label-6440
SELECT col0 * + col1 + - CAST ( + 98 + col1 AS INTEGER ) FROM tab0 AS cor0
----
1880
3200
7910

query I rowsort
SELECT + 18 * - col2 AS col1 FROM tab0
----
-1476
-18
-594

query I rowsort
SELECT ALL col2 + col2 + - 73 FROM tab0 AS cor0
----
-7
-71
91

query I rowsort
SELECT ALL ( tab2.col2 ) AS col2 FROM tab2
----
26
27
38

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab1, tab1 cor0
----
10
13
26

query I rowsort
SELECT ALL - 98 * col0 AS col2 FROM tab0
----
-2352
-3430
-8722

query I rowsort
SELECT DISTINCT - col0 + col0 + tab0.col1 FROM tab0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6447
SELECT 81 + col2 * col0 DIV - 85 AS col0 FROM tab2
----
46
58
79

skipif mysql # not compatible
query I rowsort label-6447
SELECT 81 + col2 * col0 / - 85 AS col0 FROM tab2
----
46
58
79

query I rowsort
SELECT DISTINCT ( - 40 ) + - col0 + - ( col2 ) * col0 FROM tab1
----
-205
-3752
-7800

query I rowsort
SELECT - col1 * tab1.col1 AS col1 FROM tab1
----
-100
-169
-676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6450
SELECT + CAST( NULL AS SIGNED ) FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-6450
SELECT + CAST ( NULL AS INTEGER ) FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # use DIV operator for integer division
query I rowsort label-6451
SELECT + + cor0.col1 DIV col1 + col0 FROM tab2 AS cor0
----
79
8
80

skipif mysql # not compatible
query I rowsort label-6451
SELECT + + cor0.col1 / col1 + col0 FROM tab2 AS cor0
----
79
8
80

query I rowsort
SELECT DISTINCT - 71 * - col0 FROM tab1 AS cor0
----
213
4544
5680

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 cor0 CROSS JOIN tab2, tab1 AS cor1
----
972 values hashing to 980274175fafec015a83080672486a9a

query I rowsort
SELECT - 26 + - col1 AS col0 FROM tab0 AS cor0
----
-112
-117
-123

query I rowsort
SELECT - 66 + + col1 * cor0.col0 FROM tab2 cor0
----
1277
151
4536

query I rowsort
SELECT col0 + col1 * - 17 AS col1 FROM tab1
----
-106
-141
-439

query I rowsort
SELECT DISTINCT col2 * col1 * - col0 AS col2 FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT ALL + 59 AS col0 FROM tab2
----
59
59
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * + col2 col0 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT - - cor0.col1 * - col1 + 87 FROM tab1 AS cor0
----
-13
-589
-82

query I rowsort
SELECT ALL - col2 + cor0.col2 + + cor0.col0 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT DISTINCT col2 + - col2 * - 80 AS col0 FROM tab1 AS cor0
----
4374
4617
7776

query I rowsort
SELECT col1 + - cor0.col0 + col1 * + col1 FROM tab2 AS cor0
----
227
3462
985

query I rowsort
SELECT DISTINCT col2 * cor0.col0 * + 38 FROM tab2 AS cor0
----
114076
7182
77064

query I rowsort
SELECT DISTINCT + cor0.col1 + - 98 AS col1 FROM tab0, tab0 AS cor0
----
-1
-12
-7

query I rowsort
SELECT ALL col2 - - col1 AS col0 FROM tab1
----
109
67
80

query I rowsort
SELECT DISTINCT - col1 + - ( - col0 ) - col1 * - 13 FROM tab2
----
283
379
786

query I rowsort
SELECT col1 + ( 49 ) - col1 AS col0 FROM tab2
----
49
49
49

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6469
SELECT ALL + + CAST( col1 AS SIGNED ) FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-6469
SELECT ALL + + CAST ( col1 AS INTEGER ) FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + col0 * - col1 * col1 + - col0 AS col1 FROM tab0 AS cor0
----
-177528
-329350
-737098

query I rowsort
SELECT DISTINCT - ( col1 ) * + col1 FROM tab1 cor0
----
-100
-169
-676

query I rowsort
SELECT - 53 * col0 AS col2 FROM tab1 AS cor0
----
-159
-3392
-4240

onlyif mysql # use DIV operator for integer division
query I rowsort label-6473
SELECT DISTINCT col1 DIV + cor0.col0 + - col2 * ( - 50 ) AS col1 FROM tab0 AS cor0
----
1653
4101
52

skipif mysql # not compatible
query I rowsort label-6473
SELECT DISTINCT col1 / + cor0.col0 + - col2 * ( - 50 ) AS col1 FROM tab0 AS cor0
----
1653
4101
52

query I rowsort
SELECT - - 6 + col0 FROM tab0 AS cor0
----
30
41
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-6475
SELECT - 28 * + 70 + col1 * + col2 DIV - col2 + cor0.col0 AS col1 FROM tab1 AS cor0
----
-1893
-1906
-1983

skipif mysql # not compatible
query I rowsort label-6475
SELECT - 28 * + 70 + col1 * + col2 / - col2 + cor0.col0 AS col1 FROM tab1 AS cor0
----
-1893
-1906
-1983

query I rowsort
SELECT ALL - + cor0.col2 + - 30 FROM tab1 AS cor0
----
-126
-84
-87

onlyif mysql # use DIV operator for integer division
query I rowsort label-6477
SELECT + + col1 DIV - cor0.col0 + col0 FROM tab0 AS cor0
----
21
33
88

skipif mysql # not compatible
query I rowsort label-6477
SELECT + + col1 / - cor0.col0 + col0 FROM tab0 AS cor0
----
21
33
88

query I rowsort
SELECT 74 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

query I rowsort
SELECT ALL + tab2.col0 FROM tab2, tab1, tab1 cor0
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT + col0 * ( + col2 ) - col0 AS col0 FROM tab2
----
182
1950
2923

query I rowsort
SELECT ALL - 96 + col0 * col1 AS col2 FROM tab1 AS cor0
----
-18
544
944

query I rowsort
SELECT + col2 - + col1 FROM tab2 cor0
----
-33
-4
21

query I rowsort
SELECT ALL + 74 + col1 FROM tab1 cor0
----
100
84
87

onlyif mysql # use DIV operator for integer division
query I rowsort label-6484
SELECT ALL + + col0 DIV - col0 AS col1 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6484
SELECT ALL + + col0 / - col0 AS col1 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL col2 - - col2 * + col0 AS col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT DISTINCT - 36 * ( col1 ) FROM tab2 cor0
----
-1116
-2124
-612

query I rowsort
SELECT ALL 84 * 78 AS col2 FROM tab0 AS cor0
----
6552
6552
6552

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6488
SELECT - + CAST( NULL AS DECIMAL ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6488
SELECT - + CAST ( NULL AS REAL ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * 8 AS col2 FROM tab0
----
192
280
712

query I rowsort
SELECT DISTINCT - col1 * + col2 + col0 * - col1 AS col2 FROM tab0 AS cor0
----
-15561
-3492
-4902

query I rowsort
SELECT ALL 87 AS col2 FROM tab0 AS cor0
----
87
87
87

query I rowsort
SELECT 34 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 1146d159f0b9b4378a8b738b963f7039

query I rowsort
SELECT 80 + col2 FROM tab2 AS cor0
----
106
107
118

query I rowsort
SELECT - - 95 * - 87 AS col0 FROM tab1 AS cor0
----
-8265
-8265
-8265

query I rowsort
SELECT DISTINCT + ( col1 ) * - col0 * ( - cor0.col2 + col2 ) FROM tab2 AS cor0
----
0

query I rowsort
SELECT 87 * - 72 AS col0 FROM tab1 AS cor0
----
-6264
-6264
-6264

query I rowsort
SELECT + 20 + col2 * + col1 FROM tab1 AS cor0
----
1268
1424
590

query I rowsort
SELECT + ( + col2 ) * col1 + 66 AS col2 FROM tab1 AS cor0
----
1314
1470
636

query I rowsort
SELECT - col1 * + col0 + - cor0.col0 AS col0 FROM tab0 cor0
----
-2088
-3430
-8188

query I rowsort
SELECT ALL 16 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 3fdb08ec2e3d4b642dd4594778cca8b3

query I rowsort
SELECT col2 + + col1 + - col1 AS col2 FROM tab2
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + - col2 - - cor0.col1 * + ( - col1 ) col1 FROM tab0 AS cor0
----
-7343
-8272
-9313

query I rowsort
SELECT + col1 * + col0 + - col1 AS col1 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT + + cor0.col1 - + col2 * col2 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT + col2 * col0 + col0 + + col0 * 77 FROM tab0
----
14240
2664
2765

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 31 * - col1 + + col1 col0 FROM tab1
----
-300
-390
-780

query I rowsort
SELECT ALL + col2 * - col2 + col0 FROM tab0
----
-1065
-6635
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6508
SELECT + CAST( tab2.col2 + - col2 AS SIGNED ) AS col1 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6508
SELECT + CAST ( tab2.col2 + - col2 AS INTEGER ) AS col1 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL + col1 * cor0.col1 * - 66 AS col1 FROM tab2 AS cor0
----
-19074
-229746
-63426

query I rowsort
SELECT + col1 + - cor0.col0 * 19 AS col0 FROM tab2 AS cor0
----
-102
-1423
-1484

query I rowsort
SELECT ALL - - col1 * 26 + + col0 FROM tab2 AS cor0
----
1612
521
813

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6512
SELECT DISTINCT col1 - CAST( - col1 AS SIGNED ) FROM tab2 cor0
----
118
34
62

skipif mysql # not compatible
query I rowsort label-6512
SELECT DISTINCT col1 - CAST ( - col1 AS INTEGER ) FROM tab2 cor0
----
118
34
62

query I rowsort
SELECT DISTINCT + col0 * - 37 + + col1 FROM tab2 AS cor0
----
-228
-2827
-2906

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * col1 + - cor0.col1 col2 FROM tab0 AS cor0
----
7310
8190
9312

query I rowsort
SELECT ALL col2 * - 2 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT DISTINCT col2 + + col2 + col1 AS col0 FROM tab0
----
152
255
99

query I rowsort
SELECT - 98 AS col0 FROM tab1
----
-98
-98
-98

query I rowsort
SELECT ALL - col0 + - col1 * 64 * col0 FROM tab2
----
-13895
-294606
-86031

query I rowsort
SELECT 66 AS col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 897b6122ac98340b78905f39d81897fc

query I rowsort
SELECT + tab1.col1 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT ( cor0.col0 ) + + tab2.col1 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to af3a539c18b07c0d2d3147e1b73e81ac

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab0, tab0 cor2
----
3645 values hashing to 8a7905bab027a06731ba57659d83981d

query I rowsort
SELECT + cor0.col1 * ( + 15 ) FROM tab2 AS cor0
----
255
465
885

onlyif mysql # use DIV operator for integer division
query I rowsort label-6524
SELECT ALL - col0 + ( ( + col0 ) ) DIV - col1 AS col1 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-6524
SELECT ALL - col0 + ( ( + col0 ) ) / - col1 AS col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT + + 71 * col0 AS col0 FROM tab2 AS cor0
----
497
5538
5609

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - col2 col1 FROM tab1 AS cor0
----
-16
-51
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 96 * + col1 * - col1 col2 FROM tab1 AS cor0
----
-16224
-64896
-9600

query I rowsort
SELECT DISTINCT + col1 + + col1 + - col2 FROM tab0 AS cor0
----
100
139
193

onlyif mysql # use DIV operator for integer division
query I rowsort label-6529
SELECT DISTINCT tab0.col1 * + col1 + - col1 DIV col0 + - col0 FROM tab0
----
7369
8191
9372

skipif mysql # not compatible
query I rowsort label-6529
SELECT DISTINCT tab0.col1 * + col1 + - col1 / col0 + - col0 FROM tab0
----
7369
8191
9372

query I rowsort
SELECT - col1 * 62 FROM tab2
----
-1054
-1922
-3658

query I rowsort
SELECT ( tab0.col1 ) * + col0 + col0 * + col0 * col2 AS col1 FROM tab0
----
21072
4620
657621

query I rowsort
SELECT 79 + cor0.col1 + + cor0.col0 FROM tab2 cor0
----
117
175
216

query I rowsort
SELECT ( + 82 ) FROM tab1
----
82
82
82

query I rowsort
SELECT DISTINCT - 45 + - tab0.col1 FROM tab0
----
-131
-136
-142

query I rowsort
SELECT + ( - ( - col2 ) ) + col0 * col2 AS col0 FROM tab1
----
216
3705
7776

query I rowsort
SELECT + tab1.col1 * - col1 + col0 FROM tab1
----
-36
-673
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-6537
SELECT col1 + col1 DIV - col0 FROM tab2
----
17
27
59

skipif mysql # not compatible
query I rowsort label-6537
SELECT col1 + col1 / - col0 FROM tab2
----
17
27
59

query I rowsort
SELECT ALL 74 + col2 AS col0 FROM tab1 AS cor0
----
128
131
170

query I rowsort
SELECT DISTINCT - 53 * col0 FROM tab2 AS cor0
----
-371
-4134
-4187

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 * col1 col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - tab1.col2 + 77 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to b1901cb04e46fc7c59964db0a7f4ad78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6542
SELECT + tab1.col1 + + CAST( NULL AS SIGNED ) * - col2 + tab1.col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6542
SELECT + tab1.col1 + + CAST ( NULL AS INTEGER ) * - col2 + tab1.col0 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6543
SELECT - 47 * col1 DIV cor0.col0 + - col1 DIV + col2 AS col0 FROM tab1 cor0
----
-407
-7
-7

skipif mysql # not compatible
query I rowsort label-6543
SELECT - 47 * col1 / cor0.col0 + - col1 / + col2 AS col0 FROM tab1 cor0
----
-407
-7
-7

query I rowsort
SELECT - - col1 + 12 * - cor0.col0 * col2 FROM tab2 AS cor0
----
-2237
-24277
-36007

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to d10b928ceb6690f7c98bfe77a5adfcac

query I rowsort
SELECT ALL - cor0.col1 * 68 FROM tab2 AS cor0
----
-1156
-2108
-4012

query I rowsort
SELECT ALL + 74 * - 74 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 8391eb1f47cb52f678b5fe035dd1faca

query I rowsort
SELECT DISTINCT 35 AS col0 FROM tab0, tab1 AS cor0
----
35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6549
SELECT CAST( NULL AS SIGNED ) * col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6549
SELECT CAST ( NULL AS INTEGER ) * col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 9 * col0 * - col0 AS col1 FROM tab1
----
36864
57600
81

query I rowsort
SELECT - 11 FROM tab0, tab0 AS cor0
----
9 values hashing to 05cc989122d7724c7abefaba9625ef3d

query I rowsort
SELECT + 16 * 51 + col1 FROM tab0 AS cor0
----
902
907
913

onlyif mysql # use DIV operator for integer division
query I rowsort label-6553
SELECT ALL + col0 * col1 DIV + col0 AS col1 FROM tab1 cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-6553
SELECT ALL + col0 * col1 / + col0 AS col1 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT col1 + col1 * - col0 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT - + col2 + ( + col2 ) * col0 AS col1 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT ALL - ( - ( col0 ) ) * col0 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT + col1 + - cor0.col2 * - col0 AS col0 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT + col2 + - col2 * + col2 AS col2 FROM tab1 AS cor0
----
-2862
-3192
-9120

query I rowsort
SELECT - col2 * col0 * + col1 - col0 FROM tab1 AS cor0
----
-36544
-4215
-99920

query I rowsort
SELECT DISTINCT - col1 - col1 FROM tab2
----
-118
-34
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-6561
SELECT + + col1 DIV cor0.col0 - col0 FROM tab1 AS cor0
----
-64
-80
5

skipif mysql # not compatible
query I rowsort label-6561
SELECT + + col1 / cor0.col0 - col0 FROM tab1 AS cor0
----
-64
-80
5

query I rowsort
SELECT + col2 + cor0.col0 * cor0.col1 + - col1 AS col1 FROM tab2 AS cor0
----
1364
213
4569

query I rowsort
SELECT ALL col0 / + col2 + + col1 AS col2 FROM tab1 WHERE ( col0 + col0 ) = NULL
----

query I rowsort
SELECT - col1 * + col2 * - col1 FROM tab2
----
10982
25947
90506

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE ( NULL ) BETWEEN ( NULL ) AND ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6566
SELECT ALL col1 DIV col2 + + col0 FROM tab0 AS cor0
----
132
26
90

skipif mysql # not compatible
query I rowsort label-6566
SELECT ALL col1 / col2 + + col0 FROM tab0 AS cor0
----
132
26
90

query I rowsort
SELECT - col1 + col0 * - col0 FROM tab0 cor0
----
-1322
-662
-8012

query I rowsort
SELECT DISTINCT - col0 AS col1 FROM tab2 cor0 WHERE ( NULL ) NOT BETWEEN + col0 + col1 AND + col2
----

query I rowsort
SELECT - cor0.col2 + + col2 * - col2 AS col1 FROM tab2 AS cor0
----
-1482
-702
-756

query I rowsort
SELECT DISTINCT tab1.col0 * col2 * col0 FROM tab1
----
233472
486
614400

query I rowsort
SELECT ALL - + col0 * + 68 AS col0 FROM tab1 AS cor0
----
-204
-4352
-5440

query I rowsort
SELECT DISTINCT + - col0 * - 6 AS col2 FROM tab2 cor0
----
42
468
474

query I rowsort
SELECT col1 + - cor0.col0 * 47 AS col2 FROM tab1 cor0
----
-115
-2998
-3747

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + + col1 col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT - tab0.col0 * col2 + col1 * col0 AS col2 FROM tab0
----
1272
3360
801

onlyif mysql # use DIV operator for integer division
query I rowsort label-6576
SELECT ALL tab0.col2 * 19 + + col0 DIV + tab0.col0 FROM tab0
----
1559
20
628

skipif mysql # not compatible
query I rowsort label-6576
SELECT ALL tab0.col2 * 19 + + col0 / + tab0.col0 FROM tab0
----
1559
20
628

query I rowsort
SELECT 44 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to ab2bc2b9f8baa300df7755e5980a319d

onlyif mysql # use DIV operator for integer division
query I rowsort label-6578
SELECT + col2 - + col1 DIV col1 col0 FROM tab1
----
53
56
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6578
SELECT + col2 - + col1 / col1 col0 FROM tab1
----
53
56
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col0 + + ( - 42 ) col0 FROM tab1
----
-39
22
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6580
SELECT ALL col1 + CAST( - 97 * + tab2.col1 AS SIGNED ) col0 FROM tab2
----
-1632
-2976
-5664

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6580
SELECT ALL col1 + CAST ( - 97 * + tab2.col1 AS INTEGER ) col0 FROM tab2
----
-1632
-2976
-5664

query I rowsort
SELECT ALL col0 * + tab2.col1 + col2 AS col0 FROM tab2
----
1381
244
4628

query I rowsort
SELECT tab1.col1 + col2 * - ( + col0 ) - + ( col1 ) * - col1 AS col2 FROM tab1
----
-3538
-7498
540

onlyif mysql # use DIV operator for integer division
query I rowsort label-6583
SELECT + col1 DIV - CAST( ( + col0 ) AS SIGNED ) FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-6583
SELECT + col1 / - CAST ( ( + col0 ) AS INTEGER ) FROM tab2 AS cor0
----
-4
0
0

query I rowsort
SELECT ALL + col0 + 91 AS col2 FROM tab1 cor0
----
155
171
94

query I rowsort
SELECT 82 * cor0.col1 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to e4acaae5615ebaee69e7ffc4cb1824a4

onlyif mysql # use DIV operator for integer division
query I rowsort label-6586
SELECT + col2 DIV ( 72 ) + col0 + + col2 AS col1 FROM tab2
----
104
117
34

skipif mysql # not compatible
query I rowsort label-6586
SELECT + col2 / ( 72 ) + col0 + + col2 AS col1 FROM tab2
----
104
117
34

query I rowsort
SELECT - col2 + 63 + - 74 FROM tab1
----
-107
-65
-68

query I rowsort
SELECT + col2 + ( tab2.col1 ) FROM tab2
----
55
58
85

query I rowsort
SELECT col1 * - ( - col2 * col2 + - ( col2 ) * col0 ) AS col1 FROM tab0
----
1276002
161766
3492

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6590
SELECT ( 79 ) * + col2 - CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6590
SELECT ( 79 ) * + col2 - CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT - 56 AS col2 FROM tab1
----
-56
-56
-56

onlyif mysql # use DIV operator for integer division
query I rowsort label-6592
SELECT DISTINCT + ( col1 ) DIV col1 AS col1 FROM tab1
----
1

skipif mysql # not compatible
query I rowsort label-6592
SELECT DISTINCT + ( col1 ) / col1 AS col1 FROM tab1
----
1

query I rowsort
SELECT + col0 + + col1 * col2 AS col0 FROM tab2 cor0
----
1612
725
844

query I rowsort
SELECT - + 83 AS col1 FROM tab1 AS cor0
----
-83
-83
-83

query I rowsort
SELECT 75 + cor0.col0 AS col0 FROM tab1 AS cor0
----
139
155
78

query I rowsort
SELECT DISTINCT - col0 + cor0.col2 * col1 AS col2 FROM tab0 AS cor0
----
2814
62
7373

onlyif mysql # use DIV operator for integer division
query I rowsort label-6597
SELECT ALL cor0.col2 * + cor0.col1 + cor0.col0 * col1 * cor0.col2 + + col1 DIV 71 FROM tab1 AS cor0
----
101088
37050
5616

skipif mysql # not compatible
query I rowsort label-6597
SELECT ALL cor0.col2 * + cor0.col1 + cor0.col0 * col1 * cor0.col2 + + col1 / 71 FROM tab1 AS cor0
----
101088
37050
5616

query I rowsort
SELECT DISTINCT 0 + col2 AS col0 FROM tab1 AS cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6599
SELECT DISTINCT + 0 DIV + col0 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6599
SELECT DISTINCT + 0 / + col0 FROM tab2 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6600
SELECT ALL col2 DIV col2 + - col1 FROM tab0 AS cor0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-6600
SELECT ALL col2 / col2 + - col1 FROM tab0 AS cor0
----
-85
-90
-96

query I rowsort
SELECT ALL ( col0 ) AS col1 FROM tab2
----
7
78
79

query I rowsort
SELECT ALL 63 * col0 + + col2 FROM tab0 AS cor0
----
1545
2206
5689

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6603
SELECT DISTINCT + col2 + cor0.col2 - - CAST( NULL AS SIGNED ) * col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6603
SELECT DISTINCT + col2 + cor0.col2 - - CAST ( NULL AS INTEGER ) * col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - 40 * col2 + + 2 + - col2 FROM tab2 cor0
----
-1064
-1105
-1556

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6605
SELECT DISTINCT - + col0 - col2 * - CAST( - 46 AS SIGNED ) AS col0 FROM tab1 cor0
----
-2487
-2686
-4496

skipif mysql # not compatible
query I rowsort label-6605
SELECT DISTINCT - + col0 - col2 * - CAST ( - 46 AS INTEGER ) AS col0 FROM tab1 cor0
----
-2487
-2686
-4496

query I rowsort
SELECT + - 32 AS col1 FROM tab1 AS cor0
----
-32
-32
-32

query I rowsort
SELECT DISTINCT + cor0.col1 + cor0.col2 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-6608
SELECT ALL - col2 DIV col0 + - col2 * cor0.col1 FROM tab2 AS cor0
----
-1534
-646
-840

skipif mysql # not compatible
query I rowsort label-6608
SELECT ALL - col2 / col0 + - col2 * cor0.col1 FROM tab2 AS cor0
----
-1534
-646
-840

query I rowsort
SELECT DISTINCT col2 * col1 + col1 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT ALL col1 * ( + cor0.col1 ) FROM tab1 cor0
----
100
169
676

query I rowsort
SELECT ALL - col2 * + col2 + + col0 AS col0 FROM tab2 AS cor0
----
-1365
-598
-722

query I rowsort
SELECT - col2 * + col2 - - cor0.col1 FROM tab1 AS cor0
----
-2890
-3239
-9203

query I rowsort
SELECT DISTINCT - cor0.col0 + + col0 AS col0 FROM tab0 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 + - 95 * - cor0.col0 col1 FROM tab0 AS cor0
----
2304
3360
8544

query I rowsort
SELECT ALL col2 * - 25 AS col0 FROM tab0 AS cor0
----
-2050
-25
-825

query I rowsort
SELECT - 77 * col2 + + 79 FROM tab1
----
-4079
-4310
-7313

query I rowsort
SELECT ALL - ( - col2 ) - cor0.col0 AS col0 FROM tab0 AS cor0
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-6618
SELECT DISTINCT - 21 DIV + 81 - cor0.col1 AS col2 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-6618
SELECT DISTINCT - 21 / + 81 - cor0.col1 AS col2 FROM tab2 AS cor0
----
-17
-31
-59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6619
SELECT DISTINCT - CAST( 64 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
-64

skipif mysql # not compatible
query I rowsort label-6619
SELECT DISTINCT - CAST ( 64 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - ( col1 ) * col1 + + 16 col1 FROM tab0 AS cor0
----
7412
8297
9425

query I rowsort
SELECT col2 * 24 FROM tab0 AS cor0
----
1968
24
792

query I rowsort
SELECT ALL - col1 * 22 * col2 FROM tab2 cor0
----
-14212
-18414
-33748

query I rowsort
SELECT + 68 + 9 * col1 FROM tab0 AS cor0
----
842
887
941

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 7 col1 FROM tab2 AS cor0
----
-7
-7
-7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6625
SELECT + CAST( - 94 AS SIGNED ) DIV + col0 + - ( 20 ) * col1 AS col0 FROM tab2 AS cor0
----
-1181
-341
-633

skipif mysql # not compatible
query I rowsort label-6625
SELECT + CAST ( - 94 AS INTEGER ) / + col0 + - ( 20 ) * col1 AS col0 FROM tab2 AS cor0
----
-1181
-341
-633

query I rowsort
SELECT ALL + col1 * 92 + col1 FROM tab2 cor0
----
1581
2883
5487

query I rowsort
SELECT DISTINCT 2 * 92 AS col2 FROM tab2 AS cor0
----
184

onlyif mysql # use DIV operator for integer division
query I rowsort label-6628
SELECT ALL + 86 DIV + col1 + cor0.col2 + col2 * 81 AS col2 FROM tab0 AS cor0
----
2707
6724
82

skipif mysql # not compatible
query I rowsort label-6628
SELECT ALL + 86 / + col1 + cor0.col2 + col2 * 81 AS col2 FROM tab0 AS cor0
----
2707
6724
82

query I rowsort
SELECT ALL - + 74 AS col0 FROM tab1 cor0
----
-74
-74
-74

query I rowsort
SELECT ALL + col1 * - cor0.col0 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-6631
SELECT ALL - 41 DIV + 19 FROM tab2 AS cor0
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-6631
SELECT ALL - 41 / + 19 FROM tab2 AS cor0
----
-2
-2
-2

query I rowsort
SELECT DISTINCT - 42 + - col1 AS col1 FROM tab2 AS cor0
----
-101
-59
-73

query I rowsort
SELECT DISTINCT 77 AS col1 FROM tab0 AS cor0
----
77

query I rowsort
SELECT col2 + + ( + col1 + + 17 ) FROM tab2 AS cor0
----
102
72
75

query I rowsort
SELECT + ( col1 ) + col1 FROM tab0 AS cor0
----
172
182
194

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6636
SELECT DISTINCT - CAST( NULL AS SIGNED ) + col2 AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6636
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + col2 AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - cor0.col0 * ( + cor0.col0 ) FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL + col0 - cor0.col0 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT ALL + 94 * col2 * col2 AS col2 FROM tab2
----
135736
63544
68526

query I rowsort
SELECT + 55 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 1626bd3008abd9f18cc88cdecf7b64d0

query I rowsort
SELECT DISTINCT col1 + 42 * - cor0.col2 FROM tab1 AS cor0
----
-2242
-2384
-4019

query I rowsort
SELECT + 62 * col2 * col1 AS col2 FROM tab1
----
35340
77376
87048

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6643
SELECT + CAST( cor0.col0 AS SIGNED ) + col2 AS col2 FROM tab1 AS cor0
----
121
176
57

skipif mysql # not compatible
query I rowsort label-6643
SELECT + CAST ( cor0.col0 AS INTEGER ) + col2 AS col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT + cor0.col1 + - col0 * col0 + col2 FROM tab1 AS cor0
----
-4029
-6291
71

query I rowsort
SELECT + col2 * - cor0.col0 + + col1 + 87 * - col0 AS col2 FROM tab2 AS cor0
----
-767
-8755
-9858

query I rowsort
SELECT + + col2 + col2 + col2 AS col2 FROM tab2 AS cor0
----
114
78
81

query I rowsort
SELECT + col2 + + col2 * + col2 * + 33 + + col0 FROM tab2
----
22412
24091
47769

query I rowsort
SELECT ALL col0 + + cor0.col0 AS col2 FROM tab0 cor0
----
178
48
70

query I rowsort
SELECT ALL col2 * - 99 FROM tab0 AS cor0
----
-3267
-8118
-99

query I rowsort
SELECT DISTINCT - + cor0.col0 + 86 FROM tab0 AS cor0
----
-3
51
62

query I rowsort
SELECT cor0.col0 * + 98 AS col0 FROM tab2 AS cor0
----
686
7644
7742

query I rowsort
SELECT col1 * - cor0.col1 AS col0 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL + - col0 * - 2 + ( col2 ) * col2 FROM tab0 AS cor0
----
1137
6902
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * - col2 col1 FROM tab0
----
1
1089
6724

query I rowsort
SELECT col2 * + 1 AS col2 FROM tab2 cor0
----
26
27
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6656
SELECT - + col1 + CAST( NULL AS DECIMAL ) * 71 * + col2 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6656
SELECT - + col1 + CAST ( NULL AS REAL ) * 71 * + col2 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + col1 * + 43 AS col1 FROM tab2 cor0
----
1333
2537
731

query I rowsort
SELECT - col0 * 23 + 50 FROM tab1
----
-1422
-1790
-19

query I rowsort
SELECT DISTINCT tab2.col2 + 93 AS col0 FROM tab2
----
119
120
131

query I rowsort
SELECT col0 + 23 * - col0 AS col1 FROM tab0 AS cor0
----
-1958
-528
-770

query I rowsort
SELECT + col0 * + 67 FROM tab1 AS cor0
----
201
4288
5360

query I rowsort
SELECT DISTINCT - cor0.col0 * 28 FROM tab1, tab1 AS cor0
----
-1792
-2240
-84

query I rowsort
SELECT ALL - tab0.col1 * 92 AS col1 FROM tab0
----
-7912
-8372
-8924

query I rowsort
SELECT 89 FROM tab0, tab0 cor0
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT DISTINCT + col1 + - col1 * - ( cor0.col1 ) FROM tab1 AS cor0
----
110
182
702

query I rowsort
SELECT + cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab2 AS cor2
----
81 values hashing to c4e6b1f1d28e731664a15a6f7cda4da9

query I rowsort
SELECT + col2 * cor0.col0 + - col2 AS col0 FROM tab2 cor0
----
162
2002
2964

query I rowsort
SELECT ALL + ( - col2 ) * col0 + - 12 + - 4 FROM tab0 AS cor0
----
-51
-7314
-808

query I rowsort
SELECT - cor0.col0 + col1 * col2 * - ( col2 ) AS col1 FROM tab0 cor0
----
-132
-611973
-93678

query I rowsort
SELECT ALL - - 76 * + cor0.col1 AS col2 FROM tab2 AS cor0
----
1292
2356
4484

query I rowsort
SELECT - ( cor0.col1 ) * col2 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-6672
SELECT - + col2 + cor0.col1 DIV col0 FROM tab0 AS cor0
----
-30
-81
1

skipif mysql # not compatible
query I rowsort label-6672
SELECT - + col2 + cor0.col1 / col0 FROM tab0 AS cor0
----
-30
-81
1

query I rowsort
SELECT DISTINCT - 91 + 16 * + col2 AS col1 FROM tab2 AS cor0
----
325
341
517

query I rowsort
SELECT + 7 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 4e72e9e33dacac757f48d0ce46094607

query I rowsort
SELECT DISTINCT - col0 * - 59 AS col1 FROM tab0
----
1416
2065
5251

skipif mysql # not compatible
query I rowsort
SELECT + - CAST ( - col0 AS REAL ) + col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT col1 + + col2 AS col1 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT + + col0 + + col1 * col2 AS col2 FROM tab0 AS cor0
----
132
2862
7551

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + col2 - - col1 col1 FROM tab2
----
1593
663
868

onlyif mysql # use DIV operator for integer division
query I rowsort label-6680
SELECT cor0.col1 DIV col0 FROM tab2 cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-6680
SELECT cor0.col1 / col0 FROM tab2 cor0
----
0
0
4

query I rowsort
SELECT 72 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 92cc3d5daa550304e96c1542787691c7

query I rowsort
SELECT ALL + - col1 + - col2 * col1 AS col0 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT + cor0.col0 * + 83 * col2 AS col0 FROM tab0 AS cor0
----
2905
605734
65736

query I rowsort
SELECT ALL + col2 * - col2 + - 41 + col0 * + col2 * - 83 FROM tab2 AS cor0
----
-16457
-169041
-250651

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + col2 * col0 * + col0 col0 FROM tab1 AS cor0
----
233529
540
614496

query I rowsort
SELECT - - ( + col2 ) + + col2 AS col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT + 60 + tab1.col0 * + col2 AS col2 FROM tab1
----
222
3708
7740

query I rowsort
SELECT ALL - + 6 AS col1 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to e92b2679faac7be63701967e3f0c0934

query I rowsort
SELECT DISTINCT + col0 * col2 - ( ( + col1 ) ) * col0 AS col1 FROM tab1 AS cor0
----
3008
6640
84

query I rowsort
SELECT DISTINCT - col2 * + col0 + - 58 FROM tab2 cor0
----
-2086
-247
-3060

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6691
SELECT DISTINCT - col2 + col2 * CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6691
SELECT DISTINCT - col2 + col2 * CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT col1 * col2 + + col1 * - ( - col2 ) FROM tab0 cor0
----
14924
194
5676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 89 + + col1 * col1 col0 FROM tab1 cor0
----
11
587
80

query I rowsort
SELECT col2 + + ( col0 ) AS col2 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT DISTINCT - col0 + col2 * col1 AS col1 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT - col1 * + 75 FROM tab2 AS cor0
----
-1275
-2325
-4425

onlyif mysql # use DIV operator for integer division
query I rowsort label-6697
SELECT DISTINCT + - col0 DIV cor0.col0 AS col0 FROM tab1 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-6697
SELECT DISTINCT + - col0 / cor0.col0 AS col0 FROM tab1 AS cor0
----
-1

query I rowsort
SELECT - col2 * col2 * - 65 FROM tab1 AS cor0
----
189540
211185
599040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 71 col2 FROM tab0, tab0 AS cor0
----
9 values hashing to e72f95c346714d3065a96d67a6fd5062

onlyif mysql # use DIV operator for integer division
query I rowsort label-6700
SELECT + cor0.col2 + - 48 DIV col1 AS col1 FROM tab1 AS cor0
----
53
53
93

skipif mysql # not compatible
query I rowsort label-6700
SELECT + cor0.col2 + - 48 / col1 AS col1 FROM tab1 AS cor0
----
53
53
93

query I rowsort
SELECT + 47 AS col2 FROM tab2
----
47
47
47

query I rowsort
SELECT ( - col2 ) + col2 AS col0 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL + + col2 * col2 - + col2 FROM tab0 cor0
----
0
1056
6642

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6704
SELECT DISTINCT CAST( NULL AS SIGNED ) * col1 - - col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6704
SELECT DISTINCT CAST ( NULL AS INTEGER ) * col1 - - col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT - 33 * + col2 + col2 * - col0 AS col1 FROM tab0 AS cor0
----
-10004
-1881
-68

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6706
SELECT ALL - CAST( NULL AS DECIMAL ) * 77 + col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6706
SELECT ALL - CAST ( NULL AS REAL ) * 77 + col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - ( + cor0.col0 ) ) col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT - cor0.col1 FROM tab0, tab0 AS cor0, tab0 cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT ALL + cor0.col2 + - cor0.col1 * - col2 AS col1 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT ALL cor0.col2 * + col0 * cor0.col1 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT DISTINCT + col0 * 78 AS col1 FROM tab1
----
234
4992
6240

query I rowsort
SELECT + 43 AS col1 FROM tab1
----
43
43
43

query I rowsort
SELECT ALL ( col0 * tab1.col0 ) AS col2 FROM tab1
----
4096
6400
9

query I rowsort
SELECT DISTINCT - col1 * tab1.col0 * - tab1.col0 AS col1 FROM tab1
----
234
40960
83200

query I rowsort
SELECT - 80 - tab1.col2 AS col1 FROM tab1
----
-134
-137
-176

query I rowsort
SELECT col1 + col1 * - col0 AS col1 FROM tab0
----
-1978
-3298
-8008

query I rowsort
SELECT - cor0.col2 * - tab2.col1 AS col1 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to c3fd7ac1d848da6e54fad73fc607f7da

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 33 col0 FROM tab1 cor0
----
33
33
33

query I rowsort
SELECT ALL + 35 * - col2 FROM tab1
----
-1890
-1995
-3360

query I rowsort
SELECT ALL + col1 * 19 * col2 FROM tab1
----
10830
23712
26676

onlyif mysql # use DIV operator for integer division
query I rowsort label-6721
SELECT + ( + ( - tab2.col1 ) ) + col2 DIV tab2.col0 FROM tab2
----
-17
-28
-59

skipif mysql # not compatible
query I rowsort label-6721
SELECT + ( + ( - tab2.col1 ) ) + col2 / tab2.col0 FROM tab2
----
-17
-28
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-6722
SELECT ALL ( col2 ) + + col2 DIV + col1 FROM tab2
----
26
27
40

skipif mysql # not compatible
query I rowsort label-6722
SELECT ALL ( col2 ) + + col2 / + col1 FROM tab2
----
26
27
40

query I rowsort
SELECT ALL 42 AS col1 FROM tab2, tab1 AS cor0, tab1 cor1
----
27 values hashing to 325aada2239b6fe1fe2d843515ae8c5e

query I rowsort
SELECT DISTINCT + 11 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
11

query I rowsort
SELECT DISTINCT 95 FROM tab0, tab2, tab0 AS cor0
----
95

query I rowsort
SELECT DISTINCT + 40 AS col1 FROM tab0 AS cor0
----
40

query I rowsort
SELECT ALL 44 * col1 AS col2 FROM tab2 AS cor0
----
1364
2596
748

query I rowsort
SELECT + - ( - col1 ) * - col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL - 5 + + col0 AS col1 FROM tab2 AS cor0
----
2
73
74

query I rowsort
SELECT - 38 * - col2 AS col1 FROM tab2 cor0
----
1026
1444
988

query I rowsort
SELECT DISTINCT ( col2 ) * + col0 AS col1 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT 33 * + col0 AS col0 FROM tab0 AS cor0
----
1155
2937
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-6733
SELECT tab1.col2 DIV ( - ( - col0 ) ) AS col1 FROM tab1
----
0
1
18

skipif mysql # not compatible
query I rowsort label-6733
SELECT tab1.col2 / ( - ( - col0 ) ) AS col1 FROM tab1
----
0
1
18

query I rowsort
SELECT ALL + col1 + col1 * - col0 FROM tab0
----
-1978
-3298
-8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-6735
SELECT - col0 DIV col0 + col0 AS col0 FROM tab1
----
2
63
79

skipif mysql # not compatible
query I rowsort label-6735
SELECT - col0 / col0 + col0 AS col0 FROM tab1
----
2
63
79

query I rowsort
SELECT - col1 + ( 3 + col1 ) * + 36 FROM tab2
----
1193
2173
703

onlyif mysql # use DIV operator for integer division
query I rowsort label-6737
SELECT + tab1.col2 DIV + cor0.col1 + cor0.col2 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to f15c956f28cf5117a5c098a70047309f

skipif mysql # not compatible
query I rowsort label-6737
SELECT + tab1.col2 / + cor0.col1 + cor0.col2 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to f15c956f28cf5117a5c098a70047309f

query I rowsort
SELECT + col2 * + col1 * - 71 + col0 AS col0 FROM tab1
----
-40406
-88528
-99681

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6739
SELECT ALL - col2 + - CAST( + col1 AS SIGNED ) AS col0 FROM tab2
----
-55
-58
-85

skipif mysql # not compatible
query I rowsort label-6739
SELECT ALL - col2 + - CAST ( + col1 AS INTEGER ) AS col0 FROM tab2
----
-55
-58
-85

query I rowsort
SELECT DISTINCT - col2 + col1 + col2 AS col1 FROM tab0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6741
SELECT ALL + cor0.col2 DIV col0 AS col2 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6741
SELECT ALL + cor0.col2 / col0 AS col2 FROM tab0 AS cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-6742
SELECT ALL col2 DIV + 87 + - 36 FROM tab1 AS cor0
----
-35
-36
-36

skipif mysql # not compatible
query I rowsort label-6742
SELECT ALL col2 / + 87 + - 36 FROM tab1 AS cor0
----
-35
-36
-36

query I rowsort
SELECT ALL cor0.col0 * + ( - 70 ) FROM tab0 AS cor0
----
-1680
-2450
-6230

query I rowsort
SELECT col0 + + 94 FROM tab1 AS cor0
----
158
174
97

query I rowsort
SELECT DISTINCT + 24 FROM tab0, tab2 AS cor0
----
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-6746
SELECT col1 DIV + tab2.col1 col0 FROM tab2
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6746
SELECT col1 / + tab2.col1 col0 FROM tab2
----
1
1
1

query I rowsort
SELECT DISTINCT - col0 * + col2 + - col1 * tab1.col2 AS col2 FROM tab1
----
-1566
-4218
-8928

query I rowsort
SELECT ALL + col2 + 85 * - col1 AS col2 FROM tab1 AS cor0
----
-1009
-2156
-793

query I rowsort
SELECT DISTINCT + col0 * 36 FROM tab2 AS cor0
----
252
2808
2844

query I rowsort
SELECT - - col0 * col2 * + col2 FROM tab2 AS cor0
----
114076
5103
52728

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6751
SELECT ALL - + CAST( NULL AS SIGNED ) * 76 + + col2 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6751
SELECT ALL - + CAST ( NULL AS INTEGER ) * 76 + + col2 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6752
SELECT + CAST( col0 AS SIGNED ) + col1 FROM tab0 AS cor0
----
110
132
180

skipif mysql # not compatible
query I rowsort label-6752
SELECT + CAST ( col0 AS INTEGER ) + col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT col0 + 71 FROM tab0 AS cor0
----
106
160
95

query I rowsort
SELECT ALL - col1 + + 31 + - cor0.col1 FROM tab1 AS cor0
----
-21
11
5

query I rowsort
SELECT - 42 * 28 + + col1 + 24 * 44 AS col2 FROM tab2 cor0
----
-103
-61
-89

query I rowsort
SELECT 13 * - 24 AS col0 FROM tab2 AS cor0
----
-312
-312
-312

query I rowsort
SELECT ALL + col1 * col0 + col2 * 29 AS col1 FROM tab1 cor0
----
1644
2293
3824

query I rowsort
SELECT 78 + + col0 FROM tab0 AS cor0
----
102
113
167

onlyif mysql # use DIV operator for integer division
query I rowsort label-6759
SELECT DISTINCT col2 DIV col1 + col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-6759
SELECT DISTINCT col2 / col1 + col1 FROM tab0
----
86
91
97

query I rowsort
SELECT ALL + + ( 1 ) * + col0 AS col2 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT DISTINCT - 77 * 17 AS col1 FROM tab1 AS cor0
----
-1309

query I rowsort
SELECT + 85 + col1 FROM tab0 AS cor0
----
171
176
182

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6763
SELECT DISTINCT + - CAST( NULL AS SIGNED ) + 68 * col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6763
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) + 68 * col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + ( + col0 + col1 * - 73 ) FROM tab2
----
-1162
-2256
-4229

query I rowsort
SELECT ALL - col1 + + col1 * + col2 * - col2 AS col0 FROM tab0 AS cor0
----
-194
-611975
-93740

onlyif mysql # use DIV operator for integer division
query I rowsort label-6766
SELECT ALL 80 * - cor0.col1 - col0 DIV col1 FROM tab2 AS cor0
----
-1364
-2480
-4721

skipif mysql # not compatible
query I rowsort label-6766
SELECT ALL 80 * - cor0.col1 - col0 / col1 FROM tab2 AS cor0
----
-1364
-2480
-4721

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2, tab2 cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col1 FROM tab1, tab0 AS cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-6769
SELECT + col2 + col2 - col1 DIV + col0 AS col1 FROM tab1 AS cor0
----
100
114
192

skipif mysql # not compatible
query I rowsort label-6769
SELECT + col2 + col2 - col1 / + col0 AS col1 FROM tab1 AS cor0
----
100
114
192

query I rowsort
SELECT - - col2 * ( - 1 ) * - col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL - 80 * 26 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 64b95e263d8382c35a770eb5da21fd7d

query I rowsort
SELECT - col2 + - col1 * - col0 FROM tab2 AS cor0
----
1305
190
4576

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6773
SELECT + col0 + CAST( NULL AS SIGNED ) * - col2 / + col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6773
SELECT + col0 + CAST ( NULL AS INTEGER ) * - col2 / + col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - col2 * + col1 * + col0 - col0 col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT - col0 * + ( - col2 ) FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT + 70 + + col0 AS col0 FROM tab0 cor0
----
105
159
94

query I rowsort
SELECT ALL col2 + col2 + - col0 FROM tab1 AS cor0
----
105
112
50

query I rowsort
SELECT DISTINCT + ( - col2 ) AS col0 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT - cor0.col2 * - col2 + + col2 AS col1 FROM tab0 AS cor0
----
1122
2
6806

onlyif mysql # use DIV operator for integer division
query I rowsort label-6780
SELECT ALL col1 DIV + 30 FROM tab0 AS cor0
----
2
3
3

skipif mysql # not compatible
query I rowsort label-6780
SELECT ALL col1 / + 30 FROM tab0 AS cor0
----
2
3
3

query I rowsort
SELECT 80 + - col2 AS col1 FROM tab1 AS cor0
----
-16
23
26

query I rowsort
SELECT + - cor0.col2 + ( col1 ) * - col2 AS col0 FROM tab0 cor0
----
-2871
-7544
-98

query I rowsort
SELECT ALL + + 7 + col0 FROM tab1 AS cor0
----
10
71
87

query I rowsort
SELECT + - col0 * cor0.col0 AS col2 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL + - 9 * col2 - col1 FROM tab0 AS cor0
----
-106
-383
-829

query I rowsort
SELECT + 56 AS col0 FROM tab0 cor0
----
56
56
56

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6787
SELECT col2 * + cor0.col0 + + CAST( ( col2 ) AS SIGNED ) * cor0.col2 AS col1 FROM tab1 AS cor0
----
16896
3078
6897

skipif mysql # not compatible
query I rowsort label-6787
SELECT col2 * + cor0.col0 + + CAST ( ( col2 ) AS INTEGER ) * cor0.col2 AS col1 FROM tab1 AS cor0
----
16896
3078
6897

query I rowsort
SELECT DISTINCT + 57 AS col0 FROM tab1
----
57

query I rowsort
SELECT cor1.col2 AS col2 FROM tab2, tab2 AS cor0, tab1, tab1 cor1
----
81 values hashing to 9d355f1f2edc347a359dad00d2d3f886

query I rowsort
SELECT col0 * tab1.col0 + col0 AS col2 FROM tab1
----
12
4160
6480

query I rowsort
SELECT - + cor0.col2 + - col0 AS col1 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT cor0.col1 * col1 AS col2 FROM tab0 cor0
----
7396
8281
9409

query I rowsort
SELECT - - 79 FROM tab0 cor0
----
79
79
79

query I rowsort
SELECT DISTINCT + - col0 * - cor0.col0 AS col1 FROM tab2 AS cor0
----
49
6084
6241

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 DISTINCT ( col1 ) * 50 AS col2 FROM tab0 AS cor0
----
4300
4550
4850

query I rowsort
SELECT ALL - cor0.col2 + cor0.col2 * - col2 AS col1 FROM tab1 AS cor0
----
-2970
-3306
-9312

query I rowsort
SELECT DISTINCT 74 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
74

query I rowsort
SELECT + 64 * cor0.col1 + col0 AS col1 FROM tab0 AS cor0
----
5528
5913
6243

query I rowsort
SELECT + 39 FROM tab1, tab0 cor0
----
9 values hashing to 5ecc4d3de68ae828a2d522dff8571cbf

query I rowsort
SELECT 26 AS col0 FROM tab1, tab0 cor0
----
9 values hashing to 2d1c3129ed17fd721d4876b21c035584

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6802
SELECT ALL - CAST( + col1 AS SIGNED ) AS col1 FROM tab2
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-6802
SELECT ALL - CAST ( + col1 AS INTEGER ) AS col1 FROM tab2
----
-17
-31
-59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6803
SELECT ALL - CAST( col0 AS SIGNED ) FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-6803
SELECT ALL - CAST ( col0 AS INTEGER ) FROM tab0
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-6804
SELECT + 88 DIV + col1 AS col0 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6804
SELECT + 88 / + col1 AS col0 FROM tab0 AS cor0
----
0
0
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6805
SELECT + + ( col1 ) + + cor0.col2 / CAST( NULL AS DECIMAL ) + + col1 * - col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6805
SELECT + + ( col1 ) + + cor0.col2 / CAST ( NULL AS REAL ) + + col1 * - col2 FROM tab2 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6806
SELECT - col1 DIV + 91 AS col0 FROM tab0 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-6806
SELECT - col1 / + 91 AS col0 FROM tab0 AS cor0
----
-1
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6807
SELECT ( - col1 * col1 ) + + col0 * col2 DIV col0 col1 FROM tab0
----
-7363
-8199
-9408

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6807
SELECT ( - col1 * col1 ) + + col0 * col2 / col0 col1 FROM tab0
----
-7363
-8199
-9408

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 53 * - cor0.col2 + col1 + col2 col2 FROM tab0 AS cor0
----
151
1868
4519

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col2 FROM tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT DISTINCT + + col2 + + ( - col1 ) * - col0 AS col2 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT ALL - cor0.col1 * + ( + 53 ) + - cor0.col1 * + col2 AS col2 FROM tab0 AS cor0
----
-12285
-5238
-7396

query I rowsort
SELECT col0 * - cor0.col2 AS col0 FROM tab1 cor0
----
-162
-3648
-7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6813
SELECT ALL - col2 * + CAST( NULL AS SIGNED ) + col1 * col0 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6813
SELECT ALL - col2 * + CAST ( NULL AS INTEGER ) + col1 * col0 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6814
SELECT DISTINCT - col2 DIV - col2 - + 59 FROM tab1 AS cor0
----
-58

skipif mysql # not compatible
query I rowsort label-6814
SELECT DISTINCT - col2 / - col2 - + 59 FROM tab1 AS cor0
----
-58

query I rowsort
SELECT - - col1 * ( col0 ) + col0 * + col0 * 97 FROM tab0 cor0
----
122220
57936
776436

onlyif mysql # use DIV operator for integer division
query I rowsort label-6816
SELECT + - cor0.col1 DIV - col1 + col0 FROM tab1 cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-6816
SELECT + - cor0.col1 / - col1 + col0 FROM tab1 cor0
----
4
65
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * ( + col0 ) - - col1 col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT col2 * - col0 + + col0 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT - col1 + + ( col0 ) AS col2 FROM tab1
----
-23
54
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-6820
SELECT ALL + col0 DIV col1 + - ( col0 ) FROM tab1 AS cor0
----
-3
-58
-74

skipif mysql # not compatible
query I rowsort label-6820
SELECT ALL + col0 / col1 + - ( col0 ) FROM tab1 AS cor0
----
-3
-58
-74

query I rowsort
SELECT DISTINCT col2 * ( - 22 ) AS col0 FROM tab1 AS cor0
----
-1188
-1254
-2112

query I rowsort
SELECT DISTINCT - col2 * 27 AS col0 FROM tab0 AS cor0
----
-2214
-27
-891

query I rowsort
SELECT - col1 * 79 AS col2 FROM tab1 AS cor0
----
-1027
-2054
-790

query I rowsort
SELECT + 3 * 32 FROM tab2 cor0
----
96
96
96

query I rowsort
SELECT ALL 89 + cor0.col1 AS col2 FROM tab2 AS cor0
----
106
120
148

query I rowsort
SELECT DISTINCT col1 + - 84 AS col2 FROM tab2 AS cor0
----
-25
-53
-67

query I rowsort
SELECT + ( + cor0.col1 ) * + cor0.col1 AS col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT cor0.col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab0, tab2 AS cor0, tab1 cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6830
SELECT - + CAST( - col1 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-6830
SELECT - + CAST ( - col1 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL - ( - col2 ) * + col0 + + ( col0 ) * + col0 * + col1 FROM tab1 AS cor0
----
396
44608
90880

query I rowsort
SELECT ALL - cor1.col1 + + cor1.col2 AS col2 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 546a494e1798cb1c65d1510d48d04dff

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col0 * - cor0.col2 col1 FROM tab2 AS cor0
----
-2087
-220
-3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-6834
SELECT - tab1.col1 * col2 + - col1 DIV + tab1.col1 + col0 FROM tab1
----
-1169
-1402
-507

skipif mysql # not compatible
query I rowsort label-6834
SELECT - tab1.col1 * col2 + - col1 / + tab1.col1 + col0 FROM tab1
----
-1169
-1402
-507

query I rowsort
SELECT DISTINCT 67 FROM tab1, tab1 cor0
----
67

query I rowsort
SELECT - 9 * - col1 + + col1 * + col2 AS col2 FROM tab2 AS cor0
----
1116
2065
799

query I rowsort
SELECT ALL - col1 * col1 + col2 FROM tab1 AS cor0
----
-43
-622
-73

query I rowsort
SELECT DISTINCT + + col0 * - cor0.col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + + col2 * - col2 + + col0 * col0 AS col2 FROM tab2 cor0
----
-680
4797
5408

query I rowsort
SELECT DISTINCT + col1 - 20 * - 73 FROM tab1 cor0
----
1470
1473
1486

query I rowsort
SELECT ALL + + col0 + col1 * + col1 FROM tab1 AS cor0
----
164
249
679

onlyif mysql # use DIV operator for integer division
query I rowsort label-6842
SELECT + + col0 + - 41 DIV col2 FROM tab0 AS cor0
----
-6
23
89

skipif mysql # not compatible
query I rowsort label-6842
SELECT + + col0 + - 41 / col2 FROM tab0 AS cor0
----
-6
23
89

query I rowsort
SELECT ALL - cor0.col0 * - 87 + col2 AS col1 FROM tab1 AS cor0
----
315
5625
7056

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + 51 * col0 col1 FROM tab1 cor0
----
156
3328
4160

onlyif mysql # use DIV operator for integer division
query I rowsort label-6845
SELECT DISTINCT col0 + + col2 + + 87 DIV col0 AS col0 FROM tab0 AS cor0
----
171
38
60

skipif mysql # not compatible
query I rowsort label-6845
SELECT DISTINCT col0 + + col2 + + 87 / col0 AS col0 FROM tab0 AS cor0
----
171
38
60

query I rowsort
SELECT 56 * tab1.col1 * + tab1.col0 FROM tab1
----
35840
4368
58240

query I rowsort
SELECT DISTINCT + col1 + col0 * - 36 * + col2 FROM tab2
----
-108055
-6773
-72949

query I rowsort
SELECT ALL - 16 + + col2 AS col2 FROM tab2
----
10
11
22

query I rowsort
SELECT ALL + - col1 * 68 + + 62 AS col1 FROM tab0 AS cor0
----
-5786
-6126
-6534

query I rowsort
SELECT - col0 + col1 * - col2 * col0 AS col1 FROM tab0 AS cor0
----
-3430
-664207
-68136

query I rowsort
SELECT DISTINCT - 84 AS col1 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
-84

query I rowsort
SELECT ALL col1 * + col1 + 79 AS col0 FROM tab0 AS cor0
----
7475
8360
9488

onlyif mysql # use DIV operator for integer division
query I rowsort label-6853
SELECT DISTINCT - col1 + + col2 + - col2 DIV + col1 AS col0 FROM tab2
----
-33
-4
19

skipif mysql # not compatible
query I rowsort label-6853
SELECT DISTINCT - col1 + + col2 + - col2 / + col1 AS col0 FROM tab2
----
-33
-4
19

onlyif mysql # use DIV operator for integer division
query I rowsort label-6854
SELECT DISTINCT col2 + col1 * col0 DIV col1 AS col2 FROM tab1
----
121
176
57

skipif mysql # not compatible
query I rowsort label-6854
SELECT DISTINCT col2 + col1 * col0 / col1 AS col2 FROM tab1
----
121
176
57

query I rowsort
SELECT + - ( col0 ) * - cor0.col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + tab1.col2 * col2 + + tab1.col0 * col0 AS col2 FROM tab1
----
15616
2925
7345

query I rowsort
SELECT tab0.col0 * col1 + - col1 AS col0 FROM tab0
----
1978
3298
8008

query I rowsort
SELECT - col1 + + 12 FROM tab2
----
-19
-47
-5

query I rowsort
SELECT - cor0.col0 * 0 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT col0 + + 37 FROM tab0
----
126
61
72

query I rowsort
SELECT + col1 + + 11 FROM tab2
----
28
42
70

query I rowsort
SELECT ALL + + col0 + + cor0.col1 AS col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL - ( + col0 ) * - 58 * + 28 FROM tab1 AS cor0
----
103936
129920
4872

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6864
SELECT cor0.col0 + + col1 * - CAST( NULL AS SIGNED ) AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6864
SELECT cor0.col0 + + col1 * - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( - col0 * col2 ) + + col0 AS col1 FROM tab2
----
-182
-1950
-2923

query I rowsort
SELECT - + col2 + col2 * cor0.col1 AS col1 FROM tab2 AS cor0
----
1508
608
810

onlyif mysql # use DIV operator for integer division
query I rowsort label-6867
SELECT DISTINCT col0 DIV col2 AS col0 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-6867
SELECT DISTINCT col0 / col2 AS col0 FROM tab0 AS cor0
----
0
1
35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6868
SELECT ALL col2 * + tab1.col0 + - CAST( + 4 AS SIGNED ) * col0 FROM tab1
----
150
3392
7360

skipif mysql # not compatible
query I rowsort label-6868
SELECT ALL col2 * + tab1.col0 + - CAST ( + 4 AS INTEGER ) * col0 FROM tab1
----
150
3392
7360

query I rowsort
SELECT + 69 AS col1 FROM tab2 cor0
----
69
69
69

query I rowsort
SELECT - 98 * col0 + 99 FROM tab2 AS cor0
----
-587
-7545
-7643

query I rowsort
SELECT ALL + cor0.col2 * - cor0.col2 + - 59 * + col2 FROM tab2 AS cor0
----
-2210
-2322
-3686

query I rowsort
SELECT ALL + - col2 * - col2 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT + - 92 FROM tab2 AS cor0
----
-92

query I rowsort
SELECT 53 * + col2 + + 46 AS col1 FROM tab0 AS cor0
----
1795
4392
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col2 * - col1 col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT - 6 * cor0.col2 FROM tab0 AS cor0
----
-198
-492
-6

query I rowsort
SELECT + col1 * + cor0.col2 + + col2 * - col2 - col0 FROM tab1 AS cor0
----
-1515
-2743
-8048

query I rowsort
SELECT + col2 * + col0 + + col1 FROM tab2 AS cor0
----
2087
220
3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-6879
SELECT ALL + - col1 + - col1 DIV - 40 FROM tab2 AS cor0
----
-17
-31
-58

skipif mysql # not compatible
query I rowsort label-6879
SELECT ALL + - col1 + - col1 / - 40 FROM tab2 AS cor0
----
-17
-31
-58

query I rowsort
SELECT - col2 * - ( + col2 ) AS col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT ALL col1 * tab2.col2 AS col1 FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT - ( 93 * - col1 ) AS col0 FROM tab2
----
1581
2883
5487

query I rowsort
SELECT DISTINCT ( col0 + + col1 ) FROM tab0
----
110
132
180

query I rowsort
SELECT DISTINCT - 0 AS col0 FROM tab1, tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT 21 * - col2 * col1 AS col0 FROM tab2
----
-13566
-17577
-32214

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col2 col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT ALL col1 * + 63 AS col2 FROM tab1
----
1638
630
819

query I rowsort
SELECT cor0.col2 * - cor0.col1 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to c52f276f0448e9317aa4a2c462e0bab5

query I rowsort
SELECT - - 72 + 13 * col1 FROM tab1 AS cor0
----
202
241
410

query I rowsort
SELECT + 60 AS col1 FROM tab1
----
60
60
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 90 col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

query I rowsort
SELECT DISTINCT - ( col1 + col2 * - col1 ) AS col0 FROM tab0
----
0
2752
7371

query I rowsort
SELECT DISTINCT + 75 AS col2 FROM tab2
----
75

skipif mysql # not compatible
query I rowsort
SELECT CAST ( + col0 AS REAL ) AS col1 FROM tab0
----
24
35
89

query I rowsort
SELECT ( - col1 ) + ( col1 ) AS col2 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * + col0 col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT - 2 * - tab0.col1 FROM tab0
----
172
182
194

query I rowsort
SELECT + 46 + + col1 AS col1 FROM tab0
----
132
137
143

query I rowsort
SELECT DISTINCT + col1 * col0 * + 16 FROM tab1
----
10240
1248
16640

query I rowsort
SELECT ALL 2 * col0 * - 39 FROM tab2
----
-546
-6084
-6162

query I rowsort
SELECT col2 * - 63 * - col1 AS col2 FROM tab0 AS cor0
----
178794
470106
6111

query I rowsort
SELECT + col2 + ( cor0.col1 ) * - col2 + col2 AS col2 FROM tab2 AS cor0
----
-1482
-570
-783

query I rowsort
SELECT + col1 * + 40 FROM tab2 AS cor0
----
1240
2360
680

query I rowsort
SELECT - col1 * 42 * + col2 + + col2 AS col0 FROM tab0 AS cor0
----
-119163
-313322
-4073

query I rowsort
SELECT - col0 * - 46 + - col0 + col0 * + col1 FROM tab2 cor0
----
4898
532
8112

query I rowsort
SELECT + col2 + col2 + + col0 AS col0 FROM tab1
----
111
178
272

query I rowsort
SELECT DISTINCT col1 + col2 + col0 FROM tab0
----
133
143
262

query I rowsort
SELECT - tab0.col2 + + col0 - col2 * tab0.col0 AS col2 FROM tab0
----
-1
-7291
-801

query I rowsort
SELECT ALL + tab2.col1 + - col1 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6910
SELECT DISTINCT col0 + col2 * col1 DIV col0 + - col1 * col0 FROM tab0
----
-1922
-3358
-7927

skipif mysql # not compatible
query I rowsort label-6910
SELECT DISTINCT col0 + col2 * col1 / col0 + - col1 * col0 FROM tab0
----
-1922
-3358
-7927

query I rowsort
SELECT DISTINCT + col0 + - col0 * tab0.col1 AS col2 FROM tab0
----
-2040
-3360
-8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-6912
SELECT DISTINCT - tab1.col2 DIV col2 + - col1 AS col1 FROM tab1
----
-11
-14
-27

skipif mysql # not compatible
query I rowsort label-6912
SELECT DISTINCT - tab1.col2 / col2 + - col1 AS col1 FROM tab1
----
-11
-14
-27

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab0, tab2 cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT - col1 * col2 + cor0.col0 AS col0 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT ALL - col0 + - col2 * cor0.col0 AS col0 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT ALL + + col2 * cor0.col2 * + col2 AS col2 FROM tab2 AS cor0
----
17576
19683
54872

query I rowsort
SELECT DISTINCT - col0 * col2 * col0 + - cor0.col1 * - col2 AS col2 FROM tab2 AS cor0
----
-156650
-236512
-486

onlyif mysql # use DIV operator for integer division
query I rowsort label-6918
SELECT col0 DIV cor0.col0 AS col1 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6918
SELECT col0 / cor0.col0 AS col1 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT col2 + col0 + col2 AS col0 FROM tab2 AS cor0
----
130
155
61

query I rowsort
SELECT ALL cor0.col1 * + col2 AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT col1 - col0 * - col2 * tab0.col1 AS col2 FROM tab0
----
3492
664209
68198

onlyif mysql # use DIV operator for integer division
query I rowsort label-6922
SELECT 76 + col1 DIV + col1 + col0 * + tab2.col0 AS col0 FROM tab2
----
126
6161
6318

skipif mysql # not compatible
query I rowsort label-6922
SELECT 76 + col1 / + col1 + col0 * + tab2.col0 AS col0 FROM tab2
----
126
6161
6318

query I rowsort
SELECT - + col0 * cor0.col0 AS col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT - 78 AS col2 FROM tab1 AS cor0
----
-78
-78
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + col2 * col1 col2 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT ALL + ( + col2 ) * col0 * - col0 - - col2 * col1 AS col1 FROM tab1 AS cor0
----
-232902
-613152
918

onlyif mysql # use DIV operator for integer division
query I rowsort label-6927
SELECT + - col0 * col0 + col2 DIV cor0.col1 + - cor0.col0 FROM tab0 AS cor0
----
-1260
-600
-8010

skipif mysql # not compatible
query I rowsort label-6927
SELECT + - col0 * col0 + col2 / cor0.col1 + - cor0.col0 FROM tab0 AS cor0
----
-1260
-600
-8010

query I rowsort
SELECT ALL + + cor0.col1 + + col0 + + col2 * cor0.col1 FROM tab2 cor0
----
1671
742
875

onlyif mysql # use DIV operator for integer division
query I rowsort label-6929
SELECT col0 * col2 + col2 * + col1 + + col2 DIV - col0 FROM tab2 cor0
----
1023
3562
3648

skipif mysql # not compatible
query I rowsort label-6929
SELECT col0 * col2 + col2 * + col1 + + col2 / - col0 FROM tab2 cor0
----
1023
3562
3648

query I rowsort
SELECT ALL - col2 - - col0 FROM tab1 AS cor0
----
-16
-51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6931
SELECT ALL - col2 DIV + col2 + - 55 * col0 AS col2 FROM tab1 AS cor0
----
-166
-3521
-4401

skipif mysql # not compatible
query I rowsort label-6931
SELECT ALL - col2 / + col2 + - 55 * col0 AS col2 FROM tab1 AS cor0
----
-166
-3521
-4401

query I rowsort
SELECT - col0 * - col0 + + cor0.col2 * + 48 AS col0 FROM tab1 AS cor0
----
11008
2601
6832

query I rowsort
SELECT ALL col0 + - ( + col2 ) * 20 FROM tab2
----
-442
-533
-681

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6934
SELECT ALL CAST( NULL AS SIGNED ) + - col1 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6934
SELECT ALL CAST ( NULL AS INTEGER ) + - col1 AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - 76 FROM tab1 AS cor0
----
76

query I rowsort
SELECT 60 * + col0 + 65 * col0 FROM tab0 AS cor0
----
11125
3000
4375

query I rowsort
SELECT ALL - 14 * col1 FROM tab0 AS cor0
----
-1204
-1274
-1358

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6938
SELECT ALL col0 * - col2 * CAST( NULL AS SIGNED ) col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6938
SELECT ALL col0 * - col2 * CAST ( NULL AS INTEGER ) col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6939
SELECT ALL + + cor0.col0 DIV + col1 FROM tab1 AS cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-6939
SELECT ALL + + cor0.col0 / + col1 FROM tab1 AS cor0
----
0
6
6

query I rowsort
SELECT ALL + 43 * col1 + col0 + - tab0.col2 FROM tab0
----
3689
3920
4205

query I rowsort
SELECT - col2 * col0 + col0 * col2 + + col1 AS col0 FROM tab0
----
86
91
97

query I rowsort
SELECT ALL - tab1.col1 + - col2 AS col2 FROM tab1
----
-109
-67
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6943
SELECT CAST( - 56 AS SIGNED ) * + col2 + tab0.col0 col0 FROM tab0
----
-1824
-21
-4503

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6943
SELECT CAST ( - 56 AS INTEGER ) * + col2 + tab0.col0 col0 FROM tab0
----
-1824
-21
-4503

query I rowsort
SELECT - 35 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to c12e8bdd687c9040a5600dab3b6adf5b

query I rowsort
SELECT ALL tab1.col0 * col2 * - col1 + 79 AS col1 FROM tab1
----
-36401
-4133
-99761

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6946
SELECT tab0.col1 + col1 * + CAST( NULL AS SIGNED ) AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6946
SELECT tab0.col1 + col1 * + CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + 67 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

query I rowsort
SELECT DISTINCT + tab0.col2 AS col2 FROM tab0, tab1 cor0, tab1 cor1
----
1
33
82

query I rowsort
SELECT DISTINCT - col1 * cor0.col1 AS col2 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT DISTINCT + - 14 + - col1 * + 29 FROM tab2 cor0
----
-1725
-507
-913

onlyif mysql # use DIV operator for integer division
query I rowsort label-6951
SELECT ALL col0 * col0 DIV + cor0.col1 FROM tab0 AS cor0
----
12
6
87

skipif mysql # not compatible
query I rowsort label-6951
SELECT ALL col0 * col0 / + cor0.col1 FROM tab0 AS cor0
----
12
6
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( col1 ) col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT + 61 + + col2 * col2 FROM tab1 AS cor0
----
2977
3310
9277

query I rowsort
SELECT ALL - 8 * - col1 AS col0 FROM tab0 AS cor0
----
688
728
776

query I rowsort
SELECT 45 + - col1 FROM tab0 AS cor0
----
-41
-46
-52

onlyif mysql # use DIV operator for integer division
query I rowsort label-6956
SELECT DISTINCT - ( - col1 ) * cor0.col1 DIV - 93 AS col2 FROM tab1 AS cor0
----
-1
-7

skipif mysql # not compatible
query I rowsort label-6956
SELECT DISTINCT - ( - col1 ) * cor0.col1 / - 93 AS col2 FROM tab1 AS cor0
----
-1
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 + col1 * cor0.col2 col1 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT + - col0 + - col1 FROM tab1 cor0
----
-29
-74
-93

query I rowsort
SELECT DISTINCT col2 * - col2 AS col1 FROM tab0 cor0
----
-1
-1089
-6724

query I rowsort
SELECT - tab0.col1 * - 48 + - col1 FROM tab0
----
4042
4277
4559

onlyif mysql # use DIV operator for integer division
query I rowsort label-6961
SELECT ALL + col0 DIV - ( col0 * - col0 ) + + col0 + + col1 FROM tab0 AS cor0
----
110
132
180

skipif mysql # not compatible
query I rowsort label-6961
SELECT ALL + col0 / - ( col0 * - col0 ) + + col0 + + col1 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-6962
SELECT col2 DIV + 4 + + col2 FROM tab1
----
120
67
71

skipif mysql # not compatible
query I rowsort label-6962
SELECT col2 / + 4 + + col2 FROM tab1
----
120
67
71

query I rowsort
SELECT ALL + + ( - col0 ) FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT col0 * 24 AS col2 FROM tab1 AS cor0
----
1536
1920
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * 69 + - cor0.col2 col2 FROM tab0 AS cor0
----
2244
5576
68

query I rowsort
SELECT + col2 * 79 FROM tab0 AS cor0
----
2607
6478
79

query I rowsort
SELECT ALL col2 * - col2 * + col2 FROM tab2 AS cor0
----
-17576
-19683
-54872

query I rowsort
SELECT ( 90 ) * col1 FROM tab1
----
1170
2340
900

query I rowsort
SELECT DISTINCT 71 + col1 FROM tab1
----
81
84
97

query I rowsort
SELECT DISTINCT ( - col0 ) + col2 * 31 + - col0 AS col2 FROM tab2
----
1020
650
823

query I rowsort
SELECT DISTINCT tab2.col0 * - 39 + tab2.col0 AS col2 FROM tab2
----
-266
-2964
-3002

query I rowsort
SELECT DISTINCT + - 43 * + 20 + - col1 FROM tab0 AS cor0
----
-946
-951
-957

query I rowsort
SELECT DISTINCT - - 67 * cor0.col1 AS col1 FROM tab1 AS cor0
----
1742
670
871

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6974
SELECT CAST( 35 AS SIGNED ) FROM tab0 AS cor0
----
35
35
35

skipif mysql # not compatible
query I rowsort label-6974
SELECT CAST ( 35 AS INTEGER ) FROM tab0 AS cor0
----
35
35
35

query I rowsort
SELECT + col0 * + ( col1 ) AS col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT 91 FROM tab1, tab1 cor0
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

query I rowsort
SELECT ALL + - ( + col2 ) + col0 AS col1 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT + 18 AS col2 FROM tab0 AS cor0
----
18

query I rowsort
SELECT DISTINCT - + col1 + 73 FROM tab1 AS cor0
----
47
60
63

query I rowsort
SELECT 20 + + col0 AS col0 FROM tab2 AS cor0
----
27
98
99

query I rowsort
SELECT ALL + 47 FROM tab2, tab2 AS cor0
----
9 values hashing to 4fe192f296791e1e40ea00a68aa8dab7

query I rowsort
SELECT DISTINCT - + 2 + 32 FROM tab1 AS cor0
----
30

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6983
SELECT + CAST( NULL AS DECIMAL ) * - col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6983
SELECT + CAST ( NULL AS REAL ) * - col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - col1 + + 94 FROM tab2 cor0
----
111
125
153

query I rowsort
SELECT DISTINCT 43 * - ( - col2 ) + col2 * col2 AS col0 FROM tab2 AS cor0
----
1794
1890
3078

query I rowsort
SELECT + + 17 AS col0 FROM tab2 AS cor0
----
17
17
17

query I rowsort
SELECT DISTINCT + + col0 + + col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT DISTINCT + - 50 * + ( col0 ) + - ( col1 ) FROM tab2 cor0
----
-381
-3959
-3967

query I rowsort
SELECT - 84 * + cor0.col2 AS col0 FROM tab0 AS cor0
----
-2772
-6888
-84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 33 col0 FROM tab1 AS cor0
----
33

query I rowsort
SELECT + ( - col1 ) + - ( col1 ) FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT DISTINCT + 67 AS col1 FROM tab1, tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * + col1 + 38 col1 FROM tab2 AS cor0
----
1572
684
875

query I rowsort
SELECT ALL - col1 * + 77 + + col0 * - col0 + + 85 FROM tab1 AS cor0
----
-1926
-4781
-7316

query I rowsort
SELECT DISTINCT col0 + - col2 + - col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT - col0 * col0 * col1 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT DISTINCT - col1 * + 42 AS col2 FROM tab0 AS cor0
----
-3612
-3822
-4074

query I rowsort
SELECT + col0 * 63 FROM tab1 AS cor0
----
189
4032
5040

query I rowsort
SELECT DISTINCT col0 - - col1 FROM tab1 AS cor0
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT - - col2 * + CAST ( 91 AS REAL ) col1 FROM tab2 AS cor0
----
2366
2457
3458

onlyif mysql # use DIV operator for integer division
query I rowsort label-7001
SELECT DISTINCT + tab0.col2 DIV + col2 col2 FROM tab0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7001
SELECT DISTINCT + tab0.col2 / + col2 col2 FROM tab0
----
1

query I rowsort
SELECT - 63 AS col2 FROM tab0 AS cor0
----
-63
-63
-63

query I rowsort
SELECT 35 FROM tab0, tab0 cor0, tab2 AS cor1
----
27 values hashing to 0d13dfd4c4a9d51ace3582c31cadcdbc

query I rowsort
SELECT ALL 55 FROM tab0, tab1 AS cor0
----
9 values hashing to 1626bd3008abd9f18cc88cdecf7b64d0

query I rowsort
SELECT col0 * - ( + 94 ) + - col0 * + 88 * col0 FROM tab0 AS cor0
----
-111090
-52944
-705414

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7006
SELECT - - col2 + + CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7006
SELECT - - col2 + + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7007
SELECT + + col0 DIV - 60 + cor0.col1 FROM tab1 AS cor0
----
12
26
9

skipif mysql # not compatible
query I rowsort label-7007
SELECT + + col0 / - 60 + cor0.col1 FROM tab1 AS cor0
----
12
26
9

query I rowsort
SELECT ALL + 44 * + col2 AS col0 FROM tab1
----
2376
2508
4224

query I rowsort
SELECT + + col2 + + col0 * + col0 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT DISTINCT col0 + 57 AS col1 FROM tab1 AS cor0
----
121
137
60

query I rowsort
SELECT DISTINCT - - 85 * col1 FROM tab1 AS cor0
----
1105
2210
850

query I rowsort
SELECT - col2 + + col1 * col1 FROM tab1 cor0
----
43
622
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-7013
SELECT + - 71 DIV - col1 AS col0 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-7013
SELECT + - 71 / - col1 AS col0 FROM tab1 AS cor0
----
2
5
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-7014
SELECT ALL - 23 DIV + ( + col1 * ( 21 ) ) AS col2 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7014
SELECT ALL - 23 / + ( + col1 * ( 21 ) ) AS col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT - tab1.col2 * ( + col1 ) AS col0 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT + 2 AS col2 FROM tab2, tab0 AS cor0
----
2

query I rowsort
SELECT col1 * col0 - col0 AS col2 FROM tab2 cor0
----
1264
210
4524

query I rowsort
SELECT ALL + col2 + 2 * col0 AS col0 FROM tab0
----
260
71
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-7019
SELECT - - ( + col1 ) DIV 64 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7019
SELECT - - ( + col1 ) / 64 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT - - 78 + col1 FROM tab2 AS cor0
----
109
137
95

query I rowsort
SELECT + - col2 - col1 AS col1 FROM tab2 cor0
----
-55
-58
-85

query I rowsort
SELECT DISTINCT - 98 + col2 + col0 AS col0 FROM tab0
----
-41
-62
73

query I rowsort
SELECT + 45 * + col0 AS col0 FROM tab1
----
135
2880
3600

query I rowsort
SELECT ( + ( - col1 ) ) + - ( + col1 ) AS col0 FROM tab2
----
-118
-34
-62

query I rowsort
SELECT 0 * col2 AS col0 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + ( - 84 ) col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
-84

query I rowsort
SELECT DISTINCT ( - 37 ) FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
-37

query I rowsort
SELECT + 74 + col0 * + col1 FROM tab1 AS cor0
----
1114
152
714

query I rowsort
SELECT + + col1 + cor0.col1 * col1 FROM tab1 cor0
----
110
182
702

query I rowsort
SELECT col0 + + col2 - 87 * 97 FROM tab0 AS cor0
----
-8268
-8382
-8403

query I rowsort
SELECT - 34 AS col1 FROM tab0 AS cor0
----
-34
-34
-34

query I rowsort
SELECT - - cor0.col1 + + col1 - col2 * col1 FROM tab1 AS cor0
----
-1222
-1352
-550

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7033
SELECT DISTINCT ( col2 + CAST( NULL AS SIGNED ) ) * - tab1.col0 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-7033
SELECT DISTINCT ( col2 + CAST ( NULL AS INTEGER ) ) * - tab1.col0 FROM tab1
----
NULL

query I rowsort
SELECT - col0 * - col1 - 85 AS col1 FROM tab0 AS cor0
----
1979
3310
8014

onlyif mysql # use DIV operator for integer division
query I rowsort label-7035
SELECT DISTINCT - col2 + - col0 DIV col1 FROM tab2 AS cor0
----
-27
-42

skipif mysql # not compatible
query I rowsort label-7035
SELECT DISTINCT - col2 + - col0 / col1 FROM tab2 AS cor0
----
-27
-42

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7036
SELECT DISTINCT + col1 * + 10 * + col2 + + cor0.col2 * CAST( + col2 AS SIGNED ) FROM tab0 AS cor0
----
29469
81344
971

skipif mysql # not compatible
query I rowsort label-7036
SELECT DISTINCT + col1 * + 10 * + col2 + + cor0.col2 * CAST ( + col2 AS INTEGER ) FROM tab0 AS cor0
----
29469
81344
971

onlyif mysql # use DIV operator for integer division
query I rowsort label-7037
SELECT cor0.col1 DIV 59 - + ( - col0 ) * CAST( col0 + col2 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
238
8113
9243

skipif mysql # not compatible
query I rowsort label-7037
SELECT cor0.col1 / 59 - + ( - col0 ) * CAST ( col0 + col2 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
238
8113
9243

query I rowsort
SELECT ALL col1 * 14 + + col0 * - cor0.col1 FROM tab1 AS cor0
----
-500
-858
286

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 - + col0 col0 FROM tab2
----
0
0
0

query I rowsort
SELECT - - 82 * + col2 - col1 AS col2 FROM tab1 AS cor0
----
4402
4664
7859

query I rowsort
SELECT ALL + 93 - - tab2.col2 * - ( col1 ) AS col1 FROM tab2
----
-1441
-553
-744

query I rowsort
SELECT + - col1 + ( col0 ) FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT ALL + - col1 * 74 FROM tab2 AS cor0
----
-1258
-2294
-4366

query I rowsort
SELECT ALL - - col1 * + col1 + col2 * col2 AS col0 FROM tab1 AS cor0
----
3349
3592
9385

query I rowsort
SELECT ALL col1 * - col2 + - 84 * + col2 FROM tab1 AS cor0
----
-5358
-5940
-9312

query I rowsort
SELECT - - col0 * + 51 + 31 AS col1 FROM tab1 AS cor0
----
184
3295
4111

onlyif mysql # use DIV operator for integer division
query I rowsort label-7047
SELECT + + col1 DIV + ( col0 ) AS col2 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-7047
SELECT + + col1 / + ( col0 ) AS col2 FROM tab0 AS cor0
----
1
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + 64 + + col2 ) col0 FROM tab0
----
146
65
97

query I rowsort
SELECT ALL - 26 FROM tab0
----
-26
-26
-26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7050
SELECT CAST( NULL AS SIGNED ) + col2 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7050
SELECT CAST ( NULL AS INTEGER ) + col2 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col0 ) col2 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT 37 AS col2 FROM tab1 AS cor0
----
37
37
37

onlyif mysql # use DIV operator for integer division
query I rowsort label-7053
SELECT - col2 DIV - cor0.col1 AS col2 FROM tab2 cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-7053
SELECT - col2 / - cor0.col1 AS col2 FROM tab2 cor0
----
0
0
2

query I rowsort
SELECT ALL - col1 + - cor0.col2 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT + - 46 + + col1 AS col1 FROM tab2 AS cor0
----
-15
-29
13

query I rowsort
SELECT ALL 42 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 325aada2239b6fe1fe2d843515ae8c5e

query I rowsort
SELECT ALL - cor1.col1 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

onlyif mysql # use DIV operator for integer division
query I rowsort label-7058
SELECT + col2 DIV col0 + - col1 * col1 AS col2 FROM tab0
----
-7395
-8281
-9409

skipif mysql # not compatible
query I rowsort label-7058
SELECT + col2 / col0 + - col1 * col1 AS col2 FROM tab0
----
-7395
-8281
-9409

query I rowsort
SELECT DISTINCT + col1 * col0 + - col2 AS col1 FROM tab2
----
1305
190
4576

onlyif mysql # use DIV operator for integer division
query I rowsort label-7060
SELECT DISTINCT + col1 - col0 DIV tab0.col0 AS col2 FROM tab0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-7060
SELECT DISTINCT + col1 - col0 / tab0.col0 AS col2 FROM tab0
----
85
90
96

query I rowsort
SELECT ALL + tab1.col2 + - col0 * - tab1.col2 FROM tab1
----
216
3705
7776

query I rowsort
SELECT + col1 AS col2 FROM tab1 WHERE ( NULL ) BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT ALL + tab2.col2 * col2 + col2 AS col2 FROM tab2
----
1482
702
756

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + col0 col0 FROM tab0
----
-2
-62

query I rowsort
SELECT DISTINCT col2 + + col1 * col0 FROM tab1
----
1136
132
697

query I rowsort
SELECT col2 + col0 * tab2.col1 AS col1 FROM tab2
----
1381
244
4628

query III rowsort
SELECT * FROM tab0 WHERE NOT + tab0.col1 > + col1
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT ALL tab1.col0 + col1 * + col1 * col0 AS col1 FROM tab1
----
13600
2031
6464

query I rowsort
SELECT ALL col0 AS col2 FROM tab1 WHERE NULL NOT IN ( + col1 + tab1.col1 * col1 )
----

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL IN ( col1 - col0 )
----

query III rowsort
SELECT * FROM tab0 WHERE + col2 + - tab0.col0 * - col0 IN ( col1 * - tab0.col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7072
SELECT DISTINCT tab2.col0 + col0 DIV + col0 + col1 * + col0 AS col2 FROM tab2
----
1423
225
4681

skipif mysql # not compatible
query I rowsort label-7072
SELECT DISTINCT tab2.col0 + col0 / + col0 + col1 * + col0 AS col2 FROM tab2
----
1423
225
4681

query I rowsort
SELECT 62 + + col1 FROM tab1 cor0
----
72
75
88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7074
SELECT + - ( - col0 ) + - CAST( col2 AS SIGNED ) FROM tab2 AS cor0
----
-20
41
52

skipif mysql # not compatible
query I rowsort label-7074
SELECT + - ( - col0 ) + - CAST ( col2 AS INTEGER ) FROM tab2 AS cor0
----
-20
41
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col2 + + col1 col2 FROM tab0
----
194
2924
7553

query I rowsort
SELECT - col1 + col1 - + col2 * + col0 AS col2 FROM tab2
----
-189
-2028
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * col2 col1 FROM tab2
----
1444
676
729

query I rowsort
SELECT tab2.col0 * col1 - col1 AS col2 FROM tab2
----
1326
186
4543

query I rowsort
SELECT ALL - col1 * - col0 + - tab1.col0 * col2 + col1 AS col0 FROM tab1
----
-2998
-58
-6627

query I rowsort
SELECT ALL col1 + - col0 + + col1 FROM tab2
----
-45
40
55

query I rowsort
SELECT - col2 * + col1 * - col0 FROM tab1
----
36480
4212
99840

onlyif mysql # use DIV operator for integer division
query I rowsort label-7082
SELECT col2 * col1 * col2 + - col2 DIV col0 FROM tab0
----
611884
93653
97

skipif mysql # not compatible
query I rowsort label-7082
SELECT col2 * col1 * col2 + - col2 / col0 FROM tab0
----
611884
93653
97

query I rowsort
SELECT ALL tab2.col2 * - col2 AS col0 FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT ALL col1 * - col2 + cor0.col1 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT ALL + col2 FROM tab1 cor0 WHERE + cor0.col0 NOT IN ( + col0 )
----

query I rowsort
SELECT tab0.col1 + col1 + col1 FROM tab0
----
258
273
291

query I rowsort
SELECT ALL - col1 * col2 * - col2 FROM tab1 WHERE NOT NULL IN ( col1 )
----

query III rowsort
SELECT ALL * FROM tab2 WHERE NULL NOT IN ( - tab2.col2 * + col1 + + tab2.col2 * + col1 * - col0 )
----

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL NOT IN ( + col2 )
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL NOT IN ( + tab2.col1 + + col2 )
----

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 CROSS JOIN tab0, tab1 cor1, tab1, tab1 AS cor2
----
3645 values hashing to 2c9bc625661696fa1cf187c4d0f703a1

query I rowsort
SELECT DISTINCT + 49 AS col1 FROM tab2, tab0 AS cor0
----
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col0 FROM tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT ALL + col0 * col0 + - col2 AS col0 FROM tab2 AS cor0
----
22
6058
6203

query I rowsort
SELECT DISTINCT