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 + col2 * 57 FROM tab0
----
1881
4674
57

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

query I rowsort
SELECT ALL col2 * + 37 FROM tab0 AS cor0
----
1221
3034
37

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

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

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

query I rowsort
SELECT 77 * + col0 AS col0 FROM tab2 AS cor0
----
539
6006
6083

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

skipif mysql # not compatible
query I rowsort label-6
SELECT ALL CAST ( 78 AS INTEGER ) FROM tab1 AS cor0
----
78
78
78

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-8
SELECT ALL - col0 DIV + col1 + + col0 * - 87 FROM tab1
----
-261
-5574
-6966

skipif mysql # not compatible
query I rowsort label-8
SELECT ALL - col0 / + col1 + + col0 * - 87 FROM tab1
----
-261
-5574
-6966

query I rowsort
SELECT DISTINCT - - col2 * col1 + 38 AS col2 FROM tab1 cor0
----
1286
1442
608

query I rowsort
SELECT ALL + 71 * + col0 * col1 AS col1 FROM tab1
----
45440
5538
73840

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

skipif mysql # not compatible
query I rowsort label-11
SELECT ALL + col1 / + 27 FROM tab2 AS cor0
----
0
1
2

query I rowsort
SELECT + + col0 * + 47 - + col0 * + col2 FROM tab0 cor0
----
-3115
1610
336

onlyif mysql # use DIV operator for integer division
query I rowsort label-13
SELECT DISTINCT col1 + col2 DIV - cor0.col1 FROM tab2 AS cor0
----
15
31
59

skipif mysql # not compatible
query I rowsort label-13
SELECT DISTINCT col1 + col2 / - cor0.col1 FROM tab2 AS cor0
----
15
31
59

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

query I rowsort
SELECT DISTINCT + - col0 * - 20 - col0 FROM tab2 AS cor0
----
133
1482
1501

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

skipif mysql # not compatible
query I rowsort label-16
SELECT - col2 / col0 - col2 AS col2 FROM tab1 cor0
----
-57
-72
-97

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

query I rowsort
SELECT DISTINCT - - col1 * - 91 AS col2 FROM tab0 AS cor0
----
-7826
-8281
-8827

query I rowsort
SELECT - + col1 - + 74 FROM tab1 AS cor0
----
-100
-84
-87

query I rowsort
SELECT ALL - + 27 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 0259a67676b131a4843853be4811b775

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

skipif mysql # not compatible
query I rowsort label-21
SELECT + + cor0.col1 / + 80 FROM tab0 cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - tab0.col2 + 55 col2 FROM tab0
----
108
151
64

query I rowsort
SELECT - 30 + + col2 + 87 AS col0 FROM tab0
----
139
58
90

query I rowsort
SELECT - col2 * - col0 + - 77 AS col2 FROM tab2 AS cor0
----
112
1951
2925

query I rowsort
SELECT + col0 * - ( 98 ) - - col1 * - cor0.col1 AS col1 FROM tab1 AS cor0
----
-6372
-8009
-970

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

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

query I rowsort
SELECT col1 + - 88 * - 26 - col0 FROM tab2 AS cor0
----
2226
2269
2312

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

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

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

query I rowsort
SELECT ALL + 91 * col0 * col2 + + 6 * - ( - col2 ) FROM tab1 cor0
----
15066
332310
699456

query I rowsort
SELECT + 23 * + cor0.col2 * + col1 FROM tab0 cor0
----
171626
2231
65274

query I rowsort
SELECT ALL 50 * col2 FROM tab1
----
2700
2850
4800

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

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

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

skipif mysql # not compatible
query I rowsort label-34
SELECT ALL CAST ( NULL AS REAL ) + col0 / - col1 FROM tab1 cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT DISTINCT - - 40 + 8 * col2 AS col0 FROM tab2 AS cor0
----
248
256
344

query I rowsort
SELECT ALL + col0 * + 62 AS col1 FROM tab0 AS cor0
----
1488
2170
5518

query I rowsort
SELECT - col1 + - 4 * cor0.col1 AS col2 FROM tab1 AS cor0
----
-130
-50
-65

query I rowsort
SELECT ALL + col2 * - 81 AS col1 FROM tab0 AS cor0
----
-2673
-6642
-81

query I rowsort
SELECT 59 + - col1 AS col1 FROM tab1 AS cor0
----
33
46
49

query I rowsort
SELECT ALL - ( col2 ) + col2 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + 79 + col0 AS col1 FROM tab1 AS cor0
----
143
159
82

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

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

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

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

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

query I rowsort
SELECT ALL + + 30 + - 76 AS col1 FROM tab0 AS cor0
----
-46
-46
-46

query I rowsort
SELECT - col0 * col1 * - col2 FROM tab2 AS cor0
----
119652
51034
5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-48
SELECT + 1 DIV + col0 - + col2 FROM tab2
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-48
SELECT + 1 / + col0 - + col2 FROM tab2
----
-26
-27
-38

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

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

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

query I rowsort
SELECT col0 * + 90 AS col2 FROM tab1 cor0
----
270
5760
7200

query I rowsort
SELECT 94 + col2 FROM tab1
----
148
151
190

onlyif mysql # use DIV operator for integer division
query I rowsort label-53
SELECT ALL - - ( + col2 ) * 99 DIV 89 AS col0 FROM tab2 AS cor0
----
28
30
42

skipif mysql # not compatible
query I rowsort label-53
SELECT ALL - - ( + col2 ) * 99 / 89 AS col0 FROM tab2 AS cor0
----
28
30
42

query I rowsort
SELECT DISTINCT + - col1 * cor0.col2 + 2 FROM tab0 AS cor0
----
-2836
-7460
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 25 col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
-25

query I rowsort
SELECT + - 74 + + cor0.col0 FROM tab2 AS cor0
----
-67
4
5

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

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

query I rowsort
SELECT + 48 + tab0.col1 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to d6b4013bc824e2ef46d4428d2bf69c73

query I rowsort
SELECT DISTINCT ( 73 ) AS col1 FROM tab0, tab0 AS cor0
----
73

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

query I rowsort
SELECT + tab1.col2 + + cor0.col1 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 4adc79da53b2973c695f7891ad1fab50

query I rowsort
SELECT col1 + 34 * + col2 AS col1 FROM tab1
----
1862
1948
3277

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

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

query I rowsort
SELECT col1 * 58 + - cor0.col1 + col2 FROM tab0 AS cor0
----
4935
5269
5530

query I rowsort
SELECT DISTINCT + 48 + col1 FROM tab1 AS cor0
----
58
61
74

query I rowsort
SELECT ALL - 48 - col1 FROM tab1 cor0
----
-58
-61
-74

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

query I rowsort
SELECT + ( - 44 ) + col1 AS col2 FROM tab0 AS cor0
----
42
47
53

onlyif mysql # use DIV operator for integer division
query I rowsort label-71
SELECT ALL - 38 + 7 + + col0 DIV + 59 FROM tab0 AS cor0
----
-30
-31
-31

skipif mysql # not compatible
query I rowsort label-71
SELECT ALL - 38 + 7 + + col0 / + 59 FROM tab0 AS cor0
----
-30
-31
-31

query I rowsort
SELECT ALL - col2 * col2 - + col1 * col2 * + 40 FROM tab0 AS cor0
----
-114609
-305204
-3881

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-74
SELECT - cor0.col1 DIV + 11 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to ccd77e2770d5a834e59c1674defa88fa

skipif mysql # not compatible
query I rowsort label-74
SELECT - cor0.col1 / + 11 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to ccd77e2770d5a834e59c1674defa88fa

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

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

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

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

query I rowsort
SELECT ALL - - col1 * + 29 * - col2 FROM tab1 AS cor0
----
-16530
-36192
-40716

skipif mysql # not compatible
query I rowsort
SELECT + col1 + - col2 * + CAST ( 11 AS REAL ) FROM tab1 AS cor0
----
-1043
-568
-617

onlyif mysql # use DIV operator for integer division
query I rowsort label-81
SELECT + 51 + + col2 DIV 57 col0 FROM tab1 cor0
----
51
52
52

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

query I rowsort
SELECT ALL 88 - + col1 * col2 * col1 FROM tab1 cor0
----
-16136
-36416
-5612

query I rowsort
SELECT - + col0 * - col1 + + cor0.col0 * col0 FROM tab0 cor0
----
16020
2640
4620

onlyif mysql # use DIV operator for integer division
query I rowsort label-84
SELECT cor0.col0 * col0 DIV + col2 + col0 FROM tab0 AS cor0
----
1260
185
41

skipif mysql # not compatible
query I rowsort label-84
SELECT cor0.col0 * col0 / + col2 + col0 FROM tab0 AS cor0
----
1260
185
41

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

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

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

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

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

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

query I rowsort
SELECT ALL cor0.col2 * - col2 * + 50 AS col1 FROM tab2 cor0
----
-33800
-36450
-72200

query I rowsort
SELECT DISTINCT - col0 * - 27 FROM tab2 cor0
----
189
2106
2133

query I rowsort
SELECT - ( + col1 ) + - 12 AS col1 FROM tab1
----
-22
-25
-38

query I rowsort
SELECT - 34 * + col0 AS col1 FROM tab1
----
-102
-2176
-2720

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

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

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

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

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

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

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

query I rowsort
SELECT + + col0 * - cor0.col1 + - cor0.col2 + cor0.col0 * ( + 14 ) FROM tab2 AS cor0
----
-146
-275
-3536

query I rowsort
SELECT DISTINCT + col1 * - col1 + - col1 * - col2 FROM tab0 AS cor0
----
-4558
-819
-9312

onlyif mysql # use DIV operator for integer division
query I rowsort label-102
SELECT + - col0 DIV ( + ( - cor0.col1 ) ) + - 83 FROM tab2 AS cor0
----
-79
-82
-83

skipif mysql # not compatible
query I rowsort label-102
SELECT + - col0 / ( + ( - cor0.col1 ) ) + - 83 FROM tab2 AS cor0
----
-79
-82
-83

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT col0 + CAST ( - col1 AS REAL ) AS col0 FROM tab1 AS cor0
----
-23
54
67

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-105
SELECT ALL + col0 DIV col0 + col2 + col1 FROM tab0
----
120
174
99

skipif mysql # not compatible
query I rowsort label-105
SELECT ALL + col0 / col0 + col2 + col1 FROM tab0
----
120
174
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-106
SELECT + col2 * 63 + - ( col1 ) * ( col2 ) DIV col1 FROM tab1 AS cor0
----
3348
3534
5952

skipif mysql # not compatible
query I rowsort label-106
SELECT + col2 * 63 + - ( col1 ) * ( col2 ) / col1 FROM tab1 AS cor0
----
3348
3534
5952

query I rowsort
SELECT DISTINCT - col2 + - 5 FROM tab0 AS cor0
----
-38
-6
-87

query I rowsort
SELECT DISTINCT - col2 * + 68 + - col2 FROM tab1 AS cor0
----
-3726
-3933
-6624

onlyif mysql # use DIV operator for integer division
query I rowsort label-109
SELECT - tab1.col2 + col2 DIV 61 FROM tab1
----
-54
-57
-95

skipif mysql # not compatible
query I rowsort label-109
SELECT - tab1.col2 + col2 / 61 FROM tab1
----
-54
-57
-95

query I rowsort
SELECT col0 + + 13 + col2 FROM tab0
----
184
49
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-111
SELECT ALL CAST( + 67 + col1 AS SIGNED ) AS col2 FROM tab0
----
153
158
164

skipif mysql # not compatible
query I rowsort label-111
SELECT ALL CAST ( + 67 + col1 AS INTEGER ) AS col2 FROM tab0
----
153
158
164

query I rowsort
SELECT DISTINCT 11 + col0 AS col2 FROM tab0 AS cor0
----
100
35
46

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-114
SELECT - CAST( 3 * + col2 AS SIGNED ) FROM tab2
----
-114
-78
-81

skipif mysql # not compatible
query I rowsort label-114
SELECT - CAST ( 3 * + col2 AS INTEGER ) FROM tab2
----
-114
-78
-81

query I rowsort
SELECT - 57 * + tab2.col0 - col0 * + col1 AS col2 FROM tab2
----
-5846
-616
-9048

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

query I rowsort
SELECT + 41 FROM tab2 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 5b18986bb294412b3d9f07b7e6fc821e

query I rowsort
SELECT + col1 + + col2 - 14 * + 56 AS col1 FROM tab1 AS cor0
----
-675
-704
-717

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 50 + col0 col1 FROM tab0 cor0
----
-15
-26
39

onlyif mysql # use DIV operator for integer division
query I rowsort label-120
SELECT + cor0.col0 + + col2 DIV col1 AS col2 FROM tab2 cor0
----
7
78
81

skipif mysql # not compatible
query I rowsort label-120
SELECT + cor0.col0 + + col2 / col1 AS col2 FROM tab2 cor0
----
7
78
81

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

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

query I rowsort
SELECT ALL col2 - + col2 * - 40 * col1 FROM tab0 AS cor0
----
113553
298562
3881

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

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

query I rowsort
SELECT DISTINCT col1 * col2 * + 6 AS col0 FROM tab2 cor0
----
3876
5022
9204

query I rowsort
SELECT 19 + col1 FROM tab1 AS cor0
----
29
32
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 col1 FROM tab2 WHERE NOT NULL >= NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-129
SELECT ALL col1 + col1 DIV col2 col1 FROM tab0
----
194
88
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-129
SELECT ALL col1 + col1 / col2 col1 FROM tab0
----
194
88
92

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - col1 col0 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT - col1 FROM tab1 WHERE col1 <> ( - col2 )
----
-10
-13
-26

query I rowsort
SELECT ( col2 * - 6 ) AS col1 FROM tab0
----
-198
-492
-6

query I rowsort
SELECT 79 AS col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 4857f2e1b1dbd184de4827f145dd02a1

onlyif mysql # use DIV operator for integer division
query I rowsort label-135
SELECT DISTINCT - 49 DIV col1 FROM tab1 cor0
----
-1
-3
-4

skipif mysql # not compatible
query I rowsort label-135
SELECT DISTINCT - 49 / col1 FROM tab1 cor0
----
-1
-3
-4

query I rowsort
SELECT DISTINCT - + 79 * + col2 FROM tab2 AS cor0
----
-2054
-2133
-3002

query I rowsort
SELECT tab0.col2 * - tab0.col2 * tab0.col2 FROM tab0
----
-1
-35937
-551368

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL NOT IN ( + tab2.col2 - + tab2.col2 * - col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-139
SELECT - col1 * + col1 + col2 DIV + col1 FROM tab2
----
-287
-3481
-961

skipif mysql # not compatible
query I rowsort label-139
SELECT - col1 * + col1 + col2 / + col1 FROM tab2
----
-287
-3481
-961

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

query I rowsort
SELECT col1 * col1 - + col2 AS col1 FROM tab0
----
7363
8199
9408

query I rowsort
SELECT - col0 * tab0.col0 + - col0 * + col0 AS col2 FROM tab0
----
-1152
-15842
-2450

query III rowsort
SELECT ALL * FROM tab2 WHERE + col0 * col2 + col2 / col1 >= ( col2 + col0 * - col2 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

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

query I rowsort
SELECT - col2 * col0 * + tab0.col0 + + col0 FROM tab0
----
-1190
-18984
-649433

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * + col1 col0 FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT col2 * - col0 + col2 * - col2 FROM tab2
----
-2704
-4446
-918

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT ( - col0 ) NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT - tab1.col2 * + col2 * col2 + col1 FROM tab1 WHERE NOT ( + col1 ) <> NULL
----

query I rowsort
SELECT - tab0.col2 * col2 + col1 AS col0 FROM tab0
----
-1003
-6633
96

query I rowsort
SELECT col2 + col1 * col1 * col0 AS col0 FROM tab0
----
177537
329316
737091

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-156
SELECT DISTINCT - col2 + col0 DIV - col1 - col1 FROM tab1
----
-115
-73
-80

skipif mysql # not compatible
query I rowsort label-156
SELECT DISTINCT - col2 + col0 / - col1 - col1 FROM tab1
----
-115
-73
-80

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 53 + + tab0.col1 col0 FROM tab0
----
139
144
150

onlyif mysql # use DIV operator for integer division
query I rowsort label-160
SELECT + 80 + col2 * + col1 + col0 DIV col1 col0 FROM tab2 AS cor0
----
1615
730
917

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-160
SELECT + 80 + col2 * + col1 + col0 / col1 col0 FROM tab2 AS cor0
----
1615
730
917

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

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

query I rowsort
SELECT - + col1 * col0 + col1 * - col0 AS col1 FROM tab2 AS cor0
----
-2686
-434
-9204

query I rowsort
SELECT + - col0 * cor0.col2 * + ( 62 ) + col0 + + ( - col0 ) AS col0 FROM tab1 cor0
----
-10044
-226176
-476160

query I rowsort
SELECT 28 * 15 FROM tab2
----
420
420
420

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-165
SELECT - CAST( col1 + col1 AS SIGNED ) AS col2 FROM tab1
----
-20
-26
-52

skipif mysql # not compatible
query I rowsort label-165
SELECT - CAST ( col1 + col1 AS INTEGER ) AS col2 FROM tab1
----
-20
-26
-52

query I rowsort
SELECT + 48 + col0 AS col1 FROM tab2 AS cor0
----
126
127
55

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

skipif mysql # not compatible
query I rowsort
SELECT col0 + CAST ( col2 AS REAL ) * col0 FROM tab2 cor0
----
196
2106
3081

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

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

query I rowsort
SELECT + col0 + - col1 * + col1 FROM tab0
----
-7372
-8192
-9374

query I rowsort
SELECT col1 * 57 + + col0 AS col2 FROM tab2 cor0
----
1048
1774
3441

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * ( col0 ) + + col0 + 61 col0 FROM tab0 AS cor0
----
131
7448
877

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

skipif mysql # not compatible
query I rowsort label-174
SELECT DISTINCT tab1.col1 * CAST ( col1 AS INTEGER ) + col0 * ( + col1 ) + - col1 FROM tab1
----
1196
728
730

query I rowsort
SELECT - + col0 + 90 AS col0 FROM tab0 AS cor0
----
1
55
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-176
SELECT ALL + CAST( 58 AS SIGNED ) col2 FROM tab1, tab1 cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to 793ce5fda3f22b0a251dca7e8a07baed

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-176
SELECT ALL + CAST ( 58 AS INTEGER ) col2 FROM tab1, tab1 cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to 793ce5fda3f22b0a251dca7e8a07baed

query I rowsort
SELECT 23 + col1 AS col2 FROM tab0 AS cor0
----
109
114
120

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 19 * col1 col0 FROM tab2 cor0
----
1121
323
589

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-183
SELECT - tab1.col2 * 10 * - col0 + col2 DIV col2 AS col2 FROM tab1
----
1621
36481
76801

skipif mysql # not compatible
query I rowsort label-183
SELECT - tab1.col2 * 10 * - col0 + col2 / col2 AS col2 FROM tab1
----
1621
36481
76801

query I rowsort
SELECT col1 + col0 - - col1 FROM tab2
----
113
196
69

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-185
SELECT CAST( - 76 AS SIGNED ) + + col2 FROM tab1
----
-19
-22
20

skipif mysql # not compatible
query I rowsort label-185
SELECT CAST ( - 76 AS INTEGER ) + + col2 FROM tab1
----
-19
-22
20

query I rowsort
SELECT DISTINCT - col2 + 59 FROM tab2
----
21
32
33

onlyif mysql # use DIV operator for integer division
query I rowsort label-187
SELECT + 48 DIV + col2 AS col0 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-187
SELECT + 48 / + col2 AS col0 FROM tab1
----
0
0
0

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

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

skipif mysql # not compatible
query I rowsort label-189
SELECT DISTINCT + ( - col1 ) / col2 - col2 AS col1 FROM tab1
----
-54
-57
-96

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

query I rowsort
SELECT DISTINCT + col2 + - col1 + col2 AS col1 FROM tab0
----
-20
-95
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-192
SELECT DISTINCT col2 * col0 - cor0.col2 DIV + col2 AS col2 FROM tab1 AS cor0
----
161
3647
7679

skipif mysql # not compatible
query I rowsort label-192
SELECT DISTINCT col2 * col0 - cor0.col2 / + col2 AS col2 FROM tab1 AS cor0
----
161
3647
7679

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

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

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

query I rowsort
SELECT + - 86 * col0 + col2 FROM tab0 AS cor0
----
-2031
-3009
-7572

query I rowsort
SELECT DISTINCT 8 - col0 FROM tab1 AS cor0
----
-56
-72
5

query I rowsort
SELECT 78 * col1 + col0 * - cor0.col2 AS col0 FROM tab0 AS cor0
----
-200
5916
7531

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

query I rowsort
SELECT + col1 * ( col1 * - col2 + + cor0.col0 ) FROM tab1 cor0
----
-15184
-36426
-5060

query I rowsort
SELECT 90 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

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

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

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

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

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

query I rowsort
SELECT tab2.col0 + col0 * col1 * + col1 AS col2 FROM tab2
----
22910
271596
6734

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

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

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

query I rowsort
SELECT DISTINCT - col1 * 76 * col0 FROM tab0
----
-156864
-258020
-615524

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

skipif mysql # not compatible
query I rowsort label-209
SELECT ALL + + CAST ( - col2 AS INTEGER ) + col1 AS col2 FROM tab1 AS cor0
----
-28
-47
-83

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-211
SELECT DISTINCT + col0 + col0 DIV - col0 AS col1 FROM tab1
----
2
63
79

skipif mysql # not compatible
query I rowsort label-211
SELECT DISTINCT + col0 + col0 / - col0 AS col1 FROM tab1
----
2
63
79

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-216
SELECT DISTINCT col0 + - col1 DIV - col1 + - col0 * col0 FROM tab2 AS cor0
----
-41
-6005
-6161

skipif mysql # not compatible
query I rowsort label-216
SELECT DISTINCT col0 + - col1 / - col1 + - col0 * col0 FROM tab2 AS cor0
----
-41
-6005
-6161

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

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

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 # use DIV operator for integer division
query I rowsort label-220
SELECT col0 DIV cor0.col0 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-220
SELECT col0 / cor0.col0 FROM tab1 cor0
----
1
1
1

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

query I rowsort
SELECT ALL col2 * col2 + + col2 AS col0 FROM tab2 AS cor0
----
1482
702
756

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-224
SELECT DISTINCT + cor0.col2 DIV col0 - cor0.col1 col2 FROM tab1 cor0
----
-10
-12
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-224
SELECT DISTINCT + cor0.col2 / col0 - cor0.col1 col2 FROM tab1 cor0
----
-10
-12
-8

onlyif mysql # use DIV operator for integer division
query I rowsort label-225
SELECT - cor0.col2 + col1 + + col0 DIV - col1 AS col1 FROM tab2 AS cor0
----
-25
32
4

skipif mysql # not compatible
query I rowsort label-225
SELECT - cor0.col2 + col1 + + col0 / - col1 AS col1 FROM tab2 AS cor0
----
-25
32
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-226
SELECT ALL + col0 + tab0.col1 DIV col0 FROM tab0
----
27
37
90

skipif mysql # not compatible
query I rowsort label-226
SELECT ALL + col0 + tab0.col1 / col0 FROM tab0
----
27
37
90

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-231
SELECT ALL + + col1 / col0 + col2 + col2 FROM tab0 AS cor0
----
165
4
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-232
SELECT col1 + + col2 DIV col2 AS col2 FROM tab0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-232
SELECT col1 + + col2 / col2 AS col2 FROM tab0
----
87
92
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-233
SELECT + col2 * - col0 DIV col0 + col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-233
SELECT + col2 * - col0 / col0 + col2 FROM tab1
----
0
0
0

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-235
SELECT + + cor0.col1 + + 9 DIV 50 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-235
SELECT + + cor0.col1 + + 9 / 50 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT + col1 * - 47 * + 34 AS col1 FROM tab1 AS cor0
----
-15980
-20774
-41548

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col0 + 76 col2 FROM tab1 AS cor0
----
4172
6476
85

query I rowsort
SELECT col0 + 32 AS col2 FROM tab2 cor0
----
110
111
39

query I rowsort
SELECT ALL - 40 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to f02f17e9bc17e514af018c6f245ed7a9

query I rowsort
SELECT + col1 * tab1.col0 + + col1 * - 90 - + tab1.col0 * col0 AS col2 FROM tab1
----
-2271
-4356
-6530

query I rowsort
SELECT tab2.col2 * ( + cor0.col2 ) FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 994244f565b077d9bfe0a9efd8b9bf4b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-243
SELECT CAST( - col2 AS SIGNED ) + + col0 FROM tab1
----
-16
-51
7

skipif mysql # not compatible
query I rowsort label-243
SELECT CAST ( - col2 AS INTEGER ) + + col0 FROM tab1
----
-16
-51
7

query I rowsort
SELECT - 73 - - col1 AS col1 FROM tab0
----
13
18
24

query I rowsort
SELECT ALL + 53 + + cor0.col2 * ( + col2 + col2 ) * col1 AS col0 FROM tab1 AS cor0
----
151685
239669
65033

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

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

skipif mysql # not compatible
query I rowsort label-247
SELECT - + cor0.col2 + col2 / + 61 AS col0 FROM tab0 AS cor0
----
-1
-33
-81

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-249
SELECT ALL + CAST( + 95 AS SIGNED ) + col0 AS col2 FROM tab1
----
159
175
98

skipif mysql # not compatible
query I rowsort label-249
SELECT ALL + CAST ( + 95 AS INTEGER ) + col0 AS col2 FROM tab1
----
159
175
98

query I rowsort
SELECT 31 + - tab1.col0 FROM tab1
----
-33
-49
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + col0 * tab0.col2 * 62 col1 FROM tab0
----
2267
452567
49190

query I rowsort
SELECT 16 + 45 + col1 AS col1 FROM tab1
----
71
74
87

query I rowsort
SELECT ALL - 28 * col2 + col2 FROM tab1
----
-1458
-1539
-2592

query I rowsort
SELECT 41 * + ( - col2 ) FROM tab2
----
-1066
-1107
-1558

query I rowsort
SELECT - col1 * + col0 - 19 * + col1 * - cor0.col2 FROM tab1 AS cor0
----
10190
22672
26598

query I rowsort
SELECT ( + col2 ) + + cor0.col1 * col1 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT - + 58 * col2 + - ( cor0.col0 ) FROM tab2 AS cor0
----
-1573
-1586
-2283

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

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

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

query I rowsort
SELECT - 94 * - col2 + - col1 FROM tab2 AS cor0
----
2385
2507
3555

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

query I rowsort
SELECT DISTINCT cor0.col2 * - col1 - 16 AS col0 FROM tab1 AS cor0
----
-1264
-1420
-586

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

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

query I rowsort
SELECT DISTINCT - ( + col2 + col2 ) FROM tab0
----
-164
-2
-66

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-268
SELECT - cor0.col1 + + CAST( col2 + col0 * - 47 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-1181
-1741
-4192

skipif mysql # not compatible
query I rowsort label-268
SELECT - cor0.col1 + + CAST ( col2 + col0 * - 47 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-1181
-1741
-4192

query I rowsort
SELECT DISTINCT - + col0 * + 10 * - col2 FROM tab1 AS cor0
----
1620
36480
76800

query I rowsort
SELECT ALL - col1 * col2 + 11 AS col1 FROM tab1 cor0
----
-1237
-1393
-559

query I rowsort
SELECT ALL - 66 + col2 FROM tab1
----
-12
-9
30

query I rowsort
SELECT DISTINCT 78 * col0 FROM tab2
----
546
6084
6162

query I rowsort
SELECT + tab0.col1 + 73 * 7 * tab0.col1 FROM tab0
----
44032
46592
49664

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

query I rowsort
SELECT - col2 + + 54 * + col2 FROM tab0 AS cor0
----
1749
4346
53

query I rowsort
SELECT 0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab1 AS cor2, tab2 AS cor3
----
243 values hashing to fa3d5b69e444df969b60da5e4c5c3507

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

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

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

skipif mysql # not compatible
query I rowsort label-279
SELECT + - 41 / 64 AS col0 FROM tab0 AS cor0
----
0
0
0

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

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

query I rowsort
SELECT + 6 * col0 AS col0 FROM tab1 AS cor0
----
18
384
480

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

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

query I rowsort
SELECT - + 41 + col1 AS col0 FROM tab1 AS cor0
----
-15
-28
-31

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

query I rowsort
SELECT DISTINCT 50 AS col1 FROM tab0 AS cor0
----
50

query I rowsort
SELECT ALL ( - 59 ) FROM tab1 cor0
----
-59
-59
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-288
SELECT ALL + cor0.col1 * 25 * + col1 + - ( - col2 + - col0 ) DIV col2 AS col2 FROM tab1 AS cor0
----
16901
2502
4226

skipif mysql # not compatible
query I rowsort label-288
SELECT ALL + cor0.col1 * 25 * + col1 + - ( - col2 + - col0 ) / col2 AS col2 FROM tab1 AS cor0
----
16901
2502
4226

query I rowsort
SELECT ALL 37 * col2 FROM tab2 AS cor0
----
1406
962
999

query I rowsort
SELECT - + 83 - col2 FROM tab1 AS cor0
----
-137
-140
-179

query I rowsort
SELECT - 22 + - col1 FROM tab2 AS cor0
----
-39
-53
-81

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 11 * col2 col0 FROM tab2 cor0
----
286
297
418

query I rowsort
SELECT DISTINCT - - 71 * - ( - col2 ) + cor0.col0 AS col2 FROM tab0 AS cor0
----
106
2367
5911

query I rowsort
SELECT - 20 * - col1 * - col2 + + ( col1 ) * + col0 AS col0 FROM tab0 AS cor0
----
-141141
-54696
1455

query I rowsort
SELECT ALL col1 * 7 + col1 AS col0 FROM tab2
----
136
248
472

query I rowsort
SELECT + + col0 * + col1 * 38 AS col2 FROM tab1 cor0
----
24320
2964
39520

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + 47 * + 14 col1 FROM tab2 AS cor0
----
599
627
641

query I rowsort
SELECT - ( col1 ) * 73 + 21 * col0 AS col1 FROM tab0
----
-4774
-5774
-6346

query I rowsort
SELECT DISTINCT 64 * - col1 AS col1 FROM tab2
----
-1088
-1984
-3776

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-302
SELECT col1 - CAST( col1 + - col1 AS SIGNED ) FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-302
SELECT col1 - CAST ( col1 + - col1 AS INTEGER ) FROM tab1
----
10
13
26

query I rowsort
SELECT - tab0.col1 + 20 FROM tab0
----
-66
-71
-77

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

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

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

query I rowsort
SELECT 20 AS col0 FROM tab2, tab0 AS cor0, tab1 cor1
----
27 values hashing to 0a35fe98f3e7d5fc8ff2ae815bd20ef4

query I rowsort
SELECT DISTINCT col2 + + ( - col2 ) * - col2 AS col2 FROM tab2 AS cor0
----
1482
702
756

query I rowsort
SELECT + cor0.col2 - + 3 FROM tab2, tab0 cor0
----
9 values hashing to b918456a1bd2a136a2b83285c731a26a

query I rowsort
SELECT DISTINCT - 2 + ( + col2 + col0 ) FROM tab0 AS cor0
----
169
34
55

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

query I rowsort
SELECT ALL - - 62 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 4911b1417a3797d23dd8f38b6ed05c1b

query I rowsort
SELECT 92 * 11 FROM tab0 AS cor0
----
1012
1012
1012

onlyif mysql # use DIV operator for integer division
query I rowsort label-314
SELECT DISTINCT + - col2 + col2 * - cor0.col2 DIV col2 AS col2 FROM tab1 AS cor0
----
-108
-114
-192

skipif mysql # not compatible
query I rowsort label-314
SELECT DISTINCT + - col2 + col2 * - cor0.col2 / col2 AS col2 FROM tab1 AS cor0
----
-108
-114
-192

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-317
SELECT ALL CAST( col2 AS SIGNED ) * col0 AS col0 FROM tab0 AS cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-317
SELECT ALL CAST ( col2 AS INTEGER ) * col0 AS col0 FROM tab0 AS cor0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - ( col1 ) * col0 col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL 71 + tab0.col0 FROM tab0
----
106
160
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-320
SELECT ALL + 79 + col1 DIV - cor0.col2 AS col1 FROM tab0 AS cor0
----
-18
77
78

skipif mysql # not compatible
query I rowsort label-320
SELECT ALL + 79 + col1 / - cor0.col2 AS col1 FROM tab0 AS cor0
----
-18
77
78

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

query I rowsort
SELECT - cor0.col1 * - cor0.col1 + ( + col2 ) + + col1 FROM tab2 cor0
----
1019
344
3566

query I rowsort
SELECT col2 * col2 * + col2 + col2 + - cor0.col1 AS col0 FROM tab1 AS cor0
----
157492
185240
884819

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

query I rowsort
SELECT DISTINCT + 79 * - cor0.col1 + col0 FROM tab2 AS cor0
----
-1264
-2442
-4583

query I rowsort
SELECT + - col0 * col2 + ( 59 + col1 ) FROM tab0 AS cor0
----
-647
-7148
121

query I rowsort
SELECT ALL + col0 * - col2 * 90 FROM tab0 AS cor0
----
-3150
-656820
-71280

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

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

query I rowsort
SELECT DISTINCT - col2 * + ( + col1 + col2 ) AS col0 FROM tab2 cor0
----
-1566
-2090
-2210

query I rowsort
SELECT ALL - col0 + - 13 * - col1 FROM tab0 AS cor0
----
1094
1094
1226

query I rowsort
SELECT cor0.col1 * - col2 * + col2 + - col0 FROM tab2 AS cor0
----
-22606
-24627
-39962

query I rowsort
SELECT DISTINCT - col0 * - ( + 34 * - cor0.col1 ) FROM tab0 AS cor0
----
-115430
-275366
-70176

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

query I rowsort
SELECT + col0 * - 86 AS col1 FROM tab0 AS cor0
----
-2064
-3010
-7654

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

query I rowsort
SELECT DISTINCT - col1 + 35 * + 7 AS col2 FROM tab2 AS cor0
----
186
214
228

query I rowsort
SELECT ALL ( col1 ) + col1 * - tab0.col1 AS col0 FROM tab0
----
-7310
-8190
-9312

query I rowsort
SELECT tab1.col2 + + tab1.col1 * + col2 * tab1.col1 FROM tab1
----
16320
36558
5757

onlyif mysql # use DIV operator for integer division
query I rowsort label-339
SELECT - col0 - + col1 DIV + 6 FROM tab0
----
-104
-38
-51

skipif mysql # not compatible
query I rowsort label-339
SELECT - col0 - + col1 / + 6 FROM tab0
----
-104
-38
-51

onlyif mysql # use DIV operator for integer division
query I rowsort label-340
SELECT - 74 + cor0.col1 DIV 3 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 8d71ca9d529448a25a31eda4f67a2b59

skipif mysql # not compatible
query I rowsort label-340
SELECT - 74 + cor0.col1 / 3 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 8d71ca9d529448a25a31eda4f67a2b59

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-344
SELECT 61 - ( col0 * - CAST( 61 AS SIGNED ) ) FROM tab2 AS cor0
----
4819
488
4880

skipif mysql # not compatible
query I rowsort label-344
SELECT 61 - ( col0 * - CAST ( 61 AS INTEGER ) ) FROM tab2 AS cor0
----
4819
488
4880

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-347
SELECT DISTINCT + + col0 DIV + 15 FROM tab0 AS cor0
----
1
2
5

skipif mysql # not compatible
query I rowsort label-347
SELECT DISTINCT + + col0 / + 15 FROM tab0 AS cor0
----
1
2
5

query I rowsort
SELECT col0 * 36 - col2 AS col0 FROM tab1 AS cor0
----
2247
2784
54

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

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

query I rowsort
SELECT + + col2 + - cor0.col1 * 3 FROM tab2 AS cor0
----
-13
-151
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 17 * cor0.col0 col0 FROM tab1 AS cor0
----
-1088
-1360
-51

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

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

query I rowsort
SELECT DISTINCT 15 + col2 + + col0 FROM tab2
----
119
132
49

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

query I rowsort
SELECT ALL col2 * 83 FROM tab1 AS cor0
----
4482
4731
7968

query I rowsort
SELECT ALL + col2 * - 20 * - 83 FROM tab2
----
43160
44820
63080

query I rowsort
SELECT col2 * + 86 FROM tab1 cor0
----
4644
4902
8256

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-361
SELECT + 56 + + col2 DIV - col1 AS col0 FROM tab1 AS cor0
----
49
51
54

skipif mysql # not compatible
query I rowsort label-361
SELECT + 56 + + col2 / - col1 AS col0 FROM tab1 AS cor0
----
49
51
54

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * ( - 44 ) col2 FROM tab0
----
-1452
-3608
-44

query I rowsort
SELECT cor0.col2 * - 98 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 9c3e3e52878877b9a28d18ad067aad77

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-367
SELECT col2 + + CAST( + col0 AS SIGNED ) FROM tab0
----
171
36
57

skipif mysql # not compatible
query I rowsort label-367
SELECT col2 + + CAST ( + col0 AS INTEGER ) FROM tab0
----
171
36
57

query I rowsort
SELECT + 90 + ( - col2 ) * + 63 FROM tab2 AS cor0
----
-1548
-1611
-2304

query I rowsort
SELECT 19 + + col2 AS col2 FROM tab1 AS cor0
----
115
73
76

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

query I rowsort
SELECT DISTINCT 98 + cor2.col1 + cor2.col0 FROM tab1, tab2 AS cor0, tab1 AS cor1, tab2 AS cor2
----
136
194
235

query I rowsort
SELECT + ( + col1 ) + 38 AS col0 FROM tab2 cor0
----
55
69
97

query I rowsort
SELECT DISTINCT + ( col1 ) + - 83 FROM tab1 AS cor0
----
-57
-70
-73

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

query I rowsort
SELECT ALL tab0.col0 * - 79 AS col0 FROM tab0
----
-1896
-2765
-7031

onlyif mysql # use DIV operator for integer division
query I rowsort label-376
SELECT DISTINCT - tab1.col1 DIV ( col0 ) FROM tab1
----
-8
0

skipif mysql # not compatible
query I rowsort label-376
SELECT DISTINCT - tab1.col1 / ( col0 ) FROM tab1
----
-8
0

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

query I rowsort
SELECT - 56 * 84 AS col1 FROM tab0 AS cor0
----
-4704
-4704
-4704

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

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

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT 68 * tab1.col2 FROM tab1
----
3672
3876
6528

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

query I rowsort
SELECT + col1 + 34 FROM tab2 AS cor0
----
51
65
93

query I rowsort
SELECT - ( - col1 * 45 ) FROM tab1
----
1170
450
585

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

query I rowsort
SELECT ALL + 44 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 0cc3e52e781e46962291c3060c6ae73b

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

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

query I rowsort
SELECT ALL + 65 * - col0 AS col2 FROM tab1 AS cor0
----
-195
-4160
-5200

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

query I rowsort
SELECT DISTINCT col2 + 95 * 64 + - col1 FROM tab1 cor0
----
6108
6127
6163

query I rowsort
SELECT DISTINCT - cor0.col2 + 45 AS col0 FROM tab2 AS cor0
----
18
19
7

query I rowsort
SELECT ALL - col2 + 83 AS col0 FROM tab2 AS cor0
----
45
56
57

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

query I rowsort
SELECT ALL - - col0 - 33 FROM tab1 AS cor0
----
-30
31
47

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

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

query I rowsort
SELECT DISTINCT - + col2 + - 97 * - col0 AS col1 FROM tab1 AS cor0
----
237
6151
7664

query I rowsort
SELECT + col0 * - col0 + col2 * col1 - ( - col1 + - col2 * - col0 ) FROM tab2 AS cor0
----
-6519
-8580
630

query I rowsort
SELECT - - col1 + - 32 FROM tab0 AS cor0
----
54
59
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 80 * - col0 col2 FROM tab2
----
-560
-6240
-6320

query I rowsort
SELECT ALL col1 * - col0 * tab2.col1 FROM tab2
----
-22831
-271518
-6727

query I rowsort
SELECT col0 + 98 * - cor0.col2 FROM tab1 AS cor0
----
-5289
-5522
-9328

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

query I rowsort
SELECT DISTINCT ( 72 ) AS col0 FROM tab0 cor0
----
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 70 + - col2 + col2 * 53 col2 FROM tab2 AS cor0
----
1282
1334
1906

query I rowsort
SELECT + col1 * col1 + - cor0.col1 * + col2 AS col0 FROM tab0 AS cor0
----
4558
819
9312

query I rowsort
SELECT ALL ( - cor0.col2 ) AS col0 FROM tab0 AS cor0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-409
SELECT + col0 DIV 30 + col0 FROM tab2 AS cor0
----
7
80
81

skipif mysql # not compatible
query I rowsort label-409
SELECT + col0 / 30 + col0 FROM tab2 AS cor0
----
7
80
81

query I rowsort
SELECT DISTINCT - + ( - 9 ) FROM tab0 AS cor0
----
9

query I rowsort
SELECT DISTINCT 30 * cor0.col0 FROM tab1 AS cor0
----
1920
2400
90

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-413
SELECT - 15 DIV - col0 FROM tab1 AS cor0
----
0
0
5

skipif mysql # not compatible
query I rowsort label-413
SELECT - 15 / - col0 FROM tab1 AS cor0
----
0
0
5

query I rowsort
SELECT + 46 * - col1 + col1 FROM tab0 AS cor0
----
-3870
-4095
-4365

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

skipif mysql # not compatible
query I rowsort label-415
SELECT + - col2 / + col1 + col2 + - 2 FROM tab0 AS cor0
----
-1
31
80

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

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

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

query I rowsort
SELECT ( - 95 * + col0 ) + col1 AS col2 FROM tab0
----
-2194
-3228
-8364

query I rowsort
SELECT - col0 * + ( - col2 * + 37 ) AS col2 FROM tab0
----
1295
270026
29304

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

query I rowsort
SELECT tab0.col2 + ( tab0.col1 ) * - 89 FROM tab0
----
-7621
-8017
-8632

query I rowsort
SELECT ALL - col2 * col1 - ( cor0.col2 ) FROM tab2 AS cor0
----
-1560
-684
-864

query I rowsort
SELECT DISTINCT + col1 + - col0 + cor0.col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL + + 69 + col1 AS col2 FROM tab0 AS cor0
----
155
160
166

query I rowsort
SELECT ALL col2 * + 35 + + col0 AS col2 FROM tab1
----
1893
2059
3440

query I rowsort
SELECT DISTINCT - col1 + - 63 AS col0 FROM tab2
----
-122
-80
-94

query I rowsort
SELECT ALL + 34 * - col2 * + ( col2 ) FROM tab1
----
-110466
-313344
-99144

query I rowsort
SELECT ALL - col0 + col0 * - 75 AS col2 FROM tab0 AS cor0
----
-1824
-2660
-6764

query I rowsort
SELECT DISTINCT + col1 * - col2 + + ( - col2 ) AS col0 FROM tab1 AS cor0
----
-1344
-1458
-627

onlyif mysql # use DIV operator for integer division
query I rowsort label-430
SELECT DISTINCT + 37 DIV - col0 + - 41 FROM tab0 AS cor0
----
-41
-42

skipif mysql # not compatible
query I rowsort label-430
SELECT DISTINCT + 37 / - col0 + - 41 FROM tab0 AS cor0
----
-41
-42

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-432
SELECT col2 DIV col1 + + col2 AS col2 FROM tab2
----
26
27
40

skipif mysql # not compatible
query I rowsort label-432
SELECT col2 / col1 + + col2 AS col2 FROM tab2
----
26
27
40

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 69 * - col2 * - cor0.col0 + - 46 col0 FROM tab2 cor0
----
12995
139886
207092

query I rowsort
SELECT DISTINCT - 8 - cor0.col2 FROM tab2 AS cor0
----
-34
-35
-46

onlyif mysql # use DIV operator for integer division
query I rowsort label-436
SELECT ALL - col1 * col2 + + col0 DIV - col1 AS col0 FROM tab1 cor0
----
-1254
-1404
-576

skipif mysql # not compatible
query I rowsort label-436
SELECT ALL - col1 * col2 + + col0 / - col1 AS col0 FROM tab1 cor0
----
-1254
-1404
-576

query I rowsort
SELECT ALL - 3 + cor0.col1 * col1 AS col2 FROM tab2 cor0
----
286
3478
958

query I rowsort
SELECT DISTINCT + 6 - - col1 AS col1 FROM tab1 AS cor0
----
16
19
32

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

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

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

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

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

query I rowsort
SELECT + - col0 + 99 FROM tab2 AS cor0
----
20
21
92

query I rowsort
SELECT + + col0 * col0 + + col2 * - col1 * - col1 AS col0 FROM tab1 AS cor0
----
22624
36513
9796

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + col2 * + col1 col1 FROM tab2
----
1560
684
864

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + cor0.col0 * col0 col1 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT + 68 * 26 AS col1 FROM tab2 AS cor0
----
1768

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

query I rowsort
SELECT - - 22 + + col0 FROM tab0 AS cor0
----
111
46
57

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col0 * col0 col2 FROM tab2 AS cor0
----
343
474552
493039

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

query I rowsort
SELECT - - 20 * col0 FROM tab0 AS cor0
----
1780
480
700

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

query I rowsort
SELECT DISTINCT - 72 * - col2 FROM tab0 AS cor0
----
2376
5904
72

query I rowsort
SELECT - + 38 + + cor0.col2 AS col0 FROM tab0 AS cor0
----
-37
-5
44

query I rowsort
SELECT ALL + + 32 AS col0 FROM tab1 AS cor0
----
32
32
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + col1 * + 90 col0 FROM tab0 AS cor0
----
7764
8279
8765

query I rowsort
SELECT - cor0.col0 * col0 + + col2 AS col0 FROM tab1 AS cor0
----
-4039
-6304
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + - col1 * 99 col0 FROM tab0 AS cor0
----
-8481
-8927
-9602

query I rowsort
SELECT ALL - col0 * 64 AS col2 FROM tab2 cor0
----
-448
-4992
-5056

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-464
SELECT ALL + - col2 / 16 col0 FROM tab0 AS cor0
----
-2
-5
0

query I rowsort
SELECT + col0 * ( - 52 ) AS col2 FROM tab1 cor0
----
-156
-3328
-4160

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

query I rowsort
SELECT DISTINCT + col1 + 91 * + 65 FROM tab0 AS cor0
----
6001
6006
6012

query I rowsort
SELECT DISTINCT + + cor0.col0 * 75 - 81 AS col2 FROM tab0 AS cor0
----
1719
2544
6594

onlyif mysql # use DIV operator for integer division
query I rowsort label-469
SELECT ALL + 62 DIV col2 FROM tab0
----
0
1
62

skipif mysql # not compatible
query I rowsort label-469
SELECT ALL + 62 / col2 FROM tab0
----
0
1
62

query I rowsort
SELECT 9 * + col1 AS col0 FROM tab2 cor0
----
153
279
531

query I rowsort
SELECT - col2 * 91 FROM tab2 AS cor0
----
-2366
-2457
-3458

query I rowsort
SELECT 29 + + 87 * col2 FROM tab0 AS cor0
----
116
2900
7163

query I rowsort
SELECT ALL col0 * 79 + col2 AS col0 FROM tab2
----
580
6188
6279

query I rowsort
SELECT + col0 * 23 AS col1 FROM tab2
----
161
1794
1817

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

query I rowsort
SELECT - + cor0.col1 * col2 + col0 * - col0 FROM tab1 AS cor0
----
-1413
-4666
-7648

query I rowsort
SELECT ALL col1 + - 20 AS col2 FROM tab2
----
-3
11
39

query I rowsort
SELECT tab1.col0 * + col2 - col0 * col0 AS col2 FROM tab1
----
-448
1280
153

query I rowsort
SELECT ALL - col2 + + 83 AS col2 FROM tab1
----
-13
26
29

query I rowsort
SELECT + + col0 * + 31 AS col0 FROM tab1 AS cor0
----
1984
2480
93

query I rowsort
SELECT DISTINCT 15 + ( + col0 + ( + col1 ) ) * - col0 FROM tab1 AS cor0
----
-4721
-72
-7425

query I rowsort
SELECT ALL + ( - 56 ) * cor0.col0 + + cor0.col2 AS col0 FROM tab2 AS cor0
----
-365
-4342
-4386

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

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

skipif mysql # not compatible
query I rowsort label-484
SELECT ALL + CAST ( col2 AS INTEGER ) * - col0 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

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

query I rowsort
SELECT ALL col2 * - cor0.col2 * - cor0.col2 + + 69 * - col0 AS col1 FROM tab2 AS cor0
----
12194
19200
49421

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

query I rowsort
SELECT DISTINCT - col2 * 2 + col0 FROM tab1 AS cor0
----
-105
-112
-50

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * - 84 col0 FROM tab1 AS cor0
----
-4536
-4788
-8064

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

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

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

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

skipif mysql # not compatible
query I rowsort label-496
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-497
SELECT DISTINCT CAST( NULL AS SIGNED ) + col0 col0 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-497
SELECT DISTINCT CAST ( NULL AS INTEGER ) + col0 col0 FROM tab2 AS cor0
----
NULL

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

skipif mysql # not compatible
query I rowsort label-498
SELECT DISTINCT - 3 + - ( - cor0.col0 ) / col1 FROM tab1 AS cor0
----
-3
3

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

query I rowsort
SELECT col0 * + col2 + col2 + + 22 FROM tab0 AS cor0
----
58
7402
847

onlyif mysql # use DIV operator for integer division
query I rowsort label-501
SELECT ALL col1 + - col1 DIV - col1 FROM tab0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-501
SELECT ALL col1 + - col1 / - col1 FROM tab0
----
87
92
98

query I rowsort
SELECT + 67 * col0 FROM tab0 AS cor0
----
1608
2345
5963

query I rowsort
SELECT DISTINCT 36 * col1 + col0 FROM tab1 AS cor0
----
424
548
939

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-505
SELECT - + ( - col1 ) + + CAST( col0 AS SIGNED ) DIV col2 FROM tab1 AS cor0
----
11
13
26

skipif mysql # not compatible
query I rowsort label-505
SELECT - + ( - col1 ) + + CAST ( col0 AS INTEGER ) / col2 FROM tab1 AS cor0
----
11
13
26

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

skipif mysql # not compatible
query I rowsort label-506
SELECT - col0 + - col1 + CAST ( col2 AS INTEGER ) * cor0.col2 AS col2 FROM tab0 AS cor0
----
-131
6544
979

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

query I rowsort
SELECT + col0 * + 63 + - 40 AS col0 FROM tab0 AS cor0
----
1472
2165
5567

onlyif mysql # use DIV operator for integer division
query I rowsort label-509
SELECT DISTINCT - col2 DIV - col1 - - 56 AS col1 FROM tab1 cor0
----
58
61
63

skipif mysql # not compatible
query I rowsort label-509
SELECT DISTINCT - col2 / - col1 - - 56 AS col1 FROM tab1 cor0
----
58
61
63

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

query I rowsort
SELECT col0 * ( 3 ) * col1 + col1 AS col1 FROM tab0 AS cor0
----
10282
24388
6278

query I rowsort
SELECT DISTINCT col0 - 11 AS col1 FROM tab1 AS cor0
----
-8
53
69

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

query I rowsort
SELECT + col2 + + col0 + + col0 FROM tab2 AS cor0
----
182
196
41

query I rowsort
SELECT col0 * + 27 + col1 + cor0.col2 FROM tab1 AS cor0
----
161
1795
2269

query I rowsort
SELECT DISTINCT - col1 + + 56 FROM tab0 cor0
----
-30
-35
-41

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

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

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

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

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

query I rowsort
SELECT 64 AS col2 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to c8b19f4c3ff38700cd2bb8a077bf29b9

query I rowsort
SELECT col2 - 94 FROM tab0 AS cor0
----
-12
-61
-93

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

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

query I rowsort
SELECT + col2 + ( + col0 ) * + col1 + col1 FROM tab1 AS cor0
----
1149
158
707

onlyif mysql # use DIV operator for integer division
query I rowsort label-525
SELECT DISTINCT col0 DIV + 15 FROM tab0 cor0
----
1
2
5

skipif mysql # not compatible
query I rowsort label-525
SELECT DISTINCT col0 / + 15 FROM tab0 cor0
----
1
2
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-526
SELECT + col1 + + col2 + + col0 * col2 DIV col1 FROM tab1 cor0
----
431
699
86

skipif mysql # not compatible
query I rowsort label-526
SELECT + col1 + + col2 + + col0 * col2 / col1 FROM tab1 cor0
----
431
699
86

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-529
SELECT - CAST( + col1 AS SIGNED ) DIV col0 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-529
SELECT - CAST ( + col1 AS INTEGER ) / col0 FROM tab0 AS cor0
----
-1
-2
-3

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 74 col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

query I rowsort
SELECT DISTINCT tab2.col1 * 7 FROM tab2
----
119
217
413

query I rowsort
SELECT cor0.col1 + cor0.col2 AS col0 FROM tab0, tab0 AS cor0, tab0 cor1
----
27 values hashing to 15ff38272c484fb486e1883e64781cf3

query I rowsort
SELECT ALL 36 + + col0 AS col1 FROM tab2 AS cor0
----
114
115
43

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

query I rowsort
SELECT DISTINCT 90 * cor0.col0 FROM tab2 AS cor0
----
630
7020
7110

onlyif mysql # use DIV operator for integer division
query I rowsort label-537
SELECT ALL - - 63 + - col0 * ( - col2 ) DIV col1 AS col0 FROM tab0 AS cor0
----
143
63
72

skipif mysql # not compatible
query I rowsort label-537
SELECT ALL - - 63 + - col0 * ( - col2 ) / col1 AS col0 FROM tab0 AS cor0
----
143
63
72

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

query I rowsort
SELECT ALL + col2 * + col2 + col2 + col0 * + col1 * col2 AS col1 FROM tab2
----
120354
52516
6615

query I rowsort
SELECT DISTINCT col0 * col2 + + col0 * + col2 + - col0 AS col2 FROM tab2
----
371
3978
5925

query I rowsort
SELECT col1 * col0 * + 25 FROM tab1
----
16000
1950
26000

query I rowsort
SELECT ALL col2 * col0 * col0 - + 84 AS col1 FROM tab2
----
1239
158100
237074

query I rowsort
SELECT DISTINCT col2 * col2 + ( + col2 ) + tab1.col2 * 86 AS col1 FROM tab1
----
17568
7614
8208

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 4 + col0 col1 FROM tab2 AS cor0
----
11
82
83

query I rowsort
SELECT - 65 * - col1 FROM tab2 AS cor0
----
1105
2015
3835

query I rowsort
SELECT - col0 * cor0.col2 + 77 FROM tab1 AS cor0
----
-3571
-7603
-85

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

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

query I rowsort
SELECT DISTINCT ( ( + col1 ) * - ( + 44 ) + col0 ) FROM tab2
----
-1357
-2518
-669

query I rowsort
SELECT col2 + col1 * 9 AS col2 FROM tab1 AS cor0
----
147
213
288

query I rowsort
SELECT + - 51 * 6 + cor1.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to d02267254e3453898f5b7187092ae89c

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

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

query I rowsort
SELECT - + cor0.col2 + - 15 * col0 FROM tab2 AS cor0
----
-1196
-1223
-132

query I rowsort
SELECT DISTINCT col2 + - col0 * tab2.col2 FROM tab2
----
-162
-2002
-2964

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

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

query I rowsort
SELECT - - 63 + + col0 FROM tab1 AS cor0
----
127
143
66

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

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

query I rowsort
SELECT - cor0.col2 * - col1 + + col1 * ( - col1 + col0 ) FROM tab1 AS cor0
----
1110
2119
806

query I rowsort
SELECT ALL - 4 + - col0 * - 11 AS col0 FROM tab1 AS cor0
----
29
700
876

query I rowsort
SELECT col0 + - col0 * - 10 FROM tab0 AS cor0
----
264
385
979

query I rowsort
SELECT DISTINCT + cor0.col1 + - cor0.col1 AS col0 FROM tab1, tab0, tab2 AS cor0
----
0

query I rowsort
SELECT ALL 96 * col1 AS col2 FROM tab2
----
1632
2976
5664

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

query I rowsort
SELECT 60 + - col1 * col1 FROM tab0 AS cor0
----
-7336
-8221
-9349

query I rowsort
SELECT ALL - - ( col1 ) * col1 * col2 + col1 FROM tab2 cor0
----
10999
25978
90565

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

skipif mysql # not compatible
query I rowsort label-567
SELECT + col2 / ( col1 + col1 ) FROM tab1
----
1
2
3

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

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

query I rowsort
SELECT DISTINCT + tab0.col0 * ( - col1 * - col1 ) - - tab0.col0 AS col2 FROM tab0
----
177528
329350
737098

query I rowsort
SELECT DISTINCT + col2 * 61 FROM tab2
----
1586
1647
2318

query I rowsort
SELECT 40 + + col2 AS col2 FROM tab2 AS cor0
----
66
67
78

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

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

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

query I rowsort
SELECT ALL ( + col1 ) + + col2 * + 14 FROM tab2 AS cor0
----
409
423
549

query I rowsort
SELECT + col1 * + col1 + - col1 * - col1 FROM tab1 cor0
----
1352
200
338

query I rowsort
SELECT ALL + col1 * 90 FROM tab2
----
1530
2790
5310

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

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

query I rowsort
SELECT ALL - 80 * + col2 + + col2 - - col1 * - 50 FROM tab0 AS cor0
----
-11028
-4929
-6907

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

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

query I rowsort
SELECT col2 + + ( col2 ) * col0 * + col0 AS col0 FROM tab2 AS cor0
----
1350
158210
237196

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

skipif mysql # not compatible
query I rowsort label-581
SELECT + + col2 * col0 * col1 + col0 * - CAST ( + col2 AS INTEGER ) FROM tab0 AS cor0
----
3360
656820
67320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * + 20 + 79 col0 FROM tab1 AS cor0
----
-121
-181
-441

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

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

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

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

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

query I rowsort
SELECT ALL + 58 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 9ee363c6ac19cfdb8a50c7dfd5cc2b8a

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

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

query I rowsort
SELECT DISTINCT + + 87 FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
87

query I rowsort
SELECT - - cor0.col1 * ( col0 ) + - col2 * col2 * 79 + + col1 * - col1 * - 87 FROM tab1 cor0
----
-171474
-247331
-712321

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

query I rowsort
SELECT DISTINCT + - ( 56 ) FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
-56

onlyif mysql # use DIV operator for integer division
query I rowsort label-593
SELECT ALL 8 DIV col2 + col1 - col2 * col1 col2 FROM tab1
----
-1235
-1378
-560

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-593
SELECT ALL 8 / col2 + col1 - col2 * col1 col2 FROM tab1
----
-1235
-1378
-560

query I rowsort
SELECT ALL - col1 + + col0 + - col0 * - col0 AS col2 FROM tab0
----
1163
514
7919

onlyif mysql # use DIV operator for integer division
query I rowsort label-595
SELECT ALL - col1 * 11 DIV col0 + col0 * - col2 FROM tab2
----
-2036
-237
-3004

skipif mysql # not compatible
query I rowsort label-595
SELECT ALL - col1 * 11 / col0 + col0 * - col2 FROM tab2
----
-2036
-237
-3004

query I rowsort
SELECT + cor0.col1 + 98 FROM tab0 AS cor0
----
184
189
195

query I rowsort
SELECT - col1 + - col1 * + 12 AS col0 FROM tab0 cor0
----
-1118
-1183
-1261

query I rowsort
SELECT ALL col1 + - ( - 23 ) FROM tab1
----
33
36
49

query I rowsort
SELECT - col2 * + 0 * tab1.col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col0 + + cor0.col0 AS col1 FROM tab2, tab1, tab1 AS cor0, tab0 AS cor1
----
128
160
6

query I rowsort
SELECT ALL + 5 + col1 AS col2 FROM tab0 AS cor0
----
102
91
96

query I rowsort
SELECT - col0 * cor0.col0 + + col1 FROM tab2 AS cor0
----
-18
-6025
-6224

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

query I rowsort
SELECT ALL - col1 + + col1 * + col0 + - ( + col2 + - col1 ) * + 48 AS col0 FROM tab2 AS cor0
----
318
378
6127

onlyif mysql # use DIV operator for integer division
query I rowsort label-605
SELECT DISTINCT - - cor0.col1 DIV - col2 - - col0 * col1 AS col2 FROM tab1 cor0
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-605
SELECT DISTINCT - - cor0.col1 / - col2 - - col0 * col1 AS col2 FROM tab1 cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-606
SELECT 51 * col2 + + tab0.col0 DIV 59 AS col1 FROM tab0
----
1683
4183
51

skipif mysql # not compatible
query I rowsort label-606
SELECT 51 * col2 + + tab0.col0 / 59 AS col1 FROM tab0
----
1683
4183
51

query I rowsort
SELECT col2 + 62 FROM tab2
----
100
88
89

query I rowsort
SELECT + col0 + 9 * col1 FROM tab0
----
798
908
908

query I rowsort
SELECT + col0 * - cor0.col2 * + 39 - + col1 FROM tab1 AS cor0
----
-142282
-299533
-6344

query I rowsort
SELECT ALL 24 + - col0 AS col0 FROM tab1
----
-40
-56
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-611
SELECT ALL - + cor0.col2 DIV cor0.col1 + - col2 DIV - ( - col2 + + col0 ) FROM tab0 AS cor0
----
-3
0
11

skipif mysql # not compatible
query I rowsort label-611
SELECT ALL - + cor0.col2 / cor0.col1 + - col2 / - ( - col2 + + col0 ) FROM tab0 AS cor0
----
-3
0
11

onlyif mysql # use DIV operator for integer division
query I rowsort label-612
SELECT ALL + + ( col2 ) + + 71 DIV col1 col1 FROM tab2 AS cor0
----
27
29
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-612
SELECT ALL + + ( col2 ) + + 71 / col1 col1 FROM tab2 AS cor0
----
27
29
42

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-613
SELECT DISTINCT - col2 * + col1 + - 57 + col0 * - col2 * - CAST( - col1 AS SIGNED ) FROM tab0 AS cor0
----
-3549
-671637
-71007

skipif mysql # not compatible
query I rowsort label-613
SELECT DISTINCT - col2 * + col1 + - 57 + col0 * - col2 * - CAST ( - col1 AS INTEGER ) FROM tab0 AS cor0
----
-3549
-671637
-71007

query I rowsort
SELECT DISTINCT 79 * cor0.col2 AS col2 FROM tab2 AS cor0
----
2054
2133
3002

query I rowsort
SELECT + + 51 + - col2 FROM tab0 cor0
----
-31
18
50

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

query I rowsort
SELECT ALL + 4 + + col2 * - 52 AS col2 FROM tab0 AS cor0
----
-1712
-4260
-48

query I rowsort
SELECT + col2 + + col1 + col1 * + col2 FROM tab0 AS cor0
----
195
2957
7635

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

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

query I rowsort
SELECT DISTINCT + 42 + col1 * 76 + col1 FROM tab2 cor0
----
1351
2429
4585

query I rowsort
SELECT DISTINCT + col1 * - col0 + col2 + col1 * + cor0.col2 * ( col1 ) AS col2 FROM tab0 AS cor0
----
242037
6015
671025

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

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

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

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

query I rowsort
SELECT DISTINCT + 12 + col0 AS col1 FROM tab0
----
101
36
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col2 + - col1 * + col0 col1 FROM tab0
----
-2097
-3396
-8181

query I rowsort
SELECT DISTINCT 77 * + col0 + 77 FROM tab1
----
308
5005
6237

query I rowsort
SELECT ALL + 29 * + col1 + ( col0 ) FROM tab2 cor0
----
1789
572
906

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-630
SELECT + - col2 DIV - col0 + + 32 FROM tab0 AS cor0
----
32
32
33

skipif mysql # not compatible
query I rowsort label-630
SELECT + - col2 / - col0 + + 32 FROM tab0 AS cor0
----
32
32
33

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

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

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

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

query I rowsort
SELECT - col0 + - col0 + - col2 AS col1 FROM tab2
----
-182
-196
-41

onlyif mysql # use DIV operator for integer division
query I rowsort label-636
SELECT + col0 - col1 * 82 DIV - col0 AS col0 FROM tab0 cor0
----
172
262
317

skipif mysql # not compatible
query I rowsort label-636
SELECT + col0 - col1 * 82 / - col0 AS col0 FROM tab0 cor0
----
172
262
317

query I rowsort
SELECT ALL + 24 + col2 * + cor0.col2 AS col2 FROM tab1 AS cor0
----
2940
3273
9240

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

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

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

skipif mysql # not compatible
query I rowsort label-640
SELECT CAST ( 71 AS INTEGER ) FROM tab1 AS cor0
----
71
71
71

query I rowsort
SELECT ALL + ( 39 ) * - col2 FROM tab2 AS cor0
----
-1014
-1053
-1482

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

query I rowsort
SELECT DISTINCT - + col1 + col2 * col0 * - ( + cor0.col0 * col2 ) AS col0 FROM tab1 AS cor0
----
-13307914
-26270
-58982413

query I rowsort
SELECT ALL + col1 * 13 FROM tab0 cor0
----
1118
1183
1261

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

query I rowsort
SELECT DISTINCT - 15 * + 92 * cor0.col1 AS col0 FROM tab2 AS cor0
----
-23460
-42780
-81420

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

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

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

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

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

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

query I rowsort
SELECT col0 + - 92 FROM tab1 AS cor0
----
-12
-28
-89

query I rowsort
SELECT cor0.col1 + cor0.col2 * + col1 + - cor0.col2 AS col2 FROM tab2 AS cor0
----
1567
625
841

query I rowsort
SELECT - 27 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 90b76caf54a4e48ee4a9784f52997a6a

query I rowsort
SELECT - col0 * - 74 AS col2 FROM tab1 AS cor0
----
222
4736
5920

query I rowsort
SELECT + ( 8 ) + col0 AS col0 FROM tab2 AS cor0
----
15
86
87

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

query IIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0 WHERE NULL BETWEEN ( NULL ) AND NULL
----

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

query I rowsort
SELECT ALL + tab2.col0 * 21 FROM tab2
----
147
1638
1659

query I rowsort
SELECT + 72 * 84 FROM tab1, tab2 AS cor0
----
9 values hashing to 338f72df378d1397e01c6c48bdec4867

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

query I rowsort
SELECT - 43 - col0 AS col2 FROM tab2 AS cor0
----
-121
-122
-50

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

query I rowsort
SELECT 72 * cor0.col2 * 18 - col2 * col1 FROM tab0 AS cor0
----
1199
39930
98810

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

query I rowsort
SELECT 52 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 76100d10f51995d20efdeb657e444d3c

query I rowsort
SELECT - cor0.col2 * 4 + + col0 + col0 FROM tab0 AS cor0
----
-150
-84
66

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

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

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

query I rowsort
SELECT + cor0.col1 - - 66 AS col2 FROM tab2 AS cor0
----
125
83
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + 66 - - col0 col1 FROM tab0 AS cor0
----
114
136
244

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

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

query I rowsort
SELECT + tab0.col0 * + 94 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to bfa34bea1b8efa20269b4a97bb718e7c

query I rowsort
SELECT 49 AS col2 FROM tab2, tab2 AS cor0, tab1 cor1
----
27 values hashing to a40d8754a5be3ce2309c61bfd3e00197

query I rowsort
SELECT + col2 - - col2 * - col0 FROM tab2
----
-162
-2002
-2964

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT col2 + + CAST ( col0 AS REAL ) * + col0 AS col0 FROM tab2
----
6110
6279
76

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

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

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

query I rowsort
SELECT DISTINCT + col0 * + col1 + + 94 AS col2 FROM tab1
----
1134
172
734

query I rowsort
SELECT col2 + 12 FROM tab0 AS cor0
----
13
45
94

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-684
SELECT DISTINCT col1 DIV + col0 + 78 * - col0 + tab1.col0 * - 33 AS col2 FROM tab1
----
-325
-7104
-8880

skipif mysql # not compatible
query I rowsort label-684
SELECT DISTINCT col1 / + col0 + 78 * - col0 + tab1.col0 * - 33 AS col2 FROM tab1
----
-325
-7104
-8880

query I rowsort
SELECT ALL col2 + 92 + - col2 FROM tab2
----
92
92
92

query I rowsort
SELECT - + cor0.col1 * - 55 * 32 + col0 FROM tab0 AS cor0
----
151384
160249
170755

query I rowsort
SELECT ALL ( col0 * - col0 + ( col2 ) ) AS col1 FROM tab2
----
-22
-6058
-6203

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

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

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

query I rowsort
SELECT + + 74 + - col1 AS col0 FROM tab2 AS cor0
----
15
43
57

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

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

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

query I rowsort
SELECT DISTINCT - tab1.col2 * + 24 AS col2 FROM tab1
----
-1296
-1368
-2304

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-695
SELECT - CAST( + col0 AS SIGNED ) * - col1 + 49 AS col2 FROM tab0 AS cor0
----
2113
3444
8148

skipif mysql # not compatible
query I rowsort label-695
SELECT - CAST ( + col0 AS INTEGER ) * - col1 + 49 AS col2 FROM tab0 AS cor0
----
2113
3444
8148

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

query I rowsort
SELECT + + col0 + + col0 * - cor0.col0 AS col2 FROM tab1 cor0
----
-4032
-6
-6320

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

skipif mysql # not compatible
query I rowsort label-698
SELECT DISTINCT + col1 / - col1 + - col0 FROM tab0
----
-25
-36
-90

query I rowsort
SELECT ALL 85 + + ( col0 ) FROM tab1 cor0
----
149
165
88

query I rowsort
SELECT ALL + + 31 * - col2 FROM tab0 AS cor0
----
-1023
-2542
-31

query I rowsort
SELECT - + 91 * col1 FROM tab0 AS cor0
----
-7826
-8281
-8827

onlyif mysql # use DIV operator for integer division
query I rowsort label-702
SELECT DISTINCT + 42 + ( - col1 ) DIV + 33 col2 FROM tab2 AS cor0
----
41
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-702
SELECT DISTINCT + 42 + ( - col1 ) / + 33 col2 FROM tab2 AS cor0
----
41
42

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-704
SELECT + ( - col1 ) + - col0 DIV - 41 AS col1 FROM tab0 AS cor0
----
-86
-89
-97

skipif mysql # not compatible
query I rowsort label-704
SELECT + ( - col1 ) + - col0 / - 41 AS col1 FROM tab0 AS cor0
----
-86
-89
-97

query I rowsort
SELECT ALL + + col1 + - col2 * 44 FROM tab1 cor0
----
-2350
-2498
-4211

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 - + 54 * - col0 col1 FROM tab0
----
1320
1925
4895

query I rowsort
SELECT - 45 * + col1 + 80 + col1 AS col1 FROM tab2 AS cor0
----
-1284
-2516
-668

query I rowsort
SELECT + - col2 * - col1 + - 64 FROM tab0 AS cor0
----
2774
33
7398

query I rowsort
SELECT ALL + - 6 AS col1 FROM tab2 AS cor0
----
-6
-6
-6

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

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

query I rowsort
SELECT DISTINCT 21 + + col0 + tab0.col2 * col0 FROM tab0
----
7408
837
91

query I rowsort
SELECT + 10 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to a47194429f3e0358a3aebffd5f050113

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col0 + ( col0 ) * ( + col0 ) col0 FROM tab0
----
1260
600
8010

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

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

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

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

query I rowsort
SELECT - 16 + + col1 FROM tab2
----
1
15
43

query I rowsort
SELECT DISTINCT col1 * 64 + col1 FROM tab0 AS cor0
----
5590
5915
6305

onlyif mysql # use DIV operator for integer division
query I rowsort label-719
SELECT ALL col1 DIV - 2 + - col2 * + col1 * - CAST( cor0.col1 + - col0 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
14879
175913
5966

skipif mysql # not compatible
query I rowsort label-719
SELECT ALL col1 / - 2 + - col2 * + col1 * - CAST ( cor0.col1 + - col0 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
14879
175913
5966

query I rowsort
SELECT DISTINCT + col2 + 66 AS col1 FROM tab0 AS cor0
----
148
67
99

query I rowsort
SELECT + col1 + col0 * + 82 AS col2 FROM tab2 AS cor0
----
605
6455
6495

query I rowsort
SELECT ALL - + col1 + 9 FROM tab0 cor0
----
-77
-82
-88

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

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

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

query I rowsort
SELECT DISTINCT + col0 + cor0.col1 * col0 * col1 FROM tab2 cor0
----
22910
271596
6734

query I rowsort
SELECT ALL - + col2 * - ( cor0.col1 ) + - col1 * - 86 + col0 FROM tab0 AS cor0
----
10258
15377
8474

query I rowsort
SELECT DISTINCT - col2 + 86 * col1 AS col1 FROM tab2 AS cor0
----
1424
2639
5048

query I rowsort
SELECT + + col1 * - ( - 84 ) AS col2 FROM tab0 cor0
----
7224
7644
8148

query I rowsort
SELECT ALL - col2 + - col1 * ( col0 ) FROM tab0
----
-2097
-3396
-8181

query I rowsort
SELECT cor0.col1 + + 75 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 808686e7c6ae742c2c290742fcb4aa1e

query I rowsort
SELECT ALL - cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab0 cor2
----
81 values hashing to 26e45cd9fe71a2b90a8bdef20c88e70d

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

query I rowsort
SELECT + 65 * + 39 FROM tab2 AS cor0
----
2535
2535
2535

query I rowsort
SELECT 60 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to a97561e17ecaa618227c75a57b268f33

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

query I rowsort
SELECT DISTINCT col1 + + 43 FROM tab2 AS cor0
----
102
60
74

query I rowsort
SELECT - 22 * col0 FROM tab0 AS cor0
----
-1958
-528
-770

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

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

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

query I rowsort
SELECT ALL col2 * 86 AS col0 FROM tab0 AS cor0
----
2838
7052
86

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

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

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

query I rowsort
SELECT DISTINCT 64 * - col1 AS col1 FROM tab1 AS cor0
----
-1664
-640
-832

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

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

skipif mysql # not compatible
query I rowsort label-746
SELECT ALL - 73 / + cor0.col0 AS col2 FROM tab1 AS cor0
----
-1
-24
0

query I rowsort
SELECT DISTINCT + - 92 + - col0 AS col0 FROM tab1 AS cor0
----
-156
-172
-95

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

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

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

query I rowsort
SELECT ALL + cor0.col0 + + 50 AS col2 FROM tab1 AS cor0
----
114
130
53

query I rowsort
SELECT cor0.col2 + + 44 AS col2 FROM tab1 AS cor0
----
101
140
98

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

query I rowsort
SELECT DISTINCT - col2 * + ( col0 + col2 ) FROM tab2 AS cor0
----
-2704
-4446
-918

query I rowsort
SELECT col1 * + col1 + + 10 * - cor0.col2 AS col0 FROM tab2 AS cor0
----
-91
3221
691

query I rowsort
SELECT col2 * col0 * - col0 + + col2 * + col1 AS col1 FROM tab1
----
-232902
-613152
918

query I rowsort
SELECT DISTINCT + 97 + tab1.col1 FROM tab1, tab0 AS cor0
----
107
110
123

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-758
SELECT ALL + cor0.col1 + + col1 * - CAST( col2 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
-1235
-1378
-560

skipif mysql # not compatible
query I rowsort label-758
SELECT ALL + cor0.col1 + + col1 * - CAST ( col2 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT tab1.col2 * + 25 FROM tab1
----
1350
1425
2400

query I rowsort
SELECT - col1 * - 11 + + col0 * - col0 * + col1 AS col2 FROM tab2 AS cor0
----
-105910
-1178
-358307

query I rowsort
SELECT DISTINCT col2 * 25 - col0 * 38 FROM tab1
----
-1007
-640
1236

query I rowsort
SELECT - 29 * - cor0.col0 + col2 * 23 * cor0.col1 AS col0 FROM tab1 AS cor0
----
14966
31024
32379

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

query I rowsort
SELECT - col0 * + col2 + + ( cor0.col2 + col2 ) * - col1 AS col1 FROM tab2 AS cor0
----
-1863
-4294
-5096

query I rowsort
SELECT - cor0.col2 * - col0 + - ( + 17 ) AS col0 FROM tab2 AS cor0
----
172
2011
2985

onlyif mysql # use DIV operator for integer division
query I rowsort label-766
SELECT - col0 * col1 DIV ( col0 ) AS col0 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-766
SELECT - col0 * col1 / ( col0 ) AS col0 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT + - cor0.col1 + col0 + + col2 AS col1 FROM tab1 AS cor0
----
111
163
31

query I rowsort
SELECT + + 32 + col0 * ( cor0.col2 * cor0.col0 + col1 ) FROM tab0 AS cor0
----
21104
4652
657653

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

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

query I rowsort
SELECT ALL + col1 * 53 FROM tab1
----
1378
530
689

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-772
SELECT DISTINCT col1 * col0 DIV - 42 + + col1 DIV col0 FROM tab2 cor0
----
-1
-109
-31

skipif mysql # not compatible
query I rowsort label-772
SELECT DISTINCT col1 * col0 / - 42 + + col1 / col0 FROM tab2 cor0
----
-1
-109
-31

query I rowsort
SELECT + + col0 + + 90 + + col1 AS col1 FROM tab1 AS cor0
----
119
164
183

query I rowsort
SELECT col2 * + col1 + + col1 * + 34 AS col1 FROM tab0 AS cor0
----
10556
3395
5762

query I rowsort
SELECT + 36 AS col0 FROM tab1, tab0 cor0
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

query I rowsort
SELECT 9 * + ( col0 ) AS col1 FROM tab2 AS cor0
----
63
702
711

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

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

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

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

query I rowsort
SELECT ALL - + 89 * col1 AS col1 FROM tab1 AS cor0
----
-1157
-2314
-890

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * 26 * col0 col1 FROM tab2 AS cor0
----
119652
34918
5642

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

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

query I rowsort
SELECT DISTINCT - 23 * 13 AS col0 FROM tab1 AS cor0
----
-299

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

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

query I rowsort
SELECT DISTINCT 48 * - col1 FROM tab0 cor0
----
-4128
-4368
-4656

query I rowsort
SELECT DISTINCT + 27 * 94 FROM tab1
----
2538

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-792
SELECT + col0 * CAST ( col0 * col1 AS INTEGER ) FROM tab2 AS cor0
----
106097
1519
358956

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

query I rowsort
SELECT ALL 36 * + col1 FROM tab0
----
3096
3276
3492

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-796
SELECT + col2 * col2 + CAST( ( cor0.col0 ) AS SIGNED ) * + 15 AS col2 FROM tab0 AS cor0
----
1449
526
8059

skipif mysql # not compatible
query I rowsort label-796
SELECT + col2 * col2 + CAST ( ( cor0.col0 ) AS INTEGER ) * + 15 AS col2 FROM tab0 AS cor0
----
1449
526
8059

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-798
SELECT DISTINCT col0 + - col2 / CAST ( NULL AS INTEGER ) col0 FROM tab0 AS cor0
----
NULL

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-800
SELECT - col0 * - CAST( 23 AS SIGNED ) * cor0.col0 FROM tab2 AS cor0
----
1127
139932
143543

skipif mysql # not compatible
query I rowsort label-800
SELECT - col0 * - CAST ( 23 AS INTEGER ) * cor0.col0 FROM tab2 AS cor0
----
1127
139932
143543

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-802
SELECT DISTINCT col1 * col2 DIV 86 + col2 FROM tab2
----
36
43
45

skipif mysql # not compatible
query I rowsort label-802
SELECT DISTINCT col1 * col2 / 86 + col2 FROM tab2
----
36
43
45

query I rowsort
SELECT DISTINCT cor0.col2 * 66 - 39 AS col0 FROM tab1 AS cor0
----
3525
3723
6297

query I rowsort
SELECT col1 - - col1 * - ( col2 * ( cor0.col0 ) + - cor0.col0 ) AS col1 FROM tab0 cor0
----
-655928
-65962
97

query I rowsort
SELECT - col2 * + 3 AS col1 FROM tab0 cor0
----
-246
-3
-99

query I rowsort
SELECT 84 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to e8cd683fe8cea77b4326d9b80f21c74a

query I rowsort
SELECT ALL - col1 + + 92 * - cor0.col1 * + col0 AS col0 FROM tab2 AS cor0
----
-123573
-19995
-423443

query I rowsort
SELECT DISTINCT col2 + + 99 * + col2 AS col1 FROM tab0 AS cor0
----
100
3300
8200

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
86
91
97

query I rowsort
SELECT ALL - 32 + col1 AS col2 FROM tab2 AS cor0
----
-1
-15
27

query I rowsort
SELECT ALL - col1 * 5 * cor0.col2 - - 42 AS col0 FROM tab0 AS cor0
----
-14148
-37268
-443

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

query I rowsort
SELECT - 69 + 21 AS col1 FROM tab0 cor0
----
-48
-48
-48

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

query I rowsort
SELECT ALL - 79 * col1 AS col0 FROM tab0 AS cor0
----
-6794
-7189
-7663

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

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

skipif mysql # not compatible
query I rowsort label-821
SELECT DISTINCT - col0 - + col0 / - cor0.col2 FROM tab0 AS cor0
----
-24
-88
0

query I rowsort
SELECT + 44 * - col2 + col1 FROM tab2 AS cor0
----
-1085
-1157
-1655

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

query I rowsort
SELECT ALL + + 75 + - col2 * 41 AS col0 FROM tab0 AS cor0
----
-1278
-3287
34

query I rowsort
SELECT DISTINCT + cor0.col1 * col1 - cor0.col2 FROM tab0 AS cor0
----
7363
8199
9408

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

query I rowsort
SELECT DISTINCT + - 7 + - col1 * + col1 AS col1 FROM tab0 cor0
----
-7403
-8288
-9416

query I rowsort
SELECT ALL 20 + col0 * col2 FROM tab2
----
2048
209
3022

query I rowsort
SELECT col2 * col0 * col0 + + 78 AS col2 FROM tab0
----
1303
19086
649600

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 74 * col1 + tab0.col0 * - col0 col1 FROM tab0
----
-14655
-6940
-8403

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

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

query I rowsort
SELECT 34 + col0 FROM tab2 cor0
----
112
113
41

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

query I rowsort
SELECT DISTINCT 20 + col0 + cor0.col1 AS col1 FROM tab2 AS cor0
----
116
157
58

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

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

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

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

query I rowsort
SELECT col1 * + 73 * col1 FROM tab2 AS cor0
----
21097
254113
70153

query I rowsort
SELECT col2 * col2 + + ( col0 ) AS col1 FROM tab2
----
1523
736
754

onlyif mysql # use DIV operator for integer division
query I rowsort label-842
SELECT - - col1 DIV col0 - - cor0.col1 FROM tab0 AS cor0
----
89
92
99

skipif mysql # not compatible
query I rowsort label-842
SELECT - - col1 / col0 - - cor0.col1 FROM tab0 AS cor0
----
89
92
99

query I rowsort
SELECT col1 * - col1 - 58 AS col0 FROM tab1
----
-158
-227
-734

query I rowsort
SELECT DISTINCT - ( 52 ) FROM tab0, tab1 AS cor0
----
-52

query I rowsort
SELECT DISTINCT - col1 + + ( - cor0.col0 ) * 30 * col0 FROM tab1 AS cor0
----
-122890
-192013
-296

query I rowsort
SELECT + + 64 * col1 FROM tab1 AS cor0
----
1664
640
832

query I rowsort
SELECT - tab1.col0 + - col2 * - tab1.col2 + col1 * + col2 AS col2 FROM tab1
----
10384
3755
4317

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * 31 * col0 + + col1 * - ( col0 + - col2 ) col2 FROM tab0
----
101947
250432
64758

query I rowsort
SELECT DISTINCT - col1 + col2 * 38 AS col0 FROM tab2
----
1427
929
995

onlyif mysql # use DIV operator for integer division
query I rowsort label-850
SELECT ALL - col2 + col0 DIV 13 FROM tab1
----
-53
-54
-90

skipif mysql # not compatible
query I rowsort label-850
SELECT ALL - col2 + col0 / 13 FROM tab1
----
-53
-54
-90

query I rowsort
SELECT ALL col0 + - 93 AS col0 FROM tab1
----
-13
-29
-90

query I rowsort
SELECT DISTINCT - tab0.col0 + 69 * tab0.col2 FROM tab0
----
2253
34
5569

query I rowsort
SELECT DISTINCT + col2 * + 88 + 37 * + col0 AS col1 FROM tab2
----
2635
5174
6267

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + cor0.col2 + + col2 * + col1 col1 FROM tab1 cor0
----
1424
1461
691

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 57 * 45 + - cor0.col2 + + 88 col2 FROM tab2 AS cor0
----
2615
2626
2627

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-859
SELECT + - 39 + 67 DIV col2 + + ( + col0 ) * - col2 FROM tab1 AS cor0
----
-200
-3686
-7719

skipif mysql # not compatible
query I rowsort label-859
SELECT + - 39 + 67 / col2 + + ( + col0 ) * - col2 FROM tab1 AS cor0
----
-200
-3686
-7719

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

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

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

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

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

query I rowsort
SELECT DISTINCT col0 FROM tab2 WHERE NULL = NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + col2 + col1 col1 FROM tab0
----
1175
6815
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * + col0 + - col2 * + col2 + + col0 col1 FROM tab2
----
-673
4876
5486

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

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

skipif mysql # not compatible
query I rowsort label-869
SELECT - col0 * tab0.col1 / col1 AS col1 FROM tab0
----
-24
-35
-89

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

query I rowsort
SELECT DISTINCT col1 + - col0 + - col2 AS col0 FROM tab2
----
-100
-3
-45

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

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

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

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

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

query I rowsort
SELECT DISTINCT - + col2 - cor0.col2 * col1 AS col0 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT + col1 * tab2.col1 * col0 AS col2 FROM tab2
----
22831
271518
6727

query I rowsort
SELECT DISTINCT - col1 * cor0.col2 - + col2 FROM tab1 AS cor0
----
-1344
-1458
-627

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

skipif mysql # not compatible
query I rowsort label-879
SELECT ALL + col0 / col0 AS col0 FROM tab2 AS cor0
----
1
1
1

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

query I rowsort
SELECT - col0 * - col0 AS col0 FROM tab2 WHERE NULL > NULL
----

query I rowsort
SELECT - col0 - - col0 * - col0 * - col2 AS col2 FROM tab2
----
1316
158106
237079

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

query I rowsort
SELECT + col0 + - 22 AS col1 FROM tab0
----
13
2
67

query I rowsort
SELECT - 24 AS col2 FROM tab1, tab2 cor0
----
9 values hashing to 797d0f7c145f8ac623924448c714bbcc

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

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

query I rowsort
SELECT - - col0 + - col2 * - 48 AS col1 FROM tab2 AS cor0
----
1303
1326
1903

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

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

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

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

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

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

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

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

query I rowsort
SELECT cor0.col1 + cor0.col0 + 54 * - col0 FROM tab1 AS cor0
----
-133
-3382
-4227

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

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

query I rowsort
SELECT ALL - col2 + - col1 * - col1 AS col1 FROM tab0 cor0
----
7363
8199
9408

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

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

query I rowsort
SELECT col0 + - tab1.col1 + col0 FROM tab1
----
-20
118
147

query I rowsort
SELECT - 9 * + col0 FROM tab2
----
-63
-702
-711

onlyif mysql # use DIV operator for integer division
query I rowsort label-902
SELECT - 31 DIV 60 AS col0 FROM tab0, tab2 AS cor0, tab1 cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

skipif mysql # not compatible
query I rowsort label-902
SELECT - 31 / 60 AS col0 FROM tab0, tab2 AS cor0, tab1 cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

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

query I rowsort
SELECT ALL - 10 - col2 AS col0 FROM tab1 AS cor0
----
-106
-64
-67

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

query I rowsort
SELECT ALL - + cor0.col1 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col1 * + 69 col1 FROM tab0
----
6020
6370
6790

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

skipif mysql # not compatible
query I rowsort label-908
SELECT DISTINCT + ( 51 ) * - col1 / tab1.col1 AS col0 FROM tab1
----
-51

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

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

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

query I rowsort
SELECT cor0.col2 - - cor0.col0 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 0a9ba7ddbb78279db2d78308414e03c9

query I rowsort
SELECT ALL - 90 * + 91 AS col1 FROM tab1 AS cor0
----
-8190
-8190
-8190

query I rowsort
SELECT col0 + + col1 * col1 FROM tab0 cor0
----
7420
8370
9444

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-915
SELECT + ( col0 ) * - CAST( - col2 * - col2 AS SIGNED ) FROM tab0
----
-26136
-35
-598436

skipif mysql # not compatible
query I rowsort label-915
SELECT + ( col0 ) * - CAST ( - col2 * - col2 AS INTEGER ) FROM tab0
----
-26136
-35
-598436

onlyif mysql # use DIV operator for integer division
query I rowsort label-916
SELECT DISTINCT 80 * - col0 * col0 + + col0 DIV col0 + + col1 FROM tab1
----
-327669
-511986
-693

skipif mysql # not compatible
query I rowsort label-916
SELECT DISTINCT 80 * - col0 * col0 + + col0 / col0 + + col1 FROM tab1
----
-327669
-511986
-693

query I rowsort
SELECT ALL col1 * + col2 + + ( col1 ) AS col1 FROM tab0
----
194
2924
7553

query I rowsort
SELECT DISTINCT 58 - col0 AS col2 FROM tab1
----
-22
-6
55

query I rowsort
SELECT DISTINCT - + 99 * - col0 + cor0.col2 AS col1 FROM tab1 AS cor0
----
351
6393
8016

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

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

query I rowsort
SELECT DISTINCT + col2 + col1 * col2 + col0 * + col1 AS col2 FROM tab0 AS cor0
----
15643
3493
4935

onlyif mysql # use DIV operator for integer division
query I rowsort label-923
SELECT ALL + col0 DIV - col2 - col0 * + col0 AS col1 FROM tab0 AS cor0
----
-1260
-576
-7922

skipif mysql # not compatible
query I rowsort label-923
SELECT ALL + col0 / - col2 - col0 * + col0 AS col1 FROM tab0 AS cor0
----
-1260
-576
-7922

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

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

query I rowsort
SELECT DISTINCT + - col2 + 88 * + col2 * + col1 FROM tab2 cor0
----
134966
56810
73629

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

query I rowsort
SELECT ALL + col2 * col2 * col2 - col0 FROM tab0 AS cor0
----
-34
35913
551279

query I rowsort
SELECT + col0 * - 66 AS col0 FROM tab2 AS cor0
----
-462
-5148
-5214

query I rowsort
SELECT DISTINCT col2 + 85 FROM tab1 AS cor0
----
139
142
181

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + + col2 * 43 col2 FROM tab2 AS cor0
----
1040
1154
1555

query I rowsort
SELECT - col1 * - cor0.col0 + 7 * - col2 * col1 AS col0 FROM tab0 cor0
----
-17802
-44135
2716

query I rowsort
SELECT ALL - col1 + - ( 18 ) AS col2 FROM tab2 AS cor0
----
-35
-49
-77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * - ( + col0 ) + col2 * col1 col1 FROM tab2 AS cor0
----
6887
7618
886

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + col0 * col1 + - col1 col0 FROM tab0 AS cor0
----
2011
3299
8090

query IIIIIIIII rowsort
SELECT * FROM tab0, tab1, tab2 AS cor0 WHERE NULL BETWEEN NULL AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-938
SELECT + col0 * col2 + col2 DIV + col2 FROM tab1 AS cor0
----
163
3649
7681

skipif mysql # not compatible
query I rowsort label-938
SELECT + col0 * col2 + col2 / + col2 FROM tab1 AS cor0
----
163
3649
7681

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

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

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

query I rowsort
SELECT + col1 * + col2 + col1 * - col1 FROM tab0 cor0
----
-4558
-819
-9312

query I rowsort
SELECT ALL - col1 * - col1 + col2 * col0 AS col0 FROM tab2 AS cor0
----
1150
3291
5509

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

query I rowsort
SELECT - - col2 + col0 * col1 + - col0 AS col0 FROM tab0 AS cor0
----
2073
3361
8092

query III rowsort
SELECT * FROM tab2 AS cor0 WHERE ( - col1 ) NOT BETWEEN - col2 * - col0 AND NULL OR + col0 NOT IN ( col0 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

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

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

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

query I rowsort
SELECT col1 + + tab0.col0 + col2 * - col1 * - col2 FROM tab0
----
229
612064
93764

query I rowsort
SELECT ALL ( col0 ) * + col0 + col2 + cor0.col1 * - cor0.col1 AS col0 FROM tab0 AS cor0
----
-278
-6787
-8183

query I rowsort
SELECT ALL + + 44 * - col1 * col0 + + col2 * - col0 FROM tab1 AS cor0
----
-31808
-3594
-53440

query I rowsort
SELECT + + 86 * + col0 FROM tab1 AS cor0
----
258
5504
6880

query I rowsort
SELECT DISTINCT + 37 * + cor0.col0 AS col0 FROM tab2 AS cor0
----
259
2886
2923

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

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

query I rowsort
SELECT ALL + col0 + col2 + + col2 AS col1 FROM tab2
----
130
155
61

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

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

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

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

query I rowsort
SELECT DISTINCT col2 * col1 + col1 + + col1 AS col0 FROM tab1 AS cor0
----
1274
1456
590

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

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

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

query I rowsort
SELECT + + 69 + + cor0.col2 FROM tab1 AS cor0
----
123
126
165

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

query I rowsort
SELECT ALL col2 * 76 AS col1 FROM tab2 AS cor0
----
1976
2052
2888

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

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

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

query I rowsort
SELECT ALL - tab2.col1 AS col2 FROM tab2, tab2 cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 * + cor0.col2 * cor0.col2 - - cor0.col2 col0 FROM tab0 cor0
----
-611802
-93621
-96

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

skipif mysql # not compatible
query I rowsort label-973
SELECT ALL col1 / - 84 AS col2 FROM tab0 AS cor0
----
-1
-1
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-974
SELECT CAST( 41 AS SIGNED ) * cor0.col2 FROM tab2, tab2 AS cor0, tab2 cor1
----
27 values hashing to 7fa5f1ec9261c46e372addf372e76482

skipif mysql # not compatible
query I rowsort label-974
SELECT CAST ( 41 AS INTEGER ) * cor0.col2 FROM tab2, tab2 AS cor0, tab2 cor1
----
27 values hashing to 7fa5f1ec9261c46e372addf372e76482

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

query I rowsort
SELECT + - 79 * col0 * + col2 + 14 + col0 FROM tab0 AS cor0
----
-2716
-576439
-62530

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

query I rowsort
SELECT + 51 + col2 FROM tab0 AS cor0
----
133
52
84

query I rowsort
SELECT - + cor0.col0 + + 39 * col2 AS col0 FROM tab2 cor0
----
1046
1403
936

query I rowsort
SELECT - + ( col0 ) + - cor0.col2 + 55 * - col2 FROM tab0 AS cor0
----
-1872
-4681
-91

query I rowsort
SELECT + 94 + - col2 + - cor0.col2 * col1 AS col1 FROM tab2 AS cor0
----
-1466
-590
-770

query I rowsort
SELECT - + 53 + 73 + - col2 FROM tab2 AS cor0
----
-18
-6
-7

query I rowsort
SELECT 77 * - col0 + col2 + + col0 AS col0 FROM tab1 AS cor0
----
-174
-4807
-5984

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-986
SELECT ALL CAST( - 48 AS SIGNED ) FROM tab1, tab1 AS cor0 CROSS JOIN tab0
----
27 values hashing to 2558735eaa258a08592aef9d33020c18

skipif mysql # not compatible
query I rowsort label-986
SELECT ALL CAST ( - 48 AS INTEGER ) FROM tab1, tab1 AS cor0 CROSS JOIN tab0
----
27 values hashing to 2558735eaa258a08592aef9d33020c18

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

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

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

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

skipif mysql # not compatible
query I rowsort
SELECT ALL ( - cor0.col2 ) * + CAST ( - col0 AS REAL ) + + col0 * 83 * cor0.col1 AS col0 FROM tab1 AS cor0
----
56768
6636
94000

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 + + col0 col1 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT DISTINCT + 24 + col1 AS col1 FROM tab0
----
110
115
121

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-995
SELECT DISTINCT col1 + - col2 * col2 + - col0 DIV + tab0.col1 AS col2 FROM tab0
----
-1003
-6633
96

skipif mysql # not compatible
query I rowsort label-995
SELECT DISTINCT col1 + - col2 * col2 + - col0 / + tab0.col1 AS col2 FROM tab0
----
-1003
-6633
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 44 * col0 + + col1 * col1 col1 FROM tab1
----
-2716
-3351
544

query I rowsort
SELECT ALL ( col0 ) + col2 * - ( + 62 ) FROM tab1
----
-3345
-3470
-5872

query I rowsort
SELECT DISTINCT + 90 + + col2 AS col2 FROM tab0
----
123
172
91

query I rowsort
SELECT col2 - col0 * 92 FROM tab1
----
-222
-5831
-7264

query I rowsort
SELECT + + 47 + - 6 AS col1 FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 5b18986bb294412b3d9f07b7e6fc821e

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

query I rowsort
SELECT ALL + 27 + + col2 + 10 FROM tab1 AS cor0
----
133
91
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-1003
SELECT 68 + col2 DIV col0 AS col1 FROM tab2
----
68
68
71

skipif mysql # not compatible
query I rowsort label-1003
SELECT 68 + col2 / col0 AS col1 FROM tab2
----
68
68
71

query I rowsort
SELECT - + 21 * col1 + - col1 * col0 * + col0 AS col1 FROM tab2 cor0
----
-106454
-2170
-360195

query I rowsort
SELECT DISTINCT col2 - 32 AS col0 FROM tab2
----
-5
-6
6

query I rowsort
SELECT 84 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

query I rowsort
SELECT - col1 * - ( 71 ) AS col2 FROM tab0 AS cor0
----
6106
6461
6887

query I rowsort
SELECT DISTINCT col2 - - 78 FROM tab0
----
111
160
79

query I rowsort
SELECT 80 + 6 AS col1 FROM tab1
----
86
86
86

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

query I rowsort
SELECT ( - cor0.col0 ) FROM tab2, tab0 cor0
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

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

query I rowsort
SELECT cor0.col2 * - 64 * col0 - - 61 AS col1 FROM tab0 AS cor0
----
-2179
-467011
-50627

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

query I rowsort
SELECT + 74 + + col2 FROM tab0 cor0
----
107
156
75

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

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

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

query I rowsort
SELECT DISTINCT 32 * - col1 + col0 FROM tab1 AS cor0
----
-256
-336
-829

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

query I rowsort
SELECT DISTINCT col1 + col1 * col1 + col1 FROM tab2 AS cor0
----
1023
323
3599

query I rowsort
SELECT - col0 + 62 * col0 * col0 FROM tab1 AS cor0
----
253888
396720
555

query I rowsort
SELECT ALL 88 * - col2 FROM tab0 AS cor0
----
-2904
-7216
-88

query I rowsort
SELECT - + col2 * 95 + col0 + col0 FROM tab2 cor0
----
-2314
-2551
-3452

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 + - col0 * col2 col2 FROM tab0 AS cor0
----
-132
-7389
-878

query I rowsort
SELECT - col2 + ( + col0 ) * col2 + - ( - col0 + + col2 ) AS col2 FROM tab0 AS cor0
----
68
7223
750

query I rowsort
SELECT DISTINCT + col1 * + 18 FROM tab1 AS cor0
----
180
234
468

onlyif mysql # use DIV operator for integer division
query I rowsort label-1027
SELECT col1 * cor0.col2 DIV - cor0.col1 + - col0 + - 99 FROM tab2 cor0
----
-133
-203
-216

skipif mysql # not compatible
query I rowsort label-1027
SELECT col1 * cor0.col2 / - cor0.col1 + - col0 + - 99 FROM tab2 cor0
----
-133
-203
-216

query I rowsort
SELECT ALL + col2 * + 95 FROM tab0 AS cor0
----
3135
7790
95

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

skipif mysql # not compatible
query I rowsort label-1029
SELECT col0 + col1 * col2 - col2 * - col0 * CAST ( col1 AS INTEGER ) AS col2 FROM tab2
----
121264
51759
6703

query I rowsort
SELECT col0 * - cor0.col0 * 72 + col1 * + ( + 40 * - col1 ) FROM tab1 AS cor0
----
-27688
-298912
-467560

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

query I rowsort
SELECT ALL - cor0.col1 * - 48 - cor0.col2 * - cor0.col2 FROM tab1 AS cor0
----
3729
4164
9840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1033
SELECT - col0 + - CAST( col2 AS SIGNED ) * col1 * - 31 AS col1 FROM tab0 AS cor0
----
231233
2972
87954

skipif mysql # not compatible
query I rowsort label-1033
SELECT - col0 + - CAST ( col2 AS INTEGER ) * col1 * - 31 AS col1 FROM tab0 AS cor0
----
231233
2972
87954

query I rowsort
SELECT DISTINCT + col1 + 67 AS col2 FROM tab2 AS cor0
----
126
84
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-1035
SELECT - - CAST( 93 AS SIGNED ) DIV + col1 + col2 + - col0 * col0 col0 FROM tab2 cor0
----
-19
-6057
-6198

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1035
SELECT - - CAST ( 93 AS INTEGER ) / + col1 + col2 + - col0 * col0 col0 FROM tab2 cor0
----
-19
-6057
-6198

query I rowsort
SELECT ALL + 93 FROM tab2 cor0 CROSS JOIN tab2, tab1 cor1, tab2 AS cor2, tab0 AS cor3
----
243 values hashing to b79a9a99166058a24a9978c475531e1c

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

query I rowsort
SELECT ALL - 11 + + cor0.col0 AS col1 FROM tab1 AS cor0
----
-8
53
69

query I rowsort
SELECT + 34 * col2 + + 21 FROM tab0 AS cor0
----
1143
2809
55

query I rowsort
SELECT ALL 22 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to c55ee7433d8d39a59b1de2aadd9538c9

query I rowsort
SELECT + col1 * + col1 - col2 FROM tab2
----
251
3455
934

query I rowsort
SELECT DISTINCT - 98 * - col0 AS col1 FROM tab1
----
294
6272
7840

query I rowsort
SELECT 34 AS col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 4e2ca147a59e0d5661c28cf3e5431caa

query I rowsort
SELECT 42 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 325aada2239b6fe1fe2d843515ae8c5e

query I rowsort
SELECT + 99 * - col0 FROM tab0
----
-2376
-3465
-8811

query I rowsort
SELECT col1 + col2 + tab2.col1 AS col2 FROM tab2
----
144
72
89

query I rowsort
SELECT - 68 * + tab0.col2 * ( 65 ) AS col0 FROM tab0
----
-145860
-362440
-4420

query I rowsort
SELECT DISTINCT - col1 + - col0 + 78 * col0 FROM tab1
----
205
4918
6147

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

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

skipif mysql # not compatible
query I rowsort label-1050
SELECT DISTINCT - col0 / - tab1.col2 + col0 FROM tab1
----
3
65
80

query I rowsort
SELECT ALL + ( tab0.col2 ) * col0 * + col0 + + col0 AS col2 FROM tab0
----
1260
19032
649611

onlyif mysql # use DIV operator for integer division
query I rowsort label-1052
SELECT ALL - col0 * - col1 * - col2 + + 55 + + col1 * 23 DIV - col0 AS col1 FROM tab2
----
-119614
-50983
-5905

skipif mysql # not compatible
query I rowsort label-1052
SELECT ALL - col0 * - col1 * - col2 + + 55 + + col1 * 23 / - col0 AS col1 FROM tab2
----
-119614
-50983
-5905

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

query I rowsort
SELECT DISTINCT + 37 * col2 * + cor0.col2 AS col0 FROM tab2 AS cor0
----
25012
26973
53428

query I rowsort
SELECT ALL 50 + col1 AS col1 FROM tab2
----
109
67
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-1056
SELECT ALL - 64 DIV 84 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-1056
SELECT ALL - 64 / 84 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 + col1 * col2 * + col2 col0 FROM tab1 cor0
----
119795
32480
75790

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

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

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

skipif mysql # not compatible
query I rowsort label-1060
SELECT + col0 * ( - col0 ) + - col0 + CAST ( 43 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-13
-6119
-6277

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

query I rowsort
SELECT col0 * - ( 2 ) * + col1 + + 27 + + 99 AS col0 FROM tab2 AS cor0
----
-2560
-308
-9078

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * col2 * + col0 col0 FROM tab1 AS cor0
----
36480
4212
99840

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

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

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

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

skipif mysql # not compatible
query I rowsort label-1066
SELECT - CAST ( 79 AS INTEGER ) FROM tab0
----
-79
-79
-79

query I rowsort
SELECT ALL - 31 - col0 AS col0 FROM tab0 AS cor0
----
-120
-55
-66

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

query I rowsort
SELECT ALL col2 - 52 FROM tab0 AS cor0
----
-19
-51
30

onlyif mysql # use DIV operator for integer division
query I rowsort label-1070
SELECT DISTINCT cor0.col1 + 88 * + cor0.col1 * + col2 + + 60 DIV - col1 FROM tab1 AS cor0
----
109833
123576
50164

skipif mysql # not compatible
query I rowsort label-1070
SELECT DISTINCT cor0.col1 + 88 * + cor0.col1 * + col2 + + 60 / - col1 FROM tab1 AS cor0
----
109833
123576
50164

query I rowsort
SELECT 29 * col1 FROM tab0 AS cor0
----
2494
2639
2813

query I rowsort
SELECT + ( + col0 ) + 57 AS col1 FROM tab2 AS cor0
----
135
136
64

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

query I rowsort
SELECT + 55 + col2 FROM tab1 AS cor0
----
109
112
151

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

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

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

query I rowsort
SELECT ALL 0 + cor0.col0 * ( - ( - col0 ) * - 59 + 93 ) FROM tab1 AS cor0
----
-235712
-252
-370160

query I rowsort
SELECT DISTINCT - col2 * - col1 - - 49 FROM tab1 AS cor0
----
1297
1453
619

query I rowsort
SELECT ALL + - 83 + - col1 * ( + ( col0 ) ) FROM tab2 AS cor0
----
-1426
-300
-4685

query I rowsort
SELECT DISTINCT - + 0 * col0 + col1 AS col0 FROM tab0 AS cor0
----
86
91
97

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

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

query I rowsort
SELECT cor0.col2 + + 42 FROM tab0 AS cor0
----
124
43
75

query I rowsort
SELECT - tab0.col0 + - 71 AS col2 FROM tab0
----
-106
-160
-95

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + ( 25 ) col2 FROM tab0
----
2050
25
825

onlyif mysql # use DIV operator for integer division
query I rowsort label-1087
SELECT - - ( - ( - col2 DIV cor0.col0 ) ) * - col0 * - col2 + + 48 FROM tab1 AS cor0
----
2964
48
7728

skipif mysql # not compatible
query I rowsort label-1087
SELECT - - ( - ( - col2 / cor0.col0 ) ) * - col0 * - col2 + + 48 FROM tab1 AS cor0
----
2964
48
7728

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

query I rowsort
SELECT DISTINCT - - 61 * + col0 AS col2 FROM tab1 AS cor0
----
183
3904
4880

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

query I rowsort
SELECT ALL - + 87 + 39 + + col0 AS col2 FROM tab0 AS cor0
----
-13
-24
41

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

query I rowsort
SELECT - 37 + + col0 AS col1 FROM tab0 AS cor0
----
-13
-2
52

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

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

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

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

query I rowsort
SELECT - + 70 * + col1 AS col2 FROM tab2 AS cor0
----
-1190
-2170
-4130

query I rowsort
SELECT - col2 + - col1 * 77 AS col1 FROM tab0 AS cor0
----
-6655
-7089
-7470

query I rowsort
SELECT - cor0.col2 * col2 * - cor0.col2 + - col2 + - col1 FROM tab2 AS cor0
----
17491
19625
54817

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

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

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

query I rowsort
SELECT ALL - 86 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 9ac806793c03d3a6b5e3a3029d20e4da

query I rowsort
SELECT ALL - col0 + ( col0 ) * col0 FROM tab2 AS cor0
----
42
6006
6162

onlyif mysql # use DIV operator for integer division
query I rowsort label-1103
SELECT + col2 * CAST( ( col1 ) * cor0.col2 AS SIGNED ) + + col1 DIV col1 FROM tab1 AS cor0
----
119809
32491
75817

skipif mysql # not compatible
query I rowsort label-1103
SELECT + col2 * CAST ( ( col1 ) * cor0.col2 AS INTEGER ) + + col1 / col1 FROM tab1 AS cor0
----
119809
32491
75817

onlyif mysql # use DIV operator for integer division
query I rowsort label-1104
SELECT ALL + col0 DIV + 29 + col0 FROM tab1 cor0
----
3
66
82

skipif mysql # not compatible
query I rowsort label-1104
SELECT ALL + col0 / + 29 + col0 FROM tab1 cor0
----
3
66
82

query I rowsort
SELECT col2 - + col2 * - col2 * col2 FROM tab1 AS cor0
----
157518
185250
884832

query I rowsort
SELECT + - col2 - 12 AS col2 FROM tab0 cor0
----
-13
-45
-94

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

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

query I rowsort
SELECT + cor0.col0 * col1 * cor0.col1 - col1 FROM tab2 AS cor0
----
22814
271459
6696

query I rowsort
SELECT col0 + - 67 + 30 AS col1 FROM tab1 AS cor0
----
-34
27
43

query I rowsort
SELECT ALL + cor0.col1 * + 77 * 5 FROM tab2 AS cor0
----
11935
22715
6545

query I rowsort
SELECT ALL - col0 + - ( col2 ) * + tab2.col0 FROM tab2
----
-196
-2106
-3081

query I rowsort
SELECT DISTINCT - ( + 76 ) AS col1 FROM tab2 AS cor0
----
-76

query I rowsort
SELECT DISTINCT 15 + + cor1.col2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab1 AS cor2
----
111
69
72

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1117
SELECT - 20 DIV - col0 + tab0.col0 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-1117
SELECT - 20 / - col0 + tab0.col0 FROM tab0
----
24
35
89

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 55 * - 23 + - col0 * 82 col0 FROM tab0 AS cor0
----
-3233
-4135
-8563

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

skipif mysql # not compatible
query I rowsort label-1120
SELECT DISTINCT - col2 / + 48 - - col0 AS col0 FROM tab0 AS cor0
----
24
35
88

query I rowsort
SELECT 96 * col2 FROM tab1 AS cor0
----
5184
5472
9216

query I rowsort
SELECT - - 83 + col0 AS col1 FROM tab0 AS cor0
----
107
118
172

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1123
SELECT ALL - CAST( col2 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-1123
SELECT ALL - CAST ( col2 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-54
-57
-96

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

query I rowsort
SELECT ALL 82 + + col0 * + col0 FROM tab2 AS cor0
----
131
6166
6323

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + + 42 col1 FROM tab2 cor0
----
68
69
80

query I rowsort
SELECT - 51 * + col2 FROM tab1 AS cor0
----
-2754
-2907
-4896

onlyif mysql # use DIV operator for integer division
query I rowsort label-1128
SELECT ALL + col2 DIV col0 + col2 AS col2 FROM tab2 cor0
----
26
30
38

skipif mysql # not compatible
query I rowsort label-1128
SELECT ALL + col2 / col0 + col2 AS col2 FROM tab2 cor0
----
26
30
38

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

query I rowsort
SELECT ALL - ( + 97 ) + col1 AS col2 FROM tab0 AS cor0
----
-11
-6
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1131
SELECT DISTINCT - - col1 * - col1 - + col2 DIV col2 FROM tab0 AS cor0
----
-7397
-8282
-9410

skipif mysql # not compatible
query I rowsort label-1131
SELECT DISTINCT - - col1 * - col1 - + col2 / col2 FROM tab0 AS cor0
----
-7397
-8282
-9410

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - CAST ( 57 AS REAL ) FROM tab2 AS cor0
----
-57

query I rowsort
SELECT - 70 * - 48 FROM tab0 AS cor0
----
3360
3360
3360

onlyif mysql # use DIV operator for integer division
query I rowsort label-1134
SELECT ALL 46 * col2 + col1 + - cor0.col2 DIV + 73 FROM tab2 AS cor0
----
1255
1273
1765

skipif mysql # not compatible
query I rowsort label-1134
SELECT ALL 46 * col2 + col1 + - cor0.col2 / + 73 FROM tab2 AS cor0
----
1255
1273
1765

onlyif mysql # use DIV operator for integer division
query I rowsort label-1135
SELECT ALL - col2 DIV col0 - 26 AS col1 FROM tab1 AS cor0
----
-26
-27
-44

skipif mysql # not compatible
query I rowsort label-1135
SELECT ALL - col2 / col0 - 26 AS col1 FROM tab1 AS cor0
----
-26
-27
-44

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1137
SELECT ALL 89 DIV col0 + col0 FROM tab0
----
27
37
90

skipif mysql # not compatible
query I rowsort label-1137
SELECT ALL 89 / col0 + col0 FROM tab0
----
27
37
90

query I rowsort
SELECT DISTINCT 52 + + 66 AS col1 FROM tab0, tab0 AS cor0
----
118

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

query I rowsort
SELECT + col2 * 70 + - col1 FROM tab2 cor0
----
1761
1859
2643

skipif mysql # not compatible
query I rowsort
SELECT ALL + - cor0.col0 * CAST ( + 47 AS REAL ) AS col0 FROM tab2 AS cor0
----
-329
-3666
-3713

query I rowsort
SELECT ALL col2 + col1 * - col1 AS col1 FROM tab0 cor0
----
-7363
-8199
-9408

query I rowsort
SELECT - col2 * ( 47 ) AS col2 FROM tab0 AS cor0
----
-1551
-3854
-47

query I rowsort
SELECT col1 * + 70 FROM tab2 AS cor0
----
1190
2170
4130

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

query I rowsort
SELECT ALL col2 * 86 AS col0 FROM tab0
----
2838
7052
86

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

query I rowsort
SELECT tab2.col2 * - 26 + - 85 * col2 AS col0 FROM tab2
----
-2886
-2997
-4218

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 74 + cor0.col0 col1 FROM tab2 AS cor0
----
152
153
81

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1151
SELECT 29 DIV - 90 + tab0.col0 col1 FROM tab0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1151
SELECT 29 / - 90 + tab0.col0 col1 FROM tab0
----
24
35
89

query I rowsort
SELECT - 21 + ( + col2 ) FROM tab0
----
-20
12
61

query I rowsort
SELECT DISTINCT + 2 * col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT DISTINCT col0 * - tab2.col0 + + 15 AS col0 FROM tab2
----
-34
-6069
-6226

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

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

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

query I rowsort
SELECT 35 + col0 FROM tab2
----
113
114
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * - col1 + col2 col1 FROM tab1 AS cor0
----
1136
132
697

onlyif mysql # use DIV operator for integer division
query I rowsort label-1160
SELECT ALL cor0.col2 DIV + col2 AS col2 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1160
SELECT ALL cor0.col2 / + col2 AS col2 FROM tab0 AS cor0
----
1
1
1

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

query I rowsort
SELECT ALL col0 * 90 + + col2 FROM tab1 AS cor0
----
324
5817
7296

query I rowsort
SELECT DISTINCT + - col1 - 0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT - col2 + 28 FROM tab0 AS cor0
----
-5
-54
27

query I rowsort
SELECT + - col2 + 51 FROM tab1 AS cor0
----
-3
-45
-6

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

query I rowsort
SELECT col0 * - ( + col0 + col2 * + 14 ) AS col1 FROM tab1 AS cor0
----
-113920
-2277
-55168

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1169
SELECT DISTINCT + - col1 * + CAST ( - cor0.col0 AS INTEGER ) col0 FROM tab1 AS cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * col1 + 5 col2 FROM tab1 AS cor0
----
-1035
-635
-73

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab2 WHERE NOT col2 BETWEEN NULL AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col2 + + col1 * col0 + col2 col1 FROM tab2 AS cor0
----
1081
2027
6162

onlyif mysql # use DIV operator for integer division
query I rowsort label-1173
SELECT col1 * + col0 - col1 DIV - col0 FROM tab1 AS cor0
----
1040
640
86

skipif mysql # not compatible
query I rowsort label-1173
SELECT col1 * + col0 - col1 / - col0 FROM tab1 AS cor0
----
1040
640
86

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

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

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

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

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

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

query I rowsort
SELECT - col2 + + col0 * + col2 FROM tab2 cor0
----
162
2002
2964

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE NOT ( NULL ) <= ( - col1 )
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NULL <> ( col2 )
----

query I rowsort
SELECT col2 + col2 * + col1 + + col1 FROM tab2
----
1619
701
895

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + + col2 - tab0.col1 * col2 col1 FROM tab0
----
-2719
-7289
1

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1186
SELECT + col1 - - cor0.col1 DIV cor0.col1 AS col2 FROM tab2 AS cor0
----
18
32
60

skipif mysql # not compatible
query I rowsort label-1186
SELECT + col1 - - cor0.col1 / cor0.col1 AS col2 FROM tab2 AS cor0
----
18
32
60

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

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

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

query I rowsort
SELECT ALL cor0.col2 * tab0.col1 AS col0 FROM tab2, tab2 cor0 CROSS JOIN tab0
----
27 values hashing to beb2df893579871bcb51459c78b13f94

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

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

query I rowsort
SELECT DISTINCT - col2 * + col2 * 82 AS col2 FROM tab2 cor0
----
-118408
-55432
-59778

query I rowsort
SELECT DISTINCT + - 92 * - col2 + col0 FROM tab1 AS cor0
----
4971
5308
8912

query I rowsort
SELECT ALL - - cor0.col1 * ( cor0.col0 ) * - col0 + - 31 * col0 + + col0 FROM tab0 AS cor0
----
-119875
-50256
-723481

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

skipif mysql # not compatible
query I rowsort label-1195
SELECT DISTINCT - col1 + CAST ( ( + col2 ) AS INTEGER ) + - col1 AS col2 FROM tab2 AS cor0
----
-35
-92
4

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

query I rowsort
SELECT DISTINCT - col2 * + 20 * cor0.col2 - cor0.col2 * + ( + col0 + + cor0.col1 ) FROM tab1 AS cor0
----
-193248
-59886
-69198

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

query I rowsort
SELECT DISTINCT + col0 + 10 FROM tab2 AS cor0
----
17
88
89

query I rowsort
SELECT ALL + col2 + + 46 * + col1 + col0 FROM tab0 AS cor0
----
4013
4357
4498

query I rowsort
SELECT - - col2 + + 58 FROM tab2 AS cor0
----
84
85
96

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

skipif mysql # not compatible
query I rowsort label-1202
SELECT ALL - col2 * col0 + + col0 / + col2 AS col0 FROM tab0 cor0
----
-7297
-792
0

query I rowsort
SELECT ALL + + col1 * 23 FROM tab1 AS cor0
----
230
299
598

onlyif mysql # use DIV operator for integer division
query I rowsort label-1204
SELECT + col1 DIV ( ( col0 ) * - 20 ) - 80 FROM tab1 AS cor0
----
-80
-80
-80

skipif mysql # not compatible
query I rowsort label-1204
SELECT + col1 / ( ( col0 ) * - 20 ) - 80 FROM tab1 AS cor0
----
-80
-80
-80

query I rowsort
SELECT DISTINCT + + col2 * ( + col2 ) + + col2 FROM tab2 AS cor0
----
1482
702
756

query I rowsort
SELECT - ( 25 ) FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 2e7a33467ee3a4d9570560d60302b35a

onlyif mysql # use DIV operator for integer division
query I rowsort label-1207
SELECT ALL col2 DIV - 11 AS col0 FROM tab1 AS cor0
----
-4
-5
-8

skipif mysql # not compatible
query I rowsort label-1207
SELECT ALL col2 / - 11 AS col0 FROM tab1 AS cor0
----
-4
-5
-8

query I rowsort
SELECT ALL + tab0.col2 + ( 91 ) * + cor0.col0 * 51 - - tab0.col0 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to ee89eae2bc56a39a83bb4e4047065e0a

onlyif mysql # use DIV operator for integer division
query I rowsort label-1209
SELECT + tab0.col0 * - col2 + col1 DIV - tab0.col2 FROM tab0
----
-132
-7299
-794

skipif mysql # not compatible
query I rowsort label-1209
SELECT + tab0.col0 * - col2 + col1 / - tab0.col2 FROM tab0
----
-132
-7299
-794

query I rowsort
SELECT DISTINCT - tab2.col1 + col1 FROM tab2 WHERE NOT NULL NOT BETWEEN NULL AND NULL
----

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

query I rowsort
SELECT - col1 * - col2 * col1 + - tab1.col1 FROM tab1
----
16211
36478
5690

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

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

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

query I rowsort
SELECT DISTINCT - - 69 * cor0.col1 + + cor0.col0 AS col1 FROM tab2 cor0
----
1252
2146
4149

query I rowsort
SELECT DISTINCT col1 * - tab0.col0 + - tab0.col1 * - col1 AS col0 FROM tab0
----
182
5332
6014

query I rowsort
SELECT - col0 + col0 * col0 AS col2 FROM tab1 cor0
----
4032
6
6320

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

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

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

skipif mysql # not compatible
query I rowsort label-1220
SELECT - - col2 * + CAST ( 82 * - col0 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-13284
-299136
-629760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col1 ) * ( + tab2.col1 ) + - tab2.col2 * col0 col1 FROM tab2
----
-2713
1453
772

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

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

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

query I rowsort
SELECT ALL - col2 + ( 55 ) * + col1 FROM tab0
----
4697
4923
5334

query I rowsort
SELECT col0 * - 68 * + ( cor0.col0 ) FROM tab1 AS cor0
----
-278528
-435200
-612

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

query I rowsort
SELECT DISTINCT + - col1 * ( cor0.col1 ) * - col1 FROM tab2 cor0
----
205379
29791
4913

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1229
SELECT ALL + col0 + CAST( cor0.col0 AS SIGNED ) FROM tab2 AS cor0
----
14
156
158

skipif mysql # not compatible
query I rowsort label-1229
SELECT ALL + col0 + CAST ( cor0.col0 AS INTEGER ) FROM tab2 AS cor0
----
14
156
158

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

query I rowsort
SELECT DISTINCT - col0 + + col2 * - col0 * col1 AS col0 FROM tab0 AS cor0
----
-3430
-664207
-68136

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 1 + - col1 col1 FROM tab1
----
-11
-14
-27

query I rowsort
SELECT DISTINCT - ( - 2 ) FROM tab1, tab0 AS cor0 CROSS JOIN tab0
----
2

query I rowsort
SELECT DISTINCT ( + col0 ) * col2 * col0 + col1 AS col0 FROM tab1 AS cor0
----
233482
512
614413

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( - 18 AS REAL ) + - col1 AS col2 FROM tab0 AS cor0
----
-104
-109
-115

query I rowsort
SELECT ALL 48 + + 91 FROM tab2 AS cor0
----
139
139
139

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

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

query I rowsort
SELECT DISTINCT + 66 + + 52 AS col1 FROM tab2 AS cor0
----
118

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

query I rowsort
SELECT ALL + cor0.col0 * col0 + + col2 + + col2 FROM tab2 cor0
----
103
6136
6317

query I rowsort
SELECT + 38 + - cor0.col1 AS col2 FROM tab0 AS cor0
----
-48
-53
-59

query I rowsort
SELECT ALL - 38 AS col1 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to e8c064543bf0f2e57329db1bb0a411e3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 + - col1 * col1 + + col2 col0 FROM tab1 AS cor0
----
-619
21
7

query I rowsort
SELECT ALL - 84 * col1 + + col0 * + 43 AS col2 FROM tab2 cor0
----
-1602
-2303
1969

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

query I rowsort
SELECT col2 * col2 * + tab2.col2 FROM tab2
----
17576
19683
54872

query I rowsort
SELECT 12 + col0 * col0 FROM tab0 AS cor0
----
1237
588
7933

query I rowsort
SELECT cor0.col2 * + col2 * col1 + cor0.col2 * col0 + col0 FROM tab0 AS cor0
----
167
619271
94470

query I rowsort
SELECT ALL 86 * col0 AS col0 FROM tab1 AS cor0
----
258
5504
6880

query I rowsort
SELECT - + 98 * 89 + col1 + col0 FROM tab1 AS cor0
----
-8629
-8648
-8693

query I rowsort
SELECT + + 82 * + col2 - col2 FROM tab2 AS cor0
----
2106
2187
3078

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1254
SELECT DISTINCT - CAST( 6 AS SIGNED ) DIV - col2 + col0 AS col0 FROM tab0
----
24
41
89

skipif mysql # not compatible
query I rowsort label-1254
SELECT DISTINCT - CAST ( 6 AS INTEGER ) / - col2 + col0 AS col0 FROM tab0
----
24
41
89

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

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

query I rowsort
SELECT ALL + 76 * 0 AS col1 FROM tab1
----
0
0
0

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

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

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

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

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

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

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

query I rowsort
SELECT 76 * + col0 AS col1 FROM tab2 AS cor0
----
532
5928
6004

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * 14 col0 FROM tab0 cor0
----
-1204
-1274
-1358

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

query I rowsort
SELECT - - 76 + + col2 FROM tab0 AS cor0
----
109
158
77

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

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

query I rowsort
SELECT DISTINCT + 29 + + col1 FROM tab0 AS cor0
----
115
120
126

onlyif mysql # use DIV operator for integer division
query I rowsort label-1269
SELECT ALL + ( + col1 ) DIV + tab0.col1 - col0 * + col0 * - col0 FROM tab0
----
13825
42876
704970

skipif mysql # not compatible
query I rowsort label-1269
SELECT ALL + ( + col1 ) / + tab0.col1 - col0 * + col0 * - col0 FROM tab0
----
13825
42876
704970

query I rowsort
SELECT col0 + - 2 AS col2 FROM tab0
----
22
33
87

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1272
SELECT + cor0.col1 + + col1 DIV cor0.col0 FROM tab0 AS cor0
----
89
92
99

skipif mysql # not compatible
query I rowsort label-1272
SELECT + cor0.col1 + + col1 / cor0.col0 FROM tab0 AS cor0
----
89
92
99

query I rowsort
SELECT DISTINCT + ( col1 + 45 ) FROM tab0
----
131
136
142

query I rowsort
SELECT DISTINCT col1 * + col1 * ( tab0.col1 ) AS col1 FROM tab0
----
636056
753571
912673

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

skipif mysql # not compatible
query I rowsort label-1275
SELECT DISTINCT tab1.col1 / col2 AS col2 FROM tab1
----
0

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

query I rowsort
SELECT + cor0.col2 * + 36 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to bda7d419049fa2a603aa5be7870e857e

query I rowsort
SELECT + tab1.col1 * - cor0.col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to cdbf9954e453a1941c206f2475a42809

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

query I rowsort
SELECT DISTINCT + col2 * 9 AS col0 FROM tab1
----
486
513
864

onlyif mysql # use DIV operator for integer division
query I rowsort label-1281
SELECT + col1 * cor0.col1 DIV + col0 col1 FROM tab0 AS cor0
----
268
308
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1281
SELECT + col1 * cor0.col1 / + col0 col1 FROM tab0 AS cor0
----
268
308
93

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

query I rowsort
SELECT - tab1.col0 - - ( + 69 + col2 ) * + tab1.col2 FROM tab1
----
15760
6639
7118

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

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

query I rowsort
SELECT ALL + 97 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to c73fa6978df8525c99d6bc792bb27123

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

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

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

query I rowsort
SELECT - - 47 * col1 FROM tab0 AS cor0
----
4042
4277
4559

onlyif mysql # use DIV operator for integer division
query I rowsort label-1290
SELECT ALL - + col1 * col1 + - col0 DIV - ( + col0 ) AS col1 FROM tab1 AS cor0
----
-168
-675
-99

skipif mysql # not compatible
query I rowsort label-1290
SELECT ALL - + col1 * col1 + - col0 / - ( + col0 ) AS col1 FROM tab1 AS cor0
----
-168
-675
-99

query I rowsort
SELECT ALL col2 * cor0.col1 + - col2 * 66 AS col0 FROM tab2 AS cor0
----
-182
-1862
-945

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

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

query I rowsort
SELECT ALL 70 * - 57 AS col1 FROM tab1 AS cor0
----
-3990
-3990
-3990

query I rowsort
SELECT DISTINCT cor0.col2 + 88 * cor0.col0 + col2 * + col2 AS col1 FROM tab1 AS cor0
----
16352
3234
8938

query I rowsort
SELECT ( + 86 ) + col1 * - col0 FROM tab2 AS cor0
----
-1257
-131
-4516

query I rowsort
SELECT ALL ( col2 ) + col2 * cor0.col1 * + cor0.col2 FROM tab1 AS cor0
----
119904
32547
75870

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1299
SELECT ALL + cor0.col0 + 25 DIV col0 + - col1 FROM tab2 AS cor0
----
-21
19
62

skipif mysql # not compatible
query I rowsort label-1299
SELECT ALL + cor0.col0 + 25 / col0 + - col1 FROM tab2 AS cor0
----
-21
19
62

query I rowsort
SELECT - + col0 * 65 FROM tab1 AS cor0
----
-195
-4160
-5200

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

query I rowsort
SELECT 18 AS col0 FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to b95bafa733666df39c5d3f94760d010f

query I rowsort
SELECT DISTINCT + 54 + + 28 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 cor1
----
82

query I rowsort
SELECT - 1 + col0 AS col2 FROM tab0 AS cor0
----
23
34
88

query I rowsort
SELECT - - col0 * - cor0.col0 - + 24 AS col2 FROM tab2 AS cor0
----
-6108
-6265
-73

query I rowsort
SELECT ALL - col0 + + cor0.col0 * 4 AS col0 FROM tab1 AS cor0
----
192
240
9

query I rowsort
SELECT DISTINCT + - cor0.col0 * + col0 + col0 AS col2 FROM tab1 AS cor0
----
-4032
-6
-6320

query I rowsort
SELECT - 45 * + col1 + cor0.col1 AS col2 FROM tab0 AS cor0
----
-3784
-4004
-4268

query I rowsort
SELECT ALL - 23 * + col0 FROM tab0 cor0
----
-2047
-552
-805

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

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

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

query I rowsort
SELECT - col1 + 97 AS col0 FROM tab0 AS cor0
----
0
11
6

query I rowsort
SELECT ALL + cor0.col1 + 23 FROM tab1 AS cor0
----
33
36
49

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

query I rowsort
SELECT ALL col1 * ( 49 ) - col2 AS col2 FROM tab0 AS cor0
----
4181
4377
4752

query I rowsort
SELECT ALL cor0.col1 * 23 FROM tab1, tab1 AS cor0
----
9 values hashing to 8c46ef9a46905a7cf8f63ea206c7693b

query I rowsort
SELECT - + 15 + 96 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 7a8ea30c6803aeddc5fca5b5821d8267

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

query I rowsort
SELECT - + col0 * - col0 + ( col0 ) * + cor0.col1 + ( col0 ) AS col1 FROM tab2 AS cor0
----
10764
273
7663

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

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

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

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

query I rowsort
SELECT ALL col1 + col1 + + col0 AS col2 FROM tab2
----
113
196
69

query I rowsort
SELECT 46 + ( + col2 ) * - col0 FROM tab0
----
-7252
-746
11

query I rowsort
SELECT ALL + 54 + tab0.col0 * tab0.col0 + - col2 AS col2 FROM tab0
----
1278
597
7893

query I rowsort
SELECT ALL - + cor0.col2 * 94 FROM tab0, tab0 AS cor0, tab1, tab0 AS cor1
----
81 values hashing to 561fb4070de098b509a6883ceb9df1c3

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

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

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

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

query I rowsort
SELECT + 62 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

query I rowsort
SELECT DISTINCT - tab1.col2 + - col2 * + 19 FROM tab1
----
-1080
-1140
-1920

query I rowsort
SELECT cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to c4e6b1f1d28e731664a15a6f7cda4da9

onlyif mysql # use DIV operator for integer division
query I rowsort label-1333
SELECT DISTINCT col1 DIV ( col0 ) + col1 FROM tab1 AS cor0
----
10
13
34

skipif mysql # not compatible
query I rowsort label-1333
SELECT DISTINCT col1 / ( col0 ) + col1 FROM tab1 AS cor0
----
10
13
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-1334
SELECT + + col0 + + col2 DIV + col1 FROM tab1 cor0
----
5
69
87

skipif mysql # not compatible
query I rowsort label-1334
SELECT + + col0 + + col2 / + col1 FROM tab1 cor0
----
5
69
87

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1337
SELECT + col2 DIV + col1 + + col0 * col0 * cor0.col2 col1 FROM tab2 AS cor0
----
1323
158184
237160

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1337
SELECT + col2 / + col1 + + col0 * col0 * cor0.col2 col1 FROM tab2 AS cor0
----
1323
158184
237160

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + 36 + cor0.col0 + + ( + col2 ) col0 FROM tab1 AS cor0
----
-2183
-2704
-51

onlyif mysql # use DIV operator for integer division
query I rowsort label-1339
SELECT ALL + ( 94 ) * col1 DIV col0 FROM tab2 AS cor0
----
20
416
71

skipif mysql # not compatible
query I rowsort label-1339
SELECT ALL + ( 94 ) * col1 / col0 FROM tab2 AS cor0
----
20
416
71

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

query I rowsort
SELECT col1 + 11 FROM tab2 AS cor0
----
28
42
70

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

query I rowsort
SELECT - 94 * 84 + cor0.col1 + col2 FROM tab1 AS cor0
----
-7787
-7816
-7829

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1344
SELECT CAST( 8 * col1 AS SIGNED ) AS col1 FROM tab0
----
688
728
776

skipif mysql # not compatible
query I rowsort label-1344
SELECT CAST ( 8 * col1 AS INTEGER ) AS col1 FROM tab0
----
688
728
776

query I rowsort
SELECT DISTINCT - ( - col2 ) + - col1 * 39 AS col1 FROM tab0 AS cor0
----
-3321
-3467
-3782

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

skipif mysql # not compatible
query I rowsort label-1346
SELECT - + ( + col2 ) / - col0 - + ( - col2 ) AS col0 FROM tab1 AS cor0
----
57
72
97

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

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

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

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

query I rowsort
SELECT + 2 + col0 FROM tab2 cor0
----
80
81
9

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

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

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

query I rowsort
SELECT - 23 + + cor0.col0 * + ( - col1 * + col0 ) AS col0 FROM tab1 AS cor0
----
-257
-40983
-83223

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + - 97 * col0 col2 FROM tab1 AS cor0
----
-317
-6218
-7773

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1357
SELECT col2 + - CAST ( NULL AS INTEGER ) * + cor0.col0 col1 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 * 8 AS col1 FROM tab1 AS cor0
----
-432
-456
-768

onlyif mysql # use DIV operator for integer division
query I rowsort label-1359
SELECT + col1 + + col2 - col1 * + col2 DIV - col2 AS col2 FROM tab0 AS cor0
----
195
205
264

skipif mysql # not compatible
query I rowsort label-1359
SELECT + col1 + + col2 - col1 * + col2 / - col2 AS col2 FROM tab0 AS cor0
----
195
205
264

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

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

query I rowsort
SELECT col2 * 88 AS col1 FROM tab0 AS cor0
----
2904
7216
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-1362
SELECT DISTINCT col1 + CAST( - col0 AS SIGNED ) DIV + col1 AS col2 FROM tab2
----
13
31
58

skipif mysql # not compatible
query I rowsort label-1362
SELECT DISTINCT col1 + CAST ( - col0 AS INTEGER ) / + col1 AS col2 FROM tab2
----
13
31
58

query I rowsort
SELECT ALL - + ( tab1.col1 ) FROM tab1, tab0, tab0 AS cor0, tab2
----
81 values hashing to 96e9ef2950805bca93a295eeea43ef5b

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

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

query I rowsort
SELECT ALL col0 + col1 + ( - col2 ) * - col0 AS col0 FROM tab1 AS cor0
----
191
3722
7773

query I rowsort
SELECT DISTINCT 39 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
39

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

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

query I rowsort
SELECT DISTINCT - col0 * - 8 FROM tab1 AS cor0
----
24
512
640

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

query I rowsort
SELECT ALL - col0 + + 8 * col2 FROM tab0 AS cor0
----
-27
240
567

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + - col0 col1 FROM tab2 AS cor0
----
-14
-156
-158

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

skipif mysql # not compatible
query I rowsort label-1375
SELECT ALL CAST ( NULL AS INTEGER ) * 73 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 78 + - col0 col1 FROM tab0
----
-11
43
54

query I rowsort
SELECT - ( - cor0.col1 ) + - col2 + + col1 AS col0 FROM tab2 AS cor0
----
-4
35
92

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

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

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

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

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

query I rowsort
SELECT DISTINCT + - col0 * - cor0.col1 + + col1 * col1 FROM tab1 AS cor0
----
1209
740
754

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

query I rowsort
SELECT DISTINCT + col0 * cor0.col0 + - col2 + cor0.col0 AS col2 FROM tab1 AS cor0
----
-42
4103
6384

query I rowsort
SELECT DISTINCT 38 * 16 AS col2 FROM tab1, tab2, tab1 cor0
----
608

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col1 + col0 col1 FROM tab1
----
164
249
679

query I rowsort
SELECT DISTINCT - 74 * - 97 FROM tab0
----
7178

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

query I rowsort
SELECT + col1 + + col0 + - col0 * + col0 FROM tab1 AS cor0
----
-4022
-6307
20

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

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

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

query I rowsort
SELECT ALL - col1 * + col1 + col1 * 76 AS col2 FROM tab1 AS cor0
----
1300
660
819

onlyif mysql # use DIV operator for integer division
query I rowsort label-1394
SELECT + ( col2 ) DIV + tab1.col1 + col1 + tab1.col2 AS col2 FROM tab1
----
116
72
82

skipif mysql # not compatible
query I rowsort label-1394
SELECT + ( col2 ) / + tab1.col1 + col1 + tab1.col2 AS col2 FROM tab1
----
116
72
82

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( cor0.col0 ) col0 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT ALL 47 AS col1 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 3f991632e9c7c5142e1d80857cd10a2d

query I rowsort
SELECT DISTINCT col0 * + col0 + ( + col1 * col1 ) + - 42 FROM tab2
----
6488
9523
968

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 * + col2 col1 FROM tab2 AS cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - col1 ) + col0 col2 FROM tab1 AS cor0
----
-23
54
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-1401
SELECT col2 + tab0.col0 DIV + 75 col2 FROM tab0
----
1
33
83

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

query I rowsort
SELECT ALL col0 * 23 - + 33 * + col1 FROM tab1
----
-789
1142
1411

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

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

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

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

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

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

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

query I rowsort
SELECT - 89 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 924a74d31360fa4301c953b423a4710e

query I rowsort
SELECT col2 * - col0 + + col2 * col1 * - col1 AS col0 FROM tab2
----
-13984
-26136
-92534

query I rowsort
SELECT DISTINCT + col2 * + 94 FROM tab1
----
5076
5358
9024

query I rowsort
SELECT col1 * 65 + 28 FROM tab2
----
1133
2043
3863

query I rowsort
SELECT DISTINCT tab1.col2 * 34 - tab1.col1 AS col2 FROM tab1, tab0 AS cor0
----
1810
1928
3251

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

query I rowsort
SELECT col0 * - 27 * - col2 + col1 * - col0 FROM tab0
----
-2450
188947
19320

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + ( + col1 ) * + col1 + + 1 col0 FROM tab2 AS cor0
----
3560
369
969

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

query I rowsort
SELECT ALL - 44 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 07457d9e571e036a9a3a0f5a5a2e1ef2

query I rowsort
SELECT ALL + ( - col0 ) + + col2 * col0 AS col2 FROM tab1
----
159
3584
7600

query I rowsort
SELECT col0 + - 44 + col0 FROM tab0 AS cor0
----
134
26
4

query I rowsort
SELECT DISTINCT - + 32 + col0 * col2 AS col2 FROM tab2 AS cor0
----
157
1996
2970

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

query I rowsort
SELECT - 68 * col2 FROM tab1 AS cor0
----
-3672
-3876
-6528

query I rowsort
SELECT DISTINCT 13 + col2 * - col2 FROM tab2 AS cor0
----
-1431
-663
-716

query I rowsort
SELECT ALL + - 21 + - col1 AS col1 FROM tab2 cor0
----
-38
-52
-80

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1429
SELECT ALL + 98 DIV cor0.col0 FROM tab1 AS cor0
----
1
1
32

skipif mysql # not compatible
query I rowsort label-1429
SELECT ALL + 98 / cor0.col0 FROM tab1 AS cor0
----
1
1
32

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

query I rowsort
SELECT ALL + col1 + + 68 * col1 AS col1 FROM tab2 AS cor0
----
1173
2139
4071

query I rowsort
SELECT ALL col1 * + 34 + col0 AS col2 FROM tab1 cor0
----
404
522
887

query I rowsort
SELECT + 55 FROM tab1, tab1 AS cor0
----
9 values hashing to 1626bd3008abd9f18cc88cdecf7b64d0

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

query I rowsort
SELECT ALL + 16 * cor0.col1 FROM tab2, tab2 cor0
----
9 values hashing to 50352bca2aa89ce0beaab9448c8136c2

query I rowsort
SELECT + col0 + ( col1 + col2 ) FROM tab1 AS cor0
----
131
189
83

query I rowsort
SELECT - + cor0.col1 + 64 FROM tab2 AS cor0
----
33
47
5

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

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

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

query I rowsort
SELECT col2 * col1 + col0 * - ( 47 ) FROM tab2 AS cor0
----
-2132
-3067
508

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 28 * + col2 + col1 col0 FROM tab1 AS cor0
----
-1486
-1586
-2675

query I rowsort
SELECT - - col1 + cor0.col0 * 82 FROM tab2 AS cor0
----
605
6455
6495

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

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

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

query I rowsort
SELECT DISTINCT + cor1.col1 AS col0 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
10
13
26

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

query I rowsort
SELECT + 27 * + cor0.col2 * col1 AS col1 FROM tab2 AS cor0
----
17442
22599
41418

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

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

query I rowsort
SELECT DISTINCT - + 82 * + col0 + + col1 AS col1 FROM tab2 AS cor0
----
-543
-6337
-6461

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1453
SELECT - col0 * ( + col0 ) DIV col1 AS col0 FROM tab0 AS cor0
----
-12
-6
-87

skipif mysql # not compatible
query I rowsort label-1453
SELECT - col0 * ( + col0 ) / col1 AS col0 FROM tab0 AS cor0
----
-12
-6
-87

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

query I rowsort
SELECT DISTINCT - + col1 * - col0 + - 61 FROM tab0 AS cor0
----
2003
3334
8038

query I rowsort
SELECT - + col2 * ( + 59 * col2 ) + ( 42 ) FROM tab1 AS cor0
----
-172002
-191649
-543702

query I rowsort
SELECT col0 - - 73 FROM tab1 AS cor0
----
137
153
76

query I rowsort
SELECT + col0 + - 53 AS col0 FROM tab0 AS cor0
----
-18
-29
36

query I rowsort
SELECT ALL 90 * col0 FROM tab2
----
630
7020
7110

onlyif mysql # use DIV operator for integer division
query I rowsort label-1460
SELECT col0 DIV 28 FROM tab2
----
0
2
2

skipif mysql # not compatible
query I rowsort label-1460
SELECT col0 / 28 FROM tab2
----
0
2
2

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

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

query I rowsort
SELECT ALL - col2 * ( col0 ) - col0 * + col2 AS col1 FROM tab1
----
-15360
-324
-7296

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

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

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1467
SELECT cor0.col0 * - CAST( NULL AS DECIMAL ) AS col1 FROM tab1, tab0, tab1 AS cor0, tab2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-1467
SELECT cor0.col0 * - CAST ( NULL AS REAL ) AS col1 FROM tab1, tab0, tab1 AS cor0, tab2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT ALL + ( tab2.col2 ) AS col1 FROM tab2, tab0, tab2 cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT + 76 + - col1 * + col2 AS col0 FROM tab0 cor0
----
-21
-2762
-7386

onlyif mysql # use DIV operator for integer division
query I rowsort label-1470
SELECT + col1 + 28 DIV + cor0.col1 FROM tab2 AS cor0
----
18
31
59

skipif mysql # not compatible
query I rowsort label-1470
SELECT + col1 + 28 / + cor0.col1 FROM tab2 AS cor0
----
18
31
59

query I rowsort
SELECT - + col2 * ( + 37 ) + + col1 AS col1 FROM tab1 cor0
----
-1972
-2099
-3539

onlyif mysql # use DIV operator for integer division
query I rowsort label-1472
SELECT DISTINCT - tab1.col2 DIV - col2 + tab1.col0 * - tab1.col2 AS col1 FROM tab1
----
-161
-3647
-7679

skipif mysql # not compatible
query I rowsort label-1472
SELECT DISTINCT - tab1.col2 / - col2 + tab1.col0 * - tab1.col2 AS col1 FROM tab1
----
-161
-3647
-7679

query I rowsort
SELECT ALL + col1 + + 60 FROM tab2
----
119
77
91

query I rowsort
SELECT + 1 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT + 4 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

query I rowsort
SELECT + 90 + - 7 AS col2 FROM tab2 AS cor0
----
83
83
83

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

skipif mysql # not compatible
query I rowsort label-1477
SELECT + CAST ( - col0 AS INTEGER ) + - col1 * ( + col1 ) AS col0 FROM tab0 AS cor0
----
-7420
-8370
-9444

query I rowsort
SELECT DISTINCT - - col1 + - ( col1 * 25 ) FROM tab1 AS cor0
----
-240
-312
-624

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

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

query I rowsort
SELECT + - 57 + col1 FROM tab2 AS cor0
----
-26
-40
2

query I rowsort
SELECT + 26 + - cor0.col2 AS col0 FROM tab1 AS cor0
----
-28
-31
-70

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1487
SELECT DISTINCT + cor0.col2 * 57 - - 84 DIV col0 col2 FROM tab2 cor0
----
1483
1551
2167

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1487
SELECT DISTINCT + cor0.col2 * 57 - - 84 / col0 col2 FROM tab2 cor0
----
1483
1551
2167

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1489
SELECT ALL + col2 DIV + ( + 81 ) + - col0 AS col1 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-1489
SELECT ALL + col2 / + ( + 81 ) + - col0 AS col1 FROM tab2 AS cor0
----
-7
-78
-79

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

query I rowsort
SELECT + col2 * 12 + col0 * - col1 FROM tab2 AS cor0
----
-4290
-887
107

query I rowsort
SELECT + col1 * + ( + 74 ) FROM tab1 cor0
----
1924
740
962

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

query I rowsort
SELECT DISTINCT col2 * 37 + col2 FROM tab1 AS cor0
----
2052
2166
3648

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1495
SELECT - col1 + + CAST ( NULL AS INTEGER ) col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + col2 * + col2 + col2 - col0 FROM tab2 AS cor0
----
1403
624
749

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

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

query I rowsort
SELECT ALL - col2 * + 49 + - ( col1 ) AS col1 FROM tab0
----
-146
-1703
-4109

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

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

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

query I rowsort
SELECT + col2 - 2 FROM tab1 AS cor0
----
52
55
94

query I rowsort
SELECT ALL - col2 * col2 + + 30 FROM tab0 cor0
----
-1059
-6694
29

query I rowsort
SELECT - col1 * + ( - ( col1 ) ) - 44 AS col0 FROM tab0 AS cor0
----
7352
8237
9365

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col1 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
86
91
97

query I rowsort
SELECT + col0 * cor0.col2 * - col0 + + col0 * col0 AS col2 FROM tab0 AS cor0
----
-18432
-641601
0

query I rowsort
SELECT col1 * ( - col1 ) + - col2 AS col1 FROM tab0 AS cor0
----
-7429
-8363
-9410

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

query I rowsort
SELECT + cor0.col1 * 22 FROM tab2 AS cor0
----
1298
374
682

query I rowsort
SELECT ALL tab2.col0 * + 92 * col0 + + col0 + 57 AS col2 FROM tab2
----
4572
559863
574308

query I rowsort
SELECT - col0 * col0 + col1 * 63 FROM tab1 cor0
----
-3466
-5581
1629

query I rowsort
SELECT ALL + 35 - + col2 AS col0 FROM tab1 AS cor0
----
-19
-22
-61

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

query I rowsort
SELECT DISTINCT - col0 * 94 * col0 AS col1 FROM tab1 AS cor0
----
-385024
-601600
-846

query I rowsort
SELECT DISTINCT + ( 11 ) + col0 * + 97 * + col1 FROM tab1 AS cor0
----
100891
62091
7577

query I rowsort
SELECT ALL - 32 * - col1 + col2 AS col1 FROM tab2 cor0
----
1019
1914
582

query I rowsort
SELECT col1 * + 79 FROM tab1
----
1027
2054
790

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1519
SELECT tab1.col0 + CAST( + 23 AS SIGNED ) DIV col0 + - col2 AS col0 FROM tab1
----
-16
-44
7

skipif mysql # not compatible
query I rowsort label-1519
SELECT tab1.col0 + CAST ( + 23 AS INTEGER ) / col0 + - col2 AS col0 FROM tab1
----
-16
-44
7

query I rowsort
SELECT - tab2.col0 + ( + col2 ) AS col1 FROM tab2
----
-41
-52
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-1521
SELECT DISTINCT col2 DIV + col1 + - col1 * col1 FROM tab0
----
-7396
-8281
-9409

skipif mysql # not compatible
query I rowsort label-1521
SELECT DISTINCT col2 / + col1 + - col1 * col1 FROM tab0
----
-7396
-8281
-9409

query I rowsort
SELECT + col1 * - col1 * + col0 + col0 * + 71 FROM tab1
----
-1815
-1856
-7840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1523
SELECT tab2.col0 + + CAST( 3 AS SIGNED ) AS col2 FROM tab2, tab1, tab1 cor0
----
27 values hashing to bcdf3395dd300a3630976efe01f30b24

skipif mysql # not compatible
query I rowsort label-1523
SELECT tab2.col0 + + CAST ( 3 AS INTEGER ) AS col2 FROM tab2, tab1, tab1 cor0
----
27 values hashing to bcdf3395dd300a3630976efe01f30b24

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

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

query I rowsort
SELECT - col1 - ( 36 ) FROM tab1
----
-46
-49
-62

query I rowsort
SELECT DISTINCT - col2 * col2 + col1 * col2 FROM tab2
----
-798
108
858

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

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

query I rowsort
SELECT ALL col0 * - col2 * 56 FROM tab2 cor0
----
-10584
-113568
-168112

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

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

query I rowsort
SELECT 61 * col0 AS col0 FROM tab0 AS cor0
----
1464
2135
5429

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

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

query I rowsort
SELECT - cor0.col1 + - col1 * - 92 FROM tab0 AS cor0
----
7826
8281
8827

query I rowsort
SELECT DISTINCT tab1.col0 * + 18 AS col0 FROM tab1
----
1152
1440
54

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

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

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

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

query I rowsort
SELECT DISTINCT 39 + + col0 AS col2 FROM tab1
----
103
119
42

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

query I rowsort
SELECT ALL + 67 + - 11 AS col2 FROM tab1
----
56
56
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-1541
SELECT col1 * col2 DIV col1 AS col2 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-1541
SELECT col1 * col2 / col1 AS col2 FROM tab2
----
26
27
38

query I rowsort
SELECT DISTINCT + - 72 + col0 * col0 FROM tab2 AS cor0
----
-23
6012
6169

onlyif mysql # use DIV operator for integer division
query I rowsort label-1543
SELECT 7 DIV col0 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1543
SELECT 7 / col0 AS col2 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1544
SELECT DISTINCT - 69 + + col0 DIV + cor0.col0 FROM tab1 cor0
----
-68

skipif mysql # not compatible
query I rowsort label-1544
SELECT DISTINCT - 69 + + col0 / + cor0.col0 FROM tab1 cor0
----
-68

query I rowsort
SELECT ALL - 64 * col2 AS col2 FROM tab2 AS cor0
----
-1664
-1728
-2432

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

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

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

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

query I rowsort
SELECT - - cor0.col2 * + col0 * col2 + + cor0.col0 + + col2 AS col0 FROM tab0 AS cor0
----
26193
598607
71

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

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

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - + col1 - CAST ( - col1 * col2 + + CAST ( + ( col1 ) AS INTEGER ) AS REAL ) AS col2 FROM tab1 AS cor0
----
1222
1352
550

skipif mysql # not compatible
query I rowsort
SELECT ALL col0 * + CAST ( + col0 AS REAL ) * + col0 FROM tab1 AS cor0
----
262144
27
512000

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

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

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

query I rowsort
SELECT + cor0.col2 * + cor0.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 50c4b0a13fc95d13442dcf4b04857ce8

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

query I rowsort
SELECT ALL - col1 * col0 - 77 * col0 AS col0 FROM tab2 AS cor0
----
-10608
-7426
-756

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

query I rowsort
SELECT DISTINCT - col2 * col2 * 54 AS col2 FROM tab2 AS cor0
----
-36504
-39366
-77976

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

query I rowsort
SELECT ALL col2 * + 59 AS col1 FROM tab1 cor0
----
3186
3363
5664

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

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

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

query I rowsort
SELECT DISTINCT 98 FROM tab2, tab2 cor0, tab1 AS cor1, tab1 AS cor2
----
98

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1566
SELECT + 23 + col1 DIV + cor0.col1 FROM tab0 cor0
----
24
24
24

skipif mysql # not compatible
query I rowsort label-1566
SELECT + 23 + col1 / + cor0.col1 FROM tab0 cor0
----
24
24
24

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

query I rowsort
SELECT ALL col2 * 54 AS col0 FROM tab1
----
2916
3078
5184

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col2 + - 78 col2 FROM tab0
----
-111
-160
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-1570
SELECT - cor0.col2 DIV - 48 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-1570
SELECT - cor0.col2 / - 48 FROM tab0 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * 88 col1 FROM tab1 AS cor0
----
4752
5016
8448

query I rowsort
SELECT - - 80 * col0 + - 1 AS col1 FROM tab1 AS cor0
----
239
5119
6399

query I rowsort
SELECT ALL - - col0 * col0 + ( col0 ) * col0 FROM tab1 AS cor0
----
12800
18
8192

query I rowsort
SELECT ALL col0 * - col2 + + ( + col1 + - col0 ) * - col0 FROM tab2 AS cor0
----
-357
-546
1896

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

query I rowsort
SELECT - col1 * - col2 + col2 + col0 * - 42 FROM tab2 AS cor0
----
-1716
-2634
570

query I rowsort
SELECT - + 79 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 1b7b0b34fe3431fb409719624d12791f

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

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

query I rowsort
SELECT DISTINCT col2 * - ( 47 ) AS col2 FROM tab1
----
-2538
-2679
-4512

query I rowsort
SELECT ALL - col2 + 19 FROM tab1 cor0
----
-35
-38
-77

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1583
SELECT ALL cor0.col0 * + cor0.col1 + col1 DIV col2 + + ( - 30 * + col1 ) FROM tab0 AS cor0
----
-514
5370
582

skipif mysql # not compatible
query I rowsort label-1583
SELECT ALL cor0.col0 * + cor0.col1 + col1 / col2 + + ( - 30 * + col1 ) FROM tab0 AS cor0
----
-514
5370
582

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

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

query I rowsort
SELECT + - col1 + - col0 + + ( col1 + cor0.col0 ) * + col1 FROM tab1 AS cor0
----
1116
666
725

query I rowsort
SELECT col1 * - 71 FROM tab2 cor0
----
-1207
-2201
-4189

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * ( + col1 ) col1 FROM tab2 AS cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + + 5 * + col2 col1 FROM tab1 AS cor0
----
244
275
467

query I rowsort
SELECT col0 * col1 - cor0.col1 * - col1 FROM tab0 AS cor0
----
12804
16380
9460

query I rowsort
SELECT col1 - col1 * 77 AS col1 FROM tab2 cor0
----
-1292
-2356
-4484

onlyif mysql # use DIV operator for integer division
query I rowsort label-1594
SELECT ALL - col2 DIV - 86 + col2 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-1594
SELECT ALL - col2 / - 86 + col2 FROM tab2
----
26
27
38

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

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

skipif mysql # not compatible
query I rowsort label-1596
SELECT ALL + col1 + col2 / col0 AS col0 FROM tab1
----
10
14
44

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

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

query I rowsort
SELECT - col2 * col2 * + cor0.col2 FROM tab1 AS cor0
----
-157464
-185193
-884736

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

query I rowsort
SELECT DISTINCT + 89 * col2 FROM tab2
----
2314
2403
3382

onlyif mysql # use DIV operator for integer division
query I rowsort label-1602
SELECT 29 DIV col1 FROM tab2 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-1602
SELECT 29 / col1 FROM tab2 AS cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-1603
SELECT 67 * col0 DIV + 92 AS col0 FROM tab1 AS cor0
----
2
46
58

skipif mysql # not compatible
query I rowsort label-1603
SELECT 67 * col0 / + 92 AS col0 FROM tab1 AS cor0
----
2
46
58

query I rowsort
SELECT DISTINCT 51 + col1 FROM tab0 AS cor0
----
137
142
148

query I rowsort
SELECT col1 + + 69 * cor0.col0 + - col1 * col1 FROM tab1 AS cor0
----
-443
4326
5364

onlyif mysql # use DIV operator for integer division
query I rowsort label-1606
SELECT + cor0.col0 + col0 DIV - ( - col0 ) FROM tab2 cor0
----
79
8
80

skipif mysql # not compatible
query I rowsort label-1606
SELECT + cor0.col0 + col0 / - ( - col0 ) FROM tab2 cor0
----
79
8
80

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

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

query I rowsort
SELECT - - col0 + col0 + - col1 AS col2 FROM tab2 AS cor0
----
-17
141
97

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1610
SELECT ALL + cor0.col1 DIV + 91 + cor0.col1 DIV col0 FROM tab0 cor0
----
2
3
3

skipif mysql # not compatible
query I rowsort label-1610
SELECT ALL + cor0.col1 / + 91 + cor0.col1 / col0 FROM tab0 cor0
----
2
3
3

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

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

query I rowsort
SELECT ALL + ( + ( + col0 ) ) * 99 + col1 * col1 AS col0 FROM tab0 AS cor0
----
12874
17092
9772

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( - col0 AS REAL ) * col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + col0 + col2 * + col2 AS col0 FROM tab0 cor0
----
1113
36
6813

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

skipif mysql # not compatible
query I rowsort label-1615
SELECT ALL cor0.col0 * col0 + col1 * + CAST ( col2 AS INTEGER ) - col2 AS col0 FROM tab2 AS cor0
----
6849
7592
859

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

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

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

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

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

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

query I rowsort
SELECT ALL - 14 * col1 + + col2 + 76 * + col0 AS col2 FROM tab2 AS cor0
----
125
5128
5804

query I rowsort
SELECT ALL + 23 * cor0.col1 AS col0 FROM tab0 AS cor0
----
1978
2093
2231

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

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

query I rowsort
SELECT 74 * - ( - col2 ) FROM tab0
----
2442
6068
74

query I rowsort
SELECT 87 * + col2 AS col1 FROM tab0 AS cor0
----
2871
7134
87

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

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

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

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

query I rowsort
SELECT ALL 45 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 60b9f935ee8e404d155a2f5e9515c050

onlyif mysql # use DIV operator for integer division
query I rowsort label-1630
SELECT DISTINCT tab0.col2 + col2 * col1 DIV - ( + col2 * col0 ) FROM tab0
----
-1
30
81

skipif mysql # not compatible
query I rowsort label-1630
SELECT DISTINCT tab0.col2 + col2 * col1 / - ( + col2 * col0 ) FROM tab0
----
-1
30
81

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

query I rowsort
SELECT DISTINCT + 68 AS col2 FROM tab0
----
68

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

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

query I rowsort
SELECT - - 48 AS col2 FROM tab2, tab0, tab2 cor0
----
27 values hashing to 0ef571a8722ab7270aa7272c1174b88e

query I rowsort
SELECT ALL + 78 * col0 AS col0 FROM tab0
----
1872
2730
6942

onlyif mysql # use DIV operator for integer division
query I rowsort label-1636
SELECT - - cor0.col2 + + ( - 82 ) DIV col1 FROM tab2 cor0
----
25
25
34

skipif mysql # not compatible
query I rowsort label-1636
SELECT - - cor0.col2 + + ( - 82 ) / col1 FROM tab2 cor0
----
25
25
34

query I rowsort
SELECT + 2 * col1 * + 53 AS col0 FROM tab0
----
10282
9116
9646

onlyif mysql # use DIV operator for integer division
query I rowsort label-1638
SELECT - + 8 * col0 + - 50 DIV col0 FROM tab1 AS cor0
----
-40
-512
-640

skipif mysql # not compatible
query I rowsort label-1638
SELECT - + 8 * col0 + - 50 / col0 FROM tab1 AS cor0
----
-40
-512
-640

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

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

query I rowsort
SELECT + 60 - 14 AS col1 FROM tab2, tab1 cor0
----
9 values hashing to 31818c9d4d325eb248735c97cb1dce39

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

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

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

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

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

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

query I rowsort
SELECT + tab1.col2 * + 80 FROM tab1
----
4320
4560
7680

query I rowsort
SELECT DISTINCT col2 + tab2.col0 * col0 FROM tab2
----
6110
6279
76

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1649
SELECT ALL + 76 DIV + 40 col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1649
SELECT ALL + 76 / + 40 col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

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

skipif mysql # not compatible
query I rowsort label-1650
SELECT - cor0.col2 * - CAST ( + col0 AS INTEGER ) + + col0 FROM tab2 cor0
----
196
2106
3081

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col2 + col1 col0 FROM tab1 AS cor0
----
-1235
-1378
-560

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

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

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

query I rowsort
SELECT + 19 * - ( - col0 ) AS col1 FROM tab1 AS cor0
----
1216
1520
57

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col2 AS REAL ) * - col2 * 96 AS col1 FROM tab1 AS cor0
----
-279936
-311904
-884736

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1656
SELECT - - CAST( - col0 AS SIGNED ) * col0 FROM tab0 AS cor0
----
-1225
-576
-7921

skipif mysql # not compatible
query I rowsort label-1656
SELECT - - CAST ( - col0 AS INTEGER ) * col0 FROM tab0 AS cor0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-1657
SELECT ALL - ( - 60 ) DIV - col1 + - cor0.col2 + 11 AS col0 FROM tab1 AS cor0
----
-45
-52
-89

skipif mysql # not compatible
query I rowsort label-1657
SELECT ALL - ( - 60 ) / - col1 + - cor0.col2 + 11 AS col0 FROM tab1 AS cor0
----
-45
-52
-89

query I rowsort
SELECT - + 5 + cor0.col2 FROM tab0 AS cor0
----
-4
28
77

query I rowsort
SELECT DISTINCT + ( + col0 ) * col1 + ( + 38 ) * col1 AS col0 FROM tab0 AS cor0
----
11557
5332
7081

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

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

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

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

query I rowsort
SELECT 81 * 85 AS col2 FROM tab2 AS cor0
----
6885
6885
6885

query I rowsort
SELECT + + 62 * - col1 FROM tab2 AS cor0
----
-1054
-1922
-3658

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

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

query I rowsort
SELECT col2 * ( + col2 + 95 ) FROM tab2 cor0
----
3146
3294
5054

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

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

query I rowsort
SELECT DISTINCT + + ( - 67 ) + col1 * col0 FROM tab2 cor0
----
1276
150
4535

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 * 95 * - col0 col0 FROM tab0 AS cor0
----
196080
322525
769405

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

query I rowsort
SELECT ALL + - ( 69 ) * + col2 * - col2 AS col2 FROM tab1 AS cor0
----
201204
224181
635904

query I rowsort
SELECT DISTINCT col1 * 20 AS col0 FROM tab0 AS cor0
----
1720
1820
1940

query I rowsort
SELECT DISTINCT - col0 + 82 FROM tab2 AS cor0
----
3
4
75

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

skipif mysql # not compatible
query I rowsort label-1676
SELECT + - col2 - + cor0.col0 * CAST ( + col2 AS INTEGER ) FROM tab1 AS cor0
----
-216
-3705
-7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-1677
SELECT - 12 * col1 DIV - col1 FROM tab0
----
12
12
12

skipif mysql # not compatible
query I rowsort label-1677
SELECT - 12 * col1 / - col1 FROM tab0
----
12
12
12

query I rowsort
SELECT ALL - + cor0.col0 * cor0.col2 + - ( col1 ) * col1 + cor0.col2 AS col0 FROM tab0 AS cor0
----
-15497
-8155
-9443

query I rowsort
SELECT 50 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 314aace40e704c20a6be06204a329f80

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1681
SELECT 97 DIV - tab2.col0 + col0 + col1 FROM tab2
----
136
25
95

skipif mysql # not compatible
query I rowsort label-1681
SELECT 97 / - tab2.col0 + col0 + col1 FROM tab2
----
136
25
95

query I rowsort
SELECT ALL + 39 * tab0.col2 * col2 AS col2 FROM tab0
----
262236
39
42471

onlyif mysql # use DIV operator for integer division
query I rowsort label-1683
SELECT tab2.col0 DIV + 23 FROM tab2
----
0
3
3

skipif mysql # not compatible
query I rowsort label-1683
SELECT tab2.col0 / + 23 FROM tab2
----
0
3
3

query I rowsort
SELECT col1 * - 46 FROM tab1 AS cor0
----
-1196
-460
-598

query I rowsort
SELECT - col0 * 1 AS col2 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT - col2 + 92 FROM tab0 cor0
----
10
59
91

query I rowsort
SELECT DISTINCT + - col2 + col2 * - 16 * - col2 AS col0 FROM tab2 AS cor0
----
10790
11637
23066

query I rowsort
SELECT - 83 AS col2 FROM tab2, tab1 AS cor0, tab2 AS cor1, tab1, tab0 AS cor2
----
243 values hashing to 433d28123431d1720c12bf25e8d6fe60

query I rowsort
SELECT ALL 80 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 878f012d707aab113cedaf56e6c52e94

query I rowsort
SELECT 80 + 15 AS col0 FROM tab0, tab0 cor0
----
9 values hashing to e57d8ed879dfd04d04aae87725c970d3

query I rowsort
SELECT DISTINCT ( 57 ) AS col2 FROM tab2 cor0
----
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - 98 ) * col2 col0 FROM tab1 AS cor0
----
-5292
-5586
-9408

query I rowsort
SELECT DISTINCT - - 18 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
18

query I rowsort
SELECT ALL - 64 * + 43 AS col1 FROM tab2
----
-2752
-2752
-2752

query I rowsort
SELECT ALL + 66 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 29794915b585eea848ad670075452c88

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

query I rowsort
SELECT ALL - col1 * + 99 + col2 FROM tab1 cor0
----
-1191
-2520
-933

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 16 * col1 col0 FROM tab1
----
160
208
416

query I rowsort
SELECT ALL + 60 + - col1 * col0 AS col1 FROM tab1
----
-18
-580
-980

query I rowsort
SELECT ALL tab2.col1 + - 15 * - 76 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to e1880298506aeefa49e78f4749e03aa6

query I rowsort
SELECT + - 62 + cor0.col1 FROM tab0 AS cor0
----
24
29
35

query I rowsort
SELECT 66 * col0 + + cor0.col2 * + col1 FROM tab2 AS cor0
----
1299
5860
6682

query I rowsort
SELECT ALL + 23 AS col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 546d49aa433406dd83ea19885588e658

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

skipif mysql # not compatible
query I rowsort label-1705
SELECT DISTINCT ( - col1 ) / - 27 + col1 AS col2 FROM tab1
----
10
13
26

query I rowsort
SELECT - col0 + 72 * ( - col0 ) FROM tab0 AS cor0
----
-1752
-2555
-6497

query I rowsort
SELECT ALL - col0 * col1 + - 5 FROM tab1 cor0
----
-1045
-645
-83

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

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

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

query I rowsort
SELECT - col2 + - 71 FROM tab0 AS cor0
----
-104
-153
-72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col2 * col2 + + 69 col0 FROM tab2 AS cor0
----
1513
745
798

onlyif mysql # use DIV operator for integer division
query I rowsort label-1712
SELECT DISTINCT + cor0.col2 + CAST( + col0 + - col0 AS SIGNED ) DIV 78 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-1712
SELECT DISTINCT + cor0.col2 + CAST ( + col0 + - col0 AS INTEGER ) / 78 FROM tab0 AS cor0
----
1
33
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1713
SELECT DISTINCT - col0 * ( - col0 * + col1 ) + CAST( + 95 AS SIGNED ) * col2 AS col1 FROM tab0 AS cor0
----
118920
52671
728601

skipif mysql # not compatible
query I rowsort label-1713
SELECT DISTINCT - col0 * ( - col0 * + col1 ) + CAST ( + 95 AS INTEGER ) * col2 AS col1 FROM tab0 AS cor0
----
118920
52671
728601

query I rowsort
SELECT DISTINCT + cor0.col1 * + 9 AS col1 FROM tab1, tab2 AS cor0
----
153
279
531

query I rowsort
SELECT DISTINCT - + ( + col0 ) - + ( 35 + cor0.col0 ) * col1 * col1 AS col0 FROM tab2 AS cor0
----
-33025
-393431
-40369

query I rowsort
SELECT + 93 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 85ef191bf1b307f300b3fd49992fcae7

onlyif mysql # use DIV operator for integer division
query I rowsort label-1717
SELECT - 14 * cor0.col2 DIV - col0 + - 88 FROM tab2 AS cor0
----
-34
-82
-84

skipif mysql # not compatible
query I rowsort label-1717
SELECT - 14 * cor0.col2 / - col0 + - 88 FROM tab2 AS cor0
----
-34
-82
-84

query I rowsort
SELECT DISTINCT + - ( col1 ) - 60 AS col1 FROM tab1 AS cor0
----
-70
-73
-86

query I rowsort
SELECT + col2 * col0 + + col2 * col2 + col0 FROM tab1 AS cor0
----
16976
3081
6961

query I rowsort
SELECT 65 + + tab2.col2 FROM tab2
----
103
91
92

query I rowsort
SELECT ALL col0 + - 2 * + tab2.col1 FROM tab2
----
-40
-55
45

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

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

query I rowsort
SELECT 93 AS col1 FROM tab2, tab1 cor0, tab0 AS cor1
----
27 values hashing to 85ef191bf1b307f300b3fd49992fcae7

query I rowsort
SELECT 33 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 76da8bc7cae18ecf856438f872430c80

query I rowsort
SELECT col1 * + tab2.col2 * + 39 FROM tab2
----
25194
32643
59826

query I rowsort
SELECT - cor0.col0 * - 11 + cor0.col0 * 6 + col1 AS col2 FROM tab0 cor0
----
1604
494
692

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1728
SELECT - tab1.col0 DIV 44 + + col0 AS col2 FROM tab1
----
3
63
79

skipif mysql # not compatible
query I rowsort label-1728
SELECT - tab1.col0 / 44 + + col0 AS col2 FROM tab1
----
3
63
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-1729
SELECT DISTINCT col2 * col2 + ( + col0 ) * tab0.col2 DIV - 91 FROM tab0
----
1
1081
6644

skipif mysql # not compatible
query I rowsort label-1729
SELECT DISTINCT col2 * col2 + ( + col0 ) * tab0.col2 / - 91 FROM tab0
----
1
1081
6644

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

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

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

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

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

query I rowsort
SELECT DISTINCT - + col0 * 85 AS col1 FROM tab2 AS cor0
----
-595
-6630
-6715

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 10 + - 63 col1 FROM tab0 AS cor0
----
-73
-73
-73

query I rowsort
SELECT ALL 75 * + col1 FROM tab1 AS cor0
----
1950
750
975

query I rowsort
SELECT - cor0.col0 * - col0 * + col0 AS col2 FROM tab2 AS cor0
----
343
474552
493039

query I rowsort
SELECT DISTINCT - - col1 * - col0 + + col0 * cor0.col0 * - col0 AS col2 FROM tab1 AS cor0
----
-105
-262784
-513040

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1742
SELECT ALL - col1 * col2 DIV col0 AS col1 FROM tab1
----
-15
-468
-8

skipif mysql # not compatible
query I rowsort label-1742
SELECT ALL - col1 * col2 / col0 AS col1 FROM tab1
----
-15
-468
-8

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

query I rowsort
SELECT col0 * col2 * - col1 FROM tab2
----
-119652
-51034
-5859

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1745
SELECT ALL + CAST ( NULL AS INTEGER ) - 12 col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * cor0.col1 + ( col2 ) * col1 * + 87 FROM tab1 AS cor0
----
108407
121472
49490

query I rowsort
SELECT ALL - 68 + + 85 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 43298e43365fccb5146ea32003753c92

query I rowsort
SELECT col2 * cor0.col2 + - 99 AS col1 FROM tab2 AS cor0
----
1345
577
630

onlyif mysql # use DIV operator for integer division
query I rowsort label-1749
SELECT ALL + - col0 DIV - col0 + - 5 * col0 * ( col1 ) FROM tab2 AS cor0
----
-1084
-23009
-6714

skipif mysql # not compatible
query I rowsort label-1749
SELECT ALL + - col0 / - col0 + - 5 * col0 * ( col1 ) FROM tab2 AS cor0
----
-1084
-23009
-6714

query I rowsort
SELECT ALL - col2 - - 38 AS col2 FROM tab2 AS cor0
----
0
11
12

onlyif mysql # use DIV operator for integer division
query I rowsort label-1751
SELECT DISTINCT - - col0 + - cor0.col2 DIV col1 FROM tab2 cor0
----
7
77
78

skipif mysql # not compatible
query I rowsort label-1751
SELECT DISTINCT - - col0 + - cor0.col2 / col1 FROM tab2 cor0
----
7
77
78

query I rowsort
SELECT - - col2 + 78 * col0 * - col1 FROM tab2 cor0
----
-104716
-16899
-358930

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

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

skipif mysql # not compatible
query I rowsort label-1754
SELECT + CAST ( NULL AS REAL ) * col2 + col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 37 * - col1 AS col2 FROM tab0 cor0
----
3182
3367
3589

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 62 * + cor1.col0 col2 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
186
3968
4960

query I rowsort
SELECT 96 + - 44 AS col1 FROM tab0 cor0
----
52
52
52

query I rowsort
SELECT DISTINCT - tab1.col1 * + col2 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT 18 + col0 * ( - col1 ) * + col1 AS col1 FROM tab2
----
-22813
-271500
-6709

onlyif mysql # use DIV operator for integer division
query I rowsort label-1760
SELECT col1 DIV col0 + - tab1.col0 FROM tab1
----
-64
-80
5

skipif mysql # not compatible
query I rowsort label-1760
SELECT col1 / col0 + - tab1.col0 FROM tab1
----
-64
-80
5

query I rowsort
SELECT 74 - - tab1.col0 FROM tab1
----
138
154
77

query I rowsort
SELECT - col0 + col0 * - col1 FROM tab0
----
-2088
-3430
-8188

query I rowsort
SELECT ALL + - col1 * - ( cor0.col0 ) FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-1764
SELECT - col1 DIV 75 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1764
SELECT - col1 / 75 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1765
SELECT DISTINCT - col1 DIV 7 FROM tab2 AS cor0
----
-2
-4
-8

skipif mysql # not compatible
query I rowsort label-1765
SELECT DISTINCT - col1 / 7 FROM tab2 AS cor0
----
-2
-4
-8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * col2 + - 50 col2 FROM tab2 AS cor0
----
139
1978
2952

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1767
SELECT DISTINCT col0 + + CAST( + col0 AS SIGNED ) FROM tab0 AS cor0
----
178
48
70

skipif mysql # not compatible
query I rowsort label-1767
SELECT DISTINCT col0 + + CAST ( + col0 AS INTEGER ) FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT DISTINCT - col2 + 57 FROM tab1 AS cor0
----
-39
0
3

query I rowsort
SELECT ALL - + col0 + - ( + 16 ) + col2 AS col1 FROM tab1 AS cor0
----
-23
0
35

query I rowsort
SELECT - col0 + + 15 * - 53 FROM tab2 cor0
----
-802
-873
-874

query I rowsort
SELECT + col1 + col1 * + 11 * - col1 FROM tab2 AS cor0
----
-10540
-3162
-38232

onlyif mysql # use DIV operator for integer division
query I rowsort label-1772
SELECT + col0 DIV 11 AS col1 FROM tab1 cor0
----
0
5
7

skipif mysql # not compatible
query I rowsort label-1772
SELECT + col0 / 11 AS col1 FROM tab1 cor0
----
0
5
7

query I rowsort
SELECT ALL + + col2 + + 27 + + 91 FROM tab1 AS cor0
----
172
175
214

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( ( col0 ) ) - + col2 col1 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT - 38 * tab0.col1 FROM tab0
----
-3268
-3458
-3686

query I rowsort
SELECT DISTINCT + col0 * col2 + col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT ALL + 24 - 79 FROM tab2 AS cor0
----
-55
-55
-55

query I rowsort
SELECT ALL col2 * - 74 * col1 FROM tab1 AS cor0
----
-103896
-42180
-92352

query I rowsort
SELECT ( 42 ) * col0 FROM tab2 AS cor0
----
294
3276
3318

query I rowsort
SELECT col1 * + col1 + - cor0.col2 AS col0 FROM tab1 AS cor0
----
43
622
73

query I rowsort
SELECT + + cor0.col1 * + col1 + cor0.col1 AS col0 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT + + col0 * + col2 * + cor0.col2 + 92 AS col2 FROM tab0 AS cor0
----
127
26228
598528

query I rowsort
SELECT 63 + + col2 * col1 FROM tab1 AS cor0
----
1311
1467
633

query I rowsort
SELECT DISTINCT + ( - cor0.col2 ) + - col2 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT DISTINCT + 19 + col1 FROM tab1 AS cor0
----
29
32
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col0 ) * cor0.col1 col2 FROM tab2 AS cor0
----
1343
217
4602

skipif mysql # not compatible
query I rowsort
SELECT ALL - col0 * col0 + - CAST ( + col1 AS REAL ) * + col1 FROM tab1 AS cor0
----
-4196
-6569
-685

query I rowsort
SELECT ALL + col2 * col2 + + col2 * 95 FROM tab0 cor0
----
14514
4224
96

query I rowsort
SELECT DISTINCT + 1 AS col2 FROM tab1, tab1 AS cor0
----
1

query I rowsort
SELECT + cor0.col0 + + col2 * - col2 * + 58 AS col1 FROM tab1 AS cor0
----
-169125
-188378
-534448

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1791
SELECT ALL + + col2 / col1 + + CAST( NULL AS SIGNED ) + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1791
SELECT ALL + + col2 / col1 + + CAST ( NULL AS INTEGER ) + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + col0 * col2 - - ( + 7 * col0 ) AS col2 FROM tab0 cor0
----
-624
-6675
210

query I rowsort
SELECT - + 61 AS col2 FROM tab0 AS cor0
----
-61
-61
-61

query I rowsort
SELECT ALL ( col1 ) * + 30 + + col0 FROM tab0 AS cor0
----
2604
2819
2945

query I rowsort
SELECT 6 * + tab0.col0 FROM tab0
----
144
210
534

query I rowsort
SELECT col0 * cor0.col1 + + 73 AS col2 FROM tab2 AS cor0
----
1416
290
4675

query I rowsort
SELECT DISTINCT - ( col2 ) * - cor0.col0 + ( col0 ) FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT ALL + - 47 * col0 FROM tab0 cor0
----
-1128
-1645
-4183

query I rowsort
SELECT ALL cor0.col2 - + col0 FROM tab2 AS cor0
----
-41
-52
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 88 + cor0.col2 * + col2 col0 FROM tab1 AS cor0
----
2828
3161
9128

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 57 + + col2 * + 27 * col1 + col0 col2 FROM tab0 AS cor0
----
201620
2711
76707

query I rowsort
SELECT + - 61 + + col2 AS col1 FROM tab2 AS cor0
----
-23
-34
-35

query I rowsort
SELECT ALL col2 + 62 FROM tab0
----
144
63
95

query I rowsort
SELECT ALL col1 * + col2 + col1 * - ( + 59 ) + + col0 AS col2 FROM tab0
----
-2212
-5591
2182

query I rowsort
SELECT ALL 39 + - col1 AS col0 FROM tab1
----
13
26
29

query I rowsort
SELECT ALL + cor0.col2 * + cor0.col1 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to b2e5b025b1c725661248b0f29aaef908

query I rowsort
SELECT DISTINCT + ( cor0.col0 ) + + col1 * col0 FROM tab1 cor0
----
1120
704
81

query I rowsort
SELECT col0 - + ( cor0.col2 ) FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT + 80 * - 20 * col0 - 20 AS col0 FROM tab2 AS cor0
----
-11220
-124820
-126420

query I rowsort
SELECT ALL + 60 * + 73 AS col2 FROM tab0 cor0
----
4380
4380
4380

onlyif mysql # use DIV operator for integer division
query I rowsort label-1811
SELECT tab0.col1 * col0 DIV col0 - - col1 * + ( + 91 ) FROM tab0
----
7912
8372
8924

skipif mysql # not compatible
query I rowsort label-1811
SELECT tab0.col1 * col0 / col0 - - col1 * + ( + 91 ) FROM tab0
----
7912
8372
8924

query I rowsort
SELECT DISTINCT + col1 * 64 FROM tab2
----
1088
1984
3776

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1813
SELECT + 61 + ( + col1 ) * CAST( NULL AS DECIMAL ) AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1813
SELECT + 61 + ( + col1 ) * CAST ( NULL AS REAL ) AS col1 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1814
SELECT DISTINCT CAST( + col1 AS SIGNED ) + tab1.col0 * + col0 AS col2 FROM tab1
----
35
4106
6413

skipif mysql # not compatible
query I rowsort label-1814
SELECT DISTINCT CAST ( + col1 AS INTEGER ) + tab1.col0 * + col0 AS col2 FROM tab1
----
35
4106
6413

query I rowsort
SELECT ( - 81 ) * - col1 FROM tab0
----
6966
7371
7857

onlyif mysql # use DIV operator for integer division
query I rowsort label-1816
SELECT ALL + 94 DIV col0 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-1816
SELECT ALL + 94 / col0 FROM tab0 AS cor0
----
1
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 11 col1 FROM tab2 AS cor0
----
-11

query I rowsort
SELECT - tab2.col1 * + col0 + col0 * col1 AS col2 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT - 4 + 75 FROM tab1
----
71

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1820
SELECT DISTINCT + - CAST( NULL AS SIGNED ) * cor0.col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1820
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) * cor0.col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - col0 * + tab0.col0 AS col2 FROM tab0
----
-1225
-576
-7921

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1822
SELECT - cor0.col1 + - CAST( - col1 AS SIGNED ) FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1822
SELECT - cor0.col1 + - CAST ( - col1 AS INTEGER ) FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1823
SELECT - col2 DIV CAST( 6 AS SIGNED ) + + col2 col1 FROM tab1 AS cor0
----
45
48
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1823
SELECT - col2 / CAST ( 6 AS INTEGER ) + + col2 col1 FROM tab1 AS cor0
----
45
48
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + 18 * + cor0.col1 col1 FROM tab2 cor0
----
227
551
984

query I rowsort
SELECT - col1 * col1 + col2 AS col0 FROM tab1 AS cor0
----
-43
-622
-73

query I rowsort
SELECT DISTINCT 95 + 75 * - col0 AS col0 FROM tab0
----
-1705
-2530
-6580

query I rowsort
SELECT ALL + col2 + tab1.col1 * col1 + col2 FROM tab1
----
214
361
784

query I rowsort
SELECT + - 71 AS col1 FROM tab2 AS cor0
----
-71
-71
-71

query I rowsort
SELECT + - col2 * - 6 + - col2 + + col0 FROM tab0 AS cor0
----
189
40
499

query I rowsort
SELECT ALL + - cor0.col2 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT ALL - + col0 * cor0.col1 * 63 FROM tab0 AS cor0
----
-130032
-213885
-510237

query I rowsort
SELECT ALL - 76 * 51 AS col0 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to ee9c1d3dea3b2b99e696816c010ae4e4

query I rowsort
SELECT DISTINCT - + 72 + - col1 FROM tab1 AS cor0
----
-82
-85
-98

query I rowsort
SELECT ALL - tab0.col1 AS col0 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT - - col0 * 71 - + col0 AS col0 FROM tab1 cor0
----
210
4480
5600

query I rowsort
SELECT + cor0.col0 + 30 AS col2 FROM tab0 AS cor0
----
119
54
65

query I rowsort
SELECT DISTINCT - tab1.col2 + tab1.col2 AS col1 FROM tab1
----
0

query I rowsort
SELECT DISTINCT 97 + + col0 FROM tab0
----
121
132
186

query I rowsort
SELECT + 89 * - tab0.col2 AS col1 FROM tab0
----
-2937
-7298
-89

query I rowsort
SELECT col2 + - col0 + - 51 FROM tab0
----
-42
-58
-85

query I rowsort
SELECT DISTINCT - col0 + - 1 * - ( col0 + + col1 ) AS col0 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1842
SELECT + col0 + CAST( 41 AS SIGNED ) FROM tab2 cor0
----
119
120
48

skipif mysql # not compatible
query I rowsort label-1842
SELECT + col0 + CAST ( 41 AS INTEGER ) FROM tab2 cor0
----
119
120
48

query I rowsort
SELECT DISTINCT - + 58 AS col0 FROM tab2, tab1 cor0
----
-58

query I rowsort
SELECT DISTINCT - + cor0.col0 * 40 * - col2 AS col1 FROM tab2 AS cor0
----
120080
7560
81120

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1845
SELECT cor0.col0 * - CAST( 58 AS SIGNED ) FROM tab0 AS cor0
----
-1392
-2030
-5162

skipif mysql # not compatible
query I rowsort label-1845
SELECT cor0.col0 * - CAST ( 58 AS INTEGER ) FROM tab0 AS cor0
----
-1392
-2030
-5162

query I rowsort
SELECT - 51 * - 24 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 063b73dafa1115abe8d3a91e9f7972bc

query I rowsort
SELECT ALL + 0 + + col0 * cor0.col2 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1848
SELECT DISTINCT + + CAST( NULL AS SIGNED ) / - col1 AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1848
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) / - col1 AS col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL - 22 * col2 + + col2 AS col1 FROM tab0 cor0
----
-1722
-21
-693

onlyif mysql # use DIV operator for integer division
query I rowsort label-1850
SELECT col0 DIV - 20 FROM tab2
----
-3
-3
0

skipif mysql # not compatible
query I rowsort label-1850
SELECT col0 / - 20 FROM tab2
----
-3
-3
0

query I rowsort
SELECT DISTINCT + col0 - + col2 * + col2 AS col1 FROM tab0
----
-1065
-6635
34

query I rowsort
SELECT col0 - + 65 AS col2 FROM tab0
----
-30
-41
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-1853
SELECT ALL + col0 DIV - col2 - + col0 * col1 FROM tab0
----
-2064
-3430
-8100

skipif mysql # not compatible
query I rowsort label-1853
SELECT ALL + col0 / - col2 - + col0 * col1 FROM tab0
----
-2064
-3430
-8100

query I rowsort
SELECT col2 + col1 + - col1 AS col0 FROM tab0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 - tab0.col1 col0 FROM tab0
----
-2
-62
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - col1 col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - 39 * col2 + + col0 AS col2 FROM tab0 AS cor0
----
-1263
-3109
-4

query I rowsort
SELECT ALL + 70 AS col1 FROM tab2
----
70
70
70

query I rowsort
SELECT + 29 + col0 * ( col1 ) FROM tab0 AS cor0
----
2093
3424
8128

query I rowsort
SELECT - 2 * - cor0.col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT ( col2 * tab1.col0 ) AS col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT DISTINCT + ( col2 ) * + col0 AS col0 FROM tab0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-1863
SELECT + + 30 DIV col0 AS col1 FROM tab2 AS cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-1863
SELECT + + 30 / col0 AS col1 FROM tab2 AS cor0
----
0
0
4

query I rowsort
SELECT + 56 * cor0.col2 AS col2 FROM tab2 AS cor0
----
1456
1512
2128

query I rowsort
SELECT DISTINCT + - col2 * col2 AS col1 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT + col2 + - col1 + cor0.col1 AS col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT col0 * - col0 + cor0.col0 AS col0 FROM tab2 cor0
----
-42
-6006
-6162

query I rowsort
SELECT DISTINCT col0 + - col1 * + col0 AS col2 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT ALL - col2 + - cor0.col0 AS col2 FROM tab2 AS cor0
----
-104
-117
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + + col2 col2 FROM tab0
----
164
2
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + col2 col0 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT ALL + col1 + + col0 * col2 FROM tab1
----
188
3658
7693

query I rowsort
SELECT col0 + tab2.col0 * + tab2.col2 - - tab2.col0 AS col1 FROM tab2
----
203
2184
3160

query I rowsort
SELECT DISTINCT col2 + - col1 + + col0 AS col0 FROM tab0
----
-29
-61
80

query I rowsort
SELECT DISTINCT - col2 + col1 + col2 * + col2 FROM tab1
----
2888
3202
9133

query I rowsort
SELECT + col0 * col1 * col2 + - col0 * col1 AS col0 FROM tab2
----
115050
49691
5642

query I rowsort
SELECT - cor0.col0 FROM tab2, tab2 AS cor0 CROSS JOIN tab1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

onlyif mysql # use DIV operator for integer division
query I rowsort label-1878
SELECT DISTINCT - col0 DIV col2 + + col1 * + cor0.col1 AS col1 FROM tab0 AS cor0
----
7396
8280
9374

skipif mysql # not compatible
query I rowsort label-1878
SELECT DISTINCT - col0 / col2 + + col1 * + cor0.col1 AS col1 FROM tab0 AS cor0
----
7396
8280
9374

query I rowsort
SELECT + - cor0.col2 + - cor0.col2 + - col1 * col2 FROM tab2 AS cor0
----
-1586
-722
-891

query I rowsort
SELECT ALL - col2 - - col1 * + col1 AS col0 FROM tab1 AS cor0
----
43
622
73

query I rowsort
SELECT + cor0.col1 + + col0 * + col1 AS col1 FROM tab1 AS cor0
----
104
1053
650

onlyif mysql # use DIV operator for integer division
query I rowsort label-1882
SELECT + col1 DIV col1 col0 FROM tab2 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1882
SELECT + col1 / col1 col0 FROM tab2 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col2 FROM tab2 cor0
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-1884
SELECT + col0 DIV + cor0.col1 col0 FROM tab1 AS cor0
----
0
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1884
SELECT + col0 / + cor0.col1 col0 FROM tab1 AS cor0
----
0
6
6

query I rowsort
SELECT - + ( + cor0.col2 ) * + col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - - col0 * - col2 * + cor0.col2 AS col0 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT ALL tab0.col1 * tab0.col0 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to f2938bee011b8d49dd931b1f9235e7f5

query I rowsort
SELECT + + col2 * + col2 * col0 + col0 + col1 AS col1 FROM tab2 AS cor0
----
114172
5141
52865

query I rowsort
SELECT + col2 * col0 + col0 + col2 AS col2 FROM tab1 AS cor0
----
219
3769
7856

query I rowsort
SELECT col2 * + tab1.col1 + col2 + col2 AS col1 FROM tab1
----
1440
1512
684

query I rowsort
SELECT DISTINCT cor0.col1 + - col1 AS col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT - + col0 * - col2 - cor0.col2 AS col2 FROM tab1 cor0
----
108
3591
7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-1893
SELECT - col2 + col1 DIV col0 AS col1 FROM tab1
----
-46
-57
-96

skipif mysql # not compatible
query I rowsort label-1893
SELECT - col2 + col1 / col0 AS col1 FROM tab1
----
-46
-57
-96

query I rowsort
SELECT ALL col2 * col0 - - tab2.col2 AS col0 FROM tab2
----
2054
216
3040

query I rowsort
SELECT DISTINCT col1 * + col2 + col0 AS col2 FROM tab1
----
1328
1407
634

query I rowsort
SELECT ALL col2 + col0 + col1 AS col1 FROM tab2
----
134
163
65

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL BETWEEN ( NULL ) AND - col1 * col0 * col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col0 * - col1 col0 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL + col2 FROM tab1 WHERE NOT ( col2 + col2 ) < ( col1 )
----
54
57
96

query I rowsort
SELECT col0 * - col1 - col0 * col1 FROM tab2
----
-2686
-434
-9204

onlyif mysql # use DIV operator for integer division
query I rowsort label-1901
SELECT DISTINCT col1 - col0 DIV + col0 AS col1 FROM tab2
----
16
30
58

skipif mysql # not compatible
query I rowsort label-1901
SELECT DISTINCT col1 - col0 / + col0 AS col1 FROM tab2
----
16
30
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col0 FROM tab1 WHERE NOT - tab1.col0 NOT IN ( col1 + col0 )
----

query I rowsort
SELECT DISTINCT - col2 * + tab2.col1 * + col2 - tab2.col1 * + col0 * col1 AS col0 FROM tab2
----
-29326
-311402
-47379

query I rowsort
SELECT + tab1.col0 * - col0 * - col1 - - col2 FROM tab1
----
288
41017
83296

query I rowsort
SELECT - col1 * col1 * + col1 + tab0.col0 * col0 AS col2 FROM tab0
----
-635480
-745650
-911448

query I rowsort
SELECT ALL - + col2 * col1 * ( + cor0.col1 ) + col2 * ( - col2 * + col1 ) FROM tab0 AS cor0
----
-1290926
-337722
-9506

query I rowsort
SELECT + col1 * col1 * - col0 + - cor0.col1 AS col1 FROM tab0 AS cor0
----
-177590
-329412
-737100

query I rowsort
SELECT - - col1 + col1 * col1 * col1 AS col2 FROM tab1 cor0
----
1010
17602
2210

query I rowsort
SELECT ALL + 24 + col0 FROM tab0 AS cor0
----
113
48
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 * col2 * tab1.col0 col2 FROM tab1
----
207936
737280
8748

query I rowsort
SELECT DISTINCT - tab1.col1 + col0 * - col2 - col2 * + tab1.col2 * - col0 AS col1 FROM tab1
----
204278
729587
8560

query I rowsort
SELECT + col0 * + col0 + + tab0.col1 * col0 FROM tab0
----
16020
2640
4620

query I rowsort
SELECT ALL tab1.col0 + tab1.col2 + col2 FROM tab1
----
111
178
272

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE NOT col0 / col1 BETWEEN + col0 * col0 AND + col0 - - col2
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT ALL - col0 - col2 * - col1 * - col2 AS col1 FROM tab1 AS cor0
----
-119888
-32554
-75819

query III rowsort
SELECT ALL * FROM tab1 AS cor0 WHERE NOT col1 IN ( + col1 * col2 * col2 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

onlyif mysql # use DIV operator for integer division
query I rowsort label-1917
SELECT DISTINCT col0 DIV - cor0.col2 AS col2 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-1917
SELECT DISTINCT col0 / - cor0.col2 AS col2 FROM tab1 AS cor0
----
-1
0

query I rowsort
SELECT ALL cor0.col2 FROM tab2 AS cor0 WHERE NOT NULL <= ( NULL )
----

query I rowsort
SELECT DISTINCT col2 * + col2 * col0 - col0 FROM tab1
----
207872
737200
8745

query I rowsort
SELECT + col1 + col0 - - col1 AS col1 FROM tab1
----
106
55
84

query I rowsort
SELECT ALL + col2 * col1 FROM tab0 WHERE NOT col1 < NULL
----

query I rowsort
SELECT DISTINCT + col1 * + col1 AS col0 FROM tab2 WHERE NOT NULL NOT IN ( + col1 )
----

query I rowsort
SELECT ALL + col2 - col0 * col2 AS col1 FROM tab0 WHERE NULL IN ( col1 + col1 + col1 )
----

query III rowsort
SELECT * FROM tab0 WHERE NOT ( NULL ) IN ( - col2 * - col1 )
----

query I rowsort
SELECT - col0 * tab1.col1 + col1 + col0 AS col2 FROM tab1
----
-49
-566
-947

query I rowsort
SELECT DISTINCT col2 * col0 - col1 * col1 FROM tab0
----
-6604
-9374
-983

query III rowsort
SELECT ALL * FROM tab1 WHERE NULL BETWEEN - col2 AND ( NULL )
----

query I rowsort
SELECT cor0.col2 * col2 - + cor0.col2 AS col2 FROM tab1 AS cor0
----
2862
3192
9120

query I rowsort
SELECT ALL - tab2.col2 * col2 + col1 * - 33 + col0 AS col1 FROM tab2
----
-1745
-1926
-2545

query I rowsort
SELECT ( - 77 ) AS col1 FROM tab0
----
-77
-77
-77

query I rowsort
SELECT - + col1 + - col0 * cor0.col0 FROM tab2 cor0
----
-6143
-6258
-80

query I rowsort
SELECT ALL + 86 * col0 FROM tab2
----
602
6708
6794

query I rowsort
SELECT + col0 * + col0 + 63 FROM tab2 AS cor0
----
112
6147
6304

query I rowsort
SELECT + 74 + col1 FROM tab1 cor0
----
100
84
87

query I rowsort
SELECT DISTINCT - col0 * ( - col0 ) * col0 + cor0.col1 * + col2 - col1 * + col1 AS col0 FROM tab0 cor0
----
33563
704150
9266

query I rowsort
SELECT DISTINCT + 92 AS col0 FROM tab0, tab1 AS cor0, tab2 cor1
----
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-1937
SELECT ALL cor0.col1 * - col2 DIV col2 - col2 FROM tab0 AS cor0
----
-119
-173
-98

skipif mysql # not compatible
query I rowsort label-1937
SELECT ALL cor0.col1 * - col2 / col2 - col2 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT + - col0 * - 30 FROM tab1 cor0
----
1920
2400
90

query I rowsort
SELECT ALL + col2 + - 37 * - cor0.col2 AS col2 FROM tab0 AS cor0
----
1254
3116
38

query I rowsort
SELECT DISTINCT - + col0 - 65 * ( col1 ) FROM tab0 cor0
----
-5614
-6004
-6340

query I rowsort
SELECT 95 + col0 FROM tab1 AS cor0
----
159
175
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-1942
SELECT + - 3 + 51 * + col0 DIV - col0 FROM tab0 AS cor0
----
-54
-54
-54

skipif mysql # not compatible
query I rowsort label-1942
SELECT + - 3 + 51 * + col0 / - col0 FROM tab0 AS cor0
----
-54
-54
-54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col1 + 74 col2 FROM tab0 AS cor0
----
-12
-17
-23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1944
SELECT ALL + + CAST( - 49 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-49
-49
-49

skipif mysql # not compatible
query I rowsort label-1944
SELECT ALL + + CAST ( - 49 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-49
-49
-49

query I rowsort
SELECT col1 + ( + col2 ) * col2 FROM tab1 AS cor0
----
2942
3259
9229

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 84 + - col2 col0 FROM tab2 AS cor0
----
46
57
58

query I rowsort
SELECT + ( col0 ) * + cor0.col0 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT + - 81 * col0 AS col2 FROM tab1 AS cor0
----
-243
-5184
-6480

query I rowsort
SELECT DISTINCT - 26 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
-26

query I rowsort
SELECT DISTINCT - 63 AS col1 FROM tab2
----
-63

query I rowsort
SELECT tab0.col0 - tab0.col2 AS col0 FROM tab0
----
-9
34
7

query I rowsort
SELECT - - 68 * cor0.col1 AS col0 FROM tab1 AS cor0
----
1768
680
884

query I rowsort
SELECT ALL 93 + + col2 FROM tab1 AS cor0
----
147
150
189

query I rowsort
SELECT ALL col2 * + col1 * - col2 FROM tab2 AS cor0
----
-22599
-24548
-39884

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col2 * + cor0.col1 col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL - + col2 + - cor0.col2 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT - 93 * col1 + - col0 * - col2 AS col2 FROM tab0 cor0
----
-1165
-7206
-8986

query I rowsort
SELECT - + 66 + - col1 FROM tab1 AS cor0
----
-76
-79
-92

query I rowsort
SELECT ALL + 8 FROM tab0 cor0
----
8
8
8

query I rowsort
SELECT + 7 + + col0 * col0 AS col2 FROM tab2 AS cor0
----
56
6091
6248

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 48 col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

query I rowsort
SELECT ( - ( - col0 ) ) AS col1 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( - col0 * col0 AS REAL ) FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT + col1 + - ( - col2 ) AS col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT col0 * 98 AS col2 FROM tab0 AS cor0
----
2352
3430
8722

query I rowsort
SELECT + col1 * - 32 AS col2 FROM tab2 cor0
----
-1888
-544
-992

query I rowsort
SELECT + col0 + 73 * - col2 * - col1 FROM tab2 AS cor0
----
112060
47237
61108

query I rowsort
SELECT - + col2 + 42 * - col1 FROM tab0 AS cor0
----
-3645
-3904
-4075

query I rowsort
SELECT 73 + - col1 AS col1 FROM tab0
----
-13
-18
-24

query I rowsort
SELECT - col0 + col1 * col2 AS col1 FROM tab2 cor0
----
1456
567
830

query I rowsort
SELECT ALL + col1 * - ( + 33 ) FROM tab1 AS cor0
----
-330
-429
-858

query I rowsort
SELECT ALL - col0 + + 67 * - ( col0 ) * - ( + ( col2 ) * + col0 ) FROM tab1 AS cor0
----
15642560
32559
41164720

query I rowsort
SELECT DISTINCT col1 * - col2 + - 23 * col2 FROM tab0 cor0
----
-120
-3597
-9348

query I rowsort
SELECT ALL - - col2 * col0 + col0 * - col1 - col2 AS col0 FROM tab0 AS cor0
----
-1305
-3361
-883

query I rowsort
SELECT DISTINCT + + cor0.col1 * + cor0.col2 + cor0.col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT ALL + col2 * 11 * - col1 + col0 FROM tab1 AS cor0
----
-13648
-15441
-6206

query I rowsort
SELECT cor0.col1 + + 30 FROM tab1 AS cor0
----
40
43
56

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1978
SELECT DISTINCT + col1 + CAST( NULL AS SIGNED ) * + col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1978
SELECT DISTINCT + col1 + CAST ( NULL AS INTEGER ) * + col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT - col0 * - 48 AS col2 FROM tab1 cor0
----
144
3072
3840

query I rowsort
SELECT col1 * col2 + col0 * + col0 AS col0 FROM tab1
----
1413
4666
7648

query I rowsort
SELECT - col1 * col0 + + col0 * col1 AS col1 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1982
SELECT tab1.col1 DIV + col1 + col0 * - col2 - col1 col1 FROM tab1
----
-187
-3657
-7692

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1982
SELECT tab1.col1 / + col1 + col0 * - col2 - col1 col1 FROM tab1
----
-187
-3657
-7692

query I rowsort
SELECT + col1 + + 45 FROM tab0
----
131
136
142

query I rowsort
SELECT DISTINCT col1 + col0 * col0 AS col2 FROM tab0
----
1322
662
8012

query I rowsort
SELECT DISTINCT + col2 + + col1 * - col0 AS col1 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT + 37 FROM tab0, tab0 AS cor0, tab1 cor1
----
27 values hashing to c023509f63faa044d654943e6df55ca2

query I rowsort
SELECT - col2 * - 60 AS col1 FROM tab1
----
3240
3420
5760

query I rowsort
SELECT col1 + - col1 * - col2 * col0 AS col0 FROM tab1
----
36490
4238
99853

onlyif mysql # use DIV operator for integer division
query I rowsort label-1989
SELECT - tab1.col2 DIV - col2 - + ( - col1 * col2 ) FROM tab1
----
1249
1405
571

skipif mysql # not compatible
query I rowsort label-1989
SELECT - tab1.col2 / - col2 - + ( - col1 * col2 ) FROM tab1
----
1249
1405
571

query I rowsort
SELECT DISTINCT col1 + + col2 * - col1 AS col1 FROM tab2
----
-1475
-629
-806

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1991
SELECT DISTINCT col0 * col0 - CAST( NULL AS SIGNED ) * - 24 AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1991
SELECT DISTINCT col0 * col0 - CAST ( NULL AS INTEGER ) * - 24 AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL col0 * - cor0.col0 AS col0 FROM tab1 cor0
----
-4096
-6400
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + ( col1 ) col0 FROM tab2 AS cor0
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-1994
SELECT ALL - - 41 + - col1 DIV col0 + col1 AS col2 FROM tab2 AS cor0
----
100
58
68

skipif mysql # not compatible
query I rowsort label-1994
SELECT ALL - - 41 + - col1 / col0 + col1 AS col2 FROM tab2 AS cor0
----
100
58
68

query I rowsort
SELECT ALL + col0 * cor0.col0 - ( 95 * col1 ) AS col2 FROM tab1 AS cor0
----
-2461
3146
5165

onlyif mysql # use DIV operator for integer division
query I rowsort label-1996
SELECT ALL col0 * col0 + - ( 64 ) * - col2 * + col0 + 8 DIV + cor0.col0 FROM tab0 cor0
----
3465
474993
51264

skipif mysql # not compatible
query I rowsort label-1996
SELECT ALL col0 * col0 + - ( 64 ) * - col2 * + col0 + 8 / + cor0.col0 FROM tab0 cor0
----
3465
474993
51264

query I rowsort
SELECT - col0 * col2 * - col1 + + col2 * col1 FROM tab0
----
3492
671580
70950

query I rowsort
SELECT DISTINCT 47 + 79 AS col2 FROM tab0, tab1, tab1 AS cor0
----
126

query I rowsort
SELECT 27 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

query I rowsort
SELECT ALL - 31 - - col1 * - col1 * + col1 AS col0 FROM tab2
----
-205410
-29822
-4944

onlyif mysql # use DIV operator for integer division
query I rowsort label-2001
SELECT DISTINCT - col2 DIV tab2.col0 - col1 FROM tab2
----
-17
-34
-59

skipif mysql # not compatible
query I rowsort label-2001
SELECT DISTINCT - col2 / tab2.col0 - col1 FROM tab2
----
-17
-34
-59

query I rowsort
SELECT + - ( col2 ) * cor0.col1 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + + 95 * col0 AS col0 FROM tab0 AS cor0
----
2280
3325
8455

onlyif mysql # use DIV operator for integer division
query I rowsort label-2004
SELECT tab2.col1 DIV cor0.col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 79df79a26aa952434d45d343ae9ba4d8

skipif mysql # not compatible
query I rowsort label-2004
SELECT tab2.col1 / cor0.col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 79df79a26aa952434d45d343ae9ba4d8

query I rowsort
SELECT - col0 * + 99 + col0 FROM tab0 AS cor0
----
-2352
-3430
-8722

query I rowsort
SELECT ALL - 23 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 9bd721f99d79dce21b1de2860fd51ed5

query I rowsort
SELECT ALL 68 * - col2 AS col1 FROM tab0
----
-2244
-5576
-68

query I rowsort
SELECT - col2 * 86 AS col1 FROM tab2 AS cor0
----
-2236
-2322
-3268

onlyif mysql # use DIV operator for integer division
query I rowsort label-2009
SELECT DISTINCT + col1 DIV 80 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-2009
SELECT DISTINCT + col1 / 80 FROM tab1 AS cor0
----
0

query I rowsort
SELECT + + col1 * ( + 50 ) FROM tab0 AS cor0
----
4300
4550
4850

query I rowsort
SELECT - col1 * - 0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT 63 + 14 FROM tab2, tab2 AS cor0 CROSS JOIN tab1
----
27 values hashing to d7b027bca5d37c67e29013904def8125

query I rowsort
SELECT DISTINCT + 28 * col1 AS col1 FROM tab2 AS cor0
----
1652
476
868

query I rowsort
SELECT ALL - 7 * 10 + col1 AS col1 FROM tab2 AS cor0
----
-11
-39
-53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2015
SELECT DISTINCT ( - col2 ) - col1 * - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2015
SELECT DISTINCT ( - col2 ) - col1 * - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2016
SELECT DISTINCT - - 76 DIV col0 AS col0 FROM tab1 AS cor0
----
0
1
25

skipif mysql # not compatible
query I rowsort label-2016
SELECT DISTINCT - - 76 / col0 AS col0 FROM tab1 AS cor0
----
0
1
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + 73 col0 FROM tab2 AS cor0
----
100
111
99

query I rowsort
SELECT ALL + + col1 + - ( + col1 ) AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col2 * 69 + col0 FROM tab1 AS cor0
----
-3723
-3869
-6544

query I rowsort
SELECT ALL - - cor0.col2 * + col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT - - col1 * + col1 + - col2 FROM tab2 cor0
----
251
3455
934

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + - col1 col2 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT - + 76 * + col2 FROM tab1 cor0
----
-4104
-4332
-7296

query I rowsort
SELECT ALL + - cor0.col0 * + col0 * 72 AS col1 FROM tab0 AS cor0
----
-41472
-570312
-88200

query I rowsort
SELECT + 83 AS col0 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 002a717a3d902d97220759065fb107c3

query I rowsort
SELECT - ( - col1 ) + + col1 * - 64 FROM tab1 cor0
----
-1638
-630
-819

query I rowsort
SELECT - 77 + - col1 FROM tab0 AS cor0
----
-163
-168
-174

query I rowsort
SELECT + + col1 * + cor0.col1 AS col0 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT tab0.col0 + + 65 FROM tab2, tab0 AS cor0 CROSS JOIN tab0
----
27 values hashing to 6280b3dce166772fbff91b7245ddd680

query I rowsort
SELECT - 96 + - ( col2 ) FROM tab1 AS cor0
----
-150
-153
-192

query I rowsort
SELECT - - 26 * - col0 FROM tab1 cor0
----
-1664
-2080
-78

query I rowsort
SELECT + col0 + + 58 * + col1 AS col1 FROM tab0 AS cor0
----
5012
5367
5661

query I rowsort
SELECT + - col2 * - 8 FROM tab1 AS cor0
----
432
456
768

query I rowsort
SELECT ALL + + 23 * + col2 FROM tab2 cor0
----
598
621
874

query I rowsort
SELECT - + col1 * col2 + - 71 AS col0 FROM tab0 AS cor0
----
-168
-2909
-7533

query I rowsort
SELECT DISTINCT 52 * col1 AS col2 FROM tab1
----
1352
520
676

query I rowsort
SELECT DISTINCT + 90 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
90

query I rowsort
SELECT ALL + tab2.col1 * - cor1.col2 FROM tab2, tab1 cor0, tab0 AS cor1
----
27 values hashing to 1569ce86989370cabb132935ec617c18

query I rowsort
SELECT ALL tab2.col1 AS col1 FROM tab2, tab0 AS cor0, tab1 cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2040
SELECT - - col0 + CAST( NULL AS DECIMAL ) * ( + col0 ) col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2040
SELECT - - col0 + CAST ( NULL AS REAL ) * ( + col0 ) col0 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * 40 + + col1 + col2 AS col1 FROM tab1 AS cor0
----
-333
-411
-960

query I rowsort
SELECT ALL - col1 + - ( 55 ) AS col1 FROM tab1 AS cor0
----
-65
-68
-81

query I rowsort
SELECT ALL + + col1 + + 35 FROM tab2 AS cor0
----
52
66
94

query I rowsort
SELECT - col0 * + col1 + + col0 + + col2 AS col1 FROM tab1 AS cor0
----
-21
-519
-864

query I rowsort
SELECT DISTINCT + ( + cor1.col2 ) + + cor1.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
171
36
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2046
SELECT DISTINCT col0 + + CAST( - col0 AS SIGNED ) AS col1 FROM tab2
----
0

skipif mysql # not compatible
query I rowsort label-2046
SELECT DISTINCT col0 + + CAST ( - col0 AS INTEGER ) AS col1 FROM tab2
----
0

query I rowsort
SELECT ALL - - col2 + + 71 * - col1 FROM tab1 AS cor0
----
-1792
-653
-827

query I rowsort
SELECT DISTINCT + col1 + - ( - tab0.col2 ) FROM tab0
----
119
173
98

query I rowsort
SELECT cor0.col1 + ( + col0 ) FROM tab1 AS cor0
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 56 col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 9c4523312174730bbc525b9977aa99fa

query I rowsort
SELECT ALL col2 + + ( - col1 ) AS col1 FROM tab2
----
-33
-4
21

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2052
SELECT + cor0.col0 * + CAST( NULL AS SIGNED ) AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-2052
SELECT + cor0.col0 * + CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL - 87 AS col2 FROM tab2 AS cor0
----
-87
-87
-87

query I rowsort
SELECT DISTINCT - + 65 * col0 + col0 FROM tab0 AS cor0
----
-1536
-2240
-5696

query I rowsort
SELECT DISTINCT + 59 * + 44 * - col2 FROM tab1 AS cor0
----
-140184
-147972
-249216

query I rowsort
SELECT DISTINCT - 81 + - col0 * col0 FROM tab2 AS cor0
----
-130
-6165
-6322

query I rowsort
SELECT ALL 95 - col1 AS col1 FROM tab2
----
36
64
78

query I rowsort
SELECT - ( col0 ) + 90 AS col1 FROM tab1 AS cor0
----
10
26
87

query I rowsort
SELECT DISTINCT - col0 - - col1 AS col0 FROM tab0
----
2
62

query I rowsort
SELECT 47 + col0 AS col2 FROM tab0 AS cor0
----
136
71
82

query I rowsort
SELECT - - 69 + cor0.col0 FROM tab1 AS cor0
----
133
149
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * cor0.col0 col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT + col0 * col1 + 60 AS col0 FROM tab1 AS cor0
----
1100
138
700

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2064
SELECT col0 + + CAST( NULL AS SIGNED ) - + col2 * col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2064
SELECT col0 + + CAST ( NULL AS INTEGER ) - + col2 * col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 + - 58 AS col0 FROM tab0 AS cor0
----
-140
-59
-91

query I rowsort
SELECT col0 * col0 + + col1 * + col0 + + col0 AS col2 FROM tab2 AS cor0
----
10764
273
7663

query I rowsort
SELECT - col0 + + col0 * + 48 AS col2 FROM tab0 cor0
----
1128
1645
4183

query I rowsort
SELECT - + col2 * - 32 + + col0 AS col0 FROM tab2 AS cor0
----
1295
871
910

onlyif mysql # use DIV operator for integer division
query I rowsort label-2069
SELECT - col0 + col2 DIV col0 + + col0 AS col0 FROM tab2 AS cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-2069
SELECT - col0 + col2 / col0 + + col0 AS col0 FROM tab2 AS cor0
----
0
0
3

query I rowsort
SELECT col2 * + col2 * col2 AS col1 FROM tab0
----
1
35937
551368

query I rowsort
SELECT DISTINCT col2 + 21 * - col0 FROM tab1 AS cor0
----
-1287
-1584
-9

query I rowsort
SELECT ALL - - col1 * + col1 * + col2 + col0 AS col2 FROM tab0 AS cor0
----
244092
679131
9444

query I rowsort
SELECT - col0 * col0 + - col0 * col2 FROM tab2 AS cor0
----
-238
-8112
-9243

onlyif mysql # use DIV operator for integer division
query I rowsort label-2074
SELECT cor0.col0 DIV + 68 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 43a387ef4ba85927dc3d9d573afc12c9

skipif mysql # not compatible
query I rowsort label-2074
SELECT cor0.col0 / + 68 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 43a387ef4ba85927dc3d9d573afc12c9

onlyif mysql # use DIV operator for integer division
query I rowsort label-2075
SELECT ALL 84 DIV - col2 FROM tab1
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-2075
SELECT ALL 84 / - col2 FROM tab1
----
-1
-1
0

query I rowsort
SELECT DISTINCT 25 AS col0 FROM tab1 AS cor0
----
25

query I rowsort
SELECT ALL + + col1 * + cor0.col1 AS col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL + - col2 * + col1 + + col2 AS col1 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT 73 + + 49 AS col0 FROM tab1 cor0
----
122
122
122

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 89 col2 FROM tab0 AS cor0
----
89
89
89

query I rowsort
SELECT DISTINCT + + col0 - col0 AS col0 FROM tab0 cor0
----
0

query I rowsort
SELECT + + cor0.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 + - 71 * col1 + ( 18 ) col2 FROM tab2 AS cor0
----
-1189
-2183
-4171

query I rowsort
SELECT col0 + col2 + ( + cor0.col0 ) * col2 AS col1 FROM tab1 cor0
----
219
3769
7856

query I rowsort
SELECT ALL - - 81 * col1 + - col0 FROM tab1 AS cor0
----
2103
746
973

query I rowsort
SELECT - + ( col2 ) * + 76 AS col2 FROM tab2 AS cor0
----
-1976
-2052
-2888

query I rowsort
SELECT DISTINCT + 23 AS col0 FROM tab1 cor0
----
23

query I rowsort
SELECT - 52 * col2 - - col0 * col1 AS col2 FROM tab0 AS cor0
----
3343
348
3835

query I rowsort
SELECT ALL + ( col0 ) * + col2 AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - - col1 - + col2 FROM tab1 cor0
----
-28
-47
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-2091
SELECT col1 + col1 DIV col0 + cor0.col2 FROM tab1 AS cor0
----
109
67
88

skipif mysql # not compatible
query I rowsort label-2091
SELECT col1 + col1 / col0 + cor0.col2 FROM tab1 AS cor0
----
109
67
88

query I rowsort
SELECT ALL col1 - + 74 * - col1 FROM tab2
----
1275
2325
4425

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + + col0 * col0 col0 FROM tab2 AS cor0
----
42
6006
6162

query I rowsort
SELECT - 99 * + col1 + + col1 AS col0 FROM tab1 cor0
----
-1274
-2548
-980

query I rowsort
SELECT ALL + - col1 * cor0.col2 + - col2 * - col2 FROM tab1 AS cor0
----
1512
2679
7968

query I rowsort
SELECT + cor0.col0 - col1 AS col0 FROM tab1 AS cor0
----
-23
54
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-2097
SELECT DISTINCT + cor0.col2 + 2 + + col1 DIV - col1 FROM tab2 AS cor0
----
27
28
39

skipif mysql # not compatible
query I rowsort label-2097
SELECT DISTINCT + cor0.col2 + 2 + + col1 / - col1 FROM tab2 AS cor0
----
27
28
39

query I rowsort
SELECT ALL - col2 + - 46 - + cor0.col2 AS col1 FROM tab1 AS cor0
----
-154
-160
-238

query I rowsort
SELECT - - col0 + + ( col2 ) AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - col1 * col2 - + col0 FROM tab0 AS cor0
----
-132
-2862
-7551

query I rowsort
SELECT - col1 * + col2 + + cor0.col2 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT ALL col2 * + 23 FROM tab0 AS cor0
----
1886
23
759

query I rowsort
SELECT ALL - col1 * ( col0 ) + cor0.col0 AS col2 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT cor0.col2 * 52 FROM tab0 AS cor0
----
1716
4264
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 - 34 col2 FROM tab1 AS cor0
----
-130
-88
-91

query I rowsort
SELECT DISTINCT - cor0.col1 + + 75 AS col0 FROM tab1 AS cor0
----
49
62
65

query I rowsort
SELECT - ( + cor0.col1 ) AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2108
SELECT ALL + CAST( cor0.col2 AS SIGNED ) + col2 AS col2 FROM tab0 cor0
----
164
2
66

skipif mysql # not compatible
query I rowsort label-2108
SELECT ALL + CAST ( cor0.col2 AS INTEGER ) + col2 AS col2 FROM tab0 cor0
----
164
2
66

query I rowsort
SELECT DISTINCT - + 50 * - cor0.col2 + cor0.col2 * - 53 * - col0 FROM tab1 AS cor0
----
11286
196194
411840

query I rowsort
SELECT DISTINCT + tab1.col1 * - 53 AS col1 FROM tab1
----
-1378
-530
-689

query I rowsort
SELECT - 84 + + cor0.col0 AS col1 FROM tab0 AS cor0
----
-49
-60
5

query I rowsort
SELECT DISTINCT + + 97 * - 64 * col0 FROM tab0 AS cor0
----
-148992
-217280
-552512

query I rowsort
SELECT DISTINCT col2 * col2 - - col1 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT - col0 * - col2 + + col2 FROM tab2
----
2054
216
3040

query I rowsort
SELECT ALL 8 - cor1.col0 * cor0.col2 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 0cca8d9f4e4e01468c6c66ce9f277be5

query I rowsort
SELECT DISTINCT col0 * - col0 + - 69 FROM tab2
----
-118
-6153
-6310

onlyif mysql # use DIV operator for integer division
query I rowsort label-2117
SELECT - col1 + + col1 DIV col1 AS col0 FROM tab0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-2117
SELECT - col1 + + col1 / col1 AS col0 FROM tab0
----
-85
-90
-96

query I rowsort
SELECT ALL col2 * - 66 FROM tab2
----
-1716
-1782
-2508

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2119
SELECT ALL + - CAST( 28 AS SIGNED ) * - cor0.col2 FROM tab2 AS cor0
----
1064
728
756

skipif mysql # not compatible
query I rowsort label-2119
SELECT ALL + - CAST ( 28 AS INTEGER ) * - cor0.col2 FROM tab2 AS cor0
----
1064
728
756

query I rowsort
SELECT ALL - + ( col2 ) - col0 AS col0 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT ( + col0 ) * col2 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT ALL col0 + + col2 * - 54 AS col1 FROM tab2
----
-1326
-1451
-1973

query I rowsort
SELECT cor1.col1 AS col0 FROM tab1, tab1 AS cor0, tab2 AS cor1, tab0, tab0 AS cor2
----
243 values hashing to 42b04a30acb32fcd35bf97afdee87fe6

onlyif mysql # use DIV operator for integer division
query I rowsort label-2124
SELECT DISTINCT + + cor0.col1 DIV + col0 + - ( 72 ) * col1 FROM tab2 AS cor0
----
-1224
-2228
-4248

skipif mysql # not compatible
query I rowsort label-2124
SELECT DISTINCT + + cor0.col1 / + col0 + - ( 72 ) * col1 FROM tab2 AS cor0
----
-1224
-2228
-4248

query I rowsort
SELECT + col2 + + 37 FROM tab1 AS cor0
----
133
91
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 72 col2 FROM tab2, tab1 AS cor0
----
-72

query I rowsort
SELECT DISTINCT + col0 * col1 + col1 + col2 FROM tab1 AS cor0
----
1149
158
707

query I rowsort
SELECT col1 + + cor0.col2 + 79 AS col0 FROM tab2 AS cor0
----
134
137
164

query I rowsort
SELECT cor0.col2 * + 9 FROM tab1, tab2 AS cor0
----
9 values hashing to 1d41d99e119d8eabda922c878beceb49

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 cor0, tab2 cor1, tab2, tab0 AS cor2
----
3645 values hashing to 40e4acd618698dd2305f1f7b8b547f7a

onlyif mysql # use DIV operator for integer division
query I rowsort label-2131
SELECT ALL - + col1 DIV 61 col1 FROM tab2 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2131
SELECT ALL - + col1 / 61 col1 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col2 + ( col0 ) * col2 * ( col2 ) FROM tab1 AS cor0
----
207993
737376
8802

query I rowsort
SELECT + col0 + col2 + + col1 FROM tab2 AS cor0
----
134
163
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 43 * - col2 + 42 * col2 col0 FROM tab1 AS cor0
----
4590
4845
8160

query I rowsort
SELECT col2 * col1 * + ( - col1 ) + + col2 FROM tab2 AS cor0
----
-10944
-25920
-90480

onlyif mysql # use DIV operator for integer division
query I rowsort label-2136
SELECT + 88 DIV + col1 + - ( cor0.col2 ) col0 FROM tab1 AS cor0
----
-49
-51
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2136
SELECT + 88 / + col1 + - ( cor0.col2 ) col0 FROM tab1 AS cor0
----
-49
-51
-90

onlyif mysql # use DIV operator for integer division
query I rowsort label-2137
SELECT - col2 DIV + ( + col2 + + col0 ) AS col2 FROM tab2 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2137
SELECT - col2 / + ( + col2 + + col0 ) AS col2 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT - col0 * + col2 * + col2 AS col2 FROM tab1 AS cor0
----
-207936
-737280
-8748

query I rowsort
SELECT 41 AS col2 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 5b18986bb294412b3d9f07b7e6fc821e

query I rowsort
SELECT - 4 + 66 AS col1 FROM tab1 AS cor0
----
62
62
62

query I rowsort
SELECT DISTINCT + - 86 * + col0 FROM tab0 cor0
----
-2064
-3010
-7654

onlyif mysql # use DIV operator for integer division
query I rowsort label-2142
SELECT + col2 DIV - col0 + col1 FROM tab1 AS cor0
----
10
12
8

skipif mysql # not compatible
query I rowsort label-2142
SELECT + col2 / - col0 + col1 FROM tab1 AS cor0
----
10
12
8

query I rowsort
SELECT 34 * - ( col2 * - cor0.col1 ) AS col0 FROM tab2 AS cor0
----
21964
28458
52156

query I rowsort
SELECT - ( col1 ) + cor0.col0 FROM tab2 cor0
----
-24
19
62

query I rowsort
SELECT + col1 * col1 + - col0 FROM tab1 cor0
----
36
673
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2146
SELECT - 83 + col2 / + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2146
SELECT - 83 + col2 / + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col2 + - cor0.col1 AS col0 FROM tab1 cor0
----
28
47
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-2148
SELECT DISTINCT - col2 DIV - cor0.col1 - + col1 AS col1 FROM tab2 AS cor0
----
-15
-31
-59

skipif mysql # not compatible
query I rowsort label-2148
SELECT DISTINCT - col2 / - cor0.col1 - + col1 AS col1 FROM tab2 AS cor0
----
-15
-31
-59

query I rowsort
SELECT - - col1 * + col0 + col2 AS col2 FROM tab1 cor0
----
1136
132
697

query I rowsort
SELECT DISTINCT - - col0 * + col0 + col1 AS col1 FROM tab0 cor0
----
1322
662
8012

query I rowsort
SELECT ALL + tab2.col1 * col0 - col0 * - 37 * col2 AS col2 FROM tab2
----
112417
7210
79638

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col2 FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
-54
-57
-96

query I rowsort
SELECT DISTINCT - ( col2 + col1 ) AS col1 FROM tab1
----
-109
-67
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2154
SELECT CAST( NULL AS SIGNED ) * 35 AS col2 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-2154
SELECT CAST ( NULL AS INTEGER ) * 35 AS col2 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT + tab0.col1 * - col0 - - ( - col1 ) FROM tab0
----
-2150
-3492
-8190

query I rowsort
SELECT - 21 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to cdcb40c9e1bb9a33ce9167a0d2bac0b1

query I rowsort
SELECT DISTINCT + col0 + col2 * 60 FROM tab2
----
1627
1638
2359

query I rowsort
SELECT - + cor0.col0 + - col2 * col2 + col0 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL + tab1.col0 * + ( + col2 ) AS col0 FROM tab1
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-2160
SELECT DISTINCT - col2 DIV ( col1 ) FROM tab1
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-2160
SELECT DISTINCT - col2 / ( col1 ) FROM tab1
----
-2
-5
-7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2161
SELECT - CAST( NULL AS SIGNED ) * 7 + col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2161
SELECT - CAST ( NULL AS INTEGER ) * 7 + col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - ( - col0 ) + + col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT - col1 + + 60 * - col0 FROM tab0 cor0
----
-1526
-2197
-5431

query I rowsort
SELECT 10 * ( - col2 ) + col0 FROM tab1 cor0
----
-506
-537
-880

onlyif mysql # use DIV operator for integer division
query I rowsort label-2165
SELECT ALL + + col2 DIV col0 AS col2 FROM tab2 AS cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-2165
SELECT ALL + + col2 / col0 AS col2 FROM tab2 AS cor0
----
0
0
3

query I rowsort
SELECT 93 + + col2 AS col0 FROM tab0
----
126
175
94

query I rowsort
SELECT DISTINCT + + cor0.col1 * + col1 * + col0 AS col1 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT + + col1 * + col2 AS col2 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT ( - col0 ) - col0 FROM tab0
----
-178
-48
-70

query I rowsort
SELECT DISTINCT col2 + col2 * - col0 AS col0 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT DISTINCT + col1 * + tab2.col0 + - col0 + + col1 * col0 FROM tab2
----
2607
427
9126

query I rowsort
SELECT DISTINCT col2 + tab2.col0 * + col0 FROM tab2
----
6110
6279
76

query I rowsort
SELECT DISTINCT - col0 + col1 * col0 + + col1 * col0 AS col1 FROM tab1
----
1216
153
2000

query I rowsort
SELECT + 14 + col1 AS col2 FROM tab0
----
100
105
111

query I rowsort
SELECT ALL 22 + + col0 * - col1 FROM tab0
----
-2042
-3373
-8077

query I rowsort
SELECT DISTINCT + col1 * - ( + col2 * - col0 ) + col0 FROM tab1
----
36544
4215
99920

query I rowsort
SELECT DISTINCT + 41 + col2 * tab1.col1 AS col2 FROM tab1
----
1289
1445
611

query I rowsort
SELECT 60 - - col2 AS col1 FROM tab0
----
142
61
93

query I rowsort
SELECT DISTINCT ( 64 ) + col0 AS col2 FROM tab2 AS cor0
----
142
143
71

query I rowsort
SELECT DISTINCT + ( + ( col2 ) ) + col2 + - col2 FROM tab1
----
54
57
96

query I rowsort
SELECT - + 30 * cor0.col1 + + col2 * - col1 * col1 FROM tab0 AS cor0
----
-12319
-246648
-681772

query I rowsort
SELECT DISTINCT - col1 * col0 * - col1 AS col1 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT + - 65 + col2 * col0 AS col2 FROM tab1 AS cor0
----
3583
7615
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 * + col2 + - col0 col2 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT - + 56 * + col2 FROM tab0 AS cor0
----
-1848
-4592
-56

query I rowsort
SELECT ALL - + ( - cor0.col0 ) AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT 38 * col2 + + col0 + cor0.col2 * col1 * + col1 FROM tab2 AS cor0
----
12505
26980
91572

query I rowsort
SELECT + 74 + + col2 FROM tab2 AS cor0
----
100
101
112

query I rowsort
SELECT 81 - - col2 AS col2 FROM tab2
----
107
108
119

onlyif mysql # use DIV operator for integer division
query I rowsort label-2190
SELECT DISTINCT + + col0 DIV - col1 AS col1 FROM tab1 AS cor0
----
-6
0

skipif mysql # not compatible
query I rowsort label-2190
SELECT DISTINCT + + col0 / - col1 AS col1 FROM tab1 AS cor0
----
-6
0

query I rowsort
SELECT col2 * col1 + - col0 AS col2 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT - col1 AS col1 FROM tab2 AS cor0 WHERE NULL > NULL
----

query I rowsort
SELECT DISTINCT col1 FROM tab2 WHERE NOT - col0 NOT BETWEEN ( col2 ) AND col2 + col2
----

query I rowsort
SELECT col0 * - col1 * col1 + + cor0.col2 FROM tab1 cor0
----
-13424
-1974
-6343

query I rowsort
SELECT + col1 + + col1 * + col1 AS col0 FROM tab0 AS cor0 WHERE NOT ( - col2 * - col0 - - col2 ) IN ( col1 / col2 )
----
7482
8372
9506

query I rowsort
SELECT col0 * col1 * - cor0.col1 + + col1 * col1 FROM tab2 AS cor0
----
-22542
-268037
-5766

query I rowsort
SELECT col2 * + col0 + + col0 AS col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT DISTINCT col2 + - cor0.col2 * col1 * cor0.col1 AS col1 FROM tab2 AS cor0
----
-10944
-25920
-90480

query I rowsort
SELECT col0 * col2 AS col1 FROM tab0 WHERE col1 * + col1 + - col2 < ( col1 )
----

query I rowsort
SELECT ALL col2 AS col0 FROM tab0 WHERE NOT NULL NOT IN ( col1 )
----

query I rowsort
SELECT DISTINCT col2 * + col2 * + tab2.col0 FROM tab2
----
114076
5103
52728

query III rowsort
SELECT ALL * FROM tab2 WHERE NULL IN ( - col1 * col2 * col1 )
----

query I rowsort
SELECT ALL col0 * col1 - + tab2.col0 AS col2 FROM tab2
----
1264
210
4524

query I rowsort
SELECT ALL - col1 FROM tab0 WHERE NOT ( NULL ) NOT BETWEEN ( NULL ) AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * col1 * col1 col0 FROM tab2
----
205379
29791
4913

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - col2 + + col2 col0 FROM tab1
----
216
3705
7776

query I rowsort
SELECT ALL - col2 * - col0 - - tab1.col0 FROM tab1
----
165
3712
7760

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT + col0 / col2 < NULL
----

query I rowsort
SELECT ALL - + cor0.col1 + + col2 AS col1 FROM tab1 AS cor0
----
28
47
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 - + col1 col0 FROM tab1 AS cor0
----
-23
54
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-2211
SELECT col0 DIV col2 - col0 * - col1 col1 FROM tab1 AS cor0
----
1040
641
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2211
SELECT col0 / col2 - col0 * - col1 col1 FROM tab1 AS cor0
----
1040
641
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-2212
SELECT DISTINCT + + col1 * col2 + - col2 DIV + col2 AS col2 FROM tab1 AS cor0
----
1247
1403
569

skipif mysql # not compatible
query I rowsort label-2212
SELECT DISTINCT + + col1 * col2 + - col2 / + col2 AS col2 FROM tab1 AS cor0
----
1247
1403
569

query I rowsort
SELECT + col1 + + cor0.col2 AS col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT tab2.col2 * - tab2.col0 + + col2 * col2 FROM tab2
----
-1352
-1558
540

query I rowsort
SELECT + col1 + - col1 FROM tab2 WHERE NULL NOT BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT - + col0 * + cor0.col1 - col1 FROM tab2 AS cor0
----
-1360
-248
-4661

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2217
SELECT ALL - CAST( col0 AS SIGNED ) * col1 FROM tab1 cor0
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-2217
SELECT ALL - CAST ( col0 AS INTEGER ) * col1 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL ( 22 ) + + col2 * - col2 FROM tab0 AS cor0
----
-1067
-6702
21

query I rowsort
SELECT + col0 + + col0 * + cor0.col0 + col1 * - 47 FROM tab1 AS cor0
----
-1210
3690
5869

query I rowsort
SELECT col1 * - ( col0 ) FROM tab0
----
-2064
-3395
-8099

query IIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2, tab1 AS cor0 WHERE NULL IN ( tab0.col2 )
----

query I rowsort
SELECT ALL + tab1.col1 * + 30 - + ( col1 ) * col2 FROM tab1
----
-270
-624
-858

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2223
SELECT CAST( col1 AS SIGNED ) * - col1 - 83 FROM tab0
----
-7479
-8364
-9492

skipif mysql # not compatible
query I rowsort label-2223
SELECT CAST ( col1 AS INTEGER ) * - col1 - 83 FROM tab0
----
-7479
-8364
-9492

query I rowsort
SELECT col0 * + col0 - tab1.col0 FROM tab1
----
4032
6
6320

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2225
SELECT - CAST( + col2 AS SIGNED ) + + cor0.col2 + - 42 AS col2 FROM tab2 AS cor0
----
-42
-42
-42

skipif mysql # not compatible
query I rowsort label-2225
SELECT - CAST ( + col2 AS INTEGER ) + + cor0.col2 + - 42 AS col2 FROM tab2 AS cor0
----
-42
-42
-42

query I rowsort
SELECT + 76 + ( + col2 ) + 22 FROM tab0 AS cor0
----
131
180
99

query I rowsort
SELECT ALL + col0 * - col2 + col2 FROM tab0 AS cor0
----
-34
-7216
-759

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 * 21 * col0 + + col1 * col2 + - col1 col2 FROM tab2 AS cor0
----
44063
4775
63671

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2229
SELECT DISTINCT + - CAST( NULL AS SIGNED ) col2 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2229
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - + ( col0 ) + col1 AS col2 FROM tab2 AS cor0
----
-19
-62
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-2231
SELECT DISTINCT tab2.col1 DIV + 19 AS col1 FROM tab2, tab2 AS cor0
----
0
1
3

skipif mysql # not compatible
query I rowsort label-2231
SELECT DISTINCT tab2.col1 / + 19 AS col1 FROM tab2, tab2 AS cor0
----
0
1
3

query I rowsort
SELECT + - 66 AS col2 FROM tab2 AS cor0
----
-66
-66
-66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2233
SELECT + + ( col0 ) / + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2233
SELECT + + ( col0 ) / + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 + + col2 + 22 FROM tab0 AS cor0
----
120
141
195

query I rowsort
SELECT - col1 * 8 + + 64 FROM tab1 AS cor0
----
-144
-16
-40

query I rowsort
SELECT col0 + col0 + ( + col0 ) * + col1 AS col2 FROM tab0 cor0
----
2112
3465
8277

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + col2 + col1 * - col2 col1 FROM tab0 cor0
----
-2719
-7289
1

query I rowsort
SELECT - col2 * col2 + - ( + 53 ) + col2 FROM tab1
----
-2915
-3245
-9173

query I rowsort
SELECT + 5 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 6035628694bdea36f584f3649088551d

onlyif mysql # use DIV operator for integer division
query I rowsort label-2240
SELECT + col1 DIV col1 - + col0 * - col0 * + 63 FROM tab0 cor0
----
36289
499024
77176

skipif mysql # not compatible
query I rowsort label-2240
SELECT + col1 / col1 - + col0 * - col0 * + 63 FROM tab0 cor0
----
36289
499024
77176

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2241
SELECT + col0 - CAST( NULL AS SIGNED ) * col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2241
SELECT + col0 - CAST ( NULL AS INTEGER ) * col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + cor0.col2 * + 8 FROM tab1 AS cor0
----
432
456
768

query I rowsort
SELECT DISTINCT 0 AS col2 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
0

query I rowsort
SELECT - col2 + + 9 AS col1 FROM tab2 cor0
----
-17
-18
-29

query I rowsort
SELECT DISTINCT col2 - - 56 AS col0 FROM tab2 AS cor0
----
82
83
94

query I rowsort
SELECT ALL cor0.col0 + - ( ( col1 ) ) AS col0 FROM tab2 AS cor0
----
-24
19
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-2247
SELECT DISTINCT + + col1 * col1 + col2 DIV - col0 AS col1 FROM tab1 cor0
----
100
168
658

skipif mysql # not compatible
query I rowsort label-2247
SELECT DISTINCT + + col1 * col1 + col2 / - col0 AS col1 FROM tab1 cor0
----
100
168
658

query I rowsort
SELECT ALL col2 + 86 FROM tab2 AS cor0
----
112
113
124

query I rowsort
SELECT + col0 * - 17 FROM tab1 AS cor0
----
-1088
-1360
-51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 62 col0 FROM tab2 cor0
----
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 32 + - col0 + + col1 col2 FROM tab1 cor0
----
-22
-35
55

onlyif mysql # use DIV operator for integer division
query I rowsort label-2252
SELECT DISTINCT + cor0.col2 DIV - cor0.col2 FROM tab0 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-2252
SELECT DISTINCT + cor0.col2 / - cor0.col2 FROM tab0 AS cor0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 + col1 * col0 col1 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT col0 + - col0 * - col2 - cor0.col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT ( - 3 ) * - col1 * + col1 + cor0.col1 AS col0 FROM tab2 AS cor0
----
10502
2914
884

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( + col1 ) + col2 col1 FROM tab1 AS cor0
----
28
47
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-2257
SELECT ALL + - 43 + - col0 * + col1 + cor0.col1 * - col1 DIV col1 FROM tab1 cor0
----
-1096
-147
-693

skipif mysql # not compatible
query I rowsort label-2257
SELECT ALL + - 43 + - col0 * + col1 + cor0.col1 * - col1 / col1 FROM tab1 cor0
----
-1096
-147
-693

query I rowsort
SELECT - ( cor0.col2 ) + + cor0.col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT col2 * + col1 + - col1 * tab2.col0 - + col1 AS col1 FROM tab2
----
-3127
-714
589

query I rowsort
SELECT DISTINCT col2 - + 23 AS col0 FROM tab0
----
-22
10
59

query I rowsort
SELECT DISTINCT col2 - - ( col0 ) * col0 AS col2 FROM tab1
----
4153
63
6496

query I rowsort
SELECT ALL - + 16 * col0 FROM tab0 AS cor0
----
-1424
-384
-560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 30 col1 FROM tab1 AS cor0
----
-30
-30
-30

query I rowsort
SELECT ALL + col0 - - col0 * col1 AS col2 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT - 18 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 09afafec657a5e9f082beb6a16ec85de

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2266
SELECT - col1 * - col0 * CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2266
SELECT - col1 * - col0 * CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query IIIIIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab1, tab0 cor2
----
13122 values hashing to cb0d0b45cac352832552dd8a9bab68f0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 37 + + col0 col1 FROM tab2 AS cor0
----
-30
41
42

query I rowsort
SELECT col2 + col0 * ( col1 + col2 * - col2 ) AS col1 FROM tab2
----
-112695
-48100
-4859

query I rowsort
SELECT ALL + col2 * cor0.col2 * 37 - col1 * col2 FROM tab1 AS cor0
----
106488
119643
339744

query I rowsort
SELECT ALL 91 - cor0.col2 * + col0 FROM tab0 AS cor0
----
-701
-7207
56

query I rowsort
SELECT ALL - cor0.col1 + col1 * col1 FROM tab1 AS cor0
----
156
650
90

query I rowsort
SELECT ( 77 ) AS col2 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to d7b027bca5d37c67e29013904def8125

onlyif mysql # use DIV operator for integer division
query I rowsort label-2274
SELECT DISTINCT + + 10 DIV - col2 AS col0 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-2274
SELECT DISTINCT + + 10 / - col2 AS col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT - ( col1 ) + + col0 AS col2 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT + - col2 + col1 + - 24 FROM tab1 AS cor0
----
-107
-52
-71

query I rowsort
SELECT + 35 + col2 * col1 * col1 FROM tab1 AS cor0
----
16259
36539
5735

query I rowsort
SELECT DISTINCT 26 * - col1 * col0 + 96 FROM tab0 AS cor0
----
-210478
-53568
-88174

query I rowsort
SELECT ALL cor0.col0 + - 90 FROM tab0, tab1 AS cor0
----
9 values hashing to f0a0efeb336385fda7b65df1e5a32f09

query I rowsort
SELECT ALL + tab0.col1 * tab0.col2 + + col2 FROM tab0
----
2871
7544
98

query I rowsort
SELECT ALL ( col0 ) * - ( + 28 ) * col1 FROM tab2
----
-128856
-37604
-6076

query I rowsort
SELECT + 3 - 85 FROM tab2, tab2 AS cor0, tab2 cor1
----
27 values hashing to ce62f59690969f4492d78eb57c3181f0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + tab2.col2 col2 FROM tab2
----
55
58
85

query I rowsort
SELECT - ( tab0.col2 ) FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT - ( 61 ) FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to c91d7b51e91f33d302e697913fb438b6

query I rowsort
SELECT tab2.col1 + - tab2.col1 * + 49 AS col2 FROM tab2
----
-1488
-2832
-816

query I rowsort
SELECT ALL - 56 AS col1 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to a228dfb9ede9780b082a5a3dfb2fca80

query I rowsort
SELECT DISTINCT col1 - + col0 * col0 AS col2 FROM tab2
----
-18
-6025
-6224

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 - - col0 col1 FROM tab0
----
178
48
70

query I rowsort
SELECT ALL - ( - 39 ) * col1 + 27 * + 35 FROM tab0 AS cor0
----
4299
4494
4728

query I rowsort
SELECT DISTINCT + 64 + - col2 AS col1 FROM tab0 AS cor0
----
-18
31
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 - - col0 col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT 71 + - col2 * col1 * col2 + 87 FROM tab0 AS cor0
----
-611726
-93496
61

query I rowsort
SELECT ALL - col1 * + col0 * col1 AS col2 FROM tab2 AS cor0
----
-22831
-271518
-6727

onlyif mysql # use DIV operator for integer division
query I rowsort label-2295
SELECT col2 * ( + col1 ) DIV col1 + ( 3 ) FROM tab2
----
29
30
41

skipif mysql # not compatible
query I rowsort label-2295
SELECT col2 * ( + col1 ) / col1 + ( 3 ) FROM tab2
----
29
30
41

query I rowsort
SELECT + - tab0.col0 + - ( 28 ) FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 5b8f45d11aebf745652bd0c1c2679a21

query I rowsort
SELECT - col1 + ( col2 ) + tab2.col2 AS col2 FROM tab2
----
-7
23
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-2298
SELECT ALL + col2 + - ( col1 ) - col2 DIV - ( + col2 ) FROM tab0
----
-52
-8
-95

skipif mysql # not compatible
query I rowsort label-2298
SELECT ALL + col2 + - ( col1 ) - col2 / - ( + col2 ) FROM tab0
----
-52
-8
-95

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col1 AS REAL ) * col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL + 13 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 184e52d7aa5aa66591291e39c67a3dfb

query I rowsort
SELECT DISTINCT - col2 + - 70 AS col0 FROM tab1 AS cor0
----
-124
-127
-166

query I rowsort
SELECT DISTINCT - + ( + col2 ) + - col2 * - col1 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT + - ( col0 ) + col2 * col2 AS col0 FROM tab1 AS cor0
----
2913
3185
9136

query I rowsort
SELECT ALL - - 86 * + col0 FROM tab0 AS cor0
----
2064
3010
7654

query I rowsort
SELECT col2 * + 26 + + col0 AS col0 FROM tab1 AS cor0
----
1407
1546
2576

query I rowsort
SELECT DISTINCT + 25 + col0 * + col0 FROM tab2 AS cor0
----
6109
6266
74

query I rowsort
SELECT col2 * - 76 FROM tab0 AS cor0
----
-2508
-6232
-76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2308
SELECT ALL + CAST( - 73 AS SIGNED ) + col1 AS col1 FROM tab1 cor0
----
-47
-60
-63

skipif mysql # not compatible
query I rowsort label-2308
SELECT ALL + CAST ( - 73 AS INTEGER ) + col1 AS col1 FROM tab1 cor0
----
-47
-60
-63

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2309
SELECT CAST( NULL AS SIGNED ) - + cor0.col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2309
SELECT CAST ( NULL AS INTEGER ) - + cor0.col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2310
SELECT + ( - col0 ) DIV col1 col0 FROM tab2
----
-1
-4
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2310
SELECT + ( - col0 ) / col1 col0 FROM tab2
----
-1
-4
0

query I rowsort
SELECT - 50 FROM tab1, tab2 cor0
----
9 values hashing to c7432a968c8352c12996dfa54dd4b9e8

onlyif mysql # use DIV operator for integer division
query I rowsort label-2312
SELECT ALL 87 + + col2 DIV col2 FROM tab0
----
88
88
88

skipif mysql # not compatible
query I rowsort label-2312
SELECT ALL 87 + + col2 / col2 FROM tab0
----
88
88
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 72 col2 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 92cc3d5daa550304e96c1542787691c7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ( tab2.col1 + + col1 ) * CAST ( 92 * col1 AS REAL ) col0 FROM tab2
----
176824
53176
640504

onlyif mysql # use DIV operator for integer division
query I rowsort label-2315
SELECT col1 DIV 37 FROM tab0
----
2
2
2

skipif mysql # not compatible
query I rowsort label-2315
SELECT col1 / 37 FROM tab0
----
2
2
2

query I rowsort
SELECT - ( 64 ) * tab0.col1 * col2 FROM tab0
----
-181632
-477568
-6208

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2317
SELECT ( col1 ) * - cor0.col0 + - ( + col1 * CAST( NULL AS SIGNED ) ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2317
SELECT ( col1 ) * - cor0.col0 + - ( + col1 * CAST ( NULL AS INTEGER ) ) FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2318
SELECT DISTINCT + col2 DIV - cor0.col0 AS col1 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-2318
SELECT DISTINCT + col2 / - cor0.col0 AS col1 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT - col2 + + col1 * col2 FROM tab0 AS cor0
----
2805
7380
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2320
SELECT + - col1 * - col1 DIV col1 + - col0 FROM tab2 AS cor0
----
-19
-62
24

skipif mysql # not compatible
query I rowsort label-2320
SELECT + - col1 * - col1 / col1 + - col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT - + ( cor0.col2 ) + - col0 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT - - col0 * col1 + 53 + 8 FROM tab0 AS cor0
----
2125
3456
8160

query I rowsort
SELECT - - cor0.col0 - col0 * - ( 48 + col1 ) AS col0 FROM tab2 AS cor0
----
5214
560
8424

query I rowsort
SELECT ALL + + col2 * + col1 + + col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT + col0 * 58 FROM tab0 cor0
----
1392
2030
5162

onlyif mysql # use DIV operator for integer division
query I rowsort label-2326
SELECT ALL + cor0.col2 DIV ( + 21 * - col2 ) + 37 AS col1 FROM tab0 AS cor0
----
37
37
37

skipif mysql # not compatible
query I rowsort label-2326
SELECT ALL + cor0.col2 / ( + 21 * - col2 ) + 37 AS col1 FROM tab0 AS cor0
----
37
37
37

query I rowsort
SELECT ALL - + col1 * - col0 + - 65 * col0 FROM tab0 AS cor0
----
1120
2314
504

query I rowsort
SELECT - + cor0.col2 * - 66 FROM tab2 AS cor0
----
1716
1782
2508

query I rowsort
SELECT - - col1 * - ( - col1 ) AS col1 FROM tab1 cor0
----
100
169
676

query I rowsort
SELECT ALL - - col2 + ( col1 ) AS col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT - + col1 * col2 - + col1 * - col0 AS col2 FROM tab2 AS cor0
----
-620
3068
697

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0, tab2 cor1, tab2 cor2
----
972 values hashing to f9adf26f20dc8fcc43c2de18a5fd4859

query I rowsort
SELECT + ( - ( - col1 ) ) AS col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL 91 AS col2 FROM tab1, tab2 cor0
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

query I rowsort
SELECT + tab2.col2 + - col0 * - col1 * col1 AS col0 FROM tab2
----
22869
271544
6754

query I rowsort
SELECT tab2.col2 + 55 FROM tab2
----
81
82
93

query I rowsort
SELECT col2 * - 66 FROM tab1 cor0
----
-3564
-3762
-6336

query I rowsort
SELECT DISTINCT cor0.col2 * col1 + cor0.col2 - - col2 * - 55 FROM tab2 AS cor0
----
-1406
-621
130

query I rowsort
SELECT ALL - + col1 + 9 AS col2 FROM tab1 AS cor0
----
-1
-17
-4

query I rowsort
SELECT - col1 + + tab2.col0 * + 10 FROM tab2
----
39
721
773

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor1.col2 col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT - col2 + - 54 FROM tab2 AS cor0
----
-80
-81
-92

query I rowsort
SELECT col1 * col1 * - col0 + col1 * + 3 * col1 FROM tab1 AS cor0
----
-13013
-6100
0

query I rowsort
SELECT - 80 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 4dde3bd5652d30396b9cadd0e2cfb680

query I rowsort
SELECT DISTINCT col0 - ( - tab0.col2 ) FROM tab0
----
171
36
57

query I rowsort
SELECT DISTINCT col2 * + col0 FROM tab1 WHERE NOT ( NULL ) NOT BETWEEN col0 + - col2 AND col2
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + + col0 * - col0 col0 FROM tab0
----
-1224
-543
-7839

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col1 + col2 * col0 * + col0 col0 FROM tab0
----
1322
19094
649613

query I rowsort
SELECT + col2 AS col1 FROM tab1 WHERE NOT col1 * + tab1.col1 * col1 NOT IN ( tab1.col2 )
----

query I rowsort
SELECT + tab1.col0 - + col1 AS col0 FROM tab1
----
-23
54
67

query I rowsort
SELECT DISTINCT + tab2.col2 + - tab2.col0 AS col0 FROM tab2
----
-41
-52
20

query I rowsort
SELECT col1 + - col0 * - tab1.col0 AS col0 FROM tab1
----
35
4106
6413

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2353
SELECT CAST( NULL AS SIGNED ) AS col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-2353
SELECT CAST ( NULL AS INTEGER ) AS col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT + col0 * - tab0.col1 * ( + col1 ) AS col0 FROM tab0
----
-177504
-329315
-737009

onlyif mysql # use DIV operator for integer division
query I rowsort label-2355
SELECT - cor1.col0 DIV 92 AS col2 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-2355
SELECT - cor1.col0 / 92 AS col2 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT DISTINCT - - col2 + col0 * + 51 AS col1 FROM tab1 AS cor0
----
207
3321
4176

query I rowsort
SELECT ALL - - 49 + col0 + - col0 FROM tab2 AS cor0
----
49
49
49

query I rowsort
SELECT ALL - 21 - - col2 AS col2 FROM tab2 AS cor0
----
17
5
6

query I rowsort
SELECT + + 57 FROM tab2 AS cor0
----
57
57
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * col1 col1 FROM tab2 cor0
----
-289
-3481
-961

onlyif mysql # use DIV operator for integer division
query I rowsort label-2361
SELECT col2 + ( + col0 ) DIV col0 AS col1 FROM tab2 cor0
----
27
28
39

skipif mysql # not compatible
query I rowsort label-2361
SELECT col2 + ( + col0 ) / col0 AS col1 FROM tab2 cor0
----
27
28
39

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2362
SELECT ALL col1 * - CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2362
SELECT ALL col1 * - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 + + ( - col1 ) FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + col1 * 67 AS col1 FROM tab2 AS cor0
----
1139
2077
3953

query I rowsort
SELECT - ( - cor1.col2 ) * + cor0.col1 + + 4 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 49a701845df1d768fbeda8bd796960d1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2366
SELECT + col2 DIV + col2 + + tab0.col2 * col2 * col1 FROM tab0
----
611885
93655
98

skipif mysql # not compatible
query I rowsort label-2366
SELECT + col2 / + col2 + + tab0.col2 * col2 * col1 FROM tab0
----
611885
93655
98

query I rowsort
SELECT DISTINCT col1 + 59 * col0 * - col2 AS col2 FROM tab0
----
-1968
-430491
-46642

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2368
SELECT DISTINCT cor0.col0 + 70 * + cor0.col0 / - CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2368
SELECT DISTINCT cor0.col0 + 70 * + cor0.col0 / - CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2369
SELECT + + CAST( NULL AS SIGNED ) * - col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2369
SELECT + + CAST ( NULL AS INTEGER ) * - col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( - 81 ) + cor0.col0 FROM tab1 AS cor0
----
-1
-17
-78

query I rowsort
SELECT ALL + col2 - cor0.col1 AS col1 FROM tab2 AS cor0
----
-33
-4
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - ( - col1 ) + - col2 col2 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT ALL - col2 * col0 + + col2 * 24 FROM tab1 AS cor0
----
-2280
-5376
1134

query I rowsort
SELECT + - col1 + col0 * + 70 FROM tab0 cor0
----
1594
2353
6139

query I rowsort
SELECT ALL - cor0.col1 + cor0.col0 AS col2 FROM tab2 cor0
----
-24
19
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-2376
SELECT + col1 * + col0 DIV + ( + col0 ) FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-2376
SELECT + col1 * + col0 / + ( + col0 ) FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - + cor0.col2 AS col0 FROM tab2, tab1, tab1 cor0
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query I rowsort
SELECT DISTINCT col1 + - 69 AS col0 FROM tab2
----
-10
-38
-52

query I rowsort
SELECT DISTINCT - 81 + - col0 FROM tab0
----
-105
-116
-170

query I rowsort
SELECT col0 * col2 - col1 * + col2 AS col2 FROM tab2
----
-648
2356
494

query I rowsort
SELECT ALL - tab2.col1 * 5 AS col0 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to b35215223f38790ea770792a85318500

query I rowsort
SELECT ALL + col2 + 94 * col0 FROM tab1
----
336
6073
7616

query I rowsort
SELECT col2 * + col1 * col0 AS col0 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT ALL + col1 + + col0 * col0 AS col2 FROM tab2
----
6143
6258
80

query I rowsort
SELECT col2 * + col1 - + col1 AS col2 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT DISTINCT cor0.col1 + 27 AS col2 FROM tab0 AS cor0
----
113
118
124

query I rowsort
SELECT - col1 - ( cor0.col2 ) AS col0 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT DISTINCT + col0 + + col1 + cor0.col2 FROM tab2 AS cor0
----
134
163
65

query I rowsort
SELECT ALL - cor0.col1 * col0 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT col1 * 44 + + col1 * + col2 FROM tab1 AS cor0
----
1010
1820
2548

query I rowsort
SELECT ALL + cor0.col0 * + col1 AS col0 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT + cor0.col0 * col2 * cor0.col1 FROM tab0 AS cor0
----
3395
664118
68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-2393
SELECT col1 * 60 + 85 + + col2 DIV - 54 AS col2 FROM tab0 AS cor0
----
5245
5544
5905

skipif mysql # not compatible
query I rowsort label-2393
SELECT col1 * 60 + 85 + + col2 / - 54 AS col2 FROM tab0 AS cor0
----
5245
5544
5905

query I rowsort
SELECT ALL + cor0.col0 + cor0.col1 * ( - col1 + 17 ) AS col0 FROM tab0 AS cor0
----
-5910
-6645
-7725

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * 67 col0 FROM tab2 AS cor0
----
-1139
-2077
-3953

query I rowsort
SELECT + col0 + 75 * - col1 FROM tab0 AS cor0
----
-6426
-6736
-7240

query I rowsort
SELECT ALL + - col2 * + col2 * + 84 + - col0 FROM tab2 AS cor0
----
-121375
-56862
-61243

onlyif mysql # use DIV operator for integer division
query I rowsort label-2398
SELECT + - col0 + + 86 * col0 * - col0 + col2 DIV col2 FROM tab0 AS cor0
----
-105384
-49559
-681294

skipif mysql # not compatible
query I rowsort label-2398
SELECT + - col0 + + 86 * col0 * - col0 + col2 / col2 FROM tab0 AS cor0
----
-105384
-49559
-681294

query I rowsort
SELECT DISTINCT - + col2 * ( cor0.col0 * + col2 ) FROM tab0 cor0
----
-26136
-35
-598436

query I rowsort
SELECT DISTINCT + 51 + col1 * cor0.col0 + - 53 * 35 FROM tab0 AS cor0
----
1591
260
6295

query I rowsort
SELECT - 62 + 14 AS col0 FROM tab0 AS cor0
----
-48
-48
-48

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab1, tab1 cor1, tab0 AS cor2, tab0 AS cor3
----
3645 values hashing to 4037d65571c1bbf6e0e7d759f858120e

query I rowsort
SELECT ALL - col0 + + 94 FROM tab0
----
5
59
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-2404
SELECT - 96 + + col2 + col1 DIV ( col0 ) FROM tab2 AS cor0
----
-58
-65
-70

skipif mysql # not compatible
query I rowsort label-2404
SELECT - 96 + + col2 + col1 / ( col0 ) FROM tab2 AS cor0
----
-58
-65
-70

query I rowsort
SELECT ALL cor1.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab0 cor2
----
81 values hashing to c4e6b1f1d28e731664a15a6f7cda4da9

onlyif mysql # use DIV operator for integer division
query I rowsort label-2406
SELECT ALL - col2 DIV - col1 AS col0 FROM tab2 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-2406
SELECT ALL - col2 / - col1 AS col0 FROM tab2 AS cor0
----
0
0
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 85 * + col1 col1 FROM tab2 AS cor0
----
1445
2635
5015

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 * - cor0.col1 * col2 col1 FROM tab2 AS cor0
----
119652
51034
5859

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2409
SELECT ALL - + cor0.col2 * cor0.col2 - + CAST( col0 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-1523
-736
-754

skipif mysql # not compatible
query I rowsort label-2409
SELECT ALL - + cor0.col2 * cor0.col2 - + CAST ( col0 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-1523
-736
-754

query I rowsort
SELECT + 82 + col0 * ( 56 + - col2 * 78 ) FROM tab2 AS cor0
----
-14268
-153734
-229650

query I rowsort
SELECT ALL + + cor0.col0 + col0 * 94 FROM tab1 AS cor0
----
285
6080
7600

query I rowsort
SELECT - 69 + cor0.col0 AS col0 FROM tab2 cor0
----
-62
10
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-2413
SELECT DISTINCT 34 DIV + col1 AS col2 FROM tab1 cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-2413
SELECT DISTINCT 34 / + col1 AS col2 FROM tab1 cor0
----
1
2
3

query I rowsort
SELECT ALL + 55 + - cor0.col0 FROM tab2 AS cor0
----
-23
-24
48

query I rowsort
SELECT + + col2 * col0 - col2 AS col0 FROM tab0 AS cor0
----
34
7216
759

onlyif mysql # use DIV operator for integer division
query I rowsort label-2416
SELECT col1 + tab2.col2 DIV 57 AS col1 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-2416
SELECT col1 + tab2.col2 / 57 AS col1 FROM tab2
----
17
31
59

query I rowsort
SELECT DISTINCT - col1 + 44 FROM tab1
----
18
31
34

query I rowsort
SELECT DISTINCT 1 AS col0 FROM tab0, tab2 AS cor0
----
1

query I rowsort
SELECT - col1 * 98 AS col1 FROM tab2
----
-1666
-3038
-5782

query I rowsort
SELECT - - 93 + col1 AS col2 FROM tab1 AS cor0
----
103
106
119

query I rowsort
SELECT - ( - 32 ) + - col1 * - col2 + - 35 * - col0 AS col2 FROM tab0 AS cor0
----
10609
1354
3710

query I rowsort
SELECT ALL ( 3 ) * tab1.col1 * tab1.col1 AS col1 FROM tab1
----
2028
300
507

query I rowsort
SELECT ALL 80 - col0 AS col0 FROM tab0 AS cor0
----
-9
45
56

query I rowsort
SELECT DISTINCT - - col1 * + cor0.col2 + col0 AS col1 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT DISTINCT + col0 * - col1 + col2 AS col0 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT + + col2 * cor0.col2 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT - + col1 * col1 AS col2 FROM tab2 cor0
----
-289
-3481
-961

query I rowsort
SELECT + cor0.col2 * 52 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to e26cb9061eadbc87bf8e7d739b6a6b51

query I rowsort
SELECT - - cor0.col1 * + col1 AS col1 FROM tab0 cor0
----
7396
8281
9409

query I rowsort
SELECT ALL + col2 + - cor0.col1 * + ( col2 + col0 ) AS col1 FROM tab2 AS cor0
----
-1027
-1951
-6110

query I rowsort
SELECT col0 * 31 AS col2 FROM tab2 AS cor0
----
217
2418
2449

onlyif mysql # use DIV operator for integer division
query I rowsort label-2432
SELECT DISTINCT + + ( 35 ) * col1 + col2 DIV col2 FROM tab0 cor0
----
3011
3186
3396

skipif mysql # not compatible
query I rowsort label-2432
SELECT DISTINCT + + ( 35 ) * col1 + col2 / col2 FROM tab0 cor0
----
3011
3186
3396

onlyif mysql # use DIV operator for integer division
query I rowsort label-2433
SELECT DISTINCT - - col1 * - col0 + + col1 DIV - col2 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-2433
SELECT DISTINCT - - col1 * - col0 + + col1 / - col2 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT ( cor0.col2 ) + 81 AS col2 FROM tab0 AS cor0
----
114
163
82

query I rowsort
SELECT ALL + + col0 * + cor0.col2 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2436
SELECT - - cor0.col0 * - col0 + + CAST( NULL AS SIGNED ) * col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2436
SELECT - - cor0.col0 * - col0 + + CAST ( NULL AS INTEGER ) * col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 + - cor0.col1 * 57 AS col1 FROM tab2 cor0
----
-1760
-3285
-890

query I rowsort
SELECT DISTINCT - - 28 AS col0 FROM tab2, tab1, tab0 AS cor0, tab0
----
28

query I rowsort
SELECT ALL + 7 AS col1 FROM tab1
----
7
7
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + ( + 77 ) * + col0 col0 FROM tab2 AS cor0
----
570
6065
6100

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2441
SELECT - CAST( + col1 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-2441
SELECT - CAST ( + col1 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT + cor1.col2 FROM tab1, tab1 AS cor0, tab1 AS cor1, tab2, tab2 AS cor2
----
243 values hashing to 39c7e653e7a493eb9c9e3dad9ba3b8c2

query I rowsort
SELECT DISTINCT + + ( + 67 ) * + col1 AS col1 FROM tab1 AS cor0
----
1742
670
871

query I rowsort
SELECT ALL col0 * col2 + - col1 - col1 AS col2 FROM tab2 cor0
----
127
1910
2968

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col2 * + col0 * + col2 col2 FROM tab1
----
207936
737280
8748

onlyif mysql # use DIV operator for integer division
query I rowsort label-2446
SELECT ALL + 54 + + 47 DIV + col0 FROM tab1 AS cor0
----
54
54
69

skipif mysql # not compatible
query I rowsort label-2446
SELECT ALL + 54 + + 47 / + col0 FROM tab1 AS cor0
----
54
54
69

query I rowsort
SELECT ALL 14 * - col1 + col2 FROM tab1 AS cor0
----
-310
-83
-86

query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col2 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT - 40 * 9 FROM tab1 AS cor0
----
-360
-360
-360

query I rowsort
SELECT - col1 * tab2.col1 * - col0 AS col0 FROM tab2
----
22831
271518
6727

query I rowsort
SELECT col0 * col1 + - tab2.col1 FROM tab2
----
1326
186
4543

onlyif mysql # use DIV operator for integer division
query I rowsort label-2452
SELECT DISTINCT + tab0.col2 DIV - ( + col2 ) + + col2 + col1 AS col1 FROM tab0
----
118
172
97

skipif mysql # not compatible
query I rowsort label-2452
SELECT DISTINCT + tab0.col2 / - ( + col2 ) + + col2 + col1 AS col1 FROM tab0
----
118
172
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( col1 ) * col0 col2 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-2454
SELECT DISTINCT col2 + - cor0.col0 - + col1 DIV ( col1 ) AS col1 FROM tab2 AS cor0
----
-42
-53
19

skipif mysql # not compatible
query I rowsort label-2454
SELECT DISTINCT col2 + - cor0.col0 - + col1 / ( col1 ) AS col1 FROM tab2 AS cor0
----
-42
-53
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 49 + + 88 col1 FROM tab0 cor0
----
137

query I rowsort
SELECT DISTINCT - ( col0 ) * - col2 * + col2 AS col1 FROM tab2 AS cor0
----
114076
5103
52728

query I rowsort
SELECT + - ( + 44 ) FROM tab2 cor0
----
-44
-44
-44

query I rowsort
SELECT ALL - 93 * - col1 - + col2 AS col2 FROM tab0 cor0
----
7965
8381
9020

query I rowsort
SELECT col2 * cor0.col2 + col2 * - col1 AS col0 FROM tab2 cor0
----
-108
-858
798

query I rowsort
SELECT ALL + ( + col2 ) + col2 * ( 81 ) FROM tab1 AS cor0
----
4428
4674
7872

onlyif mysql # use DIV operator for integer division
query I rowsort label-2461
SELECT 38 - tab1.col2 DIV - CAST( + 13 AS SIGNED ) FROM tab1
----
42
42
45

skipif mysql # not compatible
query I rowsort label-2461
SELECT 38 - tab1.col2 / - CAST ( + 13 AS INTEGER ) FROM tab1
----
42
42
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-2462
SELECT DISTINCT - 67 DIV col0 - col2 FROM tab1
----
-58
-76
-96

skipif mysql # not compatible
query I rowsort label-2462
SELECT DISTINCT - 67 / col0 - col2 FROM tab1
----
-58
-76
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2463
SELECT - col1 DIV col2 col0 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2463
SELECT - col1 / col2 col0 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT - tab1.col1 + - 28 FROM tab1, tab1 AS cor0
----
-38
-41
-54

query I rowsort
SELECT - 55 + cor0.col1 * col2 AS col0 FROM tab0 AS cor0
----
2783
42
7407

query I rowsort
SELECT ALL 48 AS col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

query I rowsort
SELECT ALL - 15 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 91b10a00c89b36b5bf0bed723e656ccc

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2468
SELECT ALL col1 + CAST( NULL AS SIGNED ) - cor0.col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2468
SELECT ALL col1 + 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-2469
SELECT DISTINCT col0 * - 86 * - col1 + col0 DIV + 56 FROM tab1 AS cor0
----
55041
6708
89441

skipif mysql # not compatible
query I rowsort label-2469
SELECT DISTINCT col0 * - 86 * - col1 + col0 / + 56 FROM tab1 AS cor0
----
55041
6708
89441

query I rowsort
SELECT + col2 * col1 - 43 AS col2 FROM tab0 AS cor0
----
2795
54
7419

query I rowsort
SELECT 27 * - col1 + - col1 * 0 AS col2 FROM tab0
----
-2322
-2457
-2619

query I rowsort
SELECT 82 * 93 AS col0 FROM tab0 AS cor0
----
7626
7626
7626

query I rowsort
SELECT DISTINCT + col1 * ( + col1 ) FROM tab0 AS cor0
----
7396
8281
9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2474
SELECT CAST( NULL AS DECIMAL ) + - col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2474
SELECT CAST ( NULL AS REAL ) + - col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2475
SELECT ALL - col0 + - col0 DIV col0 + CAST( col2 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-35
-8
8

skipif mysql # not compatible
query I rowsort label-2475
SELECT ALL - col0 + - col0 / col0 + CAST ( col2 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-35
-8
8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2476
SELECT + CAST( NULL AS SIGNED ) * 15 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2476
SELECT + CAST ( NULL AS INTEGER ) * 15 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - col2 * 26 FROM tab2 AS cor0
----
676
702
988

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2478
SELECT ALL CAST( + col1 AS SIGNED ) + - col0 col2 FROM tab1 AS cor0
----
-54
-67
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2478
SELECT ALL CAST ( + col1 AS INTEGER ) + - col0 col2 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT - col0 * + col0 + - col1 AS col2 FROM tab0 AS cor0
----
-1322
-662
-8012

query I rowsort
SELECT DISTINCT + 14 * + col2 AS col0 FROM tab1 cor0
----
1344
756
798

query I rowsort
SELECT ALL - 16 + + col1 AS col0 FROM tab2 AS cor0
----
1
15
43

onlyif mysql # use DIV operator for integer division
query I rowsort label-2482
SELECT DISTINCT + + col1 * col2 * - cor0.col2 + + col2 DIV col0 FROM tab0 AS cor0
----
-611884
-93653
-97

skipif mysql # not compatible
query I rowsort label-2482
SELECT DISTINCT + + col1 * col2 * - cor0.col2 + + col2 / col0 FROM tab0 AS cor0
----
-611884
-93653
-97

query I rowsort
SELECT + + col0 * + col0 + 69 FROM tab1 AS cor0
----
4165
6469
78

query I rowsort
SELECT 99 * + cor0.col0 FROM tab0 AS cor0
----
2376
3465
8811

query I rowsort
SELECT + 6 + col0 * col2 AS col2 FROM tab1 AS cor0
----
168
3654
7686

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2486
SELECT ALL col0 + + CAST( ( col0 ) AS SIGNED ) * + col2 FROM tab2 AS cor0
----
196
2106
3081

skipif mysql # not compatible
query I rowsort label-2486
SELECT ALL col0 + + CAST ( ( col0 ) AS INTEGER ) * + col2 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT DISTINCT - col0 + + ( col1 ) AS col1 FROM tab0 AS cor0
----
2
62

query I rowsort
SELECT ALL + col2 * 26 * ( + col1 * + col1 ) + - col1 AS col0 FROM tab2 AS cor0
----
2353097
285515
674591

query I rowsort
SELECT DISTINCT + + col0 - + col0 * + 67 FROM tab0 AS cor0
----
-1584
-2310
-5874

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * 55 + - col2 col0 FROM tab2 AS cor0
----
-412
-4316
-4383

onlyif mysql # use DIV operator for integer division
query I rowsort label-2491
SELECT - 81 + + cor0.col2 DIV + col0 col0 FROM tab0 AS cor0
----
-80
-81
-81

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2491
SELECT - 81 + + cor0.col2 / + col0 col0 FROM tab0 AS cor0
----
-80
-81
-81

query I rowsort
SELECT ALL + 88 * - col2 FROM tab1 AS cor0
----
-4752
-5016
-8448

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col1 ) + col2 col0 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT col0 * col1 + + col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT ALL ( 70 ) * col2 + ( 63 ) * cor0.col2 + col2 FROM tab1 cor0
----
12864
7236
7638

query I rowsort
SELECT DISTINCT - - ( 98 ) + col1 * + ( col2 ) + + cor0.col1 FROM tab2 AS cor0
----
1691
761
966

query I rowsort
SELECT - cor1.col0 FROM tab2, tab2 cor0, tab0 AS cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

onlyif mysql # use DIV operator for integer division
query I rowsort label-2498
SELECT col2 DIV ( - tab0.col0 * col2 ) + 72 col0 FROM tab0
----
72
72
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2498
SELECT col2 / ( - tab0.col0 * col2 ) + 72 col0 FROM tab0
----
72
72
72

query I rowsort
SELECT col2 * ( + tab0.col0 ) + col1 * col0 * col2 FROM tab0
----
3430
671416
68904

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2500
SELECT - CAST( ( col0 ) AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-2500
SELECT - CAST ( ( col0 ) AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL - + col0 * - col1 - col0 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT ALL - - col0 * 40 + col1 - 16 FROM tab0 cor0
----
1030
1481
3635

query I rowsort
SELECT - 71 * col0 FROM tab2
----
-497
-5538
-5609

query I rowsort
SELECT col2 + ( + 85 ) * + col1 FROM tab1 AS cor0
----
1201
2264
907

query I rowsort
SELECT - col2 * + 84 AS col2 FROM tab2 AS cor0
----
-2184
-2268
-3192

query I rowsort
SELECT + col1 * col1 + ( - 82 ) * col2 + col0 * - 35 FROM tab1
----
-10503
-3857
-6814

query I rowsort
SELECT - cor0.col2 + + ( ( col1 ) ) * - col2 FROM tab1 AS cor0
----
-1344
-1458
-627

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * col1 + 92 + - col2 col1 FROM tab2
----
1026
343
3547

query I rowsort
SELECT + col1 + + col0 * + col2 + - col2 * col1 * + tab1.col1 AS col0 FROM tab1
----
-2042
-36316
-8531

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab0 AS cor2, tab2 cor3
----
3645 values hashing to fcae6e4467f798ac88c869b8e38c6b23

query I rowsort
SELECT + col0 * ( - col2 + col0 * cor0.col1 ) FROM tab1 AS cor0
----
37312
72
75520

query I rowsort
SELECT - col0 * cor0.col0 + ( + cor0.col0 ) * 51 + 69 FROM tab0 cor0
----
-3313
629
717

query I rowsort
SELECT + col1 + - 6 + + cor0.col0 FROM tab1 AS cor0
----
23
68
87

query I rowsort
SELECT DISTINCT + cor0.col0 * + 48 * col0 FROM tab2 AS cor0
----
2352
292032
299568

query I rowsort
SELECT tab2.col2 * 9 FROM tab2
----
234
243
342

query I rowsort
SELECT DISTINCT + col2 - 94 * - col2 AS col1 FROM tab0 AS cor0
----
3135
7790
95

query I rowsort
SELECT ALL + col0 + col1 * - 50 * + col2 FROM tab1 AS cor0
----
-28436
-62320
-70197

query I rowsort
SELECT col0 + + col2 * + col1 AS col2 FROM tab2 cor0
----
1612
725
844

query I rowsort
SELECT DISTINCT + col0 + + col1 + ( col0 * ( - col1 ) ) AS col0 FROM tab1 AS cor0
----
-49
-566
-947

query I rowsort
SELECT + cor0.col0 + 31 AS col2 FROM tab2, tab1 cor0
----
9 values hashing to 24fa8f685160021bf96af2f39a41800b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2521
SELECT DISTINCT col0 + col2 + + CAST( NULL AS SIGNED ) FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-2521
SELECT DISTINCT col0 + col2 + + CAST ( NULL AS INTEGER ) FROM tab2
----
NULL

query I rowsort
SELECT + 30 + + 29 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

query I rowsort
SELECT 55 * col1 - 56 * - 6 AS col1 FROM tab0
----
5066
5341
5671

onlyif mysql # use DIV operator for integer division
query I rowsort label-2524
SELECT + 56 + + col2 DIV - col0 AS col0 FROM tab1
----
38
55
56

skipif mysql # not compatible
query I rowsort label-2524
SELECT + 56 + + col2 / - col0 AS col0 FROM tab1
----
38
55
56

query I rowsort
SELECT - - cor0.col0 + cor0.col1 * 89 AS col0 FROM tab1 AS cor0
----
1237
2317
954

query I rowsort
SELECT DISTINCT col1 + - ( col0 ) AS col1 FROM tab1 cor0
----
-54
-67
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * + col2 * - 97 col0 FROM tab0 AS cor0
----
-3395
-707906
-76824

onlyif mysql # use DIV operator for integer division
query I rowsort label-2528
SELECT - - col2 DIV + col0 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2528
SELECT - - col2 / + col0 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT DISTINCT 55 FROM tab2, tab1, tab2 AS cor0
----
55

query I rowsort
SELECT + + cor0.col2 + 83 * ( col1 ) * - col1 AS col0 FROM tab1 AS cor0
----
-13931
-56054
-8243

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * ( - 60 ) col1 FROM tab0 AS cor0
----
-1980
-4920
-60

query I rowsort
SELECT - col1 * ( col0 + col1 ) FROM tab1 AS cor0
----
-1209
-740
-754

onlyif mysql # use DIV operator for integer division
query I rowsort label-2533
SELECT 8 + + 55 DIV col1 + - 18 * col2 * + col1 FROM tab0 AS cor0
----
-134308
-1738
-51076

skipif mysql # not compatible
query I rowsort label-2533
SELECT 8 + + 55 / col1 + - 18 * col2 * + col1 FROM tab0 AS cor0
----
-134308
-1738
-51076

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2534
SELECT + CAST( 66 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
66
66
66

skipif mysql # not compatible
query I rowsort label-2534
SELECT + CAST ( 66 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
66
66
66

query I rowsort
SELECT - + col1 * + col1 - - cor0.col0 FROM tab2 AS cor0
----
-210
-3403
-954

query I rowsort
SELECT - col1 * - col1 + - cor0.col1 * + col1 AS col1 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2537
SELECT col0 * col1 DIV col0 + + col0 FROM tab0 AS cor0
----
110
132
180

skipif mysql # not compatible
query I rowsort label-2537
SELECT col0 * col1 / col0 + + col0 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-2538
SELECT DISTINCT + 53 + + col1 DIV cor0.col2 AS col1 FROM tab0 AS cor0
----
150
54
55

skipif mysql # not compatible
query I rowsort label-2538
SELECT DISTINCT + 53 + + col1 / cor0.col2 AS col1 FROM tab0 AS cor0
----
150
54
55

query I rowsort
SELECT col1 * - col0 * - 43 + - 6 + cor0.col2 FROM tab2 AS cor0
----
197906
57781
9352

query I rowsort
SELECT 24 * + col1 * + cor0.col0 FROM tab0 AS cor0
----
194376
49536
81480

query I rowsort
SELECT cor0.col2 * cor0.col0 + 85 FROM tab1 AS cor0
----
247
3733
7765

query I rowsort
SELECT - col1 + + col1 * - col1 AS col1 FROM tab1 cor0
----
-110
-182
-702

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2543
SELECT + cor1.col2 * + CAST( NULL AS SIGNED ) FROM tab0 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2543
SELECT + cor1.col2 * + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL 92 + col1 FROM tab2 AS cor0
----
109
123
151

query I rowsort
SELECT ALL + col1 * + col1 + ( + col1 ) AS col2 FROM tab2 AS cor0
----
306
3540
992

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col1 * col2 col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + - 65 * col2 + 14 * + 78 FROM tab1 AS cor0
----
-2418
-2613
-5148

query I rowsort
SELECT DISTINCT + cor0.col0 * col0 + col2 FROM tab1 cor0
----
4153
63
6496

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2549
SELECT DISTINCT col1 + + col2 / - CAST( NULL AS DECIMAL ) AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2549
SELECT DISTINCT col1 + + col2 / - CAST ( NULL AS REAL ) AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort
SELECT - - col2 * col0 + + CAST ( col0 AS REAL ) * col0 FROM tab1 AS cor0
----
14080
171
7744

query I rowsort
SELECT ALL - cor0.col1 * - cor0.col0 AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT cor0.col2 - col1 * + ( + col1 ) AS col0 FROM tab2 cor0
----
-251
-3455
-934

query I rowsort
SELECT + 7 * - col0 AS col1 FROM tab2 AS cor0
----
-49
-546
-553

query I rowsort
SELECT ALL col2 + col1 * + col0 * + col0 FROM tab1 AS cor0
----
288
41017
83296

query I rowsort
SELECT ALL - 51 * col0 FROM tab2
----
-357
-3978
-4029

query I rowsort
SELECT ALL - - 80 * - col2 FROM tab0 AS cor0
----
-2640
-6560
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2557
SELECT ALL + col0 * + col2 + + CAST( col1 AS SIGNED ) * col1 AS col1 FROM tab1 cor0
----
3748
7849
838

skipif mysql # not compatible
query I rowsort label-2557
SELECT ALL + col0 * + col2 + + CAST ( col1 AS INTEGER ) * col1 AS col1 FROM tab1 cor0
----
3748
7849
838

query I rowsort
SELECT ALL + col2 - + col2 AS col0 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2559
SELECT DISTINCT 7 * + col0 + CAST( NULL AS SIGNED ) * - col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2559
SELECT DISTINCT 7 * + col0 + CAST ( NULL AS INTEGER ) * - col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - col2 * 94 AS col2 FROM tab2 AS cor0
----
-2444
-2538
-3572

query I rowsort
SELECT - col1 * col0 - - 59 FROM tab0
----
-2005
-3336
-8040

query I rowsort
SELECT DISTINCT - ( 89 ) * - cor0.col1 + - 45 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 cor1
----
1112
2269
845

query I rowsort
SELECT 51 + col0 AS col2 FROM tab2 cor0
----
129
130
58

query I rowsort
SELECT ALL 14 AS col2 FROM tab2, tab0 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to 742ac5d81e64168a26fbd2bc8c808eff

query I rowsort
SELECT ALL + + cor0.col1 * + col1 FROM tab1 cor0
----
100
169
676

query I rowsort
SELECT 23 AS col1 FROM tab1 cor0
----
23
23
23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2567
SELECT ALL col2 * col1 + cor0.col1 + CAST( col1 * + col0 AS SIGNED ) FROM tab2 AS cor0
----
1085
2006
6195

skipif mysql # not compatible
query I rowsort label-2567
SELECT ALL col2 * col1 + cor0.col1 + CAST ( col1 * + col0 AS INTEGER ) FROM tab2 AS cor0
----
1085
2006
6195

onlyif mysql # use DIV operator for integer division
query I rowsort label-2568
SELECT DISTINCT tab2.col1 DIV ( col1 ) AS col2 FROM tab2
----
1

skipif mysql # not compatible
query I rowsort label-2568
SELECT DISTINCT tab2.col1 / ( col1 ) AS col2 FROM tab2
----
1

query I rowsort
SELECT ALL col0 * col2 * ( + tab1.col2 ) AS col1 FROM tab1
----
207936
737280
8748

query I rowsort
SELECT + - 53 + cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 18311baf57b43d4d4aea111ff453e3b2

query I rowsort
SELECT DISTINCT + col2 - - 88 FROM tab2
----
114
115
126

query I rowsort
SELECT DISTINCT 91 - col0 * - col1 AS col0 FROM tab2
----
1434
308
4693

query I rowsort
SELECT - 39 + + col0 * - col0 AS col1 FROM tab1
----
-4135
-48
-6439

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2574
SELECT CAST( NULL AS SIGNED ) + + col2 * + col2 - tab1.col0 AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2574
SELECT CAST ( NULL AS INTEGER ) + + col2 * + col2 - tab1.col0 AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 85 AS col0 FROM tab1, tab0 cor0
----
-85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 - col0 * col2 col0 FROM tab2
----
-162
-2002
-2964

query I rowsort
SELECT col0 - + 24 FROM tab1
----
-21
40
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * col0 * + col0 col1 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT + col1 * col1 + col0 FROM tab1 cor0
----
164
249
679

query I rowsort
SELECT + - 73 FROM tab0 AS cor0
----
-73
-73
-73

query I rowsort
SELECT DISTINCT + 57 + - 93 AS col0 FROM tab0 AS cor0
----
-36

query I rowsort
SELECT + 79 + 79 FROM tab1, tab0 AS cor0
----
9 values hashing to 9d3400f2b4f3756b63546a6a379b95c4

query I rowsort
SELECT col2 * 49 + + col0 * - 72 AS col0 FROM tab0
----
-111
-2390
-2471

query I rowsort
SELECT DISTINCT 62 FROM tab2, tab2 cor0
----
62

query I rowsort
SELECT + ( col2 * + col2 ) + 24 * - col2 FROM tab0
----
-23
297
4756

query I rowsort
SELECT cor1.col0 FROM tab2, tab1 cor0, tab1, tab0 cor1
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

query I rowsort
SELECT DISTINCT + 99 * - col2 + - col2 AS col0 FROM tab0 AS cor0
----
-100
-3300
-8200

query I rowsort
SELECT DISTINCT - 56 + 12 * + col0 AS col1 FROM tab2 AS cor0
----
28
880
892

query I rowsort
SELECT col2 * + ( col1 ) AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - 63 * col1 + 65 * tab2.col0 AS col1 FROM tab2
----
-1498
1353
4064

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + ( cor1.col2 ) col1 FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to e13b0ded89320c7f6f4b5a15db1fe2be

query I rowsort
SELECT 58 AS col1 FROM tab0, tab0 cor0, tab2 AS cor1
----
27 values hashing to 9ee363c6ac19cfdb8a50c7dfd5cc2b8a

query I rowsort
SELECT ALL + col0 - + 61 FROM tab1 AS cor0
----
-58
19
3

query I rowsort
SELECT DISTINCT - + col0 * - ( - col2 ) + col0 + col2 * ( col0 ) FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT cor0.col2 + ( - col2 ) * col1 AS col1 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT col2 + + col0 * - col1 * col1 AS col1 FROM tab2 AS cor0
----
-22793
-271492
-6700

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 + + col0 col0 FROM tab0 AS cor0
----
178
48
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2598
SELECT DISTINCT + col2 * - CAST( - col1 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-2598
SELECT DISTINCT + col2 * - CAST ( - col1 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL + col1 + - col2 + - col2 FROM tab2 AS cor0
----
-23
-59
7

query I rowsort
SELECT ALL + cor0.col1 * 99 - - col1 * col0 FROM tab1 AS cor0
----
1630
2327
2652

query I rowsort
SELECT + 4 AS col2 FROM tab0, tab1 cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2602
SELECT DISTINCT - col2 * CAST( NULL AS SIGNED ) - col2 * - col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2602
SELECT DISTINCT - col2 * CAST ( NULL AS INTEGER ) - col2 * - col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + col0 * ( - cor0.col2 ) - cor0.col2 FROM tab1 AS cor0
----
-216
-3705
-7776

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2604
SELECT col1 * - ( - ( + col1 ) ) + ( - col0 ) * + col2 * CAST( + 18 AS SIGNED ) + - col0 AS col1 FROM tab0 AS cor0
----
-123172
-6884
8744

skipif mysql # not compatible
query I rowsort label-2604
SELECT col1 * - ( - ( + col1 ) ) + ( - col0 ) * + col2 * CAST ( + 18 AS INTEGER ) + - col0 AS col1 FROM tab0 AS cor0
----
-123172
-6884
8744

query I rowsort
SELECT - col2 * ( - 58 ) + col0 + 32 AS col1 FROM tab1 AS cor0
----
3167
3402
5680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * 6 col1 FROM tab1
----
18
384
480

query I rowsort
SELECT 80 AS col1 FROM tab0, tab1 cor0
----
9 values hashing to 878f012d707aab113cedaf56e6c52e94

query I rowsort
SELECT DISTINCT col2 + 50 * tab1.col1 AS col2 FROM tab1
----
1354
557
746

query I rowsort
SELECT + ( ( - cor0.col0 ) ) + col1 FROM tab2 AS cor0
----
-19
-62
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col0 col1 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT - 64 * + col1 * + col2 AS col2 FROM tab1 AS cor0
----
-36480
-79872
-89856

query I rowsort
SELECT 62 * + col2 * - 27 AS col1 FROM tab1
----
-160704
-90396
-95418

query I rowsort
SELECT - + col1 + col1 * 12 FROM tab2 AS cor0
----
187
341
649

query I rowsort
SELECT - col0 * 18 + - col2 + col1 FROM tab1 AS cor0
----
-1199
-1523
-82

query I rowsort
SELECT col1 + 67 * 87 FROM tab1 AS cor0
----
5839
5842
5855

query I rowsort
SELECT - 63 * - col2 FROM tab1
----
3402
3591
6048

query I rowsort
SELECT + 89 FROM tab0, tab0 AS cor0, tab2 cor1
----
27 values hashing to 860d55eb6785972467218a9c3badb5ad

onlyif mysql # use DIV operator for integer division
query I rowsort label-2618
SELECT - 66 DIV - col0 FROM tab0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-2618
SELECT - 66 / - col0 FROM tab0
----
0
1
2

query I rowsort
SELECT + - col2 * col1 - + 27 * - 54 AS col2 FROM tab2 cor0
----
-76
621
812

onlyif mysql # use DIV operator for integer division
query I rowsort label-2620
SELECT DISTINCT tab1.col1 DIV col2 + - col2 FROM tab1
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-2620
SELECT DISTINCT tab1.col1 / col2 + - col2 FROM tab1
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2621
SELECT ALL + col0 DIV + col0 - - col1 FROM tab2 AS cor0
----
18
32
60

skipif mysql # not compatible
query I rowsort label-2621
SELECT ALL + col0 / + col0 - - col1 FROM tab2 AS cor0
----
18
32
60

query I rowsort
SELECT DISTINCT - col1 - + col2 * col0 AS col1 FROM tab0
----
-132
-7389
-878

query III rowsort
SELECT * FROM tab0 WHERE NOT ( tab0.col0 ) NOT BETWEEN ( NULL ) AND ( col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2624
SELECT ALL + col0 DIV col2 + + col2 * col2 - + col1 * col2 FROM tab0
----
-1749
-61
-737

skipif mysql # not compatible
query I rowsort label-2624
SELECT ALL + col0 / col2 + + col2 * col2 - + col1 * col2 FROM tab0
----
-1749
-61
-737

query I rowsort
SELECT - col0 + col2 * col1 AS col1 FROM tab0
----
2814
62
7373

onlyif mysql # use DIV operator for integer division
query I rowsort label-2626
SELECT ALL col1 DIV col0 + - col2 * col1 * - col0 FROM tab1
----
36480
4220
99840

skipif mysql # not compatible
query I rowsort label-2626
SELECT ALL col1 / col0 + - col2 * col1 * - col0 FROM tab1
----
36480
4220
99840

query I rowsort
SELECT 26 FROM tab2, tab1 cor0, tab1 AS cor1
----
27 values hashing to ede8226bb7e602e221f9d98345b4da37

query I rowsort
SELECT DISTINCT - col0 + tab0.col2 * tab0.col0 AS col1 FROM tab0
----
0
7209
768

query I rowsort
SELECT DISTINCT + 35 * 24 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
840

query I rowsort
SELECT DISTINCT - 44 + - col2 * - 89 * + 29 AS col1 FROM tab1
----
139330
147073
247732

query I rowsort
SELECT ALL + ( - col1 ) + + ( + col1 ) FROM tab1
----
0
0
0

query I rowsort
SELECT ALL - 59 * col2 + + ( 52 ) AS col1 FROM tab1
----
-3134
-3311
-5612

query I rowsort
SELECT cor0.col1 * - col1 + col0 * cor0.col0 FROM tab2 cor0
----
-912
2603
5952

onlyif mysql # use DIV operator for integer division
query I rowsort label-2634
SELECT - 61 DIV + col0 + col0 FROM tab0 AS cor0
----
22
34
89

skipif mysql # not compatible
query I rowsort label-2634
SELECT - 61 / + col0 + col0 FROM tab0 AS cor0
----
22
34
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2635
SELECT DISTINCT + col2 * - col1 + CAST( NULL AS SIGNED ) FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-2635
SELECT DISTINCT + col2 * - col1 + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + tab2.col2 col0 FROM tab2
----
-33
-4
21

query I rowsort
SELECT ALL col0 + col0 * col0 FROM tab2 WHERE NOT - col0 IN ( - col0 )
----

query I rowsort
SELECT col2 + - tab0.col2 + col1 FROM tab0
----
86
91
97

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL NOT IN ( + col1 * + tab2.col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2640
SELECT ALL + col1 * + tab1.col1 DIV tab1.col1 AS col0 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-2640
SELECT ALL + col1 * + tab1.col1 / tab1.col1 AS col0 FROM tab1
----
10
13
26

query I rowsort
SELECT ALL - col2 + - col0 - col2 AS col2 FROM tab0
----
-253
-37
-90

query I rowsort
SELECT col0 AS col0 FROM tab0 WHERE NULL IN ( col0 + col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2643
SELECT + col2 DIV - col0 + col0 * col1 + - col0 DIV - col1 FROM tab1
----
1045
60
646

skipif mysql # not compatible
query I rowsort label-2643
SELECT + col2 / - col0 + col0 * col1 + - col0 / - col1 FROM tab1
----
1045
60
646

query I rowsort
SELECT ALL + tab0.col1 * tab0.col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT DISTINCT + col1 * - tab1.col1 * - col2 AS col1 FROM tab1
----
16224
36504
5700

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * - col1 col1 FROM tab2 WHERE NOT NULL > ( col0 )
----

query I rowsort
SELECT DISTINCT + tab0.col2 * tab0.col2 + - col0 + - col0 AS col2 FROM tab0
----
-69
1041
6546

query I rowsort
SELECT tab1.col1 - col0 AS col1 FROM tab1 WHERE NULL IN ( - col2 + - col2 )
----

query III rowsort
SELECT * FROM tab0 WHERE NOT col0 + col1 NOT IN ( col1 + col2 )
----

query I rowsort
SELECT ALL col2 - col2 * - tab0.col1 FROM tab0
----
2871
7544
98

query III rowsort
SELECT * FROM tab0 WHERE NOT col1 NOT IN ( col2 * col0 / + col2 )
----

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE col1 * tab1.col1 BETWEEN NULL AND + col0
----

query I rowsort
SELECT + col2 * col2 * col0 FROM tab0
----
26136
35
598436

query I rowsort
SELECT + 89 + 62 * + tab1.col1 AS col0 FROM tab1
----
1701
709
895

onlyif mysql # use DIV operator for integer division
query I rowsort label-2655
SELECT ALL tab2.col1 + + col1 - col1 DIV col1 col2 FROM tab2
----
117
33
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2655
SELECT ALL tab2.col1 + + col1 - col1 / col1 col2 FROM tab2
----
117
33
61

query I rowsort
SELECT ALL ( + ( cor0.col1 ) ) * col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT + 42 * + 5 + - cor0.col1 FROM tab1 cor0
----
184
197
200

onlyif mysql # use DIV operator for integer division
query I rowsort label-2658
SELECT - col1 DIV - cor0.col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2658
SELECT - col1 / - cor0.col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + + 71 * - col1 * col0 FROM tab0 AS cor0
----
-146544
-241045
-575029

query I rowsort
SELECT + - 71 + col2 * col2 FROM tab2 AS cor0
----
1373
605
658

query I rowsort
SELECT 37 - + col2 * + cor0.col0 * - col1 AS col0 FROM tab1 AS cor0
----
36517
4249
99877

query I rowsort
SELECT ALL + - ( col0 ) * ( - col2 ) AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT - - col0 * + col1 * + col0 AS col1 FROM tab2 cor0
----
106097
1519
358956

query I rowsort
SELECT col0 * + col2 + - ( col1 ) + + col2 AS col2 FROM tab1 cor0
----
190
3695
7763

query I rowsort
SELECT ALL - col1 * - col1 + 14 FROM tab1 AS cor0
----
114
183
690

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2666
SELECT 54 * - col2 + + CAST( col2 AS SIGNED ) + col2 AS col0 FROM tab2 AS cor0
----
-1352
-1404
-1976

skipif mysql # not compatible
query I rowsort label-2666
SELECT 54 * - col2 + + CAST ( col2 AS INTEGER ) + col2 AS col0 FROM tab2 AS cor0
----
-1352
-1404
-1976

query I rowsort
SELECT DISTINCT + col2 * - col2 * + 34 AS col2 FROM tab1 AS cor0
----
-110466
-313344
-99144

query I rowsort
SELECT DISTINCT + + cor0.col0 + cor0.col0 AS col1 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT - 58 * + col2 AS col2 FROM tab1 cor0
----
-3132
-3306
-5568

query I rowsort
SELECT ( + col0 * col1 ) AS col1 FROM tab2
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-2671
SELECT col0 * cor0.col0 - col0 DIV - 32 AS col2 FROM tab2 AS cor0
----
49
6086
6243

skipif mysql # not compatible
query I rowsort label-2671
SELECT col0 * cor0.col0 - col0 / - 32 AS col2 FROM tab2 AS cor0
----
49
6086
6243

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2672
SELECT ALL + + ( - col2 ) + CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2672
SELECT ALL + + ( - col2 ) + CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 + col2 * 32 FROM tab2 AS cor0
----
1295
871
910

query I rowsort
SELECT + - col2 * - cor0.col2 * 17 AS col1 FROM tab1 AS cor0
----
156672
49572
55233

query I rowsort
SELECT + ( cor0.col0 ) - - col2 * col2 * - col2 FROM tab2 AS cor0
----
-17498
-19676
-54793

query I rowsort
SELECT ALL + col2 * cor0.col0 * - 51 + + cor0.col0 AS col1 FROM tab1 AS cor0
----
-185984
-391600
-8259

query I rowsort
SELECT DISTINCT - col0 * col2 + 54 - col0 FROM tab2 AS cor0
----
-142
-2052
-3027

query I rowsort
SELECT + cor0.col0 + ( - col1 ) AS col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT + col2 * + 82 * col2 FROM tab0 AS cor0
----
551368
82
89298

query I rowsort
SELECT ALL + col0 * col1 * - 23 AS col0 FROM tab0 AS cor0
----
-186277
-47472
-78085

query I rowsort
SELECT - col2 + - ( col0 * col1 ) AS col0 FROM tab0 AS cor0
----
-2097
-3396
-8181

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2682
SELECT DISTINCT - col2 * - CAST( NULL AS DECIMAL ) AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2682
SELECT DISTINCT - col2 * - CAST ( NULL AS REAL ) AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + + cor0.col2 + + ( - col1 ) FROM tab1 AS cor0
----
28
47
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2684
SELECT - + cor0.col0 * CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2684
SELECT - + cor0.col0 * CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * + col1 + col0 + col1 * + ( col0 * - col1 + col1 ) col1 FROM tab1 AS cor0
----
-13102
-6136
-673

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * - col2 * + col0 + + ( col0 ) * col0 * 60 col0 FROM tab1 AS cor0
----
-353280
-8208
37824

query I rowsort
SELECT 1 + + 5 AS col2 FROM tab0 AS cor0
----
6
6
6

query I rowsort
SELECT ALL 14 + - 79 FROM tab2, tab2 AS cor0
----
9 values hashing to 744531575c1b6461ed2916d4940e4d23

onlyif mysql # use DIV operator for integer division
query I rowsort label-2689
SELECT DISTINCT col2 * col2 DIV - col2 col1 FROM tab1
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2689
SELECT DISTINCT col2 * col2 / - col2 col1 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT - 96 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to c89b545346f99713888a7934e4caa539

query I rowsort
SELECT ALL 89 * + col1 FROM tab0 AS cor0
----
7654
8099
8633

query I rowsort
SELECT DISTINCT + col2 - + col1 AS col0 FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2693
SELECT + - col2 DIV + cor0.col0 + col0 FROM tab1 AS cor0
----
-15
64
79

skipif mysql # not compatible
query I rowsort label-2693
SELECT + - col2 / + cor0.col0 + col0 FROM tab1 AS cor0
----
-15
64
79

query I rowsort
SELECT + 76 * col2 * - col2 FROM tab1 AS cor0
----
-221616
-246924
-700416

query I rowsort
SELECT - - 0 + - col1 * - 40 FROM tab0 AS cor0
----
3440
3640
3880

query I rowsort
SELECT DISTINCT 85 + col0 * - col1 AS col2 FROM tab2 AS cor0
----
-1258
-132
-4517

query I rowsort
SELECT + cor1.col0 * - 79 - + cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 16b339a2c16d60470e7790d284db0190

query I rowsort
SELECT ALL - + 66 + + col2 * - col0 AS col1 FROM tab2 AS cor0
----
-2094
-255
-3068

query I rowsort
SELECT + col1 * cor0.col2 + - ( + 7 * col2 ) FROM tab1 AS cor0
----
1026
171
576

query I rowsort
SELECT DISTINCT - 54 + - col0 AS col2 FROM tab0 AS cor0
----
-143
-78
-89

query I rowsort
SELECT - col2 + - col0 * - col1 * 15 FROM tab2 AS cor0
----
20107
3228
69004

onlyif mysql # use DIV operator for integer division
query I rowsort label-2702
SELECT 47 DIV + 19 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

skipif mysql # not compatible
query I rowsort label-2702
SELECT 47 / + 19 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

query I rowsort
SELECT + + 14 + cor1.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 0035aa8eb0c30e3d3a427d1bccdc62f4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2704
SELECT - - CAST( NULL AS SIGNED ) + + cor0.col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2704
SELECT - - CAST ( NULL AS INTEGER ) + + cor0.col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - cor0.col1 - + 12 FROM tab2 cor0
----
-29
-43
-71

query I rowsort
SELECT DISTINCT + ( 61 ) AS col2 FROM tab2 AS cor0
----
61

query I rowsort
SELECT ( cor0.col0 ) - - cor0.col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL + - cor0.col2 AS col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT DISTINCT col0 + col0 * + tab2.col2 FROM tab2
----
196
2106
3081

query I rowsort
SELECT + col1 * col1 + col0 AS col2 FROM tab1
----
164
249
679

query I rowsort
SELECT 27 + col2 * col2 FROM tab0
----
1116
28
6751

onlyif mysql # use DIV operator for integer division
query I rowsort label-2712
SELECT ( - col2 ) DIV + col2 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2712
SELECT ( - col2 ) / + col2 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT tab1.col0 + + 91 * + col2 FROM tab1
----
4917
5251
8816

query I rowsort
SELECT - col1 * 98 AS col2 FROM tab0
----
-8428
-8918
-9506

onlyif mysql # use DIV operator for integer division
query I rowsort label-2715
SELECT col0 DIV + col2 + col2 + col2 AS col2 FROM tab1
----
108
115
192

skipif mysql # not compatible
query I rowsort label-2715
SELECT col0 / + col2 + col2 + col2 AS col2 FROM tab1
----
108
115
192

onlyif mysql # use DIV operator for integer division
query I rowsort label-2716
SELECT - col2 DIV tab0.col2 col2 FROM tab0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2716
SELECT - col2 / tab0.col2 col2 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT ALL - col1 + col0 * + col2 AS col1 FROM tab0
----
-62
706
7207

query I rowsort
SELECT DISTINCT + ( col2 ) + col1 * + 29 AS col0 FROM tab1
----
347
473
808

query I rowsort
SELECT DISTINCT 95 + - col2 * + col2 FROM tab0 cor0
----
-6629
-994
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-2720
SELECT - col0 DIV 12 + col2 AS col0 FROM tab2 cor0
----
20
27
32

skipif mysql # not compatible
query I rowsort label-2720
SELECT - col0 / 12 + col2 AS col0 FROM tab2 cor0
----
20
27
32

query I rowsort
SELECT ALL + 54 + cor0.col0 AS col0 FROM tab2 AS cor0
----
132
133
61

query I rowsort
SELECT ALL - ( + col1 ) + - col1 AS col2 FROM tab1
----
-20
-26
-52

query I rowsort
SELECT DISTINCT - ( + col1 ) * - col1 + - col0 * col1 FROM tab1
----
-540
-871
598

query I rowsort
SELECT + - col0 * col2 * col1 - - 69 FROM tab2 AS cor0
----
-119583
-50965
-5790

query I rowsort
SELECT DISTINCT col2 * col1 * - 91 FROM tab0
----
-258258
-679042
-8827

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 85 col0 FROM tab1, tab2, tab1 AS cor0
----
-85

query I rowsort
SELECT + 24 * col2 + + col1 * col2 * col2 AS col0 FROM tab1 AS cor0
----
122112
33858
77112

query I rowsort
SELECT + - col1 + + col1 * cor0.col0 FROM tab1 AS cor0
----
1027
52
630

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2729
SELECT ALL + col0 * CAST( NULL AS DECIMAL ) + + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2729
SELECT ALL + col0 * CAST ( NULL AS REAL ) + + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 + + 39 * col2 FROM tab2 AS cor0
----
1046
1403
936

query I rowsort
SELECT - col1 + - ( + col0 ) * + cor0.col0 * + col0 FROM tab2 cor0
----
-374
-474611
-493056

query I rowsort
SELECT + - col2 + - ( + col2 ) FROM tab2 cor0
----
-52
-54
-76

query I rowsort
SELECT ALL - - cor0.col1 + col1 AS col2 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT - + 74 * - 5 + - col2 * + col1 FROM tab1 AS cor0
----
-1034
-200
-878

query I rowsort
SELECT ALL + col2 * + 73 AS col2 FROM tab2 AS cor0
----
1898
1971
2774

onlyif mysql # use DIV operator for integer division
query I rowsort label-2736
SELECT 88 DIV + 50 col1 FROM tab2 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2736
SELECT 88 / + 50 col1 FROM tab2 AS cor0
----
1
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2737
SELECT - CAST( col1 AS SIGNED ) * col2 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort label-2737
SELECT - CAST ( col1 AS INTEGER ) * col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT - - 78 * - col0 + - col2 FROM tab1 AS cor0
----
-288
-5049
-6336

onlyif mysql # use DIV operator for integer division
query I rowsort label-2739
SELECT - + ( cor0.col1 ) + cor0.col0 DIV + ( - col1 ) AS col0 FROM tab1 AS cor0
----
-16
-19
-26

skipif mysql # not compatible
query I rowsort label-2739
SELECT - + ( cor0.col1 ) + cor0.col0 / + ( - col1 ) AS col0 FROM tab1 AS cor0
----
-16
-19
-26

query I rowsort
SELECT + col2 * + col1 * col2 FROM tab0 cor0
----
611884
93654
97

query I rowsort
SELECT - + col2 + - 96 AS col1 FROM tab0 AS cor0
----
-129
-178
-97

query I rowsort
SELECT col0 + + cor0.col1 * - col2 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab2, tab0 cor0, tab0, tab0 AS cor1
----
24
35
89

query I rowsort
SELECT DISTINCT col0 * - ( col1 ) + + col0 + ( + col0 ) FROM tab0 AS cor0
----
-2016
-3325
-7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + col0 col2 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT + col0 + col0 * + col0 FROM tab2 AS cor0
----
56
6162
6320

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2747
SELECT ALL + - col1 * CAST( NULL AS SIGNED ) + col0 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2747
SELECT ALL + - col1 * CAST ( NULL AS INTEGER ) + col0 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 * ( - 62 * + col1 ) FROM tab0
----
-175956
-462644
-6014

query I rowsort
SELECT DISTINCT - 85 + + col2 AS col2 FROM tab1 AS cor0
----
-28
-31
11

query I rowsort
SELECT - + 36 + + ( + col2 ) FROM tab0 AS cor0
----
-3
-35
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 20 col1 FROM tab0 AS cor0
----
-20
-20
-20

query I rowsort
SELECT DISTINCT + + 33 + col1 * cor0.col1 AS col1 FROM tab0 AS cor0
----
7429
8314
9442

query I rowsort
SELECT DISTINCT + - col0 * - col2 + + cor0.col0 + - 72 FROM tab1 AS cor0
----
3640
7688
93

query I rowsort
SELECT 24 + 73 FROM tab0 AS cor0
----
97
97
97

query I rowsort
SELECT ALL + tab0.col1 - tab0.col1 * col0 FROM tab0
----
-1978
-3298
-8008

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * tab2.col1 + - col0 * col2 - - 94 * + 3 * col2 col0 FROM tab2
----
7642
9057
9906

query I rowsort
SELECT ALL + + cor0.col1 * + col1 + ( + col0 ) FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT 31 * col2 AS col2 FROM tab1
----
1674
1767
2976

query I rowsort
SELECT 59 FROM tab0, tab2, tab1 AS cor0, tab1 AS cor1
----
81 values hashing to 05f41d0d3fd0b5c29af79ab9209cab27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( + col0 ) col1 FROM tab2
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 + + col0 col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT + 73 - col2 FROM tab2
----
35
46
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor1.col2 col2 FROM tab0, tab1 AS cor0, tab1 cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT - col0 * col1 + col0 AS col1 FROM tab1
----
-576
-75
-960

query I rowsort
SELECT + + cor0.col1 + 89 FROM tab1 AS cor0
----
102
115
99

query I rowsort
SELECT col2 * cor0.col2 * 43 + col0 * - col2 FROM tab1 AS cor0
----
125226
136059
388608

query I rowsort
SELECT 90 + col0 AS col2 FROM tab2
----
168
169
97

query I rowsort
SELECT ALL cor0.col1 * cor0.col2 + col1 + col1 FROM tab0 AS cor0
----
291
3010
7644

query I rowsort
SELECT ALL + + col0 * col2 + - cor0.col0 + col1 FROM tab2 AS cor0
----
2009
213
2940

query I rowsort
SELECT ALL + + cor0.col1 + - 74 AS col0 FROM tab0 AS cor0
----
12
17
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * - ( col0 ) col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - col1 * col2 * - col0 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT + col2 + + ( - 5 ) * - col2 AS col0 FROM tab1 AS cor0
----
324
342
576

query I rowsort
SELECT DISTINCT + - col2 * - ( - col0 ) FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL - col0 + ( + 75 ) AS col1 FROM tab1 AS cor0
----
-5
11
72

query I rowsort
SELECT col2 * + 16 FROM tab1 AS cor0
----
1536
864
912

query I rowsort
SELECT + - col2 * + cor0.col0 + col0 * ( 68 ) FROM tab0 cor0
----
-1246
2345
840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2778
SELECT ALL - CAST( col1 AS SIGNED ) * - cor0.col1 + + CAST( + ( col2 ) AS SIGNED ) AS col0 FROM tab1 AS cor0
----
157
265
730

skipif mysql # not compatible
query I rowsort label-2778
SELECT ALL - CAST ( col1 AS INTEGER ) * - cor0.col1 + + CAST ( + ( col2 ) AS INTEGER ) AS col0 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT DISTINCT - col2 * 31 * col0 + cor0.col0 + + col2 AS col1 FROM tab0 AS cor0
----
-1049
-226067
-24495

onlyif mysql # use DIV operator for integer division
query I rowsort label-2780
SELECT ALL - ( 2 ) + - col2 + cor0.col1 DIV 65 AS col1 FROM tab1 AS cor0
----
-56
-59
-98

skipif mysql # not compatible
query I rowsort label-2780
SELECT ALL - ( 2 ) + - col2 + cor0.col1 / 65 AS col1 FROM tab1 AS cor0
----
-56
-59
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-2781
SELECT ALL + + ( - col2 ) * col2 DIV 23 + col2 AS col1 FROM tab0 AS cor0
----
-14
-210
1

skipif mysql # not compatible
query I rowsort label-2781
SELECT ALL + + ( - col2 ) * col2 / 23 + col2 AS col1 FROM tab0 AS cor0
----
-14
-210
1

query I rowsort
SELECT DISTINCT 17 + + col1 * cor0.col1 AS col0 FROM tab1 AS cor0
----
117
186
693

query I rowsort
SELECT DISTINCT + 50 * + col0 * cor0.col2 AS col1 FROM tab2 AS cor0
----
101400
150100
9450

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 0 col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + col2 * col0 + + ( - col1 ) AS col0 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT + + 67 + col0 AS col2 FROM tab0 AS cor0
----
102
156
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-2787
SELECT DISTINCT - - col2 DIV + col0 + 30 * + 68 * cor0.col0 FROM tab0 AS cor0
----
181560
48961
71400

skipif mysql # not compatible
query I rowsort label-2787
SELECT DISTINCT - - col2 / + col0 + 30 * + 68 * cor0.col0 FROM tab0 AS cor0
----
181560
48961
71400

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 cor0, tab1 AS cor1, tab1 cor2
----
972 values hashing to cee640567b2a4ba7d97109d5025bf4d9

query I rowsort
SELECT ALL - + ( + cor0.col2 ) + col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - - 4 * - col0 AS col0 FROM tab1 cor0
----
-12
-256
-320

onlyif mysql # use DIV operator for integer division
query I rowsort label-2791
SELECT cor0.col1 DIV - cor0.col1 AS col1 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2791
SELECT cor0.col1 / - cor0.col1 AS col1 FROM tab1 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2792
SELECT + col2 DIV + CAST( col0 + + col2 AS SIGNED ) FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2792
SELECT + col2 / + CAST ( col0 + + col2 AS INTEGER ) FROM tab0
----
0
0
0

query I rowsort
SELECT ALL tab0.col0 + - 81 + - col1 * + col1 FROM tab0
----
-7453
-8273
-9455

query I rowsort
SELECT DISTINCT + tab0.col0 + + ( + col1 ) FROM tab0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-2795
SELECT - col0 * col2 DIV - col1 FROM tab2
----
176
34
6

skipif mysql # not compatible
query I rowsort label-2795
SELECT - col0 * col2 / - col1 FROM tab2
----
176
34
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + 96 col2 FROM tab0 AS cor0
----
129
178
97

query I rowsort
SELECT + - 53 + + col2 + - col2 AS col1 FROM tab2 AS cor0
----
-53
-53
-53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 - - col0 col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT - 26 * col2 AS col0 FROM tab0 AS cor0
----
-2132
-26
-858

query I rowsort
SELECT + 23 + col2 + col1 FROM tab2 AS cor0
----
108
78
81

query I rowsort
SELECT - col0 + - ( col1 + col1 ) FROM tab1 AS cor0
----
-106
-55
-84

query I rowsort
SELECT 52 * col2 * col0 FROM tab0 AS cor0
----
1820
379496
41184

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2803
SELECT - - CAST( NULL AS SIGNED ) - + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2803
SELECT - - CAST ( NULL AS INTEGER ) - + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2804
SELECT DISTINCT - + cor0.col1 DIV - col0 + col2 + + col1 FROM tab1 cor0
----
109
67
88

skipif mysql # not compatible
query I rowsort label-2804
SELECT DISTINCT - + cor0.col1 / - col0 + col2 + + col1 FROM tab1 cor0
----
109
67
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 97 + - cor0.col2 col1 FROM tab0 AS cor0
----
-130
-179
-98

query I rowsort
SELECT ALL + 89 * col0 AS col1 FROM tab2 AS cor0
----
623
6942
7031

query I rowsort
SELECT DISTINCT - + ( + col1 ) + col0 * col2 FROM tab2 cor0
----
158
1969
2985

onlyif mysql # use DIV operator for integer division
query I rowsort label-2808
SELECT ALL + cor0.col0 + + col1 DIV 1 FROM tab2 AS cor0
----
137
38
96

skipif mysql # not compatible
query I rowsort label-2808
SELECT ALL + cor0.col0 + + col1 / 1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL - 79 * 33 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 17fa85d7ef9477bd69e75a17a7eb0cdf

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 2 col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

query I rowsort
SELECT - col0 * - cor0.col2 * + ( + col2 ) AS col0 FROM tab1 AS cor0
----
207936
737280
8748

query I rowsort
SELECT - - 8 * - col1 FROM tab2 AS cor0
----
-136
-248
-472

onlyif mysql # use DIV operator for integer division
query I rowsort label-2813
SELECT col0 * col2 DIV - ( + 81 ) FROM tab0 AS cor0
----
-9
-90
0

skipif mysql # not compatible
query I rowsort label-2813
SELECT col0 * col2 / - ( + 81 ) FROM tab0 AS cor0
----
-9
-90
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + - cor0.col0 col1 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL + 35 AS col2 FROM tab0 cor0
----
35
35
35

query I rowsort
SELECT - 23 * + col2 FROM tab1 AS cor0
----
-1242
-1311
-2208

query I rowsort
SELECT + col0 * + 74 AS col2 FROM tab0 AS cor0
----
1776
2590
6586

query I rowsort
SELECT + col2 * + ( - cor0.col0 ) + + col2 AS col1 FROM tab2 AS cor0
----
-162
-2002
-2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-2819
SELECT col1 DIV + 80 col2 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2819
SELECT col1 / + 80 col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2820
SELECT + col2 DIV 12 FROM tab1 cor0
----
4
4
8

skipif mysql # not compatible
query I rowsort label-2820
SELECT + col2 / 12 FROM tab1 cor0
----
4
4
8

query I rowsort
SELECT DISTINCT - col0 * - col1 + 16 + - col0 * 30 FROM tab2 cor0
----
-1011
2278
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-2822
SELECT col2 DIV 3 FROM tab0 AS cor0
----
0
11
27

skipif mysql # not compatible
query I rowsort label-2822
SELECT col2 / 3 FROM tab0 AS cor0
----
0
11
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-2823
SELECT - cor0.col0 DIV + col2 FROM tab1 cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-2823
SELECT - cor0.col0 / + col2 FROM tab1 cor0
----
-1
0
0

query I rowsort
SELECT - col0 * 15 + + col0 AS col1 FROM tab1 AS cor0
----
-1120
-42
-896

onlyif mysql # use DIV operator for integer division
query I rowsort label-2825
SELECT ALL + - 82 + - 62 DIV col1 AS col2 FROM tab1 AS cor0
----
-84
-86
-88

skipif mysql # not compatible
query I rowsort label-2825
SELECT ALL + - 82 + - 62 / col1 AS col2 FROM tab1 AS cor0
----
-84
-86
-88

query I rowsort
SELECT + 78 * col0 + col1 FROM tab1 AS cor0
----
260
5002
6253

query I rowsort
SELECT + + ( cor0.col0 ) * - col1 + + col1 * + col1 AS col2 FROM tab0 AS cor0
----
182
5332
6014

query I rowsort
SELECT 70 + col1 AS col2 FROM tab1
----
80
83
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2829
SELECT DISTINCT - 88 DIV col1 AS col1 FROM tab0
----
-1
0

skipif mysql # not compatible
query I rowsort label-2829
SELECT DISTINCT - 88 / col1 AS col1 FROM tab0
----
-1
0

query I rowsort
SELECT col2 - + 30 * + col0 FROM tab2
----
-183
-2314
-2332

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - ( + 55 ) * - col2 col2 FROM tab2 AS cor0
----
-1430
-1485
-2090

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2832
SELECT ALL CAST( col2 AS SIGNED ) * - col1 + col0 FROM tab2 cor0
----
-1456
-567
-830

skipif mysql # not compatible
query I rowsort label-2832
SELECT ALL CAST ( col2 AS INTEGER ) * - col1 + col0 FROM tab2 cor0
----
-1456
-567
-830

query I rowsort
SELECT DISTINCT 71 * - col2 AS col1 FROM tab1 AS cor0
----
-3834
-4047
-6816

query I rowsort
SELECT - col2 + 17 * - col1 FROM tab2 AS cor0
----
-1029
-327
-554

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 23 * col0 col0 FROM tab1 AS cor0
----
1472
1840
69

query I rowsort
SELECT ALL col1 * + col0 + + 3 AS col1 FROM tab0 AS cor0
----
2067
3398
8102

query I rowsort
SELECT ALL ( - ( col0 ) + + col2 ) * col0 AS col1 FROM tab2
----
-3239
-4056
140

query I rowsort
SELECT ALL + 73 * col0 AS col0 FROM tab1 AS cor0
----
219
4672
5840

query I rowsort
SELECT ALL - 77 + col2 FROM tab0 cor0
----
-44
-76
5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2840
SELECT DISTINCT + + col2 + - col0 - - CAST( + col1 AS SIGNED ) * col1 * - ( + col0 + - col1 ) FROM tab0 AS cor0
----
16555
458561
583324

skipif mysql # not compatible
query I rowsort label-2840
SELECT DISTINCT + + col2 + - col0 - - CAST ( + col1 AS INTEGER ) * col1 * - ( + col0 + - col1 ) FROM tab0 AS cor0
----
16555
458561
583324

query I rowsort
SELECT - cor0.col2 * 83 AS col2 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 50cdf45e62a83adea9cadbecef87a9d9

query I rowsort
SELECT col0 * 71 + - col1 FROM tab2 AS cor0
----
466
5479
5592

query I rowsort
SELECT DISTINCT + col1 * - tab0.col1 + col2 * - col2 FROM tab0
----
-15005
-8485
-9410

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col1 * col0 + col2 col2 FROM tab2 AS cor0
----
22869
271544
6754

query I rowsort
SELECT ALL - - cor0.col0 + 16 FROM tab2 AS cor0
----
23
94
95

query I rowsort
SELECT col2 * 85 * - col2 + + col1 * - col2 AS col0 FROM tab0 AS cor0
----
-182
-579002
-95403

query I rowsort
SELECT DISTINCT col0 * 5 AS col0 FROM tab2 cor0
----
35
390
395

query IIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1, tab0 AS cor0 WHERE NOT NULL IN ( - tab2.col1 )
----

query I rowsort
SELECT ALL + + 94 * col0 * - cor0.col1 FROM tab0 AS cor0
----
-194016
-319130
-761306

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2850
SELECT DISTINCT + CAST( col1 AS SIGNED ) + + col2 AS col1 FROM tab2 AS cor0
----
55
58
85

skipif mysql # not compatible
query I rowsort label-2850
SELECT DISTINCT + CAST ( col1 AS INTEGER ) + + col2 AS col1 FROM tab2 AS cor0
----
55
58
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2851
SELECT CAST( NULL AS SIGNED ) * - col2 + + col1 * + col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2851
SELECT CAST ( NULL AS INTEGER ) * - col2 + + col1 * + col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 17 col0 FROM tab2 AS cor0
----
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * - col0 + - col0 col2 FROM tab1
----
4032
6
6320

query I rowsort
SELECT DISTINCT col2 + tab2.col2 + col0 AS col2 FROM tab2
----
130
155
61

query I rowsort
SELECT col1 * ( - 68 ) + - col1 FROM tab2
----
-1173
-2139
-4071

query I rowsort
SELECT ALL 49 + 57 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to e3a970c661a05070afa8a3ed8dca742e

query I rowsort
SELECT + col2 * + ( col1 ) FROM tab1
----
1248
1404
570

query I rowsort
SELECT DISTINCT 79 - 87 * col0 FROM tab0 AS cor0
----
-2009
-2966
-7664

query I rowsort
SELECT ALL + 61 + - col1 FROM tab1 AS cor0
----
35
48
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-2860
SELECT ALL - 81 DIV col1 + col2 FROM tab1 AS cor0
----
49
51
90

skipif mysql # not compatible
query I rowsort label-2860
SELECT ALL - 81 / col1 + col2 FROM tab1 AS cor0
----
49
51
90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2861
SELECT + CAST( NULL AS DECIMAL ) / + col0 + - col2 AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2861
SELECT + CAST ( NULL AS REAL ) / + col0 + - col2 AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 * 88 + cor0.col1 FROM tab2 cor0
----
1513
2759
5251

query I rowsort
SELECT ALL + col2 * - 46 FROM tab1 AS cor0
----
-2484
-2622
-4416

query I rowsort
SELECT ( + col0 ) * - col0 + - col0 * - col2 AS col1 FROM tab0 cor0
----
-1190
-623
216

query I rowsort
SELECT ALL + col2 + 10 AS col1 FROM tab0
----
11
43
92

query I rowsort
SELECT + - col2 + - cor0.col1 * + col2 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT col0 + - col2 * col1 AS col1 FROM tab1
----
-1168
-1401
-506

query I rowsort
SELECT + 17 + col2 * + col1 * - col0 AS col2 FROM tab1
----
-36463
-4195
-99823

query I rowsort
SELECT DISTINCT tab2.col2 * col2 * col2 FROM tab2
----
17576
19683
54872

query I rowsort
SELECT + col0 * cor0.col2 + col1 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT + 76 - 91 FROM tab0
----
-15
-15
-15

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 - 24 * 85 + col2 * - col2 FROM tab1
----
-11256
-4956
-5289

query I rowsort
SELECT + tab2.col0 * col0 + col0 AS col2 FROM tab2
----
56
6162
6320

query I rowsort
SELECT col0 * col0 + - col2 + - 29 AS col2 FROM tab1
----
-74
4010
6275

query I rowsort
SELECT DISTINCT - col2 + - ( - cor0.col0 ) - cor0.col0 * - col2 AS col2 FROM tab0 AS cor0
----
69
7305
783

query I rowsort
SELECT cor0.col0 * - 73 FROM tab0 AS cor0
----
-1752
-2555
-6497

query I rowsort
SELECT DISTINCT + col0 * 40 + + col2 FROM tab2 AS cor0
----
307
3146
3198

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col1 ) * ( + 68 ) col1 FROM tab1
----
1768
680
884

query I rowsort
SELECT - - cor0.col0 + tab0.col0 AS col2 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to a5a6e23490efe08c31b2e8e8ce66d4e2

query I rowsort
SELECT ALL + 7 - + col2 * ( col0 ) FROM tab0
----
-28
-7291
-785

query I rowsort
SELECT ALL col0 - - col2 * + 96 FROM tab0
----
131
3192
7961

query I rowsort
SELECT ALL + tab2.col2 - col0 FROM tab2
----
-41
-52
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ALL col1 + CAST ( - col1 + + col0 AS REAL ) col1 FROM tab0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + 89 col2 FROM tab0
----
113
124
178

query I rowsort
SELECT DISTINCT + - col0 + 71 FROM tab2 cor0
----
-7
-8
64

query I rowsort
SELECT DISTINCT + col2 * - col2 + cor0.col0 FROM tab0 cor0
----
-1065
-6635
34

query I rowsort
SELECT ALL + col1 + + 9 FROM tab2 cor0
----
26
40
68

query I rowsort
SELECT col2 * 18 FROM tab0 AS cor0
----
1476
18
594

query I rowsort
SELECT DISTINCT + col1 + + 58 FROM tab0 AS cor0
----
144
149
155

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2891
SELECT col1 + - CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2891
SELECT col1 + - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col2 * 57 AS col0 FROM tab1 AS cor0
----
3078
3249
5472

query I rowsort
SELECT DISTINCT - + col2 * col2 * + col2 + + col1 FROM tab2 AS cor0
----
-17517
-19652
-54855

query I rowsort
SELECT DISTINCT + col0 + 74 AS col2 FROM tab0 AS cor0
----
109
163
98

query I rowsort
SELECT - col2 * - ( + cor0.col2 ) + - col2 AS col2 FROM tab1 AS cor0
----
2862
3192
9120

query I rowsort
SELECT - - col2 * - ( - 90 ) - - col2 FROM tab1 AS cor0
----
4914
5187
8736

query I rowsort
SELECT ALL + ( + 94 ) AS col2 FROM tab0
----
94
94
94

query I rowsort
SELECT + ( + cor0.col2 ) * col1 AS col1 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT - - 80 + - col0 * - col2 * col0 FROM tab0 AS cor0
----
1305
19088
649602

onlyif mysql # use DIV operator for integer division
query I rowsort label-2900
SELECT col2 DIV col0 + col0 AS col0 FROM tab1
----
21
64
81

skipif mysql # not compatible
query I rowsort label-2900
SELECT col2 / col0 + col0 AS col0 FROM tab1
----
21
64
81

query I rowsort
SELECT + ( col2 ) * - col2 + - tab2.col1 * + col1 AS col0 FROM tab2
----
-1690
-1733
-4157

query I rowsort
SELECT ALL col0 + col2 * col1 FROM tab0
----
132
2862
7551

query I rowsort
SELECT ALL col1 + col1 * - col2 * - col2 + col0 FROM tab0 cor0
----
229
612064
93764

query I rowsort
SELECT + cor0.col2 * - cor0.col1 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT - + col1 - + col1 * col1 FROM tab0 AS cor0
----
-7482
-8372
-9506

query I rowsort
SELECT + + col1 * + col0 - col1 AS col0 FROM tab2 cor0
----
1326
186
4543

query I rowsort
SELECT DISTINCT - - col1 * + cor0.col0 + col0 AS col2 FROM tab0 cor0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-2908
SELECT ALL - ( - cor0.col0 ) - col2 DIV col0 AS col2 FROM tab2 AS cor0
----
4
78
79

skipif mysql # not compatible
query I rowsort label-2908
SELECT ALL - ( - cor0.col0 ) - col2 / col0 AS col2 FROM tab2 AS cor0
----
4
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-2909
SELECT - col2 DIV - cor0.col1 + col1 * + col0 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-2909
SELECT - col2 / - cor0.col1 + col1 * + col0 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col1 * col2 col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL col1 + - col2 * - col0 AS col1 FROM tab0 cor0
----
132
7389
878

query I rowsort
SELECT - + cor0.col0 * ( 4 ) * col1 AS col0 FROM tab1 cor0
----
-2560
-312
-4160

query I rowsort
SELECT DISTINCT + cor0.col1 * 39 AS col1 FROM tab1 AS cor0
----
1014
390
507

onlyif mysql # use DIV operator for integer division
query I rowsort label-2914
SELECT - col1 * - 92 * ( col0 ) + col1 + - col1 DIV - col1 FROM tab1 cor0
----
58891
7203
95694

skipif mysql # not compatible
query I rowsort label-2914
SELECT - col1 * - 92 * ( col0 ) + col1 + - col1 / - col1 FROM tab1 cor0
----
58891
7203
95694

onlyif mysql # use DIV operator for integer division
query I rowsort label-2915
SELECT DISTINCT + col1 DIV col0 AS col0 FROM tab2 cor0
----
0
4

skipif mysql # not compatible
query I rowsort label-2915
SELECT DISTINCT + col1 / col0 AS col0 FROM tab2 cor0
----
0
4

query I rowsort
SELECT ALL - + col1 * + 49 AS col2 FROM tab0 AS cor0
----
-4214
-4459
-4753

query I rowsort
SELECT DISTINCT + + col1 + 82 FROM tab1 AS cor0
----
108
92
95

query I rowsort
SELECT DISTINCT + cor0.col1 * + ( ( + col0 ) ) AS col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - cor0.col1 + cor0.col2 * - cor0.col0 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 3a23d967efa293994095febff37ea910

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2920
SELECT DISTINCT - CAST( + col1 AS SIGNED ) * cor0.col1 - col0 FROM tab2 AS cor0
----
-3559
-368
-968

skipif mysql # not compatible
query I rowsort label-2920
SELECT DISTINCT - CAST ( + col1 AS INTEGER ) * cor0.col1 - col0 FROM tab2 AS cor0
----
-3559
-368
-968

query IIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0 WHERE NOT NULL < NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + + col2 * col0 * col0 col0 FROM tab2 cor0
----
1316
158106
237079

onlyif mysql # use DIV operator for integer division
query I rowsort label-2923
SELECT + - cor0.col0 * col2 DIV - col0 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-2923
SELECT + - cor0.col0 * col2 / - col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT + + col2 * col2 AS col0 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT + col2 + + col1 AS col1 FROM tab0 cor0 WHERE NULL IN ( - cor0.col0 + cor0.col0 )
----

query III rowsort
SELECT ALL * FROM tab2 AS cor0 WHERE NOT col2 < NULL
----

query I rowsort
SELECT col1 AS col0 FROM tab0 AS cor0 WHERE NOT - col2 BETWEEN ( NULL ) AND col0
----

query I rowsort
SELECT ALL + col2 - - col2 * col1 FROM tab0 AS cor0 WHERE NULL BETWEEN NULL AND + col1
----

query I rowsort
SELECT - col2 / cor0.col2 FROM tab2 AS cor0 WHERE NOT + col0 <> - col1
----

query I rowsort
SELECT ALL col0 FROM tab1 WHERE NOT + tab1.col2 + - col0 + col0 IN ( col2 * + col1 * col2 )
----
3
64
80

query IIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 WHERE NOT NULL = NULL
----

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT col1 * col1 + col2 * - col0 IN ( tab1.col2 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT ALL + col2 * + col0 * - col1 AS col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT ALL + 82 + + col0 FROM tab0
----
106
117
171

query I rowsort
SELECT ALL col2 * col1 * + 35 FROM tab2
----
22610
29295
53690

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2936
SELECT cor0.col2 + + CAST( - cor0.col2 AS SIGNED ) * + col2 FROM tab0 AS cor0
----
-1056
-6642
0

skipif mysql # not compatible
query I rowsort label-2936
SELECT cor0.col2 + + CAST ( - cor0.col2 AS INTEGER ) * + col2 FROM tab0 AS cor0
----
-1056
-6642
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2937
SELECT DISTINCT - col1 + col0 * 22 - + col0 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2937
SELECT DISTINCT - col1 + col0 * 22 - + col0 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL + - col1 * col0 + + col0 * + cor0.col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col0 * + ( col2 ) FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - col1 * 41 AS col2 FROM tab2 AS cor0
----
-1271
-2419
-697

query I rowsort
SELECT ALL col2 * cor0.col1 + col2 * - col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col0 * - col2 * + col2 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT ALL tab2.col0 * 93 - tab2.col2 FROM tab2
----
624
7228
7309

query I rowsort
SELECT ( 33 ) + + col1 AS col0 FROM tab1
----
43
46
59

query I rowsort
SELECT ALL col2 - tab2.col2 * col0 FROM tab2
----
-162
-2002
-2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-2946
SELECT ALL - col2 DIV 87 FROM tab1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-2946
SELECT ALL - col2 / 87 FROM tab1
----
-1
0
0

query I rowsort
SELECT ALL ( col1 * - col2 ) - + col0 FROM tab2
----
-1612
-725
-844

query I rowsort
SELECT ALL ( 29 ) * + col2 + - 95 - + col1 AS col2 FROM tab2
----
600
657
990

onlyif mysql # use DIV operator for integer division
query I rowsort label-2949
SELECT + col1 - - ( col0 ) DIV + col0 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-2949
SELECT + col1 - - ( col0 ) / + col0 FROM tab1 AS cor0
----
11
14
27

query I rowsort
SELECT - col2 + 11 * col2 + + 14 FROM tab2 AS cor0
----
274
284
394

query I rowsort
SELECT DISTINCT - col2 + cor0.col0 * 47 * + col0 AS col1 FROM tab2 cor0
----
2276
285922
293289

query I rowsort
SELECT ALL - 16 + col1 AS col0 FROM tab0 AS cor0
----
70
75
81

query I rowsort
SELECT DISTINCT 50 + + cor0.col2 FROM tab1 AS cor0
----
104
107
146

query I rowsort
SELECT ALL + - cor0.col0 * col2 + col0 - - col0 FROM tab0 cor0
----
-7120
-744
35

query I rowsort
SELECT ALL + 17 * cor0.col2 * - 19 FROM tab0 AS cor0
----
-10659
-26486
-323

query I rowsort
SELECT - col2 + - cor0.col2 * col2 * col2 FROM tab2 AS cor0
----
-17602
-19710
-54910

onlyif mysql # use DIV operator for integer division
query I rowsort label-2957
SELECT + + cor0.col1 * col1 DIV col0 + ( col1 ) DIV - col1 + - col1 FROM tab1 AS cor0
----
-10
-12
198

skipif mysql # not compatible
query I rowsort label-2957
SELECT + + cor0.col1 * col1 / col0 + ( col1 ) / - col1 + - col1 FROM tab1 AS cor0
----
-10
-12
198

onlyif mysql # use DIV operator for integer division
query I rowsort label-2958
SELECT DISTINCT 21 + col1 DIV + cor0.col0 AS col0 FROM tab0 cor0
----
22
23
24

skipif mysql # not compatible
query I rowsort label-2958
SELECT DISTINCT 21 + col1 / + cor0.col0 AS col0 FROM tab0 cor0
----
22
23
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-2959
SELECT + col2 DIV + col0 AS col2 FROM tab2
----
0
0
3

skipif mysql # not compatible
query I rowsort label-2959
SELECT + col2 / + col0 AS col2 FROM tab2
----
0
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 57 col1 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 0b74bbd7631afe9b2eeb9f18b9dc6505

query I rowsort
SELECT ALL 39 + col0 * col1 AS col0 FROM tab0
----
2103
3434
8138

query I rowsort
SELECT ALL + col0 + - col1 + col1 FROM tab1 AS cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 54 + col0 col2 FROM tab0 AS cor0
----
-19
-30
35

query I rowsort
SELECT - 51 * col2 + col1 * + col2 * col0 FROM tab1 AS cor0
----
1458
33573
94944

query I rowsort
SELECT ALL 27 * col0 AS col0 FROM tab0 cor0
----
2403
648
945

query I rowsort
SELECT col2 * - col2 + col2 AS col0 FROM tab1 AS cor0
----
-2862
-3192
-9120

query I rowsort
SELECT ALL 36 * 83 AS col2 FROM tab2, tab2 AS cor0, tab2 cor1
----
27 values hashing to eacb42756bc6c3a34c93856aeebb90d2

query I rowsort
SELECT ALL 94 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to a4d239626cf0546ac1b2f57bb8407089

query I rowsort
SELECT - + col0 * - ( + 50 ) + - col2 AS col0 FROM tab2 AS cor0
----
323
3874
3912

query I rowsort
SELECT DISTINCT - + col1 + col2 * + col1 FROM tab2 cor0
----
1475
629
806

onlyif mysql # use DIV operator for integer division
query I rowsort label-2971
SELECT - col2 * cor0.col0 + - col1 DIV - cor0.col1 col2 FROM tab2 AS cor0
----
-188
-2027
-3001

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2971
SELECT - col2 * cor0.col0 + - col1 / - cor0.col1 col2 FROM tab2 AS cor0
----
-188
-2027
-3001

query I rowsort
SELECT + ( col2 ) * - 86 + + col1 FROM tab2
----
-2177
-2291
-3251

query I rowsort
SELECT DISTINCT col0 + col2 + - col1 FROM tab0
----
-29
-61
80

query I rowsort
SELECT DISTINCT + 44 + col0 FROM tab1
----
108
124
47

query I rowsort
SELECT col2 * col1 * 99 AS col1 FROM tab0
----
280962
738738
9603

query I rowsort
SELECT ALL + col0 + col1 * tab1.col1 AS col1 FROM tab1
----
164
249
679

onlyif mysql # use DIV operator for integer division
query I rowsort label-2977
SELECT - col2 * - col1 + - 19 + - tab1.col0 DIV - col1 FROM tab1
----
1235
1385
557

skipif mysql # not compatible
query I rowsort label-2977
SELECT - col2 * - col1 + - 19 + - tab1.col0 / - col1 FROM tab1
----
1235
1385
557

query I rowsort
SELECT col2 + - col0 * + col2 * - col1 FROM tab0
----
3396
664200
68145

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * - 18 * col2 col0 FROM tab1 AS cor0
----
-165888
-52488
-58482

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 - + ( + col2 + - 23 ) col0 FROM tab2 cor0
----
2
27
56

query I rowsort
SELECT ALL + 57 * + 81 AS col1 FROM tab0 AS cor0
----
4617
4617
4617

query I rowsort
SELECT ALL + - col2 + - col2 * col2 FROM tab0 AS cor0
----
-1122
-2
-6806

query I rowsort
SELECT ALL + 11 + 84 * col2 FROM tab0 AS cor0
----
2783
6899
95

query I rowsort
SELECT DISTINCT col0 + 69 * cor0.col1 AS col1 FROM tab1 AS cor0
----
1797
754
977

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2985
SELECT DISTINCT + CAST( NULL AS SIGNED ) + + col0 * + col2 AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2985
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + + col0 * + col2 AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL 97 - + col1 FROM tab2 cor0
----
38
66
80

query I rowsort
SELECT 2 + col0 AS col0 FROM tab1 AS cor0
----
5
66
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-2988
SELECT DISTINCT + + col2 + + 72 + - col1 DIV + col1 FROM tab1 AS cor0
----
125
128
167

skipif mysql # not compatible
query I rowsort label-2988
SELECT DISTINCT + + col2 + + 72 + - col1 / + col1 FROM tab1 AS cor0
----
125
128
167

query I rowsort
SELECT tab0.col2 + 46 * - tab0.col1 FROM tab0
----
-3923
-4104
-4461

query I rowsort
SELECT DISTINCT - 19 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
-19

query I rowsort
SELECT ( col1 ) * + col1 + 43 * col0 AS col1 FROM tab1
----
2852
3609
805

query I rowsort
SELECT col0 - + 10 AS col1 FROM tab1
----
-7
54
70

query I rowsort
SELECT DISTINCT - ( col2 ) - col0 FROM tab0
----
-171
-36
-57

query I rowsort
SELECT + - 96 * + col0 + - col0 FROM tab1 cor0
----
-291
-6208
-7760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2995
SELECT ALL CAST( NULL AS SIGNED ) * - col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2995
SELECT ALL CAST ( NULL AS INTEGER ) * - col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 * col1 * cor0.col1 + - col0 + col0 FROM tab0 AS cor0
----
636056
753571
912673

query I rowsort
SELECT DISTINCT - 27 * - col1 + + col2 FROM tab0 AS cor0
----
2355
2539
2620

query I rowsort
SELECT + + ( col0 ) * + col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL 20 * col1 FROM tab2
----
1180
340
620

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3000
SELECT ALL - + ( 71 ) + - col1 + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3000
SELECT ALL - + ( 71 ) + - col1 + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col0 + + 64 AS col2 FROM tab0 AS cor0
----
153
88
99

query I rowsort
SELECT ALL + col1 * ( tab0.col1 + col0 ) * col2 AS col1 FROM tab0
----
12804
1343160
312180

query I rowsort
SELECT - - 73 * + col1 + + col0 * cor0.col1 FROM tab1 AS cor0
----
1370
1976
1989

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3004
SELECT - - col2 * + col1 / + CAST( NULL AS DECIMAL ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3004
SELECT - - col2 * + col1 / + CAST ( NULL AS REAL ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - 22 + - cor0.col1 * + 57 AS col2 FROM tab2 AS cor0
----
-1789
-3385
-991

query I rowsort
SELECT ALL ( + 53 + + col1 ) * col0 AS col2 FROM tab0
----
12816
3336
5250

query I rowsort
SELECT - cor0.col2 + + col2 AS col1 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + 91 + + col0 FROM tab2
----
169
170
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + - tab2.col0 col1 FROM tab2
----
-19
-62
24

query I rowsort
SELECT DISTINCT - col2 * col2 + col1 * ( - col0 ) * 50 FROM tab2
----
-11579
-230776
-68594

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3011
SELECT DISTINCT - col0 + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3011
SELECT DISTINCT - col0 + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + + col1 * col2 * + col1 + col2 FROM tab2 AS cor0
----
11020
25974
90532

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * - col0 + col1 col2 FROM tab2 cor0
----
-18
-6025
-6224

query I rowsort
SELECT DISTINCT - col1 + col1 * cor0.col2 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT col1 * ( + col0 + tab2.col1 ) FROM tab2
----
1178
1632
8083

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 + - col2 col0 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT ALL + + col1 * + 6 * - col2 + col2 AS col1 FROM tab0 AS cor0
----
-16995
-44690
-581

query I rowsort
SELECT ALL - col0 * + 32 FROM tab2 cor0
----
-224
-2496
-2528

query I rowsort
SELECT DISTINCT 44 AS col2 FROM tab2, tab1, tab1 AS cor0, tab0 cor1
----
44

query I rowsort
SELECT ALL + + col1 - col1 * + cor0.col0 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT ALL - col0 * + ( col1 ) + col1 FROM tab1 cor0
----
-1027
-52
-630

query I rowsort
SELECT - - 21 AS col1 FROM tab0 cor0
----
21
21
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-3023
SELECT ALL ( 99 ) - col1 DIV + col0 FROM tab1 AS cor0
----
91
99
99

skipif mysql # not compatible
query I rowsort label-3023
SELECT ALL ( 99 ) - col1 / + col0 FROM tab1 AS cor0
----
91
99
99

query I rowsort
SELECT + tab1.col2 * ( 86 ) AS col1 FROM tab1
----
4644
4902
8256

onlyif mysql # use DIV operator for integer division
query I rowsort label-3025
SELECT + col2 + 79 DIV + col0 AS col0 FROM tab2 AS cor0
----
27
38
39

skipif mysql # not compatible
query I rowsort label-3025
SELECT + col2 + 79 / + col0 AS col0 FROM tab2 AS cor0
----
27
38
39

query I rowsort
SELECT ALL 20 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

query I rowsort
SELECT + - ( - 71 ) + + col2 * - 35 FROM tab2 AS cor0
----
-1259
-839
-874

query I rowsort
SELECT + - cor0.col2 * col0 * - cor0.col0 + 85 * + ( cor0.col1 ) FROM tab0 AS cor0
----
26318
657257
9470

query I rowsort
SELECT DISTINCT col1 * + col2 + col1 * col1 FROM tab1 cor0
----
1417
2080
670

query I rowsort
SELECT + 90 + 86 AS col1 FROM tab0 AS cor0
----
176
176
176

query I rowsort
SELECT - - 40 + col2 FROM tab2 AS cor0
----
66
67
78

query I rowsort
SELECT - 79 + col1 * col2 * + ( col2 ) FROM tab1 AS cor0
----
119729
32411
75737

query I rowsort
SELECT ALL tab1.col2 + + 21 FROM tab1, tab1 cor0
----
9 values hashing to c301dd6dc3b92c26477525b2c4d49c33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - col1 * - 4 col0 FROM tab0 AS cor0
----
430
455
485

query I rowsort
SELECT - + 13 * - col0 FROM tab0 AS cor0
----
1157
312
455

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + col2 ) + col2 * - cor0.col2 col1 FROM tab2 AS cor0
----
-1406
-650
-702

query I rowsort
SELECT + - col0 * - 68 + - 63 FROM tab2 AS cor0
----
413
5241
5309

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3038
SELECT - - col1 - CAST( NULL AS DECIMAL ) * - col1 col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3038
SELECT - - col1 - CAST ( NULL AS REAL ) * - col1 col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - col2 * 21 AS col0 FROM tab2 AS cor0
----
546
567
798

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3040
SELECT DISTINCT - col2 + - col2 * CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3040
SELECT DISTINCT - col2 + - col2 * CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3041
SELECT - ( - col1 ) DIV + 79 + + cor0.col0 * + col1 * + cor0.col2 FROM tab1 AS cor0
----
36480
4212
99840

skipif mysql # not compatible
query I rowsort label-3041
SELECT - ( - col1 ) / + 79 + + cor0.col0 * + col1 * + cor0.col2 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT ALL - col2 * col1 * + cor0.col0 AS col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-3043
SELECT ALL col1 DIV - col2 + - cor0.col1 + col2 AS col2 FROM tab1 AS cor0
----
28
47
83

skipif mysql # not compatible
query I rowsort label-3043
SELECT ALL col1 / - col2 + - cor0.col1 + col2 AS col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT DISTINCT + 73 FROM tab1 cor0
----
73

query I rowsort
SELECT DISTINCT - - col2 + cor0.col0 FROM tab0 cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-3046
SELECT ALL - 88 * - cor0.col1 + - 66 + + 50 DIV + col1 FROM tab2 AS cor0
----
1432
2663
5126

skipif mysql # not compatible
query I rowsort label-3046
SELECT ALL - 88 * - cor0.col1 + - 66 + + 50 / + col1 FROM tab2 AS cor0
----
1432
2663
5126

query I rowsort
SELECT 77 + - col0 FROM tab1 AS cor0
----
-3
13
74

query I rowsort
SELECT DISTINCT ( col2 ) * ( col1 ) FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3049
SELECT - + col2 * col2 + - cor0.col2 DIV col1 FROM tab2 cor0
----
-1446
-676
-729

skipif mysql # not compatible
query I rowsort label-3049
SELECT - + col2 * col2 + - cor0.col2 / col1 FROM tab2 cor0
----
-1446
-676
-729

onlyif mysql # use DIV operator for integer division
query I rowsort label-3050
SELECT + 75 - col0 DIV + col2 FROM tab1 AS cor0
----
74
75
75

skipif mysql # not compatible
query I rowsort label-3050
SELECT + 75 - col0 / + col2 FROM tab1 AS cor0
----
74
75
75

query I rowsort
SELECT ALL + 38 * col1 AS col1 FROM tab2 AS cor0
----
1178
2242
646

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col1 * - col1 + + col2 col2 FROM tab1 AS cor0
----
-43
-622
-73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 + col2 col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + - ( - col2 ) * 4 + - col0 FROM tab2 AS cor0
----
101
26
73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3055
SELECT ALL CAST( NULL AS SIGNED ) - + tab1.col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3055
SELECT ALL CAST ( NULL AS INTEGER ) - + tab1.col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 8 + col0 FROM tab1 AS cor0
----
-5
56
72

query I rowsort
SELECT ALL + 10 + - cor0.col1 FROM tab2 AS cor0
----
-21
-49
-7

query I rowsort
SELECT 61 + cor0.col0 * - col2 + + col2 * col2 FROM tab1 AS cor0
----
-338
1597
2815

query I rowsort
SELECT DISTINCT - col1 * + 96 FROM tab1 AS cor0
----
-1248
-2496
-960

query I rowsort
SELECT + - col2 * col1 * 48 AS col2 FROM tab2 AS cor0
----
-31008
-40176
-73632

query I rowsort
SELECT ALL - 23 * col2 + ( + tab1.col2 ) + col1 * col0 FROM tab1
----
-1072
-1110
-614

query I rowsort
SELECT 17 + col2 AS col1 FROM tab0
----
18
50
99

query I rowsort
SELECT ALL col2 + + col2 * + tab0.col1 AS col2 FROM tab0
----
2871
7544
98

query I rowsort
SELECT DISTINCT - + 0 * col1 + col2 + 76 FROM tab1 AS cor0
----
130
133
172

query I rowsort
SELECT DISTINCT + - 30 * col0 * - col1 - 86 * - ( - col0 ) AS col0 FROM tab1 cor0
----
13696
2082
24320

query I rowsort
SELECT DISTINCT + - col1 * + cor0.col2 + cor0.col0 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT 32 * + cor0.col0 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to b021124a67f03bd690bf85089039c654

query I rowsort
SELECT - - 64 * + col1 FROM tab1 AS cor0
----
1664
640
832

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3069
SELECT CAST( NULL AS DECIMAL ) * 31 FROM tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab1 cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-3069
SELECT CAST ( NULL AS REAL ) * 31 FROM tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab1 cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT 16 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to ee5bde9f68ee828e8cd86b0d590090bc

query I rowsort
SELECT ALL - tab1.col1 * + ( tab1.col0 ) FROM tab1
----
-1040
-640
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3072
SELECT + col1 + + col2 * col2 + CAST( NULL AS SIGNED ) * - col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3072
SELECT + col1 + + col2 * col2 + CAST ( NULL AS INTEGER ) * - col1 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3073
SELECT ALL ( col2 ) DIV col0 - - ( - col2 + - col1 ) FROM tab1
----
-108
-62
-67

skipif mysql # not compatible
query I rowsort label-3073
SELECT ALL ( col2 ) / col0 - - ( - col2 + - col1 ) FROM tab1
----
-108
-62
-67

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3074
SELECT ALL + CAST( NULL AS DECIMAL ) + col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3074
SELECT ALL + CAST ( NULL AS REAL ) + col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 + - 51 + - col0 FROM tab1 AS cor0
----
-51
-51
-51

query I rowsort
SELECT - ( - col0 ) + col2 AS col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT + ( - col2 ) * col0 * - 49 FROM tab1
----
178752
376320
7938

query I rowsort
SELECT - col0 * col2 + - col0 AS col0 FROM tab1
----
-165
-3712
-7760

query I rowsort
SELECT - ( - 84 ) + - col1 * 53 * - col1 AS col0 FROM tab0
----
392072
438977
498761

query I rowsort
SELECT - col1 + + 58 * col0 FROM tab0 AS cor0
----
1306
1933
5071

query I rowsort
SELECT DISTINCT - + cor0.col0 * 17 + - col1 AS col0 FROM tab1 cor0
----
-1098
-1373
-77

query I rowsort
SELECT ALL - + ( col1 ) + cor0.col1 * + ( - col1 + col2 ) FROM tab0 AS cor0
----
-4644
-910
-9409

query I rowsort
SELECT DISTINCT + - 3 AS col0 FROM tab0 AS cor0
----
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 79 * - col0 * + 93 + cor0.col1 * col2 col0 FROM tab1 cor0
----
23445
470778
589008

query I rowsort
SELECT - 6 * col0 + 25 * cor0.col1 AS col1 FROM tab1 AS cor0
----
-134
-155
632

query I rowsort
SELECT - 72 * - col0 + col2 AS col1 FROM tab0 AS cor0
----
1761
2521
6490

query I rowsort
SELECT DISTINCT + col0 + col2 * col2 AS col1 FROM tab1 AS cor0
----
2919
3313
9296

onlyif mysql # use DIV operator for integer division
query I rowsort label-3088
SELECT 38 DIV col0 FROM tab0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-3088
SELECT 38 / col0 FROM tab0
----
0
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3089
SELECT + col1 * col2 DIV ( col1 ) AS col1 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-3089
SELECT + col1 * col2 / ( col1 ) AS col1 FROM tab2
----
26
27
38

query I rowsort
SELECT - - col1 + col2 * - 89 AS col1 FROM tab0 AS cor0
----
-2851
-7207
8

query I rowsort
SELECT - col2 + - col2 * ( - col2 ) * col1 FROM tab1 AS cor0
----
119712
32433
75762

onlyif mysql # use DIV operator for integer division
query I rowsort label-3092
SELECT DISTINCT + + col2 DIV - col2 + col1 FROM tab0 AS cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-3092
SELECT DISTINCT + + col2 / - col2 + col1 FROM tab0 AS cor0
----
85
90
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + + ( + col0 ) * col1 * col2 col0 FROM tab0 cor0
----
3360
664029
68088

query I rowsort
SELECT cor1.col1 AS col2 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

onlyif mysql # use DIV operator for integer division
query I rowsort label-3095
SELECT + cor0.col1 DIV - cor0.col1 AS col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3095
SELECT + cor0.col1 / - cor0.col1 AS col0 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - + cor0.col2 * cor0.col2 FROM tab2 cor0
----
-1444
-676
-729

query I rowsort
SELECT ALL col1 + col0 * + col1 AS col2 FROM tab0 AS cor0
----
2150
3492
8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-3098
SELECT DISTINCT - - col2 + 29 * col2 DIV col0 AS col2 FROM tab0 AS cor0
----
1
108
72

skipif mysql # not compatible
query I rowsort label-3098
SELECT DISTINCT - - col2 + 29 * col2 / col0 AS col2 FROM tab0 AS cor0
----
1
108
72

query I rowsort
SELECT ALL + - 95 AS col1 FROM tab0 cor0
----
-95
-95
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-3100
SELECT + 8 + col0 DIV col1 AS col1 FROM tab1 AS cor0
----
14
14
8

skipif mysql # not compatible
query I rowsort label-3100
SELECT + 8 + col0 / col1 AS col1 FROM tab1 AS cor0
----
14
14
8

query I rowsort
SELECT + + col0 * col2 * - cor0.col2 AS col2 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT ALL - 79 * 99 FROM tab1 cor0
----
-7821
-7821
-7821

query I rowsort
SELECT DISTINCT - + ( 86 ) FROM tab0 AS cor0
----
-86

query I rowsort
SELECT ALL + ( col1 * ( col1 ) + + col2 ) FROM tab1
----
157
265
730

query I rowsort
SELECT ALL 73 FROM tab1 cor0
----
73
73
73

query I rowsort
SELECT ALL + cor0.col2 + col2 * ( col0 ) FROM tab0 AS cor0
----
36
7380
825

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col0 * col0 col0 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT col1 * col0 + + 96 + - 86 AS col2 FROM tab0 AS cor0
----
2074
3405
8109

query I rowsort
SELECT 12 + col1 + col2 AS col0 FROM tab0 cor0
----
110
131
185

onlyif mysql # use DIV operator for integer division
query I rowsort label-3110
SELECT + col2 DIV + 25 FROM tab0 AS cor0
----
0
1
3

skipif mysql # not compatible
query I rowsort label-3110
SELECT + col2 / + 25 FROM tab0 AS cor0
----
0
1
3

query I rowsort
SELECT cor0.col2 + col0 * - col1 AS col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT - 12 * - col0 FROM tab0
----
1068
288
420

onlyif mysql # use DIV operator for integer division
query I rowsort label-3113
SELECT ALL - 10 DIV - col0 col2 FROM tab2
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3113
SELECT ALL - 10 / - col0 col2 FROM tab2
----
0
0
1

query I rowsort
SELECT col1 + + col1 * - 82 * + col1 AS col0 FROM tab2 AS cor0
----
-23681
-285383
-78771

query I rowsort
SELECT ALL + col1 + col2 + col2 FROM tab2 AS cor0
----
111
85
93

query I rowsort
SELECT - col1 + - col2 * col2 AS col1 FROM tab2 cor0
----
-1461
-735
-760

query I rowsort
SELECT + col1 - + 74 FROM tab1 AS cor0
----
-48
-61
-64

query I rowsort
SELECT DISTINCT + - col2 * col2 * cor0.col1 + cor0.col2 + + ( + cor0.col2 ) AS col1 FROM tab1 AS cor0
----
-119616
-32376
-75708

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3119
SELECT ALL + CAST( - col2 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-3119
SELECT ALL + CAST ( - col2 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT + 33 * - col2 + - cor0.col2 FROM tab0 AS cor0
----
-1122
-2788
-34

query I rowsort
SELECT - cor0.col2 * + col0 + col2 AS col0 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT DISTINCT + - col1 + col2 * - col2 * col1 FROM tab1 cor0
----
-119821
-32500
-75842

query I rowsort
SELECT ALL - + 19 + col1 * col1 FROM tab1 AS cor0
----
150
657
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-3124
SELECT - - col0 DIV - col0 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3124
SELECT - - col0 / - col0 FROM tab1 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3125
SELECT + ( - ( + col2 DIV 82 ) ) * - 42 DIV - col1 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3125
SELECT + ( - ( + col2 / 82 ) ) * - 42 / - col1 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * col1 * col1 + cor0.col1 + + cor0.col2 * cor0.col2 col2 FROM tab2 AS cor0
----
-25187
-89771
-9521

query I rowsort
SELECT DISTINCT tab2.col2 + 91 * col0 AS col0 FROM tab2
----
664
7124
7227

query I rowsort
SELECT - ( col0 ) * col2 - - ( col0 ) * col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + + col2 + col0 * col1 FROM tab1 cor0
----
1136
132
697

onlyif mysql # use DIV operator for integer division
query I rowsort label-3130
SELECT ALL - col2 - col2 DIV 84 FROM tab1 cor0
----
-54
-57
-97

skipif mysql # not compatible
query I rowsort label-3130
SELECT ALL - col2 - col2 / 84 FROM tab1 cor0
----
-54
-57
-97

query I rowsort
SELECT + + col1 + col1 AS col2 FROM tab0 cor0
----
172
182
194

query I rowsort
SELECT DISTINCT - - col1 * - cor0.col0 + - 43 AS col1 FROM tab1 AS cor0
----
-1083
-121
-683

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 45 col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 60b9f935ee8e404d155a2f5e9515c050

query I rowsort
SELECT 38 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to a7827a79248ee7bf2cee915a631d02cb

query I rowsort
SELECT 3 * col0 AS col1 FROM tab1
----
192
240
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 88 col1 FROM tab1
----
-88
-88
-88

query I rowsort
SELECT + + 77 + - col2 FROM tab2 AS cor0
----
39
50
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + tab1.col0 col2 FROM tab1
----
4096
6400
9

query I rowsort
SELECT cor0.col2 * - col0 + 83 AS col0 FROM tab1 cor0
----
-3565
-7597
-79

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 CROSS JOIN tab2, tab2 AS cor1, tab1 AS cor2, tab1 AS cor3
----
3645 values hashing to 6156c969b7e054b8a333fdb86aee82f2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col2 col0 FROM tab1, tab2 cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT DISTINCT + col0 * ( col1 ) AS col2 FROM tab2
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - 89 ) col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 924a74d31360fa4301c953b423a4710e

query I rowsort
SELECT ALL - tab2.col2 * 78 AS col1 FROM tab2
----
-2028
-2106
-2964

query I rowsort
SELECT - + 80 + 90 FROM tab0 AS cor0
----
10
10
10

query I rowsort
SELECT - + 77 FROM tab0 cor0
----
-77
-77
-77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3147
SELECT CAST( + col0 + + tab1.col0 * + 41 AS SIGNED ) AS col2 FROM tab1
----
126
2688
3360

skipif mysql # not compatible
query I rowsort label-3147
SELECT CAST ( + col0 + + tab1.col0 * + 41 AS INTEGER ) AS col2 FROM tab1
----
126
2688
3360

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3148
SELECT - cor0.col0 * CAST( NULL AS DECIMAL ) - ( cor0.col1 + col0 ) / - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3148
SELECT - cor0.col0 * CAST ( NULL AS REAL ) - ( cor0.col1 + col0 ) / - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3149
SELECT DISTINCT tab1.col1 DIV col2 + col0 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-3149
SELECT DISTINCT tab1.col1 / col2 + col0 FROM tab1
----
3
64
80

query I rowsort
SELECT col2 * - 68 FROM tab1 AS cor0
----
-3672
-3876
-6528

query I rowsort
SELECT + + cor0.col2 + col0 * - col0 * + col2 AS col0 FROM tab2 AS cor0
----
-1296
-158158
-237120

onlyif mysql # use DIV operator for integer division
query I rowsort label-3152
SELECT DISTINCT + col0 + + 45 DIV 59 AS col2 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-3152
SELECT DISTINCT + col0 + + 45 / 59 AS col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT - cor0.col1 + 32 FROM tab0 AS cor0
----
-54
-59
-65

query I rowsort
SELECT DISTINCT + + cor0.col0 + ( - col2 + col0 ) FROM tab2 AS cor0
----
-13
120
130

query I rowsort
SELECT col2 * 31 FROM tab1 AS cor0
----
1674
1767
2976

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3156
SELECT DISTINCT col1 * CAST( - col1 AS SIGNED ) FROM tab2 AS cor0
----
-289
-3481
-961

skipif mysql # not compatible
query I rowsort label-3156
SELECT DISTINCT col1 * CAST ( - col1 AS INTEGER ) FROM tab2 AS cor0
----
-289
-3481
-961

onlyif mysql # use DIV operator for integer division
query I rowsort label-3157
SELECT ALL - col0 + col1 DIV col0 AS col1 FROM tab0 AS cor0
----
-21
-33
-88

skipif mysql # not compatible
query I rowsort label-3157
SELECT ALL - col0 + col1 / col0 AS col1 FROM tab0 AS cor0
----
-21
-33
-88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * ( + col1 ) col0 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT DISTINCT 50 * col0 + col0 FROM tab0 AS cor0
----
1224
1785
4539

query I rowsort
SELECT DISTINCT + ( - col1 ) + col1 AS col1 FROM tab2 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3161
SELECT - + col2 * col1 + - col1 DIV - ( + col2 ) AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort label-3161
SELECT - + col2 * col1 + - col1 / - ( + col2 ) AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT - 44 + col2 + col2 AS col1 FROM tab0 AS cor0
----
-42
120
22

query I rowsort
SELECT - 27 FROM tab2, tab1 AS cor0
----
9 values hashing to 90b76caf54a4e48ee4a9784f52997a6a

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( - col1 AS REAL ) * - col2 * cor0.col2 FROM tab1 cor0
----
119808
32490
75816

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3165
SELECT + col2 + 61 + col1 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3165
SELECT + col2 + 61 + col1 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 31 col2 FROM tab1, tab2 cor0
----
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col1 col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab0 cor2
----
972 values hashing to e4c748f267e8d2a0e6d563281e1fb975

query I rowsort
SELECT DISTINCT - 92 AS col1 FROM tab0, tab2 AS cor0
----
-92

query I rowsort
SELECT + ( + col1 ) * - col0 + + col1 * - col2 FROM tab1
----
-1210
-1482
-2288

query I rowsort
SELECT - 43 * - 40 + - cor0.col0 FROM tab2, tab0 cor0, tab0 AS cor1
----
27 values hashing to f1b05366e6d7a4379216c28f797442c5

query I rowsort
SELECT ALL ( - col1 * col1 + - 55 ) FROM tab0
----
-7451
-8336
-9464

query I rowsort
SELECT + 25 AS col2 FROM tab0, tab2, tab2 cor0
----
27 values hashing to 2c77240b60ac01c717a5ed5d0165f450

query I rowsort
SELECT - cor0.col0 + - cor0.col2 * col0 AS col2 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT - 49 * + cor1.col1 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 0afb901e338e7637096c4b889a6dba1d

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( 34 AS REAL ) FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
34

query I rowsort
SELECT - col0 + - ( - col0 ) FROM tab0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3178
SELECT ALL + tab1.col1 * CAST( NULL AS SIGNED ) AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3178
SELECT ALL + tab1.col1 * CAST ( NULL AS INTEGER ) AS col0 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3179
SELECT ALL col1 DIV col0 AS col2 FROM tab1 cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-3179
SELECT ALL col1 / col0 AS col2 FROM tab1 cor0
----
0
0
8

query I rowsort
SELECT DISTINCT 43 AS col1 FROM tab1, tab0 AS cor0, tab1 AS cor1, tab0, tab1 AS cor2
----
43

query I rowsort
SELECT DISTINCT + - col1 * + col2 + + 56 AS col0 FROM tab0 AS cor0
----
-2782
-41
-7406

query I rowsort
SELECT DISTINCT - col2 + - 2 + + col2 FROM tab1
----
-2

query I rowsort
SELECT ( ( - col2 ) ) * + ( - col0 ) + col1 - ( - col2 ) AS col0 FROM tab0
----
133
7471
911

onlyif mysql # use DIV operator for integer division
query I rowsort label-3184
SELECT DISTINCT - tab1.col2 + - col2 DIV col1 FROM tab1
----
-103
-56
-62

skipif mysql # not compatible
query I rowsort label-3184
SELECT DISTINCT - tab1.col2 + - col2 / col1 FROM tab1
----
-103
-56
-62

query I rowsort
SELECT col0 - - col1 AS col2 FROM tab0
----
110
132
180

query I rowsort
SELECT ALL ( - col1 ) + + col2 * col1 AS col0 FROM tab1
----
1235
1378
560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col1 ) col2 FROM tab0
----
86
91
97

query I rowsort
SELECT DISTINCT - tab2.col0 + 20 FROM tab2
----
-58
-59
13

query I rowsort
SELECT ALL col0 + 93 FROM tab2 AS cor0
----
100
171
172

query I rowsort
SELECT - col2 + + col2 + col2 AS col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT - ( col2 ) + col2 * + col1 AS col2 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT - col0 * col0 * col2 AS col0 FROM tab2
----
-1323
-158184
-237158

onlyif mysql # use DIV operator for integer division
query I rowsort label-3193
SELECT - tab0.col2 * - col1 * col1 + - col2 DIV col2 AS col0 FROM tab0
----
244067
679041
9408

skipif mysql # not compatible
query I rowsort label-3193
SELECT - tab0.col2 * - col1 * col1 + - col2 / col2 AS col0 FROM tab0
----
244067
679041
9408

query I rowsort
SELECT ALL cor0.col2 * + col2 + + col0 AS col0 FROM tab1 cor0
----
2919
3313
9296

onlyif mysql # use DIV operator for integer division
query I rowsort label-3195
SELECT - - col0 * - col1 + - col0 DIV 76 + + cor0.col0 FROM tab0 AS cor0
----
-2040
-3360
-8011

skipif mysql # not compatible
query I rowsort label-3195
SELECT - - col0 * - col1 + - col0 / 76 + + cor0.col0 FROM tab0 AS cor0
----
-2040
-3360
-8011

query I rowsort
SELECT DISTINCT - col0 + + col1 - + 21 AS col1 FROM tab0 AS cor0
----
-19
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 37 * - col2 * tab2.col1 col1 FROM tab2
----
-23902
-30969
-56758

query I rowsort
SELECT ALL - + 38 + col2 + ( - ( - col1 ) ) AS col1 FROM tab0 AS cor0
----
135
60
81

query I rowsort
SELECT DISTINCT - 43 AS col2 FROM tab0 cor0
----
-43

query I rowsort
SELECT + - cor0.col1 * col0 + - cor0.col0 FROM tab0 AS cor0
----
-2088
-3430
-8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-3201
SELECT col1 * + col1 + + col2 DIV col2 col2 FROM tab1
----
101
170
677

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3201
SELECT col1 * + col1 + + col2 / col2 col2 FROM tab1
----
101
170
677

query I rowsort
SELECT + + col1 - cor0.col0 AS col2 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT + 49 FROM tab0, tab1 AS cor0
----
49

query I rowsort
SELECT col0 + col2 + col1 * col0 FROM tab1
----
1216
135
761

query I rowsort
SELECT ( + 62 ) * col0 AS col2 FROM tab2
----
434
4836
4898

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 51 col1 FROM tab2
----
-51
-51
-51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col1 * col2 + - col1 col2 FROM tab1 AS cor0
----
-16237
-36530
-5710

query I rowsort
SELECT col1 - + 54 * - col2 FROM tab1 AS cor0
----
2942
3088
5197

query I rowsort
SELECT + 91 + ( cor0.col1 ) FROM tab2 cor0
----
108
122
150

query I rowsort
SELECT DISTINCT 98 FROM tab1, tab0, tab1 AS cor0
----
98

query I rowsort
SELECT DISTINCT - - col2 * col1 * 64 AS col0 FROM tab1 AS cor0
----
36480
79872
89856

query I rowsort
SELECT DISTINCT + cor0.col2 + - col0 FROM tab0 cor0
----
-34
-7
9

query I rowsort
SELECT ALL + - col1 - + col1 AS col2 FROM tab1 cor0
----
-20
-26
-52

query I rowsort
SELECT - col1 + col2 * col2 AS col0 FROM tab0 AS cor0
----
-96
1003
6633

onlyif mysql # use DIV operator for integer division
query I rowsort label-3215
SELECT DISTINCT + + cor0.col1 - + ( - cor0.col1 + + col2 ) DIV col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-3215
SELECT DISTINCT + + cor0.col1 - + ( - cor0.col1 + + col2 ) / col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL - col1 + - ( col2 + col0 ) AS col1 FROM tab2 AS cor0
----
-134
-163
-65

query I rowsort
SELECT DISTINCT + 99 AS col1 FROM tab0, tab1, tab1 AS cor0
----
99

query I rowsort
SELECT ALL 21 AS col2 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 312c166f4dc412730c43555105b1f44b

query I rowsort
SELECT - col1 * + col1 + + col1 AS col1 FROM tab0
----
-7310
-8190
-9312

onlyif mysql # use DIV operator for integer division
query I rowsort label-3220
SELECT - col1 DIV col0 col1 FROM tab2 AS cor0
----
-4
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3220
SELECT - col1 / col0 col1 FROM tab2 AS cor0
----
-4
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3221
SELECT ALL tab0.col2 * col2 DIV col2 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-3221
SELECT ALL tab0.col2 * col2 / col2 FROM tab0
----
1
33
82

query I rowsort
SELECT - cor0.col1 + + col1 * col0 FROM tab2 cor0
----
1326
186
4543

query I rowsort
SELECT ALL - + col1 * cor0.col2 * col1 AS col1 FROM tab1 AS cor0
----
-16224
-36504
-5700

query I rowsort
SELECT + + col2 * col0 - col0 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT DISTINCT tab1.col2 * + col0 * + col0 AS col1 FROM tab1
----
233472
486
614400

query I rowsort
SELECT col2 * col2 - col0 * tab0.col0 AS col0 FROM tab0
----
-1197
-1224
513

query I rowsort
SELECT DISTINCT - col0 * col0 * + col2 FROM tab2
----
-1323
-158184
-237158

query I rowsort
SELECT + col1 * col2 + - col1 AS col1 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT cor0.col1 * + col0 + + col0 FROM tab0 AS cor0
----
2088
3430
8188

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3230
SELECT CAST( ( col1 ) AS SIGNED ) AS col2 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-3230
SELECT CAST ( ( col1 ) AS INTEGER ) AS col2 FROM tab2
----
17
31
59

query I rowsort
SELECT ALL + 45 + - col1 AS col1 FROM tab2 AS cor0
----
-14
14
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-3232
SELECT + 12 DIV col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3232
SELECT + 12 / col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 58 * col1 + col1 * - col1 FROM tab0 cor0
----
-2408
-3003
-3783

query I rowsort
SELECT - col0 * + cor0.col1 * cor0.col1 FROM tab2 AS cor0
----
-22831
-271518
-6727

query I rowsort
SELECT DISTINCT 18 * + col2 AS col1 FROM tab2
----
468
486
684

query I rowsort
SELECT 88 * col0 AS col2 FROM tab2 AS cor0
----
616
6864
6952

query I rowsort
SELECT DISTINCT - col1 + - col0 + + col1 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT + 19 + col2 FROM tab2
----
45
46
57

query I rowsort
SELECT ( col1 ) + - col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT ( tab1.col1 ) - + ( 89 ) FROM tab1, tab1 cor0
----
9 values hashing to 5053594bb210a454b1b9b1b30b74cc8e

query I rowsort
SELECT ALL + tab2.col0 FROM tab2, tab0, tab1 AS cor0, tab0 cor1
----
81 values hashing to 05835f29dd9cd4fa16889de54dec3cb6

query I rowsort
SELECT 44 + - 45 FROM tab2
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3243
SELECT ALL - + col0 + col0 DIV - col1 + cor0.col1 FROM tab1 AS cor0
----
-60
-73
23

skipif mysql # not compatible
query I rowsort label-3243
SELECT ALL - + col0 + col0 / - col1 + cor0.col1 FROM tab1 AS cor0
----
-60
-73
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-3244
SELECT DISTINCT col0 DIV cor0.col0 - - col0 AS col1 FROM tab1 AS cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-3244
SELECT DISTINCT col0 / cor0.col0 - - col0 AS col1 FROM tab1 AS cor0
----
4
65
81

query I rowsort
SELECT DISTINCT - col2 + col1 - col1 * + ( - 30 * - col2 ) FROM tab1 cor0
----
-17147
-37523
-42148

query I rowsort
SELECT DISTINCT + 7 + - col0 * ( cor0.col1 ) * - col0 AS col2 FROM tab2 AS cor0
----
106104
1526
358963

query I rowsort
SELECT + 54 * col1 + cor0.col0 FROM tab2 AS cor0
----
1681
3264
997

query I rowsort
SELECT DISTINCT - 10 * + cor0.col0 FROM tab1 AS cor0
----
-30
-640
-800

query I rowsort
SELECT ALL - - col1 + - cor0.col2 + - col1 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT + col0 - + col1 * cor0.col2 * - col1 AS col1 FROM tab2 AS cor0
----
11061
25954
90584

query I rowsort
SELECT col1 * col0 + - tab1.col0 FROM tab1
----
576
75
960

onlyif mysql # use DIV operator for integer division
query I rowsort label-3252
SELECT DISTINCT + cor0.col0 + col0 DIV col0 FROM tab2 AS cor0
----
79
8
80

skipif mysql # not compatible
query I rowsort label-3252
SELECT DISTINCT + cor0.col0 + col0 / col0 FROM tab2 AS cor0
----
79
8
80

query I rowsort
SELECT ALL 56 * - col1 AS col1 FROM tab0 cor0
----
-4816
-5096
-5432

query I rowsort
SELECT ALL - + 97 + col1 + ( + col2 + + col0 ) * 49 * col2 AS col2 FROM tab2 AS cor0
----
132458
217774
44916

query I rowsort
SELECT DISTINCT col0 + - col1 + 77 AS col2 FROM tab2
----
139
53
96

query I rowsort
SELECT + cor0.col0 + 29 AS col0 FROM tab2 AS cor0
----
107
108
36

query I rowsort
SELECT - col0 + - ( col2 ) + col0 * - col2 AS col2 FROM tab0 AS cor0
----
-71
-7469
-849

query I rowsort
SELECT - col0 * + 40 + - col0 AS col0 FROM tab2 AS cor0
----
-287
-3198
-3239

query I rowsort
SELECT + col2 + - col0 + + col1 FROM tab0 AS cor0
----
63
84
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-3260
SELECT DISTINCT + col0 DIV - col1 + - ( col0 ) AS col1 FROM tab2 AS cor0
----
-7
-79
-83

skipif mysql # not compatible
query I rowsort label-3260
SELECT DISTINCT + col0 / - col1 + - ( col0 ) AS col1 FROM tab2 AS cor0
----
-7
-79
-83

query I rowsort
SELECT + - cor0.col0 + - col1 AS col1 FROM tab0 AS cor0
----
-110
-132
-180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab1, tab1 cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT DISTINCT + col2 * - 9 * cor0.col2 - col1 FROM tab0 AS cor0
----
-106
-60607
-9887

query I rowsort
SELECT ( cor0.col2 ) FROM tab0, tab1 AS cor0, tab2 AS cor1, tab2 AS cor2
----
81 values hashing to 9d355f1f2edc347a359dad00d2d3f886

query I rowsort
SELECT ALL ( - 30 ) + col2 * 70 FROM tab0 AS cor0
----
2280
40
5710

query I rowsort
SELECT - ( - cor0.col0 ) AS col0 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT ALL - col0 * + 81 FROM tab0 cor0
----
-1944
-2835
-7209

query I rowsort
SELECT ( - col2 ) * - col1 AS col0 FROM tab1 AS cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 51 * col1 col0 FROM tab0 AS cor0
----
4386
4641
4947

query I rowsort
SELECT DISTINCT - 50 + + col1 FROM tab0 AS cor0
----
36
41
47

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3271
SELECT + col2 + ( + col2 ) / + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3271
SELECT + col2 + ( + col2 ) / + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 72 + cor0.col1 + col1 * - ( col0 ) AS col1 FROM tab0 cor0
----
-2050
-3370
-8080

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + + cor0.col2 col2 FROM tab2 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3274
SELECT ALL + - 65 + + col0 DIV cor0.col2 AS col2 FROM tab1 AS cor0
----
-64
-65
-65

skipif mysql # not compatible
query I rowsort label-3274
SELECT ALL + - 65 + + col0 / cor0.col2 AS col2 FROM tab1 AS cor0
----
-64
-65
-65

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3275
SELECT - CAST( NULL AS SIGNED ) + col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3275
SELECT - CAST ( NULL AS INTEGER ) + col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + col2 * + col1 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT ALL + ( - col0 ) * col2 + 21 AS col2 FROM tab1 AS cor0
----
-141
-3627
-7659

query I rowsort
SELECT ALL + + col2 * 11 + - col0 AS col2 FROM tab0 AS cor0
----
-24
339
813

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 39 + ( col1 ) col2 FROM tab0 AS cor0
----
125
130
136

query I rowsort
SELECT - + col1 * + col2 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT + - col2 + + col0 * col1 FROM tab1 cor0
----
24
583
944

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3282
SELECT + - col1 + CAST( NULL AS DECIMAL ) * 78 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3282
SELECT + - col1 + CAST ( NULL AS REAL ) * 78 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 - + col0 * + col0 FROM tab0 AS cor0
----
-1260
-600
-8010

query I rowsort
SELECT DISTINCT - col1 * - 16 FROM tab2 AS cor0
----
272
496
944

query I rowsort
SELECT + col0 + 3 AS col2 FROM tab2 cor0
----
10
81
82

query I rowsort
SELECT DISTINCT + cor0.col1 + 81 + col0 FROM tab2 AS cor0
----
119
177
218

query I rowsort
SELECT DISTINCT + col1 * 20 + col0 FROM tab1
----
264
340
523

query I rowsort
SELECT DISTINCT - col0 * + 44 * + col1 + + col1 AS col0 FROM tab0
----
-149283
-356265
-90730

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + tab2.col2 ) col1 FROM tab2, tab1 cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT + col2 * - ( 13 ) * + col2 AS col0 FROM tab2
----
-18772
-8788
-9477

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3291
SELECT col2 + CAST( NULL AS SIGNED ) AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3291
SELECT col2 + CAST ( NULL AS INTEGER ) AS col0 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3292
SELECT ALL - col2 + CAST( NULL AS SIGNED ) AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3292
SELECT ALL - col2 + CAST ( NULL AS INTEGER ) AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 + ( - 6 ) * col2 FROM tab1 AS cor0
----
-270
-285
-480

query I rowsort
SELECT ( + ( + tab0.col1 ) * cor0.col0 ) + 7 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 8e639bf578956b1301e5b587b2f30fc7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3295
SELECT col0 * ( + col2 + + col2 ) * - CAST( NULL AS SIGNED ) AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3295
SELECT col0 * ( + col2 + + col2 ) * - CAST ( NULL AS INTEGER ) AS col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 * - col2 * col2 AS col1 FROM tab1 AS cor0
----
-119808
-32490
-75816

query I rowsort
SELECT + ( - 95 ) AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 1c7934db0632c123332c43f17b661d6c

query I rowsort
SELECT + col0 * + col0 * + ( - col2 ) FROM tab2
----
-1323
-158184
-237158

query I rowsort
SELECT ALL - - 87 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 8661ffbd1a72897c495405c53b816e50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 0 col1 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT - 52 * - 66 + - col2 AS col2 FROM tab0
----
3350
3399
3431

query I rowsort
SELECT DISTINCT ( - col0 * col2 ) FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT tab0.col2 + 52 FROM tab0
----
134
53
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3304
SELECT DISTINCT - CAST( NULL AS DECIMAL ) + + 46 - + cor0.col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3304
SELECT DISTINCT - CAST ( NULL AS REAL ) + + 46 - + cor0.col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - col2 + col1 * col2 - - ( + col1 ) FROM tab0 AS cor0
----
193
2891
7471

query I rowsort
SELECT col0 * tab2.col1 * + col0 FROM tab2
----
106097
1519
358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-3307
SELECT DISTINCT - ( - col1 ) DIV - col0 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-3307
SELECT DISTINCT - ( - col1 ) / - col0 FROM tab0 AS cor0
----
-1
-2
-3

query I rowsort
SELECT - + 12 AS col2 FROM tab0 AS cor0
----
-12
-12
-12

query I rowsort
SELECT - + 18 * - col2 + col1 AS col2 FROM tab1 AS cor0
----
1036
1741
998

query I rowsort
SELECT - col1 * + col2 * cor0.col0 AS col1 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT + cor0.col2 * cor0.col0 AS col1 FROM tab2 cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-3312
SELECT DISTINCT 27 + col1 * 16 DIV - col2 + - col1 FROM tab1
----
-6
12
15

skipif mysql # not compatible
query I rowsort label-3312
SELECT DISTINCT 27 + col1 * 16 / - col2 + - col1 FROM tab1
----
-6
12
15

query I rowsort
SELECT DISTINCT col1 * tab1.col2 * tab1.col2 + col1 AS col0 FROM tab1
----
119821
32500
75842

query I rowsort
SELECT DISTINCT - col1 + tab2.col1 + tab2.col0 FROM tab2
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 92 col0 FROM tab0, tab2 AS cor0
----
-92

query I rowsort
SELECT - + col0 * col2 + - 69 * col2 FROM tab0 AS cor0
----
-104
-12956
-3069

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col0 + + tab0.col0 col1 FROM tab0
----
1260
600
8010

query I rowsort
SELECT col1 + + col0 * 50 FROM tab1
----
176
3210
4013

query I rowsort
SELECT + + col1 + + 98 * 99 AS col0 FROM tab0 AS cor0
----
9788
9793
9799

query I rowsort
SELECT + + cor0.col1 + - 11 * + 40 AS col2 FROM tab2 cor0
----
-381
-409
-423

query I rowsort
SELECT cor0.col1 + ( col2 ) FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL cor0.col2 - - 49 AS col0 FROM tab0 AS cor0
----
131
50
82

query I rowsort
SELECT ALL - cor0.col0 + 12 AS col0 FROM tab1 AS cor0
----
-52
-68
9

query I rowsort
SELECT DISTINCT + + col2 * col2 AS col0 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT ALL + col0 * + 73 + col0 FROM tab1 AS cor0
----
222
4736
5920

query I rowsort
SELECT + ( + cor0.col1 ) * - col1 AS col2 FROM tab1 AS cor0
----
-100
-169
-676

onlyif mysql # use DIV operator for integer division
query I rowsort label-3327
SELECT + col2 DIV cor0.col1 - + col2 AS col2 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-3327
SELECT + col2 / cor0.col1 - + col2 AS col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT 16 - - col1 FROM tab2
----
33
47
75

query I rowsort
SELECT ALL 62 AS col0 FROM tab0, tab2 AS cor0, tab2, tab1 AS cor1
----
81 values hashing to 0bc652564a158b9c0f7952026f90b60a

query I rowsort
SELECT + - col2 + - cor0.col1 * + cor0.col2 FROM tab2 cor0
----
-1560
-684
-864

onlyif mysql # use DIV operator for integer division
query I rowsort label-3331
SELECT + - col0 DIV + col1 - col1 FROM tab2 AS cor0
----
-21
-31
-60

skipif mysql # not compatible
query I rowsort label-3331
SELECT + - col0 / + col1 - col1 FROM tab2 AS cor0
----
-21
-31
-60

query I rowsort
SELECT + 1 * col2 - - col0 * ( col0 ) AS col0 FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT DISTINCT - col0 * + col1 * + col2 AS col0 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT 89 AS col1 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 860d55eb6785972467218a9c3badb5ad

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 + + cor0.col2 col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT + col1 * tab0.col0 + + col0 FROM tab0
----
2088
3430
8188

query I rowsort
SELECT + col1 + + col2 * - col0 AS col2 FROM tab0
----
-706
-7207
62

query I rowsort
SELECT - col0 - col1 FROM tab1 WHERE col1 NOT IN ( - col0 * + col1 * col0 )
----
-29
-74
-93

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT + col0 + - col2 >= ( NULL )
----

query I rowsort
SELECT + tab0.col1 * + col1 + col0 AS col0 FROM tab0
----
7420
8370
9444

query I rowsort
SELECT col0 AS col0 FROM tab0 WHERE NOT ( col1 * col1 + - col1 ) <> ( NULL )
----

query I rowsort
SELECT col2 * + tab2.col1 + - col1 + + col0 AS col0 FROM tab2
----
1553
708
813

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT ( NULL ) NOT IN ( - col2 + - col1 )
----

query I rowsort
SELECT DISTINCT - col2 * + tab2.col2 * col1 AS col1 FROM tab2
----
-22599
-24548
-39884

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col1 col2 FROM tab1 WHERE NULL < ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col1 * - col0 col0 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT - col1 + col2 * - col2 + - col0 AS col1 FROM tab1
----
-2945
-3323
-9309

query I rowsort
SELECT DISTINCT col2 + col0 / col2 AS col2 FROM tab0 WHERE ( NULL ) < ( - col1 + - col0 )
----

query I rowsort
SELECT - tab1.col0 * + col0 + + col0 + col2 AS col2 FROM tab1
----
-3975
-6224
48

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NULL <> + col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3351
SELECT ALL col0 + col2 DIV + col0 FROM tab1
----
21
64
81

skipif mysql # not compatible
query I rowsort label-3351
SELECT ALL col0 + col2 / + col0 FROM tab1
----
21
64
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-3352
SELECT ALL col1 * - col1 DIV col1 + - col0 FROM tab1
----
-29
-74
-93

skipif mysql # not compatible
query I rowsort label-3352
SELECT ALL col1 * - col1 / col1 + - col0 FROM tab1
----
-29
-74
-93

query I rowsort
SELECT DISTINCT col1 FROM tab2 WHERE col0 IN ( - tab2.col0 )
----

query III rowsort
SELECT * FROM tab1 WHERE NOT + col2 NOT IN ( + col0 )
----

query I rowsort
SELECT - col1 + - col2 FROM tab0 WHERE NOT ( NULL ) NOT IN ( tab0.col2 )
----

query I rowsort
SELECT DISTINCT col2 + tab1.col2 FROM tab1 WHERE NOT NULL <= - col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3357
SELECT tab0.col0 + + col0 DIV - col1 AS col0 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3357
SELECT tab0.col0 + + col0 / - col1 AS col0 FROM tab0
----
24
35
89

query I rowsort
SELECT DISTINCT col1 - - tab2.col2 * col1 AS col2 FROM tab2
----
1593
663
868

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col2 + + col0 col1 FROM tab1
----
2919
3313
9296

query I rowsort
SELECT DISTINCT + tab1.col2 FROM tab2, tab1 AS cor0 CROSS JOIN tab1
----
54
57
96

query I rowsort
SELECT + - col2 - + col0 FROM tab0 cor0
----
-171
-36
-57

query I rowsort
SELECT col0 + cor0.col1 * col0 AS col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT - + col2 + col2 * col2 AS col0 FROM tab2 cor0
----
1406
650
702

query I rowsort
SELECT tab1.col0 - tab1.col0 AS col2 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3365
SELECT ALL - col1 DIV col1 + + col2 FROM tab0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-3365
SELECT ALL - col1 / col1 + + col2 FROM tab0
----
0
32
81

query I rowsort
SELECT - col2 + cor0.col1 * - col2 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT ALL + col0 * col2 * col2 AS col0 FROM tab1 AS cor0
----
207936
737280
8748

query I rowsort
SELECT col1 * - cor0.col1 + col2 FROM tab1 AS cor0
----
-43
-622
-73

query III rowsort
SELECT ALL * FROM tab0 AS cor0 WHERE NOT NULL NOT IN ( col0 )
----

query I rowsort
SELECT DISTINCT - col0 AS col1 FROM tab2 WHERE ( col0 + - col1 ) NOT IN ( - tab2.col0 + - tab2.col1 + - tab2.col0 * col0 )
----
-7
-78
-79

query I rowsort
SELECT ALL - tab2.col1 * col1 * tab2.col0 + + col2 FROM tab2
----
-22793
-271492
-6700

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * - col1 col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT DISTINCT col2 * + col0 + - col2 FROM tab2 AS cor0
----
162
2002
2964

query I rowsort
SELECT col1 * col2 * + col2 AS col0 FROM tab2 AS cor0 WHERE NOT NULL > col0 + col0 * col1 * - col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3375
SELECT - col0 DIV + col0 + cor0.col0 AS col1 FROM tab0 AS cor0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-3375
SELECT - col0 / + col0 + cor0.col0 AS col1 FROM tab0 AS cor0
----
23
34
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-3376
SELECT col2 + col0 DIV + col1 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-3376
SELECT col2 + col0 / + col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT col0 * + col2 + col1 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT DISTINCT + 70 * 83 FROM tab0, tab2 AS cor0
----
5810

query I rowsort
SELECT - + col2 * - 63 - - col2 * - col1 AS col2 FROM tab0 AS cor0
----
-2296
-34
-759

query I rowsort
SELECT ALL + col1 + 7 * col0 AS col0 FROM tab1 AS cor0
----
458
47
573

query I rowsort
SELECT col2 - - 5 AS col1 FROM tab1 AS cor0
----
101
59
62

query I rowsort
SELECT ALL - col0 * 63 AS col0 FROM tab0 AS cor0
----
-1512
-2205
-5607

query I rowsort
SELECT + col1 * - col2 + - col2 FROM tab0 cor0
----
-2871
-7544
-98

query I rowsort
SELECT - - col1 + - col1 + - col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT + + col2 - + ( + col1 + cor0.col2 ) * 7 FROM tab0 AS cor0
----
-1129
-685
-800

query I rowsort
SELECT DISTINCT - col1 + - 75 FROM tab2 AS cor0
----
-106
-134
-92

query I rowsort
SELECT ALL - col1 * ( + col2 ) + + col1 * + col0 FROM tab0 AS cor0
----
-774
3298
637

query I rowsort
SELECT + cor0.col0 * + col0 + - col2 * - col1 FROM tab0 AS cor0
----
1322
15383
3414

query I rowsort
SELECT - 91 + 97 FROM tab2 AS cor0
----
6
6
6

query I rowsort
SELECT DISTINCT + 84 + ( + col0 ) FROM tab0 AS cor0
----
108
119
173

query I rowsort
SELECT - 55 + col2 + - col1 AS col0 FROM tab0 AS cor0
----
-108
-151
-64

query I rowsort
SELECT ( 76 ) + + col1 FROM tab0 AS cor0
----
162
167
173

query I rowsort
SELECT DISTINCT + 73 AS col0 FROM tab0 cor0
----
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-3394
SELECT cor0.col0 + col0 DIV 14 FROM tab2 cor0
----
7
83
84

skipif mysql # not compatible
query I rowsort label-3394
SELECT cor0.col0 + col0 / 14 FROM tab2 cor0
----
7
83
84

query I rowsort
SELECT - + 74 AS col0 FROM tab2 cor0
----
-74
-74
-74

query I rowsort
SELECT - col2 FROM tab2 WHERE NOT NULL <> + col1
----

query I rowsort
SELECT col0 + + col1 * - col0 FROM tab0
----
-2040
-3360
-8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + - col1 col0 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT ALL - + 3 AS col0 FROM tab2 AS cor0
----
-3
-3
-3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3400
SELECT - 49 + col1 * CAST( NULL AS SIGNED ) / col1 + col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3400
SELECT - 49 + col1 * CAST ( NULL AS INTEGER ) / col1 + col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col0 * tab0.col2 * tab0.col1 - 99 AS col1 FROM tab0
----
-3494
-664217
-68211

query I rowsort
SELECT - 69 * - tab0.col1 + tab0.col0 * - 25 AS col1 FROM tab0
----
4054
5334
5818

query I rowsort
SELECT DISTINCT col0 + col2 - + col2 * + col0 FROM tab2
----
-155
-1924
-2885

query I rowsort
SELECT cor0.col2 * - col1 + - col1 + + col0 FROM tab2 AS cor0
----
-1515
-584
-861

query I rowsort
SELECT + col2 + 36 AS col0 FROM tab0 cor0
----
118
37
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * ( + 72 ) col0 FROM tab0 AS cor0
----
1728
2520
6408

onlyif mysql # use DIV operator for integer division
query I rowsort label-3407
SELECT col0 DIV + ( - 92 ) AS col1 FROM tab2 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3407
SELECT col0 / + ( - 92 ) AS col1 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT + - col0 - ( + 70 ) FROM tab2 AS cor0
----
-148
-149
-77

query I rowsort
SELECT ALL tab0.col2 AS col2 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT + - 5 * + col1 AS col1 FROM tab2 AS cor0
----
-155
-295
-85

query I rowsort
SELECT - col1 * - 15 AS col0 FROM tab2 AS cor0
----
255
465
885

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3412
SELECT - CAST( NULL AS SIGNED ) * col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3412
SELECT - CAST ( NULL AS INTEGER ) * col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * + col2 * col2 FROM tab1 AS cor0
----
-119808
-32490
-75816

query I rowsort
SELECT + ( col2 ) * col2 AS col0 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT 67 + col1 FROM tab1 AS cor0
----
77
80
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-3416
SELECT - cor0.col2 DIV 5 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 1ef9531381b413e9e858110fbd82daef

skipif mysql # not compatible
query I rowsort label-3416
SELECT - cor0.col2 / 5 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 1ef9531381b413e9e858110fbd82daef

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3417
SELECT ALL - CAST( NULL AS SIGNED ) FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-3417
SELECT ALL - CAST ( NULL AS INTEGER ) FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT 73 + col1 * cor0.col0 FROM tab1 AS cor0
----
1113
151
713

query I rowsort
SELECT col0 * 39 + - col0 * col1 AS col0 FROM tab0 AS cor0
----
-1128
-2030
-4628

query I rowsort
SELECT + col1 + + cor0.col0 + cor0.col2 * col0 FROM tab0 AS cor0
----
167
7478
902

onlyif mysql # use DIV operator for integer division
query I rowsort label-3421
SELECT + col2 - - cor0.col0 * col2 DIV col2 FROM tab0 AS cor0
----
171
36
57

skipif mysql # not compatible
query I rowsort label-3421
SELECT + col2 - - cor0.col0 * col2 / col2 FROM tab0 AS cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-3422
SELECT + cor0.col1 + + col1 DIV - col1 AS col0 FROM tab0 cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-3422
SELECT + cor0.col1 + + col1 / - col1 AS col0 FROM tab0 cor0
----
85
90
96

query I rowsort
SELECT + col1 * - ( ( + col2 ) ) FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT + cor0.col1 + + ( - col0 ) AS col2 FROM tab1 AS cor0
----
-54
-67
23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3425
SELECT DISTINCT - col2 * CAST( NULL AS DECIMAL ) col1 FROM tab0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3425
SELECT DISTINCT - col2 * CAST ( NULL AS REAL ) col1 FROM tab0
----
NULL

query I rowsort
SELECT 93 + tab2.col0 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to e1a2b6eee187a73c43be247e0c829c99

query I rowsort
SELECT + col1 * ( 31 * - tab0.col0 ) FROM tab0
----
-105245
-251069
-63984

query I rowsort
SELECT DISTINCT - col0 + - 21 FROM tab2 AS cor0
----
-100
-28
-99

onlyif mysql # use DIV operator for integer division
query I rowsort label-3429
SELECT + 31 DIV col2 + + col0 AS col0 FROM tab0 AS cor0
----
24
66
89

skipif mysql # not compatible
query I rowsort label-3429
SELECT + 31 / col2 + + col0 AS col0 FROM tab0 AS cor0
----
24
66
89

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 cor0, tab1 AS cor1, tab0, tab0 cor2
----
3645 values hashing to 862fba9ac85fdf2cec88a0bec0808b7e

query I rowsort
SELECT ALL 11 + - 50 AS col0 FROM tab0 AS cor0
----
-39
-39
-39

query I rowsort
SELECT DISTINCT + col0 * col2 + - cor0.col1 AS col2 FROM tab0 cor0
----
-62
706
7207

query I rowsort
SELECT - - col2 + + 78 * + col1 FROM tab0 AS cor0
----
6741
7180
7567

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 11 col1 FROM tab2 AS cor0
----
11
11
11

query I rowsort
SELECT DISTINCT - - ( col1 ) * col0 + + 25 * col0 FROM tab0 AS cor0
----
10324
2664
4270

query I rowsort
SELECT + col0 + - ( col0 ) FROM tab0
----
0
0
0

query I rowsort
SELECT col1 * + col0 + - col1 AS col0 FROM tab0
----
1978
3298
8008

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + + col1 * col2 col0 FROM tab0
----
2871
7544
98

query I rowsort
SELECT ALL 6 * tab1.col0 AS col1 FROM tab1
----
18
384
480

onlyif mysql # use DIV operator for integer division
query I rowsort label-3440
SELECT - 83 DIV tab0.col0 + col0 * + col0 FROM tab0
----
1223
573
7921

skipif mysql # not compatible
query I rowsort label-3440
SELECT - 83 / tab0.col0 + col0 * + col0 FROM tab0
----
1223
573
7921

query I rowsort
SELECT ALL - 94 + + 23 * - col0 + col0 FROM tab1
----
-1502
-160
-1854

query I rowsort
SELECT ALL + + 20 + + cor0.col0 * + col2 FROM tab2 AS cor0
----
2048
209
3022

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + + ( col0 * + 70 ) col1 FROM tab1
----
213
4544
5680

query I rowsort
SELECT DISTINCT col2 * col2 + - col0 AS col2 FROM tab1
----
2913
3185
9136

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * col1 col2 FROM tab1
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 21 col2 FROM tab1
----
21

query I rowsort
SELECT ( col2 * + col0 + col0 ) FROM tab2
----
196
2106
3081

query I rowsort
SELECT 14 * tab1.col1 - ( - 77 ) * - col0 FROM tab1
----
-4788
-5978
133

onlyif mysql # use DIV operator for integer division
query I rowsort label-3449
SELECT + col1 DIV - 82 + + 73 DIV col2 FROM tab1 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-3449
SELECT + col1 / - 82 + + 73 / col2 FROM tab1 AS cor0
----
0
1
1

query I rowsort
SELECT + - col0 * + ( 39 ) + - col0 AS col2 FROM tab1 AS cor0
----
-120
-2560
-3200

query I rowsort
SELECT DISTINCT cor0.col2 + col1 * col0 FROM tab1 cor0
----
1136
132
697

onlyif mysql # use DIV operator for integer division
query I rowsort label-3452
SELECT ALL + col1 DIV col1 + + 9 + - col0 DIV + 34 col1 FROM tab0 cor0
----
10
8
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3452
SELECT ALL + col1 / col1 + + 9 + - col0 / + 34 col1 FROM tab0 cor0
----
10
8
9

query I rowsort
SELECT - col2 + - 20 FROM tab2 cor0
----
-46
-47
-58

query I rowsort
SELECT ALL + col2 * - ( 44 ) + col1 AS col0 FROM tab2 AS cor0
----
-1085
-1157
-1655

query I rowsort
SELECT col1 - col1 * col1 AS col1 FROM tab0 cor0
----
-7310
-8190
-9312

query I rowsort
SELECT DISTINCT - - col1 + + 50 * - col1 AS col0 FROM tab1 AS cor0
----
-1274
-490
-637

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col2 * - cor0.col2 col0 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL + ( col2 ) * ( - 78 + col0 ) AS col1 FROM tab2 AS cor0
----
-1917
0
38

query I rowsort
SELECT - + cor0.col2 + + col0 + + col1 FROM tab1 AS cor0
----
-25
-3
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + tab0.col1 + - col1 col0 FROM tab0
----
24
35
89

query I rowsort
SELECT ( - 71 ) FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 3907e0aa4f29c002120742c4abb3e23a

onlyif mysql # use DIV operator for integer division
query I rowsort label-3462
SELECT - 16 DIV + col0 - - 24 FROM tab0 AS cor0
----
24
24
24

skipif mysql # not compatible
query I rowsort label-3462
SELECT - 16 / + col0 - - 24 FROM tab0 AS cor0
----
24
24
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-3463
SELECT DISTINCT + cor0.col1 + - col0 DIV col0 FROM tab0 AS cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-3463
SELECT DISTINCT + cor0.col1 + - col0 / col0 FROM tab0 AS cor0
----
85
90
96

query I rowsort
SELECT DISTINCT - 47 + - col0 * ( - col1 ) FROM tab1 AS cor0
----
31
593
993

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 + col0 * cor0.col0 col0 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT DISTINCT - cor0.col0 + col0 - - col2 AS col0 FROM tab1 AS cor0
----
54
57
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3467
SELECT ALL + col1 * CAST( col0 AS SIGNED ) + col1 FROM tab2 AS cor0
----
1360
248
4661

skipif mysql # not compatible
query I rowsort label-3467
SELECT ALL + col1 * CAST ( col0 AS INTEGER ) + col1 FROM tab2 AS cor0
----
1360
248
4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-3468
SELECT DISTINCT col1 DIV col2 + + col1 * col2 FROM tab0
----
194
2840
7463

skipif mysql # not compatible
query I rowsort label-3468
SELECT DISTINCT col1 / col2 + + col1 * col2 FROM tab0
----
194
2840
7463

query I rowsort
SELECT col1 * - col1 + 88 FROM tab1
----
-12
-588
-81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + col2 * + 18 col2 FROM tab2
----
493
546
763

query I rowsort
SELECT DISTINCT - 80 FROM tab2, tab1, tab1 AS cor0
----
-80

query I rowsort
SELECT DISTINCT - - col0 * - cor0.col1 + col0 AS col2 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT ALL 92 + - col1 FROM tab2 AS cor0
----
33
61
75

query I rowsort
SELECT DISTINCT col2 * cor0.col2 + col2 FROM tab1 AS cor0
----
2970
3306
9312

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3475
SELECT ALL - - CAST( col0 AS SIGNED ) * cor0.col2 + + CAST( col2 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
216
3705
7776

skipif mysql # not compatible
query I rowsort label-3475
SELECT ALL - - CAST ( col0 AS INTEGER ) * cor0.col2 + + CAST ( col2 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT DISTINCT col1 * 40 AS col0 FROM tab1 AS cor0
----
1040
400
520

onlyif mysql # use DIV operator for integer division
query I rowsort label-3477
SELECT + ( - col0 ) + - col1 DIV + 45 FROM tab1 cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-3477
SELECT + ( - col0 ) + - col1 / + 45 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT - 36 + + cor0.col0 * col1 FROM tab2 AS cor0
----
1307
181
4566

query I rowsort
SELECT DISTINCT 94 FROM tab0 cor0
----
94

query I rowsort
SELECT DISTINCT + 81 * - cor0.col0 * col1 FROM tab0 AS cor0
----
-167184
-274995
-656019

query I rowsort
SELECT DISTINCT col0 * - 6 FROM tab2 AS cor0
----
-42
-468
-474

query I rowsort
SELECT + 38 + ( col2 + - col2 * + 21 ) AS col1 FROM tab1
----
-1042
-1102
-1882

query I rowsort
SELECT 40 * + col0 + + 0 AS col0 FROM tab1 cor0
----
120
2560
3200

query I rowsort
SELECT ALL - ( + 62 ) AS col1 FROM tab0
----
-62
-62
-62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3485
SELECT + CAST( 38 + + col2 AS SIGNED ) FROM tab2
----
64
65
76

skipif mysql # not compatible
query I rowsort label-3485
SELECT + CAST ( 38 + + col2 AS INTEGER ) FROM tab2
----
64
65
76

query I rowsort
SELECT + 98 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 6 col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to e92b2679faac7be63701967e3f0c0934

query I rowsort
SELECT + + 67 FROM tab2 cor0
----
67
67
67

query I rowsort
SELECT + - col1 - - col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT + 3 * col1 AS col0 FROM tab0 AS cor0
----
258
273
291

query I rowsort
SELECT ALL - col0 + col1 + + 46 * - col0 AS col1 FROM tab0 AS cor0
----
-1042
-1548
-4092

query I rowsort
SELECT DISTINCT + col1 * + cor0.col0 + + col0 * - col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - + 10 * col2 - + col0 AS col1 FROM tab0 AS cor0
----
-354
-45
-909

query I rowsort
SELECT ALL - col2 * + col2 + + ( - col1 ) FROM tab2 cor0
----
-1461
-735
-760

onlyif mysql # use DIV operator for integer division
query I rowsort label-3495
SELECT + - ( - col0 ) DIV + 74 + - 6 AS col1 FROM tab2 AS cor0
----
-5
-5
-6

skipif mysql # not compatible
query I rowsort label-3495
SELECT + - ( - col0 ) / + 74 + - 6 AS col1 FROM tab2 AS cor0
----
-5
-5
-6

query I rowsort
SELECT DISTINCT col1 - + col0 * col0 FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor1.col2 col1 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT ALL + - col0 + - 68 FROM tab0 AS cor0
----
-103
-157
-92

query I rowsort
SELECT ALL - cor0.col2 * 54 AS col1 FROM tab0 AS cor0
----
-1782
-4428
-54

query I rowsort
SELECT DISTINCT - cor0.col0 * - col1 + col2 * col1 + + ( col0 ) AS col2 FROM tab2 AS cor0
----
1061
2068
6214

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * - col1 - + col2 col0 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT + cor0.col0 + - 90 FROM tab1 AS cor0
----
-10
-26
-87

query I rowsort
SELECT DISTINCT - - col0 * + ( - col0 ) + + col0 FROM tab2 AS cor0
----
-42
-6006
-6162

query I rowsort
SELECT DISTINCT 50 AS col2 FROM tab1, tab1 AS cor0
----
50

query I rowsort
SELECT ALL cor0.col0 + - 90 FROM tab0 AS cor0
----
-1
-55
-66

query I rowsort
SELECT - col0 * 62 AS col0 FROM tab1 cor0
----
-186
-3968
-4960

query I rowsort
SELECT DISTINCT - 25 AS col0 FROM tab1
----
-25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - ( 91 ) * col0 col1 FROM tab2 AS cor0
----
637
7098
7189

onlyif mysql # use DIV operator for integer division
query I rowsort label-3510
SELECT DISTINCT + CAST( 66 AS SIGNED ) DIV col1 AS col2 FROM tab2 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-3510
SELECT DISTINCT + CAST ( 66 AS INTEGER ) / col1 AS col2 FROM tab2 AS cor0
----
1
2
3

query I rowsort
SELECT + + 41 * - 97 AS col1 FROM tab1 cor0
----
-3977
-3977
-3977

query I rowsort
SELECT + 6 * - col2 * col2 AS col2 FROM tab2
----
-4056
-4374
-8664

query I rowsort
SELECT 98 * - cor0.col0 - col2 FROM tab1 AS cor0
----
-348
-6329
-7936

query I rowsort
SELECT cor0.col2 * + cor0.col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT tab0.col2 * - col2 * tab0.col2 FROM tab0
----
-1
-35937
-551368

query I rowsort
SELECT DISTINCT - 94 * - col1 FROM tab2
----
1598
2914
5546

query I rowsort
SELECT ALL + - 83 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to d55748f39f403ec273099c0d87b0bfbb

onlyif mysql # use DIV operator for integer division
query I rowsort label-3518
SELECT + 88 + col1 DIV ( + col2 + + col1 ) AS col0 FROM tab2 AS cor0
----
88
88
88

skipif mysql # not compatible
query I rowsort label-3518
SELECT + 88 + col1 / ( + col2 + + col1 ) AS col0 FROM tab2 AS cor0
----
88
88
88

query I rowsort
SELECT DISTINCT col0 * col2 * - 68 + - col0 FROM tab0
----
-2415
-496353
-53880

onlyif mysql # use DIV operator for integer division
query I rowsort label-3520
SELECT DISTINCT - col1 DIV - col2 + - col1 * col0 AS col0 FROM tab0
----
-2062
-3298
-8098

skipif mysql # not compatible
query I rowsort label-3520
SELECT DISTINCT - col1 / - col2 + - col1 * col0 AS col0 FROM tab0
----
-2062
-3298
-8098

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - 88 col1 FROM tab2 AS cor0
----
-114
-115
-126

query I rowsort
SELECT ALL 88 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col1 AS REAL ) AS col1 FROM tab1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-3524
SELECT ( + col1 ) DIV + col1 AS col2 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3524
SELECT ( + col1 ) / + col1 AS col2 FROM tab0
----
1
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3525
SELECT - CAST( ( - col0 ) AS SIGNED ) * + ( col0 ) FROM tab0 AS cor0
----
1225
576
7921

skipif mysql # not compatible
query I rowsort label-3525
SELECT - CAST ( ( - col0 ) AS INTEGER ) * + ( col0 ) FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT - col2 * - ( - col2 ) + 67 FROM tab0 AS cor0
----
-1022
-6657
66

query I rowsort
SELECT 91 * - cor0.col2 FROM tab0 AS cor0
----
-3003
-7462
-91

query I rowsort
SELECT - col2 + col0 * 41 AS col0 FROM tab0 AS cor0
----
1434
3567
951

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3529
SELECT 7 + + col0 + - CAST( ( - cor0.col1 ) AS SIGNED ) * 37 FROM tab2 AS cor0
----
1161
2268
715

skipif mysql # not compatible
query I rowsort label-3529
SELECT 7 + + col0 + - CAST ( ( - cor0.col1 ) AS INTEGER ) * 37 FROM tab2 AS cor0
----
1161
2268
715

onlyif mysql # use DIV operator for integer division
query I rowsort label-3530
SELECT + col1 + + col2 DIV col0 FROM tab1
----
10
14
44

skipif mysql # not compatible
query I rowsort label-3530
SELECT + col1 + + col2 / col0 FROM tab1
----
10
14
44

onlyif mysql # use DIV operator for integer division
query I rowsort label-3531
SELECT - col1 DIV + 12 FROM tab1
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-3531
SELECT - col1 / + 12 FROM tab1
----
-1
-2
0

query I rowsort
SELECT - 84 * col0 AS col2 FROM tab0
----
-2016
-2940
-7476

query I rowsort
SELECT DISTINCT col2 + 22 AS col1 FROM tab1
----
118
76
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + + tab1.col0 col1 FROM tab1
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-3535
SELECT ALL + col0 * col1 DIV ( - col1 * + col0 + - col2 ) FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3535
SELECT ALL + col0 * col1 / ( - col1 * + col0 + - col2 ) FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + col2 * - col2 + col2 * - 98 AS col2 FROM tab0 AS cor0
----
-14760
-4323
-99

query I rowsort
SELECT - 99 + col1 + + 22 AS col1 FROM tab0 AS cor0
----
14
20
9

query I rowsort
SELECT cor0.col1 + + col0 + + 13 AS col1 FROM tab2 AS cor0
----
109
150
51

query I rowsort
SELECT + col0 * + col1 * 67 AS col1 FROM tab0 AS cor0
----
138288
227465
542633

query I rowsort
SELECT ALL - - cor0.col0 * - col0 AS col2 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT + + col1 + col0 * - col0 * - col2 AS col2 FROM tab2 AS cor0
----
1354
158243
237175

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 - cor0.col0 col1 FROM tab1 AS cor0
----
-128
-160
-6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3543
SELECT + - col1 * - cor0.col0 - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3543
SELECT + - col1 * - cor0.col0 - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - col2 + - col0 + + ( + 42 ) AS col1 FROM tab0 cor0
----
35
51
8

query I rowsort
SELECT - ( + col2 ) * + 53 + col0 AS col1 FROM tab2 cor0
----
-1300
-1424
-1935

query I rowsort
SELECT + 34 FROM tab2, tab0 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to 6cda47a564e8ee9e9e7915815a3a7769

onlyif mysql # use DIV operator for integer division
query I rowsort label-3547
SELECT DISTINCT 87 DIV col1 AS col0 FROM tab0
----
0
1

skipif mysql # not compatible
query I rowsort label-3547
SELECT DISTINCT 87 / col1 AS col0 FROM tab0
----
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3548
SELECT DISTINCT tab0.col1 DIV + col2 FROM tab0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-3548
SELECT DISTINCT tab0.col1 / + col2 FROM tab0
----
1
2
97

query I rowsort
SELECT - cor0.col1 + - col2 FROM tab1 cor0
----
-109
-67
-80

query I rowsort
SELECT ALL + - col0 + + 51 AS col1 FROM tab0 AS cor0
----
-38
16
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + ( col2 ) col0 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3552
SELECT ALL - col2 DIV - col1 col1 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3552
SELECT ALL - col2 / - col1 col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL 6 * col0 - 15 FROM tab2
----
27
453
459

query I rowsort
SELECT ALL - 24 - col0 * + 33 AS col0 FROM tab0
----
-1179
-2961
-816

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3555
SELECT ALL + CAST( NULL AS SIGNED ) + - col1 * - cor0.col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3555
SELECT ALL + CAST ( NULL AS INTEGER ) + - col1 * - cor0.col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 21 AS col1 FROM tab2, tab0, tab0 AS cor0, tab1
----
81 values hashing to 4eecc28c48bfdf162a585f11d1dd0b6c

query I rowsort
SELECT ALL col1 + + col1 * col1 AS col2 FROM tab2 AS cor0
----
306
3540
992

query I rowsort
SELECT DISTINCT + - cor0.col0 * - cor0.col0 * col1 AS col1 FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT DISTINCT + - col1 * - col1 + col0 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT DISTINCT - col0 * + 47 AS col1 FROM tab1 AS cor0
----
-141
-3008
-3760

query I rowsort
SELECT ALL + col0 * col2 + + col1 * + ( col1 ) - + col2 AS col1 FROM tab0 AS cor0
----
15497
8155
9443

query I rowsort
SELECT + 58 - 74 FROM tab0, tab1, tab0 AS cor0, tab2
----
81 values hashing to 6a726f8493b62c5d4e1dd657007160c3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + - col1 * 18 col0 FROM tab2
----
-1036
-268
-531

query I rowsort
SELECT ALL col2 * 38 AS col0 FROM tab2
----
1026
1444
988

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - col2 AS REAL ) + - col1 * - col0 FROM tab2
----
1305
190
4576

query I rowsort
SELECT ALL + 74 AS col1 FROM tab2
----
74
74
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-3567
SELECT + + 8 + 89 DIV + col0 FROM tab1 AS cor0
----
37
9
9

skipif mysql # not compatible
query I rowsort label-3567
SELECT + + 8 + 89 / + col0 FROM tab1 AS cor0
----
37
9
9

query I rowsort
SELECT + col2 * - 97 * + col0 FROM tab0 AS cor0
----
-3395
-707906
-76824

query I rowsort
SELECT - 1 * + col0 + + col2 AS col0 FROM tab0 AS cor0
----
-34
-7
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 87 col2 FROM tab2 AS cor0
----
87
87
87

query I rowsort
SELECT - - ( col2 ) * col1 AS col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL col0 * + 91 FROM tab1
----
273
5824
7280

query I rowsort
SELECT + col2 + + ( col0 ) FROM tab0
----
171
36
57

query I rowsort
SELECT ALL col2 + 12 AS col0 FROM tab1
----
108
66
69

query I rowsort
SELECT DISTINCT - col0 + + ( - col2 ) FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT DISTINCT + col0 + + ( + col1 ) * col1 FROM tab1 AS cor0
----
164
249
679

onlyif mysql # use DIV operator for integer division
query I rowsort label-3577
SELECT DISTINCT - col0 DIV - cor0.col0 + - col1 AS col0 FROM tab1 cor0
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-3577
SELECT DISTINCT - col0 / - cor0.col0 + - col1 AS col0 FROM tab1 cor0
----
-12
-25
-9

query I rowsort
SELECT col0 * + ( + 46 ) FROM tab1 AS cor0
----
138
2944
3680

query I rowsort
SELECT - - col2 - + cor0.col0 AS col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT - - 87 AS col2 FROM tab0 cor0
----
87

query I rowsort
SELECT ALL + col1 * + 65 AS col0 FROM tab1 AS cor0
----
1690
650
845

query I rowsort
SELECT - 73 + 87 AS col1 FROM tab2 AS cor0
----
14
14
14

onlyif mysql # use DIV operator for integer division
query I rowsort label-3583
SELECT DISTINCT col2 DIV + col2 AS col0 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-3583
SELECT DISTINCT col2 / + col2 AS col0 FROM tab1 AS cor0
----
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3584
SELECT DISTINCT + col0 DIV + 61 - + col1 FROM tab0 AS cor0
----
-86
-90
-97

skipif mysql # not compatible
query I rowsort label-3584
SELECT DISTINCT + col0 / + 61 - + col1 FROM tab0 AS cor0
----
-86
-90
-97

query I rowsort
SELECT DISTINCT - - 65 * col2 AS col2 FROM tab1 AS cor0
----
3510
3705
6240

query I rowsort
SELECT ALL + + ( + 98 ) + - col1 AS col2 FROM tab1 cor0
----
72
85
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-3587
SELECT ALL - col1 DIV - 34 FROM tab2 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3587
SELECT ALL - col1 / - 34 FROM tab2 AS cor0
----
0
0
1

query I rowsort
SELECT ALL tab1.col1 - ( 86 + - col1 ) * + tab1.col2 * - tab1.col0 FROM tab1
----
277258
560653
9746

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * + col0 col1 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT - + col2 + ( + col1 ) * - ( + col2 ) AS col1 FROM tab2 AS cor0
----
-1560
-684
-864

query I rowsort
SELECT - 47 * - col2 * - col1 FROM tab2 AS cor0
----
-30362
-39339
-72098

query I rowsort
SELECT + 43 * - ( - col2 ) * - col2 + 69 AS col0 FROM tab2 AS cor0
----
-28999
-31278
-62023

query I rowsort
SELECT DISTINCT col1 + + col1 * - 5 AS col1 FROM tab0 AS cor0
----
-344
-364
-388

query I rowsort
SELECT DISTINCT + ( - col1 ) * 66 FROM tab0 cor0
----
-5676
-6006
-6402

query I rowsort
SELECT - ( + col2 ) * col0 FROM tab1 cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-3596
SELECT + - col1 DIV cor0.col1 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3596
SELECT + - col1 / cor0.col1 FROM tab0 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3597
SELECT DISTINCT - 78 DIV col2 col2 FROM tab0
----
-2
-78
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3597
SELECT DISTINCT - 78 / col2 col2 FROM tab0
----
-2
-78
0

query I rowsort
SELECT ALL + tab2.col2 * - tab2.col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT - 46 * + col0 AS col2 FROM tab1 AS cor0
----
-138
-2944
-3680

query I rowsort
SELECT ALL - 49 + + cor0.col0 * - col2 FROM tab0 AS cor0
----
-7347
-84
-841

query I rowsort
SELECT ALL 52 * col1 + cor0.col0 AS col1 FROM tab2 AS cor0
----
1619
3146
963

query I rowsort
SELECT ALL + col0 * + cor0.col0 + + col1 AS col0 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT + 26 FROM tab2 cor0
----
26
26
26

query I rowsort
SELECT - 66 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to a408108d423d7784b7d610cb779e515a

query I rowsort
SELECT col2 * ( col0 ) AS col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL - - col1 + col2 * col0 AS col2 FROM tab0 cor0
----
132
7389
878

query I rowsort
SELECT - col0 * ( col0 ) FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL col2 + col1 * col2 * + col0 AS col2 FROM tab1 AS cor0
----
36537
4266
99936

query I rowsort
SELECT + cor0.col2 * ( col0 ) + + cor0.col1 AS col0 FROM tab2 cor0
----
2087
220
3019

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3610
SELECT + col2 * + tab0.col1 * - CAST( col0 + - col1 AS SIGNED ) AS col2 FROM tab0
----
14924
175956
6014

skipif mysql # not compatible
query I rowsort label-3610
SELECT + col2 * + tab0.col1 * - CAST ( col0 + - col1 AS INTEGER ) AS col2 FROM tab0
----
14924
175956
6014

query I rowsort
SELECT 21 * + tab0.col1 AS col2 FROM tab0
----
1806
1911
2037

query I rowsort
SELECT - 31 FROM tab2, tab0, tab1 cor0
----
27 values hashing to c6c8eebeb1a59f7c046402e25630c0ac

query I rowsort
SELECT - col1 + + 70 * + ( col1 ) AS col0 FROM tab2 AS cor0
----
1173
2139
4071

query I rowsort
SELECT DISTINCT col1 * - 98 FROM tab0 AS cor0
----
-8428
-8918
-9506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3615
SELECT DISTINCT - col1 * - CAST( NULL AS SIGNED ) + - col0 AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3615
SELECT DISTINCT - col1 * - CAST ( NULL AS INTEGER ) + - col0 AS col0 FROM tab1 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3616
SELECT ALL col2 + - CAST( col0 + col0 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-120
-130
13

skipif mysql # not compatible
query I rowsort label-3616
SELECT ALL col2 + - CAST ( col0 + col0 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-120
-130
13

query I rowsort
SELECT + 80 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 878f012d707aab113cedaf56e6c52e94

query I rowsort
SELECT - 53 * col0 FROM tab2 cor0
----
-371
-4134
-4187

query I rowsort
SELECT ALL ( - col2 ) + cor0.col1 FROM tab1 AS cor0
----
-28
-47
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-3620
SELECT ALL - - col1 DIV - col0 - 43 FROM tab2 AS cor0
----
-43
-43
-47

skipif mysql # not compatible
query I rowsort label-3620
SELECT ALL - - col1 / - col0 - 43 FROM tab2 AS cor0
----
-43
-43
-47

onlyif mysql # use DIV operator for integer division
query I rowsort label-3621
SELECT + col0 DIV col1 + col2 AS col0 FROM tab1 cor0
----
102
54
63

skipif mysql # not compatible
query I rowsort label-3621
SELECT + col0 / col1 + col2 AS col0 FROM tab1 cor0
----
102
54
63

query I rowsort
SELECT DISTINCT - 80 - 81 AS col0 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
-161

query I rowsort
SELECT DISTINCT - + 84 AS col0 FROM tab0, tab2, tab1 AS cor0
----
-84

query I rowsort
SELECT DISTINCT col0 + + cor0.col2 * - col1 AS col0 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT ALL - ( - col1 ) + ( col1 ) + col1 * - col1 * ( col0 ) AS col0 FROM tab0 AS cor0
----
-177332
-329121
-736827

query I rowsort
SELECT ALL - col1 * - col1 + 61 AS col2 FROM tab1 cor0
----
161
230
737

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + col1 + + col2 col0 FROM tab2 AS cor0
----
144
72
89

query I rowsort
SELECT + 64 + col0 * col2 + + col2 * col2 FROM tab0 AS cor0
----
100
14086
1945

onlyif mysql # use DIV operator for integer division
query I rowsort label-3629
SELECT 37 DIV + col1 FROM tab2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-3629
SELECT 37 / + col1 FROM tab2
----
0
1
2

query I rowsort
SELECT DISTINCT + 53 + - cor0.col2 FROM tab1, tab0 AS cor0
----
-29
20
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-3631
SELECT DISTINCT + col1 DIV 54 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-3631
SELECT DISTINCT + col1 / 54 FROM tab1
----
0

query I rowsort
SELECT DISTINCT + ( 26 * col1 ) FROM tab2
----
1534
442
806

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3633
SELECT + CAST( 12 AS SIGNED ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to d4f5a8e032294c3b9342821617800972

skipif mysql # not compatible
query I rowsort label-3633
SELECT + CAST ( 12 AS INTEGER ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to d4f5a8e032294c3b9342821617800972

query I rowsort
SELECT ( + col2 ) * + 65 - - col0 AS col2 FROM tab0
----
100
2169
5419

query I rowsort
SELECT - ( col2 ) * - ( col2 ) + col0 AS col0 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT - - cor0.col0 - - col1 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT col0 * col2 + cor0.col2 + + col1 FROM tab1 AS cor0
----
242
3715
7789

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 42 col1 FROM tab0 AS cor0 CROSS JOIN tab2, tab1 cor1, tab2 cor2
----
81 values hashing to 4d49d5ffe533e92cf06d98cb59a19b10

query I rowsort
SELECT - 89 AS col0 FROM tab2 cor0
----
-89
-89
-89

query I rowsort
SELECT DISTINCT + cor3.col0 AS col1 FROM tab2 cor0 CROSS JOIN tab0, tab2 AS cor1, tab1 AS cor2, tab2 AS cor3
----
7
78
79

query I rowsort
SELECT - cor0.col1 + ( + ( + col1 ) ) AS col0 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3642
SELECT DISTINCT col0 DIV + 25 FROM tab0
----
0
1
3

skipif mysql # not compatible
query I rowsort label-3642
SELECT DISTINCT col0 / + 25 FROM tab0
----
0
1
3

query I rowsort
SELECT col1 * - tab1.col1 - + col0 AS col2 FROM tab1
----
-164
-249
-679

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * cor0.col2 * cor0.col1 col2 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT DISTINCT col1 * + col1 * col2 - + col1 AS col1 FROM tab2 AS cor0
----
10965
25916
90447

query I rowsort
SELECT ALL - ( + 76 ) * col2 FROM tab0 AS cor0
----
-2508
-6232
-76

query I rowsort
SELECT DISTINCT + col0 * - col2 + 28 * + 80 * col0 FROM tab2 cor0
----
15491
172692
173958

query I rowsort
SELECT + ( + col1 ) + 77 AS col0 FROM tab2 AS cor0
----
108
136
94

query I rowsort
SELECT ALL - + 69 * - col0 + col0 FROM tab1 AS cor0
----
210
4480
5600

query I rowsort
SELECT DISTINCT - + col2 + - col2 * cor0.col0 + + 66 FROM tab1 AS cor0
----
-150
-3639
-7710

query I rowsort
SELECT DISTINCT - + 3 + - col1 + + ( - col0 ) FROM tab2 cor0
----
-140
-41
-99

query I rowsort
SELECT + - 37 * col0 FROM tab2 AS cor0
----
-259
-2886
-2923

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 - col0 col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT - 69 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 3bd7460efa48c66c072ad5f3c2def7e9

onlyif mysql # use DIV operator for integer division
query I rowsort label-3655
SELECT - + col0 DIV - 80 AS col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3655
SELECT - + col0 / - 80 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL tab2.col2 + 40 FROM tab2
----
66
67
78

query I rowsort
SELECT DISTINCT col2 + col0 * + col0 AS col2 FROM tab0
----
1226
609
8003

query I rowsort
SELECT + col0 + col2 * - 37 AS col0 FROM tab1 cor0
----
-1995
-2045
-3472

onlyif mysql # use DIV operator for integer division
query I rowsort label-3659
SELECT DISTINCT + + col2 + col2 * col1 DIV - col1 AS col0 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-3659
SELECT DISTINCT + + col2 + col2 * col1 / - col1 AS col0 FROM tab2 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3660
SELECT + - cor0.col2 + 59 DIV - col2 AS col2 FROM tab1 cor0
----
-55
-58
-96

skipif mysql # not compatible
query I rowsort label-3660
SELECT + - cor0.col2 + 59 / - col2 AS col2 FROM tab1 cor0
----
-55
-58
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + cor0.col2 + col2 + - col2 * + 51 col2 FROM tab2 AS cor0
----
-456
-621
-624

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + col1 * - col0 col2 FROM tab1 AS cor0
----
-1120
-704
-81

query I rowsort
SELECT DISTINCT col2 * + ( + col1 ) + col0 * + cor0.col1 + col2 FROM tab2 cor0
----
1081
2027
6162

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3664
SELECT - CAST( - col0 AS SIGNED ) + col2 * 62 AS col2 FROM tab1 AS cor0
----
3351
3598
6032

skipif mysql # not compatible
query I rowsort label-3664
SELECT - CAST ( - col0 AS INTEGER ) + col2 * 62 AS col2 FROM tab1 AS cor0
----
3351
3598
6032

onlyif mysql # use DIV operator for integer division
query I rowsort label-3665
SELECT DISTINCT - - 49 + + 64 DIV - col1 AS col2 FROM tab1 AS cor0
----
43
45
47

skipif mysql # not compatible
query I rowsort label-3665
SELECT DISTINCT - - 49 + + 64 / - col1 AS col2 FROM tab1 AS cor0
----
43
45
47

query I rowsort
SELECT ALL col1 * + cor0.col1 + col1 FROM tab1 AS cor0
----
110
182
702

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3667
SELECT ALL + col0 * col2 + + col2 * CAST( NULL AS SIGNED ) * + col2 + + col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3667
SELECT ALL + col0 * col2 + + col2 * CAST ( NULL AS INTEGER ) * + col2 + + col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 89 * - col2 * col0 AS col2 FROM tab2 AS cor0
----
-16821
-180492
-267178

query I rowsort
SELECT - + 86 * - cor0.col2 FROM tab2 AS cor0
----
2236
2322
3268

query I rowsort
SELECT DISTINCT + - ( cor0.col0 ) AS col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT col2 * tab0.col1 * + col0 - tab0.col0 FROM tab0
----
3360
664029
68088

query I rowsort
SELECT cor0.col2 / col1 AS col2 FROM tab1 AS cor0 WHERE NOT - col0 NOT BETWEEN NULL AND - col0
----

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab1, tab2 AS cor0 CROSS JOIN tab0
----
-17
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 / tab0.col1 col0 FROM tab0 WHERE ( NULL ) BETWEEN NULL AND NULL
----

query I rowsort
SELECT - col2 - col2 FROM tab2 WHERE NOT - tab2.col2 / + col1 = ( - col2 )
----
-52
-54
-76

query I rowsort
SELECT DISTINCT tab0.col1 * col0 - + col0 FROM tab0
----
2040
3360
8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 - col0 col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT col0 FROM tab1 WHERE NOT - col2 <= col1 + - col1 / col2
----

query I rowsort
SELECT tab0.col2 FROM tab0 WHERE NOT - col1 BETWEEN NULL AND NULL
----

query I rowsort
SELECT + col0 FROM tab2 AS cor0 WHERE NOT NULL <> NULL
----

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab0 AS cor0 WHERE - col2 * col2 + col0 - - col0 * col1 * col2 <= + col2 * col2
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - tab1.col1 * + tab1.col2 col2 FROM tab1
----
-1328
-1407
-634

query I rowsort
SELECT ALL col0 * - col2 - - col2 * cor0.col2 FROM tab1 cor0
----
-399
1536
2754

query I rowsort
SELECT DISTINCT - col1 * + tab1.col2 + - tab1.col1 AS col0 FROM tab1
----
-1261
-1430
-580

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col1 * col2 + col2 col1 FROM tab2
----
119678
51072
5886

query I rowsort
SELECT DISTINCT col2 * - col2 + + col1 AS col1 FROM tab0
----
-1003
-6633
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3687
SELECT col2 DIV col2 + col0 AS col2 FROM tab0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-3687
SELECT col2 / col2 + col0 AS col2 FROM tab0
----
25
36
90

query I rowsort
SELECT ALL + col0 + - col0 * col0 AS col2 FROM tab1
----
-4032
-6
-6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-3689
SELECT DISTINCT - col1 DIV col2 + - col1 FROM tab1
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-3689
SELECT DISTINCT - col1 / col2 + - col1 FROM tab1
----
-10
-13
-26

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-3691
SELECT col2 DIV tab0.col0 + + tab0.col1 FROM tab0
----
87
91
97

skipif mysql # not compatible
query I rowsort label-3691
SELECT col2 / tab0.col0 + + tab0.col1 FROM tab0
----
87
91
97

query I rowsort
SELECT + - col2 * col0 * col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT - col2 * + cor0.col2 + - col1 + cor0.col0 FROM tab2 AS cor0
----
-1382
-657
-753

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 + col2 + col2 col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT col0 + col1 - - col1 FROM tab0 AS cor0
----
196
229
271

query I rowsort
SELECT ALL + col1 * col2 + col2 * - col2 AS col1 FROM tab2 AS cor0
----
-798
108
858

query I rowsort
SELECT ALL - col0 * + col2 + col1 + - col2 FROM tab1 AS cor0
----
-190
-3695
-7763

query I rowsort
SELECT ALL + col2 * + col0 + - col2 FROM tab0 AS cor0
----
34
7216
759

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 + col0 col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL + col2 * col0 * + col2 + col0 AS col1 FROM tab0 AS cor0
----
26160
598525
70

query I rowsort
SELECT DISTINCT + + cor0.col0 * + cor0.col0 + col2 AS col1 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT ALL col0 * cor0.col0 + - col2 FROM tab2 AS cor0
----
22
6058
6203

query I rowsort
SELECT DISTINCT + col1 + col0 - cor0.col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL + col2 + - col0 * col1 FROM tab1 AS cor0
----
-24
-583
-944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + - col0 + - col2 col0 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT ALL 25 FROM tab2, tab1 AS cor0, tab2 cor1
----
27 values hashing to 2c77240b60ac01c717a5ed5d0165f450

query I rowsort
SELECT col0 + col1 * col1 + - cor0.col1 AS col1 FROM tab1 AS cor0
----
154
236
653

query I rowsort
SELECT ALL - - 72 * + col0 AS col1 FROM tab2 AS cor0
----
504
5616
5688

query I rowsort
SELECT + col0 * - col0 * + col0 FROM tab0
----
-13824
-42875
-704969

query I rowsort
SELECT - + col0 + - col2 + cor0.col2 FROM tab1 AS cor0
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * col2 + col2 col0 FROM tab2 AS cor0
----
-1406
-650
-702

query I rowsort
SELECT DISTINCT + ( - cor1.col0 ) AS col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
-7
-78
-79

query I rowsort
SELECT col0 * + cor0.col1 + 85 + 59 * - col1 AS col2 FROM tab1 cor0
----
-1371
135
358

query I rowsort
SELECT + col2 + cor0.col2 + col2 FROM tab2 cor0
----
114
78
81

query I rowsort
SELECT col2 * col1 * - 30 FROM tab0
----
-223860
-2910
-85140

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + col2 + col2 * - col2 + col1 col1 FROM tab2
----
-509
1411
1575

query I rowsort
SELECT ALL + col1 + col2 * - col2 * - tab0.col2 FROM tab0
----
36023
551459
98

query I rowsort
SELECT col1 * col0 + tab2.col1 FROM tab2
----
1360
248
4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-3719
SELECT + col0 DIV col0 + col0 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-3719
SELECT + col0 / col0 + col0 FROM tab1
----
4
65
81

query I rowsort
SELECT ALL + tab2.col2 - - tab2.col1 * col2 FROM tab2
----
1560
684
864

query I rowsort
SELECT tab0.col0 + + tab0.col0 + col2 * + col1 * col2 AS col2 FROM tab0
----
167
612062
93702

query I rowsort
SELECT DISTINCT col2 + col1 - + col2 FROM tab0
----
86
91
97

query I rowsort
SELECT - col2 + - col2 + - col1 FROM tab2
----
-111
-85
-93

query III rowsort
SELECT * FROM tab1 WHERE NOT ( col1 + col1 + + col1 ) < ( col0 / - col1 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT DISTINCT tab0.col0 FROM tab0 WHERE col0 + col0 + col1 IN ( + col1 )
----

query I rowsort
SELECT DISTINCT tab2.col2 * + col1 * - col1 FROM tab2
----
-10982
-25947
-90506

onlyif mysql # use DIV operator for integer division
query I rowsort label-3727
SELECT - col2 DIV col1 - - col2 * col1 FROM tab1
----
1241
1402
565

skipif mysql # not compatible
query I rowsort label-3727
SELECT - col2 / col1 - - col2 * col1 FROM tab1
----
1241
1402
565

query III rowsort
SELECT ALL * FROM tab0 WHERE col2 + + col1 + - col0 <> col0 + - col0
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT ALL col0 + + col1 * col1 FROM tab2
----
3559
368
968

query I rowsort
SELECT DISTINCT + col0 - + tab0.col0 * - col0 FROM tab0
----
1260
600
8010

query I rowsort
SELECT + col2 * - cor0.col0 * col0 FROM tab1 cor0
----
-233472
-486
-614400

query I rowsort
SELECT + + col0 * - cor0.col0 * + cor0.col0 AS col1 FROM tab0 AS cor0
----
-13824
-42875
-704969

query I rowsort
SELECT + + col0 + + col1 * - col2 AS col0 FROM tab1 cor0
----
-1168
-1401
-506

query I rowsort
SELECT ALL - col2 + cor0.col1 * + col0 * - col0 FROM tab0 AS cor0
----
-118826
-49569
-720893

onlyif mysql # use DIV operator for integer division
query I rowsort label-3735
SELECT ALL + cor0.col0 DIV + col1 + - col2 * - col1 + + col2 FROM tab0 AS cor0
----
2871
7544
98

skipif mysql # not compatible
query I rowsort label-3735
SELECT ALL + cor0.col0 / + col1 + - col2 * - col1 + + col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT col2 + - 68 AS col0 FROM tab1 AS cor0
----
-11
-14
28

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3737
SELECT + CAST( NULL AS SIGNED ) / - col0 - - col0 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-3737
SELECT + CAST ( NULL AS INTEGER ) / - col0 - - col0 col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3738
SELECT - - 79 + 99 DIV - col1 AS col1 FROM tab2 AS cor0
----
74
76
78

skipif mysql # not compatible
query I rowsort label-3738
SELECT - - 79 + 99 / - col1 AS col1 FROM tab2 AS cor0
----
74
76
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-3739
SELECT + col0 DIV 56 FROM tab2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-3739
SELECT + col0 / 56 FROM tab2
----
0
1
1

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to e938777ebffc2e3e9c0cdfaa4f732c05

query I rowsort
SELECT - col1 * col1 + 80 FROM tab0 AS cor0
----
-7316
-8201
-9329

query I rowsort
SELECT ALL 83 * col1 FROM tab0
----
7138
7553
8051

query I rowsort
SELECT DISTINCT + col1 + ( + col0 ) AS col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT + col2 * ( - col2 ) + col0 AS col1 FROM tab0
----
-1065
-6635
34

query I rowsort
SELECT - col1 + + ( cor0.col0 ) AS col2 FROM tab0 AS cor0
----
-2
-62
-62

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col2 * CAST ( 28 AS REAL ) AS col0 FROM tab2 cor0
----
1064
728
756

onlyif mysql # use DIV operator for integer division
query I rowsort label-3747
SELECT - col1 DIV col0 + 23 AS col0 FROM tab0 AS cor0
----
20
21
22

skipif mysql # not compatible
query I rowsort label-3747
SELECT - col1 / col0 + 23 AS col0 FROM tab0 AS cor0
----
20
21
22

query I rowsort
SELECT ALL col1 * col0 + 14 * + col2 FROM tab2 AS cor0
----
1875
4966
595

onlyif mysql # use DIV operator for integer division
query I rowsort label-3749
SELECT ALL + col2 DIV 10 FROM tab2 AS cor0
----
2
2
3

skipif mysql # not compatible
query I rowsort label-3749
SELECT ALL + col2 / 10 FROM tab2 AS cor0
----
2
2
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-3750
SELECT 83 DIV - col1 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3750
SELECT 83 / - col1 AS col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3751
SELECT + ( col1 ) * col1 + - CAST( - col0 * col1 AS SIGNED ) FROM tab1 cor0
----
1209
740
754

skipif mysql # not compatible
query I rowsort label-3751
SELECT + ( col1 ) * col1 + - CAST ( - col0 * col1 AS INTEGER ) FROM tab1 cor0
----
1209
740
754

query I rowsort
SELECT - col1 + - col1 + cor0.col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT - - col0 * col0 * - col0 - col2 AS col2 FROM tab1 AS cor0
----
-262201
-512096
-81

query I rowsort
SELECT ALL cor0.col1 - - col0 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT DISTINCT + + col2 + - col0 AS col2 FROM tab0 AS cor0
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-3756
SELECT - col2 + col1 * col0 DIV - 20 AS col1 FROM tab2 AS cor0
----
-105
-256
-37

skipif mysql # not compatible
query I rowsort label-3756
SELECT - col2 + col1 * col0 / - 20 AS col1 FROM tab2 AS cor0
----
-105
-256
-37

query I rowsort
SELECT ALL - cor0.col0 + cor0.col2 * 84 FROM tab0 AS cor0
----
2748
49
6799

query I rowsort
SELECT + cor0.col1 * + col0 + - col2 AS col2 FROM tab1 AS cor0
----
24
583
944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab2.col1 col0 FROM tab2, tab1 AS cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT ALL - 22 AS col2 FROM tab2
----
-22
-22
-22

query I rowsort
SELECT - col2 + cor0.col1 AS col1 FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT ALL - ( col2 ) * col0 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT 16 + col2 FROM tab0 AS cor0
----
17
49
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3764
SELECT DISTINCT + 6 + col2 DIV col0 FROM tab2 AS cor0
----
6
9

skipif mysql # not compatible
query I rowsort label-3764
SELECT DISTINCT + 6 + col2 / col0 FROM tab2 AS cor0
----
6
9

query I rowsort
SELECT cor0.col0 * - col1 + 63 + 2 FROM tab2 AS cor0
----
-1278
-152
-4537

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3766
SELECT + col0 * + col0 * CAST( + ( - col1 ) + cor0.col2 AS SIGNED ) col0 FROM tab2 AS cor0
----
-196
-200772
131061

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3766
SELECT + col0 * + col0 * CAST ( + ( - col1 ) + cor0.col2 AS INTEGER ) col0 FROM tab2 AS cor0
----
-196
-200772
131061

query I rowsort
SELECT DISTINCT + cor0.col1 + + col1 * - col1 AS col1 FROM tab2 AS cor0
----
-272
-3422
-930

onlyif mysql # use DIV operator for integer division
query I rowsort label-3768
SELECT DISTINCT - - ( 82 ) DIV col1 + col0 col2 FROM tab1 AS cor0
----
6
72
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3768
SELECT DISTINCT - - ( 82 ) / col1 + col0 col2 FROM tab1 AS cor0
----
6
72
86

query I rowsort
SELECT DISTINCT - col0 + + col2 * cor0.col2 FROM tab1 AS cor0
----
2913
3185
9136

query I rowsort
SELECT col1 * 6 + + cor0.col0 FROM tab0 AS cor0
----
540
617
635

query I rowsort
SELECT - ( col1 ) * + col1 + + ( + col1 ) * cor0.col2 * 80 AS col1 FROM tab1 AS cor0
----
111644
45500
99671

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col1 AS REAL ) + + col1 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT col0 * 74 + tab0.col2 FROM tab0
----
1809
2591
6668

query I rowsort
SELECT DISTINCT - 83 * col1 AS col0 FROM tab0
----
-7138
-7553
-8051

query I rowsort
SELECT + col1 + 77 AS col1 FROM tab2
----
108
136
94

query I rowsort
SELECT + ( tab2.col1 + - col2 ) FROM tab2
----
-21
33
4

query I rowsort
SELECT DISTINCT - ( + 48 ) * - col1 * 68 AS col0 FROM tab1
----
32640
42432
84864

query I rowsort
SELECT ALL ( ( cor0.col1 ) ) AS col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT + - 60 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 1a0b29f8e6f82c54623a665ba4af8fd1

query I rowsort
SELECT + col2 + + 89 FROM tab1
----
143
146
185

query I rowsort
SELECT DISTINCT + col0 - tab2.col1 * + col2 AS col1 FROM tab2
----
-1456
-567
-830

query I rowsort
SELECT ALL + col1 * col2 - - col1 AS col0 FROM tab0
----
194
2924
7553

query I rowsort
SELECT DISTINCT + - 41 FROM tab0, tab1, tab2 AS cor0
----
-41

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3784
SELECT col2 * col1 * + CAST( col1 * + col0 AS SIGNED ) FROM tab0
----
329315
5857632
60434738

skipif mysql # not compatible
query I rowsort label-3784
SELECT col2 * col1 * + CAST ( col1 * + col0 AS INTEGER ) FROM tab0
----
329315
5857632
60434738

query I rowsort
SELECT ALL tab2.col1 - col0 * + 16 AS col2 FROM tab2
----
-1189
-1247
-81

query I rowsort
SELECT + col0 - 4 * - col1 AS col1 FROM tab0 AS cor0
----
368
423
453

query I rowsort
SELECT DISTINCT - cor0.col2 * 85 * + col0 + col1 FROM tab1 AS cor0
----
-13744
-310070
-652787

query I rowsort
SELECT DISTINCT + 67 * col1 + - col2 AS col1 FROM tab1
----
1688
613
775

query I rowsort
SELECT ALL - 47 + col1 AS col2 FROM tab0
----
39
44
50

query I rowsort
SELECT - 24 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to f2e40f6e5cdbc2877843191cb261975f

query I rowsort
SELECT ALL + ( col1 ) + + 52 FROM tab0
----
138
143
149

query I rowsort
SELECT ALL + col0 + - ( - 69 ) FROM tab0 AS cor0
----
104
158
93

query I rowsort
SELECT + 98 AS col2 FROM tab2, tab2 cor0
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * 23 * col1 + - col0 + ( + col0 ) col2 FROM tab1
----
13110
28704
32292

query I rowsort
SELECT - + col2 * - col0 - + col2 AS col1 FROM tab0 AS cor0
----
34
7216
759

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 - - 51 * cor0.col0 col1 FROM tab2 AS cor0
----
388
4037
4046

onlyif mysql # use DIV operator for integer division
query I rowsort label-3797
SELECT + col1 DIV + ( cor0.col0 ) FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-3797
SELECT + col1 / + ( cor0.col0 ) FROM tab0 AS cor0
----
1
2
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-3798
SELECT ALL - col2 DIV - col0 + 14 AS col2 FROM tab0 AS cor0
----
14
14
15

skipif mysql # not compatible
query I rowsort label-3798
SELECT ALL - col2 / - col0 + 14 AS col2 FROM tab0 AS cor0
----
14
14
15

query I rowsort
SELECT ALL + col2 * - 3 + col0 FROM tab0 AS cor0
----
-157
-75
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * col1 col2 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - col0 * - 58 AS col0 FROM tab0 AS cor0
----
1392
2030
5162

query I rowsort
SELECT tab2.col2 * - col0 + - 48 FROM tab2
----
-2076
-237
-3050

query I rowsort
SELECT DISTINCT col1 + - col1 * + ( + col2 ) FROM tab1
----
-1235
-1378
-560

onlyif mysql # use DIV operator for integer division
query I rowsort label-3804
SELECT DISTINCT - col2 * col1 + + 13 DIV - col0 FROM tab0
----
-2838
-7462
-97

skipif mysql # not compatible
query I rowsort label-3804
SELECT DISTINCT - col2 * col1 + + 13 / - col0 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT + - col0 * - 16 AS col0 FROM tab1 AS cor0
----
1024
1280
48

query I rowsort
SELECT - col0 * 23 + + col0 AS col2 FROM tab1 AS cor0
----
-1408
-1760
-66

query I rowsort
SELECT DISTINCT + col0 + 32 FROM tab2 AS cor0
----
110
111
39

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3808
SELECT cor0.col0 + - ( col2 ) * + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3808
SELECT cor0.col0 + - ( col2 ) * + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3809
SELECT DISTINCT - + CAST( NULL AS SIGNED ) + ( + cor0.col0 * + 30 ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3809
SELECT DISTINCT - + CAST ( NULL AS INTEGER ) + ( + cor0.col0 * + 30 ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT col1 * - col0 + col1 * ( 14 ) FROM tab2 AS cor0
----
-1105
-3776
217

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3811
SELECT + CAST( + col0 AS SIGNED ) col1 FROM tab0 AS cor0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3811
SELECT + CAST ( + col0 AS INTEGER ) col1 FROM tab0 AS cor0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 19 col2 FROM tab2 AS cor0
----
19
19
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 55 * 56 col2 FROM tab0 AS cor0
----
3080
3080
3080

query I rowsort
SELECT DISTINCT + - 53 + col1 * + 62 AS col2 FROM tab1 AS cor0
----
1559
567
753

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3815
SELECT + 66 + + col2 * CAST( - 92 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-2326
-2418
-3430

skipif mysql # not compatible
query I rowsort label-3815
SELECT + 66 + + col2 * CAST ( - 92 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-2326
-2418
-3430

query I rowsort
SELECT + 38 * - col2 AS col1 FROM tab2 AS cor0
----
-1026
-1444
-988

query I rowsort
SELECT DISTINCT ( + col0 ) + 22 FROM tab1 AS cor0
----
102
25
86

query I rowsort
SELECT ALL - + ( + col0 ) + col0 * + col0 FROM tab2 AS cor0
----
42
6006
6162

onlyif mysql # use DIV operator for integer division
query I rowsort label-3819
SELECT ALL + 28 + + col2 DIV col1 FROM tab1 AS cor0
----
30
33
35

skipif mysql # not compatible
query I rowsort label-3819
SELECT ALL + 28 + + col2 / col1 FROM tab1 AS cor0
----
30
33
35

query I rowsort
SELECT - cor0.col1 * col2 * - 44 + + col1 FROM tab2 AS cor0
----
28441
36859
67555

onlyif mysql # use DIV operator for integer division
query I rowsort label-3821
SELECT DISTINCT 24 * col0 DIV - ( + 13 ) AS col0 FROM tab1
----
-118
-147
-5

skipif mysql # not compatible
query I rowsort label-3821
SELECT DISTINCT 24 * col0 / - ( + 13 ) AS col0 FROM tab1
----
-118
-147
-5

query I rowsort
SELECT ALL 43 + col2 FROM tab0
----
125
44
76

query I rowsort
SELECT DISTINCT + 19 * + col0 + col2 AS col0 FROM tab1
----
111
1273
1616

query I rowsort
SELECT - col0 * 12 AS col0 FROM tab0 AS cor0
----
-1068
-288
-420

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3825
SELECT DISTINCT CAST( NULL AS SIGNED ) * col0 + col2 col2 FROM tab1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3825
SELECT DISTINCT CAST ( NULL AS INTEGER ) * col0 + col2 col2 FROM tab1
----
NULL

query I rowsort
SELECT + - 28 AS col2 FROM tab2 cor0
----
-28
-28
-28

query I rowsort
SELECT DISTINCT col0 * col1 + col0 FROM tab1 cor0
----
1120
704
81

query I rowsort
SELECT DISTINCT 81 + col1 * + ( + col2 ) FROM tab1 AS cor0
----
1329
1485
651

query I rowsort
SELECT ALL - col2 - col2 AS col2 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT DISTINCT 0 + col1 * - 90 AS col0 FROM tab2 AS cor0
----
-1530
-2790
-5310

query I rowsort
SELECT ALL + 68 * - col1 AS col0 FROM tab0 AS cor0
----
-5848
-6188
-6596

onlyif mysql # use DIV operator for integer division
query I rowsort label-3832
SELECT DISTINCT + + col0 DIV cor0.col1 + ( col2 ) AS col0 FROM tab1 cor0
----
102
54
63

skipif mysql # not compatible
query I rowsort label-3832
SELECT DISTINCT + + col0 / cor0.col1 + ( col2 ) AS col0 FROM tab1 cor0
----
102
54
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 27 * col1 - + col2 col0 FROM tab0 AS cor0
----
2289
2375
2618

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 - col0 col1 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT - 70 AS col2 FROM tab1, tab2 AS cor0
----
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-3836
SELECT - col1 DIV 12 + col1 * col2 col0 FROM tab2
----
1530
645
835

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3836
SELECT - col1 / 12 + col1 * col2 col0 FROM tab2
----
1530
645
835

query I rowsort
SELECT col0 + + col2 + col2 * col1 AS col0 FROM tab2 AS cor0
----
1638
763
871

query I rowsort
SELECT + col1 * + col1 * + col0 AS col2 FROM tab1 AS cor0
----
13520
2028
6400

query I rowsort
SELECT - cor0.col0 * - cor0.col1 + + col2 AS col0 FROM tab1 cor0
----
1136
132
697

query I rowsort
SELECT ALL + col1 * - 47 + - col0 AS col2 FROM tab0 cor0
----
-4066
-4366
-4594

query I rowsort
SELECT + col0 + - col1 * col0 + col0 * 34 FROM tab0 AS cor0
----
-1224
-2170
-4984

query I rowsort
SELECT - + col0 + 54 + col0 AS col0 FROM tab0 AS cor0
----
54
54
54

skipif mysql # not compatible
query I rowsort
SELECT ALL - - CAST ( cor0.col0 AS REAL ) + - col2 - + col1 * col2 * col0 AS col1 FROM tab0 AS cor0
----
-3361
-664111
-68121

query I rowsort
SELECT ALL - ( col0 ) + col2 AS col2 FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT - ( 17 ) + - col1 FROM tab1 AS cor0
----
-27
-30
-43

query I rowsort
SELECT ALL - 46 AS col0 FROM tab2 cor0
----
-46
-46
-46

query I rowsort
SELECT DISTINCT - col0 + - col1 * cor0.col0 FROM tab0 AS cor0
----
-2088
-3430
-8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-3848
SELECT DISTINCT + cor0.col0 DIV + 2 FROM tab1 AS cor0
----
1
32
40

skipif mysql # not compatible
query I rowsort label-3848
SELECT DISTINCT + cor0.col0 / + 2 FROM tab1 AS cor0
----
1
32
40

query I rowsort
SELECT 63 + + 43 AS col2 FROM tab1 AS cor0
----
106
106
106

query I rowsort
SELECT + col2 + 15 FROM tab2 AS cor0
----
41
42
53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3851
SELECT DISTINCT col0 * + CAST( + 23 AS SIGNED ) - - col0 * tab1.col2 AS col1 FROM tab1
----
231
5120
9520

skipif mysql # not compatible
query I rowsort label-3851
SELECT DISTINCT col0 * + CAST ( + 23 AS INTEGER ) - - col0 * tab1.col2 AS col1 FROM tab1
----
231
5120
9520

query I rowsort
SELECT DISTINCT - col1 * + tab0.col2 * col1 - - col1 * - col1 FROM tab0
----
-18818
-251464
-687323

onlyif mysql # use DIV operator for integer division
query I rowsort label-3853
SELECT - + col2 * - col2 + col2 DIV 10 + col0 FROM tab2 AS cor0
----
1526
738
756

skipif mysql # not compatible
query I rowsort label-3853
SELECT - + col2 * - col2 + col2 / 10 + col0 FROM tab2 AS cor0
----
1526
738
756

query I rowsort
SELECT DISTINCT ( + cor0.col1 ) * - col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT ALL - 11 * + cor0.col1 FROM tab1 cor0
----
-110
-143
-286

query I rowsort
SELECT DISTINCT col1 + col0 + col2 FROM tab1 AS cor0
----
131
189
83

query I rowsort
SELECT DISTINCT + + col1 * - ( + cor0.col0 ) AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT + - col2 * + col1 + col1 * - ( + col1 ) AS col2 FROM tab2 AS cor0
----
-1798
-5015
-935

query I rowsort
SELECT ALL + + cor0.col1 * cor0.col0 AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT col1 + - 97 - + col1 AS col0 FROM tab1 AS cor0
----
-97
-97
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3861
SELECT + - col1 DIV - 59 + - col1 AS col0 FROM tab2 AS cor0
----
-17
-31
-58

skipif mysql # not compatible
query I rowsort label-3861
SELECT + - col1 / - 59 + - col1 AS col0 FROM tab2 AS cor0
----
-17
-31
-58

query I rowsort
SELECT ALL - col1 + + col0 * - tab2.col0 AS col2 FROM tab2
----
-6143
-6258
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col0 * - col1 col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - 27 * + ( col2 * 48 ) AS col1 FROM tab2
----
-33696
-34992
-49248

query I rowsort
SELECT + + col0 + - col2 * + col0 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT - col0 * ( cor0.col1 ) + + col2 + cor0.col1 * - col1 AS col2 FROM tab1 cor0
----
-1113
-683
-700

query I rowsort
SELECT DISTINCT + + col0 * 38 AS col2 FROM tab0 AS cor0
----
1330
3382
912

query I rowsort
SELECT ALL + - col2 + - ( + col0 * + col0 ) AS col0 FROM tab2 AS cor0
----
-6110
-6279
-76

query I rowsort
SELECT ALL - col1 + 33 AS col1 FROM tab2
----
-26
16
2

query I rowsort
SELECT ALL col0 * col2 - - tab2.col2 FROM tab2
----
2054
216
3040

query I rowsort
SELECT DISTINCT + col1 - - 54 AS col0 FROM tab1
----
64
67
80

query I rowsort
SELECT + ( 41 ) FROM tab0, tab0 AS cor0
----
9 values hashing to 5b18986bb294412b3d9f07b7e6fc821e

query I rowsort
SELECT DISTINCT + col1 + col1 * + col1 + + col2 AS col2 FROM tab2 AS cor0
----
1019
344
3566

onlyif mysql # use DIV operator for integer division
query I rowsort label-3874
SELECT ALL col1 + ( - cor0.col0 ) DIV col1 AS col2 FROM tab1 cor0
----
26
4
7

skipif mysql # not compatible
query I rowsort label-3874
SELECT ALL col1 + ( - cor0.col0 ) / col1 AS col2 FROM tab1 cor0
----
26
4
7

query I rowsort
SELECT + - col2 * 49 + - col2 * col2 FROM tab0 AS cor0
----
-10742
-2706
-50

query I rowsort
SELECT + col2 * + 4 - col2 FROM tab0 AS cor0
----
246
3
99

query I rowsort
SELECT - cor0.col1 * + col1 AS col0 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL ( + cor0.col2 ) + - ( + col1 ) FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT - ( col0 ) - 23 FROM tab0 AS cor0
----
-112
-47
-58

query I rowsort
SELECT + - ( + col2 ) * + cor0.col2 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT - cor0.col2 + - col0 AS col0 FROM tab0 cor0
----
-171
-36
-57

query I rowsort
SELECT ALL + col2 * - cor0.col2 * col1 FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT - - 36 * - col2 + - 51 FROM tab0 AS cor0
----
-1239
-3003
-87

query I rowsort
SELECT - cor0.col0 + + cor0.col2 AS col0 FROM tab2 AS cor0
----
-41
-52
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-3885
SELECT ALL + col1 * + col1 + cor0.col2 DIV + col0 AS col1 FROM tab1 AS cor0
----
100
170
694

skipif mysql # not compatible
query I rowsort label-3885
SELECT ALL + col1 * + col1 + cor0.col2 / + col0 AS col1 FROM tab1 AS cor0
----
100
170
694

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3886
SELECT ALL col1 * + CAST( + col1 * + col2 + - 47 AS SIGNED ) FROM tab2 cor0
----
10183
24490
87733

skipif mysql # not compatible
query I rowsort label-3886
SELECT ALL col1 * + CAST ( + col1 * + col2 + - 47 AS INTEGER ) FROM tab2 cor0
----
10183
24490
87733

query I rowsort
SELECT ALL - col1 * + col1 + col0 + col0 AS col1 FROM tab2 AS cor0
----
-131
-3325
-947

query I rowsort
SELECT 51 AS col1 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 02a7de94365b8cb5b5cb92c4b1d1e7c5

query I rowsort
SELECT ALL ( - 79 ) FROM tab0 AS cor0
----
-79
-79
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 35 col2 FROM tab2, tab1 AS cor0
----
-35

onlyif mysql # use DIV operator for integer division
query I rowsort label-3891
SELECT DISTINCT cor0.col2 DIV - cor0.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-3891
SELECT DISTINCT cor0.col2 / - cor0.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
-2
-5
-7

query I rowsort
SELECT DISTINCT + 29 AS col1 FROM tab0 cor0
----
29

query I rowsort
SELECT DISTINCT col2 * 92 FROM tab2 AS cor0
----
2392
2484
3496

query I rowsort
SELECT - 61 + col0 AS col2 FROM tab2 AS cor0
----
-54
17
18

query I rowsort
SELECT - 70 + - col1 * ( col1 + col0 ) AS col0 FROM tab2 AS cor0
----
-1248
-1702
-8153

query I rowsort
SELECT ALL - col0 - - 51 FROM tab0
----
-38
16
27

query I rowsort
SELECT 37 + - tab1.col0 * col2 + col2 * - 71 FROM tab1
----
-14459
-3959
-7658

query I rowsort
SELECT + col1 + - 10 * - col0 FROM tab2
----
101
807
839

query I rowsort
SELECT col2 * col0 - col0 FROM tab0 cor0
----
0
7209
768

query I rowsort
SELECT ALL 21 * + col2 AS col0 FROM tab2
----
546
567
798

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * 34 col0 FROM tab0
----
-2924
-3094
-3298

onlyif mysql # use DIV operator for integer division
query I rowsort label-3902
SELECT DISTINCT 14 DIV col1 AS col1 FROM tab1
----
0
1

skipif mysql # not compatible
query I rowsort label-3902
SELECT DISTINCT 14 / col1 AS col1 FROM tab1
----
0
1

query I rowsort
SELECT ( cor0.col1 ) FROM tab1, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT ALL 12 AS col2 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 702478c53caf2f7ebb9fff96d800f5a6

query I rowsort
SELECT ( + col0 ) * + 88 FROM tab2 AS cor0
----
616
6864
6952

query I rowsort
SELECT 56 * - cor0.col2 AS col2 FROM tab2 AS cor0
----
-1456
-1512
-2128

query I rowsort
SELECT 53 * + 65 FROM tab2, tab2 AS cor0 CROSS JOIN tab1
----
27 values hashing to 437e8c0137dd533edf5152a2d108552a

query I rowsort
SELECT - - 45 + - col0 FROM tab2 AS cor0
----
-33
-34
38

query I rowsort
SELECT DISTINCT col2 * col2 * ( + col1 ) AS col2 FROM tab0
----
611884
93654
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3910
SELECT DISTINCT tab1.col0 DIV - col2 col2 FROM tab1
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3910
SELECT DISTINCT tab1.col0 / - col2 col2 FROM tab1
----
-1
0

query I rowsort
SELECT 52 * - tab2.col1 FROM tab2
----
-1612
-3068
-884

query I rowsort
SELECT + 1 + + col0 * cor0.col2 AS col2 FROM tab0 AS cor0
----
36
7299
793

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3913
SELECT CAST( NULL AS SIGNED ) FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-3913
SELECT CAST ( NULL AS INTEGER ) FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # use DIV operator for integer division
query I rowsort label-3914
SELECT 77 DIV col2 AS col2 FROM tab1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-3914
SELECT 77 / col2 AS col2 FROM tab1
----
0
1
1

query I rowsort
SELECT col2 + 21 * - 94 AS col0 FROM tab1
----
-1878
-1917
-1920

query I rowsort
SELECT DISTINCT + 96 FROM tab1, tab1 AS cor0
----
96

query I rowsort
SELECT - tab2.col0 * - 55 AS col2 FROM tab2
----
385
4290
4345

onlyif mysql # use DIV operator for integer division
query I rowsort label-3918
SELECT + col0 + col0 DIV - tab0.col2 AS col2 FROM tab0
----
0
24
88

skipif mysql # not compatible
query I rowsort label-3918
SELECT + col0 + col0 / - tab0.col2 AS col2 FROM tab0
----
0
24
88

query I rowsort
SELECT - - col2 + - 78 FROM tab2 AS cor0
----
-40
-51
-52

query I rowsort
SELECT col1 + + col1 * col2 AS col0 FROM tab1
----
1261
1430
580

onlyif mysql # use DIV operator for integer division
query I rowsort label-3921
SELECT DISTINCT - tab0.col1 + - 10 DIV + 5 FROM tab0, tab1, tab1 AS cor0
----
-88
-93
-99

skipif mysql # not compatible
query I rowsort label-3921
SELECT DISTINCT - tab0.col1 + - 10 / + 5 FROM tab0, tab1, tab1 AS cor0
----
-88
-93
-99

query I rowsort
SELECT cor1.col2 AS col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT DISTINCT col1 + + 56 FROM tab0 AS cor0
----
142
147
153

query I rowsort
SELECT + - 30 * ( + col2 ) FROM tab2 cor0
----
-1140
-780
-810

query I rowsort
SELECT ALL + + ( col0 ) + col2 AS col0 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT DISTINCT + ( col1 * - tab2.col0 ) AS col1 FROM tab2
----
-1343
-217
-4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3927
SELECT ALL - col0 * - CAST( NULL AS SIGNED ) + + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3927
SELECT ALL - col0 * - CAST ( NULL AS INTEGER ) + + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col0 * ( - cor0.col2 ) + col1 AS col1 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT col2 * + ( + col2 ) FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT - - col0 + 58 AS col0 FROM tab0 AS cor0
----
147
82
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-3931
SELECT ALL + col1 + + col0 DIV col1 AS col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-3931
SELECT ALL + col1 + + col0 / col1 AS col1 FROM tab0
----
86
91
97

query I rowsort
SELECT ALL - 83 AS col1 FROM tab0
----
-83
-83
-83

query I rowsort
SELECT + col2 * + 18 + col2 FROM tab1 AS cor0
----
1026
1083
1824

query I rowsort
SELECT DISTINCT tab0.col0 + + col0 * - col1 + col0 FROM tab0
----
-2016
-3325
-7921

query I rowsort
SELECT ALL col1 + 71 + 83 * - col1 AS col0 FROM tab0
----
-6981
-7391
-7883

query I rowsort
SELECT + col2 * + 48 FROM tab1 AS cor0
----
2592
2736
4608

query I rowsort
SELECT - col0 + - 23 * - col1 AS col2 FROM tab1 AS cor0
----
166
219
595

query I rowsort
SELECT ALL + col0 * - 33 AS col0 FROM tab1 AS cor0
----
-2112
-2640
-99

onlyif mysql # use DIV operator for integer division
query I rowsort label-3939
SELECT DISTINCT - cor0.col1 + - 68 DIV - 3 col0 FROM tab1 AS cor0
----
-4
12
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3939
SELECT DISTINCT - cor0.col1 + - 68 / - 3 col0 FROM tab1 AS cor0
----
-4
12
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-3940
SELECT - + col2 + col1 DIV + col2 col0 FROM tab0 AS cor0
----
-31
-81
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3940
SELECT - + col2 + col1 / + col2 col0 FROM tab0 AS cor0
----
-31
-81
96

query I rowsort
SELECT 89 * - 78 AS col1 FROM tab1 AS cor0
----
-6942
-6942
-6942

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 38 col1 FROM tab2 AS cor0
----
-38
-38
-38

query I rowsort
SELECT + ( col2 ) + + 74 FROM tab1 AS cor0
----
128
131
170

query I rowsort
SELECT ALL + + col1 * - col2 - + col1 AS col1 FROM tab1 cor0
----
-1261
-1430
-580

query I rowsort
SELECT ALL + - cor0.col2 + + cor0.col1 AS col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT + 25 * col2 AS col0 FROM tab2 AS cor0
----
650
675
950

query I rowsort
SELECT ALL - + col0 + col2 * - ( + col2 + col2 ) FROM tab0 AS cor0
----
-13537
-2202
-37

query I rowsort
SELECT + cor0.col1 * col2 * + col0 AS col0 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT + 61 - col2 * - col1 FROM tab2 AS cor0
----
1595
707
898

query I rowsort
SELECT - - cor0.col2 + + cor0.col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT + - col2 + + col1 * cor0.col2 * + col0 AS col0 FROM tab0 AS cor0
----
3394
664036
68079

onlyif mysql # use DIV operator for integer division
query I rowsort label-3952
SELECT ( col2 ) DIV col1 + col2 * col0 FROM tab2
----
189
2028
3004

skipif mysql # not compatible
query I rowsort label-3952
SELECT ( col2 ) / col1 + col2 * col0 FROM tab2
----
189
2028
3004

onlyif mysql # use DIV operator for integer division
query I rowsort label-3953
SELECT DISTINCT col2 DIV col1 + tab1.col2 FROM tab1
----
103
56
62

skipif mysql # not compatible
query I rowsort label-3953
SELECT DISTINCT col2 / col1 + tab1.col2 FROM tab1
----
103
56
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-3954
SELECT ALL + + 64 + + cor0.col1 * cor0.col1 DIV - col1 AS col1 FROM tab1 cor0
----
38
51
54

skipif mysql # not compatible
query I rowsort label-3954
SELECT ALL + + 64 + + cor0.col1 * cor0.col1 / - col1 AS col1 FROM tab1 cor0
----
38
51
54

query I rowsort
SELECT DISTINCT cor0.col1 * col0 + - col2 AS col0 FROM tab1 AS cor0
----
24
583
944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * - col1 + col1 - col1 * col0 * + col1 col2 FROM tab0 AS cor0
----
-180256
-329315
-744380

query I rowsort
SELECT + + 53 + + col0 FROM tab0 AS cor0
----
142
77
88

query I rowsort
SELECT + 42 + + col2 * + col2 FROM tab1 AS cor0
----
2958
3291
9258

query I rowsort
SELECT ALL - 37 * - col0 * + col1 AS col1 FROM tab2 AS cor0
----
170274
49691
8029

query I rowsort
SELECT DISTINCT + - col1 - col2 * col1 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT ALL + + col1 - - col0 FROM tab0 AS cor0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 - col0 col0 FROM tab0 cor0
----
-110
-132
-180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * cor0.col2 + col2 col2 FROM tab2 cor0
----
2054
216
3040

query I rowsort
SELECT ALL 19 - col0 FROM tab0
----
-16
-5
-70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( col2 ) * cor0.col0 col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL - + col1 + 60 FROM tab1 AS cor0
----
34
47
50

query I rowsort
SELECT ( 52 ) FROM tab0 AS cor0
----
52
52
52

query I rowsort
SELECT DISTINCT - + 12 AS col0 FROM tab2 AS cor0
----
-12

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3969
SELECT + + CAST( NULL AS SIGNED ) + - col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3969
SELECT + + CAST ( NULL AS INTEGER ) + - col2 FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3970
SELECT DISTINCT - CAST( - 56 AS SIGNED ) FROM tab1 AS cor0
----
56

skipif mysql # not compatible
query I rowsort label-3970
SELECT DISTINCT - CAST ( - 56 AS INTEGER ) FROM tab1 AS cor0
----
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 58 * 49 col1 FROM tab0 AS cor0
----
2842
2842
2842

query I rowsort
SELECT DISTINCT col1 + 10 * col2 AS col2 FROM tab1 cor0
----
566
580
973

query I rowsort
SELECT - cor0.col1 * 82 FROM tab2 AS cor0
----
-1394
-2542
-4838

query I rowsort
SELECT DISTINCT ( tab0.col1 + - tab0.col1 ) AS col1 FROM tab0
----
0

query I rowsort
SELECT DISTINCT - ( + col1 ) * col0 * col0 FROM tab0
----
-118825
-49536
-720811

query I rowsort
SELECT 38 + + col0 FROM tab2
----
116
117
45

query I rowsort
SELECT ALL - col1 * - tab2.col0 AS col2 FROM tab2
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-3978
SELECT DISTINCT - col1 DIV + 78 AS col2 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-3978
SELECT DISTINCT - col1 / + 78 AS col2 FROM tab2 AS cor0
----
0

query I rowsort
SELECT - cor0.col1 * - 85 * - 7 AS col1 FROM tab1 AS cor0
----
-15470
-5950
-7735

query I rowsort
SELECT ALL - col0 + ( + col2 ) * - cor0.col1 AS col1 FROM tab0 AS cor0
----
-132
-2862
-7551

query I rowsort
SELECT col2 * col2 + + 72 FROM tab1 AS cor0
----
2988
3321
9288

query I rowsort
SELECT DISTINCT - - col1 + - ( ( + col1 ) + - 42 * col1 ) FROM tab0 AS cor0
----
3612
3822
4074

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3983
SELECT + ( - col0 ) + col1 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3983
SELECT + ( - col0 ) + col1 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 73 * + col1 FROM tab1 AS cor0
----
-1898
-730
-949

query I rowsort
SELECT + - col1 * col0 + - col2 * col1 FROM tab1 AS cor0
----
-1210
-1482
-2288

query I rowsort
SELECT ALL cor0.col1 FROM tab1, tab1 cor0, tab0 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT ALL 31 + 93 * - col2 AS col2 FROM tab0 AS cor0
----
-3038
-62
-7595

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3988
SELECT - CAST( col2 AS SIGNED ) * - col0 AS col0 FROM tab0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-3988
SELECT - CAST ( col2 AS INTEGER ) * - col0 AS col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT DISTINCT 93 AS col1 FROM tab0, tab1 cor0
----
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-3990
SELECT 41 * tab0.col0 DIV - col2 FROM tab0
----
-1435
-29
-44

skipif mysql # not compatible
query I rowsort label-3990
SELECT 41 * tab0.col0 / - col2 FROM tab0
----
-1435
-29
-44

query I rowsort
SELECT - col0 * - col2 * col2 AS col1 FROM tab2
----
114076
5103
52728

query I rowsort
SELECT - col0 * - col0 - col2 * - col2 FROM tab0 AS cor0
----
1226
14645
1665

onlyif mysql # use DIV operator for integer division
query I rowsort label-3993
SELECT ALL + + col0 * col0 + + col1 DIV col0 col0 FROM tab0 AS cor0
----
1227
579
7922

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3993
SELECT ALL + + col0 * col0 + + col1 / col0 col0 FROM tab0 AS cor0
----
1227
579
7922

query I rowsort
SELECT DISTINCT + - 50 * + col0 FROM tab0 AS cor0
----
-1200
-1750
-4450

query I rowsort
SELECT DISTINCT ( cor0.col0 ) * cor0.col0 AS col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT + - 87 * - col0 + - ( 92 ) FROM tab0 cor0
----
1996
2953
7651

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * + col0 * cor0.col0 col2 FROM tab0 AS cor0
----
-13824
-42875
-704969

onlyif mysql # use DIV operator for integer division
query I rowsort label-3998
SELECT ALL - col2 DIV + cor0.col0 col1 FROM tab2 AS cor0
----
-3
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3998
SELECT ALL - col2 / + cor0.col0 col1 FROM tab2 AS cor0
----
-3
0
0

query I rowsort
SELECT DISTINCT col1 * 64 + + col0 FROM tab2 cor0
----
1167
1991
3854

onlyif mysql # use DIV operator for integer division
query I rowsort label-4000
SELECT DISTINCT + - col0 + + cor0.col2 + col1 DIV + col0 FROM tab0 AS cor0
----
-32
-6
12

skipif mysql # not compatible
query I rowsort label-4000
SELECT DISTINCT + - col0 + + cor0.col2 + col1 / + col0 FROM tab0 AS cor0
----
-32
-6
12

query I rowsort
SELECT ALL + col1 - 48 * + col0 * - col2 FROM tab0 AS cor0
----
1777
350395
38102

onlyif mysql # use DIV operator for integer division
query I rowsort label-4002
SELECT DISTINCT + col1 DIV 97 FROM tab1 cor0
----
0

skipif mysql # not compatible
query I rowsort label-4002
SELECT DISTINCT + col1 / 97 FROM tab1 cor0
----
0

query I rowsort
SELECT + 64 * - col2 + - tab2.col1 * + tab2.col0 AS col0 FROM tab2
----
-1945
-3775
-6266

query I rowsort
SELECT + cor0.col2 * ( cor0.col0 ) AS col1 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 * - col0 * col2 col0 FROM tab1 AS cor0
----
-36480
-4212
-99840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 58 * 69 col0 FROM tab2 AS cor0
----
4002
4002
4002

query I rowsort
SELECT 93 * + col1 FROM tab2 AS cor0
----
1581
2883
5487

query I rowsort
SELECT - col1 + ( col1 ) FROM tab0
----
0
0
0

query I rowsort
SELECT + 20 * + 12 FROM tab0 cor0
----
240
240
240

query I rowsort
SELECT - + cor0.col1 * + 26 FROM tab2 AS cor0
----
-1534
-442
-806

query I rowsort
SELECT col1 * - col0 + ( col2 + col0 ) FROM tab1 AS cor0
----
-21
-519
-864

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4012
SELECT + CAST( NULL AS DECIMAL ) * - 29 AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4012
SELECT + CAST ( NULL AS REAL ) * - 29 AS col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 4 * 12 FROM tab2
----
48
48
48

query I rowsort
SELECT ( 30 + + col1 ) FROM tab1
----
40
43
56

query I rowsort
SELECT ALL - col2 + + 33 AS col0 FROM tab1
----
-21
-24
-63

query I rowsort
SELECT ALL - 20 - tab2.col0 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to da982cb18c2bc1d1acb5e248795ffe51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4017
SELECT - + 52 * + col2 + CAST( cor0.col1 AS SIGNED ) AS col2 FROM tab0 cor0
----
-1630
-4173
45

skipif mysql # not compatible
query I rowsort label-4017
SELECT - + 52 * + col2 + CAST ( cor0.col1 AS INTEGER ) AS col2 FROM tab0 cor0
----
-1630
-4173
45

query I rowsort
SELECT DISTINCT - 20 + + col0 FROM tab2 AS cor0
----
-13
58
59

query I rowsort
SELECT + + col1 * + cor0.col0 + col0 AS col2 FROM tab2 AS cor0
----
1422
224
4680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * col0 + ( + ( cor0.col2 ) ) col2 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT DISTINCT - ( - col2 ) + 2 AS col1 FROM tab1 cor0
----
56
59
98

query I rowsort
SELECT ALL cor1.col0 * cor1.col1 AS col1 FROM tab0, tab0 cor0, tab1 AS cor1
----
27 values hashing to 2afdaba7b80c700b7635230c4f8524be

query I rowsort
SELECT + col1 * - col2 + + col2 AS col0 FROM tab1 AS cor0
----
-1152
-1350
-513

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 + col0 col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 2 + - cor0.col0 AS col2 FROM tab2 AS cor0
----
-5
-76
-77

query I rowsort
SELECT cor0.col2 + - cor0.col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT - 36 AS col1 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 3bcd07d22b62d2042b499253b1c13d9e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 88 * col0 col0 FROM tab1
----
264
5632
7040

query I rowsort
SELECT - + cor0.col1 * - col0 FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col0 * CAST ( - col0 AS REAL ) AS col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT col0 + + 67 AS col2 FROM tab1 AS cor0
----
131
147
70

query I rowsort
SELECT ALL - cor0.col1 + 76 FROM tab1 AS cor0
----
50
63
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-4033
SELECT ALL - col1 * + col0 + - col0 DIV col0 FROM tab0 AS cor0
----
-2065
-3396
-8100

skipif mysql # not compatible
query I rowsort label-4033
SELECT ALL - col1 * + col0 + - col0 / col0 FROM tab0 AS cor0
----
-2065
-3396
-8100

query I rowsort
SELECT ALL - - col1 * - col1 - + col1 FROM tab0 AS cor0
----
-7482
-8372
-9506

onlyif mysql # use DIV operator for integer division
query I rowsort label-4035
SELECT ALL col2 + + col0 + 70 DIV + ( + col1 ) AS col2 FROM tab0
----
171
36
57

skipif mysql # not compatible
query I rowsort label-4035
SELECT ALL col2 + + col0 + 70 / + ( + col1 ) AS col2 FROM tab0
----
171
36
57

query I rowsort
SELECT + 30 FROM tab2, tab2 cor0, tab1 cor1
----
27 values hashing to 6c98840ed134c765d56389f4150075f0

query I rowsort
SELECT ALL col2 * - col1 + + col0 FROM tab0
----
-2814
-62
-7373

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab1, tab2, tab1 AS cor0, tab0
----
81 values hashing to 2df272448a67587d4635afedff278dcc

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - ( + 38 ) col2 FROM tab0 AS cor0
----
-38
-38
-38

query I rowsort
SELECT DISTINCT 33 * + col0 FROM tab2 AS cor0
----
231
2574
2607

query I rowsort
SELECT ALL col0 * 80 AS col2 FROM tab2 AS cor0
----
560
6240
6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-4042
SELECT + ( cor0.col2 ) DIV + col2 AS col1 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4042
SELECT + ( cor0.col2 ) / + col2 AS col1 FROM tab1 AS cor0
----
1
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4043
SELECT CAST( NULL AS SIGNED ) + 46 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-4043
SELECT CAST ( NULL AS INTEGER ) + 46 col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4044
SELECT CAST( NULL AS SIGNED ) + col0 col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4044
SELECT CAST ( NULL AS INTEGER ) + col0 col2 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + col2 * col0 * col1 AS col1 FROM tab2 AS cor0
----
119652
51034
5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-4046
SELECT DISTINCT + - cor0.col0 DIV + col1 AS col1 FROM tab2 AS cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-4046
SELECT DISTINCT + - cor0.col0 / + col1 AS col1 FROM tab2 AS cor0
----
-1
-4
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4047
SELECT - + col1 DIV - cor0.col2 col1 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4047
SELECT - + col1 / - cor0.col2 col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT 93 FROM tab2, tab2 cor0
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

query I rowsort
SELECT DISTINCT + 45 AS col0 FROM tab1, tab0 AS cor0
----
45

query I rowsort
SELECT DISTINCT - 42 FROM tab2, tab0 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
-42

query I rowsort
SELECT + ( 95 ) * + col0 FROM tab1 AS cor0
----
285
6080
7600

query I rowsort
SELECT col1 + 18 FROM tab2 AS cor0
----
35
49
77

query I rowsort
SELECT col2 * - col2 + - col2 FROM tab2
----
-1482
-702
-756

onlyif mysql # use DIV operator for integer division
query I rowsort label-4054
SELECT DISTINCT + 36 * tab0.col0 DIV col0 AS col2 FROM tab0
----
36

skipif mysql # not compatible
query I rowsort label-4054
SELECT DISTINCT + 36 * tab0.col0 / col0 AS col2 FROM tab0
----
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col2 col0 FROM tab0, tab1 cor0
----
1
33
82

query I rowsort
SELECT ALL 3 + cor0.col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 09b81aa37f23915f471d2a1280432bbd

onlyif mysql # use DIV operator for integer division
query I rowsort label-4057
SELECT ALL - cor0.col2 - - 81 DIV col1 FROM tab1 AS cor0
----
-49
-51
-90

skipif mysql # not compatible
query I rowsort label-4057
SELECT ALL - cor0.col2 - - 81 / col1 FROM tab1 AS cor0
----
-49
-51
-90

query I rowsort
SELECT col1 * + tab1.col1 + col0 FROM tab1
----
164
249
679

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( col1 AS REAL ) + - col1 AS col0 FROM tab2
----
0
0
0

query I rowsort
SELECT 96 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 22c5141a629f0ef396738ee2c8be6303

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4061
SELECT DISTINCT + + 20 * + col0 + - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4061
SELECT DISTINCT + + 20 * + col0 + - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - 28 * col2 FROM tab1 AS cor0
----
-1512
-1596
-2688

query I rowsort
SELECT ( + col0 ) * ( col2 ) * col1 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT + 31 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

query I rowsort
SELECT ALL - tab2.col0 * ( + 82 ) AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 42b59a367fa225585638578814d78b30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 * - col2 - + col2 * col0 col2 FROM tab1 cor0
----
-15360
-324
-7296

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 44 + col0 col0 FROM tab0 AS cor0
----
133
68
79

query I rowsort
SELECT ALL - + col0 + col1 * col2 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT ALL - 70 * col1 AS col0 FROM tab2 AS cor0
----
-1190
-2170
-4130

onlyif mysql # use DIV operator for integer division
query I rowsort label-4070
SELECT DISTINCT tab2.col0 DIV + ( ( col1 ) ) + col1 DIV 30 FROM tab2
----
1
2
4

skipif mysql # not compatible
query I rowsort label-4070
SELECT DISTINCT tab2.col0 / + ( ( col1 ) ) + col1 / 30 FROM tab2
----
1
2
4

query I rowsort
SELECT ALL ( 17 ) AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 43298e43365fccb5146ea32003753c92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4072
SELECT col1 * - CAST( NULL AS SIGNED ) + - col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4072
SELECT col1 * - CAST ( NULL AS INTEGER ) + - col2 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * 19 col1 FROM tab1 AS cor0
----
1026
1083
1824

query I rowsort
SELECT + - cor0.col1 + + col0 AS col2 FROM tab1 AS cor0
----
-23
54
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-4075
SELECT ALL + - col1 DIV - col1 AS col0 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4075
SELECT ALL + - col1 / - col1 AS col0 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT - cor0.col2 * - 79 FROM tab2 AS cor0
----
2054
2133
3002

query I rowsort
SELECT DISTINCT - col2 * + col1 + - col0 * col0 AS col1 FROM tab0 AS cor0
----
-1322
-15383
-3414

query I rowsort
SELECT - col2 + 82 FROM tab1 AS cor0
----
-14
25
28

query I rowsort
SELECT ALL col2 + 68 AS col1 FROM tab1 AS cor0
----
122
125
164

onlyif mysql # use DIV operator for integer division
query I rowsort label-4080
SELECT DISTINCT + col0 DIV CAST( col0 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-4080
SELECT DISTINCT + col0 / CAST ( col0 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
1

query I rowsort
SELECT DISTINCT + - ( + cor0.col0 ) + + col2 * - 23 FROM tab1 cor0
----
-1245
-1375
-2288

query I rowsort
SELECT ALL + - 61 * col1 * + cor0.col0 FROM tab2 AS cor0
----
-13237
-280722
-81923

query I rowsort
SELECT DISTINCT + + col2 * 42 AS col0 FROM tab1 cor0
----
2268
2394
4032

query I rowsort
SELECT - 10 AS col2 FROM tab0 cor0
----
-10
-10
-10

query I rowsort
SELECT ALL col1 * + col0 + col1 + ( - col2 ) AS col2 FROM tab1 AS cor0
----
50
593
957

query I rowsort
SELECT ALL col0 * + 55 FROM tab1 AS cor0
----
165
3520
4400

query I rowsort
SELECT ALL + 44 * ( - cor0.col0 ) FROM tab2 AS cor0
----
-308
-3432
-3476

query I rowsort
SELECT col0 * + 48 AS col1 FROM tab2 AS cor0
----
336
3744
3792

query I rowsort
SELECT - + cor0.col2 + - col2 * 61 AS col2 FROM tab0 AS cor0
----
-2046
-5084
-62

query I rowsort
SELECT - col0 * 41 * - col2 AS col2 FROM tab0 AS cor0
----
1435
299218
32472

query I rowsort
SELECT - - col2 * cor0.col0 FROM tab2 cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-4092
SELECT DISTINCT - - col2 * 53 + 56 DIV col1 FROM tab0 AS cor0
----
1749
4346
53

skipif mysql # not compatible
query I rowsort label-4092
SELECT DISTINCT - - col2 * 53 + 56 / col1 FROM tab0 AS cor0
----
1749
4346
53

query I rowsort
SELECT col0 * + col1 * col1 AS col0 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT DISTINCT + - 70 FROM tab1, tab2, tab1 AS cor0
----
-70

query I rowsort
SELECT col0 + col2 * 50 FROM tab1
----
2703
2914
4880

query I rowsort
SELECT + + col0 * ( + cor0.col2 ) FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-4097
SELECT col2 DIV + 90 + - 41 FROM tab2
----
-41
-41
-41

skipif mysql # not compatible
query I rowsort label-4097
SELECT col2 / + 90 + - 41 FROM tab2
----
-41
-41
-41

query I rowsort
SELECT ALL + 97 AS col0 FROM tab2, tab1 cor0
----
9 values hashing to 5e0d31ac41981bcdf6a665538a71a09c

query I rowsort
SELECT + + col2 * col1 * col2 FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT ALL cor1.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT ALL + col0 * 16 AS col2 FROM tab0 AS cor0
----
1424
384
560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + - ( + 16 ) * + col0 + col0 col2 FROM tab1 AS cor0
----
-1017
-1296
-99

query I rowsort
SELECT DISTINCT 91 * - col0 * + col2 + + 74 FROM tab0
----
-3111
-664044
-71998

query I rowsort
SELECT ALL + 92 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 516fa45c8b06f9f67d6e500bfd435c1a

query I rowsort
SELECT col1 * + col1 * col2 - ( 17 ) AS col0 FROM tab0
----
244051
679025
9392

query I rowsort
SELECT + 6 + col0 * col1 AS col0 FROM tab0 AS cor0
----
2070
3401
8105

query I rowsort
SELECT DISTINCT 85 * - col2 FROM tab2
----
-2210
-2295
-3230

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col2 + + 18 ) col2 FROM tab2
----
44
45
56

query I rowsort
SELECT - col1 * col0 + + col1 * - 73 AS col0 FROM tab0 AS cor0
----
-10476
-14742
-8342

query I rowsort
SELECT ALL + + col2 * + col1 + + cor0.col1 * col0 AS col1 FROM tab1 AS cor0
----
1210
1482
2288

onlyif mysql # use DIV operator for integer division
query I rowsort label-4111
SELECT - col1 * col2 DIV + col1 + - 5 AS col1 FROM tab0 AS cor0
----
-38
-6
-87

skipif mysql # not compatible
query I rowsort label-4111
SELECT - col1 * col2 / + col1 + - 5 AS col1 FROM tab0 AS cor0
----
-38
-6
-87

query I rowsort
SELECT DISTINCT - + col2 * col1 + 53 * col1 * - cor0.col1 AS col1 FROM tab2 AS cor0
----
-15963
-186027
-51770

query I rowsort
SELECT DISTINCT + 73 + - 89 FROM tab1, tab1 AS cor0
----
-16

query I rowsort
SELECT DISTINCT - col0 + + col1 + + 7 FROM tab0
----
69
9

query I rowsort
SELECT col0 + col2 * + col2 AS col1 FROM tab2
----
1523
736
754

query I rowsort
SELECT col0 + ( - cor0.col2 ) + col0 FROM tab2 cor0
----
-13
120
130

onlyif mysql # use DIV operator for integer division
query I rowsort label-4117
SELECT + + col2 DIV - cor0.col2 + cor0.col1 DIV col1 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4117
SELECT + + col2 / - cor0.col2 + cor0.col1 / col1 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + - 50 * col0 + col2 AS col0 FROM tab0 AS cor0
----
-1167
-1749
-4368

query I rowsort
SELECT + 73 + col1 * + col1 FROM tab0 AS cor0
----
7469
8354
9482

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4120
SELECT CAST( 87 + + col1 AS SIGNED ) * tab0.col0 FROM tab0
----
15842
4152
6440

skipif mysql # not compatible
query I rowsort label-4120
SELECT CAST ( 87 + + col1 AS INTEGER ) * tab0.col0 FROM tab0
----
15842
4152
6440

query I rowsort
SELECT - cor0.col1 * + 76 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 9a4cea708f93ee464d284aa0121b143a

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 AS col2 FROM tab0, tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT - ( - 19 ) + col2 * col0 * + col1 AS col1 FROM tab1 AS cor0
----
36499
4231
99859

query I rowsort
SELECT ALL 27 FROM tab0, tab1 AS cor0
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

query I rowsort
SELECT + col0 - ( col0 ) * tab1.col1 * ( - 43 ) FROM tab1
----
27584
3357
44800

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + + ( - col0 * tab1.col2 ) col0 FROM tab1
----
-165
-3712
-7760

query I rowsort
SELECT ALL - + col0 * + 92 FROM tab0 AS cor0
----
-2208
-3220
-8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-4128
SELECT + col1 + - col0 DIV + col0 FROM tab2 AS cor0
----
16
30
58

skipif mysql # not compatible
query I rowsort label-4128
SELECT + col1 + - col0 / + col0 FROM tab2 AS cor0
----
16
30
58

query I rowsort
SELECT - col2 - 76 AS col0 FROM tab1 AS cor0
----
-130
-133
-172

query I rowsort
SELECT + cor0.col0 - - 47 AS col2 FROM tab0 AS cor0
----
136
71
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col2 + + col1 col0 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT ALL + 61 + col0 * - col2 - - col2 AS col0 FROM tab0 AS cor0
----
-698
-7155
27

query I rowsort
SELECT DISTINCT col2 * + col1 + + cor0.col0 AS col2 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT col2 - cor0.col2 * col0 * col0 FROM tab2 AS cor0
----
-1296
-158158
-237120

query I rowsort
SELECT DISTINCT col2 + + col2 * - cor0.col1 + + col2 FROM tab1 AS cor0
----
-1056
-1296
-456

query I rowsort
SELECT DISTINCT - 55 AS col2 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
-55

query I rowsort
SELECT + 44 FROM tab1, tab2 cor0
----
9 values hashing to ab2bc2b9f8baa300df7755e5980a319d

query I rowsort
SELECT ALL + 83 * + col2 + - cor0.col2 FROM tab1 AS cor0
----
4428
4674
7872

query I rowsort
SELECT ALL + + col2 - + col1 FROM tab1 cor0
----
28
47
83

query I rowsort
SELECT - 39 + col2 FROM tab0 cor0
----
-38
-6
43

query I rowsort
SELECT + cor0.col0 * col1 * - col1 AS col0 FROM tab0 AS cor0
----
-177504
-329315
-737009

query I rowsort
SELECT + col0 + - cor0.col0 * 42 FROM tab0 cor0
----
-1435
-3649
-984

query I rowsort
SELECT + ( col0 ) * - col0 FROM tab0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-4144
SELECT DISTINCT - col0 DIV + cor0.col2 AS col1 FROM tab1 cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-4144
SELECT DISTINCT - col0 / + cor0.col2 AS col1 FROM tab1 cor0
----
-1
0

query I rowsort
SELECT DISTINCT 85 * + col0 AS col2 FROM tab0 AS cor0
----
2040
2975
7565

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * + col2 * + ( col1 + col2 ) col2 FROM tab2 AS cor0
----
-10962
-165110
-172380

onlyif mysql # use DIV operator for integer division
query I rowsort label-4147
SELECT DISTINCT - + col2 DIV col0 AS col1 FROM tab2 AS cor0
----
-3
0

skipif mysql # not compatible
query I rowsort label-4147
SELECT DISTINCT - + col2 / col0 AS col1 FROM tab2 AS cor0
----
-3
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4148
SELECT - + cor0.col1 + + col0 DIV - col1 AS col0 FROM tab2 cor0
----
-21
-31
-60

skipif mysql # not compatible
query I rowsort label-4148
SELECT - + cor0.col1 + + col0 / - col1 AS col0 FROM tab2 cor0
----
-21
-31
-60

query I rowsort
SELECT DISTINCT col1 + + col2 * + ( col1 ) * col1 FROM tab0 AS cor0
----
244154
679133
9506

query I rowsort
SELECT ALL - + col0 * + 93 * 81 AS col1 FROM tab0 AS cor0
----
-180792
-263655
-670437

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4151
SELECT ALL + col0 * - CAST( NULL AS SIGNED ) + col0 + col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4151
SELECT ALL + col0 * - CAST ( NULL AS INTEGER ) + col0 + col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 + + col0 + + 60 * col1 AS col0 FROM tab2
----
1061
1840
3592

query I rowsort
SELECT - + ( + 41 ) FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 4ba0c102091f9cbc9fe9439b04584e70

query I rowsort
SELECT + ( - cor1.col1 ) * cor0.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 81a8fcf7518fbae07bfeaffb3ad3a436

onlyif mysql # use DIV operator for integer division
query I rowsort label-4155
SELECT DISTINCT - + col0 + + cor0.col2 DIV + col2 AS col2 FROM tab1 cor0
----
-2
-63
-79

skipif mysql # not compatible
query I rowsort label-4155
SELECT DISTINCT - + col0 + + cor0.col2 / + col2 AS col2 FROM tab1 cor0
----
-2
-63
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-4156
SELECT - col1 DIV + 94 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4156
SELECT - col1 / + 94 FROM tab0 AS cor0
----
-1
0
0

query I rowsort
SELECT ALL - cor0.col2 * - ( + cor0.col0 * cor0.col0 ) FROM tab2 AS cor0
----
1323
158184
237158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 * 62 * 73 col2 FROM tab2 AS cor0
----
140306
267034
76942

query I rowsort
SELECT col1 * + 79 + - 29 AS col1 FROM tab2 AS cor0
----
1314
2420
4632

onlyif mysql # use DIV operator for integer division
query I rowsort label-4160
SELECT ALL + cor0.col2 DIV ( 68 ) col2 FROM tab1 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4160
SELECT ALL + cor0.col2 / ( 68 ) col2 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT ALL + cor0.col2 * + 36 FROM tab2 AS cor0
----
1368
936
972

query I rowsort
SELECT DISTINCT col2 * col2 + col1 FROM tab2 cor0
----
1461
735
760

query I rowsort
SELECT col0 + + cor0.col1 * cor0.col2 FROM tab0 AS cor0
----
132
2862
7551

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 66 * col0 col0 FROM tab0
----
-1584
-2310
-5874

query I rowsort
SELECT ALL + tab2.col1 + tab2.col1 AS col1 FROM tab2
----
118
34
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4166
SELECT DISTINCT + col0 * + tab0.col1 + CAST( + col0 + + col2 AS SIGNED ) * 61 FROM tab0
----
18530
5541
5591

skipif mysql # not compatible
query I rowsort label-4166
SELECT DISTINCT + col0 * + tab0.col1 + CAST ( + col0 + + col2 AS INTEGER ) * 61 FROM tab0
----
18530
5541
5591

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col1 + + ( - 80 ) * + col0 col1 FROM tab1
----
-214
-5110
-6387

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 91 col2 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

query I rowsort
SELECT ALL - tab0.col1 * - 52 * + 26 AS col1 FROM tab0
----
116272
123032
131144

query I rowsort
SELECT DISTINCT - - col2 + ( - 83 ) AS col0 FROM tab2 AS cor0
----
-45
-56
-57

query I rowsort
SELECT + cor0.col0 * + ( - col2 ) * - col1 + + col1 AS col0 FROM tab1 AS cor0
----
36490
4238
99853

query I rowsort
SELECT DISTINCT - + cor0.col2 + - 23 * + 39 * + col1 FROM tab2 AS cor0
----
-15287
-27834
-52949

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * ( + col0 ) col2 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT ALL - - col2 + - col2 + col0 * col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL - col2 + + cor0.col1 * col0 AS col2 FROM tab1 AS cor0
----
24
583
944

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4176
SELECT + CAST( - col0 AS SIGNED ) + + col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4176
SELECT + CAST ( - col0 AS INTEGER ) + + col0 FROM tab0
----
0
0
0

query I rowsort
SELECT 90 - 83 FROM tab1 AS cor0
----
7
7
7

query I rowsort
SELECT - col1 * col1 + - col1 AS col2 FROM tab2 AS cor0
----
-306
-3540
-992

query I rowsort
SELECT + col2 * - 34 - col0 FROM tab0 AS cor0
----
-1146
-2877
-69

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4180
SELECT DISTINCT - CAST( col1 AS SIGNED ) + - col2 AS col1 FROM tab2
----
-55
-58
-85

skipif mysql # not compatible
query I rowsort label-4180
SELECT DISTINCT - CAST ( col1 AS INTEGER ) + - col2 AS col1 FROM tab2
----
-55
-58
-85

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0 CROSS JOIN tab1, tab1 cor1
----
972 values hashing to a8481bfbfcb330825976c5896e54bc19

query I rowsort
SELECT - col0 * - col1 + col2 * - 26 FROM tab1 AS cor0
----
-1326
-1456
-842

query I rowsort
SELECT DISTINCT 31 + - col2 * cor0.col0 AS col1 FROM tab0 AS cor0
----
-4
-7267
-761

query I rowsort
SELECT - ( - col1 ) * - 18 * cor0.col2 + - col0 AS col0 FROM tab0 cor0
----
-134405
-1781
-51108

query I rowsort
SELECT + 79 * tab1.col0 FROM tab1
----
237
5056
6320

query I rowsort
SELECT ALL + 69 + col1 AS col1 FROM tab0 AS cor0
----
155
160
166

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 69 - - col2 col2 FROM tab0 AS cor0
----
102
151
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-4188
SELECT 18 DIV + col1 + - ( - col2 ) FROM tab1 AS cor0
----
54
58
97

skipif mysql # not compatible
query I rowsort label-4188
SELECT 18 / + col1 + - ( - col2 ) FROM tab1 AS cor0
----
54
58
97

query I rowsort
SELECT DISTINCT - 71 * + col1 FROM tab1 AS cor0
----
-1846
-710
-923

onlyif mysql # use DIV operator for integer division
query I rowsort label-4190
SELECT ALL - col1 DIV + col0 + col2 * - col0 AS col0 FROM tab1 AS cor0
----
-170
-3648
-7680

skipif mysql # not compatible
query I rowsort label-4190
SELECT ALL - col1 / + col0 + col2 * - col0 AS col0 FROM tab1 AS cor0
----
-170
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 76 + - col2 col0 FROM tab1 AS cor0
----
-20
19
22

query I rowsort
SELECT ALL - col0 - ( + col1 + + 52 ) * - col2 FROM tab2 AS cor0
----
2234
2543
2808

query I rowsort
SELECT ( col1 ) + + col2 * col2 FROM tab1 AS cor0
----
2942
3259
9229

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4194
SELECT ALL + ( 47 ) + - col2 * - CAST( col1 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
144
2885
7509

skipif mysql # not compatible
query I rowsort label-4194
SELECT ALL + ( 47 ) + - col2 * - CAST ( col1 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
144
2885
7509

query I rowsort
SELECT ALL + col0 + 99 * + cor0.col0 FROM tab2 AS cor0
----
700
7800
7900

query I rowsort
SELECT DISTINCT - - col0 * + cor0.col1 + + col0 * + col0 FROM tab0 AS cor0
----
16020
2640
4620

query I rowsort
SELECT ALL - + col2 * col1 + col2 * - col2 * cor0.col2 - col0 FROM tab0 AS cor0
----
-133
-38799
-558919

query I rowsort
SELECT - + 14 * - col0 + - col1 FROM tab0 AS cor0
----
1155
250
393

query I rowsort
SELECT + - col1 + + ( - col0 ) * - col2 AS col2 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT cor0.col0 + + col2 * - col2 + + col2 AS col2 FROM tab1 AS cor0
----
-2859
-3128
-9040

query I rowsort
SELECT - - 67 + 97 * - col0 FROM tab0 AS cor0
----
-2261
-3328
-8566

query I rowsort
SELECT col2 + + cor0.col1 * - col2 AS col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT - 61 + 92 + - col2 FROM tab1 cor0
----
-23
-26
-65

query I rowsort
SELECT - - 42 AS col0 FROM tab0 AS cor0
----
42
42
42

query I rowsort
SELECT ALL - cor0.col0 * 95 FROM tab1, tab1 AS cor0
----
9 values hashing to 9f36e36a322a1b8f2872b1110f428817

query I rowsort
SELECT DISTINCT - + 93 FROM tab0, tab0 AS cor0
----
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-4207
SELECT ALL - col2 * col0 DIV col0 AS col0 FROM tab1
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-4207
SELECT ALL - col2 * col0 / col0 AS col0 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT + col0 - 29 AS col0 FROM tab2 AS cor0
----
-22
49
50

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4209
SELECT + col2 + CAST( NULL AS SIGNED ) + cor0.col2 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4209
SELECT + col2 + CAST ( NULL AS INTEGER ) + cor0.col2 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 - - tab0.col1 AS col1 FROM tab0
----
53
9
96

query I rowsort
SELECT ALL + tab0.col2 + - ( + col2 ) * + col0 AS col1 FROM tab0
----
-34
-7216
-759

query I rowsort
SELECT + col2 * - 92 * + tab2.col1 AS col1 FROM tab2
----
-141128
-59432
-77004

query I rowsort
SELECT DISTINCT - 15 AS col0 FROM tab1, tab1 cor0
----
-15

query I rowsort
SELECT DISTINCT - col0 + col1 + col0 * - col1 AS col1 FROM tab1
----
-1107
-55
-694

query I rowsort
SELECT col0 * 0 + col0 * - col0 AS col1 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT 45 * + tab1.col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 256997fa690cf0b54b6070927cea829d

query I rowsort
SELECT + col2 + col1 * cor0.col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT - - cor0.col0 * col0 + col0 + col0 AS col0 FROM tab1 AS cor0
----
15
4224
6560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4219
SELECT DISTINCT + col2 + - CAST( NULL AS SIGNED ) * + col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4219
SELECT DISTINCT + col2 + - CAST ( NULL AS INTEGER ) * + col2 FROM tab2 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4220
SELECT ALL - - col2 + + CAST( NULL AS DECIMAL ) * + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4220
SELECT ALL - - col2 + + CAST ( NULL AS REAL ) * + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4221
SELECT DISTINCT - - col1 + - CAST( - col2 AS SIGNED ) * col2 * 7 AS col2 FROM tab2 AS cor0
----
10125
4791
5134

skipif mysql # not compatible
query I rowsort label-4221
SELECT DISTINCT - - col1 + - CAST ( - col2 AS INTEGER ) * col2 * 7 AS col2 FROM tab2 AS cor0
----
10125
4791
5134

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - 90 col1 FROM tab0
----
-2160
-3150
-8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 96 * col2 + col2 col1 FROM tab0 AS cor0
----
-3135
-7790
-95

query I rowsort
SELECT 3 + cor0.col0 + cor0.col1 * ( - col2 ) FROM tab2 AS cor0
----
-1453
-564
-827

onlyif mysql # use DIV operator for integer division
query I rowsort label-4225
SELECT col0 DIV col2 + col0 - + 55 FROM tab1 AS cor0
----
-52
10
25

skipif mysql # not compatible
query I rowsort label-4225
SELECT col0 / col2 + col0 - + 55 FROM tab1 AS cor0
----
-52
10
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 64 * ( col1 ) col1 FROM tab2
----
1088
1984
3776

query I rowsort
SELECT - ( 28 * col1 ) FROM tab0
----
-2408
-2548
-2716

query I rowsort
SELECT ALL 66 * tab1.col0 FROM tab1
----
198
4224
5280

query I rowsort
SELECT + col0 * 83 + - col0 AS col2 FROM tab2 AS cor0
----
574
6396
6478

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4230
SELECT col1 * cor0.col0 + cor0.col0 / CAST( NULL AS DECIMAL ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4230
SELECT col1 * cor0.col0 + cor0.col0 / 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-4231
SELECT + ( col1 ) DIV cor0.col0 + - col2 AS col0 FROM tab1 AS cor0
----
-46
-57
-96

skipif mysql # not compatible
query I rowsort label-4231
SELECT + ( col1 ) / cor0.col0 + - col2 AS col0 FROM tab1 AS cor0
----
-46
-57
-96

query I rowsort
SELECT ALL - + cor0.col0 * - cor0.col2 AS col1 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT - - ( + cor0.col2 ) * - cor0.col0 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT 19 AS col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
19

query I rowsort
SELECT ALL 44 AS col0 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 0cc3e52e781e46962291c3060c6ae73b

query I rowsort
SELECT ALL - col1 * col1 + 6 FROM tab1 cor0
----
-163
-670
-94

onlyif mysql # use DIV operator for integer division
query I rowsort label-4237
SELECT col1 * col2 DIV col1 + col1 AS col0 FROM tab0 AS cor0
----
119
173
98

skipif mysql # not compatible
query I rowsort label-4237
SELECT col1 * col2 / col1 + col1 AS col0 FROM tab0 AS cor0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * 16 col1 FROM tab1 cor0
----
-1024
-1280
-48

query I rowsort
SELECT DISTINCT col1 + + ( - 11 ) AS col1 FROM tab1 AS cor0
----
-1
15
2

query I rowsort
SELECT + cor0.col0 + col0 + - col0 * - col0 FROM tab0 AS cor0
----
1295
624
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-4241
SELECT - + col0 DIV - col0 + col0 + col0 AS col2 FROM tab1 AS cor0
----
129
161
7

skipif mysql # not compatible
query I rowsort label-4241
SELECT - + col0 / - col0 + col0 + col0 AS col2 FROM tab1 AS cor0
----
129
161
7

query I rowsort
SELECT DISTINCT - tab1.col0 + + col1 * + col0 * + col1 + 53 * col0 AS col2 FROM tab1
----
17680
2184
9728

query I rowsort
SELECT 14 + 80 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to a4d239626cf0546ac1b2f57bb8407089

query I rowsort
SELECT + ( 55 ) * - tab0.col1 + - col2 * col0 AS col0 FROM tab0
----
-12303
-5370
-5522

query I rowsort
SELECT DISTINCT - 59 * 50 FROM tab0, tab2 AS cor0 CROSS JOIN tab2
----
-2950

query I rowsort
SELECT - 39 + cor0.col1 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to e064ca4045c2f60c595c19d40fca89ae

query I rowsort
SELECT - 61 + col1 * col1 FROM tab0
----
7335
8220
9348

query I rowsort
SELECT + + ( + cor0.col2 ) + col2 * - 65 AS col0 FROM tab1 AS cor0
----
-3456
-3648
-6144

query I rowsort
SELECT ALL - + 34 * + col1 AS col2 FROM tab1 AS cor0
----
-340
-442
-884

query I rowsort
SELECT DISTINCT - 77 * - 77 AS col2 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
5929

query I rowsort
SELECT ( + col1 ) + col0 * 72 FROM tab1 AS cor0
----
242
4618
5773

query I rowsort
SELECT ALL - col1 * 71 + + col0 AS col2 FROM tab2
----
-1128
-2194
-4111

query I rowsort
SELECT ALL col2 - 1 AS col0 FROM tab1
----
53
56
95

query I rowsort
SELECT DISTINCT + col1 - + tab1.col1 FROM tab1
----
0

query I rowsort
SELECT + cor0.col0 - - 97 AS col0 FROM tab1 AS cor0
----
100
161
177

query I rowsort
SELECT col2 - col2 * + 30 * + cor0.col1 AS col1 FROM tab2 AS cor0
----
-19342
-25083
-45994

query I rowsort
SELECT DISTINCT + col1 + 3 AS col2 FROM tab1 AS cor0
----
13
16
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 + - col0 * col2 col1 FROM tab0 cor0
----
-7209
-768
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4259
SELECT DISTINCT CAST( NULL AS SIGNED ) * col1 * col1 + + 99 * cor0.col0 AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4259
SELECT DISTINCT CAST ( NULL AS INTEGER ) * col1 * col1 + + 99 * cor0.col0 AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + col2 * + col0 + - col2 * col2 FROM tab2 AS cor0
----
-540
1352
1558

onlyif mysql # use DIV operator for integer division
query I rowsort label-4261
SELECT - - ( col2 ) + - cor0.col2 * cor0.col2 DIV + col2 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4261
SELECT - - ( col2 ) + - cor0.col2 * cor0.col2 / + col2 AS col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4262
SELECT ALL + col0 DIV 17 AS col1 FROM tab2 AS cor0
----
0
4
4

skipif mysql # not compatible
query I rowsort label-4262
SELECT ALL + col0 / 17 AS col1 FROM tab2 AS cor0
----
0
4
4

query I rowsort
SELECT - col1 * - col0 + + col1 AS col2 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT DISTINCT - + 24 + col1 * + col0 * 71 AS col1 FROM tab2 AS cor0
----
15383
326718
95329

query I rowsort
SELECT DISTINCT 17 * col2 + col2 FROM tab2 cor0
----
468
486
684

onlyif mysql # use DIV operator for integer division
query I rowsort label-4266
SELECT DISTINCT ( col0 ) DIV + col2 AS col1 FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-4266
SELECT DISTINCT ( col0 ) / + col2 AS col1 FROM tab1 AS cor0
----
0
1

query I rowsort
SELECT ALL + col1 + col2 * - col1 FROM tab1 AS cor0
----
-1235
-1378
-560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 65 + + col2 col0 FROM tab2 AS cor0
----
103
91
92

query I rowsort
SELECT DISTINCT + tab0.col0 + 32 FROM tab0, tab0 AS cor0
----
121
56
67

query I rowsort
SELECT DISTINCT - 97 + col1 * - col1 FROM tab1 AS cor0
----
-197
-266
-773

query I rowsort
SELECT + - 48 + + ( - cor0.col0 ) * + col1 AS col2 FROM tab0 AS cor0
----
-2112
-3443
-8147

query I rowsort
SELECT ALL ( - col2 ) + - col0 AS col1 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT - + col0 - col1 * col2 FROM tab0 AS cor0
----
-132
-2862
-7551

query I rowsort
SELECT DISTINCT + col0 * col1 - - col1 FROM tab0 cor0
----
2150
3492
8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-4275
SELECT - + col1 + - cor0.col0 * col1 DIV + col1 FROM tab1 AS cor0
----
-29
-74
-93

skipif mysql # not compatible
query I rowsort label-4275
SELECT - + col1 + - cor0.col0 * col1 / + col1 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT DISTINCT + col1 * + col2 + - col1 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT - - col1 * col2 + col2 * + col2 * - col1 FROM tab1 AS cor0
----
-118560
-31920
-74412

query I rowsort
SELECT 61 + col0 FROM tab2 AS cor0
----
139
140
68

query I rowsort
SELECT - col1 + + col0 + col0 AS col0 FROM tab1 AS cor0
----
-20
118
147

query I rowsort
SELECT ALL ( + 44 ) * - col0 + + col2 * col1 FROM tab2
----
-1898
-2830
529

query I rowsort
SELECT DISTINCT - col2 * - 2 + tab0.col2 AS col1 FROM tab0
----
246
3
99

query I rowsort
SELECT ALL col0 + 66 AS col0 FROM tab1
----
130
146
69

query I rowsort
SELECT ALL 9 * + col0 + + tab1.col2 AS col0 FROM tab1
----
633
81
816

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4284
SELECT ALL - CAST( NULL AS SIGNED ) / col1 + - col1 * tab2.col0 * - col1 AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4284
SELECT ALL - CAST ( NULL AS INTEGER ) / col1 + - col1 * tab2.col0 * - col1 AS col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col2 + - tab1.col2 AS col1 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - ( + 93 ) col1 FROM tab0 AS cor0
----
-2232
-3255
-8277

query I rowsort
SELECT ALL - - col1 * ( - 97 ) FROM tab0 cor0
----
-8342
-8827
-9409

query I rowsort
SELECT + col2 * - 87 FROM tab1 cor0
----
-4698
-4959
-8352

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 + - ( col0 ) col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT col1 * col2 - ( 48 ) * - col2 AS col1 FROM tab0
----
11398
145
4422

query I rowsort
SELECT col1 * - col1 - - tab0.col0 * + col0 FROM tab0
----
-360
-6820
-8184

query I rowsort
SELECT DISTINCT + 22 * - col1 AS col1 FROM tab1
----
-220
-286
-572

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4293
SELECT + + col0 + - CAST( + col0 AS SIGNED ) * + col2 FROM tab0 AS cor0
----
-7209
-768
0

skipif mysql # not compatible
query I rowsort label-4293
SELECT + + col0 + - CAST ( + col0 AS INTEGER ) * + col2 FROM tab0 AS cor0
----
-7209
-768
0

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( - 1 AS REAL ) FROM tab1, tab0 AS cor0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - cor0.col2 col0 FROM tab1 cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-4296
SELECT + col2 DIV - 90 AS col2 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4296
SELECT + col2 / - 90 AS col2 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT + col0 * col1 + + col1 AS col2 FROM tab2
----
1360
248
4661

query I rowsort
SELECT - 70 * - col0 AS col0 FROM tab2
----
490
5460
5530

query I rowsort
SELECT col0 + + col1 * ( col2 + col1 ) FROM tab0
----
10258
15832
9541

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4300
SELECT ALL - CAST( NULL AS DECIMAL ) FROM tab0, tab2 AS cor0, tab1 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-4300
SELECT ALL - CAST ( NULL AS REAL ) FROM tab0, tab2 AS cor0, tab1 cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL - + 94 FROM tab1 AS cor0
----
-94
-94
-94

onlyif mysql # use DIV operator for integer division
query I rowsort label-4302
SELECT DISTINCT - col2 + col1 + + col0 DIV - col2 FROM tab0 cor0
----
53
61
8

skipif mysql # not compatible
query I rowsort label-4302
SELECT DISTINCT - col2 + col1 + + col0 / - col2 FROM tab0 cor0
----
53
61
8

query I rowsort
SELECT + col1 * + cor0.col0 + 62 FROM tab2 AS cor0
----
1405
279
4664

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 * cor0.col1 + ( ( col2 ) ) col1 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT DISTINCT 48 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
48

query I rowsort
SELECT 9 * + col2 FROM tab0
----
297
738
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4307
SELECT ALL - col2 * - CAST( + col2 * col1 AS SIGNED ) FROM tab2 AS cor0
----
22599
24548
39884

skipif mysql # not compatible
query I rowsort label-4307
SELECT ALL - col2 * - CAST ( + col2 * col1 AS INTEGER ) FROM tab2 AS cor0
----
22599
24548
39884

query I rowsort
SELECT - - cor0.col0 + - cor0.col2 AS col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT + col2 + 79 * col1 FROM tab2 cor0
----
1381
2476
4687

query I rowsort
SELECT cor0.col0 * ( - 56 ) + + col2 FROM tab0 AS cor0
----
-1311
-1959
-4902

query I rowsort
SELECT - col2 * 84 + + col1 AS col2 FROM tab0 AS cor0
----
-2686
-6797
13

query I rowsort
SELECT + col1 + 42 AS col2 FROM tab2 AS cor0
----
101
59
73

query I rowsort
SELECT - col2 * + 59 + col1 FROM tab2 AS cor0
----
-1475
-1562
-2225

query I rowsort
SELECT + col2 + 42 * - col2 AS col0 FROM tab1 AS cor0
----
-2214
-2337
-3936

query I rowsort
SELECT ALL 20 FROM tab1, tab2 AS cor0
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

query I rowsort
SELECT ALL - + 8 + + 55 AS col0 FROM tab1 AS cor0
----
47
47
47

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4317
SELECT ALL + + CAST( + col2 AS SIGNED ) * col2 FROM tab1 AS cor0
----
2916
3249
9216

skipif mysql # not compatible
query I rowsort label-4317
SELECT ALL + + CAST ( + col2 AS INTEGER ) * col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT - ( + tab1.col2 ) AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

query I rowsort
SELECT ALL col0 + + 78 + col0 AS col0 FROM tab1 AS cor0
----
206
238
84

query I rowsort
SELECT DISTINCT - + col2 - + 11 AS col1 FROM tab1 AS cor0
----
-107
-65
-68

onlyif mysql # use DIV operator for integer division
query I rowsort label-4321
SELECT ALL + + 53 * - cor0.col2 + col1 * 97 DIV col1 + + col0 DIV 50 AS col2 FROM tab2 cor0
----
-1280
-1334
-1916

skipif mysql # not compatible
query I rowsort label-4321
SELECT ALL + + 53 * - cor0.col2 + col1 * 97 / col1 + + col0 / 50 AS col2 FROM tab2 cor0
----
-1280
-1334
-1916

skipif mysql # not compatible
query I rowsort
SELECT + - col1 * col0 + ( col1 ) * + col2 * + CAST ( col0 AS REAL ) FROM tab1 AS cor0
----
35840
4134
98800

query I rowsort
SELECT - col1 + + 29 FROM tab2
----
-2
-30
12

query I rowsort
SELECT + 54 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

query I rowsort
SELECT cor0.col1 + cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to e205c60b0806256e15ecb6a115a429b3

query I rowsort
SELECT ALL col0 * ( col0 ) * - ( - 24 + col2 ) FROM tab0
----
-459418
-5184
28175

query I rowsort
SELECT DISTINCT + 46 * ( col1 ) AS col0 FROM tab0
----
3956
4186
4462

onlyif mysql # use DIV operator for integer division
query I rowsort label-4328
SELECT ALL - CAST( col2 AS SIGNED ) DIV + col0 FROM tab1
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-4328
SELECT ALL - CAST ( col2 AS INTEGER ) / + col0 FROM tab1
----
-1
-18
0

query I rowsort
SELECT - 93 + col1 AS col1 FROM tab0 AS cor0
----
-2
-7
4

query I rowsort
SELECT ALL col0 * 59 AS col0 FROM tab2 AS cor0
----
413
4602
4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-4331
SELECT - col1 + + 88 DIV - col0 AS col0 FROM tab1 cor0
----
-11
-14
-55

skipif mysql # not compatible
query I rowsort label-4331
SELECT - col1 + + 88 / - col0 AS col0 FROM tab1 cor0
----
-11
-14
-55

query I rowsort
SELECT DISTINCT - - col2 * - 64 * + col0 AS col2 FROM tab0 AS cor0
----
-2240
-467072
-50688

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4333
SELECT - + col2 * - CAST( - col1 AS SIGNED ) - col1 * cor0.col1 AS col0 FROM tab2 AS cor0
----
-1798
-5015
-935

skipif mysql # not compatible
query I rowsort label-4333
SELECT - + col2 * - CAST ( - col1 AS INTEGER ) - col1 * cor0.col1 AS col0 FROM tab2 AS cor0
----
-1798
-5015
-935

query I rowsort
SELECT DISTINCT + cor0.col2 + 85 AS col2 FROM tab1 AS cor0
----
139
142
181

query I rowsort
SELECT 98 FROM tab2, tab0 cor0, tab0 AS cor1
----
27 values hashing to c758e8afbdfa6aae279045b0e9cbacc2

query I rowsort
SELECT - tab0.col2 + + col2 * - ( col2 ) AS col1 FROM tab0
----
-1122
-2
-6806

query I rowsort
SELECT DISTINCT + 35 AS col0 FROM tab0, tab0 cor0
----
35

query I rowsort
SELECT ALL - 54 * - col0 AS col2 FROM tab2
----
378
4212
4266

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4339
SELECT DISTINCT CAST( + col0 AS SIGNED ) * col2 AS col0 FROM tab1
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-4339
SELECT DISTINCT CAST ( + col0 AS INTEGER ) * col2 AS col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT 19 + col0 FROM tab1 AS cor0
----
22
83
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 70 col2 FROM tab0
----
70
70
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * - ( col0 ) + - col2 col1 FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT ALL + + 8 + - col2 * - col0 AS col2 FROM tab0 AS cor0
----
43
7306
800

query I rowsort
SELECT + - col0 * 99 + cor0.col0 AS col2 FROM tab1 AS cor0
----
-294
-6272
-7840

query I rowsort
SELECT - ( 81 ) * col2 FROM tab2
----
-2106
-2187
-3078

query I rowsort
SELECT 13 + ( - col2 ) FROM tab0
----
-20
-69
12

query I rowsort
SELECT ALL + col2 + col2 * tab0.col1 AS col0 FROM tab0
----
2871
7544
98

query I rowsort
SELECT - col0 * + 22 + - col0 * col2 FROM tab2 AS cor0
----
-343
-3744
-4740

query I rowsort
SELECT ALL - col0 * + col1 + col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT DISTINCT + col0 + col2 + col1 AS col1 FROM tab1
----
131
189
83

query I rowsort
SELECT + col1 + 48 AS col0 FROM tab0 AS cor0
----
134
139
145

query I rowsort
SELECT - col1 * col2 * + ( + col1 ) FROM tab1
----
-16224
-36504
-5700

query I rowsort
SELECT ( col0 ) * ( + col2 ) AS col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL cor0.col1 * 7 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to c04b2beae9324a163a4bd04f20c3bb97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * ( col0 ) + col0 + 85 col0 FROM tab2 cor0
----
1507
309
4765

query I rowsort
SELECT DISTINCT tab2.col1 * tab2.col2 AS col0 FROM tab2
----
1534
646
837

query I rowsort
SELECT col2 - - col0 * - tab1.col1 FROM tab1
----
-24
-583
-944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * - 27 + - 63 + col2 col2 FROM tab1 AS cor0
----
1449
1533
2625

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4359
SELECT + + col0 + CAST( NULL AS SIGNED ) * 13 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4359
SELECT + + col0 + CAST ( NULL AS INTEGER ) * 13 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4360
SELECT col1 * - CAST( + col1 * + col1 AS SIGNED ) + - 84 * cor0.col2 col0 FROM tab2 AS cor0
----
-207563
-32059
-8105

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4360
SELECT col1 * - CAST ( + col1 * + col1 AS INTEGER ) + - 84 * cor0.col2 col0 FROM tab2 AS cor0
----
-207563
-32059
-8105

query I rowsort
SELECT ALL col2 - - 1 * - col0 AS col2 FROM tab0 AS cor0
----
-34
-7
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + ( + col1 ) col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT - tab0.col1 * cor1.col1 AS col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
9 values hashing to 3a68b2420e96feae5e3ca1f4dd4282df

query I rowsort
SELECT DISTINCT - 45 AS col2 FROM tab2, tab1 AS cor0
----
-45

query I rowsort
SELECT 70 AS col1 FROM tab0, tab0 cor0, tab2 AS cor1
----
27 values hashing to c76157a7a7ec18de56823b2058b49f32

query I rowsort
SELECT ALL + col1 * col1 + tab0.col0 AS col0 FROM tab0
----
7420
8370
9444

query I rowsort
SELECT ALL tab2.col1 + tab2.col2 AS col0 FROM tab2
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * - 35 + col1 col2 FROM tab2
----
-1313
-851
-914

query I rowsort
SELECT - + col0 + + col1 * ( cor0.col2 ) AS col2 FROM tab0 AS cor0
----
2814
62
7373

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4370
SELECT DISTINCT + + col0 * + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4370
SELECT DISTINCT + + col0 * + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT col2 * 82 AS col0 FROM tab1 AS cor0
----
4428
4674
7872

query I rowsort
SELECT ALL - ( + 53 ) AS col0 FROM tab2 AS cor0
----
-53
-53
-53

query I rowsort
SELECT DISTINCT - col0 * col0 + - col0 * - 91 AS col1 FROM tab1 cor0
----
1728
264
880

onlyif mysql # use DIV operator for integer division
query I rowsort label-4374
SELECT ALL + 76 * 79 DIV cor0.col0 FROM tab1 AS cor0
----
2001
75
93

skipif mysql # not compatible
query I rowsort label-4374
SELECT ALL + 76 * 79 / cor0.col0 FROM tab1 AS cor0
----
2001
75
93

query I rowsort
SELECT ALL ( - cor0.col1 ) + col0 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT - ( ( + col2 ) ) * 76 + + col0 * - col2 FROM tab1 AS cor0
----
-14976
-4266
-7980

query I rowsort
SELECT DISTINCT cor0.col1 + 11 FROM tab2 cor0
----
28
42
70

query I rowsort
SELECT ( 14 ) FROM tab1 cor0
----
14
14
14

query I rowsort
SELECT DISTINCT - + cor0.col0 * 35 + col0 FROM tab1 AS cor0
----
-102
-2176
-2720

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4380
SELECT - CAST( col0 AS SIGNED ) + col1 + CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4380
SELECT - CAST ( col0 AS INTEGER ) + col1 + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 30 * + 94 FROM tab0 AS cor0
----
-2820
-2820
-2820

onlyif mysql # use DIV operator for integer division
query I rowsort label-4382
SELECT DISTINCT col1 + - cor0.col2 DIV + col1 FROM tab1 AS cor0
----
24
5
6

skipif mysql # not compatible
query I rowsort label-4382
SELECT DISTINCT col1 + - cor0.col2 / + col1 FROM tab1 AS cor0
----
24
5
6

query I rowsort
SELECT - ( - 14 ) + + col0 FROM tab2 AS cor0
----
21
92
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4384
SELECT - CAST( NULL AS SIGNED ) + col0 - col1 AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4384
SELECT - CAST ( NULL AS INTEGER ) + col0 - col1 AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - col0 - + 93 col0 FROM tab1
----
-15
547
947

query I rowsort
SELECT col1 * col2 - 19 AS col0 FROM tab2
----
1515
627
818

query I rowsort
SELECT + col2 * ( + col1 ) + - col2 + + col2 AS col0 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL + col1 - col1 * col0 AS col0 FROM tab2
----
-1326
-186
-4543

query I rowsort
SELECT + col1 * - ( tab2.col0 ) - + col0 AS col0 FROM tab2
----
-1422
-224
-4680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4390
SELECT ALL - - CAST( col0 AS SIGNED ) col0 FROM tab1 AS cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4390
SELECT ALL - - CAST ( col0 AS INTEGER ) col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL + ( - cor0.col1 ) * - col2 + col1 FROM tab1 cor0
----
1261
1430
580

query I rowsort
SELECT DISTINCT - 32 + - col2 * + ( col0 ) + + col2 FROM tab1 AS cor0
----
-140
-3623
-7616

query I rowsort
SELECT DISTINCT + col2 + + col0 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT ALL + + col0 * - col0 - 89 FROM tab2 AS cor0
----
-138
-6173
-6330

query I rowsort
SELECT ALL cor0.col1 + col1 * - ( 55 ) AS col0 FROM tab0 AS cor0
----
-4644
-4914
-5238

query I rowsort
SELECT DISTINCT - + cor0.col2 * - cor0.col0 * - col2 AS col0 FROM tab1 AS cor0
----
-207936
-737280
-8748

query I rowsort
SELECT - cor0.col1 + cor0.col0 * + 71 FROM tab1 AS cor0
----
187
4534
5667

query I rowsort
SELECT DISTINCT - + col1 * - col0 + - ( cor0.col2 ) AS col2 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT + + 62 * - cor0.col0 FROM tab1 cor0
----
-186
-3968
-4960

onlyif mysql # use DIV operator for integer division
query I rowsort label-4400
SELECT ALL 78 DIV + 6 AS col0 FROM tab0
----
13
13
13

skipif mysql # not compatible
query I rowsort label-4400
SELECT ALL 78 / + 6 AS col0 FROM tab0
----
13
13
13

query I rowsort
SELECT DISTINCT 17 * - col1 AS col1 FROM tab0 cor0
----
-1462
-1547
-1649

onlyif mysql # use DIV operator for integer division
query I rowsort label-4402
SELECT DISTINCT col2 + col0 DIV cor0.col0 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-4402
SELECT DISTINCT col2 + col0 / cor0.col0 FROM tab0 AS cor0
----
2
34
83

query I rowsort
SELECT + + col0 + cor0.col2 * col1 AS col1 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT ALL - - cor0.col1 * - col1 * - col0 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT - cor0.col0 * col2 + col0 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT DISTINCT + col2 * - ( - col1 ) FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + - 62 + - 58 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 29d7da7d36b826cb1636053c1044c28c

query I rowsort
SELECT col1 * + 5 AS col2 FROM tab1 AS cor0
----
130
50
65

query I rowsort
SELECT DISTINCT + - col0 * ( col1 ) + - col1 AS col2 FROM tab0 AS cor0
----
-2150
-3492
-8190

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 - - col0 + - col0 + - col1 FROM tab1 AS cor0
----
-10
-13
-26

query III rowsort
SELECT ALL * FROM tab2 WHERE col2 <= NULL
----

query I rowsort
SELECT + - col1 * col0 * + col0 + + col0 + - col1 FROM tab0 AS cor0
----
-118887
-49598
-720813

query I rowsort
SELECT DISTINCT + - col0 * col0 + - col1 AS col1 FROM tab2 AS cor0
----
-6143
-6258
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-4415
SELECT ALL - + 94 * - col0 + col0 - - cor0.col0 DIV col1 FROM tab2 AS cor0
----
665
7411
7509

skipif mysql # not compatible
query I rowsort label-4415
SELECT ALL - + 94 * - col0 + col0 - - cor0.col0 / col1 FROM tab2 AS cor0
----
665
7411
7509

query I rowsort
SELECT ALL - - col2 * cor0.col2 + + col1 + - col1 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT - 43 - col2 AS col0 FROM tab2 cor0
----
-69
-70
-81

query I rowsort
SELECT - - 67 AS col2 FROM tab1 AS cor0
----
67
67
67

query I rowsort
SELECT ALL - col0 * col0 + - col1 FROM tab2 cor0
----
-6143
-6258
-80

query I rowsort
SELECT + col2 * col2 * col2 AS col2 FROM tab1
----
157464
185193
884736

onlyif mysql # use DIV operator for integer division
query I rowsort label-4421
SELECT DISTINCT - + col2 DIV - col1 AS col0 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4421
SELECT DISTINCT - + col2 / - col1 AS col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT tab1.col2 * col0 FROM tab1 WHERE NOT NULL NOT BETWEEN NULL AND NULL
----

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT col2 = col1
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

onlyif mysql # use DIV operator for integer division
query I rowsort label-4424
SELECT + col1 DIV + col0 + tab0.col1 + tab0.col1 AS col2 FROM tab0
----
175
183
196

skipif mysql # not compatible
query I rowsort label-4424
SELECT + col1 / + col0 + tab0.col1 + tab0.col1 AS col2 FROM tab0
----
175
183
196

query III rowsort
SELECT * FROM tab0 WHERE NULL NOT IN ( col0 / + col1 )
----

query III rowsort
SELECT * FROM tab0 WHERE NOT + col1 BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT DISTINCT col2 * - col2 FROM tab1 WHERE NOT NULL IN ( - tab1.col0 + - col0 )
----

query I rowsort
SELECT - col2 FROM tab1 WHERE + col1 IN ( col1 * + col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4429
SELECT ALL col2 + col2 DIV col2 FROM tab0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-4429
SELECT ALL col2 + col2 / col2 FROM tab0
----
2
34
83

query I rowsort
SELECT + col0 + - col2 AS col1 FROM tab2 WHERE NOT ( NULL ) BETWEEN NULL AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4431
SELECT DISTINCT + col2 DIV - col0 - col0 AS col1 FROM tab0
----
-25
-35
-89

skipif mysql # not compatible
query I rowsort label-4431
SELECT DISTINCT + col2 / - col0 - col0 AS col1 FROM tab0
----
-25
-35
-89

query I rowsort
SELECT DISTINCT - 24 * - col0 AS col1 FROM tab2 AS cor0
----
168
1872
1896

query I rowsort
SELECT + col0 + - col1 * col2 AS col0 FROM tab1 WHERE col0 = NULL
----

query I rowsort
SELECT DISTINCT col1 FROM tab2 WHERE NOT NULL NOT BETWEEN + tab2.col1 + col1 + - col2 AND ( NULL )
----

query I rowsort
SELECT col0 + col2 * col0 AS col2 FROM tab0
----
70
7387
816

query I rowsort
SELECT ALL - col2 * col1 + + col0 AS col1 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT DISTINCT tab1.col1 * - col1 - col1 FROM tab1
----
-110
-182
-702

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + - tab0.col0 * - tab0.col1 col2 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT ALL - col2 FROM tab0 WHERE NOT NULL NOT BETWEEN + col0 * + col1 + col1 * - col2 AND ( NULL )
----

query I rowsort
SELECT DISTINCT - col0 + col0 + - col2 AS col2 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT - col1 * cor0.col1 + col1 * cor0.col1 * - col2 + + col2 FROM tab2 AS cor0
----
-11233
-26881
-93961

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL NOT IN ( col1 + tab1.col2 )
----

query I rowsort
SELECT - col2 * - col0 + tab2.col0 * col2 AS col1 FROM tab2
----
378
4056
6004

onlyif mysql # use DIV operator for integer division
query I rowsort label-4444
SELECT - col2 * col0 + + col2 DIV - col1 col0 FROM tab0
----
-35
-7298
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4444
SELECT - col2 * col0 + + col2 / - col1 col0 FROM tab0
----
-35
-7298
-792

query III rowsort
SELECT * FROM tab1 WHERE col1 IN ( col2 + + tab1.col0 / - col0 )
----

query I rowsort
SELECT ALL tab1.col0 - + col2 AS col0 FROM tab1
----
-16
-51
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4447
SELECT ( col0 ) * + CAST( - col1 * + col0 + col0 AS SIGNED ) FROM tab2
----
-1470
-352872
-99856

skipif mysql # not compatible
query I rowsort label-4447
SELECT ( col0 ) * + CAST ( - col1 * + col0 + col0 AS INTEGER ) FROM tab2
----
-1470
-352872
-99856

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4448
SELECT ( col1 ) * - ( + ( cor0.col2 ) ) + + CAST( col2 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
-1508
-608
-810

skipif mysql # not compatible
query I rowsort label-4448
SELECT ( col1 ) * - ( + ( cor0.col2 ) ) + + CAST ( col2 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT 56 - col0 AS col2 FROM tab2 AS cor0
----
-22
-23
49

query I rowsort
SELECT DISTINCT 80 + col0 * col1 FROM tab2 cor0
----
1423
297
4682

query I rowsort
SELECT + col1 * col1 - col2 FROM tab1 cor0
----
43
622
73

query I rowsort
SELECT ALL + + col0 + - col0 * + col2 FROM tab2 cor0
----
-182
-1950
-2923

query I rowsort
SELECT ALL + - 12 + col0 FROM tab1 AS cor0
----
-9
52
68

query I rowsort
SELECT DISTINCT + 93 * col0 + - col2 AS col1 FROM tab0 AS cor0
----
2199
3254
8195

query I rowsort
SELECT ALL - col1 * cor0.col0 + cor0.col0 * - col0 FROM tab2 cor0
----
-10686
-266
-7584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 40 col1 FROM tab1 AS cor0
----
40
40
40

query I rowsort
SELECT ALL + col1 * + col2 + 35 * + col1 - col0 AS col2 FROM tab2 AS cor0
----
1162
1915
3521

query I rowsort
SELECT ALL ( col2 ) * - col0 + + col2 AS col2 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT DISTINCT col1 * cor0.col2 * + 46 + - col2 FROM tab0 AS cor0
----
130515
343170
4461

query I rowsort
SELECT DISTINCT - + cor0.col1 - + col1 AS col0 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT DISTINCT - col2 * col2 - + col2 FROM tab2 AS cor0
----
-1482
-702
-756

onlyif mysql # use DIV operator for integer division
query I rowsort label-4462
SELECT - + col0 DIV col1 + col2 AS col2 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-4462
SELECT - + col0 / col1 + col2 AS col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT + cor0.col0 + 28 FROM tab2, tab1 AS cor0
----
9 values hashing to 76c7cece6933bd75b139fd0465fcd36b

onlyif mysql # use DIV operator for integer division
query I rowsort label-4464
SELECT DISTINCT 4 + col1 DIV col2 + - col2 AS col0 FROM tab1 AS cor0
----
-50
-53
-92

skipif mysql # not compatible
query I rowsort label-4464
SELECT DISTINCT 4 + col1 / col2 + - col2 AS col0 FROM tab1 AS cor0
----
-50
-53
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col1 ) * col2 col1 FROM tab2 AS cor0
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * - col1 col1 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT ALL + 15 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

query I rowsort
SELECT 55 FROM tab0, tab2 AS cor0, tab1 cor1, tab2 AS cor2
----
81 values hashing to c59acfbb70996777fa5053195838c3d6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( cor0.col0 ) col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT ( ( - col2 ) ) FROM tab0
----
-1
-33
-82

query I rowsort
SELECT - ( + 53 + col1 ) FROM tab1
----
-63
-66
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-4472
SELECT - CAST( + col0 AS SIGNED ) DIV col0 + + ( col1 * col0 ) AS col1 FROM tab2
----
1342
216
4601

skipif mysql # not compatible
query I rowsort label-4472
SELECT - CAST ( + col0 AS INTEGER ) / col0 + + ( col1 * col0 ) AS col1 FROM tab2
----
1342
216
4601

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( col1 AS REAL ) + col2 AS col0 FROM tab2
----
-33
-4
21

query I rowsort
SELECT + + 61 + + col2 * - col0 AS col0 FROM tab2 AS cor0
----
-128
-1967
-2941

query I rowsort
SELECT DISTINCT - ( - col1 ) + + ( - col1 ) AS col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT - 59 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 582c5aa5e5b4fc3f2ea27e7637992d1f

query I rowsort
SELECT + cor0.col1 + cor0.col1 FROM tab0, tab2 cor0
----
9 values hashing to bd4e64b4654b9e3f8122f4e1bada2bd0

query I rowsort
SELECT 5 + + col2 AS col0 FROM tab2
----
31
32
43

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4479
SELECT cor0.col2 * CAST( NULL AS SIGNED ) AS col2 FROM tab0, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4479
SELECT cor0.col2 * CAST ( NULL AS INTEGER ) AS col2 FROM tab0, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL - + 48 AS col0 FROM tab1 cor0
----
-48
-48
-48

onlyif mysql # use DIV operator for integer division
query I rowsort label-4481
SELECT - 13 DIV col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4481
SELECT - 13 / col0 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + ( col1 ) col2 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT DISTINCT - col0 * + col1 * col0 AS col0 FROM tab2
----
-106097
-1519
-358956

query I rowsort
SELECT DISTINCT - 66 + + col2 FROM tab1 AS cor0
----
-12
-9
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 23 col1 FROM tab1, tab0 AS cor0, tab1 cor1
----
27 values hashing to 9bd721f99d79dce21b1de2860fd51ed5

onlyif mysql # use DIV operator for integer division
query I rowsort label-4486
SELECT + col1 + tab0.col2 DIV col1 AS col0 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-4486
SELECT + col1 + tab0.col2 / col1 AS col0 FROM tab0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4487
SELECT - col2 * col0 * col2 + col0 / - CAST( NULL AS SIGNED ) col0 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4487
SELECT - col2 * col0 * col2 + col0 / - CAST ( NULL AS INTEGER ) col0 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4488
SELECT DISTINCT col2 * ( col1 ) DIV + col0 + - col0 * + col2 FROM tab1
----
-3640
-7665
306

skipif mysql # not compatible
query I rowsort label-4488
SELECT DISTINCT col2 * ( col1 ) / + col0 + - col0 * + col2 FROM tab1
----
-3640
-7665
306

query I rowsort
SELECT DISTINCT - col1 + + col1 * + col2 AS col1 FROM tab2
----
1475
629
806

onlyif mysql # use DIV operator for integer division
query I rowsort label-4490
SELECT ALL col0 + col1 DIV - col0 FROM tab0
----
21
33
88

skipif mysql # not compatible
query I rowsort label-4490
SELECT ALL col0 + col1 / - col0 FROM tab0
----
21
33
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-4491
SELECT ALL col2 DIV + ( - ( - col1 ) ) col2 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4491
SELECT ALL col2 / + ( - ( - col1 ) ) col2 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4492
SELECT - col2 * + CAST( - col0 AS SIGNED ) + col2 FROM tab0 AS cor0
----
36
7380
825

skipif mysql # not compatible
query I rowsort label-4492
SELECT - col2 * + CAST ( - col0 AS INTEGER ) + col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT ALL - col0 + + 75 AS col1 FROM tab2 cor0
----
-3
-4
68

query I rowsort
SELECT DISTINCT - - col0 * + cor0.col0 + + col1 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT + cor0.col2 + + col1 AS col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT - tab0.col0 + 84 AS col0 FROM tab0
----
-5
49
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-4497
SELECT 60 DIV col2 FROM tab1 cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-4497
SELECT 60 / col2 FROM tab1 cor0
----
0
1
1

query I rowsort
SELECT ALL - - col1 * 2 * + col2 FROM tab0 cor0
----
14924
194
5676

onlyif mysql # use DIV operator for integer division
query I rowsort label-4499
SELECT DISTINCT - + col1 DIV - 86 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-4499
SELECT DISTINCT - + col1 / - 86 FROM tab0 AS cor0
----
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4500
SELECT + + CAST( + col2 AS SIGNED ) * - col1 + + col2 FROM tab0 AS cor0
----
-2805
-7380
-96

skipif mysql # not compatible
query I rowsort label-4500
SELECT + + CAST ( + col2 AS INTEGER ) * - col1 + + col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT DISTINCT - ( + cor0.col2 ) * col2 AS col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - ( col0 ) col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL - col1 * col0 + col1 * + ( + col0 ) AS col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - ( col2 ) + + col1 * + ( - col1 ) + col0 AS col2 FROM tab0 AS cor0
----
-7405
-8274
-9375

query I rowsort
SELECT ALL - + col2 * + col1 - + col1 * + 24 AS col0 FROM tab0 AS cor0
----
-2425
-4902
-9646

onlyif mysql # use DIV operator for integer division
query I rowsort label-4506
SELECT - ( col2 ) + col2 DIV + CAST( col1 AS SIGNED ) FROM tab0 cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-4506
SELECT - ( col2 ) + col2 / + CAST ( col1 AS INTEGER ) FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT ALL + ( col0 ) + + cor0.col1 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-4508
SELECT - col1 DIV - 11 FROM tab0 AS cor0
----
7
8
8

skipif mysql # not compatible
query I rowsort label-4508
SELECT - col1 / - 11 FROM tab0 AS cor0
----
7
8
8

query I rowsort
SELECT DISTINCT - - 93 * col2 AS col1 FROM tab1 AS cor0
----
5022
5301
8928

onlyif mysql # use DIV operator for integer division
query I rowsort label-4510
SELECT ALL + - col1 DIV + 49 FROM tab2 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4510
SELECT ALL + - col1 / + 49 FROM tab2 AS cor0
----
-1
0
0

query I rowsort
SELECT col2 * - 62 FROM tab2 AS cor0
----
-1612
-1674
-2356

onlyif mysql # use DIV operator for integer division
query I rowsort label-4512
SELECT 45 DIV + 17 FROM tab1 AS cor0
----
2
2
2

skipif mysql # not compatible
query I rowsort label-4512
SELECT 45 / + 17 FROM tab1 AS cor0
----
2
2
2

query I rowsort
SELECT DISTINCT + + 34 FROM tab0 AS cor0
----
34

query I rowsort
SELECT ALL + - 2 + 73 AS col1 FROM tab1 AS cor0
----
71
71
71

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4515
SELECT DISTINCT + 27 * col2 + + cor0.col1 * + CAST( col1 AS SIGNED ) FROM tab0 AS cor0
----
10495
8287
9436

skipif mysql # not compatible
query I rowsort label-4515
SELECT DISTINCT + 27 * col2 + + cor0.col1 * + CAST ( col1 AS INTEGER ) FROM tab0 AS cor0
----
10495
8287
9436

query I rowsort
SELECT DISTINCT + cor0.col0 + - ( - cor0.col1 ) AS col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT col2 * ( + col2 ) AS col1 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT 6 AS col2 FROM tab2, tab2 AS cor0
----
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-4519
SELECT - cor0.col1 + + col2 * cor0.col2 DIV - 90 FROM tab1 AS cor0
----
-115
-46
-58

skipif mysql # not compatible
query I rowsort label-4519
SELECT - cor0.col1 + + col2 * cor0.col2 / - 90 FROM tab1 AS cor0
----
-115
-46
-58

query I rowsort
SELECT 78 + + cor0.col1 FROM tab0 AS cor0
----
164
169
175

onlyif mysql # use DIV operator for integer division
query I rowsort label-4521
SELECT - ( - col0 ) DIV - tab0.col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4521
SELECT - ( - col0 ) / - tab0.col1 FROM tab0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4522
SELECT CAST( NULL AS SIGNED ) * col1 * col2 AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4522
SELECT CAST ( NULL AS INTEGER ) * col1 * col2 AS col2 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4523
SELECT ALL + CAST( - 10 AS SIGNED ) + col1 AS col2 FROM tab2
----
21
49
7

skipif mysql # not compatible
query I rowsort label-4523
SELECT ALL + CAST ( - 10 AS INTEGER ) + col1 AS col2 FROM tab2
----
21
49
7

query I rowsort
SELECT ALL - ( col2 ) + col2 + ( + 24 ) FROM tab2
----
24
24
24

query I rowsort
SELECT - - col2 + - col0 * + 64 AS col2 FROM tab2 AS cor0
----
-421
-4966
-5018

query I rowsort
SELECT ALL + col1 * + cor0.col0 AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL + cor0.col0 * + col1 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT + 45 * col1 AS col2 FROM tab0 AS cor0
----
3870
4095
4365

query I rowsort
SELECT col0 + - col1 * + 95 * + col0 AS col1 FROM tab2 AS cor0
----
-127506
-20608
-437112

query I rowsort
SELECT ALL 17 * col0 FROM tab2
----
119
1326
1343

query I rowsort
SELECT ALL + 3 AS col2 FROM tab0, tab2 AS cor0, tab2 cor1
----
27 values hashing to 3e22859a313d85a6146c6df5f23d77cf

onlyif mysql # use DIV operator for integer division
query I rowsort label-4532
SELECT ALL + + col2 * col1 DIV + col2 AS col2 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-4532
SELECT ALL + + col2 * col1 / + col2 AS col2 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4533
SELECT ALL + col1 * CAST( NULL AS SIGNED ) + - 67 * + cor0.col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4533
SELECT ALL + col1 * CAST ( NULL AS INTEGER ) + - 67 * + cor0.col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col2 + 54 AS col2 FROM tab2 AS cor0
----
16
27
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 * - ( 5 + + col0 * col2 ) col2 FROM tab0 AS cor0
----
-3880
-664573
-68542

query I rowsort
SELECT - tab1.col0 * 50 + 98 FROM tab1, tab0 AS cor0
----
9 values hashing to 8b25f89daa38bc538aa35c1b032f130f

query I rowsort
SELECT - - col1 * + ( col1 + - col2 ) AS col1 FROM tab1 AS cor0
----
-1079
-470
-728

query I rowsort
SELECT - cor0.col1 * - col0 + + cor0.col0 AS col1 FROM tab0 cor0
----
2088
3430
8188

query I rowsort
SELECT + col2 + ( + col2 ) * - col0 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT ALL + + col2 * + 63 * - 88 AS col2 FROM tab1 AS cor0
----
-299376
-316008
-532224

query I rowsort
SELECT - 8 * + ( - col2 ) FROM tab0 AS cor0
----
264
656
8

query I rowsort
SELECT - - ( + 4 ) FROM tab2 AS cor0
----
4
4
4

query I rowsort
SELECT + ( col0 ) + col2 * col0 FROM tab0 cor0
----
70
7387
816

query I rowsort
SELECT + - col2 - + col2 * cor0.col1 AS col0 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT DISTINCT 64 + col0 FROM tab0 AS cor0
----
153
88
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 - col2 * + col0 col0 FROM tab2 AS cor0
----
-2087
-220
-3019

query I rowsort
SELECT ALL 94 * cor0.col2 FROM tab0 AS cor0
----
3102
7708
94

query I rowsort
SELECT DISTINCT - col1 + col0 + - ( ( - col0 ) + + 11 ) FROM tab0 AS cor0
----
-38
-49
76

query I rowsort
SELECT ALL - - cor0.col0 * ( 37 ) * - col0 AS col2 FROM tab1 AS cor0
----
-151552
-236800
-333

query I rowsort
SELECT ALL - + col2 - col2 AS col2 FROM tab2 cor0
----
-52
-54
-76

query I rowsort
SELECT DISTINCT + - col2 * + ( - col2 ) AS col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL + + cor0.col0 - col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4553
SELECT ALL - col2 + CAST( col2 AS SIGNED ) * - col1 FROM tab0 AS cor0
----
-2871
-7544
-98

skipif mysql # not compatible
query I rowsort label-4553
SELECT ALL - col2 + CAST ( col2 AS INTEGER ) * - col1 FROM tab0 AS cor0
----
-2871
-7544
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * 77 col0 FROM tab2 AS cor0
----
1309
2387
4543

query I rowsort
SELECT ALL + col0 * 69 AS col2 FROM tab0 cor0
----
1656
2415
6141

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 81 * col1 + - cor0.col1 + + col2 col1 FROM tab2 AS cor0
----
1398
2507
4746

onlyif mysql # use DIV operator for integer division
query I rowsort label-4557
SELECT DISTINCT + col2 + cor0.col1 DIV col0 AS col0 FROM tab1 AS cor0
----
57
62
96

skipif mysql # not compatible
query I rowsort label-4557
SELECT DISTINCT + col2 + cor0.col1 / col0 AS col0 FROM tab1 AS cor0
----
57
62
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4558
SELECT + + col2 + + col1 + + col2 DIV col2 AS col1 FROM tab0 AS cor0
----
120
174
99

skipif mysql # not compatible
query I rowsort label-4558
SELECT + + col2 + + col1 + + col2 / col2 AS col1 FROM tab0 AS cor0
----
120
174
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4559
SELECT DISTINCT cor0.col1 * CAST( NULL AS SIGNED ) FROM tab2, tab0 AS cor0, tab0 cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-4559
SELECT DISTINCT cor0.col1 * CAST ( NULL AS INTEGER ) FROM tab2, tab0 AS cor0, tab0 cor1
----
NULL

query I rowsort
SELECT ALL + - ( - ( col1 ) ) FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT col1 + + col0 + + col1 AS col2 FROM tab0 AS cor0
----
196
229
271

query I rowsort
SELECT DISTINCT 80 * - col1 + + col2 FROM tab0 AS cor0
----
-6847
-7198
-7759

query I rowsort
SELECT - 44 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab2, tab1 AS cor2, tab1
----
729 values hashing to 63a6e6c7ed571494859ead109ba264fd

query I rowsort
SELECT ALL col0 * cor0.col0 + - col2 + - col0 AS col0 FROM tab2 AS cor0
----
15
5980
6124

onlyif mysql # use DIV operator for integer division
query I rowsort label-4565
SELECT DISTINCT ( col1 ) + col1 DIV 69 AS col2 FROM tab0 AS cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-4565
SELECT DISTINCT ( col1 ) + col1 / 69 AS col2 FROM tab0 AS cor0
----
87
92
98

query I rowsort
SELECT DISTINCT col1 * - col0 * col2 + + col1 AS col2 FROM tab2 AS cor0
----
-119593
-51017
-5828

query I rowsort
SELECT DISTINCT - 27 * 21 + col0 FROM tab2 AS cor0
----
-488
-489
-560

query I rowsort
SELECT ALL + 17 + + col2 + + tab2.col2 * + col2 FROM tab2
----
1499
719
773

query I rowsort
SELECT DISTINCT 29 AS col2 FROM tab1, tab2, tab0 AS cor0
----
29

query I rowsort
SELECT DISTINCT - + 61 FROM tab1, tab2, tab1 AS cor0
----
-61

query I rowsort
SELECT - 5 * - col1 FROM tab1 cor0
----
130
50
65

query I rowsort
SELECT 56 + - col1 * col2 * 78 AS col2 FROM tab2 AS cor0
----
-119596
-50332
-65230

query I rowsort
SELECT DISTINCT + 92 - col0 * + cor0.col1 FROM tab2 cor0
----
-125
-1251
-4510

query I rowsort
SELECT + 74 + col1 FROM tab1 AS cor0
----
100
84
87

query I rowsort
SELECT - + col0 + 99 AS col1 FROM tab0 AS cor0
----
10
64
75

query I rowsort
SELECT DISTINCT - col2 * - 58 AS col2 FROM tab2 cor0
----
1508
1566
2204

query I rowsort
SELECT ALL + + cor0.col0 + + 94 AS col0 FROM tab0 AS cor0
----
118
129
183

query I rowsort
SELECT DISTINCT - col0 * + 99 FROM tab1 AS cor0
----
-297
-6336
-7920

query I rowsort
SELECT ALL + 88 + - cor0.col1 AS col2 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to b49d5ffdfd7fa05e59b126460e279e7a

query I rowsort
SELECT DISTINCT col1 + + 82 + 1 AS col2 FROM tab2 AS cor0
----
100
114
142

query I rowsort
SELECT ALL - col0 - - ( - 35 ) * col1 FROM tab2 cor0
----
-1092
-2143
-674

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4582
SELECT DISTINCT - col2 * CAST( NULL AS SIGNED ) * col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4582
SELECT DISTINCT - col2 * CAST ( NULL AS INTEGER ) * col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + + col1 + + col2 * col1 AS col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT DISTINCT + - col2 + - 66 AS col2 FROM tab1 AS cor0
----
-120
-123
-162

onlyif mysql # use DIV operator for integer division
query I rowsort label-4585
SELECT DISTINCT - + col0 * col0 DIV 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-4585
SELECT DISTINCT - + col0 * col0 / col0 col2 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT - col2 * col2 * - col2 + col2 AS col2 FROM tab1 AS cor0
----
157518
185250
884832

onlyif mysql # use DIV operator for integer division
query I rowsort label-4587
SELECT ALL - ( + col0 ) + - 67 DIV 54 FROM tab1
----
-4
-65
-81

skipif mysql # not compatible
query I rowsort label-4587
SELECT ALL - ( + col0 ) + - 67 / 54 FROM tab1
----
-4
-65
-81

query I rowsort
SELECT ALL + col0 * + ( col2 ) - - col1 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT DISTINCT col2 * cor0.col2 AS col2 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT col0 * cor0.col1 * col2 AS col1 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT - 34 FROM tab0, tab0 AS cor0, tab2 cor1
----
27 values hashing to 5b88331e40da4796cc4826c442aa45f7

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 cor0, tab2 cor1, tab0, tab1 AS cor2
----
3645 values hashing to 29937e0f604055b7324ce0c354a5e778

query I rowsort
SELECT DISTINCT 47 AS col1 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
47

query I rowsort
SELECT col1 + + tab0.col2 * col1 AS col0 FROM tab0
----
194
2924
7553

query I rowsort
SELECT - col1 + 26 * 91 FROM tab0 AS cor0
----
2269
2275
2280

query I rowsort
SELECT - col1 * + cor0.col2 * - col1 AS col0 FROM tab0 AS cor0
----
244068
679042
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-4597
SELECT DISTINCT 47 + - col0 DIV col0 AS col0 FROM tab1
----
46

skipif mysql # not compatible
query I rowsort label-4597
SELECT DISTINCT 47 + - col0 / col0 AS col0 FROM tab1
----
46

onlyif mysql # use DIV operator for integer division
query I rowsort label-4598
SELECT - col0 DIV - ( + col0 ) + - col1 * + col0 FROM tab2
----
-1342
-216
-4601

skipif mysql # not compatible
query I rowsort label-4598
SELECT - col0 / - ( + col0 ) + - col1 * + col0 FROM tab2
----
-1342
-216
-4601

onlyif mysql # use DIV operator for integer division
query I rowsort label-4599
SELECT + - 73 DIV + cor0.col0 col0 FROM tab2 AS cor0
----
-10
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4599
SELECT + - 73 / + cor0.col0 col0 FROM tab2 AS cor0
----
-10
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4600
SELECT DISTINCT - col1 DIV + col2 AS col0 FROM tab0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-4600
SELECT DISTINCT - col1 / + col2 AS col0 FROM tab0
----
-1
-2
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4601
SELECT - + ( col1 ) DIV col0 + col2 FROM tab0 AS cor0
----
-1
30
81

skipif mysql # not compatible
query I rowsort label-4601
SELECT - + ( col1 ) / col0 + col2 FROM tab0 AS cor0
----
-1
30
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-4602
SELECT + 65 + + 43 * + col2 * tab1.col0 + + col2 DIV col2 FROM tab1
----
156930
330306
7032

skipif mysql # not compatible
query I rowsort label-4602
SELECT + 65 + + 43 * + col2 * tab1.col0 + + col2 / col2 FROM tab1
----
156930
330306
7032

query I rowsort
SELECT 46 FROM tab2, tab2 cor0
----
9 values hashing to 31818c9d4d325eb248735c97cb1dce39

query I rowsort
SELECT ALL - + 88 + - col0 * + 77 AS col1 FROM tab0 AS cor0
----
-1936
-2783
-6941

query I rowsort
SELECT ALL - col2 * col2 + cor0.col2 + col2 AS col1 FROM tab2 AS cor0
----
-1368
-624
-675

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4606
SELECT ALL - col0 * cor0.col2 + - CAST( NULL AS SIGNED ) * col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4606
SELECT ALL - col0 * cor0.col2 + - CAST ( NULL AS INTEGER ) * col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - 33 + col0 AS col1 FROM tab0 cor0
----
-9
2
56

query I rowsort
SELECT ALL col0 + tab2.col2 * col0 * ( tab2.col1 ) AS col1 FROM tab2
----
119730
51113
5866

query I rowsort
SELECT DISTINCT + 63 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
63

query I rowsort
SELECT + 11 + - col1 FROM tab0
----
-75
-80
-86

onlyif mysql # use DIV operator for integer division
query I rowsort label-4611
SELECT - col1 DIV + cor0.col2 + ( ( - col2 ) ) * col1 * col1 + - col2 AS col1 FROM tab0 AS cor0
----
-244103
-679125
-9507

skipif mysql # not compatible
query I rowsort label-4611
SELECT - col1 / + cor0.col2 + ( ( - col2 ) ) * col1 * col1 + - col2 AS col1 FROM tab0 AS cor0
----
-244103
-679125
-9507

query I rowsort
SELECT ALL - + col2 * + col1 + col2 FROM tab0 AS cor0
----
-2805
-7380
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 9 col1 FROM tab0 AS cor0
----
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-4614
SELECT - + 11 DIV cor0.col0 FROM tab1 AS cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-4614
SELECT - + 11 / cor0.col0 FROM tab1 AS cor0
----
-3
0
0

query I rowsort
SELECT DISTINCT + 62 * - col2 FROM tab0 AS cor0
----
-2046
-5084
-62

query I rowsort
SELECT - col2 + col0 * - col1 AS col2 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT DISTINCT + - 3 * + col2 FROM tab2 AS cor0
----
-114
-78
-81

query I rowsort
SELECT - col2 + - col1 + 81 * - 63 * col1 AS col2 FROM tab1 AS cor0
----
-132758
-51097
-66448

query I rowsort
SELECT DISTINCT - cor0.col2 + col2 * + 31 AS col1 FROM tab0 cor0
----
2460
30
990

query I rowsort
SELECT DISTINCT 68 + + col0 + + col2 FROM tab0 AS cor0
----
104
125
239

query I rowsort
SELECT DISTINCT + - col1 * + col1 + + col1 AS col2 FROM tab2 AS cor0
----
-272
-3422
-930

query I rowsort
SELECT DISTINCT col2 * - 80 + - col1 FROM tab2 AS cor0
----
-2139
-2191
-3057

query I rowsort
SELECT + cor1.col0 + + 52 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to e0ab7687b39d863630f7de8e1435afbb

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * + col0 + cor0.col0 col2 FROM tab0 cor0
----
-2040
-3360
-8010

query I rowsort
SELECT DISTINCT + col1 * cor0.col0 * col0 + - col1 * + col0 + col1 AS col2 FROM tab0 AS cor0
----
115527
47558
712803

query I rowsort
SELECT ( 27 + - col2 ) * 30 AS col1 FROM tab2
----
-330
0
30

query I rowsort
SELECT + ( col1 * col2 + - col1 ) AS col2 FROM tab2
----
1475
629
806

query I rowsort
SELECT ALL - cor0.col1 + - ( col0 ) AS col0 FROM tab0 AS cor0
----
-110
-132
-180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4629
SELECT ALL - col0 + CAST( NULL AS DECIMAL ) * cor0.col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4629
SELECT ALL - col0 + CAST ( NULL AS REAL ) * cor0.col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * col2 col0 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT - col1 + - 4 FROM tab1 AS cor0
----
-14
-17
-30

query I rowsort
SELECT DISTINCT - col2 * + ( col0 ) AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT + col0 + ( ( + col2 ) ) AS col2 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT - cor0.col1 + - ( + cor0.col0 ) * - cor0.col1 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT DISTINCT - col0 + + 42 FROM tab1 cor0
----
-22
-38
39

query I rowsort
SELECT ALL + col1 + - 55 FROM tab1 AS cor0
----
-29
-42
-45

query I rowsort
SELECT + col2 - + 27 * col2 FROM tab0 AS cor0
----
-2132
-26
-858

query I rowsort
SELECT col0 + - 30 AS col1 FROM tab1 AS cor0
----
-27
34
50

query I rowsort
SELECT + - col1 * - 94 + - 75 * - col2 AS col2 FROM tab2 AS cor0
----
4448
4939
7496

query I rowsort
SELECT DISTINCT + col1 * - col1 + - 17 FROM tab0
----
-7413
-8298
-9426

query I rowsort
SELECT - + ( 9 ) FROM tab1 AS cor0
----
-9
-9
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + col2 * col1 - - col1 * + col2 col1 FROM tab1 AS cor0
----
-2808
-35910
-98592

query I rowsort
SELECT ALL - + 76 AS col2 FROM tab0 cor0
----
-76
-76
-76

query I rowsort
SELECT col1 - + 83 FROM tab1 AS cor0
----
-57
-70
-73

onlyif mysql # use DIV operator for integer division
query I rowsort label-4645
SELECT ( col0 ) DIV - col1 + - col2 + col2 DIV + col2 AS col2 FROM tab0 cor0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-4645
SELECT ( col0 ) / - col1 + - col2 + col2 / + col2 AS col2 FROM tab0 cor0
----
-32
-81
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4646
SELECT ALL + CAST( NULL AS SIGNED ) + cor0.col2 col1 FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4646
SELECT ALL + CAST ( NULL AS INTEGER ) + cor0.col2 col1 FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL + tab0.col0 * - col2 AS col0 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT ALL col0 * 18 * + col1 FROM tab1
----
11520
1404
18720

query I rowsort
SELECT + 86 + col2 * cor0.col2 + cor0.col2 * col2 FROM tab2 AS cor0
----
1438
1544
2974

query I rowsort
SELECT + - col0 * ( cor0.col1 ) FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + 80 - col1 * - col0 FROM tab0
----
2144
3475
8179

query I rowsort
SELECT + + cor0.col2 * 46 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 2f53a5db2c498f0c4222038921362b37

query I rowsort
SELECT + 76 * - col1 + ( + col0 ) AS col1 FROM tab2 AS cor0
----
-1213
-2349
-4406

query I rowsort
SELECT + col0 + - col1 * col1 AS col0 FROM tab2 cor0
----
-210
-3403
-954

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 - 40 col1 FROM tab2, tab2 AS cor0
----
9 values hashing to f02f17e9bc17e514af018c6f245ed7a9

query I rowsort
SELECT - col1 * + tab1.col0 * col2 + + col0 AS col0 FROM tab1
----
-36416
-4209
-99760

query I rowsort
SELECT col0 + - col1 + - ( col2 ) * col2 * + col0 FROM tab0
----
-26198
-598438
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4659
SELECT tab1.col2 DIV ( col0 ) + + col2 - ( col0 ) FROM tab1
----
-7
17
69

skipif mysql # not compatible
query I rowsort label-4659
SELECT tab1.col2 / ( col0 ) + + col2 - ( col0 ) FROM tab1
----
-7
17
69

query I rowsort
SELECT - 77 FROM tab1, tab1 AS cor0
----
9 values hashing to 3a24155cb91ceff1e67bb51c07b72107

query I rowsort
SELECT + + cor0.col2 + - cor0.col1 FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4662
SELECT col1 DIV col1 + + ( col2 ) FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-4662
SELECT col1 / col1 + + ( col2 ) FROM tab0 AS cor0
----
2
34
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4663
SELECT col0 * CAST( + 55 AS SIGNED ) * - col1 col2 FROM tab0 cor0
----
-113520
-186725
-445445

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4663
SELECT col0 * CAST ( + 55 AS INTEGER ) * - col1 col2 FROM tab0 cor0
----
-113520
-186725
-445445

query I rowsort
SELECT DISTINCT - col2 + - 77 AS col2 FROM tab1 AS cor0
----
-131
-134
-173

query I rowsort
SELECT + + col2 * col1 * + 22 FROM tab0 AS cor0
----
164164
2134
62436

query I rowsort
SELECT ALL col1 + col0 * - col2 FROM tab1
----
-136
-3638
-7667

query I rowsort
SELECT DISTINCT - col1 * + 65 AS col2 FROM tab1 AS cor0
----
-1690
-650
-845

onlyif mysql # use DIV operator for integer division
query I rowsort label-4668
SELECT - + col2 + - 12 DIV cor0.col0 AS col1 FROM tab1 AS cor0
----
-57
-58
-96

skipif mysql # not compatible
query I rowsort label-4668
SELECT - + col2 + - 12 / cor0.col0 AS col1 FROM tab1 AS cor0
----
-57
-58
-96

query I rowsort
SELECT 3 AS col2 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 3e22859a313d85a6146c6df5f23d77cf

query I rowsort
SELECT DISTINCT - col2 * + col2 + 21 FROM tab2 AS cor0
----
-1423
-655
-708

query I rowsort
SELECT - col1 * - 60 FROM tab2 AS cor0
----
1020
1860
3540

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4672
SELECT DISTINCT col0 + - CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4672
SELECT DISTINCT col0 + - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4673
SELECT DISTINCT + - col1 DIV + CAST( + col1 AS SIGNED ) FROM tab1 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-4673
SELECT DISTINCT + - col1 / + CAST ( + col1 AS INTEGER ) FROM tab1 AS cor0
----
-1

query I rowsort
SELECT DISTINCT - + col0 * - cor0.col0 * + cor0.col0 FROM tab2 AS cor0
----
343
474552
493039

query I rowsort
SELECT col1 + col1 + col1 FROM tab2
----
177
51
93

query I rowsort
SELECT - col1 AS col0 FROM tab0 WHERE NOT ( NULL ) NOT IN ( - col2 )
----

query I rowsort
SELECT - col1 * - col2 FROM tab2 WHERE NOT col1 + - col0 BETWEEN NULL AND - col0 * col2
----
1534
646
837

query I rowsort
SELECT ALL col2 + col2 * ( col0 ) AS col1 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT ALL col2 - + col1 * tab2.col1 AS col0 FROM tab2
----
-251
-3455
-934

query I rowsort
SELECT - col0 * col2 * col2 AS col1 FROM tab1
----
-207936
-737280
-8748

onlyif mysql # use DIV operator for integer division
query I rowsort label-4681
SELECT DISTINCT + tab0.col2 DIV - tab0.col2 FROM tab0
----
-1

skipif mysql # not compatible
query I rowsort label-4681
SELECT DISTINCT + tab0.col2 / - tab0.col2 FROM tab0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + + col2 + col0 col0 FROM tab0
----
133
143
262

query I rowsort
SELECT DISTINCT col2 * - col1 + + tab2.col2 - - col1 AS col0 FROM tab2
----
-1449
-591
-779

onlyif mysql # use DIV operator for integer division
query I rowsort label-4684
SELECT ALL col0 + + col0 + + col1 DIV col1 col0 FROM tab1
----
129
161
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4684
SELECT ALL col0 + + col0 + + col1 / col1 col0 FROM tab1
----
129
161
7

query III rowsort
SELECT * FROM tab1 WHERE NOT col2 + + col1 * - col1 NOT IN ( + col0 * + col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4686
SELECT col2 * col1 DIV - tab0.col0 - + col0 FROM tab0
----
-142
-172
-37

skipif mysql # not compatible
query I rowsort label-4686
SELECT col2 * col1 / - tab0.col0 - + col0 FROM tab0
----
-142
-172
-37

query I rowsort
SELECT DISTINCT + col0 * + tab1.col0 AS col1 FROM tab1
----
4096
6400
9

query I rowsort
SELECT DISTINCT col0 * - col2 + col1 AS col1 FROM tab1
----
-136
-3638
-7667

query I rowsort
SELECT ALL + col1 * + col0 * + col0 AS col2 FROM tab1
----
234
40960
83200

query I rowsort
SELECT col0 * col2 + + col2 AS col2 FROM tab0
----
36
7380
825

query I rowsort
SELECT DISTINCT - col2 AS col2 FROM tab1 WHERE ( NULL ) NOT IN ( + tab1.col0 + col1 )
----

query I rowsort
SELECT + col0 - + col2 AS col0 FROM tab2 WHERE ( col0 + col2 + + col2 ) <> ( NULL )
----

query I rowsort
SELECT ALL + col0 * col0 + col0 + + col2 AS col0 FROM tab1
----
4217
6576
66

query I rowsort
SELECT ALL + col2 * + col0 + - tab0.col2 + col2 * col0 FROM tab0
----
14514
1551
69

query I rowsort
SELECT DISTINCT 95 * - tab0.col0 AS col0 FROM tab0
----
-2280
-3325
-8455

query I rowsort
SELECT + 79 + + col0 * - 55 * col0 AS col2 FROM tab1
----
-225201
-351921
-416

query I rowsort
SELECT - + 60 + + col1 + + col0 AS col1 FROM tab1 AS cor0
----
-31
14
33

query I rowsort
SELECT DISTINCT - 34 + + cor0.col0 AS col1 FROM tab1 AS cor0
----
-31
30
46

onlyif mysql # use DIV operator for integer division
query I rowsort label-4699
SELECT cor0.col2 DIV col0 + ( col1 * - col2 ) AS col1 FROM tab2 cor0
----
-1534
-646
-834

skipif mysql # not compatible
query I rowsort label-4699
SELECT cor0.col2 / col0 + ( col1 * - col2 ) AS col1 FROM tab2 cor0
----
-1534
-646
-834

query I rowsort
SELECT ALL - + cor0.col2 + - col1 * - col2 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT + col0 * - col2 + col2 AS col0 FROM tab0 cor0
----
-34
-7216
-759

query I rowsort
SELECT DISTINCT + - col1 - cor0.col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT + + 56 + - col0 * + col1 * ( + col0 ) AS col2 FROM tab2 AS cor0
----
-106041
-1463
-358900

onlyif mysql # use DIV operator for integer division
query I rowsort label-4704
SELECT DISTINCT - col2 + col0 DIV ( col0 + + cor0.col1 ) AS col2 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-4704
SELECT DISTINCT - col2 + col0 / ( col0 + + cor0.col1 ) AS col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL + 77 * col2 + 5 * + ( cor0.col1 ) FROM tab1 AS cor0
----
4288
4439
7457

query I rowsort
SELECT ALL - ( col2 ) + ( + col2 + col1 ) FROM tab2 cor0
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-4707
SELECT col1 * - col1 + col2 DIV - col1 AS col1 FROM tab1 AS cor0
----
-105
-176
-678

skipif mysql # not compatible
query I rowsort label-4707
SELECT col1 * - col1 + col2 / - col1 AS col1 FROM tab1 AS cor0
----
-105
-176
-678

query I rowsort
SELECT ALL + - col1 * + 73 + + col2 FROM tab2 AS cor0
----
-1203
-2236
-4281

query I rowsort
SELECT ALL - 80 + 48 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to ef8f93119983b962f4c81381ebf4b1e6

query I rowsort
SELECT DISTINCT col1 * tab2.col0 * - col2 + + col1 FROM tab2
----
-119593
-51017
-5828

onlyif mysql # use DIV operator for integer division
query I rowsort label-4711
SELECT + col1 DIV - col2 col2 FROM tab0 cor0
----
-1
-2
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4711
SELECT + col1 / - col2 col2 FROM tab0 cor0
----
-1
-2
-97

query I rowsort
SELECT ALL + 0 * ( - col1 ) FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + ( + col2 ) * col0 + - 31 AS col0 FROM tab2 cor0
----
158
1997
2971

query I rowsort
SELECT ALL - + col0 * col1 + col1 * + cor0.col2 AS col2 FROM tab0 AS cor0
----
-3298
-637
774

query I rowsort
SELECT cor0.col0 * cor0.col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT col0 + 80 AS col0 FROM tab1
----
144
160
83

query I rowsort
SELECT ALL 47 - ( - col2 + - col1 ) AS col2 FROM tab0
----
145
166
220

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + + col2 col2 FROM tab1
----
28
47
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( col2 ) * - col0 + col2 * tab0.col1 col2 FROM tab0
----
164
2046
62

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1, tab2 cor0, tab1 cor1
----
972 values hashing to dd771e0c15d524f62127686e9bd43f9a

query I rowsort
SELECT - 24 AS col0 FROM tab2
----
-24
-24
-24

onlyif mysql # use DIV operator for integer division
query I rowsort label-4722
SELECT col2 + + col0 + + col2 * col0 DIV col1 AS col1 FROM tab0 AS cor0
----
251
36
66

skipif mysql # not compatible
query I rowsort label-4722
SELECT col2 + + col0 + + col2 * col0 / col1 AS col1 FROM tab0 AS cor0
----
251
36
66

query I rowsort
SELECT + + col1 - + col1 * - cor0.col2 FROM tab2 AS cor0
----
1593
663
868

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 93 col1 FROM tab0
----
93

query I rowsort
SELECT DISTINCT col0 + + tab1.col2 * + col2 FROM tab1
----
2919
3313
9296

query I rowsort
SELECT - tab0.col1 * - col2 * col2 AS col2 FROM tab0
----
611884
93654
97

query I rowsort
SELECT col2 * - col1 + + col1 FROM tab2 cor0
----
-1475
-629
-806

query I rowsort
SELECT - - cor0.col1 + cor0.col2 * col2 AS col1 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT ALL + cor0.col1 * cor0.col0 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to f2938bee011b8d49dd931b1f9235e7f5

onlyif mysql # use DIV operator for integer division
query I rowsort label-4730
SELECT ALL + 90 DIV col2 FROM tab0
----
1
2
90

skipif mysql # not compatible
query I rowsort label-4730
SELECT ALL + 90 / col2 FROM tab0
----
1
2
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-4731
SELECT ALL + col0 * col0 DIV col0 AS col1 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-4731
SELECT ALL + col0 * col0 / col0 AS col1 FROM tab1 AS cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 33 col1 FROM tab0, tab0 cor0
----
33

query I rowsort
SELECT + col0 * - col1 + + col0 AS col2 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT col1 * col2 - - col0 FROM tab0 AS cor0
----
132
2862
7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-4735
SELECT 61 DIV col0 AS col2 FROM tab2 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-4735
SELECT 61 / col0 AS col2 FROM tab2 AS cor0
----
0
0
8

query I rowsort
SELECT + - cor0.col0 * - col0 AS col2 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT + col1 AS col1 FROM tab0 WHERE NOT NULL <= NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4738
SELECT ALL + col0 DIV col0 - col0 FROM tab1
----
-2
-63
-79

skipif mysql # not compatible
query I rowsort label-4738
SELECT ALL + col0 / col0 - col0 FROM tab1
----
-2
-63
-79

query I rowsort
SELECT tab1.col0 * + tab1.col1 + col0 + + col2 FROM tab1
----
1216
135
761

query I rowsort
SELECT col1 + col2 * + col0 + + col0 * col0 AS col0 FROM tab2
----
269
8171
9260

query I rowsort
SELECT ALL col0 * + col1 * + col0 AS col1 FROM tab0 AS cor0
----
118825
49536
720811

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - cor0.col0 col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - col2 + col1 * + col2 * - tab1.col1 FROM tab1
----
-16320
-36558
-5757

query I rowsort
SELECT DISTINCT + col1 * col1 - - tab2.col2 AS col0 FROM tab2
----
327
3507
988

query I rowsort
SELECT ALL col0 AS col0 FROM tab2 WHERE NOT NULL <= col2 * - col1 * col2
----

query I rowsort
SELECT DISTINCT col0 - - col1 * + col2 AS col1 FROM tab2
----
1612
725
844

query I rowsort
SELECT ALL tab0.col0 * - tab0.col0 AS col0 FROM tab0
----
-1225
-576
-7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col0 + + col0 col2 FROM tab1
----
165
3712
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-4749
SELECT ALL + col0 DIV - col1 - - tab0.col1 AS col2 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-4749
SELECT ALL + col0 / - col1 - - tab0.col1 AS col2 FROM tab0
----
86
91
97

query I rowsort
SELECT ALL col2 * + col2 - + col1 FROM tab1
----
2890
3239
9203

query I rowsort
SELECT + col1 FROM tab2 WHERE ( col2 ) NOT IN ( + col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4752
SELECT col2 DIV col0 + tab1.col2 DIV - col0 AS col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4752
SELECT col2 / col0 + tab1.col2 / - col0 AS col1 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + col1 * + cor0.col2 col2 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT - - col0 * - cor0.col2 + col1 * - col0 AS col2 FROM tab2 AS cor0
----
-406
-4345
-6630

query I rowsort
SELECT DISTINCT - + col2 * col2 - col2 FROM tab2 AS cor0
----
-1482
-702
-756

query I rowsort
SELECT ALL + cor0.col1 * cor0.col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT ALL + col2 * cor0.col0 - - col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT ALL - col2 AS col0 FROM tab0 WHERE - col0 NOT IN ( - col2 )
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col0 * + col1 col1 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT + + 44 * col2 + col1 + + ( col1 ) FROM tab1 AS cor0
----
2428
2528
4250

query I rowsort
SELECT - - col0 + + col0 * col2 AS col2 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT + cor0.col0 * - col2 + - col0 * - 1 AS col0 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT DISTINCT + 80 * - col0 - + col1 FROM tab2 cor0
----
-591
-6299
-6337

query I rowsort
SELECT DISTINCT + 2 + + col1 * - cor0.col1 + 29 FROM tab1 AS cor0
----
-138
-645
-69

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4765
SELECT - 71 * - cor0.col2 * - cor0.col0 + ( - 56 * + col0 ) + CAST( + col0 AS SIGNED ) FROM tab2 cor0
----
-13804
-148278
-217487

skipif mysql # not compatible
query I rowsort label-4765
SELECT - 71 * - cor0.col2 * - cor0.col0 + ( - 56 * + col0 ) + CAST ( + col0 AS INTEGER ) FROM tab2 cor0
----
-13804
-148278
-217487

query I rowsort
SELECT ALL + cor0.col2 * col1 FROM tab1 cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-4767
SELECT DISTINCT + col1 DIV + col1 - cor0.col0 FROM tab2 cor0
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort label-4767
SELECT DISTINCT + col1 / + col1 - cor0.col0 FROM tab2 cor0
----
-6
-77
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-4768
SELECT - CAST( 44 AS SIGNED ) + col0 DIV 92 FROM tab0 cor0
----
-44
-44
-44

skipif mysql # not compatible
query I rowsort label-4768
SELECT - CAST ( 44 AS INTEGER ) + col0 / 92 FROM tab0 cor0
----
-44
-44
-44

query I rowsort
SELECT cor0.col1 * col1 * + cor0.col1 + col2 AS col1 FROM tab2 AS cor0
----
205405
29818
4951

query I rowsort
SELECT DISTINCT col1 * + ( - col1 ) FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL + - ( cor0.col0 ) FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT - 71 * cor0.col0 FROM tab2 AS cor0
----
-497
-5538
-5609

query I rowsort
SELECT + + 21 * col0 AS col2 FROM tab1 AS cor0
----
1344
1680
63

query I rowsort
SELECT + col2 * + 55 + col1 AS col1 FROM tab0 cor0
----
152
1901
4601

query I rowsort
SELECT + 53 + 19 FROM tab0
----
72
72
72

query I rowsort
SELECT - col0 - col1 * - col1 FROM tab0
----
7372
8192
9374

query I rowsort
SELECT DISTINCT - - col2 * cor0.col2 * 39 FROM tab0 AS cor0
----
262236
39
42471

query I rowsort
SELECT DISTINCT - cor1.col1 AS col1 FROM tab0 cor0 CROSS JOIN tab2 cor1
----
-17
-31
-59

query I rowsort
SELECT + col0 * col1 * + 65 - + cor0.col2 FROM tab2 cor0
----
14078
299104
87257

query I rowsort
SELECT - col1 * - 58 * - col2 - + cor0.col2 * 27 * col2 FROM tab1 AS cor0
----
-120783
-160164
-321216

skipif mysql # not compatible
query I rowsort
SELECT col0 - CAST ( - cor0.col0 + + col2 AS REAL ) FROM tab1 AS cor0
----
-48
64
71

query I rowsort
SELECT DISTINCT - col2 * col0 + - col0 AS col2 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT DISTINCT + 66 * col0 AS col2 FROM tab0
----
1584
2310
5874

query I rowsort
SELECT col0 + + tab1.col0 + col0 * col2 * 6 FROM tab1
----
22016
46240
978

query I rowsort
SELECT ALL + tab1.col0 - 17 FROM tab1
----
-14
47
63

onlyif mysql # use DIV operator for integer division
query I rowsort label-4786
SELECT DISTINCT + col1 DIV tab0.col1 + tab0.col0 AS col1 FROM tab0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-4786
SELECT DISTINCT + col1 / tab0.col1 + tab0.col0 AS col1 FROM tab0
----
25
36
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-4787
SELECT col1 DIV + col0 + - col0 * + col1 AS col2 FROM tab2
----
-1343
-213
-4602

skipif mysql # not compatible
query I rowsort label-4787
SELECT col1 / + col0 + - col0 * + col1 AS col2 FROM tab2
----
-1343
-213
-4602

query I rowsort
SELECT cor0.col1 * 4 AS col0 FROM tab1 AS cor0
----
104
40
52

query I rowsort
SELECT DISTINCT - col1 * ( - cor0.col1 * - col0 ) FROM tab1 cor0
----
-13520
-2028
-6400

query I rowsort
SELECT - col1 * + 10 * - col0 FROM tab1
----
10400
6400
780

query I rowsort
SELECT - 21 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to cdcb40c9e1bb9a33ce9167a0d2bac0b1

query I rowsort
SELECT - col1 + cor0.col1 * 97 + cor0.col0 FROM tab1 AS cor0
----
1024
1328
2499

query I rowsort
SELECT ALL col1 + col2 * + col2 AS col0 FROM tab1
----
2942
3259
9229

query I rowsort
SELECT ALL col0 + ( + 3 ) AS col0 FROM tab0
----
27
38
92

query I rowsort
SELECT ALL + cor0.col2 * 5 + - col0 AS col0 FROM tab1 AS cor0
----
221
267
400

query I rowsort
SELECT DISTINCT + - col2 + + 41 * - col0 FROM tab0 AS cor0
----
-1017
-1436
-3731

query I rowsort
SELECT ALL - col1 * cor0.col2 + 8 FROM tab0 AS cor0
----
-2830
-7454
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-4798
SELECT ALL + col0 * + col0 DIV col0 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-4798
SELECT ALL + col0 * + col0 / col0 FROM tab1
----
3
64
80

query I rowsort
SELECT - 1 * - col0 AS col0 FROM tab1
----
3
64
80

query I rowsort
SELECT 75 * col1 AS col2 FROM tab0
----
6450
6825
7275

query I rowsort
SELECT col2 + + col0 * - col1 * cor0.col0 + 96 * + col0 AS col2 FROM tab2 AS cor0
----
-351442
-820
-98475

onlyif mysql # use DIV operator for integer division
query I rowsort label-4802
SELECT DISTINCT + + 81 DIV - col0 FROM tab1 AS cor0
----
-1
-27

skipif mysql # not compatible
query I rowsort label-4802
SELECT DISTINCT + + 81 / - col0 FROM tab1 AS cor0
----
-1
-27

query I rowsort
SELECT 89 * col1 - - col2 * col0 FROM tab2 AS cor0
----
2948
4515
7279

onlyif mysql # use DIV operator for integer division
query I rowsort label-4804
SELECT + col1 + col0 + cor0.col0 DIV + ( + col1 ) FROM tab0 AS cor0
----
110
132
180

skipif mysql # not compatible
query I rowsort label-4804
SELECT + col1 + col0 + cor0.col0 / + ( + col1 ) FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT - col2 * tab2.col0 + col1 * 69 AS col2 FROM tab2
----
-1829
1950
2043

query I rowsort
SELECT ALL - - 56 + - col2 * + col0 FROM tab2 AS cor0
----
-133
-1972
-2946

query I rowsort
SELECT ALL - + col0 * + col2 AS col0 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT col2 * col0 + + col0 * + col1 FROM tab0 AS cor0
----
15397
2856
3430

query I rowsort
SELECT DISTINCT col0 + - col2 + 58 * col1 AS col1 FROM tab1 AS cor0
----
1457
587
738

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT ALL + - cor0.col0 * ( 55 ) + - col1 + cor0.col2 FROM tab0 AS cor0
----
-1373
-2021
-4904

query I rowsort
SELECT ALL - col0 * ( - 98 ) + col1 * col0 FROM tab1 AS cor0
----
372
6912
8880

onlyif mysql # use DIV operator for integer division
query I rowsort label-4813
SELECT DISTINCT col1 DIV ( col2 ) AS col1 FROM tab1 cor0
----
0

skipif mysql # not compatible
query I rowsort label-4813
SELECT DISTINCT col1 / ( col2 ) AS col1 FROM tab1 cor0
----
0

query I rowsort
SELECT - cor0.col0 + - col0 * 16 FROM tab1 AS cor0
----
-1088
-1360
-51

query I rowsort
SELECT ALL + col1 * col1 * 19 + - col0 * ( col0 ) AS col0 FROM tab0 AS cor0
----
139948
149418
177546

query I rowsort
SELECT DISTINCT + col1 * + 78 AS col2 FROM tab2 AS cor0
----
1326
2418
4602

query I rowsort
SELECT ALL - - col2 + ( + 69 * cor0.col1 ) AS col0 FROM tab1 AS cor0
----
1848
747
993

query I rowsort
SELECT + 18 + + col0 * col1 FROM tab0
----
2082
3413
8117

query I rowsort
SELECT - 77 - - tab2.col1 * - col2 AS col1 FROM tab2
----
-1611
-723
-914

query I rowsort
SELECT 94 * - col2 FROM tab1 AS cor0
----
-5076
-5358
-9024

query I rowsort
SELECT ALL 63 * cor0.col0 FROM tab0, tab1 cor0
----
9 values hashing to eb7f702b26154bcf0db5c9ba3607c9ce

query I rowsort
SELECT col1 - - cor0.col0 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT + 4 + + cor0.col2 * 62 * 62 AS col0 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 925722c741809f2a69e8e80cbc2c73f4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 34 col1 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 4e2ca147a59e0d5661c28cf3e5431caa

query I rowsort
SELECT 54 AS col1 FROM tab1, tab1 cor0, tab2 cor1
----
27 values hashing to 81150d59d6c3fc48b4ef5a4a5495bc7a

query I rowsort
SELECT col2 + + col0 * 1 AS col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT - 97 * col2 FROM tab1
----
-5238
-5529
-9312

onlyif mysql # use DIV operator for integer division
query I rowsort label-4828
SELECT + col1 + - tab1.col1 DIV + col1 col2 FROM tab1
----
12
25
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4828
SELECT + col1 + - tab1.col1 / + col1 col2 FROM tab1
----
12
25
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4829
SELECT + - CAST( NULL AS SIGNED ) / - 31 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4829
SELECT + - CAST ( NULL AS INTEGER ) / - 31 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 + + 63 * - ( - col2 ) AS col2 FROM tab1
----
3405
3655
6128

query I rowsort
SELECT - + 44 + col0 * col1 FROM tab1 AS cor0
----
34
596
996

query I rowsort
SELECT ALL ( col1 * + col0 ) FROM tab1
----
1040
640
78

query I rowsort
SELECT 73 * ( col2 + col1 ) FROM tab0 AS cor0
----
12629
7154
8687

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4834
SELECT ALL CAST( + tab1.col2 AS SIGNED ) + - col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4834
SELECT ALL CAST ( + tab1.col2 AS INTEGER ) + - col2 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL - ( - ( tab1.col2 ) ) * - 42 + 81 * - col1 FROM tab1
----
-3204
-4374
-5085

query I rowsort
SELECT - - ( 44 ) FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 0cc3e52e781e46962291c3060c6ae73b

query I rowsort
SELECT - col0 + 7 FROM tab0 AS cor0
----
-17
-28
-82

query I rowsort
SELECT ( - col1 + - tab1.col2 ) * col2 AS col1 FROM tab1
----
-10464
-3819
-4320

query I rowsort
SELECT col2 * - col2 * - ( 25 ) AS col2 FROM tab2 AS cor0
----
16900
18225
36100

query I rowsort
SELECT + 90 + cor0.col1 AS col1 FROM tab1 AS cor0
----
100
103
116

query I rowsort
SELECT ALL - col1 + + col2 * col2 FROM tab0 AS cor0
----
-96
1003
6633

query I rowsort
SELECT ALL 76 + + col0 FROM tab1 AS cor0
----
140
156
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-4843
SELECT DISTINCT ( cor0.col1 ) * + cor0.col0 + col1 DIV col0 + + 87 AS col0 FROM tab1 AS cor0
----
1127
173
727

skipif mysql # not compatible
query I rowsort label-4843
SELECT DISTINCT ( cor0.col1 ) * + cor0.col0 + col1 / col0 + + 87 AS col0 FROM tab1 AS cor0
----
1127
173
727

query I rowsort
SELECT DISTINCT + + col1 + col1 * - 36 AS col1 FROM tab1 AS cor0
----
-350
-455
-910

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 32 col1 FROM tab1, tab1 AS cor0
----
32

query I rowsort
SELECT DISTINCT col1 + col2 * - col2 AS col1 FROM tab0 AS cor0
----
-1003
-6633
96

query I rowsort
SELECT - - cor0.col2 + cor0.col0 AS col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT + + col1 * col0 * 37 FROM tab0 AS cor0
----
125615
299663
76368

query I rowsort
SELECT col1 * + col1 + - col0 AS col0 FROM tab0 cor0
----
7372
8192
9374

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4850
SELECT + col2 + - CAST( - col0 * col2 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
2054
216
3040

skipif mysql # not compatible
query I rowsort label-4850
SELECT + col2 + - CAST ( - col0 * col2 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT DISTINCT + col2 * - 86 * - col0 FROM tab2 AS cor0
----
16254
174408
258172

query I rowsort
SELECT ( 43 ) * - col1 FROM tab2 AS cor0
----
-1333
-2537
-731

query I rowsort
SELECT DISTINCT - 36 * - col1 AS col2 FROM tab1 AS cor0
----
360
468
936

query I rowsort
SELECT DISTINCT - col0 * + col1 * - col0 + col2 * + col1 AS col0 FROM tab0 AS cor0
----
118922
52374
728273

query I rowsort
SELECT ALL + - 50 * - col2 FROM tab2 AS cor0
----
1300
1350
1900

query I rowsort
SELECT ( col2 ) + col2 AS col1 FROM tab2
----
52
54
76

query I rowsort
SELECT DISTINCT + col0 + - col1 * col0 FROM tab2
----
-1264
-210
-4524

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4858
SELECT + 27 * + col1 + CAST( NULL AS SIGNED ) + + col1 * - tab1.col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4858
SELECT + 27 * + col1 + CAST ( NULL AS INTEGER ) + + col1 * - tab1.col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL tab1.col1 + + col2 * + 78 FROM tab1
----
4238
4456
7501

query I rowsort
SELECT DISTINCT + + 59 + col1 * + 27 FROM tab2 AS cor0
----
1652
518
896

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4861
SELECT DISTINCT + col0 + col0 * + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4861
SELECT DISTINCT + col0 + col0 * + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL - 63 * col2 + - col2 * + 5 + col0 AS col2 FROM tab0 AS cor0
----
-2220
-33
-5487

query I rowsort
SELECT cor0.col0 * 91 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 19c8b1036a90459dfc9565efcd72d83d

query I rowsort
SELECT ALL - 17 + cor0.col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 079ab18e02b28948d280ba312e377a6e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * 68 col1 FROM tab2 cor0
----
1768
1836
2584

query I rowsort
SELECT DISTINCT + col1 * col0 + col1 * - col0 FROM tab2 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4867
SELECT - col0 + 93 DIV - 45 - + col2 DIV + cor0.col2 AS col0 FROM tab1 AS cor0
----
-6
-67
-83

skipif mysql # not compatible
query I rowsort label-4867
SELECT - col0 + 93 / - 45 - + col2 / + cor0.col2 AS col0 FROM tab1 AS cor0
----
-6
-67
-83

query I rowsort
SELECT ALL + col0 * + ( + ( cor0.col0 ) ) + 25 AS col1 FROM tab2 cor0
----
6109
6266
74

query I rowsort
SELECT ALL + col2 + col0 * ( col1 ) AS col0 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT + col0 + cor0.col0 - col1 FROM tab2 cor0
----
-17
141
97

query IIIIIIIII rowsort
SELECT * FROM tab2, tab1, tab0 AS cor0 WHERE NOT ( NULL ) <> NULL
----

query I rowsort
SELECT ( + tab2.col1 ) * col2 + - col0 - col2 FROM tab2
----
1430
529
803

query I rowsort
SELECT DISTINCT + col0 + + col2 - - ( + 5 ) FROM tab1
----
126
181
62

query I rowsort
SELECT 33 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 76da8bc7cae18ecf856438f872430c80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4875
SELECT - + col2 + + CAST( NULL AS SIGNED ) - cor0.col2 / - col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4875
SELECT - + col2 + + CAST ( NULL AS INTEGER ) - cor0.col2 / - col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + ( + 86 ) * col2 FROM tab1 AS cor0
----
4644
4902
8256

query I rowsort
SELECT ALL 4 AS col0 FROM tab0, tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
81 values hashing to 3347a3237b37ed63205e9440d8818a46

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4878
SELECT DISTINCT + CAST( col2 AS SIGNED ) * - col0 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-4878
SELECT DISTINCT + CAST ( col2 AS INTEGER ) * - col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + 62 * - col1 + + col0 AS col1 FROM tab0 AS cor0
----
-5308
-5553
-5979

query I rowsort
SELECT ALL - cor0.col0 - 48 FROM tab1 AS cor0
----
-112
-128
-51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 * col0 * - col1 + - col1 col1 FROM tab1 AS cor0
----
13507
2002
6390

query I rowsort
SELECT ALL - col0 * col1 - cor0.col0 AS col0 FROM tab0 cor0
----
-2088
-3430
-8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-4883
SELECT DISTINCT + + ( - col2 ) DIV + col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4883
SELECT DISTINCT + + ( - col2 ) / + col1 FROM tab0 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4884
SELECT + - CAST( NULL AS DECIMAL ) * 53 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4884
SELECT + - CAST ( NULL AS REAL ) * 53 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 * - col2 + col0 AS col0 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT DISTINCT ( - col0 ) + col0 * col2 AS col0 FROM tab0 AS cor0
----
0
7209
768

onlyif mysql # use DIV operator for integer division
query I rowsort label-4887
SELECT ALL - - 31 DIV - col0 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-4887
SELECT ALL - - 31 / - col0 FROM tab2 AS cor0
----
-4
0
0

query I rowsort
SELECT DISTINCT + + col0 - + col2 AS col2 FROM tab1 AS cor0
----
-16
-51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-4889
SELECT DISTINCT - + ( + col1 ) DIV + col0 + + ( - cor0.col0 + + cor0.col2 ) AS col1 FROM tab0 AS cor0
----
-36
-8
6

skipif mysql # not compatible
query I rowsort label-4889
SELECT DISTINCT - + ( + col1 ) / + col0 + + ( - cor0.col0 + + cor0.col2 ) AS col1 FROM tab0 AS cor0
----
-36
-8
6

query I rowsort
SELECT ALL - 9 + + col2 AS col1 FROM tab1 AS cor0
----
45
48
87

query I rowsort
SELECT DISTINCT + cor0.col2 + col2 * col0 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT ALL - 5 + + cor0.col2 AS col0 FROM tab0 AS cor0
----
-4
28
77

query I rowsort
SELECT + 81 AS col0 FROM tab2 cor0
----
81
81
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-4894
SELECT ALL - + col0 DIV - col0 AS col2 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4894
SELECT ALL - + col0 / - col0 AS col2 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT col2 + - col0 * - col2 FROM tab1 cor0
----
216
3705
7776

query I rowsort
SELECT - 68 + + tab1.col1 * col0 AS col1 FROM tab1
----
10
572
972

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4897
SELECT - CAST( col1 AS SIGNED ) AS col2 FROM tab2
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-4897
SELECT - CAST ( col1 AS INTEGER ) AS col2 FROM tab2
----
-17
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col1 col0 FROM tab1, tab0, tab1 AS cor0, tab2
----
81 values hashing to b7a1b38fe8e4f34388e3be1f52601ae5

query I rowsort
SELECT DISTINCT ( - tab0.col2 * + col0 ) AS col2 FROM tab0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-4900
SELECT + ( col2 ) + + col1 DIV - 74 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-4900
SELECT + ( col2 ) + + col1 / - 74 FROM tab2
----
26
27
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4901
SELECT DISTINCT - CAST( + 0 AS SIGNED ) col1 FROM tab1, tab1 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4901
SELECT DISTINCT - CAST ( + 0 AS INTEGER ) col1 FROM tab1, tab1 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4902
SELECT + + ( col0 ) * + CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4902
SELECT + + ( col0 ) * + CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4903
SELECT DISTINCT - 53 * col0 - - cor0.col1 DIV cor0.col2 AS col0 FROM tab0 cor0
----
-1270
-1758
-4716

skipif mysql # not compatible
query I rowsort label-4903
SELECT DISTINCT - 53 * col0 - - cor0.col1 / cor0.col2 AS col0 FROM tab0 cor0
----
-1270
-1758
-4716

query I rowsort
SELECT DISTINCT + 75 * col1 + ( - col0 ) FROM tab1 AS cor0
----
1947
686
895

query I rowsort
SELECT ALL cor0.col0 - + col1 AS col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT ALL col2 * ( tab2.col1 ) AS col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT ( col1 + - col2 * - 45 ) AS col2 FROM tab0
----
142
1571
3781

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col1 col2 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
-17
-31
-59

query I rowsort
SELECT 26 * col0 AS col1 FROM tab2
----
182
2028
2054

query I rowsort
SELECT + 83 + 89 AS col2 FROM tab0
----
172
172
172

query I rowsort
SELECT + + ( + cor0.col0 ) * - col1 + + 15 AS col2 FROM tab0 AS cor0
----
-2049
-3380
-8084

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4912
SELECT - CAST( + 34 AS SIGNED ) FROM tab0, tab2 cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to 04947e895a04c00ea3cab9af228c0c43

skipif mysql # not compatible
query I rowsort label-4912
SELECT - CAST ( + 34 AS INTEGER ) FROM tab0, tab2 cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to 04947e895a04c00ea3cab9af228c0c43

query I rowsort
SELECT ALL + ( - 60 ) FROM tab2 AS cor0
----
-60
-60
-60

onlyif mysql # use DIV operator for integer division
query I rowsort label-4914
SELECT - - col2 * 94 + col1 DIV col1 AS col2 FROM tab2 AS cor0
----
2445
2539
3573

skipif mysql # not compatible
query I rowsort label-4914
SELECT - - col2 * 94 + col1 / col1 AS col2 FROM tab2 AS cor0
----
2445
2539
3573

query I rowsort
SELECT DISTINCT + 31 * cor0.col0 AS col1 FROM tab1 AS cor0
----
1984
2480
93

query I rowsort
SELECT DISTINCT - 10 * + col1 * - col2 FROM tab2 AS cor0
----
15340
6460
8370

query I rowsort
SELECT + - cor0.col2 * + 92 AS col0 FROM tab1 cor0
----
-4968
-5244
-8832

query I rowsort
SELECT col2 * - col0 + - 29 * + col0 FROM tab1
----
-10000
-249
-5504

query I rowsort
SELECT + col0 * cor0.col2 + - col1 FROM tab0 AS cor0
----
-62
706
7207

query I rowsort
SELECT cor0.col0 * + 35 FROM tab1 AS cor0
----
105
2240
2800

query I rowsort
SELECT + - col0 + + col1 * + 8 FROM tab2 cor0
----
241
394
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
10
13
26

query I rowsort
SELECT DISTINCT - cor0.col1 * - col0 + col2 AS col0 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT - + 31 + col2 AS col2 FROM tab1 AS cor0
----
23
26
65

query I rowsort
SELECT DISTINCT + + cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
10
13
26

query I rowsort
SELECT DISTINCT ( col2 ) * - col2 + col2 FROM tab1
----
-2862
-3192
-9120

query I rowsort
SELECT ALL + col1 + + ( col0 ) AS col1 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT DISTINCT - col2 + + col2 + col1 AS col2 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL - cor0.col0 + - cor0.col1 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT ALL tab0.col0 + col0 * tab0.col2 FROM tab0
----
70
7387
816

query I rowsort
SELECT ALL - tab2.col2 FROM tab1, tab0, tab1 AS cor0, tab2
----
81 values hashing to c569638e8a09ff819458d62ddbde994c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4932
SELECT DISTINCT + + cor0.col2 * CAST( col0 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-4932
SELECT DISTINCT + + cor0.col2 * CAST ( col0 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + col0 + col1 col1 FROM tab1 AS cor0
----
106
55
84

query I rowsort
SELECT ALL - - col2 + + 99 * - col0 AS col1 FROM tab0 AS cor0
----
-2343
-3464
-8729

onlyif mysql # use DIV operator for integer division
query I rowsort label-4935
SELECT DISTINCT col2 DIV ( - col1 ) FROM tab2 AS cor0
----
-2
0

skipif mysql # not compatible
query I rowsort label-4935
SELECT DISTINCT col2 / ( - col1 ) FROM tab2 AS cor0
----
-2
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * + col1 + + col1 col1 FROM tab1 AS cor0
----
-156
-650
-90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4937
SELECT DISTINCT col0 * col0 + - CAST( NULL AS SIGNED ) * - col1 * - col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-4937
SELECT DISTINCT col0 * col0 + - CAST ( NULL AS INTEGER ) * - col1 * - col1 FROM tab1
----
NULL

query I rowsort
SELECT ALL - 73 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 84ab9db5468b4a1781bd8d5c8e0e77fc

query I rowsort
SELECT ALL col1 + - 79 AS col0 FROM tab1
----
-53
-66
-69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * 23 + + ( col0 * + tab0.col2 ) col2 FROM tab0
----
-1186
-2196
5205

query I rowsort
SELECT ALL col1 + - col1 * - tab0.col2 AS col0 FROM tab0
----
194
2924
7553

onlyif mysql # use DIV operator for integer division
query I rowsort label-4942
SELECT ALL - col1 + + ( + col0 ) DIV col0 AS col1 FROM tab0 cor0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-4942
SELECT ALL - col1 + + ( + col0 ) / col0 AS col1 FROM tab0 cor0
----
-85
-90
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4943
SELECT - col2 + - CAST( NULL AS SIGNED ) * - ( + col0 ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4943
SELECT - col2 + - CAST ( NULL AS INTEGER ) * - ( + col0 ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4944
SELECT - col2 + CAST( NULL AS SIGNED ) AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4944
SELECT - col2 + CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 75 AS col1 FROM tab2, tab0 AS cor0
----
75

query I rowsort
SELECT 13 * + col1 AS col2 FROM tab1
----
130
169
338

query I rowsort
SELECT DISTINCT 17 * col0 AS col2 FROM tab0
----
1513
408
595

query I rowsort
SELECT 20 + - col0 AS col2 FROM tab1
----
-44
-60
17

query I rowsort
SELECT - 48 - col1 FROM tab1
----
-58
-61
-74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - cor0.col0 ) col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT col1 * - col2 * col2 - tab1.col1 AS col0 FROM tab1
----
-119821
-32500
-75842

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2, tab1 AS cor0 WHERE NULL > ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4953
SELECT - col2 DIV - 41 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4953
SELECT - col2 / - 41 FROM tab2
----
0
0
0

query I rowsort
SELECT + col0 - col0 AS col0 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT + 52 * + col1 * col0 AS col1 FROM tab0
----
107328
176540
421148

query I rowsort
SELECT + - col1 + - col0 + col2 FROM tab2 AS cor0
----
-11
-111
-58

onlyif mysql # use DIV operator for integer division
query I rowsort label-4957
SELECT - + col2 + + col2 + 23 DIV col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4957
SELECT - + col2 + + col2 + 23 / col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT tab0.col0 * + col2 + + 63 FROM tab0
----
7361
855
98

query I rowsort
SELECT - - col0 * col2 + 36 + cor0.col2 FROM tab2 cor0
----
2090
252
3076

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - cor0.col2 + - col2 * - 46 * + col2 col1 FROM tab0 AS cor0
----
309222
45
50061

query I rowsort
SELECT + - cor0.col2 * col2 * col0 AS col2 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT cor0.col0 + + col0 + col1 AS col0 FROM tab0 AS cor0
----
134
167
269

query I rowsort
SELECT DISTINCT 18 + - col1 AS col0 FROM tab2 AS cor0
----
-13
-41
1

query I rowsort
SELECT DISTINCT - + 77 FROM tab0 cor0
----
-77

query I rowsort
SELECT + col0 + - col2 + - col1 AS col2 FROM tab2 cor0
----
-51
-7
24

query I rowsort
SELECT DISTINCT col0 + col2 * col1 AS col1 FROM tab1 cor0
----
1328
1407
634

query I rowsort
SELECT col1 + 14 FROM tab1
----
24
27
40

query I rowsort
SELECT tab2.col1 + 98 AS col0 FROM tab2
----
115
129
157

query I rowsort
SELECT ALL + 46 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 2f97924b57b73102233df7c9ce8ad602

query I rowsort
SELECT col2 + + 21 AS col0 FROM tab2 cor0
----
47
48
59

query I rowsort
SELECT col2 + 95 FROM tab2
----
121
122
133

query I rowsort
SELECT - 17 + 79 * tab0.col0 FROM tab0, tab1 AS cor0
----
9 values hashing to fa7ed97c25c4821485800c625bc5d67d

query I rowsort
SELECT DISTINCT ( col0 ) * cor0.col0 AS col2 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT - 23 * 38 AS col0 FROM tab1 cor0
----
-874

query I rowsort
SELECT DISTINCT - ( + col0 ) + tab0.col0 FROM tab0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4976
SELECT + - CAST( - col2 AS SIGNED ) DIV col2 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4976
SELECT + - CAST ( - col2 AS INTEGER ) / col2 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT ALL + - col2 * cor0.col0 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-4978
SELECT DISTINCT - + 22 DIV col2 AS col2 FROM tab0 AS cor0
----
-22
0

skipif mysql # not compatible
query I rowsort label-4978
SELECT DISTINCT - + 22 / col2 AS col2 FROM tab0 AS cor0
----
-22
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 82 col1 FROM tab2 cor0
----
82
82
82

query I rowsort
SELECT DISTINCT 20 AS col0 FROM tab0 cor0
----
20

query I rowsort
SELECT - 35 * cor0.col1 * + col0 FROM tab2 AS cor0
----
-161070
-47005
-7595

query I rowsort
SELECT DISTINCT cor0.col2 + + cor0.col2 * + col2 AS col0 FROM tab0 AS cor0
----
1122
2
6806

onlyif mysql # use DIV operator for integer division
query I rowsort label-4983
SELECT ALL + 23 DIV + 45 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4983
SELECT ALL + 23 / + 45 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + - ( cor0.col2 ) AS col0 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT + ( col2 ) + + col0 FROM tab1
----
121
176
57

query I rowsort
SELECT DISTINCT - - ( col0 ) * - col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL - ( col0 ) + + ( col1 ) FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT + ( + col2 ) * - col2 + 18 AS col0 FROM tab1 AS cor0
----
-2898
-3231
-9198

query I rowsort
SELECT ALL + col0 * col1 * + 59 + - col0 AS col2 FROM tab2 AS cor0
----
12796
271440
79158

query I rowsort
SELECT - + 34 * - col0 + col0 * + cor0.col0 FROM tab1 cor0
----
111
6272
9120

query I rowsort
SELECT ALL - 10 * col0 + - col0 AS col0 FROM tab2 AS cor0
----
-77
-858
-869

query I rowsort
SELECT DISTINCT + 86 * col0 AS col0 FROM tab0 AS cor0
----
2064
3010
7654

query I rowsort
SELECT ALL - - col1 + col1 AS col0 FROM tab1 cor0
----
20
26
52

query I rowsort
SELECT ALL + - col0 + 32 - col0 AS col1 FROM tab0 cor0
----
-146
-16
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 + - col2 col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT - col0 * ( + cor0.col2 ) + col0 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT DISTINCT + - col0 + + ( col1 ) + cor0.col1 * ( + cor0.col2 ) FROM tab1 AS cor0
----
1181
1427
516

onlyif mysql # use DIV operator for integer division
query I rowsort label-4998
SELECT 69 + + col0 DIV 69 FROM tab1
----
69
69
70

skipif mysql # not compatible
query I rowsort label-4998
SELECT 69 + + col0 / 69 FROM tab1
----
69
69
70

query I rowsort
SELECT ( cor0.col1 ) AS col0 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT DISTINCT - + col1 * - ( col0 ) FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT ALL + col2 * cor0.col2 AS col2 FROM tab0 AS cor0
----
1
1089
6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-5002
SELECT + cor0.col2 + 43 DIV col0 FROM tab0 AS cor0
----
2
34
82

skipif mysql # not compatible
query I rowsort label-5002
SELECT + cor0.col2 + 43 / col0 FROM tab0 AS cor0
----
2
34
82

query I rowsort
SELECT DISTINCT + - col1 + - 27 * col1 FROM tab2 AS cor0
----
-1652
-476
-868

query I rowsort
SELECT + col2 * col2 + - ( + col0 ) * - col1 FROM tab2 cor0
----
2787
5278
946

query I rowsort
SELECT + col0 + - col0 * - col2 AS col2 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT ALL - col0 * + 85 FROM tab0 AS cor0
----
-2040
-2975
-7565

query I rowsort
SELECT + col2 + col0 * + col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT DISTINCT + col1 * col0 * col0 AS col2 FROM tab1
----
234
40960
83200

onlyif mysql # use DIV operator for integer division
query I rowsort label-5009
SELECT DISTINCT + col2 DIV - 40 FROM tab1 AS cor0
----
-1
-2

skipif mysql # not compatible
query I rowsort label-5009
SELECT DISTINCT + col2 / - 40 FROM tab1 AS cor0
----
-1
-2

onlyif mysql # use DIV operator for integer division
query I rowsort label-5010
SELECT col0 + + col1 * col2 DIV col1 FROM tab0 AS cor0
----
171
36
57

skipif mysql # not compatible
query I rowsort label-5010
SELECT col0 + + col1 * col2 / col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT - col2 + ( + 21 * - col1 ) FROM tab1 AS cor0
----
-267
-369
-600

query I rowsort
SELECT cor0.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2, tab2 cor1, tab0, tab1 AS cor2
----
243 values hashing to c6425afc100dd55de8d45dec18c469ea

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5013
SELECT col2 / col1 + CAST( NULL AS SIGNED ) * col0 * col1 + col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5013
SELECT col2 / col1 + CAST ( NULL AS INTEGER ) * col0 * col1 + col2 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 37 - - col1 FROM tab2 AS cor0
----
-20
-6
22

query I rowsort
SELECT + col0 * - col1 + + col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT - + cor0.col0 * + col0 AS col1 FROM tab0 cor0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-5017
SELECT - 98 * + col1 - ( col0 ) DIV cor0.col1 FROM tab1 AS cor0
----
-1280
-2548
-986

skipif mysql # not compatible
query I rowsort label-5017
SELECT - 98 * + col1 - ( col0 ) / cor0.col1 FROM tab1 AS cor0
----
-1280
-2548
-986

query I rowsort
SELECT ALL 91 * - cor0.col2 AS col0 FROM tab2 AS cor0
----
-2366
-2457
-3458

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 15 col2 FROM tab1 cor0
----
15

query I rowsort
SELECT ALL ( + 49 * tab0.col0 ) + 71 AS col2 FROM tab0
----
1247
1786
4432

query I rowsort
SELECT DISTINCT col2 + + col2 * - col1 FROM tab1
----
-1152
-1350
-513

onlyif mysql # use DIV operator for integer division
query I rowsort label-5022
SELECT DISTINCT col1 * - col2 DIV tab0.col2 + 87 * - ( col0 ) FROM tab0
----
-2174
-3142
-7834

skipif mysql # not compatible
query I rowsort label-5022
SELECT DISTINCT col1 * - col2 / tab0.col2 + 87 * - ( col0 ) FROM tab0
----
-2174
-3142
-7834

query I rowsort
SELECT + col1 + col1 * + col2 AS col0 FROM tab2
----
1593
663
868

query I rowsort
SELECT ALL col1 * col1 * + ( 50 ) + tab1.col1 * - col1 FROM tab1
----
33124
4900
8281

query I rowsort
SELECT DISTINCT 46 + tab1.col1 AS col2 FROM tab1
----
56
59
72

query IIIIIIIII rowsort
SELECT * FROM tab0, tab1, tab1 AS cor0 WHERE NULL >= ( NULL )
----

query I rowsort
SELECT - 87 + + col2 * col1 * col1 AS col2 FROM tab2
----
10895
25860
90419

query I rowsort
SELECT - ( - 7 ) FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 4e72e9e33dacac757f48d0ce46094607

query I rowsort
SELECT DISTINCT - 50 * cor0.col2 * + 25 AS col1 FROM tab2 AS cor0
----
-32500
-33750
-47500

query I rowsort
SELECT col1 * + tab0.col0 * - col1 AS col0 FROM tab0
----
-177504
-329315
-737009

query I rowsort
SELECT DISTINCT - 87 * col0 FROM tab1
----
-261
-5568
-6960

query I rowsort
SELECT DISTINCT - 3 AS col2 FROM tab2, tab1 AS cor0
----
-3

onlyif mysql # use DIV operator for integer division
query I rowsort label-5033
SELECT + col2 DIV cor0.col0 AS col1 FROM tab2 AS cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-5033
SELECT + col2 / cor0.col0 AS col1 FROM tab2 AS cor0
----
0
0
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-5034
SELECT + col2 * + cor0.col1 DIV + col1 + + 41 FROM tab1 AS cor0
----
137
95
98

skipif mysql # not compatible
query I rowsort label-5034
SELECT + col2 * + cor0.col1 / + col1 + + 41 FROM tab1 AS cor0
----
137
95
98

query I rowsort
SELECT + - cor0.col0 * - 88 FROM tab1 AS cor0
----
264
5632
7040

query I rowsort
SELECT DISTINCT 13 * col0 AS col0 FROM tab2
----
1014
1027
91

query I rowsort
SELECT 82 + + col2 FROM tab2 AS cor0
----
108
109
120

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0, tab1 cor1, tab1, tab2 cor2
----
3645 values hashing to b6efe6f7ec1a3daa3cc6ea9dd7d13455

query I rowsort
SELECT - col2 * tab1.col0 + col1 * + col2 * col2 FROM tab1
----
112128
28842
75654

query I rowsort
SELECT ALL col2 * 48 FROM tab2
----
1248
1296
1824

query I rowsort
SELECT ALL - + col0 + col2 * - col0 * col2 FROM tab1 cor0
----
-208000
-737360
-8751

query I rowsort
SELECT - - 24 * cor0.col1 * - 77 AS col2 FROM tab2 AS cor0
----
-109032
-31416
-57288

query I rowsort
SELECT col0 * ( - col2 * + col0 + 22 ) FROM tab1
----
-232064
-420
-612640

query I rowsort
SELECT - col0 - + 37 AS col2 FROM tab0 AS cor0
----
-126
-61
-72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5045
SELECT + cor0.col0 * - CAST( NULL AS SIGNED ) - col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5045
SELECT + cor0.col0 * - CAST ( NULL AS INTEGER ) - col1 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 92 * + 27 AS col1 FROM tab0 AS cor0
----
-2484
-2484
-2484

query I rowsort
SELECT - col2 - cor0.col0 * - col2 * col2 AS col0 FROM tab1 cor0
----
207879
737184
8694

query I rowsort
SELECT - cor0.col1 * cor0.col1 + col0 * 11 AS col0 FROM tab1 AS cor0
----
-643
604
711

query I rowsort
SELECT 64 * - col1 + col0 * - ( ( - col1 ) ) AS col2 FROM tab1 AS cor0
----
-1586
0
208

query I rowsort
SELECT - + 68 + - col1 FROM tab0 AS cor0
----
-154
-159
-165

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5051
SELECT ALL + CAST( NULL AS SIGNED ) + cor0.col0 FROM tab1, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-5051
SELECT ALL + CAST ( NULL AS INTEGER ) + cor0.col0 FROM tab1, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL col1 + 33 AS col1 FROM tab0
----
119
124
130

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 37 + 58 col2 FROM tab2, tab0 AS cor0
----
9 values hashing to c5272facdaaa11f884c8cc0d9d4f41c7

query I rowsort
SELECT DISTINCT - col1 * col2 + - col0 FROM tab2 cor0
----
-1612
-725
-844

onlyif mysql # use DIV operator for integer division
query I rowsort label-5055
SELECT - col2 * + col1 + col0 DIV + col0 FROM tab0 cor0
----
-2837
-7461
-96

skipif mysql # not compatible
query I rowsort label-5055
SELECT - col2 * + col1 + col0 / + col0 FROM tab0 cor0
----
-2837
-7461
-96

query I rowsort
SELECT DISTINCT + col1 + ( + col2 + + 93 ) * - ( - col1 ) AS col2 FROM tab0
----
10922
16016
9215

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + 16 col1 FROM tab0 AS cor0
----
1424
384
560

query I rowsort
SELECT ALL - 31 * 10 + col1 AS col1 FROM tab0 cor0
----
-213
-219
-224

onlyif mysql # use DIV operator for integer division
query I rowsort label-5059
SELECT - col1 DIV 89 AS col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5059
SELECT - col1 / 89 AS col2 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL 80 + cor0.col2 * - col0 FROM tab0 cor0
----
-712
-7218
45

query I rowsort
SELECT DISTINCT + 76 * + cor0.col2 * cor0.col0 + + cor0.col0 AS col1 FROM tab2 AS cor0
----
14371
154206
228231

query I rowsort
SELECT ALL 43 * col0 - + col2 AS col0 FROM tab2 AS cor0
----
274
3328
3359

query I rowsort
SELECT + ( - col1 ) + col2 AS col2 FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT ALL 26 + - 18 - col0 FROM tab0 AS cor0
----
-16
-27
-81

query I rowsort
SELECT ALL + + cor0.col1 - + col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT + 82 * - 17 AS col2 FROM tab0
----
-1394
-1394
-1394

query I rowsort
SELECT + col2 * tab0.col2 - + col0 * - 16 AS col2 FROM tab0
----
1473
561
8148

query I rowsort
SELECT ALL - col2 + col0 * + col1 * 53 + col0 FROM tab2 AS cor0
----
11481
243958
71220

query I rowsort
SELECT - + cor0.col0 * - col1 + + 23 AS col2 FROM tab0 AS cor0
----
2087
3418
8122

query I rowsort
SELECT DISTINCT + col2 * + col1 - col0 AS col2 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT DISTINCT col1 * cor0.col2 + cor0.col1 * - col1 FROM tab1 AS cor0
----
1079
470
728

query I rowsort
SELECT + - 57 * - col0 AS col2 FROM tab0 AS cor0
----
1368
1995
5073

onlyif mysql # use DIV operator for integer division
query I rowsort label-5073
SELECT ALL col0 * - col1 * - col0 - col2 DIV col0 AS col0 FROM tab0
----
118825
49535
720811

skipif mysql # not compatible
query I rowsort label-5073
SELECT ALL col0 * - col1 * - col0 - col2 / col0 AS col0 FROM tab0
----
118825
49535
720811

query I rowsort
SELECT - col1 * - 86 FROM tab1
----
1118
2236
860

query I rowsort
SELECT - + col0 + - ( + col1 ) * - col2 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT ALL - col0 + + col1 + + col2 * + col0 * - 9 FROM tab0 AS cor0
----
-253
-65680
-7066

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5077
SELECT ALL - - cor0.col2 + + CAST( col0 AS SIGNED ) * col2 FROM tab0 AS cor0
----
36
7380
825

skipif mysql # not compatible
query I rowsort label-5077
SELECT ALL - - cor0.col2 + + CAST ( col0 AS INTEGER ) * col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT DISTINCT - col1 * + col1 * + ( + col2 ) FROM tab1 AS cor0
----
-16224
-36504
-5700

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5079
SELECT DISTINCT col0 * + CAST( 65 * - col0 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-3185
-395460
-405665

skipif mysql # not compatible
query I rowsort label-5079
SELECT DISTINCT col0 * + CAST ( 65 * - col0 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-3185
-395460
-405665

query I rowsort
SELECT - col2 * ( col1 ) AS col0 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT - col0 * + col0 + + col1 AS col0 FROM tab1
----
-4086
-6387
17

query I rowsort
SELECT ALL 57 * + col2 AS col2 FROM tab0
----
1881
4674
57

query I rowsort
SELECT - - col2 * - cor0.col0 + - col1 AS col2 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT ALL + col1 * - ( - col1 ) + col1 - cor0.col2 AS col1 FROM tab2 AS cor0
----
268
3514
965

query I rowsort
SELECT col0 * + col0 * ( col0 + col0 ) FROM tab1 cor0
----
1024000
524288
54

query I rowsort
SELECT DISTINCT - cor0.col2 * + col0 - + 44 AS col0 FROM tab2 AS cor0
----
-2072
-233
-3046

query I rowsort
SELECT + col2 * - col1 + - cor0.col1 AS col2 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT + 53 FROM tab0, tab2 AS cor0
----
9 values hashing to fede6033dee346dbd272085c05724fda

query I rowsort
SELECT col2 * - 39 + col2 * col2 FROM tab1
----
1026
5472
810

query I rowsort
SELECT DISTINCT col0 * + 52 FROM tab2
----
364
4056
4108

query I rowsort
SELECT - col0 + - 92 AS col2 FROM tab2
----
-170
-171
-99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5092
SELECT DISTINCT CAST( NULL AS SIGNED ) + + 28 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-5092
SELECT DISTINCT CAST ( NULL AS INTEGER ) + + 28 FROM tab1
----
NULL

query I rowsort
SELECT 48 * col1 * - col0 FROM tab1
----
-30720
-3744
-49920

query I rowsort
SELECT col2 + ( - col2 ) - 44 * col0 FROM tab2
----
-308
-3432
-3476

query I rowsort
SELECT + - 26 * cor0.col0 - col0 AS col0 FROM tab0 AS cor0
----
-2403
-648
-945

query I rowsort
SELECT DISTINCT 51 * col1 AS col2 FROM tab1 AS cor0
----
1326
510
663

query I rowsort
SELECT ALL + - col1 * + col1 * - col1 AS col2 FROM tab0 AS cor0
----
636056
753571
912673

query I rowsort
SELECT DISTINCT - ( col0 ) * - 55 AS col2 FROM tab0 AS cor0
----
1320
1925
4895

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5099
SELECT - + col1 + + col1 + CAST( + col1 + col2 * 82 AS SIGNED ) FROM tab0 cor0
----
179
2792
6815

skipif mysql # not compatible
query I rowsort label-5099
SELECT - + col1 + + col1 + CAST ( + col1 + col2 * 82 AS INTEGER ) FROM tab0 cor0
----
179
2792
6815

onlyif mysql # use DIV operator for integer division
query I rowsort label-5100
SELECT ALL col1 DIV - 39 + tab2.col1 * + ( 86 ) AS col2 FROM tab2
----
1462
2666
5073

skipif mysql # not compatible
query I rowsort label-5100
SELECT ALL col1 / - 39 + tab2.col1 * + ( 86 ) AS col2 FROM tab2
----
1462
2666
5073

query I rowsort
SELECT ALL - col1 * + col1 + col0 * tab2.col1 AS col1 FROM tab2
----
-744
1054
1121

query I rowsort
SELECT DISTINCT + 40 + 63 AS col2 FROM tab2
----
103

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5103
SELECT ALL - col1 * + col2 - + CAST( - 88 + col1 * + 71 AS SIGNED ) FROM tab0 AS cor0
----
-13835
-6896
-8856

skipif mysql # not compatible
query I rowsort label-5103
SELECT ALL - col1 * + col2 - + CAST ( - 88 + col1 * + 71 AS INTEGER ) FROM tab0 AS cor0
----
-13835
-6896
-8856

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5104
SELECT ALL col0 * col1 + + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5104
SELECT ALL col0 * col1 + + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 * + col2 * ( - col0 * col0 ) FROM tab2 AS cor0
----
-4031686
-41013
-9332856

query I rowsort
SELECT - + col0 + - cor0.col0 + - ( cor0.col0 ) * - col1 AS col1 FROM tab1 AS cor0
----
512
72
880

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 74 + col1 * col2 col1 FROM tab1 AS cor0
----
1322
1478
644

query I rowsort
SELECT + + col1 + + col1 * + 90 FROM tab0 AS cor0
----
7826
8281
8827

query I rowsort
SELECT + ( - col1 ) + - ( + col0 ) * - col2 FROM tab0 AS cor0
----
-62
706
7207

query I rowsort
SELECT DISTINCT - - col1 * col0 * col1 + - 24 * - col1 AS col0 FROM tab1 AS cor0
----
13832
2652
6640

query I rowsort
SELECT DISTINCT - - col1 * col0 - col2 FROM tab2 AS cor0
----
1305
190
4576

query I rowsort
SELECT 6 + - col2 AS col1 FROM tab2
----
-20
-21
-32

query I rowsort
SELECT col0 * - ( + col1 ) + - col0 FROM tab0 cor0
----
-2088
-3430
-8188

query I rowsort
SELECT col2 * col0 * + 21 AS col1 FROM tab1
----
161280
3402
76608

query I rowsort
SELECT DISTINCT - 82 * - col1 FROM tab0
----
7052
7462
7954

query I rowsort
SELECT ALL - 40 AS col1 FROM tab2 cor0
----
-40
-40
-40

query I rowsort
SELECT DISTINCT + col0 + - cor0.col1 * col2 * - col1 AS col2 FROM tab0 AS cor0
----
244092
679131
9444

query I rowsort
SELECT 44 * - col2 FROM tab2 AS cor0
----
-1144
-1188
-1672

query I rowsort
SELECT - col1 * - col2 + + col0 + col1 * - col0 AS col2 FROM tab2 AS cor0
----
-2990
-618
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-5120
SELECT col1 + + col1 DIV 82 + cor0.col2 * col0 * + CAST( col2 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
207946
737293
8774

skipif mysql # not compatible
query I rowsort label-5120
SELECT col1 + + col1 / 82 + cor0.col2 * col0 * + CAST ( col2 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
207946
737293
8774

query I rowsort
SELECT + 85 * col1 FROM tab2
----
1445
2635
5015

query I rowsort
SELECT - col0 + + cor0.col2 * 47 + - col0 * + col1 FROM tab2 AS cor0
----
-3458
1045
364

onlyif mysql # use DIV operator for integer division
query I rowsort label-5123
SELECT col2 + + col0 + col1 * col1 DIV col0 AS col0 FROM tab0 cor0
----
264
304
365

skipif mysql # not compatible
query I rowsort label-5123
SELECT col2 + + col0 + col1 * col1 / col0 AS col0 FROM tab0 cor0
----
264
304
365

query I rowsort
SELECT col0 + + col1 * 40 + cor0.col0 FROM tab2 AS cor0
----
1254
2516
838

query I rowsort
SELECT - col0 * - col1 + + col1 * col1 FROM tab0 AS cor0
----
12804
16380
9460

query I rowsort
SELECT + col0 * - cor0.col1 + - col1 * col1 * + col1 AS col0 FROM tab0 AS cor0
----
-638120
-761670
-916068

query I rowsort
SELECT col1 * 26 FROM tab2 AS cor0
----
1534
442
806

query I rowsort
SELECT DISTINCT + col0 + col1 + col0 * ( + col0 ) * col2 FROM tab2 AS cor0
----
1361
158321
237254

query I rowsort
SELECT DISTINCT - + col0 - - col2 AS col1 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT - ( - ( + col0 ) ) + + col2 * cor0.col0 AS col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT ALL + - ( + col0 ) + col2 AS col2 FROM tab1 AS cor0
----
-7
16
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5132
SELECT ( - col1 ) + - cor0.col1 * CAST( - cor0.col0 AS SIGNED ) FROM tab0 AS cor0
----
1978
3298
8008

skipif mysql # not compatible
query I rowsort label-5132
SELECT ( - col1 ) + - cor0.col1 * CAST ( - cor0.col0 AS INTEGER ) FROM tab0 AS cor0
----
1978
3298
8008

query I rowsort
SELECT + 53 * + col0 - col1 AS col2 FROM tab0 cor0
----
1186
1758
4626

query I rowsort
SELECT 6 * - col1 * + col2 FROM tab0 AS cor0
----
-17028
-44772
-582

query I rowsort
SELECT - + col1 + - col2 + cor0.col2 AS col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT - 58 * + 8 FROM tab2 AS cor0
----
-464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 + col0 * col0 col2 FROM tab0 AS cor0
----
1224
543
7839

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5138
SELECT + - ( - cor0.col1 ) - col2 * CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5138
SELECT + - ( - cor0.col1 ) - col2 * CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * col2 + cor0.col2 col1 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT ALL - 96 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to a7b3e5dd01c8929180b7ffda67f79798

query I rowsort
SELECT tab1.col2 * - ( + 29 + + col1 ) AS col1 FROM tab1
----
-2223
-2970
-4032

query I rowsort
SELECT - col2 + 56 * - col0 * col0 FROM tab1 AS cor0
----
-229433
-358496
-558

query I rowsort
SELECT DISTINCT - ( tab2.col2 ) + col1 * col1 * - col2 AS col2 FROM tab2
----
-11020
-25974
-90532

query I rowsort
SELECT ( col0 ) * - col2 - col0 AS col2 FROM tab1
----
-165
-3712
-7760

skipif mysql # not compatible
query I rowsort
SELECT + col0 + CAST ( col1 AS REAL ) AS col0 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5146
SELECT + col1 + CAST( NULL AS SIGNED ) / col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5146
SELECT + col1 + CAST ( NULL AS INTEGER ) / col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col0 * + cor2.col1 AS col2 FROM tab2, tab0 AS cor0, tab2 AS cor1, tab1, tab0 AS cor2
----
243 values hashing to d130c311b58029f951c0b2eaebe1238d

query I rowsort
SELECT 63 FROM tab2 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab1 cor2, tab2 AS cor3
----
243 values hashing to cd7f381a1d75f24a4c03ce92783f460f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5149
SELECT ALL + + col1 + + CAST( NULL AS SIGNED ) / col2 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5149
SELECT ALL + + col1 + + CAST ( NULL AS INTEGER ) / col2 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5150
SELECT col1 * 7 DIV - 2 AS col0 FROM tab2 AS cor0
----
-108
-206
-59

skipif mysql # not compatible
query I rowsort label-5150
SELECT col1 * 7 / - 2 AS col0 FROM tab2 AS cor0
----
-108
-206
-59

query I rowsort
SELECT DISTINCT + col2 * + cor0.col1 FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-5152
SELECT ALL - col0 * 11 * - ( - col1 * ( + col2 ) ) + - col1 DIV - 64 AS col1 FROM tab2 AS cor0
----
-1316172
-561374
-64449

skipif mysql # not compatible
query I rowsort label-5152
SELECT ALL - col0 * 11 * - ( - col1 * ( + col2 ) ) + - col1 / - 64 AS col1 FROM tab2 AS cor0
----
-1316172
-561374
-64449

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 43 * + col2 * cor0.col0 + - 93 * + 64 col0 FROM tab2 AS cor0
----
-135038
-14079
-93156

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * + cor0.col2 col1 FROM tab2 AS cor0
----
1444
676
729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * col2 + col0 * 62 col1 FROM tab0
----
12980
2267
4326

query I rowsort
SELECT DISTINCT ( - cor0.col1 ) * ( - 81 ) FROM tab2, tab2 cor0
----
1377
2511
4779

query I rowsort
SELECT ALL - col1 + + 76 FROM tab1
----
50
63
66

query I rowsort
SELECT DISTINCT + ( - 47 ) AS col0 FROM tab2 AS cor0
----
-47

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5159
SELECT ALL + - CAST( NULL AS SIGNED ) * - col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5159
SELECT ALL + - CAST ( NULL AS INTEGER ) * - col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 * + cor0.col0 + col2 * col1 col1 FROM tab2 AS cor0
----
-4550
-5595
788

onlyif mysql # use DIV operator for integer division
query I rowsort label-5161
SELECT - col1 * cor0.col0 - col0 DIV col2 FROM tab0 AS cor0
----
-2064
-3430
-8100

skipif mysql # not compatible
query I rowsort label-5161
SELECT - col1 * cor0.col0 - col0 / col2 FROM tab0 AS cor0
----
-2064
-3430
-8100

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5162
SELECT ALL + + CAST( NULL AS SIGNED ) * - col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5162
SELECT ALL + + CAST ( NULL AS INTEGER ) * - col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 2 * 59 col1 FROM tab2 cor0
----
118
118
118

query I rowsort
SELECT ALL - 93 * + ( + col2 ) AS col0 FROM tab0 AS cor0
----
-3069
-7626
-93

query I rowsort
SELECT + - col2 + col0 * ( - cor0.col1 ) AS col0 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT DISTINCT + - ( - col1 ) FROM tab0 cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5167
SELECT DISTINCT - + col0 + col1 DIV cor0.col1 FROM tab1 AS cor0
----
-2
-63
-79

skipif mysql # not compatible
query I rowsort label-5167
SELECT DISTINCT - + col0 + col1 / cor0.col1 FROM tab1 AS cor0
----
-2
-63
-79

query I rowsort
SELECT - col0 + + 36 AS col2 FROM tab2 AS cor0
----
-42
-43
29

query I rowsort
SELECT ALL + col1 * col0 + - cor0.col0 AS col0 FROM tab1 AS cor0
----
576
75
960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5170
SELECT + + col1 * CAST( col2 AS SIGNED ) FROM tab1 cor0
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-5170
SELECT + + col1 * CAST ( col2 AS INTEGER ) FROM tab1 cor0
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5171
SELECT DISTINCT - col0 * ( col0 ) + col1 * - CAST( 76 AS SIGNED ) FROM tab2 AS cor0
----
-10568
-2405
-7533

skipif mysql # not compatible
query I rowsort label-5171
SELECT DISTINCT - col0 * ( col0 ) + col1 * - CAST ( 76 AS INTEGER ) FROM tab2 AS cor0
----
-10568
-2405
-7533

query I rowsort
SELECT ALL - + col1 * col0 + col1 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT cor1.col1 FROM tab0, tab1 cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT DISTINCT - ( col0 + col0 ) FROM tab2
----
-14
-156
-158

query I rowsort
SELECT - 16 * - 4 + cor0.col0 FROM tab1 cor0
----
128
144
67

query I rowsort
SELECT DISTINCT - col1 + col1 AS col0 FROM tab0 cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5177
SELECT ALL - col0 DIV + 78 - - col0 FROM tab2 AS cor0
----
7
77
78

skipif mysql # not compatible
query I rowsort label-5177
SELECT ALL - col0 / + 78 - - col0 FROM tab2 AS cor0
----
7
77
78

query I rowsort
SELECT 52 + - col2 AS col1 FROM tab1
----
-2
-44
-5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 15 * + ( cor0.col1 ) + + ( col2 ) col2 FROM tab1 AS cor0
----
-336
-93
-99

query I rowsort
SELECT ALL + col2 + - col2 * col1 AS col0 FROM tab0 AS cor0
----
-2805
-7380
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5182
SELECT DISTINCT - CAST( NULL AS DECIMAL ) AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5182
SELECT DISTINCT - CAST ( NULL AS REAL ) AS col1 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * - col0 + - col0 col0 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT - + col1 * + col1 * + col0 + col1 * col2 * - col1 FROM tab2 AS cor0
----
-32674
-33813
-362024

query I rowsort
SELECT DISTINCT + col2 + cor0.col2 AS col1 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT 18 + + col1 AS col2 FROM tab2 AS cor0
----
35
49
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-5187
SELECT ALL 79 DIV + col1 + - col0 * ( + col1 + - col0 ) AS col1 FROM tab2
----
-166
1483
4902

skipif mysql # not compatible
query I rowsort label-5187
SELECT ALL 79 / + col1 + - col0 * ( + col1 + - col0 ) AS col1 FROM tab2
----
-166
1483
4902

query I rowsort
SELECT - col2 * - 94 AS col0 FROM tab1
----
5076
5358
9024

onlyif mysql # use DIV operator for integer division
query I rowsort label-5189
SELECT DISTINCT col1 DIV + 60 AS col2 FROM tab0 cor0
----
1

skipif mysql # not compatible
query I rowsort label-5189
SELECT DISTINCT col1 / + 60 AS col2 FROM tab0 cor0
----
1

query I rowsort
SELECT - col1 * + ( col2 ) AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL + col1 + 34 * 65 AS col2 FROM tab0 AS cor0
----
2296
2301
2307

query I rowsort
SELECT - col1 - + 71 * + col0 AS col1 FROM tab1 AS cor0
----
-239
-4554
-5693

query I rowsort
SELECT DISTINCT + col1 * 13 * + ( - col1 ) + 5 AS col1 FROM tab0 AS cor0
----
-107648
-122312
-96143

query I rowsort
SELECT ALL - col0 * 97 + + col1 - - col0 FROM tab0 AS cor0
----
-2218
-3263
-8453

query I rowsort
SELECT + + col2 + + 39 * col2 AS col1 FROM tab1 cor0
----
2160
2280
3840

query I rowsort
SELECT + col2 + - 56 * + 72 AS col1 FROM tab0 AS cor0
----
-3950
-3999
-4031

query I rowsort
SELECT ALL - col2 * 68 + - col0 FROM tab0 cor0
----
-103
-2268
-5665

query I rowsort
SELECT - 20 + col2 AS col1 FROM tab2
----
18
6
7

query I rowsort
SELECT ALL - + col2 - 79 FROM tab1 AS cor0
----
-133
-136
-175

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 + + ( col0 ) * cor0.col2 col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT DISTINCT + col2 + ( - col1 + tab1.col2 ) * col1 FROM tab1
----
1175
527
782

query I rowsort
SELECT - col1 * + ( - col1 ) + + col1 AS col0 FROM tab1 AS cor0
----
110
182
702

query I rowsort
SELECT ALL - col2 + cor0.col1 * - col1 FROM tab0 cor0
----
-7429
-8363
-9410

query I rowsort
SELECT DISTINCT cor0.col2 * ( - col1 ) AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-5205
SELECT ALL + col0 DIV cor0.col0 + - col0 AS col0 FROM tab1 AS cor0
----
-2
-63
-79

skipif mysql # not compatible
query I rowsort label-5205
SELECT ALL + col0 / cor0.col0 + - col0 AS col0 FROM tab1 AS cor0
----
-2
-63
-79

query I rowsort
SELECT - - 24 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to b0d834ef9e4346801b6aaa0e74b2c8ef

query I rowsort
SELECT - col0 * col1 + + col2 * col0 * 83 FROM tab1 cor0
----
13368
302144
636400

query I rowsort
SELECT DISTINCT tab2.col0 + 49 * tab2.col0 AS col0 FROM tab2
----
350
3900
3950

query I rowsort
SELECT DISTINCT - 48 AS col2 FROM tab1, tab2 cor0, tab1 cor1
----
-48

query I rowsort
SELECT - - 40 * col0 - + col0 AS col1 FROM tab1 AS cor0
----
117
2496
3120

query I rowsort
SELECT col2 - - cor0.col2 AS col2 FROM tab1 AS cor0
----
108
114
192

onlyif mysql # use DIV operator for integer division
query I rowsort label-5212
SELECT 1 * col2 + cor0.col2 DIV - 57 col1 FROM tab2 cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5212
SELECT 1 * col2 + cor0.col2 / - 57 col1 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT - col2 * - 86 + 6 FROM tab0
----
2844
7058
92

query I rowsort
SELECT + cor0.col2 + - 30 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to ed22eb52f3df52e357f360edf5fa023b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5215
SELECT - CAST( + col0 AS SIGNED ) * - col1 * - 41 col2 FROM tab1 cor0
----
-26240
-3198
-42640

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5215
SELECT - CAST ( + col0 AS INTEGER ) * - col1 * - 41 col2 FROM tab1 cor0
----
-26240
-3198
-42640

query I rowsort
SELECT + col2 + ( cor0.col0 ) * cor0.col0 * - cor0.col1 + - cor0.col0 FROM tab2 AS cor0
----
-106138
-1499
-359008

query I rowsort
SELECT + + col1 - + 51 * col0 AS col0 FROM tab1 cor0
----
-127
-3254
-4067

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5218
SELECT DISTINCT + - CAST( NULL AS SIGNED ) * col1 + + col1 * + 26 AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5218
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) * col1 + + col1 * + 26 AS col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT 71 * 96 + - col0 AS col1 FROM tab0 AS cor0
----
6727
6781
6792

query I rowsort
SELECT DISTINCT 48 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
48

query I rowsort
SELECT DISTINCT 81 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
81

query I rowsort
SELECT + col0 * - col1 * 84 + + col2 FROM tab0
----
-173343
-285179
-680234

query I rowsort
SELECT col1 * - cor0.col2 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT + 11 * col1 FROM tab1 AS cor0
----
110
143
286

onlyif mysql # use DIV operator for integer division
query I rowsort label-5225
SELECT - col2 DIV col1 + col1 FROM tab2 AS cor0
----
15
31
59

skipif mysql # not compatible
query I rowsort label-5225
SELECT - col2 / col1 + col1 FROM tab2 AS cor0
----
15
31
59

query I rowsort
SELECT ALL + - cor0.col2 * - col2 * + col2 AS col1 FROM tab2 cor0
----
17576
19683
54872

onlyif mysql # use DIV operator for integer division
query I rowsort label-5227
SELECT DISTINCT tab0.col2 DIV - col1 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-5227
SELECT DISTINCT tab0.col2 / - col1 FROM tab0
----
0

query I rowsort
SELECT DISTINCT + + col2 * cor0.col2 * - col1 FROM tab1 cor0
----
-119808
-32490
-75816

query I rowsort
SELECT - - 29 * - col2 AS col2 FROM tab2 AS cor0
----
-1102
-754
-783

query I rowsort
SELECT DISTINCT col2 + - col2 * col2 AS col2 FROM tab1 AS cor0
----
-2862
-3192
-9120

query I rowsort
SELECT DISTINCT + 85 * + col2 * - ( col0 ) - col2 * + ( col0 ) AS col0 FROM tab1 AS cor0
----
-13932
-313728
-660480

query I rowsort
SELECT ALL + 51 + - col1 AS col0 FROM tab1 AS cor0
----
25
38
41

query I rowsort
SELECT ALL + + cor0.col2 + col0 * col0 FROM tab0 AS cor0
----
1226
609
8003

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 93 col2 FROM tab1 AS cor0
----
-93
-93
-93

query I rowsort
SELECT ALL col1 * + col1 + + col0 + + 98 * + col2 FROM tab0 cor0
----
10654
16406
9542

query I rowsort
SELECT DISTINCT - col1 + 28 - - col1 * - col0 FROM tab2 cor0
----
-1332
-220
-4633

query I rowsort
SELECT - + col2 - ( col1 * + cor0.col0 ) FROM tab1 cor0
----
-1136
-132
-697

query I rowsort
SELECT DISTINCT col2 * cor0.col0 + + 21 * col2 AS col1 FROM tab0 AS cor0
----
1485
56
9020

query I rowsort
SELECT ALL - col1 + + col2 + - col0 AS col2 FROM tab1 AS cor0
----
-17
25
3

query I rowsort
SELECT - col1 + 35 AS col2 FROM tab2 AS cor0
----
-24
18
4

query I rowsort
SELECT ALL - - col0 + ( - col0 ) * + cor0.col0 * - col2 FROM tab1 AS cor0
----
233536
489
614480

query I rowsort
SELECT 43 * - col1 AS col1 FROM tab2 AS cor0
----
-1333
-2537
-731

onlyif mysql # use DIV operator for integer division
query I rowsort label-5243
SELECT ALL - - 30 DIV - col0 AS col2 FROM tab1 cor0
----
-10
0
0

skipif mysql # not compatible
query I rowsort label-5243
SELECT ALL - - 30 / - col0 AS col2 FROM tab1 cor0
----
-10
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 67 col0 FROM tab2, tab2 AS cor0
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

query I rowsort
SELECT - ( + ( + col1 ) ) * ( col1 ) FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL + col0 * + 76 AS col1 FROM tab0
----
1824
2660
6764

query I rowsort
SELECT ALL cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT ALL + ( tab0.col1 + - col1 ) * + col0 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL ( - tab1.col2 + - col0 ) * + ( col1 ) AS col2 FROM tab1
----
-1210
-1482
-2288

query I rowsort
SELECT ( - 72 ) FROM tab1
----
-72
-72
-72

onlyif mysql # use DIV operator for integer division
query I rowsort label-5251
SELECT tab2.col0 DIV + 13 - + col2 * - col1 FROM tab2
----
1540
652
837

skipif mysql # not compatible
query I rowsort label-5251
SELECT tab2.col0 / + 13 - + col2 * - col1 FROM tab2
----
1540
652
837

query I rowsort
SELECT - 76 * - col0 * - col2 AS col1 FROM tab0 AS cor0
----
-2660
-554648
-60192

onlyif mysql # use DIV operator for integer division
query I rowsort label-5253
SELECT - col1 + col2 DIV - col1 AS col0 FROM tab2 AS cor0
----
-19
-31
-59

skipif mysql # not compatible
query I rowsort label-5253
SELECT - col1 + col2 / - col1 AS col0 FROM tab2 AS cor0
----
-19
-31
-59

query I rowsort
SELECT ( + col1 ) * cor0.col1 * col0 FROM tab2 AS cor0
----
22831
271518
6727

query I rowsort
SELECT col0 * + col1 * + col2 + col0 AS col0 FROM tab1
----
36544
4215
99920

onlyif mysql # use DIV operator for integer division
query I rowsort label-5256
SELECT col1 + - tab0.col0 DIV 68 AS col0 FROM tab0
----
86
90
97

skipif mysql # not compatible
query I rowsort label-5256
SELECT col1 + - tab0.col0 / 68 AS col0 FROM tab0
----
86
90
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5257
SELECT ALL + 35 DIV 36 - cor0.col1 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

skipif mysql # not compatible
query I rowsort label-5257
SELECT ALL + 35 / 36 - cor0.col1 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT ALL - col2 * col2 + col1 * - col0 FROM tab0
----
-14823
-3153
-3396

query I rowsort
SELECT DISTINCT - col0 + 5 FROM tab0
----
-19
-30
-84

query I rowsort
SELECT DISTINCT col2 * + col0 + tab1.col0 * + tab1.col2 AS col1 FROM tab1
----
15360
324
7296

query I rowsort
SELECT + cor0.col0 * col0 + + ( col0 + - cor0.col1 ) * col0 FROM tab2 AS cor0
----
-119
11139
7566

query I rowsort
SELECT DISTINCT + cor0.col0 + col0 * + col1 FROM tab0 cor0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-5263
SELECT - + col1 + - 86 DIV - col0 FROM tab0 AS cor0
----
-83
-91
-95

skipif mysql # not compatible
query I rowsort label-5263
SELECT - + col1 + - 86 / - col0 FROM tab0 AS cor0
----
-83
-91
-95

query I rowsort
SELECT - 25 + - col2 AS col1 FROM tab2 AS cor0
----
-51
-52
-63

query I rowsort
SELECT 15 + + cor0.col2 AS col0 FROM tab2 AS cor0
----
41
42
53

query I rowsort
SELECT DISTINCT col2 * - 83 + - col0 AS col0 FROM tab1 AS cor0
----
-4485
-4795
-8048

query I rowsort
SELECT - - 66 + col2 * + col2 AS col2 FROM tab0 AS cor0
----
1155
67
6790

query I rowsort
SELECT ALL + col0 + - col1 * - col0 * + col2 AS col0 FROM tab2 cor0
----
119730
51113
5866

query I rowsort
SELECT - ( + cor0.col2 ) AS col2 FROM tab1 cor0
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5270
SELECT DISTINCT col2 DIV 98 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-5270
SELECT DISTINCT col2 / 98 FROM tab0
----
0

query I rowsort
SELECT DISTINCT + - 40 * 4 FROM tab1 cor0
----
-160

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( + col2 ) + - col1 * 97 col1 FROM tab1 AS cor0
----
-1165
-2468
-913

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + + 50 col2 FROM tab2 cor0
----
-9
19
33

query I rowsort
SELECT + col1 * col1 + + col1 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col1 AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( 53 ) * cor0.col2 + ( + 2 ) col0 FROM tab0 AS cor0
----
1751
4348
55

query I rowsort
SELECT DISTINCT - 29 * col0 + - ( col0 ) * + col1 FROM tab1
----
-165
-2496
-3360

query I rowsort
SELECT + - col0 * ( cor0.col1 ) * col2 - ( - ( - col2 ) ) AS col0 FROM tab1 AS cor0
----
-36537
-4266
-99936

query I rowsort
SELECT 44 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to ab2bc2b9f8baa300df7755e5980a319d

query I rowsort
SELECT ALL - + col0 * cor0.col1 + - 66 AS col0 FROM tab0 AS cor0
----
-2130
-3461
-8165

query I rowsort
SELECT DISTINCT 89 FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
89

query I rowsort
SELECT - - col2 * col1 + - col0 + + col0 * 31 AS col0 FROM tab2 AS cor0
----
1047
3016
3874

query I rowsort
SELECT - cor0.col0 + + col2 + + col2 FROM tab1 AS cor0
----
105
112
50

query I rowsort
SELECT DISTINCT + 41 AS col2 FROM tab2, tab2 cor0, tab1 AS cor1, tab1, tab0 AS cor2
----
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 * col0 * + col2 col2 FROM tab1 cor0
----
233472
486
614400

query I rowsort
SELECT + + col1 * + col1 + col1 + col2 AS col0 FROM tab1 AS cor0
----
167
278
756

query I rowsort
SELECT tab1.col2 + - tab1.col2 * col2 * + col1 FROM tab1
----
-119712
-32433
-75762

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( + 37 AS REAL ) FROM tab2 AS cor0
----
37
37
37

query I rowsort
SELECT DISTINCT - ( + col1 ) * - col1 FROM tab1
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-5290
SELECT ALL CAST( - col1 AS SIGNED ) DIV + col0 AS col1 FROM tab2
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-5290
SELECT ALL CAST ( - col1 AS INTEGER ) / + col0 AS col1 FROM tab2
----
-4
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5291
SELECT DISTINCT CAST( 77 AS SIGNED ) FROM tab1 AS cor0
----
77

skipif mysql # not compatible
query I rowsort label-5291
SELECT DISTINCT CAST ( 77 AS INTEGER ) FROM tab1 AS cor0
----
77

query I rowsort
SELECT + col1 + - ( cor0.col1 ) * - 66 FROM tab2 AS cor0
----
1139
2077
3953

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5293
SELECT DISTINCT + - 89 + ( col0 ) / - CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5293
SELECT DISTINCT + - 89 + ( col0 ) / - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + + 45 AS col2 FROM tab0 cor0
----
45
45
45

query I rowsort
SELECT - 3 + - col1 * + 71 * 50 AS col1 FROM tab0 cor0
----
-305303
-323053
-344353

onlyif mysql # use DIV operator for integer division
query I rowsort label-5296
SELECT ALL + + 4 * col2 DIV 35 FROM tab0 AS cor0
----
0
3
9

skipif mysql # not compatible
query I rowsort label-5296
SELECT ALL + + 4 * col2 / 35 FROM tab0 AS cor0
----
0
3
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-5297
SELECT DISTINCT - 59 * col2 + col0 + col0 DIV col2 col1 FROM tab0 AS cor0
----
-1923
-4748
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5297
SELECT DISTINCT - 59 * col2 + col0 + col0 / col2 col1 FROM tab0 AS cor0
----
-1923
-4748
11

query I rowsort
SELECT ( + col2 ) + col0 * + 42 AS col2 FROM tab0
----
1041
1471
3820

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5299
SELECT CAST( col1 AS SIGNED ) - + col1 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5299
SELECT CAST ( col1 AS INTEGER ) - + col1 FROM tab2
----
0
0
0

query I rowsort
SELECT + - 32 * col1 FROM tab0 AS cor0
----
-2752
-2912
-3104

query I rowsort
SELECT - cor0.col0 + cor0.col2 * col1 AS col0 FROM tab2 AS cor0
----
1456
567
830

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5302
SELECT ALL - col0 + - CAST( NULL AS SIGNED ) * + col2 + - col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5302
SELECT ALL - col0 + - CAST ( NULL AS INTEGER ) * + col2 + - col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5303
SELECT - + col1 * CAST( - ( col2 ) AS SIGNED ) AS col1 FROM tab0 cor0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-5303
SELECT - + col1 * CAST ( - ( col2 ) AS INTEGER ) AS col1 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT - + col2 * + 89 FROM tab1 cor0
----
-4806
-5073
-8544

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab1, tab2 cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

onlyif mysql # use DIV operator for integer division
query I rowsort label-5306
SELECT ALL 54 DIV tab1.col2 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5306
SELECT ALL 54 / tab1.col2 FROM tab1
----
0
0
1

query I rowsort
SELECT 62 * - col1 AS col0 FROM tab1 AS cor0
----
-1612
-620
-806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - 32 ) col0 FROM tab2 AS cor0
----
-32
-32
-32

query I rowsort
SELECT + - 88 + 17 FROM tab1 AS cor0
----
-71
-71
-71

query I rowsort
SELECT ALL col2 * 23 FROM tab2
----
598
621
874

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5311
SELECT CAST( - 20 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-20
-20
-20

skipif mysql # not compatible
query I rowsort label-5311
SELECT CAST ( - 20 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-20
-20
-20

query I rowsort
SELECT DISTINCT - - ( 2 ) FROM tab2 AS cor0
----
2

query I rowsort
SELECT DISTINCT + - col1 + col0 * - col0 FROM tab2 cor0
----
-6143
-6258
-80

query I rowsort
SELECT ALL + ( + 28 ) * - cor0.col1 FROM tab1 AS cor0
----
-280
-364
-728

query I rowsort
SELECT ALL + col0 + - 52 * col2 FROM tab2 cor0
----
-1274
-1397
-1897

query I rowsort
SELECT 96 AS col2 FROM tab2, tab1 cor0, tab1 AS cor1
----
27 values hashing to f1d978c2d5bfc6f26e0907ac777be83e

query I rowsort
SELECT DISTINCT tab0.col2 * - ( + ( col0 ) ) FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT - + col1 + ( col1 ) AS col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT + col0 + 85 FROM tab1 AS cor0
----
149
165
88

query I rowsort
SELECT - col1 - - 54 FROM tab0
----
-32
-37
-43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( - col2 ) col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT + col2 + col0 * cor0.col2 AS col1 FROM tab0 AS cor0
----
36
7380
825

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 + col1 col1 FROM tab1 AS cor0
----
29
74
93

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( + cor0.col1 AS REAL ) AS col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT + ( + col0 ) + + col2 * col1 FROM tab0
----
132
2862
7551

query I rowsort
SELECT ALL - - 59 AS col0 FROM tab0 AS cor0
----
59
59
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-5327
SELECT DISTINCT + 66 * col2 + col2 DIV + 9 + 31 FROM tab0 AS cor0
----
2212
5452
97

skipif mysql # not compatible
query I rowsort label-5327
SELECT DISTINCT + 66 * col2 + col2 / + 9 + 31 FROM tab0 AS cor0
----
2212
5452
97

query I rowsort
SELECT DISTINCT + 29 * + col1 FROM tab1 cor0
----
290
377
754

query I rowsort
SELECT DISTINCT - + 6 * col2 * col1 AS col2 FROM tab1 AS cor0
----
-3420
-7488
-8424

onlyif mysql # use DIV operator for integer division
query I rowsort label-5330
SELECT ALL - col2 * 66 DIV - col2 AS col2 FROM tab1 AS cor0
----
66
66
66

skipif mysql # not compatible
query I rowsort label-5330
SELECT ALL - col2 * 66 / - col2 AS col2 FROM tab1 AS cor0
----
66
66
66

query I rowsort
SELECT + col2 * col1 + - col2 AS col2 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT col0 + - col2 * col1 AS col0 FROM tab2 cor0
----
-1456
-567
-830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 92 + - col0 - - 5 col2 FROM tab0 cor0
----
62
73
8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5334
SELECT DISTINCT - col1 + col0 * - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5334
SELECT DISTINCT - col1 + col0 * - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL - ( cor0.col1 ) * + col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + col1 + - cor0.col1 * + col1 FROM tab2 cor0
----
-272
-3422
-930

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5337
SELECT + 57 + col2 + CAST( col0 AS SIGNED ) * col0 AS col1 FROM tab2 AS cor0
----
133
6167
6336

skipif mysql # not compatible
query I rowsort label-5337
SELECT + 57 + col2 + CAST ( col0 AS INTEGER ) * col0 AS col1 FROM tab2 AS cor0
----
133
6167
6336

onlyif mysql # use DIV operator for integer division
query I rowsort label-5338
SELECT + + col1 + - col1 DIV - ( col0 ) FROM tab0 AS cor0
----
89
92
99

skipif mysql # not compatible
query I rowsort label-5338
SELECT + + col1 + - col1 / - ( col0 ) FROM tab0 AS cor0
----
89
92
99

query I rowsort
SELECT - 55 + + col1 AS col0 FROM tab0 AS cor0
----
31
36
42

query I rowsort
SELECT DISTINCT cor0.col1 * 39 FROM tab0 AS cor0
----
3354
3549
3783

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5341
SELECT ALL + col1 / + CAST( NULL AS DECIMAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5341
SELECT ALL + col1 / + CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 + ( - 46 ) AS col2 FROM tab0 cor0
----
-11
-22
43

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT + 7 + 38 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 60b9f935ee8e404d155a2f5e9515c050

query I rowsort
SELECT ALL - col2 + - col1 * - 30 * col0 FROM tab1 AS cor0
----
19143
2286
31104

query I rowsort
SELECT ALL + 71 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 95a6ff35b7b8f00868fb58bcaa32d0c2

onlyif mysql # use DIV operator for integer division
query I rowsort label-5347
SELECT DISTINCT col2 + col0 DIV - 15 + - cor0.col2 FROM tab2 cor0
----
-5
0

skipif mysql # not compatible
query I rowsort label-5347
SELECT DISTINCT col2 + col0 / - 15 + - cor0.col2 FROM tab2 cor0
----
-5
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - col2 + col2 col0 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT DISTINCT - col0 * - col0 + col1 * col1 * col2 FROM tab1 cor0
----
22624
36513
9796

query I rowsort
SELECT DISTINCT + cor0.col0 * - 62 + col0 * + col2 * - col0 FROM tab2 cor0
----
-163020
-1757
-242056

query I rowsort
SELECT ALL col1 + ( cor0.col2 ) AS col2 FROM tab0 AS cor0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * ( 39 ) + col2 col0 FROM tab2 AS cor0
----
300
3068
3119

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + col2 * col0 col2 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT - - 33 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 76da8bc7cae18ecf856438f872430c80

query I rowsort
SELECT + col0 + ( + col0 ) * col0 AS col0 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT DISTINCT + cor0.col0 * + ( col1 ) AS col0 FROM tab2 AS cor0
----
1343
217
4602

skipif mysql # not compatible
query I rowsort
SELECT + col1 + - CAST ( - 29 AS REAL ) FROM tab0 AS cor0
----
115
120
126

query I rowsort
SELECT DISTINCT - col1 * + col1 + - col0 AS col0 FROM tab1
----
-164
-249
-679

query I rowsort
SELECT ALL + 65 * cor0.col0 FROM tab2 AS cor0
----
455
5070
5135

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 51 col0 FROM tab2, tab1 AS cor0
----
51

query I rowsort
SELECT - col1 * col0 + + col1 * col2 * 95 AS col0 FROM tab2
----
141128
60027
79298

query I rowsort
SELECT DISTINCT - tab0.col0 AS col0 FROM tab2, tab0 cor0 CROSS JOIN tab0
----
-24
-35
-89

query I rowsort
SELECT ALL 54 FROM tab0, tab2 cor0
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

query I rowsort
SELECT + col0 + - col0 * + cor0.col1 * cor0.col0 AS col2 FROM tab2 AS cor0
----
-106018
-1512
-358878

query I rowsort
SELECT DISTINCT - col2 + col1 * ( 7 ) FROM tab1 AS cor0
----
-5
128
13

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5366
SELECT ALL - CAST( NULL AS SIGNED ) / + ( col2 + 83 ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5366
SELECT ALL - CAST ( NULL AS INTEGER ) / + ( col2 + 83 ) FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5367
SELECT - 24 + tab2.col0 * CAST( + 85 AS SIGNED ) FROM tab2
----
571
6606
6691

skipif mysql # not compatible
query I rowsort label-5367
SELECT - 24 + tab2.col0 * CAST ( + 85 AS INTEGER ) FROM tab2
----
571
6606
6691

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5368
SELECT 47 + col0 / CAST( NULL AS SIGNED ) + 69 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5368
SELECT 47 + col0 / CAST ( NULL AS INTEGER ) + 69 AS col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - + cor0.col1 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT ALL cor0.col2 - 63 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 132773094435f4defca86f7358c594ff

query I rowsort
SELECT ALL ( col1 ) + - ( 54 ) AS col2 FROM tab1 AS cor0
----
-28
-41
-44

query I rowsort
SELECT ALL + ( - col2 ) + ( - 43 * - col0 ) FROM tab0 AS cor0
----
1504
3745
999

query I rowsort
SELECT ALL + col0 + - col2 * col2 FROM tab2 AS cor0
----
-1365
-598
-722

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( cor0.col2 ) * + 21 - + col2 col1 FROM tab2 AS cor0
----
520
540
760

query I rowsort
SELECT ALL - 49 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to adfccb10c9468825d9961e3613140f89

query I rowsort
SELECT 29 * + col1 FROM tab0 AS cor0
----
2494
2639
2813

query I rowsort
SELECT + 8 * + cor0.col1 FROM tab0 cor0
----
688
728
776

query I rowsort
SELECT ( 57 * + cor0.col0 ) FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 05d7e84f099ee76457f3fcca689ab5f4

onlyif mysql # use DIV operator for integer division
query I rowsort label-5379
SELECT ALL - col1 DIV col0 + + col0 FROM tab0
----
21
33
88

skipif mysql # not compatible
query I rowsort label-5379
SELECT ALL - col1 / col0 + + col0 FROM tab0
----
21
33
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-5380
SELECT DISTINCT - col2 + + tab0.col0 DIV - col1 AS col2 FROM tab0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-5380
SELECT DISTINCT - col2 + + tab0.col0 / - col1 AS col2 FROM tab0
----
-1
-33
-82

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT NULL BETWEEN + col1 AND col2
----

query I rowsort
SELECT DISTINCT tab1.col0 - - col2 * col0 FROM tab1
----
165
3712
7760

query I rowsort
SELECT - col2 + + col0 * col2 + 21 * col0 FROM tab1
----
171
4935
9264

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 66 + 71 col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 3da972573ade226d84f9191d39b85e4a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * cor0.col2 col0 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT - 1 AS col1 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 84da757b1b7b0069ce25607f39bc08d9

query I rowsort
SELECT ALL + tab2.col1 + + tab2.col1 FROM tab2 WHERE col1 + - col0 <> + col1 / col0
----
118
34
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col1 col1 FROM tab2
----
289
3481
961

query I rowsort
SELECT DISTINCT - col1 * - col1 - + col2 FROM tab2
----
251
3455
934

query I rowsort
SELECT ALL col0 * tab0.col0 * - col1 AS col1 FROM tab0
----
-118825
-49536
-720811

query I rowsort
SELECT DISTINCT - tab1.col0 * - tab1.col0 AS col2 FROM tab1
----
4096
6400
9

query I rowsort
SELECT ALL - col0 - col1 AS col1 FROM tab2
----
-137
-38
-96

query I rowsort
SELECT col2 FROM tab0 AS cor0 WHERE NULL <> NULL
----

query I rowsort
SELECT - col2 * - col0 + col2 * + cor0.col0 * - col2 FROM tab2 AS cor0
----
-111074
-4914
-50700

query I rowsort
SELECT ALL + col2 * - col0 - - col2 * + col1 AS col0 FROM tab2
----
-2356
-494
648

query I rowsort
SELECT col1 * col2 + - col2 * col1 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 col0 FROM tab2 WHERE NULL < NULL
----

query I rowsort
SELECT - tab0.col1 * + col1 * + col1 FROM tab0
----
-636056
-753571
-912673

query I rowsort
SELECT DISTINCT col0 * col1 - col0 * col0 AS col1 FROM tab0
----
1488
178
2170

onlyif mysql # use DIV operator for integer division
query I rowsort label-5400
SELECT col1 + - col1 DIV col0 FROM tab2
----
17
27
59

skipif mysql # not compatible
query I rowsort label-5400
SELECT col1 + - col1 / col0 FROM tab2
----
17
27
59

query I rowsort
SELECT DISTINCT col1 * + tab0.col2 AS col0 FROM tab0 WHERE NOT NULL BETWEEN ( col1 ) AND ( + col2 * col2 )
----

query I rowsort
SELECT col0 + col1 + - col1 FROM tab2
----
7
78
79

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL >= - col1
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5404
SELECT ALL col1 + tab0.col1 DIV col2 FROM tab0
----
194
88
92

skipif mysql # not compatible
query I rowsort label-5404
SELECT ALL col1 + tab0.col1 / col2 FROM tab0
----
194
88
92

query I rowsort
SELECT ALL ( - cor0.col1 ) AS col0 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

onlyif mysql # use DIV operator for integer division
query I rowsort label-5406
SELECT + 51 DIV col0 + + col1 AS col2 FROM tab2 AS cor0
----
17
38
59

skipif mysql # not compatible
query I rowsort label-5406
SELECT + 51 / col0 + + col1 AS col2 FROM tab2 AS cor0
----
17
38
59

query I rowsort
SELECT DISTINCT col1 - col0 AS col0 FROM tab0 AS cor0
----
2
62

query I rowsort
SELECT ( col0 ) * + col2 * col0 AS col2 FROM tab2 cor0
----
1323
158184
237158

onlyif mysql # use DIV operator for integer division
query I rowsort label-5409
SELECT col1 + + col0 DIV ( 29 ) AS col1 FROM tab2 AS cor0
----
19
31
61

skipif mysql # not compatible
query I rowsort label-5409
SELECT col1 + + col0 / ( 29 ) AS col1 FROM tab2 AS cor0
----
19
31
61

query I rowsort
SELECT - ( - col0 ) * - col1 AS col2 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT + col2 * + 56 FROM tab0 AS cor0
----
1848
4592
56

query I rowsort
SELECT col0 * + 56 FROM tab1 AS cor0
----
168
3584
4480

query I rowsort
SELECT col1 * - col2 + col2 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT DISTINCT + - col2 + + col0 * 55 * + col1 AS col2 FROM tab1 AS cor0
----
35143
4236
57104

query I rowsort
SELECT ALL - col0 + ( col1 ) * - col0 FROM tab2 AS cor0
----
-1422
-224
-4680

onlyif mysql # use DIV operator for integer division
query I rowsort label-5416
SELECT ALL cor0.col2 - + 72 * col2 DIV - cor0.col2 FROM tab0 AS cor0
----
105
154
73

skipif mysql # not compatible
query I rowsort label-5416
SELECT ALL cor0.col2 - + 72 * col2 / - cor0.col2 FROM tab0 AS cor0
----
105
154
73

query I rowsort
SELECT + - cor0.col0 * 45 - + col0 FROM tab1 AS cor0
----
-138
-2944
-3680

query I rowsort
SELECT ALL + 92 + + tab1.col0 FROM tab1
----
156
172
95

query I rowsort
SELECT col0 - + col2 * col0 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT - - cor0.col2 + - col0 * + 65 AS col2 FROM tab1 cor0
----
-141
-4103
-5104

query I rowsort
SELECT col2 * col1 * + col2 + tab0.col0 * col0 * - 85 AS col2 FROM tab0
----
-104028
-61401
44694

query I rowsort
SELECT DISTINCT col1 * - col0 + + col0 FROM tab0
----
-2040
-3360
-8010

query I rowsort
SELECT + col1 + 19 AS col0 FROM tab0 AS cor0
----
105
110
116

query I rowsort
SELECT + 48 * col0 FROM tab0
----
1152
1680
4272

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5425
SELECT DISTINCT + CAST( NULL AS DECIMAL ) / + col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-5425
SELECT DISTINCT + CAST ( NULL AS REAL ) / + col0 FROM tab0
----
NULL

query I rowsort
SELECT - ( - tab0.col2 ) * - tab0.col0 AS col2 FROM tab0
----
-35
-7298
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 53 col1 FROM tab0 AS cor0
----
53
53
53

query I rowsort
SELECT DISTINCT + + col1 + cor0.col0 AS col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT + - 81 + col0 * - col0 AS col0 FROM tab1 AS cor0
----
-4177
-6481
-90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5430
SELECT CAST( 97 AS SIGNED ) - col2 AS col1 FROM tab1
----
1
40
43

skipif mysql # not compatible
query I rowsort label-5430
SELECT CAST ( 97 AS INTEGER ) - col2 AS col1 FROM tab1
----
1
40
43

query I rowsort
SELECT 57 * + col1 - - col0 FROM tab1
----
1485
634
821

query I rowsort
SELECT DISTINCT col1 + 13 + col0 FROM tab0
----
123
145
193

query I rowsort
SELECT ALL 19 * col1 + - col0 FROM tab0
----
1610
1640
1808

query I rowsort
SELECT col2 * + 46 FROM tab1
----
2484
2622
4416

query I rowsort
SELECT + tab1.col1 * - ( col1 ) * col1 AS col1 FROM tab1
----
-1000
-17576
-2197

query I rowsort
SELECT ALL col1 * - col0 * - col1 + + col2 * - col1 * col2 AS col0 FROM tab2
----
-15872
-1717
231634

query I rowsort
SELECT DISTINCT - col2 + - cor0.col2 * + col2 * + col2 AS col2 FROM tab1 AS cor0
----
-157518
-185250
-884832

query I rowsort
SELECT DISTINCT - - col1 * col1 - + col0 FROM tab1 AS cor0
----
36
673
89

query I rowsort
SELECT ALL - - cor0.col2 + - col0 * cor0.col2 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT ALL + col2 * + 51 FROM tab0
----
1683
4182
51

query I rowsort
SELECT + 9 AS col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 03b93b53107e36cf7d524e48c509b17b

query I rowsort
SELECT + col1 + - ( + cor0.col0 ) + col2 AS col1 FROM tab2 AS cor0
----
-24
51
7

query I rowsort
SELECT - - col2 + - col2 + 54 * col2 FROM tab0 cor0
----
1782
4428
54

query I rowsort
SELECT - cor0.col0 + col1 * 48 AS col1 FROM tab1 AS cor0
----
1245
416
544

onlyif mysql # use DIV operator for integer division
query I rowsort label-5445
SELECT - - col0 DIV 86 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5445
SELECT - - col0 / 86 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5446
SELECT ALL - col1 - - 2 DIV 1 AS col2 FROM tab2
----
-15
-29
-57

skipif mysql # not compatible
query I rowsort label-5446
SELECT ALL - col1 - - 2 / 1 AS col2 FROM tab2
----
-15
-29
-57

query I rowsort
SELECT + - col0 - 12 * col2 * + col0 FROM tab0 AS cor0
----
-455
-87665
-9528

onlyif mysql # use DIV operator for integer division
query I rowsort label-5448
SELECT - - ( - 86 ) + + col2 DIV + col1 - col0 DIV - cor0.col2 AS col0 FROM tab0 AS cor0
----
-51
-85
-86

skipif mysql # not compatible
query I rowsort label-5448
SELECT - - ( - 86 ) + + col2 / + col1 - col0 / - cor0.col2 AS col0 FROM tab0 AS cor0
----
-51
-85
-86

query I rowsort
SELECT ALL 67 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5450
SELECT + CAST( NULL AS SIGNED ) * col0 + - col2 + + cor0.col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5450
SELECT + CAST ( NULL AS INTEGER ) * col0 + - col2 + + cor0.col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 + + col2 + col1 FROM tab0 AS cor0
----
133
143
262

query I rowsort
SELECT col0 + 79 AS col1 FROM tab2 cor0
----
157
158
86

query I rowsort
SELECT DISTINCT + 81 * + 29 AS col0 FROM tab1 AS cor0
----
2349

onlyif mysql # use DIV operator for integer division
query I rowsort label-5454
SELECT + col1 DIV + col1 - + cor0.col1 FROM tab2 AS cor0
----
-16
-30
-58

skipif mysql # not compatible
query I rowsort label-5454
SELECT + col1 / + col1 - + cor0.col1 FROM tab2 AS cor0
----
-16
-30
-58

query I rowsort
SELECT ALL cor0.col1 + col1 * - col2 AS col2 FROM tab1 AS cor0
----
-1235
-1378
-560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col2 + + col1 col0 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT cor0.col1 + + col2 - cor0.col2 FROM tab2 AS cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col1 col2 FROM tab2 WHERE NOT ( NULL ) >= NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5459
SELECT DISTINCT - col2 + col1 DIV col1 AS col0 FROM tab1 AS cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-5459
SELECT DISTINCT - col2 + col1 / col1 AS col0 FROM tab1 AS cor0
----
-53
-56
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col2 * cor0.col0 + + col1 + col2 col2 FROM tab2 AS cor0
----
-131
-1943
-2947

query I rowsort
SELECT + - col0 * + col0 - col2 AS col1 FROM tab2 AS cor0
----
-6110
-6279
-76

query I rowsort
SELECT col2 * - col2 * cor0.col0 - + col0 AS col2 FROM tab1 AS cor0
----
-208000
-737360
-8751

query I rowsort
SELECT DISTINCT - - cor0.col1 + cor0.col2 * + col2 * + col1 FROM tab2 AS cor0
----
22630
24565
39943

query I rowsort
SELECT DISTINCT - + col1 - - cor0.col1 * + col0 * col1 FROM tab2 cor0
----
22814
271459
6696

query I rowsort
SELECT + - col1 + col2 - - col1 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT - col0 * col1 + - cor0.col1 * + col0 - col1 AS col0 FROM tab2 AS cor0
----
-2703
-465
-9263

query I rowsort
SELECT DISTINCT + cor0.col0 * + col2 + col0 * - col0 AS col1 FROM tab2 cor0
----
-3239
-4056
140

query I rowsort
SELECT ALL + cor0.col0 * + cor0.col0 + - cor0.col2 AS col2 FROM tab0 AS cor0
----
1224
543
7839

onlyif mysql # use DIV operator for integer division
query I rowsort label-5469
SELECT ALL + col1 * - col0 DIV + col0 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-5469
SELECT ALL + col1 * - col0 / + col0 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ALL cor0.col0 * - col2 + + col1 AS col1 FROM tab1 cor0
----
-136
-3638
-7667

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + col2 * + col0 col1 FROM tab1
----
136
3638
7667

query I rowsort
SELECT ALL + col1 + col0 * + col2 FROM tab2
----
2087
220
3019

query I rowsort
SELECT DISTINCT + + col2 * + col0 * col2 AS col0 FROM tab2 AS cor0
----
114076
5103
52728

onlyif mysql # use DIV operator for integer division
query I rowsort label-5474
SELECT - col0 DIV tab1.col0 - col1 FROM tab1
----
-11
-14
-27

skipif mysql # not compatible
query I rowsort label-5474
SELECT - col0 / tab1.col0 - col1 FROM tab1
----
-11
-14
-27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * col0 + + col2 col2 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT col0 - + col1 AS col2 FROM tab0 cor0
----
-2
-62
-62

query I rowsort
SELECT col0 * - col0 + - col1 AS col1 FROM tab2 AS cor0
----
-6143
-6258
-80

query I rowsort
SELECT - tab2.col2 * col2 + col2 AS col0 FROM tab2
----
-1406
-650
-702

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL IN ( tab2.col2 * + col0 + col0 * col1 - + tab2.col0 ) AND NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT - col1 + col1 * - col1 * + col1 FROM tab1
----
-1010
-17602
-2210

onlyif mysql # use DIV operator for integer division
query I rowsort label-5481
SELECT col2 + col0 DIV - col0 AS col0 FROM tab0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-5481
SELECT col2 + col0 / - col0 AS col0 FROM tab0
----
0
32
81

query I rowsort
SELECT DISTINCT + col1 * ( 23 * - col0 ) AS col1 FROM tab0 AS cor0
----
-186277
-47472
-78085

query I rowsort
SELECT ALL col0 + cor0.col1 + 3 AS col1 FROM tab0 AS cor0
----
113
135
183

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 + - ( col2 ) col0 FROM tab0 AS cor0
----
-171
-36
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col1 + - col2 * + col2 col1 FROM tab2 AS cor0
----
-1461
-735
-760

query I rowsort
SELECT 73 * col1 AS col0 FROM tab1 AS cor0
----
1898
730
949

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 87 col2 FROM tab0, tab1 AS cor0
----
-87

query I rowsort
SELECT - ( 3 ) AS col0 FROM tab1 AS cor0
----
-3
-3
-3

query I rowsort
SELECT ALL + col2 * col0 * - col2 FROM tab0
----
-26136
-35
-598436

query I rowsort
SELECT - col2 * 1 * - col1 FROM tab0
----
2838
7462
97

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 CROSS JOIN tab1, tab0 cor1
----
243 values hashing to 74e36edda45186a5c45856859d8e21f0

query I rowsort
SELECT ALL - 68 * + 65 FROM tab1, tab1 AS cor0
----
9 values hashing to 1cf5c1134eeb77e2ff5593e948dcf7c9

query I rowsort
SELECT + cor0.col2 + - col2 * 69 FROM tab2 AS cor0
----
-1768
-1836
-2584

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5494
SELECT col2 + col2 * - CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5494
SELECT col2 + col2 * - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - cor0.col2 * - col2 + + col1 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT DISTINCT + cor0.col2 * col2 + + 26 FROM tab1 AS cor0
----
2942
3275
9242

query I rowsort
SELECT 40 + col2 * col1 AS col2 FROM tab2
----
1574
686
877

query I rowsort
SELECT ALL - ( - col2 + col0 ) FROM tab1
----
-7
16
51

query I rowsort
SELECT + ( + col2 ) * ( + col2 ) FROM tab1
----
2916
3249
9216

query I rowsort
SELECT - col1 * + cor0.col0 + col0 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT + cor0.col0 FROM tab0, tab2, tab2 AS cor0, tab2 AS cor1
----
81 values hashing to 05835f29dd9cd4fa16889de54dec3cb6

query I rowsort
SELECT ALL - col1 * col2 + 61 * col0 AS col0 FROM tab0 AS cor0
----
-1374
-2033
2038

query I rowsort
SELECT DISTINCT - 89 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
-89

query I rowsort
SELECT col1 - + ( + cor0.col2 ) FROM tab1 AS cor0
----
-28
-47
-83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5505
SELECT + col2 * CAST( NULL AS SIGNED ) * col2 + + col1 * - col2 - + col2 col1 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5505
SELECT + col2 * CAST ( NULL AS INTEGER ) * col2 + + col1 * - col2 - + col2 col1 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5506
SELECT ALL col2 + CAST( NULL AS DECIMAL ) * col0 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5506
SELECT ALL col2 + CAST ( NULL AS REAL ) * col0 AS col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL tab1.col0 + + 0 * - ( col0 ) AS col0 FROM tab1
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * 24 * tab2.col2 col2 FROM tab2
----
15504
20088
36816

query I rowsort
SELECT + tab0.col2 * - cor0.col0 AS col0 FROM tab0, tab2 cor0
----
9 values hashing to a3b44b1349b97a64e1970dbe00e8d983

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5510
SELECT + col1 * - ( col0 ) + CAST( NULL AS SIGNED ) * 62 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5510
SELECT + col1 * - ( col0 ) + CAST ( NULL AS INTEGER ) * 62 FROM tab2 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5511
SELECT + ( col1 ) DIV + col1 FROM tab2 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5511
SELECT + ( col1 ) / + col1 FROM tab2 cor0
----
1
1
1

query I rowsort
SELECT DISTINCT - - ( - col0 ) * - col0 * 46 FROM tab1 cor0
----
188416
294400
414

query I rowsort
SELECT - 94 + col1 + col1 FROM tab0 AS cor0
----
100
78
88

query I rowsort
SELECT - col1 + - col0 * col1 * col0 AS col0 FROM tab1 AS cor0
----
-260
-40970
-83213

onlyif mysql # use DIV operator for integer division
query I rowsort label-5515
SELECT + col1 * col2 DIV col0 + col1 * - col0 + + col2 FROM tab0 AS cor0
----
-1913
-3392
-7934

skipif mysql # not compatible
query I rowsort label-5515
SELECT + col1 * col2 / col0 + col1 * - col0 + + col2 FROM tab0 AS cor0
----
-1913
-3392
-7934

query I rowsort
SELECT - 87 + col0 AS col0 FROM tab1 AS cor0
----
-23
-7
-84

query I rowsort
SELECT col1 - col0 * - col0 FROM tab2 AS cor0
----
6143
6258
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * - col2 * - 26 col1 FROM tab2 AS cor0
----
-16796
-21762
-39884

query I rowsort
SELECT + col1 * col2 + - 69 FROM tab1 AS cor0
----
1179
1335
501

onlyif mysql # use DIV operator for integer division
query I rowsort label-5520
SELECT 18 DIV + col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5520
SELECT 18 / + col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT col2 * - col2 * col0 + - ( col2 ) * - 46 - + col0 * cor0.col2 * - col1 FROM tab1 AS cor0
----
-168834
-2052
-633024

query I rowsort
SELECT ALL col1 * - 85 + + col0 + - ( 72 ) AS col2 FROM tab1 AS cor0
----
-1097
-2279
-858

query I rowsort
SELECT ALL + col1 * + col0 + cor0.col2 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT 80 + - cor0.col2 FROM tab1 AS cor0
----
-16
23
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-5525
SELECT ALL ( col1 ) + col0 * 18 DIV 31 - + cor0.col2 FROM tab2 AS cor0
----
24
78
8

skipif mysql # not compatible
query I rowsort label-5525
SELECT ALL ( col1 ) + col0 * 18 / 31 - + cor0.col2 FROM tab2 AS cor0
----
24
78
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-5526
SELECT ( + col1 ) DIV cor0.col0 AS col2 FROM tab2 AS cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-5526
SELECT ( + col1 ) / cor0.col0 AS col2 FROM tab2 AS cor0
----
0
0
4

query I rowsort
SELECT 15 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

query I rowsort
SELECT DISTINCT 74 + + 27 AS col2 FROM tab2, tab1 AS cor0
----
101

query I rowsort
SELECT - + col0 - 95 FROM tab2 AS cor0
----
-102
-173
-174

query I rowsort
SELECT DISTINCT + ( - col2 ) + + col0 + - col0 * col2 FROM tab0 AS cor0
----
-1
-7291
-801

query I rowsort
SELECT DISTINCT - ( - 51 ) * cor0.col2 * col1 - - col2 AS col0 FROM tab2 AS cor0
----
32984
42714
78260

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5532
SELECT DISTINCT CAST( NULL AS DECIMAL ) * - 18 + + cor0.col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5532
SELECT DISTINCT CAST ( NULL AS REAL ) * - 18 + + cor0.col0 FROM tab0 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5533
SELECT ALL CAST( NULL AS SIGNED ) * col0 * + col0 + + ( + col2 ) * + col2 / 57 - col2 AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5533
SELECT ALL CAST ( NULL AS INTEGER ) * col0 * + col0 + + ( + col2 ) * + col2 / 57 - col2 AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5534
SELECT + CAST( NULL AS SIGNED ) + col1 + col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5534
SELECT + CAST ( NULL AS INTEGER ) + col1 + col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 * + col2 + + ( + col2 ) FROM tab1 cor0
----
-2862
-3192
-9120

query I rowsort
SELECT ALL + - 71 * col0 FROM tab2 AS cor0
----
-497
-5538
-5609

query I rowsort
SELECT - + col0 * cor0.col1 + ( - 89 * - col2 ) AS col0 FROM tab2 AS cor0
----
-2288
2039
2186

query I rowsort
SELECT DISTINCT col1 + + col0 * + cor0.col0 AS col2 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT ALL col1 + col0 * + col0 + col2 FROM tab2
----
107
6169
6296

query I rowsort
SELECT ALL - ( 16 ) * - tab0.col2 + col0 + col2 FROM tab0
----
1483
52
585

query I rowsort
SELECT 59 * col2 AS col1 FROM tab1
----
3186
3363
5664

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 - cor0.col0 * + 92 col0 FROM tab0 AS cor0
----
-2122
-3123
-8097

onlyif mysql # use DIV operator for integer division
query I rowsort label-5543
SELECT DISTINCT col0 - + ( - col1 ) DIV col1 AS col0 FROM tab2 AS cor0
----
79
8
80

skipif mysql # not compatible
query I rowsort label-5543
SELECT DISTINCT col0 - + ( - col1 ) / col1 AS col0 FROM tab2 AS cor0
----
79
8
80

query I rowsort
SELECT DISTINCT + col1 * 53 * + 84 FROM tab2 AS cor0
----
138012
262668
75684

query I rowsort
SELECT ALL col0 + 1 + col1 * col2 FROM tab2 AS cor0
----
1613
726
845

query I rowsort
SELECT DISTINCT col1 * 87 + + ( col0 ) + 9 * col0 AS col0 FROM tab1 AS cor0
----
1510
1931
2292

query I rowsort
SELECT ALL + col2 - - col2 AS col1 FROM tab0 AS cor0
----
164
2
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * - ( - col0 ) col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL + col0 - ( 5 ) AS col0 FROM tab2 cor0
----
2
73
74

query I rowsort
SELECT ALL + 73 * + tab1.col1 AS col1 FROM tab1
----
1898
730
949

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - col0 * 29 col1 FROM tab1
----
-1846
-2307
-61

query I rowsort
SELECT ALL + 75 * col2 AS col1 FROM tab2
----
1950
2025
2850

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 * + ( col0 ) + cor0.col1 col0 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT ALL - 46 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 5a5d45989dcc6a06d9ee5a08945518f9

query I rowsort
SELECT + + 25 + 74 * + col1 FROM tab0 AS cor0
----
6389
6759
7203

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - tab0.col2 ) col2 FROM tab2, tab1 cor0 CROSS JOIN tab0
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT DISTINCT - - 65 FROM tab1 cor0
----
65

query I rowsort
SELECT - 30 - col0 FROM tab2 AS cor0
----
-108
-109
-37

query I rowsort
SELECT ALL - 49 - + cor0.col0 * + 7 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 563ee1801cf6ad2e9fde4f44a348ae1f

query I rowsort
SELECT + + 38 * col1 AS col1 FROM tab1 AS cor0
----
380
494
988

query I rowsort
SELECT ALL - ( col2 ) * - col0 + - 9 * + 95 FROM tab1 AS cor0
----
-693
2793
6825

query I rowsort
SELECT DISTINCT cor0.col2 - 99 AS col1 FROM tab1 cor0
----
-3
-42
-45

query I rowsort
SELECT + col0 + 17 * + col2 FROM tab1 AS cor0
----
1033
1712
921

query I rowsort
SELECT ALL - ( + col0 ) * + col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT col0 + col2 * + col2 AS col0 FROM tab1
----
2919
3313
9296

query I rowsort
SELECT DISTINCT + + ( cor1.col2 ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
54
57
96

query I rowsort
SELECT + 95 + - col1 AS col0 FROM tab1
----
69
82
85

query I rowsort
SELECT col0 * col0 * 98 + col0 AS col0 FROM tab1 AS cor0
----
401472
627280
885

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 48 * col2 col2 FROM tab0 AS cor0
----
-1584
-3936
-48

onlyif mysql # use DIV operator for integer division
query I rowsort label-5570
SELECT - col0 DIV + cor0.col1 + + col1 FROM tab2 AS cor0
----
13
31
58

skipif mysql # not compatible
query I rowsort label-5570
SELECT - col0 / + cor0.col1 + + col1 FROM tab2 AS cor0
----
13
31
58

query I rowsort
SELECT DISTINCT - + ( col2 ) * 14 + cor0.col0 AS col0 FROM tab1 AS cor0
----
-1264
-734
-753

onlyif mysql # use DIV operator for integer division
query I rowsort label-5572
SELECT ALL + + 67 DIV col2 FROM tab0 cor0
----
0
2
67

skipif mysql # not compatible
query I rowsort label-5572
SELECT ALL + + 67 / col2 FROM tab0 cor0
----
0
2
67

query I rowsort
SELECT ALL - cor0.col1 * + col0 * col0 AS col1 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT - col2 * - col0 + + cor0.col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT DISTINCT 33 * - col1 + col1 FROM tab1 AS cor0
----
-320
-416
-832

query I rowsort
SELECT + + cor0.col2 * + col0 * col2 FROM tab1 AS cor0
----
207936
737280
8748

query I rowsort
SELECT ALL - + col1 * 79 * - col1 FROM tab1 AS cor0
----
13351
53404
7900

query I rowsort
SELECT DISTINCT - ( col2 ) * col0 AS col1 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT col1 + 92 * - cor0.col2 FROM tab2 AS cor0
----
-2333
-2453
-3479

query I rowsort
SELECT DISTINCT + col1 + + 90 * col1 FROM tab2 AS cor0
----
1547
2821
5369

onlyif mysql # use DIV operator for integer division
query I rowsort label-5581
SELECT - col1 DIV - 29 + col2 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-5581
SELECT - col1 / - 29 + col2 col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT + + 49 + - col2 AS col1 FROM tab0 AS cor0
----
-33
16
48

query I rowsort
SELECT DISTINCT - col2 * cor0.col1 + + col1 AS col1 FROM tab2 AS cor0
----
-1475
-629
-806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + col1 col0 FROM tab2 cor0
----
118
34
62

query I rowsort
SELECT DISTINCT + ( col0 ) * col0 + - 74 + + col1 FROM tab0 AS cor0
----
1248
588
7938

onlyif mysql # use DIV operator for integer division
query I rowsort label-5586
SELECT ALL + - col1 + 16 * col2 DIV + 10 AS col0 FROM tab0 AS cor0
----
-34
-96
40

skipif mysql # not compatible
query I rowsort label-5586
SELECT ALL + - col1 + 16 * col2 / + 10 AS col0 FROM tab0 AS cor0
----
-34
-96
40

query I rowsort
SELECT ALL col1 * + 18 + col1 FROM tab1 AS cor0
----
190
247
494

query I rowsort
SELECT col1 * + col0 * - col2 FROM tab0 cor0
----
-3395
-664118
-68112

query I rowsort
SELECT - 47 + - col0 AS col2 FROM tab1 AS cor0
----
-111
-127
-50

query I rowsort
SELECT ( cor0.col0 ) FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5591
SELECT ALL CAST( NULL AS DECIMAL ) + tab2.col1 * + col2 * + col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5591
SELECT ALL CAST ( NULL AS REAL ) + tab2.col1 * + col2 * + col1 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5592
SELECT DISTINCT tab1.col0 DIV col0 + - col0 AS col1 FROM tab1
----
-2
-63
-79

skipif mysql # not compatible
query I rowsort label-5592
SELECT DISTINCT tab1.col0 / col0 + - col0 AS col1 FROM tab1
----
-2
-63
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5593
SELECT ALL + + col1 * - CAST( NULL AS SIGNED ) + 78 * + col2 * + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5593
SELECT ALL + + col1 * - CAST ( NULL AS INTEGER ) + 78 * + col2 * + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 52 FROM tab2, tab0 AS cor0
----
9 values hashing to 7f4ae30893ab330784829711032ae599

query I rowsort
SELECT DISTINCT - + cor0.col0 * ( col2 ) + + col1 + + col0 * col1 AS col2 FROM tab2 AS cor0
----
-1642
2633
59

query I rowsort
SELECT + col0 * + col2 + - col1 * col2 FROM tab1 AS cor0
----
-1242
3078
6432

onlyif mysql # use DIV operator for integer division
query I rowsort label-5597
SELECT col0 * + col2 * tab2.col1 + tab2.col2 DIV - tab2.col1 AS col2 FROM tab2
----
119652
51032
5859

skipif mysql # not compatible
query I rowsort label-5597
SELECT col0 * + col2 * tab2.col1 + tab2.col2 / - tab2.col1 AS col2 FROM tab2
----
119652
51032
5859

query I rowsort
SELECT - col0 * + col1 * - 91 FROM tab0 AS cor0
----
187824
308945
737009

query I rowsort
SELECT + col0 - 34 * 91 FROM tab0
----
-3005
-3059
-3070

query I rowsort
SELECT - + col0 * col0 + col1 * + col0 * - ( col2 ) AS col2 FROM tab0 AS cor0
----
-4620
-672039
-68688

query I rowsort
SELECT + ( + cor0.col0 ) - col2 FROM tab0 AS cor0
----
-9
34
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5602
SELECT ALL - col1 + CAST( NULL AS SIGNED ) AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5602
SELECT ALL - col1 + CAST ( NULL AS INTEGER ) AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - tab0.col0 AS col2 FROM tab0, tab1, tab2 AS cor0
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-5604
SELECT ALL + col0 + col0 DIV + col1 AS col1 FROM tab2
----
7
79
83

skipif mysql # not compatible
query I rowsort label-5604
SELECT ALL + col0 + col0 / + col1 AS col1 FROM tab2
----
7
79
83

query I rowsort
SELECT DISTINCT col2 + + col2 + tab2.col1 * col0 AS col1 FROM tab2
----
1419
271
4654

query I rowsort
SELECT - col2 * + 55 FROM tab0
----
-1815
-4510
-55

onlyif mysql # use DIV operator for integer division
query I rowsort label-5607
SELECT - ( - ( col0 ) ) + - col2 DIV col1 AS col1 FROM tab1 AS cor0
----
1
59
73

skipif mysql # not compatible
query I rowsort label-5607
SELECT - ( - ( col0 ) ) + - col2 / col1 AS col1 FROM tab1 AS cor0
----
1
59
73

query I rowsort
SELECT + cor0.col0 FROM tab2, tab0 cor0, tab0 cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5609
SELECT - - CAST( NULL AS SIGNED ) * col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5609
SELECT - - CAST ( NULL AS INTEGER ) * col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 55 + cor0.col2 * + cor0.col0 col0 FROM tab1 AS cor0
----
217
3703
7735

onlyif mysql # use DIV operator for integer division
query I rowsort label-5611
SELECT + - col0 * 55 DIV col1 + col1 AS col0 FROM tab2 AS cor0
----
-13
-238
19

skipif mysql # not compatible
query I rowsort label-5611
SELECT + - col0 * 55 / col1 + col1 AS col0 FROM tab2 AS cor0
----
-13
-238
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 31 col2 FROM tab1, tab1 AS cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

query I rowsort
SELECT DISTINCT - 56 AS col0 FROM tab1, tab0 cor0
----
-56

query I rowsort
SELECT DISTINCT + col1 * + col1 + + cor0.col0 AS col2 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT - col2 * + 91 FROM tab1
----
-4914
-5187
-8736

query I rowsort
SELECT + ( col1 ) * - col0 - - 66 AS col0 FROM tab2
----
-1277
-151
-4536

onlyif mysql # use DIV operator for integer division
query I rowsort label-5617
SELECT + 50 DIV + 68 AS col0 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5617
SELECT + 50 / + 68 AS col0 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + 61 col1 FROM tab2 AS cor0
----
-1037
-1891
-3599

query I rowsort
SELECT tab1.col2 AS col1 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT ALL - - cor0.col2 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT - col1 * + ( col2 ) + - col0 FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT + cor0.col1 * + ( col0 ) FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT 97 + + col2 AS col1 FROM tab0
----
130
179
98

query I rowsort
SELECT DISTINCT - 13 - 27 FROM tab1, tab1 cor0, tab2 AS cor1
----
-40

onlyif mysql # use DIV operator for integer division
query I rowsort label-5625
SELECT + col1 DIV col2 - - col0 * + col1 AS col0 FROM tab1
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-5625
SELECT + col1 / col2 - - col0 * + col1 AS col0 FROM tab1
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-5626
SELECT DISTINCT + 44 DIV col2 AS col2 FROM tab1 cor0
----
0

skipif mysql # not compatible
query I rowsort label-5626
SELECT DISTINCT + 44 / col2 AS col2 FROM tab1 cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5627
SELECT + ( + col0 ) DIV - ( col0 ) FROM tab0 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5627
SELECT + ( + col0 ) / - ( col0 ) FROM tab0 cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 75 + + cor0.col0 col1 FROM tab1 AS cor0
----
139
155
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-5629
SELECT ALL - + col2 DIV + col2 + - cor0.col1 AS col2 FROM tab1 AS cor0
----
-11
-14
-27

skipif mysql # not compatible
query I rowsort label-5629
SELECT ALL - + col2 / + col2 + - cor0.col1 AS col2 FROM tab1 AS cor0
----
-11
-14
-27

query I rowsort
SELECT col0 + cor0.col1 * col0 + col1 AS col1 FROM tab1 AS cor0
----
107
1133
714

query I rowsort
SELECT ALL - + cor0.col1 * col0 AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT - cor0.col2 * 38 AS col1 FROM tab2 AS cor0
----
-1026
-1444
-988

query I rowsort
SELECT - + cor0.col0 * - col1 + col1 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT ALL - col1 * - col2 * - col1 FROM tab0 AS cor0
----
-244068
-679042
-9409

query I rowsort
SELECT - - col2 * 17 AS col2 FROM tab2 AS cor0
----
442
459
646

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5636
SELECT ALL - cor0.col1 * - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5636
SELECT ALL - cor0.col1 * - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col1 * 59 * col1 FROM tab1 AS cor0
----
39884
5900
9971

query I rowsort
SELECT - + cor0.col1 * + col1 - 44 FROM tab0 AS cor0
----
-7440
-8325
-9453

query I rowsort
SELECT - + cor0.col1 AS col1 FROM tab1, tab2, tab2 cor0
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT ALL 58 * col0 - - col0 * col1 FROM tab1
----
252
4352
5680

query I rowsort
SELECT 7 - - tab1.col1 AS col0 FROM tab1
----
17
20
33

query I rowsort
SELECT DISTINCT col0 * col0 + col0 - col0 AS col2 FROM tab2
----
49
6084
6241

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5643
SELECT DISTINCT - col1 + CAST( + col2 + col2 AS SIGNED ) * - col0 FROM tab1 AS cor0
----
-15373
-350
-7306

skipif mysql # not compatible
query I rowsort label-5643
SELECT DISTINCT - col1 + CAST ( + col2 + col2 AS INTEGER ) * - col0 FROM tab1 AS cor0
----
-15373
-350
-7306

query I rowsort
SELECT - col0 + 66 AS col0 FROM tab0 AS cor0
----
-23
31
42

query I rowsort
SELECT ALL col2 * + cor0.col1 + - cor0.col1 * - col0 AS col2 FROM tab1 AS cor0
----
1210
1482
2288

query I rowsort
SELECT col0 * + cor0.col0 + - col0 * + cor0.col1 * col0 FROM tab0 AS cor0
----
-117600
-48960
-712890

query I rowsort
SELECT ALL - - 54 - + cor0.col1 AS col0 FROM tab2 AS cor0
----
-5
23
37

query I rowsort
SELECT DISTINCT - col1 + + ( col0 ) AS col1 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT - + 65 AS col0 FROM tab0 cor0
----
-65
-65
-65

query I rowsort
SELECT 70 + 5 * col0 FROM tab2 AS cor0
----
105
460
465

query I rowsort
SELECT DISTINCT + + ( 60 ) * col1 + - 10 FROM tab0 cor0
----
5150
5450
5810

query I rowsort
SELECT ALL + 93 + + col2 - col0 FROM tab1 AS cor0
----
109
144
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( 9 ) - + col0 col1 FROM tab2 AS cor0
----
-69
-70
2

query I rowsort
SELECT - + col1 * - col2 + col0 * + ( + 19 ) FROM tab0 AS cor0
----
3294
762
9153

query I rowsort
SELECT ALL - ( + ( col0 ) ) + - 73 AS col2 FROM tab2 AS cor0
----
-151
-152
-80

query I rowsort
SELECT + + ( - 22 ) + + col0 FROM tab2 AS cor0
----
-15
56
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - col0 ) * col0 col1 FROM tab0 AS cor0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-5658
SELECT DISTINCT - - col0 DIV + col2 col1 FROM tab0 AS cor0
----
0
1
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5658
SELECT DISTINCT - - col0 / + col2 col1 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT ALL + - 17 + + col2 FROM tab0 AS cor0
----
-16
16
65

query I rowsort
SELECT ALL - 80 FROM tab0, tab2 AS cor0, tab1, tab2 AS cor1
----
81 values hashing to a3c8e513c78e2eef41ad24aabcbeff52

query I rowsort
SELECT + 44 + - col1 * - tab2.col1 * + ( tab2.col0 ) FROM tab2
----
22875
271562
6771

query I rowsort
SELECT ALL - - col1 + + col2 * - col2 AS col2 FROM tab0 AS cor0
----
-1003
-6633
96

query I rowsort
SELECT + 40 + - col2 * ( col1 ) * col0 AS col2 FROM tab2 AS cor0
----
-119612
-50994
-5819

query I rowsort
SELECT col0 - 35 FROM tab1
----
-32
29
45

query I rowsort
SELECT ALL + col1 - cor0.col0 * col0 AS col0 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT DISTINCT col1 + + col1 + + 98 * - col1 FROM tab0 AS cor0
----
-8256
-8736
-9312

query I rowsort
SELECT ALL + - col0 * col0 + + cor0.col0 AS col1 FROM tab1 AS cor0
----
-4032
-6
-6320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 65 + + col2 * col1 col0 FROM tab1 AS cor0
----
1183
1339
505

query I rowsort
SELECT DISTINCT 54 - col0 AS col2 FROM tab2 AS cor0
----
-24
-25
47

query I rowsort
SELECT ALL ( col0 ) + col2 AS col2 FROM tab2
----
104
117
34

query I rowsort
SELECT ALL 15 FROM tab0 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

onlyif mysql # use DIV operator for integer division
query I rowsort label-5672
SELECT DISTINCT + - col1 * cor0.col1 + - ( col0 ) DIV col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

skipif mysql # not compatible
query I rowsort label-5672
SELECT DISTINCT + - col1 * cor0.col1 + - ( col0 ) / col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL 13 * col1 AS col2 FROM tab1 AS cor0
----
130
169
338

query I rowsort
SELECT - + 68 FROM tab1 cor0
----
-68
-68
-68

query I rowsort
SELECT ALL col1 + col2 * cor0.col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT ALL col1 * + col2 - col1 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT DISTINCT col2 + + col1 * col1 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT DISTINCT - col1 * - col2 + ( col0 ) AS col0 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT ALL - cor0.col1 * - col1 * col1 FROM tab1 AS cor0
----
1000
17576
2197

query I rowsort
SELECT DISTINCT + 62 * - cor0.col2 AS col1 FROM tab0 AS cor0
----
-2046
-5084
-62

query I rowsort
SELECT ALL + col2 + - 37 FROM tab1
----
17
20
59

query I rowsort
SELECT - col2 + - 9 AS col0 FROM tab1 AS cor0
----
-105
-63
-66

query I rowsort
SELECT + + col0 + col2 + - col0 * cor0.col0 * col0 FROM tab1 AS cor0
----
-262023
-511824
30

query I rowsort
SELECT DISTINCT col0 + - ( + ( col0 ) ) FROM tab2
----
0

query I rowsort
SELECT DISTINCT - + col2 * + col2 AS col1 FROM tab1 cor0
----
-2916
-3249
-9216

skipif mysql # not compatible
query I rowsort
SELECT + - CAST ( 74 AS REAL ) + col0 FROM tab0 cor0
----
-39
-50
15

onlyif mysql # use DIV operator for integer division
query I rowsort label-5687
SELECT DISTINCT + cor0.col2 + cor0.col0 DIV cor0.col1 FROM tab1, tab1 cor0
----
102
54
63

skipif mysql # not compatible
query I rowsort label-5687
SELECT DISTINCT + cor0.col2 + cor0.col0 / cor0.col1 FROM tab1, tab1 cor0
----
102
54
63

query I rowsort
SELECT ALL ( ( + col2 ) ) * col2 AS col2 FROM tab1 AS cor0
----
2916
3249
9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + 87 ) + + col0 + - col2 col0 FROM tab2 AS cor0
----
128
139
67

query I rowsort
SELECT DISTINCT ( - 47 ) AS col1 FROM tab2
----
-47

onlyif mysql # use DIV operator for integer division
query I rowsort label-5691
SELECT ALL - + col0 DIV - ( cor0.col0 ) - + ( col0 ) * col1 col0 FROM tab2 AS cor0
----
-1342
-216
-4601

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5691
SELECT ALL - + col0 / - ( cor0.col0 ) - + ( col0 ) * col1 col0 FROM tab2 AS cor0
----
-1342
-216
-4601

query I rowsort
SELECT DISTINCT - - col0 * - 24 AS col1 FROM tab2 AS cor0
----
-168
-1872
-1896

onlyif mysql # use DIV operator for integer division
query I rowsort label-5693
SELECT ALL + col2 + - 59 DIV - col2 FROM tab0 AS cor0
----
34
60
82

skipif mysql # not compatible
query I rowsort label-5693
SELECT ALL + col2 + - 59 / - col2 FROM tab0 AS cor0
----
34
60
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - col2 * col0 + + col0 col1 FROM tab0 AS cor0
----
3430
664207
68136

query I rowsort
SELECT + tab2.col1 * col2 + col2 * + col2 AS col0 FROM tab2
----
1566
2090
2210

query I rowsort
SELECT ALL - col0 * - tab0.col0 AS col1 FROM tab0
----
1225
576
7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-5697
SELECT DISTINCT + col1 DIV + col1 + col2 + + col1 col1 FROM tab0
----
120
174
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5697
SELECT DISTINCT + col1 / + col1 + col2 + + col1 col1 FROM tab0
----
120
174
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-5698
SELECT DISTINCT tab1.col2 DIV col0 - + col0 AS col1 FROM tab1
----
-64
-79
15

skipif mysql # not compatible
query I rowsort label-5698
SELECT DISTINCT tab1.col2 / col0 - + col0 AS col1 FROM tab1
----
-64
-79
15

query I rowsort
SELECT ALL tab1.col0 + + col0 AS col0 FROM tab1 WHERE NOT ( col2 - col0 ) = col0 + - col0
----
128
160
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col2 * col2 col2 FROM tab1
----
119808
32490
75816

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT ( NULL ) NOT IN ( col2 / - col0 + - col2 )
----

query I rowsort
SELECT col0 * - tab0.col2 * - col1 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT col1 * + col0 + + col0 AS col2 FROM tab1
----
1120
704
81

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT + col2 IN ( col0 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT + col1 + col0 * tab2.col0 FROM tab2
----
6143
6258
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + - tab0.col0 + + col1 col0 FROM tab0
----
63
84
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-5707
SELECT ALL tab0.col2 DIV tab0.col1 AS col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5707
SELECT ALL tab0.col2 / tab0.col1 AS col0 FROM tab0
----
0
0
0

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE col0 * - col1 - col1 NOT IN ( + tab0.col0 * col0 / col2 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

onlyif mysql # use DIV operator for integer division
query I rowsort label-5709
SELECT DISTINCT col2 DIV + col0 AS col1 FROM tab2
----
0
3

skipif mysql # not compatible
query I rowsort label-5709
SELECT DISTINCT col2 / + col0 AS col1 FROM tab2
----
0
3

query I rowsort
SELECT col2 * + col0 + col2 * + tab1.col2 FROM tab1
----
16896
3078
6897

query I rowsort
SELECT col1 * - tab2.col1 + - col0 FROM tab2
----
-3559
-368
-968

query I rowsort
SELECT DISTINCT - col1 + tab1.col2 * col2 - - col0 FROM tab1
----
2893
3303
9283

onlyif mysql # use DIV operator for integer division
query I rowsort label-5713
SELECT ALL + col0 * + col0 + - col1 DIV col1 + col2 AS col1 FROM tab1
----
4152
62
6495

skipif mysql # not compatible
query I rowsort label-5713
SELECT ALL + col0 * + col0 + - col1 / col1 + col2 AS col1 FROM tab1
----
4152
62
6495

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col1 * col1 + + tab0.col1 col2 FROM tab0
----
7506
8461
9541

query I rowsort
SELECT DISTINCT col2 * - col2 * col2 FROM tab0
----
-1
-35937
-551368

query I rowsort
SELECT ALL col2 / - col2 - + col1 * col0 FROM tab2 WHERE NULL IN ( + col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 col2 FROM tab0 WHERE NOT NULL IN ( col0 )
----

query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 WHERE NOT NULL NOT IN ( - col2 + - col2 + col0 / col2 ) OR NULL > - col0 * - col0 + col1 * cor0.col2 * + col1 + col0 / + col1
----

query I rowsort
SELECT - col0 + + col2 / + col2 FROM tab0 AS cor0 WHERE NOT col0 <> NULL
----

query I rowsort
SELECT DISTINCT - col1 AS col2 FROM tab1 WHERE col1 * col2 * col2 <= NULL
----

query I rowsort
SELECT + tab0.col1 / col2 FROM tab0 WHERE NOT ( NULL ) IN ( + col0 + + col1 * col2 * col0 )
----

query III rowsort
SELECT * FROM tab2 cor0 WHERE col2 BETWEEN ( col0 ) AND NULL
----

query I rowsort
SELECT - + cor0.col0 FROM tab1, tab0 AS cor0, tab0, tab2 AS cor1
----
81 values hashing to 26e45cd9fe71a2b90a8bdef20c88e70d

query I rowsort
SELECT + - col1 + + 37 FROM tab1 AS cor0
----
11
24
27

query I rowsort
SELECT DISTINCT - 81 + col2 FROM tab1 AS cor0
----
-24
-27
15

query I rowsort
SELECT ALL + 84 * + 46 FROM tab2 AS cor0
----
3864
3864
3864

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 + - col1 * col0 col1 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT - ( col1 ) * - col0 + + col0 AS col0 FROM tab0 cor0
----
2088
3430
8188

query I rowsort
SELECT - col2 + col1 * col2 AS col1 FROM tab0 AS cor0
----
2805
7380
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5730
SELECT ALL - col1 DIV - col0 + + col0 AS col0 FROM tab0
----
27
37
90

skipif mysql # not compatible
query I rowsort label-5730
SELECT ALL - col1 / - col0 + + col0 AS col0 FROM tab0
----
27
37
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-5731
SELECT DISTINCT col2 DIV - col0 + col1 * + col0 FROM tab0
----
2063
3395
8099

skipif mysql # not compatible
query I rowsort label-5731
SELECT DISTINCT col2 / - col0 + col1 * + col0 FROM tab0
----
2063
3395
8099

query I rowsort
SELECT - 44 * + col0 FROM tab0 AS cor0
----
-1056
-1540
-3916

onlyif mysql # use DIV operator for integer division
query I rowsort label-5733
SELECT DISTINCT + ( - col0 ) DIV - tab0.col1 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-5733
SELECT DISTINCT + ( - col0 ) / - tab0.col1 FROM tab0
----
0

query I rowsort
SELECT ( col2 + + ( tab0.col1 ) ) FROM tab0
----
119
173
98

query I rowsort
SELECT ALL tab2.col2 + + tab2.col1 AS col0 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 0a66faf44289070d88fd26bbc9bf34e3

query I rowsort
SELECT DISTINCT - col2 + + 1 AS col0 FROM tab1 cor0
----
-53
-56
-95

query I rowsort
SELECT DISTINCT - col0 * + 89 + + col2 FROM tab0 AS cor0
----
-2103
-3114
-7839

query I rowsort
SELECT DISTINCT col0 * + 33 FROM tab0 cor0
----
1155
2937
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-5739
SELECT DISTINCT col1 + tab0.col1 + + col1 DIV - col0 FROM tab0
----
169
181
192

skipif mysql # not compatible
query I rowsort label-5739
SELECT DISTINCT col1 + tab0.col1 + + col1 / - col0 FROM tab0
----
169
181
192

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5740
SELECT col2 / + col1 + CAST( NULL AS SIGNED ) AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5740
SELECT col2 / + col1 + CAST ( NULL AS INTEGER ) AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT tab0.col0 + 38 * + col1 * - col0 FROM tab0
----
-128975
-307673
-78408

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 + cor0.col2 col0 FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT ALL 38 FROM tab2, tab0 AS cor0
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

query I rowsort
SELECT DISTINCT + + col1 + cor0.col0 + col0 FROM tab0 cor0
----
134
167
269

query I rowsort
SELECT ALL + 38 * col2 * col1 - - col1 FROM tab0 AS cor0
----
107930
283647
3783

query I rowsort
SELECT + col2 + - 76 * - col1 AS col2 FROM tab2
----
1330
2383
4510

onlyif mysql # use DIV operator for integer division
query I rowsort label-5747
SELECT + 64 DIV - tab2.col0 FROM tab2, tab1 AS cor0
----
9 values hashing to bcd4a3969f526cb388aee06c9410eb4e

skipif mysql # not compatible
query I rowsort label-5747
SELECT + 64 / - tab2.col0 FROM tab2, tab1 AS cor0
----
9 values hashing to bcd4a3969f526cb388aee06c9410eb4e

query I rowsort
SELECT ALL - - col2 + + 30 * - col1 FROM tab2 AS cor0
----
-1744
-472
-903

query I rowsort
SELECT - ( 30 ) FROM tab0
----
-30
-30
-30

query I rowsort
SELECT DISTINCT + - ( + col2 ) * + col1 * col2 AS col2 FROM tab0 AS cor0
----
-611884
-93654
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5751
SELECT - + CAST( - col0 AS SIGNED ) * - col0 AS col2 FROM tab0 AS cor0
----
-1225
-576
-7921

skipif mysql # not compatible
query I rowsort label-5751
SELECT - + CAST ( - col0 AS INTEGER ) * - col0 AS col2 FROM tab0 AS cor0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-5752
SELECT ALL + col2 DIV cor0.col0 AS col0 FROM tab2 AS cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-5752
SELECT ALL + col2 / cor0.col0 AS col0 FROM tab2 AS cor0
----
0
0
3

query I rowsort
SELECT ALL 1 AS col0 FROM tab0 cor0
----
1
1
1

query I rowsort
SELECT ALL 7 + 8 FROM tab2 AS cor0
----
15
15
15

query I rowsort
SELECT DISTINCT - 23 * + cor0.col2 FROM tab2 AS cor0
----
-598
-621
-874

onlyif mysql # use DIV operator for integer division
query I rowsort label-5756
SELECT 20 + col0 DIV - 86 AS col2 FROM tab2
----
20
20
20

skipif mysql # not compatible
query I rowsort label-5756
SELECT 20 + col0 / - 86 AS col2 FROM tab2
----
20
20
20

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5757
SELECT DISTINCT + col0 + col1 * - CAST( NULL AS SIGNED ) + - col1 / col0 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-5757
SELECT DISTINCT + col0 + col1 * - CAST ( NULL AS INTEGER ) + - col1 / col0 FROM tab1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + col1 + - col2 col2 FROM tab0
----
86
91
97

query I rowsort
SELECT 69 * - col0 FROM tab0
----
-1656
-2415
-6141

query I rowsort
SELECT + col2 * + col0 + 3 AS col0 FROM tab0
----
38
7301
795

onlyif mysql # use DIV operator for integer division
query I rowsort label-5761
SELECT - cor0.col2 DIV + 37 FROM tab0, tab1 AS cor0
----
9 values hashing to a09c4c369fd6ef06f439ccfa3d3e0b51

skipif mysql # not compatible
query I rowsort label-5761
SELECT - cor0.col2 / + 37 FROM tab0, tab1 AS cor0
----
9 values hashing to a09c4c369fd6ef06f439ccfa3d3e0b51

query I rowsort
SELECT + 74 + + col2 AS col2 FROM tab1 AS cor0
----
128
131
170

query I rowsort
SELECT ALL - 51 + + col1 * col1 FROM tab1
----
118
49
625

onlyif mysql # use DIV operator for integer division
query I rowsort label-5764
SELECT 32 + - col0 DIV - col0 + col2 col1 FROM tab0 AS cor0
----
115
34
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5764
SELECT 32 + - col0 / - col0 + col2 col1 FROM tab0 AS cor0
----
115
34
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-5765
SELECT DISTINCT + col0 * col1 DIV + col0 AS col0 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-5765
SELECT DISTINCT + col0 * col1 / + col0 AS col0 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT - col2 * ( col2 ) + - col1 FROM tab2 AS cor0
----
-1461
-735
-760

query I rowsort
SELECT ALL + col2 * + 12 + col0 FROM tab1 AS cor0
----
1232
651
748

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5768
SELECT + + col1 * + CAST( + col2 AS SIGNED ) + + col0 AS col2 FROM tab0 AS cor0
----
132
2862
7551

skipif mysql # not compatible
query I rowsort label-5768
SELECT + + col1 * + CAST ( + col2 AS INTEGER ) + + col0 AS col2 FROM tab0 AS cor0
----
132
2862
7551

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - 41 col1 FROM tab1 AS cor0
----
-2214
-2337
-3936

query I rowsort
SELECT + col2 + ( + cor0.col1 ) AS col2 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5771
SELECT + + col2 + - cor0.col0 DIV - col1 col0 FROM tab0 AS cor0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5771
SELECT + + col2 + - cor0.col0 / - col1 col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT + col2 * col0 + - col2 AS col0 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT ALL col2 * - cor0.col0 + + col0 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT col1 * + col2 + + col0 * + col2 FROM tab1 cor0
----
1566
4218
8928

query I rowsort
SELECT DISTINCT + col1 + + col1 * col2 * - col0 FROM tab2 cor0
----
-119593
-51017
-5828

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + + cor0.col1 * + col0 col1 FROM tab1 AS cor0
----
576
75
960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + + col1 col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT - + col0 * - cor0.col2 + + col1 AS col2 FROM tab1 AS cor0
----
188
3658
7693

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 + - col0 + - col0 col2 FROM tab2 cor0
----
-14
-156
-158

query I rowsort
SELECT - col2 * col0 * + cor0.col1 + col0 FROM tab1 AS cor0
----
-36416
-4209
-99760

query I rowsort
SELECT DISTINCT + - cor0.col2 + - col2 AS col2 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT col1 * col2 * - col1 AS col1 FROM tab1 AS cor0
----
-16224
-36504
-5700

query IIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 AS cor0 WHERE NULL BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT ALL - col1 * + col0 + col2 FROM tab1
----
-24
-583
-944

query I rowsort
SELECT ALL + col0 + + col0 * col0 + + col2 FROM tab1
----
4217
6576
66

query I rowsort
SELECT DISTINCT - - 7 * col2 + col1 AS col0 FROM tab0 AS cor0
----
104
317
665

query I rowsort
SELECT ALL + - col1 + + col0 * cor0.col2 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT + + 50 AS col1 FROM tab0 AS cor0
----
50
50
50

onlyif mysql # use DIV operator for integer division
query I rowsort label-5790
SELECT DISTINCT - col2 DIV col0 - - col1 DIV - col2 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-5790
SELECT DISTINCT - col2 / col0 - - col1 / - col2 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT DISTINCT + ( col0 ) * - col0 AS col2 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT - 39 * col2 - + cor0.col2 FROM tab1 AS cor0
----
-2160
-2280
-3840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col0 + - cor0.col0 col0 FROM tab0 cor0
----
-178
-48
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-5794
SELECT ALL - col2 DIV + col0 + - col1 AS col2 FROM tab0 AS cor0
----
-87
-91
-97

skipif mysql # not compatible
query I rowsort label-5794
SELECT ALL - col2 / + col0 + - col1 AS col2 FROM tab0 AS cor0
----
-87
-91
-97

query I rowsort
SELECT 66 * col1 + col0 AS col2 FROM tab1 AS cor0
----
1719
724
938

onlyif mysql # use DIV operator for integer division
query I rowsort label-5796
SELECT - col2 DIV col0 + col0 * + col2 FROM tab0 AS cor0
----
35
7298
791

skipif mysql # not compatible
query I rowsort label-5796
SELECT - col2 / col0 + col0 * + col2 FROM tab0 AS cor0
----
35
7298
791

query I rowsort
SELECT ALL + + col0 * col1 + - col1 * col2 + - col0 FROM tab0 cor0
----
-798
3263
548

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 92 * col2 col0 FROM tab1
----
4968
5244
8832

query I rowsort
SELECT - 84 * 12 - col1 AS col0 FROM tab0
----
-1094
-1099
-1105

query I rowsort
SELECT ALL - ( col1 * + tab0.col0 + - col1 ) FROM tab0
----
-1978
-3298
-8008

query I rowsort
SELECT DISTINCT + col2 * + col2 + col1 * - cor0.col1 - col1 * - col2 * col2 AS col0 FROM tab1 AS cor0
----
128855
35639
78056

query I rowsort
SELECT - + 85 * col2 AS col2 FROM tab1 AS cor0
----
-4590
-4845
-8160

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + - col1 * - tab2.col2 * - col0 col1 FROM tab2
----
-119574
-50955
-5852

query I rowsort
SELECT - cor0.col1 + - col1 - - col2 * col1 FROM tab1 AS cor0
----
1222
1352
550

query I rowsort
SELECT DISTINCT + col0 * col1 + - col1 * + cor0.col0 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT + + 20 * + col1 + - col1 * + col2 FROM tab0 AS cor0
----
-1118
-5642
1843

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * cor0.col0 col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 0cea1be551fb4bd88f4da0b7d676ee2f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col1 ) * ( col2 ) col1 FROM tab1 AS cor0
----
-1248
-1404
-570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5809
SELECT ALL - col2 * - col0 + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5809
SELECT ALL - col2 * - col0 + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 91 * - col0 AS col0 FROM tab0 AS cor0
----
-2184
-3185
-8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5811
SELECT ALL + CAST( + col2 + col1 AS SIGNED ) FROM tab0
----
119
173
98

skipif mysql # not compatible
query I rowsort label-5811
SELECT ALL + CAST ( + col2 + col1 AS INTEGER ) FROM tab0
----
119
173
98

query I rowsort
SELECT - + cor0.col2 * - ( col2 ) + cor0.col1 + col1 AS col0 FROM tab1 AS cor0
----
2968
3269
9242

query I rowsort
SELECT ALL col2 * cor0.col1 + - col1 * cor0.col0 FROM tab0 AS cor0
----
-3298
-637
774

query I rowsort
SELECT col0 + - 61 FROM tab2
----
-54
17
18

query I rowsort
SELECT ( - col2 ) + col0 AS col1 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT - + ( 35 ) FROM tab2 cor0
----
-35
-35
-35

query I rowsort
SELECT ( + 65 ) AS col2 FROM tab1, tab2 cor0
----
9 values hashing to 8bef2ea1f05f3514633f851312bdd805

query I rowsort
SELECT ALL - 50 FROM tab0 cor0 CROSS JOIN tab2, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to ece34ebef3a06d71156ce9f5c546aa60

query I rowsort
SELECT - 95 - - cor0.col0 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to a463a912adaf700f05e51566ae030e4c

query I rowsort
SELECT + 78 * col2 + - cor0.col0 FROM tab0 AS cor0
----
2550
43
6307

query I rowsort
SELECT - + ( - col1 ) + - col0 * 19 FROM tab2 AS cor0
----
-102
-1423
-1484

query I rowsort
SELECT DISTINCT + ( col0 ) * - col0 AS col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT + 37 FROM tab2, tab2 cor0
----
37

query I rowsort
SELECT ALL - ( + col0 ) * + col1 AS col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT - 89 AS col2 FROM tab0, tab2 AS cor0, tab2, tab1 cor1
----
81 values hashing to 1e1759ead845b97a0ef58dbd6a959d73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + 97 ) * col1 col0 FROM tab1 AS cor0
----
1261
2522
970

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 28 * 26 col0 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
728

query I rowsort
SELECT DISTINCT + 24 * + col1 FROM tab1 AS cor0
----
240
312
624

onlyif mysql # use DIV operator for integer division
query I rowsort label-5829
SELECT + ( col0 ) DIV + 18 col1 FROM tab2 AS cor0
----
0
4
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5829
SELECT + ( col0 ) / + 18 col1 FROM tab2 AS cor0
----
0
4
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 * - col0 col1 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-5831
SELECT + col1 + - cor0.col1 DIV + col1 FROM tab0 AS cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-5831
SELECT + col1 + - cor0.col1 / + col1 FROM tab0 AS cor0
----
85
90
96

query I rowsort
SELECT - col0 * + col2 + + col1 * col2 FROM tab2 AS cor0
----
-2356
-494
648

query I rowsort
SELECT DISTINCT tab1.col0 * 14 FROM tab1
----
1120
42
896

query I rowsort
SELECT + col1 + - 40 + col0 FROM tab2 AS cor0
----
-2
56
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5835
SELECT + cor0.col2 DIV - col1 + + col2 FROM tab1 AS cor0
----
52
52
89

skipif mysql # not compatible
query I rowsort label-5835
SELECT + cor0.col2 / - col1 + + col2 FROM tab1 AS cor0
----
52
52
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5836
SELECT + - col2 * CAST( NULL AS SIGNED ) + - 93 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5836
SELECT + - col2 * CAST ( NULL AS INTEGER ) + - 93 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5837
SELECT - + 27 DIV - cor0.col1 FROM tab1 AS cor0
----
1
2
2

skipif mysql # not compatible
query I rowsort label-5837
SELECT - + 27 / - cor0.col1 FROM tab1 AS cor0
----
1
2
2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5838
SELECT - CAST( - col0 AS SIGNED ) * - cor0.col2 * - 29 + - col1 + - col0 * + col0 FROM tab2 AS cor0
----
52669
5401
80800

skipif mysql # not compatible
query I rowsort label-5838
SELECT - CAST ( - col0 AS INTEGER ) * - cor0.col2 * - 29 + - col1 + - col0 * + col0 FROM tab2 AS cor0
----
52669
5401
80800

query I rowsort
SELECT - col1 + + col0 * + cor0.col1 AS col1 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT - + col1 * 62 + - col1 AS col1 FROM tab1 AS cor0
----
-1638
-630
-819

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5841
SELECT CAST( NULL AS SIGNED ) * 83 + + cor0.col2 * ( col2 ) col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5841
SELECT CAST ( NULL AS INTEGER ) * 83 + + cor0.col2 * ( col2 ) col0 FROM tab0 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5842
SELECT ALL col0 * + CAST( 38 * - col1 AS SIGNED ) FROM tab1
----
-24320
-2964
-39520

skipif mysql # not compatible
query I rowsort label-5842
SELECT ALL col0 * + CAST ( 38 * - col1 AS INTEGER ) FROM tab1
----
-24320
-2964
-39520

onlyif mysql # use DIV operator for integer division
query I rowsort label-5843
SELECT - cor0.col0 DIV col0 + + col1 * + col0 + col2 DIV - cor0.col0 AS col1 FROM tab2 AS cor0
----
1342
213
4601

skipif mysql # not compatible
query I rowsort label-5843
SELECT - cor0.col0 / col0 + + col1 * + col0 + col2 / - cor0.col0 AS col1 FROM tab2 AS cor0
----
1342
213
4601

query I rowsort
SELECT + 76 AS col2 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 7b2b08dd3f1adef028d3f40ef7c716da

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * + 33 col0 FROM tab0 AS cor0
----
2838
3003
3201

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * ( col0 ) + col0 + ( - col1 ) col1 FROM tab2 AS cor0
----
165
2047
3064

query I rowsort
SELECT DISTINCT + col2 + - 17 AS col1 FROM tab0 cor0
----
-16
16
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-5848
SELECT + col2 + col2 DIV col2 FROM tab1 AS cor0
----
55
58
97

skipif mysql # not compatible
query I rowsort label-5848
SELECT + col2 + col2 / col2 FROM tab1 AS cor0
----
55
58
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5849
SELECT + col1 * + col1 + - CAST( + col2 * - col1 AS SIGNED ) AS col2 FROM tab2
----
1798
5015
935

skipif mysql # not compatible
query I rowsort label-5849
SELECT + col1 * + col1 + - CAST ( + col2 * - col1 AS INTEGER ) AS col2 FROM tab2
----
1798
5015
935

query I rowsort
SELECT ( 66 ) AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 29794915b585eea848ad670075452c88

query I rowsort
SELECT + col2 + col0 * 1 AS col0 FROM tab1
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5852
SELECT DISTINCT + + col1 * CAST( NULL AS DECIMAL ) * - col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5852
SELECT DISTINCT + + col1 * CAST ( NULL AS REAL ) * - col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - col0 + - col1 + col2 FROM tab2 AS cor0
----
-11
-111
-58

query I rowsort
SELECT col0 * + 44 * tab0.col0 AS col1 FROM tab0
----
25344
348524
53900

query I rowsort
SELECT - col2 + - 33 FROM tab0 AS cor0
----
-115
-34
-66

query I rowsort
SELECT ALL col0 + - ( col2 ) - + col2 AS col1 FROM tab0
----
-42
-75
33

query I rowsort
SELECT col1 * + col2 - ( - 94 ) * col1 FROM tab2 cor0
----
2244
3751
7080

query I rowsort
SELECT ALL + 1 * + col2 + col0 AS col0 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT DISTINCT 33 + col2 * col0 - + col1 FROM tab1
----
169
3671
7700

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 46 * 10 col1 FROM tab1 AS cor0
----
460
460
460

query I rowsort
SELECT DISTINCT + col0 - + col0 * - col2 AS col2 FROM tab2
----
196
2106
3081

query I rowsort
SELECT cor0.col1 * + col1 + col0 AS col1 FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT - + 62 + + col2 AS col0 FROM tab2 cor0
----
-24
-35
-36

onlyif mysql # use DIV operator for integer division
query I rowsort label-5864
SELECT DISTINCT col1 + tab1.col0 DIV ( + tab1.col0 ) FROM tab1
----
11
14
27

skipif mysql # not compatible
query I rowsort label-5864
SELECT DISTINCT col1 + tab1.col0 / ( + tab1.col0 ) FROM tab1
----
11
14
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 - + col0 * - col0 col1 FROM tab0 cor0
----
1322
662
8012

query I rowsort
SELECT ALL - 5 * col0 + + 27 FROM tab2 cor0
----
-363
-368
-8

query I rowsort
SELECT DISTINCT + 81 * col0 FROM tab2 AS cor0
----
567
6318
6399

query I rowsort
SELECT - col0 - + cor0.col1 AS col0 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT DISTINCT - col1 * col2 * - col2 FROM tab0 AS cor0
----
611884
93654
97

query I rowsort
SELECT - + 37 * col2 - + col1 AS col0 FROM tab2 AS cor0
----
-1021
-1030
-1423

query I rowsort
SELECT DISTINCT + col1 * tab0.col1 + ( + 12 ) * - tab0.col0 * 60 AS col1 FROM tab0
----
-15791
-55799
-9884

query I rowsort
SELECT + col0 * - col2 + - col0 AS col2 FROM tab2
----
-196
-2106
-3081

onlyif mysql # use DIV operator for integer division
query I rowsort label-5873
SELECT ALL 93 + col2 + + ( 29 ) DIV + col0 FROM tab1
----
150
156
189

skipif mysql # not compatible
query I rowsort label-5873
SELECT ALL 93 + col2 + + ( 29 ) / + col0 FROM tab1
----
150
156
189

query I rowsort
SELECT DISTINCT + col2 + col0 + 54 * col2 AS col0 FROM tab0
----
1839
4599
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-5875
SELECT + col0 DIV + col1 + col0 * 8 + tab2.col0 * - tab2.col0 * col2 FROM tab2
----
-1267
-157559
-236522

skipif mysql # not compatible
query I rowsort label-5875
SELECT + col0 / + col1 + col0 * 8 + tab2.col0 * - tab2.col0 * col2 FROM tab2
----
-1267
-157559
-236522

query I rowsort
SELECT col2 * + col0 * col0 + col2 + + col1 FROM tab2
----
1381
158269
237213

query I rowsort
SELECT col2 * col2 + + col1 * + 93 AS col1 FROM tab1
----
10425
4179
5334

onlyif mysql # use DIV operator for integer division
query I rowsort label-5878
SELECT DISTINCT - 1 DIV + col0 + - ( + col0 ) AS col2 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-5878
SELECT DISTINCT - 1 / + col0 + - ( + col0 ) AS col2 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT ALL cor0.col2 * col1 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL + + 29 AS col0 FROM tab1 AS cor0
----
29
29
29

query I rowsort
SELECT - col0 + - col0 + col2 * col2 FROM tab0 AS cor0
----
-69
1041
6546

query I rowsort
SELECT ALL + cor1.col1 FROM tab2, tab1 cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT DISTINCT - + 83 AS col0 FROM tab1 AS cor0
----
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-5884
SELECT - cor0.col0 DIV + col1 + - cor0.col2 + - col1 AS col2 FROM tab2 AS cor0
----
-58
-59
-86

skipif mysql # not compatible
query I rowsort label-5884
SELECT - cor0.col0 / + col1 + - cor0.col2 + - col1 AS col2 FROM tab2 AS cor0
----
-58
-59
-86

query I rowsort
SELECT DISTINCT cor0.col1 + + 11 * + cor0.col1 FROM tab1 AS cor0
----
120
156
312

query I rowsort
SELECT col0 + col1 + col1 FROM tab1 AS cor0
----
106
55
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-5887
SELECT ALL + col2 DIV col1 col0 FROM tab2 AS cor0
----
0
0
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5887
SELECT ALL + col2 / col1 col0 FROM tab2 AS cor0
----
0
0
2

query I rowsort
SELECT + - cor0.col1 + col2 * + 8 + cor0.col0 FROM tab1 AS cor0
----
409
510
835

query I rowsort
SELECT ALL - col1 * + 13 FROM tab2 AS cor0
----
-221
-403
-767

onlyif mysql # use DIV operator for integer division
query I rowsort label-5890
SELECT - 30 + + col2 DIV 24 FROM tab1
----
-26
-28
-28

skipif mysql # not compatible
query I rowsort label-5890
SELECT - 30 + + col2 / 24 FROM tab1
----
-26
-28
-28

query I rowsort
SELECT DISTINCT + 43 * col1 + - col0 AS col0 FROM tab1
----
1115
366
479

query I rowsort
SELECT + col0 + - col0 * - col2 * 53 FROM tab1
----
193408
407120
8589

query I rowsort
SELECT + 74 AS col1 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to dc22979e6d261795bd3ce2990fdbbf82

onlyif mysql # use DIV operator for integer division
query I rowsort label-5894
SELECT col1 DIV 40 - col0 col0 FROM tab0 AS cor0
----
-22
-33
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5894
SELECT col1 / 40 - col0 col0 FROM tab0 AS cor0
----
-22
-33
-87

query I rowsort
SELECT DISTINCT + + col2 + - 88 AS col2 FROM tab2 AS cor0
----
-50
-61
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 47 * col1 + col0 col1 FROM tab0 AS cor0
----
4066
4366
4594

query I rowsort
SELECT ALL - 52 * - 54 AS col2 FROM tab0 cor0
----
2808
2808
2808

query I rowsort
SELECT DISTINCT + - 13 + - col1 * - col1 AS col0 FROM tab2 AS cor0
----
276
3468
948

query I rowsort
SELECT + col1 + ( + col1 ) AS col1 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT DISTINCT - 47 + - 0 * col0 * - col0 FROM tab0 AS cor0
----
-47

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5901
SELECT - - CAST( + col0 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-5901
SELECT - - CAST ( + col0 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT + + cor0.col1 * cor0.col2 * - col1 AS col2 FROM tab0 AS cor0
----
-244068
-679042
-9409

query I rowsort
SELECT DISTINCT - - 57 * cor0.col0 + col0 FROM tab1 cor0
----
174
3712
4640

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5904
SELECT + CAST( NULL AS DECIMAL ) + - col2 * cor0.col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5904
SELECT + CAST ( NULL AS REAL ) + - col2 * cor0.col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5905
SELECT ALL col2 DIV + col0 + col0 * + ( + 43 ) FROM tab0 cor0
----
1033
1505
3827

skipif mysql # not compatible
query I rowsort label-5905
SELECT ALL col2 / + col0 + col0 * + ( + 43 ) FROM tab0 cor0
----
1033
1505
3827

query I rowsort
SELECT DISTINCT - col0 * - 50 AS col0 FROM tab0 AS cor0
----
1200
1750
4450

query I rowsort
SELECT DISTINCT + - 23 * 0 AS col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL 80 + col0 * col1 AS col1 FROM tab1 AS cor0
----
1120
158
720

query I rowsort
SELECT ALL - + ( - cor0.col1 ) * col1 + col1 FROM tab0 cor0
----
7482
8372
9506

query I rowsort
SELECT cor0.col0 AS col2 FROM tab0, tab2 cor0, tab1 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT 39 AS col1 FROM tab1, tab2 cor0
----
9 values hashing to 5ecc4d3de68ae828a2d522dff8571cbf

onlyif mysql # use DIV operator for integer division
query I rowsort label-5912
SELECT - col1 + + 39 DIV 76 AS col2 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-5912
SELECT - col1 + + 39 / 76 AS col2 FROM tab1 AS cor0
----
-10
-13
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-5913
SELECT - + col0 + 57 DIV + col0 AS col2 FROM tab2 AS cor0
----
-78
-79
1

skipif mysql # not compatible
query I rowsort label-5913
SELECT - + col0 + 57 / + col0 AS col2 FROM tab2 AS cor0
----
-78
-79
1

query I rowsort
SELECT + col0 + + col0 * - col2 AS col2 FROM tab1 AS cor0
----
-159
-3584
-7600

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5915
SELECT + - CAST( NULL AS SIGNED ) * 48 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5915
SELECT + - CAST ( NULL AS INTEGER ) * 48 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( + 71 ) * col0 AS col2 FROM tab2 AS cor0
----
497
5538
5609

onlyif mysql # use DIV operator for integer division
query I rowsort label-5917
SELECT - col2 DIV + 89 col0 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5917
SELECT - col2 / + 89 col0 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + col1 * col2 col2 FROM tab0 cor0
----
2805
7380
96

query I rowsort
SELECT ALL - + cor0.col0 + - col1 AS col0 FROM tab2 AS cor0
----
-137
-38
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5920
SELECT DISTINCT col0 + + col1 DIV 28 AS col0 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-5920
SELECT DISTINCT col0 + + col1 / 28 AS col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL + 24 + + col1 AS col2 FROM tab2 AS cor0
----
41
55
83

query I rowsort
SELECT - ( col2 ) + col0 AS col0 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT 52 + + 34 FROM tab1
----
86
86
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 74 + + tab0.col2 col1 FROM tab0
----
-41
-73
8

query I rowsort
SELECT col0 * col0 - ( + col0 ) FROM tab2 AS cor0
----
42
6006
6162

query I rowsort
SELECT + 26 + + col1 * col2 FROM tab1 cor0
----
1274
1430
596

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + col0 col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT + col0 * 96 FROM tab1 AS cor0
----
288
6144
7680

query I rowsort
SELECT ALL col0 + ( 29 ) * + col1 AS col0 FROM tab0 cor0
----
2518
2728
2848

query I rowsort
SELECT ALL + col0 + + ( - 71 * col1 ) FROM tab0 AS cor0
----
-6082
-6372
-6852

query I rowsort
SELECT ALL - col0 + col1 * + 19 AS col1 FROM tab1 AS cor0
----
126
167
491

query I rowsort
SELECT - col0 * - col2 + col1 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT ALL + col0 * - 75 AS col1 FROM tab0 AS cor0
----
-1800
-2625
-6675

query I rowsort
SELECT DISTINCT + - cor0.col2 * + ( - col2 + - cor0.col1 ) FROM tab2 AS cor0
----
1566
2090
2210

query I rowsort
SELECT DISTINCT - + col1 + - col0 * + cor0.col0 FROM tab0 cor0
----
-1322
-662
-8012

query I rowsort
SELECT DISTINCT + ( - col1 + tab2.col2 ) FROM tab2
----
-33
-4
21

query I rowsort
SELECT ALL + col1 * 88 + 31 * - col1 FROM tab0 AS cor0
----
4902
5187
5529

query I rowsort
SELECT DISTINCT + cor0.col2 * tab1.col0 FROM tab1, tab2, tab2 cor0
----
9 values hashing to 21856088ba874ad1439062daed37ef79

query I rowsort
SELECT ALL col0 + + 77 AS col2 FROM tab0
----
101
112
166

query I rowsort
SELECT - ( - cor0.col0 ) AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

onlyif mysql # use DIV operator for integer division
query I rowsort label-5941
SELECT ALL + col2 DIV - 85 + - 40 * + col0 FROM tab2
----
-280
-3120
-3160

skipif mysql # not compatible
query I rowsort label-5941
SELECT ALL + col2 / - 85 + - 40 * + col0 FROM tab2
----
-280
-3120
-3160

query I rowsort
SELECT + col0 * - col0 * col2 AS col1 FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT col2 * + ( - col1 ) FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT - - col2 + + cor0.col0 * + 84 AS col1 FROM tab0 AS cor0
----
2049
2941
7558

query I rowsort
SELECT cor0.col2 FROM tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT ALL + tab1.col0 * - 45 AS col1 FROM tab1
----
-135
-2880
-3600

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5947
SELECT DISTINCT + 65 / + col2 + - CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5947
SELECT DISTINCT + 65 / + col2 + - CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5948
SELECT DISTINCT - - 73 + + col1 DIV col2 FROM tab0 cor0
----
170
74
75

skipif mysql # not compatible
query I rowsort label-5948
SELECT DISTINCT - - 73 + + col1 / col2 FROM tab0 cor0
----
170
74
75

query I rowsort
SELECT DISTINCT cor0.col0 + + col1 AS col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT + 85 AS col1 FROM tab0, tab2 cor0
----
9 values hashing to aafa8e5cfb9e02cea8717833e7581f7b

query I rowsort
SELECT tab1.col1 + cor0.col2 FROM tab1, tab2 cor0
----
9 values hashing to b8b62762005dc0d7237145d0538edb34

query I rowsort
SELECT DISTINCT - 96 - col0 FROM tab1
----
-160
-176
-99

query I rowsort
SELECT ( - col0 ) * + tab2.col1 + - col0 * col1 + 26 * + 53 FROM tab2
----
-1308
-7826
944

query I rowsort
SELECT + 73 AS col2 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 3933a906d17a820ccf95467e2206df8f

query I rowsort
SELECT ALL col1 - - col2 * - col1 FROM tab2
----
-1475
-629
-806

query I rowsort
SELECT - col1 * col2 - col1 * - col0 * + col2 AS col1 FROM tab1 cor0
----
2808
35910
98592

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5957
SELECT CAST( NULL AS SIGNED ) * + col1 + + col1 + col2 / col0 AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5957
SELECT CAST ( NULL AS INTEGER ) * + col1 + + col1 + col2 / col0 AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 + col0 * - col0 AS col2 FROM tab2
----
-42
-6006
-6162

query I rowsort
SELECT 24 * 3 + + col1 FROM tab2
----
103
131
89

query I rowsort
SELECT - 58 * col1 AS col0 FROM tab0 cor0
----
-4988
-5278
-5626

query I rowsort
SELECT ALL + ( + col1 ) * col2 + + col2 AS col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT ALL - col1 * ( col0 ) AS col2 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT - 8 - + 40 AS col0 FROM tab2 AS cor0
----
-48
-48
-48

query I rowsort
SELECT ALL ( cor0.col2 ) + col1 + col0 AS col0 FROM tab0 AS cor0
----
133
143
262

query I rowsort
SELECT + col2 * ( col2 ) - - col2 FROM tab0 cor0
----
1122
2
6806

query I rowsort
SELECT DISTINCT col1 + - 62 AS col0 FROM tab2 AS cor0
----
-3
-31
-45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5967
SELECT ALL + 76 + col2 / col2 + CAST( NULL AS SIGNED ) / + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5967
SELECT ALL + 76 + col2 / col2 + CAST ( NULL AS INTEGER ) / + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5968
SELECT - + col1 + 14 * col0 + CAST( + col2 * col1 + - col1 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
1718
2508
873

skipif mysql # not compatible
query I rowsort label-5968
SELECT - + col1 + 14 * col0 + CAST ( + col2 * col1 + - col1 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
1718
2508
873

query I rowsort
SELECT DISTINCT - ( - 1 ) + col2 AS col0 FROM tab0 AS cor0
----
2
34
83

query I rowsort
SELECT DISTINCT - + 59 * + col1 AS col1 FROM tab2 cor0
----
-1003
-1829
-3481

query I rowsort
SELECT + cor0.col2 + 78 * col0 FROM tab0 cor0
----
1905
2731
7024

query I rowsort
SELECT ALL + 53 + 7 AS col0 FROM tab2 AS cor0
----
60
60
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-5973
SELECT - ( 59 ) DIV col1 + col0 * - cor0.col1 * + col2 + 31 * + 35 AS col2 FROM tab1 AS cor0
----
-3129
-35400
-98759

skipif mysql # not compatible
query I rowsort label-5973
SELECT - ( 59 ) / col1 + col0 * - cor0.col1 * + col2 + 31 * + 35 AS col2 FROM tab1 AS cor0
----
-3129
-35400
-98759

query I rowsort
SELECT DISTINCT + col1 * 64 FROM tab2 cor0
----
1088
1984
3776

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 73 col0 FROM tab1 AS cor0
----
73

query I rowsort
SELECT ALL - col0 * + 52 + + col0 AS col1 FROM tab0 AS cor0
----
-1224
-1785
-4539

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5977
SELECT col2 + col1 * CAST( 54 AS SIGNED ) * - col2 AS col1 FROM tab0 AS cor0
----
-153219
-402866
-5237

skipif mysql # not compatible
query I rowsort label-5977
SELECT col2 + col1 * CAST ( 54 AS INTEGER ) * - col2 AS col1 FROM tab0 AS cor0
----
-153219
-402866
-5237

onlyif mysql # use DIV operator for integer division
query I rowsort label-5978
SELECT - col1 + - col1 DIV 50 col2 FROM tab1 AS cor0
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5978
SELECT - col1 + - col1 / 50 col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT ( cor0.col2 ) FROM tab2, tab1 AS cor0, tab2 AS cor1
----
54
57
96

query I rowsort
SELECT ALL ( - col1 ) - ( 13 ) FROM tab0 AS cor0
----
-104
-110
-99

query I rowsort
SELECT cor0.col1 * 68 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 62f4b061af2572801934deb01f0cbe37

query I rowsort
SELECT + + col0 * col0 + + 36 FROM tab1 AS cor0
----
4132
45
6436

query I rowsort
SELECT DISTINCT col0 + col0 * col2 FROM tab0 AS cor0
----
70
7387
816

onlyif mysql # use DIV operator for integer division
query I rowsort label-5984
SELECT DISTINCT + - col1 DIV + 86 AS col0 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5984
SELECT DISTINCT + - col1 / + 86 AS col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT + - col0 * col2 + + col2 AS col2 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT col2 * - col0 * + col0 FROM tab1 AS cor0
----
-233472
-486
-614400

onlyif mysql # use DIV operator for integer division
query I rowsort label-5987
SELECT ALL col2 DIV + ( + col0 ) AS col1 FROM tab2 cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-5987
SELECT ALL col2 / + ( + col0 ) AS col1 FROM tab2 cor0
----
0
0
3

query I rowsort
SELECT DISTINCT - col1 * col2 + + 65 FROM tab0 AS cor0
----
-2773
-32
-7397

query I rowsort
SELECT ALL + tab2.col1 - col1 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL - col2 + + col1 - + col0 * + col1 AS col1 FROM tab2
----
-1364
-213
-4569

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5991
SELECT ALL col1 + + CAST( NULL AS DECIMAL ) - 35 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5991
SELECT ALL col1 + + CAST ( NULL AS REAL ) - 35 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 61 - tab0.col2 FROM tab0, tab2 AS cor0
----
-143
-62
-94

query I rowsort
SELECT ALL + 44 FROM tab1, tab0 AS cor0
----
9 values hashing to ab2bc2b9f8baa300df7755e5980a319d

query I rowsort
SELECT DISTINCT - 18 AS col0 FROM tab2, tab2 AS cor0, tab2 AS cor1, tab1 AS cor2
----
-18

query I rowsort
SELECT + 1 FROM tab1, tab1 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT DISTINCT + 31 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab2 AS cor2, tab1 AS cor3
----
31

query I rowsort
SELECT ( 55 ) FROM tab1, tab1 AS cor0
----
9 values hashing to 1626bd3008abd9f18cc88cdecf7b64d0

query I rowsort
SELECT ALL + ( col1 ) + col1 * + 44 * + ( col2 ) FROM tab0
----
124958
328419
4365

query I rowsort
SELECT DISTINCT col2 + ( col2 * col0 ) AS col0 FROM tab0
----
36
7380
825

query I rowsort
SELECT col1 * 52 * - tab2.col2 FROM tab2
----
-33592
-43524
-79768

query I rowsort
SELECT 15 + + col2 * + tab2.col2 * tab2.col2 + tab2.col1 AS col0 FROM tab2
----
17650
19729
54904

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6002
SELECT DISTINCT + CAST( NULL AS SIGNED ) + + ( + tab0.col2 ) * col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-6002
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + + ( + tab0.col2 ) * col0 FROM tab0
----
NULL

query I rowsort
SELECT DISTINCT col0 * + tab2.col1 + - col1 FROM tab2
----
1326
186
4543

query I rowsort
SELECT DISTINCT 0 + + col0 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT ALL cor0.col2 * + col1 + - col0 + cor0.col2 AS col0 FROM tab0 AS cor0
----
2847
63
7455

query I rowsort
SELECT col2 + - 25 AS col0 FROM tab1 AS cor0
----
29
32
71

query I rowsort
SELECT ALL - ( 3 * col2 ) FROM tab2
----
-114
-78
-81

query I rowsort
SELECT - 55 * - col1 FROM tab1
----
1430
550
715

query I rowsort
SELECT ALL 63 + col0 * col1 AS col0 FROM tab2
----
1406
280
4665

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6010
SELECT ALL ( col2 ) * - CAST( ( col2 ) AS SIGNED ) + - 99 FROM tab0 AS cor0
----
-100
-1188
-6823

skipif mysql # not compatible
query I rowsort label-6010
SELECT ALL ( col2 ) * - CAST ( ( col2 ) AS INTEGER ) + - 99 FROM tab0 AS cor0
----
-100
-1188
-6823

query I rowsort
SELECT + col1 + col2 * col1 + col2 AS col1 FROM tab0 AS cor0
----
195
2957
7635

onlyif mysql # use DIV operator for integer division
query I rowsort label-6012
SELECT + - col0 + - col1 DIV + 43 AS col2 FROM tab2 AS cor0
----
-7
-79
-79

skipif mysql # not compatible
query I rowsort label-6012
SELECT + - col0 + - col1 / + 43 AS col2 FROM tab2 AS cor0
----
-7
-79
-79

query I rowsort
SELECT ALL - 69 * tab0.col0 AS col2 FROM tab0
----
-1656
-2415
-6141

query I rowsort
SELECT ALL - 35 * + col1 FROM tab0
----
-3010
-3185
-3395

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + col0 - col2 col1 FROM tab0 AS cor0
----
2031
3394
8017

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * ( 7 ) col1 FROM tab0 AS cor0
----
168
245
623

query I rowsort
SELECT DISTINCT - col0 - ( + col1 + cor0.col0 ) AS col0 FROM tab2 AS cor0
----
-175
-215
-45

query I rowsort
SELECT ALL + col2 * col2 + + cor0.col1 * + col0 FROM tab1 AS cor0
----
10256
2994
3889

query I rowsort
SELECT ALL cor0.col0 * - cor0.col0 AS col1 FROM tab0 AS cor0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-6020
SELECT DISTINCT + + col0 DIV + ( - col2 ) + col2 * - ( - col0 ) * + col0 FROM tab0 AS cor0
----
1190
19008
649521

skipif mysql # not compatible
query I rowsort label-6020
SELECT DISTINCT + + col0 / + ( - col2 ) + col2 * - ( - col0 ) * + col0 FROM tab0 AS cor0
----
1190
19008
649521

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6021
SELECT DISTINCT + col0 * + CAST( - col2 AS SIGNED ) * + col1 AS col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

skipif mysql # not compatible
query I rowsort label-6021
SELECT DISTINCT + col0 * + CAST ( - col2 AS INTEGER ) * + col1 AS col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT - - col2 * 50 AS col2 FROM tab0 AS cor0
----
1650
4100
50

query I rowsort
SELECT + col0 + + col2 * col1 AS col2 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT 0 * + ( - col0 ) FROM tab1
----
0
0
0

query I rowsort
SELECT ALL + col0 * - 36 AS col0 FROM tab0
----
-1260
-3204
-864

query I rowsort
SELECT DISTINCT + col0 * + ( - col0 ) AS col1 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT ALL col2 + 94 FROM tab1 AS cor0
----
148
151
190

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 cor0, tab1 cor1, tab0 AS cor2
----
972 values hashing to e84152c0bf436177d3b3d80e42832d4f

query I rowsort
SELECT DISTINCT - ( - col0 ) * + col2 FROM tab2 cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6030
SELECT ALL cor1.col0 * - CAST( - tab2.col1 AS SIGNED ) AS col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 7ccaf24f2c8d9f29787f37bd29e709d9

skipif mysql # not compatible
query I rowsort label-6030
SELECT ALL cor1.col0 * - CAST ( - tab2.col1 AS INTEGER ) AS col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 7ccaf24f2c8d9f29787f37bd29e709d9

onlyif mysql # use DIV operator for integer division
query I rowsort label-6031
SELECT + ( + col2 ) + + 56 DIV cor0.col1 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-6031
SELECT + ( + col2 ) + + 56 / cor0.col1 FROM tab0 AS cor0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-6032
SELECT - + 35 DIV + col0 + - col2 * + 58 FROM tab2 AS cor0
----
-1508
-1571
-2204

skipif mysql # not compatible
query I rowsort label-6032
SELECT - + 35 / + col0 + - col2 * + 58 FROM tab2 AS cor0
----
-1508
-1571
-2204

query I rowsort
SELECT 90 + 74 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to a1509e33d3aaa01839fa4f2fb69edf25

query I rowsort
SELECT DISTINCT col2 + col2 * 84 AS col0 FROM tab2
----
2210
2295
3230

query I rowsort
SELECT - - 65 + - col0 + - 13 AS col2 FROM tab2 AS cor0
----
-26
-27
45

query I rowsort
SELECT - col1 * - cor0.col2 + ( + col2 ) AS col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT + 71 + col0 * col0 FROM tab0 AS cor0
----
1296
647
7992

query I rowsort
SELECT DISTINCT 57 AS col0 FROM tab0, tab2 cor0
----
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * 75 col0 FROM tab2 AS cor0
----
1950
2025
2850

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 CROSS JOIN tab2, tab1 AS cor1, tab1, tab0 AS cor2
----
3645 values hashing to f2e58df61204c8a189e87d6816ea9159

onlyif mysql # use DIV operator for integer division
query I rowsort label-6041
SELECT - col0 + - col2 * col0 DIV + col2 col1 FROM tab1 AS cor0
----
-128
-160
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6041
SELECT - col0 + - col2 * col0 / + col2 col1 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT ALL + cor0.col2 * - 80 + - col1 FROM tab1 AS cor0
----
-4346
-4570
-7693

query I rowsort
SELECT ALL - - col1 + + 13 AS col1 FROM tab0 AS cor0
----
104
110
99

query I rowsort
SELECT DISTINCT col1 + cor0.col2 * - col1 AS col2 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT + col1 + col2 * col1 AS col2 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT - col0 * - col2 - + col1 AS col2 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT col1 + - 94 + col0 AS col2 FROM tab0 AS cor0
----
16
38
86

query I rowsort
SELECT + ( 6 ) + col0 FROM tab2 AS cor0
----
13
84
85

query I rowsort
SELECT - col0 + + 81 + col1 FROM tab0 AS cor0
----
143
143
83

query I rowsort
SELECT DISTINCT - tab2.col1 + + col2 * - col1 FROM tab2
----
-1593
-663
-868

query I rowsort
SELECT ALL col1 + 59 * - col0 + col1 AS col0 FROM tab2
----
-351
-4484
-4627

query I rowsort
SELECT - - col1 * + 41 FROM tab1 AS cor0
----
1066
410
533

onlyif mysql # use DIV operator for integer division
query I rowsort label-6053
SELECT ALL + + 0 * col1 + col1 DIV - col2 AS col2 FROM tab0 AS cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-6053
SELECT ALL + + 0 * col1 + col1 / - col2 AS col2 FROM tab0 AS cor0
----
-1
-2
-97

query I rowsort
SELECT DISTINCT + - ( + 20 ) AS col0 FROM tab0 AS cor0
----
-20

query I rowsort
SELECT ALL - col2 + col0 * - col1 AS col2 FROM tab1 AS cor0
----
-1136
-132
-697

query I rowsort
SELECT DISTINCT - col0 * col1 * + col1 FROM tab2
----
-22831
-271518
-6727

query I rowsort
SELECT DISTINCT - + col1 + col2 * - col2 FROM tab0 AS cor0
----
-1175
-6815
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 51 + + col0 col2 FROM tab2 AS cor0
----
129
130
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-6059
SELECT ALL + 51 + + col2 DIV col0 FROM tab0 cor0
----
51
51
52

skipif mysql # not compatible
query I rowsort label-6059
SELECT ALL + 51 + + col2 / col0 FROM tab0 cor0
----
51
51
52

query I rowsort
SELECT ALL + - ( - col2 ) * - col1 + - cor0.col1 + - col0 AS col1 FROM tab1 AS cor0
----
-1341
-1433
-644

query I rowsort
SELECT ALL - 55 - ( col1 * + 75 ) AS col0 FROM tab1 AS cor0
----
-1030
-2005
-805

query I rowsort
SELECT - col1 * col1 - - col2 FROM tab1 AS cor0
----
-43
-622
-73

query I rowsort
SELECT ALL + col2 * + col0 * + col0 FROM tab2 AS cor0
----
1323
158184
237158

query I rowsort
SELECT 54 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

onlyif mysql # use DIV operator for integer division
query I rowsort label-6065
SELECT DISTINCT - col2 DIV 80 + + col0 * + col0 AS col0 FROM tab1 AS cor0
----
4096
6399
9

skipif mysql # not compatible
query I rowsort label-6065
SELECT DISTINCT - col2 / 80 + + col0 * + col0 AS col0 FROM tab1 AS cor0
----
4096
6399
9

query I rowsort
SELECT col2 * col0 + - col2 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT + col0 * ( col0 ) AS col2 FROM tab2 cor0
----
49
6084
6241

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6068
SELECT - CAST( 85 AS SIGNED ) + + cor0.col0 * cor0.col0 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 6c6ac688298af5e71f70372fc307f9e6

skipif mysql # not compatible
query I rowsort label-6068
SELECT - CAST ( 85 AS INTEGER ) + + cor0.col0 * cor0.col0 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 6c6ac688298af5e71f70372fc307f9e6

query I rowsort
SELECT - col0 + 95 * + col0 AS col2 FROM tab0 AS cor0
----
2256
3290
8366

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col2 - + 59 * col0 col1 FROM tab0
----
-1449
-2066
-5333

onlyif mysql # use DIV operator for integer division
query I rowsort label-6071
SELECT 24 DIV + col1 + tab0.col0 AS col2 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-6071
SELECT 24 / + col1 + tab0.col0 AS col2 FROM tab0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-6072
SELECT ALL - + 35 DIV - cor0.col2 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-6072
SELECT ALL - + 35 / - cor0.col2 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT ALL + + col1 * - col2 + ( + col0 ) AS col0 FROM tab2 cor0
----
-1456
-567
-830

query I rowsort
SELECT + ( col1 ) + col1 * col2 FROM tab0 AS cor0
----
194
2924
7553

onlyif mysql # use DIV operator for integer division
query I rowsort label-6075
SELECT - 60 DIV cor0.col2 AS col1 FROM tab1 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-6075
SELECT - 60 / cor0.col2 AS col1 FROM tab1 AS cor0
----
-1
-1
0

query I rowsort
SELECT DISTINCT + cor0.col0 * col1 - col1 FROM tab0 cor0
----
1978
3298
8008

query I rowsort
SELECT - col2 + col0 * - col0 * + col1 FROM tab1 AS cor0
----
-288
-41017
-83296

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 - 95 col2 FROM tab2 AS cor0
----
-112
-126
-154

query I rowsort
SELECT DISTINCT + + col0 + + 40 AS col0 FROM tab2 cor0
----
118
119
47

query I rowsort
SELECT ALL + - col0 * 20 FROM tab0 AS cor0
----
-1780
-480
-700

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * + tab0.col2 + 34 * - col0 - + col0 col2 FROM tab0
----
-10413
-1260
-1632

query I rowsort
SELECT ALL cor0.col0 * - ( - col2 ) + col1 AS col0 FROM tab1 AS cor0
----
188
3658
7693

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6083
SELECT - col0 * - CAST( NULL AS SIGNED ) - col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6083
SELECT - col0 * - CAST ( NULL AS INTEGER ) - col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + col0 * 60 * col2 AS col1 FROM tab1 AS cor0
----
218880
460800
9720

query I rowsort
SELECT ALL col2 * 3 FROM tab1 AS cor0
----
162
171
288

query I rowsort
SELECT DISTINCT + col1 * + col2 + col0 * + col2 AS col1 FROM tab2 cor0
----
1026
3562
3648

query I rowsort
SELECT ALL - + 92 + - 0 * col2 FROM tab2 AS cor0
----
-92
-92
-92

query I rowsort
SELECT DISTINCT col2 + 9 * col1 AS col1 FROM tab1 AS cor0
----
147
213
288

query I rowsort
SELECT ALL + + 17 * cor0.col1 AS col2 FROM tab2 AS cor0
----
1003
289
527

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 52 col1 FROM tab0 AS cor0
----
-52

query I rowsort
SELECT DISTINCT + - 44 * + col0 AS col2 FROM tab1 AS cor0
----
-132
-2816
-3520

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col2 * + ( col0 ) col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT ALL + ( cor0.col2 ) * ( + col1 ) AS col1 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT + 49 * col0 FROM tab2 AS cor0
----
343
3822
3871

query I rowsort
SELECT DISTINCT - 8 + col2 * + cor0.col1 AS col1 FROM tab2 AS cor0
----
1526
638
829

query I rowsort
SELECT 98 * col2 + col1 FROM tab0 AS cor0
----
195
3320
8127

query I rowsort
SELECT - - cor0.col1 * col1 AS col0 FROM tab0 AS cor0
----
7396
8281
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-6098
SELECT ALL - 51 DIV + col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6098
SELECT ALL - 51 / + col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + + 2 * - col2 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT ALL col1 * col0 * - col0 FROM tab2
----
-106097
-1519
-358956

query I rowsort
SELECT DISTINCT - - ( - col2 ) + cor0.col2 + col2 AS col0 FROM tab0 AS cor0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-6102
SELECT 67 * col1 DIV ( - col2 ) AS col1 FROM tab1 AS cor0
----
-11
-32
-9

skipif mysql # not compatible
query I rowsort label-6102
SELECT 67 * col1 / ( - col2 ) AS col1 FROM tab1 AS cor0
----
-11
-32
-9

query I rowsort
SELECT ALL + 27 AS col0 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 1a3cef5c33b8f87ffeded378fd207753

query I rowsort
SELECT 38 * col1 AS col1 FROM tab0 AS cor0
----
3268
3458
3686

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + col1 + - col2 ) * col0 col0 FROM tab0
----
1272
3360
801

query I rowsort
SELECT + col2 * 66 FROM tab2 AS cor0
----
1716
1782
2508

query I rowsort
SELECT + cor0.col2 + + ( - 51 ) * col0 FROM tab1 AS cor0
----
-3207
-3984
-99

query I rowsort
SELECT DISTINCT - - col1 + col0 + 56 FROM tab1 AS cor0
----
130
149
85

query I rowsort
SELECT - - col0 * ( + col1 ) + col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT - col0 * - col2 + - col2 FROM tab0
----
34
7216
759

query I rowsort
SELECT + tab0.col1 + + ( + col2 ) - col2 * col2 FROM tab0
----
-6551
-970
97

query I rowsort
SELECT DISTINCT + ( col2 ) * col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT 17 + 46 FROM tab2 AS cor0
----
63
63
63

query I rowsort
SELECT + ( + col1 ) + cor0.col2 * - col1 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT ALL 45 * + 56 FROM tab2 AS cor0
----
2520
2520
2520

query I rowsort
SELECT ALL + ( 17 ) + col0 + ( + col2 ) AS col0 FROM tab1 AS cor0
----
138
193
74

query I rowsort
SELECT + col0 + + cor0.col1 * - col0 * - 59 AS col2 FROM tab2 AS cor0
----
12810
271596
79316

query I rowsort
SELECT tab0.col0 * 72 * + col1 + + tab0.col1 FROM tab0
----
148694
244537
583219

onlyif mysql # use DIV operator for integer division
query I rowsort label-6119
SELECT col1 DIV ( + col1 ) FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6119
SELECT col1 / ( + col1 ) FROM tab1
----
1
1
1

query I rowsort
SELECT DISTINCT col2 * tab2.col0 * 37 + col2 + 37 * col2 AS col1 FROM tab2
----
112518
76024
8019

query I rowsort
SELECT DISTINCT col0 + ( col1 ) AS col1 FROM tab1
----
29
74
93

query I rowsort
SELECT DISTINCT + col1 * tab2.col2 + col2 * col1 AS col0 FROM tab2
----
1292
1674
3068

query I rowsort
SELECT ALL + ( 73 ) AS col1 FROM tab0
----
73
73
73

query I rowsort
SELECT DISTINCT - col1 - col1 * col0 AS col2 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT 11 + col0 * col1 FROM tab1 AS cor0
----
1051
651
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-6126
SELECT DISTINCT - ( + col1 ) DIV - col0 + cor0.col2 AS col2 FROM tab0 AS cor0
----
3
36
83

skipif mysql # not compatible
query I rowsort label-6126
SELECT DISTINCT - ( + col1 ) / - col0 + cor0.col2 AS col2 FROM tab0 AS cor0
----
3
36
83

query I rowsort
SELECT DISTINCT + 20 + ( col1 ) FROM tab2 AS cor0
----
37
51
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-6128
SELECT ALL - - ( col2 ) DIV col1 + col0 AS col1 FROM tab0 cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-6128
SELECT ALL - - ( col2 ) / col1 + col0 AS col1 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + 32 AS col1 FROM tab2 AS cor0
----
32

query I rowsort
SELECT ALL + 26 * - col0 FROM tab2 AS cor0
----
-182
-2028
-2054

query I rowsort
SELECT ALL + - col0 * col1 + + cor0.col0 + 52 FROM tab0 AS cor0
----
-1988
-3308
-7958

query I rowsort
SELECT col1 - - col2 AS col0 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT - 86 * + cor0.col1 - + cor0.col2 AS col1 FROM tab1 cor0
----
-1214
-2290
-917

query I rowsort
SELECT + - cor0.col2 - - ( + cor0.col1 ) * - col0 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT + 88 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

query I rowsort
SELECT + - col2 * col0 - - col0 FROM tab2 cor0
----
-182
-1950
-2923

query I rowsort
SELECT DISTINCT - 93 * cor0.col1 + + col0 * col0 AS col2 FROM tab0 AS cor0
----
-542
-7422
-7796

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 64 + col2 col2 FROM tab0 AS cor0
----
146
65
97

query I rowsort
SELECT tab2.col0 - 30 FROM tab2
----
-23
48
49

query I rowsort
SELECT tab2.col1 * - ( + col2 * - col2 ) + - col0 + - tab2.col2 FROM tab2
----
22565
24431
39780

onlyif mysql # use DIV operator for integer division
query I rowsort label-6141
SELECT + cor0.col1 DIV - tab0.col1 AS col0 FROM tab0, tab2, tab0 cor0
----
27 values hashing to d1b3390bf3c224e527bf68f43fea665f

skipif mysql # not compatible
query I rowsort label-6141
SELECT + cor0.col1 / - tab0.col1 AS col0 FROM tab0, tab2, tab0 cor0
----
27 values hashing to d1b3390bf3c224e527bf68f43fea665f

query I rowsort
SELECT DISTINCT 34 * + col2 * + col1 AS col2 FROM tab0
----
253708
3298
96492

onlyif mysql # use DIV operator for integer division
query I rowsort label-6143
SELECT ALL + col0 DIV col1 col0 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6143
SELECT ALL + col0 / col1 col0 FROM tab0
----
0
0
0

query I rowsort
SELECT + ( 4 ) AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

query I rowsort
SELECT + col1 + + 55 AS col1 FROM tab2 AS cor0
----
114
72
86

query I rowsort
SELECT ALL col0 * + 80 FROM tab2
----
560
6240
6320

query I rowsort
SELECT ALL - 85 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 8ebc8ffafb1517ea04e3a6fc4059d88a

query I rowsort
SELECT ALL tab0.col1 * 61 FROM tab0
----
5246
5551
5917

query I rowsort
SELECT ALL - - ( 27 ) + col0 * - 49 FROM tab1 cor0
----
-120
-3109
-3893

onlyif mysql # use DIV operator for integer division
query I rowsort label-6150
SELECT DISTINCT - + 29 DIV - col0 - col2 * + col2 col2 FROM tab2 AS cor0
----
-1444
-676
-725

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6150
SELECT DISTINCT - + 29 / - col0 - col2 * + col2 col2 FROM tab2 AS cor0
----
-1444
-676
-725

query I rowsort
SELECT col0 * - 34 FROM tab1 AS cor0
----
-102
-2176
-2720

query I rowsort
SELECT ALL - cor0.col1 + col0 * col0 FROM tab0 AS cor0
----
1128
490
7830

query I rowsort
SELECT 49 AS col0 FROM tab0, tab0 cor0
----
9 values hashing to cb40783c0fff72e8802cdf0682e7cb55

query I rowsort
SELECT ( 29 ) + cor0.col0 * + col1 AS col1 FROM tab1 AS cor0
----
1069
107
669

query I rowsort
SELECT DISTINCT + + ( col2 ) * - col0 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT + ( + 74 ) AS col2 FROM tab2 AS cor0
----
74

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6157
SELECT DISTINCT + - CAST( + ( cor0.col0 ) AS SIGNED ) * 49 FROM tab2 AS cor0
----
-343
-3822
-3871

skipif mysql # not compatible
query I rowsort label-6157
SELECT DISTINCT + - CAST ( + ( cor0.col0 ) AS INTEGER ) * 49 FROM tab2 AS cor0
----
-343
-3822
-3871

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6158
SELECT ALL - CAST( + 17 AS SIGNED ) + col1 * - col0 FROM tab1 cor0
----
-1057
-657
-95

skipif mysql # not compatible
query I rowsort label-6158
SELECT ALL - CAST ( + 17 AS INTEGER ) + col1 * - col0 FROM tab1 cor0
----
-1057
-657
-95

query I rowsort
SELECT ALL - - 68 + cor0.col1 AS col1 FROM tab1 AS cor0
----
78
81
94

query I rowsort
SELECT DISTINCT - 66 * col1 * col1 - - col2 FROM tab1 AS cor0
----
-11058
-44562
-6543

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6161
SELECT DISTINCT + 85 + + 27 * col1 * + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6161
SELECT DISTINCT + 85 + + 27 * col1 * + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT - + 40 + + col2 * - col1 FROM tab0 cor0
----
-137
-2878
-7502

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6163
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-6163
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
NULL

query I rowsort
SELECT DISTINCT + 36 AS col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
36

query I rowsort
SELECT - + 40 * col2 + col2 FROM tab0 AS cor0
----
-1287
-3198
-39

query I rowsort
SELECT ALL + + 22 + - cor0.col2 + - 76 AS col0 FROM tab2 AS cor0
----
-80
-81
-92

query I rowsort
SELECT + cor0.col2 * col0 + - 19 FROM tab2 AS cor0
----
170
2009
2983

query I rowsort
SELECT - - col0 * - 76 * 21 AS col1 FROM tab0 AS cor0
----
-142044
-38304
-55860

query I rowsort
SELECT col2 * ( 20 ) FROM tab1 AS cor0
----
1080
1140
1920

query I rowsort
SELECT DISTINCT 87 * - cor0.col1 AS col2 FROM tab0, tab0 AS cor0
----
-7482
-7917
-8439

query I rowsort
SELECT DISTINCT col2 + - col1 + - col1 FROM tab1 AS cor0
----
2
37
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-6172
SELECT DISTINCT - 23 + col2 + col1 DIV + 8 FROM tab2 AS cor0
----
10
17
7

skipif mysql # not compatible
query I rowsort label-6172
SELECT DISTINCT - 23 + col2 + col1 / + 8 FROM tab2 AS cor0
----
10
17
7

query I rowsort
SELECT - + cor0.col0 * col2 + col2 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT - - 99 AS col0 FROM tab0 AS cor0
----
99
99
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 42 * col0 col0 FROM tab2 AS cor0
----
294
3276
3318

onlyif mysql # use DIV operator for integer division
query I rowsort label-6176
SELECT DISTINCT + col0 - - cor0.col1 DIV - cor0.col0 FROM tab2 AS cor0
----
3
78
79

skipif mysql # not compatible
query I rowsort label-6176
SELECT DISTINCT + col0 - - cor0.col1 / - cor0.col0 FROM tab2 AS cor0
----
3
78
79

query I rowsort
SELECT DISTINCT col2 * cor0.col1 + ( + col0 * - cor0.col1 ) FROM tab0 cor0
----
-3298
-637
774

query I rowsort
SELECT DISTINCT - + cor0.col2 + col2 AS col2 FROM tab1 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6179
SELECT - 67 + col1 DIV + col0 col1 FROM tab0
----
-64
-65
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6179
SELECT - 67 + col1 / + col0 col1 FROM tab0
----
-64
-65
-66

onlyif mysql # use DIV operator for integer division
query I rowsort label-6180
SELECT + ( + 5 ) DIV + col1 - - 67 col2 FROM tab0
----
67
67
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6180
SELECT + ( + 5 ) / + col1 - - 67 col2 FROM tab0
----
67
67
67

query I rowsort
SELECT 98 - col1 FROM tab2
----
39
67
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( - 13 ) * - cor1.col1 col1 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 6c835d28094175a5f57879b96a80a1cb

query I rowsort
SELECT DISTINCT 14 + 15 AS col0 FROM tab1 cor0 CROSS JOIN tab1 AS cor1
----
29

query I rowsort
SELECT ALL + 19 + col0 FROM tab1 AS cor0
----
22
83
99

query I rowsort
SELECT ALL - - col2 * - col1 + 20 FROM tab1 AS cor0
----
-1228
-1384
-550

query I rowsort
SELECT cor0.col0 - 70 FROM tab1 AS cor0
----
-6
-67
10

query I rowsort
SELECT + col1 + + col0 + - 79 FROM tab1 AS cor0
----
-5
-50
14

query I rowsort
SELECT + cor0.col0 * ( + 35 * col0 ) + + 51 + col1 FROM tab2 AS cor0
----
1797
213050
218503

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6189
SELECT DISTINCT CAST( 4 * tab1.col2 AS SIGNED ) FROM tab1, tab0 AS cor0
----
216
228
384

skipif mysql # not compatible
query I rowsort label-6189
SELECT DISTINCT CAST ( 4 * tab1.col2 AS INTEGER ) FROM tab1, tab0 AS cor0
----
216
228
384

query I rowsort
SELECT + col1 * + col1 * + col0 + - col0 FROM tab2
----
22752
271440
6720

query I rowsort
SELECT - 22 * - cor0.col1 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to d6350d60c1116e92259eed3dfb7b46bc

query I rowsort
SELECT DISTINCT - 75 + col0 AS col1 FROM tab1 AS cor0
----
-11
-72
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-6193
SELECT 24 DIV col0 + col2 AS col0 FROM tab2 AS cor0
----
26
30
38

skipif mysql # not compatible
query I rowsort label-6193
SELECT 24 / col0 + col2 AS col0 FROM tab2 AS cor0
----
26
30
38

query I rowsort
SELECT ALL - ( + col2 ) + + col1 - 10 FROM tab0 AS cor0
----
-1
43
86

query I rowsort
SELECT DISTINCT - cor0.col2 - + col1 AS col0 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT DISTINCT - 69 AS col1 FROM tab2 AS cor0
----
-69

query I rowsort
SELECT + + col0 + col2 * + col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT ALL col1 - col1 * - col0 * ( + col2 * - col2 ) FROM tab1 cor0
----
-2079350
-227422
-9584627

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6199
SELECT ALL + + CAST( NULL AS SIGNED ) + ( - col0 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6199
SELECT ALL + + CAST ( NULL AS INTEGER ) + ( - col0 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( 29 ) * col1 + - ( col0 ) - col0 col1 FROM tab1 cor0
----
-418
-537
-760

query I rowsort
SELECT ALL - ( + col2 ) + - col1 * + ( col2 ) AS col0 FROM tab1 AS cor0
----
-1344
-1458
-627

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6202
SELECT + CAST( NULL AS SIGNED ) * 56 + - col2 + - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6202
SELECT + CAST ( NULL AS INTEGER ) * 56 + - col2 + - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col1 * 28 FROM tab0 AS cor0
----
-2408
-2548
-2716

query I rowsort
SELECT DISTINCT - + ( - 91 ) + + cor0.col2 AS col2 FROM tab1 AS cor0
----
145
148
187

query I rowsort
SELECT - 60 + + col2 AS col2 FROM tab0 AS cor0
----
-27
-59
22

query I rowsort
SELECT DISTINCT + + 18 + col2 AS col1 FROM tab2 AS cor0
----
44
45
56

query I rowsort
SELECT ALL - ( - col1 ) * - cor0.col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT - + 19 FROM tab1 cor0
----
-19

query I rowsort
SELECT ALL - cor0.col1 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT - + 86 AS col1 FROM tab1 AS cor0
----
-86
-86
-86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6211
SELECT - ( - ( - cor1.col1 ) + + CAST( NULL AS SIGNED ) ) FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-6211
SELECT - ( - ( - cor1.col1 ) + + CAST ( NULL AS INTEGER ) ) FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT + col2 * col2 + - cor0.col2 * 34 FROM tab0 cor0
----
-33
-33
3936

query I rowsort
SELECT ALL + col2 * - 92 AS col2 FROM tab0 AS cor0
----
-3036
-7544
-92

query I rowsort
SELECT ALL + col1 * ( - cor0.col1 ) AS col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL + col2 * + 33 AS col0 FROM tab2 AS cor0
----
1254
858
891

onlyif mysql # use DIV operator for integer division
query I rowsort label-6216
SELECT + cor0.col1 DIV 41 FROM tab2 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6216
SELECT + cor0.col1 / 41 FROM tab2 AS cor0
----
0
0
1

query I rowsort
SELECT - - cor0.col2 + col1 * - col1 FROM tab0 cor0
----
-7363
-8199
-9408

query I rowsort
SELECT 68 FROM tab2, tab1 AS cor0, tab0 cor1
----
27 values hashing to 10aa25f1c6b97582c34521ac6452e0b4

query I rowsort
SELECT - col1 * cor0.col0 + + col2 AS col1 FROM tab0 cor0
----
-2031
-3394
-8017

query I rowsort
SELECT - - col0 * + col0 + col2 - + 13 * col1 FROM tab2 AS cor0
----
-327
5343
6058

query I rowsort
SELECT DISTINCT + tab1.col2 + + col1 * - 44 + col0 AS col1 FROM tab1
----
-1087
-319
-396

query I rowsort
SELECT - ( ( col1 ) ) * col1 + 39 + cor0.col1 * cor0.col2 FROM tab1 AS cor0
----
1118
509
767

query I rowsort
SELECT col0 + - col2 + cor0.col2 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT + col0 - 92 AS col1 FROM tab2 AS cor0
----
-13
-14
-85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6225
SELECT DISTINCT col2 * + CAST( NULL AS DECIMAL ) + col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-6225
SELECT DISTINCT col2 * + CAST ( NULL AS REAL ) + col2 FROM tab1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col1 * - ( - tab2.col2 ) * - tab2.col2 col1 FROM tab2
----
22599
24548
39884

query I rowsort
SELECT DISTINCT - 3 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
-3

query I rowsort
SELECT ALL + 58 * col0 AS col0 FROM tab2
----
406
4524
4582

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * + 77 col1 FROM tab0 AS cor0
----
-6622
-7007
-7469

query I rowsort
SELECT col2 * ( - 31 ) FROM tab2 AS cor0
----
-1178
-806
-837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6231
SELECT + cor0.col1 * - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6231
SELECT + cor0.col1 * - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 + + ( + col0 ) FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT - - col1 * 16 + cor0.col2 FROM tab1 AS cor0
----
217
304
470

query I rowsort
SELECT - + 23 AS col0 FROM tab1 cor0
----
-23
-23
-23

query I rowsort
SELECT - 73 + + cor0.col1 FROM tab2 AS cor0
----
-14
-42
-56

query I rowsort
SELECT col2 * + ( + col2 ) + cor0.col2 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT + col1 * + 57 FROM tab0 AS cor0
----
4902
5187
5529

query I rowsort
SELECT col1 + 97 * col2 + - col1 AS col1 FROM tab2 AS cor0
----
2522
2619
3686

query I rowsort
SELECT + 89 FROM tab1, tab2 AS cor0
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT DISTINCT - col1 + + 64 + + col2 * col1 FROM tab1 AS cor0
----
1299
1442
624

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 32 col1 FROM tab2 AS cor0
----
-32
-32
-32

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6242
SELECT CAST( 74 AS SIGNED ) * + col1 AS col0 FROM tab1
----
1924
740
962

skipif mysql # not compatible
query I rowsort label-6242
SELECT CAST ( 74 AS INTEGER ) * + col1 AS col0 FROM tab1
----
1924
740
962

query I rowsort
SELECT ALL ( col0 + - col2 ) FROM tab1
----
-16
-51
7

query I rowsort
SELECT DISTINCT - cor0.col1 * col2 * 81 - col0 AS col2 FROM tab0 cor0
----
-229902
-604511
-7892

query I rowsort
SELECT DISTINCT + - 26 * + cor0.col1 AS col1 FROM tab1 AS cor0
----
-260
-338
-676

query I rowsort
SELECT - tab1.col2 * 4 + col0 * + col1 + - col0 * col0 AS col2 FROM tab1
----
-147
-3684
-5744

query I rowsort
SELECT DISTINCT + 75 + 9 + - col2 FROM tab2
----
46
57
58

query I rowsort
SELECT col0 * - col2 + ( 60 ) FROM tab2
----
-129
-1968
-2942

query I rowsort
SELECT 68 + col2 AS col2 FROM tab0
----
101
150
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + + col0 col0 FROM tab1 cor0
----
128
160
6

query I rowsort
SELECT DISTINCT - 19 * col0 FROM tab0 AS cor0
----
-1691
-456
-665

query I rowsort
SELECT - + ( col0 ) + + col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT - - col2 * + col1 + + col1 AS col2 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT ALL - 63 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 5a7845ef6e239561caf9a17a28e274b5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * - 23 + - col2 col1 FROM tab0 AS cor0
----
1804
22
726

query I rowsort
SELECT 82 * col1 FROM tab2 AS cor0
----
1394
2542
4838

query I rowsort
SELECT ALL 73 + - col0 * col2 FROM tab2 AS cor0
----
-116
-1955
-2929

query I rowsort
SELECT ALL - + col1 + - 90 FROM tab1 AS cor0
----
-100
-103
-116

onlyif mysql # use DIV operator for integer division
query I rowsort label-6259
SELECT + col1 + + 32 DIV + col0 AS col0 FROM tab2 AS cor0
----
17
35
59

skipif mysql # not compatible
query I rowsort label-6259
SELECT + col1 + + 32 / + col0 AS col0 FROM tab2 AS cor0
----
17
35
59

query I rowsort
SELECT DISTINCT col2 * ( + col1 ) AS col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT - col2 * ( - col0 ) FROM tab2 cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6262
SELECT ALL + - col1 * + CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6262
SELECT ALL + - col1 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6263
SELECT col2 DIV + 26 AS col0 FROM tab1 AS cor0
----
2
2
3

skipif mysql # not compatible
query I rowsort label-6263
SELECT col2 / + 26 AS col0 FROM tab1 AS cor0
----
2
2
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6264
SELECT DISTINCT + col0 * - CAST( NULL AS SIGNED ) + col0 AS col0 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6264
SELECT DISTINCT + col0 * - CAST ( NULL AS INTEGER ) + col0 AS col0 FROM tab2 cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6265
SELECT DISTINCT - col2 * + CAST( NULL AS SIGNED ) col2 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6265
SELECT DISTINCT - col2 * + CAST ( NULL AS INTEGER ) col2 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 * + col0 + - ( col0 ) + col0 col2 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT + col2 * 15 FROM tab0 AS cor0
----
1230
15
495

query I rowsort
SELECT - col2 + + col1 * - 42 AS col0 FROM tab2 AS cor0
----
-1329
-2504
-752

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 32 + tab2.col2 * col2 col2 FROM tab2
----
1476
708
761

query I rowsort
SELECT col1 + - col0 + ( 62 * + tab1.col2 + - 26 ) FROM tab1
----
3345
3454
5859

query I rowsort
SELECT - - cor0.col1 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT ALL 7 + + tab0.col1 FROM tab0
----
104
93
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-6273
SELECT - col2 DIV tab1.col0 + col2 * ( col1 * col1 ) - 55 FROM tab1
----
16168
36431
5645

skipif mysql # not compatible
query I rowsort label-6273
SELECT - col2 / tab1.col0 + col2 * ( col1 * col1 ) - 55 FROM tab1
----
16168
36431
5645

query I rowsort
SELECT + - col1 * + ( col1 ) FROM tab1 AS cor0
----
-100
-169
-676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col2 + + col1 col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT - col1 + + 85 * col0 FROM tab2 AS cor0
----
564
6571
6698

onlyif mysql # use DIV operator for integer division
query I rowsort label-6277
SELECT DISTINCT + - col0 DIV - 27 + ( - col0 + + cor0.col0 ) FROM tab1 AS cor0
----
0
2

skipif mysql # not compatible
query I rowsort label-6277
SELECT DISTINCT + - col0 / - 27 + ( - col0 + + cor0.col0 ) FROM tab1 AS cor0
----
0
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-6278
SELECT DISTINCT - col1 + 11 DIV + col2 AS col1 FROM tab1 cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-6278
SELECT DISTINCT - col1 + 11 / + col2 AS col1 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT - col1 + + 3 * + cor0.col1 AS col0 FROM tab0 cor0
----
172
182
194

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6280
SELECT DISTINCT col2 * + ( col1 + + col2 ) * CAST( 13 AS SIGNED ) FROM tab0
----
1274
184418
51051

skipif mysql # not compatible
query I rowsort label-6280
SELECT DISTINCT col2 * + ( col1 + + col2 ) * CAST ( 13 AS INTEGER ) FROM tab0
----
1274
184418
51051

query I rowsort
SELECT - col0 * + cor0.col0 + col2 AS col2 FROM tab2 AS cor0
----
-22
-6058
-6203

query I rowsort
SELECT col1 + 22 * + col2 FROM tab2 AS cor0
----
625
631
853

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6283
SELECT ALL 41 * col2 + - CAST( 12 * col0 AS SIGNED ) FROM tab2 AS cor0
----
1023
130
610

skipif mysql # not compatible
query I rowsort label-6283
SELECT ALL 41 * col2 + - CAST ( 12 * col0 AS INTEGER ) FROM tab2 AS cor0
----
1023
130
610

onlyif mysql # use DIV operator for integer division
query I rowsort label-6284
SELECT + 64 * col2 DIV col1 FROM tab1
----
132
364
472

skipif mysql # not compatible
query I rowsort label-6284
SELECT + 64 * col2 / col1 FROM tab1
----
132
364
472

query I rowsort
SELECT ALL cor0.col2 + col1 * col2 AS col2 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT - 32 - col1 FROM tab1
----
-42
-45
-58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 * col1 - - col2 col2 FROM tab2
----
327
3507
988

query I rowsort
SELECT DISTINCT + ( + col2 * + 48 ) + col0 AS col1 FROM tab0
----
1608
4025
83

query I rowsort
SELECT - 48 + tab2.col1 AS col2 FROM tab2
----
-17
-31
11

onlyif mysql # use DIV operator for integer division
query I rowsort label-6290
SELECT 68 DIV - col0 + 71 * + col0 AS col1 FROM tab0 AS cor0
----
1702
2484
6319

skipif mysql # not compatible
query I rowsort label-6290
SELECT 68 / - col0 + 71 * + col0 AS col1 FROM tab0 AS cor0
----
1702
2484
6319

query I rowsort
SELECT DISTINCT + 20 + col1 * col1 * + cor0.col2 FROM tab2 AS cor0
----
11002
25967
90526

query I rowsort
SELECT DISTINCT + col1 * cor0.col2 + ( cor0.col0 + + col2 * - ( + 61 ) ) AS col0 FROM tab1 AS cor0
----
-1887
-2843
-4528

query I rowsort
SELECT + - 5 * col2 + cor0.col1 FROM tab0 AS cor0
----
-319
-79
92

query I rowsort
SELECT DISTINCT - - tab1.col0 FROM tab2, tab0, tab2 AS cor0, tab1
----
3
64
80

query I rowsort
SELECT ALL + col1 * + cor0.col0 + 93 * 9 AS col1 FROM tab2 AS cor0
----
1054
2180
5439

query I rowsort
SELECT - 6 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to e92b2679faac7be63701967e3f0c0934

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6297
SELECT col0 + CAST( NULL AS DECIMAL ) * col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6297
SELECT col0 + CAST ( NULL AS REAL ) * col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6298
SELECT ALL - 90 + cor0.col2 DIV - col0 AS col1 FROM tab0 AS cor0
----
-90
-90
-91

skipif mysql # not compatible
query I rowsort label-6298
SELECT ALL - 90 + cor0.col2 / - col0 AS col1 FROM tab0 AS cor0
----
-90
-90
-91

query I rowsort
SELECT - col2 * 74 AS col2 FROM tab1
----
-3996
-4218
-7104

onlyif mysql # use DIV operator for integer division
query I rowsort label-6300
SELECT + col0 DIV col0 + - col2 * col2 FROM tab0 AS cor0
----
-1088
-6723
0

skipif mysql # not compatible
query I rowsort label-6300
SELECT + col0 / col0 + - col2 * col2 FROM tab0 AS cor0
----
-1088
-6723
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6301
SELECT ALL cor0.col2 + 46 DIV + cor0.col0 AS col1 FROM tab2 AS cor0
----
26
33
38

skipif mysql # not compatible
query I rowsort label-6301
SELECT ALL cor0.col2 + 46 / + cor0.col0 AS col1 FROM tab2 AS cor0
----
26
33
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6302
SELECT ALL col0 * - CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6302
SELECT ALL col0 * - CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT col1 - - 47 * + col2 FROM tab1 AS cor0
----
2564
2689
4525

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 46 + + 52 col2 FROM tab2
----
98
98
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-6305
SELECT - + cor0.col2 + 4 DIV col0 AS col1 FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-6305
SELECT - + cor0.col2 + 4 / col0 AS col1 FROM tab2 AS cor0
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-6306
SELECT DISTINCT + 81 + col0 DIV col1 AS col2 FROM tab1 AS cor0
----
81
87

skipif mysql # not compatible
query I rowsort label-6306
SELECT DISTINCT + 81 + col0 / col1 AS col2 FROM tab1 AS cor0
----
81
87

query I rowsort
SELECT DISTINCT - - 13 AS col2 FROM tab0 AS cor0
----
13

query I rowsort
SELECT DISTINCT - ( - col0 ) + - col0 * - ( + col0 ) FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT ALL + ( - col1 ) * col1 FROM tab2 cor0
----
-289
-3481
-961

query I rowsort
SELECT DISTINCT + - ( + ( + col2 ) ) FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT + col2 * cor0.col1 * 22 AS col0 FROM tab0 AS cor0
----
164164
2134
62436

onlyif mysql # use DIV operator for integer division
query I rowsort label-6312
SELECT - 18 + col1 DIV - 73 FROM tab0 cor0
----
-19
-19
-19

skipif mysql # not compatible
query I rowsort label-6312
SELECT - 18 + col1 / - 73 FROM tab0 cor0
----
-19
-19
-19

query I rowsort
SELECT ALL + col1 * col1 - - col1 * - col0 AS col2 FROM tab2 cor0
----
-1054
-1121
744

query I rowsort
SELECT DISTINCT + col0 * col1 + + 74 FROM tab2 AS cor0
----
1417
291
4676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + - cor0.col0 * 25 col0 FROM tab0 AS cor0
----
-2316
-686
-972

query I rowsort
SELECT DISTINCT + 55 - - col0 AS col0 FROM tab0 AS cor0
----
144
79
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-6317
SELECT DISTINCT - col0 DIV - 28 FROM tab1
----
0
2

skipif mysql # not compatible
query I rowsort label-6317
SELECT DISTINCT - col0 / - 28 FROM tab1
----
0
2

query I rowsort
SELECT ALL + tab1.col2 AS col2 FROM tab1, tab2 AS cor0, tab1 cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6319
SELECT - - col1 * CAST( - col1 + col1 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6319
SELECT - - col1 * CAST ( - col1 + col1 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - col1 + + 91 + + cor0.col2 AS col2 FROM tab0 AS cor0
----
-5
38
82

query I rowsort
SELECT + ( + 70 ) FROM tab2 AS cor0
----
70
70
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + ( col1 ) * col0 + - ( ( + col0 ) ) col1 FROM tab0 cor0
----
-2088
-3430
-8188

query I rowsort
SELECT + ( + cor0.col0 ) * - col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL + + 99 AS col0 FROM tab0 AS cor0
----
99
99
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6325
SELECT ALL - - CAST( - col0 AS SIGNED ) AS col1 FROM tab0 cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-6325
SELECT ALL - - CAST ( - col0 AS INTEGER ) AS col1 FROM tab0 cor0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 20 col2 FROM tab2, tab0 cor0
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6327
SELECT - CAST( + 18 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-18
-18
-18

skipif mysql # not compatible
query I rowsort label-6327
SELECT - CAST ( + 18 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-18
-18
-18

query I rowsort
SELECT DISTINCT + + 9 * + col1 FROM tab2 AS cor0
----
153
279
531

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 1 - tab2.col2 col1 FROM tab2
----
-25
-26
-37

query I rowsort
SELECT - - col2 * col1 + - 92 FROM tab1 AS cor0
----
1156
1312
478

onlyif mysql # use DIV operator for integer division
query I rowsort label-6331
SELECT + - cor0.col2 - col2 DIV - 84 FROM tab1 cor0
----
-54
-57
-95

skipif mysql # not compatible
query I rowsort label-6331
SELECT + - cor0.col2 - col2 / - 84 FROM tab1 cor0
----
-54
-57
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-6332
SELECT 37 + - col1 DIV - ( 34 ) FROM tab0 AS cor0
----
39
39
39

skipif mysql # not compatible
query I rowsort label-6332
SELECT 37 + - col1 / - ( 34 ) FROM tab0 AS cor0
----
39
39
39

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6333
SELECT - + 39 + + col1 * CAST( col1 AS SIGNED ) + + col2 * col1 FROM tab0 AS cor0
----
10195
15704
9467

skipif mysql # not compatible
query I rowsort label-6333
SELECT - + 39 + + col1 * CAST ( col1 AS INTEGER ) + + col2 * col1 FROM tab0 AS cor0
----
10195
15704
9467

query I rowsort
SELECT + col1 + + 87 * col2 AS col0 FROM tab1 AS cor0
----
4724
4969
8365

query I rowsort
SELECT + + col0 + - 61 FROM tab2 cor0
----
-54
17
18

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6336
SELECT + col1 * + CAST( NULL AS SIGNED ) + - col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6336
SELECT + col1 * + CAST ( NULL AS INTEGER ) + - col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * ( col2 ) + - col2 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT col0 * - col0 + cor0.col0 + cor0.col1 AS col1 FROM tab0 AS cor0
----
-1093
-466
-7741

query I rowsort
SELECT - col0 * - col2 + + col0 AS col2 FROM tab2 cor0
----
196
2106
3081

skipif mysql # not compatible
query I rowsort
SELECT ALL + CAST ( 39 AS REAL ) AS col1 FROM tab2, tab0 cor0, tab2 AS cor1
----
27 values hashing to ed2ebd9def3e2c38aa46cb3af60fe229

query I rowsort
SELECT + col2 * - tab0.col2 AS col2 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT ALL - 19 * - col0 AS col0 FROM tab1
----
1216
1520
57

query I rowsort
SELECT ALL 10 * - col0 FROM tab1
----
-30
-640
-800

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6344
SELECT ALL col0 * + CAST( col0 AS SIGNED ) * col2 FROM tab1 AS cor0
----
233472
486
614400

skipif mysql # not compatible
query I rowsort label-6344
SELECT ALL col0 * + CAST ( col0 AS INTEGER ) * col2 FROM tab1 AS cor0
----
233472
486
614400

query I rowsort
SELECT + cor0.col2 + 91 AS col1 FROM tab2 cor0
----
117
118
129

query I rowsort
SELECT ALL - 53 * col2 AS col1 FROM tab1
----
-2862
-3021
-5088

onlyif mysql # use DIV operator for integer division
query I rowsort label-6347
SELECT - col2 + - col2 + col1 DIV col0 AS col1 FROM tab0 cor0
----
-163
-63
0

skipif mysql # not compatible
query I rowsort label-6347
SELECT - col2 + - col2 + col1 / col0 AS col1 FROM tab0 cor0
----
-163
-63
0

query I rowsort
SELECT DISTINCT 55 AS col2 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
55

onlyif mysql # use DIV operator for integer division
query I rowsort label-6349
SELECT DISTINCT - col1 DIV ( - col2 ) AS col2 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-6349
SELECT DISTINCT - col1 / ( - col2 ) AS col2 FROM tab0 AS cor0
----
1
2
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6350
SELECT - + col1 * - 77 + col1 DIV + col0 AS col1 FROM tab2 AS cor0
----
1309
2391
4543

skipif mysql # not compatible
query I rowsort label-6350
SELECT - + col1 * - 77 + col1 / + col0 AS col1 FROM tab2 AS cor0
----
1309
2391
4543

query I rowsort
SELECT + + cor0.col1 + col0 + + 28 FROM tab0 cor0
----
138
160
208

query I rowsort
SELECT DISTINCT - 60 FROM tab0, tab0 AS cor0
----
-60

query I rowsort
SELECT ALL - - cor0.col0 + 87 AS col1 FROM tab0 AS cor0
----
111
122
176

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6354
SELECT - tab2.col0 - + CAST( NULL AS SIGNED ) AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-6354
SELECT - tab2.col0 - + CAST ( NULL AS INTEGER ) AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-6355
SELECT + 72 * col0 DIV 80 FROM tab0
----
21
31
80

skipif mysql # not compatible
query I rowsort label-6355
SELECT + 72 * col0 / 80 FROM tab0
----
21
31
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 13 col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 184e52d7aa5aa66591291e39c67a3dfb

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 + + 30 + col0 col1 FROM tab1 AS cor0
----
30
30
30

query I rowsort
SELECT DISTINCT col0 + ( col0 * + col1 ) FROM tab0 AS cor0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-6359
SELECT ALL + col2 + + col0 DIV col1 + col1 FROM tab2 AS cor0
----
58
59
86

skipif mysql # not compatible
query I rowsort label-6359
SELECT ALL + col2 + + col0 / col1 + col1 FROM tab2 AS cor0
----
58
59
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 32 + col1 * col0 col2 FROM tab1 AS cor0
----
1072
110
672

query I rowsort
SELECT ALL + - ( ( - col0 ) ) FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - col2 + - tab2.col0 AS col2 FROM tab2
----
-104
-117
-34

query I rowsort
SELECT DISTINCT + col0 + 50 FROM tab2
----
128
129
57

query I rowsort
SELECT ALL + ( - 94 ) AS col2 FROM tab0 cor0
----
-94
-94
-94

query I rowsort
SELECT DISTINCT 97 + - 98 * + col2 FROM tab0 AS cor0
----
-1
-3137
-7939

query I rowsort
SELECT ALL - 13 * col1 FROM tab1 cor0
----
-130
-169
-338

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6367
SELECT + CAST( NULL AS SIGNED ) * col2 AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6367
SELECT + CAST ( NULL AS INTEGER ) * col2 AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 * + 6 FROM tab1 AS cor0
----
156
60
78

query I rowsort
SELECT - col2 * - 69 AS col1 FROM tab1
----
3726
3933
6624

query I rowsort
SELECT DISTINCT + col1 * - col1 + + col2 + + col0 AS col2 FROM tab2
----
-172
-3377
-927

query I rowsort
SELECT ALL col1 + 47 * - col1 AS col0 FROM tab0
----
-3956
-4186
-4462

query I rowsort
SELECT ALL col0 + 92 FROM tab2
----
170
171
99

query I rowsort
SELECT + col1 * - ( - 82 ) * - col0 + ( - col2 * + tab0.col1 + + col2 ) AS col0 FROM tab0
----
-172053
-278486
-671498

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6374
SELECT ALL + col1 + - CAST( NULL AS SIGNED ) col2 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6374
SELECT ALL + col1 + - CAST ( NULL AS INTEGER ) col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT tab0.col2 + 94 FROM tab0
----
127
176
95

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6376
SELECT DISTINCT col1 * CAST( + ( - col2 ) AS SIGNED ) + 0 FROM tab1
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort label-6376
SELECT DISTINCT col1 * CAST ( + ( - col2 ) AS INTEGER ) + 0 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT col1 + col1 * col0 AS col2 FROM tab1
----
104
1053
650

onlyif mysql # use DIV operator for integer division
query I rowsort label-6378
SELECT col2 + col2 DIV + col1 AS col1 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-6378
SELECT col2 + col2 / + col1 AS col1 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort
SELECT ALL col1 + + CAST ( 53 * + col1 AS REAL ) AS col0 FROM tab2
----
1674
3186
918

query I rowsort
SELECT DISTINCT + ( col0 ) * col0 + + col1 AS col2 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT DISTINCT + - ( col0 ) * - col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT col1 + col1 * + col1 FROM tab2 AS cor0
----
306
3540
992

query I rowsort
SELECT - ( + col1 * col2 + col0 ) FROM tab0
----
-132
-2862
-7551

query I rowsort
SELECT 14 * + col2 FROM tab2 cor0
----
364
378
532

onlyif mysql # use DIV operator for integer division
query I rowsort label-6385
SELECT ALL - col0 DIV cor0.col0 + + col1 FROM tab0 AS cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-6385
SELECT ALL - col0 / cor0.col0 + + col1 FROM tab0 AS cor0
----
85
90
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 - - col1 col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + col1 * + cor0.col2 * - col0 + col2 + col2 FROM tab2 AS cor0
----
-119600
-50958
-5805

query I rowsort
SELECT ALL + 20 * - col2 AS col1 FROM tab2 AS cor0
----
-520
-540
-760

query I rowsort
SELECT ALL 42 + col2 FROM tab2 AS cor0
----
68
69
80

query I rowsort
SELECT + 31 AS col1 FROM tab0 AS cor0
----
31
31
31

onlyif mysql # use DIV operator for integer division
query I rowsort label-6391
SELECT DISTINCT 87 + tab0.col1 DIV col0 FROM tab0
----
88
89
90

skipif mysql # not compatible
query I rowsort label-6391
SELECT DISTINCT 87 + tab0.col1 / col0 FROM tab0
----
88
89
90

query I rowsort
SELECT - col0 + + 22 * col0 FROM tab2
----
147
1638
1659

query I rowsort
SELECT DISTINCT col1 * col0 + + col2 FROM tab0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT col0 * - 59 + tab0.col2 + 3 AS col0 FROM tab0
----
-1380
-2061
-5166

query I rowsort
SELECT + - col1 * 80 + col1 FROM tab0 AS cor0
----
-6794
-7189
-7663

query I rowsort
SELECT DISTINCT + - ( ( + col1 ) ) FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT ALL + - 66 * + cor0.col0 FROM tab0 AS cor0
----
-1584
-2310
-5874

onlyif mysql # use DIV operator for integer division
query I rowsort label-6398
SELECT - tab1.col0 DIV 41 AS col0 FROM tab1
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-6398
SELECT - tab1.col0 / 41 AS col0 FROM tab1
----
-1
-1
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6399
SELECT - CAST( col0 AS SIGNED ) * col2 * col2 FROM tab1 AS cor0
----
-207936
-737280
-8748

skipif mysql # not compatible
query I rowsort label-6399
SELECT - CAST ( col0 AS INTEGER ) * col2 * col2 FROM tab1 AS cor0
----
-207936
-737280
-8748

query I rowsort
SELECT + + 96 + col1 AS col1 FROM tab2 cor0
----
113
127
155

query I rowsort
SELECT DISTINCT + cor0.col1 * - cor0.col0 + - col2 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT DISTINCT + - col0 + + cor0.col2 AS col0 FROM tab1 cor0
----
-7
16
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + + col0 col0 FROM tab1 cor0
----
-23
54
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-6404
SELECT ALL + 93 DIV col0 AS col0 FROM tab1 AS cor0
----
1
1
31

skipif mysql # not compatible
query I rowsort label-6404
SELECT ALL + 93 / col0 AS col0 FROM tab1 AS cor0
----
1
1
31

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6405
SELECT cor0.col0 + - col0 * - CAST( NULL AS SIGNED ) AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6405
SELECT cor0.col0 + - col0 * - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - col2 + col2 * col2 * cor0.col1 AS col2 FROM tab0 AS cor0
----
611802
93621
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col0 + + col1 + col2 col0 FROM tab0 AS cor0
----
63
84
95

query I rowsort
SELECT - col0 - + cor0.col1 FROM tab2 cor0
----
-137
-38
-96

query I rowsort
SELECT + 70 * cor0.col0 FROM tab0, tab2 cor0
----
9 values hashing to 95bcdf623b519e9fb6c75e4af0962859

query I rowsort
SELECT 86 * - 71 + col0 * tab1.col0 + + col0 AS col0 FROM tab1
----
-1946
-6094
374

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + col1 * + col1 * - col1 col0 FROM tab1 cor0
----
-17573
-2117
-936

onlyif mysql # use DIV operator for integer division
query I rowsort label-6412
SELECT ALL + col2 DIV - 70 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-6412
SELECT ALL + col2 / - 70 FROM tab0 AS cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT + + col0 + + ( + cor0.col0 ) * col0 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT + col0 * + col1 * 87 AS col0 FROM tab1 AS cor0
----
55680
6786
90480

query I rowsort
SELECT ALL + col2 + 30 AS col2 FROM tab0 cor0
----
112
31
63

onlyif mysql # use DIV operator for integer division
query I rowsort label-6416
SELECT - col2 DIV - 97 col1 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6416
SELECT - col2 / - 97 col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col2 + ( - 54 ) * + cor0.col1 FROM tab2 AS cor0
----
-1647
-3160
-880

query I rowsort
SELECT DISTINCT col2 + - 40 * col1 FROM tab1 AS cor0
----
-343
-424
-986

query I rowsort
SELECT ALL - - col1 + col1 + col0 * + col2 FROM tab0 cor0
----
229
7480
964

query I rowsort
SELECT ALL - col1 + 41 FROM tab0 AS cor0
----
-45
-50
-56

query I rowsort
SELECT DISTINCT + col2 * + 42 AS col2 FROM tab2 AS cor0
----
1092
1134
1596

query I rowsort
SELECT ALL col1 * + ( + 20 ) AS col0 FROM tab0 AS cor0
----
1720
1820
1940

onlyif mysql # use DIV operator for integer division
query I rowsort label-6423
SELECT DISTINCT + col0 DIV - col0 FROM tab1 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-6423
SELECT DISTINCT + col0 / - col0 FROM tab1 AS cor0
----
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6424
SELECT CAST( NULL AS DECIMAL ) + ( col2 * col2 ) + + cor0.col1 col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6424
SELECT CAST ( NULL AS REAL ) + ( col2 * col2 ) + + cor0.col1 col2 FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6425
SELECT cor0.col1 - cor0.col1 DIV - col1 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-6425
SELECT cor0.col1 - cor0.col1 / - col1 FROM tab1 AS cor0
----
11
14
27

query I rowsort
SELECT ALL 58 + - col2 * - col1 AS col2 FROM tab0 cor0
----
155
2896
7520

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6427
SELECT CAST( col0 AS SIGNED ) * + col2 FROM tab1 cor0
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-6427
SELECT CAST ( col0 AS INTEGER ) * + col2 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT + col1 + col1 * col1 AS col0 FROM tab0
----
7482
8372
9506

query I rowsort
SELECT DISTINCT - 37 + + cor0.col0 AS col1 FROM tab2, tab0 AS cor0
----
-13
-2
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-6430
SELECT ALL + tab1.col1 DIV 60 + + col1 * + col1 + tab1.col2 AS col1 FROM tab1
----
157
265
730

skipif mysql # not compatible
query I rowsort label-6430
SELECT ALL + tab1.col1 / 60 + + col1 * + col1 + tab1.col2 AS col1 FROM tab1
----
157
265
730

query I rowsort
SELECT - + col0 * cor0.col2 + - 46 FROM tab1 cor0
----
-208
-3694
-7726

query I rowsort
SELECT DISTINCT 84 * ( + col2 ) AS col1 FROM tab1
----
4536
4788
8064

query I rowsort
SELECT - col2 * tab2.col2 * + 27 AS col2 FROM tab2
----
-18252
-19683
-38988

query I rowsort
SELECT + 77 * + col1 FROM tab2
----
1309
2387
4543

onlyif mysql # use DIV operator for integer division
query I rowsort label-6435
SELECT + 21 DIV - col0 + col0 * + 59 AS col1 FROM tab2
----
410
4602
4661

skipif mysql # not compatible
query I rowsort label-6435
SELECT + 21 / - col0 + col0 * + 59 AS col1 FROM tab2
----
410
4602
4661

query I rowsort
SELECT DISTINCT - + col0 + col0 * col2 + col1 AS col1 FROM tab1 AS cor0
----
185
3594
7613

query I rowsort
SELECT col0 * + col0 + col1 AS col1 FROM tab0 cor0 WHERE ( + col2 ) < col0 * col2 + col1
----
1322
662
8012

query I rowsort
SELECT ALL + col2 * + cor0.col2 + col0 * + col1 * + cor0.col0 FROM tab1 cor0
----
3150
44209
92416

query I rowsort
SELECT ALL col1 AS col0 FROM tab1 WHERE NOT ( + col0 * + col2 ) NOT BETWEEN col0 AND + col2
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - col2 col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT + tab1.col0 * - col0 + + col0 + col2 * - col1 FROM tab1
----
-1410
-4602
-7568

onlyif mysql # use DIV operator for integer division
query I rowsort label-6442
SELECT + tab1.col2 DIV col2 AS col0 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6442
SELECT + tab1.col2 / col2 AS col0 FROM tab1
----
1
1
1

query I rowsort
SELECT ALL col2 - col1 * tab2.col0 AS col2 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT + col0 * col2 + col2 FROM tab1
----
216
3705
7776

query I rowsort
SELECT DISTINCT col1 * + col1 * col0 AS col2 FROM tab2
----
22831
271518
6727

query III rowsort
SELECT ALL * FROM tab0 AS cor0 WHERE ( NULL ) = + col1 * col0 OR NOT col2 <= ( col1 * col1 )
----

query I rowsort
SELECT - + col2 + col2 * + col2 FROM tab2 AS cor0
----
1406
650
702

query I rowsort
SELECT - - cor0.col2 * + col1 - + col2 * col0 FROM tab2 cor0
----
-2356
-494
648

query I rowsort
SELECT col2 + col2 + col0 AS col2 FROM tab2
----
130
155
61

query I rowsort
SELECT ( - col2 + - ( col0 ) ) FROM tab0
----
-171
-36
-57

query I rowsort
SELECT col2 + + col0 * 83 * + col1 FROM tab2
----
111507
18038
381992

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6452
SELECT ALL + col0 * + col2 * CAST( 92 AS SIGNED ) - tab1.col0 AS col0 FROM tab1
----
14901
335552
706480

skipif mysql # not compatible
query I rowsort label-6452
SELECT ALL + col0 * + col2 * CAST ( 92 AS INTEGER ) - tab1.col0 AS col0 FROM tab1
----
14901
335552
706480

query I rowsort
SELECT DISTINCT - 96 * cor0.col2 AS col2 FROM tab0, tab1, tab2 AS cor0
----
-2496
-2592
-3648

query I rowsort
SELECT 28 * + cor0.col0 FROM tab0 AS cor0
----
2492
672
980

query I rowsort
SELECT DISTINCT 52 AS col0 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
52

query I rowsort
SELECT DISTINCT col1 + + 21 * + 14 AS col2 FROM tab1 AS cor0
----
304
307
320

query I rowsort
SELECT ALL + col0 - 23 FROM tab1 cor0
----
-20
41
57

query I rowsort
SELECT DISTINCT - col1 * - col0 - - col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT col2 + - ( cor0.col2 ) * col1 FROM tab1 AS cor0
----
-1152
-1350
-513

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6460
SELECT DISTINCT - + col2 / + col1 + - col1 + col1 * + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6460
SELECT DISTINCT - + col2 / + col1 + - col1 + col1 * + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL - + cor0.col0 + col1 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT - - col2 - col0 FROM tab0 cor0
----
-34
-7
9

query I rowsort
SELECT - cor0.col0 - - 81 AS col0 FROM tab2 AS cor0
----
2
3
74

query I rowsort
SELECT + + col1 - 59 FROM tab2 AS cor0
----
-28
-42
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6465
SELECT ALL col0 DIV - col0 - ( 90 ) AS col1 FROM tab0
----
-91
-91
-91

skipif mysql # not compatible
query I rowsort label-6465
SELECT ALL col0 / - col0 - ( 90 ) AS col1 FROM tab0
----
-91
-91
-91

query I rowsort
SELECT DISTINCT col2 * - col2 - - ( 5 ) * - tab2.col2 FROM tab2
----
-1634
-806
-864

skipif mysql # not compatible
query I rowsort
SELECT col2 / col2 + + CAST ( ( + col0 ) AS REAL ) FROM tab0
----
25
36
90

query I rowsort
SELECT + - col1 * col2 * - col1 FROM tab1 AS cor0
----
16224
36504
5700

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 * col1 col2 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT + col0 * + ( - 40 ) AS col2 FROM tab0 AS cor0
----
-1400
-3560
-960

query I rowsort
SELECT + col1 * + 84 + + col0 + + col1 AS col0 FROM tab0 cor0
----
7334
7824
8280

query I rowsort
SELECT col0 AS col2 FROM tab2 WHERE NULL = - col2 / col1
----

query I rowsort
SELECT col0 + + col2 * col2 * col2 AS col2 FROM tab1
----
157467
185257
884816

query I rowsort
SELECT DISTINCT col2 * col1 - + col1 AS col2 FROM tab2
----
1475
629
806

query I rowsort
SELECT ALL col1 / - col2 FROM tab0 WHERE NOT - col2 / + col0 NOT IN ( - col1 * + col1 - + tab0.col0 * col2 * + tab0.col0 )
----

query I rowsort
SELECT - tab1.col0 + col2 * col0 * col2 FROM tab1
----
207872
737200
8745

query I rowsort
SELECT ALL - col0 - col2 AS col0 FROM tab2
----
-104
-117
-34

query I rowsort
SELECT DISTINCT + col2 * col1 * col2 - + col1 FROM tab1
----
119795
32480
75790

query I rowsort
SELECT ALL tab0.col1 + col2 AS col1 FROM tab0
----
119
173
98

query III rowsort
SELECT * FROM tab2 WHERE ( col0 ) = NULL
----

query I rowsort
SELECT col0 + + col2 * col2 AS col1 FROM tab1
----
2919
3313
9296

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + col0 * tab0.col1 * - col0 col0 FROM tab0
----
-118824
-49503
-720729

query I rowsort
SELECT DISTINCT 31 * col2 AS col0 FROM tab1 cor0
----
1674
1767
2976

query III rowsort
SELECT * FROM tab2 WHERE ( NULL ) IN ( + col2 * - col0 )
----

query I rowsort
SELECT ALL tab2.col1 * col2 - - col1 * col2 AS col2 FROM tab2
----
1292
1674
3068

query III rowsort
SELECT * FROM tab1 WHERE NOT ( col1 ) >= NULL
----

query I rowsort
SELECT tab1.col1 * - 36 FROM tab1, tab0 AS cor0
----
9 values hashing to ea4c28aa5331d541a356bbeaa77e0af0

query I rowsort
SELECT + 47 * col0 + - ( 50 ) AS col0 FROM tab1
----
2958
3710
91

query I rowsort
SELECT ALL - ( 86 ) * + cor0.col2 FROM tab0, tab2 cor0
----
9 values hashing to dc1f0cb2996c6a8818fe6c88e4fc7055

query I rowsort
SELECT + 15 * - col1 + col2 * + col2 FROM tab0
----
-1454
-201
5359

query I rowsort
SELECT tab1.col2 * + 98 AS col1 FROM tab1
----
5292
5586
9408

query I rowsort
SELECT DISTINCT + col1 + 87 + - col0 FROM tab2 cor0
----
111
25
68

query I rowsort
SELECT - col2 - - 12 * cor0.col2 AS col1 FROM tab1 AS cor0
----
1056
594
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-6494
SELECT ALL + col0 * - col1 * - 34 + cor0.col1 DIV col0 FROM tab0 AS cor0
----
115432
275367
70179

skipif mysql # not compatible
query I rowsort label-6494
SELECT ALL + col0 * - col1 * - 34 + cor0.col1 / col0 FROM tab0 AS cor0
----
115432
275367
70179

query I rowsort
SELECT ALL cor0.col0 + - col1 AS col2 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT ALL - col0 + 59 FROM tab2
----
-19
-20
52

query I rowsort
SELECT DISTINCT + col2 * + col0 + col2 AS col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT + col1 + - 44 * 56 * col1 FROM tab1 AS cor0
----
-24630
-32019
-64038

query I rowsort
SELECT DISTINCT - col0 * 99 + col1 AS col0 FROM tab1 AS cor0
----
-271
-6326
-7907

query I rowsort
SELECT DISTINCT cor0.col0 + ( col1 ) FROM tab0 cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-6501
SELECT col0 + col0 DIV - col1 AS col2 FROM tab2 cor0
----
7
75
77

skipif mysql # not compatible
query I rowsort label-6501
SELECT col0 + col0 / - col1 AS col2 FROM tab2 cor0
----
7
75
77

query I rowsort
SELECT ALL col0 * 88 FROM tab1 AS cor0
----
264
5632
7040

query I rowsort
SELECT + + col0 - - col2 * col0 FROM tab1 AS cor0
----
165
3712
7760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6504
SELECT DISTINCT + col1 + - CAST( ( - col2 ) AS SIGNED ) * + col0 - + col2 * - col1 AS col1 FROM tab0 cor0
----
14851
229
3716

skipif mysql # not compatible
query I rowsort label-6504
SELECT DISTINCT + col1 + - CAST ( ( - col2 ) AS INTEGER ) * + col0 - + col2 * - col1 AS col1 FROM tab0 cor0
----
14851
229
3716

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col1 * - 84 col0 FROM tab2
----
-1428
-2604
-4956

query I rowsort
SELECT - 93 * - tab0.col2 AS col2 FROM tab0
----
3069
7626
93

query I rowsort
SELECT DISTINCT 93 * 86 FROM tab2
----
7998

query I rowsort
SELECT col1 + + col1 * tab2.col0 FROM tab2
----
1360
248
4661

query I rowsort
SELECT + 31 * col2 AS col0 FROM tab1 AS cor0
----
1674
1767
2976

onlyif mysql # use DIV operator for integer division
query I rowsort label-6510
SELECT + + col2 DIV 23 + cor0.col0 * - col0 FROM tab0 AS cor0
----
-1225
-575
-7918

skipif mysql # not compatible
query I rowsort label-6510
SELECT + + col2 / 23 + cor0.col0 * - col0 FROM tab0 AS cor0
----
-1225
-575
-7918

query I rowsort
SELECT DISTINCT - ( 86 ) * cor0.col2 FROM tab0 AS cor0
----
-2838
-7052
-86

onlyif mysql # use DIV operator for integer division
query I rowsort label-6512
SELECT ALL - 41 DIV - col1 FROM tab1 cor0
----
1
3
4

skipif mysql # not compatible
query I rowsort label-6512
SELECT ALL - 41 / - col1 FROM tab1 cor0
----
1
3
4

query I rowsort
SELECT DISTINCT 41 * 63 AS col2 FROM tab2
----
2583

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col0 ) + col2 * 47 col0 FROM tab0 AS cor0
----
1575
3943
82

query I rowsort
SELECT DISTINCT + - 12 + + cor0.col0 * + col1 FROM tab2 cor0
----
1331
205
4590

query I rowsort
SELECT - col1 * col2 * col2 FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT ALL - - 95 * - 34 AS col0 FROM tab2 AS cor0
----
-3230
-3230
-3230

query I rowsort
SELECT ALL + - 61 * col1 FROM tab1 AS cor0
----
-1586
-610
-793

query I rowsort
SELECT DISTINCT + col1 * 32 FROM tab1 AS cor0
----
320
416
832

query I rowsort
SELECT DISTINCT + 45 * + col0 AS col0 FROM tab1 AS cor0
----
135
2880
3600

query I rowsort
SELECT DISTINCT - cor0.col1 + col1 * + col1 AS col1 FROM tab2 AS cor0
----
272
3422
930

query I rowsort
SELECT DISTINCT + - 68 + + cor0.col0 AS col2 FROM tab1 AS cor0
----
-4
-65
12

query I rowsort
SELECT ALL - col1 + cor0.col1 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT 84 - + col2 * col2 FROM tab1
----
-2832
-3165
-9132

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6525
SELECT - cor0.col0 * + col2 * - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6525
SELECT - cor0.col0 * + 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 + cor0.col2 * - cor0.col0 col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL 82 AS col2 FROM tab0 AS cor0
----
82
82
82

query I rowsort
SELECT - 7 + - col0 * - col2 AS col1 FROM tab0 AS cor0
----
28
7291
785

query I rowsort
SELECT DISTINCT - - col2 * + col0 * - col2 AS col2 FROM tab1 AS cor0
----
-207936
-737280
-8748

onlyif mysql # use DIV operator for integer division
query I rowsort label-6530
SELECT - 17 DIV - col1 + col0 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-6530
SELECT - 17 / - col1 + col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT 47 + - cor0.col0 * + col1 FROM tab2 AS cor0
----
-1296
-170
-4555

query I rowsort
SELECT + + ( col1 ) * col0 + col0 * - col2 AS col2 FROM tab0 AS cor0
----
1272
3360
801

query I rowsort
SELECT DISTINCT + - col0 * col1 - cor0.col2 FROM tab2 AS cor0
----
-1381
-244
-4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-6534
SELECT ALL + 2 DIV col1 + col0 AS col0 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-6534
SELECT ALL + 2 / col1 + col0 AS col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL - col1 * 13 + + col1 AS col2 FROM tab0 AS cor0
----
-1032
-1092
-1164

query I rowsort
SELECT DISTINCT 79 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 - - 78 col2 FROM tab2 cor0
----
-1
0
71

query I rowsort
SELECT ALL col0 * 26 AS col1 FROM tab0
----
2314
624
910

query I rowsort
SELECT DISTINCT - 10 AS col2 FROM tab0, tab1 AS cor0
----
-10

query I rowsort
SELECT 93 + + 40 FROM tab1
----
133
133
133

query I rowsort
SELECT ALL col0 * col2 + col0 FROM tab2 AS cor0
----
196
2106
3081

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6542
SELECT CAST( col0 AS SIGNED ) + + col0 AS col1 FROM tab0 AS cor0
----
178
48
70

skipif mysql # not compatible
query I rowsort label-6542
SELECT CAST ( col0 AS INTEGER ) + + col0 AS col1 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT ALL + - 67 + col2 FROM tab0 cor0
----
-34
-66
15

query I rowsort
SELECT + ( + ( - col1 ) ) * - col2 * col1 + + col2 AS col2 FROM tab2 AS cor0
----
11020
25974
90532

query I rowsort
SELECT ALL 34 AS col1 FROM tab0
----
34
34
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-6546
SELECT - ( + col1 ) + col1 + cor0.col0 DIV 48 FROM tab1 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-6546
SELECT - ( + col1 ) + col1 + cor0.col0 / 48 FROM tab1 AS cor0
----
0
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6547
SELECT CAST( 60 AS SIGNED ) - col1 FROM tab1 AS cor0
----
34
47
50

skipif mysql # not compatible
query I rowsort label-6547
SELECT CAST ( 60 AS INTEGER ) - col1 FROM tab1 AS cor0
----
34
47
50

query I rowsort
SELECT - 27 * cor0.col0 + col1 AS col0 FROM tab0 AS cor0
----
-2312
-562
-848

query I rowsort
SELECT DISTINCT - col1 * - 7 - col1 AS col2 FROM tab0
----
516
546
582

onlyif mysql # use DIV operator for integer division
query I rowsort label-6550
SELECT - 72 + + col0 DIV col1 FROM tab2 AS cor0
----
-68
-71
-72

skipif mysql # not compatible
query I rowsort label-6550
SELECT - 72 + + col0 / col1 FROM tab2 AS cor0
----
-68
-71
-72

query I rowsort
SELECT + col1 * - ( - col1 ) * col2 FROM tab0 AS cor0
----
244068
679042
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-6552
SELECT ALL - col2 * 92 DIV col2 FROM tab0 AS cor0
----
-92
-92
-92

skipif mysql # not compatible
query I rowsort label-6552
SELECT ALL - col2 * 92 / col2 FROM tab0 AS cor0
----
-92
-92
-92

query I rowsort
SELECT + - 64 * + col1 AS col2 FROM tab1 cor0
----
-1664
-640
-832

query I rowsort
SELECT DISTINCT - 14 + + col1 FROM tab0 AS cor0
----
72
77
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6555
SELECT ALL CAST( NULL AS SIGNED ) FROM tab2, tab2 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-6555
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab2, tab2 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + col1 * + 66 * + col0 FROM tab1 cor0
----
42240
5148
68640

onlyif mysql # use DIV operator for integer division
query I rowsort label-6557
SELECT DISTINCT - col2 + - col0 DIV col1 AS col0 FROM tab1 AS cor0
----
-102
-54
-63

skipif mysql # not compatible
query I rowsort label-6557
SELECT DISTINCT - col2 + - col0 / col1 AS col0 FROM tab1 AS cor0
----
-102
-54
-63

query I rowsort
SELECT + ( - col1 ) + col2 * ( - cor0.col0 * col1 ) AS col2 FROM tab0 cor0
----
-3492
-664209
-68198

onlyif mysql # use DIV operator for integer division
query I rowsort label-6559
SELECT - + cor0.col1 DIV + col2 FROM tab0 AS cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-6559
SELECT - + cor0.col1 / + col2 FROM tab0 AS cor0
----
-1
-2
-97

query I rowsort
SELECT cor0.col0 * col1 AS col2 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT - + 59 * - col2 - - cor0.col1 FROM tab2 cor0
----
1593
1624
2259

query I rowsort
SELECT 80 * cor0.col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 7eca6d7f1c81d121ffad79b1a72f92c4

query I rowsort
SELECT DISTINCT + - 13 * col2 - + ( - ( + col0 ) ) * - cor0.col2 FROM tab1 AS cor0
----
-4389
-864
-8928

query I rowsort
SELECT - col2 * cor0.col1 * 0 + + col1 + + col0 AS col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT + - 28 AS col1 FROM tab2 AS cor0
----
-28

query I rowsort
SELECT + - col2 + col0 + - 19 * + 77 FROM tab1 AS cor0
----
-1456
-1479
-1514

query I rowsort
SELECT DISTINCT col2 * - col0 + - col1 AS col2 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT + cor1.col1 FROM tab1, tab1 cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT cor0.col2 * 60 FROM tab1 cor0
----
3240
3420
5760

query I rowsort
SELECT col0 * ( col2 * - col2 ) AS col1 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT - - col0 * - ( 45 ) FROM tab2 AS cor0
----
-315
-3510
-3555

query I rowsort
SELECT + + 7 FROM tab1, tab0 AS cor0
----
9 values hashing to 3362c0cb2b2c663037159d0699d46b76

query I rowsort
SELECT col2 - ( + ( + tab1.col1 ) ) * col0 FROM tab1
----
-24
-583
-944

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6574
SELECT DISTINCT ( + cor0.col1 ) + col1 * - CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6574
SELECT DISTINCT ( + cor0.col1 ) + col1 * - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT 98 * ( col0 ) + 35 * + col0 AS col1 FROM tab1 AS cor0
----
10640
399
8512

onlyif mysql # use DIV operator for integer division
query I rowsort label-6576
SELECT - col0 + col1 DIV + col2 FROM tab1
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-6576
SELECT - col0 + col1 / + col2 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT DISTINCT 12 * - col0 FROM tab1
----
-36
-768
-960

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col2 * - col0 AS REAL ) FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT + + cor0.col1 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT col1 + + ( - col1 ) * col0 * - 66 AS col2 FROM tab2
----
14353
303791
88655

query I rowsort
SELECT ALL + cor0.col2 + - cor0.col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to cd9042ce7b6d5be41db6200432d27198

query I rowsort
SELECT ALL cor0.col0 + - 70 * col1 FROM tab0 AS cor0
----
-5996
-6281
-6755

query I rowsort
SELECT + - 62 AS col2 FROM tab1 cor0
----
-62
-62
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-6584
SELECT ALL + 86 DIV - col1 AS col2 FROM tab2 AS cor0
----
-1
-2
-5

skipif mysql # not compatible
query I rowsort label-6584
SELECT ALL + 86 / - col1 AS col2 FROM tab2 AS cor0
----
-1
-2
-5

query I rowsort
SELECT ALL + ( - col0 ) + col2 * cor0.col2 + col1 FROM tab0 AS cor0
----
1151
63
6726

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6586
SELECT ALL + CAST( cor0.col2 AS SIGNED ) + cor0.col1 * - 27 FROM tab0 AS cor0
----
-2289
-2375
-2618

skipif mysql # not compatible
query I rowsort label-6586
SELECT ALL + CAST ( cor0.col2 AS INTEGER ) + cor0.col1 * - 27 FROM tab0 AS cor0
----
-2289
-2375
-2618

query I rowsort
SELECT DISTINCT - + ( col1 ) + col0 * - cor0.col0 FROM tab2 AS cor0
----
-6143
-6258
-80

query I rowsort
SELECT + col0 + + col1 * + col1 AS col2 FROM tab0 AS cor0
----
7420
8370
9444

onlyif mysql # use DIV operator for integer division
query I rowsort label-6589
SELECT DISTINCT + col1 DIV col0 + - col2 * tab0.col1 AS col0 FROM tab0
----
-2835
-7461
-95

skipif mysql # not compatible
query I rowsort label-6589
SELECT DISTINCT + col1 / col0 + - col2 * tab0.col1 AS col0 FROM tab0
----
-2835
-7461
-95

query I rowsort
SELECT 56 + + tab0.col1 + + 75 AS col0 FROM tab0
----
217
222
228

query I rowsort
SELECT + 87 * col0 + + ( - 58 ) FROM tab2
----
551
6728
6815

query I rowsort
SELECT ALL tab1.col1 + + col2 AS col2 FROM tab1
----
109
67
80

query I rowsort
SELECT ALL + 77 + col1 FROM tab2
----
108
136
94

query I rowsort
SELECT DISTINCT + - col2 * col1 + - col0 * col2 AS col2 FROM tab1 AS cor0
----
-1566
-4218
-8928

query I rowsort
SELECT DISTINCT col2 + 14 * 30 AS col2 FROM tab2 AS cor0
----
446
447
458

query I rowsort
SELECT ALL - - col1 + col2 * col1 - - col1 AS col1 FROM tab0 cor0
----
291
3010
7644

query I rowsort
SELECT - col1 * 4 FROM tab2 AS cor0
----
-124
-236
-68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * - ( - col2 ) - - cor0.col0 * + col2 col0 FROM tab2 AS cor0
----
2704
4446
918

query I rowsort
SELECT ALL + cor0.col2 * + col0 + col1 AS col0 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT DISTINCT - 30 + col2 * - col2 AS col2 FROM tab1 AS cor0
----
-2946
-3279
-9246

query I rowsort
SELECT ALL - - col0 * + col0 * col2 AS col2 FROM tab1 AS cor0
----
233472
486
614400

query I rowsort
SELECT - 34 + - 42 FROM tab1, tab0 AS cor0
----
9 values hashing to f8b6589bc7503fc720ca5430e3569317

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 13 col0 FROM tab2, tab2 AS cor0, tab0 AS cor1, tab1 AS cor2
----
13

query I rowsort
SELECT - 93 AS col0 FROM tab2, tab0 cor0, tab2 AS cor1
----
27 values hashing to ea79c61f7a02d25805171f5e85229fba

query I rowsort
SELECT DISTINCT ( + col0 + + col0 ) FROM tab0
----
178
48
70

query I rowsort
SELECT + col2 * 1 + - col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - + cor0.col0 * - col1 AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL 54 + - cor0.col1 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 38ebcbdd0ba4648ea4bb6dd631f7f095

query I rowsort
SELECT + 57 * 52 FROM tab1, tab1 AS cor0
----
9 values hashing to 271fc59d8d634d6e7bdc62aca0b5d038

onlyif mysql # use DIV operator for integer division
query I rowsort label-6610
SELECT DISTINCT col0 DIV col1 + + col0 AS col1 FROM tab2
----
7
79
83

skipif mysql # not compatible
query I rowsort label-6610
SELECT DISTINCT col0 / col1 + + col0 AS col1 FROM tab2
----
7
79
83

query I rowsort
SELECT DISTINCT col2 * 69 AS col0 FROM tab1 AS cor0
----
3726
3933
6624

query I rowsort
SELECT - + col2 * col1 + + col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT - col1 + + ( + col2 ) + col1 AS col1 FROM tab0
----
1
33
82

query I rowsort
SELECT + col1 + col0 + - 84 AS col2 FROM tab0
----
26
48
96

query I rowsort
SELECT - col2 + ( col2 ) * - tab1.col0 AS col0 FROM tab1
----
-216
-3705
-7776

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6616
SELECT + col1 * + CAST( NULL AS DECIMAL ) * tab2.col1 + col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6616
SELECT + col1 * + CAST ( NULL AS REAL ) * tab2.col1 + col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT col1 - + 11 AS col1 FROM tab1
----
-1
15
2

query I rowsort
SELECT DISTINCT col0 * + col1 + - col0 FROM tab1
----
576
75
960

onlyif mysql # use DIV operator for integer division
query I rowsort label-6619
SELECT DISTINCT + 54 DIV - tab2.col1 AS col1 FROM tab2
----
-1
-3
0

skipif mysql # not compatible
query I rowsort label-6619
SELECT DISTINCT + 54 / - tab2.col1 AS col1 FROM tab2
----
-1
-3
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 1 + col1 col0 FROM tab1
----
11
14
27

query I rowsort
SELECT DISTINCT - + ( - col1 ) + + col0 AS col2 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-6622
SELECT + col2 DIV cor0.col1 + col0 * col1 FROM tab1 AS cor0
----
1047
645
80

skipif mysql # not compatible
query I rowsort label-6622
SELECT + col2 / cor0.col1 + col0 * col1 FROM tab1 AS cor0
----
1047
645
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6623
SELECT ALL CAST( NULL AS SIGNED ) + + col1 * cor0.col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6623
SELECT ALL CAST ( NULL AS INTEGER ) + + col1 * cor0.col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6624
SELECT - CAST( NULL AS SIGNED ) + 66 * - col0 / ( - col1 + - cor0.col2 ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6624
SELECT - CAST ( NULL AS INTEGER ) + 66 * - col0 / ( - col1 + - cor0.col2 ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 + + 79 AS col2 FROM tab2 AS cor0
----
0
1
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 + - 88 col2 FROM tab0 AS cor0
----
-112
-123
-177

query I rowsort
SELECT - + col2 + + col2 * cor0.col2 FROM tab1 AS cor0
----
2862
3192
9120

onlyif mysql # use DIV operator for integer division
query I rowsort label-6628
SELECT ALL cor0.col1 DIV + ( + col0 ) AS col0 FROM tab0 cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-6628
SELECT ALL cor0.col1 / + ( + col0 ) AS col0 FROM tab0 cor0
----
1
2
3

query I rowsort
SELECT - + 1 + 65 * - cor0.col0 FROM tab1 cor0
----
-196
-4161
-5201

query I rowsort
SELECT DISTINCT col2 + + ( - col2 ) FROM tab2 AS cor0
----
0

query I rowsort
SELECT - col2 * + col1 + col0 * + ( col2 ) FROM tab0 AS cor0
----
-164
-2046
-62

query I rowsort
SELECT + - 33 AS col1 FROM tab0 AS cor0
----
-33
-33
-33

query I rowsort
SELECT DISTINCT + 17 * + 7 FROM tab0
----
119

query I rowsort
SELECT + ( 67 ) + col0 AS col2 FROM tab2 AS cor0
----
145
146
74

query I rowsort
SELECT DISTINCT + col0 * + col1 - col1 FROM tab0 AS cor0
----
1978
3298
8008

query I rowsort
SELECT - 95 + 20 FROM tab0 AS cor0
----
-75
-75
-75

query I rowsort
SELECT + col0 * col0 * + 3 FROM tab0 AS cor0
----
1728
23763
3675

query I rowsort
SELECT ALL + cor1.col2 + cor0.col2 * - 17 * 14 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 9696e6525dca370114f3fd95f051fc81

query I rowsort
SELECT ALL - col2 * col1 + col2 AS col0 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT + col0 + + ( 50 ) * + col2 FROM tab2 AS cor0
----
1357
1378
1979

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col1 * + 35 col0 FROM tab1 AS cor0
----
350
455
910

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * - 75 col0 FROM tab2 AS cor0
----
1950
2025
2850

query I rowsort
SELECT - - cor0.col0 * - 45 FROM tab1 AS cor0
----
-135
-2880
-3600

query I rowsort
SELECT ALL + col1 * 53 AS col1 FROM tab2 AS cor0
----
1643
3127
901

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col0 * - col2 col2 FROM tab1 cor0
----
-136
-3638
-7667

onlyif mysql # use DIV operator for integer division
query I rowsort label-6646
SELECT - 71 + col2 DIV - col1 AS col1 FROM tab0 AS cor0
----
-71
-71
-71

skipif mysql # not compatible
query I rowsort label-6646
SELECT - 71 + col2 / - col1 AS col1 FROM tab0 AS cor0
----
-71
-71
-71

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col0 AS REAL ) + col2 * - col0 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT tab1.col0 - - col1 * col0 FROM tab1
----
1120
704
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col1 + ( col1 ) * col1 ) col2 FROM tab1
----
110
182
702

query I rowsort
SELECT - + cor0.col2 * col2 AS col2 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT + cor0.col2 + - col2 * + cor0.col2 * cor0.col1 AS col0 FROM tab1 AS cor0
----
-119712
-32433
-75762

query I rowsort
SELECT - + 85 * col1 FROM tab0 AS cor0
----
-7310
-7735
-8245

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6653
SELECT DISTINCT + col2 + CAST( - col2 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6653
SELECT DISTINCT + col2 + CAST ( - col2 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL - col1 * col2 + col1 * col1 * 87 AS col0 FROM tab1 cor0
----
13455
57408
8130

onlyif mysql # use DIV operator for integer division
query I rowsort label-6655
SELECT ALL col1 * 95 - + ( + col0 ) DIV + ( - 44 ) AS col0 FROM tab2 AS cor0
----
1616
2945
5606

skipif mysql # not compatible
query I rowsort label-6655
SELECT ALL col1 * 95 - + ( + col0 ) / + ( - 44 ) AS col0 FROM tab2 AS cor0
----
1616
2945
5606

query I rowsort
SELECT + - col1 * cor0.col0 AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL - + col0 + - col0 * - col0 AS col1 FROM tab1 AS cor0
----
4032
6
6320

query I rowsort
SELECT + col2 * 99 FROM tab1 AS cor0
----
5346
5643
9504

query I rowsort
SELECT DISTINCT + + cor0.col1 - col1 * - col2 AS col0 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT ALL col1 * + col0 * ( col0 * tab2.col1 ) FROM tab2
----
1803649
21178404
47089

query I rowsort
SELECT col1 * 45 + - col2 AS col1 FROM tab0 AS cor0
----
3837
4013
4364

query I rowsort
SELECT + - ( + col2 ) * col0 + ( - 51 ) FROM tab0 AS cor0
----
-7349
-843
-86

onlyif mysql # use DIV operator for integer division
query I rowsort label-6663
SELECT + col1 DIV - 41 FROM tab0 AS cor0
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-6663
SELECT + col1 / - 41 FROM tab0 AS cor0
----
-2
-2
-2

query I rowsort
SELECT ALL + 9 + col2 FROM tab1 AS cor0
----
105
63
66

query I rowsort
SELECT - col1 * ( + col1 ) * - col1 AS col1 FROM tab2 AS cor0
----
205379
29791
4913

query I rowsort
SELECT ( col0 * - col1 + col1 ) FROM tab1
----
-1027
-52
-630

query I rowsort
SELECT ALL + + ( + cor0.col2 ) + col1 * col0 * + cor0.col1 AS col1 FROM tab1 AS cor0
----
13616
2082
6457

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 47 * col2 col0 FROM tab1 AS cor0
----
2538
2679
4512

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6669
SELECT + col2 * + cor0.col2 * + CAST( - col0 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-26136
-35
-598436

skipif mysql # not compatible
query I rowsort label-6669
SELECT + col2 * + cor0.col2 * + CAST ( - col0 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT DISTINCT - 81 * col2 + - 49 * + 17 * col0 AS col0 FROM tab1 AS cor0
----
-57929
-6873
-74416

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6671
SELECT DISTINCT CAST( NULL AS SIGNED ) * - col2 AS col1 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-6671
SELECT DISTINCT CAST ( NULL AS INTEGER ) * - col2 AS col1 FROM tab2
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6672
SELECT DISTINCT - 6 DIV - col2 FROM tab0
----
0
6

skipif mysql # not compatible
query I rowsort label-6672
SELECT DISTINCT - 6 / - col2 FROM tab0
----
0
6

query I rowsort
SELECT DISTINCT 91 * 1 + + col1 * + ( + col2 + - col1 ) * 86 AS col2 FROM tab0
----
-391897
-70343
-800741

query I rowsort
SELECT DISTINCT - ( - 58 ) * tab2.col2 * + col0 AS col0 FROM tab2
----
10962
117624
174116

query I rowsort
SELECT + ( - col1 + col0 ) * - col1 AS col2 FROM tab0
----
182
5332
6014

query I rowsort
SELECT ALL - col2 * col2 + + col0 FROM tab0 AS cor0
----
-1065
-6635
34

query I rowsort
SELECT DISTINCT col1 * - col2 + + col1 AS col1 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT - 99 + + col0 FROM tab0 AS cor0
----
-10
-64
-75

query I rowsort
SELECT cor0.col2 + tab1.col2 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 8d15ca9b890db6bb93b9a05b04326ed3

query I rowsort
SELECT ALL + 21 AS col0 FROM tab2 AS cor0
----
21
21
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col0 + + col0 col0 FROM tab2
----
0
0
0

query I rowsort
SELECT 94 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to a4d239626cf0546ac1b2f57bb8407089

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6683
SELECT ALL - CAST( - col2 AS SIGNED ) - - col1 FROM tab2 AS cor0
----
55
58
85

skipif mysql # not compatible
query I rowsort label-6683
SELECT ALL - CAST ( - col2 AS INTEGER ) - - col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL + - 0 * cor0.col0 AS col2 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * - col0 col0 FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL tab2.col1 - col2 AS col0 FROM tab2
----
-21
33
4

query I rowsort
SELECT + col1 + col1 * col0 * - col0 AS col2 FROM tab2
----
-106080
-1488
-358897

query I rowsort
SELECT ALL - col2 - tab0.col0 * col0 * col1 FROM tab0
----
-118826
-49569
-720893

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 - - col2 * - ( col1 ) col0 FROM tab1
----
-1152
-1350
-513

query I rowsort
SELECT ( + 10 ) AS col1 FROM tab2 AS cor0
----
10
10
10

query I rowsort
SELECT - - 30 + + ( - cor0.col0 ) FROM tab2 cor0
----
-48
-49
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-6692
SELECT + + col2 DIV - 36 - + col1 * ( ( + col2 ) ) AS col0 FROM tab2 AS cor0
----
-1534
-647
-837

skipif mysql # not compatible
query I rowsort label-6692
SELECT + + col2 / - 36 - + col1 * ( ( + col2 ) ) AS col0 FROM tab2 AS cor0
----
-1534
-647
-837

query I rowsort
SELECT DISTINCT + col1 + 1 FROM tab2 AS cor0
----
18
32
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * col0 + - col0 col2 FROM tab0 AS cor0
----
-1260
-600
-8010

query I rowsort
SELECT ALL - + col2 * ( col2 ) FROM tab0 cor0
----
-1
-1089
-6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-6696
SELECT DISTINCT - + 0 DIV + col1 + - col2 * - col2 AS col0 FROM tab1 AS cor0
----
2916
3249
9216

skipif mysql # not compatible
query I rowsort label-6696
SELECT DISTINCT - + 0 / + col1 + - col2 * - col2 AS col0 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT - ( - ( + col0 ) ) FROM tab2 AS cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-6698
SELECT + - col0 - cor0.col2 DIV col0 col2 FROM tab0 AS cor0
----
-25
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6698
SELECT + - col0 - cor0.col2 / col0 col2 FROM tab0 AS cor0
----
-25
-35
-89

query I rowsort
SELECT ALL col2 * + 87 + col0 AS col0 FROM tab2 AS cor0
----
2340
2356
3385

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 + - 76 * + col1 col1 FROM tab2 AS cor0
----
-1213
-2349
-4406

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6701
SELECT ALL CAST( col0 AS SIGNED ) * - col0 FROM tab0 AS cor0
----
-1225
-576
-7921

skipif mysql # not compatible
query I rowsort label-6701
SELECT ALL CAST ( col0 AS INTEGER ) * - col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT col1 * + col2 + col0 AS col1 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT DISTINCT + 75 + - ( + cor0.col1 ) AS col2 FROM tab1 cor0
----
49
62
65

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6704
SELECT ALL - CAST( NULL AS DECIMAL ) / 98 + col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6704
SELECT ALL - CAST ( NULL AS REAL ) / 98 + col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6705
SELECT DISTINCT col1 DIV 8 AS col2 FROM tab0
----
10
11
12

skipif mysql # not compatible
query I rowsort label-6705
SELECT DISTINCT col1 / 8 AS col2 FROM tab0
----
10
11
12

query I rowsort
SELECT - col0 * 94 + col0 * + col2 FROM tab1 AS cor0
----
-120
-2368
160

query I rowsort
SELECT - ( 72 ) AS col2 FROM tab0, tab1 cor0
----
9 values hashing to ad521144c976ff25e77cdf10a84d1dc6

onlyif mysql # use DIV operator for integer division
query I rowsort label-6708
SELECT - + col2 DIV - col0 + - 91 - - col2 DIV + col0 AS col1 FROM tab1 cor0
----
-55
-89
-91

skipif mysql # not compatible
query I rowsort label-6708
SELECT - + col2 / - col0 + - 91 - - col2 / + col0 AS col1 FROM tab1 cor0
----
-55
-89
-91

query I rowsort
SELECT + col2 * - ( col0 ) + - col2 AS col0 FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT ALL - - col1 * 81 * col2 FROM tab0 AS cor0
----
229878
604422
7857

query I rowsort
SELECT ALL + + col0 * 80 FROM tab1 AS cor0
----
240
5120
6400

query I rowsort
SELECT col2 + col1 * 70 FROM tab0 AS cor0
----
6053
6452
6791

query I rowsort
SELECT - + 72 + col0 AS col2 FROM tab2 cor0
----
-65
6
7

query I rowsort
SELECT - 40 + + col2 AS col0 FROM tab1 AS cor0
----
14
17
56

query I rowsort
SELECT - + col0 + + col0 * col1 FROM tab1 cor0
----
576
75
960

query I rowsort
SELECT DISTINCT col1 * 62 FROM tab0 AS cor0
----
5332
5642
6014

query I rowsort
SELECT ( - col1 ) + + col2 AS col2 FROM tab1 cor0
----
28
47
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * 10 col2 FROM tab2
----
170
310
590

onlyif mysql # use DIV operator for integer division
query I rowsort label-6719
SELECT 25 * - col0 * - col1 + col1 * - col1 + - col0 DIV - 19 FROM tab0 AS cor0
----
194198
44205
75467

skipif mysql # not compatible
query I rowsort label-6719
SELECT 25 * - col0 * - col1 + col1 * - col1 + - col0 / - 19 FROM tab0 AS cor0
----
194198
44205
75467

query I rowsort
SELECT ALL + 40 + - col0 * - 81 FROM tab2 AS cor0
----
607
6358
6439

query I rowsort
SELECT DISTINCT + 81 * col0 AS col0 FROM tab1 AS cor0
----
243
5184
6480

query I rowsort
SELECT col0 + + col2 * - col1 + + 0 * - col2 * col0 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT ALL + 85 * + col1 AS col1 FROM tab0 cor0
----
7310
7735
8245

query I rowsort
SELECT ALL + + cor0.col0 * col0 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT + cor0.col1 - + col1 AS col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6726
SELECT ALL col0 DIV col2 + - col1 * + col2 * col2 + col0 FROM tab0 AS cor0
----
-27
-611794
-93630

skipif mysql # not compatible
query I rowsort label-6726
SELECT ALL col0 / col2 + - col1 * + col2 * col2 + col0 FROM tab0 AS cor0
----
-27
-611794
-93630

query I rowsort
SELECT - cor0.col1 * - col2 + 15 AS col2 FROM tab2 AS cor0
----
1549
661
852

query I rowsort
SELECT - 12 * col0 + col0 FROM tab2 AS cor0
----
-77
-858
-869

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 + + col2 * col1 col2 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT DISTINCT col2 + - col0 * - 63 FROM tab0 AS cor0
----
1545
2206
5689

query I rowsort
SELECT + 81 + - col2 * + col1 * + col1 FROM tab2 AS cor0
----
-10901
-25866
-90425

query I rowsort
SELECT ALL - 11 AS col1 FROM tab2 cor0
----
-11
-11
-11

query I rowsort
SELECT - col0 * col2 - - 65 * 40 * - col0 FROM tab1 AS cor0
----
-170048
-215680
-7962

query I rowsort
SELECT - - 68 + col2 * - 17 AS col1 FROM tab1 AS cor0
----
-1564
-850
-901

query I rowsort
SELECT ALL col2 + - 73 - col2 FROM tab2
----
-73
-73
-73

query I rowsort
SELECT - 91 * + col2 * + ( tab0.col0 ) FROM tab0
----
-3185
-664118
-72072

query I rowsort
SELECT DISTINCT 54 + + col0 FROM tab0 AS cor0
----
143
78
89

query I rowsort
SELECT DISTINCT - col0 + col1 * - col2 + col2 AS col0 FROM tab1 AS cor0
----
-1232
-1353
-577

onlyif mysql # use DIV operator for integer division
query I rowsort label-6739
SELECT + col0 DIV ( 6 ) FROM tab2 AS cor0
----
1
13
13

skipif mysql # not compatible
query I rowsort label-6739
SELECT + col0 / ( 6 ) FROM tab2 AS cor0
----
1
13
13

query I rowsort
SELECT + col1 - col0 * col1 AS col2 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT + ( col1 + col1 ) * col1 FROM tab0
----
14792
16562
18818

query I rowsort
SELECT DISTINCT + 83 * col1 + + col2 AS col0 FROM tab0
----
7171
7635
8052

onlyif mysql # use DIV operator for integer division
query I rowsort label-6743
SELECT ALL - col1 DIV col2 + ( col1 ) AS col1 FROM tab0
----
0
84
90

skipif mysql # not compatible
query I rowsort label-6743
SELECT ALL - col1 / col2 + ( col1 ) AS col1 FROM tab0
----
0
84
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * ( 64 ) + col0 col0 FROM tab0 AS cor0
----
2136
5337
99

query I rowsort
SELECT col1 * + col2 + + 98 AS col1 FROM tab2 AS cor0
----
1632
744
935

query I rowsort
SELECT ALL + tab0.col0 * 37 FROM tab0
----
1295
3293
888

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1, tab1 AS cor0 CROSS JOIN tab0, tab0 AS cor1
----
3
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6748
SELECT ALL - CAST( NULL AS DECIMAL ) * - col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6748
SELECT ALL - CAST ( NULL AS REAL ) * - col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col2 * - tab2.col1 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
9 values hashing to a8ce768203b74f299b6ebad5477b14c1

query I rowsort
SELECT ALL ( col2 ) + col1 * + 71 AS col1 FROM tab2 AS cor0
----
1245
2228
4215

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 32 * - 67 col1 FROM tab1 cor0
----
-2144
-2144
-2144

query I rowsort
SELECT + col0 * 94 FROM tab0 AS cor0
----
2256
3290
8366

query I rowsort
SELECT DISTINCT 48 * - col0 AS col2 FROM tab1 AS cor0
----
-144
-3072
-3840

onlyif mysql # use DIV operator for integer division
query I rowsort label-6754
SELECT ALL - cor0.col1 DIV 1 FROM tab2 cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-6754
SELECT ALL - cor0.col1 / 1 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT ALL - 43 * + 17 FROM tab2
----
-731
-731
-731

query I rowsort
SELECT ALL col0 - - col1 AS col0 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6757
SELECT - CAST( - cor0.col1 AS SIGNED ) col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6757
SELECT - CAST ( - cor0.col1 AS INTEGER ) col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT ALL col0 AS col1 FROM tab0 WHERE NOT ( - col1 ) > col0 AND NOT - col0 + col0 - col1 NOT BETWEEN NULL AND + col1
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6759
SELECT DISTINCT + col2 DIV + tab2.col0 AS col0 FROM tab2
----
0
3

skipif mysql # not compatible
query I rowsort label-6759
SELECT DISTINCT + col2 / + tab2.col0 AS col0 FROM tab2
----
0
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-6760
SELECT DISTINCT col2 DIV + tab0.col2 AS col2 FROM tab0
----
1

skipif mysql # not compatible
query I rowsort label-6760
SELECT DISTINCT col2 / + tab0.col2 AS col2 FROM tab0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + col0 * cor0.col2 + - cor0.col2 col0 FROM tab0 AS cor0
----
33
7134
726

query I rowsort
SELECT DISTINCT + - col0 + col0 * col1 FROM tab2 cor0
----
1264
210
4524

query I rowsort
SELECT ALL - + col2 + + col1 + col1 AS col2 FROM tab1 cor0
----
-2
-37
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-6764
SELECT col2 DIV col1 + + col2 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-6764
SELECT col2 / col1 + + col2 FROM tab0
----
1
33
82

query I rowsort
SELECT DISTINCT - col0 * - col0 + + col1 * col1 AS col2 FROM tab2
----
1010
6530
9565

query I rowsort
SELECT + tab1.col1 + - col1 AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT - col0 * + col1 * col2 AS col2 FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT + col2 * + col1 + col1 FROM tab0
----
194
2924
7553

query III rowsort
SELECT * FROM tab1 WHERE NOT ( NULL ) BETWEEN - col2 AND ( - col2 )
----

query I rowsort
SELECT DISTINCT + col0 * col0 + col0 * + col2 + + col1 AS col1 FROM tab1 AS cor0
----
14093
197
7754

query I rowsort
SELECT ALL col2 - - col0 * col2 AS col0 FROM tab2
----
2054
216
3040

query I rowsort
SELECT DISTINCT + 19 * col0 - + col1 FROM tab1
----
1206
1507
31

query I rowsort
SELECT 59 + col2 - col0 * tab1.col0 AS col0 FROM tab1
----
-3980
-6245
104

query I rowsort
SELECT - - col1 - + cor0.col0 FROM tab0 AS cor0
----
2
62
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-6775
SELECT DISTINCT - col1 DIV + col2 - col1 * col0 FROM tab1
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-6775
SELECT DISTINCT - col1 / + col2 - col1 * col0 FROM tab1
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-6776
SELECT DISTINCT col0 + - col2 DIV - col1 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-6776
SELECT DISTINCT col0 + - col2 / - col1 FROM tab0
----
24
35
89

query I rowsort
SELECT + cor0.col2 - col1 AS col1 FROM tab2 AS cor0
----
-33
-4
21

query III rowsort
SELECT ALL * FROM tab1 WHERE NULL IN ( + col0 * col1 )
----

query I rowsort
SELECT tab0.col0 * tab0.col2 * col0 + col0 AS col2 FROM tab0
----
1260
19032
649611

query I rowsort
SELECT DISTINCT + col0 - col0 * tab0.col0 AS col0 FROM tab0
----
-1190
-552
-7832

onlyif mysql # use DIV operator for integer division
query I rowsort label-6781
SELECT - col1 DIV col1 + + col2 FROM tab1
----
53
56
95

skipif mysql # not compatible
query I rowsort label-6781
SELECT - col1 / col1 + + col2 FROM tab1
----
53
56
95

query III rowsort
SELECT ALL * FROM tab2 WHERE NULL BETWEEN ( NULL ) AND ( NULL )
----

query I rowsort
SELECT + col1 * + tab0.col0 * tab0.col0 AS col1 FROM tab0
----
118825
49536
720811

query III rowsort
SELECT * FROM tab0 WHERE + col2 * tab0.col0 NOT IN ( col2 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT DISTINCT + 51 + cor0.col1 FROM tab1 AS cor0
----
61
64
77

query I rowsort
SELECT + - 0 + + cor0.col0 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-6787
SELECT ALL + + col2 DIV col2 AS col0 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6787
SELECT ALL + + col2 / col2 AS col0 FROM tab0 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-6788
SELECT ALL tab0.col2 + tab0.col1 DIV + col0 + col1 FROM tab0
----
100
122
174

skipif mysql # not compatible
query I rowsort label-6788
SELECT ALL tab0.col2 + tab0.col1 / + col0 + col1 FROM tab0
----
100
122
174

query I rowsort
SELECT DISTINCT col2 + col2 + col0 AS col2 FROM tab2
----
130
155
61

onlyif mysql # use DIV operator for integer division
query I rowsort label-6790
SELECT ALL - col0 DIV col2 + col1 - col1 AS col2 FROM tab1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-6790
SELECT ALL - col0 / col2 + col1 - col1 AS col2 FROM tab1
----
-1
0
0

query I rowsort
SELECT ALL - tab2.col2 * - col0 AS col2 FROM tab2
----
189
2028
3002

query I rowsort
SELECT + col2 * col1 * - tab0.col2 + col0 * tab0.col0 FROM tab0
----
-603963
-93078
1128

query I rowsort
SELECT - col1 * + tab2.col0 * tab2.col1 AS col1 FROM tab2
----
-22831
-271518
-6727

query I rowsort
SELECT ALL col0 * - col0 + + col2 * + col2 FROM tab2 AS cor0
----
-4797
-5408
680

onlyif mysql # use DIV operator for integer division
query I rowsort label-6795
SELECT + col0 * cor0.col0 DIV col0 AS col0 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-6795
SELECT + col0 * cor0.col0 / col0 AS col0 FROM tab2 AS cor0
----
7
78
79

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 WHERE NOT NULL = NULL
----

query I rowsort
SELECT - col1 * + col2 - col0 FROM tab1
----
-1328
-1407
-634

onlyif mysql # use DIV operator for integer division
query I rowsort label-6798
SELECT - col2 * col2 DIV + col0 AS col2 FROM tab0
----
-45
-75
0

skipif mysql # not compatible
query I rowsort label-6798
SELECT - col2 * col2 / + col0 AS col2 FROM tab0
----
-45
-75
0

query I rowsort
SELECT ALL col0 + - col0 * tab1.col0 + col2 FROM tab1
----
-3975
-6224
48

query I rowsort
SELECT ALL col1 FROM tab1 WHERE NOT NULL NOT IN ( - col1 * + tab1.col1 + - col2 )
----

query I rowsort
SELECT DISTINCT - col0 * - tab0.col0 + col1 - col2 * + col0 FROM tab0
----
-130
1287
714

query I rowsort
SELECT col1 * col1 * tab2.col0 AS col1 FROM tab2
----
22831
271518
6727

onlyif mysql # use DIV operator for integer division
query I rowsort label-6803
SELECT ALL - tab1.col0 DIV col2 AS col2 FROM tab1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-6803
SELECT ALL - tab1.col0 / col2 AS col2 FROM tab1
----
-1
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6804
SELECT DISTINCT col0 DIV + tab2.col1 col1 FROM tab2
----
0
1
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6804
SELECT DISTINCT col0 / + tab2.col1 col1 FROM tab2
----
0
1
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-6805
SELECT col0 DIV + col0 FROM tab1 WHERE NOT ( - col1 ) BETWEEN col2 AND ( col1 + + col2 * - col1 )
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6805
SELECT col0 / + col0 FROM tab1 WHERE NOT ( - col1 ) BETWEEN col2 AND ( col1 + + col2 * - col1 )
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + ( col0 ) ) * - 70 col2 FROM tab0
----
-1680
-2450
-6230

query I rowsort
SELECT ALL col1 * + cor0.col1 + + col0 + 39 AS col2 FROM tab1 AS cor0
----
203
288
718

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * + col0 + - col2 col0 FROM tab0 AS cor0
----
34
7216
759

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-6810
SELECT ALL - cor0.col2 * CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-6810
SELECT ALL - cor0.col2 * CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT - + 49 * col1 + + cor0.col2 AS col1 FROM tab1 cor0
----
-1220
-433
-541

query I rowsort
SELECT col2 + + col1 * cor0.col2 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT + 86 - - col0 FROM tab1 AS cor0
----
150
166
89

query I rowsort
SELECT + - 5 + + col1 AS col1 FROM tab1 AS cor0
----
21
5
8

query I rowsort
SELECT DISTINCT tab0.col0 * 86 FROM tab0
----
2064
3010
7654

query I rowsort
SELECT DISTINCT col1 * ( + 68 + col1 ) AS col0 FROM tab1
----
1053
2444
780

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col2 col1 FROM tab1, tab2 cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT - col1 * 33 FROM tab2 AS cor0
----
-1023
-1947
-561

query I rowsort
SELECT ALL col1 * - 11 FROM tab0 AS cor0
----
-1001
-1067
-946

query I rowsort
SELECT DISTINCT col1 + col1 * + col2 + + col1 AS col0 FROM tab0 AS cor0
----
291
3010
7644

query I rowsort
SELECT DISTINCT + col0 * + ( + 90 ) + col1 * ( col0 ) AS col1 FROM tab2 cor0
----
11622
8453
847

query I rowsort
SELECT + ( 79 ) AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 40a2261caa2c5cdbfd80965d7df1231f

query I rowsort
SELECT - ( - 79 ) FROM tab0, tab1 AS cor0
----
9 values hashing to 40a2261caa2c5cdbfd80965d7df1231f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6824
SELECT - - col0 * CAST( col2 AS SIGNED ) FROM tab2 AS cor0
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-6824
SELECT - - col0 * CAST ( col2 AS INTEGER ) FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL + - col1 + - cor0.col2 * + 30 AS col0 FROM tab2 AS cor0
----
-1157
-839
-841

query I rowsort
SELECT 51 * col2 AS col1 FROM tab1 AS cor0
----
2754
2907
4896

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 22 col0 FROM tab1 cor0
----
22
22
22

onlyif mysql # use DIV operator for integer division
query I rowsort label-6828
SELECT ALL - col1 - - 66 DIV - col1 AS col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-6828
SELECT ALL - col1 - - 66 / - col1 AS col1 FROM tab0 AS cor0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6829
SELECT - col2 DIV + col0 + col0 AS col0 FROM tab1 AS cor0
----
-15
64
79

skipif mysql # not compatible
query I rowsort label-6829
SELECT - col2 / + col0 + col0 AS col0 FROM tab1 AS cor0
----
-15
64
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( col2 ) + cor0.col0 col1 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT + - col1 * + col0 + col1 * - col0 * 7 - + col0 * - col1 FROM tab1 AS cor0
----
-4480
-546
-7280

query I rowsort
SELECT DISTINCT ( - col2 ) + - cor0.col0 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT ALL + 54 + - col1 FROM tab1 cor0
----
28
41
44

query I rowsort
SELECT + + col2 - col2 * + col2 FROM tab1 AS cor0
----
-2862
-3192
-9120

query I rowsort
SELECT ALL ( + col2 ) + + col1 + - col2 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT - col2 * 92 * col2 FROM tab1
----
-268272
-298908
-847872

onlyif mysql # use DIV operator for integer division
query I rowsort label-6837
SELECT - - CAST( - col0 AS SIGNED ) DIV col0 AS col0 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6837
SELECT - - CAST ( - col0 AS INTEGER ) / col0 AS col0 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT - col0 * - col1 * + cor0.col1 FROM tab2 AS cor0
----
22831
271518
6727

query I rowsort
SELECT - 61 + - 55 * + col1 FROM tab2 AS cor0
----
-1766
-3306
-996

query I rowsort
SELECT + cor0.col1 * + col1 * col1 AS col1 FROM tab0 cor0
----
636056
753571
912673

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col1 - - col2 col0 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL - 45 + + col2 * cor0.col0 FROM tab2 AS cor0
----
144
1983
2957

query I rowsort
SELECT - ( col1 ) + cor0.col2 - + col0 FROM tab2 AS cor0
----
-11
-111
-58

query I rowsort
SELECT DISTINCT col0 * col2 + cor0.col2 AS col2 FROM tab0 AS cor0
----
36
7380
825

onlyif mysql # use DIV operator for integer division
query I rowsort label-6845
SELECT ALL - col2 DIV - col2 + cor0.col2 AS col0 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-6845
SELECT ALL - col2 / - col2 + cor0.col2 AS col0 FROM tab0 AS cor0
----
2
34
83

query I rowsort
SELECT - 65 * + col2 AS col2 FROM tab2 AS cor0
----
-1690
-1755
-2470

query I rowsort
SELECT DISTINCT - ( - col1 ) * - col0 * - col2 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT - ( - 73 ) AS col1 FROM tab2
----
73
73
73

query I rowsort
SELECT DISTINCT 27 FROM tab2, tab2 cor0
----
27

query I rowsort
SELECT DISTINCT col1 * + 83 AS col2 FROM tab1
----
1079
2158
830

query I rowsort
SELECT DISTINCT + ( + col2 ) * col0 * - col0 AS col1 FROM tab1
----
-233472
-486
-614400

query I rowsort
SELECT + cor0.col0 * + col2 + 58 AS col1 FROM tab2 cor0
----
2086
247
3060

onlyif mysql # use DIV operator for integer division
query I rowsort label-6853
SELECT - col0 + - col2 DIV - 43 FROM tab0 cor0
----
-24
-35
-88

skipif mysql # not compatible
query I rowsort label-6853
SELECT - col0 + - col2 / - 43 FROM tab0 cor0
----
-24
-35
-88

onlyif mysql # use DIV operator for integer division
query I rowsort label-6854
SELECT + col0 * 32 DIV col1 + cor0.col2 FROM tab2 AS cor0
----
186
34
68

skipif mysql # not compatible
query I rowsort label-6854
SELECT + col0 * 32 / col1 + cor0.col2 FROM tab2 AS cor0
----
186
34
68

query I rowsort
SELECT - + col1 + - ( 66 ) AS col2 FROM tab1 cor0
----
-76
-79
-92

query I rowsort
SELECT cor1.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

onlyif mysql # use DIV operator for integer division
query I rowsort label-6857
SELECT col1 DIV 91 FROM tab0 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-6857
SELECT col1 / 91 FROM tab0 AS cor0
----
0
1
1

query I rowsort
SELECT - col0 * col0 * col1 FROM tab1 cor0
----
-234
-40960
-83200

query I rowsort
SELECT DISTINCT - col0 + 73 * + col1 FROM tab1 AS cor0
----
1895
666
869

query I rowsort
SELECT + - cor0.col2 + col1 * + cor0.col0 AS col1 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT + col2 + - col1 - - col1 * + cor0.col0 * + 89 FROM tab1 cor0
----
57007
6970
92643

query I rowsort
SELECT ALL cor0.col2 * + ( + cor0.col2 ) FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT col1 + + ( + col1 * + col0 ) FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT - col0 + + ( + 92 ) AS col1 FROM tab2 AS cor0
----
13
14
85

query I rowsort
SELECT ALL col1 + 16 * 57 FROM tab1 AS cor0
----
922
925
938

query I rowsort
SELECT - cor0.col1 + ( + ( col0 ) ) + col0 * 54 FROM tab1 cor0
----
139
3510
4387

query I rowsort
SELECT ALL - col0 + 10 FROM tab1
----
-54
-70
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6868
SELECT + ( 91 ) DIV - col1 AS col2 FROM tab1 AS cor0
----
-3
-7
-9

skipif mysql # not compatible
query I rowsort label-6868
SELECT + ( 91 ) / - col1 AS col2 FROM tab1 AS cor0
----
-3
-7
-9

query I rowsort
SELECT DISTINCT - cor0.col2 * + cor0.col0 * - 20 AS col0 FROM tab2, tab1 AS cor0
----
153600
3240
72960

query I rowsort
SELECT DISTINCT 39 AS col1 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
39

query I rowsort
SELECT DISTINCT ( + col1 ) * - 94 - ( col0 ) AS col1 FROM tab0 cor0
----
-8108
-8643
-9153

query I rowsort
SELECT DISTINCT + 83 - col1 FROM tab1 AS cor0
----
57
70
73

query I rowsort
SELECT + ( col1 ) * col1 - col0 AS col1 FROM tab1
----
36
673
89

query I rowsort
SELECT + + cor0.col0 + - 10 AS col1 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to d950ebc33e68d63f543e88c6b85caaba

query I rowsort
SELECT DISTINCT - + 51 AS col1 FROM tab1, tab0, tab2 AS cor0
----
-51

query I rowsort
SELECT DISTINCT cor2.col2 AS col1 FROM tab1, tab0 cor0, tab1 AS cor1, tab2 AS cor2
----
26
27
38

query I rowsort
SELECT 17 * + col0 FROM tab0
----
1513
408
595

query I rowsort
SELECT ( - col0 ) + - col0 FROM tab0
----
-178
-48
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-6879
SELECT + col0 DIV col1 + ( col0 ) * col0 AS col2 FROM tab0 AS cor0
----
1225
576
7921

skipif mysql # not compatible
query I rowsort label-6879
SELECT + col0 / col1 + ( col0 ) * col0 AS col2 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT - cor1.col1 AS col2 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT ALL - 55 + col2 + + col2 AS col1 FROM tab0 AS cor0
----
-53
109
11

query I rowsort
SELECT col1 * col1 + 93 + 81 AS col2 FROM tab1 cor0
----
274
343
850

query I rowsort
SELECT + ( col0 ) + + col0 * col2 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT - - 70 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 9758da65ae4711e3e8c8def2fe026911

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 43 * col1 col0 FROM tab0 AS cor0
----
-3698
-3913
-4171

query I rowsort
SELECT DISTINCT - 42 AS col0 FROM tab2 cor0
----
-42

query I rowsort
SELECT ALL + col2 + + 35 * col1 FROM tab0 AS cor0
----
3043
3267
3396

onlyif mysql # use DIV operator for integer division
query I rowsort label-6888
SELECT + - col1 * ( - ( col2 ) ) DIV 14 + 75 * col1 FROM tab2 AS cor0
----
1321
2384
4534

skipif mysql # not compatible
query I rowsort label-6888
SELECT + - col1 * ( - ( col2 ) ) / 14 + 75 * col1 FROM tab2 AS cor0
----
1321
2384
4534

query I rowsort
SELECT ALL col1 + + tab1.col0 * - col0 * + col0 FROM tab1
----
-1
-262134
-511987

query I rowsort
SELECT ALL + col2 * 24 + - 0 * + col2 AS col0 FROM tab2
----
624
648
912

onlyif mysql # use DIV operator for integer division
query I rowsort label-6891
SELECT col1 DIV - 79 + col0 FROM tab0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-6891
SELECT col1 / - 79 + col0 FROM tab0
----
23
34
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * ( + 98 ) + - col2 col2 FROM tab2 AS cor0
----
1628
3011
5756

query I rowsort
SELECT ALL + cor0.col2 * 33 - 91 AS col2 FROM tab2 AS cor0
----
1163
767
800

query I rowsort
SELECT + col2 + + col2 * - col2 FROM tab1 cor0
----
-2862
-3192
-9120

onlyif mysql # use DIV operator for integer division
query I rowsort label-6895
SELECT DISTINCT - ( col0 ) DIV - col1 - col0 FROM tab2
----
-7
-75
-77

skipif mysql # not compatible
query I rowsort label-6895
SELECT DISTINCT - ( col0 ) / - col1 - col0 FROM tab2
----
-7
-75
-77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + 56 * 33 col2 FROM tab2 AS cor0
----
1810
1821
1822

onlyif mysql # use DIV operator for integer division
query I rowsort label-6897
SELECT DISTINCT - col2 DIV + 58 - + cor0.col0 * cor0.col1 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8100

skipif mysql # not compatible
query I rowsort label-6897
SELECT DISTINCT - col2 / + 58 - + cor0.col0 * cor0.col1 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8100

query I rowsort
SELECT - col0 + - ( + col2 ) * + col1 AS col1 FROM tab2 cor0
----
-1612
-725
-844

query I rowsort
SELECT col0 - 41 AS col0 FROM tab1 AS cor0
----
-38
23
39

query I rowsort
SELECT + col0 + 78 AS col1 FROM tab2 AS cor0
----
156
157
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-6901
SELECT + 91 DIV + cor0.col0 AS col2 FROM tab1 AS cor0
----
1
1
30

skipif mysql # not compatible
query I rowsort label-6901
SELECT + 91 / + cor0.col0 AS col2 FROM tab1 AS cor0
----
1
1
30

query I rowsort
SELECT DISTINCT - - col0 + ( col1 ) * + col0 AS col2 FROM tab2 AS cor0
----
1422
224
4680

onlyif mysql # use DIV operator for integer division
query I rowsort label-6903
SELECT DISTINCT + 15 DIV - 85 AS col2 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6903
SELECT DISTINCT + 15 / - 85 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - - ( col1 ) * - cor0.col0 * col2 FROM tab2 AS cor0
----
-119652
-51034
-5859

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + col0 ) col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT - ( 72 ) FROM tab1 cor0
----
-72
-72
-72

query I rowsort
SELECT DISTINCT + - col0 * - 35 AS col1 FROM tab2 AS cor0
----
245
2730
2765

query I rowsort
SELECT ALL + 15 + col1 * + col0 FROM tab2 AS cor0
----
1358
232
4617

query I rowsort
SELECT ALL - col0 + - col1 * + ( col0 ) + + col0 * - col1 FROM tab2 AS cor0
----
-2765
-441
-9282

query I rowsort
SELECT ALL col1 * - cor0.col2 + col0 + + 29 FROM tab2 AS cor0
----
-1427
-538
-801

query I rowsort
SELECT 32 + - col2 FROM tab1 AS cor0
----
-22
-25
-64

query I rowsort
SELECT DISTINCT 34 * col2 * ( - 18 * col1 + col0 ) FROM tab0 AS cor0
----
-1709928
-4318612
-58174

query I rowsort
SELECT 64 + + col1 * col1 AS col1 FROM tab2
----
1025
353
3545

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 92 - col2 col0 FROM tab0
----
-125
-174
-93

query I rowsort
SELECT DISTINCT + 3 AS col1 FROM tab2, tab0 AS cor0
----
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 65 + + col2 col1 FROM tab0 AS cor0
----
147
66
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6917
SELECT CAST( - col1 AS SIGNED ) col1 FROM tab1 AS cor0
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6917
SELECT CAST ( - col1 AS INTEGER ) col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT - col2 + 37 FROM tab0
----
-45
36
4

query I rowsort
SELECT ALL 61 FROM tab1, tab2 AS cor0
----
9 values hashing to 07149905a72bd87553381f34d19ed290

onlyif mysql # use DIV operator for integer division
query I rowsort label-6920
SELECT 3 DIV 98 AS col1 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6920
SELECT 3 / 98 AS col1 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL col2 * + col2 * + col1 FROM tab1
----
119808
32490
75816

onlyif mysql # use DIV operator for integer division
query I rowsort label-6922
SELECT + col1 DIV tab1.col2 AS col0 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6922
SELECT + col1 / tab1.col2 AS col0 FROM tab1
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6923
SELECT DISTINCT + + CAST( NULL AS SIGNED ) * + col0 AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6923
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) * + col0 AS col1 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 40 * + col0 col2 FROM tab1
----
-120
-2560
-3200

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * - ( - col2 + 93 ) * 37 col1 FROM tab2 AS cor0
----
-160765
-17094
-193362

query I rowsort
SELECT ALL cor0.col0 + cor0.col1 FROM tab2, tab2 AS cor0, tab1 cor1
----
27 values hashing to 45123676d9d30ad294b9a8d42384b2df

query I rowsort
SELECT + 35 AS col1 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 0d13dfd4c4a9d51ace3582c31cadcdbc

query I rowsort
SELECT ALL + ( col2 ) * col2 * - 76 FROM tab0
----
-511024
-76
-82764

query I rowsort
SELECT + 43 * + col1 + cor0.col0 FROM tab2 AS cor0
----
1340
2615
810

query I rowsort
SELECT 18 * col0 AS col0 FROM tab0 cor0
----
1602
432
630

query I rowsort
SELECT DISTINCT - - 6 + - col0 + - ( col2 + - col0 ) * - cor0.col0 FROM tab2 AS cor0
----
-3312
-4128
139

query I rowsort
SELECT DISTINCT + cor0.col1 + 55 AS col0 FROM tab0 AS cor0
----
141
146
152

query I rowsort
SELECT ALL - col1 * col0 + - col1 * + cor0.col0 FROM tab0 AS cor0
----
-16198
-4128
-6790

onlyif mysql # use DIV operator for integer division
query I rowsort label-6934
SELECT DISTINCT - cor0.col0 + 34 DIV col0 FROM tab1 AS cor0
----
-64
-80
8

skipif mysql # not compatible
query I rowsort label-6934
SELECT DISTINCT - cor0.col0 + 34 / col0 FROM tab1 AS cor0
----
-64
-80
8

query I rowsort
SELECT DISTINCT col0 + - col2 * + col2 FROM tab0 cor0
----
-1065
-6635
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * 7 col2 FROM tab2 AS cor0
----
49
546
553

query I rowsort
SELECT + col1 + col2 * + col0 AS col0 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT DISTINCT - + col1 * ( 32 ) * col1 AS col2 FROM tab1 AS cor0
----
-21632
-3200
-5408

query I rowsort
SELECT ALL - - col2 + ( col2 ) AS col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT + col0 + 23 * + col0 AS col2 FROM tab0 AS cor0
----
2136
576
840

query I rowsort
SELECT + + col2 + - ( - col2 ) * col2 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT + + ( + col1 ) * + col2 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - 72 * + 74 AS col0 FROM tab0 AS cor0
----
-5328
-5328
-5328

query I rowsort
SELECT + 77 * 48 AS col2 FROM tab1 AS cor0
----
3696
3696
3696

query I rowsort
SELECT col1 * - col1 + ( col1 ) AS col0 FROM tab2
----
-272
-3422
-930

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col2 col2 FROM tab0, tab0 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT ALL + ( + 87 ) AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to fa0cdd86483844cda3bb806e032d5c64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * - 14 col2 FROM tab2
----
-1092
-1106
-98

query I rowsort
SELECT - - cor0.col0 + + cor0.col1 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to c3106673b5165f666b99e75c964d6287

query I rowsort
SELECT - col1 * col1 + - col0 - - 5 FROM tab1 AS cor0
----
-159
-244
-674

query I rowsort
SELECT ALL col0 * - tab1.col1 AS col0 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT + 32 + + col1 + - col1 FROM tab2 AS cor0
----
32
32
32

query I rowsort
SELECT DISTINCT + cor0.col0 + + cor0.col2 * + col1 * col2 AS col0 FROM tab1 AS cor0
----
119888
32554
75819

query I rowsort
SELECT + 32 + - col0 * col1 FROM tab2 AS cor0
----
-1311
-185
-4570

query I rowsort
SELECT 39 * + col1 + - col1 FROM tab2
----
1178
2242
646

query I rowsort
SELECT + col0 + + col2 * col0 * - col2 AS col2 FROM tab2 AS cor0
----
-113997
-5096
-52650

query I rowsort
SELECT + col2 * col0 + - cor0.col2 FROM tab2 AS cor0
----
162
2002
2964

query I rowsort
SELECT ALL - 6 * + col1 FROM tab1
----
-156
-60
-78

query I rowsort
SELECT ALL - - ( 64 ) FROM tab1 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 60ab040e931c5c85db7ba19364eacc8e

query I rowsort
SELECT DISTINCT 40 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
40

query I rowsort
SELECT 51 + 47 + col0 * tab0.col0 FROM tab0
----
1323
674
8019

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6962
SELECT + CAST( col2 AS SIGNED ) * - col2 AS col1 FROM tab2
----
-1444
-676
-729

skipif mysql # not compatible
query I rowsort label-6962
SELECT + CAST ( col2 AS INTEGER ) * - col2 AS col1 FROM tab2
----
-1444
-676
-729

onlyif mysql # use DIV operator for integer division
query I rowsort label-6963
SELECT col2 * 80 DIV tab2.col1 AS col0 FROM tab2
----
178
35
69

skipif mysql # not compatible
query I rowsort label-6963
SELECT col2 * 80 / tab2.col1 AS col0 FROM tab2
----
178
35
69

query I rowsort
SELECT ( + 56 ) + col0 * col1 + + 58 FROM tab1
----
1154
192
754

query I rowsort
SELECT + ( - 26 ) * - col0 FROM tab0 cor0
----
2314
624
910

query I rowsort
SELECT DISTINCT - col2 * - cor0.col0 - - col1 AS col1 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT DISTINCT 49 * cor0.col0 FROM tab2 AS cor0
----
343
3822
3871

query I rowsort
SELECT ALL + ( col1 ) + col0 * col2 AS col2 FROM tab1 cor0
----
188
3658
7693

query I rowsort
SELECT - + col0 + - col2 * - col1 AS col0 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT DISTINCT - col2 * 63 + + col1 AS col2 FROM tab0 AS cor0
----
-1993
-5075
34

query I rowsort
SELECT DISTINCT - - 83 AS col0 FROM tab1 AS cor0
----
83

query I rowsort
SELECT + - col2 * - col2 + col0 AS col1 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT DISTINCT + - col0 * col0 + col0 AS col1 FROM tab1 AS cor0
----
-4032
-6
-6320

query I rowsort
SELECT ALL + - 53 + - col2 FROM tab2 AS cor0
----
-79
-80
-91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 26 col2 FROM tab1 AS cor0
----
26
26
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 67 * - col2 + ( - 33 ) col0 FROM tab1 AS cor0
----
-3651
-3852
-6465

query I rowsort
SELECT ALL + - col1 + col0 * col0 AS col1 FROM tab1 AS cor0
----
-17
4086
6387

query I rowsort
SELECT DISTINCT + - col2 * + col2 - cor0.col2 FROM tab1 AS cor0
----
-2970
-3306
-9312

query I rowsort
SELECT ALL - 7 + - cor0.col2 AS col1 FROM tab1 AS cor0
----
-103
-61
-64

query I rowsort
SELECT DISTINCT 39 * cor0.col1 FROM tab0 AS cor0
----
3354
3549
3783

query I rowsort
SELECT col0 * col1 + col1 * 75 FROM tab1 AS cor0
----
1390
2015
2028

query I rowsort
SELECT ALL ( - 10 + col1 ) AS col2 FROM tab0
----
76
81
87

onlyif mysql # use DIV operator for integer division
query I rowsort label-6983
SELECT DISTINCT - col0 * col2 + cor0.col1 DIV - col1 + col0 AS col0 FROM tab2 AS cor0
----
-183
-1951
-2924

skipif mysql # not compatible
query I rowsort label-6983
SELECT DISTINCT - col0 * col2 + cor0.col1 / - col1 + col0 AS col0 FROM tab2 AS cor0
----
-183
-1951
-2924

onlyif mysql # use DIV operator for integer division
query I rowsort label-6984
SELECT + + col0 + + cor0.col0 DIV cor0.col2 FROM tab0 AS cor0
----
24
70
90

skipif mysql # not compatible
query I rowsort label-6984
SELECT + + col0 + + cor0.col0 / cor0.col2 FROM tab0 AS cor0
----
24
70
90

query I rowsort
SELECT DISTINCT 98 * col0 * col1 FROM tab1
----
101920
62720
7644

query I rowsort
SELECT - 49 * col1 FROM tab2
----
-1519
-2891
-833

query I rowsort
SELECT col0 * + ( cor0.col1 + col0 ) AS col0 FROM tab1 AS cor0
----
4736
7440
87

query I rowsort
SELECT - - col1 * + col0 + col2 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT ALL + + ( + 77 ) FROM tab0 AS cor0
----
77
77
77

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6991
SELECT ALL - ( + col2 ) DIV - col0 + 45 FROM tab2 AS cor0
----
45
45
48

skipif mysql # not compatible
query I rowsort label-6991
SELECT ALL - ( + col2 ) / - col0 + 45 FROM tab2 AS cor0
----
45
45
48

query I rowsort
SELECT - - 47 + + col2 AS col0 FROM tab1 AS cor0
----
101
104
143

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6993
SELECT ALL + CAST( NULL AS SIGNED ) + + col1 / col0 col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6993
SELECT ALL + CAST ( NULL AS INTEGER ) + + col1 / col0 col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 * 12 AS col1 FROM tab1 AS cor0
----
120
156
312

query I rowsort
SELECT ALL + - 78 + + col0 FROM tab0 AS cor0
----
-43
-54
11

query I rowsort
SELECT + + col1 * + col0 + - col0 AS col2 FROM tab2 cor0
----
1264
210
4524

query I rowsort
SELECT DISTINCT - 85 AS col1 FROM tab1 cor0
----
-85

query I rowsort
SELECT col0 * - ( - col0 ) + + tab2.col0 FROM tab2
----
56
6162
6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-6999
SELECT + col2 + - 96 * 6 DIV - tab0.col2 FROM tab0
----
50
577
89

skipif mysql # not compatible
query I rowsort label-6999
SELECT + col2 + - 96 * 6 / - tab0.col2 FROM tab0
----
50
577
89

query I rowsort
SELECT 89 + tab0.col2 FROM tab0, tab2 AS cor0
----
9 values hashing to be204770ac0ef23d63172487d385982f

query I rowsort
SELECT col1 * - col0 + col2 * tab1.col0 AS col2 FROM tab1
----
3008
6640
84

query I rowsort
SELECT DISTINCT + col1 * 8 FROM tab1
----
104
208
80

query I rowsort
SELECT DISTINCT + 88 * col0 FROM tab1
----
264
5632
7040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - col0 col1 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-7005
SELECT DISTINCT + 75 DIV col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-7005
SELECT DISTINCT + 75 / col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL - col1 + + 53 AS col0 FROM tab2 AS cor0
----
-6
22
36

query I rowsort
SELECT DISTINCT ( + 51 ) AS col1 FROM tab2 AS cor0
----
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-7008
SELECT ALL + + col0 DIV - col0 + - col1 DIV 70 AS col0 FROM tab0 AS cor0
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-7008
SELECT ALL + + col0 / - col0 + - col1 / 70 AS col0 FROM tab0 AS cor0
----
-2
-2
-2

query I rowsort
SELECT ALL + + col1 * 96 FROM tab2 AS cor0
----
1632
2976
5664

query I rowsort
SELECT - col1 + col2 * + col1 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT ALL - tab2.col2 * col1 + - 76 FROM tab2
----
-1610
-722
-913

onlyif mysql # use DIV operator for integer division
query I rowsort label-7012
SELECT ALL col0 DIV - col0 + - col1 FROM tab1
----
-11
-14
-27

skipif mysql # not compatible
query I rowsort label-7012
SELECT ALL col0 / - col0 + - col1 FROM tab1
----
-11
-14
-27

query I rowsort
SELECT ALL + col0 * - ( 6 ) + col0 FROM tab2 AS cor0
----
-35
-390
-395

query I rowsort
SELECT DISTINCT + 47 AS col0 FROM tab1, tab2 cor0, tab2 AS cor1
----
47

query I rowsort
SELECT - + col2 * + 74 FROM tab2 AS cor0
----
-1924
-1998
-2812

query I rowsort
SELECT + col1 + col0 * - ( col2 ) + - col1 AS col0 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT - + ( col2 ) * col2 + - cor0.col0 FROM tab0 cor0
----
-1113
-36
-6813

onlyif mysql # use DIV operator for integer division
query I rowsort label-7018
SELECT DISTINCT - col0 + col2 DIV col1 + col0 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-7018
SELECT DISTINCT - col0 + col2 / col1 + col0 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT DISTINCT - col2 + + col0 * - 37 FROM tab0 AS cor0
----
-1296
-3375
-921

query I rowsort
SELECT - col0 * + col1 + col2 AS col1 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT DISTINCT + cor0.col0 * col2 + col0 AS col2 FROM tab1 AS cor0
----
165
3712
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-7022
SELECT - cor0.col0 DIV + ( col0 ) + col0 * - col1 AS col2 FROM tab1 AS cor0
----
-1041
-641
-79

skipif mysql # not compatible
query I rowsort label-7022
SELECT - cor0.col0 / + ( col0 ) + col0 * - col1 AS col2 FROM tab1 AS cor0
----
-1041
-641
-79

query I rowsort
SELECT + col1 * 87 FROM tab1 AS cor0
----
1131
2262
870

query I rowsort
SELECT DISTINCT col0 - + cor0.col2 * - col0 AS col2 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT DISTINCT - col0 + + ( - ( col2 ) ) * col2 AS col2 FROM tab2 cor0
----
-1523
-736
-754

query I rowsort
SELECT - - cor0.col2 + cor0.col2 AS col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT + cor0.col1 * 53 AS col2 FROM tab1 cor0
----
1378
530
689

query I rowsort
SELECT DISTINCT - cor0.col1 * col0 + - col0 FROM tab1 AS cor0
----
-1120
-704
-81

query I rowsort
SELECT ALL col1 * 43 AS col0 FROM tab1 AS cor0
----
1118
430
559

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7030
SELECT + col2 + - ( col1 ) * - cor0.col0 * CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7030
SELECT + col2 + - ( col1 ) * - cor0.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-7031
SELECT + col1 DIV cor0.col2 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7031
SELECT + col1 / cor0.col2 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + + ( + col2 ) * - 32 AS col0 FROM tab0 AS cor0
----
-1056
-2624
-32

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7033
SELECT - col0 * col0 * CAST( col0 AS SIGNED ) col0 FROM tab0 AS cor0
----
-13824
-42875
-704969

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7033
SELECT - col0 * col0 * CAST ( col0 AS INTEGER ) col0 FROM tab0 AS cor0
----
-13824
-42875
-704969

query I rowsort
SELECT col0 * col1 * 99 AS col1 FROM tab2 AS cor0
----
132957
21483
455598

query I rowsort
SELECT - col2 * - col2 * - 94 AS col0 FROM tab0 AS cor0
----
-102366
-632056
-94

query I rowsort
SELECT col2 * + ( - col1 ) AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT 40 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
40

query I rowsort
SELECT 32 FROM tab2, tab2 AS cor0, tab1 cor1, tab0 AS cor2
----
81 values hashing to 6bef041528d0147be26f7de162c66a5f

query I rowsort
SELECT DISTINCT - col2 * + ( col1 ) AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-7040
SELECT - col2 DIV 72 AS col0 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7040
SELECT - col2 / 72 AS col0 FROM tab0 AS cor0
----
-1
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7041
SELECT - + 58 + + cor0.col1 + col1 DIV + 96 FROM tab2 AS cor0
----
-27
-41
1

skipif mysql # not compatible
query I rowsort label-7041
SELECT - + 58 + + cor0.col1 + col1 / + 96 FROM tab2 AS cor0
----
-27
-41
1

query I rowsort
SELECT ( col2 ) + - col0 + - col2 FROM tab0 AS cor0
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-7043
SELECT ALL col1 + col2 DIV - tab0.col1 AS col0 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-7043
SELECT ALL col1 + col2 / - tab0.col1 AS col0 FROM tab0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 48 * col1 col0 FROM tab2 AS cor0
----
-1488
-2832
-816

query I rowsort
SELECT DISTINCT 73 + cor0.col0 * - 42 AS col2 FROM tab2, tab0 AS cor0
----
-1397
-3665
-935

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - col1 AS REAL ) AS col1 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT col2 + - col2 * + 75 FROM tab0 AS cor0
----
-2442
-6068
-74

onlyif mysql # use DIV operator for integer division
query I rowsort label-7048
SELECT DISTINCT + col0 DIV - col1 col1 FROM tab1 cor0
----
-6
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7048
SELECT DISTINCT + col0 / - col1 col1 FROM tab1 cor0
----
-6
0

query I rowsort
SELECT DISTINCT ( + col0 * col2 + 99 ) AS col2 FROM tab1
----
261
3747
7779

query I rowsort
SELECT + col2 + tab2.col1 * col2 FROM tab2
----
1560
684
864

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - col2 * + col1 + - CAST ( + col1 AS REAL ) FROM tab1
----
-1261
-1430
-580

query I rowsort
SELECT DISTINCT tab2.col2 + tab2.col1 AS col2 FROM tab2
----
55
58
85

query I rowsort
SELECT DISTINCT col2 * + col0 * + col1 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT DISTINCT + 35 + - col2 * 91 AS col0 FROM tab1
----
-4879
-5152
-8701

query I rowsort
SELECT ALL 61 FROM tab2, tab1 AS cor0, tab0 cor1
----
27 values hashing to 8d4dfe649433a599fc4b10830cc7ce55

query I rowsort
SELECT - col2 * col0 * + col2 + - col1 AS col0 FROM tab1 cor0
----
-207946
-737293
-8774

query I rowsort
SELECT ( + cor0.col1 + + cor0.col1 ) FROM tab1, tab0 AS cor0
----
9 values hashing to e205c60b0806256e15ecb6a115a429b3

query I rowsort
SELECT + 70 AS col1 FROM tab0, tab1 cor0, tab1 AS cor1
----
27 values hashing to c76157a7a7ec18de56823b2058b49f32

query I rowsort
SELECT 39 - + col1 AS col0 FROM tab1 AS cor0
----
13
26
29

onlyif mysql # use DIV operator for integer division
query I rowsort label-7060
SELECT + col1 DIV - col0 + - col2 * col2 FROM tab0 AS cor0
----
-1092
-3
-6725

skipif mysql # not compatible
query I rowsort label-7060
SELECT + col1 / - col0 + - col2 * col2 FROM tab0 AS cor0
----
-1092
-3
-6725

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 9 * col0 col0 FROM tab1 AS cor0
----
27
576
720

query I rowsort
SELECT ALL - 34 + col2 FROM tab1 AS cor0
----
20
23
62

query I rowsort
SELECT col2 + 95 * - cor0.col1 FROM tab2 AS cor0
----
-1577
-2918
-5579

query I rowsort
SELECT DISTINCT - - ( + col0 ) * col0 + - 33 FROM tab1 AS cor0
----
-24
4063
6367

query I rowsort
SELECT - - col0 * + 71 + col0 * - ( col0 ) * cor0.col1 - + 38 FROM tab2 AS cor0
----
-100526
-1060
-353456

query I rowsort
SELECT + + 0 AS col2 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT - 54 FROM tab0, tab2 AS cor0, tab2 cor1
----
27 values hashing to 71e27a12767d3a987ce05e4d6edad211

query I rowsort
SELECT DISTINCT 5 * col2 FROM tab0
----
165
410
5

query I rowsort
SELECT ALL 88 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to c46e7cf9bf516fdfde88534336a28177

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 - + col2 col2 FROM tab0 AS cor0
----
-171
-36
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * 19 + - cor0.col0 col2 FROM tab0 AS cor0
----
1610
1640
1808

onlyif mysql # use DIV operator for integer division
query I rowsort label-7073
SELECT ALL col1 DIV 12 FROM tab2 AS cor0
----
1
2
4

skipif mysql # not compatible
query I rowsort label-7073
SELECT ALL col1 / 12 FROM tab2 AS cor0
----
1
2
4

query I rowsort
SELECT DISTINCT + col1 + + col2 * 94 * col1 FROM tab0 AS cor0
----
266858
701519
9215

query I rowsort
SELECT + col0 * + 71 FROM tab1 AS cor0
----
213
4544
5680

query I rowsort
SELECT ALL col1 + + 16 * col0 FROM tab1 AS cor0
----
1034
1293
74

query I rowsort
SELECT ALL - col2 - - 67 FROM tab0 AS cor0
----
-15
34
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 * - ( ( + col1 ) ) + 71 * + col0 col2 FROM tab0 AS cor0
----
-1134
-1143
2388

query I rowsort
SELECT DISTINCT col1 * + ( col1 ) AS col1 FROM tab1 AS cor0
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-7080
SELECT ALL + col0 + cor0.col0 * 94 DIV col0 FROM tab1 AS cor0
----
158
174
97

skipif mysql # not compatible
query I rowsort label-7080
SELECT ALL + col0 + cor0.col0 * 94 / col0 FROM tab1 AS cor0
----
158
174
97

query I rowsort
SELECT ALL - cor0.col0 * cor0.col1 + + 1 AS col0 FROM tab1 AS cor0
----
-1039
-639
-77

onlyif mysql # use DIV operator for integer division
query I rowsort label-7082
SELECT DISTINCT + col0 + col1 DIV + 21 FROM tab0 AS cor0
----
28
39
93

skipif mysql # not compatible
query I rowsort label-7082
SELECT DISTINCT + col0 + col1 / + 21 FROM tab0 AS cor0
----
28
39
93

query I rowsort
SELECT cor0.col0 * ( - cor0.col2 ) AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT tab0.col1 + + 72 FROM tab0
----
158
163
169

query I rowsort
SELECT ALL - - col2 + - 82 * + col2 FROM tab1 cor0
----
-4374
-4617
-7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-7086
SELECT DISTINCT + col2 DIV + 51 AS col2 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-7086
SELECT DISTINCT + col2 / + 51 AS col2 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL + 5 * + col2 FROM tab0 AS cor0
----
165
410
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 + + col1 * + col0 col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT - ( col1 ) + col0 * + col0 AS col1 FROM tab2 AS cor0
----
18
6025
6224

query I rowsort
SELECT DISTINCT + - 85 * - col2 FROM tab1 AS cor0
----
4590
4845
8160

query I rowsort
SELECT ALL 91 + col0 AS col0 FROM tab1 AS cor0
----
155
171
94

query I rowsort
SELECT - + 27 AS col2 FROM tab0 cor0
----
-27
-27
-27

query I rowsort
SELECT - cor0.col2 + + 10 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 67b979b62e380916c56cebcd8f3d6f02

query I rowsort
SELECT ALL + col2 * + col2 + 90 FROM tab0 AS cor0
----
1179
6814
91

query I rowsort
SELECT ALL + + cor0.col0 * - cor0.col1 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - 18 * cor0.col1 FROM tab1 cor0
----
-180
-234
-468

query I rowsort
SELECT 70 * col1 + + col2 FROM tab1 AS cor0
----
1006
1874
757

query I rowsort
SELECT DISTINCT - col1 * col1 + - 71 * col1 AS col1 FROM tab0 AS cor0
----
-13502
-14742
-16296

onlyif mysql # use DIV operator for integer division
query I rowsort label-7099
SELECT + col1 + col0 DIV col0 FROM tab1 cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-7099
SELECT + col1 + col0 / col0 FROM tab1 cor0
----
11
14
27

query I rowsort
SELECT ALL 78 * col2 FROM tab2 AS cor0
----
2028
2106
2964

query I rowsort
SELECT DISTINCT + - col0 * col1 + 75 * col2 FROM tab0 AS cor0
----
-1949
-3320
411

query I rowsort
SELECT col0 + col0 + col1 AS col0 FROM tab2
----
175
215
45

query I rowsort
SELECT - 96 + 89 * + col0 FROM tab1
----
171
5600
7024

query I rowsort
SELECT - tab2.col2 AS col2 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT ( 51 ) - + col2 FROM tab0
----
-31
18
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col1 ) + + ( col2 ) * - col2 col0 FROM tab1 AS cor0
----
-2890
-3239
-9203

query I rowsort
SELECT DISTINCT + ( + cor0.col0 ) * + col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL - + 4 * + col1 FROM tab0 AS cor0
----
-344
-364
-388

query I rowsort
SELECT col1 * - col0 + col1 AS col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT DISTINCT col1 * col2 * 83 FROM tab1
----
103584
116532
47310

query I rowsort
SELECT DISTINCT cor1.col2 AS col1 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col2 ) * + 2 col0 FROM tab0
----
164
2
66

query I rowsort
SELECT - tab0.col1 * tab0.col0 AS col0 FROM tab0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-7114
SELECT + - col1 DIV 9 - col0 * - 74 AS col2 FROM tab1 AS cor0
----
220
4735
5919

skipif mysql # not compatible
query I rowsort label-7114
SELECT + - col1 / 9 - col0 * - 74 AS col2 FROM tab1 AS cor0
----
220
4735
5919

query I rowsort
SELECT DISTINCT + - 80 + col2 FROM tab1 AS cor0
----
-23
-26
16

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7116
SELECT ALL + CAST( + 25 AS SIGNED ) * col0 + + CAST( 9 + - col0 AS SIGNED ) * cor0.col2 FROM tab0 AS cor0
----
-4335
105
849

skipif mysql # not compatible
query I rowsort label-7116
SELECT ALL + CAST ( + 25 AS INTEGER ) * col0 + + CAST ( 9 + - col0 AS INTEGER ) * cor0.col2 FROM tab0 AS cor0
----
-4335
105
849

onlyif mysql # use DIV operator for integer division
query I rowsort label-7117
SELECT DISTINCT + - col0 DIV 7 + col2 + col0 AS col2 FROM tab2 AS cor0
----
106
33
93

skipif mysql # not compatible
query I rowsort label-7117
SELECT DISTINCT + - col0 / 7 + col2 + col0 AS col2 FROM tab2 AS cor0
----
106
33
93

query I rowsort
SELECT + 60 + col0 AS col2 FROM tab2 AS cor0
----
138
139
67

query I rowsort
SELECT DISTINCT + + col1 * + col1 + col1 AS col0 FROM tab1 AS cor0
----
110
182
702

query I rowsort
SELECT DISTINCT + 22 + + 64 * - col2 * col2 AS col1 FROM tab1
----
-186602
-207914
-589802

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col2 + - cor1.col0 col1 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 2a75c695d49d6bdaea4ddf1c172bb5ca

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7122
SELECT DISTINCT col2 * col1 + col2 * CAST( NULL AS SIGNED ) AS col1 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-7122
SELECT DISTINCT col2 * col1 + col2 * CAST ( NULL AS INTEGER ) AS col1 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( + col0 AS REAL ) * - tab2.col0 + - ( col0 ) FROM tab2
----
42
6006
6162

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7124
SELECT DISTINCT + CAST( NULL AS SIGNED ) + 60 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-7124
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + 60 FROM tab0
----
NULL

query I rowsort
SELECT DISTINCT col2 * col0 + - col0 + col1 FROM tab0
----
7300
854
97

query I rowsort
SELECT col2 * col0 * tab1.col2 AS col0 FROM tab1
----
207936
737280
8748

onlyif mysql # use DIV operator for integer division
query I rowsort label-7127
SELECT col2 DIV - col2 - tab1.col1 AS col1 FROM tab1
----
-11
-14
-27

skipif mysql # not compatible
query I rowsort label-7127
SELECT col2 / - col2 - tab1.col1 AS col1 FROM tab1
----
-11
-14
-27

query I rowsort
SELECT ( col0 + + col2 ) * - col2 AS col2 FROM tab2
----
-2704
-4446
-918

query I rowsort
SELECT ALL - ( col2 ) * - col1 * - cor0.col0 + col2 * - col2 FROM tab0 AS cor0
----
-3396
-670842
-69201

query I rowsort
SELECT - col1 * col2 - - col1 AS col2 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT DISTINCT + col0 + + col2 * - col2 + - col2 FROM tab0
----
-1098
-6717
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col0 + + col1 * - col0 col1 FROM tab0 AS cor0
----
-16198
-4128
-6790

onlyif mysql # use DIV operator for integer division
query I rowsort label-7133
SELECT col2 DIV col0 + col2 + 89 FROM tab2 AS cor0
----
115
119
127

skipif mysql # not compatible
query I rowsort label-7133
SELECT col2 / col0 + col2 + 89 FROM tab2 AS cor0
----
115
119
127

query I rowsort
SELECT ALL 27 FROM tab1, tab2 AS cor0, tab1 cor1
----
27 values hashing to 1a3cef5c33b8f87ffeded378fd207753

query I rowsort
SELECT - - cor0.col1 * - 81 FROM tab1 AS cor0
----
-1053
-2106
-810

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7136
SELECT DISTINCT + col1 * + CAST( NULL AS SIGNED ) - - col1 AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7136
SELECT DISTINCT + col1 * + CAST ( NULL AS INTEGER ) - - col1 AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + + cor0.col1 + + 31 AS col0 FROM tab0 AS cor0
----
117
122
128

query I rowsort
SELECT ALL + - cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT ALL - - col1 + 70 + col0 * - col2 AS col1 FROM tab1 AS cor0
----
-3568
-66
-7597

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + cor0.col0 col0 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + + col0 * ( cor0.col2 ) AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL - col0 + + col0 + ( + cor0.col0 ) * + col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT 3 + - col2 FROM tab0 AS cor0
----
-30
-79
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-7144
SELECT ALL + + col2 + + cor0.col2 - - col2 DIV col1 FROM tab1 AS cor0
----
110
119
199

skipif mysql # not compatible
query I rowsort label-7144
SELECT ALL + + col2 + + cor0.col2 - - col2 / col1 FROM tab1 AS cor0
----
110
119
199

onlyif mysql # use DIV operator for integer division
query I rowsort label-7145
SELECT col2 * col2 * + col0 + col1 + col0 DIV col1 AS col2 FROM tab0 cor0
----
132
26222
598527

skipif mysql # not compatible
query I rowsort label-7145
SELECT col2 * col2 * + col0 + col1 + col0 / col1 AS col2 FROM tab0 cor0
----
132
26222
598527

query I rowsort
SELECT - col0 * - cor0.col1 AS col2 FROM tab1 cor0
----
1040
640
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7147
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col2 FROM tab2, tab2 AS cor0, tab2 AS cor1, tab1, tab1 AS cor2
----
NULL

skipif mysql # not compatible
query I rowsort label-7147
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col2 FROM tab2, tab2 AS cor0, tab2 AS cor1, tab1, tab1 AS cor2
----
NULL

query I rowsort
SELECT DISTINCT + col0 * - col2 + ( - col1 ) AS col0 FROM tab1 AS cor0
----
-188
-3658
-7693

onlyif mysql # use DIV operator for integer division
query I rowsort label-7149
SELECT col0 * col2 DIV col0 - - col2 FROM tab0 AS cor0
----
164
2
66

skipif mysql # not compatible
query I rowsort label-7149
SELECT col0 * col2 / col0 - - col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT ALL col1 + - col2 * + col0 * ( + col1 ) + ( - col2 ) * + col1 FROM tab1
----
-101075
-37040
-5590

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - col1 * - col1 * - col2 col1 FROM tab0 AS cor0
----
-244035
-678960
-9408

query I rowsort
SELECT col2 + 96 AS col1 FROM tab0 AS cor0
----
129
178
97

query I rowsort
SELECT - col2 + - col2 * + col0 + - col2 AS col1 FROM tab2 AS cor0
----
-2080
-243
-3078

query I rowsort
SELECT + 72 * tab0.col0 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 8921f64ed3038aa4e3d52a74a5f833fb

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 10 col0 FROM tab1
----
10
10
10

query I rowsort
SELECT + col2 * - col2 + - col0 FROM tab0
----
-1113
-36
-6813

query I rowsort
SELECT ALL 47 + + tab0.col2 * col0 FROM tab0
----
7345
82
839

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT - ( col2 ) + CAST ( + col2 AS REAL ) + col1 col2 FROM tab0
----
86
91
97

query I rowsort
SELECT - col2 * - col2 + + 6 - - col2 * cor0.col0 AS col2 FROM tab2 AS cor0
----
2710
4452
924

query I rowsort
SELECT col0 + cor0.col1 + + cor0.col2 AS col1 FROM tab1 AS cor0
----
131
189
83

query I rowsort
SELECT - + col2 + - ( - col0 ) + + col2 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7162
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-7162
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
NULL

query I rowsort
SELECT - col0 + - 51 - - col2 FROM tab0 cor0
----
-42
-58
-85

query I rowsort
SELECT ALL - col0 * 94 AS col2 FROM tab2
----
-658
-7332
-7426

onlyif mysql # use DIV operator for integer division
query I rowsort label-7165
SELECT ALL - tab2.col1 DIV tab2.col0 col1 FROM tab2
----
-4
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7165
SELECT ALL - tab2.col1 / tab2.col0 col1 FROM tab2
----
-4
0
0

query I rowsort
SELECT DISTINCT + - 68 + + col0 * - col2 AS col1 FROM tab0 AS cor0
----
-103
-7366
-860

query I rowsort
SELECT - - 29 + col2 + + col0 AS col1 FROM tab1 AS cor0
----
150
205
86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7168
SELECT DISTINCT + CAST( NULL AS SIGNED ) / + col1 AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7168
SELECT DISTINCT + CAST ( NULL AS INTEGER ) / + col1 AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + 95 * col1 + col0 + + col2 FROM tab2 AS cor0
----
1732
2979
5709

query I rowsort
SELECT col1 * ( - col2 ) * + col0 + + col1 * + col2 * col1 + ( - ( col1 ) ) FROM tab1
----
-30790
-83629
32266

query I rowsort
SELECT - col1 * 10 * col0 - - col0 FROM tab2
----
-13351
-2163
-45942

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 - + 0 col2 FROM tab2
----
7
78
79

query I rowsort
SELECT ALL col0 * + 24 * + col1 AS col2 FROM tab0
----
194376
49536
81480

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col0 + + col0 AS col2 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT ( tab1.col0 ) * - col2 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT ALL cor0.col0 FROM tab2, tab1, tab0 cor0
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT ALL + cor0.col0 - tab2.col0 AS col1 FROM tab2, tab1 cor0
----
9 values hashing to 082e660fdb43b4559ee4c78f197723a3

query I rowsort
SELECT + col2 * col1 * - ( ( - col1 ) ) FROM tab0 AS cor0
----
244068
679042
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-7179
SELECT + + ( - col0 ) DIV - col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7179
SELECT + + ( - col0 ) / - col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - col1 * + cor0.col1 AS col0 FROM tab1 cor0
----
-100
-169
-676

query I rowsort
SELECT ALL - col1 * col1 + - col1 AS col2 FROM tab2 AS cor0
----
-306
-3540
-992

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + col0 ) + col2 * - col1 * cor0.col2 col1 FROM tab0 AS cor0
----
-132
-611973
-93678

onlyif mysql # use DIV operator for integer division
query I rowsort label-7183
SELECT DISTINCT + + ( col2 ) DIV - 82 AS col2 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-7183
SELECT DISTINCT + + ( col2 ) / - 82 AS col2 FROM tab1 AS cor0
----
-1
0

query I rowsort
SELECT 53 + + col0 AS col0 FROM tab0 AS cor0
----
142
77
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 91 * - col1 col1 FROM tab2 AS cor0
----
1547
2821
5369

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col1 + col2 * + tab1.col0 col2 FROM tab1
----
-514
3548
7511

query I rowsort
SELECT ALL - 65 + - col0 FROM tab1 AS cor0
----
-129
-145
-68

query I rowsort
SELECT ALL + 68 * + cor0.col0 AS col2 FROM tab0 cor0
----
1632
2380
6052

query I rowsort
SELECT DISTINCT + 56 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - tab0.col0 col0 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL - tab1.col2 + + 87 FROM tab1, tab1 AS cor0
----
9 values hashing to 34a34dc18be27fa2d12c95944bae4704

query I rowsort
SELECT ALL col2 - col1 * - tab2.col1 FROM tab2
----
327
3507
988

query I rowsort
SELECT DISTINCT - 43 * col0 FROM tab0 AS cor0
----
-1032
-1505
-3827

query I rowsort
SELECT DISTINCT - col1 * - 32 + col0 AS col0 FROM tab2 AS cor0
----
1966
623
999

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 20 * col1 - col2 * 99 col0 FROM tab1 AS cor0
----
-4826
-5443
-9244

query I rowsort
SELECT col0 + ( ( tab1.col2 ) ) + + 18 AS col0 FROM tab1
----
139
194
75

query I rowsort
SELECT ALL - col2 + + 39 * - 53 - - col0 FROM tab2
----
-2015
-2026
-2087

query I rowsort
SELECT col2 - - 15 FROM tab1
----
111
69
72

query I rowsort
SELECT ALL col0 + - ( col2 ) FROM tab2 cor0
----
-20
41
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-7200
SELECT col1 DIV 70 + col1 AS col1 FROM tab0 AS cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-7200
SELECT col1 / 70 + col1 AS col1 FROM tab0 AS cor0
----
87
92
98

query I rowsort
SELECT ALL + + 86 * col2 AS col2 FROM tab2 AS cor0
----
2236
2322
3268

onlyif mysql # use DIV operator for integer division
query I rowsort label-7202
SELECT ALL - 42 DIV col0 + col1 AS col2 FROM tab0 cor0
----
85
91
96

skipif mysql # not compatible
query I rowsort label-7202
SELECT ALL - 42 / col0 + col1 AS col2 FROM tab0 cor0
----
85
91
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 95 col1 FROM tab2 AS cor0
----
95
95
95

query I rowsort
SELECT 90 * col2 + + cor0.col2 AS col0 FROM tab0 AS cor0
----
3003
7462
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-7205
SELECT ALL - CAST( - col2 AS SIGNED ) + + col2 DIV + 7 + ( + col0 ) FROM tab2 AS cor0
----
107
122
37

skipif mysql # not compatible
query I rowsort label-7205
SELECT ALL - CAST ( - col2 AS INTEGER ) + + col2 / + 7 + ( + col0 ) FROM tab2 AS cor0
----
107
122
37

onlyif mysql # use DIV operator for integer division
query I rowsort label-7206
SELECT DISTINCT + 75 DIV 17 FROM tab2 cor0
----
4

skipif mysql # not compatible
query I rowsort label-7206
SELECT DISTINCT + 75 / 17 FROM tab2 cor0
----
4

query I rowsort
SELECT - ( - col1 ) * + cor0.col0 FROM tab0 cor0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7208
SELECT ALL CAST( col2 AS SIGNED ) * - col2 + + col0 FROM tab0 AS cor0
----
-1065
-6635
34

skipif mysql # not compatible
query I rowsort label-7208
SELECT ALL CAST ( col2 AS INTEGER ) * - col2 + + col0 FROM tab0 AS cor0
----
-1065
-6635
34

query I rowsort
SELECT col1 * cor0.col2 + col1 FROM tab2 AS cor0
----
1593
663
868

onlyif mysql # use DIV operator for integer division
query I rowsort label-7210
SELECT ALL col0 * + 48 + + col1 DIV col1 FROM tab1
----
145
3073
3841

skipif mysql # not compatible
query I rowsort label-7210
SELECT ALL col0 * + 48 + + col1 / col1 FROM tab1
----
145
3073
3841

query I rowsort
SELECT ALL 1 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7212
SELECT ( + 68 ) + col1 * - CAST( 38 AS SIGNED ) + col0 AS col0 FROM tab1
----
-248
-346
-917

skipif mysql # not compatible
query I rowsort label-7212
SELECT ( + 68 ) + col1 * - CAST ( 38 AS INTEGER ) + col0 AS col0 FROM tab1
----
-248
-346
-917

query I rowsort
SELECT - 75 * + col2 + + col0 FROM tab2
----
-1872
-2018
-2771

query I rowsort
SELECT DISTINCT + col2 * + col1 + - col1 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT DISTINCT + - col2 + - col2 * col2 AS col0 FROM tab2 AS cor0
----
-1482
-702
-756

query I rowsort
SELECT - cor0.col2 + + col0 * - col1 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT DISTINCT 5 + col1 * - 57 FROM tab2 AS cor0
----
-1762
-3358
-964

query I rowsort
SELECT - 30 + col2 FROM tab1 AS cor0
----
24
27
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 72 + col1 * 70 + 93 col2 FROM tab2 AS cor0
----
1355
2335
4295

onlyif mysql # use DIV operator for integer division
query I rowsort label-7220
SELECT DISTINCT - - col0 - col0 * + cor0.col0 DIV col0 AS col2 FROM tab0 cor0
----
0

skipif mysql # not compatible
query I rowsort label-7220
SELECT DISTINCT - - col0 - col0 * + cor0.col0 / col0 AS col2 FROM tab0 cor0
----
0

query I rowsort
SELECT + 61 + - cor0.col2 AS col2 FROM tab1 AS cor0
----
-35
4
7

query I rowsort
SELECT + ( - tab2.col2 ) * tab2.col1 FROM tab2
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 12 + - col2 col1 FROM tab2 AS cor0
----
-14
-15
-26

query I rowsort
SELECT DISTINCT + col2 * 43 AS col2 FROM tab1 AS cor0
----
2322
2451
4128

query I rowsort
SELECT DISTINCT + col2 * - col2 * col0 AS col0 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT + col1 * - ( col1 + - col0 ) FROM tab2 AS cor0
----
-744
1054
1121

onlyif mysql # use DIV operator for integer division
query I rowsort label-7227
SELECT DISTINCT + col0 DIV - ( - 98 ) FROM tab0 cor0
----
0

skipif mysql # not compatible
query I rowsort label-7227
SELECT DISTINCT + col0 / - ( - 98 ) FROM tab0 cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 + + col2 * + ( col2 ) col2 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT DISTINCT - 1 FROM tab1 cor0 CROSS JOIN tab1 AS cor1
----
-1

query I rowsort
SELECT DISTINCT + + col0 + 2 * col0 - cor0.col0 FROM tab0 AS cor0
----
178
48
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7231
SELECT + col1 + - CAST( NULL AS SIGNED ) * + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7231
SELECT + col1 + - CAST ( NULL AS INTEGER ) * + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 * ( + ( col1 ) + - col2 ) FROM tab0 AS cor0
----
4558
819
9312

query I rowsort
SELECT + + col1 * - ( 80 ) AS col1 FROM tab2 AS cor0
----
-1360
-2480
-4720

query I rowsort
SELECT ALL - col0 + ( + 89 ) AS col2 FROM tab2 AS cor0
----
10
11
82

query I rowsort
SELECT + cor0.col1 + - col0 * 51 FROM tab0 AS cor0
----
-1138
-1688
-4448

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - 28 AS REAL ) * - cor0.col1 - col2 FROM tab2 AS cor0
----
1626
438
841

query I rowsort
SELECT + 58 - + cor0.col1 FROM tab1 AS cor0
----
32
45
48

query I rowsort
SELECT DISTINCT 84 * + 7 * + col1 + - col2 AS col2 FROM tab2 AS cor0
----
18201
34666
9958

query I rowsort
SELECT ALL - 15 - col2 AS col0 FROM tab0 AS cor0
----
-16
-48
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-7240
SELECT DISTINCT + - col0 - - col1 DIV - col1 FROM tab1 AS cor0
----
-4
-65
-81

skipif mysql # not compatible
query I rowsort label-7240
SELECT DISTINCT + - col0 - - col1 / - col1 FROM tab1 AS cor0
----
-4
-65
-81

query I rowsort
SELECT - 27 * - cor0.col0 FROM tab1 AS cor0
----
1728
2160
81

query I rowsort
SELECT col2 * + col1 + - col0 AS col0 FROM tab1
----
1168
1401
506

query I rowsort
SELECT - tab1.col2 - - col0 FROM tab1
----
-16
-51
7

query I rowsort
SELECT ALL 96 FROM tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to e03080212e3345d8b37e64e3264019c4

query I rowsort
SELECT - col1 + + col0 + 17 AS col2 FROM tab2 AS cor0
----
-7
36
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7246
SELECT - col0 / CAST( NULL AS DECIMAL ) + col1 + - col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7246
SELECT - col0 / CAST ( NULL AS REAL ) + col1 + - col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 * col0 + + col2 * + col2 + col0 AS col1 FROM tab0 AS cor0
----
14912
3177
3431

onlyif mysql # use DIV operator for integer division
query I rowsort label-7248
SELECT col0 + + 76 DIV + col2 - + col1 FROM tab0 AS cor0
----
-2
-60
14

skipif mysql # not compatible
query I rowsort label-7248
SELECT col0 + + 76 / + col2 - + col1 FROM tab0 AS cor0
----
-2
-60
14

query I rowsort
SELECT + tab0.col0 * col0 * col2 FROM tab0
----
1225
19008
649522

query I rowsort
SELECT ALL ( col2 ) * col0 * - col2 AS col0 FROM tab2
----
-114076
-5103
-52728

query I rowsort
SELECT col2 + - col0 + + ( col0 ) * + col1 * ( - 65 ) AS col0 FROM tab1
----
-41607
-5019
-67584

query I rowsort
SELECT ALL 52 AS col0 FROM tab0, tab2, tab0 cor0
----
27 values hashing to 76100d10f51995d20efdeb657e444d3c

onlyif mysql # use DIV operator for integer division
query I rowsort label-7253
SELECT DISTINCT + tab1.col1 * + col2 DIV + tab1.col2 + + col2 + + col1 * col2 AS col2 FROM tab1
----
1357
1484
637

skipif mysql # not compatible
query I rowsort label-7253
SELECT DISTINCT + tab1.col1 * + col2 / + tab1.col2 + + col2 + + col1 * col2 AS col2 FROM tab1
----
1357
1484
637

query I rowsort
SELECT ALL col0 * - 14 FROM tab2
----
-1092
-1106
-98

query I rowsort
SELECT - 17 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
27 values hashing to 28cd5b4c959cb41fbc56389ab43d167e

query I rowsort
SELECT ALL + cor1.col1 - cor1.col1 AS col2 FROM tab2, tab2 cor0, tab1 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT + - col2 * - col2 + 34 FROM tab0 AS cor0
----
1123
35
6758

onlyif mysql # use DIV operator for integer division
query I rowsort label-7258
SELECT col2 DIV col0 + - 23 * + col1 - - col0 FROM tab0 AS cor0
----
-1953
-2004
-2196

skipif mysql # not compatible
query I rowsort label-7258
SELECT col2 / col0 + - 23 * + col1 - - col0 FROM tab0 AS cor0
----
-1953
-2004
-2196

query I rowsort
SELECT col2 + 26 * + col2 FROM tab0 cor0
----
2214
27
891

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7260
SELECT col2 + + CAST( NULL AS SIGNED ) * - col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7260
SELECT col2 + + CAST ( NULL AS INTEGER ) * - col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col1 * col0 + col0 AS col1 FROM tab0
----
-2040
-3360
-8010

query I rowsort
SELECT - col2 - col0 * tab0.col1 FROM tab0
----
-2097
-3396
-8181

query I rowsort
SELECT ALL col1 + - tab1.col1 * col1 AS col0 FROM tab1
----
-156
-650
-90

query I rowsort
SELECT DISTINCT - col2 * - col2 + - col0 AS col0 FROM tab2
----
1365
598
722

query I rowsort
SELECT ALL + col1 * + col1 + tab0.col0 * - col0 AS col2 FROM tab0
----
360
6820
8184

query I rowsort
SELECT DISTINCT tab0.col2 FROM tab0 WHERE NOT col0 NOT IN ( - col2 * col1 )
----

query III rowsort
SELECT * FROM tab1 WHERE - col2 NOT IN ( tab1.col2 * + col2 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT DISTINCT - col1 * - col1 + tab1.col1 FROM tab1
----
110
182
702

query I rowsort
SELECT DISTINCT + col2 FROM tab0 WHERE ( col0 ) > col1 * + col0
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7270
SELECT DISTINCT col1 DIV tab1.col0 - col0 FROM tab1
----
-64
-80
5

skipif mysql # not compatible
query I rowsort label-7270
SELECT DISTINCT col1 / tab1.col0 - col0 FROM tab1
----
-64
-80
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * col2 + - tab2.col1 col2 FROM tab2
----
1427
617
698

query I rowsort
SELECT ALL - 49 * col1 AS col1 FROM tab2
----
-1519
-2891
-833

onlyif mysql # use DIV operator for integer division
query I rowsort label-7273
SELECT DISTINCT - tab0.col1 DIV - 53 AS col1 FROM tab0, tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-7273
SELECT DISTINCT - tab0.col1 / - 53 AS col1 FROM tab0, tab1 AS cor0
----
1

query I rowsort
SELECT 84 * + cor0.col0 FROM tab1 AS cor0
----
252
5376
6720

onlyif mysql # use DIV operator for integer division
query I rowsort label-7275
SELECT + 96 + - cor0.col1 DIV + 34 AS col2 FROM tab2 AS cor0
----
95
96
96

skipif mysql # not compatible
query I rowsort label-7275
SELECT + 96 + - cor0.col1 / + 34 AS col2 FROM tab2 AS cor0
----
95
96
96

query I rowsort
SELECT + cor1.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT DISTINCT + col1 * 82 + 14 * - col1 FROM tab2 AS cor0
----
1156
2108
4012

query I rowsort
SELECT DISTINCT col1 * col2 - cor0.col1 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT - cor1.col1 AS col0 FROM tab0, tab1 AS cor0, tab0 AS cor1, tab1, tab1 cor2
----
243 values hashing to 7f0405f8197238fbd342972ef0bcee12

query I rowsort
SELECT ALL col2 - + 21 * 19 AS col1 FROM tab1 AS cor0
----
-303
-342
-345

query I rowsort
SELECT DISTINCT + col0 + col1 + col2 AS col0 FROM tab2 AS cor0
----
134
163
65

query I rowsort
SELECT - + ( col2 ) + - cor0.col0 AS col0 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT - col1 + col0 * + col2 * 47 AS col2 FROM tab1 AS cor0
----
171446
360947
7588

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( + 77 ) col1 FROM tab0 AS cor0
----
-77

query I rowsort
SELECT + - 54 * + 24 AS col1 FROM tab2 AS cor0
----
-1296
-1296
-1296

query I rowsort
SELECT cor0.col0 + cor0.col2 AS col2 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-7287
SELECT ALL - cor0.col1 DIV + cor0.col2 + 18 + col0 * cor0.col0 FROM tab0 AS cor0
----
1146
592
7938

skipif mysql # not compatible
query I rowsort label-7287
SELECT ALL - cor0.col1 / + cor0.col2 + 18 + col0 * cor0.col0 FROM tab0 AS cor0
----
1146
592
7938

onlyif mysql # use DIV operator for integer division
query I rowsort label-7288
SELECT + col2 DIV 80 - col1 FROM tab1
----
-10
-12
-26

skipif mysql # not compatible
query I rowsort label-7288
SELECT + col2 / 80 - col1 FROM tab1
----
-10
-12
-26

query I rowsort
SELECT DISTINCT col2 + 30 AS col0 FROM tab2
----
56
57
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 19 + - col2 col2 FROM tab0
----
-14
-63
18

query I rowsort
SELECT + col2 + + 69 FROM tab1
----
123
126
165

query I rowsort
SELECT + col0 + col1 + + col0 FROM tab2 cor0
----
175
215
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-7293
SELECT ALL + cor0.col0 + 78 DIV - col2 FROM tab0 AS cor0
----
-43
22
89

skipif mysql # not compatible
query I rowsort label-7293
SELECT ALL + cor0.col0 + 78 / - col2 FROM tab0 AS cor0
----
-43
22
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7294
SELECT col1 * CAST( NULL AS SIGNED ) - col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7294
SELECT col1 * CAST ( NULL AS INTEGER ) - col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7295
SELECT ALL + + CAST( NULL AS SIGNED ) * 1 FROM tab2 cor0 CROSS JOIN tab0 cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-7295
SELECT ALL + + CAST ( NULL AS INTEGER ) * 1 FROM tab2 cor0 CROSS JOIN tab0 cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7296
SELECT ALL col1 + CAST( NULL AS SIGNED ) - - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7296
SELECT ALL col1 + CAST ( NULL AS INTEGER ) - - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + 11 FROM tab1 AS cor0
----
-11
-11
-11

query I rowsort
SELECT DISTINCT - col2 + + 52 FROM tab1
----
-2
-44
-5

skipif mysql # not compatible
query I rowsort
SELECT + col2 * - CAST ( 46 * + col1 AS REAL ) + - col0 FROM tab2
----
-29795
-38509
-70642

query I rowsort
SELECT DISTINCT - + col2 - 18 FROM tab2 AS cor0
----
-44
-45
-56

query I rowsort
SELECT ALL + - col0 * + 34 * col1 FROM tab0 AS cor0
----
-115430
-275366
-70176

query I rowsort
SELECT DISTINCT col1 + 56 * + col2 AS col0 FROM tab2 AS cor0
----
1515
1543
2145

onlyif mysql # use DIV operator for integer division
query I rowsort label-7303
SELECT DISTINCT tab1.col1 DIV + 98 + - 32 FROM tab1
----
-32

skipif mysql # not compatible
query I rowsort label-7303
SELECT DISTINCT tab1.col1 / + 98 + - 32 FROM tab1
----
-32

query I rowsort
SELECT - col2 * - ( + col0 ) + - col0 FROM tab0
----
0
7209
768

query I rowsort
SELECT ALL - + ( - col0 ) + - col2 FROM tab2 AS cor0
----
-20
41
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 * col2 + col2 * - 15 col1 FROM tab0 AS cor0
----
-14
5494
594

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 52 col1 FROM tab0 cor0
----
-52
-52
-52

query I rowsort
SELECT ALL - cor0.col2 + - col0 AS col2 FROM tab2 AS cor0
----
-104
-117
-34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7309
SELECT CAST( NULL AS SIGNED ) + + ( col2 ) AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7309
SELECT CAST ( NULL AS INTEGER ) + + ( col2 ) AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 80 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 878f012d707aab113cedaf56e6c52e94

query I rowsort
SELECT ( - tab2.col1 ) - col0 AS col1 FROM tab2
----
-137
-38
-96

query I rowsort
SELECT cor0.col0 * + col0 * - col0 - - ( col1 ) FROM tab0 AS cor0
----
-13738
-42778
-704878

query I rowsort
SELECT DISTINCT ( + col0 ) + - col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT col1 + + col1 + col1 FROM tab1 AS cor0
----
30
39
78

query I rowsort
SELECT + col2 + col2 * + ( + 53 ) FROM tab1
----
2916
3078
5184

query I rowsort
SELECT ALL + - col0 * + col2 + col1 + col0 * col2 AS col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT col0 * col2 * col0 + col1 * + ( - col0 * col2 ) FROM tab1
----
-3726
196992
514560

query I rowsort
SELECT ALL 52 FROM tab2 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 7f4ae30893ab330784829711032ae599

query I rowsort
SELECT ALL + + col2 * + ( + 81 ) FROM tab2 AS cor0
----
2106
2187
3078

onlyif mysql # use DIV operator for integer division
query I rowsort label-7320
SELECT + col0 + - col1 DIV 84 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-7320
SELECT + col0 + - col1 / 84 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT + - col0 - 34 AS col2 FROM tab0 AS cor0
----
-123
-58
-69

query I rowsort
SELECT col1 * ( + col2 * - col0 ) + - 55 * - col2 - col2 FROM tab2 AS cor0
----
-118248
-4401
-48982

onlyif mysql # use DIV operator for integer division
query I rowsort label-7323
SELECT ALL col2 + + col0 DIV 10 FROM tab2 AS cor0
----
27
33
45

skipif mysql # not compatible
query I rowsort label-7323
SELECT ALL col2 + + col0 / 10 FROM tab2 AS cor0
----
27
33
45

query I rowsort
SELECT - col2 + col0 + 73 FROM tab1 AS cor0
----
22
57
80

query I rowsort
SELECT - - col1 + + col2 * col0 AS col1 FROM tab2 AS cor0
----
2087
220
3019

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 * col2 + col0 * + col1 * col1 col0 FROM tab1 AS cor0
----
10048
21200
2190

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7327
SELECT - col0 + CAST( col2 AS SIGNED ) * - col0 * 20 + - col0 FROM tab2 AS cor0
----
-3794
-40716
-60198

skipif mysql # not compatible
query I rowsort label-7327
SELECT - col0 + CAST ( col2 AS INTEGER ) * - col0 * 20 + - col0 FROM tab2 AS cor0
----
-3794
-40716
-60198

query I rowsort
SELECT + 80 * col0 + - tab1.col2 FROM tab1
----
186
5063
6304

query I rowsort
SELECT - + ( col2 ) * - col0 + - col1 FROM tab0 cor0
----
-62
706
7207

query I rowsort
SELECT ALL + - col1 + 4 FROM tab1 AS cor0
----
-22
-6
-9

query I rowsort
SELECT 12 * 71 AS col0 FROM tab1 AS cor0
----
852
852
852

query I rowsort
SELECT DISTINCT - - cor0.col2 * col2 - col1 * 78 * 15 FROM tab0 AS cor0
----
-113489
-99531
-99746

query I rowsort
SELECT DISTINCT - - col2 + cor0.col1 AS col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL - col1 + 98 FROM tab1 AS cor0
----
72
85
88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7335
SELECT DISTINCT + - CAST( - col2 AS SIGNED ) + + cor0.col0 - + 44 AS col0 FROM tab1 cor0
----
13
132
77

skipif mysql # not compatible
query I rowsort label-7335
SELECT DISTINCT + - CAST ( - col2 AS INTEGER ) + + cor0.col0 - + 44 AS col0 FROM tab1 cor0
----
13
132
77

query I rowsort
SELECT ALL + + ( 66 ) + - col2 FROM tab1 AS cor0
----
-30
12
9

query I rowsort
SELECT - ( + 95 ) FROM tab0 cor0
----
-95
-95
-95

query I rowsort
SELECT DISTINCT + + col0 * + 77 * col2 FROM tab1 AS cor0
----
12474
280896
591360

query I rowsort
SELECT DISTINCT + - col2 + 91 AS col1 FROM tab1 cor0
----
-5
34
37

query I rowsort
SELECT DISTINCT - 55 * cor0.col1 AS col2 FROM tab1 AS cor0
----
-1430
-550
-715

onlyif mysql # use DIV operator for integer division
query I rowsort label-7341
SELECT DISTINCT - col2 DIV col1 + + col0 + - ( col1 ) AS col1 FROM tab1 AS cor0
----
-25
49
60

skipif mysql # not compatible
query I rowsort label-7341
SELECT DISTINCT - col2 / col1 + + col0 + - ( col1 ) AS col1 FROM tab1 AS cor0
----
-25
49
60

query I rowsort
SELECT - - 6 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 5d1cb90ed58fa7573895d2f95b211821

query I rowsort
SELECT ALL + - 88 + - col2 AS col2 FROM tab2 AS cor0
----
-114
-115
-126

query I rowsort
SELECT col0 * col2 + col2 AS col1 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT ALL + - 41 * col1 AS col1 FROM tab1 AS cor0
----
-1066
-410
-533

query I rowsort
SELECT ALL - col1 + cor0.col1 * cor0.col0 FROM tab1 cor0
----
1027
52
630

query I rowsort
SELECT DISTINCT - - col2 * col0 + + 27 AS col2 FROM tab2 cor0
----
2055
216
3029

query I rowsort
SELECT + 64 * 80 FROM tab0 AS cor0
----
5120
5120
5120

query I rowsort
SELECT + + 14 * ( + col2 ) * - 28 AS col0 FROM tab1 AS cor0
----
-21168
-22344
-37632

onlyif mysql # use DIV operator for integer division
query I rowsort label-7350
SELECT - CAST( cor0.col2 AS SIGNED ) DIV col0 AS col0 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7350
SELECT - CAST ( cor0.col2 AS INTEGER ) / col0 AS col0 FROM tab0 AS cor0
----
-1
0
0

query I rowsort
SELECT ALL col1 * + 31 FROM tab1
----
310
403
806

onlyif mysql # use DIV operator for integer division
query I rowsort label-7352
SELECT col0 * + col0 + col0 DIV col2 FROM tab0
----
1260
576
7922

skipif mysql # not compatible
query I rowsort label-7352
SELECT col0 * + col0 + col0 / col2 FROM tab0
----
1260
576
7922

query I rowsort
SELECT col0 + + ( col0 * + col1 ) FROM tab0
----
2088
3430
8188

query I rowsort
SELECT + - col1 + 95 * - col1 FROM tab0 AS cor0
----
-8256
-8736
-9312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 98 col0 FROM tab0 AS cor0
----
98

query I rowsort
SELECT cor0.col2 * ( 31 + col0 ) AS col1 FROM tab2 cor0
----
1026
2834
4180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 94 col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to a4d239626cf0546ac1b2f57bb8407089

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7358
SELECT ALL + CAST( NULL AS DECIMAL ) + 36 FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-7358
SELECT ALL + CAST ( NULL AS REAL ) + 36 FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7359
SELECT ALL col1 * CAST( - 89 AS SIGNED ) FROM tab0
----
-7654
-8099
-8633

skipif mysql # not compatible
query I rowsort label-7359
SELECT ALL col1 * CAST ( - 89 AS INTEGER ) FROM tab0
----
-7654
-8099
-8633

query I rowsort
SELECT + + cor0.col1 + - col0 * col1 AS col1 FROM tab0 cor0
----
-1978
-3298
-8008

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7361
SELECT - col0 + - CAST( col1 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
-29
-74
-93

skipif mysql # not compatible
query I rowsort label-7361
SELECT - col0 + - CAST ( col1 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT col2 + - 99 FROM tab0 cor0
----
-17
-66
-98

query I rowsort
SELECT - 81 * 27 AS col2 FROM tab2 AS cor0
----
-2187
-2187
-2187

query I rowsort
SELECT ALL cor1.col0 FROM tab2, tab2 AS cor0, tab1 cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 83 col1 FROM tab2
----
83
83
83

query I rowsort
SELECT ALL - 39 + col0 AS col2 FROM tab2 AS cor0
----
-32
39
40

query I rowsort
SELECT DISTINCT col2 + - 53 FROM tab0 AS cor0
----
-20
-52
29

onlyif mysql # use DIV operator for integer division
query I rowsort label-7368
SELECT DISTINCT col1 * 99 DIV col2 AS col1 FROM tab1 cor0
----
13
17
47

skipif mysql # not compatible
query I rowsort label-7368
SELECT DISTINCT col1 * 99 / col2 AS col1 FROM tab1 cor0
----
13
17
47

query I rowsort
SELECT DISTINCT + 5 - - col0 AS col2 FROM tab2
----
12
83
84

query I rowsort
SELECT + ( + col0 ) - + 99 * tab1.col1 AS col1 FROM tab1
----
-1207
-2571
-926

query I rowsort
SELECT 91 FROM tab2, tab0 cor0, tab2 AS cor1
----
27 values hashing to deebbcfb9c7803a34dca6bd860849afe

query I rowsort
SELECT - col2 * col1 * ( col1 ) + col0 AS col2 FROM tab1 AS cor0
----
-16144
-36501
-5636

query I rowsort
SELECT + 42 * - col2 + - 36 FROM tab0 AS cor0
----
-1422
-3480
-78

query I rowsort
SELECT - cor0.col0 + + 69 * col1 FROM tab2 AS cor0
----
1094
2132
3993

onlyif mysql # use DIV operator for integer division
query I rowsort label-7375
SELECT DISTINCT + col0 DIV + ( - cor0.col1 ) FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-7375
SELECT DISTINCT + col0 / + ( - cor0.col1 ) FROM tab0 AS cor0
----
0

query I rowsort
SELECT col2 + - ( col0 ) AS col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT - - cor0.col2 + + 90 AS col0 FROM tab0 AS cor0
----
123
172
91

query I rowsort
SELECT ALL + ( - col2 ) AS col2 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT col2 * + ( - col2 ) + + col1 + col1 AS col0 FROM tab2 cor0
----
-1410
-558
-667

query I rowsort
SELECT ALL - - cor0.col0 + col0 * + col2 * col1 FROM tab1 AS cor0
----
36544
4215
99920

query I rowsort
SELECT ALL - col1 - + col1 * col0 FROM tab2
----
-1360
-248
-4661

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7382
SELECT CAST( + col0 AS SIGNED ) + - cor0.col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7382
SELECT CAST ( + col0 AS INTEGER ) + - cor0.col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col1 * ( + col2 ) AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL - col0 * cor0.col1 + + col1 + + col0 FROM tab0 cor0
----
-1954
-3263
-7919

query I rowsort
SELECT DISTINCT - 93 + col1 FROM tab0 AS cor0
----
-2
-7
4

query I rowsort
SELECT DISTINCT - 40 + - col1 FROM tab2 AS cor0
----
-57
-71
-99

onlyif mysql # use DIV operator for integer division
query I rowsort label-7387
SELECT + - ( cor0.col1 ) * col1 + ( col1 + 97 ) DIV col0 FROM tab2 AS cor0
----
-288
-3479
-943

skipif mysql # not compatible
query I rowsort label-7387
SELECT + - ( cor0.col1 ) * col1 + ( col1 + 97 ) / col0 FROM tab2 AS cor0
----
-288
-3479
-943

onlyif mysql # use DIV operator for integer division
query I rowsort label-7388
SELECT - ( col0 ) DIV cor0.col1 + + col1 * col0 FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-7388
SELECT - ( col0 ) / cor0.col1 + + col1 * col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL - col2 + cor0.col1 * + col1 FROM tab1 AS cor0
----
43
622
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-7390
SELECT ALL - col1 + + col2 * ( col2 ) DIV - col1 - + col0 FROM tab0 AS cor0
----
-122
-132
-253

skipif mysql # not compatible
query I rowsort label-7390
SELECT ALL - col1 + + col2 * ( col2 ) / - col1 - + col0 FROM tab0 AS cor0
----
-122
-132
-253

query I rowsort
SELECT ALL + 30 AS col1 FROM tab0
----
30
30
30

onlyif mysql # use DIV operator for integer division
query I rowsort label-7392
SELECT - ( col0 ) + 2 DIV col1 AS col2 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-7392
SELECT - ( col0 ) + 2 / col1 AS col2 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL col0 * col1 + - col0 AS col2 FROM tab0 cor0
----
2040
3360
8010

query I rowsort
SELECT + 80 + + cor1.col1 FROM tab0, tab0 AS cor0, tab0 cor1
----
27 values hashing to 0d2352c41ee236fe2558e28bdd8c5eff

query I rowsort
SELECT DISTINCT ( 66 ) - + col0 FROM tab0
----
-23
31
42

onlyif mysql # use DIV operator for integer division
query I rowsort label-7396
SELECT ALL + 98 DIV + cor0.col2 - + 48 * 62 AS col1 FROM tab0 AS cor0
----
-2878
-2974
-2975

skipif mysql # not compatible
query I rowsort label-7396
SELECT ALL + 98 / + cor0.col2 - + 48 * 62 AS col1 FROM tab0 AS cor0
----
-2878
-2974
-2975

query I rowsort
SELECT DISTINCT cor0.col0 * 66 * cor0.col1 FROM tab0, tab0 AS cor0
----
136224
224070
534534

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7398
SELECT DISTINCT - - col1 + - CAST( col1 AS SIGNED ) FROM tab0 cor0
----
0

skipif mysql # not compatible
query I rowsort label-7398
SELECT DISTINCT - - col1 + - CAST ( col1 AS INTEGER ) FROM tab0 cor0
----
0

query I rowsort
SELECT DISTINCT + - col0 * 81 FROM tab0 cor0
----
-1944
-2835
-7209

query I rowsort
SELECT ALL - + cor0.col0 * - ( + col2 ) + col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT ALL - + cor0.col1 + 11 * - col2 AS col0 FROM tab2 AS cor0
----
-328
-345
-435

query I rowsort
SELECT DISTINCT col2 * col0 * - col1 + ( - col0 ) * col1 FROM tab1 AS cor0
----
-100880
-37120
-4290

query I rowsort
SELECT ALL 23 AS col2 FROM tab1 AS cor0
----
23
23
23

query I rowsort
SELECT DISTINCT + - col1 - + col0 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT DISTINCT + 15 + col0 FROM tab2 cor0
----
22
93
94

query I rowsort
SELECT DISTINCT - col1 + + col2 + cor0.col0 FROM tab1 AS cor0
----
111
163
31

query I rowsort
SELECT ALL - 18 - cor0.col1 * col2 AS col2 FROM tab1 AS cor0
----
-1266
-1422
-588

query I rowsort
SELECT ALL + col0 + col2 * + col1 AS col1 FROM tab2 AS cor0
----
1612
725
844

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7409
SELECT col2 + CAST( 47 AS SIGNED ) col1 FROM tab1
----
101
104
143

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7409
SELECT col2 + CAST ( 47 AS INTEGER ) col1 FROM tab1
----
101
104
143

query I rowsort
SELECT DISTINCT - + 69 AS col2 FROM tab1 AS cor0
----
-69

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7411
SELECT - CAST( + 24 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-24
-24
-24

skipif mysql # not compatible
query I rowsort label-7411
SELECT - CAST ( + 24 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-24
-24
-24

query I rowsort
SELECT DISTINCT + col0 + + col2 * + cor0.col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT - col2 + 52 FROM tab1
----
-2
-44
-5

query I rowsort
SELECT + 91 + - col2 * + col1 * col1 AS col0 FROM tab2 AS cor0
----
-10891
-25856
-90415

query I rowsort
SELECT + 1 * col1 * - col0 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + 3 FROM tab2, tab2 AS cor0
----
9 values hashing to 3cf1e377a943589897b8d431a834f1ba

query I rowsort
SELECT + - col2 * col1 * 27 AS col2 FROM tab0 AS cor0
----
-201474
-2619
-76626

query I rowsort
SELECT + cor0.col1 * col1 + - ( col0 ) FROM tab2 AS cor0
----
210
3403
954

query I rowsort
SELECT DISTINCT ( col2 + tab2.col1 ) FROM tab2
----
55
58
85

query I rowsort
SELECT + ( - col0 + + col0 ) AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT + 44 * + col2 * col1 + - col2 AS col1 FROM tab1
----
25023
54816
61722

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + tab1.col2 ) col2 FROM tab1
----
54
57
96

query I rowsort
SELECT col1 + col1 + + col2 AS col1 FROM tab0 AS cor0
----
195
205
264

onlyif mysql # use DIV operator for integer division
query I rowsort label-7424
SELECT 24 * + col2 DIV - ( + col2 ) AS col2 FROM tab0
----
-24
-24
-24

skipif mysql # not compatible
query I rowsort label-7424
SELECT 24 * + col2 / - ( + col2 ) AS col2 FROM tab0
----
-24
-24
-24

query I rowsort
SELECT + col0 * col1 * col0 + col0 AS col0 FROM tab0
----
118860
49560
720900

query I rowsort
SELECT DISTINCT ( + cor1.col2 ) FROM tab2, tab1 cor0, tab2 AS cor1
----
26
27
38

query I rowsort
SELECT 12 + + col2 * + col1 AS col2 FROM tab0
----
109
2850
7474

onlyif mysql # use DIV operator for integer division
query I rowsort label-7428
SELECT DISTINCT col0 DIV - ( col2 * + col2 ) FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-7428
SELECT DISTINCT col0 / - ( col2 * + col2 ) FROM tab1
----
0

query I rowsort
SELECT - cor0.col0 * ( + col2 ) FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL col0 + - ( col0 ) * + col1 AS col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7431
SELECT + col0 + - CAST( NULL AS SIGNED ) / col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7431
SELECT + col0 + - CAST ( NULL AS INTEGER ) / col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor0.col1 * col0 + col2 AS col0 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT ALL cor0.col0 * ( 42 ) AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 76c06099f7ec965229cfbc05e021cad0

query I rowsort
SELECT - 96 + - col2 AS col1 FROM tab0 AS cor0
----
-129
-178
-97

query I rowsort
SELECT 54 FROM tab0, tab1 cor0, tab2 cor1
----
27 values hashing to 81150d59d6c3fc48b4ef5a4a5495bc7a

query I rowsort
SELECT DISTINCT + ( - tab1.col0 ) + 41 AS col0 FROM tab1
----
-23
-39
38

query I rowsort
SELECT col2 * + col1 * 52 AS col2 FROM tab2 AS cor0
----
33592
43524
79768

onlyif mysql # use DIV operator for integer division
query I rowsort label-7438
SELECT + col1 DIV col0 + 7 AS col2 FROM tab1 AS cor0
----
15
7
7

skipif mysql # not compatible
query I rowsort label-7438
SELECT + col1 / col0 + 7 AS col2 FROM tab1 AS cor0
----
15
7
7

query I rowsort
SELECT + col0 * col1 + + 57 * + cor0.col2 AS col0 FROM tab2 AS cor0
----
1756
3509
6084

onlyif mysql # use DIV operator for integer division
query I rowsort label-7440
SELECT ALL + 74 DIV col2 FROM tab0
----
0
2
74

skipif mysql # not compatible
query I rowsort label-7440
SELECT ALL + 74 / col2 FROM tab0
----
0
2
74

query I rowsort
SELECT tab2.col1 + + col1 * col2 FROM tab2
----
1593
663
868

query I rowsort
SELECT ALL - col0 + ( col0 ) * col0 FROM tab0 AS cor0
----
1190
552
7832

query I rowsort
SELECT DISTINCT + col2 * + 64 - + col0 AS col0 FROM tab0 AS cor0
----
2088
29
5159

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7444
SELECT - CAST( NULL AS SIGNED ) * col2 col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7444
SELECT - CAST ( NULL AS INTEGER ) * col2 col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ( - ( - col2 ) ) + col1 AS col2 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7446
SELECT + CAST( NULL AS SIGNED ) - + 23 / col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7446
SELECT + CAST ( NULL AS INTEGER ) - + 23 / col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 * cor0.col1 * col1 + - 45 FROM tab1 AS cor0
----
-13565
-2073
-6445

query I rowsort
SELECT - + ( col0 ) + col1 + 59 AS col0 FROM tab1 cor0
----
-8
5
82

query I rowsort
SELECT 56 * col0 FROM tab1 AS cor0
----
168
3584
4480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 39 * col2 + + col2 col2 FROM tab2 AS cor0
----
-1026
-1444
-988

onlyif mysql # use DIV operator for integer division
query I rowsort label-7451
SELECT DISTINCT + - cor0.col2 DIV col1 + col2 FROM tab2 cor0
----
26
27
36

skipif mysql # not compatible
query I rowsort label-7451
SELECT DISTINCT + - cor0.col2 / col1 + col2 FROM tab2 cor0
----
26
27
36

query I rowsort
SELECT - col1 * - 75 FROM tab2
----
1275
2325
4425

query I rowsort
SELECT 21 * + col0 + + 52 FROM tab0 AS cor0
----
1921
556
787

query I rowsort
SELECT ALL - 72 + cor0.col0 FROM tab1 AS cor0
----
-69
-8
8

query I rowsort
SELECT DISTINCT ( - col0 ) * - col2 AS col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT + 49 AS col2 FROM tab1 cor0
----
49
49
49

query I rowsort
SELECT DISTINCT 30 + - col0 FROM tab1 AS cor0
----
-34
-50
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-7458
SELECT - col0 + + col0 DIV + ( - 98 ) AS col2 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-7458
SELECT - col0 + + col0 / + ( - 98 ) AS col2 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL - col1 + col1 * ( col0 ) * col1 FROM tab1 AS cor0
----
13507
2002
6390

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7460
SELECT + cor0.col1 * + col1 + - CAST( - col2 AS SIGNED ) AS col2 FROM tab1 cor0
----
157
265
730

skipif mysql # not compatible
query I rowsort label-7460
SELECT + cor0.col1 * + col1 + - CAST ( - col2 AS INTEGER ) AS col2 FROM tab1 cor0
----
157
265
730

query I rowsort
SELECT DISTINCT + + 69 * cor0.col2 AS col1 FROM tab1 AS cor0
----
3726
3933
6624

query I rowsort
SELECT + col0 * - col1 + ( - col2 ) * - col2 AS col0 FROM tab0 AS cor0
----
-1375
-3394
-975

query I rowsort
SELECT DISTINCT 74 + - col1 * cor0.col2 FROM tab2 cor0
----
-1460
-572
-763

onlyif mysql # use DIV operator for integer division
query I rowsort label-7464
SELECT ALL - + col2 * col1 DIV + col1 AS col1 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-7464
SELECT ALL - + col2 * col1 / + col1 AS col1 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT - col1 * - col1 + - cor0.col2 AS col1 FROM tab1 AS cor0
----
43
622
73

query I rowsort
SELECT ALL + 29 * cor0.col0 + + col2 AS col2 FROM tab0 AS cor0
----
1016
2663
729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + col0 + + col1 col2 FROM tab0
----
196
229
271

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 - col0 * col1 * cor0.col1 col1 FROM tab0 AS cor0
----
-177528
-329350
-737098

query I rowsort
SELECT DISTINCT + - cor0.col1 + - 54 * - col0 AS col1 FROM tab0 AS cor0
----
1210
1793
4715

query I rowsort
SELECT - - 12 * 39 + - col2 * col2 + 3 FROM tab1 AS cor0
----
-2445
-2778
-8745

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7471
SELECT - col2 - CAST( NULL AS DECIMAL ) AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7471
SELECT - col2 - CAST ( NULL AS REAL ) AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ( col1 ) * + tab0.col0 * - col0 AS col2 FROM tab0
----
-118825
-49536
-720811

onlyif mysql # use DIV operator for integer division
query I rowsort label-7473
SELECT 61 DIV + ( + col0 ) col0 FROM tab1
----
0
0
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7473
SELECT 61 / + ( + col0 ) col0 FROM tab1
----
0
0
20

query I rowsort
SELECT DISTINCT - ( col0 ) + + col2 - - col0 FROM tab1
----
54
57
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7475
SELECT - CAST( NULL AS SIGNED ) + col0 / col2 - 18 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7475
SELECT - CAST ( NULL AS INTEGER ) + col0 / col2 - 18 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7476
SELECT DISTINCT col2 * col0 DIV + col0 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-7476
SELECT DISTINCT col2 * col0 / + col0 FROM tab1
----
54
57
96

query I rowsort
SELECT col1 * col2 * + col2 + tab2.col2 AS col0 FROM tab2
----
22626
24586
39910

query I rowsort
SELECT DISTINCT tab0.col2 * col2 * col0 FROM tab0
----
26136
35
598436

onlyif mysql # use DIV operator for integer division
query I rowsort label-7479
SELECT DISTINCT - tab1.col0 DIV col1 col0 FROM tab1
----
-6
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7479
SELECT DISTINCT - tab1.col0 / col1 col0 FROM tab1
----
-6
0

query I rowsort
SELECT - tab0.col2 + - col0 * col0 FROM tab0
----
-1226
-609
-8003

query I rowsort
SELECT col1 * - col2 + tab1.col2 FROM tab1
----
-1152
-1350
-513

query I rowsort
SELECT col1 + - cor0.col2 * col2 FROM tab0 AS cor0
----
-1003
-6633
96

query I rowsort
SELECT - col0 * + col2 * col1 AS col2 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT - ( col0 ) - col2 AS col2 FROM tab2
----
-104
-117
-34

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7486
SELECT DISTINCT - CAST( 90 AS SIGNED ) + - col1 FROM tab1
----
-100
-103
-116

skipif mysql # not compatible
query I rowsort label-7486
SELECT DISTINCT - CAST ( 90 AS INTEGER ) + - col1 FROM tab1
----
-100
-103
-116

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col2 * + col2 col1 FROM tab2
----
-17576
-19683
-54872

query I rowsort
SELECT ( - tab0.col1 ) * col0 + + col0 FROM tab0
----
-2040
-3360
-8010

query I rowsort
SELECT col1 + + ( - tab1.col2 ) FROM tab1
----
-28
-47
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 42 * + col0 col2 FROM tab2 cor0
----
-294
-3276
-3318

query I rowsort
SELECT cor0.col2 + + 34 AS col2 FROM tab1 AS cor0
----
130
88
91

query I rowsort
SELECT DISTINCT 81 + + 98 * col0 FROM tab0 cor0
----
2433
3511
8803

query I rowsort
SELECT 75 + - 10 FROM tab1
----
65
65
65

query I rowsort
SELECT - 65 + col2 FROM tab1 AS cor0
----
-11
-8
31

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7495
SELECT + CAST( NULL AS SIGNED ) * - col1 + + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7495
SELECT + CAST ( NULL AS INTEGER ) * - col1 + + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 21 col0 FROM tab0 AS cor0
----
-21
-21
-21

query I rowsort
SELECT ALL cor0.col0 + - cor0.col1 - col1 FROM tab2 AS cor0
----
-40
-55
45

query I rowsort
SELECT DISTINCT - 41 + - col1 FROM tab0 AS cor0
----
-127
-132
-138

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - cor0.col2 + - cor0.col2 + - col2 * + col2 col0 FROM tab0 cor0
----
-1
-1089
-6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 + col2 col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL + + col2 + + col0 AS col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT - 80 * col0 + col0 * col1 + - col1 AS col1 FROM tab2 AS cor0
----
-1697
-374
-4994

query I rowsort
SELECT - 80 + + col1 * col0 AS col0 FROM tab2 AS cor0
----
1263
137
4522

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + col0 * col0 col0 FROM tab0 cor0
----
1322
662
8012

query I rowsort
SELECT DISTINCT - 36 * + col1 AS col1 FROM tab1 AS cor0
----
-360
-468
-936

query I rowsort
SELECT DISTINCT 65 * col1 AS col2 FROM tab1 AS cor0
----
1690
650
845

query I rowsort
SELECT ALL + 38 + + col0 * - col1 * col1 AS col0 FROM tab2 AS cor0
----
-22793
-271480
-6689

query I rowsort
SELECT ALL + - 82 FROM tab1 cor0
----
-82
-82
-82

query I rowsort
SELECT 50 * col2 FROM tab2
----
1300
1350
1900

onlyif mysql # use DIV operator for integer division
query I rowsort label-7510
SELECT ALL + col2 + col1 DIV col2 FROM tab0 AS cor0
----
35
83
98

skipif mysql # not compatible
query I rowsort label-7510
SELECT ALL + col2 + col1 / col2 FROM tab0 AS cor0
----
35
83
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 98 + + col2 - cor0.col2 col0 FROM tab1 AS cor0
----
-98

query I rowsort
SELECT DISTINCT - + cor0.col1 + col2 * col2 + + col1 AS col1 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT ALL col1 + + col0 * col0 FROM tab2 AS cor0
----
6143
6258
80

query I rowsort
SELECT ALL + - 70 + col2 * col1 + - col0 FROM tab2 AS cor0
----
1386
497
760

query I rowsort
SELECT - col2 * - col1 * + tab0.col1 + + col2 FROM tab0
----
244101
679124
9410

query III rowsort
SELECT * FROM tab2 WHERE NOT - col0 NOT IN ( + col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col2 col1 FROM tab0 WHERE - col1 NOT BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT + col0 * + col0 * col0 + + col2 FROM tab2
----
370
474578
493077

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col2 FROM tab1 WHERE col1 <> NULL
----

query I rowsort
SELECT + cor0.col1 * col2 + col1 AS col1 FROM tab0 AS cor0
----
194
2924
7553

onlyif mysql # use DIV operator for integer division
query I rowsort label-7521
SELECT - col0 * + col0 * + col1 + col2 DIV col1 + col0 * col0 FROM tab1 AS cor0
----
-223
-36859
-76793

skipif mysql # not compatible
query I rowsort label-7521
SELECT - col0 * + col0 * + col1 + col2 / col1 + col0 * col0 FROM tab1 AS cor0
----
-223
-36859
-76793

query I rowsort
SELECT DISTINCT + col1 * col0 * cor0.col1 AS col1 FROM tab2 cor0
----
22831
271518
6727

onlyif mysql # use DIV operator for integer division
query I rowsort label-7523
SELECT ALL cor0.col0 DIV + col2 + - col1 + - col2 col2 FROM tab1 AS cor0
----
-109
-66
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7523
SELECT ALL cor0.col0 / + col2 + - col1 + - col2 col2 FROM tab1 AS cor0
----
-109
-66
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-7524
SELECT tab2.col2 DIV tab2.col1 AS col1 FROM tab2
----
0
0
2

skipif mysql # not compatible
query I rowsort label-7524
SELECT tab2.col2 / tab2.col1 AS col1 FROM tab2
----
0
0
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-7525
SELECT col1 DIV col2 col1 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7525
SELECT col1 / col2 col1 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7526
SELECT DISTINCT - col1 - col1 * col1 DIV + tab1.col1 FROM tab1
----
-20
-26
-52

skipif mysql # not compatible
query I rowsort label-7526
SELECT DISTINCT - col1 - col1 * col1 / + tab1.col1 FROM tab1
----
-20
-26
-52

query I rowsort
SELECT + col1 * + col0 AS col0 FROM tab2 WHERE NOT ( NULL ) <= NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col0 + col0 + col2 col0 FROM tab0
----
-2007
-3359
-7928

query I rowsort
SELECT - col1 * col1 + + tab1.col1 * - col2 + - col0 FROM tab1
----
-1497
-2083
-734

query I rowsort
SELECT DISTINCT + tab2.col2 AS col0 FROM tab2 WHERE col0 < col2
----
27

query I rowsort
SELECT - col2 FROM tab1 WHERE NOT + col2 IN ( col2 )
----

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL >= col0
----

query I rowsort
SELECT + col2 + + cor0.col2 * col0 + + col0 FROM tab1 cor0
----
219
3769
7856

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + + col2 * - col1 col1 FROM tab0 AS cor0
----
-132
-2862
-7551

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 - - col1 col2 FROM tab0 AS cor0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + col0 col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT + col1 + - col0 + - tab2.col2 AS col2 FROM tab2
----
-100
-3
-45

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab1, tab0, tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - + col2 * col2 - col1 AS col2 FROM tab0 AS cor0
----
-1175
-6815
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-7540
SELECT col1 * - col2 + cor0.col1 DIV col0 FROM tab1 AS cor0
----
-1248
-1396
-570

skipif mysql # not compatible
query I rowsort label-7540
SELECT col1 * - col2 + cor0.col1 / col0 FROM tab1 AS cor0
----
-1248
-1396
-570

query I rowsort
SELECT + col0 * - col2 - - cor0.col2 FROM tab2 cor0
----
-162
-2002
-2964

query I rowsort
SELECT - col2 * + col2 * - col1 FROM tab0
----
611884
93654
97

query I rowsort
SELECT - col0 - - col2 * col1 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT + col1 + + col0 * + col2 * cor0.col1 + cor0.col0 FROM tab2 AS cor0
----
119789
51130
5897

query I rowsort
SELECT tab0.col0 + + tab0.col2 AS col2 FROM tab0
----
171
36
57

query I rowsort
SELECT DISTINCT + col0 * col0 * col2 + col0 AS col0 FROM tab1
----
233536
489
614480

query I rowsort
SELECT DISTINCT 22 + col1 * + cor0.col0 FROM tab2 AS cor0
----
1365
239
4624

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col0 + col2 col1 FROM tab1 AS cor0
----
-4039
-6304
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-7549
SELECT - + col1 DIV cor0.col1 + - cor0.col2 AS col0 FROM tab2 cor0
----
-27
-28
-39

skipif mysql # not compatible
query I rowsort label-7549
SELECT - + col1 / cor0.col1 + - cor0.col2 AS col0 FROM tab2 cor0
----
-27
-28
-39

query I rowsort
SELECT - col1 * col0 + col1 * + 93 AS col0 FROM tab2 AS cor0
----
238
2666
885

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7551
SELECT + - CAST( NULL AS SIGNED ) + - col0 * col1 col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7551
SELECT + - CAST ( NULL AS INTEGER ) + - col0 * col1 col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col1 * - tab0.col1 AS col1 FROM tab0, tab0 AS cor0
----
-7396
-7826
-8281
-8342
-8827
-9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-7553
SELECT + CAST( col2 AS SIGNED ) DIV col0 + col0 col0 FROM tab1 AS cor0
----
21
64
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7553
SELECT + CAST ( col2 AS INTEGER ) / col0 + col0 col0 FROM tab1 AS cor0
----
21
64
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-7554
SELECT col2 + - col1 DIV + col1 + col2 FROM tab0 AS cor0
----
1
163
65

skipif mysql # not compatible
query I rowsort label-7554
SELECT col2 + - col1 / + col1 + col2 FROM tab0 AS cor0
----
1
163
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-7555
SELECT + + CAST( col1 AS SIGNED ) DIV cor0.col1 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7555
SELECT + + CAST ( col1 AS INTEGER ) / cor0.col1 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT - - 59 + cor0.col2 + + col1 * 79 FROM tab1 cor0
----
1182
2167
906

query I rowsort
SELECT - + col1 * 93 + col2 FROM tab2 AS cor0
----
-1543
-2856
-5461

query I rowsort
SELECT + - ( ( - col2 ) ) AS col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT + ( - cor0.col0 ) + ( col0 ) AS col0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7560
SELECT col2 + col0 DIV + col1 FROM tab1 AS cor0
----
102
54
63

skipif mysql # not compatible
query I rowsort label-7560
SELECT col2 + col0 / + col1 FROM tab1 AS cor0
----
102
54
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + col1 ) col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT + - cor0.col2 + - col0 * + col2 * - col2 AS col0 FROM tab2 AS cor0
----
114038
5076
52702

query I rowsort
SELECT cor0.col1 - 7 FROM tab0 AS cor0
----
79
84
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-7564
SELECT - - col1 + col1 DIV + col1 AS col2 FROM tab2 cor0
----
18
32
60

skipif mysql # not compatible
query I rowsort label-7564
SELECT - - col1 + col1 / + col1 AS col2 FROM tab2 cor0
----
18
32
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 - + col2 * - col0 col0 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT ALL - col0 * col0 + + tab0.col1 AS col1 FROM tab0
----
-1128
-490
-7830

query I rowsort
SELECT DISTINCT + 44 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
44

query I rowsort
SELECT - cor0.col1 * cor1.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to f41ff9722a9faac08fe6a2f7ee7c03b7

query I rowsort
SELECT - col0 - - 71 * + col1 FROM tab1 AS cor0
----
1843
646
843

query I rowsort
SELECT + + col1 * + ( + col2 ) AS col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT col0 * + cor0.col2 + + cor0.col2 * + col1 + col2 AS col0 FROM tab2 AS cor0
----
1053
3588
3686

onlyif mysql # use DIV operator for integer division
query I rowsort label-7572
SELECT + col2 - + col2 DIV + 25 FROM tab1 AS cor0
----
52
55
93

skipif mysql # not compatible
query I rowsort label-7572
SELECT + col2 - + col2 / + 25 FROM tab1 AS cor0
----
52
55
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7573
SELECT DISTINCT cor0.col0 * + CAST( + ( col0 ) AS SIGNED ) - col1 FROM tab1 AS cor0
----
-17
4086
6387

skipif mysql # not compatible
query I rowsort label-7573
SELECT DISTINCT cor0.col0 * + CAST ( + ( col0 ) AS INTEGER ) - col1 FROM tab1 AS cor0
----
-17
4086
6387

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7574
SELECT ALL + cor0.col2 * CAST( - 56 AS SIGNED ) + - col1 * cor0.col1 FROM tab1 cor0
----
-3292
-3700
-5545

skipif mysql # not compatible
query I rowsort label-7574
SELECT ALL + cor0.col2 * CAST ( - 56 AS INTEGER ) + - col1 * cor0.col1 FROM tab1 cor0
----
-3292
-3700
-5545

onlyif mysql # use DIV operator for integer division
query I rowsort label-7575
SELECT - cor0.col2 DIV 33 + col0 FROM tab2 AS cor0
----
7
78
78

skipif mysql # not compatible
query I rowsort label-7575
SELECT - cor0.col2 / 33 + col0 FROM tab2 AS cor0
----
7
78
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-7576
SELECT - col1 - cor0.col2 DIV 89 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-7576
SELECT - col1 - cor0.col2 / 89 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ALL - col2 * col1 * - col1 FROM tab2 AS cor0
----
10982
25947
90506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7578
SELECT ALL + - col2 + CAST( NULL AS SIGNED ) AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7578
SELECT ALL + - col2 + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7579
SELECT DISTINCT - col2 * CAST( + cor0.col0 AS SIGNED ) - col1 FROM tab1 AS cor0
----
-188
-3658
-7693

skipif mysql # not compatible
query I rowsort label-7579
SELECT DISTINCT - col2 * CAST ( + cor0.col0 AS INTEGER ) - col1 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT DISTINCT cor0.col0 - ( 76 ) * col0 AS col2 FROM tab2 AS cor0
----
-525
-5850
-5925

query I rowsort
SELECT ALL - col2 * + col0 * col2 AS col2 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT + + ( cor0.col2 ) * col2 * + cor0.col1 - col0 * cor0.col1 AS col2 FROM tab0 AS cor0
----
-3298
603785
91590

query I rowsort
SELECT + + 63 * col2 FROM tab0 AS cor0
----
2079
5166
63

query I rowsort
SELECT DISTINCT - col0 + - col1 FROM tab0 cor0
----
-110
-132
-180

query I rowsort
SELECT ALL col0 * + 61 - col2 AS col2 FROM tab2 AS cor0
----
400
4732
4781

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 ALL - tab1.col2 - col1 AS col0 FROM tab1
----
-109
-67
-80

query I rowsort
SELECT - col2 - + 14 AS col0 FROM tab2
----
-40
-41
-52

query I rowsort
SELECT + - ( col0 ) * cor0.col1 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - 97 * 0 * - col2 FROM tab0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7591
SELECT ALL CAST( NULL AS SIGNED ) * tab0.col2 AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7591
SELECT ALL CAST ( NULL AS INTEGER ) * tab0.col2 AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 78 * - col2 AS col2 FROM tab2
----
-2028
-2106
-2964

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 24 col2 FROM tab1
----
-24

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2 cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT ( col1 + tab1.col2 * - col1 ) AS col2 FROM tab1
----
-1235
-1378
-560

query I rowsort
SELECT DISTINCT 20 * col0 AS col2 FROM tab2
----
140
1560
1580

query I rowsort
SELECT ALL tab0.col1 + + 89 * 95 AS col2 FROM tab0, tab0 cor0
----
9 values hashing to a9c9f91cdb955f7421e8c3c7a0694ce5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 69 + col1 col1 FROM tab1
----
79
82
95

query I rowsort
SELECT DISTINCT + 29 * - col0 AS col0 FROM tab0
----
-1015
-2581
-696

query I rowsort
SELECT DISTINCT + 20 * - tab2.col2 FROM tab2, tab0, tab0 cor0
----
-520
-540
-760

query I rowsort
SELECT DISTINCT - 96 * col2 FROM tab0
----
-3168
-7872
-96

query I rowsort
SELECT + 32 + - col2 AS col1 FROM tab0 AS cor0
----
-1
-50
31

query I rowsort
SELECT ALL - 77 * + tab0.col2 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 1addfb0bb4858d6816426e0d4abcfe2d

query I rowsort
SELECT DISTINCT - col0 * - col2 * + 18 + + 5 * + col0 AS col0 FROM tab0 AS cor0
----
131809
14376
805

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 + + col0 col0 FROM tab0 AS cor0
----
178
48
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + ( cor0.col2 ) * - col0 col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL + 80 * col2 AS col0 FROM tab0 AS cor0
----
2640
6560
80

query I rowsort
SELECT DISTINCT + + 87 + + col0 FROM tab0 AS cor0
----
111
122
176

query I rowsort
SELECT DISTINCT + col1 * + col0 + + cor0.col0 FROM tab0 AS cor0
----
2088
3430
8188

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 * col1 + + col1 col2 FROM tab1 AS cor0
----
110
182
702

query I rowsort
SELECT DISTINCT - + col2 * cor0.col2 - + cor0.col0 FROM tab2 AS cor0
----
-1523
-736
-754

query I rowsort
SELECT + 61 * + col1 AS col1 FROM tab2
----
1037
1891
3599

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 * + col0 col2 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-7614
SELECT + tab1.col1 DIV + tab1.col0 FROM tab1, tab1 cor0
----
9 values hashing to 0231f0ea08ef49e8e99dfb495771acf2

skipif mysql # not compatible
query I rowsort label-7614
SELECT + tab1.col1 / + tab1.col0 FROM tab1, tab1 cor0
----
9 values hashing to 0231f0ea08ef49e8e99dfb495771acf2

query I rowsort
SELECT - tab2.col0 + + cor0.col0 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to ca8ec3f73e2033fdfd432059c411d9ca

onlyif mysql # use DIV operator for integer division
query I rowsort label-7616
SELECT DISTINCT + col1 DIV - 85 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-7616
SELECT DISTINCT + col1 / - 85 FROM tab1 AS cor0
----
0

query I rowsort
SELECT - - col1 * col0 + - col2 * cor0.col0 + + ( col0 ) * + ( col0 ) FROM tab2 AS cor0
----
4582
77
8658

onlyif mysql # use DIV operator for integer division
query I rowsort label-7618
SELECT DISTINCT + col1 + col0 DIV - col0 AS col1 FROM tab0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-7618
SELECT DISTINCT + col1 + col0 / - col0 AS col1 FROM tab0
----
85
90
96

query I rowsort
SELECT DISTINCT 91 * + col0 + tab0.col1 AS col1 FROM tab0
----
2270
3282
8190

query I rowsort
SELECT col1 * 36 AS col2 FROM tab2
----
1116
2124
612

query I rowsort
SELECT DISTINCT - ( col0 ) + tab2.col2 * + ( + col0 ) + + col2 * col2 FROM tab2
----
2626
4367
911

query I rowsort
SELECT 62 + 82 AS col2 FROM tab0
----
144
144
144

query I rowsort
SELECT + 10 + col1 - col2 AS col2 FROM tab2 AS cor0
----
-11
14
43

query I rowsort
SELECT ALL + 30 * - 74 AS col1 FROM tab1 AS cor0
----
-2220
-2220
-2220

query I rowsort
SELECT + col2 + + col2 + cor0.col2 FROM tab1 AS cor0
----
162
171
288

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7626
SELECT DISTINCT CAST( NULL AS SIGNED ) + ( + col0 ) AS col0 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-7626
SELECT DISTINCT CAST ( NULL AS INTEGER ) + ( + col0 ) AS col0 FROM tab1
----
NULL

query I rowsort
SELECT DISTINCT + + col1 + 93 AS col0 FROM tab2 AS cor0
----
110
124
152

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col0 col1 FROM tab2, tab1 AS cor0 CROSS JOIN tab1
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query I rowsort
SELECT - 87 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to c0011cd00aa3e86f06bebc13678997f9

onlyif mysql # use DIV operator for integer division
query I rowsort label-7630
SELECT + - col2 + col0 DIV col0 AS col2 FROM tab1 cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-7630
SELECT + - col2 + col0 / col0 AS col2 FROM tab1 cor0
----
-53
-56
-95

query I rowsort
SELECT 94 * + col1 AS col0 FROM tab0
----
8084
8554
9118

onlyif mysql # use DIV operator for integer division
query I rowsort label-7632
SELECT ALL + - col1 * col1 + col1 DIV col0 FROM tab1 AS cor0
----
-100
-169
-668

skipif mysql # not compatible
query I rowsort label-7632
SELECT ALL + - col1 * col1 + col1 / col0 FROM tab1 AS cor0
----
-100
-169
-668

onlyif mysql # use DIV operator for integer division
query I rowsort label-7633
SELECT + - col2 + + col2 DIV 62 FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-7633
SELECT + - col2 + + col2 / 62 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT ( col1 ) * tab1.col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT ALL 71 AS col0 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 95a6ff35b7b8f00868fb58bcaa32d0c2

query I rowsort
SELECT - tab0.col0 + - col0 * + 83 FROM tab0
----
-2016
-2940
-7476

query I rowsort
SELECT - tab0.col0 + - 94 AS col2 FROM tab0
----
-118
-129
-183

query I rowsort
SELECT + col2 * ( + 80 ) AS col1 FROM tab2 AS cor0
----
2080
2160
3040

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7639
SELECT DISTINCT - cor0.col0 * + CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7639
SELECT DISTINCT - cor0.col0 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT 33 FROM tab0, tab1 AS cor0, tab1 AS cor1, tab2, tab1 cor2
----
243 values hashing to c77cb612b8be68f43e6d45e29e30737a

query I rowsort
SELECT DISTINCT - col2 * - 45 FROM tab0 AS cor0
----
1485
3690
45

query I rowsort
SELECT DISTINCT + col2 * ( col1 ) FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT - col2 + - 72 FROM tab0 cor0
----
-105
-154
-73

query I rowsort
SELECT + cor0.col1 + + 9 AS col2 FROM tab2 AS cor0
----
26
40
68

query I rowsort
SELECT - 81 + col2 * col0 AS col0 FROM tab0 AS cor0
----
-46
711
7217

query I rowsort
SELECT + col0 * + col1 - col2 AS col1 FROM tab0 AS cor0
----
2031
3394
8017

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 69 * col2 + col2 col2 FROM tab1 cor0
----
3780
3990
6720

query I rowsort
SELECT + - col2 * - col1 * col2 + - col0 - + col1 * + col0 FROM tab1 AS cor0
----
118688
31786
75735

query I rowsort
SELECT ALL - - col0 * 18 AS col1 FROM tab0 AS cor0
----
1602
432
630

query I rowsort
SELECT col1 + 85 * - col2 AS col2 FROM tab1 AS cor0
----
-4564
-4835
-8147

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7651
SELECT DISTINCT + + 43 * - 48 + col2 + - CAST( col2 AS SIGNED ) FROM tab0 AS cor0
----
-2064

skipif mysql # not compatible
query I rowsort label-7651
SELECT DISTINCT + + 43 * - 48 + col2 + - CAST ( col2 AS INTEGER ) FROM tab0 AS cor0
----
-2064

query I rowsort
SELECT DISTINCT col1 + 76 FROM tab2 cor0
----
107
135
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-7653
SELECT + ( - col2 ) * col1 - - ( col0 + - col2 ) DIV + ( - 88 + col2 ) AS col2 FROM tab0 AS cor0
----
-2838
-7463
-97

skipif mysql # not compatible
query I rowsort label-7653
SELECT + ( - col2 ) * col1 - - ( col0 + - col2 ) / + ( - 88 + col2 ) AS col2 FROM tab0 AS cor0
----
-2838
-7463
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-7654
SELECT col1 DIV 46 - - col1 FROM tab1 cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-7654
SELECT col1 / 46 - - col1 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT ALL col2 * col2 * - col0 FROM tab2
----
-114076
-5103
-52728

query I rowsort
SELECT + 12 * - col0 FROM tab0 cor0
----
-1068
-288
-420

query I rowsort
SELECT + col1 - cor0.col1 * + col2 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT - + col0 * - col2 + - col0 * - col2 AS col1 FROM tab2 AS cor0
----
378
4056
6004

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * - col0 + col2 + cor0.col2 col1 FROM tab1 AS cor0
----
1232
186
754

query I rowsort
SELECT - cor0.col2 * - 78 * - col1 + - col2 AS col0 FROM tab1 AS cor0
----
-109566
-44517
-97440

query I rowsort
SELECT + col1 * col0 - ( + cor0.col2 ) * 94 * col1 AS col0 FROM tab2 AS cor0
----
-139594
-59381
-78461

query I rowsort
SELECT ALL + + 30 * + col0 - + col0 FROM tab2 cor0
----
203
2262
2291

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7663
SELECT + CAST( NULL AS SIGNED ) + col2 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7663
SELECT + CAST ( NULL AS INTEGER ) + col2 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + col0 + col0 + col1 AS col1 FROM tab2 AS cor0
----
175
215
45

query I rowsort
SELECT DISTINCT + col2 * 41 * col2 + + col2 FROM tab0 AS cor0
----
275766
42
44682

skipif mysql # not compatible
query I rowsort
SELECT col0 * - CAST ( ( col0 ) AS REAL ) FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT + col1 * - 75 + + col1 FROM tab2
----
-1258
-2294
-4366

query I rowsort
SELECT ALL + tab2.col0 + ( 16 ) FROM tab2
----
23
94
95

query I rowsort
SELECT - col0 + 80 * col2 + col2 * + 68 FROM tab2
----
3770
3989
5545

onlyif mysql # use DIV operator for integer division
query I rowsort label-7670
SELECT ALL ( tab0.col0 ) DIV - col0 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7670
SELECT ALL ( tab0.col0 ) / - col0 FROM tab0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 + + col0 col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT - cor1.col1 AS col1 FROM tab2, tab2 cor0, tab0 AS cor1
----
-86
-91
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7673
SELECT ALL + CAST( + 72 AS SIGNED ) FROM tab1
----
72
72
72

skipif mysql # not compatible
query I rowsort label-7673
SELECT ALL + CAST ( + 72 AS INTEGER ) FROM tab1
----
72
72
72

query I rowsort
SELECT DISTINCT ( - col2 * - col0 ) FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL - - cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT DISTINCT - + 12 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
-12

query I rowsort
SELECT + - col0 * col2 + - 70 FROM tab1 AS cor0
----
-232
-3718
-7750

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col0 * col0 col1 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT + col0 + col2 * + 60 FROM tab1 AS cor0
----
3243
3484
5840

query I rowsort
SELECT + col0 * + col1 - ( col2 + tab1.col2 ) * - tab1.col2 AS col1 FROM tab1
----
19472
5910
7138

query I rowsort
SELECT + cor1.col1 AS col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT col2 + - 41 * - col2 FROM tab1 AS cor0
----
2268
2394
4032

onlyif mysql # use DIV operator for integer division
query I rowsort label-7683
SELECT col2 DIV + cor0.col2 AS col2 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7683
SELECT col2 / + cor0.col2 AS col2 FROM tab1 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-7684
SELECT + col2 DIV CAST( + 74 AS SIGNED ) col1 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7684
SELECT + col2 / CAST ( + 74 AS INTEGER ) col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT cor0.col1 * ( + col2 ) * col1 AS col0 FROM tab0 AS cor0
----
244068
679042
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-7686
SELECT ALL + col0 + + cor0.col0 DIV ( col1 ) AS col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-7686
SELECT ALL + col0 + + cor0.col0 / ( col1 ) AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT + col0 * 98 * + col0 + col1 FROM tab1
----
401418
627213
908

query I rowsort
SELECT ALL - col1 * 5 - cor0.col2 * col2 AS col0 FROM tab0 AS cor0
----
-1519
-486
-7179

query I rowsort
SELECT + col0 + - 55 * + col2 FROM tab1 AS cor0
----
-2967
-3071
-5200

query I rowsort
SELECT ALL col2 + col1 * col1 AS col1 FROM tab1 AS cor0
----
157
265
730

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col1 col2 FROM tab2 cor0
----
-289
-3481
-961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * - 35 * col0 + - col2 col0 FROM tab1 AS cor0
----
-22457
-2784
-36496

query I rowsort
SELECT DISTINCT + col2 * + col1 + + cor0.col0 AS col2 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT + col1 + - 41 FROM tab0 cor0
----
45
50
56

query I rowsort
SELECT DISTINCT + col0 + col0 + col2 * - col0 FROM tab1 AS cor0
----
-156
-3520
-7520

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7696
SELECT ALL + col1 * CAST( + col2 AS SIGNED ) FROM tab1 AS cor0
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-7696
SELECT ALL + col1 * CAST ( + col2 AS INTEGER ) FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT + col2 * 16 AS col1 FROM tab2 AS cor0
----
416
432
608

query I rowsort
SELECT - 97 * - col2 + - col1 FROM tab0 AS cor0
----
0
3115
7863

query I rowsort
SELECT DISTINCT + + 24 + + 12 FROM tab2 cor0
----
36

query I rowsort
SELECT - col1 * 32 + col1 AS col0 FROM tab1 AS cor0
----
-310
-403
-806

query I rowsort
SELECT DISTINCT col0 + - col2 + cor0.col0 AS col0 FROM tab0 AS cor0
----
15
69
96

query I rowsort
SELECT + + col2 * - col0 + cor0.col0 + col2 FROM tab2 AS cor0
----
-155
-1924
-2885

query I rowsort
SELECT ALL + col2 + cor0.col0 * - 7 FROM tab2 AS cor0
----
-22
-515
-520

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + ( - col1 ) * + col2 col1 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT - + 54 AS col1 FROM tab1 AS cor0
----
-54

query I rowsort
SELECT DISTINCT ( - 52 ) AS col0 FROM tab2
----
-52

query I rowsort
SELECT ALL col0 + + tab0.col1 AS col2 FROM tab0
----
110
132
180

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 cor0 CROSS JOIN tab1, tab0 AS cor1, tab0 AS cor2, tab1 AS cor3
----
3645 values hashing to e5255b2277726ba4514ff55622dec830

query I rowsort
SELECT cor0.col0 + col1 * col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT ALL + col1 * - ( col2 ) + cor0.col2 FROM tab2 cor0
----
-1508
-608
-810

query I rowsort
SELECT + tab2.col0 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT DISTINCT + - col2 * + ( - col2 ) * + col0 FROM tab1 AS cor0
----
207936
737280
8748

query I rowsort
SELECT + col1 - col1 * ( + col1 ) AS col1 FROM tab2 AS cor0
----
-272
-3422
-930

onlyif mysql # use DIV operator for integer division
query I rowsort label-7714
SELECT DISTINCT col0 DIV + 10 + - col2 * + cor0.col1 AS col2 FROM tab1 AS cor0
----
-1240
-1404
-564

skipif mysql # not compatible
query I rowsort label-7714
SELECT DISTINCT col0 / + 10 + - col2 * + cor0.col1 AS col2 FROM tab1 AS cor0
----
-1240
-1404
-564

query I rowsort
SELECT DISTINCT - cor0.col1 * - cor0.col1 * 88 + col0 AS col2 FROM tab2 AS cor0
----
25511
306406
84575

query I rowsort
SELECT + - col2 + + ( - col1 ) FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT ALL - + col2 * - col2 AS col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT + - col0 * col0 + - cor0.col2 * col2 + col2 FROM tab2 AS cor0
----
-6734
-751
-7647

query I rowsort
SELECT - col2 - - ( + col2 ) AS col2 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + ( + col2 ) * + col0 col2 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT col2 + - 8 FROM tab2 AS cor0
----
18
19
30

query I rowsort
SELECT ALL + + col1 * col2 + + col1 + 17 FROM tab0 AS cor0
----
211
2941
7570

query I rowsort
SELECT ALL + + 74 FROM tab0 cor0
----
74
74
74

query I rowsort
SELECT ALL col0 * ( - col1 ) + 52 * 88 AS col2 FROM tab2 AS cor0
----
-26
3233
4359

query I rowsort
SELECT ALL 19 AS col2 FROM tab1 AS cor0
----
19
19
19

query I rowsort
SELECT DISTINCT + col2 + - col1 AS col0 FROM tab2 cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT + + 0 AS col0 FROM tab1 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7728
SELECT DISTINCT col1 * col2 - - CAST( NULL AS SIGNED ) AS col0 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-7728
SELECT DISTINCT col1 * col2 - - CAST ( NULL AS INTEGER ) AS col0 FROM tab1
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7729
SELECT ALL col2 - - col1 DIV - 95 AS col2 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-7729
SELECT ALL col2 - - col1 / - 95 AS col2 FROM tab2
----
26
27
38

query I rowsort
SELECT DISTINCT - + col0 + + 83 AS col2 FROM tab1 AS cor0
----
19
3
80

query I rowsort
SELECT ALL - col0 + 17 * col2 AS col0 FROM tab2 AS cor0
----
364
452
567

onlyif mysql # use DIV operator for integer division
query I rowsort label-7732
SELECT DISTINCT - + col0 DIV - ( + cor0.col1 ) + - col1 FROM tab2 AS cor0
----
-13
-31
-58

skipif mysql # not compatible
query I rowsort label-7732
SELECT DISTINCT - + col0 / - ( + cor0.col1 ) + - col1 FROM tab2 AS cor0
----
-13
-31
-58

query I rowsort
SELECT ALL col0 * col0 + + 7 AS col2 FROM tab2
----
56
6091
6248

query I rowsort
SELECT 36 * - tab1.col0 + col1 * - col0 + - tab1.col2 FROM tab1
----
-240
-3001
-4016

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col2 col0 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT + + col2 + + col0 * - col0 AS col0 FROM tab2 AS cor0
----
-22
-6058
-6203

query I rowsort
SELECT - col0 + col2 * 45 AS col2 FROM tab1 AS cor0
----
2427
2501
4240

query I rowsort
SELECT + col1 * 35 AS col2 FROM tab2
----
1085
2065
595

query I rowsort
SELECT DISTINCT - col2 * col2 + + tab0.col0 AS col2 FROM tab0
----
-1065
-6635
34

query I rowsort
SELECT - - cor0.col1 + - col0 AS col2 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT DISTINCT col1 * 37 AS col2 FROM tab0
----
3182
3367
3589

onlyif mysql # use DIV operator for integer division
query I rowsort label-7742
SELECT ALL col2 DIV 45 AS col2 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7742
SELECT ALL col2 / 45 AS col2 FROM tab2
----
0
0
0

query I rowsort
SELECT + - col1 * ( ( + cor0.col1 ) ) + + cor0.col0 FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT + cor0.col0 * + col0 + - cor0.col2 FROM tab2 AS cor0
----
22
6058
6203

query I rowsort
SELECT + 59 * cor0.col2 + cor2.col1 FROM tab1, tab2 AS cor0, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to 0ae231c800625671402ab7c7016f22de

onlyif mysql # use DIV operator for integer division
query I rowsort label-7746
SELECT cor0.col0 DIV + col2 + col0 * + col0 * col2 FROM tab0 AS cor0
----
1260
19008
649523

skipif mysql # not compatible
query I rowsort label-7746
SELECT cor0.col0 / + col2 + col0 * + col0 * col2 FROM tab0 AS cor0
----
1260
19008
649523

query I rowsort
SELECT + - 57 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 0b74bbd7631afe9b2eeb9f18b9dc6505

query I rowsort
SELECT ALL + + 41 * col1 FROM tab0 cor0
----
3526
3731
3977

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7749
SELECT ( + col0 ) / CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7749
SELECT ( + col0 ) / CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7750
SELECT DISTINCT + - 68 + + col1 DIV - col2 FROM tab1 AS cor0
----
-68

skipif mysql # not compatible
query I rowsort label-7750
SELECT DISTINCT + - 68 + + col1 / - col2 FROM tab1 AS cor0
----
-68

query I rowsort
SELECT DISTINCT - col0 + col0 * - col2 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT - ( + cor0.col1 ) FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

onlyif mysql # use DIV operator for integer division
query I rowsort label-7753
SELECT + + 50 * cor0.col2 DIV - col1 FROM tab2 AS cor0
----
-111
-22
-43

skipif mysql # not compatible
query I rowsort label-7753
SELECT + + 50 * cor0.col2 / - col1 FROM tab2 AS cor0
----
-111
-22
-43

query I rowsort
SELECT + - 66 * + col1 FROM tab1 cor0
----
-1716
-660
-858

query I rowsort
SELECT col0 + + col1 * ( 13 ) AS col2 FROM tab2 AS cor0
----
300
410
845

query I rowsort
SELECT ALL + - 78 * col2 AS col1 FROM tab1 AS cor0
----
-4212
-4446
-7488

query I rowsort
SELECT DISTINCT 19 + + cor0.col1 AS col1 FROM tab1 AS cor0
----
29
32
45

query I rowsort
SELECT ALL - 84 * + 33 * - col1 FROM tab2
----
163548
47124
85932

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( + 54 AS REAL ) AS col2 FROM tab0 AS cor0
----
54
54
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 36 + + col2 col1 FROM tab2 AS cor0
----
62
63
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-7761
SELECT DISTINCT - 35 * col0 + + col2 DIV + col1 FROM tab1 AS cor0
----
-103
-2235
-2793

skipif mysql # not compatible
query I rowsort label-7761
SELECT DISTINCT - 35 * col0 + + col2 / + col1 FROM tab1 AS cor0
----
-103
-2235
-2793

query I rowsort
SELECT - + col0 - - col1 * - col1 FROM tab2 AS cor0
----
-3559
-368
-968

query I rowsort
SELECT + 93 * col2 AS col1 FROM tab0
----
3069
7626
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-7764
SELECT + tab2.col2 * tab2.col1 DIV tab2.col0 AS col2 FROM tab2
----
119
19
8

skipif mysql # not compatible
query I rowsort label-7764
SELECT + tab2.col2 * tab2.col1 / tab2.col0 AS col2 FROM tab2
----
119
19
8

query I rowsort
SELECT cor0.col1 - - cor0.col0 * + ( col2 ) FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT DISTINCT - 61 * - col1 * 64 + col0 * - col0 AS col2 FROM tab0 AS cor0
----
335168
347343
377463

query I rowsort
SELECT ALL + ( col2 * col0 ) FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT + 0 AS col1 FROM tab1, tab2 AS cor0
----
0

query I rowsort
SELECT + col1 * cor0.col0 + 8 FROM tab1 AS cor0
----
1048
648
86

query I rowsort
SELECT + col1 + cor0.col2 * - ( col2 * - 1 ) FROM tab0 AS cor0
----
1175
6815
98

query I rowsort
SELECT col0 + col0 * + cor0.col1 AS col0 FROM tab1 AS cor0
----
1120
704
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-7772
SELECT ALL 86 DIV - col2 FROM tab1
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-7772
SELECT ALL 86 / - col2 FROM tab1
----
-1
-1
0

query I rowsort
SELECT ALL - col1 * 57 FROM tab2
----
-1767
-3363
-969

query I rowsort
SELECT col2 + col0 * 53 AS col1 FROM tab0
----
1305
1856
4799

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7775
SELECT - ( + col1 ) * cor0.col2 + CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7775
SELECT - ( + col1 ) * cor0.col2 + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col1 + 73 FROM tab2 AS cor0
----
104
132
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-7777
SELECT col2 + cor0.col0 * col2 DIV col1 FROM tab1 cor0
----
421
60
686

skipif mysql # not compatible
query I rowsort label-7777
SELECT col2 + cor0.col0 * col2 / col1 FROM tab1 cor0
----
421
60
686

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7778
SELECT ALL + CAST( NULL AS SIGNED ) * - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7778
SELECT ALL + CAST ( NULL AS INTEGER ) * - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 56 * col1 * - col1 AS col2 FROM tab1 AS cor0
----
37856
5600
9464

query I rowsort
SELECT DISTINCT tab2.col1 * + 58 * col0 + - col1 * + col0 FROM tab2
----
12369
262314
76551

query I rowsort
SELECT + ( tab0.col0 ) FROM tab1, tab2, tab1 AS cor0, tab0
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

query I rowsort
SELECT ALL col1 + + 19 + 78 * + col1 FROM tab0
----
6813
7208
7682

query I rowsort
SELECT + col2 * 4 FROM tab0
----
132
328
4

query I rowsort
SELECT tab1.col2 * col1 * col1 - + col2 AS col1 FROM tab1
----
16128
36450
5643

onlyif mysql # use DIV operator for integer division
query I rowsort label-7785
SELECT 84 + + col2 DIV - col0 AS col2 FROM tab1
----
66
83
84

skipif mysql # not compatible
query I rowsort label-7785
SELECT 84 + + col2 / - col0 AS col2 FROM tab1
----
66
83
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 23 * + col0 * col2 col1 FROM tab2
----
4347
46644
69046

query I rowsort
SELECT DISTINCT tab1.col2 AS col2 FROM tab0, tab2 AS cor0 CROSS JOIN tab1
----
54
57
96

query I rowsort
SELECT DISTINCT ( + col0 ) * col1 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT + - 76 * 66 FROM tab1 cor0
----
-5016
-5016
-5016

query I rowsort
SELECT ALL + + col2 * col1 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - 28 * - col1 FROM tab1 AS cor0
----
280
364
728

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7792
SELECT DISTINCT + CAST( - 97 AS SIGNED ) AS col1 FROM tab2 cor0
----
-97

skipif mysql # not compatible
query I rowsort label-7792
SELECT DISTINCT + CAST ( - 97 AS INTEGER ) AS col1 FROM tab2 cor0
----
-97

query I rowsort
SELECT DISTINCT - ( ( - col2 ) ) + + col0 AS col2 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-7794
SELECT - col2 - + col2 * col2 DIV - col1 AS col1 FROM tab0
----
-1
-21
-9

skipif mysql # not compatible
query I rowsort label-7794
SELECT - col2 - + col2 * col2 / - col1 AS col1 FROM tab0
----
-1
-21
-9

query I rowsort
SELECT ALL - 71 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to e72f95c346714d3065a96d67a6fd5062

query I rowsort
SELECT 2 - col1 * cor0.col1 FROM tab2 AS cor0
----
-287
-3479
-959

query I rowsort
SELECT 38 * col1 + + 13 AS col2 FROM tab0 AS cor0
----
3281
3471
3699

onlyif mysql # use DIV operator for integer division
query I rowsort label-7798
SELECT cor0.col2 DIV col1 + ( - col1 ) FROM tab1 AS cor0
----
-24
-5
-6

skipif mysql # not compatible
query I rowsort label-7798
SELECT cor0.col2 / col1 + ( - col1 ) FROM tab1 AS cor0
----
-24
-5
-6

query I rowsort
SELECT ( 23 ) FROM tab2, tab2 cor0
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * + tab1.col1 + col0 col2 FROM tab1
----
1120
704
81

query I rowsort
SELECT ALL - col1 * + 58 AS col1 FROM tab1 AS cor0
----
-1508
-580
-754

query I rowsort
SELECT ALL ( - col1 ) - + col1 FROM tab2
----
-118
-34
-62

query I rowsort
SELECT + ( - 94 ) AS col2 FROM tab1
----
-94
-94
-94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7804
SELECT ALL CAST( NULL AS SIGNED ) / 20 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7804
SELECT ALL CAST ( NULL AS INTEGER ) / 20 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col1 * + col2 * tab2.col2 FROM tab2
----
22599
24548
39884

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 - - cor0.col0 col0 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT + - col1 + col0 + col0 AS col1 FROM tab0 AS cor0
----
-27
-38
87

query I rowsort
SELECT - 10 + + col1 * + col1 + + col2 * + col2 AS col1 FROM tab2 AS cor0
----
1680
1723
4147

query I rowsort
SELECT ALL col2 * 80 + + col0 - - col0 AS col0 FROM tab1
----
4326
4688
7840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 35 * - col1 col0 FROM tab0
----
-3010
-3185
-3395

query I rowsort
SELECT - col1 + - col1 + col1 * cor0.col0 FROM tab1 AS cor0
----
1014
26
620

query I rowsort
SELECT ALL - 51 + col0 FROM tab2 AS cor0
----
-44
27
28

query I rowsort
SELECT col0 + + col2 * col0 FROM tab2 cor0
----
196
2106
3081

onlyif mysql # use DIV operator for integer division
query I rowsort label-7814
SELECT col1 DIV col1 - col2 FROM tab2 AS cor0
----
-25
-26
-37

skipif mysql # not compatible
query I rowsort label-7814
SELECT col1 / col1 - col2 FROM tab2 AS cor0
----
-25
-26
-37

query I rowsort
SELECT DISTINCT + 49 * col2 + + col2 AS col2 FROM tab0 AS cor0
----
1650
4100
50

query I rowsort
SELECT + 11 + - cor0.col2 + col0 FROM tab2 cor0
----
-9
52
63

query I rowsort
SELECT ALL 12 * col1 FROM tab1 AS cor0
----
120
156
312

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7818
SELECT DISTINCT + - col2 + CAST( NULL AS SIGNED ) * col2 - - col0 AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7818
SELECT DISTINCT + - col2 + CAST ( NULL AS INTEGER ) * col2 - - col0 AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + - col0 + col2 * cor0.col1 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT DISTINCT + col0 + - 81 AS col1 FROM tab0 AS cor0
----
-46
-57
8

query I rowsort
SELECT DISTINCT - col1 - col2 AS col1 FROM tab1 cor0
----
-109
-67
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7822
SELECT ALL + col0 + - CAST( - col1 AS SIGNED ) FROM tab1 AS cor0
----
29
74
93

skipif mysql # not compatible
query I rowsort label-7822
SELECT ALL + col0 + - CAST ( - col1 AS INTEGER ) FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT - - col2 * ( + 67 ) + - cor0.col0 AS col0 FROM tab2 cor0
----
1664
1802
2467

query I rowsort
SELECT + col0 + - 32 AS col0 FROM tab1 AS cor0
----
-29
32
48

query I rowsort
SELECT DISTINCT + - col1 * cor0.col1 + col0 FROM tab0 AS cor0
----
-7372
-8192
-9374

query I rowsort
SELECT - cor0.col2 * - 86 FROM tab1 AS cor0
----
4644
4902
8256

query I rowsort
SELECT ALL - + col1 * - ( col2 + - col0 ) FROM tab0 cor0
----
-3298
-637
774

onlyif mysql # use DIV operator for integer division
query I rowsort label-7828
SELECT + - col0 DIV - 17 FROM tab0 cor0
----
1
2
5

skipif mysql # not compatible
query I rowsort label-7828
SELECT + - col0 / - 17 FROM tab0 cor0
----
1
2
5

query I rowsort
SELECT DISTINCT - col1 * - 4 FROM tab2 AS cor0
----
124
236
68

query I rowsort
SELECT DISTINCT + - col1 * - cor0.col0 AS col0 FROM tab1 cor0
----
1040
640
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7831
SELECT ALL + + CAST( NULL AS SIGNED ) * 31 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7831
SELECT ALL + + CAST ( NULL AS INTEGER ) * 31 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + cor0.col2 * + col0 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-7833
SELECT - col1 DIV + 7 col1 FROM tab1 AS cor0
----
-1
-1
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7833
SELECT - col1 / + 7 col1 FROM tab1 AS cor0
----
-1
-1
-3

query I rowsort
SELECT ALL + - 94 * + col1 + col2 * - cor0.col2 FROM tab0 AS cor0
----
-15278
-9119
-9173

query I rowsort
SELECT - col1 + + col2 * - col0 FROM tab0 cor0
----
-132
-7389
-878

query I rowsort
SELECT - col0 + - col1 * col0 * - col0 FROM tab0 AS cor0
----
118790
49512
720722

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NOT NULL IN ( + col1 )
----

query III rowsort
SELECT * FROM tab2 WHERE - col2 * col1 * col2 <> NULL
----

query I rowsort
SELECT - tab1.col1 + col0 * col1 AS col0 FROM tab1
----
1027
52
630

onlyif mysql # use DIV operator for integer division
query I rowsort label-7840
SELECT DISTINCT - - col2 DIV - col0 + col2 AS col0 FROM tab1 AS cor0
----
36
57
95

skipif mysql # not compatible
query I rowsort label-7840
SELECT DISTINCT - - col2 / - col0 + col2 AS col0 FROM tab1 AS cor0
----
36
57
95

query I rowsort
SELECT DISTINCT col0 + col0 * + col0 FROM tab2
----
56
6162
6320

query I rowsort
SELECT + col0 + cor0.col2 - col0 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT 36 + tab2.col0 AS col0 FROM tab2
----
114
115
43

query I rowsort
SELECT col2 + - col1 + col1 AS col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL - - col2 + + col1 * - col1 FROM tab2 cor0
----
-251
-3455
-934

query I rowsort
SELECT + tab0.col2 + - tab0.col2 * + tab0.col2 FROM tab0, tab2 AS cor0
----
9 values hashing to d0d81b732355c84901585c87b3d61eed

query I rowsort
SELECT DISTINCT tab1.col2 AS col2 FROM tab1, tab0, tab2 AS cor0
----
54
57
96

query I rowsort
SELECT + 39 * col1 FROM tab0
----
3354
3549
3783

query I rowsort
SELECT cor0.col1 * col0 * - col0 AS col0 FROM tab2 AS cor0
----
-106097
-1519
-358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-7850
SELECT + + col2 DIV - 37 AS col2 FROM tab1 AS cor0
----
-1
-1
-2

skipif mysql # not compatible
query I rowsort label-7850
SELECT + + col2 / - 37 AS col2 FROM tab1 AS cor0
----
-1
-1
-2

query I rowsort
SELECT ALL - col0 * + 64 FROM tab2
----
-448
-4992
-5056

query I rowsort
SELECT - ( + tab0.col0 ) * + col2 + col0 FROM tab0
----
-7209
-768
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7853
SELECT CAST( NULL AS DECIMAL ) + - col0 - - col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7853
SELECT CAST ( NULL AS REAL ) + - col0 - - col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT - ( 21 ) * tab1.col0 AS col1 FROM tab1
----
-1344
-1680
-63

query I rowsort
SELECT DISTINCT + ( col2 ) - + col1 AS col1 FROM tab1
----
28
47
83

query I rowsort
SELECT ( + col0 ) - + col2 * 38 FROM tab1 cor0
----
-2049
-2102
-3568

query I rowsort
SELECT + 72 + col2 * - cor0.col2 AS col2 FROM tab0 AS cor0
----
-1017
-6652
71

query I rowsort
SELECT - + 42 + col2 * ( + col2 * + col2 ) FROM tab1 AS cor0
----
157422
185151
884694

query I rowsort
SELECT DISTINCT + cor0.col0 + col1 * + col2 AS col2 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT + col0 * + cor0.col0 * 60 AS col1 FROM tab1 AS cor0
----
245760
384000
540

query I rowsort
SELECT DISTINCT - col2 + col0 * 12 AS col0 FROM tab1 AS cor0
----
-18
711
864

onlyif mysql # use DIV operator for integer division
query I rowsort label-7862
SELECT ALL + + col2 DIV - col2 - col2 FROM tab1 AS cor0
----
-55
-58
-97

skipif mysql # not compatible
query I rowsort label-7862
SELECT ALL + + col2 / - col2 - col2 FROM tab1 AS cor0
----
-55
-58
-97

query I rowsort
SELECT ALL - col1 * col2 + - cor0.col2 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT - 79 * + col1 AS col1 FROM tab0
----
-6794
-7189
-7663

query I rowsort
SELECT ALL + + col1 * col0 + col0 FROM tab0 AS cor0
----
2088
3430
8188

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 * col2 col1 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT - cor0.col1 - - cor0.col1 AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT - + col2 * + 94 + cor0.col0 AS col0 FROM tab1 cor0
----
-5073
-5294
-8944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col2 col1 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT ALL 97 + col1 FROM tab0
----
183
188
194

query I rowsort
SELECT 62 AS col0 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 4911b1417a3797d23dd8f38b6ed05c1b

query I rowsort
SELECT DISTINCT + col2 * tab2.col2 + col1 * col1 * - col1 AS col1 FROM tab2
----
-204703
-29062
-3469

query I rowsort
SELECT - - ( - 66 ) * cor0.col1 FROM tab1 AS cor0
----
-1716
-660
-858

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * ( col0 ) * - ( - 93 * col1 ) col0 FROM tab2 AS cor0
----
2123283
25251174
625611

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7875
SELECT CAST( - col2 AS SIGNED ) * + col0 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-7875
SELECT CAST ( - col2 AS INTEGER ) * + col0 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL 21 + - col1 FROM tab0 AS cor0
----
-65
-70
-76

query I rowsort
SELECT DISTINCT + col1 * 94 FROM tab2 AS cor0
----
1598
2914
5546

query I rowsort
SELECT ALL + 61 * col2 * - col2 AS col1 FROM tab2 AS cor0
----
-41236
-44469
-88084

query I rowsort
SELECT cor0.col1 + 4 * + col2 AS col0 FROM tab1 AS cor0
----
238
242
397

query I rowsort
SELECT DISTINCT ( 98 ) + + col0 FROM tab0 AS cor0
----
122
133
187

query I rowsort
SELECT DISTINCT + col2 * + col1 + + col1 AS col2 FROM tab2 cor0
----
1593
663
868

query I rowsort
SELECT ALL + + 14 * - ( col0 ) * cor0.col2 - cor0.col1 FROM tab2 AS cor0
----
-2677
-28451
-42045

query I rowsort
SELECT + ( + col0 ) * col0 + + ( col1 + + col2 ) AS col1 FROM tab0 cor0
----
1323
695
8094

query I rowsort
SELECT col1 * - 26 * col0 AS col0 FROM tab2 AS cor0
----
-119652
-34918
-5642

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * ( + 34 * + tab1.col2 + - ( - col0 ) ) col1 FROM tab1
----
128128
267520
5517

query I rowsort
SELECT ALL - col1 - ( + col0 ) AS col1 FROM tab1
----
-29
-74
-93

query I rowsort
SELECT DISTINCT + 36 AS col0 FROM tab1, tab1 AS cor0
----
36

query I rowsort
SELECT DISTINCT - col1 - - 81 FROM tab2
----
22
50
64

query I rowsort
SELECT - + 17 * col2 AS col2 FROM tab0 AS cor0
----
-1394
-17
-561

query I rowsort
SELECT - 59 + col0 AS col2 FROM tab0 AS cor0
----
-24
-35
30

query I rowsort
SELECT DISTINCT + col2 * - 35 * + col1 + + col0 AS col0 FROM tab2 cor0
----
-22531
-29288
-53612

query I rowsort
SELECT ALL 44 + - col1 AS col0 FROM tab0 AS cor0
----
-42
-47
-53

query I rowsort
SELECT DISTINCT 29 - 4 FROM tab0 AS cor0
----
25

query I rowsort
SELECT - col0 * col1 - col1 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT col0 * + col0 + col1 + + col2 FROM tab0
----
1323
695
8094

query I rowsort
SELECT - col2 * - tab2.col1 + - col0 AS col2 FROM tab2
----
1456
567
830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 97 col1 FROM tab2 AS cor0
----
-97
-97
-97

query I rowsort
SELECT + 6 * 74 AS col0 FROM tab0 AS cor0
----
444
444
444

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 29 + col0 * + col0 col0 FROM tab0 AS cor0
----
1254
605
7950

query I rowsort
SELECT ALL - 37 - col1 * col2 FROM tab1 AS cor0
----
-1285
-1441
-607

query I rowsort
SELECT DISTINCT + 16 AS col1 FROM tab2 AS cor0
----
16

onlyif mysql # use DIV operator for integer division
query I rowsort label-7902
SELECT DISTINCT - - cor0.col0 + + col1 DIV col0 FROM tab1 AS cor0
----
11
64
80

skipif mysql # not compatible
query I rowsort label-7902
SELECT DISTINCT - - cor0.col0 + + col1 / col0 FROM tab1 AS cor0
----
11
64
80

query I rowsort
SELECT DISTINCT + col1 + 66 AS col0 FROM tab1 AS cor0
----
76
79
92

query I rowsort
SELECT DISTINCT + 12 AS col0 FROM tab1, tab1 AS cor0
----
12

query I rowsort
SELECT ALL + 41 AS col1 FROM tab1, tab2 cor0
----
9 values hashing to 5b18986bb294412b3d9f07b7e6fc821e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7906
SELECT col0 + + CAST( NULL AS SIGNED ) * col2 / col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7906
SELECT col0 + + CAST ( NULL AS INTEGER ) * col2 / col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT tab1.col1 * - col2 * + col1 AS col0 FROM tab1
----
-16224
-36504
-5700

onlyif mysql # use DIV operator for integer division
query I rowsort label-7908
SELECT col0 DIV 55 AS col0 FROM tab2 cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-7908
SELECT col0 / 55 AS col0 FROM tab2 cor0
----
0
1
1

query I rowsort
SELECT ALL + ( + col1 ) + col1 * col1 AS col2 FROM tab1 AS cor0
----
110
182
702

query I rowsort
SELECT DISTINCT + - ( - 5 ) AS col2 FROM tab0 cor0
----
5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7911
SELECT DISTINCT - - col2 * 67 - col0 * - CAST( + col0 AS SIGNED ) col1 FROM tab0 AS cor0
----
1292
13415
2787

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7911
SELECT DISTINCT - - col2 * 67 - col0 * - CAST ( + col0 AS INTEGER ) col1 FROM tab0 AS cor0
----
1292
13415
2787

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 44 * - ( col0 ) col0 FROM tab1 AS cor0
----
132
2816
3520

query I rowsort
SELECT + col1 * 51 FROM tab1 cor0
----
1326
510
663

onlyif mysql # use DIV operator for integer division
query I rowsort label-7914
SELECT 40 * col0 DIV + col1 AS col1 FROM tab2 AS cor0
----
185
52
9

skipif mysql # not compatible
query I rowsort label-7914
SELECT 40 * col0 / + col1 AS col1 FROM tab2 AS cor0
----
185
52
9

query I rowsort
SELECT - + col2 * + col1 + - ( 73 ) FROM tab0 AS cor0
----
-170
-2911
-7535

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 95 * + cor1.col0 col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 74d8404425fae93311b1b301bfea41ec

query I rowsort
SELECT DISTINCT cor0.col0 * cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 0b16310ac77048604e55565ebe234145

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7918
SELECT ALL - + col1 + + CAST( NULL AS SIGNED ) AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7918
SELECT ALL - + col1 + + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7919
SELECT DISTINCT - col2 DIV 40 + col2 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-7919
SELECT DISTINCT - col2 / 40 + col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT col0 + 28 AS col0 FROM tab1 AS cor0
----
108
31
92

query I rowsort
SELECT DISTINCT + + col2 * - col1 + - col0 FROM tab0 AS cor0
----
-132
-2862
-7551

query I rowsort
SELECT ALL - - col0 + cor0.col2 * - col0 * - cor0.col0 AS col0 FROM tab2 AS cor0
----
1330
158262
237237

query I rowsort
SELECT ALL + col1 * 95 AS col1 FROM tab1 cor0
----
1235
2470
950

query I rowsort
SELECT + - col0 + - col0 * - 0 AS col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT + col2 * ( col1 ) + col2 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT + - cor0.col0 * col0 + - ( col2 ) AS col0 FROM tab0 AS cor0
----
-1226
-609
-8003

query I rowsort
SELECT ALL - - cor0.col2 * 77 * - 26 FROM tab0 AS cor0
----
-164164
-2002
-66066

query I rowsort
SELECT DISTINCT - - col2 + + ( col0 ) + col1 FROM tab0 AS cor0
----
133
143
262

query I rowsort
SELECT ALL - col1 * col2 - + col2 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT ALL + 11 FROM tab2, tab1 cor0, tab0 AS cor1, tab0 cor2
----
81 values hashing to 288f8fb62e079d095c14d7cf3e2d3359

query I rowsort
SELECT ALL 89 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT DISTINCT - - 65 * col0 AS col1 FROM tab0 AS cor0
----
1560
2275
5785

query I rowsort
SELECT ALL + + ( col2 ) + - cor0.col1 * 84 AS col2 FROM tab0 AS cor0
----
-7191
-7562
-8147

query I rowsort
SELECT cor0.col0 + + col2 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT - ( + col2 ) - col1 * col1 * + col0 FROM tab2 AS cor0
----
-22869
-271544
-6754

query I rowsort
SELECT - col1 + col1 * col2 * - col2 FROM tab0 AS cor0
----
-194
-611975
-93740

query I rowsort
SELECT - col1 + - ( - 86 ) FROM tab2 AS cor0
----
27
55
69

query I rowsort
SELECT DISTINCT col0 + col2 * 8 AS col2 FROM tab1
----
435
520
848

query I rowsort
SELECT ALL col1 * col0 * - col0 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT DISTINCT col1 - - col1 * - col2 AS col2 FROM tab0
----
-2752
-7371
0

query I rowsort
SELECT ALL col1 + + col0 * col1 FROM tab2
----
1360
248
4661

query I rowsort
SELECT ALL + - col1 * - col1 * - col2 FROM tab0 AS cor0
----
-244068
-679042
-9409

query I rowsort
SELECT ALL + col0 * col2 - col0 AS col1 FROM tab2
----
182
1950
2923

query I rowsort
SELECT - col1 - col2 * + col2 AS col1 FROM tab0
----
-1175
-6815
-98

query I rowsort
SELECT ALL col2 FROM tab2 WHERE ( NULL ) BETWEEN col0 + + col0 AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7946
SELECT DISTINCT + col0 + col1 DIV col0 AS col0 FROM tab2
----
11
78
79

skipif mysql # not compatible
query I rowsort label-7946
SELECT DISTINCT + col0 + col1 / col0 AS col0 FROM tab2
----
11
78
79

query I rowsort
SELECT ALL - col1 * col0 AS col2 FROM tab1 WHERE + col1 * + col2 > NULL
----

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT NULL NOT IN ( + col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7949
SELECT DISTINCT - col0 * col1 DIV - col1 AS col0 FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort label-7949
SELECT DISTINCT - col0 * col1 / - col1 AS col0 FROM tab2
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 + col1 col1 FROM tab0
----
110
132
180

query I rowsort
SELECT 20 AS col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 0a35fe98f3e7d5fc8ff2ae815bd20ef4

query I rowsort
SELECT ( col1 ) + - col2 AS col0 FROM tab2
----
-21
33
4

query I rowsort
SELECT + ( - col2 ) * col0 + + tab1.col1 * col2 FROM tab1
----
-3078
-6432
1242

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 93 * + col0 col0 FROM tab2 AS cor0
----
-651
-7254
-7347

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 - col1 col0 FROM tab2
----
0
0
0

query I rowsort
SELECT - - col0 * cor0.col1 + - col2 * col1 FROM tab2 AS cor0
----
-620
3068
697

query I rowsort
SELECT DISTINCT col1 FROM tab0 WHERE - col1 * + col0 NOT BETWEEN ( NULL ) AND ( col2 )
----

query I rowsort
SELECT col2 + - tab1.col2 * col0 FROM tab1 WHERE NOT + col0 NOT BETWEEN - col2 AND NULL
----

query III rowsort
SELECT * FROM tab0 WHERE NOT - col1 <> ( NULL )
----

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL NOT BETWEEN - col1 * + col1 AND col1
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7961
SELECT col0 + + tab0.col0 DIV col1 AS col1 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-7961
SELECT col0 + + tab0.col0 / col1 AS col1 FROM tab0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 col0 FROM tab1 WHERE NULL BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT + tab2.col2 + + col2 * col2 * col0 FROM tab2
----
114114
5130
52754

onlyif mysql # use DIV operator for integer division
query I rowsort label-7964
SELECT + col2 DIV - tab2.col1 + col0 AS col1 FROM tab2
----
7
77
78

skipif mysql # not compatible
query I rowsort label-7964
SELECT + col2 / - tab2.col1 + col0 AS col1 FROM tab2
----
7
77
78

query III rowsort
SELECT * FROM tab2 AS cor0 WHERE NULL IN ( - cor0.col1 * - col2 )
----

query I rowsort
SELECT ALL col0 * + col0 - - col1 FROM tab2
----
6143
6258
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-7967
SELECT col1 DIV - tab1.col1 AS col1 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7967
SELECT col1 / - tab1.col1 AS col1 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT + cor0.col0 + col1 * cor0.col2 AS col0 FROM tab0 AS cor0 WHERE - cor0.col2 * + col1 * col0 + col1 * col2 IN ( col2 + + col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7969
SELECT - col2 * col2 DIV - col0 AS col1 FROM tab2
----
104
18
8

skipif mysql # not compatible
query I rowsort label-7969
SELECT - col2 * col2 / - col0 AS col1 FROM tab2
----
104
18
8

query I rowsort
SELECT DISTINCT tab0.col2 * col2 + - col2 * tab0.col0 + col2 AS col0 FROM tab0
----
-33
-492
330

onlyif mysql # use DIV operator for integer division
query I rowsort label-7971
SELECT ALL col0 + col1 + - col1 DIV col1 FROM tab2
----
136
37
95

skipif mysql # not compatible
query I rowsort label-7971
SELECT ALL col0 + col1 + - col1 / col1 FROM tab2
----
136
37
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-7972
SELECT ALL + tab1.col2 * + col0 DIV col0 AS col2 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-7972
SELECT ALL + tab1.col2 * + col0 / col0 AS col2 FROM tab1
----
54
57
96

query I rowsort
SELECT ALL + col0 * - col0 * col2 AS col0 FROM tab2
----
-1323
-158184
-237158

query I rowsort
SELECT col0 FROM tab0 WHERE col2 * + col2 + - col0 + col2 / col2 <= NULL
----

query I rowsort
SELECT ALL + col0 * + tab2.col0 + col0 + - tab2.col0 AS col2 FROM tab2
----
49
6084
6241

query I rowsort
SELECT DISTINCT - col2 * col2 * - tab0.col2 AS col0 FROM tab0
----
1
35937
551368

query I rowsort
SELECT ALL + col0 * + tab0.col1 * - col0 - col0 AS col1 FROM tab0
----
-118860
-49560
-720900

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + tab1.col1 col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT DISTINCT col1 * - col0 + tab1.col1 * tab1.col1 FROM tab1
----
-540
-871
598

query I rowsort
SELECT tab2.col1 AS col2 FROM tab2 WHERE NOT ( NULL ) NOT BETWEEN ( NULL ) AND NULL
----

query III rowsort
SELECT * FROM tab2 WHERE ( + col0 + col0 + col2 * - col2 ) NOT IN ( col1 * + col1 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT - col1 * + col1 FROM tab0 WHERE NOT + col2 + - col2 = NULL
----

query I rowsort
SELECT DISTINCT + col0 * - col0 * - col2 FROM tab0
----
1225
19008
649522

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 - + col1 col0 FROM tab1
----
28
47
83

query III rowsort
SELECT * FROM tab2 WHERE NULL BETWEEN ( col2 * col0 * - col2 ) AND NULL
----

query I rowsort
SELECT DISTINCT + 38 + - 39 FROM tab1
----
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-7987
SELECT col1 * col2 DIV + col0 FROM tab1
----
15
468
8

skipif mysql # not compatible
query I rowsort label-7987
SELECT col1 * col2 / + col0 FROM tab1
----
15
468
8

query I rowsort
SELECT + ( col0 + col1 ) * + col0 FROM tab0
----
16020
2640
4620

query I rowsort
SELECT 49 + col1 FROM tab1 AS cor0
----
59
62
75

query I rowsort
SELECT ALL - col0 * + col0 - - col1 FROM tab1
----
-4086
-6387
17

query I rowsort
SELECT ALL 67 + - col0 FROM tab2 AS cor0
----
-11
-12
60

query I rowsort
SELECT ALL - col2 * col2 - + col2 AS col0 FROM tab1 AS cor0
----
-2970
-3306
-9312

query I rowsort
SELECT ALL - ( cor0.col0 ) + + col0 AS col0 FROM tab2 cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7994
SELECT ALL + ( - col2 ) + col2 * + CAST( NULL AS SIGNED ) + cor0.col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7994
SELECT ALL + ( - col2 ) + col2 * + CAST ( NULL AS INTEGER ) + cor0.col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 11 * col0 * - col1 + col2 FROM tab0 AS cor0
----
-22671
-37344
-89007

query I rowsort
SELECT ALL - col2 + - 19 AS col2 FROM tab0 AS cor0
----
-101
-20
-52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 16 col1 FROM tab0, tab1 AS cor0
----
16

query I rowsort
SELECT DISTINCT - col2 * col1 + - col1 * col1 FROM tab1 cor0
----
-1417
-2080
-670

query I rowsort
SELECT - 49 * + col1 + + col0 * - 81 * + col0 FROM tab1 AS cor0
----
-2003
-332266
-519037

query I rowsort
SELECT 61 + + col1 FROM tab0 cor0
----
147
152
158

query I rowsort
SELECT ALL + col1 * - col0 + + ( 27 ) FROM tab1 AS cor0
----
-1013
-51
-613

query I rowsort
SELECT - col2 + - col2 * col0 FROM tab1 AS cor0
----
-216
-3705
-7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-8003
SELECT ALL - + col1 DIV col1 + + CAST( col0 AS SIGNED ) DIV + col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8003
SELECT ALL - + col1 / col1 + + CAST ( col0 AS INTEGER ) / + col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8004
SELECT + col0 + cor0.col1 * col0 DIV + ( - col2 * + col1 + - 22 * col1 ) AS col2 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-8004
SELECT + col0 + cor0.col1 * col0 / + ( - col2 * + col1 + - 22 * col1 ) AS col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT + col0 * + col0 + + col0 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT + - 0 + - col1 - 26 * col0 AS col0 FROM tab1 AS cor0
----
-104
-1674
-2093

query I rowsort
SELECT ALL ( + col2 ) - col0 AS col2 FROM tab1
----
-7
16
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8008
SELECT ALL col2 - - col2 * CAST( col2 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
1122
2
6806

skipif mysql # not compatible
query I rowsort label-8008
SELECT ALL col2 - - col2 * CAST ( col2 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT - 92 + col2 AS col2 FROM tab1 AS cor0
----
-35
-38
4

query I rowsort
SELECT DISTINCT + 12 + + col0 FROM tab2 AS cor0
----
19
90
91

query I rowsort
SELECT ALL ( col2 ) + + ( + col1 ) * col2 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT - col2 * + col2 + 89 AS col1 FROM tab0 cor0
----
-1000
-6635
88

query I rowsort
SELECT DISTINCT 41 AS col2 FROM tab1, tab1 AS cor0
----
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + cor0.col2 * 94 col0 FROM tab0 AS cor0
----
-3
3016
7617

query I rowsort
SELECT ALL + + col0 * + col2 + - col2 AS col0 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT ALL col1 * ( col2 ) AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - col0 * - ( ( + col0 ) ) FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT - - col0 * + 69 AS col1 FROM tab2 AS cor0
----
483
5382
5451

query I rowsort
SELECT 94 * + col0 FROM tab2
----
658
7332
7426

query I rowsort
SELECT DISTINCT - col2 + ( + 31 ) FROM tab2 AS cor0
----
-7
4
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-8021
SELECT ALL - col2 DIV - 55 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8021
SELECT ALL - col2 / - 55 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - 66 AS col1 FROM tab0, tab1 AS cor0
----
-66

onlyif mysql # use DIV operator for integer division
query I rowsort label-8023
SELECT DISTINCT + 41 DIV + col0 + col1 + - 0 AS col1 FROM tab0 AS cor0
----
87
91
98

skipif mysql # not compatible
query I rowsort label-8023
SELECT DISTINCT + 41 / + col0 + col1 + - 0 AS col1 FROM tab0 AS cor0
----
87
91
98

query I rowsort
SELECT ALL - col2 + 61 + col1 FROM tab2 AS cor0
----
40
65
94

query I rowsort
SELECT DISTINCT + 75 * - col1 + + 18 * col0 + cor0.col1 AS col0 FROM tab1 AS cor0
----
-1870
412
478

query I rowsort
SELECT tab0.col1 * 7 FROM tab0, tab0 AS cor0
----
9 values hashing to 94593d6135bed9a412b6f2ca8977b15f

query I rowsort
SELECT DISTINCT - 97 AS col1 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8028
SELECT col0 * + col2 + 84 DIV cor0.col2 FROM tab1 AS cor0
----
163
3649
7680

skipif mysql # not compatible
query I rowsort label-8028
SELECT col0 * + col2 + 84 / cor0.col2 FROM tab1 AS cor0
----
163
3649
7680

query I rowsort
SELECT col0 + + cor0.col1 AS col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT - + col2 - + col2 AS col1 FROM tab2 AS cor0
----
-52
-54
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 3 col1 FROM tab1 AS cor0
----
3
3
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8032
SELECT - + col1 / CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8032
SELECT - + col1 / CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col0 * + 35 + + cor0.col1 AS col0 FROM tab1 AS cor0
----
-2230
-2787
-79

query I rowsort
SELECT - + col0 + 54 AS col0 FROM tab0 AS cor0
----
-35
19
30

query I rowsort
SELECT cor0.col0 * - 61 AS col2 FROM tab1 AS cor0
----
-183
-3904
-4880

query I rowsort
SELECT - - col0 * 46 FROM tab2 AS cor0
----
322
3588
3634

query I rowsort
SELECT DISTINCT - ( - tab0.col1 * col0 ) FROM tab0
----
2064
3395
8099

query I rowsort
SELECT ALL + 98 AS col0 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to c758e8afbdfa6aae279045b0e9cbacc2

onlyif mysql # use DIV operator for integer division
query I rowsort label-8039
SELECT - col1 + col2 DIV - col0 AS col1 FROM tab2
----
-17
-34
-59

skipif mysql # not compatible
query I rowsort label-8039
SELECT - col1 + col2 / - col0 AS col1 FROM tab2
----
-17
-34
-59

query I rowsort
SELECT ALL + col0 + 91 FROM tab1 AS cor0
----
155
171
94

query I rowsort
SELECT DISTINCT + - col1 * + 93 - - col1 FROM tab0 AS cor0
----
-7912
-8372
-8924

query I rowsort
SELECT DISTINCT col2 * cor0.col2 AS col0 FROM tab1 cor0
----
2916
3249
9216

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8043
SELECT - CAST( NULL AS SIGNED ) * - col1 - - col1 * col1 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8043
SELECT - CAST ( NULL AS INTEGER ) * - col1 - - col1 * col1 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8044
SELECT + - col1 * - col0 DIV + col0 + - col1 DIV col2 AS col2 FROM tab0 AS cor0
----
0
84
90

skipif mysql # not compatible
query I rowsort label-8044
SELECT + - col1 * - col0 / + col0 + - col1 / col2 AS col2 FROM tab0 AS cor0
----
0
84
90

query I rowsort
SELECT ( col2 ) + + col1 * - col0 AS col0 FROM tab1 cor0
----
-24
-583
-944

query I rowsort
SELECT ALL - 10 FROM tab2, tab0 AS cor0
----
9 values hashing to f68f33032846e21ee6b2c668fc10355e

query I rowsort
SELECT - 24 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 797d0f7c145f8ac623924448c714bbcc

query I rowsort
SELECT + col1 * 31 AS col2 FROM tab2
----
1829
527
961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8049
SELECT DISTINCT CAST( NULL AS SIGNED ) * col0 * - col0 col1 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8049
SELECT DISTINCT CAST ( NULL AS INTEGER ) * col0 * - col0 col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL 27 * + col1 AS col0 FROM tab1 AS cor0
----
270
351
702

onlyif mysql # use DIV operator for integer division
query I rowsort label-8051
SELECT ALL CAST( col2 AS SIGNED ) * + col2 + 91 DIV - ( col2 ) AS col1 FROM tab1
----
2915
3248
9216

skipif mysql # not compatible
query I rowsort label-8051
SELECT ALL CAST ( col2 AS INTEGER ) * + col2 + 91 / - ( col2 ) AS col1 FROM tab1
----
2915
3248
9216

query I rowsort
SELECT + + col2 * cor0.col0 + - col2 FROM tab1 AS cor0
----
108
3591
7584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * col2 + + col1 col2 FROM tab2 cor0
----
1593
663
868

query I rowsort
SELECT DISTINCT col0 * 90 FROM tab1
----
270
5760
7200

onlyif mysql # use DIV operator for integer division
query I rowsort label-8055
SELECT DISTINCT - col2 DIV 48 AS col0 FROM tab1
----
-1
-2

skipif mysql # not compatible
query I rowsort label-8055
SELECT DISTINCT - col2 / 48 AS col0 FROM tab1
----
-1
-2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8056
SELECT CAST( NULL AS SIGNED ) * 23 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8056
SELECT CAST ( NULL AS INTEGER ) * 23 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT col1 * tab0.col2 * col2 FROM tab0
----
611884
93654
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 47 * ( tab2.col0 * + 38 ) col1 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 9305143ef74ab5a678f3d937d3f43a17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 75 col2 FROM tab0
----
75
75
75

onlyif mysql # use DIV operator for integer division
query I rowsort label-8060
SELECT - col2 DIV - tab2.col0 AS col1 FROM tab2
----
0
0
3

skipif mysql # not compatible
query I rowsort label-8060
SELECT - col2 / - tab2.col0 AS col1 FROM tab2
----
0
0
3

query I rowsort
SELECT - col2 * - col1 * + tab0.col1 FROM tab0
----
244068
679042
9409

query I rowsort
SELECT DISTINCT 63 * 56 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
3528

query I rowsort
SELECT - cor0.col1 + col0 + - 86 * - 16 FROM tab0 AS cor0
----
1314
1314
1374

query I rowsort
SELECT 35 * + tab0.col2 + + col0 AS col0 FROM tab0
----
1179
2959
70

query I rowsort
SELECT ( cor0.col1 ) + - col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT ALL + col0 + - 97 AS col0 FROM tab2 AS cor0
----
-18
-19
-90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8067
SELECT DISTINCT + col1 * CAST( NULL AS SIGNED ) col2 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8067
SELECT DISTINCT + col1 * CAST ( NULL AS INTEGER ) col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT cor0.col1 * - cor0.col2 + - col2 AS col2 FROM tab1 cor0
----
-1344
-1458
-627

query I rowsort
SELECT ALL + col2 * - col1 + 56 * col0 AS col1 FROM tab1 AS cor0
----
-1236
3014
3232

query I rowsort
SELECT DISTINCT 9 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + col2 ) * col2 * - 56 col0 FROM tab0 AS cor0
----
376544
56
60984

query I rowsort
SELECT ALL + 29 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 1e7120ba8e9191084172ddced17e5eb2

query I rowsort
SELECT + ( + 76 ) FROM tab0 AS cor0
----
76
76
76

query I rowsort
SELECT + cor0.col1 * - ( - ( col2 ) ) + ( + col1 ) * col1 AS col0 FROM tab2 AS cor0
----
1798
5015
935

query I rowsort
SELECT ALL + cor0.col0 - col0 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col1 * col0 * col2 AS col2 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT ALL - + col1 * 52 + + 94 FROM tab2 AS cor0
----
-1518
-2974
-790

query I rowsort
SELECT - col0 * - 19 - col0 AS col1 FROM tab2 AS cor0
----
126
1404
1422

query I rowsort
SELECT ALL - col2 * 32 AS col0 FROM tab0 AS cor0
----
-1056
-2624
-32

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8080
SELECT ALL - cor0.col0 * + col0 + - col2 * cor0.col2 - - CAST( + col1 AS SIGNED ) FROM tab1 AS cor0
----
-15603
-2899
-7335

skipif mysql # not compatible
query I rowsort label-8080
SELECT ALL - cor0.col0 * + col0 + - col2 * cor0.col2 - - CAST ( + col1 AS INTEGER ) FROM tab1 AS cor0
----
-15603
-2899
-7335

query I rowsort
SELECT - col1 + - ( 16 ) FROM tab0 AS cor0
----
-102
-107
-113

query I rowsort
SELECT ALL - cor0.col0 - + col2 FROM tab0 cor0
----
-171
-36
-57

query I rowsort
SELECT ALL + col0 * col1 * col1 + + col2 * 5 AS col1 FROM tab2 AS cor0
----
23021
271648
6862

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + - 4 col2 FROM tab1 AS cor0
----
-68
-7
-84

query I rowsort
SELECT ALL + cor0.col1 + + col0 * - col2 AS col2 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT ALL - col2 * - cor0.col1 + - 73 FROM tab0 cor0
----
24
2765
7389

query I rowsort
SELECT + - ( - col0 ) * 74 FROM tab0 AS cor0
----
1776
2590
6586

onlyif mysql # use DIV operator for integer division
query I rowsort label-8088
SELECT DISTINCT + ( cor0.col1 ) + + 69 DIV ( - col0 ) FROM tab2 AS cor0
----
17
22
59

skipif mysql # not compatible
query I rowsort label-8088
SELECT DISTINCT + ( cor0.col1 ) + + 69 / ( - col0 ) FROM tab2 AS cor0
----
17
22
59

query I rowsort
SELECT DISTINCT - ( - col1 ) * + ( - col2 ) FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - 78 * + col1 FROM tab1 AS cor0
----
-1014
-2028
-780

query I rowsort
SELECT DISTINCT + col1 * col1 * ( col2 + col2 ) FROM tab0
----
1358084
18818
488136

query I rowsort
SELECT DISTINCT - 42 * + tab2.col1 FROM tab2, tab0, tab2 AS cor0
----
-1302
-2478
-714

query I rowsort
SELECT DISTINCT 23 + - 79 AS col1 FROM tab2, tab2 AS cor0
----
-56

query I rowsort
SELECT + + 99 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8095
SELECT DISTINCT col2 * CAST( col1 AS SIGNED ) FROM tab2 AS cor0
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-8095
SELECT DISTINCT col2 * CAST ( col1 AS INTEGER ) FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ( tab2.col0 + - 9 ) FROM tab2
----
-2
69
70

query I rowsort
SELECT + 45 + + col0 AS col0 FROM tab2
----
123
124
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8098
SELECT DISTINCT col0 * - CAST( - 73 AS SIGNED ) FROM tab1
----
219
4672
5840

skipif mysql # not compatible
query I rowsort label-8098
SELECT DISTINCT col0 * - CAST ( - 73 AS INTEGER ) FROM tab1
----
219
4672
5840

query I rowsort
SELECT + - col0 * cor0.col2 + - col1 AS col1 FROM tab1 cor0
----
-188
-3658
-7693

query I rowsort
SELECT ALL - col1 + - 25 * col2 FROM tab1 AS cor0
----
-1376
-1435
-2413

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - col2 * 75 + - col1 + + CAST ( col0 AS REAL ) * - tab1.col1 AS col2 FROM tab1
----
-4154
-4925
-8253

query I rowsort
SELECT DISTINCT col2 + - col0 + + col0 AS col0 FROM tab2
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-8103
SELECT ALL - + 69 DIV - col1 + col2 AS col0 FROM tab2 cor0
----
27
29
42

skipif mysql # not compatible
query I rowsort label-8103
SELECT ALL - + 69 / - col1 + col2 AS col0 FROM tab2 cor0
----
27
29
42

query I rowsort
SELECT - ( 79 ) + cor0.col2 FROM tab1 AS cor0
----
-22
-25
17

query I rowsort
SELECT ALL tab2.col2 * tab2.col1 + + col0 FROM tab2
----
1612
725
844

query I rowsort
SELECT 67 AS col0 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to eea8a0738728ea55e4e7ba1506c9905a

query I rowsort
SELECT ( col2 ) + col0 AS col2 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT + + ( + col1 ) * 35 AS col1 FROM tab0 AS cor0
----
3010
3185
3395

query I rowsort
SELECT DISTINCT + 97 + + col1 FROM tab0 cor0
----
183
188
194

query I rowsort
SELECT DISTINCT + - ( - col2 ) * + col1 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL 28 * + cor0.col0 AS col1 FROM tab2 AS cor0
----
196
2184
2212

query I rowsort
SELECT ALL col0 + + col1 * + col2 FROM tab2 cor0
----
1612
725
844

onlyif mysql # use DIV operator for integer division
query I rowsort label-8113
SELECT - + 83 + cor0.col0 DIV col0 AS col2 FROM tab2 AS cor0
----
-82
-82
-82

skipif mysql # not compatible
query I rowsort label-8113
SELECT - + 83 + cor0.col0 / col0 AS col2 FROM tab2 AS cor0
----
-82
-82
-82

query I rowsort
SELECT + tab1.col2 * 62 FROM tab1
----
3348
3534
5952

query I rowsort
SELECT DISTINCT col1 * 38 + - col2 + col0 * col2 FROM tab2
----
1340
3610
4244

query I rowsort
SELECT DISTINCT + col1 * col2 + cor0.col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT - col0 * ( ( - col0 ) ) FROM tab2
----
49
6084
6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-8118
SELECT ALL - col1 + + cor0.col0 DIV col0 + + col1 * + col2 AS col1 FROM tab1 AS cor0
----
1236
1379
561

skipif mysql # not compatible
query I rowsort label-8118
SELECT ALL - col1 + + cor0.col0 / col0 + + col1 * + col2 AS col1 FROM tab1 AS cor0
----
1236
1379
561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 * - col0 * - col0 col1 FROM tab1 AS cor0
----
234
40960
83200

query I rowsort
SELECT col1 * - 70 + col1 AS col1 FROM tab2 AS cor0
----
-1173
-2139
-4071

query I rowsort
SELECT ALL + - col2 * - col1 AS col0 FROM tab1 cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 62 col0 FROM tab0, tab0 AS cor0
----
9 values hashing to f0e93f6ff5fc3cf50a14e276206dad5c

query I rowsort
SELECT DISTINCT 68 * col1 FROM tab2 AS cor0
----
1156
2108
4012

query I rowsort
SELECT - + ( + col0 ) * + col0 AS col1 FROM tab1 AS cor0
----
-4096
-6400
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-8125
SELECT 86 DIV + 78 AS col0 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8125
SELECT 86 / + 78 AS col0 FROM tab1 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8126
SELECT - + col2 DIV - col1 AS col1 FROM tab2 cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-8126
SELECT - + col2 / - col1 AS col1 FROM tab2 cor0
----
0
0
2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8127
SELECT + CAST( + col1 AS SIGNED ) * col1 AS col0 FROM tab2 AS cor0
----
289
3481
961

skipif mysql # not compatible
query I rowsort label-8127
SELECT + CAST ( + col1 AS INTEGER ) * col1 AS col0 FROM tab2 AS cor0
----
289
3481
961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8128
SELECT + CAST( + col1 AS SIGNED ) + + col1 AS col0 FROM tab1 AS cor0
----
20
26
52

skipif mysql # not compatible
query I rowsort label-8128
SELECT + CAST ( + col1 AS INTEGER ) + + col1 AS col0 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT DISTINCT - + col1 * - col2 * + col1 + - col0 + + col2 * col2 AS col0 FROM tab1 cor0
----
25360
39417
8885

query I rowsort
SELECT - - 74 AS col1 FROM tab2 AS cor0
----
74
74
74

query I rowsort
SELECT + - ( + cor0.col1 ) AS col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL + - 82 * col0 FROM tab0 AS cor0
----
-1968
-2870
-7298

query I rowsort
SELECT col0 * cor0.col1 AS col0 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT ALL + - 6 - + col0 * ( - col0 ) FROM tab2 AS cor0
----
43
6078
6235

onlyif mysql # use DIV operator for integer division
query I rowsort label-8135
SELECT ALL + 86 * cor0.col0 + ( + col2 ) * col0 DIV col0 + - 74 FROM tab0 cor0
----
2023
2937
7662

skipif mysql # not compatible
query I rowsort label-8135
SELECT ALL + 86 * cor0.col0 + ( + col2 ) * col0 / col0 + - 74 FROM tab0 cor0
----
2023
2937
7662

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col1 col0 FROM tab2 cor0
----
1343
217
4602

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + 58 * - col0 - CAST ( col0 AS REAL ) FROM tab1 AS cor0
----
-177
-3776
-4720

query I rowsort
SELECT ALL - ( col2 ) - + col1 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT + col2 - + ( + col1 + cor0.col1 ) AS col2 FROM tab2 cor0
----
-35
-92
4

query I rowsort
SELECT ALL + col0 * - cor0.col1 * + col1 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT + col1 * 55 + + 68 - col2 * cor0.col2 FROM tab1 AS cor0
----
-1418
-2631
-8433

onlyif mysql # use DIV operator for integer division
query I rowsort label-8142
SELECT DISTINCT - cor0.col2 * + ( col2 ) + col1 DIV - 67 + - 19 FROM tab0 AS cor0
----
-1109
-21
-6744

skipif mysql # not compatible
query I rowsort label-8142
SELECT DISTINCT - cor0.col2 * + ( col2 ) + col1 / - 67 + - 19 FROM tab0 AS cor0
----
-1109
-21
-6744

query I rowsort
SELECT ALL - 44 + 9 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to c12e8bdd687c9040a5600dab3b6adf5b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8144
SELECT DISTINCT - CAST( cor0.col2 AS SIGNED ) * col0 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-8144
SELECT DISTINCT - CAST ( cor0.col2 AS INTEGER ) * col0 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8145
SELECT CAST( col0 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-8145
SELECT CAST ( col0 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT col0 + + col0 * + col0 FROM tab2 cor0
----
56
6162
6320

query I rowsort
SELECT + - col1 * cor0.col0 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL ( ( - col0 ) ) FROM tab1
----
-3
-64
-80

query I rowsort
SELECT DISTINCT 57 * col1 FROM tab0
----
4902
5187
5529

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 80 * col2 col0 FROM tab1
----
4320
4560
7680

query I rowsort
SELECT DISTINCT 40 * col0 FROM tab0
----
1400
3560
960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8152
SELECT - - ( col2 ) * CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8152
SELECT - - ( col2 ) * CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 78 * - col1 AS col0 FROM tab1 AS cor0
----
-1014
-2028
-780

query I rowsort
SELECT - 64 * + col1 AS col2 FROM tab2 AS cor0
----
-1088
-1984
-3776

query I rowsort
SELECT ALL + col0 - - ( col1 ) FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT ( - 0 ) + col2 * ( + col2 * + col1 ) FROM tab2 cor0
----
22599
24548
39884

query I rowsort
SELECT - - 71 AS col1 FROM tab1 cor0
----
71
71
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-8158
SELECT DISTINCT + 93 DIV col1 FROM tab2 AS cor0
----
1
3
5

skipif mysql # not compatible
query I rowsort label-8158
SELECT DISTINCT + 93 / col1 FROM tab2 AS cor0
----
1
3
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-8159
SELECT - + col1 + col2 DIV col1 + col0 * - col1 FROM tab1 AS cor0
----
-102
-1046
-645

skipif mysql # not compatible
query I rowsort label-8159
SELECT - + col1 + col2 / col1 + col0 * - col1 FROM tab1 AS cor0
----
-102
-1046
-645

query I rowsort
SELECT ALL + 0 + col1 AS col0 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT col0 + col2 + - ( col2 + cor0.col1 ) * - ( + col1 * + col2 ) FROM tab2 cor0
----
130494
35647
48580

query I rowsort
SELECT - col0 + - col0 - + ( + col1 ) FROM tab1 AS cor0
----
-138
-173
-32

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8163
SELECT col2 * - col2 + - cor0.col2 * col2 / - col0 + + ( col0 + - col0 ) * - CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8163
SELECT col2 * - col2 + - cor0.col2 * col2 / - col0 + + ( col0 + - col0 ) * - CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 80 - cor0.col0 FROM tab2 AS cor0
----
1
2
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-8165
SELECT ALL + col1 + - cor0.col2 + 33 DIV 57 AS col1 FROM tab0 AS cor0
----
53
9
96

skipif mysql # not compatible
query I rowsort label-8165
SELECT ALL + col1 + - cor0.col2 + 33 / 57 AS col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT DISTINCT + col2 * + col0 + - 86 FROM tab1 AS cor0
----
3562
7594
76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8167
SELECT - - col1 * + col0 + + CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8167
SELECT - - col1 * + col0 + + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 89 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT DISTINCT 70 * - col1 + col2 AS col2 FROM tab2 AS cor0
----
-1152
-2143
-4104

query I rowsort
SELECT ALL + + ( + col1 ) * - col1 FROM tab2 AS cor0
----
-289
-3481
-961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - ( + col1 ) col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT + 79 * - 25 + col1 FROM tab1 AS cor0
----
-1949
-1962
-1965

query I rowsort
SELECT ALL 44 * - cor0.col0 FROM tab1 AS cor0
----
-132
-2816
-3520

query I rowsort
SELECT DISTINCT 63 * 87 + col1 * + col0 * - ( + col0 * col2 ) AS col2 FROM tab0 AS cor0
----
-113344
-1629207
-59101021

query I rowsort
SELECT DISTINCT + + 43 * col2 + col0 AS col2 FROM tab2 AS cor0
----
1168
1196
1713

query I rowsort
SELECT col0 * 32 - + col1 AS col2 FROM tab2
----
193
2437
2511

skipif mysql # not compatible
query I rowsort
SELECT - col1 * CAST ( 75 AS REAL ) + + col2 FROM tab1
----
-1896
-693
-879

query I rowsort
SELECT DISTINCT + col2 * 89 AS col2 FROM tab1 AS cor0
----
4806
5073
8544

query I rowsort
SELECT + cor0.col2 * 24 FROM tab0 AS cor0
----
1968
24
792

query I rowsort
SELECT cor0.col0 FROM tab2, tab1 AS cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to e28bf7f922650ca423ade3642ce0285b

query I rowsort
SELECT DISTINCT - - col2 * - col0 - + col0 AS col2 FROM tab2 AS cor0
----
-196
-2106
-3081

query I rowsort
SELECT ( cor0.col0 ) * + col0 AS col2 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT col0 + + tab1.col0 * 3 FROM tab1
----
12
256
320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 13 col2 FROM tab1
----
13
13
13

query I rowsort
SELECT - col0 - + 19 FROM tab1
----
-22
-83
-99

query I rowsort
SELECT + ( col0 + + col1 ) FROM tab0
----
110
132
180

query I rowsort
SELECT 52 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 7f4ae30893ab330784829711032ae599

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8188
SELECT - tab1.col2 * - CAST( NULL AS DECIMAL ) AS col1 FROM tab1, tab0 cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-8188
SELECT - tab1.col2 * - CAST ( NULL AS REAL ) AS col1 FROM tab1, tab0 cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT cor1.col0 AS col1 FROM tab1, tab0 cor0, tab0 cor1, tab1 AS cor2
----
24
35
89

query I rowsort
SELECT + 72 + - tab1.col1 AS col2 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 08a899ced62f12653af941a7cb2c1a24

query I rowsort
SELECT DISTINCT + ( - col2 ) + + ( + col2 ) - - col2 AS col1 FROM tab1
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-8192
SELECT ALL 70 DIV - col0 + + 54 * + 56 * - col0 - - ( + ( - col2 ) ) AS col2 FROM tab2
----
-21205
-235898
-238934

skipif mysql # not compatible
query I rowsort label-8192
SELECT ALL 70 / - col0 + + 54 * + 56 * - col0 - - ( + ( - col2 ) ) AS col2 FROM tab2
----
-21205
-235898
-238934

skipif mysql # not compatible
query I rowsort
SELECT col1 + + CAST ( + col1 AS REAL ) AS col1 FROM tab1 AS cor0
----
20
26
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8194
SELECT col2 + ( col0 ) * - col0 - ( col1 ) * col2 / + CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8194
SELECT col2 + ( col0 ) * - col0 - ( col1 ) * col2 / + CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor0.col2 * - 44 AS col0 FROM tab0 AS cor0
----
-1452
-3608
-44

onlyif mysql # use DIV operator for integer division
query I rowsort label-8196
SELECT DISTINCT + col0 DIV + ( col1 + col2 ) AS col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-8196
SELECT DISTINCT + col0 / + ( col1 + col2 ) AS col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT + + col2 * - ( + 29 * col1 ) AS col0 FROM tab0 AS cor0
----
-216398
-2813
-82302

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8198
SELECT ALL tab2.col1 + - col0 - + CAST( - col2 AS SIGNED ) FROM tab2
----
-24
51
7

skipif mysql # not compatible
query I rowsort label-8198
SELECT ALL tab2.col1 + - col0 - + CAST ( - col2 AS INTEGER ) FROM tab2
----
-24
51
7

query I rowsort
SELECT ( col0 ) + + 50 + - 51 * col2 AS col0 FROM tab2
----
-1198
-1320
-1809

query I rowsort
SELECT DISTINCT + col1 * 41 + col0 AS col0 FROM tab1
----
1069
474
613

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8201
SELECT - cor0.col2 + CAST( NULL AS DECIMAL ) * + cor0.col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8201
SELECT - cor0.col2 + CAST ( NULL AS REAL ) * + cor0.col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 * + 58 FROM tab0 cor0
----
1392
2030
5162

skipif mysql # not compatible
query I rowsort
SELECT - - cor0.col0 + ( col1 * + col0 ) + CAST ( col1 * - col2 AS REAL ) FROM tab2 AS cor0
----
-613
3146
776

query I rowsort
SELECT DISTINCT col2 + 16 AS col1 FROM tab2 AS cor0
----
42
43
54

query I rowsort
SELECT cor0.col1 + ( + ( - cor0.col2 ) ) + col2 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL + col2 + 9 * - col2 FROM tab2 AS cor0
----
-208
-216
-304

query I rowsort
SELECT DISTINCT + - col2 * - 50 AS col2 FROM tab2 AS cor0
----
1300
1350
1900

onlyif mysql # use DIV operator for integer division
query I rowsort label-8208
SELECT DISTINCT - col0 DIV - col0 AS col2 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-8208
SELECT DISTINCT - col0 / - col0 AS col2 FROM tab1 AS cor0
----
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8209
SELECT + cor0.col0 / - CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8209
SELECT + cor0.col0 / - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor0.col0 + col2 * + col1 AS col2 FROM tab0 AS cor0
----
2814
62
7373

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8211
SELECT - - col2 * + CAST( col1 AS SIGNED ) + - col2 + col1 * + col0 FROM tab0 AS cor0
----
15479
3491
4869

skipif mysql # not compatible
query I rowsort label-8211
SELECT - - col2 * + CAST ( col1 AS INTEGER ) + - col2 + col1 * + col0 FROM tab0 AS cor0
----
15479
3491
4869

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * - 71 col0 FROM tab0 AS cor0
----
2343
5822
71

query I rowsort
SELECT + col2 * ( + col0 ) AS col1 FROM tab0 AS cor0
----
35
7298
792

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 cor0, tab0 cor1, tab0 AS cor2
----
972 values hashing to 8b4fcda7f1ca76bad7c7d728f54a51e0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + ( 98 + + col0 ) col0 FROM tab2
----
136
194
235

query I rowsort
SELECT ALL + tab1.col0 * - 91 FROM tab1
----
-273
-5824
-7280

query I rowsort
SELECT DISTINCT - - cor0.col1 * - col2 * - col2 AS col1 FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT ( - 81 ) + + col0 AS col1 FROM tab2
----
-2
-3
-74

skipif mysql # not compatible
query I rowsort
SELECT CAST ( + 42 + col2 AS REAL ) FROM tab0
----
124
43
75

query I rowsort
SELECT DISTINCT - col1 * - tab0.col0 * col2 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT ALL + 91 AS col0 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to deebbcfb9c7803a34dca6bd860849afe

query I rowsort
SELECT 45 FROM tab0, tab1, tab1 AS cor0, tab2 AS cor1
----
81 values hashing to 8a6d20810140ea088e8e0fd74ffb8339

query I rowsort
SELECT + 97 + col0 * - col2 FROM tab1 AS cor0
----
-3551
-65
-7583

query I rowsort
SELECT DISTINCT + ( col0 ) + col2 AS col1 FROM tab0 AS cor0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 61 col2 FROM tab1 AS cor0
----
61
61
61

query I rowsort
SELECT + 91 * + col1 * - 85 FROM tab0 cor0
----
-665210
-703885
-750295

query I rowsort
SELECT + 28 + col1 * col2 AS col2 FROM tab2 AS cor0
----
1562
674
865

onlyif mysql # use DIV operator for integer division
query I rowsort label-8228
SELECT - 0 + + col1 DIV + cor0.col0 AS col0 FROM tab0 cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-8228
SELECT - 0 + + col1 / + cor0.col0 AS col0 FROM tab0 cor0
----
1
2
3

query I rowsort
SELECT DISTINCT + col2 * col2 * 60 + + 68 + col2 AS col0 FROM tab1
----
175082
195065
553124

query I rowsort
SELECT ALL 41 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to f6a440b478f0d00f8326a8c51fe094b8

query I rowsort
SELECT ALL 31 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to c3c6f92f0ca72d71793339f88a57e336

query I rowsort
SELECT + - col1 * col0 * 26 FROM tab0 AS cor0
----
-210574
-53664
-88270

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8233
SELECT - col0 + + CAST( + 6 AS SIGNED ) * - col2 FROM tab0 AS cor0
----
-222
-41
-581

skipif mysql # not compatible
query I rowsort label-8233
SELECT - col0 + + CAST ( + 6 AS INTEGER ) * - col2 FROM tab0 AS cor0
----
-222
-41
-581

onlyif mysql # use DIV operator for integer division
query I rowsort label-8234
SELECT ALL + cor0.col2 * 40 DIV 41 AS col1 FROM tab2 AS cor0
----
25
26
37

skipif mysql # not compatible
query I rowsort label-8234
SELECT ALL + cor0.col2 * 40 / 41 AS col1 FROM tab2 AS cor0
----
25
26
37

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8235
SELECT + col0 * CAST( col0 AS SIGNED ) AS col0 FROM tab2 cor0
----
49
6084
6241

skipif mysql # not compatible
query I rowsort label-8235
SELECT + col0 * CAST ( col0 AS INTEGER ) AS col0 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT - cor0.col1 + + 83 * col0 AS col1 FROM tab2 AS cor0
----
550
6415
6540

query I rowsort
SELECT + + ( - col2 ) + col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT 12 + cor0.col0 FROM tab2 AS cor0
----
19
90
91

query I rowsort
SELECT col1 + - 58 - col2 AS col1 FROM tab1
----
-105
-141
-86

query I rowsort
SELECT + - col1 * col0 + col2 AS col1 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT 97 + col0 AS col0 FROM tab2 AS cor0
----
104
175
176

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * col1 * + col0 col0 FROM tab2 AS cor0
----
119652
51034
5859

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8243
SELECT - CAST( NULL AS SIGNED ) AS col0 FROM tab2, tab1 cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-8243
SELECT - CAST ( NULL AS INTEGER ) AS col0 FROM tab2, tab1 cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT 46 * + col0 AS col1 FROM tab0 AS cor0
----
1104
1610
4094

query I rowsort
SELECT ALL + col2 * tab0.col1 AS col2 FROM tab0 WHERE NOT + col1 * + col2 BETWEEN - col1 AND ( + col0 )
----
2838
7462
97

query I rowsort
SELECT + tab0.col0 + - tab0.col1 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT ALL col2 + - tab2.col2 * col2 FROM tab2
----
-1406
-650
-702

query I rowsort
SELECT DISTINCT + col0 - - col0 AS col2 FROM tab2
----
14
156
158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 col2 FROM tab1 WHERE col0 BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT DISTINCT col2 + col0 * - tab0.col0 AS col2 FROM tab0
----
-1224
-543
-7839

query I rowsort
SELECT ALL col1 * - col2 * - col2 AS col2 FROM tab1
----
119808
32490
75816

query I rowsort
SELECT + col2 * col0 + col1 FROM tab1
----
188
3658
7693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * col1 * + tab0.col1 col1 FROM tab0
----
636056
753571
912673

query I rowsort
SELECT DISTINCT col0 * - tab1.col0 * col2 FROM tab1
----
-233472
-486
-614400

query III rowsort
SELECT ALL * FROM tab2 WHERE ( - col1 ) NOT BETWEEN NULL AND NULL
----

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT ( NULL ) IN ( col1 * + col1 )
----

query I rowsort
SELECT col0 + col2 - col0 AS col2 FROM tab1
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col1 * + col0 + col0 col1 FROM tab1
----
-576
-75
-960

onlyif mysql # use DIV operator for integer division
query I rowsort label-8259
SELECT col2 DIV + tab0.col0 col1 FROM tab0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8259
SELECT col2 / + tab0.col0 col1 FROM tab0
----
0
0
1

query I rowsort
SELECT - col0 + col1 * col0 AS col0 FROM tab2
----
1264
210
4524

query I rowsort
SELECT DISTINCT - tab1.col1 - col2 FROM tab1
----
-109
-67
-80

query I rowsort
SELECT col0 + - tab0.col2 + - col1 FROM tab0
----
-63
-84
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-8263
SELECT - col2 DIV + col2 + + cor0.col1 * col0 * col0 FROM tab1 AS cor0
----
233
40959
83199

skipif mysql # not compatible
query I rowsort label-8263
SELECT - col2 / + col2 + + cor0.col1 * col0 * col0 FROM tab1 AS cor0
----
233
40959
83199

query I rowsort
SELECT col0 * col0 * + cor0.col0 + + cor0.col2 FROM tab1 AS cor0
----
262201
512096
81

query I rowsort
SELECT col0 + + col0 - - col1 FROM tab0
----
134
167
269

query I rowsort
SELECT DISTINCT - col2 + col0 * col1 + + col1 FROM tab1
----
50
593
957

query I rowsort
SELECT DISTINCT + col1 + col0 + - col1 * col1 * col2 FROM tab2
----
-10886
-25909
-90369

onlyif mysql # use DIV operator for integer division
query I rowsort label-8268
SELECT col1 DIV - col0 + + col2 - col1 * - col0 AS col2 FROM tab0 AS cor0
----
2094
3394
8180

skipif mysql # not compatible
query I rowsort label-8268
SELECT col1 / - col0 + + col2 - col1 * - col0 AS col2 FROM tab0 AS cor0
----
2094
3394
8180

query I rowsort
SELECT + col0 + - col1 * col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT DISTINCT tab2.col2 + col0 * - col2 FROM tab2
----
-162
-2002
-2964

query I rowsort
SELECT + col2 * - col1 - col1 FROM tab2
----
-1593
-663
-868

query I rowsort
SELECT col1 - + col1 * + tab1.col0 FROM tab1
----
-1027
-52
-630

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab2 AS cor0 WHERE col2 IN ( col2 )
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-8274
SELECT DISTINCT col2 DIV + col1 col2 FROM tab1 AS cor0
----
2
5
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8274
SELECT DISTINCT col2 / + col1 col2 FROM tab1 AS cor0
----
2
5
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-8275
SELECT - col0 + col0 + + col0 DIV col1 col1 FROM tab2 AS cor0
----
0
1
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8275
SELECT - col0 + col0 + + col0 / col1 col1 FROM tab2 AS cor0
----
0
1
4

query III rowsort
SELECT * FROM tab0 WHERE + col1 * + col1 + + col2 NOT IN ( + col1 * col0 + col2 * col2 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NULL BETWEEN + col2 AND - col2 / col2 + col1 + col1
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-8278
SELECT DISTINCT - col0 DIV + 8 FROM tab1
----
-10
-8
0

skipif mysql # not compatible
query I rowsort label-8278
SELECT DISTINCT - col0 / + 8 FROM tab1
----
-10
-8
0

query I rowsort
SELECT ALL - col1 + + col2 * + col2 * + col1 AS col1 FROM tab0
----
0
611793
93568

query I rowsort
SELECT - 92 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 1af709a79a3e56281ffdce4d931d5965

onlyif mysql # use DIV operator for integer division
query I rowsort label-8281
SELECT ALL + + col0 DIV - col1 + + col1 col2 FROM tab0 AS cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8281
SELECT ALL + + col0 / - col1 + + col1 col2 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8282
SELECT DISTINCT - + col1 DIV - col2 AS col1 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-8282
SELECT DISTINCT - + col1 / - col2 AS col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL col0 + 50 AS col0 FROM tab2 cor0
----
128
129
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * col0 - + col2 col1 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT + + col1 + - col1 * col0 AS col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT ALL - + col0 * + ( + col1 ) FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - cor0.col2 + - 77 col2 FROM tab0 AS cor0
----
-110
-159
-78

query I rowsort
SELECT DISTINCT + - cor0.col2 + + ( + 70 ) AS col1 FROM tab2 AS cor0
----
32
43
44

query I rowsort
SELECT col1 * col1 + col0 AS col2 FROM tab0 AS cor0
----
7420
8370
9444

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 + - col1 col0 FROM tab0 AS cor0
----
-2
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-8291
SELECT ALL col0 * ( + 97 * - cor0.col2 ) + col0 DIV - col1 AS col1 FROM tab0 AS cor0
----
-3395
-707906
-76824

skipif mysql # not compatible
query I rowsort label-8291
SELECT ALL col0 * ( + 97 * - cor0.col2 ) + col0 / - col1 AS col1 FROM tab0 AS cor0
----
-3395
-707906
-76824

query I rowsort
SELECT - + col0 * 11 + + 59 AS col2 FROM tab2 AS cor0
----
-18
-799
-810

query I rowsort
SELECT ALL - col1 + 74 AS col0 FROM tab2 cor0
----
15
43
57

query I rowsort
SELECT col1 * + col1 + col1 * - ( 4 ) AS col0 FROM tab1 AS cor0
----
117
572
60

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 DISTINCT - cor0.col2 * + col1 + - col1 * + col1 col0 FROM tab0 AS cor0
----
-10234
-15743
-9506

query I rowsort
SELECT DISTINCT + - col0 * + col0 + col2 AS col2 FROM tab0 AS cor0
----
-1224
-543
-7839

onlyif mysql # use DIV operator for integer division
query I rowsort label-8298
SELECT + col1 DIV col1 + + col1 AS col2 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-8298
SELECT + col1 / col1 + + col1 AS col2 FROM tab1 AS cor0
----
11
14
27

query I rowsort
SELECT ALL - 12 * + 20 AS col0 FROM tab1 AS cor0
----
-240
-240
-240

query I rowsort
SELECT ALL - col0 * - 42 FROM tab2 AS cor0
----
294
3276
3318

query I rowsort
SELECT col0 * - col2 * 31 + col0 * + 56 AS col1 FROM tab0
----
-221254
-23208
875

query I rowsort
SELECT - - 13 FROM tab2 cor0 CROSS JOIN tab0, tab2 AS cor1
----
27 values hashing to a90d0f37cec603ae1bc0a60dc7fbaeed

query I rowsort
SELECT ALL - 25 FROM tab2, tab1 AS cor0
----
9 values hashing to 40ac8fd000b2e49317aed2411077839e

onlyif mysql # use DIV operator for integer division
query I rowsort label-8304
SELECT 20 DIV cor0.col2 FROM tab0 AS cor0
----
0
0
20

skipif mysql # not compatible
query I rowsort label-8304
SELECT 20 / cor0.col2 FROM tab0 AS cor0
----
0
0
20

query I rowsort
SELECT ALL col2 + + col1 * ( + 10 ) FROM tab2 AS cor0
----
208
337
616

onlyif mysql # use DIV operator for integer division
query I rowsort label-8306
SELECT DISTINCT + col0 DIV cor0.col0 + - col1 * + col0 FROM tab2 AS cor0
----
-1342
-216
-4601

skipif mysql # not compatible
query I rowsort label-8306
SELECT DISTINCT + col0 / cor0.col0 + - col1 * + col0 FROM tab2 AS cor0
----
-1342
-216
-4601

onlyif mysql # use DIV operator for integer division
query I rowsort label-8307
SELECT DISTINCT - ( col2 ) * - col0 + + 16 + col2 DIV + 71 AS col1 FROM tab1 AS cor0
----
178
3664
7697

skipif mysql # not compatible
query I rowsort label-8307
SELECT DISTINCT - ( col2 ) * - col0 + + 16 + col2 / + 71 AS col1 FROM tab1 AS cor0
----
178
3664
7697

query I rowsort
SELECT DISTINCT - col0 + + col2 AS col2 FROM tab2 WHERE NULL = tab2.col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-8309
SELECT DISTINCT col2 DIV col2 + + col1 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-8309
SELECT DISTINCT col2 / col2 + + col1 FROM tab1 AS cor0
----
11
14
27

query I rowsort
SELECT ALL + col2 * - col2 + cor0.col1 * ( col1 ) FROM tab1 AS cor0
----
-2240
-3149
-9047

query I rowsort
SELECT ALL + col1 + col1 * ( col0 ) * col2 - + 23 * ( col0 + + ( col1 ) ) AS col2 FROM tab2 AS cor0
----
116560
48843
5016

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8312
SELECT DISTINCT + + col1 / - CAST( NULL AS SIGNED ) - - cor0.col1 * col1 * 40 AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8312
SELECT DISTINCT + + col1 / - CAST ( NULL AS INTEGER ) - - cor0.col1 * col1 * 40 AS col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - col0 * 36 - + col0 FROM tab2 AS cor0
----
-259
-2886
-2923

query I rowsort
SELECT DISTINCT col2 + - col1 * ( - col0 ) AS col0 FROM tab2
----
1381
244
4628

query I rowsort
SELECT ALL col0 * col1 + + col2 AS col0 FROM tab2
----
1381
244
4628

query I rowsort
SELECT + tab0.col2 AS col0 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT - 15 * 83 + - col0 AS col2 FROM tab0 AS cor0
----
-1269
-1280
-1334

query I rowsort
SELECT DISTINCT - - 38 AS col0 FROM tab2 AS cor0
----
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8319
SELECT DISTINCT - CAST( + col2 AS SIGNED ) FROM tab1 cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-8319
SELECT DISTINCT - CAST ( + col2 AS INTEGER ) FROM tab1 cor0
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 84 * col2 col2 FROM tab0 AS cor0
----
2772
6888
84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8321
SELECT + CAST( NULL AS SIGNED ) * + col1 + col1 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-8321
SELECT + CAST ( NULL AS INTEGER ) * + col1 + col1 col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 * + ( col2 + col1 ) AS col1 FROM tab2
----
406
4345
6630

query I rowsort
SELECT DISTINCT - 39 AS col2 FROM tab2
----
-39

query I rowsort
SELECT - col2 * - ( cor0.col2 ) + col1 FROM tab0 AS cor0
----
1175
6815
98

query I rowsort
SELECT ALL + tab1.col0 + + col2 AS col0 FROM tab1
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-8326
SELECT - - col2 * + col1 + - col0 DIV + col0 FROM tab2 AS cor0
----
1533
645
836

skipif mysql # not compatible
query I rowsort label-8326
SELECT - - col2 * + col1 + - col0 / + col0 FROM tab2 AS cor0
----
1533
645
836

onlyif mysql # use DIV operator for integer division
query I rowsort label-8327
SELECT - - col2 * - col0 + col0 DIV cor0.col0 AS col2 FROM tab1 cor0
----
-161
-3647
-7679

skipif mysql # not compatible
query I rowsort label-8327
SELECT - - col2 * - col0 + col0 / cor0.col0 AS col2 FROM tab1 cor0
----
-161
-3647
-7679

query I rowsort
SELECT - cor0.col1 + + col1 * - col0 AS col2 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT 28 * col1 AS col1 FROM tab2
----
1652
476
868

query I rowsort
SELECT + col0 + + col1 + col1 * 87 FROM tab0
----
7592
8097
8571

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8331
SELECT DISTINCT col0 + col1 * + CAST( NULL AS SIGNED ) + + col0 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-8331
SELECT DISTINCT col0 + col1 * + CAST ( NULL AS INTEGER ) + + col0 FROM tab1
----
NULL

query I rowsort
SELECT cor0.col1 * + 64 FROM tab1, tab1 AS cor0
----
9 values hashing to 255f40cd4837b55ed9edcdf1fb60331e

query I rowsort
SELECT + 81 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 0a85639e0dddbffdab2cb16b027cb360

query I rowsort
SELECT ALL - col2 + + 10 FROM tab0 AS cor0
----
-23
-72
9

query I rowsort
SELECT DISTINCT + col0 * - 89 FROM tab0 AS cor0
----
-2136
-3115
-7921

query I rowsort
SELECT - cor0.col1 + - ( + col2 ) * + col1 FROM tab0 AS cor0
----
-194
-2924
-7553

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8337
SELECT - col1 * + CAST( NULL AS SIGNED ) AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8337
SELECT - col1 * + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 + - ( - col2 ) * - col2 FROM tab0 AS cor0
----
-1003
-6633
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8339
SELECT - + col1 * - CAST( NULL AS SIGNED ) + col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8339
SELECT - + col1 * - CAST ( NULL AS INTEGER ) + col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8340
SELECT ALL + tab0.col1 DIV ( - col2 ) AS col0 FROM tab0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-8340
SELECT ALL + tab0.col1 / ( - col2 ) AS col0 FROM tab0
----
-1
-2
-97

query I rowsort
SELECT ALL col2 * ( 55 ) AS col0 FROM tab0
----
1815
4510
55

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8342
SELECT ALL + - CAST( col1 AS SIGNED ) * col0 AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort label-8342
SELECT ALL + - CAST ( col1 AS INTEGER ) * col0 AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT - - ( ( col2 ) ) * - cor0.col2 + col2 * col1 * col2 FROM tab2 AS cor0
----
21870
23104
39208

query I rowsort
SELECT DISTINCT col0 * - ( + tab1.col0 ) AS col0 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT + col0 * ( - 12 ) + + col1 AS col0 FROM tab0 AS cor0
----
-202
-323
-977

query I rowsort
SELECT ALL 86 + 94 FROM tab2
----
180
180
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col1 ) * col1 col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT ( 27 ) * col2 * - col1 FROM tab0 AS cor0
----
-201474
-2619
-76626

query I rowsort
SELECT + col2 + 13 FROM tab0 AS cor0
----
14
46
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-8350
SELECT ALL - - col1 + - 32 DIV + col2 FROM tab0 AS cor0
----
65
86
91

skipif mysql # not compatible
query I rowsort label-8350
SELECT ALL - - col1 + - 32 / + col2 FROM tab0 AS cor0
----
65
86
91

query I rowsort
SELECT + col2 + cor0.col0 * col1 AS col2 FROM tab0 AS cor0
----
2097
3396
8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-8352
SELECT col2 DIV - col1 AS col0 FROM tab2 cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-8352
SELECT col2 / - col1 AS col0 FROM tab2 cor0
----
-2
0
0

query I rowsort
SELECT col0 * + 57 * - cor0.col1 FROM tab1 AS cor0
----
-36480
-4446
-59280

query I rowsort
SELECT DISTINCT 67 + + col1 * - 60 AS col1 FROM tab1 AS cor0
----
-1493
-533
-713

query I rowsort
SELECT col0 * - col1 + - col1 AS col1 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT - col0 * col2 + + ( - col0 ) AS col1 FROM tab1 AS cor0
----
-165
-3712
-7760

query I rowsort
SELECT ALL - ( - col2 ) * 83 + 58 + col0 FROM tab1 AS cor0
----
4543
4853
8106

query I rowsort
SELECT - col0 * col1 + ( - col2 ) * - col1 FROM tab1 AS cor0
----
-70
1326
208

query I rowsort
SELECT + - col2 * + col1 - + cor0.col1 AS col2 FROM tab1 cor0
----
-1261
-1430
-580

query I rowsort
SELECT col0 + ( + 65 ) AS col1 FROM tab0 AS cor0
----
100
154
89

query I rowsort
SELECT - col1 + - 8 * col2 - col2 * ( 9 ) FROM tab2 AS cor0
----
-490
-501
-663

query I rowsort
SELECT + col1 * - 25 + 88 * + col2 FROM tab1 cor0
----
4102
4766
8123

query I rowsort
SELECT - col0 * - 27 * + col2 - cor0.col0 AS col0 FROM tab0 AS cor0
----
196957
21360
910

query I rowsort
SELECT col0 + - col2 * + 50 * - col2 FROM tab2 AS cor0
----
33878
36457
72279

query I rowsort
SELECT DISTINCT 43 * cor0.col1 FROM tab0 cor0
----
3698
3913
4171

query I rowsort
SELECT ALL - - col0 * + col1 + ( + col2 ) * + cor0.col1 FROM tab1 AS cor0
----
1210
1482
2288

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8367
SELECT ALL - - col2 / col1 + - CAST( NULL AS SIGNED ) - + ( - col0 ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8367
SELECT ALL - - col2 / col1 + - CAST ( NULL AS INTEGER ) - + ( - col0 ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 14 * col1 AS col1 FROM tab2 AS cor0
----
238
434
826

query I rowsort
SELECT - cor0.col2 + + col0 AS col0 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT ALL - col2 + col2 + cor0.col2 AS col0 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT 98 AS col0 FROM tab1 cor0
----
98
98
98

query I rowsort
SELECT ALL 64 * col2 + - col0 + + 32 * + col1 FROM tab0 AS cor0
----
3133
4840
8071

onlyif mysql # use DIV operator for integer division
query I rowsort label-8373
SELECT 69 * + col0 + - col2 DIV + col0 FROM tab1 AS cor0
----
189
4416
5519

skipif mysql # not compatible
query I rowsort label-8373
SELECT 69 * + col0 + - col2 / + col0 FROM tab1 AS cor0
----
189
4416
5519

query I rowsort
SELECT - 62 * col2 + - ( cor0.col0 + cor0.col1 ) * - col1 FROM tab1 AS cor0
----
-2594
-2794
-4743

query I rowsort
SELECT DISTINCT - col2 + col1 * 46 + 60 * - col1 FROM tab1 AS cor0
----
-197
-278
-418

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 16 col2 FROM tab0 AS cor0
----
16
16
16

query I rowsort
SELECT ALL - tab1.col0 - col0 AS col0 FROM tab1
----
-128
-160
-6

query I rowsort
SELECT ALL - 33 + - col0 FROM tab1 AS cor0
----
-113
-36
-97

query I rowsort
SELECT - - col0 + cor0.col2 * - col1 AS col2 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT DISTINCT + - col2 - + col0 AS col2 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT DISTINCT + ( - col1 + col2 ) * + ( 89 ) FROM tab2
----
-2937
-356
1869

query I rowsort
SELECT ALL + 37 * - col0 FROM tab0 cor0
----
-1295
-3293
-888

query I rowsort
SELECT ALL ( - 74 ) * col0 * - ( + col2 ) + - col1 FROM tab2 cor0
----
13955
150013
222131

onlyif mysql # use DIV operator for integer division
query I rowsort label-8384
SELECT ALL - ( - 81 ) DIV col2 - + col0 * + 79 AS col2 FROM tab1 AS cor0
----
-236
-5055
-6320

skipif mysql # not compatible
query I rowsort label-8384
SELECT ALL - ( - 81 ) / col2 - + col0 * + 79 AS col2 FROM tab1 AS cor0
----
-236
-5055
-6320

query I rowsort
SELECT DISTINCT 52 AS col0 FROM tab0, tab0 cor0
----
52

query I rowsort
SELECT DISTINCT tab1.col0 * - 67 FROM tab1
----
-201
-4288
-5360

query I rowsort
SELECT ALL + 92 FROM tab1, tab1 AS cor0
----
9 values hashing to 516fa45c8b06f9f67d6e500bfd435c1a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + 50 col0 FROM tab0
----
-32
17
49

query I rowsort
SELECT DISTINCT - 74 + - 97 * - col0 FROM tab1
----
217
6134
7686

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - col1 AS REAL ) + + col2 * ( - col0 ) + col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + col1 - col0 * - col2 * - ( col2 ) AS col1 FROM tab1 AS cor0
----
-207926
-737267
-8722

onlyif mysql # use DIV operator for integer division
query I rowsort label-8392
SELECT DISTINCT - ( cor0.col0 ) DIV col2 AS col2 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-8392
SELECT DISTINCT - ( cor0.col0 ) / col2 AS col2 FROM tab1 AS cor0
----
-1
0

query I rowsort
SELECT + col0 * - cor0.col1 + - col2 + + ( 75 ) * + col2 FROM tab2 AS cor0
----
-2678
1469
1781

query I rowsort
SELECT cor0.col2 * col0 + + col0 * + col0 FROM tab2 AS cor0
----
238
8112
9243

query I rowsort
SELECT DISTINCT col0 + tab2.col2 * - col2 FROM tab2
----
-1365
-598
-722

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + tab2.col0 * col0 * 45 col1 FROM tab2
----
2232
273806
280883

query I rowsort
SELECT DISTINCT + col2 * 73 FROM tab0 AS cor0
----
2409
5986
73

query I rowsort
SELECT ALL - ( + cor0.col1 ) * - col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT col1 + col1 * col1 + col2 * + ( - cor0.col2 ) * col2 FROM tab2 AS cor0
----
-14036
-18691
-54566

query I rowsort
SELECT + 49 AS col0 FROM tab0 cor0
----
49
49
49

query I rowsort
SELECT ALL - col2 * + col1 - col2 FROM tab2 cor0
----
-1560
-684
-864

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 cor0 CROSS JOIN tab2, tab1, tab0 AS cor1
----
3645 values hashing to 825c5bff5308aeedb3a0a28713da0683

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8403
SELECT DISTINCT CAST( NULL AS SIGNED ) + - col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-8403
SELECT DISTINCT CAST ( NULL AS INTEGER ) + - col2 FROM tab1
----
NULL

query I rowsort
SELECT DISTINCT - - 41 * col0 * ( col1 * col1 ) AS col0 FROM tab0 AS cor0
----
13501915
30217369
7277664

query I rowsort
SELECT ALL 78 AS col1 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to d8e5ef4db3419fc251e82c50ba04e048

query I rowsort
SELECT ALL + cor0.col2 + - col2 * + col1 FROM tab1 AS cor0
----
-1152
-1350
-513

onlyif mysql # use DIV operator for integer division
query I rowsort label-8407
SELECT ALL - + col0 DIV + col1 AS col2 FROM tab2 AS cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-8407
SELECT ALL - + col0 / + col1 AS col2 FROM tab2 AS cor0
----
-1
-4
0

query I rowsort
SELECT - col1 + tab0.col2 + tab0.col2 FROM tab0
----
-20
-95
73

query I rowsort
SELECT - 20 * - col0 - + 92 AS col1 FROM tab0 AS cor0
----
1688
388
608

query I rowsort
SELECT + col1 + col0 * 80 * col2 + - col0 FROM tab0 cor0
----
2862
583842
63422

query I rowsort
SELECT ALL + col0 * cor0.col0 AS col0 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT - col1 + col1 - 83 * - col2 FROM tab0 AS cor0
----
2739
6806
83

query I rowsort
SELECT DISTINCT + col2 * ( - col2 ) + - col1 FROM tab1 AS cor0
----
-2942
-3259
-9229

query I rowsort
SELECT DISTINCT - col2 * col2 + col0 AS col0 FROM tab0 cor0
----
-1065
-6635
34

query I rowsort
SELECT ALL - col1 * ( + 91 ) + - col0 FROM tab1 AS cor0
----
-1263
-2369
-974

query I rowsort
SELECT ALL - 86 FROM tab2, tab2 AS cor0, tab1 cor1
----
27 values hashing to 9d2e1e8eda15b3b83dd7136dfc4f19af

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8417
SELECT DISTINCT col0 * CAST( - 84 AS SIGNED ) FROM tab2 AS cor0
----
-588
-6552
-6636

skipif mysql # not compatible
query I rowsort label-8417
SELECT DISTINCT col0 * CAST ( - 84 AS INTEGER ) FROM tab2 AS cor0
----
-588
-6552
-6636

onlyif mysql # use DIV operator for integer division
query I rowsort label-8418
SELECT ( 68 ) DIV - col1 FROM tab2 AS cor0
----
-1
-2
-4

skipif mysql # not compatible
query I rowsort label-8418
SELECT ( 68 ) / - col1 FROM tab2 AS cor0
----
-1
-2
-4

query I rowsort
SELECT ALL - 36 * - col0 + cor0.col2 AS col2 FROM tab0 AS cor0
----
1261
3286
897

query I rowsort
SELECT DISTINCT + col2 * - col2 * - col2 AS col0 FROM tab0 AS cor0
----
1
35937
551368

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8421
SELECT ALL + CAST( 29 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
29
29
29

skipif mysql # not compatible
query I rowsort label-8421
SELECT ALL + CAST ( 29 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
29
29
29

query I rowsort
SELECT ALL - col2 * col0 + - col1 AS col1 FROM tab0 AS cor0
----
-132
-7389
-878

query I rowsort
SELECT ALL + - 55 * col0 + cor0.col2 AS col0 FROM tab0 AS cor0
----
-1287
-1924
-4813

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - 72 ) col0 FROM tab2 AS cor0
----
72
72
72

query I rowsort
SELECT DISTINCT - 30 AS col2 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
-30

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8426
SELECT ALL + CAST( 7 AS SIGNED ) FROM tab0, tab0 AS cor0
----
9 values hashing to 3362c0cb2b2c663037159d0699d46b76

skipif mysql # not compatible
query I rowsort label-8426
SELECT ALL + CAST ( 7 AS INTEGER ) FROM tab0, tab0 AS cor0
----
9 values hashing to 3362c0cb2b2c663037159d0699d46b76

query I rowsort
SELECT - + ( + cor0.col0 ) * - cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cf1383d310e5e3e19470e0b8dc064d0c

query I rowsort
SELECT 39 * col1 AS col1 FROM tab1 AS cor0
----
1014
390
507

onlyif mysql # use DIV operator for integer division
query I rowsort label-8429
SELECT 27 DIV cor0.col0 + ( cor0.col1 * cor0.col1 ) FROM tab0 AS cor0
----
7397
8281
9409

skipif mysql # not compatible
query I rowsort label-8429
SELECT 27 / cor0.col0 + ( cor0.col1 * cor0.col1 ) FROM tab0 AS cor0
----
7397
8281
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 30 * - cor0.col1 + col1 col1 FROM tab1 AS cor0
----
-290
-377
-754

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col2 + 80 col0 FROM tab2 AS cor0
----
-1454
-566
-757

onlyif mysql # use DIV operator for integer division
query I rowsort label-8432
SELECT + - col1 DIV col2 col0 FROM tab0 cor0
----
-1
-2
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8432
SELECT + - col1 / col2 col0 FROM tab0 cor0
----
-1
-2
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8433
SELECT - col2 * + CAST( + col2 AS SIGNED ) * col0 FROM tab0 AS cor0
----
-26136
-35
-598436

skipif mysql # not compatible
query I rowsort label-8433
SELECT - col2 * + CAST ( + col2 AS INTEGER ) * col0 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT - col1 * - 33 FROM tab1 AS cor0
----
330
429
858

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8435
SELECT - col2 * CAST( NULL AS SIGNED ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8435
SELECT - col2 * CAST ( NULL AS INTEGER ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 87 AS col1 FROM tab1, tab0 AS cor0
----
87

query I rowsort
SELECT ALL + - 77 FROM tab2 cor0
----
-77
-77
-77

query I rowsort
SELECT ALL + 31 + - ( + col2 ) FROM tab0 AS cor0
----
-2
-51
30

query I rowsort
SELECT + ( 95 ) * col1 + col1 AS col1 FROM tab2 AS cor0
----
1632
2976
5664

query I rowsort
SELECT - col2 + - 66 * - col2 FROM tab0 cor0
----
2145
5330
65

query I rowsort
SELECT - + cor0.col2 - - col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT - col0 * - col2 - - col0 AS col2 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT 3 * col2 - + col0 FROM tab0 AS cor0
----
-32
157
75

query I rowsort
SELECT ( - col0 ) + + col1 AS col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT + ( col1 ) * ( col1 ) + - col0 FROM tab2 AS cor0
----
210
3403
954

query I rowsort
SELECT - 20 * - col1 FROM tab0
----
1720
1820
1940

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8447
SELECT CAST( NULL AS SIGNED ) * + col2 + col1 * CAST( - col1 AS SIGNED ) * + col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8447
SELECT CAST ( NULL AS INTEGER ) * + col2 + col1 * CAST ( - col1 AS INTEGER ) * + col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 * col0 + + col2 AS col0 FROM tab0 cor0
----
-1224
-543
-7839

query I rowsort
SELECT - 24 * cor0.col0 * + col2 FROM tab2 AS cor0
----
-4536
-48672
-72048

onlyif mysql # use DIV operator for integer division
query I rowsort label-8450
SELECT col2 * - col0 DIV - col0 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-8450
SELECT col2 * - col0 / - col0 FROM tab2
----
26
27
38

query I rowsort
SELECT ALL col0 + - col1 * - col2 FROM tab1
----
1328
1407
634

query I rowsort
SELECT DISTINCT 99 + - tab2.col1 * - col2 + - 77 FROM tab2
----
1556
668
859

query I rowsort
SELECT 39 + tab0.col2 + col2 FROM tab0
----
105
203
41

query I rowsort
SELECT + ( - col2 ) + col1 + ( 24 * - col0 + + 69 ) AS col0 FROM tab2
----
-1770
-1848
-95

query I rowsort
SELECT - col2 * col0 - + col1 AS col1 FROM tab0 cor0
----
-132
-7389
-878

query I rowsort
SELECT DISTINCT - - col0 * cor0.col1 + - col1 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT + 52 * + col2 + + col2 * + col1 FROM tab2 AS cor0
----
2241
2622
2886

query I rowsort
SELECT ( + col1 ) + - col2 * col1 * + col2 AS col0 FROM tab2 AS cor0
----
-22568
-24531
-39825

query I rowsort
SELECT ALL 3 AS col2 FROM tab0, tab0 cor0
----
9 values hashing to 3cf1e377a943589897b8d431a834f1ba

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 74 + - col1 col0 FROM tab0 AS cor0
----
-160
-165
-171

query I rowsort
SELECT DISTINCT + col1 * col2 + 78 FROM tab2 AS cor0
----
1612
724
915

query I rowsort
SELECT ALL 56 * cor0.col2 AS col0 FROM tab0 AS cor0
----
1848
4592
56

query I rowsort
SELECT + cor0.col2 + + 12 * 76 FROM tab2, tab1 AS cor0
----
9 values hashing to add36056944f7e161a1da3a80be7b980

query I rowsort
SELECT - col2 + col0 * col0 * - col0 FROM tab0 AS cor0
----
-13857
-42876
-705051

query I rowsort
SELECT ALL col2 + - col1 + + col0 AS col0 FROM tab2 AS cor0
----
100
3
45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8466
SELECT ALL + col2 + CAST( NULL AS SIGNED ) * cor0.col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8466
SELECT ALL + col2 + CAST ( NULL AS INTEGER ) * cor0.col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col1 * ( cor0.col2 ) + + col0 + cor0.col2 * col2 AS col0 FROM tab0 AS cor0
----
133
14275
3951

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8468
SELECT DISTINCT + - col1 + - CAST( + 34 AS SIGNED ) col1 FROM tab0 AS cor0
----
-120
-125
-131

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8468
SELECT DISTINCT + - col1 + - CAST ( + 34 AS INTEGER ) col1 FROM tab0 AS cor0
----
-120
-125
-131

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8469
SELECT + col2 + CAST( 23 AS SIGNED ) FROM tab2 AS cor0
----
49
50
61

skipif mysql # not compatible
query I rowsort label-8469
SELECT + col2 + CAST ( 23 AS INTEGER ) FROM tab2 AS cor0
----
49
50
61

query I rowsort
SELECT 19 + + 71 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 5d25a546acf3ae171e731e50adc0112e

query I rowsort
SELECT DISTINCT 47 + - col1 AS col1 FROM tab0
----
-39
-44
-50

query I rowsort
SELECT col2 + tab2.col1 + + tab2.col2 FROM tab2
----
111
85
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8473
SELECT ALL - CAST( 30 AS SIGNED ) col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 56fa25f9fb8040460fe3c894000ea8fb

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8473
SELECT ALL - CAST ( 30 AS INTEGER ) col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 56fa25f9fb8040460fe3c894000ea8fb

query I rowsort
SELECT DISTINCT + - col2 + - 53 AS col0 FROM tab1 AS cor0
----
-107
-110
-149

query I rowsort
SELECT + - 10 + col1 * col2 FROM tab2 cor0
----
1524
636
827

query I rowsort
SELECT ALL + + col1 * 88 + + cor0.col2 FROM tab1 AS cor0
----
1240
2342
937

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - - cor0.col0 * - ( + col2 ) * CAST ( col0 AS REAL ) + + cor0.col0 * ( + cor0.col2 ) * + col2 - - col1 AS col1 FROM tab1 AS cor0
----
-25526
122893
8288

query I rowsort
SELECT DISTINCT - col0 * ( - col1 ) AS col1 FROM tab2
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-8479
SELECT + tab1.col2 DIV + col0 + col2 AS col1 FROM tab1
----
57
72
97

skipif mysql # not compatible
query I rowsort label-8479
SELECT + tab1.col2 / + col0 + col2 AS col1 FROM tab1
----
57
72
97

query I rowsort
SELECT + - ( col1 ) + cor0.col2 * cor0.col0 AS col1 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT - + ( - 80 ) AS col1 FROM tab0 AS cor0
----
80
80
80

query I rowsort
SELECT DISTINCT col1 + + col2 + + col2 FROM tab2
----
111
85
93

query I rowsort
SELECT DISTINCT tab1.col0 * - col2 * - col0 + col2 FROM tab1
----
233529
540
614496

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8484
SELECT col1 * + CAST( + col2 AS SIGNED ) * + col1 FROM tab1
----
16224
36504
5700

skipif mysql # not compatible
query I rowsort label-8484
SELECT col1 * + CAST ( + col2 AS INTEGER ) * + col1 FROM tab1
----
16224
36504
5700

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * ( col1 ) col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT ALL - col0 + ( col1 ) * col0 AS col0 FROM tab0
----
2040
3360
8010

query I rowsort
SELECT DISTINCT - col0 + + ( + 57 ) FROM tab1 AS cor0
----
-23
-7
54

query I rowsort
SELECT + col2 * - ( col0 ) + col2 AS col2 FROM tab2 AS cor0
----
-162
-2002
-2964

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8489
SELECT + col1 / CAST( NULL AS SIGNED ) - - col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8489
SELECT + col1 / CAST ( NULL AS INTEGER ) - - col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8490
SELECT DISTINCT - col0 * CAST( NULL AS SIGNED ) + - 2 * + col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8490
SELECT DISTINCT - col0 * CAST ( NULL AS INTEGER ) + - 2 * + col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - col2 + 80 + ( col0 ) AS col1 FROM tab1 AS cor0
----
29
64
87

query I rowsort
SELECT col1 + + cor0.col2 + - 18 FROM tab1 AS cor0
----
49
62
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 80 col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 4dde3bd5652d30396b9cadd0e2cfb680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8494
SELECT ALL col1 * CAST( cor0.col0 AS SIGNED ) * - col1 FROM tab1 cor0
----
-13520
-2028
-6400

skipif mysql # not compatible
query I rowsort label-8494
SELECT ALL col1 * CAST ( cor0.col0 AS INTEGER ) * - col1 FROM tab1 cor0
----
-13520
-2028
-6400

onlyif mysql # use DIV operator for integer division
query I rowsort label-8495
SELECT ALL col1 + col2 DIV col0 + - col2 * + 46 FROM tab0 AS cor0
----
-1431
-3681
51

skipif mysql # not compatible
query I rowsort label-8495
SELECT ALL col1 + col2 / col0 + - col2 * + 46 FROM tab0 AS cor0
----
-1431
-3681
51

query I rowsort
SELECT + - ( + col0 ) + + col1 * col1 AS col1 FROM tab1 AS cor0
----
36
673
89

query I rowsort
SELECT ( col0 ) * - col2 + ( + col0 ) AS col2 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT DISTINCT - ( + cor0.col1 ) * col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL - col0 + + col2 * + col0 * + col1 AS col2 FROM tab0 AS cor0
----
3360
664029
68088

query I rowsort
SELECT ALL + 63 * - cor0.col0 AS col0 FROM tab0 AS cor0
----
-1512
-2205
-5607

query I rowsort
SELECT DISTINCT + - ( col1 ) * + col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL + col0 + + 3 AS col0 FROM tab1 AS cor0
----
6
67
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - ( + col0 ) col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT 78 + + col1 * - col2 FROM tab1 AS cor0
----
-1170
-1326
-492

onlyif mysql # use DIV operator for integer division
query I rowsort label-8505
SELECT ALL + col0 + col2 DIV - col2 AS col0 FROM tab1 AS cor0
----
2
63
79

skipif mysql # not compatible
query I rowsort label-8505
SELECT ALL + col0 + col2 / - col2 AS col0 FROM tab1 AS cor0
----
2
63
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-8506
SELECT DISTINCT + + col0 DIV - col2 FROM tab0 AS cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-8506
SELECT DISTINCT + + col0 / - col2 FROM tab0 AS cor0
----
-1
-35
0

query I rowsort
SELECT DISTINCT + col0 + col2 - col2 FROM tab2
----
7
78
79

query I rowsort
SELECT ALL + tab0.col1 - col2 FROM tab0
----
53
9
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col2 + tab0.col2 * col1 - + col0 col1 FROM tab0
----
2847
63
7455

onlyif mysql # use DIV operator for integer division
query I rowsort label-8510
SELECT ALL - + col0 DIV + col2 AS col0 FROM tab1 cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-8510
SELECT ALL - + col0 / + col2 AS col0 FROM tab1 cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT - 68 * col2 AS col0 FROM tab2 AS cor0
----
-1768
-1836
-2584

onlyif mysql # use DIV operator for integer division
query I rowsort label-8512
SELECT ( 77 ) DIV col1 col1 FROM tab1 AS cor0
----
2
5
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8512
SELECT ( 77 ) / col1 col1 FROM tab1 AS cor0
----
2
5
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8513
SELECT DISTINCT - - cor0.col1 * col2 + - CAST( + col2 AS SIGNED ) * + col2 FROM tab0 AS cor0
----
1749
738
96

skipif mysql # not compatible
query I rowsort label-8513
SELECT DISTINCT - - cor0.col1 * col2 + - CAST ( + col2 AS INTEGER ) * + col2 FROM tab0 AS cor0
----
1749
738
96

query I rowsort
SELECT DISTINCT col0 * cor0.col2 + col1 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT ALL col1 + + col2 * + 1 * col2 AS col2 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT DISTINCT + col1 + col0 * cor0.col0 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT ALL + - cor0.col0 + col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT - - 72 + + col0 AS col0 FROM tab2 AS cor0
----
150
151
79

query I rowsort
SELECT col1 * + col1 + 41 * - col0 FROM tab0 AS cor0
----
4632
6412
7974

query I rowsort
SELECT ALL - - col1 + + col2 * 8 FROM tab2 AS cor0
----
247
267
321

query I rowsort
SELECT DISTINCT - col2 + col1 * + col0 AS col2 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT ALL - cor0.col2 * col0 + + col2 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT DISTINCT - - col1 * - col2 * col0 - + col0 * col2 FROM tab2 cor0
----
-121680
-54036
-6048

skipif mysql # not compatible
query I rowsort
SELECT - - cor0.col2 / + CAST ( - col2 AS REAL ) FROM tab0 AS cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + ( - col0 ) col1 FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT ALL - + cor0.col0 - + ( col0 ) * - cor0.col0 AS col0 FROM tab2 AS cor0
----
42
6006
6162

query I rowsort
SELECT ALL - 95 * 28 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 7b70cf20b91d2fa1516f1d09ca168f9f

query I rowsort
SELECT - ( + col0 * col0 ) AS col2 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT + cor0.col2 * col1 + col2 AS col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT ALL + col1 * ( 1 + col0 ) AS col0 FROM tab1 cor0
----
104
1053
650

query I rowsort
SELECT col2 + ( col1 ) AS col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT + col0 + + 52 * cor0.col1 FROM tab1 AS cor0
----
1355
584
756

query I rowsort
SELECT DISTINCT + - col2 * 11 FROM tab2 AS cor0
----
-286
-297
-418

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 * + ( - 62 ) col2 FROM tab0 AS cor0
----
-1488
-2170
-5518

query I rowsort
SELECT DISTINCT - col0 * + ( 29 + col0 ) * ( 11 ) AS col1 FROM tab1 AS cor0
----
-1056
-65472
-95920

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 44 * - col2 + col2 * + col1 col1 FROM tab1
----
-1938
-2976
-972

query I rowsort
SELECT - 67 * + tab2.col0 + tab2.col0 AS col0 FROM tab2
----
-462
-5148
-5214

query I rowsort
SELECT - ( - col0 ) * - col2 + - 3 FROM tab1
----
-165
-3651
-7683

query I rowsort
SELECT col0 + + col0 * + col0 * col0 FROM tab2
----
350
474630
493118

query I rowsort
SELECT cor0.col1 * ( 60 ) FROM tab1, tab2, tab2 AS cor0, tab0
----
81 values hashing to 9fa07539a71ff1bbd61e03a2b66b6649

query I rowsort
SELECT + 80 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 878f012d707aab113cedaf56e6c52e94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8542
SELECT ALL + col2 + CAST( 47 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
101
104
143

skipif mysql # not compatible
query I rowsort label-8542
SELECT ALL + col2 + CAST ( 47 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
101
104
143

query I rowsort
SELECT DISTINCT cor0.col2 * - col0 - - col0 * + col0 AS col0 FROM tab2 AS cor0
----
-140
3239
4056

query I rowsort
SELECT + + 62 * - col2 FROM tab1 AS cor0
----
-3348
-3534
-5952

onlyif mysql # use DIV operator for integer division
query I rowsort label-8545
SELECT DISTINCT - 34 DIV col2 + - col0 * col2 col2 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8545
SELECT DISTINCT - 34 / col2 + - col0 * col2 col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT + - ( col1 ) * - col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - 85 * - col1 * col1 + - 13 * col2 AS col2 FROM tab1 AS cor0
----
13117
56758
7759

query I rowsort
SELECT ALL + ( + col0 ) + tab0.col2 FROM tab0
----
171
36
57

query I rowsort
SELECT ALL + col1 * + tab1.col1 FROM tab1
----
100
169
676

query I rowsort
SELECT ALL cor2.col0 AS col1 FROM tab0, tab2 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8551
SELECT ALL + - cor0.col2 * cor0.col0 * + CAST( + cor0.col2 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-114076
-5103
-52728

skipif mysql # not compatible
query I rowsort label-8551
SELECT ALL + - cor0.col2 * cor0.col0 * + CAST ( + cor0.col2 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-114076
-5103
-52728

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col2 ) * - 85 col2 FROM tab1 AS cor0
----
-4590
-4845
-8160

query I rowsort
SELECT ALL col1 + - col2 * + ( + col0 ) AS col1 FROM tab0
----
-706
-7207
62

query I rowsort
SELECT + ( - col0 ) * - col2 AS col2 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8555
SELECT ALL + CAST( NULL AS DECIMAL ) - + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8555
SELECT ALL + CAST ( NULL AS REAL ) - + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col0 * - tab0.col0 FROM tab0
----
1225
576
7921

query I rowsort
SELECT + ( col0 ) + - col0 + col2 AS col0 FROM tab0 AS cor0
----
1
33
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8558
SELECT + CAST( cor0.col2 AS SIGNED ) FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-8558
SELECT + CAST ( cor0.col2 AS INTEGER ) FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT + - col0 + col1 + col2 FROM tab0 AS cor0
----
63
84
95

query I rowsort
SELECT - col2 * 23 FROM tab1 cor0
----
-1242
-1311
-2208

query I rowsort
SELECT DISTINCT - 39 AS col2 FROM tab0
----
-39

query I rowsort
SELECT ALL 95 * col0 AS col2 FROM tab0
----
2280
3325
8455

query I rowsort
SELECT DISTINCT + cor0.col1 + cor0.col0 AS col2 FROM tab1, tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL - + 60 AS col0 FROM tab0 AS cor0
----
-60
-60
-60

query I rowsort
SELECT + + 66 AS col1 FROM tab0 AS cor0
----
66
66
66

query I rowsort
SELECT DISTINCT + 77 + col1 AS col1 FROM tab2 AS cor0
----
108
136
94

query I rowsort
SELECT ALL - + col0 * cor0.col0 AS col2 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT ALL 18 AS col1 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 903ac227935c1532300db45a8537c595

onlyif mysql # use DIV operator for integer division
query I rowsort label-8569
SELECT ALL + col2 * + col1 DIV - col1 AS col2 FROM tab2 cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-8569
SELECT ALL + col2 * + col1 / - col1 AS col2 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT + col1 + - col0 + - cor0.col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT + - col2 * 2 * + col0 AS col0 FROM tab0 AS cor0
----
-14596
-1584
-70

query I rowsort
SELECT DISTINCT - - col1 * ( - col0 ) * - col1 AS col2 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT ALL + col2 + - ( 88 ) * + col2 FROM tab1 AS cor0
----
-4698
-4959
-8352

query I rowsort
SELECT - col2 + ( col0 ) * + col2 AS col1 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT + col1 + col1 + + ( col0 ) AS col2 FROM tab0 AS cor0
----
196
229
271

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8576
SELECT + + col2 * CAST( 34 AS SIGNED ) FROM tab0 cor0
----
1122
2788
34

skipif mysql # not compatible
query I rowsort label-8576
SELECT + + col2 * CAST ( 34 AS INTEGER ) FROM tab0 cor0
----
1122
2788
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8577
SELECT + col0 - + CAST( NULL AS DECIMAL ) / + col2 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8577
SELECT + col0 - + CAST ( NULL AS REAL ) / + col2 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8578
SELECT + col2 + - col2 DIV cor0.col2 AS col1 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-8578
SELECT + col2 + - col2 / cor0.col2 AS col1 FROM tab0 AS cor0
----
0
32
81

query I rowsort
SELECT col0 * tab2.col2 - tab2.col1 FROM tab2
----
158
1969
2985

query I rowsort
SELECT DISTINCT + col2 * col0 - + col2 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT + - col0 * col1 + col0 FROM tab2 cor0
----
-1264
-210
-4524

query I rowsort
SELECT col2 + col1 + - col0 FROM tab1 cor0
----
29
3
77

query I rowsort
SELECT - - cor0.col1 * + col0 + + col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT + col2 + col0 - cor0.col1 AS col1 FROM tab1 AS cor0
----
111
163
31

query I rowsort
SELECT - + col1 + col0 * col2 - - col2 * col1 AS col1 FROM tab1 AS cor0
----
1540
4208
8915

query I rowsort
SELECT + 59 * + col2 AS col0 FROM tab2 AS cor0
----
1534
1593
2242

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 * col0 + - col2 * + col1 col1 FROM tab2 cor0
----
-648
2356
494

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 78 + col1 * + col2 col0 FROM tab1 AS cor0
----
1170
1326
492

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + col1 col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT + col0 + col1 + col0 * col1 AS col0 FROM tab2 cor0
----
1439
255
4739

query I rowsort
SELECT ALL + col2 - col2 * - col0 AS col0 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT + ( tab1.col1 * - col2 ) - + ( 20 ) FROM tab1
----
-1268
-1424
-590

query I rowsort
SELECT DISTINCT ( - col0 + + col0 ) AS col1 FROM tab0
----
0

query I rowsort
SELECT DISTINCT 32 AS col2 FROM tab2, tab0, tab2 cor0
----
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + col1 * col2 col0 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT DISTINCT 26 * col1 AS col1 FROM tab2
----
1534
442
806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - ( 59 ) col0 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to e29fef8cdec1ee45a71d213f16d2f1d3

query I rowsort
SELECT 34 + + col1 * - col1 AS col1 FROM tab1
----
-135
-642
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 90 + col2 * - col0 col0 FROM tab1
----
-3558
-72
-7590

onlyif mysql # use DIV operator for integer division
query I rowsort label-8600
SELECT - col2 DIV 33 + - tab1.col0 AS col1 FROM tab1
----
-4
-65
-82

skipif mysql # not compatible
query I rowsort label-8600
SELECT - col2 / 33 + - tab1.col0 AS col1 FROM tab1
----
-4
-65
-82

query I rowsort
SELECT ALL - col0 * col2 - ( 46 ) AS col0 FROM tab2 cor0
----
-2074
-235
-3048

query I rowsort
SELECT + 7 + - col1 FROM tab1 AS cor0
----
-19
-3
-6

query I rowsort
SELECT + col2 * + col0 - - col0 AS col1 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT + + 94 AS col2 FROM tab0 cor0
----
94
94
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-8605
SELECT + col1 * + col2 DIV + col2 col2 FROM tab1 AS cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8605
SELECT + col1 * + col2 / + col2 col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT + cor0.col2 + + col2 * + col2 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT ALL + - 88 * + cor0.col1 FROM tab0 AS cor0
----
-7568
-8008
-8536

query I rowsort
SELECT ALL col2 + 68 * + col1 * - tab0.col0 + - col1 FROM tab0
----
-140405
-230956
-550741

query I rowsort
SELECT ALL - tab0.col0 + col1 * - col1 AS col2 FROM tab0
----
-7420
-8370
-9444

query I rowsort
SELECT DISTINCT + col2 * + col0 + + col1 + + col2 * col0 * - 63 AS col2 FROM tab1 AS cor0
----
-10018
-226166
-476147

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8611
SELECT DISTINCT + col1 * + CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8611
SELECT DISTINCT + col1 * + CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL

query I rowsort
SELECT ALL + - col2 + 41 FROM tab0 AS cor0
----
-41
40
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-8613
SELECT DISTINCT - + col1 DIV + 60 - col2 * col1 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

skipif mysql # not compatible
query I rowsort label-8613
SELECT DISTINCT - + col1 / + 60 - col2 * col1 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT + col1 * col1 + 23 FROM tab2 AS cor0
----
312
3504
984

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8615
SELECT + col2 + - CAST( - ( + col0 ) AS SIGNED ) FROM tab2 AS cor0
----
104
117
34

skipif mysql # not compatible
query I rowsort label-8615
SELECT + col2 + - CAST ( - ( + col0 ) AS INTEGER ) FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT - + col2 * 90 * col1 FROM tab0 AS cor0
----
-255420
-671580
-8730

query I rowsort
SELECT ALL + + 22 + col2 * + col2 FROM tab0 AS cor0
----
1111
23
6746

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8618
SELECT ALL CAST( - col1 AS SIGNED ) * col0 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort label-8618
SELECT ALL CAST ( - col1 AS INTEGER ) * col0 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT + ( + cor0.col0 ) * - col1 * col1 AS col0 FROM tab2 AS cor0
----
-22831
-271518
-6727

query I rowsort
SELECT DISTINCT - cor0.col1 + 48 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
22
35
38

query I rowsort
SELECT ALL - 27 + - 51 FROM tab2 cor0
----
-78
-78
-78

query I rowsort
SELECT ( + col0 ) + cor0.col1 * + col1 AS col0 FROM tab1 cor0
----
164
249
679

query I rowsort
SELECT ALL - - 66 + - 75 AS col0 FROM tab0 AS cor0
----
-9
-9
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-8624
SELECT ALL + 30 DIV 83 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8624
SELECT ALL + 30 / 83 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col1 * cor0.col2 col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL col0 + - cor0.col1 * - cor0.col2 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT DISTINCT + 86 * + col1 * col0 FROM tab1
----
55040
6708
89440

query I rowsort
SELECT ALL - + 77 * + col2 + col0 * - col1 FROM tab1 AS cor0
----
-4236
-5029
-8432

query I rowsort
SELECT DISTINCT - + cor0.col1 + cor0.col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL - - ( - col1 ) * col0 * + 34 FROM tab1 AS cor0
----
-21760
-2652
-35360

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - ( 52 ) + - col2 col2 FROM tab0 AS cor0
----
-134
-53
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-8632
SELECT + ( - ( col2 ) ) * cor0.col1 + col2 DIV col1 FROM tab2 AS cor0
----
-1534
-644
-837

skipif mysql # not compatible
query I rowsort label-8632
SELECT + ( - ( col2 ) ) * cor0.col1 + col2 / col1 FROM tab2 AS cor0
----
-1534
-644
-837

query I rowsort
SELECT ALL + col2 + + ( + col2 ) * 91 AS col1 FROM tab0 AS cor0
----
3036
7544
92

query I rowsort
SELECT ALL + col0 * + col1 + col2 FROM tab2 cor0
----
1381
244
4628

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8635
SELECT DISTINCT - + CAST( NULL AS SIGNED ) / 9 + cor0.col0 - + cor0.col2 * 93 * col0 AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8635
SELECT DISTINCT - + CAST ( NULL AS INTEGER ) / 9 + cor0.col0 - + cor0.col2 * 93 * col0 AS col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - - cor0.col1 + + col0 * col2 FROM tab2 AS cor0
----
2087
220
3019

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 32 col1 FROM tab2, tab1 AS cor0 CROSS JOIN tab1
----
27 values hashing to 7106326ae056e78044adc0aef747ef08

query I rowsort
SELECT tab2.col0 + - col0 * col0 AS col2 FROM tab2
----
-42
-6006
-6162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * 2 - cor0.col2 col0 FROM tab1 AS cor0
----
-48
64
71

query I rowsort
SELECT + 29 * + col0 - + col1 AS col0 FROM tab1
----
1846
2307
61

query I rowsort
SELECT - + col0 * col0 - col1 AS col0 FROM tab1 AS cor0
----
-35
-4106
-6413

query I rowsort
SELECT ALL col1 + - 21 FROM tab2 cor0
----
-4
10
38

query I rowsort
SELECT DISTINCT - 44 * col2 + + ( col0 ) * col1 FROM tab0
----
3351
4491
612

query I rowsort
SELECT DISTINCT col1 * col0 + col2 FROM tab0
----
2097
3396
8181

query I rowsort
SELECT col2 * - ( - tab2.col2 ) FROM tab2
----
1444
676
729

query I rowsort
SELECT + col2 * col1 * - col2 FROM tab1
----
-119808
-32490
-75816

query I rowsort
SELECT DISTINCT + col0 * col1 + + col0 AS col1 FROM tab2
----
1422
224
4680

query I rowsort
SELECT ALL col2 + - 21 AS col2 FROM tab0
----
-20
12
61

query I rowsort
SELECT ALL - col2 - 43 AS col0 FROM tab2 AS cor0
----
-69
-70
-81

query I rowsort
SELECT DISTINCT + - col2 * 19 - + col1 FROM tab1 AS cor0
----
-1052
-1093
-1837

query I rowsort
SELECT - col1 + 90 AS col2 FROM tab2 AS cor0
----
31
59
73

query I rowsort
SELECT DISTINCT cor0.col0 + tab2.col1 * cor0.col2 FROM tab2, tab0, tab2 AS cor0
----
9 values hashing to 882b117f1b7e856213f15628800a835d

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8653
SELECT DISTINCT - col0 * CAST( 1 AS SIGNED ) + col2 AS col2 FROM tab2 AS cor0
----
-41
-52
20

skipif mysql # not compatible
query I rowsort label-8653
SELECT DISTINCT - col0 * CAST ( 1 AS INTEGER ) + col2 AS col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT + col2 + 15 AS col1 FROM tab1 AS cor0
----
111
69
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-8655
SELECT + cor0.col1 DIV col2 - col2 FROM tab0 AS cor0
----
-31
-81
96

skipif mysql # not compatible
query I rowsort label-8655
SELECT + cor0.col1 / col2 - col2 FROM tab0 AS cor0
----
-31
-81
96

query I rowsort
SELECT - col2 + ( + 41 ) AS col0 FROM tab0 AS cor0
----
-41
40
8

query I rowsort
SELECT - ( - tab1.col2 * - ( col0 ) ) FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT 70 AS col2 FROM tab0, tab1, tab2 AS cor0
----
70

query I rowsort
SELECT - col0 * - ( col0 * ( + 37 ) ) - - col1 FROM tab1 AS cor0
----
151562
236813
359

query I rowsort
SELECT ALL - 61 + + col0 FROM tab1 AS cor0
----
-58
19
3

query I rowsort
SELECT ALL + 11 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to f4d199584b44732f1a897e6691b4ea00

query I rowsort
SELECT ALL 42 * + col0 FROM tab0 cor0
----
1008
1470
3738

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8663
SELECT DISTINCT CAST( NULL AS SIGNED ) * 56 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-8663
SELECT DISTINCT CAST ( NULL AS INTEGER ) * 56 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
NULL

query I rowsort
SELECT + + col1 * - cor0.col2 * col1 AS col1 FROM tab1 AS cor0
----
-16224
-36504
-5700

query I rowsort
SELECT 94 * - ( col1 * - 37 ) FROM tab2
----
107818
205202
59126

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + col0 + col0 * col0 ) col1 FROM tab1
----
12
4160
6480

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1, tab0, tab2 cor0
----
26
27
38

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8669
SELECT ALL - col2 * col1 * CAST( NULL AS DECIMAL ) AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8669
SELECT ALL - col2 * col1 * CAST ( NULL AS REAL ) AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + col1 + col0 * col0 FROM tab1 AS cor0
----
35
4106
6413

query I rowsort
SELECT DISTINCT - + 45 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
-45

query I rowsort
SELECT + 89 * col2 FROM tab1 AS cor0
----
4806
5073
8544

query I rowsort
SELECT - col1 * + col1 + col1 AS col1 FROM tab1 AS cor0
----
-156
-650
-90

query I rowsort
SELECT + col1 - + ( - col1 ) FROM tab2
----
118
34
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col2 FROM tab0, tab0 cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT ALL - col1 * - col1 * ( cor0.col1 ) FROM tab1 AS cor0
----
1000
17576
2197

query I rowsort
SELECT - + col1 * 67 * - col0 AS col1 FROM tab1 AS cor0
----
42880
5226
69680

query I rowsort
SELECT ALL ( cor1.col1 + + 32 ) * 10 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to e261416e32213e436764da015e658108

query I rowsort
SELECT - 57 + - col1 * + col0 + + ( + col2 + col0 ) * col0 FROM tab0
----
-2192
-753
7063

query I rowsort
SELECT ALL + ( col1 ) * col1 + + col2 + col2 * col1 FROM tab0
----
10267
15825
9507

query I rowsort
SELECT - + 89 + + col2 * - col1 FROM tab1 AS cor0
----
-1337
-1493
-659

query I rowsort
SELECT - ( - col2 ) * col1 FROM tab0
----
2838
7462
97

query I rowsort
SELECT ALL - col1 * col2 * tab1.col2 + 36 FROM tab1
----
-119772
-32454
-75780

query I rowsort
SELECT ALL + tab1.col1 + - ( col0 ) FROM tab1
----
-54
-67
23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8685
SELECT - CAST( - col1 AS SIGNED ) + - cor0.col0 - + cor0.col0 FROM tab0 AS cor0
----
-87
27
38

skipif mysql # not compatible
query I rowsort label-8685
SELECT - CAST ( - col1 AS INTEGER ) + - cor0.col0 - + cor0.col0 FROM tab0 AS cor0
----
-87
27
38

query I rowsort
SELECT - 96 + - 36 FROM tab0 AS cor0
----
-132
-132
-132

onlyif mysql # use DIV operator for integer division
query I rowsort label-8687
SELECT ( cor0.col2 ) DIV + ( + col1 ) + - col0 AS col1 FROM tab1 AS cor0
----
-1
-59
-73

skipif mysql # not compatible
query I rowsort label-8687
SELECT ( cor0.col2 ) / + ( + col1 ) + - col0 AS col1 FROM tab1 AS cor0
----
-1
-59
-73

query I rowsort
SELECT + 76 + + col0 AS col2 FROM tab2 AS cor0
----
154
155
83

query I rowsort
SELECT - - 40 + - cor0.col2 FROM tab1 AS cor0
----
-14
-17
-56

onlyif mysql # use DIV operator for integer division
query I rowsort label-8690
SELECT ALL 41 DIV - 39 AS col0 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8690
SELECT ALL 41 / - 39 AS col0 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT ALL + + 52 * + col0 * + 84 FROM tab2 AS cor0
----
30576
340704
345072

query I rowsort
SELECT ALL + - cor0.col0 + col2 FROM tab1 cor0
----
-7
16
51

query I rowsort
SELECT col2 * 78 FROM tab1 AS cor0
----
4212
4446
7488

query I rowsort
SELECT DISTINCT + + cor0.col2 * + 85 AS col1 FROM tab0 AS cor0
----
2805
6970
85

query I rowsort
SELECT DISTINCT + - ( + 56 ) FROM tab0 AS cor0
----
-56

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8696
SELECT DISTINCT + + CAST( NULL AS DECIMAL ) * col0 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8696
SELECT DISTINCT + + CAST ( NULL AS REAL ) * col0 FROM tab2 cor0
----
NULL

query I rowsort
SELECT DISTINCT + 34 + + cor0.col1 FROM tab0 AS cor0
----
120
125
131

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * col0 + - tab2.col0 col1 FROM tab2
----
-56
-6162
-6320

query I rowsort
SELECT DISTINCT - col2 + - col1 * - col2 AS col0 FROM tab1
----
1152
1350
513

query I rowsort
SELECT ALL col1 * - col2 + - col2 FROM tab0
----
-2871
-7544
-98

query I rowsort
SELECT DISTINCT col1 * 85 AS col2 FROM tab0 AS cor0
----
7310
7735
8245

query I rowsort
SELECT 86 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 2d8c3a0d19ea51447f83cd18b49fee19

query I rowsort
SELECT col1 * + 50 + tab0.col0 * - 71 AS col2 FROM tab0
----
-1769
2365
2596

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 74 col0 FROM tab1
----
-74
-74
-74

query I rowsort
SELECT DISTINCT 81 AS col1 FROM tab2, tab0 AS cor0
----
81

query I rowsort
SELECT ALL - - col2 + cor0.col0 * - col2 * 43 FROM tab0 cor0
----
-1504
-313732
-34023

query I rowsort
SELECT - ( + col0 ) + + col0 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8708
SELECT ALL 49 DIV - col0 - + col2 * - col1 col2 FROM tab1
----
1248
1388
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8708
SELECT ALL 49 / - col0 - + col2 * - col1 col2 FROM tab1
----
1248
1388
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8709
SELECT ALL + - col2 * CAST( ( + col2 ) AS SIGNED ) * CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8709
SELECT ALL + - col2 * CAST ( ( + col2 ) AS INTEGER ) * CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - col2 * - 4 AS col0 FROM tab0 AS cor0
----
132
328
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-8711
SELECT ALL - - cor0.col2 DIV 39 AS col1 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8711
SELECT ALL - - cor0.col2 / 39 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - col2 * - col0 * + col2 AS col0 FROM tab2
----
114076
5103
52728

query I rowsort
SELECT + 11 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 69116737f3f57e2e3273f6dbb04d036c

query I rowsort
SELECT 5 * col0 + col1 FROM tab1
----
330
41
413

query I rowsort
SELECT DISTINCT - ( col2 ) + + 44 * col2 FROM tab0
----
1419
3526
43

onlyif mysql # use DIV operator for integer division
query I rowsort label-8716
SELECT ALL ( col1 ) * 29 + col2 * col2 DIV 9 FROM tab0
----
2615
2813
3386

skipif mysql # not compatible
query I rowsort label-8716
SELECT ALL ( col1 ) * 29 + col2 * col2 / 9 FROM tab0
----
2615
2813
3386

query I rowsort
SELECT ALL ( col1 ) * tab2.col2 + + col2 * col2 FROM tab2
----
1566
2090
2210

query I rowsort
SELECT ALL col2 * + 11 + + 77 * col2 AS col0 FROM tab2 AS cor0
----
2288
2376
3344

query I rowsort
SELECT ALL col0 * + col1 - col0 * - col2 FROM tab2 AS cor0
----
406
4345
6630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + cor0.col2 col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT + + col0 + 37 AS col0 FROM tab0 AS cor0
----
126
61
72

query I rowsort
SELECT - col1 + - 71 * col1 FROM tab2 cor0
----
-1224
-2232
-4248

query I rowsort
SELECT DISTINCT + - col0 * + ( cor0.col1 ) AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-8724
SELECT DISTINCT + + col0 DIV cor0.col2 AS col2 FROM tab1 cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-8724
SELECT DISTINCT + + col0 / cor0.col2 AS col2 FROM tab1 cor0
----
0
1

query I rowsort
SELECT ALL cor0.col1 * - ( col2 ) FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT + + col2 + + 5 - ( col1 ) AS col1 FROM tab1 AS cor0
----
33
52
88

query I rowsort
SELECT + + col0 + + col1 * + col1 FROM tab2 AS cor0
----
3559
368
968

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * - 95 + col1 + + col2 col2 FROM tab2 AS cor0
----
-1560
-2887
-5520

onlyif mysql # use DIV operator for integer division
query I rowsort label-8729
SELECT - col2 + + col0 * - col0 DIV + col0 AS col2 FROM tab2 AS cor0
----
-104
-117
-34

skipif mysql # not compatible
query I rowsort label-8729
SELECT - col2 + + col0 * - col0 / + col0 AS col2 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT ALL + col1 + 73 FROM tab0 AS cor0
----
159
164
170

onlyif mysql # use DIV operator for integer division
query I rowsort label-8731
SELECT DISTINCT - col2 DIV col2 - + col1 AS col1 FROM tab1 cor0
----
-11
-14
-27

skipif mysql # not compatible
query I rowsort label-8731
SELECT DISTINCT - col2 / col2 - + col1 AS col1 FROM tab1 cor0
----
-11
-14
-27

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8732
SELECT col0 * + CAST( - col0 AS SIGNED ) FROM tab1
----
-4096
-6400
-9

skipif mysql # not compatible
query I rowsort label-8732
SELECT col0 * + CAST ( - col0 AS INTEGER ) FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT ALL col0 * 27 + - ( tab0.col2 ) + 67 FROM tab0
----
1011
2388
682

query I rowsort
SELECT DISTINCT 21 FROM tab0, tab1 cor0
----
21

query I rowsort
SELECT DISTINCT col0 * - 83 + col1 + tab0.col1 * ( 94 * col1 ) FROM tab0
----
693318
771118
881638

query I rowsort
SELECT DISTINCT col0 * + col0 AS col2 FROM tab1 cor0
----
4096
6400
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-8737
SELECT col1 * + 55 * col0 + + col2 * col1 + cor0.col0 DIV col1 AS col0 FROM tab1 AS cor0
----
35776
5694
58454

skipif mysql # not compatible
query I rowsort label-8737
SELECT col1 * + 55 * col0 + + col2 * col1 + cor0.col0 / col1 AS col0 FROM tab1 AS cor0
----
35776
5694
58454

query I rowsort
SELECT + - col0 + col1 * col0 + col0 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8739
SELECT ALL + col2 * + CAST( NULL AS SIGNED ) AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8739
SELECT ALL + col2 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8740
SELECT col2 + 71 DIV - cor0.col1 FROM tab1 AS cor0
----
50
52
91

skipif mysql # not compatible
query I rowsort label-8740
SELECT col2 + 71 / - cor0.col1 FROM tab1 AS cor0
----
50
52
91

query I rowsort
SELECT + + col2 * + 88 + cor0.col1 AS col0 FROM tab2 cor0
----
2347
2407
3361

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8742
SELECT DISTINCT - - CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8742
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT 38 * 46 FROM tab2 AS cor0
----
1748
1748
1748

query I rowsort
SELECT ALL 32 AS col0 FROM tab1 cor0
----
32
32
32

query I rowsort
SELECT ALL - - col2 * - col2 FROM tab0 cor0
----
-1
-1089
-6724

query I rowsort
SELECT - col0 * col2 * col2 FROM tab2 cor0
----
-114076
-5103
-52728

query I rowsort
SELECT + 27 * - col2 + - cor0.col2 FROM tab0 AS cor0
----
-2296
-28
-924

query I rowsort
SELECT 21 * - col0 * col2 AS col2 FROM tab0 AS cor0
----
-153258
-16632
-735

query I rowsort
SELECT - ( 28 ) * cor0.col2 AS col0 FROM tab1 AS cor0
----
-1512
-1596
-2688

query I rowsort
SELECT + ( - col0 ) * + col1 * - cor0.col2 + col1 * col0 AS col1 FROM tab0 AS cor0
----
672217
6790
70176

query I rowsort
SELECT ALL 67 * col2 + col1 FROM tab1 AS cor0
----
3644
3829
6445

query I rowsort
SELECT cor0.col2 * col0 * 86 FROM tab2 AS cor0
----
16254
174408
258172

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 * cor0.col2 + + col0 col2 FROM tab1 cor0
----
165
3712
7760

query I rowsort
SELECT ALL - 28 * - cor0.col2 AS col0 FROM tab1 AS cor0
----
1512
1596
2688

query I rowsort
SELECT ALL - + col1 + col2 * - ( + 33 ) FROM tab0 AS cor0
----
-1175
-130
-2797

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * col2 + - col0 col1 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT ALL + col2 * cor0.col0 AS col1 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + col2 * - col2 * + col2 + col0 AS col1 FROM tab1 cor0
----
-157461
-185129
-884656

query I rowsort
SELECT ALL - col0 * cor0.col1 + col1 AS col0 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT ALL col2 + + col1 * - 8 FROM tab1
----
-154
-23
-8

query I rowsort
SELECT + - 82 + + cor0.col2 AS col0 FROM tab1 AS cor0
----
-25
-28
14

onlyif mysql # use DIV operator for integer division
query I rowsort label-8762
SELECT + ( col0 ) DIV - col0 FROM tab0 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8762
SELECT + ( col0 ) / - col0 FROM tab0 cor0
----
-1
-1
-1

query I rowsort
SELECT + + 14 AS col0 FROM tab0 cor0
----
14
14
14

query I rowsort
SELECT + col0 + + 84 FROM tab0
----
108
119
173

query I rowsort
SELECT col0 + 92 FROM tab0 AS cor0
----
116
127
181

query I rowsort
SELECT + - col0 + 51 AS col1 FROM tab2 AS cor0
----
-27
-28
44

query I rowsort
SELECT DISTINCT - 64 + + col2 * - col0 AS col0 FROM tab0
----
-7362
-856
-99

query I rowsort
SELECT ALL + col0 * - col1 + tab2.col2 AS col2 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT - col0 + + 29 FROM tab1 AS cor0
----
-35
-51
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-8770
SELECT - col0 DIV - ( col2 ) + - tab0.col1 AS col1 FROM tab0
----
-62
-86
-90

skipif mysql # not compatible
query I rowsort label-8770
SELECT - col0 / - ( col2 ) + - tab0.col1 AS col1 FROM tab0
----
-62
-86
-90

query I rowsort
SELECT ALL - col0 + + cor0.col1 - + col2 AS col2 FROM tab2 AS cor0
----
-100
-3
-45

query I rowsort
SELECT + + col1 * col2 * + col1 AS col0 FROM tab0 AS cor0
----
244068
679042
9409

query I rowsort
SELECT + col2 - tab1.col1 * col2 AS col2 FROM tab1
----
-1152
-1350
-513

query I rowsort
SELECT 66 - 42 * col1 * ( - col1 ) AS col2 FROM tab2
----
12204
146268
40428

query I rowsort
SELECT ALL col1 * - col0 + + col2 FROM tab0
----
-2031
-3394
-8017

query I rowsort
SELECT - col0 + col1 * col1 * col0 FROM tab2
----
22752
271440
6720

query I rowsort
SELECT - col0 + - 10 * - col1 AS col0 FROM tab2 cor0
----
303
512
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 56 + col2 * - tab1.col2 col2 FROM tab1
----
-2860
-3193
-9160

query I rowsort
SELECT + col1 * - ( col1 ) AS col2 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT - + ( + 34 ) FROM tab2 AS cor0
----
-34
-34
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 89 * + col0 col0 FROM tab1 AS cor0
----
267
5696
7120

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 72 col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

onlyif mysql # use DIV operator for integer division
query I rowsort label-8783
SELECT 31 + col0 DIV + col2 FROM tab1 AS cor0
----
31
31
32

skipif mysql # not compatible
query I rowsort label-8783
SELECT 31 + col0 / + col2 FROM tab1 AS cor0
----
31
31
32

query I rowsort
SELECT DISTINCT - 60 * + 28 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
-1680

onlyif mysql # use DIV operator for integer division
query I rowsort label-8785
SELECT 29 DIV col1 FROM tab1
----
1
2
2

skipif mysql # not compatible
query I rowsort label-8785
SELECT 29 / col1 FROM tab1
----
1
2
2

query I rowsort
SELECT col1 * ( - col2 + - col0 ) FROM tab1
----
-1210
-1482
-2288

query I rowsort
SELECT - col0 * + col2 * cor0.col0 - + col1 AS col2 FROM tab1 AS cor0
----
-233482
-512
-614413

query I rowsort
SELECT - col2 + col2 + col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT - col0 * 74 AS col1 FROM tab1 AS cor0
----
-222
-4736
-5920

query I rowsort
SELECT + col1 - + 75 * + col0 * col2 FROM tab1 AS cor0
----
-12124
-273590
-575987

query I rowsort
SELECT DISTINCT + col1 * + col1 * - 63 + + 45 AS col2 FROM tab0 AS cor0
----
-465903
-521658
-592722

query I rowsort
SELECT cor0.col2 * - col2 + cor0.col0 FROM tab0 AS cor0
----
-1065
-6635
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8793
SELECT DISTINCT CAST( 38 AS SIGNED ) FROM tab0, tab1 AS cor0, tab0 AS cor1
----
38

skipif mysql # not compatible
query I rowsort label-8793
SELECT DISTINCT CAST ( 38 AS INTEGER ) FROM tab0, tab1 AS cor0, tab0 AS cor1
----
38

query I rowsort
SELECT + 92 + col2 * ( + col2 ) * + cor0.col1 FROM tab1 AS cor0
----
119900
32582
75908

query I rowsort
SELECT + 54 * col2 FROM tab1
----
2916
3078
5184

query I rowsort
SELECT col2 * - col1 + + cor0.col0 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT DISTINCT col1 - col0 * cor0.col2 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT - 58 * col1 - 44 AS col2 FROM tab0 AS cor0
----
-5032
-5322
-5670

query I rowsort
SELECT cor0.col1 + + col1 * + col0 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT DISTINCT col1 * + 21 + + col1 FROM tab2 AS cor0
----
1298
374
682

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8801
SELECT DISTINCT + col1 * col1 * + 45 + col1 * - ( col0 * col2 ) + + CAST( col1 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-38012
37052
37417

skipif mysql # not compatible
query I rowsort label-8801
SELECT DISTINCT + col1 * col1 * + 45 + col1 * - ( col0 * col2 ) + + CAST ( col1 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-38012
37052
37417

query I rowsort
SELECT DISTINCT + cor0.col1 + - col0 * col0 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT - 25 * col1 + + col0 FROM tab1
----
-186
-245
-647

query I rowsort
SELECT ( + col2 ) * col1 * - ( col2 ) + - 29 FROM tab0
----
-126
-611913
-93683

query I rowsort
SELECT DISTINCT + tab0.col0 * col2 + 59 FROM tab0
----
7357
851
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-8806
SELECT ALL col0 + + col2 DIV + ( col0 * col0 ) + + col1 FROM tab1
----
35
74
93

skipif mysql # not compatible
query I rowsort label-8806
SELECT ALL col0 + + col2 / + ( col0 * col0 ) + + col1 FROM tab1
----
35
74
93

query I rowsort
SELECT col0 * + tab1.col2 + + col1 AS col1 FROM tab1
----
188
3658
7693

query I rowsort
SELECT - col2 + col0 + 79 * + tab0.col0 FROM tab0
----
1887
2799
7038

query I rowsort
SELECT DISTINCT + col2 + - col1 * 88 FROM tab2
----
-1458
-2701
-5166

query I rowsort
SELECT DISTINCT col1 * + col1 + col2 FROM tab1
----
157
265
730

onlyif mysql # use DIV operator for integer division
query I rowsort label-8811
SELECT DISTINCT - col1 + - col0 * col1 DIV col1 AS col0 FROM tab1
----
-29
-74
-93

skipif mysql # not compatible
query I rowsort label-8811
SELECT DISTINCT - col1 + - col0 * col1 / col1 AS col0 FROM tab1
----
-29
-74
-93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8812
SELECT DISTINCT + CAST( 20 AS SIGNED ) * col1 * cor0.col0 FROM tab2 AS cor0
----
26860
4340
92040

skipif mysql # not compatible
query I rowsort label-8812
SELECT DISTINCT + CAST ( 20 AS INTEGER ) * col1 * cor0.col0 FROM tab2 AS cor0
----
26860
4340
92040

query I rowsort
SELECT - + col0 * + col1 - - col2 * + col0 * + col1 FROM tab1 cor0
----
35840
4134
98800

query I rowsort
SELECT ALL - ( cor0.col1 ) * col1 + - col0 FROM tab1 AS cor0
----
-164
-249
-679

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8815
SELECT DISTINCT + CAST( - cor0.col0 AS SIGNED ) + - col2 - col1 AS col2 FROM tab0 AS cor0
----
-133
-143
-262

skipif mysql # not compatible
query I rowsort label-8815
SELECT DISTINCT + CAST ( - cor0.col0 AS INTEGER ) + - col2 - col1 AS col2 FROM tab0 AS cor0
----
-133
-143
-262

query I rowsort
SELECT col1 * + 52 + col2 AS col1 FROM tab2 AS cor0
----
1639
3094
922

query I rowsort
SELECT ALL + 30 + col2 FROM tab2 AS cor0
----
56
57
68

onlyif mysql # use DIV operator for integer division
query I rowsort label-8818
SELECT ALL - col1 + + col2 DIV - col2 FROM tab1 AS cor0
----
-11
-14
-27

skipif mysql # not compatible
query I rowsort label-8818
SELECT ALL - col1 + + col2 / - col2 FROM tab1 AS cor0
----
-11
-14
-27

onlyif mysql # use DIV operator for integer division
query I rowsort label-8819
SELECT ( col1 ) + col2 * col0 DIV + col0 FROM tab1 AS cor0
----
109
67
80

skipif mysql # not compatible
query I rowsort label-8819
SELECT ( col1 ) + col2 * col0 / + col0 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL - col0 * - col2 + col0 FROM tab0 cor0
----
70
7387
816

query I rowsort
SELECT DISTINCT + 33 + + 12 FROM tab0 AS cor0
----
45

query I rowsort
SELECT - col1 - + 0 * col0 AS col0 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT col2 * col1 * 8 AS col1 FROM tab1
----
11232
4560
9984

query I rowsort
SELECT + 96 * col0 + + col0 FROM tab0
----
2328
3395
8633

query I rowsort
SELECT DISTINCT 45 + ( - col0 ) AS col2 FROM tab1
----
-19
-35
42

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8826
SELECT col1 - + ( col0 ) * CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8826
SELECT col1 - + ( col0 ) * CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - ( - col0 ) * - col1 * - 12 FROM tab2
----
16116
2604
55224

query I rowsort
SELECT DISTINCT - 23 + 70 * - col0 FROM tab1 cor0
----
-233
-4503
-5623

query I rowsort
SELECT ALL - 26 + col0 AS col0 FROM tab0 cor0
----
-2
63
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8830
SELECT + CAST( NULL AS DECIMAL ) * 69 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8830
SELECT + CAST ( NULL AS REAL ) * 69 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort
SELECT + ( col1 ) + - col1 * 10 - ( tab0.col1 ) * CAST ( col0 + + col0 AS REAL ) AS col0 FROM tab0
----
-17017
-4902
-7663

query I rowsort
SELECT - col2 + col1 * + 92 AS col1 FROM tab0 AS cor0
----
7879
8290
8923

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8833
SELECT + col2 * col2 * + CAST( NULL AS SIGNED ) - 85 * + col0 col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8833
SELECT + col2 * col2 * + CAST ( NULL AS INTEGER ) - 85 * + col0 col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( 95 ) * tab0.col0 col0 FROM tab0
----
2280
3325
8455

query I rowsort
SELECT col1 * + col1 * tab1.col1 + col1 FROM tab1
----
1010
17602
2210

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 80 * col0 * + 39 + 44 * - col0 + + col1 col2 FROM tab2 AS cor0
----
21563
239987
243021

query I rowsort
SELECT ALL - col0 * - cor0.col0 + + col2 + 13 AS col2 FROM tab1 AS cor0
----
4166
6509
76

query I rowsort
SELECT + + col1 + + col1 * - col2 AS col1 FROM tab1 AS cor0
----
-1235
-1378
-560

onlyif mysql # use DIV operator for integer division
query I rowsort label-8839
SELECT + col1 - + col2 DIV 61 FROM tab1 AS cor0
----
10
12
26

skipif mysql # not compatible
query I rowsort label-8839
SELECT + col1 - + col2 / 61 FROM tab1 AS cor0
----
10
12
26

query I rowsort
SELECT DISTINCT + col2 - - cor0.col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT - col2 * - cor0.col2 + col0 AS col0 FROM tab0 AS cor0
----
1113
36
6813

query I rowsort
SELECT col0 * 94 * + col0 FROM tab2 AS cor0
----
4606
571896
586654

query I rowsort
SELECT ALL - col1 + col2 + 5 FROM tab2 AS cor0
----
-28
1
26

query I rowsort
SELECT DISTINCT + col1 * - 98 AS col1 FROM tab1 cor0
----
-1274
-2548
-980

query I rowsort
SELECT ALL + col2 + 95 * + col1 AS col1 FROM tab1 AS cor0
----
1007
1331
2524

query I rowsort
SELECT + + col1 + - 10 * + cor0.col0 FROM tab2 cor0
----
-39
-721
-773

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + col1 * - col1 col2 FROM tab1 AS cor0
----
-36
-673
-89

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0, tab2 cor1, tab0, tab1 AS cor2
----
3645 values hashing to def82b52aa9c83b91991d7d043276abe

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 66 col0 FROM tab1 AS cor0
----
-66
-66
-66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8850
SELECT ALL - + CAST( + col1 AS SIGNED ) FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-8850
SELECT ALL - + CAST ( + col1 AS INTEGER ) FROM tab0 AS cor0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8851
SELECT + 40 DIV + 4 FROM tab2 AS cor0
----
10
10
10

skipif mysql # not compatible
query I rowsort label-8851
SELECT + 40 / + 4 FROM tab2 AS cor0
----
10
10
10

query I rowsort
SELECT col1 + + 85 * col1 AS col0 FROM tab1 AS cor0
----
1118
2236
860

query I rowsort
SELECT DISTINCT 42 + col2 FROM tab1 cor0
----
138
96
99

query I rowsort
SELECT 20 * + col2 * - col2 FROM tab1 AS cor0
----
-184320
-58320
-64980

query I rowsort
SELECT ( col1 ) + + col0 AS col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT 41 AS col2 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to f6a440b478f0d00f8326a8c51fe094b8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8857
SELECT + col2 * CAST( + col2 AS SIGNED ) + + col0 AS col1 FROM tab2 AS cor0
----
1523
736
754

skipif mysql # not compatible
query I rowsort label-8857
SELECT + col2 * CAST ( + col2 AS INTEGER ) + + col0 AS col1 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT DISTINCT + + col1 + + col1 * 25 AS col2 FROM tab2 AS cor0
----
1534
442
806

query I rowsort
SELECT ALL col0 * + cor0.col2 AS col1 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8860
SELECT ALL tab1.col2 * CAST( NULL AS SIGNED ) FROM tab1, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-8860
SELECT ALL tab1.col2 * CAST ( NULL AS INTEGER ) FROM tab1, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL 39 * + 48 FROM tab2, tab2 AS cor0
----
9 values hashing to 35658b677fad6dc88f95b662dff098da

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col0 + col2 * col2 col0 FROM tab0 AS cor0
----
14823
3153
3396

query I rowsort
SELECT + col0 + 76 FROM tab1 AS cor0
----
140
156
79

query I rowsort
SELECT ALL - cor0.col2 FROM tab1, tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

onlyif mysql # use DIV operator for integer division
query I rowsort label-8865
SELECT - + col1 DIV + col2 + col1 + col1 DIV col2 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-8865
SELECT - + col1 / + col2 + col1 + col1 / col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT 90 * cor0.col2 - + col0 * - col0 FROM tab1 AS cor0
----
15040
4869
9226

query I rowsort
SELECT ( col2 ) * col0 + 23 * - col1 - - col0 FROM tab2 AS cor0
----
-517
2690
749

query I rowsort
SELECT 95 + cor0.col2 + cor0.col1 AS col2 FROM tab1 AS cor0
----
162
175
204

query I rowsort
SELECT 78 * - col0 + - 10 - + col0 * col2 FROM tab0 cor0
----
-14250
-2674
-2775

query I rowsort
SELECT + ( + tab0.col2 ) + tab0.col2 AS col1 FROM tab0
----
164
2
66

query I rowsort
SELECT DISTINCT - cor1.col2 + - ( + 27 ) * cor1.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
-2132
-216
-2171

query I rowsort
SELECT 12 + - col1 AS col1 FROM tab1 AS cor0
----
-1
-14
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-8873
SELECT DISTINCT + - col2 DIV cor0.col2 AS col2 FROM tab0 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-8873
SELECT DISTINCT + - col2 / cor0.col2 AS col2 FROM tab0 AS cor0
----
-1

query I rowsort
SELECT DISTINCT - 27 + + col2 FROM tab1 AS cor0
----
27
30
69

query I rowsort
SELECT DISTINCT + col1 * col0 + col2 * col0 FROM tab0 AS cor0
----
15397
2856
3430

query I rowsort
SELECT ALL + - col1 * col0 AS col0 FROM tab1 cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-8877
SELECT ALL col1 * + cor0.col1 + cor0.col1 DIV col2 col1 FROM tab0 AS cor0
----
7398
8282
9506

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8877
SELECT ALL col1 * + cor0.col1 + cor0.col1 / col2 col1 FROM tab0 AS cor0
----
7398
8282
9506

query I rowsort
SELECT col0 * + col2 + cor0.col2 AS col0 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT DISTINCT + - 66 * + col2 + + col2 FROM tab1 AS cor0
----
-3510
-3705
-6240

query I rowsort
SELECT - + col0 + col2 * col1 FROM tab2 cor0
----
1456
567
830

query I rowsort
SELECT ALL - cor0.col1 * + cor0.col0 + - col0 * - col0 FROM tab1 AS cor0
----
-69
3456
5360

query I rowsort
SELECT ALL + col0 + cor0.col1 * + col2 FROM tab2 AS cor0
----
1612
725
844

onlyif mysql # use DIV operator for integer division
query I rowsort label-8883
SELECT ALL + + col0 * - col1 DIV cor0.col1 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-8883
SELECT ALL + + col0 * - col1 / cor0.col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT tab2.col0 * + col1 + - col0 + - col2 FROM tab2
----
1226
183
4498

query I rowsort
SELECT DISTINCT ( col0 ) - col1 FROM tab2
----
-24
19
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT ALL - 94 + col2 - col2 AS col1 FROM tab0 cor0
----
-94
-94
-94

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0, tab2 cor1, tab0 cor2
----
972 values hashing to 95de14c88adc44eda4adb5267fe9ebd1

query I rowsort
SELECT DISTINCT + cor0.col1 + col2 * col0 + cor0.col1 * - cor0.col1 * col0 AS col1 FROM tab0 AS cor0
----
-176626
-329183
-729620

query I rowsort
SELECT ALL + 85 + - col0 AS col1 FROM tab0 AS cor0
----
-4
50
61

query I rowsort
SELECT col2 * - ( col2 ) + col2 AS col1 FROM tab1
----
-2862
-3192
-9120

query I rowsort
SELECT - col1 - + col0 * + col2 FROM tab1
----
-188
-3658
-7693

query I rowsort
SELECT col1 * + ( - col2 ) * - col1 + - tab1.col1 FROM tab1
----
16211
36478
5690

onlyif mysql # use DIV operator for integer division
query I rowsort label-8894
SELECT col0 * col2 DIV + col0 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-8894
SELECT col0 * col2 / + col0 FROM tab0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-8895
SELECT - 66 DIV col0 AS col1 FROM tab0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-8895
SELECT - 66 / col0 AS col1 FROM tab0
----
-1
-2
0

query I rowsort
SELECT DISTINCT + col2 * col1 + + tab1.col0 * + tab1.col0 AS col0 FROM tab1
----
1413
4666
7648

query I rowsort
SELECT cor1.col1 AS col1 FROM tab2 cor0 CROSS JOIN tab2, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT - + col0 - - col2 AS col0 FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT - + cor0.col1 * + 52 * col0 FROM tab0 AS cor0
----
-107328
-176540
-421148

query I rowsort
SELECT col2 * ( - 12 ) * + col1 FROM tab0
----
-1164
-34056
-89544

query I rowsort
SELECT ALL - 8 AS col1 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 852581644118629bf652b1aa4b8f4363

onlyif mysql # use DIV operator for integer division
query I rowsort label-8902
SELECT DISTINCT - - col1 DIV cor0.col0 FROM tab2 cor0
----
0
4

skipif mysql # not compatible
query I rowsort label-8902
SELECT DISTINCT - - col1 / cor0.col0 FROM tab2 cor0
----
0
4

query I rowsort
SELECT - - ( col0 ) * + cor0.col2 + - ( col1 * col0 ) + - col1 AS col2 FROM tab1 AS cor0
----
2998
58
6627

query I rowsort
SELECT - col0 * + col0 * - col2 + - ( + col1 ) + + cor0.col0 AS col1 FROM tab0 AS cor0
----
1163
18946
649520

query I rowsort
SELECT DISTINCT + cor0.col2 + + col2 * col1 AS col1 FROM tab2 cor0
----
1560
684
864

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8906
SELECT + - CAST( + col2 AS SIGNED ) FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-8906
SELECT + - CAST ( + col2 AS INTEGER ) FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT ALL - ( + col1 ) * cor0.col0 + - 90 * 34 AS col0 FROM tab1 AS cor0
----
-3138
-3700
-4100

query I rowsort
SELECT DISTINCT + + col2 * 92 - col1 FROM tab2 AS cor0
----
2333
2453
3479

query I rowsort
SELECT 89 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 860d55eb6785972467218a9c3badb5ad

onlyif mysql # use DIV operator for integer division
query I rowsort label-8910
SELECT DISTINCT + col2 + - cor0.col1 DIV CAST( + 35 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-8910
SELECT DISTINCT + col2 + - cor0.col1 / CAST ( + 35 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT - col2 + col2 * + col2 FROM tab2 cor0
----
1406
650
702

query I rowsort
SELECT cor0.col1 * + col0 * col2 AS col2 FROM tab2 AS cor0
----
119652
51034
5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-8913
SELECT + 8 + + cor0.col0 DIV + 77 AS col2 FROM tab2 AS cor0
----
8
9
9

skipif mysql # not compatible
query I rowsort label-8913
SELECT + 8 + + cor0.col0 / + 77 AS col2 FROM tab2 AS cor0
----
8
9
9

query I rowsort
SELECT col2 * ( + col2 ) * + col0 AS col1 FROM tab2 cor0
----
114076
5103
52728

query I rowsort
SELECT DISTINCT - col2 + ( 93 ) FROM tab2 AS cor0
----
55
66
67

query I rowsort
SELECT ALL col1 * col1 * - cor0.col0 AS col0 FROM tab2 cor0
----
-22831
-271518
-6727

onlyif mysql # use DIV operator for integer division
query I rowsort label-8917
SELECT - - col2 DIV 18 AS col1 FROM tab0 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-8917
SELECT - - col2 / 18 AS col1 FROM tab0 AS cor0
----
0
1
4

query I rowsort
SELECT DISTINCT - + col0 * 63 FROM tab1 AS cor0
----
-189
-4032
-5040

onlyif mysql # use DIV operator for integer division
query I rowsort label-8919
SELECT col0 DIV - tab0.col0 + - ( - col0 ) FROM tab0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-8919
SELECT col0 / - tab0.col0 + - ( - col0 ) FROM tab0
----
23
34
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + tab1.col1 col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT tab0.col0 + + tab0.col2 FROM tab0, tab2, tab1 cor0
----
27 values hashing to 651bd87d0835272922fb073806a0b5a0

query I rowsort
SELECT + col2 + ( cor0.col2 ) AS col2 FROM tab1 cor0
----
108
114
192

query I rowsort
SELECT DISTINCT col0 * ( 48 ) FROM tab2 AS cor0
----
336
3744
3792

onlyif mysql # use DIV operator for integer division
query I rowsort label-8924
SELECT DISTINCT col2 + + cor0.col1 DIV col2 FROM tab0 cor0
----
35
83
98

skipif mysql # not compatible
query I rowsort label-8924
SELECT DISTINCT col2 + + cor0.col1 / col2 FROM tab0 cor0
----
35
83
98

query I rowsort
SELECT + - ( 37 ) + + cor0.col1 * + 68 AS col2 FROM tab2 AS cor0
----
1119
2071
3975

query I rowsort
SELECT col2 * col1 + + col0 AS col2 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT + 75 * col0 + - col2 FROM tab1 cor0
----
171
4743
5904

query I rowsort
SELECT + 14 * + col1 AS col0 FROM tab0 AS cor0
----
1204
1274
1358

query I rowsort
SELECT - - col1 + - col0 AS col0 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT col2 * col0 + - tab1.col1 AS col2 FROM tab1
----
136
3638
7667

query I rowsort
SELECT DISTINCT - col0 * col2 * + col0 AS col0 FROM tab2
----
-1323
-158184
-237158

query I rowsort
SELECT - 1 + - col1 + + col0 * - ( col1 ) FROM tab0
----
-2151
-3493
-8191

query I rowsort
SELECT 38 * + col1 + col0 FROM tab1
----
444
574
991

query I rowsort
SELECT col0 + ( - col1 ) AS col2 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT col2 * + col0 * + col1 AS col0 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT 5 AS col1 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 6797d40099023779b89feb627d94a3e7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 8 col0 FROM tab1 cor0
----
8
8
8

query I rowsort
SELECT DISTINCT + + col0 * col1 + - col2 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT + 2 * col1 + col2 FROM tab1 AS cor0
----
106
122
77

query I rowsort
SELECT DISTINCT - - 32 + col0 AS col2 FROM tab0 cor0
----
121
56
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-8941
SELECT DISTINCT + + ( - col2 ) + ( + 0 ) DIV + cor0.col0 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-8941
SELECT DISTINCT + + ( - col2 ) + ( + 0 ) / + cor0.col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ( col0 + + col2 ) FROM tab0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * + col1 col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT + col1 * cor0.col0 + - 39 AS col0 FROM tab0 AS cor0
----
2025
3356
8060

query I rowsort
SELECT - cor0.col1 + col0 + + col2 AS col0 FROM tab0 AS cor0
----
-29
-61
80

query I rowsort
SELECT DISTINCT 81 + - col1 * + col1 FROM tab1 AS cor0
----
-19
-595
-88

onlyif mysql # use DIV operator for integer division
query I rowsort label-8947
SELECT - col0 - - cor0.col0 DIV + col2 AS col2 FROM tab0 AS cor0
----
-24
-88
0

skipif mysql # not compatible
query I rowsort label-8947
SELECT - col0 - - cor0.col0 / + col2 AS col2 FROM tab0 AS cor0
----
-24
-88
0

query I rowsort
SELECT DISTINCT - col1 * col2 + col2 FROM tab1
----
-1152
-1350
-513

query I rowsort
SELECT ALL ( + col0 ) + - 58 + - 12 FROM tab2 cor0
----
-63
8
9

query I rowsort
SELECT - col0 * + col2 + ( + col2 ) AS col1 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT - cor0.col1 * - cor0.col0 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT - + col0 - col1 FROM tab1 cor0
----
-29
-74
-93

query I rowsort
SELECT - ( + col1 ) + col2 + + 14 * - col1 AS col2 FROM tab0
----
-1257
-1283
-1454

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8954
SELECT DISTINCT CAST( col1 * + col1 AS SIGNED ) AS col2 FROM tab2
----
289
3481
961

skipif mysql # not compatible
query I rowsort label-8954
SELECT DISTINCT CAST ( col1 * + col1 AS INTEGER ) AS col2 FROM tab2
----
289
3481
961

query I rowsort
SELECT ALL + 81 * + 67 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 79ff6b347d5d441d962896d1555bcbbb

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( tab2.col0 ) * - tab2.col0 col2 FROM tab2
----
49
6084
6241

query I rowsort
SELECT + ( - 76 ) AS col2 FROM tab0
----
-76
-76
-76

query I rowsort
SELECT - 67 * - col1 FROM tab1
----
1742
670
871

onlyif mysql # use DIV operator for integer division
query I rowsort label-8959
SELECT DISTINCT + cor0.col1 DIV - 1 + 33 AS col0 FROM tab0, tab0 AS cor0
----
-53
-58
-64

skipif mysql # not compatible
query I rowsort label-8959
SELECT DISTINCT + cor0.col1 / - 1 + 33 AS col0 FROM tab0, tab0 AS cor0
----
-53
-58
-64

query I rowsort
SELECT DISTINCT + 21 + col1 FROM tab1
----
31
34
47

query I rowsort
SELECT - col2 + col1 * - col0 AS col2 FROM tab2 cor0
----
-1381
-244
-4628

query I rowsort
SELECT 33 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

query I rowsort
SELECT col0 * + col2 * - cor0.col2 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT ( col1 ) * col1 - ( - cor0.col1 ) FROM tab2 AS cor0
----
306
3540
992

query I rowsort
SELECT - 52 * 49 * col0 FROM tab2
----
-17836
-198744
-201292

query I rowsort
SELECT DISTINCT 14 AS col1 FROM tab1, tab0 cor0
----
14

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8967
SELECT + - CAST( NULL AS SIGNED ) * 61 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8967
SELECT + - CAST ( NULL AS INTEGER ) * 61 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8968
SELECT - + col1 + - ( - col1 ) DIV + col0 col2 FROM tab2 AS cor0
----
-17
-27
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8968
SELECT - + col1 + - ( - col1 ) / + col0 col2 FROM tab2 AS cor0
----
-17
-27
-59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8969
SELECT ALL CAST( - 5 AS SIGNED ) + col1 * 91 AS col0 FROM tab1 cor0
----
1178
2361
905

skipif mysql # not compatible
query I rowsort label-8969
SELECT ALL CAST ( - 5 AS INTEGER ) + col1 * 91 AS col0 FROM tab1 cor0
----
1178
2361
905

query I rowsort
SELECT ALL + - cor0.col0 * - col1 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT - col1 + + col1 * - col1 AS col1 FROM tab2 AS cor0
----
-306
-3540
-992

query I rowsort
SELECT - col0 * col2 * - col1 - - cor0.col1 AS col0 FROM tab2 AS cor0
----
119711
51051
5890

query I rowsort
SELECT ALL - + col1 * col0 + col1 AS col2 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT DISTINCT 4 AS col2 FROM tab2, tab2 AS cor0 CROSS JOIN tab1, tab1 AS cor1
----
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-8975
SELECT - col1 * - col0 - 45 DIV ( cor0.col1 * col1 ) AS col2 FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-8975
SELECT - col1 * - col0 - 45 / ( cor0.col1 * col1 ) AS col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT + - col1 * + col1 + col0 FROM tab2 AS cor0
----
-210
-3403
-954

query I rowsort
SELECT - + 10 - - col1 AS col2 FROM tab0 AS cor0
----
76
81
87

query I rowsort
SELECT DISTINCT + 7 * + col0 + + 40 AS col2 FROM tab2 AS cor0
----
586
593
89

query I rowsort
SELECT - col1 + 34 * 83 FROM tab1
----
2796
2809
2812

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8980
SELECT - cor0.col1 + CAST( + col2 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
28
47
83

skipif mysql # not compatible
query I rowsort label-8980
SELECT - cor0.col1 + CAST ( + col2 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT DISTINCT 83 * col1 - col1 AS col1 FROM tab1 AS cor0
----
1066
2132
820

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8982
SELECT ALL CAST( col1 AS SIGNED ) * col2 + col0 FROM tab1 AS cor0
----
1328
1407
634

skipif mysql # not compatible
query I rowsort label-8982
SELECT ALL CAST ( col1 AS INTEGER ) * col2 + col0 FROM tab1 AS cor0
----
1328
1407
634

onlyif mysql # use DIV operator for integer division
query I rowsort label-8983
SELECT DISTINCT - 20 DIV ( col1 ) + - col1 AS col2 FROM tab0 cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-8983
SELECT DISTINCT - 20 / ( col1 ) + - col1 AS col2 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT 83 + + col1 AS col0 FROM tab2 AS cor0
----
100
114
142

query I rowsort
SELECT ALL - cor0.col2 + + 39 AS col0 FROM tab2 AS cor0
----
1
12
13

query I rowsort
SELECT ALL - + 4 * col1 + + col1 FROM tab1 AS cor0
----
-30
-39
-78

query I rowsort
SELECT DISTINCT - cor0.col2 * + 75 AS col0 FROM tab2 AS cor0
----
-1950
-2025
-2850

query I rowsort
SELECT + col0 * 37 + - col2 * col2 FROM tab0
----
-201
-3431
1294

query I rowsort
SELECT + 64 AS col2 FROM tab2, tab0 cor0
----
9 values hashing to 60ab040e931c5c85db7ba19364eacc8e

query I rowsort
SELECT col1 * - col2 * - col2 AS col0 FROM tab0 AS cor0 WHERE NOT NULL NOT BETWEEN NULL AND NULL
----

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT ( col1 ) NOT IN ( col2 )
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL <= ( col1 )
----

query I rowsort
SELECT ALL tab2.col0 * + tab2.col2 AS col1 FROM tab2
----
189
2028
3002

query I rowsort
SELECT ALL col2 * col0 * + col1 + col1 FROM tab1 AS cor0
----
36490
4238
99853

query I rowsort
SELECT ALL col2 * + col1 + col2 * col1 FROM tab0 cor0
----
14924
194
5676

query I rowsort
SELECT DISTINCT col0 - - col2 AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT col0 * + col2 + + col1 AS col2 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT + col2 + col2 * col2 AS col2 FROM tab2
----
1482
702
756

query I rowsort
SELECT DISTINCT + col1 + col0 + tab0.col2 FROM tab0
----
133
143
262

query I rowsort
SELECT DISTINCT tab0.col1 * col1 + col2 * col0 FROM tab0
----
15579
8188
9444

query I rowsort
SELECT DISTINCT tab0.col0 * col1 + col2 * col0 AS col2 FROM tab0
----
15397
2856
3430

onlyif mysql # use DIV operator for integer division
query I rowsort label-9002
SELECT DISTINCT col0 DIV - col2 + col1 + col2 FROM tab0
----
119
172
63

skipif mysql # not compatible
query I rowsort label-9002
SELECT DISTINCT col0 / - col2 + col1 + col2 FROM tab0
----
119
172
63

query I rowsort
SELECT + + col0 * + col1 * cor0.col1 AS col2 FROM tab2 cor0
----
22831
271518
6727

query I rowsort
SELECT + col0 + cor0.col2 * - col1 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT DISTINCT + col1 * - col0 * col1 FROM tab2 AS cor0
----
-22831
-271518
-6727

query I rowsort
SELECT + cor0.col1 + - col1 * - col2 AS col0 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT - + col0 * - col2 AS col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT - + cor0.col2 + col0 + - col2 AS col2 FROM tab1 cor0
----
-105
-112
-50

query I rowsort
SELECT - tab0.col2 + col0 * tab0.col1 - col0 FROM tab0 WHERE NOT ( NULL ) BETWEEN col2 AND ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-9010
SELECT col2 DIV + col0 + col1 FROM tab2 AS cor0
----
17
34
59

skipif mysql # not compatible
query I rowsort label-9010
SELECT col2 / + col0 + col1 FROM tab2 AS cor0
----
17
34
59

query I rowsort
SELECT - + col0 * cor0.col0 AS col2 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL tab1.col2 AS col0 FROM tab1, tab2, tab1 cor0
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + + tab0.col0 * + col2 * col1 col0 FROM tab0
----
3492
664209
68198

query I rowsort
SELECT DISTINCT + + cor0.col0 * cor0.col2 + col1 * col1 FROM tab2 AS cor0
----
1150
3291
5509

onlyif mysql # use DIV operator for integer division
query I rowsort label-9015
SELECT ALL - + col2 DIV - col0 - cor0.col0 * col0 AS col0 FROM tab2 AS cor0
----
-46
-6084
-6241

skipif mysql # not compatible
query I rowsort label-9015
SELECT ALL - + col2 / - col0 - cor0.col0 * col0 AS col0 FROM tab2 AS cor0
----
-46
-6084
-6241

query I rowsort
SELECT + col1 + - col0 * - cor0.col0 AS col2 FROM tab2 cor0
----
6143
6258
80

query I rowsort
SELECT DISTINCT - col0 + - col1 * + col2 AS col1 FROM tab0 cor0
----
-132
-2862
-7551

query I rowsort
SELECT DISTINCT - - cor0.col1 * col0 AS col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - - col2 + col1 + col0 AS col1 FROM tab0 cor0
----
133
143
262

query I rowsort
SELECT + - ( + col2 ) * - 27 + cor0.col1 AS col1 FROM tab2 cor0
----
1043
760
761

query I rowsort
SELECT ALL + 32 * col2 FROM tab0 AS cor0
----
1056
2624
32

onlyif mysql # use DIV operator for integer division
query I rowsort label-9022
SELECT + - col1 * col0 DIV + col2 AS col1 FROM tab1 AS cor0
----
-1
-10
-11

skipif mysql # not compatible
query I rowsort label-9022
SELECT + - col1 * col0 / + col2 AS col1 FROM tab1 AS cor0
----
-1
-10
-11

query I rowsort
SELECT + col1 + col0 * col1 FROM tab2
----
1360
248
4661

query I rowsort
SELECT DISTINCT + col1 * + col1 - - col2 * - col2 FROM tab1
----
-2240
-3149
-9047

onlyif mysql # use DIV operator for integer division
query I rowsort label-9025
SELECT DISTINCT col0 + - col0 DIV + col2 FROM tab0 WHERE NOT + col2 IN ( + col0 DIV - col1 + - col0 * col2 )
----
0
24
88

skipif mysql # not compatible
query I rowsort label-9025
SELECT DISTINCT col0 + - col0 / + col2 FROM tab0 WHERE NOT + col2 IN ( + col0 / - col1 + - col0 * col2 )
----
0
24
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-9026
SELECT DISTINCT col1 DIV col0 + + tab1.col1 FROM tab1
----
10
13
34

skipif mysql # not compatible
query I rowsort label-9026
SELECT DISTINCT col1 / col0 + + tab1.col1 FROM tab1
----
10
13
34

query I rowsort
SELECT + tab2.col1 - col2 * tab2.col1 FROM tab2
----
-1475
-629
-806

query I rowsort
SELECT DISTINCT + col1 * col0 - col2 * col1 FROM tab1
----
-1326
-208
70

query I rowsort
SELECT DISTINCT col1 AS col1 FROM tab0 WHERE NOT NULL <= - col1
----

query I rowsort
SELECT DISTINCT - col1 * col1 + col1 * tab1.col0 + col0 FROM tab1
----
-595
604
951

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col1 + tab0.col0 col2 FROM tab0
----
132
2862
7551

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT col0 + + col1 * + col2 IN ( + col2 + - col0 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT + tab0.col0 * + col2 * + col0 AS col1 FROM tab0
----
1225
19008
649522

onlyif mysql # use DIV operator for integer division
query I rowsort label-9034
SELECT ALL - col1 DIV + col2 + col2 + col2 AS col0 FROM tab1
----
108
114
192

skipif mysql # not compatible
query I rowsort label-9034
SELECT ALL - col1 / + col2 + col2 + col2 AS col0 FROM tab1
----
108
114
192

query III rowsort
SELECT * FROM tab2 WHERE + col0 - + col1 / + col0 IN ( col2 )
----

query I rowsort
SELECT DISTINCT - col1 - + col2 FROM tab0 WHERE NOT NULL <= ( col0 )
----

query I rowsort
SELECT + col0 + + col1 * col0 * col1 FROM tab2
----
22910
271596
6734

query I rowsort
SELECT col1 FROM tab1 WHERE NULL NOT IN ( col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-9039
SELECT ALL - col1 * - col1 + - col1 * col0 DIV col0 AS col0 FROM tab0
----
7310
8190
9312

skipif mysql # not compatible
query I rowsort label-9039
SELECT ALL - col1 * - col1 + - col1 * col0 / col0 AS col0 FROM tab0
----
7310
8190
9312

query I rowsort
SELECT DISTINCT col0 * col1 * + col2 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT + tab0.col1 - + col0 * + col2 FROM tab0
----
-706
-7207
62

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL <> col1
----

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT NULL IN ( - col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 col0 FROM tab0 WHERE NULL <= NULL
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE - col1 < NULL
----

query I rowsort
SELECT + tab0.col1 * + col0 + + tab0.col1 FROM tab0
----
2150
3492
8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-9047
SELECT + col1 - - tab0.col2 DIV + tab0.col2 AS col0 FROM tab0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-9047
SELECT + col1 - - tab0.col2 / + tab0.col2 AS col0 FROM tab0
----
87
92
98

query I rowsort
SELECT ALL - tab2.col0 - ( tab2.col0 ) FROM tab2
----
-14
-156
-158

query I rowsort
SELECT - col2 * col0 * + ( col1 ) AS col2 FROM tab0
----
-3395
-664118
-68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-9050
SELECT ALL + col1 DIV - ( + col1 * + col0 ) AS col1 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9050
SELECT ALL + col1 / - ( + col1 * + col0 ) AS col1 FROM tab2
----
0
0
0

query I rowsort
SELECT + col2 + col0 * col1 AS col1 FROM tab0 AS cor0
----
2097
3396
8181

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9052
SELECT DISTINCT col2 * - CAST( - col0 AS SIGNED ) FROM tab2 AS cor0
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-9052
SELECT DISTINCT col2 * - CAST ( - col0 AS INTEGER ) FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - cor0.col2 + + 45 * - col0 AS col0 FROM tab2 AS cor0
----
-342
-3536
-3593

query I rowsort
SELECT - col1 * 92 - + col2 AS col1 FROM tab0 cor0
----
-7945
-8454
-8925

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9055
SELECT ALL - ( + col0 ) * col0 * - CAST( - 37 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-21312
-293077
-45325

skipif mysql # not compatible
query I rowsort label-9055
SELECT ALL - ( + col0 ) * col0 * - CAST ( - 37 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-21312
-293077
-45325

onlyif mysql # use DIV operator for integer division
query I rowsort label-9056
SELECT DISTINCT + CAST( col1 AS SIGNED ) DIV col2 AS col1 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-9056
SELECT DISTINCT + CAST ( col1 AS INTEGER ) / col2 AS col1 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT - + cor0.col2 + - ( col0 ) + + col1 FROM tab2 AS cor0
----
-100
-3
-45

query I rowsort
SELECT - col1 + - col1 + - col2 FROM tab2 AS cor0
----
-144
-72
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9059
SELECT - col1 / CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9059
SELECT - col1 / CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9060
SELECT DISTINCT - col0 DIV col0 AS col2 FROM tab0
----
-1

skipif mysql # not compatible
query I rowsort label-9060
SELECT DISTINCT - col0 / col0 AS col2 FROM tab0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * + 37 col0 FROM tab1
----
370
481
962

onlyif mysql # use DIV operator for integer division
query I rowsort label-9062
SELECT - tab0.col2 DIV + 69 AS col0 FROM tab0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-9062
SELECT - tab0.col2 / + 69 AS col0 FROM tab0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * ( - col1 ) col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT - + cor0.col1 + + col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT ( 25 ) AS col0 FROM tab0
----
25

query I rowsort
SELECT DISTINCT + + col0 * - col0 * + 21 FROM tab1 AS cor0
----
-134400
-189
-86016

query I rowsort
SELECT DISTINCT col1 + col1 * 90 * col1 + col1 AS col0 FROM tab2 AS cor0
----
26044
313408
86552

query I rowsort
SELECT - 66 * 48 FROM tab2
----
-3168
-3168
-3168

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT col0 * CAST ( col0 AS REAL ) + col1 col2 FROM tab1 AS cor0
----
35
4106
6413

query I rowsort
SELECT ALL - 45 + col2 AS col0 FROM tab1
----
12
51
9

query I rowsort
SELECT ALL + cor0.col1 - col2 * - cor0.col0 AS col2 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT - + col2 + + cor0.col0 * ( + col1 + cor0.col2 ) FROM tab1 AS cor0
----
186
4231
8624

query I rowsort
SELECT DISTINCT + - col0 + 19 + + col1 AS col1 FROM tab1 AS cor0
----
-35
-48
42

query I rowsort
SELECT + ( - col2 + + 27 ) FROM tab0
----
-55
-6
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-9075
SELECT DISTINCT + tab1.col1 + - col1 DIV + col2 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-9075
SELECT DISTINCT + tab1.col1 + - col1 / + col2 FROM tab1
----
10
13
26

query I rowsort
SELECT 98 * col0 AS col0 FROM tab0
----
2352
3430
8722

query I rowsort
SELECT 37 * - cor0.col2 FROM tab0, tab1 AS cor0
----
9 values hashing to cdb0f9d0ea5da1d07affc20c839dce2a

query I rowsort
SELECT ALL - cor0.col0 + 28 FROM tab2 cor0
----
-50
-51
21

query I rowsort
SELECT DISTINCT - col2 + 90 * + ( + col2 * + 70 + - col0 ) AS col2 FROM tab2 AS cor0
----
156754
169443
232252

query I rowsort
SELECT DISTINCT + col2 + 9 FROM tab1 AS cor0
----
105
63
66

query I rowsort
SELECT DISTINCT + + col1 * - ( - 82 ) + col0 FROM tab2 AS cor0
----
1473
2549
4916

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * 99 col2 FROM tab1 AS cor0
----
297
6336
7920

query I rowsort
SELECT DISTINCT + cor0.col0 * + col0 + 63 + - col2 FROM tab2 AS cor0
----
6121
6266
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9084
SELECT ALL - col0 * + CAST( 16 AS SIGNED ) FROM tab0 cor0
----
-1424
-384
-560

skipif mysql # not compatible
query I rowsort label-9084
SELECT ALL - col0 * + CAST ( 16 AS INTEGER ) FROM tab0 cor0
----
-1424
-384
-560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9085
SELECT DISTINCT + col1 * - CAST( NULL AS DECIMAL ) AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9085
SELECT DISTINCT + col1 * - CAST ( NULL AS REAL ) AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + col0 - col2 * col1 FROM tab1
----
-1168
-1401
-506

query I rowsort
SELECT DISTINCT - col1 * 82 FROM tab2
----
-1394
-2542
-4838

query I rowsort
SELECT 39 * ( col2 ) FROM tab0 AS cor0
----
1287
3198
39

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9089
SELECT + - CAST( NULL AS SIGNED ) * col1 * + cor0.col0 + CAST( - col1 AS DECIMAL ) + col2 * - 20 * col2 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9089
SELECT + - CAST ( NULL AS INTEGER ) * col1 * + cor0.col0 + CAST ( - col1 AS REAL ) + col2 * - 20 * col2 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col0 * col1 + + col2 * cor0.col1 FROM tab0 AS cor0
----
15561
3492
4902

onlyif mysql # use DIV operator for integer division
query I rowsort label-9091
SELECT + ( + ( - tab1.col1 ) ) + CAST( + 97 * col2 AS SIGNED ) + + CAST( 16 AS SIGNED ) DIV col2 FROM tab1
----
5212
5519
9299

skipif mysql # not compatible
query I rowsort label-9091
SELECT + ( + ( - tab1.col1 ) ) + CAST ( + 97 * col2 AS INTEGER ) + + CAST ( 16 AS INTEGER ) / col2 FROM tab1
----
5212
5519
9299

query I rowsort
SELECT + 74 * cor0.col1 AS col1 FROM tab0 AS cor0
----
6364
6734
7178

query I rowsort
SELECT DISTINCT - + 17 * col0 FROM tab2 AS cor0
----
-119
-1326
-1343

onlyif mysql # use DIV operator for integer division
query I rowsort label-9094
SELECT ALL + cor0.col0 DIV + cor0.col2 AS col0 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-9094
SELECT ALL + cor0.col0 / + cor0.col2 AS col0 FROM tab0 AS cor0
----
0
1
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 6 + col1 col2 FROM tab0
----
103
92
97

query I rowsort
SELECT ALL col2 - + col2 * ( - cor0.col1 ) AS col1 FROM tab0 AS cor0
----
2871
7544
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 45 * - col2 col0 FROM tab0 AS cor0
----
-1485
-3690
-45

onlyif mysql # use DIV operator for integer division
query I rowsort label-9098
SELECT DISTINCT - + cor0.col0 + cor0.col2 DIV - ( + cor0.col0 * + cor0.col0 ) FROM tab1 AS cor0
----
-64
-80
-9

skipif mysql # not compatible
query I rowsort label-9098
SELECT DISTINCT - + cor0.col0 + cor0.col2 / - ( + cor0.col0 * + cor0.col0 ) FROM tab1 AS cor0
----
-64
-80
-9

query I rowsort
SELECT ALL - col2 + 93 + col0 AS col1 FROM tab0 AS cor0
----
100
127
84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9100
SELECT + CAST( + col0 AS SIGNED ) * + col0 + ( - col2 ) col0 FROM tab2 AS cor0
----
22
6058
6203

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9100
SELECT + CAST ( + col0 AS INTEGER ) * + col0 + ( - col2 ) col0 FROM tab2 AS cor0
----
22
6058
6203

query I rowsort
SELECT DISTINCT + col1 + - col2 + col1 FROM tab2 AS cor0
----
-4
35
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 86 + + 34 col1 FROM tab2 AS cor0
----
120
120
120

onlyif mysql # use DIV operator for integer division
query I rowsort label-9103
SELECT ALL - 39 + + col0 DIV col2 FROM tab0 AS cor0
----
-38
-39
-4

skipif mysql # not compatible
query I rowsort label-9103
SELECT ALL - 39 + + col0 / col2 FROM tab0 AS cor0
----
-38
-39
-4

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab2 AS cor2
----
3645 values hashing to 61a671f1b5048e339ad9838f68ebbba4

query I rowsort
SELECT DISTINCT - - 23 * - cor0.col2 + col2 + col0 * + col0 * - col2 FROM tab0 AS cor0
----
-1247
-19734
-651326

query I rowsort
SELECT - 45 * - col0 + + col2 FROM tab1 AS cor0
----
189
2937
3696

query I rowsort
SELECT - ( col2 ) * col1 AS col2 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT col1 * - 4 AS col2 FROM tab2 cor0
----
-124
-236
-68

query I rowsort
SELECT ALL + 62 * - col2 + - col2 * - ( + col1 ) AS col0 FROM tab0 AS cor0
----
2378
35
792

query I rowsort
SELECT - - 25 + - col2 + col2 FROM tab2 AS cor0
----
25
25
25

query I rowsort
SELECT - ( + cor0.col2 ) * + col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT - 62 + col1 * col0 FROM tab0 AS cor0
----
2002
3333
8037

query I rowsort
SELECT DISTINCT 50 AS col2 FROM tab0, tab2 AS cor0
----
50

query I rowsort
SELECT ( + col1 ) + + col0 AS col0 FROM tab1
----
29
74
93

query I rowsort
SELECT ALL - col1 - 48 AS col2 FROM tab2 AS cor0
----
-107
-65
-79

query I rowsort
SELECT col0 + + col1 * - cor0.col2 AS col1 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT + col2 - cor0.col2 AS col0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9118
SELECT DISTINCT + col1 DIV - col1 + + ( + col2 ) AS col2 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-9118
SELECT DISTINCT + col1 / - col1 + + ( + col2 ) AS col2 FROM tab0 AS cor0
----
0
32
81

query I rowsort
SELECT ALL - 8 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 47f43f23dcd23959d97d8e3b0aab692e

query I rowsort
SELECT + + col0 * 84 + - 52 FROM tab2 AS cor0
----
536
6500
6584

query I rowsort
SELECT 58 * col2 + col2 * - 40 * col2 AS col0 FROM tab2
----
-25532
-27594
-55556

query I rowsort
SELECT 33 FROM tab2, tab2 AS cor0, tab0 cor1
----
27 values hashing to 76da8bc7cae18ecf856438f872430c80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + 69 col2 FROM tab0
----
155
160
166

query I rowsort
SELECT - col0 * + tab1.col0 * - 13 FROM tab1
----
117
53248
83200

query I rowsort
SELECT col1 + 33 + col0 AS col1 FROM tab2
----
129
170
71

query I rowsort
SELECT DISTINCT col1 + + ( tab2.col0 ) AS col2 FROM tab2
----
137
38
96

query I rowsort
SELECT ALL + tab0.col0 AS col2 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT - cor0.col2 * + cor0.col1 + col1 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT DISTINCT - + col0 * - col2 + + col1 FROM tab0 cor0
----
132
7389
878

query I rowsort
SELECT + tab1.col2 * + 39 + - 31 * - col1 FROM tab1
----
2533
2912
4147

query I rowsort
SELECT DISTINCT col1 * - col0 * 43 FROM tab0
----
-145985
-348257
-88752

query I rowsort
SELECT ALL - col0 * - 20 + - 68 * col2 FROM tab1 AS cor0
----
-2596
-3612
-4928

query I rowsort
SELECT 23 AS col0 FROM tab1 cor0
----
23
23
23

query I rowsort
SELECT tab2.col1 + + ( tab2.col0 ) AS col1 FROM tab2, tab2 cor0
----
9 values hashing to 882fef197e3b41358c58e24f2db2f2e1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 10 col1 FROM tab0, tab0 cor0
----
9 values hashing to f68f33032846e21ee6b2c668fc10355e

onlyif mysql # use DIV operator for integer division
query I rowsort label-9136
SELECT ALL 4 DIV - tab1.col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-9136
SELECT ALL 4 / - tab1.col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT + - ( + col0 ) + - cor0.col1 FROM tab1 cor0
----
-29
-74
-93

query I rowsort
SELECT 62 + - cor0.col0 FROM tab1 cor0
----
-18
-2
59

query I rowsort
SELECT 30 AS col2 FROM tab2, tab1 cor0, tab0 AS cor1
----
27 values hashing to 6c98840ed134c765d56389f4150075f0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9140
SELECT DISTINCT 57 DIV col2 AS col1 FROM tab1
----
0
1

skipif mysql # not compatible
query I rowsort label-9140
SELECT DISTINCT 57 / col2 AS col1 FROM tab1
----
0
1

query I rowsort
SELECT DISTINCT col2 * col0 + + col2 FROM tab0 AS cor0
----
36
7380
825

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9142
SELECT ALL - col0 + + col2 * - CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9142
SELECT ALL - col0 + + col2 * - CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col0 * col1 * 75 + - col2 + col0 FROM tab0 cor0
----
154791
254659
607432

query I rowsort
SELECT - col2 - - 43 * - col1 AS col0 FROM tab0 cor0
----
-3731
-3995
-4172

query I rowsort
SELECT + col1 - - 38 FROM tab0 cor0
----
124
129
135

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9146
SELECT col1 * CAST( NULL AS SIGNED ) + col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9146
SELECT col1 * CAST ( NULL AS INTEGER ) + col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col0 + - 87 FROM tab0 cor0
----
-111
-122
-176

onlyif mysql # use DIV operator for integer division
query I rowsort label-9148
SELECT ALL - col2 DIV + col0 + - col0 FROM tab1
----
-21
-64
-81

skipif mysql # not compatible
query I rowsort label-9148
SELECT ALL - col2 / + col0 + - col0 FROM tab1
----
-21
-64
-81

query I rowsort
SELECT ALL - 20 + + col1 FROM tab2
----
-3
11
39

query I rowsort
SELECT + col0 * col1 + - col1 + + col0 FROM tab0 cor0
----
2002
3333
8097

query I rowsort
SELECT col2 - + 14 * - col1 AS col2 FROM tab0 AS cor0
----
1237
1356
1359

query I rowsort
SELECT - col0 + - ( + col2 ) AS col1 FROM tab1 AS cor0
----
-121
-176
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9153
SELECT ALL CAST( - 15 AS SIGNED ) FROM tab2
----
-15
-15
-15

skipif mysql # not compatible
query I rowsort label-9153
SELECT ALL CAST ( - 15 AS INTEGER ) FROM tab2
----
-15
-15
-15

query I rowsort
SELECT DISTINCT 73 * 56 AS col1 FROM tab1, tab2, tab2 AS cor0
----
4088

onlyif mysql # use DIV operator for integer division
query I rowsort label-9155
SELECT ALL - 41 DIV - 95 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9155
SELECT ALL - 41 / - 95 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 89 col0 FROM tab0 AS cor0
----
89
89
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9157
SELECT CAST( - cor0.col1 AS SIGNED ) FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-9157
SELECT CAST ( - cor0.col1 AS INTEGER ) FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT + col2 + - col1 * - 53 AS col1 FROM tab0 cor0
----
4591
4905
5142

onlyif mysql # use DIV operator for integer division
query I rowsort label-9159
SELECT DISTINCT - col2 DIV col0 - ( + col2 ) FROM tab0 AS cor0
----
-1
-34
-82

skipif mysql # not compatible
query I rowsort label-9159
SELECT DISTINCT - col2 / col0 - ( + col2 ) FROM tab0 AS cor0
----
-1
-34
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-9160
SELECT DISTINCT - - 74 - col0 DIV - ( + col1 ) AS col0 FROM tab2 AS cor0
----
74
75
78

skipif mysql # not compatible
query I rowsort label-9160
SELECT DISTINCT - - 74 - col0 / - ( + col1 ) AS col0 FROM tab2 AS cor0
----
74
75
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9161
SELECT + cor0.col1 + + CAST( 70 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
80
83
96

skipif mysql # not compatible
query I rowsort label-9161
SELECT + cor0.col1 + + CAST ( 70 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
80
83
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9162
SELECT + col2 * CAST( NULL AS SIGNED ) + - 56 * col1 / 45 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9162
SELECT + col2 * CAST ( NULL AS INTEGER ) + - 56 * col1 / 45 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9163
SELECT - + col2 DIV - ( + 41 ) FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9163
SELECT - + col2 / - ( + 41 ) FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL 78 + - col2 * + col0 FROM tab2
----
-111
-1950
-2924

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9165
SELECT ALL - CAST( 68 AS SIGNED ) FROM tab2 cor0
----
-68
-68
-68

skipif mysql # not compatible
query I rowsort label-9165
SELECT ALL - CAST ( 68 AS INTEGER ) FROM tab2 cor0
----
-68
-68
-68

query I rowsort
SELECT + 15 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

query I rowsort
SELECT - - 12 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to d4f5a8e032294c3b9342821617800972

query I rowsort
SELECT col0 * col2 * + col2 FROM tab2
----
114076
5103
52728

query I rowsort
SELECT - ( + col1 ) + col2 AS col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT ALL - - 18 * cor0.col0 + col0 AS col1 FROM tab0 cor0
----
1691
456
665

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9171
SELECT DISTINCT + - CAST( col2 AS SIGNED ) * col0 - + col2 AS col0 FROM tab1 AS cor0
----
-216
-3705
-7776

skipif mysql # not compatible
query I rowsort label-9171
SELECT DISTINCT + - CAST ( col2 AS INTEGER ) * col0 - + col2 AS col0 FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT ALL - - col2 * col1 - cor0.col1 * - col2 FROM tab0 AS cor0
----
14924
194
5676

query I rowsort
SELECT DISTINCT + - col1 * + col1 * - col2 FROM tab0 AS cor0
----
244068
679042
9409

query I rowsort
SELECT DISTINCT - 94 * + ( col2 ) + col2 AS col0 FROM tab2 AS cor0
----
-2418
-2511
-3534

query I rowsort
SELECT DISTINCT + 86 * ( col1 ) FROM tab2 AS cor0
----
1462
2666
5074

query I rowsort
SELECT + col2 + - 57 * col2 + + 27 * + col1 FROM tab1 AS cor0
----
-2322
-2922
-5025

query I rowsort
SELECT DISTINCT + - 80 * cor0.col0 + - cor0.col1 AS col2 FROM tab2 cor0
----
-591
-6299
-6337

query I rowsort
SELECT ALL + col0 + - 18 AS col1 FROM tab0 cor0
----
17
6
71

query I rowsort
SELECT + 16 + + 49 AS col1 FROM tab0 AS cor0
----
65
65
65

query I rowsort
SELECT ALL col2 * - col1 + col0 AS col1 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT 29 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 1e7120ba8e9191084172ddced17e5eb2

query I rowsort
SELECT DISTINCT tab0.col1 * tab0.col0 - col0 AS col0 FROM tab0
----
2040
3360
8010

query I rowsort
SELECT DISTINCT col0 + + 82 + col0 AS col1 FROM tab0 AS cor0
----
130
152
260

query I rowsort
SELECT DISTINCT + - ( col1 ) * col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - + col0 * col2 + col0 * ( cor0.col2 ) * col1 AS col0 FROM tab1 AS cor0
----
32832
4050
92160

query I rowsort
SELECT ALL - cor0.col2 + - 33 AS col2 FROM tab2 AS cor0
----
-59
-60
-71

onlyif mysql # use DIV operator for integer division
query I rowsort label-9187
SELECT - + col0 + + 83 DIV + col0 col1 FROM tab1 AS cor0
----
-63
-79
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9187
SELECT - + col0 + + 83 / + col0 col1 FROM tab1 AS cor0
----
-63
-79
24

query I rowsort
SELECT ALL 78 + tab1.col2 * tab1.col0 FROM tab1
----
240
3726
7758

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col0 * col0 - col2 col0 FROM tab2
----
316
474526
493001

query I rowsort
SELECT ALL - - col2 + col0 + + 97 FROM tab1 AS cor0
----
154
218
273

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9191
SELECT CAST( + col2 AS SIGNED ) + col1 FROM tab2
----
55
58
85

skipif mysql # not compatible
query I rowsort label-9191
SELECT CAST ( + col2 AS INTEGER ) + col1 FROM tab2
----
55
58
85

query I rowsort
SELECT DISTINCT col0 * + cor0.col2 - col1 AS col1 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT ALL + cor0.col2 - + ( + col1 ) AS col0 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT - col0 - 25 FROM tab2 cor0
----
-103
-104
-32

query I rowsort
SELECT - 69 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 3bd7460efa48c66c072ad5f3c2def7e9

query I rowsort
SELECT DISTINCT + col0 + ( + 67 ) AS col2 FROM tab0 AS cor0
----
102
156
91

query I rowsort
SELECT col2 * - col2 * 99 + + col2 - + col2 FROM tab0
----
-107811
-665676
-99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9198
SELECT ALL col0 + + CAST( - col1 AS SIGNED ) AS col1 FROM tab1
----
-23
54
67

skipif mysql # not compatible
query I rowsort label-9198
SELECT ALL col0 + + CAST ( - col1 AS INTEGER ) AS col1 FROM tab1
----
-23
54
67

query I rowsort
SELECT ALL - tab1.col1 * + 69 * ( col2 ) + - tab1.col0 AS col1 FROM tab1
----
-39394
-86192
-96879

query I rowsort
SELECT ALL col0 + - ( col1 ) FROM tab2
----
-24
19
62

query I rowsort
SELECT ALL tab1.col1 + - 15 AS col0 FROM tab1
----
-2
-5
11

query I rowsort
SELECT + col1 + 28 AS col0 FROM tab1 cor0
----
38
41
54

query I rowsort
SELECT DISTINCT + + col0 * + col1 + 11 AS col1 FROM tab0 cor0
----
2075
3406
8110

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + col0 * + col0 col1 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT ALL cor0.col0 - + cor0.col1 AS col2 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT - - col0 * - 54 + + col0 AS col0 FROM tab1 AS cor0
----
-159
-3392
-4240

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + + cor0.col2 col0 FROM tab2 AS cor0
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + col0 * ( - col2 ) col0 FROM tab2 cor0
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT 35 AS col2 FROM tab1 cor0
----
35

query I rowsort
SELECT cor0.col1 + col1 * - col0 * - ( cor0.col2 ) + - 8 FROM tab2 AS cor0
----
119703
51043
5882

query I rowsort
SELECT 55 * - col0 + + col0 * col0 - + col0 FROM tab0 AS cor0
----
-735
-768
2937

query I rowsort
SELECT DISTINCT + - cor0.col2 * - col0 * ( col1 + + col1 ) FROM tab2 AS cor0
----
102068
11718
239304

onlyif mysql # use DIV operator for integer division
query I rowsort label-9213
SELECT - 78 + - col1 DIV - col2 FROM tab0 AS cor0
----
-76
-77
19

skipif mysql # not compatible
query I rowsort label-9213
SELECT - 78 + - col1 / - col2 FROM tab0 AS cor0
----
-76
-77
19

query I rowsort
SELECT + 46 * - col1 + + col2 + + ( col1 ) * col2 AS col1 FROM tab2 cor0
----
-1154
-562
-98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9215
SELECT DISTINCT - col0 + - col2 + CAST( NULL AS SIGNED ) AS col0 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9215
SELECT DISTINCT - col0 + - col2 + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 cor0
----
NULL

query I rowsort
SELECT ALL 61 + + col1 AS col2 FROM tab1 AS cor0
----
71
74
87

query I rowsort
SELECT col2 + col1 * col1 * + col0 FROM tab0 AS cor0
----
177537
329316
737091

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9218
SELECT ALL + - col2 * col1 * CAST( col1 * col0 AS SIGNED ) FROM tab0 AS cor0
----
-329315
-5857632
-60434738

skipif mysql # not compatible
query I rowsort label-9218
SELECT ALL + - col2 * col1 * CAST ( col1 * col0 AS INTEGER ) FROM tab0 AS cor0
----
-329315
-5857632
-60434738

query I rowsort
SELECT DISTINCT - col1 * col2 + + ( col2 ) FROM tab0 cor0
----
-2805
-7380
-96

query I rowsort
SELECT 91 AS col1 FROM tab0, tab2 cor0, tab0 cor1
----
27 values hashing to deebbcfb9c7803a34dca6bd860849afe

onlyif mysql # use DIV operator for integer division
query I rowsort label-9221
SELECT - col2 DIV 28 AS col0 FROM tab1 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-9221
SELECT - col2 / 28 AS col0 FROM tab1 AS cor0
----
-1
-2
-3

query I rowsort
SELECT + + col0 * 91 + + cor0.col0 * - col0 AS col1 FROM tab2 AS cor0
----
1014
588
948

query I rowsort
SELECT DISTINCT 56 * 66 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
3696

query I rowsort
SELECT - 61 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 51f53697966a79d306a4570537cd91a1

query I rowsort
SELECT + - cor0.col1 + - ( + cor0.col0 ) * - col0 * + 58 AS col2 FROM tab2 AS cor0
----
2811
352813
361961

query I rowsort
SELECT - col0 + cor0.col1 * 77 FROM tab0 AS cor0
----
6598
6918
7434

query I rowsort
SELECT DISTINCT - 94 + - tab2.col1 FROM tab2
----
-111
-125
-153

onlyif mysql # use DIV operator for integer division
query I rowsort label-9228
SELECT + 57 * - col1 + - col0 * 79 DIV 94 FROM tab1 AS cor0
----
-1484
-623
-808

skipif mysql # not compatible
query I rowsort label-9228
SELECT + 57 * - col1 + - col0 * 79 / 94 FROM tab1 AS cor0
----
-1484
-623
-808

query I rowsort
SELECT ALL 13 + - col0 FROM tab1 AS cor0
----
-51
-67
10

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9230
SELECT ALL + - col0 * - 48 + - col0 + CAST( + col0 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
336
3744
3792

skipif mysql # not compatible
query I rowsort label-9230
SELECT ALL + - col0 * - 48 + - col0 + CAST ( + col0 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
336
3744
3792

query I rowsort
SELECT ALL - 38 + 75 AS col2 FROM tab1 AS cor0
----
37
37
37

query I rowsort
SELECT DISTINCT - col1 + + col1 AS col1 FROM tab2 cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9233
SELECT 88 + col1 DIV + col2 col0 FROM tab1 AS cor0
----
88
88
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9233
SELECT 88 + col1 / + col2 col0 FROM tab1 AS cor0
----
88
88
88

query I rowsort
SELECT + - cor0.col0 + col0 * + cor0.col1 AS col0 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT + + ( col0 ) * col2 - - col1 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT DISTINCT + - col2 * - 14 AS col1 FROM tab0 AS cor0
----
1148
14
462

query I rowsort
SELECT ALL + col0 + - col0 + col2 FROM tab1 AS cor0
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + + col0 * col1 + + col0 col0 FROM tab1 AS cor0
----
1216
135
761

query I rowsort
SELECT DISTINCT ( col0 ) * cor0.col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL + 91 + col2 AS col0 FROM tab1 AS cor0
----
145
148
187

onlyif mysql # use DIV operator for integer division
query I rowsort label-9241
SELECT DISTINCT + col0 DIV + 31 + - col2 AS col1 FROM tab2 cor0
----
-24
-27
-36

skipif mysql # not compatible
query I rowsort label-9241
SELECT DISTINCT + col0 / + 31 + - col2 AS col1 FROM tab2 cor0
----
-24
-27
-36

query I rowsort
SELECT ALL 29 - + 29 AS col2 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL col2 - + tab2.col2 * - col1 AS col1 FROM tab2
----
1560
684
864

query I rowsort
SELECT - cor0.col1 + - col0 * 54 AS col1 FROM tab2 AS cor0
----
-409
-4271
-4283

onlyif mysql # use DIV operator for integer division
query I rowsort label-9245
SELECT 96 + - col1 + + tab1.col2 DIV + ( - tab1.col2 * col2 ) AS col2 FROM tab1
----
70
83
86

skipif mysql # not compatible
query I rowsort label-9245
SELECT 96 + - col1 + + tab1.col2 / + ( - tab1.col2 * col2 ) AS col2 FROM tab1
----
70
83
86

query I rowsort
SELECT col1 * tab2.col0 * col2 FROM tab2
----
119652
51034
5859

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9247
SELECT ALL - CAST( NULL AS SIGNED ) + + tab2.col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9247
SELECT ALL - CAST ( NULL AS INTEGER ) + + tab2.col2 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9248
SELECT ALL CAST( NULL AS SIGNED ) + 14 + + col2 col0 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9248
SELECT ALL CAST ( NULL AS INTEGER ) + 14 + + col2 col0 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9249
SELECT - + 56 + cor0.col1 * CAST( + col1 * col0 + + 5 * col0 AS SIGNED ) FROM tab1 AS cor0
----
18664
2362
9544

skipif mysql # not compatible
query I rowsort label-9249
SELECT - + 56 + cor0.col1 * CAST ( + col1 * col0 + + 5 * col0 AS INTEGER ) FROM tab1 AS cor0
----
18664
2362
9544

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 44 * + col1 col0 FROM tab0
----
-3784
-4004
-4268

query I rowsort
SELECT - + cor0.col1 FROM tab1, tab2, tab0 cor0
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT 51 * tab2.col1 AS col1 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 1ac7182efd7a6e02fdf3d993df916f55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 20 col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

query I rowsort
SELECT DISTINCT + cor1.col0 FROM tab1, tab0 AS cor0, tab2 cor1
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 49 col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 01b1fa22fee872a7ba64f90d6046ffae

query I rowsort
SELECT + col2 * col0 * col2 FROM tab0 AS cor0
----
26136
35
598436

query I rowsort
SELECT - 18 AS col2 FROM tab2, tab2 cor0
----
9 values hashing to 09afafec657a5e9f082beb6a16ec85de

query I rowsort
SELECT ALL + col1 * + ( - 25 ) FROM tab1
----
-250
-325
-650

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9259
SELECT ALL ( ( col0 ) ) * CAST( col1 AS SIGNED ) col2 FROM tab0 AS cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9259
SELECT ALL ( ( col0 ) ) * CAST ( col1 AS INTEGER ) col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT col1 * + col1 * col1 FROM tab1 AS cor0
----
1000
17576
2197

query I rowsort
SELECT ( + col0 ) + + col1 * cor0.col1 AS col2 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT - - ( - col0 ) * + col0 AS col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT 46 * - cor0.col1 AS col1 FROM tab0 AS cor0
----
-3956
-4186
-4462

query I rowsort
SELECT DISTINCT - ( - col2 ) * col1 + - col2 + + 49 FROM tab2 AS cor0
----
1557
657
859

query I rowsort
SELECT ALL + col1 + cor0.col0 * col1 * 6 AS col2 FROM tab2 AS cor0
----
1333
27671
8075

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9266
SELECT DISTINCT + - CAST( - col0 AS SIGNED ) + - col0 col2 FROM tab0 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9266
SELECT DISTINCT + - CAST ( - col0 AS INTEGER ) + - col0 col2 FROM tab0 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9267
SELECT ALL CAST( ( - col1 ) AS SIGNED ) FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-9267
SELECT ALL CAST ( ( - col1 ) AS INTEGER ) FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT + col0 + 71 * - tab0.col0 AS col1 FROM tab0
----
-1680
-2450
-6230

query I rowsort
SELECT ALL - 48 AS col1 FROM tab0
----
-48
-48
-48

query I rowsort
SELECT - col1 * + col2 + - col0 * + col1 FROM tab2
----
-1054
-1989
-6136

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * cor0.col0 + col2 + + col2 * - col1 col0 FROM tab1 AS cor0
----
-112
-1272
127

query I rowsort
SELECT ALL cor0.col1 * + cor0.col1 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 9708a433b981d9b5fd095bfe2ea45aea

query I rowsort
SELECT DISTINCT ( + col1 ) * col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT DISTINCT cor1.col1 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
10
13
26

query I rowsort
SELECT + 35 * - col0 AS col2 FROM tab1
----
-105
-2240
-2800

query I rowsort
SELECT 10 AS col0 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 0fe3e45a9ecd49584c2ab442100d5176

onlyif mysql # use DIV operator for integer division
query I rowsort label-9277
SELECT - 9 DIV - col1 AS col1 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9277
SELECT - 9 / - col1 AS col1 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col2 * ( 83 ) col1 FROM tab0
----
558092
83
90387

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9279
SELECT - cor0.col0 + + col1 * - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9279
SELECT - cor0.col0 + + col1 * - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - tab0.col1 AS col0 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT col0 * col1 + - col1 * + col0 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9282
SELECT col2 DIV col1 - col1 * - col1 FROM tab2 AS cor0
----
291
3481
961

skipif mysql # not compatible
query I rowsort label-9282
SELECT col2 / col1 - col1 * - col1 FROM tab2 AS cor0
----
291
3481
961

query I rowsort
SELECT - + col1 * - 79 + col1 * col2 AS col1 FROM tab0 AS cor0
----
14651
7760
9632

query I rowsort
SELECT - col1 * 53 + + col1 FROM tab2 AS cor0
----
-1612
-3068
-884

query I rowsort
SELECT cor0.col0 + - 70 AS col2 FROM tab1 cor0
----
-6
-67
10

query I rowsort
SELECT DISTINCT + col1 + + col1 + col2 * - col0 FROM tab0 AS cor0
----
-620
-7116
159

query I rowsort
SELECT ALL col0 * + cor0.col2 - col0 AS col2 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT ALL + col1 * 34 + col1 FROM tab1 AS cor0
----
350
455
910

query I rowsort
SELECT + col0 + + 44 FROM tab2 AS cor0
----
122
123
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-9290
SELECT DISTINCT - col0 * - col2 DIV col2 + col0 col2 FROM tab1 AS cor0
----
128
160
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9290
SELECT DISTINCT - col0 * - col2 / col2 + col0 col2 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT tab2.col2 * col2 * - tab2.col1 + + col2 FROM tab2
----
-22572
-24510
-39858

onlyif mysql # use DIV operator for integer division
query I rowsort label-9292
SELECT ALL col0 * col1 * col1 + + col2 + 69 DIV - 13 FROM tab0
----
177532
329311
737086

skipif mysql # not compatible
query I rowsort label-9292
SELECT ALL col0 * col1 * col1 + + col2 + 69 / - 13 FROM tab0
----
177532
329311
737086

query I rowsort
SELECT + col1 * + 6 + + col2 * col1 + col1 FROM tab2
----
1054
1947
765

onlyif mysql # use DIV operator for integer division
query I rowsort label-9294
SELECT col0 DIV + 61 FROM tab1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-9294
SELECT col0 / + 61 FROM tab1
----
0
1
1

query I rowsort
SELECT ALL + col1 * - ( col2 ) + col0 * col2 + 4 FROM tab1
----
-1238
3082
6436

query I rowsort
SELECT + + cor0.col1 * col0 - + cor0.col0 * cor0.col2 FROM tab1 cor0
----
-3008
-6640
-84

query I rowsort
SELECT + col0 - 19 AS col2 FROM tab0 AS cor0
----
16
5
70

query I rowsort
SELECT - col2 + col1 * + col0 + col1 * 10 AS col2 FROM tab1 cor0
----
1074
284
683

query I rowsort
SELECT col2 + 36 + 85 FROM tab0 AS cor0
----
122
154
203

query I rowsort
SELECT - - col1 + - 46 + + col1 FROM tab1 AS cor0
----
-20
-26
6

query I rowsort
SELECT DISTINCT - + col2 * ( cor0.col2 ) FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT + - ( - col1 ) + + col2 * 5 AS col0 FROM tab1 AS cor0
----
295
296
493

query I rowsort
SELECT ALL - + ( 52 ) AS col2 FROM tab1 AS cor0
----
-52
-52
-52

query I rowsort
SELECT col0 * - cor0.col0 + col1 + ( col2 ) FROM tab1 AS cor0
----
-4029
-6291
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col2 + - col1 * col1 + + col0 * col2 col1 FROM tab0 AS cor0
----
-1065
-6637
-9375

query I rowsort
SELECT DISTINCT - ( col2 ) * col0 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9307
SELECT DISTINCT + + CAST( 26 AS SIGNED ) * col0 FROM tab1 AS cor0
----
1664
2080
78

skipif mysql # not compatible
query I rowsort label-9307
SELECT DISTINCT + + CAST ( 26 AS INTEGER ) * col0 FROM tab1 AS cor0
----
1664
2080
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9308
SELECT CAST( NULL AS SIGNED ) / + ( - col0 * col2 ) + + 80 / cor0.col1 AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9308
SELECT CAST ( NULL AS INTEGER ) / + ( - col0 * col2 ) + + 80 / cor0.col1 AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9309
SELECT ALL + + col1 + col1 DIV col0 FROM tab2 AS cor0
----
17
35
59

skipif mysql # not compatible
query I rowsort label-9309
SELECT ALL + + col1 + col1 / col0 FROM tab2 AS cor0
----
17
35
59

query I rowsort
SELECT ALL col1 * 70 AS col2 FROM tab0 AS cor0
----
6020
6370
6790

query I rowsort
SELECT DISTINCT + ( - col2 ) + cor0.col1 * 27 AS col1 FROM tab2 AS cor0
----
1567
421
810

query I rowsort
SELECT ALL - ( + 83 ) FROM tab0 AS cor0
----
-83
-83
-83

query I rowsort
SELECT cor0.col2 * col1 + col0 + col2 * + col0 AS col2 FROM tab1 AS cor0
----
1569
4282
9008

query I rowsort
SELECT ALL + 25 + + cor0.col2 AS col0 FROM tab0 AS cor0
----
107
26
58

query I rowsort
SELECT + - 68 + col0 FROM tab1 AS cor0
----
-4
-65
12

query I rowsort
SELECT ALL - col0 * cor0.col1 + col1 * col2 AS col0 FROM tab2 AS cor0
----
-3068
-697
620

query I rowsort
SELECT ALL - col2 + - cor0.col2 * - col2 * col2 AS col2 FROM tab1 AS cor0
----
157410
185136
884640

query I rowsort
SELECT DISTINCT - col0 + - col1 * col0 AS col1 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT DISTINCT - 89 * col1 * col1 FROM tab2 AS cor0
----
-25721
-309809
-85529

query I rowsort
SELECT + - ( col2 ) + col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + col2 * - col0 * + col1 FROM tab0 AS cor0
----
-3395
-664118
-68112

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 81 * - col0 col2 FROM tab1 AS cor0
----
-243
-5184
-6480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col2 col0 FROM tab1, tab1 AS cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-9324
SELECT col1 DIV tab0.col0 + - col1 AS col1 FROM tab0
----
-83
-90
-95

skipif mysql # not compatible
query I rowsort label-9324
SELECT col1 / tab0.col0 + - col1 AS col1 FROM tab0
----
-83
-90
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-9325
SELECT - col0 - col1 DIV col1 FROM tab2 AS cor0
----
-79
-8
-80

skipif mysql # not compatible
query I rowsort label-9325
SELECT - col0 - col1 / col1 FROM tab2 AS cor0
----
-79
-8
-80

query I rowsort
SELECT ALL + col1 * - col0 + - col0 FROM tab2
----
-1422
-224
-4680

query I rowsort
SELECT - col1 + - col1 * + col0 FROM tab0
----
-2150
-3492
-8190

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE ( + col0 + - col1 ) > NULL
----

query III rowsort
SELECT * FROM tab0 WHERE ( - col0 ) IN ( + tab0.col1 * col0 + col2 * + col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-9330
SELECT ALL - - col1 * col0 - + col2 DIV cor0.col0 FROM tab1 cor0
----
1039
60
640

skipif mysql # not compatible
query I rowsort label-9330
SELECT ALL - - col1 * col0 - + col2 / cor0.col0 FROM tab1 cor0
----
1039
60
640

query I rowsort
SELECT + col1 - cor0.col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9332
SELECT ALL - - col0 + - cor0.col1 DIV col1 AS col1 FROM tab2 AS cor0
----
6
77
78

skipif mysql # not compatible
query I rowsort label-9332
SELECT ALL - - col0 + - cor0.col1 / col1 AS col1 FROM tab2 AS cor0
----
6
77
78

query I rowsort
SELECT - + col1 + + cor0.col2 * col2 FROM tab1 AS cor0
----
2890
3239
9203

query I rowsort
SELECT ALL - - col0 + cor0.col0 * col1 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT ( + col2 ) * - col2 + col1 FROM tab0
----
-1003
-6633
96

query I rowsort
SELECT ALL - - 11 * col1 + + col2 * + col1 * col0 FROM tab0 AS cor0
----
4462
665119
69058

onlyif mysql # use DIV operator for integer division
query I rowsort label-9337
SELECT ALL col2 - - cor0.col0 * col2 DIV col0 FROM tab2 AS cor0
----
52
54
76

skipif mysql # not compatible
query I rowsort label-9337
SELECT ALL col2 - - cor0.col0 * col2 / col0 FROM tab2 AS cor0
----
52
54
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-9338
SELECT ALL col1 DIV - col2 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9338
SELECT ALL col1 / - col2 FROM tab1 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 86 * col0 col2 FROM tab0 AS cor0
----
2064
3010
7654

query I rowsort
SELECT ALL + col2 * col1 * col0 FROM tab1 AS cor0
----
36480
4212
99840

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT ( col0 ) = + col1 * col2 + col2 AND col0 / col1 NOT IN ( + col2 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT DISTINCT + col2 * - col1 + col2 * col2 AS col2 FROM tab2 AS cor0
----
-108
-858
798

query I rowsort
SELECT DISTINCT + col2 + - col0 * col1 AS col2 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT ALL col0 + - tab2.col1 * + tab2.col1 FROM tab2
----
-210
-3403
-954

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - col0 col2 FROM tab1
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-9346
SELECT col0 + col1 DIV tab1.col1 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-9346
SELECT col0 + col1 / tab1.col1 FROM tab1
----
4
65
81

query I rowsort
SELECT DISTINCT - col0 - + col1 AS col0 FROM tab2
----
-137
-38
-96

query III rowsort
SELECT * FROM tab2 WHERE NULL < - col1
----

query I rowsort
SELECT + tab1.col0 - + tab1.col0 * - col2 AS col2 FROM tab1
----
165
3712
7760

query I rowsort
SELECT + + 98 * col0 AS col1 FROM tab0 cor0
----
2352
3430
8722

query I rowsort
SELECT 21 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 312c166f4dc412730c43555105b1f44b

query I rowsort
SELECT DISTINCT - + ( - 4 ) AS col0 FROM tab2, tab0 AS cor0
----
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col0 * col2 + + col2 * - col2 * col0 col2 FROM tab0
----
-25344
-591138
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 col1 FROM tab0 AS cor0 WHERE NOT ( col1 ) > NULL
----

query III rowsort
SELECT * FROM tab2 cor0 WHERE ( col0 + + col0 ) IN ( cor0.col1 * col1 )
----

query I rowsort
SELECT col2 * - col2 + - col0 FROM tab2 AS cor0
----
-1523
-736
-754

query I rowsort
SELECT DISTINCT tab2.col2 - col1 * col2 AS col1 FROM tab2 WHERE NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT col0 * - col0 + col0 AS col1 FROM tab2
----
-42
-6006
-6162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 - col0 col1 FROM tab1
----
-128
-160
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-9360
SELECT - col2 + col2 DIV tab0.col1 FROM tab0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-9360
SELECT - col2 + col2 / tab0.col1 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT + col1 + col0 * col2 * + col2 FROM tab2
----
114093
5134
52787

query I rowsort
SELECT col0 AS col1 FROM tab1 WHERE NULL BETWEEN - col2 * + col1 AND col0 / col1
----

query I rowsort
SELECT + tab2.col2 / col0 AS col1 FROM tab2 WHERE NOT NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL - col1 + - col1 FROM tab2 WHERE NOT col1 = ( NULL )
----

query I rowsort
SELECT + col0 * - col2 + col0 AS col1 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT DISTINCT - - col1 + - col0 - col0 FROM tab1 AS cor0
----
-118
-147
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-9367
SELECT - + col1 DIV cor0.col0 + + 57 FROM tab1 AS cor0
----
49
57
57

skipif mysql # not compatible
query I rowsort label-9367
SELECT - + col1 / cor0.col0 + + 57 FROM tab1 AS cor0
----
49
57
57

query I rowsort
SELECT + + 61 + cor0.col1 FROM tab2 AS cor0
----
120
78
92

query I rowsort
SELECT - - 80 * col0 + col2 FROM tab1 AS cor0
----
294
5177
6496

query I rowsort
SELECT ALL - + cor0.col0 + col0 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT cor0.col2 * + 78 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to c486465fb1e5009840785baabf9312f3

query I rowsort
SELECT - cor0.col1 + + ( + col1 + col1 ) AS col2 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT DISTINCT - col1 * + 22 * - 12 + + col2 FROM tab0 AS cor0
----
22737
24106
25609

query I rowsort
SELECT DISTINCT + tab2.col2 + - col0 AS col0 FROM tab2
----
-41
-52
20

query I rowsort
SELECT ALL - col1 * col0 + col1 + 13 FROM tab2
----
-1313
-173
-4530

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9376
SELECT DISTINCT cor0.col0 + CAST( 41 AS SIGNED ) FROM tab2, tab1 AS cor0
----
105
121
44

skipif mysql # not compatible
query I rowsort label-9376
SELECT DISTINCT cor0.col0 + CAST ( 41 AS INTEGER ) FROM tab2, tab1 AS cor0
----
105
121
44

query I rowsort
SELECT - ( + 46 ) FROM tab1 cor0
----
-46
-46
-46

onlyif mysql # use DIV operator for integer division
query I rowsort label-9378
SELECT ALL - ( cor0.col0 ) * + cor0.col1 - CAST( - col2 AS SIGNED ) DIV - col0 AS col0 FROM tab1 AS cor0
----
-1041
-640
-96

skipif mysql # not compatible
query I rowsort label-9378
SELECT ALL - ( cor0.col0 ) * + cor0.col1 - CAST ( - col2 AS INTEGER ) / - col0 AS col0 FROM tab1 AS cor0
----
-1041
-640
-96

query I rowsort
SELECT DISTINCT 40 + + 9 FROM tab1 AS cor0
----
49

onlyif mysql # use DIV operator for integer division
query I rowsort label-9380
SELECT DISTINCT - 87 + + col1 DIV - col0 FROM tab1 AS cor0
----
-87
-95

skipif mysql # not compatible
query I rowsort label-9380
SELECT DISTINCT - 87 + + col1 / - col0 FROM tab1 AS cor0
----
-87
-95

query I rowsort
SELECT 32 FROM tab0, tab2, tab0 AS cor0, tab1
----
81 values hashing to 6bef041528d0147be26f7de162c66a5f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor1.col2 col0 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT - - col2 * + 81 FROM tab2 AS cor0
----
2106
2187
3078

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 13 col0 FROM tab1 AS cor0
----
13
13
13

query I rowsort
SELECT - - 15 * + ( col1 ) FROM tab1 AS cor0
----
150
195
390

query I rowsort
SELECT col0 * - 29 - col1 AS col2 FROM tab1
----
-113
-1866
-2333

query I rowsort
SELECT DISTINCT + 53 * ( col1 ) FROM tab2
----
1643
3127
901

query I rowsort
SELECT ALL 14 FROM tab0, tab2, tab0 cor0
----
27 values hashing to 409c1790b702540dd9dc067c1965b7c0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9389
SELECT DISTINCT + CAST( col1 AS SIGNED ) * col0 AS col0 FROM tab0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-9389
SELECT DISTINCT + CAST ( col1 AS INTEGER ) * col0 AS col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT ALL cor0.col1 + 15 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to fd3fee578828a482d5cd14e7a5c91f44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 66 col2 FROM tab1 AS cor0
----
-66
-66
-66

query I rowsort
SELECT + col0 * col1 + + col2 AS col2 FROM tab1
----
1136
132
697

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - col0 col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT ALL + 34 + - col2 * 14 FROM tab1 AS cor0
----
-1310
-722
-764

query I rowsort
SELECT ALL + - 71 + col0 FROM tab0 AS cor0
----
-36
-47
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-9396
SELECT DISTINCT + cor0.col2 * - col0 DIV col0 AS col2 FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-9396
SELECT DISTINCT + cor0.col2 * - col0 / col0 AS col2 FROM tab2 AS cor0
----
-26
-27
-38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9397
SELECT col1 * tab1.col2 * + CAST( - col0 * col1 AS SIGNED ) FROM tab1
----
-109512
-1297920
-364800

skipif mysql # not compatible
query I rowsort label-9397
SELECT col1 * tab1.col2 * + CAST ( - col0 * col1 AS INTEGER ) FROM tab1
----
-109512
-1297920
-364800

onlyif mysql # use DIV operator for integer division
query I rowsort label-9398
SELECT ALL + 80 DIV + col2 + + ( 3 + col0 ) * 56 DIV col2 AS col2 FROM tab1 AS cor0
----
48
66
7

skipif mysql # not compatible
query I rowsort label-9398
SELECT ALL + 80 / + col2 + + ( 3 + col0 ) * 56 / col2 AS col2 FROM tab1 AS cor0
----
48
66
7

query I rowsort
SELECT ALL 43 + col0 - 72 FROM tab1 AS cor0
----
-26
35
51

query I rowsort
SELECT DISTINCT + col2 * - col1 * 44 + - col0 * + col0 FROM tab2 AS cor0
----
-34665
-36877
-73580

onlyif mysql # use DIV operator for integer division
query I rowsort label-9401
SELECT DISTINCT - col2 * + col1 * - col0 + + col2 DIV + col1 FROM tab1 AS cor0
----
36485
4214
99847

skipif mysql # not compatible
query I rowsort label-9401
SELECT DISTINCT - col2 * + col1 * - col0 + + col2 / + col1 FROM tab1 AS cor0
----
36485
4214
99847

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9402
SELECT ALL + col0 + - CAST( NULL AS SIGNED ) + - col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9402
SELECT ALL + col0 + - CAST ( NULL AS INTEGER ) + - col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 37 FROM tab1, tab0 cor0, tab0 AS cor1
----
27 values hashing to c023509f63faa044d654943e6df55ca2

query I rowsort
SELECT DISTINCT col2 + ( + cor0.col0 ) AS col1 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT + + cor0.col1 + + col1 * cor0.col2 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT col1 * + ( 50 ) FROM tab0 AS cor0
----
4300
4550
4850

query I rowsort
SELECT - 32 + 52 AS col2 FROM tab0 AS cor0
----
20
20
20

query I rowsort
SELECT DISTINCT 18 * - 53 FROM tab0 AS cor0
----
-954

query I rowsort
SELECT ALL + ( col2 ) + col2 AS col1 FROM tab1 cor0
----
108
114
192

onlyif mysql # use DIV operator for integer division
query I rowsort label-9410
SELECT DISTINCT 31 DIV + cor0.col2 FROM tab0, tab0 AS cor0
----
0
31

skipif mysql # not compatible
query I rowsort label-9410
SELECT DISTINCT 31 / + cor0.col2 FROM tab0, tab0 AS cor0
----
0
31

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9411
SELECT ALL + + CAST( NULL AS SIGNED ) * - 87 + col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9411
SELECT ALL + + CAST ( NULL AS INTEGER ) * - 87 + col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 57 col0 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 220a93709e207779b34ef74b544764a5

query I rowsort
SELECT ( + col0 ) * - col0 * ( col1 ) AS col2 FROM tab0 AS cor0
----
-118825
-49536
-720811

query I rowsort
SELECT ALL + + col1 * 97 FROM tab1 AS cor0
----
1261
2522
970

query I rowsort
SELECT + col1 * cor0.col0 + - 75 FROM tab1 cor0
----
3
565
965

query I rowsort
SELECT ( - 47 * - tab2.col1 ) AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to e399126198235fa024fe78e007c31991

onlyif mysql # use DIV operator for integer division
query I rowsort label-9417
SELECT - + col0 * col2 DIV col2 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-9417
SELECT - + col0 * col2 / col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT - cor0.col1 + + 62 AS col0 FROM tab0 AS cor0
----
-24
-29
-35

onlyif mysql # use DIV operator for integer division
query I rowsort label-9419
SELECT DISTINCT - cor0.col0 DIV ( 37 * col1 ) FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-9419
SELECT DISTINCT - cor0.col0 / ( 37 * col1 ) FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT ( col0 * - col2 ) + + col0 AS col0 FROM tab2
----
-182
-1950
-2923

query I rowsort
SELECT ALL - ( col1 ) + + col0 AS col1 FROM tab1
----
-23
54
67

query I rowsort
SELECT ( - 72 ) + col1 FROM tab1
----
-46
-59
-62

query I rowsort
SELECT DISTINCT col0 + - ( - col0 * 69 ) AS col1 FROM tab1 AS cor0
----
210
4480
5600

query I rowsort
SELECT 38 AS col0 FROM tab0 cor0
----
38
38
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9425
SELECT ALL - CAST( NULL AS SIGNED ) + - col2 col0 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9425
SELECT ALL - CAST ( NULL AS INTEGER ) + - col2 col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - 39 + col0 * - CAST ( - col1 AS REAL ) FROM tab1 cor0
----
1001
39
601

query I rowsort
SELECT DISTINCT + cor0.col2 - cor0.col0 * - 13 AS col2 FROM tab2 AS cor0
----
1040
1065
118

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 83 col0 FROM tab2
----
83
83
83

query I rowsort
SELECT 20 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 0a35fe98f3e7d5fc8ff2ae815bd20ef4

query I rowsort
SELECT DISTINCT + - 97 + + col0 AS col1 FROM tab2 AS cor0
----
-18
-19
-90

query I rowsort
SELECT + 7 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 3362c0cb2b2c663037159d0699d46b76

query I rowsort
SELECT - - col1 + - col2 * + cor0.col1 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT + + ( - col0 ) * + ( + col1 ) + + col2 * - 69 FROM tab1 AS cor0
----
-3804
-4573
-7664

query I rowsort
SELECT 50 * col0 AS col2 FROM tab0
----
1200
1750
4450

query I rowsort
SELECT - col1 + col1 * 56 FROM tab0 AS cor0
----
4730
5005
5335

query I rowsort
SELECT ALL col2 * col2 + - cor0.col2 * col1 + + col0 * + col1 FROM tab0 AS cor0
----
315
3299
7361

query I rowsort
SELECT - - col1 * col2 AS col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT ALL 94 FROM tab2, tab1 AS cor0, tab1 cor1
----
27 values hashing to a4d239626cf0546ac1b2f57bb8407089

query I rowsort
SELECT ALL + 90 * cor0.col0 + + col1 FROM tab0 AS cor0
----
2246
3247
8101

query I rowsort
SELECT 36 * cor0.col0 FROM tab0, tab1 cor0
----
9 values hashing to 0013a6afc9c9bacc26baffa5f4cf3c64

onlyif mysql # use DIV operator for integer division
query I rowsort label-9441
SELECT - col0 DIV col1 - + col1 * col1 AS col2 FROM tab2 AS cor0
----
-293
-3482
-961

skipif mysql # not compatible
query I rowsort label-9441
SELECT - col0 / col1 - + col1 * col1 AS col2 FROM tab2 AS cor0
----
-293
-3482
-961

query I rowsort
SELECT + col2 * 75 FROM tab2
----
1950
2025
2850

query I rowsort
SELECT col1 * 19 FROM tab0
----
1634
1729
1843

query I rowsort
SELECT + col1 + col2 - col1 * - col1 FROM tab2 AS cor0
----
1019
344
3566

onlyif mysql # use DIV operator for integer division
query I rowsort label-9445
SELECT - - 42 * col1 + col1 DIV 7 - col0 FROM tab2 AS cor0
----
1299
2408
637

skipif mysql # not compatible
query I rowsort label-9445
SELECT - - 42 * col1 + col1 / 7 - col0 FROM tab2 AS cor0
----
1299
2408
637

query I rowsort
SELECT - ( - col0 ) + + col0 * 85 FROM tab0 AS cor0
----
2064
3010
7654

onlyif mysql # use DIV operator for integer division
query I rowsort label-9447
SELECT + 91 - col0 DIV - cor0.col1 FROM tab0 AS cor0
----
91
91
91

skipif mysql # not compatible
query I rowsort label-9447
SELECT + 91 - col0 / - cor0.col1 FROM tab0 AS cor0
----
91
91
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-9448
SELECT cor0.col2 * col2 DIV col0 FROM tab0 cor0
----
0
45
75

skipif mysql # not compatible
query I rowsort label-9448
SELECT cor0.col2 * col2 / col0 FROM tab0 cor0
----
0
45
75

query I rowsort
SELECT + - 97 * col1 FROM tab0 AS cor0
----
-8342
-8827
-9409

query I rowsort
SELECT col0 * ( + col2 * - col0 ) FROM tab2
----
-1323
-158184
-237158

query I rowsort
SELECT DISTINCT ( - col2 ) * - col1 FROM tab0
----
2838
7462
97

query I rowsort
SELECT 72 * + 59 AS col2 FROM tab2
----
4248
4248
4248

onlyif mysql # use DIV operator for integer division
query I rowsort label-9453
SELECT DISTINCT ( - 19 ) DIV tab2.col0 AS col1 FROM tab2
----
-2
0

skipif mysql # not compatible
query I rowsort label-9453
SELECT DISTINCT ( - 19 ) / tab2.col0 AS col1 FROM tab2
----
-2
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9454
SELECT col0 * CAST( col2 AS SIGNED ) * col0 + + tab1.col0 FROM tab1
----
233536
489
614480

skipif mysql # not compatible
query I rowsort label-9454
SELECT col0 * CAST ( col2 AS INTEGER ) * col0 + + tab1.col0 FROM tab1
----
233536
489
614480

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9455
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col1 FROM tab0, tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9455
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col1 FROM tab0, tab0 cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9456
SELECT DISTINCT + col2 DIV ( col0 ) FROM tab2 AS cor0
----
0
3

skipif mysql # not compatible
query I rowsort label-9456
SELECT DISTINCT + col2 / ( col0 ) FROM tab2 AS cor0
----
0
3

query I rowsort
SELECT + - col0 * cor0.col2 * + cor0.col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT ALL + col1 * ( 73 ) FROM tab1 AS cor0
----
1898
730
949

query I rowsort
SELECT col2 + col1 * tab1.col0 FROM tab1
----
1136
132
697

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9460
SELECT cor0.col0 / - CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9460
SELECT cor0.col0 / - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9461
SELECT DISTINCT + + 5 DIV col0 + - cor0.col1 AS col1 FROM tab1 cor0
----
-10
-13
-25

skipif mysql # not compatible
query I rowsort label-9461
SELECT DISTINCT + + 5 / col0 + - cor0.col1 AS col1 FROM tab1 cor0
----
-10
-13
-25

query I rowsort
SELECT DISTINCT + 98 * 5 FROM tab1, tab1 AS cor0, tab1 AS cor1, tab0 AS cor2
----
490

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-9464
SELECT CAST( col0 AS SIGNED ) - col1 FROM tab1 AS cor0
----
-23
54
67

skipif mysql # not compatible
query I rowsort label-9464
SELECT CAST ( col0 AS INTEGER ) - col1 FROM tab1 AS cor0
----
-23
54
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + 82 * col0 col1 FROM tab2 cor0
----
567
6318
6399

onlyif mysql # use DIV operator for integer division
query I rowsort label-9466
SELECT + col2 - - 91 DIV - col0 AS col2 FROM tab2 AS cor0
----
14
25
37

skipif mysql # not compatible
query I rowsort label-9466
SELECT + col2 - - 91 / - col0 AS col2 FROM tab2 AS cor0
----
14
25
37

query I rowsort
SELECT ALL - col0 - - ( + col0 ) AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - col0 * + ( col0 ) * + ( ( col0 ) * ( + col2 ) ) FROM tab2 AS cor0
----
-12338352
-18735482
-9261

query I rowsort
SELECT - col0 + - cor0.col0 * col1 * - col2 AS col1 FROM tab0 AS cor0
----
3360
664029
68088

query I rowsort
SELECT - 52 - - col2 FROM tab0
----
-19
-51
30

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9471
SELECT ( - col1 ) + CAST( + col2 AS SIGNED ) * + col0 FROM tab1
----
136
3638
7667

skipif mysql # not compatible
query I rowsort label-9471
SELECT ( - col1 ) + CAST ( + col2 AS INTEGER ) * + col0 FROM tab1
----
136
3638
7667

query I rowsort
SELECT ALL + 28 FROM tab0, tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
81 values hashing to 423726553d33e100432ebde49ddd31b5

query I rowsort
SELECT ALL + col1 * ( - col1 ) AS col0 FROM tab1 cor0
----
-100
-169
-676

query I rowsort
SELECT + - col0 * ( + col1 ) AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + col2 * ( - cor0.col1 ) AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-9476
SELECT DISTINCT + col1 + + col0 DIV 79 AS col0 FROM tab1 cor0
----
10
14
26

skipif mysql # not compatible
query I rowsort label-9476
SELECT DISTINCT + col1 + + col0 / 79 AS col0 FROM tab1 cor0
----
10
14
26

query I rowsort
SELECT cor0.col1 * + 26 * 1 AS col2 FROM tab1 AS cor0
----
260
338
676

query I rowsort
SELECT ALL col2 * col2 * 10 FROM tab1
----
29160
32490
92160

onlyif mysql # use DIV operator for integer division
query I rowsort label-9479
SELECT ALL ( + col1 ) DIV - 40 AS col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9479
SELECT ALL ( + col1 ) / - 40 AS col2 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL cor0.col0 * 48 FROM tab2 AS cor0
----
336
3744
3792

onlyif mysql # use DIV operator for integer division
query I rowsort label-9481
SELECT DISTINCT - col2 DIV 6 AS col0 FROM tab0 AS cor0
----
-13
-5
0

skipif mysql # not compatible
query I rowsort label-9481
SELECT DISTINCT - col2 / 6 AS col0 FROM tab0 AS cor0
----
-13
-5
0

query I rowsort
SELECT ALL - - col2 * 25 FROM tab1 AS cor0
----
1350
1425
2400

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9483
SELECT ALL + col2 * col0 + CAST( NULL AS SIGNED ) * + col0 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9483
SELECT ALL + col2 * col0 + CAST ( NULL AS INTEGER ) * + col0 AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT 49 + + 84 * col2 FROM tab1 AS cor0
----
4585
4837
8113

query IIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2, tab0 cor0 WHERE NULL >= NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 - 3 col2 FROM tab1
----
10
23
7

query I rowsort
SELECT + col1 + 3 AS col0 FROM tab2
----
20
34
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-9488
SELECT + col2 DIV 24 + + col1 AS col1 FROM tab0
----
87
94
97

skipif mysql # not compatible
query I rowsort label-9488
SELECT + col2 / 24 + + col1 AS col1 FROM tab0
----
87
94
97

query I rowsort
SELECT ALL 48 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 0ef571a8722ab7270aa7272c1174b88e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9490
SELECT DISTINCT CAST( NULL AS SIGNED ) * tab1.col2 * col1 + 83 * - col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-9490
SELECT DISTINCT CAST ( NULL AS INTEGER ) * tab1.col2 * col1 + 83 * - col2 FROM tab1
----
NULL

query I rowsort
SELECT ALL + + col2 + - col2 + 9 FROM tab2 AS cor0
----
9
9
9

query I rowsort
SELECT DISTINCT - col2 + - cor0.col0 AS col0 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT + 66 + + cor0.col2 FROM tab2 cor0
----
104
92
93

query I rowsort
SELECT DISTINCT - + 41 * cor0.col0 - - cor0.col1 FROM tab0 AS cor0
----
-1338
-3558
-898

query I rowsort
SELECT - col1 * + col1 + + 41 FROM tab0 AS cor0
----
-7355
-8240
-9368

query I rowsort
SELECT ALL + ( col1 ) + col2 AS col2 FROM tab0
----
119
173
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9497
SELECT ALL - CAST( NULL AS SIGNED ) * + 88 + + col1 * - 85 AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9497
SELECT ALL - CAST ( NULL AS INTEGER ) * + 88 + + col1 * - 85 AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col1 * ( + col2 ) + ( + ( tab0.col2 ) ) * + ( - col0 ) * col2 FROM tab0
----
-132
-28974
-605898

onlyif mysql # use DIV operator for integer division
query I rowsort label-9499
SELECT ALL tab2.col2 DIV 5 + + col2 * - ( - tab2.col1 + col0 ) * + 28 FROM tab2
----
-13827
-65961
18149

skipif mysql # not compatible
query I rowsort label-9499
SELECT ALL tab2.col2 / 5 + + col2 * - ( - tab2.col1 + col0 ) * + 28 FROM tab2
----
-13827
-65961
18149

query I rowsort
SELECT - ( + tab0.col1 ) * - cor0.col0 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to d09890f5ef66bc8fba3ae4a45b718168

query I rowsort
SELECT - col1 + + 68 AS col0 FROM tab0
----
-18
-23
-29

query I rowsort
SELECT + 52 * + tab1.col1 FROM tab1
----
1352
520
676

query I rowsort
SELECT ALL 63 - - col2 AS col1 FROM tab0 AS cor0
----
145
64
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-9504
SELECT - col1 DIV cor0.col1 + 65 * + 77 * col1 FROM tab2 cor0
----
155154
295294
85084

skipif mysql # not compatible
query I rowsort label-9504
SELECT - col1 / cor0.col1 + 65 * + 77 * col1 FROM tab2 cor0
----
155154
295294
85084

query I rowsort
SELECT ALL + + 89 + - col0 AS col2 FROM tab2 AS cor0
----
10
11
82

query I rowsort
SELECT ALL - 90 + col0 AS col2 FROM tab2 AS cor0
----
-11
-12
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 * - col0 + + col1 col1 FROM tab0 cor0
----
-706
-7207
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 83 col2 FROM tab0
----
83
83
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9509
SELECT + - CAST( NULL AS DECIMAL ) + - 11 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9509
SELECT + - CAST ( NULL AS REAL ) + - 11 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( - 67 ) * col1 AS col1 FROM tab1 AS cor0
----
-1742
-670
-871

query I rowsort
SELECT - - 82 + + col1 AS col0 FROM tab0 AS cor0
----
168
173
179

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * 24 col0 FROM tab1 cor0
----
1296
1368
2304

query I rowsort
SELECT DISTINCT - 35 + col0 AS col2 FROM tab2 AS cor0
----
-28
43
44

query I rowsort
SELECT + + ( col0 ) + + ( + col0 ) FROM tab2 AS cor0
----
14
156
158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col1 ) * col0 col2 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT + cor0.col0 * cor0.col2 AS col1 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT ( col0 + + col0 ) AS col0 FROM tab2
----
14
156
158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 13 * col1 col1 FROM tab2
----
-221
-403
-767

query I rowsort
SELECT + 83 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 18f405c31a0fb47ce3cc9f7effa8855c

query I rowsort
SELECT DISTINCT cor0.col2 + ( - cor0.col2 ) FROM tab1 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9521
SELECT - col2 + - col1 * + col0 DIV - col0 FROM tab0 AS cor0
----
53
9
96

skipif mysql # not compatible
query I rowsort label-9521
SELECT - col2 + - col1 * + col0 / - col0 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT ALL - col1 * col1 + col1 AS col1 FROM tab2 AS cor0
----
-272
-3422
-930

onlyif mysql # use DIV operator for integer division
query I rowsort label-9523
SELECT ALL - + col1 DIV - col0 + + 70 FROM tab0 AS cor0
----
71
72
73

skipif mysql # not compatible
query I rowsort label-9523
SELECT ALL - + col1 / - col0 + + 70 FROM tab0 AS cor0
----
71
72
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-9524
SELECT ALL col0 + - 95 DIV col0 AS col0 FROM tab2 AS cor0
----
-6
77
78

skipif mysql # not compatible
query I rowsort label-9524
SELECT ALL col0 + - 95 / col0 AS col0 FROM tab2 AS cor0
----
-6
77
78

query I rowsort
SELECT DISTINCT + cor0.col0 + - col1 * - cor0.col0 FROM tab0 AS cor0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-9526
SELECT ALL + + col1 + ( + col1 ) DIV col1 AS col1 FROM tab2 AS cor0
----
18
32
60

skipif mysql # not compatible
query I rowsort label-9526
SELECT ALL + + col1 + ( + col1 ) / col1 AS col1 FROM tab2 AS cor0
----
18
32
60

query I rowsort
SELECT + col2 - + 28 FROM tab1 cor0
----
26
29
68

query I rowsort
SELECT col1 - + 23 * col0 FROM tab0 AS cor0
----
-1956
-466
-708

query I rowsort
SELECT + col1 + + ( 9 ) AS col1 FROM tab1 AS cor0
----
19
22
35

query I rowsort
SELECT DISTINCT col0 * + col0 + + col1 AS col0 FROM tab1
----
35
4106
6413

query IIIIIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 cor0 CROSS JOIN tab0, tab1 AS cor1, tab1, tab1 cor2, tab2
----
13122 values hashing to 2a23a2efbd7482492eade70ce0528c27

query I rowsort
SELECT DISTINCT cor0.col2 + ( col0 ) AS col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT + ( cor0.col2 ) + - col2 AS col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9534
SELECT DISTINCT + CAST( col2 AS SIGNED ) + - cor0.col2 AS col1 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-9534
SELECT DISTINCT + CAST ( col2 AS INTEGER ) + - cor0.col2 AS col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL - cor0.col1 + - col1 * - col0 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT ALL + + col2 * + 64 + col0 FROM tab0 AS cor0
----
2136
5337
99

query I rowsort
SELECT DISTINCT - col0 + + col1 * col0 * - col1 AS col0 FROM tab0 cor0
----
-177528
-329350
-737098

query I rowsort
SELECT + col1 + - 35 * - col1 * + col2 FROM tab0 AS cor0
----
261261
3492
99416

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9539
SELECT CAST( + col0 AS SIGNED ) + col2 AS col1 FROM tab1 AS cor0
----
121
176
57

skipif mysql # not compatible
query I rowsort label-9539
SELECT CAST ( + col0 AS INTEGER ) + col2 AS col1 FROM tab1 AS cor0
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col1 * col2 col0 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT 62 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

query I rowsort
SELECT col1 * + ( + 6 + + tab1.col0 ) AS col2 FROM tab1
----
1118
234
700

query I rowsort
SELECT - col0 * - 25 AS col1 FROM tab0
----
2225
600
875

query I rowsort
SELECT DISTINCT - 40 FROM tab1, tab2 AS cor0
----
-40

query I rowsort
SELECT DISTINCT + 97 * col1 FROM tab2
----
1649
3007
5723

query I rowsort
SELECT col1 + 72 * col2 FROM tab0 AS cor0
----
169
2462
5995

query I rowsort
SELECT col0 + - cor0.col0 * cor0.col0 AS col1 FROM tab1 AS cor0
----
-4032
-6
-6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-9548
SELECT DISTINCT + ( + col2 ) + - col1 DIV 92 AS col2 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-9548
SELECT DISTINCT + ( + col2 ) + - col1 / 92 AS col2 FROM tab2
----
26
27
38

query I rowsort
SELECT col2 * + 86 + col2 + tab0.col1 FROM tab0
----
184
2957
7225

query I rowsort
SELECT 55 + + col1 * + tab0.col1 FROM tab0
----
7451
8336
9464

query I rowsort
SELECT + cor1.col1 * + 5 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 0e2e8c8d930a1d8cc62663577dc7aa82

query I rowsort
SELECT ALL 98 + col1 FROM tab1 AS cor0
----
108
111
124

onlyif mysql # use DIV operator for integer division
query I rowsort label-9553
SELECT - col1 DIV - ( - 1 ) + - col1 * 41 FROM tab2 AS cor0
----
-1302
-2478
-714

skipif mysql # not compatible
query I rowsort label-9553
SELECT - col1 / - ( - 1 ) + - col1 * 41 FROM tab2 AS cor0
----
-1302
-2478
-714

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - col0 + 41 col2 FROM tab0 AS cor0
----
-7257
-751
6

query I rowsort
SELECT - col2 + + 42 * - col1 AS col2 FROM tab2 AS cor0
----
-1329
-2504
-752

query I rowsort
SELECT - col1 * - 71 - + col0 FROM tab2 AS cor0
----
1128
2194
4111

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9557
SELECT - CAST( 96 AS SIGNED ) FROM tab2
----
-96
-96
-96

skipif mysql # not compatible
query I rowsort label-9557
SELECT - CAST ( 96 AS INTEGER ) FROM tab2
----
-96
-96
-96

query I rowsort
SELECT DISTINCT + 54 + col1 AS col0 FROM tab2 AS cor0
----
113
71
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-9559
SELECT 62 + 81 DIV - col0 col0 FROM tab2
----
51
61
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9559
SELECT 62 + 81 / - col0 col0 FROM tab2
----
51
61
61

query I rowsort
SELECT tab2.col2 + ( + col1 ) * col0 FROM tab2
----
1381
244
4628

query I rowsort
SELECT 67 - col0 FROM tab2
----
-11
-12
60

query I rowsort
SELECT DISTINCT - + 47 + - cor0.col2 * - ( ( col0 ) ) * - col2 FROM tab2 AS cor0
----
-114123
-5150
-52775

query I rowsort
SELECT - + cor0.col1 * col2 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT - col0 + - col1 + + col2 * + col1 AS col2 FROM tab1 AS cor0
----
1155
1375
496

query I rowsort
SELECT DISTINCT col1 + col1 * - 54 + tab1.col0 * + col0 * col2 FROM tab1
----
-892
232942
613711

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9566
SELECT ALL + col2 + CAST( NULL AS SIGNED ) AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9566
SELECT ALL + col2 + CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 + 83 AS col0 FROM tab0
----
116
165
84

query I rowsort
SELECT DISTINCT 73 FROM tab1, tab2 AS cor0
----
73

query I rowsort
SELECT col1 + ( ( + col2 ) ) * cor0.col2 FROM tab0 cor0
----
1175
6815
98

query I rowsort
SELECT col1 * ( - 15 * col2 ) FROM tab0 AS cor0
----
-111930
-1455
-42570

query I rowsort
SELECT + col1 * - col0 + col0 AS col2 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT DISTINCT - 9 AS col1 FROM tab0, tab0 cor0
----
-9

query I rowsort
SELECT cor0.col1 + + 61 * - col1 FROM tab2 AS cor0
----
-1020
-1860
-3540

query I rowsort
SELECT + - col2 * + cor0.col2 - - col2 * + col0 FROM tab1 AS cor0
----
-1536
-2754
399

query I rowsort
SELECT ALL + ( + col0 ) * - col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT 93 * col1 FROM tab1 AS cor0
----
1209
2418
930

query I rowsort
SELECT + cor0.col0 + col2 * col1 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT DISTINCT - + cor0.col1 * 66 * - cor0.col0 FROM tab2 AS cor0
----
14322
303732
88638

query I rowsort
SELECT ( + cor0.col0 ) + - col1 * + col2 AS col2 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT - - col2 * - 0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT tab1.col0 FROM tab1, tab2, tab1 cor0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

onlyif mysql # use DIV operator for integer division
query I rowsort label-9582
SELECT ALL 31 * + cor0.col0 DIV - cor0.col0 FROM tab1 cor0
----
-31
-31
-31

skipif mysql # not compatible
query I rowsort label-9582
SELECT ALL 31 * + cor0.col0 / - cor0.col0 FROM tab1 cor0
----
-31
-31
-31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + ( - cor0.col0 ) col0 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT 25 + cor0.col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 3f3d818f5897302effdebf4829e2290d

query I rowsort
SELECT ALL - col0 * col1 + + col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT + - ( + cor0.col2 ) * col0 FROM tab0 cor0
----
-35
-7298
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * + cor0.col0 + + col2 * + col0 col2 FROM tab1 cor0
----
3008
6640
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-9588
SELECT - ( - col2 ) * + col1 + - col0 DIV - col2 AS col1 FROM tab0 AS cor0
----
132
2838
7463

skipif mysql # not compatible
query I rowsort label-9588
SELECT - ( - col2 ) * + col1 + - col0 / - col2 AS col1 FROM tab0 AS cor0
----
132
2838
7463

query I rowsort
SELECT ALL - 2 * + col2 * + cor0.col0 + col0 FROM tab1 AS cor0
----
-15280
-321
-7232

query I rowsort
SELECT DISTINCT + - col1 + col1 * + col1 FROM tab0 AS cor0
----
7310
8190
9312

onlyif mysql # use DIV operator for integer division
query I rowsort label-9591
SELECT ALL - - 66 DIV + col2 FROM tab0 cor0
----
0
2
66

skipif mysql # not compatible
query I rowsort label-9591
SELECT ALL - - 66 / + col2 FROM tab0 cor0
----
0
2
66

query I rowsort
SELECT ALL + cor0.col0 * - cor0.col2 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + - ( cor0.col2 ) * + col1 * col0 AS col1 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT ALL - col1 + - 98 * col1 + col1 AS col2 FROM tab1
----
-1274
-2548
-980

query I rowsort
SELECT ALL col0 + - col1 * + col1 AS col1 FROM tab1 cor0
----
-36
-673
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 46 * col0 col1 FROM tab0 AS cor0
----
1104
1610
4094

query I rowsort
SELECT ( col0 ) + + col1 FROM tab0
----
110
132
180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9598
SELECT CAST( - col0 AS SIGNED ) + + col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9598
SELECT CAST ( - col0 AS INTEGER ) + + col0 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9599
SELECT ALL col0 DIV col0 + + tab0.col0 FROM tab0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-9599
SELECT ALL col0 / col0 + + tab0.col0 FROM tab0
----
25
36
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-9600
SELECT col0 + + ( - col2 ) DIV col1 AS col0 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-9600
SELECT col0 + + ( - col2 ) / col1 AS col0 FROM tab0
----
24
35
89

query I rowsort
SELECT ALL + 88 + + col2 * + col0 FROM tab1
----
250
3736
7768

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + + tab1.col1 col2 FROM tab1
----
109
67
80

query I rowsort
SELECT col1 + + 18 AS col2 FROM tab0 AS cor0
----
104
109
115

query I rowsort
SELECT col1 * 6 AS col1 FROM tab0 AS cor0
----
516
546
582

query I rowsort
SELECT DISTINCT - - col0 + 6 FROM tab2 AS cor0
----
13
84
85

query I rowsort
SELECT ALL + - cor0.col1 * col1 + - col1 + - col2 FROM tab2 AS cor0
----
-1019
-344
-3566

query I rowsort
SELECT + col2 * 86 - col2 * - col1 FROM tab2 AS cor0
----
3159
3770
3914

query I rowsort
SELECT DISTINCT - + col0 * - ( - col0 ) + + cor0.col0 * - col1 FROM tab1 AS cor0
----
-4736
-7440
-87

query I rowsort
SELECT DISTINCT + col0 * + 5 + + col1 FROM tab1 AS cor0
----
330
41
413

query I rowsort
SELECT ALL - + col2 * + 96 AS col0 FROM tab0 AS cor0
----
-3168
-7872
-96

query I rowsort
SELECT + - col1 + + ( - col2 ) * col0 AS col1 FROM tab2 AS cor0
----
-2087
-220
-3019

query I rowsort
SELECT 70 AS col1 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to c76157a7a7ec18de56823b2058b49f32

query I rowsort
SELECT + tab2.col2 + col0 * 8 AS col0 FROM tab2
----
650
670
83

query I rowsort
SELECT ALL col1 * - col1 + + col1 + + cor0.col1 FROM tab0 AS cor0
----
-7224
-8099
-9215

query I rowsort
SELECT ALL col0 - col1 * + col2 FROM tab0
----
-2814
-62
-7373

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9616
SELECT - col2 + CAST( NULL AS SIGNED ) - + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9616
SELECT - col2 + CAST ( NULL AS INTEGER ) - + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * col2 + - ( - col1 ) + + col0 FROM tab0 cor0
----
-2728
-7282
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-9618
SELECT - col2 + - col2 DIV 48 FROM tab0 AS cor0
----
-1
-33
-83

skipif mysql # not compatible
query I rowsort label-9618
SELECT - col2 + - col2 / 48 FROM tab0 AS cor0
----
-1
-33
-83

query I rowsort
SELECT DISTINCT + col1 + + col2 * + col1 + + col1 FROM tab2 cor0
----
1652
680
899

query I rowsort
SELECT DISTINCT + col2 + - cor0.col0 * col0 FROM tab1 cor0
----
-4039
-6304
45

query I rowsort
SELECT 86 + col0 + col2 AS col2 FROM tab1
----
143
207
262

query I rowsort
SELECT DISTINCT + 93 + - tab0.col1 FROM tab0
----
-4
2
7

query I rowsort
SELECT DISTINCT 3 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
3

query I rowsort
SELECT ALL col2 * + col2 + + col1 * + col0 AS col2 FROM tab2 AS cor0
----
2787
5278
946

query I rowsort
SELECT DISTINCT + - col1 * col0 + - cor0.col1 - + col1 FROM tab2 AS cor0
----
-1377
-279
-4720

query I rowsort
SELECT DISTINCT - col1 * + cor0.col2 + + col0 AS col1 FROM tab1 cor0
----
-1168
-1401
-506

query I rowsort
SELECT ALL - - col2 * cor0.col1 - col0 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT DISTINCT - col0 * - col0 - cor0.col2 AS col0 FROM tab2 AS cor0
----
22
6058
6203

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * - col2 * + col2 col0 FROM tab1
----
-207936
-737280
-8748

query I rowsort
SELECT - - col1 * - col0 AS col2 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT + col0 + + 5 * 62 FROM tab1 AS cor0
----
313
374
390

query I rowsort
SELECT - col1 * - ( col2 ) + - col0 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT + + col2 * + 9 + - col2 FROM tab1 AS cor0
----
432
456
768

query I rowsort
SELECT + - col1 + - ( - col2 ) AS col2 FROM tab2 AS cor0
----
-33
-4
21

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9635
SELECT - CAST( - col0 AS SIGNED ) + cor0.col2 * - 51 FROM tab0 AS cor0
----
-16
-1659
-4093

skipif mysql # not compatible
query I rowsort label-9635
SELECT - CAST ( - col0 AS INTEGER ) + cor0.col2 * - 51 FROM tab0 AS cor0
----
-16
-1659
-4093

query I rowsort
SELECT ALL - 30 * col1 FROM tab1 AS cor0
----
-300
-390
-780

query I rowsort
SELECT ALL - + ( - col0 ) + col1 AS col1 FROM tab1 cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-9638
SELECT DISTINCT - col2 DIV 10 FROM tab1 AS cor0
----
-5
-9

skipif mysql # not compatible
query I rowsort label-9638
SELECT DISTINCT - col2 / 10 FROM tab1 AS cor0
----
-5
-9

query I rowsort
SELECT + + cor0.col1 + col0 FROM tab1 cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-9640
SELECT ALL - col1 DIV + col1 + - col0 AS col0 FROM tab1 AS cor0
----
-4
-65
-81

skipif mysql # not compatible
query I rowsort label-9640
SELECT ALL - col1 / + col1 + - col0 AS col0 FROM tab1 AS cor0
----
-4
-65
-81

onlyif mysql # use DIV operator for integer division
query I rowsort label-9641
SELECT 44 * - col0 + ( 14 ) + - cor0.col0 DIV ( col0 ) AS col2 FROM tab1 AS cor0
----
-119
-2803
-3507

skipif mysql # not compatible
query I rowsort label-9641
SELECT 44 * - col0 + ( 14 ) + - cor0.col0 / ( col0 ) AS col2 FROM tab1 AS cor0
----
-119
-2803
-3507

onlyif mysql # use DIV operator for integer division
query I rowsort label-9642
SELECT 87 - col0 DIV + 26 AS col1 FROM tab2 AS cor0
----
84
84
87

skipif mysql # not compatible
query I rowsort label-9642
SELECT 87 - col0 / + 26 AS col1 FROM tab2 AS cor0
----
84
84
87

query I rowsort
SELECT ALL + cor0.col1 * + ( + cor0.col0 ) FROM tab0, tab0 AS cor0
----
9 values hashing to f2938bee011b8d49dd931b1f9235e7f5

query I rowsort
SELECT + - cor0.col0 + - col1 * ( + col1 ) AS col1 FROM tab2 cor0
----
-3559
-368
-968

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9645
SELECT DISTINCT CAST( NULL AS SIGNED ) + - tab2.col1 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-9645
SELECT DISTINCT CAST ( NULL AS INTEGER ) + - tab2.col1 FROM tab2
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 56 - + col1 col0 FROM tab2 cor0
----
-3
25
39

query I rowsort
SELECT - + 9 * + col1 + col0 AS col0 FROM tab0 AS cor0
----
-730
-750
-838

onlyif mysql # use DIV operator for integer division
query I rowsort label-9648
SELECT + 5 * - col1 * col0 + 36 + - col0 DIV cor0.col0 AS col2 FROM tab0 AS cor0
----
-10285
-16940
-40460

skipif mysql # not compatible
query I rowsort label-9648
SELECT + 5 * - col1 * col0 + 36 + - col0 / cor0.col0 AS col2 FROM tab0 AS cor0
----
-10285
-16940
-40460

query I rowsort
SELECT - - cor0.col2 - + cor0.col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT col2 * - col0 * - 34 AS col0 FROM tab1 AS cor0
----
124032
261120
5508

query I rowsort
SELECT ALL - - 12 * col1 AS col0 FROM tab2 AS cor0
----
204
372
708

query I rowsort
SELECT ALL col0 * 45 FROM tab1
----
135
2880
3600

query I rowsort
SELECT + col2 * + cor0.col1 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL + col1 * 54 * col2 FROM tab0 AS cor0
----
153252
402948
5238

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 7 col1 FROM tab0
----
7
7
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 + + 73 col2 FROM tab2 AS cor0
----
100
111
99

query I rowsort
SELECT ALL - cor0.col2 FROM tab1, tab0 cor0, tab1 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

onlyif mysql # use DIV operator for integer division
query I rowsort label-9658
SELECT ALL 4 DIV - col0 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9658
SELECT ALL 4 / - col0 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT ( - 64 * tab1.col1 + + col0 ) FROM tab1
----
-1661
-576
-752

query I rowsort
SELECT - 95 + + col0 AS col1 FROM tab0 AS cor0
----
-6
-60
-71

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9661
SELECT + CAST( NULL AS SIGNED ) * - cor0.col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9661
SELECT + CAST ( NULL AS INTEGER ) * - cor0.col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor0.col0 + 64 FROM tab2 cor0
----
142
143
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-9663
SELECT DISTINCT - + col0 DIV + col0 FROM tab1 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-9663
SELECT DISTINCT - + col0 / + col0 FROM tab1 AS cor0
----
-1

query I rowsort
SELECT ALL + 11 * col0 * - cor0.col2 + - col1 * + 4 FROM tab1 AS cor0
----
-1886
-40168
-84532

onlyif mysql # use DIV operator for integer division
query I rowsort label-9665
SELECT + col2 DIV col2 + col2 + 46 * - col2 FROM tab0 AS cor0
----
-1484
-3689
-44

skipif mysql # not compatible
query I rowsort label-9665
SELECT + col2 / col2 + col2 + 46 * - col2 FROM tab0 AS cor0
----
-1484
-3689
-44

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9666
SELECT + - CAST( NULL AS SIGNED ) * col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9666
SELECT + - CAST ( NULL AS INTEGER ) * col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9667
SELECT ALL + CAST( 70 AS SIGNED ) + - col1 * + col1 FROM tab2 cor0
----
-219
-3411
-891

skipif mysql # not compatible
query I rowsort label-9667
SELECT ALL + CAST ( 70 AS INTEGER ) + - col1 * + col1 FROM tab2 cor0
----
-219
-3411
-891

skipif mysql # not compatible
query I rowsort
SELECT ALL + - CAST ( col2 AS REAL ) * - cor0.col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT - 49 + + col2 FROM tab0 AS cor0
----
-16
-48
33

onlyif mysql # use DIV operator for integer division
query I rowsort label-9670
SELECT + - col0 * - col1 + - cor0.col0 DIV 51 FROM tab1 AS cor0
----
1039
639
78

skipif mysql # not compatible
query I rowsort label-9670
SELECT + - col0 * - col1 + - cor0.col0 / 51 FROM tab1 AS cor0
----
1039
639
78

query I rowsort
SELECT - col1 + col2 * col2 + - ( col1 ) * + col1 FROM tab1 AS cor0
----
2214
3139
9034

query I rowsort
SELECT ALL ( 7 ) + col0 * 5 AS col2 FROM tab0 cor0
----
127
182
452

query I rowsort
SELECT + 93 * + cor0.col2 + cor0.col2 AS col0 FROM tab0 AS cor0
----
3102
7708
94

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( - 4 AS REAL ) AS col0 FROM tab1 AS cor0
----
4
4
4

query I rowsort
SELECT col1 * - 18 AS col1 FROM tab0
----
-1548
-1638
-1746

onlyif mysql # use DIV operator for integer division
query I rowsort label-9676
SELECT tab1.col1 * col2 DIV - 21 - + col0 * - 89 AS col0 FROM tab1
----
201
5669
7061

skipif mysql # not compatible
query I rowsort label-9676
SELECT tab1.col1 * col2 / - 21 - + col0 * - 89 AS col0 FROM tab1
----
201
5669
7061

onlyif mysql # use DIV operator for integer division
query I rowsort label-9677
SELECT ALL + + col2 DIV col2 + + col2 FROM tab1 AS cor0
----
55
58
97

skipif mysql # not compatible
query I rowsort label-9677
SELECT ALL + + col2 / col2 + + col2 FROM tab1 AS cor0
----
55
58
97

query I rowsort
SELECT + 62 + 6 * - col1 AS col1 FROM tab1 AS cor0
----
-16
-94
2

query I rowsort
SELECT ALL - 75 * col1 + col0 + 80 * col2 FROM tab2 cor0
----
-158
-2267
1844

query I rowsort
SELECT 33 + + col2 FROM tab2
----
59
60
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-9681
SELECT DISTINCT + col1 DIV - 53 AS col2 FROM tab0
----
-1

skipif mysql # not compatible
query I rowsort label-9681
SELECT DISTINCT + col1 / - 53 AS col2 FROM tab0
----
-1

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT + 85 + 66 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cf22002891a88578dbc2596c0472ad61

query I rowsort
SELECT DISTINCT 65 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
65

query I rowsort
SELECT ( col0 * ( col2 ) ) AS col1 FROM tab1
----
162
3648
7680

query I rowsort
SELECT col2 - + col1 AS col1 FROM tab1 cor0
----
28
47
83

query I rowsort
SELECT DISTINCT + col0 * + col1 + - 46 + col1 FROM tab0 AS cor0
----
2104
3446
8144

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + col2 * col0 col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT ALL 8 - tab0.col1 FROM tab0
----
-78
-83
-89

query I rowsort
SELECT ALL col2 * col0 * + 35 + col1 AS col1 FROM tab1
----
127690
268813
5696

query I rowsort
SELECT ALL col2 + col2 + + col2 AS col1 FROM tab0
----
246
3
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-9692
SELECT ALL - tab1.col0 * 87 * - 59 + col2 DIV + 38 col2 FROM tab1
----
15400
328513
410642

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9692
SELECT ALL - tab1.col0 * 87 * - 59 + col2 / + 38 col2 FROM tab1
----
15400
328513
410642

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9693
SELECT ALL tab1.col2 * ( - 4 * tab1.col0 ) + + CAST( col2 AS SIGNED ) * col1 + 29 FROM tab1
----
-13993
-29443
785

skipif mysql # not compatible
query I rowsort label-9693
SELECT ALL tab1.col2 * ( - 4 * tab1.col0 ) + + CAST ( col2 AS INTEGER ) * col1 + 29 FROM tab1
----
-13993
-29443
785

query I rowsort
SELECT DISTINCT - cor0.col2 - - ( 60 ) * col0 AS col2 FROM tab0 AS cor0
----
1407
2099
5258

query I rowsort
SELECT - + col0 * - col0 + 89 - col0 AS col1 FROM tab1 cor0
----
4121
6409
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-9696
SELECT - - col0 + CAST( col0 AS SIGNED ) DIV col0 AS col2 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-9696
SELECT - - col0 + CAST ( col0 AS INTEGER ) / col0 AS col2 FROM tab0 AS cor0
----
25
36
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col1 * col1 * ( col0 + ( + cor0.col0 ) ) col2 FROM tab1 AS cor0
----
-12800
-27040
-4056

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9698
SELECT + col1 + CAST( col0 AS SIGNED ) * - col0 * ( - col2 + col0 ) FROM tab0 cor0
----
-41553
-55356
5270

skipif mysql # not compatible
query I rowsort label-9698
SELECT + col1 + CAST ( col0 AS INTEGER ) * - col0 * ( - col2 + col0 ) FROM tab0 cor0
----
-41553
-55356
5270

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-9700
SELECT + col2 DIV - 63 + col1 AS col1 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-9700
SELECT + col2 / - 63 + col1 AS col1 FROM tab2
----
17
31
59

query I rowsort
SELECT DISTINCT col0 + 21 * - col0 FROM tab2 cor0
----
-140
-1560
-1580

query I rowsort
SELECT ALL - col1 * + cor0.col1 + cor0.col2 FROM tab2 AS cor0
----
-251
-3455
-934

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9703
SELECT ALL col0 + CAST( col1 AS SIGNED ) * + col1 FROM tab0 AS cor0
----
7420
8370
9444

skipif mysql # not compatible
query I rowsort label-9703
SELECT ALL col0 + CAST ( col1 AS INTEGER ) * + col1 FROM tab0 AS cor0
----
7420
8370
9444

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9704
SELECT - cor0.col1 + ( + 16 + + col1 ) * CAST( col1 AS SIGNED ) FROM tab2 AS cor0
----
1426
4366
544

skipif mysql # not compatible
query I rowsort label-9704
SELECT - cor0.col1 + ( + 16 + + col1 ) * CAST ( col1 AS INTEGER ) FROM tab2 AS cor0
----
1426
4366
544

query I rowsort
SELECT DISTINCT + - col1 * + ( + col2 ) * col1 AS col0 FROM tab1 cor0
----
-16224
-36504
-5700

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9706
SELECT DISTINCT + col1 * CAST( ( - cor0.col1 ) AS SIGNED ) FROM tab0 AS cor0
----
-7396
-8281
-9409

skipif mysql # not compatible
query I rowsort label-9706
SELECT DISTINCT + col1 * CAST ( ( - cor0.col1 ) AS INTEGER ) FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL + ( col1 ) * col0 - - col2 AS col2 FROM tab0 cor0
----
2097
3396
8181

query I rowsort
SELECT ALL - col1 - 58 AS col2 FROM tab1 AS cor0
----
-68
-71
-84

onlyif mysql # use DIV operator for integer division
query I rowsort label-9709
SELECT - col2 * col2 + col2 DIV - col0 AS col1 FROM tab0 AS cor0
----
-1
-1090
-6724

skipif mysql # not compatible
query I rowsort label-9709
SELECT - col2 * col2 + col2 / - col0 AS col1 FROM tab0 AS cor0
----
-1
-1090
-6724

query I rowsort
SELECT DISTINCT - + 10 * cor0.col2 + + cor0.col0 FROM tab0 AS cor0
----
-306
-731
25

query I rowsort
SELECT - - cor0.col1 * 97 + + cor0.col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 7c7dc8d57b19c571905e4b7e60a5b0a5

query I rowsort
SELECT ALL 93 + - col1 * col2 AS col1 FROM tab0 cor0
----
-2745
-4
-7369

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 67 - + 85 col2 FROM tab1 AS cor0
----
-152
-152
-152

query I rowsort
SELECT ( - 52 ) FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to e8a5cb10c0973a78554f344d4f6e7e74

query I rowsort
SELECT DISTINCT + 34 FROM tab1, tab1 AS cor0, tab0 cor1
----
34

query I rowsort
SELECT ALL - + col1 * + col2 * + 56 FROM tab0 cor0
----
-158928
-417872
-5432

query I rowsort
SELECT ALL + - cor0.col2 * + col2 * - 36 AS col0 FROM tab2 AS cor0
----
24336
26244
51984

query I rowsort
SELECT DISTINCT - 64 AS col0 FROM tab1, tab2 cor0, tab2 AS cor1
----
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * col1 * + col2 col0 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT ALL col1 * + col2 + + col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT DISTINCT - col2 * + col0 - - col2 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT DISTINCT - col2 - + col0 * col2 FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT DISTINCT col1 + - 76 * col2 AS col0 FROM tab2 AS cor0
----
-1917
-2021
-2871

query I rowsort
SELECT ALL ( col2 ) * 66 FROM tab0
----
2178
5412
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9725
SELECT col1 + col1 * CAST( NULL AS DECIMAL ) AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9725
SELECT col1 + col1 * CAST ( NULL AS REAL ) AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 * cor0.col0 + - col1 * 34 AS col0 FROM tab0 AS cor0
----
-2132
-3263
4204

query I rowsort
SELECT - 76 * cor0.col0 * + ( col0 ) + col1 FROM tab0 AS cor0
----
-43690
-601905
-93003

query I rowsort
SELECT + 10 - col1 FROM tab2 AS cor0
----
-21
-49
-7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9729
SELECT DISTINCT + CAST( NULL AS DECIMAL ) + col2 * - col0 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-9729
SELECT DISTINCT + CAST ( NULL AS REAL ) + col2 * - col0 FROM tab2
----
NULL

query I rowsort
SELECT DISTINCT 34 AS col0 FROM tab1, tab2, tab2 AS cor0
----
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-9731
SELECT tab1.col0 DIV + tab1.col2 col0 FROM tab1
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9731
SELECT tab1.col0 / + tab1.col2 col0 FROM tab1
----
0
0
1

query I rowsort
SELECT tab1.col2 AS col2 FROM tab1, tab0, tab0 AS cor0, tab1 AS cor1
----
81 values hashing to 9d355f1f2edc347a359dad00d2d3f886

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * 44 + tab0.col0 col1 FROM tab0
----
-1428
-3519
-9

query I rowsort
SELECT DISTINCT cor1.col0 AS col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
3
64
80

query I rowsort
SELECT ALL col2 * 69 FROM tab0 cor0
----
2277
5658
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 68 col2 FROM tab0
----
-68
-68
-68

query IIIIIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab1, tab1 cor2
----
13122 values hashing to 366ddb04c54b02c5b9a5caa434e8a54b

query I rowsort
SELECT ALL + 72 + col0 * - col1 * + 22 + + col2 FROM tab0 AS cor0
----
-178024
-45303
-74617

query I rowsort
SELECT DISTINCT - ( col2 ) * - col2 + - col0 AS col0 FROM tab0 AS cor0
----
-34
1065
6635

query I rowsort
SELECT - + col1 * 93 AS col0 FROM tab0 cor0
----
-7998
-8463
-9021

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9741
SELECT + CAST( col0 AS SIGNED ) AS col1 FROM tab0 cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-9741
SELECT + CAST ( col0 AS INTEGER ) AS col1 FROM tab0 cor0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 35 + - col2 col2 FROM tab2
----
-61
-62
-73

query I rowsort
SELECT - col2 * 84 + + col0 FROM tab2
----
-2106
-2261
-3113

query I rowsort
SELECT cor0.col1 * col2 * - col0 AS col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9745
SELECT - CAST( - col2 AS SIGNED ) * col2 AS col2 FROM tab2 cor0
----
1444
676
729

skipif mysql # not compatible
query I rowsort label-9745
SELECT - CAST ( - col2 AS INTEGER ) * col2 AS col2 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT + cor0.col0 * - col1 FROM tab2 cor0
----
-1343
-217
-4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT - col1 + col1 * CAST ( col0 AS REAL ) col2 FROM tab0 cor0
----
1978
3298
8008

query I rowsort
SELECT ALL + ( - col0 ) + - cor0.col2 * + col0 * col1 FROM tab0 AS cor0
----
-3430
-664207
-68136

query I rowsort
SELECT DISTINCT col1 - + col1 AS col2 FROM tab0 cor0
----
0

query I rowsort
SELECT DISTINCT + col1 * col1 * 94 AS col0 FROM tab2 AS cor0
----
27166
327214
90334

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 71 col0 FROM tab0 AS cor0
----
-71
-71
-71

query I rowsort
SELECT + col1 * - ( - 96 * col0 + ( col1 ) ) FROM tab2 AS cor0
----
128639
19871
438311

query I rowsort
SELECT - col2 + + 21 FROM tab2 AS cor0
----
-17
-5
-6

query I rowsort
SELECT - col1 + 38 AS col1 FROM tab0 cor0
----
-48
-53
-59

query I rowsort
SELECT 87 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 8661ffbd1a72897c495405c53b816e50

query I rowsort
SELECT + col0 + 95 AS col0 FROM tab1 AS cor0
----
159
175
98

query I rowsort
SELECT + col0 * + 10 + 31 AS col1 FROM tab2 AS cor0
----
101
811
821

query I rowsort
SELECT + cor0.col1 + + cor0.col2 * + cor0.col1 AS col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT + 64 * + cor0.col1 FROM tab1 AS cor0
----
1664
640
832

query I rowsort
SELECT ALL col1 * 34 FROM tab0
----
2924
3094
3298

onlyif mysql # use DIV operator for integer division
query I rowsort label-9761
SELECT col0 + + col2 DIV - col0 - - col1 * + col1 AS col1 FROM tab1 AS cor0
----
164
248
661

skipif mysql # not compatible
query I rowsort label-9761
SELECT col0 + + col2 / - col0 - - col1 * + col1 AS col1 FROM tab1 AS cor0
----
164
248
661

query I rowsort
SELECT - + col0 + col2 + 7 * 51 AS col1 FROM tab0 AS cor0
----
323
350
366

query I rowsort
SELECT - cor0.col0 * col2 + ( col2 ) + + col0 * + cor0.col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT - col0 + cor0.col0 * - col0 FROM tab1 AS cor0
----
-12
-4160
-6480

query I rowsort
SELECT - col2 + - col2 + ( col2 * col2 ) FROM tab0 AS cor0
----
-1
1023
6560

query I rowsort
SELECT ALL + cor0.col1 * col1 + - col1 AS col2 FROM tab0 cor0
----
7310
8190
9312

query I rowsort
SELECT + col0 + 55 * col2 FROM tab2 cor0
----
1492
1508
2169

query I rowsort
SELECT + cor0.col1 * ( cor1.col0 ) AS col1 FROM tab2 cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 7e3c34e781801a3db37bc76b9d86ef8c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 - - tab1.col2 col0 FROM tab1
----
109
67
80

query I rowsort
SELECT ( + cor1.col0 ) + cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to f65167375aa80cc8b3f3f8987d2662a3

query I rowsort
SELECT DISTINCT - cor0.col1 * + ( - col1 ) * col2 + - 69 FROM tab1 cor0
----
16155
36435
5631

query I rowsort
SELECT DISTINCT - col0 * + col0 + - col0 FROM tab0 AS cor0
----
-1260
-600
-8010

query I rowsort
SELECT ALL - ( - col2 ) * col2 + + 43 FROM tab2 AS cor0
----
1487
719
772

onlyif mysql # use DIV operator for integer division
query I rowsort label-9774
SELECT DISTINCT - - col1 * + cor0.col0 DIV + col0 + + cor0.col1 AS col0 FROM tab1 AS cor0
----
20
26
52

skipif mysql # not compatible
query I rowsort label-9774
SELECT DISTINCT - - col1 * + cor0.col0 / + col0 + + cor0.col1 AS col0 FROM tab1 AS cor0
----
20
26
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * col1 * - col1 col0 FROM tab0
----
-636056
-753571
-912673

query I rowsort
SELECT DISTINCT 66 + 47 - - col2 FROM tab1
----
167
170
209

query I rowsort
SELECT DISTINCT - 37 AS col1 FROM tab1, tab0, tab2 AS cor0
----
-37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 29 col1 FROM tab0, tab1 cor0
----
9 values hashing to 1e7120ba8e9191084172ddced17e5eb2

query I rowsort
SELECT DISTINCT - tab2.col1 * col2 * col1 - + tab2.col2 AS col2 FROM tab2
----
-11020
-25974
-90532

query I rowsort
SELECT col0 * - 48 - - col0 FROM tab1
----
-141
-3008
-3760

onlyif mysql # use DIV operator for integer division
query I rowsort label-9781
SELECT tab0.col0 DIV 33 AS col2 FROM tab0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-9781
SELECT tab0.col0 / 33 AS col2 FROM tab0
----
0
1
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-9782
SELECT 54 DIV - ( col0 * col0 ) AS col1 FROM tab1
----
-6
0
0

skipif mysql # not compatible
query I rowsort label-9782
SELECT 54 / - ( col0 * col0 ) AS col1 FROM tab1
----
-6
0
0

query I rowsort
SELECT DISTINCT - col2 * + col2 * + col1 AS col2 FROM tab0
----
-611884
-93654
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-9784
SELECT col1 DIV 40 AS col0 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9784
SELECT col1 / 40 AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT - col1 * ( col2 ) AS col2 FROM tab0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-9786
SELECT + cor0.col2 + col1 DIV + col1 FROM tab2 cor0
----
27
28
39

skipif mysql # not compatible
query I rowsort label-9786
SELECT + cor0.col2 + col1 / + col1 FROM tab2 cor0
----
27
28
39

query I rowsort
SELECT ALL 63 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to c3eea92c46f2c49716f386a58b575025

query I rowsort
SELECT ( col2 ) + - col0 AS col1 FROM tab1
----
-7
16
51

query I rowsort
SELECT DISTINCT - col0 * - col1 * col1 + 76 AS col1 FROM tab0 AS cor0
----
177580
329391
737085

query I rowsort
SELECT ALL - 82 * col1 + 86 AS col0 FROM tab0
----
-6966
-7376
-7868

query I rowsort
SELECT ALL - 71 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 3907e0aa4f29c002120742c4abb3e23a

onlyif mysql # use DIV operator for integer division
query I rowsort label-9792
SELECT DISTINCT 5 + + col1 DIV + ( - col0 + + col1 ) FROM tab2 AS cor0
----
2
5
6

skipif mysql # not compatible
query I rowsort label-9792
SELECT DISTINCT 5 + + col1 / + ( - col0 + + col1 ) FROM tab2 AS cor0
----
2
5
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-9793
SELECT - col2 + + col2 DIV col2 AS col2 FROM tab0 AS cor0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-9793
SELECT - col2 + + col2 / col2 AS col2 FROM tab0 AS cor0
----
-32
-81
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9794
SELECT DISTINCT + 9 * + col1 + + CAST( - 86 AS SIGNED ) + col0 DIV + cor0.col2 AS col1 FROM tab0 AS cor0
----
688
734
822

skipif mysql # not compatible
query I rowsort label-9794
SELECT DISTINCT + 9 * + col1 + + CAST ( - 86 AS INTEGER ) + col0 / + cor0.col2 AS col1 FROM tab0 AS cor0
----
688
734
822

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9795
SELECT DISTINCT - col1 * + col2 * CAST( + col0 AS SIGNED ) FROM tab1 AS cor0
----
-36480
-4212
-99840

skipif mysql # not compatible
query I rowsort label-9795
SELECT DISTINCT - col1 * + col2 * CAST ( + col0 AS INTEGER ) FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT ALL + + 61 + col2 FROM tab1 AS cor0
----
115
118
157

query I rowsort
SELECT DISTINCT - col2 * + col2 + + col2 FROM tab0 AS cor0
----
-1056
-6642
0

query I rowsort
SELECT DISTINCT col0 * ( - col2 ) FROM tab0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-9799
SELECT - col0 DIV - col1 - col2 FROM tab2
----
-25
-27
-34

skipif mysql # not compatible
query I rowsort label-9799
SELECT - col0 / - col1 - col2 FROM tab2
----
-25
-27
-34

query I rowsort
SELECT DISTINCT col0 + + 22 AS col1 FROM tab0 AS cor0
----
111
46
57

query I rowsort
SELECT DISTINCT + col0 + col2 * - 4 FROM tab1 AS cor0
----
-164
-213
-304

query I rowsort
SELECT + col0 + ( 66 ) * col0 * col1 FROM tab2 AS cor0
----
14329
303810
88717

query I rowsort
SELECT DISTINCT - col1 * - ( + 47 ) - col2 * col0 FROM tab2 AS cor0
----
-2203
1268
745

query I rowsort
SELECT + - cor0.col1 + - ( + col2 * col1 + ( + 67 ) ) AS col2 FROM tab1 AS cor0
----
-1328
-1497
-647

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9805
SELECT ALL col1 - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9805
SELECT ALL col1 - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col2 * - ( + col2 ) + col1 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT ALL - - col2 + + 63 * - cor0.col1 FROM tab2 AS cor0
----
-1033
-1926
-3691

query I rowsort
SELECT DISTINCT + - 53 + + 73 FROM tab2 AS cor0
----
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 0 * 0 - - col0 col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT col0 * - 30 FROM tab1 AS cor0
----
-1920
-2400
-90

query I rowsort
SELECT ALL + ( - col1 ) + + col0 + + 5 FROM tab0 AS cor0
----
-57
-57
3

query I rowsort
SELECT DISTINCT 60 + col1 + col2 FROM tab2 AS cor0
----
115
118
145

query I rowsort
SELECT ALL 21 * col1 - - col1 * - col2 AS col1 FROM tab2 AS cor0
----
-186
-289
-295

onlyif mysql # use DIV operator for integer division
query I rowsort label-9814
SELECT ALL - ( ( - col2 - 32 ) ) DIV - col1 + col0 + 96 FROM tab0 AS cor0
----
120
131
184

skipif mysql # not compatible
query I rowsort label-9814
SELECT ALL - ( ( - col2 - 32 ) ) / - col1 + col0 + 96 FROM tab0 AS cor0
----
120
131
184

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9815
SELECT + CAST( 26 AS SIGNED ) * col1 FROM tab2 cor0
----
1534
442
806

skipif mysql # not compatible
query I rowsort label-9815
SELECT + CAST ( 26 AS INTEGER ) * col1 FROM tab2 cor0
----
1534
442
806

query I rowsort
SELECT DISTINCT - - 53 AS col0 FROM tab0 cor0
----
53

query I rowsort
SELECT ALL col2 * col0 + + col0 * cor0.col0 AS col1 FROM tab0 AS cor0
----
1260
1368
15219

query I rowsort
SELECT DISTINCT - 66 * 94 FROM tab2 AS cor0
----
-6204

query I rowsort
SELECT ALL - 66 + + col1 FROM tab2 AS cor0
----
-35
-49
-7

query I rowsort
SELECT ALL - + col2 * 73 AS col0 FROM tab0 AS cor0
----
-2409
-5986
-73

query I rowsort
SELECT 56 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to b5ba4b44e3deadce1edb30e76df61200

query I rowsort
SELECT col1 * - ( col2 * col1 ) AS col2 FROM tab1 AS cor0
----
-16224
-36504
-5700

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 cor0, tab1 cor1, tab0 AS cor2
----
972 values hashing to 5e655b1287771868a8f868574a94d749

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 + 66 col1 FROM tab0 AS cor0
----
101
155
90

query I rowsort
SELECT col1 * 80 FROM tab2 cor0
----
1360
2480
4720

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( + 5 ) col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 74665fbb47d5b17da011bca567195b21

query I rowsort
SELECT DISTINCT - col2 * 28 * col1 AS col2 FROM tab0
----
-208936
-2716
-79464

query I rowsort
SELECT - 85 * - 18 FROM tab2, tab2 AS cor0
----
9 values hashing to ced0a6f1902cdbb9205a82398b050d01

query I rowsort
SELECT DISTINCT - col2 * + 76 FROM tab0
----
-2508
-6232
-76

query I rowsort
SELECT - + 35 AS col1 FROM tab1 cor0
----
-35
-35
-35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col2 + - 71 col2 FROM tab0 AS cor0
----
102
27
48

query I rowsort
SELECT - 98 + + col2 AS col0 FROM tab2 AS cor0
----
-60
-71
-72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 7 * - col2 * + col0 col0 FROM tab2
----
1323
14196
21014

query I rowsort
SELECT ALL + 78 + col1 * tab0.col1 FROM tab0
----
7474
8359
9487

query I rowsort
SELECT ALL - + cor0.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

query I rowsort
SELECT DISTINCT 16 AS col1 FROM tab2 AS cor0
----
16

query I rowsort
SELECT - col1 * + col2 * col1 AS col2 FROM tab0 cor0
----
-244068
-679042
-9409

query I rowsort
SELECT DISTINCT 38 + cor1.col2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
120
39
71

query I rowsort
SELECT ALL - + col2 * + col0 + + col0 * + cor0.col2 * col1 FROM tab1 AS cor0
----
32832
4050
92160

query I rowsort
SELECT DISTINCT - ( + col1 ) + - col1 - col0 FROM tab1 AS cor0
----
-106
-55
-84

onlyif mysql # use DIV operator for integer division
query I rowsort label-9841
SELECT + col0 DIV col1 + - 54 FROM tab2 AS cor0
----
-50
-53
-54

skipif mysql # not compatible
query I rowsort label-9841
SELECT + col0 / col1 + - 54 FROM tab2 AS cor0
----
-50
-53
-54

query I rowsort
SELECT 44 * col0 FROM tab0
----
1056
1540
3916

query I rowsort
SELECT ALL 13 AS col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to a90d0f37cec603ae1bc0a60dc7fbaeed

query I rowsort
SELECT ALL - col0 + col0 * col0 + col0 * 57 * - 32 FROM tab0 cor0
----
-154504
-43224
-62650

query I rowsort
SELECT ALL + - cor0.col1 * + 55 + col1 FROM tab2 AS cor0
----
-1674
-3186
-918

query I rowsort
SELECT ALL - col2 * - ( cor0.col2 ) + cor0.col2 FROM tab2 AS cor0
----
1482
702
756

query I rowsort
SELECT ALL - 88 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to eb8cbefa7d831e1a0183e919e2caef32

onlyif mysql # use DIV operator for integer division
query I rowsort label-9848
SELECT DISTINCT + 99 + col2 DIV + 57 AS col0 FROM tab0
----
100
99

skipif mysql # not compatible
query I rowsort label-9848
SELECT DISTINCT + 99 + col2 / + 57 AS col0 FROM tab0
----
100
99

query I rowsort
SELECT + + col0 * ( + ( cor0.col0 ) ) + - 57 AS col2 FROM tab1 AS cor0
----
-48
4039
6343

query I rowsort
SELECT ALL col0 + - col1 * 73 FROM tab2 AS cor0
----
-1162
-2256
-4229

query I rowsort
SELECT DISTINCT col1 + ( - col2 ) * col2 AS col0 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT ALL 71 * 56 * tab1.col0 FROM tab1
----
11928
254464
318080

query I rowsort
SELECT ALL + ( + 4 + - col1 * col2 ) FROM tab2
----
-1530
-642
-833

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 cor0 CROSS JOIN tab2, tab1 AS cor1, tab0 AS cor2
----
3645 values hashing to adb876f0e99f8d4fbf7b7fcf19919a21

query I rowsort
SELECT 54 + 15 AS col1 FROM tab1 AS cor0
----
69
69
69

query I rowsort
SELECT ( col2 ) * + col2 + col0 * + col2 FROM tab2 cor0
----
2704
4446
918

onlyif mysql # use DIV operator for integer division
query I rowsort label-9857
SELECT - col2 + + col0 + col2 DIV + col1 AS col0 FROM tab2 AS cor0
----
-20
43
52

skipif mysql # not compatible
query I rowsort label-9857
SELECT - col2 + + col0 + col2 / + col1 AS col0 FROM tab2 AS cor0
----
-20
43
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9858
SELECT + ( col0 ) + cor0.col1 + + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9858
SELECT + ( col0 ) + cor0.col1 + + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 * + 32 AS col1 FROM tab2
----
224
2496
2528

query I rowsort
SELECT col1 * col1 * + col2 + col1 * col1 FROM tab0
----
18818
251464
687323

query I rowsort
SELECT - tab0.col2 - 15 FROM tab0
----
-16
-48
-97

query I rowsort
SELECT + col0 + + 66 * - col1 FROM tab0
----
-5652
-5917
-6367

query I rowsort
SELECT + - cor0.col0 AS col2 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT - col2 - 74 FROM tab1
----
-128
-131
-170

query I rowsort
SELECT DISTINCT + col0 * - 34 AS col1 FROM tab1 AS cor0
----
-102
-2176
-2720

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9866
SELECT ALL col2 * 20 + - col2 * + CAST( NULL AS SIGNED ) + - col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9866
SELECT ALL col2 * 20 + - col2 * + CAST ( NULL AS INTEGER ) + - col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - cor1.col0 + + 31 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to be1482e376dfc446e8db7f36af5e457a

query I rowsort
SELECT - 60 * + 47 FROM tab1
----
-2820
-2820
-2820

query I rowsort
SELECT - - col0 + col2 * - col1 * 23 AS col1 FROM tab0 AS cor0
----
-171537
-2196
-65250

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 69 * + col1 * col1 + - 82 col0 FROM tab2 AS cor0
----
19859
240107
66227

onlyif mysql # use DIV operator for integer division
query I rowsort label-9871
SELECT DISTINCT - + ( ( - col0 ) ) DIV - cor0.col1 - col2 * + col1 FROM tab2 AS cor0
----
-1535
-650
-837

skipif mysql # not compatible
query I rowsort label-9871
SELECT DISTINCT - + ( ( - col0 ) ) / - cor0.col1 - col2 * + col1 FROM tab2 AS cor0
----
-1535
-650
-837

query I rowsort
SELECT 17 - - tab0.col2 * col0 * + col1 AS col1 FROM tab0
----
3412
664135
68129

query I rowsort
SELECT - col0 * + col1 + 91 * col2 * col1 AS col0 FROM tab1 AS cor0
----
112528
127686
51230

query I rowsort
SELECT + 26 + - col2 FROM tab0 AS cor0
----
-56
-7
25

query I rowsort
SELECT - cor0.col1 * cor0.col0 AS col2 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT + col1 * col1 + 51 AS col1 FROM tab1 AS cor0
----
151
220
727

onlyif mysql # use DIV operator for integer division
query I rowsort label-9877
SELECT ALL col1 + col2 DIV + ( + cor0.col2 ) FROM tab0 AS cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-9877
SELECT ALL col1 + col2 / + ( + cor0.col2 ) FROM tab0 AS cor0
----
87
92
98

query I rowsort
SELECT DISTINCT col0 + col0 * col0 AS col0 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT ALL col0 + col1 + + col0 * - col2 AS col2 FROM tab2 AS cor0
----
-151
-1891
-2906

query I rowsort
SELECT col2 * + col2 * 25 AS col2 FROM tab1 AS cor0
----
230400
72900
81225

query I rowsort
SELECT - col1 * 66 FROM tab1 cor0
----
-1716
-660
-858

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 * 69 col2 FROM tab2 AS cor0
----
1173
2139
4071

query I rowsort
SELECT ALL + cor0.col1 * 84 AS col1 FROM tab2 AS cor0
----
1428
2604
4956

query I rowsort
SELECT + + col2 * + col1 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT + cor0.col2 * + 35 * - 62 FROM tab2 cor0
----
-56420
-58590
-82460

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9886
SELECT col1 + CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9886
SELECT col1 + CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9887
SELECT - - col1 DIV - 27 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9887
SELECT - - col1 / - 27 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col2 * - 41 FROM tab1 AS cor0
----
-2214
-2337
-3936

query I rowsort
SELECT ALL - + col2 * col0 * 40 FROM tab0 AS cor0
----
-1400
-291920
-31680

query I rowsort
SELECT - col1 * col1 * col1 + col0 AS col0 FROM tab0 cor0
----
-636032
-753482
-912638

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - cor0.col1 ) col0 FROM tab2, tab2 cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT 47 + 20 * - col2 * + col2 AS col2 FROM tab2 AS cor0
----
-13473
-14533
-28833

query I rowsort
SELECT ( 60 ) FROM tab1, tab0 AS cor0
----
9 values hashing to a97561e17ecaa618227c75a57b268f33

onlyif mysql # use DIV operator for integer division
query I rowsort label-9894
SELECT - col0 DIV cor0.col1 + - col1 * + col2 FROM tab1 AS cor0
----
-1254
-1404
-576

skipif mysql # not compatible
query I rowsort label-9894
SELECT - col0 / cor0.col1 + - col1 * + col2 FROM tab1 AS cor0
----
-1254
-1404
-576

query I rowsort
SELECT DISTINCT + ( 71 * col2 ) + ( + tab0.col1 ) * col0 FROM tab0
----
13921
3466
4407

query I rowsort
SELECT + 19 * col2 FROM tab2
----
494
513
722

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col0 + + tab2.col0 col2 FROM tab2
----
14
156
158

query I rowsort
SELECT 37 + - tab1.col1 AS col2 FROM tab1
----
11
24
27

query I rowsort
SELECT ALL - col0 * tab2.col1 * col1 FROM tab2
----
-22831
-271518
-6727

onlyif mysql # use DIV operator for integer division
query I rowsort label-9900
SELECT DISTINCT + + ( - col1 ) + 8 DIV + col1 FROM tab2 cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-9900
SELECT DISTINCT + + ( - col1 ) + 8 / + col1 FROM tab2 cor0
----
-17
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - ( + col1 ) + + col2 col0 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT - 92 + + cor0.col1 AS col0 FROM tab1 AS cor0
----
-66
-79
-82

query I rowsort
SELECT ALL + + ( + col1 ) * col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT DISTINCT 84 * cor0.col1 AS col0 FROM tab1 AS cor0
----
1092
2184
840

query I rowsort
SELECT - - col0 * - col0 + ( col0 ) FROM tab2 AS cor0
----
-42
-6006
-6162

query I rowsort
SELECT - - 96 * - col0 FROM tab0 AS cor0
----
-2304
-3360
-8544

query I rowsort
SELECT 15 + + col0 FROM tab2
----
22
93
94

query I rowsort
SELECT - ( - col0 * - col2 ) FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT - col2 + - col0 * cor0.col2 FROM tab1 AS cor0
----
-216
-3705
-7776

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9910
SELECT - - CAST( NULL AS SIGNED ) AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9910
SELECT - - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 * 69 col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 4841785b7cefaddccb5d0375e7417530

query I rowsort
SELECT ALL col1 * - col1 * col1 FROM tab2
----
-205379
-29791
-4913

query I rowsort
SELECT 52 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 76100d10f51995d20efdeb657e444d3c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col1 ) * col2 col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT 86 * col1 FROM tab0 cor0
----
7396
7826
8342

query I rowsort
SELECT - - col1 * + col0 + col1 * + cor0.col2 * - 44 FROM tab1 AS cor0
----
-24440
-53872
-61698

query I rowsort
SELECT col1 + 59 - - 23 * col0 AS col2 FROM tab0 AS cor0
----
2197
697
961

query I rowsort
SELECT col2 * 18 * - tab0.col0 AS col0 FROM tab0
----
-131364
-14256
-630

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9919
SELECT col1 * ( 1 ) + col1 * - CAST( + col1 AS SIGNED ) + + col2 AS col1 FROM tab0 AS cor0
----
-7277
-8108
-9311

skipif mysql # not compatible
query I rowsort label-9919
SELECT col1 * ( 1 ) + col1 * - CAST ( + col1 AS INTEGER ) + + col2 AS col1 FROM tab0 AS cor0
----
-7277
-8108
-9311

query I rowsort
SELECT 66 * 4 FROM tab2 AS cor0
----
264
264
264

query I rowsort
SELECT DISTINCT + ( col1 ) * cor0.col2 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT - 29 + col1 * + col2 FROM tab1 AS cor0
----
1219
1375
541

query I rowsort
SELECT DISTINCT + + col1 * + col0 + col1 + cor0.col0 FROM tab2 AS cor0
----
1439
255
4739

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 26 + col1 - cor0.col2 col2 FROM tab2 AS cor0
----
-22
-47
7

query I rowsort
SELECT DISTINCT + 22 * col0 + + col2 AS col2 FROM tab0 AS cor0
----
2040
561
771

onlyif mysql # use DIV operator for integer division
query I rowsort label-9926
SELECT + col1 DIV col0 + + col1 FROM tab2 AS cor0
----
17
35
59

skipif mysql # not compatible
query I rowsort label-9926
SELECT + col1 / col0 + + col1 FROM tab2 AS cor0
----
17
35
59

query I rowsort
SELECT DISTINCT + 80 - col1 AS col0 FROM tab2 AS cor0
----
21
49
63

query I rowsort
SELECT ALL - + ( + col1 ) * 12 * col1 AS col2 FROM tab2 cor0
----
-11532
-3468
-41772

onlyif mysql # use DIV operator for integer division
query I rowsort label-9929
SELECT + col1 * + col0 + 64 DIV col0 FROM tab1 AS cor0
----
1040
641
99

skipif mysql # not compatible
query I rowsort label-9929
SELECT + col1 * + col0 + 64 / col0 FROM tab1 AS cor0
----
1040
641
99

query I rowsort
SELECT ALL col2 * col0 + + tab2.col1 + col0 * col1 AS col1 FROM tab2
----
4362
437
6689

query I rowsort
SELECT ALL ( col2 ) + col1 * + ( - 82 ) AS col1 FROM tab2
----
-1356
-2515
-4812

query I rowsort
SELECT - col0 + + ( + col1 ) * col1 AS col2 FROM tab2 AS cor0
----
210
3403
954

query I rowsort
SELECT col2 + 79 AS col0 FROM tab0
----
112
161
80

query I rowsort
SELECT ALL - 55 * + col2 + col2 * col2 FROM tab2
----
-646
-754
-756

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9935
SELECT ALL col0 + CAST( + col2 AS SIGNED ) FROM tab2 AS cor0
----
104
117
34

skipif mysql # not compatible
query I rowsort label-9935
SELECT ALL col0 + CAST ( + col2 AS INTEGER ) FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT cor0.col0 * cor0.col0 AS col2 FROM tab2 AS cor0
----
49
6084
6241

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9937
SELECT ALL - + col0 + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9937
SELECT ALL - + 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-9938
SELECT ALL - col2 + 47 DIV + cor0.col0 AS col0 FROM tab1 AS cor0
----
-39
-57
-96

skipif mysql # not compatible
query I rowsort label-9938
SELECT ALL - col2 + 47 / + cor0.col0 AS col0 FROM tab1 AS cor0
----
-39
-57
-96

query I rowsort
SELECT + + cor0.col0 * 81 FROM tab2 AS cor0
----
567
6318
6399

query I rowsort
SELECT col2 * col2 - - col0 AS col2 FROM tab0
----
1113
36
6813

query I rowsort
SELECT 75 + tab1.col1 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 808686e7c6ae742c2c290742fcb4aa1e

query I rowsort
SELECT ALL - ( - col0 + col2 * col0 ) AS col0 FROM tab1
----
-159
-3584
-7600

query I rowsort
SELECT ALL col1 * - 60 FROM tab1
----
-1560
-600
-780

query I rowsort
SELECT col0 + - cor0.col0 * + col0 FROM tab2 AS cor0
----
-42
-6006
-6162

onlyif mysql # use DIV operator for integer division
query I rowsort label-9945
SELECT + - col2 DIV ( cor0.col1 ) FROM tab1 cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-9945
SELECT + - col2 / ( cor0.col1 ) FROM tab1 cor0
----
-2
-5
-7

query I rowsort
SELECT - col0 * + ( - col0 ) * - col0 + ( 39 ) AS col0 FROM tab1 AS cor0
----
-262105
-511961
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * 12 + col1 col0 FROM tab0 AS cor0
----
1159
374
517

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9948
SELECT + col0 + CAST( col0 * col0 + col2 * + ( col2 ) AS SIGNED ) FROM tab1 AS cor0
----
15696
2928
7409

skipif mysql # not compatible
query I rowsort label-9948
SELECT + col0 + CAST ( col0 * col0 + col2 * + ( col2 ) AS INTEGER ) FROM tab1 AS cor0
----
15696
2928
7409

query I rowsort
SELECT - - col0 * cor0.col0 + col2 AS col1 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT ALL + col2 + 26 * + col0 AS col0 FROM tab2 cor0
----
2054
209
2092

onlyif mysql # use DIV operator for integer division
query I rowsort label-9951
SELECT + col2 + col1 DIV - col1 AS col1 FROM tab1 AS cor0
----
53
56
95

skipif mysql # not compatible
query I rowsort label-9951
SELECT + col2 + col1 / - col1 AS col1 FROM tab1 AS cor0
----
53
56
95

query I rowsort
SELECT ALL + + col2 + ( col1 ) * col1 AS col1 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT + - cor0.col0 + - col1 FROM tab1 cor0
----
-29
-74
-93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9954
SELECT DISTINCT col2 * CAST( - col2 + + col2 AS SIGNED ) col1 FROM tab1 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9954
SELECT DISTINCT col2 * CAST ( - col2 + + col2 AS INTEGER ) col1 FROM tab1 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9955
SELECT DISTINCT - col0 + - 6 DIV + col1 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-9955
SELECT DISTINCT - col0 + - 6 / + col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL col2 * + 27 + - col2 FROM tab0 AS cor0
----
2132
26
858

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0, tab1 cor0, tab0 AS cor1
----
972 values hashing to 95920403df268a272c4e933cd0bbe0be

query I rowsort
SELECT col1 * - tab2.col0 * ( 3 + col0 ) FROM tab2
----
-110126
-2170
-372762

query I rowsort
SELECT ALL + - col2 + 73 AS col2 FROM tab0 AS cor0
----
-9
40
72

query I rowsort
SELECT ALL - + cor0.col0 * + cor0.col2 + - 29 AS col1 FROM tab2 cor0
----
-2057
-218
-3031

query I rowsort
SELECT DISTINCT - cor0.col2 * 67 AS col2 FROM tab2 AS cor0
----
-1742
-1809
-2546

query I rowsort
SELECT DISTINCT col2 * + ( col1 ) AS col0 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9963
SELECT - cor0.col1 * CAST( NULL AS SIGNED ) + + col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9963
SELECT - cor0.col1 * CAST ( NULL AS INTEGER ) + + col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 * - cor0.col2 + col1 col1 FROM tab1 cor0
----
1261
1430
580

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * - col2 col2 FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT + col2 * col0 * + tab1.col1 + col2 - col0 FROM tab1
----
36473
4263
99856

query I rowsort
SELECT ALL tab0.col2 + + col0 + col0 FROM tab0
----
260
71
81

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT - col2 NOT IN ( + tab0.col0 * + col2 )
----

query I rowsort
SELECT ALL + col0 + - col1 * + col1 FROM tab0
----
-7372
-8192
-9374

query I rowsort
SELECT + col0 + - col0 + + col1 AS col1 FROM tab1
----
10
13
26

query I rowsort
SELECT DISTINCT col2 + col1 * - col0 * col2 AS col0 FROM tab1
----
-36423
-4158
-99744

query I rowsort
SELECT ALL + col0 * col1 + + col2 + - col2 AS col2 FROM tab1
----
1040
640
78

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT ( NULL ) < ( col0 )
----

query I rowsort
SELECT - col0 * - col0 + + col1 AS col1 FROM tab2
----
6143
6258
80

query I rowsort
SELECT DISTINCT - col1 * col1 + col1 + + tab0.col1 FROM tab0
----
-7224
-8099
-9215

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 17 col0 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to e0dd9155e4d67132637a04c18ef46b2a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col1 col2 FROM tab1 cor0
----
100
169
676

query I rowsort
SELECT - - 91 + col2 FROM tab0 AS cor0
----
124
173
92

query I rowsort
SELECT ALL + - 72 - + col1 FROM tab0 AS cor0
----
-158
-163
-169

query I rowsort
SELECT ALL - tab0.col1 * col2 * 19 FROM tab0
----
-141778
-1843
-53922

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * cor0.col0 col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + + 82 + - col2 FROM tab2 AS cor0
----
44
55
56

skipif mysql # not compatible
query I rowsort
SELECT - + 34 + + col1 * CAST ( col1 AS REAL ) * col0 AS col1 FROM tab2 cor0
----
22797
271484
6693

query I rowsort
SELECT DISTINCT + + 7 + + col0 + cor0.col1 FROM tab1 AS cor0
----
100
36
81

query I rowsort
SELECT DISTINCT - cor0.col2 + + cor0.col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT col1 * + col1 * - ( + col1 * + col1 ) + - ( col2 ) AS col1 FROM tab0 AS cor0
----
-54700849
-68575043
-88529282

onlyif mysql # use DIV operator for integer division
query I rowsort label-9987
SELECT + col1 DIV col0 + 96 + + col2 AS col1 FROM tab1 cor0
----
153
158
192

skipif mysql # not compatible
query I rowsort label-9987
SELECT + col1 / col0 + 96 + + col2 AS col1 FROM tab1 cor0
----
153
158
192

query I rowsort
SELECT ALL - - ( - col2 ) * + col0 * ( col2 ) AS col0 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT - 20 * + col2 + + col2 FROM tab2 AS cor0
----
-494
-513
-722

query I rowsort
SELECT DISTINCT - - col2 * + col0 AS col2 FROM tab2 cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-9991
SELECT ALL + col2 + col2 DIV + 3 FROM tab2 AS cor0
----
34
36
50

skipif mysql # not compatible
query I rowsort label-9991
SELECT ALL + col2 + col2 / + 3 FROM tab2 AS cor0
----
34
36
50

query I rowsort
SELECT ALL - 23 * 80 FROM tab2, tab1 AS cor0
----
9 values hashing to 25ffb4a140813205355c9802190e32f4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * ( cor0.col1 ) col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - + col1 + + ( + 15 ) AS col0 FROM tab1 AS cor0
----
-11
2
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col0 * col2 - col2 col1 FROM tab0 AS cor0
----
34
7216
759

onlyif mysql # use DIV operator for integer division
query I rowsort label-9996
SELECT DISTINCT + col2 DIV - col0 col2 FROM tab2 AS cor0
----
-3
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9996
SELECT DISTINCT + col2 / - col0 col2 FROM tab2 AS cor0
----
-3
0

query I rowsort
SELECT 56 AS col1 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to b5ba4b44e3deadce1edb30e76df61200

query I rowsort
SELECT - - 40 * 53 - + cor0.col2 AS col0 FROM tab1 cor0
----
2024
2063
2066

query I rowsort
SELECT ALL 27 AS col1 FROM tab0, tab2 cor0
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

