sqllogictest
Artifact Content
Not logged in

Artifact 71636cf7254416333ef1a8655590a33a2df89e85:


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