sqllogictest
Artifact Content
Not logged in

Artifact b39b14fbd7ca74f048ec95aae84787eca7e70bfa:


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 ALL + col1 * + ( col2 ) AS col0 FROM tab0 AS cor0
----
2838
7462
97

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

query I rowsort
SELECT DISTINCT col2 * + 29 AS col2 FROM tab1 AS cor0
----
1566
1653
2784

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 44 ) col0 FROM tab2
----
-44
-44
-44

query I rowsort
SELECT cor1.col1 AS col2 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT ALL + + col2 + col2 * col2 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT ALL - + 78 + + cor0.col2 FROM tab0 AS cor0
----
-45
-77
4

query I rowsort
SELECT ALL - - col1 + 10 AS col0 FROM tab1 AS cor0
----
20
23
36

query I rowsort
SELECT 97 * - col2 + col2 FROM tab0
----
-3168
-7872
-96

query I rowsort
SELECT DISTINCT col0 * 54 FROM tab2
----
378
4212
4266

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

query I rowsort
SELECT DISTINCT + col1 * col0 + - col2 FROM tab0 AS cor0
----
2031
3394
8017

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

query I rowsort
SELECT - 88 AS col0 FROM tab0 AS cor0
----
-88
-88
-88

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

query I rowsort
SELECT DISTINCT col0 + col0 * 24 AS col0 FROM tab2 AS cor0
----
175
1950
1975

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

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

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

query I rowsort
SELECT ALL - col1 + col2 - - ( col0 ) FROM tab0 AS cor0
----
-29
-61
80

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

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

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

query I rowsort
SELECT DISTINCT + + 27 * + col0 + + col0 FROM tab0 AS cor0
----
2492
672
980

query I rowsort
SELECT ALL + 63 * 53 AS col1 FROM tab1
----
3339
3339
3339

query I rowsort
SELECT ALL + 26 * + cor0.col0 + + cor0.col0 AS col1 FROM tab2 AS cor0
----
189
2106
2133

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

query I rowsort
SELECT ALL - - 51 + + col1 * col0 AS col2 FROM tab2 AS cor0
----
1394
268
4653

query I rowsort
SELECT DISTINCT + 70 * - col0 * + col2 FROM tab1 AS cor0
----
-11340
-255360
-537600

query I rowsort
SELECT + 38 FROM tab0 cor0
----
38
38
38

query I rowsort
SELECT cor0.col2 AS col1 FROM tab1, tab0, tab0 AS cor0, tab1 AS cor1
----
81 values hashing to e938777ebffc2e3e9c0cdfaa4f732c05

query I rowsort
SELECT 21 FROM tab0, tab2, tab0 cor0
----
27 values hashing to 312c166f4dc412730c43555105b1f44b

query I rowsort
SELECT + - 27 * - cor0.col0 AS col2 FROM tab1, tab0 cor0
----
9 values hashing to 279bd4cfe7bb93189cfd25e32dc885e3

query I rowsort
SELECT + 45 * - cor0.col2 FROM tab0 AS cor0
----
-1485
-3690
-45

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

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

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

query I rowsort
SELECT + cor0.col2 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT - cor0.col1 * col1 * + col0 AS col2 FROM tab2 AS cor0
----
-22831
-271518
-6727

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

skipif mysql # not compatible
query I rowsort label-44
SELECT ALL cor0.col0 + 94 / col2 FROM tab1 AS cor0
----
4
65
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-45
SELECT 71 * col1 + col0 + + col0 * col2 DIV col1 col2 FROM tab2 AS cor0
----
1462
2214
4301

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-45
SELECT 71 * col1 + col0 + + col0 * col2 / col1 col2 FROM tab2 AS cor0
----
1462
2214
4301

query I rowsort
SELECT + 60 * + ( - col1 ) * ( col2 ) FROM tab1 AS cor0
----
-34200
-74880
-84240

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + ( - ( col1 ) ) col0 FROM tab2 AS cor0
----
17
31
59

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-49
SELECT ALL - cor0.col0 DIV - 16 + col1 AS col0 FROM tab1 AS cor0
----
14
18
26

skipif mysql # not compatible
query I rowsort label-49
SELECT ALL - cor0.col0 / - 16 + col1 AS col0 FROM tab1 AS cor0
----
14
18
26

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

query I rowsort
SELECT ALL + 80 * ( + col1 ) + - col1 AS col1 FROM tab1 cor0
----
1027
2054
790

query I rowsort
SELECT + col0 + 39 + col0 AS col2 FROM tab2 AS cor0
----
195
197
53

onlyif mysql # use DIV operator for integer division
query I rowsort label-53
SELECT - 96 * - 8 + - col2 + col0 DIV col1 FROM tab1 AS cor0
----
678
714
717

skipif mysql # not compatible
query I rowsort label-53
SELECT - 96 * - 8 + - col2 + col0 / col1 FROM tab1 AS cor0
----
678
714
717

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

query I rowsort
SELECT DISTINCT 51 FROM tab0 AS cor0
----
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-56
SELECT DISTINCT + + CAST( - ( cor0.col1 ) AS SIGNED ) + col2 FROM tab2 cor0
----
-33
-4
21

skipif mysql # not compatible
query I rowsort label-56
SELECT DISTINCT + + CAST ( - ( cor0.col1 ) AS INTEGER ) + col2 FROM tab2 cor0
----
-33
-4
21

query I rowsort
SELECT ALL tab0.col1 + 29 FROM tab0
----
115
120
126

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

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

query I rowsort
SELECT 5 + 12 FROM tab1 cor0
----
17
17
17

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

query I rowsort
SELECT 53 + col0 AS col1 FROM tab2
----
131
132
60

query I rowsort
SELECT + 51 + col0 AS col2 FROM tab1 AS cor0
----
115
131
54

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

query I rowsort
SELECT + col1 + + 17 FROM tab0 AS cor0
----
103
108
114

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * 78 + col2 + - col2 col2 FROM tab1 AS cor0
----
-4212
-4446
-7488

query I rowsort
SELECT + cor0.col2 * + col1 * 25 FROM tab0 AS cor0
----
186550
2425
70950

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

skipif mysql # not compatible
query I rowsort label-68
SELECT col0 * - cor0.col2 + ( col1 ) * col0 / col1 AS col1 FROM tab0 AS cor0
----
-7209
-768
0

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

query I rowsort
SELECT DISTINCT col2 * - col2 + - col2 AS col1 FROM tab0 AS cor0
----
-1122
-2
-6806

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-75
SELECT - - col1 * col1 DIV col2 - col1 * + col2 AS col2 FROM tab0 AS cor0
----
-2614
-7362
9312

skipif mysql # not compatible
query I rowsort label-75
SELECT - - col1 * col1 / col2 - col1 * + col2 AS col2 FROM tab0 AS cor0
----
-2614
-7362
9312

query I rowsort
SELECT 77 FROM tab1, tab2 cor0
----
9 values hashing to 051bf10c50e061d74ad0a4d205a1c622

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

query I rowsort
SELECT + 1 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

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

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0, tab0, tab2 AS cor1
----
972 values hashing to 9600bdf5bac0caec3229e87170cc40b3

query I rowsort
SELECT 10 FROM tab2
----
10
10
10

query I rowsort
SELECT 59 FROM tab0
----
59
59
59

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

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

query I rowsort
SELECT ALL 63 FROM tab0
----
63
63
63

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

query I rowsort
SELECT + ( - cor0.col2 ) AS col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

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

query I rowsort
SELECT cor0.col2 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

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

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

query I rowsort
SELECT - - 77 FROM tab1 AS cor0
----
77
77
77

query I rowsort
SELECT col0 + - col1 + + col2 AS col2 FROM tab1
----
111
163
31

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 - col1 * + col0 col0 FROM tab2
----
-1305
-190
-4576

onlyif mysql # use DIV operator for integer division
query I rowsort label-96
SELECT ALL + col2 DIV - col1 - col1 * - tab2.col0 DIV + col0 AS col2 FROM tab2
----
15
31
59

skipif mysql # not compatible
query I rowsort label-96
SELECT ALL + col2 / - col1 - col1 * - tab2.col0 / + col0 AS col2 FROM tab2
----
15
31
59

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - col0 + + col1 * col1 FROM tab2
----
210
3403
954

onlyif mysql # use DIV operator for integer division
query I rowsort label-106
SELECT ALL CAST( col2 AS SIGNED ) * tab1.col2 + + col1 + - col2 DIV + tab1.col0 col1 FROM tab1
----
2924
3259
9228

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-106
SELECT ALL CAST ( col2 AS INTEGER ) * tab1.col2 + + col1 + - col2 / + tab1.col0 col1 FROM tab1
----
2924
3259
9228

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

query I rowsort
SELECT ALL ( - ( col1 ) ) FROM tab1
----
-10
-13
-26

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

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

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

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

query I rowsort
SELECT + + 47 + + 5 * + col1 AS col0 FROM tab1 AS cor0
----
112
177
97

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

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

query I rowsort
SELECT DISTINCT - + 89 AS col2 FROM tab2 cor0
----
-89

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

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

query I rowsort
SELECT 38 AS col0 FROM tab2 AS cor0
----
38
38
38

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 col2 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT 9 + col0 * - col1 + col0 * + col2 AS col0 FROM tab1 AS cor0
----
3017
6649
93

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

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

query I rowsort
SELECT + cor0.col0 * col0 * col2 FROM tab2 AS cor0
----
1323
158184
237158

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

query I rowsort
SELECT + 92 FROM tab0 AS cor0
----
92
92
92

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-134
SELECT ALL + - col0 + col2 DIV col2 AS col2 FROM tab0 cor0
----
-23
-34
-88

skipif mysql # not compatible
query I rowsort label-134
SELECT ALL + - col0 + col2 / col2 AS col2 FROM tab0 cor0
----
-23
-34
-88

query I rowsort
SELECT col2 * col0 * - col0 + + col2 AS col1 FROM tab1
----
-233415
-432
-614304

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

query I rowsort
SELECT 69 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 2810c3097fe4771e273cfff903357b40

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

query I rowsort
SELECT + ( - col2 ) * col2 + + col1 FROM tab2
----
-1427
-617
-698

query I rowsort
SELECT 91 + + col0 FROM tab2
----
169
170
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-141
SELECT DISTINCT - CAST( + ( + col1 ) AS SIGNED ) * - col2 FROM tab0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-141
SELECT DISTINCT - CAST ( + ( + col1 ) AS INTEGER ) * - col2 FROM tab0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-142
SELECT DISTINCT ( + 38 ) DIV tab0.col2 FROM tab0
----
0
1
38

skipif mysql # not compatible
query I rowsort label-142
SELECT DISTINCT ( + 38 ) / tab0.col2 FROM tab0
----
0
1
38

query I rowsort
SELECT ALL - 19 AS col1 FROM tab1
----
-19
-19
-19

query I rowsort
SELECT ALL ( col1 ) AS col0 FROM tab1
----
10
13
26

query I rowsort
SELECT - 4 - col2 * + col0 AS col2 FROM tab1 AS cor0
----
-166
-3652
-7684

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

query I rowsort
SELECT + - 49 + col2 * - ( - 63 * - col0 + col0 ) FROM tab1 cor0
----
-10417
-233521
-491569

query I rowsort
SELECT DISTINCT + col1 + - col0 * - col1 - - col0 FROM tab2
----
1439
255
4739

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

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0, tab2 cor0
----
243 values hashing to 60bd71ee2159222231bb3b5819bc5dca

query I rowsort
SELECT ( 35 * tab1.col2 ) FROM tab1
----
1890
1995
3360

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

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

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

query I rowsort
SELECT ( 31 * - col1 ) AS col0 FROM tab2
----
-1829
-527
-961

query I rowsort
SELECT DISTINCT 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 ALL + 58 * col2 + - 60 col2 FROM tab2
----
1448
1506
2144

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-159
SELECT DISTINCT + col2 * CAST( 24 + col0 AS SIGNED ) FROM tab0 AS cor0
----
1584
59
9266

skipif mysql # not compatible
query I rowsort label-159
SELECT DISTINCT + col2 * CAST ( 24 + col0 AS INTEGER ) FROM tab0 AS cor0
----
1584
59
9266

query I rowsort
SELECT ALL - + col1 + 9 FROM tab0 AS cor0
----
-77
-82
-88

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

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

query I rowsort
SELECT DISTINCT - col1 + - 42 * - col0 * - col2 AS col0 FROM tab2 AS cor0
----
-126101
-7969
-85235

query I rowsort
SELECT ALL + ( col1 * + col1 ) + - col0 + col0 * col2 FROM tab1
----
3684
7769
835

query I rowsort
SELECT col0 + col0 * + ( col1 ) * - col1 + col1 FROM tab0
----
-177394
-329183
-736829

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

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

query I rowsort
SELECT DISTINCT + 10 + col1 AS col0 FROM tab1
----
20
23
36

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

query I rowsort
SELECT DISTINCT + 96 + col1 AS col1 FROM tab0
----
182
187
193

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

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

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

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

query I rowsort
SELECT - - col2 + ( - 29 + - col2 ) * - col2 * 58 FROM tab0 cor0
----
118701
1741
527998

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

query I rowsort
SELECT DISTINCT - col1 * + ( col0 + cor0.col1 ) * col0 FROM tab0 AS cor0
----
-1457820
-227040
-448140

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

query I rowsort
SELECT DISTINCT - col2 * 21 AS col2 FROM tab1 AS cor0
----
-1134
-1197
-2016

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

query I rowsort
SELECT ALL - col1 + 52 * + cor0.col1 AS col2 FROM tab2 AS cor0
----
1581
3009
867

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 * col0 * - col2 col2 FROM tab1 AS cor0
----
233472
486
614400

onlyif mysql # use DIV operator for integer division
query I rowsort label-182
SELECT DISTINCT - col2 * 31 * col0 + cor0.col0 DIV + ( 46 ) FROM tab1 cor0
----
-113087
-238079
-5022

skipif mysql # not compatible
query I rowsort label-182
SELECT DISTINCT - col2 * 31 * col0 + cor0.col0 / + ( 46 ) FROM tab1 cor0
----
-113087
-238079
-5022

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

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

query I rowsort
SELECT DISTINCT cor0.col2 * col0 + 75 AS col2 FROM tab0 AS cor0
----
110
7373
867

query I rowsort
SELECT ALL + col2 * ( col0 ) - + col1 FROM tab0 AS cor0
----
-62
706
7207

query I rowsort
SELECT - col0 * + col0 * + col0 AS col2 FROM tab1 AS cor0
----
-262144
-27
-512000

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

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

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

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

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

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

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

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

query I rowsort
SELECT - cor0.col2 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col0 FROM tab2
----
26
27
38

query I rowsort
SELECT - 57 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 520dc393896969e02a72ab6c5d92126b

query I rowsort
SELECT DISTINCT + col0 * col1 + - col2 AS col0 FROM tab0 AS cor0
----
2031
3394
8017

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

query I rowsort
SELECT ALL + - ( ( col1 ) ) + + 37 FROM tab0 AS cor0
----
-49
-54
-60

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

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

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

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

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 cor0 CROSS JOIN tab2, tab1 AS cor1
----
972 values hashing to 980274175fafec015a83080672486a9a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col1 col2 FROM tab2, tab2 AS cor0
----
17
31
59

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

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

query I rowsort
SELECT ( - col1 ) + + col2 * 55 FROM tab2 AS cor0
----
1371
1454
2073

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

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

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

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

skipif mysql # not compatible
query I rowsort label-212
SELECT + col1 / col0 AS col2 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT DISTINCT - - col0 * col2 FROM tab1 AS cor0
----
162
3648
7680

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

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

query I rowsort
SELECT + 70 + - col1 - - 67 FROM tab1 AS cor0
----
111
124
127

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0, tab0, tab0 AS cor1
----
972 values hashing to ea0f747588ddf5869ee18a5e22d9f237

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

query I rowsort
SELECT DISTINCT 9 + col2 AS col1 FROM tab2 AS cor0
----
35
36
47

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-220
SELECT DISTINCT 33 * col0 DIV ( col0 * col0 ) + 39 AS col0 FROM tab1 AS cor0
----
39
50

skipif mysql # not compatible
query I rowsort label-220
SELECT DISTINCT 33 * col0 / ( col0 * col0 ) + 39 AS col0 FROM tab1 AS cor0
----
39
50

query I rowsort
SELECT + - 55 * col0 + - col1 FROM tab2 AS cor0
----
-416
-4349
-4362

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

query I rowsort
SELECT DISTINCT 89 FROM tab2 AS cor0
----
89

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-225
SELECT - ( - col2 ) DIV col1 + ( - cor0.col2 + - 88 ) AS col1 FROM tab1 AS cor0
----
-140
-140
-177

skipif mysql # not compatible
query I rowsort label-225
SELECT - ( - col2 ) / col1 + ( - cor0.col2 + - 88 ) AS col1 FROM tab1 AS cor0
----
-140
-140
-177

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

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

skipif mysql # not compatible
query I rowsort label-227
SELECT ALL - col2 / + col2 FROM tab1 AS cor0
----
-1
-1
-1

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

query I rowsort
SELECT - col2 + ( - 19 ) + - col0 * col0 FROM tab2 AS cor0
----
-6129
-6298
-95

query I rowsort
SELECT + + cor0.col1 * - 7 * col1 FROM tab0 AS cor0
----
-51772
-57967
-65863

query I rowsort
SELECT col2 * 6 AS col2 FROM tab2 AS cor0
----
156
162
228

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col0 + - col1 col2 FROM tab1
----
-29
-74
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 20 col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-235
SELECT col2 DIV col1 col0 FROM tab2
----
0
0
2

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

query I rowsort
SELECT 78 * + col2 + 14 * col2 + tab1.col2 AS col2 FROM tab1
----
5022
5301
8928

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

query I rowsort
SELECT ALL col0 * + col1 AS col2 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT ALL - col2 * + col1 * ( - ( col0 ) * + 66 + + col0 ) AS col0 FROM tab1
----
2371200
273780
6489600

query I rowsort
SELECT col1 + - col0 * 84 AS col0 FROM tab0 cor0
----
-1930
-2843
-7385

query I rowsort
SELECT col1 + - col1 FROM tab1
----
0
0
0

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

query I rowsort
SELECT DISTINCT 23 * cor0.col1 AS col1 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
1357
391
713

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + - 14 col2 FROM tab0 AS cor0
----
-100
-105
-111

query I rowsort
SELECT - cor0.col1 + - 34 AS col0 FROM tab1 AS cor0
----
-44
-47
-60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 - - col2 col0 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT - cor0.col2 * ( + cor0.col2 ) + + col0 * + ( - col2 + col1 ) AS col1 FROM tab1 AS cor0
----
-15856
-3000
-6257

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

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

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

query I rowsort
SELECT ALL - ( + col2 ) AS col1 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT col2 + ( 46 ) FROM tab0 AS cor0
----
128
47
79

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT cor0.col2 AS col2 FROM tab0, tab0 AS cor0, tab2, tab2 AS cor1
----
81 values hashing to e938777ebffc2e3e9c0cdfaa4f732c05

query I rowsort
SELECT 16 * col1 + - col0 + 18 FROM tab1 AS cor0
----
114
146
431

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-264
SELECT + ( - col0 ) DIV - cor0.col1 + col2 FROM tab1 AS cor0
----
102
54
63

skipif mysql # not compatible
query I rowsort label-264
SELECT + ( - col0 ) / - cor0.col1 + col2 FROM tab1 AS cor0
----
102
54
63

query I rowsort
SELECT + cor0.col0 + 12 FROM tab2 AS cor0
----
19
90
91

query I rowsort
SELECT + - cor0.col1 * col1 AS col2 FROM tab1 AS cor0
----
-100
-169
-676

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

query I rowsort
SELECT DISTINCT - 0 FROM tab2 AS cor0
----
0

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

query I rowsort
SELECT 80 FROM tab0
----
80
80
80

query I rowsort
SELECT DISTINCT ( + 98 ) * + col2 FROM tab0
----
3234
8036
98

query I rowsort
SELECT 81 + - cor0.col0 FROM tab1, tab1 cor0
----
9 values hashing to 9c736485115ac0d16850ce1de0638050

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0, tab2, tab2 AS cor1
----
972 values hashing to a47a9db07c7de4927c7c28efb4cd13f2

query I rowsort
SELECT ALL - cor0.col0 * - 46 FROM tab0 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 47332122c626b044d782a3115598aecb

query I rowsort
SELECT tab1.col0 * tab1.col0 * 82 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to a17c1ec4466e4dbf8c538dbab78df611

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

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

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

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

query I rowsort
SELECT DISTINCT + + col0 * + col2 + col2 * + col1 AS col2 FROM tab1 cor0
----
1566
4218
8928

query I rowsort
SELECT - ( col1 ) FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT ALL col2 * cor0.col2 AS col1 FROM tab2 AS cor0
----
1444
676
729

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

query I rowsort
SELECT DISTINCT + 78 + col1 FROM tab2 cor0
----
109
137
95

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

query I rowsort
SELECT ALL + 33 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

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

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

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

query I rowsort
SELECT DISTINCT 6 * + col2 FROM tab2 AS cor0
----
156
162
228

onlyif mysql # use DIV operator for integer division
query I rowsort label-291
SELECT DISTINCT - - 61 DIV - col0 AS col1 FROM tab1 AS cor0
----
-20
0

skipif mysql # not compatible
query I rowsort label-291
SELECT DISTINCT - - 61 / - col0 AS col1 FROM tab1 AS cor0
----
-20
0

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

query I rowsort
SELECT DISTINCT - 79 * col2 + col1 FROM tab2 AS cor0
----
-1995
-2102
-2985

query I rowsort
SELECT ALL - 97 + + col1 FROM tab2 AS cor0
----
-38
-66
-80

query I rowsort
SELECT DISTINCT - - 5 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
5

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

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

query I rowsort
SELECT + col0 * cor0.col0 + - col0 AS col1 FROM tab1 AS cor0
----
4032
6
6320

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

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

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

query I rowsort
SELECT 68 FROM tab1, tab1 AS cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-303
SELECT DISTINCT 80 DIV 46 + col0 * + 9 AS col2 FROM tab0 AS cor0
----
217
316
802

skipif mysql # not compatible
query I rowsort label-303
SELECT DISTINCT 80 / 46 + col0 * + 9 AS col2 FROM tab0 AS cor0
----
217
316
802

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

query I rowsort
SELECT + + col2 + col2 AS col1 FROM tab2 AS cor0
----
52
54
76

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

query I rowsort
SELECT DISTINCT + + col1 + 24 + - col0 FROM tab1 AS cor0
----
-30
-43
47

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

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

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

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

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

query I rowsort
SELECT ALL - 54 + col2 FROM tab1
----
0
3
42

query I rowsort
SELECT DISTINCT - + col0 * 73 + col2 AS col0 FROM tab0 AS cor0
----
-1719
-2554
-6415

query I rowsort
SELECT - + 8 * - 47 + - col1 FROM tab2 cor0
----
317
345
359

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

query I rowsort
SELECT - 70 AS col0 FROM tab1, tab1 cor0
----
9 values hashing to 35707a5d99c98b2657c084a50ff1b073

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

query I rowsort
SELECT + 79 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 40a2261caa2c5cdbfd80965d7df1231f

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

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

query I rowsort
SELECT + cor0.col2 * - ( - 33 ) + + cor0.col1 FROM tab0 AS cor0
----
1175
130
2797

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col2 * col2 + col1 col2 FROM tab2 AS cor0
----
1461
735
760

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

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

query I rowsort
SELECT ALL + col1 * + col1 + col0 * col0 FROM tab0 AS cor0
----
10634
16202
7972

query I rowsort
SELECT DISTINCT + col1 + 38 * - col2 FROM tab1 AS cor0
----
-2026
-2156
-3635

onlyif mysql # use DIV operator for integer division
query I rowsort label-327
SELECT ALL col1 DIV col1 FROM tab2 AS cor0
----
1
1
1

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

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

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

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

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

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

query I rowsort
SELECT ALL - 26 - + col0 * col1 AS col0 FROM tab1 AS cor0
----
-104
-1066
-666

query I rowsort
SELECT - 16 * + col0 AS col0 FROM tab0 cor0
----
-1424
-384
-560

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

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

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

query I rowsort
SELECT col2 * - 85 FROM tab2 AS cor0
----
-2210
-2295
-3230

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

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

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

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

query I rowsort
SELECT + 26 + cor0.col0 + col2 FROM tab1 AS cor0
----
147
202
83

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

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

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

query I rowsort
SELECT DISTINCT - col2 FROM tab2 cor0
----
-26
-27
-38

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 82 col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to ce62f59690969f4492d78eb57c3181f0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-348
SELECT ALL - - ( col1 ) * - CAST( 44 * col2 AS SIGNED ) col1 FROM tab1 cor0
----
-25080
-54912
-61776

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-348
SELECT ALL - - ( col1 ) * - CAST ( 44 * col2 AS INTEGER ) col1 FROM tab1 cor0
----
-25080
-54912
-61776

query I rowsort
SELECT DISTINCT + col2 + col0 * 77 AS col0 FROM tab2 AS cor0
----
566
6032
6121

onlyif mysql # use DIV operator for integer division
query I rowsort label-350
SELECT ALL + - 23 + cor0.col1 DIV col2 FROM tab0 AS cor0
----
-21
-22
74

skipif mysql # not compatible
query I rowsort label-350
SELECT ALL + - 23 + cor0.col1 / col2 FROM tab0 AS cor0
----
-21
-22
74

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

query I rowsort
SELECT - + 51 + + cor0.col1 AS col0 FROM tab2 AS cor0
----
-20
-34
8

query I rowsort
SELECT ALL - col1 - - 2 * col1 FROM tab2
----
17
31
59

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

query I rowsort
SELECT DISTINCT + - 49 * col0 AS col0 FROM tab0 AS cor0
----
-1176
-1715
-4361

query I rowsort
SELECT DISTINCT + 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-357
SELECT + col1 / col2 + - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

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

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

query I rowsort
SELECT - cor0.col1 + ( + 23 ) * - col1 FROM tab2 AS cor0
----
-1416
-408
-744

onlyif mysql # use DIV operator for integer division
query I rowsort label-360
SELECT ALL - col1 DIV col0 + col0 FROM tab2
----
3
78
79

skipif mysql # not compatible
query I rowsort label-360
SELECT ALL - col1 / col0 + col0 FROM tab2
----
3
78
79

query I rowsort
SELECT - col0 * 43 * + cor0.col1 FROM tab2 cor0
----
-197886
-57749
-9331

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

query I rowsort
SELECT cor0.col2 * - col2 + + col2 * col0 FROM tab0 AS cor0
----
-297
34
574

query I rowsort
SELECT - cor0.col2 + + col1 * 16 * col0 FROM tab0 AS cor0
----
129502
32991
54319

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + - col0 * col2 * col2 col1 FROM tab2
----
-113997
-5096
-52650

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

query I rowsort
SELECT ALL - col2 * - col1 + col1 + + col1 FROM tab0
----
291
3010
7644

query I rowsort
SELECT col1 * 56 + cor0.col0 AS col0 FROM tab2 AS cor0
----
1031
1743
3382

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

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

query I rowsort
SELECT + cor0.col1 * + cor0.col2 FROM tab0, tab0 AS cor0
----
9 values hashing to b2e5b025b1c725661248b0f29aaef908

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

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

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

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

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1, tab2 AS cor0, tab0
----
972 values hashing to 58757c5bbbd4217c03cf2ac0b6126e55

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

skipif mysql # not compatible
query I rowsort label-378
SELECT - - col2 / + ( - col0 ) + col1 AS col1 FROM tab1 AS cor0
----
10
12
8

query I rowsort
SELECT ALL + 51 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to d8bf0a05c9c4d2a93812d106baae4752

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

query I rowsort
SELECT 61 AS col1 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 8d4dfe649433a599fc4b10830cc7ce55

query I rowsort
SELECT tab1.col2 * - 80 * - col1 FROM tab1
----
112320
45600
99840

query I rowsort
SELECT + col1 * col1 AS col2 FROM tab2
----
289
3481
961

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

query I rowsort
SELECT DISTINCT - tab1.col0 AS col2 FROM tab1
----
-3
-64
-80

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

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

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

query I rowsort
SELECT - 22 AS col2 FROM tab2
----
-22
-22
-22

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

query I rowsort
SELECT DISTINCT 89 + 20 AS col2 FROM tab1, tab0, tab0 AS cor0
----
109

query I rowsort
SELECT ALL - tab0.col2 * col0 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT cor0.col1 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT ALL + 36 * tab1.col0 FROM tab1
----
108
2304
2880

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

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

query I rowsort
SELECT ALL - 53 * + col1 AS col0 FROM tab0
----
-4558
-4823
-5141

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-399
SELECT DISTINCT - 87 DIV col0 + 70 * + col2 FROM tab1 AS cor0
----
3751
3989
6719

skipif mysql # not compatible
query I rowsort label-399
SELECT DISTINCT - 87 / col0 + 70 * + col2 FROM tab1 AS cor0
----
3751
3989
6719

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

query I rowsort
SELECT - col1 - cor0.col1 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT - 50 + + col0 AS col0 FROM tab2 AS cor0
----
-43
28
29

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

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

query I rowsort
SELECT ALL - 93 * col0 AS col2 FROM tab0 AS cor0
----
-2232
-3255
-8277

query I rowsort
SELECT ALL 46 * - 7 AS col0 FROM tab1 cor0
----
-322
-322
-322

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

query I rowsort
SELECT DISTINCT - ( - col2 ) * + col0 * col0 + 87 FROM tab0 AS cor0
----
1312
19095
649609

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

query I rowsort
SELECT ALL - 48 - - 25 AS col2 FROM tab1 AS cor0
----
-23
-23
-23

query I rowsort
SELECT ALL + col1 * 29 FROM tab2
----
1711
493
899

query I rowsort
SELECT ALL col0 * - col0 + 71 AS col0 FROM tab0
----
-1154
-505
-7850

onlyif mysql # use DIV operator for integer division
query I rowsort label-413
SELECT DISTINCT + col1 + col2 DIV - tab1.col0 + tab1.col1 FROM tab1
----
20
25
34

skipif mysql # not compatible
query I rowsort label-413
SELECT DISTINCT + col1 + col2 / - tab1.col0 + tab1.col1 FROM tab1
----
20
25
34

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

query I rowsort
SELECT + - col1 * cor0.col1 FROM tab1 AS cor0
----
-100
-169
-676

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

query I rowsort
SELECT 65 * col2 AS col1 FROM tab1 AS cor0
----
3510
3705
6240

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

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

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

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

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

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

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

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

query I rowsort
SELECT - 45 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 71160abf09589695379a70558726f0ba

query I rowsort
SELECT + 78 * col2 + col0 * col1 AS col0 FROM tab0 AS cor0
----
14495
3473
4638

query I rowsort
SELECT - cor0.col1 + col1 * col2 * - col2 FROM tab2 AS cor0
----
-22630
-24565
-39943

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-429
SELECT ALL col0 DIV col0 AS col1 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-429
SELECT ALL col0 / col0 AS col1 FROM tab0
----
1
1
1

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col0 * + col0 col0 FROM tab1 AS cor0
----
262144
27
512000

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-433
SELECT ALL col1 * 58 + - col2 DIV col0 AS col1 FROM tab1
----
1490
580
753

skipif mysql # not compatible
query I rowsort label-433
SELECT ALL col1 * 58 + - col2 / col0 AS col1 FROM tab1
----
1490
580
753

query I rowsort
SELECT + + cor0.col2 * 59 FROM tab2 AS cor0
----
1534
1593
2242

query I rowsort
SELECT ALL col2 + tab1.col2 AS col0 FROM tab1
----
108
114
192

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

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

query I rowsort
SELECT DISTINCT + - col2 + - col2 FROM tab2 AS cor0
----
-52
-54
-76

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

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

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

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

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

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

query I rowsort
SELECT - col2 * 70 AS col1 FROM tab2 AS cor0
----
-1820
-1890
-2660

onlyif mysql # use DIV operator for integer division
query I rowsort label-444
SELECT ALL col0 DIV - 61 + - col1 FROM tab1 cor0
----
-11
-14
-26

skipif mysql # not compatible
query I rowsort label-444
SELECT ALL col0 / - 61 + - col1 FROM tab1 cor0
----
-11
-14
-26

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

query I rowsort
SELECT ALL col0 * - 12 + - 85 FROM tab0 AS cor0
----
-1153
-373
-505

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

query I rowsort
SELECT col1 + 51 * + col0 AS col2 FROM tab2 AS cor0
----
388
4037
4046

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

query I rowsort
SELECT + cor0.col0 * 10 + + 21 FROM tab0 cor0
----
261
371
911

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

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

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

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

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

query I rowsort
SELECT ALL + 24 FROM tab2 AS cor0
----
24
24
24

query I rowsort
SELECT + + ( col0 ) + cor0.col1 + 5 FROM tab0 AS cor0
----
115
137
185

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

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

query I rowsort
SELECT ALL - 19 AS col1 FROM tab1 AS cor0
----
-19
-19
-19

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

query I rowsort
SELECT DISTINCT 38 * col2 AS col0 FROM tab0 AS cor0
----
1254
3116
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-463
SELECT + - col0 DIV col1 + col2 * + col1 FROM tab2 AS cor0
----
1533
642
837

skipif mysql # not compatible
query I rowsort label-463
SELECT + - col0 / col1 + col2 * + col1 FROM tab2 AS cor0
----
1533
642
837

query I rowsort
SELECT DISTINCT ( cor0.col0 ) * + cor0.col0 * + cor0.col0 FROM tab1 AS cor0
----
262144
27
512000

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

skipif mysql # not compatible
query I rowsort label-465
SELECT DISTINCT cor0.col0 / col2 FROM tab0 AS cor0
----
0
1
35

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

query I rowsort
SELECT + 97 FROM tab1
----
97
97
97

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

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

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

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

query I rowsort
SELECT - cor0.col1 FROM tab0, tab1 cor0
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

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

query I rowsort
SELECT ( col2 * + col1 ) + 93 - + col1 AS col0 FROM tab1
----
1328
1471
653

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + ( + col0 + cor0.col2 ) col2 FROM tab1 AS cor0
----
111
163
31

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

query I rowsort
SELECT + 19 * + tab1.col1 FROM tab1
----
190
247
494

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-480
SELECT ALL col1 DIV - col0 + - 78 * + col0 FROM tab2
----
-550
-6084
-6162

skipif mysql # not compatible
query I rowsort label-480
SELECT ALL col1 / - col0 + - 78 * + col0 FROM tab2
----
-550
-6084
-6162

onlyif mysql # use DIV operator for integer division
query I rowsort label-481
SELECT ALL ( col2 ) DIV - col0 - - col1 * + col2 AS col0 FROM tab1
----
1247
1386
570

skipif mysql # not compatible
query I rowsort label-481
SELECT ALL ( col2 ) / - col0 - - col1 * + col2 AS col0 FROM tab1
----
1247
1386
570

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

query I rowsort
SELECT ALL + 25 * col1 - + 16 FROM tab1
----
234
309
634

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + col0 + col1 col2 FROM tab1
----
188
3658
7693

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab0, tab1 cor0 CROSS JOIN tab1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT DISTINCT col2 * tab1.col2 + + col1 FROM tab1
----
2942
3259
9229

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

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

query I rowsort
SELECT ALL - col2 * 29 AS col0 FROM tab1 AS cor0
----
-1566
-1653
-2784

onlyif mysql # use DIV operator for integer division
query I rowsort label-490
SELECT col1 + ( cor0.col2 ) DIV + col1 FROM tab1 AS cor0
----
15
20
28

skipif mysql # not compatible
query I rowsort label-490
SELECT col1 + ( cor0.col2 ) / + col1 FROM tab1 AS cor0
----
15
20
28

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-493
SELECT DISTINCT 55 DIV col0 + + col1 FROM tab0
----
88
91
98

skipif mysql # not compatible
query I rowsort label-493
SELECT DISTINCT 55 / col0 + + col1 FROM tab0
----
88
91
98

query I rowsort
SELECT ALL - + 70 * - col1 + col2 AS col0 FROM tab1 AS cor0
----
1006
1874
757

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor0.col0 + col1 col0 FROM tab1 cor0
----
29
74
93

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

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

query I rowsort
SELECT DISTINCT - 4 * + col2 + col2 * + col2 AS col1 FROM tab2 AS cor0
----
1292
572
621

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

query I rowsort
SELECT ALL - col0 * - ( col0 ) * col0 FROM tab2
----
343
474552
493039

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

skipif mysql # not compatible
query I rowsort label-504
SELECT - col1 * CAST ( col2 AS INTEGER ) FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT + tab1.col2 AS col1 FROM tab1, tab1 AS cor0, tab2 cor1
----
54
57
96

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

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

query I rowsort
SELECT DISTINCT + col1 - col0 * - ( - col1 ) * col1 AS col1 FROM tab1
----
-13507
-2002
-6390

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

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

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

query I rowsort
SELECT DISTINCT col0 + 37 FROM tab0 AS cor0
----
126
61
72

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-516
SELECT + 35 DIV col1 + - col1 FROM tab1 AS cor0
----
-11
-25
-7

skipif mysql # not compatible
query I rowsort label-516
SELECT + 35 / col1 + - col1 FROM tab1 AS cor0
----
-11
-25
-7

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

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

query I rowsort
SELECT cor0.col1 * cor0.col1 - col1 * + 24 FROM tab2 AS cor0
----
-119
2065
217

query I rowsort
SELECT DISTINCT 30 * col2 FROM tab0 AS cor0
----
2460
30
990

query I rowsort
SELECT - 15 + col0 AS col2 FROM tab0 AS cor0
----
20
74
9

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 65 * col1 col1 FROM tab1 AS cor0
----
1690
650
845

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

query I rowsort
SELECT - col1 * col1 * col2 + - 45 * - 15 - col0 FROM tab1 AS cor0
----
-15629
-35832
-5089

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-526
SELECT ALL + col1 DIV col1 + - col0 + ( + cor0.col1 ) * - col1 AS col0 FROM tab0 cor0
----
-7419
-8369
-9443

skipif mysql # not compatible
query I rowsort label-526
SELECT ALL + col1 / col1 + - col0 + ( + cor0.col1 ) * - col1 AS col0 FROM tab0 cor0
----
-7419
-8369
-9443

query I rowsort
SELECT - + col2 + - 83 * - col0 FROM tab2 cor0
----
554
6448
6519

query I rowsort
SELECT ALL - + 56 + col1 AS col0 FROM tab0 AS cor0
----
30
35
41

query I rowsort
SELECT DISTINCT + col2 + col1 * + col2 - - col1 * + col0 * col1 FROM tab0 AS cor0
----
180375
329413
744553

query I rowsort
SELECT - 34 * - 84 FROM tab2 AS cor0
----
2856
2856
2856

onlyif mysql # use DIV operator for integer division
query I rowsort label-531
SELECT - tab2.col0 + 64 DIV + col1 FROM tab2
----
-5
-76
-77

skipif mysql # not compatible
query I rowsort label-531
SELECT - tab2.col0 + 64 / + col1 FROM tab2
----
-5
-76
-77

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-533
SELECT DISTINCT + col1 * ( + col2 ) - - tab2.col1 * - CAST( + col1 AS SIGNED ) * col2 FROM tab2
----
-10336
-25110
-88972

skipif mysql # not compatible
query I rowsort label-533
SELECT DISTINCT + col1 * ( + col2 ) - - tab2.col1 * - CAST ( + col1 AS INTEGER ) * col2 FROM tab2
----
-10336
-25110
-88972

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

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

query I rowsort
SELECT DISTINCT col0 * 89 - - col2 * col1 AS col2 FROM tab1
----
1671
6266
8368

query I rowsort
SELECT + col2 * + ( + ( - col0 ) * - col2 + col1 * + col1 ) FROM tab0
----
1277478
270204
9444

query I rowsort
SELECT - col2 + 47 * - col0 + + col0 AS col1 FROM tab0
----
-1137
-1611
-4176

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

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

query I rowsort
SELECT + 1 FROM tab0, tab1 cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT DISTINCT + 45 FROM tab1
----
45

query I rowsort
SELECT + - 40 + - 96 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 5d01c2b128ae04f4bfa67282959e9d1a

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

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

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

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

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

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

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

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

query I rowsort
SELECT - 82 * + col2 FROM tab0 AS cor0
----
-2706
-6724
-82

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

query I rowsort
SELECT ALL 71 + + ( + col1 ) * - col2 + + 64 * + col2 * 95 AS col0 FROM tab0
----
197873
491169
6054

query I rowsort
SELECT ALL 96 + col0 * + col1 AS col1 FROM tab2
----
1439
313
4698

query I rowsort
SELECT - 81 + cor0.col1 - cor0.col0 AS col2 FROM tab1 AS cor0
----
-135
-148
-58

query I rowsort
SELECT col2 * col1 * - 92 - col1 AS col0 FROM tab2 cor0
----
-141187
-59449
-77035

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

query I rowsort
SELECT ALL - 9 FROM tab2, tab2 AS cor0
----
9 values hashing to caf28657beb43049740febe1fa9ded5a

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

query I rowsort
SELECT DISTINCT + 55 AS col0 FROM tab0
----
55

query I rowsort
SELECT 36 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

query I rowsort
SELECT + col1 * 39 FROM tab1 AS cor0
----
1014
390
507

query I rowsort
SELECT + col0 + 15 FROM tab1 AS cor0
----
18
79
95

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

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

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

query I rowsort
SELECT 46 AS col0 FROM tab1
----
46
46
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 17 col0 FROM tab0
----
-17

query I rowsort
SELECT ALL 57 FROM tab2, tab0 AS cor0
----
9 values hashing to 61da70c624ad60604a668f7f8f29392a

query I rowsort
SELECT DISTINCT + tab0.col1 * - 98 * - col1 AS col1 FROM tab0
----
724808
811538
922082

query I rowsort
SELECT DISTINCT cor0.col1 * 40 FROM tab1 AS cor0
----
1040
400
520

query I rowsort
SELECT col1 + 18 AS col1 FROM tab2 AS cor0
----
35
49
77

query I rowsort
SELECT ALL cor0.col2 * 49 + col2 AS col1 FROM tab1 cor0
----
2700
2850
4800

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

query I rowsort
SELECT DISTINCT + col2 * 90 * - col1 - col1 AS col1 FROM tab1 AS cor0
----
-112333
-126386
-51310

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + + 62 + + col2 col2 FROM tab2 AS cor0
----
10
21
82

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

query I rowsort
SELECT 14 * col1 * - col2 + - col1 + + col1 AS col0 FROM tab1 AS cor0
----
-17472
-19656
-7980

query I rowsort
SELECT DISTINCT + 56 + - 31 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
25

query I rowsort
SELECT ALL + ( cor0.col2 ) + 58 * 84 AS col2 FROM tab2 AS cor0
----
4898
4899
4910

query I rowsort
SELECT ALL - col1 + + col0 FROM tab0
----
-2
-62
-62

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

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

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

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

query I rowsort
SELECT ALL + + cor0.col2 AS col0 FROM tab2 AS cor0
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-588
SELECT + col2 + col0 DIV 12 + col0 FROM tab2 AS cor0
----
110
123
34

skipif mysql # not compatible
query I rowsort label-588
SELECT + col2 + col0 / 12 + col0 FROM tab2 AS cor0
----
110
123
34

query I rowsort
SELECT DISTINCT - cor0.col1 * col2 + - 25 FROM tab0 cor0
----
-122
-2863
-7487

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 42 * + col1 col0 FROM tab1
----
-1092
-420
-546

onlyif mysql # use DIV operator for integer division
query I rowsort label-591
SELECT cor0.col0 DIV + 16 FROM tab0, tab1 AS cor0
----
9 values hashing to 9ccb230d49a4928634b80b175f0d4257

skipif mysql # not compatible
query I rowsort label-591
SELECT cor0.col0 / + 16 FROM tab0, tab1 AS cor0
----
9 values hashing to 9ccb230d49a4928634b80b175f0d4257

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

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

query I rowsort
SELECT DISTINCT col2 * + col2 AS col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL col1 * col2 * - col1 + + col1 FROM tab0 cor0
----
-243982
-678951
-9312

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

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

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

query I rowsort
SELECT ALL 28 * + col2 + 43 FROM tab1
----
1555
1639
2731

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + col2 + - col0 col1 FROM tab2
----
-26
-3
47

query I rowsort
SELECT ALL + tab2.col2 + tab2.col1 + tab2.col0 FROM tab2
----
134
163
65

query I rowsort
SELECT ALL 57 AS col1 FROM tab1, tab2, tab2 cor0
----
27 values hashing to 220a93709e207779b34ef74b544764a5

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

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

query I rowsort
SELECT ALL + + 35 + - 23 AS col2 FROM tab1 AS cor0
----
12
12
12

query I rowsort
SELECT DISTINCT - col2 * 73 FROM tab2 AS cor0
----
-1898
-1971
-2774

query I rowsort
SELECT cor0.col1 + cor0.col0 + col1 * col0 FROM tab2 AS cor0
----
1439
255
4739

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

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

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

query I rowsort
SELECT - 64 * col2 - col1 AS col1 FROM tab1 AS cor0
----
-3482
-3658
-6157

query I rowsort
SELECT ALL + ( + ( + col1 ) ) * + 12 - - cor0.col2 FROM tab1 AS cor0
----
177
252
366

query I rowsort
SELECT DISTINCT - ( col2 ) AS col1 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT ALL tab1.col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - tab2.col1 ) - col0 col1 FROM tab2
----
-19
-62
24

query I rowsort
SELECT 23 FROM tab0, tab2 AS cor0
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

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

query I rowsort
SELECT DISTINCT + 57 * + cor0.col2 FROM tab1, tab1 AS cor0
----
3078
3249
5472

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

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

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-628
SELECT DISTINCT - 51 - + 72 * col1 DIV - tab0.col2 AS col0 FROM tab0
----
136
28
6933

skipif mysql # not compatible
query I rowsort label-628
SELECT DISTINCT - 51 - + 72 * col1 / - tab0.col2 AS col0 FROM tab0
----
136
28
6933

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

query I rowsort
SELECT - col1 + tab2.col1 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - col1 + - col1 + col2 col2 FROM tab1
----
106
1123
687

query I rowsort
SELECT ALL tab1.col1 - + 17 * + tab1.col2 FROM tab1
----
-1619
-892
-959

query I rowsort
SELECT 57 * + tab2.col1 AS col1 FROM tab2
----
1767
3363
969

query I rowsort
SELECT ALL ( + ( + tab0.col2 ) * col0 ) - + col2 FROM tab0
----
34
7216
759

onlyif mysql # use DIV operator for integer division
query I rowsort label-635
SELECT DISTINCT col1 DIV col2 + col1 * col1 AS col0 FROM tab1 AS cor0
----
100
169
676

skipif mysql # not compatible
query I rowsort label-635
SELECT DISTINCT col1 / col2 + col1 * col1 AS col0 FROM tab1 AS cor0
----
100
169
676

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

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

query I rowsort
SELECT 67 + tab1.col2 AS col1 FROM tab1
----
121
124
163

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

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

query I rowsort
SELECT + 81 * + col1 * col2 AS col1 FROM tab1
----
101088
113724
46170

query I rowsort
SELECT ALL 72 AS col1 FROM tab1 AS cor0
----
72
72
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 42 col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 64c29db9f1cd7ed4ddeb1735e3e0d442

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-644
SELECT ALL + col2 DIV col2 + - tab0.col1 FROM tab0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-644
SELECT ALL + col2 / col2 + - tab0.col1 FROM tab0
----
-85
-90
-96

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

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

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

query I rowsort
SELECT - ( + col1 ) * col1 + + col0 AS col1 FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT DISTINCT + + 51 + col1 FROM tab0 cor0
----
137
142
148

onlyif mysql # use DIV operator for integer division
query I rowsort label-650
SELECT ALL col0 * cor0.col1 DIV col0 + + col2 FROM tab1 AS cor0
----
109
67
80

skipif mysql # not compatible
query I rowsort label-650
SELECT ALL col0 * cor0.col1 / col0 + + col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT col1 + - col2 AS col2 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT ALL - col2 + col1 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT ( col0 ) * col1 + + col0 FROM tab0
----
2088
3430
8188

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

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

query I rowsort
SELECT ALL + 33 * col1 + - col2 FROM tab2 AS cor0
----
1921
523
996

query I rowsort
SELECT DISTINCT - - 19 - + col1 FROM tab2 AS cor0
----
-12
-40
2

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

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

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

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

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

query I rowsort
SELECT ALL + + 88 + col2 FROM tab2 AS cor0
----
114
115
126

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

query I rowsort
SELECT col2 * 42 FROM tab1 AS cor0
----
2268
2394
4032

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

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

query I rowsort
SELECT col2 + 31 AS col0 FROM tab1 cor0
----
127
85
88

query I rowsort
SELECT ALL - col0 * 61 + - col2 * col0 * col0 + - col1 * col0 AS col1 FROM tab0 cor0
----
-22536
-663050
-6755

query I rowsort
SELECT + col2 * 56 AS col2 FROM tab1 AS cor0
----
3024
3192
5376

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

query I rowsort
SELECT col2 + + 47 * 9 AS col1 FROM tab0 AS cor0
----
424
456
505

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

query I rowsort
SELECT ALL - - cor0.col1 + - 56 * col1 FROM tab1 AS cor0
----
-1430
-550
-715

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT + 41 FROM tab2, tab2 cor0
----
9 values hashing to 5b18986bb294412b3d9f07b7e6fc821e

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

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

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

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

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

query I rowsort
SELECT + + 74 * + ( - col1 + col1 ) FROM tab2 AS cor0
----
0
0
0

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

query I rowsort
SELECT - col0 * 64 + - 35 - + col1 AS col0 FROM tab0 AS cor0
----
-1657
-2372
-5822

onlyif mysql # use DIV operator for integer division
query I rowsort label-692
SELECT col0 * col1 DIV - col2 FROM tab0 AS cor0
----
-3395
-62
-98

skipif mysql # not compatible
query I rowsort label-692
SELECT col0 * col1 / - col2 FROM tab0 AS cor0
----
-3395
-62
-98

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

query I rowsort
SELECT + + col2 * 42 AS col0 FROM tab0 AS cor0
----
1386
3444
42

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

query I rowsort
SELECT ALL + col0 + + 76 FROM tab0 AS cor0
----
100
111
165

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

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

query I rowsort
SELECT + col2 - + ( + 33 ) AS col0 FROM tab0 cor0
----
-32
0
49

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

query I rowsort
SELECT + - col1 - + col2 * - ( col2 * col1 ) AS col0 FROM tab1 AS cor0
----
119795
32480
75790

query I rowsort
SELECT + tab0.col0 + col0 * 91 AS col1 FROM tab0
----
2208
3220
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-702
SELECT - col0 DIV col1 + + col1 * col1 DIV - col1 - - 97 * col0 * col0 FROM tab2 AS cor0
----
4722
590088
605356

skipif mysql # not compatible
query I rowsort label-702
SELECT - col0 / col1 + + col1 * col1 / - col1 - - 97 * col0 * col0 FROM tab2 AS cor0
----
4722
590088
605356

query I rowsort
SELECT + tab2.col1 + col1 * col2 AS col0 FROM tab2
----
1593
663
868

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab2 cor2
----
972 values hashing to a47a9db07c7de4927c7c28efb4cd13f2

query I rowsort
SELECT - 98 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to f17b7008a7deae1eb5a2e707ec237638

query I rowsort
SELECT col1 * col1 + + ( + col1 ) + + 36 FROM tab1
----
146
218
738

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

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

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

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

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

query I rowsort
SELECT ( 34 ) + col0 AS col0 FROM tab2
----
112
113
41

query I rowsort
SELECT - 6 AS col0 FROM tab2 AS cor0
----
-6
-6
-6

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-714
SELECT CAST( tab2.col2 AS SIGNED ) FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-714
SELECT CAST ( tab2.col2 AS INTEGER ) FROM tab2
----
26
27
38

query I rowsort
SELECT ALL - 70 AS col1 FROM tab1
----
-70
-70
-70

query I rowsort
SELECT ALL 30 FROM tab1
----
30
30
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 80 + - cor0.col0 col2 FROM tab2 AS cor0
----
1
2
73

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - 51 + + col2 * CAST ( cor0.col0 * - col2 AS REAL ) FROM tab1 AS cor0
----
-207987
-737331
-8799

query I rowsort
SELECT - 86 AS col2 FROM tab2 AS cor0
----
-86
-86
-86

query I rowsort
SELECT col0 * col1 + ( - 59 ) FROM tab0
----
2005
3336
8040

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

query I rowsort
SELECT 67 FROM tab2 AS cor0
----
67
67
67

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

query I rowsort
SELECT + 21 FROM tab0 AS cor0
----
21
21
21

query I rowsort
SELECT DISTINCT - - col1 + col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT - ( 57 ) AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 520dc393896969e02a72ab6c5d92126b

query I rowsort
SELECT 49 AS col0 FROM tab2
----
49
49
49

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

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

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

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

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( - 15 AS REAL ) AS col0 FROM tab1, tab0 AS cor0
----
-15

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col2 - ( - 36 ) col0 FROM tab2
----
62
63
74

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT + 76 FROM tab0
----
76
76
76

query I rowsort
SELECT 37 FROM tab1
----
37
37
37

query I rowsort
SELECT col0 * col0 AS col0 FROM tab0
----
1225
576
7921

query I rowsort
SELECT + ( cor0.col0 ) * col1 + col1 * 53 * cor0.col0 AS col0 FROM tab1 cor0
----
34560
4212
56160

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

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

query I rowsort
SELECT col0 * col2 + 89 + col2 FROM tab2 AS cor0
----
2143
305
3129

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col1 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT - 41 * + col2 FROM tab0
----
-1353
-3362
-41

query I rowsort
SELECT 54 FROM tab2
----
54
54
54

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

query I rowsort
SELECT DISTINCT + 8 * - 64 * col1 AS col2 FROM tab2
----
-15872
-30208
-8704

query I rowsort
SELECT col1 * col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - col0 * - col0 - - col0 AS col1 FROM tab2
----
56
6162
6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-762
SELECT - + cor0.col1 DIV - col0 + col0 * cor0.col0 - - 89 AS col1 FROM tab1 AS cor0
----
106
4185
6489

skipif mysql # not compatible
query I rowsort label-762
SELECT - + cor0.col1 / - col0 + col0 * cor0.col0 - - 89 AS col1 FROM tab1 AS cor0
----
106
4185
6489

query I rowsort
SELECT ALL - 91 - - col1 * + tab2.col2 * 4 FROM tab2
----
2493
3257
6045

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

query I rowsort
SELECT ALL + 33 FROM tab1, tab1 AS cor0
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

query I rowsort
SELECT + 15 + 84 FROM tab1
----
99
99
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-767
SELECT DISTINCT col0 * - 97 - - col2 * - CAST( + col1 AS SIGNED ) * col1 AS col2 FROM tab1
----
-11908
-23984
-36795

skipif mysql # not compatible
query I rowsort label-767
SELECT DISTINCT col0 * - 97 - - col2 * - CAST ( + col1 AS INTEGER ) * col1 AS col2 FROM tab1
----
-11908
-23984
-36795

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

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

query I rowsort
SELECT ALL + 89 FROM tab2 AS cor0
----
89
89
89

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-773
SELECT ( col0 ) * col1 * ( col2 ) + cor0.col2 DIV + 36 FROM tab0 AS cor0
----
3395
664120
68112

skipif mysql # not compatible
query I rowsort label-773
SELECT ( col0 ) * col1 * ( col2 ) + cor0.col2 / + 36 FROM tab0 AS cor0
----
3395
664120
68112

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

query I rowsort
SELECT ALL 86 * + col0 * + 80 - col1 AS col1 FROM tab0 AS cor0
----
165034
240703
612229

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

query I rowsort
SELECT DISTINCT 52 FROM tab2 AS cor0
----
52

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

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

query I rowsort
SELECT + - 8 + + col2 FROM tab0 AS cor0
----
-7
25
74

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

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

query I rowsort
SELECT DISTINCT 61 * col2 FROM tab0 AS cor0
----
2013
5002
61

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

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

query I rowsort
SELECT - 91 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 745d1c3a09d935465cad552325c5c945

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

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

skipif mysql # not compatible
query I rowsort label-788
SELECT - col0 / 98 AS col0 FROM tab1 AS cor0
----
0
0
0

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

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

query I rowsort
SELECT - col2 + + 6 FROM tab1 AS cor0
----
-48
-51
-90

query I rowsort
SELECT - 74 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 5a477330c946251f814fbbfd08e77c28

query IIIIIIIII rowsort
SELECT * FROM tab1, tab2, tab0 AS cor0 WHERE ( NULL ) <> + tab1.col1
----

query I rowsort
SELECT cor0.col1 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT - col1 + 23 * cor0.col0 FROM tab2 AS cor0
----
130
1735
1800

query I rowsort
SELECT DISTINCT - + cor0.col1 AS col0 FROM tab2 AS cor0
----
-17
-31
-59

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

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

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

query I rowsort
SELECT 23 FROM tab2
----
23
23
23

query I rowsort
SELECT ALL + 87 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to fa0cdd86483844cda3bb806e032d5c64

query I rowsort
SELECT ALL col0 * + 72 FROM tab0
----
1728
2520
6408

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0, tab0, tab2 AS cor1
----
972 values hashing to e486ce227b61d9db6f8414f9d6361094

query I rowsort
SELECT - + 85 * col1 + col1 AS col0 FROM tab0 AS cor0
----
-7224
-7644
-8148

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

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

query I rowsort
SELECT col0 * ( - col1 ) FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT + 77 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to d7b027bca5d37c67e29013904def8125

query I rowsort
SELECT - 37 FROM tab1 AS cor0
----
-37
-37
-37

query I rowsort
SELECT DISTINCT + 54 + - col1 FROM tab2 AS cor0
----
-5
23
37

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-808
SELECT ALL CAST( col0 AS SIGNED ) FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-808
SELECT ALL CAST ( col0 AS INTEGER ) FROM tab2 AS cor0
----
7
78
79

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

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

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

skipif mysql # not compatible
query I rowsort label-811
SELECT ALL - CAST ( - col2 AS INTEGER ) + col1 - 83 AS col2 FROM tab2 AS cor0
----
-25
-28
2

query I rowsort
SELECT DISTINCT ( - col1 ) AS col2 FROM tab2 AS cor0
----
-17
-31
-59

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

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

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

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

query I rowsort
SELECT - ( col1 ) * col0 * col0 AS col0 FROM tab0 AS cor0
----
-118825
-49536
-720811

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

query I rowsort
SELECT ALL - 53 + - 81 FROM tab2 AS cor0
----
-134
-134
-134

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

query I rowsort
SELECT col0 * col0 + - 46 AS col2 FROM tab0
----
1179
530
7875

query I rowsort
SELECT - col2 * 80 + + 25 * + col2 AS col1 FROM tab0
----
-1815
-4510
-55

query I rowsort
SELECT DISTINCT - tab2.col0 FROM tab2
----
-7
-78
-79

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

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

query I rowsort
SELECT DISTINCT + - ( - 44 ) + - col0 AS col1 FROM tab2 AS cor0
----
-34
-35
37

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

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

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

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

query I rowsort
SELECT - 53 AS col2 FROM tab2 AS cor0
----
-53
-53
-53

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

skipif mysql # not compatible
query I rowsort label-830
SELECT ALL + CAST ( ( - col0 ) AS INTEGER ) + ( - col1 ) * col1 AS col0 FROM tab2 AS cor0
----
-3559
-368
-968

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

query I rowsort
SELECT - 16 AS col1 FROM tab1 AS cor0
----
-16
-16
-16

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

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

query I rowsort
SELECT ALL - 58 + 0 + - col1 AS col2 FROM tab1 cor0
----
-68
-71
-84

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

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

skipif mysql # not compatible
query I rowsort label-837
SELECT DISTINCT 94 * + tab2.col1 + CAST ( NULL AS REAL ) AS col2 FROM tab2
----
NULL

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

query I rowsort
SELECT 72 FROM tab0
----
72
72
72

query I rowsort
SELECT - 38 * - col0 AS col2 FROM tab0 AS cor0
----
1330
3382
912

query I rowsort
SELECT - ( - col0 ) * 7 FROM tab2 AS cor0
----
49
546
553

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

query I rowsort
SELECT DISTINCT - col2 - col2 AS col2 FROM tab1 cor0
----
-108
-114
-192

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

query I rowsort
SELECT 46 * - 69 FROM tab0, tab2 AS cor0
----
9 values hashing to 14315224519b297ce2cb596bc6e1cb49

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-847
SELECT DISTINCT + + col0 + cor0.col0 + col2 DIV col2 AS col1 FROM tab0 AS cor0
----
179
49
71

skipif mysql # not compatible
query I rowsort label-847
SELECT DISTINCT + + col0 + cor0.col0 + col2 / col2 AS col1 FROM tab0 AS cor0
----
179
49
71

query I rowsort
SELECT ALL + col1 + - cor0.col2 AS col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT cor1.col2 AS col1 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

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

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

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

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

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

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

query IIIIII rowsort
SELECT ALL * FROM tab2 cor0 CROSS JOIN tab0
----
54 values hashing to 3352c458f45211cf9aa3236c2cd6dd38

query I rowsort
SELECT - + col2 * col2 * col2 AS col1 FROM tab0 AS cor0
----
-1
-35937
-551368

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-861
SELECT - + cor0.col1 * col2 DIV col0 FROM tab2 AS cor0
----
-119
-19
-8

skipif mysql # not compatible
query I rowsort label-861
SELECT - + cor0.col1 * col2 / col0 FROM tab2 AS cor0
----
-119
-19
-8

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

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

skipif mysql # not compatible
query I rowsort label-863
SELECT - cor0.col2 / + cor0.col1 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to f7964c9c62ba2640d854c2a70d834dea

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

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

query I rowsort
SELECT cor0.col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

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

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

skipif mysql # not compatible
query I rowsort label-868
SELECT DISTINCT col2 / - col2 AS col1 FROM tab1
----
-1

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

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

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

query I rowsort
SELECT - col2 * cor0.col2 + col0 * + cor0.col2 + - cor0.col2 AS col0 FROM tab2 cor0
----
-567
1326
1520

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + + col0 - + cor0.col2 col0 FROM tab0 cor0
----
-63
-84
-95

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

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

query I rowsort
SELECT DISTINCT 5 + + col1 * - col2 AS col0 FROM tab0
----
-2833
-7457
-92

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

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

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

query I rowsort
SELECT DISTINCT col1 * + col1 FROM tab0
----
7396
8281
9409

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

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

query I rowsort
SELECT + col0 + + tab2.col0 * col0 AS col1 FROM tab2
----
56
6162
6320

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

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

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

query I rowsort
SELECT col0 * col1 + tab1.col2 * tab1.col0 FROM tab1
----
240
4288
8720

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

query III rowsort
SELECT ALL * FROM tab2 WHERE + col2 IN ( - col2 + col1 * - col2 * tab2.col2 + col0 / - col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 col1 FROM tab2
----
17
31
59

query I rowsort
SELECT ALL + col2 FROM tab0 WHERE NOT NULL NOT BETWEEN NULL AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-894
SELECT + col0 * col1 + col2 DIV col0 col0 FROM tab0
----
2065
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-894
SELECT + col0 * col1 + col2 / col0 col0 FROM tab0
----
2065
3395
8099

query III rowsort
SELECT * FROM tab2 WHERE - col1 > NULL
----

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

query I rowsort
SELECT ALL 33 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 76da8bc7cae18ecf856438f872430c80

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col1 FROM tab0
----
-24
-35
-89

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

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

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

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

query I rowsort
SELECT + 83 FROM tab1 AS cor0
----
83
83
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-906
SELECT ALL col2 DIV - col0 + col2 AS col0 FROM tab2
----
24
26
38

skipif mysql # not compatible
query I rowsort label-906
SELECT ALL col2 / - col0 + col2 AS col0 FROM tab2
----
24
26
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - col1 + col1 col1 FROM tab0
----
-7310
-8190
-9312

query I rowsort
SELECT DISTINCT + col2 * + col1 * - col0 + col0 * - col2 AS col2 FROM tab0
----
-3430
-671416
-68904

query III rowsort
SELECT * FROM tab1 WHERE NULL >= ( col2 * - col2 )
----

query I rowsort
SELECT col2 * col1 + - col1 * col2 AS col1 FROM tab2
----
0
0
0

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

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

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

skipif mysql # not compatible
query I rowsort label-913
SELECT ALL + col0 / - col0 + - col0 * col1 AS col0 FROM tab0
----
-2065
-3396
-8100

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * cor0.col0 - + col1 col1 FROM tab0 AS cor0
----
1978
3298
8008

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - col1 * - tab1.col1 AS col0 FROM tab1
----
100
169
676

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

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

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

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

query I rowsort
SELECT col0 FROM tab2 WHERE NOT NULL NOT BETWEEN tab2.col0 AND col2
----

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

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

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

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

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

query I rowsort
SELECT - tab2.col1 FROM tab2 WHERE NOT - col2 / col1 + + col0 > NULL
----

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

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

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

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

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

query I rowsort
SELECT DISTINCT col1 * - col2 * - col2 AS col0 FROM tab1
----
119808
32490
75816

query I rowsort
SELECT col2 + col0 * + col1 + col1 AS col2 FROM tab0
----
2183
3493
8272

query I rowsort
SELECT + col1 + col2 + - col1 FROM tab2
----
26
27
38

query I rowsort
SELECT ALL - ( tab1.col0 ) FROM tab1
----
-3
-64
-80

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col1 - + col2 * + 95 col2 FROM tab0
----
-1071
309
3300

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 - col0 col1 FROM tab2
----
-41
-52
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-948
SELECT ALL - tab0.col2 DIV 97 + - col0 DIV - col2 FROM tab0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-948
SELECT ALL - tab0.col2 / 97 + - col0 / - col2 FROM tab0
----
0
1
35

query I rowsort
SELECT + - tab2.col1 AS col0 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT - 33 * 9 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 434210580b03eb22be480edd0208d4e3

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-953
SELECT DISTINCT + + col2 * 73 DIV 28 AS col0 FROM tab1 AS cor0
----
140
148
250

skipif mysql # not compatible
query I rowsort label-953
SELECT DISTINCT + + col2 * 73 / 28 AS col0 FROM tab1 AS cor0
----
140
148
250

query I rowsort
SELECT DISTINCT col0 * + 76 * + col2 FROM tab1 AS cor0
----
12312
277248
583680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * - cor0.col1 col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT ALL col1 * + 8 + col1 FROM tab1
----
117
234
90

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

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

query I rowsort
SELECT ALL + 58 FROM tab2
----
58
58
58

query I rowsort
SELECT + col0 * - tab0.col0 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT ( - col2 ) * col2 + 90 + - 61 AS col0 FROM tab1 AS cor0
----
-2887
-3220
-9187

query I rowsort
SELECT cor0.col1 * 21 FROM tab1 AS cor0
----
210
273
546

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

query I rowsort
SELECT 52 + + 43 * - col2 FROM tab2 AS cor0
----
-1066
-1109
-1582

query I rowsort
SELECT 69 FROM tab1, tab0 AS cor0
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

query I rowsort
SELECT - 22 * col2 AS col0 FROM tab2 AS cor0
----
-572
-594
-836

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

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - ( - col1 ) + + 39 AS col0 FROM tab2 AS cor0
----
56
70
98

query I rowsort
SELECT DISTINCT + col1 + - col2 * cor0.col1 + - col0 FROM tab1 AS cor0
----
-1315
-1381
-624

query I rowsort
SELECT DISTINCT + 35 AS col2 FROM tab0
----
35

query I rowsort
SELECT DISTINCT - col1 * col1 + + ( - 58 ) - col0 AS col0 FROM tab0 AS cor0
----
-7478
-8428
-9502

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

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

query I rowsort
SELECT DISTINCT - 65 * col0 AS col0 FROM tab0
----
-1560
-2275
-5785

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

query I rowsort
SELECT 62 + col0 FROM tab1
----
126
142
65

query I rowsort
SELECT - col2 * col0 + 97 + cor0.col1 * col2 FROM tab0 AS cor0
----
159
2143
261

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

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

query I rowsort
SELECT + col1 * col1 + - col2 + col0 AS col2 FROM tab1 cor0
----
107
153
625

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 col2 FROM tab0 AS cor0
----
-86
-91
-97

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

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

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

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

query I rowsort
SELECT + cor0.col1 + - col0 * col1 + - col2 AS col2 FROM tab1 cor0
----
-106
-1123
-687

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

skipif mysql # not compatible
query I rowsort label-997
SELECT - col2 / - col2 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT - - col1 * + ( 86 * + col0 ) AS col1 FROM tab1 AS cor0
----
55040
6708
89440

query I rowsort
SELECT + col1 * + col1 * - 62 AS col2 FROM tab1 cor0
----
-10478
-41912
-6200

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT col0 * 45 FROM tab1 AS cor0
----
135
2880
3600

query I rowsort
SELECT DISTINCT ( col0 ) * tab2.col0 FROM tab2
----
49
6084
6241

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

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

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

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

query I rowsort
SELECT + 32 FROM tab1
----
32
32
32

query I rowsort
SELECT ALL + col1 * 13 FROM tab1 AS cor0
----
130
169
338

query I rowsort
SELECT - col0 * + col2 * col2 + - ( + 0 ) AS col1 FROM tab0 cor0
----
-26136
-35
-598436

query I rowsort
SELECT DISTINCT ( 34 ) + + col1 FROM tab1 AS cor0
----
44
47
60

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

query I rowsort
SELECT DISTINCT - + ( + 4 ) + - col2 AS col1 FROM tab0 AS cor0
----
-37
-5
-86

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

query I rowsort
SELECT ALL - - 43 * - col1 AS col2 FROM tab0 AS cor0
----
-3698
-3913
-4171

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 87 + col0 * col0 col1 FROM tab0 AS cor0
----
1312
663
8008

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

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

query I rowsort
SELECT DISTINCT 36 AS col0 FROM tab0 AS cor0
----
36

onlyif mysql # use DIV operator for integer division
query I rowsort label-1022
SELECT DISTINCT + + col1 * col1 + col2 DIV + col1 AS col2 FROM tab1 AS cor0
----
105
176
678

skipif mysql # not compatible
query I rowsort label-1022
SELECT DISTINCT + + col1 * col1 + col2 / + col1 AS col2 FROM tab1 AS cor0
----
105
176
678

onlyif mysql # use DIV operator for integer division
query I rowsort label-1023
SELECT ALL - 36 * col2 DIV - col1 FROM tab0 AS cor0
----
0
13
32

skipif mysql # not compatible
query I rowsort label-1023
SELECT ALL - 36 * col2 / - col1 FROM tab0 AS cor0
----
0
13
32

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

skipif mysql # not compatible
query I rowsort label-1024
SELECT col0 / col0 AS col2 FROM tab2
----
1
1
1

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

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

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

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

query I rowsort
SELECT - ( - ( col2 ) ) * + 56 FROM tab0 AS cor0
----
1848
4592
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-1029
SELECT DISTINCT col1 DIV 36 + col1 FROM tab2 AS cor0
----
17
31
60

skipif mysql # not compatible
query I rowsort label-1029
SELECT DISTINCT col1 / 36 + col1 FROM tab2 AS cor0
----
17
31
60

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1031
SELECT DISTINCT col2 / + col1 col2 FROM tab2
----
0
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + ( - tab2.col2 * col1 ) - - ( 94 ) col1 FROM tab2
----
-1362
-473
-736

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

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

query I rowsort
SELECT 23 FROM tab0, tab0 AS cor0
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

query I rowsort
SELECT ALL + 20 AS col1 FROM tab2, tab2 cor0
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

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

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

query I rowsort
SELECT - col0 + + ( cor0.col2 ) * col1 + 5 FROM tab1 AS cor0
----
1173
1406
511

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

query I rowsort
SELECT DISTINCT ( tab2.col0 ) * col2 + + col0 * tab2.col1 FROM tab2
----
406
4345
6630

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

skipif mysql # not compatible
query I rowsort label-1042
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL
NULL
NULL

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

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

query I rowsort
SELECT + 25 FROM tab2, tab1 AS cor0
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

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

query I rowsort
SELECT ALL - col1 + + ( + 1 ) AS col1 FROM tab0 AS cor0
----
-85
-90
-96

query I rowsort
SELECT ALL + - cor0.col0 + + 79 * - col0 FROM tab2 cor0
----
-560
-6240
-6320

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1051
SELECT + CAST( NULL AS SIGNED ) * 3 AS col2 FROM tab2, tab0, tab1 AS cor0, tab1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-1051
SELECT + CAST ( NULL AS INTEGER ) * 3 AS col2 FROM tab2, tab0, tab1 AS cor0, tab1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT col0 * + col0 AS col1 FROM tab0
----
1225
576
7921

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

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

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

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

query I rowsort
SELECT - ( - 9 ) AS col2 FROM tab2 AS cor0
----
9
9
9

query I rowsort
SELECT ( - col0 ) AS col0 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort
SELECT - - CAST ( + col2 AS REAL ) * - col0 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

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

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

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

query I rowsort
SELECT - col2 * - 62 AS col0 FROM tab2 AS cor0
----
1612
1674
2356

query I rowsort
SELECT DISTINCT + + 77 * + col2 + ( col2 ) - - col0 AS col0 FROM tab1 AS cor0
----
4215
4510
7568

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

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

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

query I rowsort
SELECT - col1 * - col1 + ( col2 ) AS col0 FROM tab1
----
157
265
730

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

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

query I rowsort
SELECT ALL + 94 * + col2 AS col1 FROM tab1 AS cor0
----
5076
5358
9024

query I rowsort
SELECT + col0 * + cor0.col1 + - col0 - - 15 AS col1 FROM tab0 AS cor0
----
2055
3375
8025

query I rowsort
SELECT - 28 + col0 - col0 FROM tab0 AS cor0
----
-28
-28
-28

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

query I rowsort
SELECT ALL + ( + col0 ) * + 15 AS col1 FROM tab2 AS cor0
----
105
1170
1185

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + + col1 * col1 col0 FROM tab1 AS cor0
----
156
650
90

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

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

query I rowsort
SELECT + 60 + + cor0.col0 AS col1 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 3cfa0b29d1ab5e94da4b4436d85ad509

query I rowsort
SELECT - + col0 + ( - col0 + - col1 ) * + ( - 89 + + col1 ) AS col2 FROM tab1 cor0
----
1824
5782
6988

query I rowsort
SELECT + + col1 * ( col1 ) + cor0.col0 * + col1 FROM tab2 AS cor0
----
1178
1632
8083

query I rowsort
SELECT - col0 + 87 FROM tab2 AS cor0
----
8
80
9

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

query I rowsort
SELECT + col2 + - cor0.col2 * + 17 AS col0 FROM tab2 AS cor0
----
-416
-432
-608

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

skipif mysql # not compatible
query I rowsort label-1083
SELECT col0 / col0 AS col1 FROM tab2
----
1
1
1

query I rowsort
SELECT DISTINCT col1 + col2 + + 55 * tab1.col1 AS col2 FROM tab1
----
1510
617
824

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
-1
-33
-82

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + 17 * - cor0.col1 col1 FROM tab0 AS cor0
----
-1376
-1456
-1552

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1089
SELECT + - col1 + ( 57 ) DIV + col0 FROM tab1 AS cor0
----
-10
-13
-7

skipif mysql # not compatible
query I rowsort label-1089
SELECT + - col1 + ( 57 ) / + col0 FROM tab1 AS cor0
----
-10
-13
-7

query IIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
243 values hashing to 70c6a01760d7239f3003db4da92180a4

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

query I rowsort
SELECT + col0 * - 66 + col2 FROM tab1 AS cor0
----
-144
-4167
-5184

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1094
SELECT 3 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-1094
SELECT 3 / col2 col0 FROM tab1
----
0
0
0

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

query I rowsort
SELECT ALL col0 + - col2 + tab0.col2 * col0 AS col0 FROM tab0
----
69
7305
783

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1099
SELECT - col1 * - col0 + + col0 * CAST( + 45 + + col0 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
11040
222
7616

skipif mysql # not compatible
query I rowsort label-1099
SELECT - col1 * - col0 + + col0 * CAST ( + 45 + + col0 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
11040
222
7616

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

query I rowsort
SELECT ALL + 91 FROM tab2 cor0
----
91
91
91

query I rowsort
SELECT 28 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab0, tab2 cor1
----
243 values hashing to 2248b8c3b6efacb4e8fc6d9f81b7df8b

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

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

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

query I rowsort
SELECT + 27 FROM tab2
----
27
27
27

query I rowsort
SELECT ALL 97 AS col0 FROM tab1, tab1 AS cor0, tab2, tab1 AS cor1
----
81 values hashing to f1d3319b9491f64621f2dbb0808458ca

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0 CROSS JOIN tab1
----
243 values hashing to 9ed1a6a444254225f040123c46b7f70c

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

skipif mysql # not compatible
query I rowsort label-1110
SELECT + ( tab2.col1 ) * + CAST ( NULL AS REAL ) FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 col0 FROM tab2
----
-26
-27
-38

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

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

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0, tab2 cor0, tab1
----
972 values hashing to 75a813ebd5ec5ec2e67a66d0593ff763

query I rowsort
SELECT 4 AS col0 FROM tab0
----
4
4
4

query I rowsort
SELECT ALL 37 AS col2 FROM tab1
----
37
37
37

query I rowsort
SELECT 3 AS col0 FROM tab0 cor0
----
3
3
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-1118
SELECT col1 DIV tab2.col1 AS col2 FROM tab2
----
1
1
1

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

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

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

query I rowsort
SELECT col1 * 60 + - col0 AS col2 FROM tab0 AS cor0
----
5136
5371
5785

query I rowsort
SELECT DISTINCT - + 16 + col2 FROM tab0 AS cor0
----
-15
17
66

query I rowsort
SELECT DISTINCT cor0.col1 - - 76 AS col1 FROM tab0, tab0 AS cor0, tab0 cor1
----
162
167
173

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 - - ( col2 ) col0 FROM tab2 cor0
----
52
54
76

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

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

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

query I rowsort
SELECT + - 92 + + 0 FROM tab2 cor0 CROSS JOIN tab1, tab2 AS cor1
----
27 values hashing to a0e6b76227d870d10c4d9f46545a7c83

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2, tab1 AS cor0, tab1 AS cor1
----
972 values hashing to cee640567b2a4ba7d97109d5025bf4d9

onlyif mysql # use DIV operator for integer division
query I rowsort label-1129
SELECT DISTINCT ( tab1.col0 + col0 ) DIV col0 FROM tab1
----
2

skipif mysql # not compatible
query I rowsort label-1129
SELECT DISTINCT ( tab1.col0 + col0 ) / col0 FROM tab1
----
2

query I rowsort
SELECT DISTINCT + ( 53 + col2 ) * - 59 FROM tab1
----
-6313
-6490
-8791

query I rowsort
SELECT + 91 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

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

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

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

query I rowsort
SELECT ( 29 ) * col1 AS col1 FROM tab0 AS cor0
----
2494
2639
2813

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

query I rowsort
SELECT DISTINCT col1 * col2 * + col2 AS col0 FROM tab2
----
22599
24548
39884

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1140
SELECT - col0 * col1 DIV + 77 AS col1 FROM tab2
----
-17
-2
-59

skipif mysql # not compatible
query I rowsort label-1140
SELECT - col0 * col1 / + 77 AS col1 FROM tab2
----
-17
-2
-59

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

skipif mysql # not compatible
query I rowsort label-1141
SELECT DISTINCT - col1 * CAST ( + col1 AS INTEGER ) * - cor0.col2 - ( + col2 ) * col2 * + col0 AS col0 FROM tab2 cor0
----
-103094
20844
37778

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

query I rowsort
SELECT col2 * - 63 + cor0.col2 FROM tab1 cor0
----
-3348
-3534
-5952

query I rowsort
SELECT - 56 FROM tab0
----
-56
-56
-56

query I rowsort
SELECT DISTINCT col0 * - col1 - - col1 * col2 FROM tab0
----
-3298
-637
774

query I rowsort
SELECT - col1 + + tab1.col0 + - ( col0 ) AS col0 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT + col1 * - ( col1 ) + - col1 FROM tab0 AS cor0
----
-7482
-8372
-9506

onlyif mysql # use DIV operator for integer division
query I rowsort label-1148
SELECT + col1 * - 98 + - col1 DIV - col0 AS col2 FROM tab2 AS cor0
----
-1666
-3034
-5782

skipif mysql # not compatible
query I rowsort label-1148
SELECT + col1 * - 98 + - col1 / - col0 AS col2 FROM tab2 AS cor0
----
-1666
-3034
-5782

query I rowsort
SELECT DISTINCT - col2 + 14 * ( + col1 ) FROM tab0
----
1171
1192
1357

onlyif mysql # use DIV operator for integer division
query I rowsort label-1150
SELECT ALL - col1 + - 51 DIV 17 FROM tab1 AS cor0
----
-13
-16
-29

skipif mysql # not compatible
query I rowsort label-1150
SELECT ALL - col1 + - 51 / 17 FROM tab1 AS cor0
----
-13
-16
-29

query I rowsort
SELECT ALL - - col1 * + cor0.col2 - - ( - col1 ) * ( - col1 ) * col2 AS col0 FROM tab0 AS cor0
----
246906
686504
9506

query I rowsort
SELECT + col1 + + 64 AS col0 FROM tab1 cor0
----
74
77
90

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

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

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

query I rowsort
SELECT + col2 + ( 67 ) FROM tab0 AS cor0
----
100
149
68

query I rowsort
SELECT cor0.col2 * - 69 FROM tab2 cor0
----
-1794
-1863
-2622

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

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

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

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

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

query I rowsort
SELECT ALL - col0 + col2 * col1 + - col0 AS col1 FROM tab1
----
1088
1398
442

query I rowsort
SELECT ALL col1 * ( ( col2 ) ) + col0 * 75 AS col1 FROM tab1
----
1629
5370
7248

onlyif mysql # use DIV operator for integer division
query I rowsort label-1164
SELECT DISTINCT cor0.col2 * 59 DIV col2 FROM tab1 AS cor0
----
59

skipif mysql # not compatible
query I rowsort label-1164
SELECT DISTINCT cor0.col2 * 59 / col2 FROM tab1 AS cor0
----
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-1165
SELECT - cor0.col2 DIV 97 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1165
SELECT - cor0.col2 / 97 AS col0 FROM tab0 AS cor0
----
0
0
0

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

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

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

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

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

query I rowsort
SELECT ALL - - col2 * 60 AS col0 FROM tab2 AS cor0
----
1560
1620
2280

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

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

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

query I rowsort
SELECT DISTINCT - ( cor0.col2 ) * cor0.col2 AS col1 FROM tab0 AS cor0
----
-1
-1089
-6724

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

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

query I rowsort
SELECT - ( col1 ) + + col0 * - col1 FROM tab2 cor0
----
-1360
-248
-4661

query I rowsort
SELECT ALL cor0.col0 * col0 + + col1 + col2 * - 48 * - cor0.col1 FROM tab1 AS cor0
----
31466
66317
67427

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

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

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1186
SELECT - col0 * 48 DIV - col1 + - col0 FROM tab2 AS cor0
----
-15
144
3

skipif mysql # not compatible
query I rowsort label-1186
SELECT - col0 * 48 / - col1 + - col0 FROM tab2 AS cor0
----
-15
144
3

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

query I rowsort
SELECT ALL 61 * 76 * + col1 FROM tab2 AS cor0
----
143716
273524
78812

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1189
SELECT DISTINCT - CAST( ( col2 ) AS SIGNED ) * - col1 FROM tab0 AS cor0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-1189
SELECT DISTINCT - CAST ( ( col2 ) AS INTEGER ) * - col1 FROM tab0 AS cor0
----
2838
7462
97

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

query I rowsort
SELECT DISTINCT col0 + - 67 AS col2 FROM tab0
----
-32
-43
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 75 * col2 + + col1 col1 FROM tab2 cor0
----
2009
2056
2867

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

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

query I rowsort
SELECT + - 76 + 21 * col2 AS col2 FROM tab0 AS cor0
----
-55
1646
617

query I rowsort
SELECT DISTINCT - col2 + 24 + + col2 * col2 FROM tab2 AS cor0
----
1430
674
726

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1199
SELECT ALL 89 * + col1 + + 73 DIV - col1 + col1 AS col2 FROM tab0 AS cor0
----
7740
8190
8730

skipif mysql # not compatible
query I rowsort label-1199
SELECT ALL 89 * + col1 + + 73 / - col1 + col1 AS col2 FROM tab0 AS cor0
----
7740
8190
8730

query I rowsort
SELECT ALL 43 * col0 FROM tab0 cor0
----
1032
1505
3827

query I rowsort
SELECT + cor0.col1 * col1 * ( 34 + - col2 ) FROM tab1 AS cor0
----
-10478
-13520
-2300

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

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

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

query I rowsort
SELECT tab1.col1 * - tab1.col1 + ( - 58 ) * - col2 + - col0 * - col0 FROM tab1
----
11799
2465
7302

query I rowsort
SELECT - 11 * + col1 + 56 AS col2 FROM tab0 cor0
----
-1011
-890
-945

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1208
SELECT 83 DIV cor0.col0 FROM tab1 AS cor0
----
1
1
27

skipif mysql # not compatible
query I rowsort label-1208
SELECT 83 / cor0.col0 FROM tab1 AS cor0
----
1
1
27

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

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

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

skipif mysql # not compatible
query I rowsort label-1211
SELECT DISTINCT col2 + - col0 / col0 AS col1 FROM tab0 AS cor0
----
0
32
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 32 * col1 col2 FROM tab1 AS cor0
----
-320
-416
-832

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

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

query I rowsort
SELECT DISTINCT + 85 + - col1 FROM tab1 AS cor0
----
59
72
75

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

query I rowsort
SELECT 35 * - col0 * ( + 41 * col1 ) AS col2 FROM tab0 AS cor0
----
-11622065
-2961840
-4871825

query I rowsort
SELECT DISTINCT - 4 FROM tab2 AS cor0
----
-4

query I rowsort
SELECT 8 * col2 AS col0 FROM tab1 AS cor0
----
432
456
768

query I rowsort
SELECT ALL + + 74 * col0 * cor0.col0 FROM tab0 cor0
----
42624
586154
90650

query I rowsort
SELECT DISTINCT - col1 * 76 + col1 - col0 * ( col2 ) FROM tab1 AS cor0
----
-2112
-4398
-8655

query I rowsort
SELECT - col1 * + ( col2 * col0 ) + + col1 FROM tab0 AS cor0
----
-3298
-664027
-68026

query I rowsort
SELECT DISTINCT - + cor1.col1 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
-17
-31
-59

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

skipif mysql # not compatible
query I rowsort label-1224
SELECT - col0 * - CAST ( + col1 AS INTEGER ) + - col1 FROM tab2 AS cor0
----
1326
186
4543

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1226
SELECT ALL col0 + + col0 DIV col1 + + 88 * col1 AS col0 FROM tab0
----
7592
8097
8571

skipif mysql # not compatible
query I rowsort label-1226
SELECT ALL col0 + + col0 / col1 + + 88 * col1 AS col0 FROM tab0
----
7592
8097
8571

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

skipif mysql # not compatible
query I rowsort label-1227
SELECT 58 + - col2 / col2 FROM tab1
----
57
57
57

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1230
SELECT - col1 * col2 - cor0.col2 DIV col1 FROM tab0 cor0
----
-2838
-7462
-97

skipif mysql # not compatible
query I rowsort label-1230
SELECT - col1 * col2 - cor0.col2 / col1 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL col0 * + ( + col1 ) + + col2 FROM tab2
----
1381
244
4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-1232
SELECT + 59 DIV col1 FROM tab2
----
1
1
3

skipif mysql # not compatible
query I rowsort label-1232
SELECT + 59 / col1 FROM tab2
----
1
1
3

query I rowsort
SELECT DISTINCT - 27 FROM tab1
----
-27

query I rowsort
SELECT ALL + col0 * - 69 + col1 FROM tab2
----
-452
-5323
-5434

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

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

skipif mysql # not compatible
query I rowsort label-1236
SELECT - + CAST ( NULL AS INTEGER ) + 40 AS col0 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + col2 * + col0 col2 FROM tab0 cor0
----
34
7216
759

onlyif mysql # use DIV operator for integer division
query I rowsort label-1239
SELECT - col1 * cor0.col2 DIV 7 + col2 AS col0 FROM tab0 AS cor0
----
-12
-372
-984

skipif mysql # not compatible
query I rowsort label-1239
SELECT - col1 * cor0.col2 / 7 + col2 AS col0 FROM tab0 AS cor0
----
-12
-372
-984

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + ( col2 ) col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT + 58 + cor0.col2 AS col2 FROM tab0 AS cor0
----
140
59
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * + col1 + col1 col1 FROM tab1 AS cor0
----
-1235
-1378
-560

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

query I rowsort
SELECT + + col2 + - cor0.col2 * 98 AS col2 FROM tab0 AS cor0
----
-3201
-7954
-97

query I rowsort
SELECT 23 FROM tab1, tab1 cor0
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

query I rowsort
SELECT ALL cor1.col0 * 18 FROM tab0 cor0 CROSS JOIN tab0, tab2 AS cor1, tab2, tab2 AS cor2
----
243 values hashing to 7caae049848877c915d1de9607a8782b

query I rowsort
SELECT 8 AS col1 FROM tab0, tab0 cor0
----
9 values hashing to ffc5b4c98b57ae546521175995c49c57

query I rowsort
SELECT ALL + col1 * 28 AS col2 FROM tab2 cor0
----
1652
476
868

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

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

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

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

query I rowsort
SELECT DISTINCT - col1 + - 64 FROM tab2 AS cor0
----
-123
-81
-95

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

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

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

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

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

query I rowsort
SELECT + col2 + col1 * - col0 AS col2 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT - cor0.col2 * cor0.col1 FROM tab0, tab2 cor0
----
9 values hashing to c52f276f0448e9317aa4a2c462e0bab5

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

query I rowsort
SELECT DISTINCT - - col2 * + 80 AS col2 FROM tab0 AS cor0
----
2640
6560
80

query I rowsort
SELECT + col1 * 24 AS col2 FROM tab1
----
240
312
624

query I rowsort
SELECT ALL col1 * - 3 FROM tab2
----
-177
-51
-93

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

query I rowsort
SELECT ALL + 62 * + 85 - col0 AS col2 FROM tab1 AS cor0
----
5190
5206
5267

query I rowsort
SELECT DISTINCT - col2 * 5 + col1 FROM tab1 AS cor0
----
-244
-275
-467

query I rowsort
SELECT - ( - 68 ) + col0 AS col1 FROM tab1 AS cor0
----
132
148
71

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

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

query I rowsort
SELECT - ( col1 ) * col0 + col1 * col1 FROM tab2 AS cor0
----
-1054
-1121
744

query I rowsort
SELECT - - 42 * - 15 AS col0 FROM tab1 AS cor0
----
-630
-630
-630

query I rowsort
SELECT + cor0.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

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

query I rowsort
SELECT - + 45 * + col2 FROM tab0 AS cor0
----
-1485
-3690
-45

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

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

query I rowsort
SELECT col1 * col1 + + col1 * ( col2 ) * - col1 FROM tab2 AS cor0
----
-10693
-24986
-87025

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 * col0 * cor0.col1 + col0 * + col0 col2 FROM tab1 AS cor0
----
-32384
-4203
-93440

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

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

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

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0, tab1, tab2 cor1
----
972 values hashing to 49c8bf3e931a898ba7af63d0e377eb79

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

query I rowsort
SELECT DISTINCT 48 AS col0 FROM tab1, tab0 cor0, tab0 cor1
----
48

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

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

query I rowsort
SELECT 97 FROM tab1
----
97
97
97

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1290
SELECT col1 + cor0.col2 * col1 DIV col0 FROM tab1 cor0
----
18
28
494

skipif mysql # not compatible
query I rowsort label-1290
SELECT col1 + cor0.col2 * col1 / col0 FROM tab1 cor0
----
18
28
494

query I rowsort
SELECT + col2 + col2 AS col1 FROM tab1
----
108
114
192

query I rowsort
SELECT - col0 * - col2 + tab0.col2 * col0 FROM tab0
----
14596
1584
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 col2 FROM tab2
----
17
31
59

query I rowsort
SELECT DISTINCT + col1 * - col1 FROM tab0
----
-7396
-8281
-9409

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

skipif mysql # not compatible
query I rowsort label-1295
SELECT + cor0.col1 / col1 AS col0 FROM tab2 AS cor0
----
1
1
1

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1297
SELECT - col0 DIV 41 FROM tab1 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-1297
SELECT - col0 / 41 FROM tab1 AS cor0
----
-1
-1
0

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

skipif mysql # not compatible
query I rowsort label-1298
SELECT DISTINCT + col1 + col0 / + col2 FROM tab1 AS cor0
----
11
13
26

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

query I rowsort
SELECT DISTINCT + col1 * ( + 2 ) AS col2 FROM tab1
----
20
26
52

query I rowsort
SELECT ALL + tab0.col2 FROM tab0, tab0 cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT 8 FROM tab0, tab2 AS cor0
----
9 values hashing to ffc5b4c98b57ae546521175995c49c57

query I rowsort
SELECT + + col0 + 99 FROM tab1 AS cor0
----
102
163
179

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

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

query I rowsort
SELECT DISTINCT cor0.col0 * col2 - + 14 * + col0 AS col1 FROM tab2 cor0
----
1896
91
936

query I rowsort
SELECT - col1 * 16 * + col1 AS col2 FROM tab1 AS cor0
----
-10816
-1600
-2704

query I rowsort
SELECT DISTINCT - + col0 * + ( - 7 ) + + col2 AS col0 FROM tab2 AS cor0
----
572
591
76

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

query I rowsort
SELECT - - col0 * - ( + col2 * + col1 ) FROM tab2 cor0
----
-119652
-51034
-5859

query I rowsort
SELECT + col1 + col1 AS col0 FROM tab2 AS cor0
----
118
34
62

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

query I rowsort
SELECT col0 + col2 * col2 FROM tab0 cor0
----
1113
36
6813

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

skipif mysql # not compatible
query I rowsort label-1314
SELECT ALL + cor0.col0 * CAST ( col0 AS INTEGER ) FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT ALL - cor0.col0 + - 44 AS col2 FROM tab0 AS cor0
----
-133
-68
-79

query I rowsort
SELECT ALL + 89 FROM tab2 cor0
----
89
89
89

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1318
SELECT DISTINCT - 29 DIV + 45 AS col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-1318
SELECT DISTINCT - 29 / + 45 AS col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - cor1.col2 * + cor1.col0 FROM tab0, tab2 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to 6049db922cf615ac02010fbaffaf74d8

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

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

query I rowsort
SELECT tab0.col2 * ( - col2 * col0 ) - + 81 FROM tab0
----
-116
-26217
-598517

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + 83 * + col0 col0 FROM tab0
----
2025
2906
7469

query I rowsort
SELECT col1 + col0 * + 55 AS col0 FROM tab1
----
191
3530
4413

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab2 AS cor0
----
26
27
38

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

query I rowsort
SELECT DISTINCT + col2 AS col1 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT + + 39 + + cor0.col2 AS col1 FROM tab2 AS cor0
----
65
66
77

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 32 * - 30 col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 5070c83d98d67b72ba3e706a72e08b7b

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

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

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

query I rowsort
SELECT DISTINCT 9 * cor0.col2 AS col2 FROM tab2 AS cor0
----
234
243
342

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

query I rowsort
SELECT - col0 FROM tab2 WHERE NOT ( NULL ) NOT BETWEEN NULL AND NULL
----

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

query I rowsort
SELECT DISTINCT - col0 - - col2 FROM tab2
----
-41
-52
20

query I rowsort
SELECT DISTINCT col0 * col0 - - ( col0 ) * col0 AS col0 FROM tab1
----
12800
18
8192

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

query I rowsort
SELECT cor0.col0 * 85 AS col0 FROM tab1 AS cor0
----
255
5440
6800

onlyif mysql # use DIV operator for integer division
query I rowsort label-1344
SELECT - col1 DIV - 39 + + cor0.col1 FROM tab2 AS cor0
----
17
31
60

skipif mysql # not compatible
query I rowsort label-1344
SELECT - col1 / - 39 + + cor0.col1 FROM tab2 AS cor0
----
17
31
60

query I rowsort
SELECT DISTINCT + col0 * 79 AS col1 FROM tab1 AS cor0
----
237
5056
6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-1346
SELECT DISTINCT - ( col2 ) DIV + 15 FROM tab0
----
-2
-5
0

skipif mysql # not compatible
query I rowsort label-1346
SELECT DISTINCT - ( col2 ) / + 15 FROM tab0
----
-2
-5
0

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

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

query I rowsort
SELECT DISTINCT tab0.col0 * - 47 + 71 AS col0 FROM tab0, tab2 AS cor0
----
-1057
-1574
-4112

query I rowsort
SELECT - 96 * - col2 - tab1.col0 AS col2 FROM tab1
----
5181
5408
9136

query I rowsort
SELECT DISTINCT + tab2.col0 * - col2 * col2 - + col2 * tab2.col1 FROM tab2
----
-114722
-54262
-5940

query I rowsort
SELECT - cor0.col0 + 84 * tab0.col1 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 2517d0bfbafe1ad8bba5bf08ea5f8d35

query I rowsort
SELECT + + col0 + cor0.col2 AS col1 FROM tab2 cor0
----
104
117
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1354
SELECT ALL col0 + col0 - + CAST( + 69 + col1 AS SIGNED ) * + col1 AS col1 FROM tab0
----
-13282
-14382
-16032

skipif mysql # not compatible
query I rowsort label-1354
SELECT ALL col0 + col0 - + CAST ( + 69 + col1 AS INTEGER ) * + col1 AS col1 FROM tab0
----
-13282
-14382
-16032

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

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

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

skipif mysql # not compatible
query I rowsort label-1356
SELECT ALL + col0 + + CAST ( col2 AS INTEGER ) * + col2 FROM tab1 AS cor0
----
2919
3313
9296

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

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

query I rowsort
SELECT - col1 * col0 + + 80 AS col2 FROM tab2
----
-1263
-137
-4522

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col2 + col0 * - col1 col0 FROM tab1
----
-24
-583
-944

onlyif mysql # use DIV operator for integer division
query I rowsort label-1361
SELECT col2 DIV + col2 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1361
SELECT col2 / + col2 FROM tab1
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-1362
SELECT + + col0 + + col1 DIV + col1 + - cor0.col0 * + 29 FROM tab0 cor0
----
-2491
-671
-979

skipif mysql # not compatible
query I rowsort label-1362
SELECT + + col0 + + col1 / + col1 + - cor0.col0 * + 29 FROM tab0 cor0
----
-2491
-671
-979

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

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

query I rowsort
SELECT ALL 49 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to a40d8754a5be3ce2309c61bfd3e00197

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col2 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT + col0 * + 3 + col1 * col0 FROM tab1 AS cor0
----
1280
832
87

query I rowsort
SELECT DISTINCT - col2 * 13 AS col1 FROM tab1
----
-1248
-702
-741

query I rowsort
SELECT ALL - col1 * - col2 * col2 AS col2 FROM tab1 AS cor0
----
119808
32490
75816

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

query I rowsort
SELECT - ( col2 ) FROM tab0
----
-1
-33
-82

query I rowsort
SELECT - ( + 38 ) FROM tab2
----
-38
-38
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-1373
SELECT + 69 + ( - col2 + - col1 ) * 40 DIV + tab2.col1 FROM tab2
----
-5
-60
12

skipif mysql # not compatible
query I rowsort label-1373
SELECT + 69 + ( - col2 + - col1 ) * 40 / + tab2.col1 FROM tab2
----
-5
-60
12

query I rowsort
SELECT ALL col1 + + col1 * cor0.col1 * 66 - - ( + cor0.col1 ) AS col2 FROM tab0 AS cor0
----
488308
546728
621188

query I rowsort
SELECT DISTINCT + cor0.col0 + col2 + col0 * - 2 * 62 FROM tab0 AS cor0
----
-10865
-2919
-4304

query I rowsort
SELECT DISTINCT ( 83 ) FROM tab1, tab0 AS cor0, tab2 AS cor1, tab2 AS cor2
----
83

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

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

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

query I rowsort
SELECT - col0 + 54 AS col0 FROM tab1
----
-10
-26
51

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

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

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

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

query I rowsort
SELECT DISTINCT 68 * - cor0.col0 + 31 AS col2 FROM tab0 AS cor0
----
-1601
-2349
-6021

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

query I rowsort
SELECT 25 + + col0 FROM tab2 cor0
----
103
104
32

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

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

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

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

query I rowsort
SELECT ALL + col1 - col0 AS col2 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT ALL 25 * - col1 + col1 + col2 * - col1 AS col0 FROM tab0 AS cor0
----
-2425
-4902
-9646

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

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

query I rowsort
SELECT 97 + - cor0.col2 FROM tab2 AS cor0
----
59
70
71

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

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

query I rowsort
SELECT DISTINCT + - col2 * col1 + - col0 FROM tab1 AS cor0
----
-1328
-1407
-634

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1399
SELECT DISTINCT + col0 DIV + col2 + + 26 FROM tab0 AS cor0
----
26
27
61

skipif mysql # not compatible
query I rowsort label-1399
SELECT DISTINCT + col0 / + col2 + + 26 FROM tab0 AS cor0
----
26
27
61

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * tab1.col0 col2 FROM tab1
----
4096
6400
9

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

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab2, tab1, tab2 AS cor0 WHERE NOT NULL <> NULL
----

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

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

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

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

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

query I rowsort
SELECT - cor0.col2 + - col2 FROM tab2 AS cor0
----
-52
-54
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + col1 * col0 * - col0 + - col2 col2 FROM tab1
----
-262
-41007
-83283

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

query I rowsort
SELECT col0 * col0 + - col2 FROM tab2 AS cor0
----
22
6058
6203

onlyif mysql # use DIV operator for integer division
query I rowsort label-1413
SELECT + col0 * - cor0.col0 + + col1 DIV col2 AS col0 FROM tab0 AS cor0
----
-1128
-574
-7920

skipif mysql # not compatible
query I rowsort label-1413
SELECT + col0 * - cor0.col0 + + col1 / col2 AS col0 FROM tab0 AS cor0
----
-1128
-574
-7920

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1415
SELECT - tab2.col0 * - col1 DIV col1 AS col0 FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort label-1415
SELECT - tab2.col0 * - col1 / col1 AS col0 FROM tab2
----
7
78
79

query I rowsort
SELECT DISTINCT col2 * - col2 * + col2 AS col0 FROM tab1
----
-157464
-185193
-884736

query I rowsort
SELECT ALL - col0 * tab1.col1 * + col0 AS col1 FROM tab1
----
-234
-40960
-83200

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

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

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

query I rowsort
SELECT + 47 + col2 FROM tab2 AS cor0
----
73
74
85

query I rowsort
SELECT col2 * 81 FROM tab2
----
2106
2187
3078

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

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

query I rowsort
SELECT ALL 88 AS col2 FROM tab1
----
88
88
88

query I rowsort
SELECT - 48 + + col1 FROM tab0
----
38
43
49

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1427
SELECT ALL - col1 DIV 73 AS col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1427
SELECT ALL - col1 / 73 AS col2 FROM tab1
----
0
0
0

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

query I rowsort
SELECT ALL + 32 AS col2 FROM tab1
----
32
32
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * col0 col1 FROM tab2
----
49
6084
6241

query I rowsort
SELECT 77 + - tab2.col0 AS col0 FROM tab2
----
-1
-2
70

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

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

query I rowsort
SELECT ALL - 81 FROM tab0 AS cor0
----
-81
-81
-81

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

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

query I rowsort
SELECT DISTINCT - 58 + + cor0.col0 FROM tab2 cor0
----
-51
20
21

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

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

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

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

query I rowsort
SELECT - tab2.col2 - col2 AS col2 FROM tab2
----
-52
-54
-76

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

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

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

query I rowsort
SELECT tab1.col2 AS col0 FROM tab1
----
54
57
96

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

query I rowsort
SELECT ALL - col2 * - col2 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT DISTINCT + col2 + + col1 AS col0 FROM tab2
----
55
58
85

query I rowsort
SELECT DISTINCT - col0 + col0 * col1 AS col0 FROM tab1
----
576
75
960

query I rowsort
SELECT ALL + col1 + + col2 FROM tab0
----
119
173
98

query I rowsort
SELECT ALL - tab1.col2 + - col1 * col2 AS col0 FROM tab1
----
-1344
-1458
-627

query I rowsort
SELECT ALL tab1.col2 AS col0 FROM tab1
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-1454
SELECT col2 DIV - col0 AS col0 FROM tab2
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-1454
SELECT col2 / - col0 AS col0 FROM tab2
----
-3
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + col1 col0 FROM tab2
----
137
38
96

query III rowsort
SELECT * FROM tab0 WHERE NULL NOT IN ( - col1 )
----

query I rowsort
SELECT - col2 + - col1 + - col0 AS col0 FROM tab2
----
-134
-163
-65

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE col0 <> NULL
----

query I rowsort
SELECT - col1 - - col0 AS col2 FROM tab1
----
-23
54
67

query I rowsort
SELECT DISTINCT - tab2.col1 * + col2 * col2 - + col0 FROM tab2
----
-22606
-24627
-39962

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col0 FROM tab1
----
54
57
96

query I rowsort
SELECT - col1 * col1 + + tab1.col0 * - col1 + col2 FROM tab1
----
-1113
-683
-700

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - col1 + tab2.col2 + - col2 col0 FROM tab2
----
-289
-3481
-961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + - col0 * - col0 col0 FROM tab0
----
1226
609
8003

query I rowsort
SELECT DISTINCT - col1 + col2 AS col0 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT - col1 + - col2 FROM tab1
----
-109
-67
-80

query III rowsort
SELECT * FROM tab1 WHERE NOT - col0 * col1 > - col2 * + col0 * + col1 + - col1
----

query I rowsort
SELECT col0 + - col1 + col2 AS col1 FROM tab0
----
-29
-61
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-1469
SELECT col0 + - col0 DIV - col1 AS col0 FROM tab2
----
7
79
83

skipif mysql # not compatible
query I rowsort label-1469
SELECT col0 + - col0 / - col1 AS col0 FROM tab2
----
7
79
83

query III rowsort
SELECT ALL * FROM tab0 WHERE ( - col1 ) <> NULL
----

query III rowsort
SELECT ALL * FROM tab0 WHERE col0 / col2 NOT IN ( col0 * + col1 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT cor0.col2 - - col2 AS col1 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT col1 * col0 + - col0 FROM tab2 AS cor0
----
1264
210
4524

onlyif mysql # use DIV operator for integer division
query I rowsort label-1474
SELECT + + col2 DIV + col1 + col0 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-1474
SELECT + + col2 / + col1 + col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2, tab1 AS cor0
----
3
64
80

query I rowsort
SELECT col2 + - col2 AS col2 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * col2 col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT + cor0.col2 + - cor0.col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL + cor0.col0 * - cor0.col2 FROM tab0, tab1 cor0
----
9 values hashing to f7e57a354e4e5925116b9650d1011609

query I rowsort
SELECT DISTINCT col0 + - col0 AS col1 FROM tab1 AS cor0 WHERE NOT NULL = col1 - col2
----

query I rowsort
SELECT - cor0.col0 + - col0 AS col1 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT ALL + col0 * col2 + col1 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT DISTINCT - 24 - + tab0.col0 FROM tab0
----
-113
-48
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-1484
SELECT col2 DIV + tab2.col1 FROM tab2
----
0
0
2

skipif mysql # not compatible
query I rowsort label-1484
SELECT col2 / + tab2.col1 FROM tab2
----
0
0
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - ( col2 ) ) - 14 * col0 col2 FROM tab2 AS cor0
----
-1118
-1144
-125

query I rowsort
SELECT DISTINCT col2 * col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT + + 74 FROM tab2 AS cor0
----
74

query I rowsort
SELECT col2 + + col2 * + col0 + col2 AS col2 FROM tab2 AS cor0
----
2080
243
3078

query I rowsort
SELECT ALL - ( + ( cor0.col2 ) ) AS col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT - 5 FROM tab0, tab1 AS cor0
----
9 values hashing to 74665fbb47d5b17da011bca567195b21

query I rowsort
SELECT - 67 FROM tab2 AS cor0
----
-67
-67
-67

query I rowsort
SELECT DISTINCT + col1 * + col1 + ( cor0.col2 + col0 ) AS col0 FROM tab0 AS cor0
----
7453
8452
9445

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * - col1 col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL - col2 + - col0 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT + 90 AS col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 5d25a546acf3ae171e731e50adc0112e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1496
SELECT DISTINCT CAST( NULL AS SIGNED ) col0 FROM tab0, tab2 cor0, tab0 cor1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1496
SELECT DISTINCT CAST ( NULL AS INTEGER ) col0 FROM tab0, tab2 cor0, tab0 cor1
----
NULL

query I rowsort
SELECT - 19 + col0 AS col2 FROM tab1 cor0
----
-16
45
61

query I rowsort
SELECT - col0 + + col1 AS col2 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT - cor0.col1 FROM tab2, tab2 AS cor0, tab2 cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT ALL + - col1 + + col0 * col0 FROM tab2 AS cor0
----
18
6025
6224

onlyif mysql # use DIV operator for integer division
query I rowsort label-1501
SELECT DISTINCT - - col1 - + col0 DIV ( + 74 ) FROM tab2 AS cor0
----
16
31
58

skipif mysql # not compatible
query I rowsort label-1501
SELECT DISTINCT - - col1 - + col0 / ( + 74 ) FROM tab2 AS cor0
----
16
31
58

query I rowsort
SELECT + + col2 * - col2 - - ( - col2 + - col1 ) FROM tab0 AS cor0
----
-1208
-6897
-99

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
972 values hashing to e610acd60f342127e6cdba18673d9f0e

query I rowsort
SELECT DISTINCT - col1 * + col0 + col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT ALL + col2 * col1 * ( + 92 ) + cor0.col1 + + 37 FROM tab2 AS cor0
----
141224
59486
77072

query I rowsort
SELECT - ( col0 ) AS col2 FROM tab1 cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-1507
SELECT ALL cor0.col2 * + cor0.col0 + + CAST( + col1 AS SIGNED ) DIV + cor0.col1 AS col2 FROM tab0 AS cor0
----
36
7299
793

skipif mysql # not compatible
query I rowsort label-1507
SELECT ALL cor0.col2 * + cor0.col0 + + CAST ( + col1 AS INTEGER ) / + cor0.col1 AS col2 FROM tab0 AS cor0
----
36
7299
793

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1508
SELECT ALL + col0 * - col1 + CAST( NULL AS SIGNED ) / col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1508
SELECT ALL + col0 * - col1 + CAST ( NULL AS INTEGER ) / col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 * - 21 AS col2 FROM tab1 AS cor0
----
1134
1197
2016

query I rowsort
SELECT - col2 * - cor0.col1 AS col2 FROM tab1 AS cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 * 59 col0 FROM tab1 AS cor0
----
177
3776
4720

query I rowsort
SELECT cor0.col1 * - col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT 60 + + cor0.col0 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 729fc58fdb9e2d56b98ea4e583d5ab03

query I rowsort
SELECT ALL col0 * 17 FROM tab1 cor0
----
1088
1360
51

query I rowsort
SELECT col1 * col1 * col2 AS col0 FROM tab2 AS cor0
----
10982
25947
90506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - ( col0 ) col2 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT - cor0.col1 * + cor0.col2 AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT - col2 * cor0.col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT ALL - 92 + col1 * - col0 FROM tab2 AS cor0
----
-1435
-309
-4694

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( + ( col1 ) AS REAL ) AS col0 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL + 84 FROM tab1 AS cor0
----
84
84
84

query I rowsort
SELECT DISTINCT 56 + + 46 FROM tab0 AS cor0
----
102

query I rowsort
SELECT DISTINCT - cor0.col2 + + cor0.col0 * + col1 AS col2 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT ( - col1 ) + - col2 * - ( col1 ) AS col0 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT ALL - col2 + - cor0.col0 * + col1 AS col0 FROM tab2 AS cor0
----
-1381
-244
-4628

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1526
SELECT CAST( NULL AS SIGNED ) - + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1526
SELECT CAST ( NULL AS INTEGER ) - + col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col1 * + col0 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT - - 8 * - 75 + - cor0.col1 + cor0.col2 FROM tab2 AS cor0
----
-579
-604
-633

query I rowsort
SELECT DISTINCT col1 * 24 FROM tab0 AS cor0
----
2064
2184
2328

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 * col2 col0 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT - col2 + + col0 * col1 FROM tab2 AS cor0
----
1305
190
4576

query I rowsort
SELECT ALL + 23 + - col0 * col1 FROM tab1 AS cor0
----
-1017
-55
-617

query I rowsort
SELECT ALL col2 * ( - col2 ) FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT col1 + tab2.col0 FROM tab2
----
137
38
96

query I rowsort
SELECT + tab1.col2 + - col0 FROM tab1
----
-7
16
51

query I rowsort
SELECT - col1 * - ( - col2 ) + + col1 AS col0 FROM tab2
----
-1475
-629
-806

query I rowsort
SELECT - col0 * 50 - col1 * - col2 * - col1 AS col2 FROM tab2
----
-14932
-26297
-94406

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0, tab0 cor0, tab1
----
972 values hashing to 5621675b1bd32b061d284d0444c76601

query I rowsort
SELECT ALL col2 * + 87 FROM tab0
----
2871
7134
87

query I rowsort
SELECT ALL - + 98 FROM tab1, tab0, tab0 AS cor0, tab2
----
81 values hashing to b6a3c9eea26c3759e6417d75f38258d1

query I rowsort
SELECT 21 + + cor0.col0 + - 56 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 115288cb59a4a242899e4889d599857c

query I rowsort
SELECT ALL + + col0 FROM tab0 cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-1543
SELECT DISTINCT - - col1 * col2 DIV + col1 + 41 FROM tab0 AS cor0
----
123
42
74

skipif mysql # not compatible
query I rowsort label-1543
SELECT DISTINCT - - col1 * col2 / + col1 + 41 FROM tab0 AS cor0
----
123
42
74

query I rowsort
SELECT ALL + 71 AS col2 FROM tab1 AS cor0
----
71
71
71

query I rowsort
SELECT ALL - - ( col2 ) AS col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT + tab2.col1 FROM tab2, tab0 AS cor0
----
17
31
59

query I rowsort
SELECT ALL + - cor0.col2 * + 67 AS col0 FROM tab1 AS cor0
----
-3618
-3819
-6432

query I rowsort
SELECT - 14 * 22 AS col2 FROM tab1 AS cor0
----
-308
-308
-308

query I rowsort
SELECT col2 + + cor0.col0 * col0 FROM tab0 AS cor0
----
1226
609
8003

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor1.col1 col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
-10
-13
-26

query I rowsort
SELECT - col0 * col2 * col2 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT - tab2.col2 * - col2 + - col2 + + 35 * col1 * + col1 FROM tab2
----
11521
122485
34337

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 73 + + tab1.col2 col1 FROM tab1
----
127
130
169

onlyif mysql # use DIV operator for integer division
query I rowsort label-1554
SELECT tab1.col1 DIV - col1 AS col0 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1554
SELECT tab1.col1 / - col1 AS col0 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT 65 AS col0 FROM tab0
----
65

query I rowsort
SELECT DISTINCT - col1 * col1 * - col0 FROM tab0
----
177504
329315
737009

query I rowsort
SELECT + col2 + col1 - ( + 43 ) FROM tab2 AS cor0
----
12
15
42

query I rowsort
SELECT col1 * 39 AS col0 FROM tab1
----
1014
390
507

query I rowsort
SELECT + cor0.col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT ALL ( + col0 ) * - col0 FROM tab1
----
-4096
-6400
-9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1561
SELECT ALL CAST( NULL AS SIGNED ) col0 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1561
SELECT ALL CAST ( NULL AS INTEGER ) col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col1 * col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT ALL - tab1.col2 AS col1 FROM tab1, tab2, tab0 cor0
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query I rowsort
SELECT ALL col2 - + ( col0 ) * col2 AS col0 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT ALL + col2 + col1 * - ( col0 ) FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT DISTINCT + 37 AS col2 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
37

onlyif mysql # use DIV operator for integer division
query I rowsort label-1567
SELECT ALL col0 DIV + col0 AS col2 FROM tab2 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1567
SELECT ALL col0 / + col0 AS col2 FROM tab2 cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - cor0.col2 + - col1 col1 FROM tab0 AS cor0
----
-1175
-6815
-98

query I rowsort
SELECT DISTINCT + cor0.col0 + 78 FROM tab2 AS cor0
----
156
157
85

query I rowsort
SELECT DISTINCT col2 * + col1 + col2 AS col1 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT DISTINCT - + col0 + col2 * - col0 FROM tab2 AS cor0
----
-196
-2106
-3081

onlyif mysql # use DIV operator for integer division
query I rowsort label-1572
SELECT ALL + col0 + col0 DIV + 11 FROM tab1 AS cor0
----
3
69
87

skipif mysql # not compatible
query I rowsort label-1572
SELECT ALL + col0 + col0 / + 11 FROM tab1 AS cor0
----
3
69
87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1573
SELECT - - col2 * + CAST( - col2 AS SIGNED ) FROM tab0 AS cor0
----
-1
-1089
-6724

skipif mysql # not compatible
query I rowsort label-1573
SELECT - - col2 * + CAST ( - col2 AS INTEGER ) FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL col2 + - col2 * + col2 FROM tab1 cor0
----
-2862
-3192
-9120

query I rowsort
SELECT + col1 + + col2 * - 17 + + tab2.col0 * col2 FROM tab2
----
-239
1645
2373

query I rowsort
SELECT ALL 4 + - col2 FROM tab0
----
-29
-78
3

query I rowsort
SELECT DISTINCT - 36 + + col0 AS col0 FROM tab0
----
-1
-12
53

query I rowsort
SELECT DISTINCT 96 + tab1.col1 FROM tab1
----
106
109
122

query I rowsort
SELECT ALL col1 + + col0 * 43 FROM tab0
----
1118
1602
3918

query I rowsort
SELECT ALL - 76 FROM tab1, tab0 AS cor0
----
9 values hashing to f8b6589bc7503fc720ca5430e3569317

onlyif mysql # use DIV operator for integer division
query I rowsort label-1581
SELECT ALL + cor0.col0 DIV 65 + - col1 FROM tab0 AS cor0
----
-86
-90
-97

skipif mysql # not compatible
query I rowsort label-1581
SELECT ALL + cor0.col0 / 65 + - col1 FROM tab0 AS cor0
----
-86
-90
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-1582
SELECT DISTINCT col2 DIV + cor0.col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-1582
SELECT DISTINCT col2 / + cor0.col1 FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1583
SELECT col0 * + ( - col2 ) + col2 DIV cor0.col0 FROM tab2 AS cor0
----
-186
-2028
-3002

skipif mysql # not compatible
query I rowsort label-1583
SELECT col0 * + ( - col2 ) + col2 / cor0.col0 FROM tab2 AS cor0
----
-186
-2028
-3002

query I rowsort
SELECT DISTINCT col2 * + 62 FROM tab1 AS cor0
----
3348
3534
5952

query I rowsort
SELECT DISTINCT col2 + 66 AS col1 FROM tab0 AS cor0
----
148
67
99

query I rowsort
SELECT DISTINCT - col0 * 82 + + col0 * col2 FROM tab2 cor0
----
-3476
-385
-4368

query I rowsort
SELECT ALL - + col2 * col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL + col1 + - col1 * cor0.col0 AS col0 FROM tab0 AS cor0
----
-1978
-3298
-8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-1589
SELECT + col1 DIV col0 AS col1 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-1589
SELECT + col1 / col0 AS col1 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT ALL - col0 * - col2 + col2 * + col2 FROM tab0 AS cor0
----
14022
1881
36

query I rowsort
SELECT col2 + - 97 AS col1 FROM tab0 AS cor0
----
-15
-64
-96

query I rowsort
SELECT 71 AS col2 FROM tab0
----
71
71
71

query I rowsort
SELECT DISTINCT 93 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
93

query I rowsort
SELECT DISTINCT col1 - + col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT ( col1 ) + col0 * - cor0.col1 AS col1 FROM tab2 AS cor0
----
-1326
-186
-4543

onlyif mysql # use DIV operator for integer division
query I rowsort label-1596
SELECT DISTINCT + - 44 - - col0 DIV cor0.col0 AS col0 FROM tab1 AS cor0
----
-43

skipif mysql # not compatible
query I rowsort label-1596
SELECT DISTINCT + - 44 - - col0 / cor0.col0 AS col0 FROM tab1 AS cor0
----
-43

query I rowsort
SELECT - + 6 FROM tab0 AS cor0
----
-6
-6
-6

query I rowsort
SELECT - cor0.col0 * - 53 AS col0 FROM tab2 cor0
----
371
4134
4187

query I rowsort
SELECT + + cor0.col1 * - 59 AS col2 FROM tab2 AS cor0
----
-1003
-1829
-3481

query I rowsort
SELECT + + cor0.col2 * col1 + 97 * + col0 FROM tab2 AS cor0
----
1516
8309
9100

query I rowsort
SELECT - cor0.col1 + + 93 FROM tab2 AS cor0
----
34
62
76

query I rowsort
SELECT col2 * + col2 FROM tab0 AS cor0
----
1
1089
6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 95 col2 FROM tab1
----
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + tab0.col2 * - 76 * col2 col0 FROM tab0
----
-41
-510935
-82740

query I rowsort
SELECT ALL - tab0.col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query I rowsort
SELECT ALL + + col1 * col0 AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT + + ( 78 ) + + col0 AS col0 FROM tab0 AS cor0
----
102
113
167

query I rowsort
SELECT ALL - ( col2 ) AS col0 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT - - col2 * - cor0.col1 + cor0.col1 FROM tab2 AS cor0
----
-1475
-629
-806

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1610
SELECT - CAST( col2 AS SIGNED ) + cor0.col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1610
SELECT - CAST ( col2 AS INTEGER ) + cor0.col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col1 + col0 * - col0 AS col2 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT DISTINCT - - col1 + col0 + col1 * + 27 AS col1 FROM tab0 AS cor0
----
2432
2637
2751

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab2, tab0 AS cor0 CROSS JOIN tab1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT 19 FROM tab2 AS cor0
----
19
19
19

onlyif mysql # use DIV operator for integer division
query I rowsort label-1615
SELECT ALL + + 48 + + 80 DIV + col2 AS col1 FROM tab1 cor0
----
48
49
49

skipif mysql # not compatible
query I rowsort label-1615
SELECT ALL + + 48 + + 80 / + col2 AS col1 FROM tab1 cor0
----
48
49
49

query I rowsort
SELECT + 43 * cor0.col0 + - col2 FROM tab1 AS cor0
----
2695
3344
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 33 col1 FROM tab2 AS cor0
----
33
33
33

query I rowsort
SELECT DISTINCT - 96 + col2 * col2 AS col1 FROM tab0 AS cor0
----
-95
6628
993

query I rowsort
SELECT - - 16 + 39 FROM tab1 AS cor0
----
55
55
55

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1620
SELECT col1 * col1 + + col0 + + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1620
SELECT col1 * col1 + + col0 + + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1621
SELECT DISTINCT col2 * tab0.col1 + 60 DIV + col0 + - tab0.col1 FROM tab0
----
1
2754
7371

skipif mysql # not compatible
query I rowsort label-1621
SELECT DISTINCT col2 * tab0.col1 + 60 / + col0 + - tab0.col1 FROM tab0
----
1
2754
7371

query I rowsort
SELECT ALL col2 * 20 + + col2 AS col1 FROM tab0
----
1722
21
693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * cor0.col2 + col2 * - col2 col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + col2 + 91 + col2 AS col0 FROM tab1 cor0
----
199
205
283

query I rowsort
SELECT + ( 79 ) + + col0 FROM tab2 AS cor0
----
157
158
86

onlyif mysql # use DIV operator for integer division
query I rowsort label-1626
SELECT + col0 + + col1 DIV col0 FROM tab2 AS cor0
----
11
78
79

skipif mysql # not compatible
query I rowsort label-1626
SELECT + col0 + + col1 / col0 FROM tab2 AS cor0
----
11
78
79

query I rowsort
SELECT + 0 AS col1 FROM tab1 AS cor0
----
0
0
0

query IIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 CROSS JOIN tab0 cor1
----
243 values hashing to 5c33e96b85afe1ea51bb6d4e9fa6f993

query I rowsort
SELECT DISTINCT cor0.col1 * - col1 AS col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT + + 35 * + col2 FROM tab1 AS cor0
----
1890
1995
3360

query I rowsort
SELECT ALL 69 FROM tab1 AS cor0
----
69
69
69

query I rowsort
SELECT col1 + col1 * 41 FROM tab2 AS cor0
----
1302
2478
714

query I rowsort
SELECT ALL - col1 * col1 * 61 FROM tab1 AS cor0
----
-10309
-41236
-6100

query I rowsort
SELECT + + 61 FROM tab0 AS cor0
----
61
61
61

query I rowsort
SELECT + - col0 + col2 * cor0.col2 FROM tab0 AS cor0
----
-34
1065
6635

query I rowsort
SELECT + ( 53 ) * + col1 AS col0 FROM tab1
----
1378
530
689

query I rowsort
SELECT ALL tab1.col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

onlyif mysql # use DIV operator for integer division
query I rowsort label-1638
SELECT + ( col2 ) DIV + col0 AS col1 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-1638
SELECT + ( col2 ) / + col0 AS col1 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT DISTINCT tab1.col1 AS col1 FROM tab1
----
10
13
26

query I rowsort
SELECT ALL - col2 * - tab1.col1 AS col2 FROM tab1
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-1641
SELECT DISTINCT 24 DIV - col1 AS col1 FROM tab2
----
-1
0

skipif mysql # not compatible
query I rowsort label-1641
SELECT DISTINCT 24 / - col1 AS col1 FROM tab2
----
-1
0

query I rowsort
SELECT + cor0.col2 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT DISTINCT 13 FROM tab0
----
13

query I rowsort
SELECT - tab1.col2 AS col2 FROM tab1
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-1645
SELECT col2 DIV col0 + + col0 * 81 + col0 * + 92 AS col1 FROM tab2 AS cor0
----
1214
13494
13667

skipif mysql # not compatible
query I rowsort label-1645
SELECT col2 / col0 + + col0 * 81 + col0 * + 92 AS col1 FROM tab2 AS cor0
----
1214
13494
13667

query I rowsort
SELECT + col0 + - col0 AS col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1647
SELECT - 77 DIV col1 + - col0 + cor0.col1 FROM tab1 AS cor0
----
-61
-72
21

skipif mysql # not compatible
query I rowsort label-1647
SELECT - 77 / col1 + - col0 + cor0.col1 FROM tab1 AS cor0
----
-61
-72
21

query I rowsort
SELECT - col1 - col0 FROM tab0
----
-110
-132
-180

onlyif mysql # use DIV operator for integer division
query I rowsort label-1649
SELECT ALL ( - col2 ) * - 63 + + col2 DIV + col2 + - 79 * col2 FROM tab0
----
-1311
-15
-527

skipif mysql # not compatible
query I rowsort label-1649
SELECT ALL ( - col2 ) * - 63 + + col2 / + col2 + - 79 * col2 FROM tab0
----
-1311
-15
-527

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1650
SELECT DISTINCT CAST( + 33 AS SIGNED ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
33

skipif mysql # not compatible
query I rowsort label-1650
SELECT DISTINCT CAST ( + 33 AS INTEGER ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
33

query I rowsort
SELECT 20 FROM tab2, tab0 AS cor0
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0, tab1, tab1 AS cor1
----
972 values hashing to a8481bfbfcb330825976c5896e54bc19

onlyif mysql # use DIV operator for integer division
query I rowsort label-1653
SELECT DISTINCT - + 51 DIV col2 + + col0 + - col2 FROM tab0 AS cor0
----
-10
-17
7

skipif mysql # not compatible
query I rowsort label-1653
SELECT DISTINCT - + 51 / col2 + + col0 + - col2 FROM tab0 AS cor0
----
-10
-17
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1654
SELECT - CAST( NULL AS SIGNED ) * - col2 + col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1654
SELECT - CAST ( NULL AS INTEGER ) * - col2 + col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - col0 - ( 55 * col1 + - col1 ) FROM tab1 AS cor0
----
-1407
-604
-782

query I rowsort
SELECT + cor0.col2 + col0 AS col1 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT 71 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to c1aace5d5fe27721cc925552513c85c0

query I rowsort
SELECT 53 AS col1 FROM tab1
----
53
53
53

query I rowsort
SELECT 35 + + col2 FROM tab0 AS cor0
----
117
36
68

query I rowsort
SELECT + col0 + - col1 * - col2 * - 53 AS col2 FROM tab0 AS cor0
----
-150390
-395397
-5106

query I rowsort
SELECT + 11 * col1 * col2 AS col0 FROM tab0
----
1067
31218
82082

query I rowsort
SELECT DISTINCT - 18 AS col1 FROM tab2
----
-18

query I rowsort
SELECT + 92 * - ( + col2 ) AS col2 FROM tab0 AS cor0
----
-3036
-7544
-92

query I rowsort
SELECT ALL + col0 * 96 + - cor0.col2 FROM tab0 AS cor0
----
2271
3359
8462

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1665
SELECT DISTINCT - cor0.col0 + CAST( NULL AS SIGNED ) * + col2 * - col1 AS col1 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1665
SELECT DISTINCT - cor0.col0 + CAST ( NULL AS INTEGER ) * + col2 * - col1 AS col1 FROM tab1 cor0
----
NULL

query I rowsort
SELECT ALL + col2 + + col1 * col1 AS col2 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT ALL - col0 + col1 AS col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT - - cor0.col0 * col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL + - col0 + col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col0 + - 18 FROM tab2 AS cor0
----
-11
60
61

query I rowsort
SELECT + col1 * 79 AS col1 FROM tab1 AS cor0
----
1027
2054
790

query I rowsort
SELECT DISTINCT + col2 + + ( col2 * + col2 ) AS col1 FROM tab1 cor0
----
2970
3306
9312

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col0 * CAST ( + 9 AS REAL ) FROM tab2 AS cor0
----
63
702
711

query I rowsort
SELECT DISTINCT - col0 + 29 + + ( col1 ) FROM tab2 AS cor0
----
-33
10
53

onlyif mysql # use DIV operator for integer division
query I rowsort label-1675
SELECT 42 * + col2 DIV + 1 + - ( col2 ) AS col2 FROM tab0
----
1353
3362
41

skipif mysql # not compatible
query I rowsort label-1675
SELECT 42 * + col2 / + 1 + - ( col2 ) AS col2 FROM tab0
----
1353
3362
41

query I rowsort
SELECT DISTINCT - 16 * col2 AS col0 FROM tab2
----
-416
-432
-608

query I rowsort
SELECT ALL 80 * col0 AS col2 FROM tab2
----
560
6240
6320

query I rowsort
SELECT DISTINCT + 67 * col2 * - tab2.col2 FROM tab2
----
-45292
-48843
-96748

query I rowsort
SELECT ALL + col2 + ( col2 ) * + tab0.col0 - col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT col0 + + 64 + col2 AS col0 FROM tab1
----
121
185
240

query I rowsort
SELECT + cor0.col0 + - cor0.col0 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col1 + col1 * - col0 FROM tab2 AS cor0
----
-1360
-248
-4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-1683
SELECT DISTINCT + col0 DIV col1 AS col2 FROM tab1 cor0
----
0
6

skipif mysql # not compatible
query I rowsort label-1683
SELECT DISTINCT + col0 / col1 AS col2 FROM tab1 cor0
----
0
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-1684
SELECT col2 DIV - col0 AS col1 FROM tab2 AS cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-1684
SELECT col2 / - col0 AS col1 FROM tab2 AS cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort
SELECT ALL cor0.col2 * CAST ( col0 AS REAL ) * col0 AS col2 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT DISTINCT - col2 + 2 AS col2 FROM tab0
----
-31
-80
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * 32 col2 FROM tab2 AS cor0
----
-224
-2496
-2528

query I rowsort
SELECT DISTINCT - - cor0.col0 * col2 * col2 FROM tab2 AS cor0
----
114076
5103
52728

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1689
SELECT ALL col0 * CAST( NULL AS SIGNED ) / - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1689
SELECT ALL col0 * CAST ( NULL AS INTEGER ) / - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * 54 col0 FROM tab1 AS cor0
----
2916
3078
5184

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 55 col1 FROM tab0, tab2 AS cor0
----
-55

skipif mysql # not compatible
query I rowsort
SELECT ALL + CAST ( - 61 AS REAL ) FROM tab1
----
-61
-61
-61

query I rowsort
SELECT ( 85 ) + + col2 FROM tab0 AS cor0
----
118
167
86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1694
SELECT ALL CAST( NULL AS SIGNED ) FROM tab2, tab2 AS cor0 CROSS JOIN tab1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-1694
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab2, tab2 AS cor0 CROSS JOIN tab1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT + cor0.col2 + + col0 * ( + col0 ) FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT ALL col2 * - col2 + ( + 62 ) AS col1 FROM tab2 AS cor0
----
-1382
-614
-667

query I rowsort
SELECT ALL + col0 - cor0.col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT - 1 + col1 * + col0 FROM tab1
----
1039
639
77

query I rowsort
SELECT col0 + + col2 FROM tab2
----
104
117
34

query I rowsort
SELECT - tab1.col0 + - col2 AS col2 FROM tab1
----
-121
-176
-57

query I rowsort
SELECT - + col1 + - cor0.col1 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT col1 + col0 * + ( - 59 + col1 ) AS col1 FROM tab1 AS cor0
----
-3126
-3667
-73

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0, tab1 cor1, tab2 AS cor2
----
972 values hashing to e610acd60f342127e6cdba18673d9f0e

query I rowsort
SELECT - cor0.col2 * + col2 AS col0 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT - - 45 FROM tab1 AS cor0
----
45
45
45

query I rowsort
SELECT ALL - + cor0.col0 * + col1 + col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT DISTINCT - - 12 AS col2 FROM tab0 cor0
----
12

query I rowsort
SELECT ALL - - col2 * - col1 FROM tab2 AS cor0
----
-1534
-646
-837

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0, tab1 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to f9101173abc9e524c6310e6c0eeefb0c

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 10 + - cor0.col2 col0 FROM tab1 cor0
----
-106
-64
-67

query I rowsort
SELECT ALL - 26 FROM tab1
----
-26
-26
-26

query I rowsort
SELECT 44 AS col1 FROM tab0
----
44
44
44

query I rowsort
SELECT + 58 AS col2 FROM tab0 AS cor0
----
58
58
58

query I rowsort
SELECT DISTINCT - col0 * col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT - + 90 FROM tab2 AS cor0
----
-90
-90
-90

query I rowsort
SELECT DISTINCT + col0 * + col2 + + col0 + + col1 FROM tab2 AS cor0
----
2165
227
3098

query I rowsort
SELECT ALL + col1 * + col2 - ( + col2 * col0 ) AS col0 FROM tab2 AS cor0
----
-2356
-494
648

query I rowsort
SELECT ALL - ( col2 ) + col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT - + col2 AS col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT + + cor0.col0 + - col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL col1 * col2 + - 21 FROM tab2 cor0
----
1513
625
816

query I rowsort
SELECT + 65 + col0 * - ( col2 ) FROM tab0 AS cor0
----
-7233
-727
30

query I rowsort
SELECT DISTINCT + cor0.col1 - col2 AS col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT DISTINCT + + ( - col2 ) * + col2 + 44 FROM tab2 AS cor0
----
-1400
-632
-685

query I rowsort
SELECT DISTINCT - ( cor0.col0 ) * - 98 + 69 FROM tab0 AS cor0
----
2421
3499
8791

query I rowsort
SELECT ALL col1 - + col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col2 - - col1 * col2 FROM tab1 cor0
----
1344
1458
627

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1729
SELECT col2 * - CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1729
SELECT col2 * - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + col0 col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT DISTINCT + col1 + cor0.col2 + col2 AS col2 FROM tab1 cor0
----
124
134
205

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col0 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT - 22 * col2 + col1 AS col1 FROM tab0
----
-1713
-640
75

query I rowsort
SELECT DISTINCT 21 AS col2 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
21

query I rowsort
SELECT ( - 48 ) + col1 FROM tab0 AS cor0
----
38
43
49

onlyif mysql # use DIV operator for integer division
query I rowsort label-1736
SELECT 74 DIV - col1 AS col1 FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-1736
SELECT 74 / - col1 AS col1 FROM tab1 AS cor0
----
-2
-5
-7

query I rowsort
SELECT DISTINCT - ( 83 ) * col2 AS col1 FROM tab0 AS cor0
----
-2739
-6806
-83

query I rowsort
SELECT DISTINCT - + ( cor0.col1 ) * col2 FROM tab2 AS cor0
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - cor0.col0 col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query I rowsort
SELECT + 67 * 21 + + col1 * - col0 AS col1 FROM tab0 AS cor0
----
-1988
-657
-6692

query I rowsort
SELECT - ( + col2 ) * col0 FROM tab0
----
-35
-7298
-792

query IIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0, tab0 cor1
----
243 values hashing to 3a953203ced079e372111d61dbd9e35f

query I rowsort
SELECT DISTINCT ( col0 ) AS col0 FROM tab0
----
24
35
89

query I rowsort
SELECT DISTINCT - + 34 AS col1 FROM tab1 cor0
----
-34

query I rowsort
SELECT - ( - 16 ) * + col1 AS col1 FROM tab0 AS cor0
----
1376
1456
1552

query I rowsort
SELECT DISTINCT - ( + col1 ) AS col0 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT 30 + - 94 FROM tab1 AS cor0
----
-64
-64
-64

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0, tab0 AS cor1, tab0 cor2
----
972 values hashing to 09b120a8ff13ebafea7af10c2152241b

query I rowsort
SELECT 98 * 35 + + col2 * col1 FROM tab1 cor0
----
4000
4678
4834

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + col1 * - cor0.col1 col1 FROM tab2 AS cor0
----
-210
-3403
-954

onlyif mysql # use DIV operator for integer division
query I rowsort label-1751
SELECT - - col0 * - col1 + - col0 DIV - col1 FROM tab2 cor0
----
-1339
-217
-4601

skipif mysql # not compatible
query I rowsort label-1751
SELECT - - col0 * - col1 + - col0 / - col1 FROM tab2 cor0
----
-1339
-217
-4601

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + cor0.col1 * + col0 col0 FROM tab0 AS cor0
----
2150
3492
8190

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1753
SELECT DISTINCT CAST( + 78 AS SIGNED ) AS col1 FROM tab2 cor0
----
78

skipif mysql # not compatible
query I rowsort label-1753
SELECT DISTINCT CAST ( + 78 AS INTEGER ) AS col1 FROM tab2 cor0
----
78

query I rowsort
SELECT ALL - 56 * + col2 * + col0 FROM tab2 AS cor0
----
-10584
-113568
-168112

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1755
SELECT + + col2 * cor0.col0 + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1755
SELECT + + col2 * cor0.col0 + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 + 66 + - col1 FROM tab2
----
66
66
66

query I rowsort
SELECT 8 + - col1 AS col0 FROM tab2 AS cor0
----
-23
-51
-9

query I rowsort
SELECT col0 * col0 + 27 AS col0 FROM tab0 AS cor0
----
1252
603
7948

query I rowsort
SELECT ALL + 47 + col0 FROM tab0
----
136
71
82

query I rowsort
SELECT ALL + col1 + 46 * col2 AS col1 FROM tab1
----
2510
2632
4429

query I rowsort
SELECT 38 * - 76 + col0 * - col0 + col0 * - col1 FROM tab2
----
-10472
-13574
-3154

query IIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1, tab1 AS cor0 WHERE ( NULL ) < ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col1 col2 FROM tab0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-1764
SELECT ALL - col1 + + 98 DIV - col1 + + 77 AS col0 FROM tab0
----
-10
-15
-21

skipif mysql # not compatible
query I rowsort label-1764
SELECT ALL - col1 + + 98 / - col1 + + 77 AS col0 FROM tab0
----
-10
-15
-21

query I rowsort
SELECT ALL tab2.col1 + col1 * col2 * - col1 FROM tab2
----
-10965
-25916
-90447

query I rowsort
SELECT - col2 * + cor0.col1 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + 88 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

query I rowsort
SELECT ( + cor0.col2 ) - - 58 FROM tab1, tab0 AS cor0
----
9 values hashing to 0b56a4f67c4dc721444e259e3ff17440

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( - 17 AS REAL ) FROM tab2
----
-17
-17
-17

query I rowsort
SELECT ALL - col1 * col1 * - col0 FROM tab2
----
22831
271518
6727

onlyif mysql # use DIV operator for integer division
query I rowsort label-1771
SELECT ALL + col2 DIV col1 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1771
SELECT ALL + col2 / col1 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT 5 FROM tab2
----
5
5
5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1773
SELECT col1 * col0 + col0 * CAST( 34 AS SIGNED ) FROM tab0 AS cor0
----
11125
2880
4585

skipif mysql # not compatible
query I rowsort label-1773
SELECT col1 * col0 + col0 * CAST ( 34 AS INTEGER ) FROM tab0 AS cor0
----
11125
2880
4585

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1774
SELECT - 67 + - cor0.col2 * + col0 + + CAST( col0 AS SIGNED ) FROM tab2 AS cor0
----
-2017
-249
-2990

skipif mysql # not compatible
query I rowsort label-1774
SELECT - 67 + - cor0.col2 * + col0 + + CAST ( col0 AS INTEGER ) FROM tab2 AS cor0
----
-2017
-249
-2990

query I rowsort
SELECT + - ( + col0 ) * + col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT col2 * col1 AS col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL + col0 + col1 * col1 AS col1 FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT - + col1 + - col2 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT ALL + col1 * tab0.col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT ALL + cor2.col1 AS col0 FROM tab2, tab0 AS cor0, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to d7d3fabcafbed14f0d6ffd37195c971c

query I rowsort
SELECT + cor0.col0 * cor0.col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT col2 * + 84 AS col1 FROM tab2 AS cor0
----
2184
2268
3192

query I rowsort
SELECT - cor0.col2 * 43 + - 95 AS col0 FROM tab1 AS cor0
----
-2417
-2546
-4223

query I rowsort
SELECT - - col0 + col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT - col0 + + ( + col1 ) FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT + col0 + col1 AS col1 FROM tab0
----
110
132
180

query I rowsort
SELECT + + col2 AS col0 FROM tab1 cor0
----
54
57
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1788
SELECT - cor0.col1 + CAST( ( col2 ) AS SIGNED ) * + col0 FROM tab2 AS cor0
----
158
1969
2985

skipif mysql # not compatible
query I rowsort label-1788
SELECT - cor0.col1 + CAST ( ( col2 ) AS INTEGER ) * + col0 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT - col2 + + col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT - - col1 * - col0 FROM tab1 AS cor0
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col0 + - ( col0 ) * + col0 + + col2 col1 FROM tab0
----
-1189
-519
-7750

query I rowsort
SELECT DISTINCT col1 + 56 FROM tab1
----
66
69
82

query I rowsort
SELECT DISTINCT 9 FROM tab2, tab2 cor0
----
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-1794
SELECT + + col1 DIV 89 FROM tab0 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-1794
SELECT + + col1 / 89 FROM tab0 AS cor0
----
0
1
1

query I rowsort
SELECT DISTINCT col0 * + ( 35 ) - - col1 * + 37 FROM tab1
----
1067
2610
3281

onlyif mysql # use DIV operator for integer division
query I rowsort label-1796
SELECT + col1 DIV 80 AS col0 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1796
SELECT + col1 / 80 AS col0 FROM tab2
----
0
0
0

query I rowsort
SELECT col0 * ( tab0.col2 ) FROM tab0
----
35
7298
792

query I rowsort
SELECT col1 + ( col0 ) FROM tab0
----
110
132
180

query I rowsort
SELECT ALL + col1 * + col1 + col1 AS col1 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT ALL - - col2 AS col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - col1 + - cor0.col0 FROM tab0 cor0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT col2 + + col0 * + col1 AS col0 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT - col0 * col2 + + cor0.col1 AS col2 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT ALL - 75 AS col2 FROM tab1 AS cor0
----
-75
-75
-75

query I rowsort
SELECT DISTINCT col0 * col0 + col2 FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT DISTINCT + col1 * cor0.col2 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - col1 * - ( cor0.col0 ) AS col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL ( - col2 ) * col2 AS col1 FROM tab0 cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT + 10 - - 83 * + col0 FROM tab0 AS cor0
----
2002
2915
7397

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( col1 AS REAL ) AS col0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL col1 + 87 FROM tab0 AS cor0
----
173
178
184

onlyif mysql # use DIV operator for integer division
query I rowsort label-1812
SELECT DISTINCT + 13 + col2 DIV col0 AS col0 FROM tab1 AS cor0
----
13
14
31

skipif mysql # not compatible
query I rowsort label-1812
SELECT DISTINCT + 13 + col2 / col0 AS col0 FROM tab1 AS cor0
----
13
14
31

query I rowsort
SELECT - cor0.col1 + col2 FROM tab1 AS cor0
----
28
47
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-1814
SELECT DISTINCT col1 * col1 DIV col1 + 10 AS col0 FROM tab0 AS cor0
----
101
107
96

skipif mysql # not compatible
query I rowsort label-1814
SELECT DISTINCT col1 * col1 / col1 + 10 AS col0 FROM tab0 AS cor0
----
101
107
96

query I rowsort
SELECT ALL col1 - + cor0.col1 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT col2 + 97 * col1 AS col1 FROM tab0
----
8375
8909
9410

query I rowsort
SELECT DISTINCT + col0 * col0 - col1 * col0 AS col0 FROM tab2
----
-168
1482
4898

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1818
SELECT + ( col1 ) * col2 + + CAST( - col1 AS SIGNED ) FROM tab0 AS cor0
----
0
2752
7371

skipif mysql # not compatible
query I rowsort label-1818
SELECT + ( col1 ) * col2 + + CAST ( - col1 AS INTEGER ) FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT DISTINCT - ( col2 ) * - col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL - - ( - col1 ) FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT col0 * col0 * col0 FROM tab1 AS cor0
----
262144
27
512000

query I rowsort
SELECT + ( + col0 ) * - 15 AS col1 FROM tab1 AS cor0
----
-1200
-45
-960

query I rowsort
SELECT - - col2 * - col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT 87 FROM tab0 AS cor0
----
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col0 * col2 + cor0.col2 col2 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT col2 + - col2 * - 41 * - col0 AS col1 FROM tab2 AS cor0
----
-123044
-7722
-83122

query I rowsort
SELECT ALL col0 * - col2 AS col2 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT + 66 * - col0 FROM tab1 AS cor0
----
-198
-4224
-5280

query I rowsort
SELECT ALL - cor0.col1 FROM tab1, tab2 AS cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT col2 * col1 AS col0 FROM tab2
----
1534
646
837

query I rowsort
SELECT + - cor0.col2 + + ( col2 ) * - col0 - cor0.col1 FROM tab0 AS cor0
----
-133
-7471
-911

query I rowsort
SELECT DISTINCT cor0.col1 * + col0 FROM tab2 AS cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 col1 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2, tab0 cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

skipif mysql # not compatible
query I rowsort
SELECT + tab0.col1 * col1 * + CAST ( - col0 AS REAL ) + col0 FROM tab0
----
-177480
-329280
-736920

query I rowsort
SELECT - + col1 + + col1 * col2 AS col0 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT DISTINCT - ( cor0.col2 ) + - col1 FROM tab2 AS cor0
----
-55
-58
-85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 col2 FROM tab2 AS cor0
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-1839
SELECT DISTINCT ( 99 ) DIV col2 AS col2 FROM tab1 cor0
----
1

skipif mysql # not compatible
query I rowsort label-1839
SELECT DISTINCT ( 99 ) / col2 AS col2 FROM tab1 cor0
----
1

query I rowsort
SELECT ALL ( col0 ) * col2 + col2 AS col1 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT ALL - - cor0.col2 AS col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT + col0 + 68 * - col0 * - ( 3 ) FROM tab2 AS cor0
----
1435
15990
16195

onlyif mysql # use DIV operator for integer division
query I rowsort label-1843
SELECT DISTINCT - col1 DIV + col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-1843
SELECT DISTINCT - col1 / + col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT + 87 AS col0 FROM tab2 AS cor0
----
87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1845
SELECT + CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1845
SELECT + CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1846
SELECT ALL cor0.col2 DIV - col1 FROM tab2 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-1846
SELECT ALL cor0.col2 / - col1 FROM tab2 AS cor0
----
-2
0
0

query I rowsort
SELECT DISTINCT 33 * col0 + col0 AS col0 FROM tab1 cor0
----
102
2176
2720

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT + - col1 * + col1 AS col2 FROM tab1 AS cor0
----
-100
-169
-676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1850
SELECT ALL - + CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1850
SELECT ALL - + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1851
SELECT + col0 DIV - ( + col1 ) AS col0 FROM tab1 AS cor0
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-1851
SELECT + col0 / - ( + col1 ) AS col0 FROM tab1 AS cor0
----
-6
-6
0

query I rowsort
SELECT - col2 + ( - tab0.col2 + col0 ) FROM tab0
----
-42
-75
33

query I rowsort
SELECT ALL + col0 + col2 * ( col2 ) + - ( + col1 ) FROM tab1
----
2893
3303
9283

query I rowsort
SELECT ALL + - col2 AS col1 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT + + 77 FROM tab1 AS cor0
----
77
77
77

query I rowsort
SELECT DISTINCT ( 31 ) FROM tab2 AS cor0
----
31

query I rowsort
SELECT ALL - 81 FROM tab1 AS cor0
----
-81
-81
-81

query I rowsort
SELECT - col2 + - ( - col1 ) + - col2 AS col0 FROM tab2 AS cor0
----
-23
-59
7

query I rowsort
SELECT + - 99 + + col1 AS col0 FROM tab2 AS cor0
----
-40
-68
-82

query I rowsort
SELECT DISTINCT + col0 * - cor0.col1 AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT col1 * + 13 FROM tab2 cor0
----
221
403
767

query I rowsort
SELECT DISTINCT + col2 * + 25 FROM tab2 AS cor0
----
650
675
950

query I rowsort
SELECT 57 - + col1 FROM tab1
----
31
44
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * col2 * col2 col1 FROM tab0
----
611884
93654
97

query I rowsort
SELECT tab0.col2 AS col1 FROM tab0
----
1
33
82

query I rowsort
SELECT + col1 * col1 * col0 AS col0 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT ALL - col1 * col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT - 53 + - 66 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 068e39d2dced9933ee63e8f679a90b4d

query I rowsort
SELECT + 92 AS col2 FROM tab2 AS cor0
----
92
92
92

query I rowsort
SELECT DISTINCT + col0 * + cor0.col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT + col2 * - col1 AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT + 56 AS col0 FROM tab1
----
56

query I rowsort
SELECT ALL col1 * col0 AS col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT ALL col1 * + 7 FROM tab1
----
182
70
91

query I rowsort
SELECT ALL ( tab2.col0 ) FROM tab2
----
7
78
79

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 cor0, tab2 AS cor1, tab1, tab0 AS cor2
----
3645 values hashing to 6a63085e8cab6f97591fd0a6b6ffff07

query I rowsort
SELECT DISTINCT + - col0 + col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL - col1 + + ( col1 * col1 ) FROM tab2 AS cor0
----
272
3422
930

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1879
SELECT + col0 * - CAST( NULL AS SIGNED ) * + col0 + + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1879
SELECT + col0 * - CAST ( NULL AS INTEGER ) * + col0 + + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 52 col0 FROM tab2, tab2 AS cor0
----
-52

query I rowsort
SELECT DISTINCT col0 + 78 AS col0 FROM tab0 AS cor0
----
102
113
167

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 ALL + + col0 + - 84 + col1 FROM tab2 AS cor0
----
-46
12
53

query I rowsort
SELECT ALL ( col2 ) - + 64 FROM tab0
----
-31
-63
18

query I rowsort
SELECT ALL + col1 * + 36 + col1 FROM tab1
----
370
481
962

onlyif mysql # use DIV operator for integer division
query I rowsort label-1886
SELECT col2 * - 12 * - col0 + + col0 + + col0 * 40 DIV + col1 AS col1 FROM tab2 AS cor0
----
2284
24466
36288

skipif mysql # not compatible
query I rowsort label-1886
SELECT col2 * - 12 * - col0 + + col0 + + col0 * 40 / + col1 AS col1 FROM tab2 AS cor0
----
2284
24466
36288

query I rowsort
SELECT DISTINCT - col2 * 23 FROM tab1 AS cor0
----
-1242
-1311
-2208

query I rowsort
SELECT cor0.col0 + col2 + - col0 FROM tab1 AS cor0
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + col1 + 96 col2 FROM tab1 AS cor0
----
163
176
205

query I rowsort
SELECT - - cor0.col0 * + col1 FROM tab2 cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + + 9 col2 FROM tab2
----
16
87
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-1892
SELECT - col1 DIV + ( col0 ) + col2 AS col0 FROM tab0
----
-1
30
81

skipif mysql # not compatible
query I rowsort label-1892
SELECT - col1 / + ( col0 ) + col2 AS col0 FROM tab0
----
-1
30
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1893
SELECT col2 + CAST( - col2 AS SIGNED ) * - col1 FROM tab0
----
2871
7544
98

skipif mysql # not compatible
query I rowsort label-1893
SELECT col2 + CAST ( - col2 AS INTEGER ) * - col1 FROM tab0
----
2871
7544
98

query I rowsort
SELECT DISTINCT + tab1.col0 + ( - col2 ) * + col1 * col1 FROM tab1
----
-16144
-36501
-5636

query I rowsort
SELECT - col1 * + col2 * + col1 FROM tab0
----
-244068
-679042
-9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-1896
SELECT DISTINCT col0 DIV col1 + + 26 AS col1 FROM tab2
----
26
27
30

skipif mysql # not compatible
query I rowsort label-1896
SELECT DISTINCT col0 / col1 + + 26 AS col1 FROM tab2
----
26
27
30

query I rowsort
SELECT ALL - - col1 + + col2 FROM tab1 cor0
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 + - cor0.col0 col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT - col2 + cor0.col2 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + col2 + - ( 52 ) FROM tab0 AS cor0
----
-19
-51
30

query IIIIIIIII rowsort
SELECT ALL * FROM tab1 cor0 CROSS JOIN tab1, tab0 cor1
----
243 values hashing to 3a953203ced079e372111d61dbd9e35f

query I rowsort
SELECT - 34 AS col2 FROM tab2, tab0 cor0
----
9 values hashing to 40442a74794ded4c78101eefe525a5bb

query I rowsort
SELECT DISTINCT ( tab2.col1 ) AS col1 FROM tab2
----
17
31
59

query I rowsort
SELECT ALL + + ( + 43 ) + cor0.col0 AS col1 FROM tab1 AS cor0
----
107
123
46

query I rowsort
SELECT + col1 * + ( - col1 ) FROM tab1
----
-100
-169
-676

query I rowsort
SELECT - col1 + + 82 FROM tab1 AS cor0
----
56
69
72

query I rowsort
SELECT - - col1 + - col0 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT ALL - col2 * - col0 + - col2 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT + - ( + col0 ) AS col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL + col0 * col2 AS col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT - + cor0.col2 * - cor0.col0 FROM tab1, tab1 cor0
----
162
3648
7680

query I rowsort
SELECT ALL + ( + col1 ) FROM tab2
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 5 col2 FROM tab2 AS cor0
----
5
5
5

query I rowsort
SELECT ALL - 72 + col0 * + 93 FROM tab2
----
579
7182
7275

query I rowsort
SELECT DISTINCT + col1 + + col1 + ( ( - col0 ) * + col0 + + col1 ) FROM tab1
----
-4066
-6361
69

query I rowsort
SELECT - col2 + + tab0.col2 + + col0 * + col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT - col0 * + col0 AS col1 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT ALL - 95 * col0 * col0 FROM tab2 AS cor0
----
-4655
-577980
-592895

onlyif mysql # use DIV operator for integer division
query I rowsort label-1919
SELECT ALL + ( cor0.col2 ) DIV + col2 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1919
SELECT ALL + ( cor0.col2 ) / + col2 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT - col1 * - col2 AS col1 FROM tab2 AS cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + col0 ) * + col0 * + 1 col2 FROM tab0 AS cor0
----
1225
576
7921

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0, tab2 AS cor1, tab2, tab1 cor2
----
3645 values hashing to a8d2ba8b8eb568b0a9a1771ccb0a8f23

query I rowsort
SELECT - 28 + - col2 FROM tab1 AS cor0
----
-124
-82
-85

query I rowsort
SELECT + col1 + - 42 FROM tab0 AS cor0
----
44
49
55

query I rowsort
SELECT DISTINCT + col2 + - ( col0 ) AS col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT + col2 * + col2 - + col0 AS col1 FROM tab0 AS cor0
----
-34
1065
6635

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1927
SELECT ALL + col2 + CAST( col0 AS SIGNED ) FROM tab2 AS cor0
----
104
117
34

skipif mysql # not compatible
query I rowsort label-1927
SELECT ALL + col2 + CAST ( col0 AS INTEGER ) FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL + cor0.col0 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT - - col2 * col1 + + col1 AS col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT DISTINCT - col2 * + ( col0 ) + col1 * - col1 FROM tab1 AS cor0
----
-3748
-7849
-838

query I rowsort
SELECT ALL col1 - col0 * + col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT DISTINCT + + col2 + + col1 * col1 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT col1 * + col0 + + 58 + + col0 AS col1 FROM tab2
----
1480
282
4738

query I rowsort
SELECT DISTINCT + col1 - col1 FROM tab2
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1935
SELECT 34 DIV col1 AS col1 FROM tab1
----
1
2
3

skipif mysql # not compatible
query I rowsort label-1935
SELECT 34 / col1 AS col1 FROM tab1
----
1
2
3

query I rowsort
SELECT DISTINCT col0 + col2 AS col1 FROM tab2
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-1937
SELECT 1 DIV col0 - 4 AS col2 FROM tab0
----
-4
-4
-4

skipif mysql # not compatible
query I rowsort label-1937
SELECT 1 / col0 - 4 AS col2 FROM tab0
----
-4
-4
-4

query I rowsort
SELECT col1 + + col0 * col0 * col2 FROM tab2 AS cor0
----
1354
158243
237175

query I rowsort
SELECT DISTINCT + col0 - col2 AS col0 FROM tab0
----
-9
34
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-1940
SELECT DISTINCT col0 - col2 * col1 DIV + ( + col0 * - col1 ) FROM tab1
----
21
64
81

skipif mysql # not compatible
query I rowsort label-1940
SELECT DISTINCT col0 - col2 * col1 / + ( + col0 * - col1 ) FROM tab1
----
21
64
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-1941
SELECT col2 DIV cor0.col0 + - 54 FROM tab1 AS cor0
----
-36
-53
-54

skipif mysql # not compatible
query I rowsort label-1941
SELECT col2 / cor0.col0 + - 54 FROM tab1 AS cor0
----
-36
-53
-54

query I rowsort
SELECT + - col1 * + cor0.col1 + - col2 FROM tab2 AS cor0
----
-327
-3507
-988

query I rowsort
SELECT DISTINCT + cor0.col0 * + 47 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
329
3666
3713

onlyif mysql # use DIV operator for integer division
query I rowsort label-1944
SELECT col2 DIV + col2 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1944
SELECT col2 / + col2 FROM tab0
----
1
1
1

query I rowsort
SELECT - ( + ( - col2 ) ) * ( - 55 ) FROM tab2
----
-1430
-1485
-2090

onlyif mysql # use DIV operator for integer division
query I rowsort label-1946
SELECT 33 DIV 8 FROM tab2
----
4
4
4

skipif mysql # not compatible
query I rowsort label-1946
SELECT 33 / 8 FROM tab2
----
4
4
4

query I rowsort
SELECT - 5 FROM tab1
----
-5
-5
-5

query I rowsort
SELECT tab0.col2 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1949
SELECT + col0 + CAST( NULL AS SIGNED ) * col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1949
SELECT + col0 + CAST ( NULL AS INTEGER ) * col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1950
SELECT tab2.col2 * col0 + + col1 DIV ( col1 ) col2 FROM tab2
----
190
2029
3003

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1950
SELECT tab2.col2 * col0 + + col1 / ( col1 ) col2 FROM tab2
----
190
2029
3003

query I rowsort
SELECT DISTINCT col1 * - col2 AS col1 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT - tab1.col1 * col2 * 98 AS col0 FROM tab1
----
-122304
-137592
-55860

onlyif mysql # use DIV operator for integer division
query I rowsort label-1953
SELECT cor0.col2 * col0 + + col1 DIV col1 + + col0 * cor0.col0 AS col0 FROM tab2 AS cor0
----
239
8113
9244

skipif mysql # not compatible
query I rowsort label-1953
SELECT cor0.col2 * col0 + + col1 / col1 + + col0 * cor0.col0 AS col0 FROM tab2 AS cor0
----
239
8113
9244

query I rowsort
SELECT DISTINCT 67 AS col0 FROM tab1
----
67

query I rowsort
SELECT 40 FROM tab2
----
40
40
40

query I rowsort
SELECT + 23 AS col0 FROM tab2
----
23
23
23

query I rowsort
SELECT DISTINCT + 18 AS col1 FROM tab0
----
18

query I rowsort
SELECT - 55 * - col2 FROM tab1 AS cor0
----
2970
3135
5280

query I rowsort
SELECT - - 17 FROM tab0 AS cor0
----
17
17
17

query I rowsort
SELECT - col1 * - 85 + - col2 * + col2 * + col1 AS col1 FROM tab2
----
-19964
-23103
-34869

query I rowsort
SELECT DISTINCT - col1 * col0 AS col2 FROM tab0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 29 col0 FROM tab1, tab0 AS cor0, tab2 cor1
----
27 values hashing to 4c56285992bcb76e1aac22e6d23d1318

query I rowsort
SELECT + col2 + - col2 * - col1 AS col1 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT DISTINCT + col0 * - col1 + - col2 AS col0 FROM tab1 AS cor0
----
-1136
-132
-697

onlyif mysql # use DIV operator for integer division
query I rowsort label-1965
SELECT ALL col1 DIV 26 + + col0 AS col1 FROM tab1 cor0
----
4
64
80

skipif mysql # not compatible
query I rowsort label-1965
SELECT ALL col1 / 26 + + col0 AS col1 FROM tab1 cor0
----
4
64
80

query I rowsort
SELECT - ( col1 ) AS col1 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT col2 * col2 - col0 * 90 AS col1 FROM tab2 cor0
----
-5666
-6344
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-1968
SELECT + 42 DIV col0 + col1 FROM tab1 AS cor0
----
10
13
40

skipif mysql # not compatible
query I rowsort label-1968
SELECT + 42 / col0 + col1 FROM tab1 AS cor0
----
10
13
40

query I rowsort
SELECT + 84 + 58 * + col1 FROM tab2 AS cor0
----
1070
1882
3506

query I rowsort
SELECT + 95 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to e57d8ed879dfd04d04aae87725c970d3

query I rowsort
SELECT ( col2 ) AS col0 FROM tab2
----
26
27
38

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0, tab0 AS cor1, tab1 cor2
----
972 values hashing to 88213a0de4c0a44aaefe8bbffbcaf44a

query I rowsort
SELECT + col1 * cor0.col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT - ( 85 ) FROM tab1
----
-85
-85
-85

query I rowsort
SELECT ( col0 * - tab0.col2 ) - 28 * ( - tab0.col0 ) FROM tab0
----
-120
-4806
945

onlyif mysql # use DIV operator for integer division
query I rowsort label-1976
SELECT col1 * 44 - col2 DIV col0 FROM tab2
----
1361
2596
748

skipif mysql # not compatible
query I rowsort label-1976
SELECT col1 * 44 - col2 / col0 FROM tab2
----
1361
2596
748

query I rowsort
SELECT DISTINCT 87 FROM tab2
----
87

onlyif mysql # use DIV operator for integer division
query I rowsort label-1978
SELECT + 66 * 95 + col2 DIV col1 FROM tab2
----
6270
6270
6272

skipif mysql # not compatible
query I rowsort label-1978
SELECT + 66 * 95 + col2 / col1 FROM tab2
----
6270
6270
6272

onlyif mysql # use DIV operator for integer division
query I rowsort label-1979
SELECT + 88 DIV col0 - - ( 43 ) AS col1 FROM tab0 AS cor0
----
43
45
46

skipif mysql # not compatible
query I rowsort label-1979
SELECT + 88 / col0 - - ( 43 ) AS col1 FROM tab0 AS cor0
----
43
45
46

query I rowsort
SELECT - - ( - col1 ) + col0 AS col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT 0 * + col0 - col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT - cor0.col2 * col0 + col2 FROM tab0 AS cor0
----
-34
-7216
-759

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 - + col1 col0 FROM tab1 AS cor0
----
28
47
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1984
SELECT + col1 * - cor0.col2 + - CAST( col2 AS SIGNED ) FROM tab1 AS cor0
----
-1344
-1458
-627

skipif mysql # not compatible
query I rowsort label-1984
SELECT + col1 * - cor0.col2 + - CAST ( col2 AS INTEGER ) FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT ALL col1 * + col1 AS col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT - col2 - col0 * + 51 FROM tab1 AS cor0
----
-207
-3321
-4176

query I rowsort
SELECT DISTINCT - col0 + + col2 * ( + 18 ) AS col0 FROM tab0 AS cor0
----
-17
1387
570

query I rowsort
SELECT ALL - + col1 - col1 FROM tab1 cor0
----
-20
-26
-52

query I rowsort
SELECT + col2 + col1 * + 30 AS col0 FROM tab0 cor0
----
2613
2812
2911

onlyif mysql # use DIV operator for integer division
query I rowsort label-1990
SELECT DISTINCT + - col2 DIV - col1 col1 FROM tab1 AS cor0
----
2
5
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1990
SELECT DISTINCT + - col2 / - col1 col1 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT DISTINCT - 3 * col2 FROM tab1 AS cor0
----
-162
-171
-288

query I rowsort
SELECT col1 * + cor0.col2 - - col0 AS col1 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT + col2 + cor0.col2 * - col0 FROM tab0 cor0
----
-34
-7216
-759

query I rowsort
SELECT DISTINCT + - col2 + col2 FROM tab2 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1995
SELECT ALL - 6 DIV - col2 AS col2 FROM tab0 AS cor0
----
0
0
6

skipif mysql # not compatible
query I rowsort label-1995
SELECT ALL - 6 / - col2 AS col2 FROM tab0 AS cor0
----
0
0
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-1996
SELECT DISTINCT col2 DIV col2 + - 53 FROM tab0 AS cor0
----
-52

skipif mysql # not compatible
query I rowsort label-1996
SELECT DISTINCT col2 / col2 + - 53 FROM tab0 AS cor0
----
-52

query I rowsort
SELECT DISTINCT + - col1 * col2 + col1 AS col0 FROM tab1 cor0
----
-1235
-1378
-560

query I rowsort
SELECT + - 59 - - col0 FROM tab0 AS cor0
----
-24
-35
30

query I rowsort
SELECT - - col0 * col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT col1 * - col0 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT col1 + col0 + col1 FROM tab2 AS cor0
----
113
196
69

query I rowsort
SELECT ALL cor0.col0 FROM tab1, tab2 cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT + col1 * + cor0.col0 AS col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - + col0 * - 0 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT col1 + - col2 * col0 FROM tab1 AS cor0
----
-136
-3638
-7667

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2006
SELECT DISTINCT col1 * CAST( + 84 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
1428
2604
4956

skipif mysql # not compatible
query I rowsort label-2006
SELECT DISTINCT col1 * CAST ( + 84 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
1428
2604
4956

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( - 97 AS REAL ) * col2 FROM tab2 cor0
----
2522
2619
3686

onlyif mysql # use DIV operator for integer division
query I rowsort label-2008
SELECT DISTINCT + + col0 DIV - col1 FROM tab1 AS cor0
----
-6
0

skipif mysql # not compatible
query I rowsort label-2008
SELECT DISTINCT + + col0 / - col1 FROM tab1 AS cor0
----
-6
0

query I rowsort
SELECT + ( - cor0.col0 ) FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT + + 60 * col0 AS col1 FROM tab2 AS cor0
----
420
4680
4740

query I rowsort
SELECT DISTINCT - cor1.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
-86
-91
-97

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab1, tab1 cor2
----
3645 values hashing to 79b6ae096785aaecea9c1428e4a43e5f

query I rowsort
SELECT + 80 FROM tab1 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab1 cor2
----
81 values hashing to 2815a2e064e1815ac3a10bcd8b0ab19c

query I rowsort
SELECT ALL col2 + - ( - col1 ) AS col2 FROM tab2
----
55
58
85

query I rowsort
SELECT ALL col2 + - tab0.col1 AS col0 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2017
SELECT + CAST( NULL AS SIGNED ) FROM tab1, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2017
SELECT + CAST ( NULL AS INTEGER ) FROM tab1, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT - tab0.col2 + - col2 FROM tab0
----
-164
-2
-66

query I rowsort
SELECT ALL + col1 + - col2 FROM tab0 AS cor0
----
53
9
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col1 * - 60 + 71 * cor0.col0 col1 FROM tab1 AS cor0
----
-1347
3944
4900

query I rowsort
SELECT - col0 * 58 AS col0 FROM tab0
----
-1392
-2030
-5162

query I rowsort
SELECT DISTINCT - col0 * col1 FROM tab2 cor0
----
-1343
-217
-4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2023
SELECT + CAST( NULL AS SIGNED ) * 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-2023
SELECT + CAST ( NULL AS INTEGER ) * col1 col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + col1 AS col2 FROM tab2 AS cor0
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-2025
SELECT ALL col0 * col0 DIV cor0.col2 + col0 * col2 FROM tab1 AS cor0
----
162
3719
7746

skipif mysql # not compatible
query I rowsort label-2025
SELECT ALL col0 * col0 / cor0.col2 + col0 * col2 FROM tab1 AS cor0
----
162
3719
7746

query I rowsort
SELECT + + cor0.col2 AS col1 FROM tab2 AS cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * + 22 * - col2 col1 FROM tab1 AS cor0
----
-12540
-27456
-30888

query I rowsort
SELECT ALL 60 * col2 + col2 AS col1 FROM tab2 AS cor0
----
1586
1647
2318

query I rowsort
SELECT 70 + col0 FROM tab1 AS cor0
----
134
150
73

query I rowsort
SELECT col2 + col2 FROM tab1 cor0
----
108
114
192

query I rowsort
SELECT DISTINCT + col0 * 82 - + col1 AS col2 FROM tab2 AS cor0
----
543
6337
6461

onlyif mysql # use DIV operator for integer division
query I rowsort label-2032
SELECT DISTINCT + - cor0.col1 DIV col0 FROM tab2 cor0
----
-4
0

skipif mysql # not compatible
query I rowsort label-2032
SELECT DISTINCT + - cor0.col1 / col0 FROM tab2 cor0
----
-4
0

query I rowsort
SELECT ALL ( - col1 ) FROM tab2
----
-17
-31
-59

query I rowsort
SELECT + + ( col1 ) * col0 AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL + col2 * col2 * - col0 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT col1 + cor0.col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT + col2 * col2 + + col2 FROM tab0 cor0
----
1122
2
6806

query I rowsort
SELECT DISTINCT - - col0 + + 6 FROM tab2 AS cor0
----
13
84
85

query I rowsort
SELECT DISTINCT + 15 + + 34 FROM tab0 cor0
----
49

onlyif mysql # use DIV operator for integer division
query I rowsort label-2040
SELECT DISTINCT - + col1 DIV 51 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-2040
SELECT DISTINCT - + col1 / 51 FROM tab1 AS cor0
----
0

query I rowsort
SELECT col1 - - 41 AS col2 FROM tab1
----
51
54
67

query I rowsort
SELECT DISTINCT - 73 AS col0 FROM tab1 AS cor0
----
-73

query I rowsort
SELECT ALL col0 + - col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT ALL + - col0 + 56 * cor0.col0 FROM tab2 AS cor0
----
385
4290
4345

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 77 col2 FROM tab1 cor0
----
-77
-77
-77

onlyif mysql # use DIV operator for integer division
query I rowsort label-2046
SELECT DISTINCT col0 DIV cor0.col1 - + col2 * + col1 FROM tab2 AS cor0
----
-1533
-642
-837

skipif mysql # not compatible
query I rowsort label-2046
SELECT DISTINCT col0 / cor0.col1 - + col2 * + col1 FROM tab2 AS cor0
----
-1533
-642
-837

query I rowsort
SELECT + - cor0.col1 + col0 AS col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT - 76 * - col0 FROM tab1 AS cor0
----
228
4864
6080

query I rowsort
SELECT ( col0 ) AS col1 FROM tab0 AS cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-2050
SELECT ALL - + ( col0 ) DIV 1 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-2050
SELECT ALL - + ( col0 ) / 1 FROM tab2 AS cor0
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 79 * col2 col0 FROM tab0 cor0
----
-2607
-6478
-79

query I rowsort
SELECT - - ( col2 ) AS col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT + + 79 * col2 AS col2 FROM tab1 AS cor0
----
4266
4503
7584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - ( + col1 ) + - ( + cor0.col2 ) col1 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT ALL - + col1 * col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT cor0.col2 + + col1 AS col0 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT - 61 + col1 FROM tab2 AS cor0
----
-2
-30
-44

query I rowsort
SELECT DISTINCT ( - col1 ) FROM tab0 cor0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2059
SELECT ALL + col1 DIV col0 + - 40 AS col1 FROM tab0 AS cor0
----
-37
-38
-39

skipif mysql # not compatible
query I rowsort label-2059
SELECT ALL + col1 / col0 + - 40 AS col1 FROM tab0 AS cor0
----
-37
-38
-39

query I rowsort
SELECT ALL 13 - - col1 FROM tab0 AS cor0
----
104
110
99

query I rowsort
SELECT ALL + - col1 * + col2 + 6 AS col0 FROM tab1 AS cor0
----
-1242
-1398
-564

query I rowsort
SELECT DISTINCT col2 + - col0 AS col1 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT + col1 + cor0.col2 FROM tab1 cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2064
SELECT DISTINCT - 38 + - col1 DIV col0 FROM tab0 AS cor0
----
-39
-40
-41

skipif mysql # not compatible
query I rowsort label-2064
SELECT DISTINCT - 38 + - col1 / col0 FROM tab0 AS cor0
----
-39
-40
-41

query I rowsort
SELECT DISTINCT - col2 * col0 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT col2 * - col1 + 19 * - 73 * - col1 - ( 44 ) AS col0 FROM tab1 AS cor0
----
13256
16739
34614

query I rowsort
SELECT ALL cor0.col0 * col2 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT ALL - + col0 + col0 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 52 FROM tab2 cor0
----
52

query I rowsort
SELECT DISTINCT - - cor0.col0 AS col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT col1 * col0 + cor0.col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT ALL - col0 + - col0 + + ( col2 ) FROM tab1 AS cor0
----
-64
-71
48

query I rowsort
SELECT ALL - cor0.col0 * - 20 FROM tab1 AS cor0
----
1280
1600
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-2074
SELECT ALL cor0.col1 DIV - 85 AS col2 FROM tab2 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2074
SELECT ALL cor0.col1 / - 85 AS col2 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT col1 + - col2 AS col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT tab1.col0 + + col0 - col0 AS col2 FROM tab1
----
3
64
80

query I rowsort
SELECT DISTINCT + + col2 + - col2 * ( col1 + + col0 ) FROM tab0 AS cor0
----
-131
-14678
-3597

query I rowsort
SELECT + + col2 * + ( 16 ) + + col1 FROM tab1 AS cor0
----
1549
890
922

query I rowsort
SELECT ALL - cor0.col2 + col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT - col1 + 67 * col2 FROM tab2 AS cor0
----
1683
1778
2529

onlyif mysql # use DIV operator for integer division
query I rowsort label-2081
SELECT DISTINCT - cor0.col0 DIV + col1 + 92 AS col0 FROM tab1 AS cor0
----
86
92

skipif mysql # not compatible
query I rowsort label-2081
SELECT DISTINCT - cor0.col0 / + col1 + 92 AS col0 FROM tab1 AS cor0
----
86
92

query I rowsort
SELECT + - col1 + 4 * + col1 * col0 FROM tab1 AS cor0
----
2550
286
4147

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * + col0 + col0 * col0 - - col2 * + col2 col0 FROM tab0
----
1261
21943
2457

query I rowsort
SELECT + col1 + - 26 + col0 * col1 FROM tab2 AS cor0
----
1334
222
4635

query I rowsort
SELECT col0 + - 80 AS col0 FROM tab0 AS cor0
----
-45
-56
9

query I rowsort
SELECT + col0 + + ( 69 ) * col1 FROM tab0 AS cor0
----
5958
6368
6728

query I rowsort
SELECT ALL + cor0.col0 * + ( col1 ) FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT - - col0 * 47 + col2 AS col1 FROM tab0 AS cor0
----
1161
1646
4265

query I rowsort
SELECT 17 FROM tab1
----
17
17
17

query I rowsort
SELECT DISTINCT 43 AS col1 FROM tab1
----
43

query I rowsort
SELECT + 93 FROM tab2
----
93
93
93

query I rowsort
SELECT + col1 - 62 AS col0 FROM tab0 AS cor0
----
24
29
35

query I rowsort
SELECT 6 * tab2.col1 FROM tab2
----
102
186
354

query I rowsort
SELECT DISTINCT - 68 - + col0 AS col2 FROM tab1
----
-132
-148
-71

query I rowsort
SELECT DISTINCT - 82 FROM tab2, tab2 AS cor0
----
-82

query I rowsort
SELECT - ( - col2 ) + - col2 FROM tab0 AS cor0
----
0
0
0

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0, tab1 cor1, tab0 AS cor2
----
972 values hashing to 67c5300bc5cba0be4f54a444dc6f05b9

query I rowsort
SELECT - col2 * col0 + col2 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT ALL col2 + - 1 * - 23 + col2 FROM tab0
----
187
25
89

query I rowsort
SELECT cor0.col0 * + col1 - + cor0.col0 * - col2 * - cor0.col1 AS col0 FROM tab1 AS cor0
----
-35840
-4134
-98800

query I rowsort
SELECT 54 FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0, tab1, tab0 cor1
----
972 values hashing to b51b4342db121ebc2d3d353dcd8ed521

query I rowsort
SELECT DISTINCT tab0.col1 * ( col1 ) AS col0 FROM tab0
----
7396
8281
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-2104
SELECT ALL + tab2.col1 DIV + cor0.col2 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 7a47860681566df74bf5ec42bb859479

skipif mysql # not compatible
query I rowsort label-2104
SELECT ALL + tab2.col1 / + cor0.col2 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 7a47860681566df74bf5ec42bb859479

onlyif mysql # use DIV operator for integer division
query I rowsort label-2105
SELECT ALL col2 DIV tab1.col1 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-2105
SELECT ALL col2 / tab1.col1 FROM tab1
----
2
5
7

query I rowsort
SELECT DISTINCT 40 * col2 AS col2 FROM tab0 cor0
----
1320
3280
40

query I rowsort
SELECT - cor0.col2 + col2 FROM tab1 AS cor0
----
0
0
0

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0, tab2 AS cor1, tab0 AS cor2
----
972 values hashing to e4c748f267e8d2a0e6d563281e1fb975

query I rowsort
SELECT - col2 * col0 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + col2 * cor0.col1 * - 5 + cor0.col2 + - cor0.col0 FROM tab2 cor0
----
-3271
-4165
-7722

query I rowsort
SELECT + col2 + + col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT - col0 * + col0 AS col1 FROM tab0 AS cor0
----
-1225
-576
-7921

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0, tab0, tab2 AS cor1
----
972 values hashing to 1e9d01970ae508486ddabec967bb176c

query I rowsort
SELECT DISTINCT 32 FROM tab2
----
32

query I rowsort
SELECT - - ( cor0.col1 ) FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - col0 + + cor0.col1 AS col0 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT + + 57 + col0 AS col0 FROM tab2 AS cor0
----
135
136
64

query I rowsort
SELECT - + col2 + - col2 AS col2 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT + 36 + + col2 AS col2 FROM tab1 AS cor0
----
132
90
93

query I rowsort
SELECT DISTINCT + + col1 + col0 FROM tab2 AS cor0
----
137
38
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * 11 col1 FROM tab2 AS cor0
----
77
858
869

query I rowsort
SELECT + + col1 * col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT + col1 + - col2 * 88 + - cor0.col2 AS col0 FROM tab2 AS cor0
----
-2255
-2372
-3365

query I rowsort
SELECT + - col2 * col1 * col2 FROM tab0 AS cor0
----
-611884
-93654
-97

query I rowsort
SELECT DISTINCT + 38 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
38

query I rowsort
SELECT - col0 + + 49 AS col0 FROM tab1 AS cor0
----
-15
-31
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col2 FROM tab0
----
-24
-35
-89

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0, tab0 cor0, tab2
----
972 values hashing to 1e9d01970ae508486ddabec967bb176c

query I rowsort
SELECT DISTINCT 27 FROM tab2, tab0 AS cor0
----
27

query I rowsort
SELECT ALL 34 AS col0 FROM tab2, tab2 cor0
----
9 values hashing to 1146d159f0b9b4378a8b738b963f7039

query I rowsort
SELECT - 31 * cor0.col1 AS col1 FROM tab2 AS cor0
----
-1829
-527
-961

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( cor0.col0 AS REAL ) FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT - + 7 AS col0 FROM tab0 cor0
----
-7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2134
SELECT - + CAST( NULL AS SIGNED ) * col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2134
SELECT - + CAST ( NULL AS INTEGER ) * col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * + 76 AS col0 FROM tab1 cor0
----
228
4864
6080

query I rowsort
SELECT ALL - tab1.col0 * 36 FROM tab1
----
-108
-2304
-2880

query I rowsort
SELECT - + cor0.col0 * col2 * col2 AS col1 FROM tab2 AS cor0
----
-114076
-5103
-52728

onlyif mysql # use DIV operator for integer division
query I rowsort label-2138
SELECT + + 1 DIV - col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2138
SELECT + + 1 / - col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2139
SELECT DISTINCT + col2 + 89 DIV + col0 FROM tab2 AS cor0
----
27
39

skipif mysql # not compatible
query I rowsort label-2139
SELECT DISTINCT + col2 + 89 / + col0 FROM tab2 AS cor0
----
27
39

query I rowsort
SELECT DISTINCT 54 * + col0 FROM tab1 AS cor0
----
162
3456
4320

onlyif mysql # use DIV operator for integer division
query I rowsort label-2141
SELECT ALL + 54 DIV 94 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2141
SELECT ALL + 54 / 94 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT 0 * - 69 AS col0 FROM tab2 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 * + 66 col1 FROM tab1 AS cor0
----
1716
660
858

query I rowsort
SELECT DISTINCT - - 23 FROM tab2 AS cor0
----
23

query I rowsort
SELECT ALL - col2 * + cor0.col2 AS col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL ( cor0.col1 ) FROM tab1, tab2 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT ALL cor0.col0 + + 20 * - cor0.col2 * + col0 FROM tab2 AS cor0
----
-3773
-40482
-59961

query I rowsort
SELECT DISTINCT + col1 + col1 FROM tab1
----
20
26
52

query I rowsort
SELECT DISTINCT - 4 AS col0 FROM tab1 AS cor0
----
-4

query I rowsort
SELECT - cor0.col1 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT + cor0.col2 * 70 AS col0 FROM tab0 AS cor0
----
2310
5740
70

query I rowsort
SELECT + cor1.col1 * 34 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to f248765d09f282ec2eacdc1022a1ea84

query I rowsort
SELECT col2 * col0 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT - 9 * - cor0.col2 + col0 FROM tab0 AS cor0
----
321
44
827

query I rowsort
SELECT DISTINCT + ( col0 + col2 ) AS col1 FROM tab0
----
171
36
57

query I rowsort
SELECT DISTINCT - tab2.col2 AS col1 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
-26
-27
-38

query I rowsort
SELECT ( col0 ) + + col2 AS col0 FROM tab2
----
104
117
34

query I rowsort
SELECT + tab0.col0 + + 37 * + col0 FROM tab0
----
1330
3382
912

query I rowsort
SELECT ALL + 87 * - col2 AS col0 FROM tab1
----
-4698
-4959
-8352

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 69 * + col0 * col0 col2 FROM tab2
----
-3381
-419796
-430629

query I rowsort
SELECT DISTINCT - col0 * + col1 + col0 + col2 * + col1 AS col1 FROM tab0 AS cor0
----
-3263
-548
798

query I rowsort
SELECT DISTINCT + col2 + col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL 90 + + 60 AS col2 FROM tab2, tab0 AS cor0, tab1 cor1
----
27 values hashing to e82c94b49ed2abae0dd33f4964a22998

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1, tab2 AS cor0, tab2 AS cor1
----
972 values hashing to f9adf26f20dc8fcc43c2de18a5fd4859

query I rowsort
SELECT - cor1.col2 FROM tab2, tab0 cor0, tab0 cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT ALL col0 * col1 * ( 80 ) - col2 * + 19 AS col1 FROM tab1
----
50117
5214
81376

query I rowsort
SELECT + tab2.col2 + + col2 AS col0 FROM tab2
----
52
54
76

query I rowsort
SELECT - cor0.col0 * + col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT - - col1 * + col1 + + col2 FROM tab0 AS cor0
----
7429
8363
9410

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2170
SELECT col2 + CAST( NULL AS SIGNED ) AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2170
SELECT col2 + CAST ( NULL AS INTEGER ) AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col0 * - col0 FROM tab2 AS cor0
----
-49
-6084
-6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-2172
SELECT - col1 + + 51 DIV + 13 + - col0 * + col2 col1 FROM tab2 AS cor0
----
-2084
-217
-3016

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2172
SELECT - col1 + + 51 / + 13 + - col0 * + col2 col1 FROM tab2 AS cor0
----
-2084
-217
-3016

query I rowsort
SELECT ALL + col2 * + 80 AS col1 FROM tab0 cor0
----
2640
6560
80

query I rowsort
SELECT DISTINCT col0 * ( + col2 ) + - cor0.col1 * + col2 AS col0 FROM tab0 AS cor0
----
-164
-2046
-62

query I rowsort
SELECT ALL - col1 * ( + 29 ) FROM tab2 AS cor0
----
-1711
-493
-899

query I rowsort
SELECT + col0 + 51 + cor0.col2 * - col2 FROM tab1 AS cor0
----
-2862
-3134
-9085

query I rowsort
SELECT ALL + col1 + ( + col2 ) AS col0 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT - + col2 + col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT col2 + + cor0.col1 AS col0 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT DISTINCT + col1 * - 39 FROM tab2 AS cor0
----
-1209
-2301
-663

query I rowsort
SELECT DISTINCT ( ( col1 ) * + col2 ) - col2 FROM tab0
----
2805
7380
96

query I rowsort
SELECT DISTINCT - col1 - + col2 AS col2 FROM tab1
----
-109
-67
-80

query I rowsort
SELECT col0 + tab1.col0 * + col0 AS col1 FROM tab1
----
12
4160
6480

onlyif mysql # use DIV operator for integer division
query I rowsort label-2184
SELECT col2 DIV + col2 col1 FROM tab1
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2184
SELECT col2 / + col2 col1 FROM tab1
----
1
1
1

query I rowsort
SELECT + col2 - tab1.col0 FROM tab1
----
-7
16
51

query I rowsort
SELECT ( col2 ) + + col1 * col0 * + ( - col2 ) + col2 AS col0 FROM tab2
----
-119600
-50958
-5805

query I rowsort
SELECT - 89 + + ( - col2 ) AS col0 FROM tab1
----
-143
-146
-185

query I rowsort
SELECT DISTINCT 75 * col1 + tab0.col1 AS col2 FROM tab0
----
6536
6916
7372

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2189
SELECT + CAST( NULL AS DECIMAL ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2189
SELECT + CAST ( NULL AS REAL ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 * tab0.col0 + col0 FROM tab0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-2191
SELECT + col2 DIV - col0 AS col0 FROM tab1
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-2191
SELECT + col2 / - col0 AS col0 FROM tab1
----
-1
-18
0

query I rowsort
SELECT DISTINCT ( - col1 ) + - col0 AS col2 FROM tab2
----
-137
-38
-96

query I rowsort
SELECT ALL - - 52 FROM tab2 AS cor0
----
52
52
52

query I rowsort
SELECT - 17 + + col0 FROM tab1 AS cor0
----
-14
47
63

query I rowsort
SELECT ALL + - 22 * col0 + - ( col1 ) * col2 + 31 AS col1 FROM tab2 AS cor0
----
-2353
-3219
-960

query I rowsort
SELECT DISTINCT + col1 + + col1 * + ( - col1 ) FROM tab0 cor0
----
-7310
-8190
-9312

query I rowsort
SELECT - col1 * col2 + col1 * - col1 FROM tab2 AS cor0
----
-1798
-5015
-935

query I rowsort
SELECT + + col1 * - col2 - col1 FROM tab2 AS cor0
----
-1593
-663
-868

onlyif mysql # use DIV operator for integer division
query I rowsort label-2199
SELECT DISTINCT col0 + + col2 DIV col2 AS col1 FROM tab1 AS cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-2199
SELECT DISTINCT col0 + + col2 / col2 AS col1 FROM tab1 AS cor0
----
4
65
81

query I rowsort
SELECT ALL 13 + + col1 AS col0 FROM tab2
----
30
44
72

query I rowsort
SELECT ALL col2 * col2 AS col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT + 55 * col1 + - col1 + cor0.col1 AS col0 FROM tab0 AS cor0
----
4730
5005
5335

query I rowsort
SELECT ALL 79 + + col1 FROM tab0 AS cor0
----
165
170
176

query I rowsort
SELECT DISTINCT 39 + col1 FROM tab1 AS cor0
----
49
52
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-2205
SELECT - col0 + - col1 + ( - cor0.col1 ) DIV - cor0.col2 col0 FROM tab0 AS cor0
----
-108
-179
-35

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2205
SELECT - col0 + - col1 + ( - cor0.col1 ) / - cor0.col2 col0 FROM tab0 AS cor0
----
-108
-179
-35

query I rowsort
SELECT DISTINCT - - col2 + - cor0.col1 * - col0 AS col1 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT - col2 * col1 + col0 AS col1 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT ALL + + ( col1 ) FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL col2 + + col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT - - col2 + + col0 AS col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT + + 1 + + col1 + + col0 FROM tab0 cor0
----
111
133
181

query I rowsort
SELECT + + col1 - col0 * + col0 FROM tab2 cor0
----
-18
-6025
-6224

query I rowsort
SELECT ALL + - col1 + col1 * 77 AS col1 FROM tab1 cor0
----
1976
760
988

query I rowsort
SELECT ALL - col1 * + ( + col0 ) * col1 FROM tab0
----
-177504
-329315
-737009

query I rowsort
SELECT col0 + 83 * col1 FROM tab0 AS cor0
----
7162
7642
8086

query IIIIIIIII rowsort
SELECT * FROM tab0 cor0 CROSS JOIN tab2, tab0 cor1
----
243 values hashing to 5c33e96b85afe1ea51bb6d4e9fa6f993

query I rowsort
SELECT ALL + 93 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

query I rowsort
SELECT DISTINCT - cor0.col1 + col2 * cor0.col0 FROM tab1 cor0
----
136
3638
7667

query I rowsort
SELECT ALL + cor0.col2 + - col0 - - col0 AS col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT + col1 + col0 * col2 * - col1 FROM tab2 AS cor0
----
-119593
-51017
-5828

query I rowsort
SELECT + + col2 * - col2 AS col0 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL + col2 * + col0 - col1 AS col2 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT DISTINCT - - cor0.col0 * - col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - - col2 * + col2 FROM tab1 AS cor0
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-2225
SELECT ALL col0 + - col2 DIV col0 FROM tab2 AS cor0
----
4
78
79

skipif mysql # not compatible
query I rowsort label-2225
SELECT ALL col0 + - col2 / col0 FROM tab2 AS cor0
----
4
78
79

query I rowsort
SELECT 59 FROM tab1, tab2 AS cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2227
SELECT ALL - CAST( NULL AS DECIMAL ) * col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2227
SELECT ALL - CAST ( NULL AS REAL ) * col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2228
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab0, tab0 AS cor0, tab0 AS cor1, tab2 AS cor2
----
NULL

skipif mysql # not compatible
query I rowsort label-2228
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab0, tab0 AS cor0, tab0 AS cor1, tab2 AS cor2
----
NULL

query I rowsort
SELECT DISTINCT - - col2 * col2 + col0 AS col2 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT + 72 AS col1 FROM tab2 AS cor0
----
72
72
72

query I rowsort
SELECT DISTINCT - 16 - 68 AS col1 FROM tab1 AS cor0
----
-84

query I rowsort
SELECT col0 - col1 AS col1 FROM tab1
----
-23
54
67

query I rowsort
SELECT ( tab2.col2 ) - tab2.col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 5b9ded363f55d1d4bbc85491d2b84046

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2234
SELECT DISTINCT CAST( 76 AS SIGNED ) + - cor0.col1 AS col1 FROM tab1 AS cor0
----
50
63
66

skipif mysql # not compatible
query I rowsort label-2234
SELECT DISTINCT CAST ( 76 AS INTEGER ) + - cor0.col1 AS col1 FROM tab1 AS cor0
----
50
63
66

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab0, tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT 0 FROM tab2, tab1 cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2237
SELECT - CAST( NULL AS SIGNED ) * - col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2237
SELECT - CAST ( NULL AS INTEGER ) * - col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - ( 68 ) FROM tab0 AS cor0
----
-68
-68
-68

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2239
SELECT DISTINCT + CAST( + col2 AS SIGNED ) + col1 * - col2 AS col2 FROM tab2 AS cor0
----
-1508
-608
-810

skipif mysql # not compatible
query I rowsort label-2239
SELECT DISTINCT + CAST ( + col2 AS INTEGER ) + col1 * - col2 AS col2 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT - - col0 * - 2 FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT + ( + col2 ) * + cor0.col0 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-2242
SELECT ALL - - ( + 77 ) DIV + col0 AS col2 FROM tab2 AS cor0
----
0
0
11

skipif mysql # not compatible
query I rowsort label-2242
SELECT ALL - - ( + 77 ) / + col0 AS col2 FROM tab2 AS cor0
----
0
0
11

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab0 cor0
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * + col1 col0 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT - 54 AS col2 FROM tab2 AS cor0
----
-54
-54
-54

query I rowsort
SELECT DISTINCT + - ( cor0.col0 ) FROM tab2 AS cor0
----
-7
-78
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2247
SELECT ALL CAST( + 46 AS SIGNED ) FROM tab1 AS cor0
----
46
46
46

skipif mysql # not compatible
query I rowsort label-2247
SELECT ALL CAST ( + 46 AS INTEGER ) FROM tab1 AS cor0
----
46
46
46

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0, tab2, tab1 AS cor1
----
972 values hashing to 980274175fafec015a83080672486a9a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 * + col2 col1 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT cor0.col1 * 30 FROM tab0 AS cor0
----
2580
2730
2910

query I rowsort
SELECT ( + col0 ) + - col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT - - col0 + 88 * + col2 AS col0 FROM tab1 AS cor0
----
4755
5080
8528

query I rowsort
SELECT DISTINCT col1 * + 10 AS col0 FROM tab0 cor0
----
860
910
970

query I rowsort
SELECT ALL + cor0.col0 * + cor0.col0 + cor0.col2 + - 11 FROM tab0 AS cor0
----
1215
598
7992

onlyif mysql # use DIV operator for integer division
query I rowsort label-2255
SELECT ALL + + col0 DIV col2 AS col2 FROM tab0 cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-2255
SELECT ALL + + col0 / col2 AS col2 FROM tab0 cor0
----
0
1
35

query I rowsort
SELECT + + 5 + + 18 * col0 AS col1 FROM tab0 AS cor0
----
1607
437
635

query I rowsort
SELECT + col2 * - col2 AS col0 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT - col1 * - col2 + col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT + 84 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

query I rowsort
SELECT DISTINCT - + col0 + - 82 FROM tab0 AS cor0
----
-106
-117
-171

query I rowsort
SELECT - + col0 + - col0 + + 71 AS col2 FROM tab2 AS cor0
----
-85
-87
57

query I rowsort
SELECT + col2 + + col0 AS col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT - col1 * 68 + 49 AS col1 FROM tab2 AS cor0
----
-1107
-2059
-3963

query I rowsort
SELECT ALL - col2 + + cor0.col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT - col1 + - col1 FROM tab0
----
-172
-182
-194

query I rowsort
SELECT + col0 + 27 AS col1 FROM tab2
----
105
106
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-2267
SELECT DISTINCT col2 DIV + col0 FROM tab0
----
0
1

skipif mysql # not compatible
query I rowsort label-2267
SELECT DISTINCT col2 / + col0 FROM tab0
----
0
1

query I rowsort
SELECT col2 + col0 * ( + col0 * ( col1 ) ) FROM tab2
----
106135
1546
358982

query I rowsort
SELECT DISTINCT + cor1.col2 FROM tab0, tab2 AS cor0, tab0 cor1
----
1
33
82

query I rowsort
SELECT ALL - tab2.col1 * - tab2.col0 AS col1 FROM tab2
----
1343
217
4602

query I rowsort
SELECT col2 * ( 59 ) + - col1 AS col2 FROM tab0 AS cor0
----
-38
1861
4747

query I rowsort
SELECT DISTINCT + col1 + ( col1 ) FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT DISTINCT - - cor0.col1 * - col2 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT + - col0 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT col2 * col1 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT 60 FROM tab1, tab1 AS cor0
----
9 values hashing to a97561e17ecaa618227c75a57b268f33

query I rowsort
SELECT + ( + col0 ) + col0 FROM tab2 cor0
----
14
156
158

query I rowsort
SELECT + + col1 * - col0 AS col0 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + col2 + + cor0.col2 * + col0 AS col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT - col0 + + col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT + col1 + col1 AS col2 FROM tab1
----
20
26
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-2282
SELECT DISTINCT col0 * 74 DIV col2 FROM tab1
----
4
61
83

skipif mysql # not compatible
query I rowsort label-2282
SELECT DISTINCT col0 * 74 / col2 FROM tab1
----
4
61
83

query I rowsort
SELECT col2 * - 76 * + 12 + col2 * - tab2.col1 FROM tab2
----
-25246
-25461
-35302

query I rowsort
SELECT DISTINCT + cor2.col2 AS col0 FROM tab1, tab0 AS cor0, tab0 AS cor1, tab2, tab0 AS cor2
----
1
33
82

query I rowsort
SELECT DISTINCT - + col0 + - col1 * + 45 FROM tab2 AS cor0
----
-1402
-2733
-844

query I rowsort
SELECT - col0 + + ( + 93 ) AS col2 FROM tab2 AS cor0
----
14
15
86

query I rowsort
SELECT - col0 * + col1 AS col2 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT ( col2 ) * cor0.col2 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT + ( col0 ) + col1 AS col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT 39 * col1 AS col1 FROM tab1
----
1014
390
507

query I rowsort
SELECT + 57 * + col2 AS col2 FROM tab0
----
1881
4674
57

query I rowsort
SELECT - col2 * cor0.col0 + + col1 * 8 AS col2 FROM tab1 AS cor0
----
-3568
-7576
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col0 + - col2 col1 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT col1 * - col0 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - + 59 * col0 AS col1 FROM tab1 cor0
----
-177
-3776
-4720

query I rowsort
SELECT + - col0 * cor0.col1 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT 96 + col2 * col0 AS col2 FROM tab1 AS cor0
----
258
3744
7776

query I rowsort
SELECT ( col2 ) * col2 FROM tab0
----
1
1089
6724

query I rowsort
SELECT + 51 AS col2 FROM tab1
----
51
51
51

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2, tab1 AS cor0 WHERE NOT NULL BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT 25 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

query I rowsort
SELECT 80 AS col1 FROM tab1
----
80
80
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2303
SELECT + col2 + col2 DIV 15 FROM tab1 cor0
----
102
57
60

skipif mysql # not compatible
query I rowsort label-2303
SELECT + col2 + col2 / 15 FROM tab1 cor0
----
102
57
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT + 32 * + col1 + ( + cor0.col0 * col1 ) + + col0 AS col2 FROM tab0 AS cor0
----
11100
4840
6534

query I rowsort
SELECT - 94 * - col2 + cor0.col1 FROM tab2 AS cor0
----
2503
2569
3589

query I rowsort
SELECT ALL - + col1 AS col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ALL + 40 AS col2 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to e4d10f7d6c34a281f524e45e82ebd2a0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * col1 * + 92 + + col2 * col2 * - ( ( col1 ) ) col0 FROM tab2 AS cor0
----
-148104
-42563
-463268

onlyif mysql # use DIV operator for integer division
query I rowsort label-2310
SELECT + 82 DIV col2 col1 FROM tab0 AS cor0
----
1
2
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2310
SELECT + 82 / col2 col1 FROM tab0 AS cor0
----
1
2
82

query I rowsort
SELECT - 67 + cor0.col1 FROM tab0 AS cor0
----
19
24
30

onlyif mysql # use DIV operator for integer division
query I rowsort label-2312
SELECT DISTINCT + - col0 + col1 DIV 40 FROM tab2 AS cor0
----
-7
-77
-79

skipif mysql # not compatible
query I rowsort label-2312
SELECT DISTINCT + - col0 + col1 / 40 FROM tab2 AS cor0
----
-7
-77
-79

query I rowsort
SELECT 33 AS col1 FROM tab1
----
33
33
33

query I rowsort
SELECT DISTINCT - 81 * + col1 FROM tab2
----
-1377
-2511
-4779

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab1, tab2 cor0
----
17
31
59

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab1, tab0 cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2, tab2 AS cor0, tab2 AS cor1
----
972 values hashing to a47a9db07c7de4927c7c28efb4cd13f2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT + - col2 + + col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT ALL + col1 - 8 AS col1 FROM tab0 AS cor0
----
78
83
89

query I rowsort
SELECT ALL cor0.col2 * + 92 AS col2 FROM tab1 AS cor0
----
4968
5244
8832

query I rowsort
SELECT - col1 + 0 * col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL + col0 + - col1 AS col1 FROM tab0 cor0
----
-2
-62
-62

query I rowsort
SELECT ALL - 94 + col0 AS col2 FROM tab2
----
-15
-16
-87

query I rowsort
SELECT - col0 - col0 AS col1 FROM tab1
----
-128
-160
-6

query I rowsort
SELECT ALL - col2 + col2 AS col2 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT + - col2 * + col1 + - col0 FROM tab0 AS cor0
----
-132
-2862
-7551

query I rowsort
SELECT ALL - col2 + + cor0.col2 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2329
SELECT - CAST( NULL AS SIGNED ) * - col0 - col0 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2329
SELECT - CAST ( NULL AS INTEGER ) * - col0 - col0 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + cor0.col2 * + 25 * col2 col0 FROM tab2 AS cor0
----
-16900
-18225
-36100

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2331
SELECT + CAST( NULL AS SIGNED ) * col2 * - col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2331
SELECT + CAST ( NULL AS INTEGER ) * col2 * - col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2332
SELECT - 48 DIV + 2 - col0 AS col2 FROM tab2 AS cor0
----
-102
-103
-31

skipif mysql # not compatible
query I rowsort label-2332
SELECT - 48 / + 2 - col0 AS col2 FROM tab2 AS cor0
----
-102
-103
-31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + col2 col1 FROM tab2 AS cor0
----
104
117
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 87 + - col2 * - col1 * ( + 68 + - cor0.col0 ) col1 FROM tab0 AS cor0
----
-156789
124785
3114

onlyif mysql # use DIV operator for integer division
query I rowsort label-2335
SELECT + col1 DIV col0 col1 FROM tab2
----
0
0
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2335
SELECT + col1 / col0 col1 FROM tab2
----
0
0
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-2336
SELECT ALL + col0 DIV tab2.col0 AS col2 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2336
SELECT ALL + col0 / tab2.col0 AS col2 FROM tab2
----
1
1
1

query I rowsort
SELECT ALL col0 * col1 FROM tab2
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col2 FROM tab1
----
3
64
80

query I rowsort
SELECT - + ( cor0.col2 ) * - col0 + col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT - - cor0.col2 * col0 AS col1 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT ALL - 19 * col1 + col0 FROM tab0
----
-1610
-1640
-1808

query I rowsort
SELECT col2 + col2 * - col1 FROM tab0 AS cor0
----
-2805
-7380
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 46 + - ( col0 ) * - col2 col1 FROM tab2 AS cor0
----
143
1982
2956

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT ALL - cor1.col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT DISTINCT - + col2 * 31 AS col0 FROM tab1 AS cor0
----
-1674
-1767
-2976

query I rowsort
SELECT + col0 * + col1 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - + col1 * - cor0.col2 AS col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT - col2 * col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL - - col2 * 91 AS col1 FROM tab0 cor0
----
3003
7462
91

query I rowsort
SELECT ALL + col2 * - col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT 12 * - col0 AS col1 FROM tab2
----
-84
-936
-948

query I rowsort
SELECT cor1.col1 FROM tab2, tab1 cor0, tab2 AS cor1, tab2 AS cor2
----
81 values hashing to a5b6acb471910ea4ad7f31cae3b818f7

onlyif mysql # use DIV operator for integer division
query I rowsort label-2354
SELECT - col0 * cor0.col0 DIV - 48 AS col0 FROM tab0 cor0
----
12
165
25

skipif mysql # not compatible
query I rowsort label-2354
SELECT - col0 * cor0.col0 / - 48 AS col0 FROM tab0 cor0
----
12
165
25

query I rowsort
SELECT DISTINCT - col0 + col0 FROM tab0
----
0

query I rowsort
SELECT DISTINCT - col1 * + 92 + + col2 FROM tab1
----
-1100
-2338
-863

query I rowsort
SELECT - + col2 + col1 * col1 FROM tab0 AS cor0
----
7363
8199
9408

query I rowsort
SELECT + col1 * - 92 + col1 AS col1 FROM tab1 AS cor0
----
-1183
-2366
-910

query I rowsort
SELECT DISTINCT + col0 - - col2 FROM tab0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col0 col0 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT DISTINCT + 85 - 71 AS col0 FROM tab2, tab0 AS cor0
----
14

query I rowsort
SELECT - cor0.col2 + - ( + cor0.col2 ) FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT col2 * - ( 5 ) AS col1 FROM tab1
----
-270
-285
-480

query I rowsort
SELECT - col1 * - tab1.col2 * col0 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT col0 * 65 + col1 * - col0 + 73 FROM tab0
----
-1047
-2241
-431

query I rowsort
SELECT DISTINCT + col1 + col1 * tab1.col0 * - col2 + + 91 AS col0 FROM tab1
----
-36379
-4095
-99736

query I rowsort
SELECT col2 * + col1 - col0 AS col1 FROM tab0
----
2814
62
7373

query I rowsort
SELECT DISTINCT 66 + col1 + - tab2.col0 FROM tab2
----
4
47
90

query I rowsort
SELECT + ( col2 ) - + col1 AS col1 FROM tab1
----
28
47
83

query I rowsort
SELECT - col1 * cor0.col1 * col1 FROM tab0 AS cor0
----
-636056
-753571
-912673

query I rowsort
SELECT ALL + col2 * cor0.col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT col2 * col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT ( col0 ) + + 15 * col2 * + col1 AS col1 FROM tab0 AS cor0
----
112019
1490
42594

onlyif mysql # use DIV operator for integer division
query I rowsort label-2374
SELECT + ( cor0.col2 ) DIV ( col0 * - col2 ) AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2374
SELECT + ( cor0.col2 ) / ( col0 * - col2 ) AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 93 * col2 FROM tab0 AS cor0
----
3069
7626
93

query I rowsort
SELECT ALL 86 + 81 AS col2 FROM tab2
----
167
167
167

query I rowsort
SELECT ALL col0 + - col1 + tab2.col2 AS col2 FROM tab2
----
100
3
45

query I rowsort
SELECT DISTINCT col2 * + col1 + col2 * ( - 53 ) AS col0 FROM tab2
----
-1368
-594
156

query I rowsort
SELECT - - 31 + + cor0.col2 AS col2 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 4cc0e206fc0dbf404d491a45c750436b

onlyif mysql # use DIV operator for integer division
query I rowsort label-2380
SELECT DISTINCT ( 63 ) DIV - tab1.col2 + + col0 FROM tab1
----
2
63
80

skipif mysql # not compatible
query I rowsort label-2380
SELECT DISTINCT ( 63 ) / - tab1.col2 + + col0 FROM tab1
----
2
63
80

query I rowsort
SELECT ALL + 52 + 20 AS col1 FROM tab2
----
72
72
72

query I rowsort
SELECT ALL - tab0.col0 * + col0 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT ALL - 85 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 8ebc8ffafb1517ea04e3a6fc4059d88a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 13 + tab1.col0 col2 FROM tab1
----
16
77
93

query I rowsort
SELECT ALL col1 * col2 AS col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT 90 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

query I rowsort
SELECT - 51 * col2 FROM tab2 AS cor0
----
-1326
-1377
-1938

query I rowsort
SELECT - + col0 * cor0.col1 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2389
SELECT ALL col0 * col0 * - CAST( + col1 * + col2 AS SIGNED ) FROM tab1 AS cor0
----
-12636
-2334720
-7987200

skipif mysql # not compatible
query I rowsort label-2389
SELECT ALL col0 * col0 * - CAST ( + col1 * + col2 AS INTEGER ) FROM tab1 AS cor0
----
-12636
-2334720
-7987200

query I rowsort
SELECT col1 + + col0 * col2 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT DISTINCT col1 * - col2 + + 41 AS col0 FROM tab2 AS cor0
----
-1493
-605
-796

query I rowsort
SELECT DISTINCT + col0 + col0 * + col2 AS col2 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT + - 5 AS col1 FROM tab1 AS cor0
----
-5
-5
-5

query I rowsort
SELECT ALL - 48 AS col1 FROM tab0 AS cor0
----
-48
-48
-48

onlyif mysql # use DIV operator for integer division
query I rowsort label-2395
SELECT ALL 56 DIV col0 FROM tab0 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-2395
SELECT ALL 56 / col0 FROM tab0 AS cor0
----
0
1
2

query I rowsort
SELECT + - 54 AS col2 FROM tab0 AS cor0
----
-54
-54
-54

query I rowsort
SELECT - + col1 + cor0.col0 AS col2 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT col2 AS col0 FROM tab1 cor0
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + cor0.col0 col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL + cor0.col0 + col1 * - col1 AS col0 FROM tab0 AS cor0
----
-7372
-8192
-9374

query I rowsort
SELECT ALL 26 * + col0 FROM tab0 AS cor0
----
2314
624
910

query I rowsort
SELECT col1 + col2 AS col1 FROM tab2
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-2403
SELECT ALL 86 DIV + col0 FROM tab0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-2403
SELECT ALL 86 / + col0 FROM tab0
----
0
2
3

query I rowsort
SELECT col0 + + col1 AS col0 FROM tab0
----
110
132
180

query I rowsort
SELECT - 60 FROM tab2
----
-60
-60
-60

query I rowsort
SELECT + 71 FROM tab2
----
71
71
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - cor0.col1 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT - + col1 + col2 AS col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT ALL + ( - col2 ) * - 13 AS col2 FROM tab0 AS cor0
----
1066
13
429

query I rowsort
SELECT DISTINCT col2 * col0 + cor0.col0 AS col0 FROM tab1 AS cor0
----
165
3712
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-2412
SELECT col2 * col2 DIV - col1 FROM tab0 AS cor0
----
-12
-73
0

skipif mysql # not compatible
query I rowsort label-2412
SELECT col2 * col2 / - col1 FROM tab0 AS cor0
----
-12
-73
0

query I rowsort
SELECT ALL - col0 AS col1 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT - col1 * 50 FROM tab2 AS cor0
----
-1550
-2950
-850

query I rowsort
SELECT DISTINCT tab1.col0 * + col2 AS col1 FROM tab1
----
162
3648
7680

query I rowsort
SELECT 29 FROM tab0, tab2 AS cor0
----
9 values hashing to 1e7120ba8e9191084172ddced17e5eb2

query I rowsort
SELECT - + col2 * - col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - + col1 + + 42 FROM tab2 AS cor0
----
-17
11
25

query I rowsort
SELECT - cor0.col1 + + col2 FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2420
SELECT - + col2 * - CAST( col1 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-2420
SELECT - + col2 * - CAST ( col1 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
1534
646
837

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 cor0, tab2, tab1 cor1
----
972 values hashing to 980274175fafec015a83080672486a9a

query I rowsort
SELECT ALL - cor0.col0 + - 35 * col1 AS col1 FROM tab1 AS cor0
----
-414
-535
-913

query I rowsort
SELECT DISTINCT + ( cor0.col0 ) + col2 AS col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT - ( col0 ) AS col0 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT - 8 + ( + col0 ) * - ( - col2 ) FROM tab2
----
181
2020
2994

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col2 ) col0 FROM tab2
----
-26
-27
-38

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1
----
972 values hashing to 92235dbc382d83baa93d6546ed489b0c

query I rowsort
SELECT col2 - col1 FROM tab2 AS cor0
----
-33
-4
21

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2429
SELECT - CAST( col2 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-2429
SELECT - CAST ( col2 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT - + 80 AS col1 FROM tab1 AS cor0
----
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2431
SELECT DISTINCT - CAST( - cor0.col0 AS SIGNED ) * - col0 + + 83 AS col0 FROM tab0 AS cor0
----
-1142
-493
-7838

skipif mysql # not compatible
query I rowsort label-2431
SELECT DISTINCT - CAST ( - cor0.col0 AS INTEGER ) * - col0 + + 83 AS col0 FROM tab0 AS cor0
----
-1142
-493
-7838

query I rowsort
SELECT - col0 + + 79 FROM tab2 AS cor0
----
0
1
72

query I rowsort
SELECT ALL + 57 AS col2 FROM tab1 AS cor0
----
57
57
57

query I rowsort
SELECT - - col1 - - 50 FROM tab2 AS cor0
----
109
67
81

query I rowsort
SELECT ALL 0 + + col0 * cor0.col0 AS col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT + ( col1 ) * col2 + 22 + col2 FROM tab1 cor0
----
1366
1480
649

onlyif mysql # use DIV operator for integer division
query I rowsort label-2437
SELECT DISTINCT + cor0.col0 DIV cor0.col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-2437
SELECT DISTINCT + cor0.col0 / cor0.col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT + 76 AS col1 FROM tab2 AS cor0
----
76
76
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-2439
SELECT col0 * cor0.col1 * + col2 + 98 DIV - cor0.col0 AS col0 FROM tab0 AS cor0
----
3393
664117
68108

skipif mysql # not compatible
query I rowsort label-2439
SELECT col0 * cor0.col1 * + col2 + 98 / - cor0.col0 AS col0 FROM tab0 AS cor0
----
3393
664117
68108

query I rowsort
SELECT ALL - 84 + + col2 FROM tab2 AS cor0
----
-46
-57
-58

query I rowsort
SELECT - col2 + + col2 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT 82 + + col1 FROM tab0 cor0
----
168
173
179

query I rowsort
SELECT 94 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to b0ffb7527f4fbf44f30945e1ccb58c24

query I rowsort
SELECT + - col1 + col0 AS col0 FROM tab1 AS cor0
----
-23
54
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-2445
SELECT DISTINCT + 67 DIV col0 + col1 * 87 AS col1 FROM tab0
----
7484
7917
8440

skipif mysql # not compatible
query I rowsort label-2445
SELECT DISTINCT + 67 / col0 + col1 * 87 AS col1 FROM tab0
----
7484
7917
8440

query I rowsort
SELECT 60 * - ( col0 ) + col0 FROM tab1
----
-177
-3776
-4720

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + col0 ) + cor0.col0 + 11 col1 FROM tab2 AS cor0
----
11
11
11

query I rowsort
SELECT - 60 + - col0 + col2 * + cor0.col0 AS col2 FROM tab1 cor0
----
3524
7540
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2449
SELECT ALL + CAST( NULL AS DECIMAL ) * col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2449
SELECT ALL + CAST ( NULL AS REAL ) * col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL - + col0 AS col1 FROM tab2 cor0
----
-7
-78
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2452
SELECT + + CAST( NULL AS SIGNED ) * 70 * - col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2452
SELECT + + CAST ( NULL AS INTEGER ) * 70 * - col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ( ( col0 ) ) FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT + + cor0.col2 * + col0 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT 31 FROM tab2, tab2 AS cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

query I rowsort
SELECT DISTINCT col1 * + col2 * ( col2 ) AS col0 FROM tab1
----
119808
32490
75816

onlyif mysql # use DIV operator for integer division
query I rowsort label-2457
SELECT - + 94 + - cor0.col1 DIV col0 + ( + ( - cor0.col1 ) ) * - 56 AS col2 FROM tab1 AS cor0
----
1354
466
634

skipif mysql # not compatible
query I rowsort label-2457
SELECT - + 94 + - cor0.col1 / col0 + ( + ( - cor0.col1 ) ) * - 56 AS col2 FROM tab1 AS cor0
----
1354
466
634

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col2 col2 FROM tab2
----
26
27
38

query I rowsort
SELECT DISTINCT - ( + col0 ) * col0 AS col1 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT - 21 * + col1 FROM tab2 AS cor0
----
-1239
-357
-651

query I rowsort
SELECT cor0.col1 AS col2 FROM tab0, tab1 cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT DISTINCT ( col0 * col1 ) FROM tab2
----
1343
217
4602

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0, tab0 AS cor1, tab2, tab1 AS cor2
----
3645 values hashing to ae08f1949fd59e00b049f28175217e60

onlyif mysql # use DIV operator for integer division
query I rowsort label-2464
SELECT + 12 DIV - col0 + col0 FROM tab1
----
-1
64
80

skipif mysql # not compatible
query I rowsort label-2464
SELECT + 12 / - col0 + col0 FROM tab1
----
-1
64
80

query I rowsort
SELECT DISTINCT 21 * - col0 + - col2 * 19 + - col0 AS col1 FROM tab2
----
-2210
-2460
-667

query I rowsort
SELECT + 6 * col2 AS col2 FROM tab0
----
198
492
6

query I rowsort
SELECT - col1 * - tab2.col2 AS col0 FROM tab2
----
1534
646
837

query I rowsort
SELECT + col1 + + 57 + - col2 * - col0 FROM tab0 AS cor0
----
189
7446
935

query I rowsort
SELECT 77 AS col2 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to d7b027bca5d37c67e29013904def8125

query I rowsort
SELECT DISTINCT - - col1 + col0 * col2 FROM tab0 AS cor0
----
132
7389
878

onlyif mysql # use DIV operator for integer division
query I rowsort label-2471
SELECT col1 DIV + col0 AS col1 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-2471
SELECT col1 / + col0 AS col1 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT DISTINCT - ( - col1 * - col0 ) FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT 66 FROM tab2
----
66
66
66

query I rowsort
SELECT - col0 * 82 AS col0 FROM tab1
----
-246
-5248
-6560

query I rowsort
SELECT ALL + 2 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

query I rowsort
SELECT col1 * + 9 + col0 + + col1 FROM tab0 AS cor0
----
1005
884
999

query I rowsort
SELECT - col0 + + col1 * 59 AS col1 FROM tab2 AS cor0
----
1822
3403
924

query I rowsort
SELECT + cor0.col0 * - ( col0 ) AS col0 FROM tab0 cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT + 90 FROM tab2, tab0 AS cor0
----
90

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0, tab0 AS cor1, tab0, tab0 AS cor2
----
3645 values hashing to e7ea8a30caeb35409d15d2ce0abbd5a6

onlyif mysql # use DIV operator for integer division
query I rowsort label-2481
SELECT col0 DIV - col1 FROM tab1
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-2481
SELECT col0 / - col1 FROM tab1
----
-6
-6
0

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 CROSS JOIN tab1, tab0 AS cor1
----
243 values hashing to 2ba47a833971d4c4b0287e849fb0cfb8

query I rowsort
SELECT DISTINCT col0 * - ( ( tab1.col2 ) ) * col2 - + col2 FROM tab1
----
-207993
-737376
-8802

query I rowsort
SELECT col0 + col2 * + 90 FROM tab2 AS cor0
----
2418
2437
3499

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 col2 FROM tab0 cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2486
SELECT + + col1 DIV col1 - col0 AS col2 FROM tab2 AS cor0
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort label-2486
SELECT + + col1 / col1 - col0 AS col2 FROM tab2 AS cor0
----
-6
-77
-78

query I rowsort
SELECT DISTINCT - col0 + 5 FROM tab1 AS cor0
----
-59
-75
2

query I rowsort
SELECT DISTINCT - col2 * - col0 + - col2 AS col2 FROM tab2 AS cor0
----
162
2002
2964

query I rowsort
SELECT + col1 * - ( col1 ) AS col0 FROM tab1 cor0
----
-100
-169
-676

query I rowsort
SELECT ALL - col2 + - col1 AS col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT - col1 + + ( col2 ) * + col1 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT ALL + + col2 * - ( cor0.col1 ) * col1 FROM tab2 cor0
----
-10982
-25947
-90506

query I rowsort
SELECT cor0.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT ALL + ( - 98 ) * cor0.col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 9c3e3e52878877b9a28d18ad067aad77

query I rowsort
SELECT + col0 * + col2 * - col0 + cor0.col2 FROM tab1 AS cor0
----
-233415
-432
-614304

query I rowsort
SELECT ALL + col1 + 22 AS col1 FROM tab0 AS cor0
----
108
113
119

query I rowsort
SELECT + ( - 37 ) + col1 FROM tab2 AS cor0
----
-20
-6
22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col0 * col2 + col1 * 16 col2 FROM tab0 AS cor0
----
-5842
1517
584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 col1 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT ALL + col1 * 37 AS col2 FROM tab1 AS cor0
----
370
481
962

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2501
SELECT + CAST( NULL AS DECIMAL ) * + col1 + + col0 AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2501
SELECT + CAST ( NULL AS REAL ) * + col1 + + col0 AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2502
SELECT DISTINCT - + col2 + + 8 DIV + col0 FROM tab2 cor0
----
-26
-38

skipif mysql # not compatible
query I rowsort label-2502
SELECT DISTINCT - + col2 + + 8 / + col0 FROM tab2 cor0
----
-26
-38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2503
SELECT + 62 * col1 * col0 + + CAST( col2 AS SIGNED ) * - col2 + ( + col0 ) AS col0 FROM tab0 AS cor0
----
126903
210524
495503

skipif mysql # not compatible
query I rowsort label-2503
SELECT + 62 * col1 * col0 + + CAST ( col2 AS INTEGER ) * - col2 + ( + col0 ) AS col0 FROM tab0 AS cor0
----
126903
210524
495503

onlyif mysql # use DIV operator for integer division
query I rowsort label-2504
SELECT ALL col1 * col1 DIV - 58 FROM tab2
----
-16
-4
-60

skipif mysql # not compatible
query I rowsort label-2504
SELECT ALL col1 * col1 / - 58 FROM tab2
----
-16
-4
-60

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab1, tab2 cor1
----
243 values hashing to ea21cea53be47edd19229592e3d26141

query I rowsort
SELECT DISTINCT + + col1 + col1 AS col0 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT DISTINCT cor1.col1 + + 75 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
161
166
172

onlyif mysql # use DIV operator for integer division
query I rowsort label-2508
SELECT + + ( 29 ) DIV col0 + ( col0 + col0 ) FROM tab0 cor0
----
178
49
70

skipif mysql # not compatible
query I rowsort label-2508
SELECT + + ( 29 ) / col0 + ( col0 + col0 ) FROM tab0 cor0
----
178
49
70

query I rowsort
SELECT ( - 69 ) AS col0 FROM tab2 AS cor0
----
-69
-69
-69

query I rowsort
SELECT DISTINCT - 21 + 33 FROM tab0 AS cor0
----
12

query I rowsort
SELECT DISTINCT + col0 + col0 + col0 AS col0 FROM tab0 AS cor0
----
105
267
72

query I rowsort
SELECT DISTINCT + col1 * + col2 + col2 FROM tab2 cor0
----
1560
684
864

query I rowsort
SELECT ALL - cor0.col1 * col0 - cor0.col2 * 0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT + - col0 * - col1 * 21 AS col0 FROM tab1 AS cor0
----
13440
1638
21840

query IIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0 WHERE NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT - - col2 + col1 AS col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL 65 AS col1 FROM tab0
----
65
65
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-2518
SELECT + col2 DIV - col1 + ( col1 ) * col1 AS col0 FROM tab1
----
162
674
95

skipif mysql # not compatible
query I rowsort label-2518
SELECT + col2 / - col1 + ( col1 ) * col1 AS col0 FROM tab1
----
162
674
95

query I rowsort
SELECT 66 - col2 FROM tab0
----
-16
33
65

query I rowsort
SELECT ALL 45 * col1 FROM tab2 AS cor0
----
1395
2655
765

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 cor0, tab1 AS cor1, tab1 AS cor2
----
972 values hashing to f8fe28681e8720551e1ec173631fc529

query I rowsort
SELECT + - cor0.col2 * + col0 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL 95 FROM tab2 AS cor0
----
95
95
95

query I rowsort
SELECT DISTINCT - col2 * + cor0.col0 FROM tab1 cor0
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col0 ) col2 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL - 81 * + col2 AS col2 FROM tab1 AS cor0
----
-4374
-4617
-7776

query I rowsort
SELECT DISTINCT + col1 * 29 AS col1 FROM tab2 AS cor0
----
1711
493
899

onlyif mysql # use DIV operator for integer division
query I rowsort label-2528
SELECT ALL cor0.col1 DIV cor0.col1 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2528
SELECT ALL cor0.col1 / cor0.col1 FROM tab2 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * ( col2 ) * + col0 - 62 col2 FROM tab2 AS cor0
----
-114138
-5165
-52790

query I rowsort
SELECT ALL - + col1 + col1 * + col2 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT DISTINCT - + col1 * col1 - - col1 AS col0 FROM tab0 AS cor0
----
-7310
-8190
-9312

query I rowsort
SELECT - col1 + + col2 * - ( col0 ) FROM tab2 AS cor0
----
-2087
-220
-3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-2533
SELECT DISTINCT - col1 DIV 17 AS col0 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-2533
SELECT DISTINCT - col1 / 17 AS col0 FROM tab1 AS cor0
----
-1
0

query I rowsort
SELECT ALL col2 + ( col2 ) FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT DISTINCT + col1 * 36 * - 17 FROM tab1 AS cor0
----
-15912
-6120
-7956

query I rowsort
SELECT ALL + col2 * - col2 + col0 AS col0 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT DISTINCT + col2 - 44 AS col0 FROM tab0 AS cor0
----
-11
-43
38

query I rowsort
SELECT ALL ( col1 + col0 ) FROM tab2
----
137
38
96

query I rowsort
SELECT DISTINCT 90 FROM tab2
----
90

query I rowsort
SELECT ALL - ( - col2 ) FROM tab2
----
26
27
38

query I rowsort
SELECT DISTINCT + cor0.col2 * - col2 FROM tab2 cor0
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT + + col0 + col1 * 7 FROM tab1 AS cor0
----
134
171
185

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 * col2 col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT + 0 AS col0 FROM tab2
----
0

query I rowsort
SELECT DISTINCT 36 AS col0 FROM tab0
----
36

query I rowsort
SELECT ALL tab1.col2 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT ALL - 56 FROM tab2 AS cor0
----
-56
-56
-56

query I rowsort
SELECT + cor0.col2 + + col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL - - col1 * - cor0.col0 - + 76 FROM tab1 AS cor0
----
-1116
-154
-716

onlyif mysql # use DIV operator for integer division
query I rowsort label-2550
SELECT ALL + cor0.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-2550
SELECT ALL + cor0.col0 / col1 col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + ( col2 ) * col1 + col2 AS col0 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT DISTINCT + - col1 * col0 + col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT DISTINCT - 52 FROM tab0 AS cor0
----
-52

query I rowsort
SELECT + cor0.col1 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT ALL - + cor0.col2 + - 13 FROM tab2 AS cor0
----
-39
-40
-51

query I rowsort
SELECT DISTINCT + col2 * col2 - col0 * - cor0.col1 * - ( col2 ) AS col0 FROM tab1 AS cor0
----
-1296
-33231
-90624

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL - cor0.col1 + col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - - col2 + + 15 FROM tab2 AS cor0
----
41
42
53

query I rowsort
SELECT DISTINCT col2 + 91 * - 2 AS col1 FROM tab2 cor0
----
-144
-155
-156

query I rowsort
SELECT - ( tab0.col0 ) + col1 AS col0 FROM tab0
----
2
62
62

query I rowsort
SELECT col2 + - col1 AS col0 FROM tab2
----
-33
-4
21

query I rowsort
SELECT ALL col2 + - col0 FROM tab0
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-2564
SELECT DISTINCT + col1 + - col1 DIV + col0 AS col2 FROM tab2
----
17
27
59

skipif mysql # not compatible
query I rowsort label-2564
SELECT DISTINCT + col1 + - col1 / + col0 AS col2 FROM tab2
----
17
27
59

query III rowsort
SELECT * FROM tab2 WHERE NULL <> NULL
----

query I rowsort
SELECT col1 * col0 - - tab2.col0 * col0 FROM tab2
----
10686
266
7584

query III rowsort
SELECT * FROM tab0 WHERE + col2 NOT IN ( - col0 + + col2 * col1 + col1 * col0 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query III rowsort
SELECT ALL * FROM tab2 WHERE NULL IN ( + col1 * col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2569
SELECT DISTINCT col1 DIV - tab0.col2 AS col2 FROM tab0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-2569
SELECT DISTINCT col1 / - tab0.col2 AS col2 FROM tab0
----
-1
-2
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2570
SELECT ALL col2 DIV col0 FROM tab0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2570
SELECT ALL col2 / col0 FROM tab0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + + col2 * - tab1.col0 * tab1.col1 + + col0 col0 FROM tab1
----
-36406
-4183
-99747

query I rowsort
SELECT col2 / + col0 AS col2 FROM tab0 WHERE NOT NULL NOT IN ( - col0 )
----

query I rowsort
SELECT + col1 * + tab1.col2 AS col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT - col0 FROM tab2 WHERE NOT ( + col0 + - col0 * + col0 * - col0 - col1 ) NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT + col2 + col2 + col0 FROM tab2
----
130
155
61

query I rowsort
SELECT col2 * col1 * + col2 FROM tab1
----
119808
32490
75816

query I rowsort
SELECT DISTINCT - col1 * col2 + - col0 + - tab1.col2 AS col2 FROM tab1
----
-1424
-1461
-691

query I rowsort
SELECT DISTINCT - col1 * col2 + + col0 FROM tab1
----
-1168
-1401
-506

query I rowsort
SELECT + col1 + + col0 FROM tab1
----
29
74
93

query I rowsort
SELECT DISTINCT tab0.col2 + tab0.col1 * + col2 AS col0 FROM tab0
----
2871
7544
98

query III rowsort
SELECT * FROM tab2 WHERE NOT ( NULL ) <> col1 * col0
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2582
SELECT ALL col1 DIV col0 FROM tab2
----
0
0
4

skipif mysql # not compatible
query I rowsort label-2582
SELECT ALL col1 / col0 FROM tab2
----
0
0
4

query I rowsort
SELECT col0 + + col2 * - col1 * - col2 FROM tab0
----
132
611973
93678

query I rowsort
SELECT - col1 * + tab2.col1 - + col1 * - col2 * col2 AS col0 FROM tab2
----
21638
24259
36403

query I rowsort
SELECT DISTINCT col1 * + col0 AS col1 FROM tab1
----
1040
640
78

query I rowsort
SELECT ALL + col2 - tab0.col1 AS col0 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT ALL + col2 * - col0 * - col0 FROM tab2
----
1323
158184
237158

query I rowsort
SELECT DISTINCT + col0 * tab0.col0 AS col1 FROM tab0
----
1225
576
7921

query I rowsort
SELECT col1 + col2 * col2 + col2 AS col0 FROM tab2
----
1499
761
787

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * + col0 col1 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT - col1 + - col2 + col0 * tab0.col0 AS col0 FROM tab0
----
1127
457
7748

query I rowsort
SELECT ALL - col2 * col2 AS col1 FROM tab1
----
-2916
-3249
-9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 col0 FROM tab1
----
54
57
96

query I rowsort
SELECT tab2.col1 + + col0 AS col0 FROM tab2
----
137
38
96

query I rowsort
SELECT ALL col0 * tab2.col1 FROM tab2
----
1343
217
4602

query I rowsort
SELECT tab1.col0 * col2 + tab1.col2 FROM tab1
----
216
3705
7776

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL IN ( + col1 * + col1 )
----

query I rowsort
SELECT ALL col2 FROM tab1 WHERE ( NULL ) NOT IN ( - col0 * col1 - tab1.col1 * - col0 )
----

query I rowsort
SELECT col1 + + col2 AS col1 FROM tab2
----
55
58
85

query I rowsort
SELECT DISTINCT col2 * col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT - 89 - - tab2.col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 1c43c70fbe7b8f42416f8082a68268c3

query I rowsort
SELECT ALL + col1 + col0 AS col2 FROM tab2
----
137
38
96

query I rowsort
SELECT ALL 94 FROM tab0, tab1 AS cor0
----
9 values hashing to b0ffb7527f4fbf44f30945e1ccb58c24

query I rowsort
SELECT col2 * col1 * - col1 FROM tab2 AS cor0
----
-10982
-25947
-90506

query I rowsort
SELECT + 18 + + col0 FROM tab0 AS cor0
----
107
42
53

query I rowsort
SELECT ( + col1 ) + + 5 * - col0 AS col2 FROM tab2 AS cor0
----
-331
-378
-4

query I rowsort
SELECT col0 * - cor0.col1 + 1 FROM tab2 AS cor0
----
-1342
-216
-4601

query I rowsort
SELECT - col1 * col1 * tab2.col0 FROM tab2
----
-22831
-271518
-6727

query I rowsort
SELECT DISTINCT 81 FROM tab1, tab0 cor0
----
81

query I rowsort
SELECT 0 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT DISTINCT + col0 * - col1 + - col0 FROM tab1
----
-1120
-704
-81

query I rowsort
SELECT ALL - tab2.col2 + col2 * + col2 * ( ( + col0 ) + - col0 ) AS col2 FROM tab2
----
-26
-27
-38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2613
SELECT ALL ( + col0 ) * + col2 + - CAST( + 84 AS SIGNED ) AS col0 FROM tab2
----
105
1944
2918

skipif mysql # not compatible
query I rowsort label-2613
SELECT ALL ( + col0 ) * + col2 + - CAST ( + 84 AS INTEGER ) AS col0 FROM tab2
----
105
1944
2918

query I rowsort
SELECT ALL + col2 * + col2 AS col1 FROM tab0
----
1
1089
6724

query I rowsort
SELECT DISTINCT ( col0 ) FROM tab1
----
3
64
80

query I rowsort
SELECT - tab1.col1 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query I rowsort
SELECT - - 66 * cor0.col0 + cor0.col1 * 55 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to b3004921ad95f312b0ba8617f57c0bc5

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0, tab2, tab0 AS cor1
----
972 values hashing to deaaa983f771be544ffdc26f04a18657

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 49 + col2 * 9 + 14 * - col2 col2 FROM tab1 AS cor0
----
-221
-236
-431

query I rowsort
SELECT - 37 * + cor0.col0 FROM tab2 AS cor0
----
-259
-2886
-2923

query I rowsort
SELECT - cor0.col0 * - col2 FROM tab0 AS cor0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT + 81 * col1 FROM tab0 cor0
----
6966
7371
7857

onlyif mysql # use DIV operator for integer division
query I rowsort label-2624
SELECT ALL + - cor0.col0 + - col0 DIV col2 FROM tab1 AS cor0
----
-3
-65
-80

skipif mysql # not compatible
query I rowsort label-2624
SELECT ALL + - cor0.col0 + - col0 / col2 FROM tab1 AS cor0
----
-3
-65
-80

query I rowsort
SELECT DISTINCT + 64 * col1 FROM tab2 cor0
----
1088
1984
3776

query I rowsort
SELECT + col0 * + col2 + + 45 FROM tab2 AS cor0
----
2073
234
3047

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab2, tab0 AS cor0, tab1, tab0 AS cor1
----
81 values hashing to 87af467938ef355540b8de24db1bf3b8

query I rowsort
SELECT ALL - col1 + 10 FROM tab1
----
-16
-3
0

query I rowsort
SELECT col0 * - ( cor0.col1 ) FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - 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 + col2 * + col0 + col2 col0 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT ALL cor0.col1 + + cor0.col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL - cor0.col2 * + cor0.col2 AS col1 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT col0 * + col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT + - col1 + - col0 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT ALL + + 82 FROM tab2 AS cor0
----
82
82
82

query I rowsort
SELECT + - 70 FROM tab0 AS cor0
----
-70
-70
-70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 23 * col0 col1 FROM tab0 AS cor0
----
2047
552
805

query I rowsort
SELECT + 3 AS col0 FROM tab2 AS cor0
----
3
3
3

query I rowsort
SELECT DISTINCT 61 * 45 FROM tab1 AS cor0
----
2745

query I rowsort
SELECT col2 + + cor0.col1 + + col0 FROM tab2 AS cor0
----
134
163
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 - + col2 col0 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT + 78 * col2 + - col0 FROM tab1 AS cor0
----
4209
4382
7408

query I rowsort
SELECT + cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT + 88 + col2 * - cor0.col1 AS col2 FROM tab2 AS cor0
----
-1446
-558
-749

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2646
SELECT + - CAST( 5 AS SIGNED ) + col1 * col1 AS col1 FROM tab0 AS cor0
----
7391
8276
9404

skipif mysql # not compatible
query I rowsort label-2646
SELECT + - CAST ( 5 AS INTEGER ) + col1 * col1 AS col1 FROM tab0 AS cor0
----
7391
8276
9404

query I rowsort
SELECT - ( - 30 ) AS col0 FROM tab1 AS cor0
----
30
30
30

query I rowsort
SELECT - col0 * col2 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT 9 * col1 + + col1 AS col2 FROM tab1 AS cor0
----
100
130
260

onlyif mysql # use DIV operator for integer division
query I rowsort label-2650
SELECT DISTINCT 16 + - col2 DIV col0 FROM tab0
----
15
16

skipif mysql # not compatible
query I rowsort label-2650
SELECT DISTINCT 16 + - col2 / col0 FROM tab0
----
15
16

query I rowsort
SELECT 52 + + cor0.col2 FROM tab0 AS cor0
----
134
53
85

query I rowsort
SELECT ALL - - 35 * - cor0.col0 + + col2 AS col2 FROM tab1 AS cor0
----
-2183
-2704
-51

query I rowsort
SELECT DISTINCT col0 + - col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT + ( + cor0.col1 ) * col0 * col1 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT - cor0.col1 * col0 AS col0 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL col0 - col2 AS col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT 59 FROM tab1, tab1 AS cor0
----
59

query I rowsort
SELECT + - 24 * + cor0.col0 AS col1 FROM tab2 AS cor0
----
-168
-1872
-1896

query I rowsort
SELECT - col1 * col1 + col1 AS col2 FROM tab1 AS cor0
----
-156
-650
-90

onlyif mysql # use DIV operator for integer division
query I rowsort label-2660
SELECT 74 DIV - col2 FROM tab1 cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-2660
SELECT 74 / - col2 FROM tab1 cor0
----
-1
-1
0

query I rowsort
SELECT DISTINCT col1 + col1 AS col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT col1 + col1 - + cor0.col0 * col0 FROM tab2 AS cor0
----
-5966
-6207
13

query I rowsort
SELECT DISTINCT col2 + cor0.col0 FROM tab1 AS cor0
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + col2 * cor0.col1 col2 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT + col2 + col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT - col0 * col0 - - col2 AS col2 FROM tab2 AS cor0
----
-22
-6058
-6203

onlyif mysql # use DIV operator for integer division
query I rowsort label-2667
SELECT - - col2 + col2 DIV + col1 FROM tab2 AS cor0
----
26
27
40

skipif mysql # not compatible
query I rowsort label-2667
SELECT - - col2 + col2 / + col1 FROM tab2 AS cor0
----
26
27
40

query I rowsort
SELECT ALL - col1 - col0 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT col0 * - 97 * - col2 AS col1 FROM tab0 AS cor0
----
3395
707906
76824

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2670
SELECT CAST( ( col2 ) AS SIGNED ) AS col0 FROM tab1 cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-2670
SELECT CAST ( ( col2 ) AS INTEGER ) AS col0 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT ALL - col0 * + col0 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT + - ( ( col2 ) ) * + col1 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT + 18 * + ( + col2 ) FROM tab0
----
1476
18
594

query I rowsort
SELECT ALL - tab0.col0 * - 45 FROM tab0
----
1080
1575
4005

query I rowsort
SELECT + 10 * col1 FROM tab2
----
170
310
590

query I rowsort
SELECT + + 41 * col1 + + col2 AS col1 FROM tab0 AS cor0
----
3559
3813
3978

query I rowsort
SELECT - col1 * + 22 AS col0 FROM tab2 cor0
----
-1298
-374
-682

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 27 col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

query I rowsort
SELECT ALL col2 - col0 AS col1 FROM tab0
----
-34
-7
9

query I rowsort
SELECT - col0 + - col0 * col1 * + col2 - col1 AS col0 FROM tab1
----
-36554
-4241
-99933

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab0
----
3
64
80

query I rowsort
SELECT DISTINCT - col0 + cor0.col1 * col0 FROM tab0 AS cor0
----
2040
3360
8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-2683
SELECT + tab0.col1 DIV + col0 + - tab0.col1 FROM tab0
----
-83
-90
-95

skipif mysql # not compatible
query I rowsort label-2683
SELECT + tab0.col1 / + col0 + - tab0.col1 FROM tab0
----
-83
-90
-95

query I rowsort
SELECT tab0.col1 + - tab0.col0 FROM tab0 AS cor0 CROSS JOIN tab0
----
9 values hashing to c99cbeca6e6fdb3507b2e08470c1cda6

query I rowsort
SELECT col1 - - col0 FROM tab2
----
137
38
96

query I rowsort
SELECT ALL col0 * col2 * col0 AS col0 FROM tab0
----
1225
19008
649522

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * tab2.col2 col1 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT ALL + col1 * tab1.col2 AS col0 FROM tab1
----
1248
1404
570

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE ( col2 ) >= ( NULL )
----

query I rowsort
SELECT col0 * col1 * + col1 FROM tab1
----
13520
2028
6400

query I rowsort
SELECT ALL + tab0.col0 * col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT col0 + - tab1.col2 * - col2 + col2 * + tab1.col1 FROM tab1
----
10544
3883
4323

query I rowsort
SELECT DISTINCT - col1 + col2 + col1 FROM tab1
----
54
57
96

query I rowsort
SELECT - col1 * + col2 AS col0 FROM tab1
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col2 + col1 col2 FROM tab0
----
194
2924
7553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * + col2 col0 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT + col1 + col1 AS col2 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT ALL col0 * col2 AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL col0 + - col2 FROM tab1
----
-16
-51
7

query I rowsort
SELECT ALL - col0 * - tab2.col2 + + col2 * col0 AS col2 FROM tab2
----
378
4056
6004

query I rowsort
SELECT ALL col1 + + col2 FROM tab1
----
109
67
80

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab2, tab2 AS cor0 WHERE NULL > ( NULL )
----

query I rowsort
SELECT + col2 * - col1 + col2 AS col0 FROM tab0 AS cor0
----
-2805
-7380
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2705
SELECT DISTINCT + col0 * - col0 + + col1 DIV + col2 AS col1 FROM tab1 AS cor0
----
-4096
-6400
-9

skipif mysql # not compatible
query I rowsort label-2705
SELECT DISTINCT + col0 * - col0 + + col1 / + col2 AS col1 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT - - col0 + col0 * + col2 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT ALL + col2 + - col2 * col0 + + col2 FROM tab2 AS cor0
----
-135
-1976
-2926

query I rowsort
SELECT DISTINCT - col1 * - col1 + col2 AS col1 FROM tab2 cor0
----
327
3507
988

query I rowsort
SELECT ALL - col1 + col0 * col1 * - col1 + + col2 * + col0 * cor0.col0 AS col0 FROM tab1 AS cor0
----
-1568
227062
600867

query I rowsort
SELECT col1 + col1 AS col0 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT ALL + cor0.col1 * col0 * + cor0.col0 + - col0 FROM tab1 cor0
----
231
40896
83120

onlyif mysql # use DIV operator for integer division
query I rowsort label-2712
SELECT + col0 DIV col0 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2712
SELECT + col0 / col0 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT - col2 + - col2 AS col0 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT - col1 AS col2 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT ALL + - col2 + col2 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2716
SELECT ALL col1 + + col0 DIV + col2 FROM tab1 AS cor0
----
11
13
26

skipif mysql # not compatible
query I rowsort label-2716
SELECT ALL col1 + + col0 / + col2 FROM tab1 AS cor0
----
11
13
26

query I rowsort
SELECT DISTINCT col2 + + col1 - col0 * col2 AS col0 FROM tab1 AS cor0
----
-3581
-7571
-82

query I rowsort
SELECT DISTINCT + - col2 * col0 - col1 AS col0 FROM tab2 cor0
----
-2087
-220
-3019

query I rowsort
SELECT + col1 * col1 * + col1 AS col0 FROM tab2 AS cor0
----
205379
29791
4913

query IIIIIIIII rowsort
SELECT ALL * FROM tab0 cor0 CROSS JOIN tab2, tab1 AS cor1
----
243 values hashing to 098e223d780e18b6582523fd6f55eec9

query I rowsort
SELECT ( 89 ) AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT DISTINCT col1 + col0 AS col0 FROM tab1
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col2 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + col2 * 23 col2 FROM tab1 AS cor0
----
1245
1375
2288

query I rowsort
SELECT - col0 * col0 + + cor0.col2 * - col2 + + cor0.col0 AS col2 FROM tab0 AS cor0
----
-1191
-14556
-1641

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 cor0, tab0, tab2 AS cor1
----
972 values hashing to 42e69ecdafb3c81046bc5cb4c98b1666

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0, tab1 AS cor1, tab1, tab0 AS cor2
----
3645 values hashing to ed0ce6de90f51f6f9035da5f66a6f197

query I rowsort
SELECT + col2 + + 82 + col1 FROM tab1 AS cor0
----
149
162
191

query I rowsort
SELECT DISTINCT tab2.col1 * - col2 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT ALL + 14 FROM tab1, tab0 AS cor0
----
9 values hashing to 83e5779d2487d12495e7d816c797264f

query I rowsort
SELECT DISTINCT ( - 22 ) * col2 AS col2 FROM tab0
----
-1804
-22
-726

query I rowsort
SELECT - 30 FROM tab2
----
-30
-30
-30

query I rowsort
SELECT + 14 + + col2 + - col0 AS col0 FROM tab1 AS cor0
----
30
65
7

query I rowsort
SELECT DISTINCT - col1 + - col2 * + col2 FROM tab1 AS cor0
----
-2942
-3259
-9229

onlyif mysql # use DIV operator for integer division
query I rowsort label-2735
SELECT 10 DIV 66 col1 FROM tab1, tab2 AS cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to 1f117f467f45d8c6b7553e2e3c842942

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2735
SELECT 10 / 66 col1 FROM tab1, tab2 AS cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to 1f117f467f45d8c6b7553e2e3c842942

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor1.col0 col2 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT DISTINCT + ( cor0.col1 ) * col0 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-2738
SELECT col0 + cor0.col2 DIV col0 + col2 * 49 FROM tab0 AS cor0
----
1642
4107
84

skipif mysql # not compatible
query I rowsort label-2738
SELECT col0 + cor0.col2 / col0 + col2 * 49 FROM tab0 AS cor0
----
1642
4107
84

query I rowsort
SELECT DISTINCT + 78 AS col2 FROM tab1 cor0
----
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 86 + + col2 col2 FROM tab0 AS cor0
----
119
168
87

query I rowsort
SELECT + - 82 AS col1 FROM tab1 AS cor0
----
-82
-82
-82

query I rowsort
SELECT DISTINCT + tab2.col1 * col1 + - tab2.col2 FROM tab2
----
251
3455
934

query I rowsort
SELECT ALL - tab0.col2 + col1 FROM tab0
----
53
9
96

query I rowsort
SELECT DISTINCT tab1.col0 + + tab1.col0 AS col2 FROM tab1
----
128
160
6

query I rowsort
SELECT 23 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 546d49aa433406dd83ea19885588e658

query I rowsort
SELECT + col0 * col2 + col1 FROM tab0
----
132
7389
878

query I rowsort
SELECT col1 + col0 + - 4 AS col1 FROM tab0
----
106
128
176

query I rowsort
SELECT - - 38 * - col0 FROM tab1 AS cor0
----
-114
-2432
-3040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 90 * col0 col2 FROM tab0 cor0
----
2160
3150
8010

query I rowsort
SELECT ALL - col0 * + col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT + 21 + + col2 * - col1 * col1 AS col0 FROM tab0 AS cor0
----
-244047
-679021
-9388

query I rowsort
SELECT ALL + col1 - col2 AS col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT - col1 + col1 * 98 FROM tab1 AS cor0
----
1261
2522
970

query I rowsort
SELECT - col2 * + col0 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * + cor0.col2 col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT - - col2 * + col2 + col1 + - 69 AS col0 FROM tab0 AS cor0
----
1106
29
6746

query I rowsort
SELECT DISTINCT cor0.col2 * col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT - col1 - + cor0.col0 AS col1 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT ALL - + col0 + - 62 * col2 + col1 FROM tab0 AS cor0
----
-1984
-5082
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + col1 col2 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT ALL - col0 * - 29 + col0 AS col1 FROM tab0 AS cor0
----
1050
2670
720

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + ( - cor0.col2 ) + col2 col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL cor0.col0 * ( - cor0.col0 * - col1 ) FROM tab2 cor0
----
106097
1519
358956

query I rowsort
SELECT - col1 * - cor0.col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT + + col0 * - col0 AS col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT + col1 * cor0.col1 AS col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT ( + col0 * col0 ) - + 85 * col2 AS col1 FROM tab2
----
-2246
3011
3874

query I rowsort
SELECT DISTINCT col0 * col0 + - ( col1 ) * col0 AS col2 FROM tab1
----
-69
3456
5360

query I rowsort
SELECT tab2.col2 + col2 + + 82 AS col2 FROM tab2
----
134
136
158

query I rowsort
SELECT 41 AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to f6a440b478f0d00f8326a8c51fe094b8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + col0 col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT - + col2 + + col1 * + col1 AS col1 FROM tab2 AS cor0
----
251
3455
934

query I rowsort
SELECT - col1 * - 51 FROM tab1 AS cor0
----
1326
510
663

onlyif mysql # use DIV operator for integer division
query I rowsort label-2774
SELECT - - col0 DIV 8 FROM tab1 AS cor0
----
0
10
8

skipif mysql # not compatible
query I rowsort label-2774
SELECT - - col0 / 8 FROM tab1 AS cor0
----
0
10
8

query I rowsort
SELECT col0 * col2 AS col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT col2 + ( col2 ) + col1 FROM tab2 AS cor0
----
111
85
93

query I rowsort
SELECT + + col1 - - col0 AS col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL - 71 + col2 * col0 FROM tab0 AS cor0
----
-36
721
7227

query I rowsort
SELECT - + col1 + 21 * col1 AS col2 FROM tab2 AS cor0
----
1180
340
620

onlyif mysql # use DIV operator for integer division
query I rowsort label-2780
SELECT DISTINCT - col2 DIV - col2 + - col0 FROM tab1
----
-2
-63
-79

skipif mysql # not compatible
query I rowsort label-2780
SELECT DISTINCT - col2 / - col2 + - col0 FROM tab1
----
-2
-63
-79

query I rowsort
SELECT ALL + col0 * + col1 + - col0 FROM tab1
----
576
75
960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + 55 col0 FROM tab2 AS cor0
----
114
72
86

query I rowsort
SELECT - - 40 FROM tab0 AS cor0
----
40
40
40

query I rowsort
SELECT - col0 + - cor0.col0 * - col2 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT - ( - 74 ) + col0 FROM tab2 AS cor0
----
152
153
81

query I rowsort
SELECT ALL col1 * + col1 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT 32 + + 98 * cor0.col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 2c6f7f3a64cdb62b8ccf0f713563c378

onlyif mysql # use DIV operator for integer division
query I rowsort label-2788
SELECT col1 DIV + 16 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2788
SELECT col1 / + 16 FROM tab1
----
0
0
1

query I rowsort
SELECT col2 * col1 AS col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT 7 AS col2 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 4e72e9e33dacac757f48d0ce46094607

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 col0 FROM tab2
----
17
31
59

query I rowsort
SELECT + + cor0.col0 * col0 AS col2 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT col1 * - col2 * col1 FROM tab0 cor0
----
-244068
-679042
-9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - col0 col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - - col0 * col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT + col0 + - col0 * ( col1 ) AS col2 FROM tab1 cor0
----
-576
-75
-960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT cor0.col2 * - col0 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 90 col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

query I rowsort
SELECT ALL - ( tab1.col1 ) FROM tab1
----
-10
-13
-26

query I rowsort
SELECT ALL 18 FROM tab1
----
18
18
18

query I rowsort
SELECT ALL - col0 * + col2 AS col2 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT col2 * - tab2.col2 AS col0 FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT + 8 + - cor1.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
-18
-2
-5

query I rowsort
SELECT ALL + ( col1 ) FROM tab1
----
10
13
26

query I rowsort
SELECT DISTINCT + col0 * col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT - - col1 * + col2 - + cor0.col2 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT - 19 * - col1 FROM tab2 AS cor0
----
1121
323
589

onlyif mysql # use DIV operator for integer division
query I rowsort label-2810
SELECT ALL + ( tab2.col1 ) DIV col1 AS col0 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2810
SELECT ALL + ( tab2.col1 ) / col1 AS col0 FROM tab2
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2811
SELECT ALL - tab1.col1 DIV + col0 col1 FROM tab1
----
-8
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2811
SELECT ALL - tab1.col1 / + col0 col1 FROM tab1
----
-8
0
0

query I rowsort
SELECT - col0 AS col0 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT ( 29 ) AS col0 FROM tab1
----
29

query I rowsort
SELECT - col0 * - col1 - + col1 AS col2 FROM tab1 AS cor0
----
1027
52
630

onlyif mysql # use DIV operator for integer division
query I rowsort label-2815
SELECT 50 * + col1 + - col1 * col0 DIV col2 AS col2 FROM tab0 AS cor0
----
1455
4238
4452

skipif mysql # not compatible
query I rowsort label-2815
SELECT 50 * + col1 + - col1 * col0 / col2 AS col2 FROM tab0 AS cor0
----
1455
4238
4452

query I rowsort
SELECT - col1 * col0 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT + col0 * + col2 + cor0.col0 FROM tab1 AS cor0
----
165
3712
7760

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 63 - col1 AS col2 FROM tab1 AS cor0
----
37
50
53

query I rowsort
SELECT - col0 * col1 - 41 * col0 AS col2 FROM tab0 AS cor0
----
-11748
-3048
-4830

query I rowsort
SELECT DISTINCT - + col0 * col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL - - cor0.col1 + col1 FROM tab0 AS cor0
----
172
182
194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 39 col0 FROM tab1 AS cor0
----
39
39
39

query I rowsort
SELECT DISTINCT + - col0 + col1 FROM tab0 AS cor0
----
2
62

query I rowsort
SELECT col2 - + col2 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2826
SELECT ALL + col0 DIV col2 + + col1 DIV col1 AS col1 FROM tab1 AS cor0
----
1
1
2

skipif mysql # not compatible
query I rowsort label-2826
SELECT ALL + col0 / col2 + + col1 / col1 AS col1 FROM tab1 AS cor0
----
1
1
2

query I rowsort
SELECT DISTINCT - col1 - col1 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT + ( + col2 ) + + 20 FROM tab2 AS cor0
----
46
47
58

query I rowsort
SELECT ALL - 2 AS col0 FROM tab0
----
-2
-2
-2

query I rowsort
SELECT ALL - + col0 + col0 * - col1 AS col1 FROM tab1 AS cor0
----
-1120
-704
-81

query I rowsort
SELECT + col0 * col2 * - col2 + cor0.col0 FROM tab0 cor0
----
-26112
-598347
0

query I rowsort
SELECT DISTINCT + - col0 * cor0.col0 FROM tab1 AS cor0
----
-4096
-6400
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * + col1 * + ( cor0.col1 ) col0 FROM tab0 AS cor0
----
-636056
-753571
-912673

onlyif mysql # use DIV operator for integer division
query I rowsort label-2834
SELECT DISTINCT - - col0 DIV + col0 AS col2 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-2834
SELECT DISTINCT - - col0 / + col0 AS col2 FROM tab0 AS cor0
----
1

query I rowsort
SELECT ALL - col0 + col1 * + 89 AS col2 FROM tab0 AS cor0
----
7630
8010
8598

query I rowsort
SELECT ALL - - 3 * col1 + 79 * - col1 AS col0 FROM tab1 AS cor0
----
-1976
-760
-988

query I rowsort
SELECT - col0 * - col0 + + ( - col0 ) FROM tab0 cor0
----
1190
552
7832

query I rowsort
SELECT - col0 * col1 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT + col1 * ( 55 ) FROM tab1 AS cor0
----
1430
550
715

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 3 col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
3

query I rowsort
SELECT - col2 + + cor0.col1 AS col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT + col0 * - ( cor0.col0 ) FROM tab2 cor0
----
-49
-6084
-6241

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2843
SELECT - + col0 * CAST( NULL AS DECIMAL ) + cor0.col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2843
SELECT - + col0 * CAST ( NULL AS REAL ) + cor0.col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 81 + + col1 col2 FROM tab0 AS cor0
----
167
172
178

query I rowsort
SELECT ALL + 72 + col1 AS col0 FROM tab0 AS cor0
----
158
163
169

query I rowsort
SELECT ALL 31 * - 59 FROM tab2 AS cor0
----
-1829
-1829
-1829

onlyif mysql # use DIV operator for integer division
query I rowsort label-2847
SELECT - + col2 DIV - 8 FROM tab2 AS cor0
----
3
3
4

skipif mysql # not compatible
query I rowsort label-2847
SELECT - + col2 / - 8 FROM tab2 AS cor0
----
3
3
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2848
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col0 FROM tab1, tab1 AS cor0, tab1 AS cor1, tab0 AS cor2
----
NULL

skipif mysql # not compatible
query I rowsort label-2848
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col0 FROM tab1, tab1 AS cor0, tab1 AS cor1, tab0 AS cor2
----
NULL

query I rowsort
SELECT DISTINCT col0 * col0 + col0 * + 98 - col2 FROM tab1 AS cor0
----
10311
14144
249

query I rowsort
SELECT + cor0.col0 * + cor0.col2 AS col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL - + col0 + - col1 AS col1 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT ALL col2 * 48 AS col2 FROM tab2 AS cor0
----
1248
1296
1824

query I rowsort
SELECT DISTINCT + + 58 FROM tab2 AS cor0
----
58

query I rowsort
SELECT ALL - 3 AS col1 FROM tab0 AS cor0
----
-3
-3
-3

query I rowsort
SELECT DISTINCT - col2 + col0 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT ALL - + col2 * col1 + col1 - - col2 FROM tab2 cor0
----
-1449
-591
-779

query I rowsort
SELECT + + 87 * col0 FROM tab0 AS cor0
----
2088
3045
7743

onlyif mysql # use DIV operator for integer division
query I rowsort label-2858
SELECT ALL 56 * - ( col1 ) - col2 DIV + 98 AS col0 FROM tab2 cor0
----
-1736
-3304
-952

skipif mysql # not compatible
query I rowsort label-2858
SELECT ALL 56 * - ( col1 ) - col2 / + 98 AS col0 FROM tab2 cor0
----
-1736
-3304
-952

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - col0 col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT + col1 AS col2 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT ALL - 59 * col0 AS col1 FROM tab1 AS cor0
----
-177
-3776
-4720

query I rowsort
SELECT ALL col0 + + ( col1 ) * + col0 FROM tab0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT tab0.col2 + - col1 AS col1 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT + col0 * 15 + col0 AS col2 FROM tab2
----
112
1248
1264

query I rowsort
SELECT DISTINCT col2 * - col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL - + ( col2 ) * col0 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT 10 * - ( col2 ) FROM tab1 AS cor0
----
-540
-570
-960

query I rowsort
SELECT cor0.col2 * col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - col2 * + 54 FROM tab2 AS cor0
----
-1404
-1458
-2052

query I rowsort
SELECT DISTINCT + 13 FROM tab1 AS cor0
----
13

query I rowsort
SELECT + + col0 AS col1 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT ALL - - col0 * + col1 AS col0 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2873
SELECT + - ( col2 ) + + col2 * - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2873
SELECT + - ( col2 ) + + 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 DISTINCT + ( 51 ) * + col1 col0 FROM tab2 AS cor0
----
1581
3009
867

query I rowsort
SELECT + col0 + - col2 AS col2 FROM tab1 AS cor0
----
-16
-51
7

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
972 values hashing to deaaa983f771be544ffdc26f04a18657

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 cor0, tab0, tab0 AS cor1
----
972 values hashing to 8b4fcda7f1ca76bad7c7d728f54a51e0

query I rowsort
SELECT ( cor0.col2 ) FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT - col1 * + cor0.col1 AS col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT DISTINCT 98 * cor0.col2 FROM tab2 cor0
----
2548
2646
3724

query I rowsort
SELECT ALL - col1 + + col1 * col0 * cor0.col2 AS col0 FROM tab0 AS cor0
----
3298
664027
68026

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - col2 + + tab2.col1 col1 FROM tab2
----
2087
220
3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-2883
SELECT - - col1 DIV 23 + col1 AS col1 FROM tab1 AS cor0
----
10
13
27

skipif mysql # not compatible
query I rowsort label-2883
SELECT - - col1 / 23 + col1 AS col1 FROM tab1 AS cor0
----
10
13
27

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2884
SELECT + col0 + CAST( col0 AS SIGNED ) * + cor0.col0 AS col0 FROM tab2 AS cor0
----
56
6162
6320

skipif mysql # not compatible
query I rowsort label-2884
SELECT + col0 + CAST ( col0 AS INTEGER ) * + cor0.col0 AS col0 FROM tab2 AS cor0
----
56
6162
6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-2885
SELECT DISTINCT - 58 DIV - col2 AS col0 FROM tab0
----
0
1
58

skipif mysql # not compatible
query I rowsort label-2885
SELECT DISTINCT - 58 / - col2 AS col0 FROM tab0
----
0
1
58

query I rowsort
SELECT ALL - col1 * col0 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT + col1 * - col2 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2888
SELECT + col1 + CAST( - 84 + - col2 AS SIGNED ) * cor0.col2 AS col0 FROM tab0 AS cor0
----
-13521
-3775
12

skipif mysql # not compatible
query I rowsort label-2888
SELECT + col1 + CAST ( - 84 + - col2 AS INTEGER ) * cor0.col2 AS col0 FROM tab0 AS cor0
----
-13521
-3775
12

query I rowsort
SELECT DISTINCT - 41 + - 50 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
-91

query I rowsort
SELECT col1 * col2 + tab0.col1 AS col1 FROM tab0
----
194
2924
7553

query I rowsort
SELECT - col1 * + col0 * tab1.col1 AS col1 FROM tab1
----
-13520
-2028
-6400

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2892
SELECT DISTINCT col2 + CAST( col2 AS SIGNED ) * - col0 AS col0 FROM tab0
----
-34
-7216
-759

skipif mysql # not compatible
query I rowsort label-2892
SELECT DISTINCT col2 + CAST ( col2 AS INTEGER ) * - col0 AS col0 FROM tab0
----
-34
-7216
-759

query I rowsort
SELECT ALL + col1 * - 54 FROM tab1 AS cor0
----
-1404
-540
-702

query I rowsort
SELECT - 8 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 852581644118629bf652b1aa4b8f4363

query I rowsort
SELECT ALL col1 + col2 AS col1 FROM tab2 AS cor0
----
55
58
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2896
SELECT - + col0 * + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2896
SELECT - + col0 * + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col2 * - 5 * col0 FROM tab2
----
-10140
-15010
-945

query I rowsort
SELECT + cor0.col0 * + 67 FROM tab1 AS cor0
----
201
4288
5360

onlyif mysql # use DIV operator for integer division
query I rowsort label-2899
SELECT - col0 DIV cor0.col0 + col1 col2 FROM tab1 AS cor0
----
12
25
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2899
SELECT - col0 / cor0.col0 + col1 col2 FROM tab1 AS cor0
----
12
25
9

query I rowsort
SELECT DISTINCT 7 FROM tab2, tab2 AS cor0
----
7

query I rowsort
SELECT ALL + ( - col1 ) * - ( col1 ) AS col2 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT - - col2 * + col0 + col1 * - 84 AS col1 FROM tab2 AS cor0
----
-2415
-2928
1574

skipif mysql # not compatible
query I rowsort
SELECT ALL tab0.col2 * col0 + col1 + CAST ( - col2 AS REAL ) AS col0 FROM tab0
----
131
7307
845

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - col0 AS REAL ) / + col0 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT + 34 FROM tab1
----
34
34
34

query I rowsort
SELECT ALL + ( - col2 ) * + 95 AS col0 FROM tab2
----
-2470
-2565
-3610

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col2 * + col2 col2 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT ALL 47 + tab1.col2 * - tab1.col2 FROM tab1
----
-2869
-3202
-9169

skipif mysql # not compatible
query I rowsort
SELECT ALL + ( - col0 ) + CAST ( - col2 + col0 AS REAL ) AS col1 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT DISTINCT - 44 AS col1 FROM tab1 AS cor0
----
-44

query I rowsort
SELECT + + col2 * col0 AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL - - 33 FROM tab0 cor0
----
33
33
33

query I rowsort
SELECT + cor0.col1 * col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT ALL col2 * tab1.col0 AS col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT ALL 49 AS col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to a40d8754a5be3ce2309c61bfd3e00197

onlyif mysql # use DIV operator for integer division
query I rowsort label-2916
SELECT ALL - col0 DIV col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2916
SELECT ALL - col0 / col0 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT - 64 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 601ec439a72fb4786a9cb7a6547ace5e

query I rowsort
SELECT DISTINCT - col2 - + col0 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT col1 + 27 * - 29 FROM tab2 AS cor0
----
-724
-752
-766

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * col1 + + col1 * col0 col0 FROM tab0 cor0
----
-774
3298
637

query I rowsort
SELECT 13 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 184e52d7aa5aa66591291e39c67a3dfb

query I rowsort
SELECT + col1 + - 61 * col1 FROM tab1 AS cor0
----
-1560
-600
-780

query I rowsort
SELECT DISTINCT 93 + + col2 AS col0 FROM tab0 AS cor0
----
126
175
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-2924
SELECT DISTINCT col1 + + ( + col1 ) DIV + cor0.col2 FROM tab0 AS cor0
----
194
88
92

skipif mysql # not compatible
query I rowsort label-2924
SELECT DISTINCT col1 + + ( + col1 ) / + cor0.col2 FROM tab0 AS cor0
----
194
88
92

query I rowsort
SELECT ALL + - cor0.col2 * - col2 AS col1 FROM tab1 cor0
----
2916
3249
9216

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2926
SELECT - + CAST( + ( + col0 ) AS SIGNED ) * col1 FROM tab2 AS cor0
----
-1343
-217
-4602

skipif mysql # not compatible
query I rowsort label-2926
SELECT - + CAST ( + ( + col0 ) AS INTEGER ) * col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - + col1 * 40 FROM tab1 AS cor0
----
-1040
-400
-520

query I rowsort
SELECT col1 * + 9 AS col1 FROM tab0 AS cor0
----
774
819
873

query I rowsort
SELECT ALL - 44 * - cor0.col0 + - col0 + + col0 AS col2 FROM tab2 cor0
----
308
3432
3476

query I rowsort
SELECT ALL - - cor0.col0 * + cor0.col1 + col0 * ( - 22 ) FROM tab0 AS cor0
----
1536
2625
6141

query I rowsort
SELECT + col1 * 19 AS col0 FROM tab2 AS cor0
----
1121
323
589

query I rowsort
SELECT ALL + ( - 98 ) AS col2 FROM tab0 AS cor0
----
-98
-98
-98

query I rowsort
SELECT DISTINCT 6 FROM tab0 AS cor0
----
6

query I rowsort
SELECT ALL tab0.col0 + + col1 * col0 AS col0 FROM tab0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-2935
SELECT DISTINCT 39 DIV 38 AS col1 FROM tab2
----
1

skipif mysql # not compatible
query I rowsort label-2935
SELECT DISTINCT 39 / 38 AS col1 FROM tab2
----
1

query I rowsort
SELECT ALL - - col1 AS col0 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT DISTINCT ( 31 ) FROM tab1 AS cor0
----
31

query I rowsort
SELECT + 12 FROM tab1 AS cor0
----
12
12
12

query I rowsort
SELECT - - col0 AS col2 FROM tab1 cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2940
SELECT col1 + - col1 DIV col0 FROM tab0 AS cor0
----
83
90
95

skipif mysql # not compatible
query I rowsort label-2940
SELECT col1 + - col1 / col0 FROM tab0 AS cor0
----
83
90
95

query I rowsort
SELECT DISTINCT + + 74 FROM tab1 AS cor0
----
74

query I rowsort
SELECT ( + 85 ) + - col0 AS col1 FROM tab0 AS cor0
----
-4
50
61

query I rowsort
SELECT ALL - col1 * + col1 + + col1 AS col1 FROM tab2 AS cor0
----
-272
-3422
-930

query I rowsort
SELECT DISTINCT col2 + cor0.col0 * col0 * + col1 + col1 * - col0 AS col1 FROM tab0 AS cor0
----
115431
47505
712794

query I rowsort
SELECT DISTINCT - 70 AS col0 FROM tab0 AS cor0
----
-70

query I rowsort
SELECT - ( + col0 ) AS col1 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2947
SELECT ALL 89 DIV col2 + cor0.col0 FROM tab0 AS cor0
----
124
26
90

skipif mysql # not compatible
query I rowsort label-2947
SELECT ALL 89 / col2 + cor0.col0 FROM tab0 AS cor0
----
124
26
90

query I rowsort
SELECT ALL col2 * + col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ALL col2 * - col0 + - col0 AS col0 FROM tab2 AS cor0
----
-196
-2106
-3081

query I rowsort
SELECT ALL - 35 FROM tab1
----
-35
-35
-35

query I rowsort
SELECT ALL - 65 FROM tab1, tab2 AS cor0
----
9 values hashing to 744531575c1b6461ed2916d4940e4d23

query I rowsort
SELECT ALL 98 AS col0 FROM tab2
----
98
98
98

query I rowsort
SELECT ALL - 57 FROM tab2
----
-57
-57
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2954
SELECT - - CAST( NULL AS SIGNED ) + - col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2954
SELECT - - CAST ( NULL AS INTEGER ) + - col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2955
SELECT ALL CAST( - col1 AS SIGNED ) * + cor0.col2 * - ( col2 ) AS col1 FROM tab1 AS cor0
----
119808
32490
75816

skipif mysql # not compatible
query I rowsort label-2955
SELECT ALL CAST ( - col1 AS INTEGER ) * + cor0.col2 * - ( col2 ) AS col1 FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT ALL - 46 AS col2 FROM tab1, tab2 cor0
----
9 values hashing to 491ad1fb79fec0b5715ea54949d1aa2d

query I rowsort
SELECT + 35 * col2 + + col2 FROM tab2 AS cor0
----
1368
936
972

query I rowsort
SELECT - - col1 * col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT + ( col2 ) FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT + 46 + col0 AS col1 FROM tab0 AS cor0
----
135
70
81

query I rowsort
SELECT + ( - tab0.col1 ) AS col2 FROM tab0
----
-86
-91
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2962
SELECT DISTINCT - - CAST( NULL AS DECIMAL ) FROM tab1, tab2, tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2962
SELECT DISTINCT - - CAST ( NULL AS REAL ) FROM tab1, tab2, tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL 90 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

query I rowsort
SELECT + 68 * - cor0.col2 AS col0 FROM tab0 AS cor0
----
-2244
-5576
-68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col0 FROM tab0 AS cor0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-2966
SELECT DISTINCT + col2 DIV - col0 AS col2 FROM tab0 cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-2966
SELECT DISTINCT + col2 / - col0 AS col2 FROM tab0 cor0
----
-1
0

query I rowsort
SELECT DISTINCT + col0 + 19 FROM tab1 cor0
----
22
83
99

query I rowsort
SELECT cor0.col2 + col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL - cor0.col1 * + 79 + - 64 FROM tab1 AS cor0
----
-1091
-2118
-854

query I rowsort
SELECT + + col2 * - 12 AS col0 FROM tab2 AS cor0
----
-312
-324
-456

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2972
SELECT ALL col2 / CAST( + col2 * col1 AS SIGNED ) - - CAST( NULL AS DECIMAL ) / + ( col0 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2972
SELECT ALL col2 / CAST ( + col2 * col1 AS INTEGER ) - - CAST ( NULL AS REAL ) / + ( col0 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 + - ( 46 ) AS col2 FROM tab1 AS cor0
----
-20
-33
-36

query I rowsort
SELECT - - col1 + + col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT - col0 - col2 * col0 AS col1 FROM tab2 cor0
----
-196
-2106
-3081

query I rowsort
SELECT + col0 * + ( col1 + - col2 ) AS col1 FROM tab1 AS cor0
----
-3008
-6640
-84

onlyif mysql # use DIV operator for integer division
query I rowsort label-2977
SELECT - - col0 + + cor0.col1 DIV + col0 AS col1 FROM tab1 AS cor0
----
11
64
80

skipif mysql # not compatible
query I rowsort label-2977
SELECT - - col0 + + cor0.col1 / + col0 AS col1 FROM tab1 AS cor0
----
11
64
80

query I rowsort
SELECT + col0 * + 97 + cor0.col1 AS col0 FROM tab1 AS cor0
----
317
6218
7773

onlyif mysql # use DIV operator for integer division
query I rowsort label-2979
SELECT ALL - col2 DIV + col2 + + col2 FROM tab1
----
53
56
95

skipif mysql # not compatible
query I rowsort label-2979
SELECT ALL - col2 / + col2 + + col2 FROM tab1
----
53
56
95

query I rowsort
SELECT + cor0.col0 * - 93 + col1 FROM tab1 AS cor0
----
-253
-5942
-7427

onlyif mysql # use DIV operator for integer division
query I rowsort label-2981
SELECT col2 DIV col2 + tab1.col0 DIV - tab1.col0 AS col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2981
SELECT col2 / col2 + tab1.col0 / - tab1.col0 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT col0 + + col0 * + col0 AS col1 FROM tab1
----
12
4160
6480

query I rowsort
SELECT ALL + 83 AS col0 FROM tab2, tab0 AS cor0, tab0 cor1
----
27 values hashing to 002a717a3d902d97220759065fb107c3

query I rowsort
SELECT ALL + col1 + col2 FROM tab2
----
55
58
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2985
SELECT + col2 * CAST( - col2 * + col0 AS SIGNED ) FROM tab1 AS cor0
----
-207936
-737280
-8748

skipif mysql # not compatible
query I rowsort label-2985
SELECT + col2 * CAST ( - col2 * + col0 AS INTEGER ) FROM tab1 AS cor0
----
-207936
-737280
-8748

query I rowsort
SELECT 35 FROM tab2 AS cor0
----
35
35
35

query I rowsort
SELECT + 63 AS col2 FROM tab2, tab2 cor0
----
9 values hashing to c3eea92c46f2c49716f386a58b575025

query I rowsort
SELECT - col1 * col2 + col2 FROM tab2 AS cor0
----
-1508
-608
-810

onlyif mysql # use DIV operator for integer division
query I rowsort label-2989
SELECT ALL cor0.col2 DIV 74 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1
----
27 values hashing to 953562d3ce2a62a1679a1ae0451294c6

skipif mysql # not compatible
query I rowsort label-2989
SELECT ALL cor0.col2 / 74 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1
----
27 values hashing to 953562d3ce2a62a1679a1ae0451294c6

query I rowsort
SELECT ALL tab1.col1 * - ( col2 + - col0 * - col1 ) FROM tab1
----
-14768
-3432
-6970

query I rowsort
SELECT + 67 AS col1 FROM tab1
----
67
67
67

query I rowsort
SELECT DISTINCT + tab2.col2 FROM tab2, tab1 AS cor0, tab2 cor1
----
26
27
38

query I rowsort
SELECT ALL - 83 FROM tab2, tab1 cor0, tab1 cor1
----
27 values hashing to 77a48ad722db122f51d5ef36604ad843

query I rowsort
SELECT - 54 AS col0 FROM tab0
----
-54
-54
-54

query I rowsort
SELECT ALL - tab0.col2 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT ALL - - col1 * 86 FROM tab1 AS cor0
----
1118
2236
860

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 col1 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT ALL - - col1 + col1 FROM tab1 AS cor0
----
20
26
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT - col0 + - cor0.col1 * 23 FROM tab1 AS cor0
----
-294
-379
-601

query I rowsort
SELECT col0 + + col1 AS col1 FROM tab0
----
110
132
180

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT - 72 FROM tab1
----
-72
-72
-72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3004
SELECT - + cor0.col0 * + CAST( - cor0.col1 AS SIGNED ) FROM tab1 AS cor0
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-3004
SELECT - + cor0.col0 * + CAST ( - cor0.col1 AS INTEGER ) FROM tab1 AS cor0
----
1040
640
78

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 CROSS JOIN tab0, tab2 AS cor1
----
243 values hashing to 60bd71ee2159222231bb3b5819bc5dca

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT + col0 + + 60 FROM tab1 cor0
----
124
140
63

query I rowsort
SELECT ALL col1 * col1 AS col0 FROM tab0 AS cor0
----
7396
8281
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT + + col2 AS col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
3
64
80

query I rowsort
SELECT - 30 - 40 * col2 FROM tab0
----
-1350
-3310
-70

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1
----
972 values hashing to 635619591835474e6aa6acdff4ab166c

query I rowsort
SELECT - ( col0 ) + col0 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3015
SELECT - - CAST( NULL AS SIGNED ) + col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3015
SELECT - - CAST ( NULL AS INTEGER ) + col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col1 + - col2 * + col1 FROM tab1
----
-1235
-1378
-560

onlyif mysql # use DIV operator for integer division
query I rowsort label-3017
SELECT - - col1 DIV col1 + - col2 AS col0 FROM tab1 AS cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-3017
SELECT - - col1 / col1 + - col2 AS col0 FROM tab1 AS cor0
----
-53
-56
-95

query I rowsort
SELECT cor0.col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT + - col1 + + col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT 44 AS col1 FROM tab0 cor0
----
44
44
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + - col1 col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL 23 FROM tab0 AS cor0
----
23
23
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-3023
SELECT - col2 + + col0 DIV col1 FROM tab0 cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-3023
SELECT - col2 + + col0 / col1 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT - col1 + col1 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + - col2 * col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT 61 * - col1 + + 59 FROM tab0 cor0
----
-5187
-5492
-5858

query I rowsort
SELECT DISTINCT + 12 + col1 FROM tab2 AS cor0
----
29
43
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - col1 ) + ( + col1 ) col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL ( cor0.col0 ) - - ( + 51 ) FROM tab2 AS cor0
----
129
130
58

query I rowsort
SELECT col0 * col1 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - col1 * - col2 * + 62 AS col0 FROM tab2 cor0
----
40052
51894
95108

query I rowsort
SELECT DISTINCT - col0 * + tab2.col0 + + col2 AS col0 FROM tab2
----
-22
-6058
-6203

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0, tab1, tab1 AS cor1
----
972 values hashing to fe55095fff3a5ecc2f113d14a8c6f823

query I rowsort
SELECT DISTINCT - 86 + - cor0.col1 FROM tab2 AS cor0
----
-103
-117
-145

query I rowsort
SELECT DISTINCT col1 + - col0 FROM tab2 cor0
----
-19
-62
24

query I rowsort
SELECT ALL 25 FROM tab2 AS cor0
----
25
25
25

query I rowsort
SELECT ALL - col1 * + cor0.col1 + col1 * col1 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL - cor0.col1 + col0 AS col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT - + col0 * col0 AS col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT + col0 + + col0 AS col0 FROM tab0 cor0
----
178
48
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3042
SELECT 30 * + col1 * - CAST( cor0.col0 AS SIGNED ) FROM tab1 AS cor0
----
-19200
-2340
-31200

skipif mysql # not compatible
query I rowsort label-3042
SELECT 30 * + col1 * - CAST ( cor0.col0 AS INTEGER ) FROM tab1 AS cor0
----
-19200
-2340
-31200

query I rowsort
SELECT DISTINCT - - 60 AS col1 FROM tab2 AS cor0
----
60

query I rowsort
SELECT col1 * - col0 + col0 * col2 FROM tab2 cor0
----
-2574
-28
1659

onlyif mysql # use DIV operator for integer division
query I rowsort label-3045
SELECT ALL + 31 + + cor0.col0 DIV ( - col0 * col0 + col1 ) AS col0 FROM tab0 AS cor0
----
31
31
31

skipif mysql # not compatible
query I rowsort label-3045
SELECT ALL + 31 + + cor0.col0 / ( - col0 * col0 + col1 ) AS col0 FROM tab0 AS cor0
----
31
31
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 + ( + ( cor0.col0 ) + - col1 ) col1 FROM tab2 AS cor0
----
-17
141
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3047
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col2 FROM tab2, tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3047
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col2 FROM tab2, tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 - - 77 col2 FROM tab2 AS cor0
----
108
136
94

query I rowsort
SELECT DISTINCT - cor0.col0 * + col0 FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT + + col1 * - cor0.col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT col0 * + cor0.col1 + 54 * col0 * - col1 AS col1 FROM tab0 AS cor0
----
-109392
-179935
-429247

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 86 col0 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
86

query I rowsort
SELECT - 90 AS col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to c0d96679aba507520916e8654e5a6618

query I rowsort
SELECT DISTINCT - cor0.col0 + 29 * col0 AS col0 FROM tab2 cor0
----
196
2184
2212

query I rowsort
SELECT ALL + + col0 - - 57 AS col0 FROM tab0 AS cor0
----
146
81
92

query I rowsort
SELECT col2 * col1 * ( col1 ) + + col2 FROM tab1
----
16320
36558
5757

query I rowsort
SELECT ALL col1 + - col0 FROM tab2
----
-19
-62
24

query I rowsort
SELECT DISTINCT + - col0 + 88 * + col2 FROM tab1 AS cor0
----
4749
4952
8368

query I rowsort
SELECT DISTINCT + + col0 + + cor0.col0 AS col2 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab0, tab2 cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 83 + - col2 * col0 col0 FROM tab1 AS cor0
----
-245
-3731
-7763

query I rowsort
SELECT ALL + 30 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to da5de0c411a2c0f445400f1b63ea9f89

query I rowsort
SELECT - + col1 * + 79 * - col0 + 72 AS col1 FROM tab1 AS cor0
----
50632
6234
82232

query I rowsort
SELECT ALL - ( - col1 ) * col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT + ( col0 ) + col1 - col2 AS col2 FROM tab2
----
11
111
58

query I rowsort
SELECT + 2 + col0 FROM tab1 AS cor0
----
5
66
82

query I rowsort
SELECT ALL - - col2 + col2 AS col0 FROM tab2 cor0
----
52
54
76

query I rowsort
SELECT ALL 19 FROM tab2
----
19
19
19

query I rowsort
SELECT DISTINCT ( col0 * + col0 + + col0 ) FROM tab0
----
1260
600
8010

query I rowsort
SELECT DISTINCT - col1 + - col1 AS col1 FROM tab1
----
-20
-26
-52

query I rowsort
SELECT + col1 * - tab0.col2 AS col0 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT ( - col1 ) + col1 FROM tab0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3073
SELECT + tab0.col2 * + col1 DIV col1 col0 FROM tab0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3073
SELECT + tab0.col2 * + col1 / col1 col0 FROM tab0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col1 col1 FROM tab1
----
-54
-67
23

query I rowsort
SELECT ALL - col0 + - col2 FROM tab2
----
-104
-117
-34

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT col2 NOT IN ( col2 * - col2 - - col1 )
----

query III rowsort
SELECT ALL * FROM tab2 WHERE col1 NOT IN ( col0 + col1 * col1 * col1 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT DISTINCT col0 + col1 * + col0 AS col2 FROM tab2
----
1422
224
4680

onlyif mysql # use DIV operator for integer division
query I rowsort label-3079
SELECT - col0 DIV - col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3079
SELECT - col0 / - col1 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col0 col0 FROM tab0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 col0 FROM tab2
----
26
27
38

query I rowsort
SELECT col2 * col0 + - col1 + + col2 FROM tab2
----
185
1995
3023

query I rowsort
SELECT ALL + tab1.col1 - col2 FROM tab1
----
-28
-47
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col1 col1 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT col0 - col2 * + tab2.col2 AS col1 FROM tab2
----
-1365
-598
-722

query I rowsort
SELECT col2 * col2 AS col1 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT 99 * col1 + 70 AS col1 FROM tab0 AS cor0
----
8584
9079
9673

query I rowsort
SELECT + - cor0.col2 * col0 + - 76 FROM tab1 AS cor0
----
-238
-3724
-7756

query I rowsort
SELECT DISTINCT + 35 AS col0 FROM tab1, tab0 AS cor0
----
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - col1 * col1 col0 FROM tab0
----
-7372
-8192
-9374

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL <= NULL
----

query I rowsort
SELECT DISTINCT col2 * col1 AS col2 FROM tab2
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-3093
SELECT ALL col1 DIV - col1 + col0 * + tab0.col1 * - col0 - - col1 col1 FROM tab0
----
-118729
-49451
-720721

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3093
SELECT ALL col1 / - col1 + col0 * + tab0.col1 * - col0 - - col1 col1 FROM tab0
----
-118729
-49451
-720721

onlyif mysql # use DIV operator for integer division
query I rowsort label-3094
SELECT + col2 DIV + col1 + + tab1.col0 AS col0 FROM tab1
----
5
69
87

skipif mysql # not compatible
query I rowsort label-3094
SELECT + col2 / + col1 + + tab1.col0 AS col0 FROM tab1
----
5
69
87

query I rowsort
SELECT DISTINCT - col2 - col2 AS col0 FROM tab0
----
-164
-2
-66

onlyif mysql # use DIV operator for integer division
query I rowsort label-3096
SELECT cor0.col2 + + col2 DIV col0 FROM tab2 cor0
----
26
30
38

skipif mysql # not compatible
query I rowsort label-3096
SELECT cor0.col2 + + col2 / col0 FROM tab2 cor0
----
26
30
38

query I rowsort
SELECT - cor0.col0 FROM tab1 AS cor0 WHERE NOT ( NULL ) NOT IN ( col2 - col0 )
----

query I rowsort
SELECT ALL col2 - col0 FROM tab0 AS cor0
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-3099
SELECT ALL + col1 DIV - cor0.col1 + col0 * - cor0.col2 + col0 DIV col1 FROM tab2 AS cor0
----
-190
-2028
-2999

skipif mysql # not compatible
query I rowsort label-3099
SELECT ALL + col1 / - cor0.col1 + col0 * - cor0.col2 + col0 / col1 FROM tab2 AS cor0
----
-190
-2028
-2999

query I rowsort
SELECT DISTINCT col1 - col0 * col2 AS col1 FROM tab0 AS cor0
----
-706
-7207
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - cor0.col2 * col2 + + col2 * - cor0.col2 * + col1 col1 FROM tab2 cor0
----
-45198
-49096
-79768

query I rowsort
SELECT DISTINCT - col0 + + col0 * tab1.col1 FROM tab1
----
576
75
960

query I rowsort
SELECT col0 * - tab2.col2 + + col2 FROM tab2
----
-162
-2002
-2964

query I rowsort
SELECT tab1.col1 * - col0 + + col1 * col1 AS col2 FROM tab1
----
-540
-871
598

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col1 col1 FROM tab1
----
20
26
52

query I rowsort
SELECT ALL col2 + - col2 AS col2 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3107
SELECT DISTINCT - col2 * tab2.col2 DIV col1 + col0 DIV + col0 AS col1 FROM tab2
----
-10
-22
-83

skipif mysql # not compatible
query I rowsort label-3107
SELECT DISTINCT - col2 * tab2.col2 / col1 + col0 / + col0 AS col1 FROM tab2
----
-10
-22
-83

query I rowsort
SELECT col0 + - col1 + col0 AS col1 FROM tab2
----
-17
141
97

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT + col1 IN ( col0 + col0 * col0 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col0 col2 FROM tab0
----
24
35
89

query I rowsort
SELECT col1 * + col1 FROM tab2
----
289
3481
961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + + col1 col1 FROM tab1
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col2 col0 FROM tab0
----
-35
-7298
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL col0 * - col1 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT col1 + col0 + col1 AS col1 FROM tab2 AS cor0
----
113
196
69

query I rowsort
SELECT ALL + col2 * cor0.col0 AS col1 FROM tab0 AS cor0
----
35
7298
792

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE NULL NOT IN ( - col1 * - col1 + col2 )
----

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT - tab1.col1 * - col0 + col2 AS col1 FROM tab1 WHERE ( col0 ) <= ( NULL )
----

query I rowsort
SELECT ALL - tab1.col2 * col1 + col2 AS col0 FROM tab1
----
-1152
-1350
-513

query I rowsort
SELECT ALL + col2 + col1 AS col0 FROM tab2
----
55
58
85

query I rowsort
SELECT col1 * col1 + col1 FROM tab0
----
7482
8372
9506

query I rowsort
SELECT DISTINCT - cor0.col2 + col2 * - col2 AS col1 FROM tab1 cor0
----
-2970
-3306
-9312

query I rowsort
SELECT + col0 * + 73 * + col1 FROM tab1 AS cor0
----
46720
5694
75920

query I rowsort
SELECT - 52 AS col0 FROM tab2, tab0 cor0
----
9 values hashing to 9500afe5646d620d5e8943351a29d082

query I rowsort
SELECT ALL col1 * 85 FROM tab1
----
1105
2210
850

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3128
SELECT ALL - CAST( ( + col2 ) AS SIGNED ) FROM tab1
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-3128
SELECT ALL - CAST ( ( + col2 ) AS INTEGER ) FROM tab1
----
-54
-57
-96

query I rowsort
SELECT + 25 AS col1 FROM tab2
----
25
25
25

query I rowsort
SELECT DISTINCT - col2 * + 59 AS col2 FROM tab1
----
-3186
-3363
-5664

onlyif mysql # use DIV operator for integer division
query I rowsort label-3131
SELECT ALL cor0.col1 DIV cor0.col0 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 0231f0ea08ef49e8e99dfb495771acf2

skipif mysql # not compatible
query I rowsort label-3131
SELECT ALL cor0.col1 / cor0.col0 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 0231f0ea08ef49e8e99dfb495771acf2

query I rowsort
SELECT + - 27 + + cor0.col2 + cor0.col2 AS col1 FROM tab0 AS cor0
----
-25
137
39

query I rowsort
SELECT + 33 * - 45 FROM tab2 AS cor0
----
-1485
-1485
-1485

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0, tab0 AS cor0, tab2 AS cor1
----
972 values hashing to d41be7437523f0dba2158c7f0439f329

query I rowsort
SELECT DISTINCT col0 * col2 * ( - tab1.col2 ) + col0 * 27 * + col0 + + col1 * - col0 FROM tab1
----
-565520
-8583
-97984

onlyif mysql # use DIV operator for integer division
query I rowsort label-3136
SELECT ALL + 64 DIV - tab1.col2 AS col2 FROM tab1
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-3136
SELECT ALL + 64 / - tab1.col2 AS col2 FROM tab1
----
-1
-1
0

query I rowsort
SELECT + col2 + col0 * + 2 AS col1 FROM tab0 AS cor0
----
260
71
81

query I rowsort
SELECT DISTINCT col0 * + col2 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT + cor1.col2 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT + - col1 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT - col2 + 22 AS col2 FROM tab1 AS cor0
----
-32
-35
-74

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3143
SELECT - col1 * col0 * col0 + - cor0.col1 * ( - ( - col1 ) ) * - CAST( NULL AS SIGNED ) + 32 * col0 AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3143
SELECT - col1 * col0 * col0 + - cor0.col1 * ( - ( - col1 ) ) * - CAST ( NULL AS INTEGER ) + 32 * col0 AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL tab2.col1 * col2 AS col1 FROM tab2
----
1534
646
837

query I rowsort
SELECT + - col0 * col2 + col0 * + col1 AS col0 FROM tab1 AS cor0
----
-3008
-6640
-84

query I rowsort
SELECT + - col2 * col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT col1 * cor0.col2 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-3148
SELECT + + col1 DIV + col2 + - 89 * col2 AS col1 FROM tab1 AS cor0
----
-4806
-5073
-8544

skipif mysql # not compatible
query I rowsort label-3148
SELECT + + col1 / + col2 + - 89 * col2 AS col1 FROM tab1 AS cor0
----
-4806
-5073
-8544

query I rowsort
SELECT + - col0 + 58 AS col1 FROM tab2 AS cor0
----
-20
-21
51

query I rowsort
SELECT - + col1 * 37 AS col1 FROM tab1 AS cor0
----
-370
-481
-962

query I rowsort
SELECT - + 11 AS col2 FROM tab0 AS cor0
----
-11
-11
-11

query I rowsort
SELECT ALL 69 - + col2 FROM tab0 AS cor0
----
-13
36
68

query I rowsort
SELECT DISTINCT col1 * - col2 + + col1 AS col0 FROM tab0 cor0
----
-2752
-7371
0

query I rowsort
SELECT ALL + - col1 - + 79 AS col2 FROM tab2 AS cor0
----
-110
-138
-96

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0, tab0 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to ea1a922b7fccb9d184b31eb4689e063b

query I rowsort
SELECT ALL cor1.col0 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT + col0 + - cor0.col1 FROM tab1 AS cor0
----
-23
54
67

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3158
SELECT DISTINCT - CAST( + col2 AS SIGNED ) FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-3158
SELECT DISTINCT - CAST ( + col2 AS INTEGER ) FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL + col2 * col2 AS col0 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT + - ( + 58 ) * cor0.col2 + - cor0.col2 AS col1 FROM tab0 AS cor0
----
-1947
-4838
-59

query I rowsort
SELECT DISTINCT - 44 * + col1 FROM tab2 AS cor0
----
-1364
-2596
-748

onlyif mysql # use DIV operator for integer division
query I rowsort label-3162
SELECT DISTINCT - col2 * col2 DIV + col2 + col2 + col0 DIV col0 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-3162
SELECT DISTINCT - col2 * col2 / + col2 + col2 + col0 / col0 FROM tab0 AS cor0
----
1

query I rowsort
SELECT ALL - - 40 FROM tab0 AS cor0
----
40
40
40

query I rowsort
SELECT ( + 25 ) AS col2 FROM tab0
----
25
25
25

query I rowsort
SELECT DISTINCT - + col2 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT ALL - col0 * col2 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-3167
SELECT DISTINCT + col0 DIV col0 + - col1 AS col2 FROM tab0 AS cor0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-3167
SELECT DISTINCT + col0 / col0 + - col1 AS col2 FROM tab0 AS cor0
----
-85
-90
-96

query I rowsort
SELECT - + cor0.col1 FROM tab0 cor0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + - col0 col1 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT + col2 * col0 + + col1 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT ALL - 49 FROM tab1 AS cor0
----
-49
-49
-49

query I rowsort
SELECT ALL + 54 AS col2 FROM tab0 AS cor0
----
54
54
54

query I rowsort
SELECT 67 + - tab1.col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 5869443958835ec2055fba403d2c5040

query I rowsort
SELECT ALL col0 + + col1 AS col0 FROM tab2
----
137
38
96

query I rowsort
SELECT ALL - 11 * col0 * col2 + col1 AS col0 FROM tab0
----
-288
-80187
-8626

query I rowsort
SELECT 68 AS col0 FROM tab1, tab0 cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

query I rowsort
SELECT tab1.col0 * + tab1.col0 - - col0 AS col0 FROM tab1
----
12
4160
6480

onlyif mysql # use DIV operator for integer division
query I rowsort label-3178
SELECT - col1 - col1 DIV col2 AS col1 FROM tab0
----
-194
-88
-92

skipif mysql # not compatible
query I rowsort label-3178
SELECT - col1 - col1 / col2 AS col1 FROM tab0
----
-194
-88
-92

query I rowsort
SELECT ALL + col1 * 18 FROM tab0 cor0
----
1548
1638
1746

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3180
SELECT + - col0 + CAST( 72 AS SIGNED ) FROM tab2 AS cor0
----
-6
-7
65

skipif mysql # not compatible
query I rowsort label-3180
SELECT + - col0 + CAST ( 72 AS INTEGER ) FROM tab2 AS cor0
----
-6
-7
65

query I rowsort
SELECT ALL - + col0 * + 86 AS col1 FROM tab1 AS cor0
----
-258
-5504
-6880

query I rowsort
SELECT - col2 + - col2 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT DISTINCT - col0 * 17 AS col1 FROM tab2 AS cor0
----
-119
-1326
-1343

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 37 + - tab1.col2 col2 FROM tab1, tab0, tab2 cor0
----
27 values hashing to 555d9edcc6ed10256f0b060ec2d67e64

query I rowsort
SELECT DISTINCT + col1 * - col0 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - col0 * + col1 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + - col0 - ( ( - col2 ) ) AS col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL + - col2 AS col0 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT cor0.col1 + col1 AS col1 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT DISTINCT + col2 * col2 + + col2 * col2 * col1 - cor0.col2 AS col0 FROM tab0 AS cor0
----
618526
94710
97

query I rowsort
SELECT + col0 * ( ( col1 ) ) + col1 AS col2 FROM tab2 AS cor0
----
1360
248
4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-3192
SELECT ALL - ( col0 ) DIV 91 AS col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3192
SELECT ALL - ( col0 ) / 91 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL + 25 * + col1 FROM tab1
----
250
325
650

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + 53 * + 23 col0 FROM tab2
----
1245
1246
1257

query I rowsort
SELECT col1 * - col2 + + 26 AS col1 FROM tab2 AS cor0
----
-1508
-620
-811

query I rowsort
SELECT - - cor0.col0 + + 37 * col1 AS col2 FROM tab1 cor0
----
434
561
965

query I rowsort
SELECT + col2 + 72 * col1 AS col1 FROM tab0 AS cor0
----
6225
6634
6985

query I rowsort
SELECT - + cor0.col0 FROM tab0 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query I rowsort
SELECT col2 + + 96 FROM tab2 cor0
----
122
123
134

query I rowsort
SELECT cor0.col2 * + col0 AS col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT col1 * + col0 - + tab2.col2 FROM tab2
----
1305
190
4576

query I rowsort
SELECT DISTINCT col0 - col0 AS col0 FROM tab0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3203
SELECT DISTINCT - col0 + + col2 DIV - col1 - - col1 AS col1 FROM tab0
----
2
62

skipif mysql # not compatible
query I rowsort label-3203
SELECT DISTINCT - col0 + + col2 / - col1 - - col1 AS col1 FROM tab0
----
2
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col1 + col2 + col1 * + col1 col1 FROM tab2
----
1019
344
3566

query I rowsort
SELECT + col0 * - col2 * tab1.col2 - + col2 * col1 FROM tab1
----
-10152
-208506
-738528

query I rowsort
SELECT + col2 + + col1 FROM tab1
----
109
67
80

query I rowsort
SELECT col1 * - col2 + tab0.col0 * - tab0.col0 FROM tab0
----
-1322
-15383
-3414

query I rowsort
SELECT col1 + col1 - col1 AS col0 FROM tab2
----
17
31
59

query I rowsort
SELECT col2 * cor0.col0 * cor0.col0 FROM tab1 AS cor0
----
233472
486
614400

query I rowsort
SELECT DISTINCT + cor0.col0 + - cor0.col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT - col1 + + col0 * - col0 * col0 AS col2 FROM tab2 AS cor0
----
-374
-474611
-493056

query I rowsort
SELECT + col2 + col1 + col0 * + col1 FROM tab1
----
1149
158
707

query I rowsort
SELECT col2 * col1 - + col1 FROM tab1
----
1235
1378
560

query I rowsort
SELECT col0 + - col0 + col1 FROM tab1
----
10
13
26

query I rowsort
SELECT + col0 + + col2 * + col2 FROM tab2
----
1523
736
754

query I rowsort
SELECT ALL col1 * col1 + tab1.col1 * + col2 * - col2 FROM tab1
----
-119639
-32390
-75140

query I rowsort
SELECT DISTINCT col2 + + tab2.col0 AS col2 FROM tab2
----
104
117
34

query I rowsort
SELECT ALL col1 * + col2 * - col2 FROM tab1 AS cor0
----
-119808
-32490
-75816

query I rowsort
SELECT - col0 * tab1.col1 AS col1 FROM tab1
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-3220
SELECT - col2 DIV - col0 + - col2 * + col2 FROM tab0
----
-1
-1088
-6724

skipif mysql # not compatible
query I rowsort label-3220
SELECT - col2 / - col0 + - col2 * + col2 FROM tab0
----
-1
-1088
-6724

query I rowsort
SELECT tab0.col1 * tab0.col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - tab2.col2 + + col1 * col1 + tab2.col1 * col0 FROM tab2
----
1151
1594
8057

query I rowsort
SELECT DISTINCT col2 + tab0.col0 * - col2 AS col2 FROM tab0
----
-34
-7216
-759

query I rowsort
SELECT ALL col0 * - col1 + col2 * col2 AS col0 FROM tab0
----
-1375
-3394
-975

query I rowsort
SELECT tab1.col1 + - col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT + tab0.col2 * + col0 * + tab0.col2 AS col0 FROM tab0
----
26136
35
598436

query I rowsort
SELECT col1 + - col2 + col1 FROM tab1 AS cor0
----
-2
-37
-70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 col2 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT + col0 * + col0 AS col0 FROM tab2 cor0
----
49
6084
6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-3230
SELECT + col0 * col1 + + col1 DIV + col1 FROM tab0
----
2065
3396
8100

skipif mysql # not compatible
query I rowsort label-3230
SELECT + col0 * col1 + + col1 / + col1 FROM tab0
----
2065
3396
8100

onlyif mysql # use DIV operator for integer division
query I rowsort label-3231
SELECT + + col2 DIV cor0.col2 AS col1 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3231
SELECT + + col2 / cor0.col2 AS col1 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT - col1 + + col0 AS col1 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT col2 * - cor0.col1 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL cor0.col2 * col1 + col2 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT col1 AS col1 FROM tab0 AS cor0 WHERE NULL > NULL OR NOT col0 * + col1 + - cor0.col2 <> ( NULL )
----

query I rowsort
SELECT + - cor0.col0 + - col2 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT DISTINCT col0 * - cor0.col2 AS col1 FROM tab1 cor0
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 col2 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-3239
SELECT + cor0.col0 DIV cor0.col1 AS col0 FROM tab1 AS cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-3239
SELECT + cor0.col0 / cor0.col1 AS col0 FROM tab1 AS cor0
----
0
6
6

query I rowsort
SELECT cor0.col2 * col0 * - col2 FROM tab2 cor0
----
-114076
-5103
-52728

query I rowsort
SELECT + col2 * cor0.col2 - col0 * col0 AS col1 FROM tab0 AS cor0
----
-1197
-1224
513

query I rowsort
SELECT ALL - col0 + cor0.col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT + ( - col1 ) AS col1 FROM tab1
----
-10
-13
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-3244
SELECT DISTINCT - col1 DIV col0 AS col0 FROM tab2
----
-4
0

skipif mysql # not compatible
query I rowsort label-3244
SELECT DISTINCT - col1 / col0 AS col0 FROM tab2
----
-4
0

query I rowsort
SELECT DISTINCT + - 54 - + col2 * - col0 FROM tab2 AS cor0
----
135
1974
2948

query I rowsort
SELECT ALL 71 * - col1 + - col2 AS col2 FROM tab2 AS cor0
----
-1245
-2228
-4215

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 * col0 col2 FROM tab1 AS cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 97 * col2 + - cor0.col2 col1 FROM tab0 AS cor0
----
3168
7872
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 43 + col0 + col2 col2 FROM tab2 AS cor0
----
-9
61
74

query I rowsort
SELECT DISTINCT - ( col1 ) * col2 + cor0.col0 - - col0 FROM tab1 AS cor0
----
-1088
-1398
-442

query I rowsort
SELECT + 17 + col2 * col2 AS col1 FROM tab1 AS cor0
----
2933
3266
9233

query I rowsort
SELECT col0 * col0 AS col2 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT ALL - + col2 * col0 + col1 - col0 * + col2 * + col1 FROM tab2 AS cor0
----
-121621
-54019
-6017

query I rowsort
SELECT ALL + 60 AS col1 FROM tab1 AS cor0
----
60
60
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-3255
SELECT - - col0 DIV + col2 AS col2 FROM tab0 cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-3255
SELECT - - col0 / + col2 AS col2 FROM tab0 cor0
----
0
1
35

query I rowsort
SELECT ALL + col1 * col2 * + col2 FROM tab2 AS cor0
----
22599
24548
39884

query I rowsort
SELECT DISTINCT + col1 + + col2 AS col2 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-3258
SELECT ALL - col0 DIV col1 FROM tab2 AS cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-3258
SELECT ALL - col0 / col1 FROM tab2 AS cor0
----
-1
-4
0

query I rowsort
SELECT ALL - - cor0.col2 * + col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + col1 + + col2 FROM tab0
----
119
173
98

query I rowsort
SELECT - + col1 * + col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT ALL - cor0.col1 * col2 + col1 FROM tab0 cor0
----
-2752
-7371
0

query I rowsort
SELECT tab2.col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT DISTINCT + col1 - col2 * cor0.col0 AS col2 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT - + cor0.col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ALL 53 * + col2 FROM tab2 AS cor0
----
1378
1431
2014

query I rowsort
SELECT DISTINCT - + col1 * + col0 + - ( - ( col2 ) ) FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT ALL - cor0.col2 - - col2 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT col1 * cor0.col0 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - - 95 + + col2 FROM tab2 AS cor0
----
121
122
133

query I rowsort
SELECT ALL + col2 * - col0 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL - - 84 + col0 FROM tab1 AS cor0
----
148
164
87

query I rowsort
SELECT + + col1 * + col0 + 8 * + col0 AS col2 FROM tab0 AS cor0
----
2256
3675
8811

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col2 ) * 63 + - cor0.col2 * + col0 col2 FROM tab0 AS cor0
----
-2132
1287
28

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3275
SELECT ALL + col0 * col2 + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3275
SELECT ALL + col0 * col2 + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3276
SELECT + col1 + col1 DIV col1 FROM tab2 AS cor0
----
18
32
60

skipif mysql # not compatible
query I rowsort label-3276
SELECT + col1 + col1 / col1 FROM tab2 AS cor0
----
18
32
60

query I rowsort
SELECT DISTINCT + col1 * 58 FROM tab0 AS cor0
----
4988
5278
5626

onlyif mysql # use DIV operator for integer division
query I rowsort label-3278
SELECT + col1 + col1 DIV - 98 AS col1 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-3278
SELECT + col1 + col1 / - 98 AS col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT col1 * + col0 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - col2 + + col1 AS col2 FROM tab1 cor0
----
-28
-47
-83

query I rowsort
SELECT + cor0.col1 * + col0 + + col2 AS col2 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT DISTINCT - 42 + col1 AS col0 FROM tab0 AS cor0
----
44
49
55

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0, tab1 cor1, tab2, tab2 AS cor2
----
3645 values hashing to b62c1ebc681aca72d13feadb888b3be7

query I rowsort
SELECT DISTINCT - - 76 * col0 AS col2 FROM tab2 AS cor0
----
532
5928
6004

query I rowsort
SELECT - 35 FROM tab0 cor0
----
-35
-35
-35

query I rowsort
SELECT col2 * + col0 AS col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL col0 * - col1 + + cor0.col2 AS col1 FROM tab1 cor0
----
-24
-583
-944

query I rowsort
SELECT 92 + - 33 * col0 FROM tab2
----
-139
-2482
-2515

query I rowsort
SELECT ALL 36 FROM tab1
----
36
36
36

query I rowsort
SELECT ( + cor0.col2 ) * col0 AS col1 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT col0 * + cor0.col2 + col1 FROM tab2 cor0
----
2087
220
3019

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3292
SELECT ( col0 ) + + cor0.col2 - CAST( NULL AS SIGNED ) col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3292
SELECT ( col0 ) + + cor0.col2 - CAST ( NULL AS INTEGER ) col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * col1 + - col0 FROM tab0 AS cor0
----
-7420
-8370
-9444

query IIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab0 AS cor2
----
972 values hashing to 09b120a8ff13ebafea7af10c2152241b

query I rowsort
SELECT ALL 38 AS col0 FROM tab2 AS cor0
----
38
38
38

query I rowsort
SELECT ALL 5 AS col2 FROM tab0 AS cor0
----
5
5
5

query I rowsort
SELECT DISTINCT 90 + col0 FROM tab2 AS cor0
----
168
169
97

query I rowsort
SELECT + ( - col0 ) + + cor0.col1 FROM tab1 AS cor0
----
-54
-67
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-3299
SELECT DISTINCT - col0 DIV + col1 + col0 FROM tab1
----
3
58
74

skipif mysql # not compatible
query I rowsort label-3299
SELECT DISTINCT - col0 / + col1 + col0 FROM tab1
----
3
58
74

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3300
SELECT DISTINCT CAST( + col2 AS SIGNED ) + - col2 AS col2 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-3300
SELECT DISTINCT CAST ( + col2 AS INTEGER ) + - col2 AS col2 FROM tab1
----
0

query I rowsort
SELECT + 34 + + col0 * cor0.col0 FROM tab0 cor0
----
1259
610
7955

query I rowsort
SELECT + col0 + - col1 FROM tab0 cor0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT 17 AS col2 FROM tab1, tab0 cor0
----
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 57 col2 FROM tab0
----
57
57
57

query I rowsort
SELECT - col0 * - 61 AS col2 FROM tab1
----
183
3904
4880

query I rowsort
SELECT - cor0.col0 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT 78 * cor0.col2 + + ( ( - cor0.col2 ) ) AS col1 FROM tab0 cor0
----
2541
6314
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-3308
SELECT DISTINCT - col0 DIV + tab0.col0 FROM tab0
----
-1

skipif mysql # not compatible
query I rowsort label-3308
SELECT DISTINCT - col0 / + tab0.col0 FROM tab0
----
-1

query I rowsort
SELECT ALL + 51 + - cor0.col1 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 7f00b0c2ec4ce5cb00e390b9e1dd0213

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3310
SELECT ALL - ( - col1 ) + - col2 + CAST( col1 AS SIGNED ) * tab1.col2 FROM tab1
----
1165
1376
523

skipif mysql # not compatible
query I rowsort label-3310
SELECT ALL - ( - col1 ) + - col2 + CAST ( col1 AS INTEGER ) * tab1.col2 FROM tab1
----
1165
1376
523

query I rowsort
SELECT ALL - 38 FROM tab0, tab2 AS cor0
----
9 values hashing to e571541ae40cb0ddaca16e11f4359507

query I rowsort
SELECT DISTINCT - 62 AS col0 FROM tab2, tab0, tab1 AS cor0
----
-62

skipif mysql # not compatible
query I rowsort
SELECT + ( - tab2.col1 ) * - CAST ( col0 AS REAL ) AS col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT + col2 * 60 + cor0.col2 FROM tab0 AS cor0
----
2013
5002
61

query I rowsort
SELECT DISTINCT - col2 - + col1 AS col0 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT ALL 86 AS col0 FROM tab0
----
86
86
86

query I rowsort
SELECT - + 45 + tab2.col1 AS col0 FROM tab2, tab0, tab1 cor0
----
27 values hashing to 4c472728f5341d03e00bdf9ea91d83f9

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0, tab2 AS cor0, tab0 AS cor1
----
972 values hashing to 86dbd337f00ab84c613ad03d6fc06e28

query I rowsort
SELECT ALL ( col2 ) * + 73 * col0 + + col2 * ( col0 ) FROM tab2
----
13986
150072
222148

query I rowsort
SELECT 87 * - cor0.col2 + - tab1.col2 AS col2 FROM tab1, tab2 cor0, tab2 AS cor1
----
27 values hashing to 8dd3224ebe7ffca100f29f6da5423611

query I rowsort
SELECT - 31 * + cor0.col0 AS col2 FROM tab1 AS cor0
----
-1984
-2480
-93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3322
SELECT DISTINCT + ( + col0 + CAST( - col1 AS SIGNED ) ) * - col2 * col2 FROM tab1
----
-175446
-617472
67068

skipif mysql # not compatible
query I rowsort label-3322
SELECT DISTINCT + ( + col0 + CAST ( - col1 AS INTEGER ) ) * - col2 * col2 FROM tab1
----
-175446
-617472
67068

query I rowsort
SELECT 97 AS col1 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to c73fa6978df8525c99d6bc792bb27123

query I rowsort
SELECT ( + cor0.col1 ) FROM tab0, tab2 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT DISTINCT + col0 * - 56 FROM tab2
----
-392
-4368
-4424

query I rowsort
SELECT + col2 * 93 FROM tab1 AS cor0
----
5022
5301
8928

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3327
SELECT - CAST( NULL AS SIGNED ) * col1 + - col0 * col1 - col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3327
SELECT - CAST ( NULL AS INTEGER ) * col1 + - col0 * col1 - col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 * - 24 AS col0 FROM tab0 cor0
----
2136
576
840

onlyif mysql # use DIV operator for integer division
query I rowsort label-3329
SELECT ALL + tab1.col2 DIV + 44 col0 FROM tab1
----
1
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3329
SELECT ALL + tab1.col2 / + 44 col0 FROM tab1
----
1
1
2

query I rowsort
SELECT col1 + + col2 * col1 FROM tab1
----
1261
1430
580

query I rowsort
SELECT ALL col2 * col2 * 51 FROM tab0
----
342924
51
55539

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1, tab1 AS cor0, tab1 cor1
----
972 values hashing to 635619591835474e6aa6acdff4ab166c

query I rowsort
SELECT col2 + col0 * cor0.col2 AS col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT DISTINCT - col2 * - col2 AS col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL + + 86 FROM tab2 AS cor0
----
86
86
86

query I rowsort
SELECT ALL + 93 * + tab1.col0 FROM tab1, tab2 AS cor0, tab0, tab2 cor1
----
81 values hashing to d3f3d591450ad5b26b795f1e0b6fe4af

query I rowsort
SELECT + cor0.col2 - - col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT col1 - col2 AS col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT + ( + 56 ) * + col2 - - 72 AS col1 FROM tab2 AS cor0
----
1528
1584
2200

query I rowsort
SELECT + col2 * + 32 + col0 - - col1 AS col2 FROM tab2 AS cor0
----
1312
902
969

query I rowsort
SELECT - - ( - col1 ) FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT + col2 + - 24 + + col2 FROM tab2
----
28
30
52

query I rowsort
SELECT - col1 + - col1 AS col1 FROM tab0
----
-172
-182
-194

query I rowsort
SELECT DISTINCT - col2 + - col2 AS col0 FROM tab1
----
-108
-114
-192

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0, tab1 cor1, tab2 AS cor2
----
972 values hashing to 0fcd8d0934383dd58863be894b07a6ed

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 col2 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT ALL 53 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to fede6033dee346dbd272085c05724fda

query I rowsort
SELECT - - col0 + col0 AS col1 FROM tab2 cor0
----
14
156
158

query I rowsort
SELECT - + col0 AS col2 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT - col1 * - col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT - col2 + 42 FROM tab1 AS cor0
----
-12
-15
-54

query I rowsort
SELECT ALL - 76 + col2 AS col1 FROM tab1 AS cor0
----
-19
-22
20

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3353
SELECT - CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3353
SELECT - CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - ( col1 ) + - col0 FROM tab1 AS cor0
----
-54
-67
23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3355
SELECT ALL CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3355
SELECT ALL CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col0 * + 54 AS col2 FROM tab2 AS cor0
----
378
4212
4266

query I rowsort
SELECT DISTINCT - ( 44 ) FROM tab1 AS cor0
----
-44

query I rowsort
SELECT + + col0 * + 52 + + col0 FROM tab1 AS cor0
----
159
3392
4240

query I rowsort
SELECT - cor0.col1 * col0 + col0 * - 35 + + 7 FROM tab0 AS cor0
----
-11207
-2897
-4613

query I rowsort
SELECT ALL - col0 + - col1 * cor0.col1 AS col1 FROM tab1 AS cor0
----
-164
-249
-679

query I rowsort
SELECT ALL - + 54 * + col0 + col0 * - ( + col1 ) FROM tab0 AS cor0
----
-12905
-3360
-5285

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col1 col2 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT DISTINCT - - ( + cor0.col0 ) FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT 21 + cor0.col0 AS col0 FROM tab2 AS cor0
----
100
28
99

query I rowsort
SELECT ALL 21 FROM tab1 AS cor0
----
21
21
21

query I rowsort
SELECT - cor0.col1 * + ( 0 ) AS col2 FROM tab2, tab0, tab1 cor0
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT + tab0.col2 * col2 * + col2 FROM tab0
----
1
35937
551368

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3368
SELECT - col2 * + CAST( ( col0 ) AS SIGNED ) * CAST( NULL AS SIGNED ) + tab1.col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3368
SELECT - col2 * + CAST ( ( col0 ) AS INTEGER ) * CAST ( NULL AS INTEGER ) + tab1.col0 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3369
SELECT ALL 13 + - ( col1 ) * CAST( + cor0.col1 AS SIGNED ) FROM tab0 AS cor0
----
-7383
-8268
-9396

skipif mysql # not compatible
query I rowsort label-3369
SELECT ALL 13 + - ( col1 ) * CAST ( + cor0.col1 AS INTEGER ) FROM tab0 AS cor0
----
-7383
-8268
-9396

query I rowsort
SELECT - tab2.col1 FROM tab2, tab1 AS cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT col2 * tab0.col2 * - 85 FROM tab0
----
-571540
-85
-92565

query I rowsort
SELECT - - col1 + cor0.col2 * cor0.col0 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT + 96 + col2 * col2 AS col0 FROM tab2 AS cor0
----
1540
772
825

query I rowsort
SELECT - 21 AS col1 FROM tab0 AS cor0
----
-21
-21
-21

query I rowsort
SELECT 67 FROM tab0
----
67
67
67

query I rowsort
SELECT DISTINCT + 20 FROM tab2, tab2 AS cor0
----
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 85 col1 FROM tab2
----
85
85
85

query I rowsort
SELECT DISTINCT + 2 * 89 AS col1 FROM tab1
----
178

query I rowsort
SELECT 44 FROM tab1 AS cor0
----
44
44
44

onlyif mysql # use DIV operator for integer division
query I rowsort label-3380
SELECT DISTINCT - col2 DIV + col1 FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-3380
SELECT DISTINCT - col2 / + col1 FROM tab1 AS cor0
----
-2
-5
-7

query I rowsort
SELECT DISTINCT - 80 FROM tab0 AS cor0
----
-80

query I rowsort
SELECT ALL col1 * + col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL - + col1 + + col0 * col0 AS col2 FROM tab2 AS cor0
----
18
6025
6224

query I rowsort
SELECT + - cor0.col1 + col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - ( - col0 ) AS col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - - ( + cor0.col2 ) + col2 * - col0 AS col0 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT DISTINCT 94 * - 4 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
-376

onlyif mysql # use DIV operator for integer division
query I rowsort label-3388
SELECT col2 + + col1 DIV col2 AS col0 FROM tab0 AS cor0
----
35
83
98

skipif mysql # not compatible
query I rowsort label-3388
SELECT col2 + + col1 / col2 AS col0 FROM tab0 AS cor0
----
35
83
98

query I rowsort
SELECT ALL + col2 * + 64 + col1 * + col1 AS col0 FROM tab2 AS cor0
----
2689
2721
5145

query I rowsort
SELECT DISTINCT - col2 * col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT col2 + cor0.col1 * ( + col2 ) + col0 * col0 AS col1 FROM tab0 AS cor0
----
1323
15465
3447

query I rowsort
SELECT cor0.col0 * col2 + + col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT + 16 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to ee5bde9f68ee828e8cd86b0d590090bc

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3394
SELECT + CAST( - 99 AS SIGNED ) col1 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 64d06513850a26495bc6c2fddeb254b7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3394
SELECT + CAST ( - 99 AS INTEGER ) col1 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 64d06513850a26495bc6c2fddeb254b7

query I rowsort
SELECT DISTINCT ( col2 ) FROM tab1
----
54
57
96

query I rowsort
SELECT + col2 - col2 FROM tab1
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3397
SELECT + cor0.col2 + CAST( NULL AS SIGNED ) + + 81 AS col2 FROM tab1, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3397
SELECT + cor0.col2 + CAST ( NULL AS INTEGER ) + + 81 AS col2 FROM tab1, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3398
SELECT DISTINCT - col0 * + CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3398
SELECT DISTINCT - col0 * + CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + col0 * + cor0.col2 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT + col1 + col2 * cor0.col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT DISTINCT col0 * + 23 FROM tab2 AS cor0
----
161
1794
1817

query I rowsort
SELECT ALL + - col1 + ( + col0 ) FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT - + col2 * col0 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-3404
SELECT ALL + col0 + - col1 DIV - col0 AS col0 FROM tab1 AS cor0
----
11
64
80

skipif mysql # not compatible
query I rowsort label-3404
SELECT ALL + col0 + - col1 / - col0 AS col0 FROM tab1 AS cor0
----
11
64
80

query I rowsort
SELECT + - cor0.col2 * - col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT + col2 * col2 - - col1 AS col0 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT - + cor0.col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT - col2 + col2 * - cor0.col0 AS col1 FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT ALL + - col1 * ( col1 ) AS col0 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT col1 * 43 FROM tab0 AS cor0
----
3698
3913
4171

query I rowsort
SELECT + col1 * - col2 + col2 AS col1 FROM tab2
----
-1508
-608
-810

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3412
SELECT ( - col0 ) * CAST( NULL AS SIGNED ) + - col1 col1 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3412
SELECT ( - col0 ) * CAST ( NULL AS INTEGER ) + - col1 col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( - col1 ) * col0 FROM tab2
----
-1343
-217
-4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 1 * - col1 col2 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT - - ( cor0.col1 ) FROM tab0, tab1 AS cor0, tab2, tab0 AS cor1
----
81 values hashing to d7d3fabcafbed14f0d6ffd37195c971c

query I rowsort
SELECT col2 + + 70 * col0 + col0 FROM tab2 cor0
----
524
5564
5647

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 col0 FROM tab1 AS cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3418
SELECT - - col1 + 65 DIV 85 - col2 AS col2 FROM tab1 AS cor0
----
-28
-47
-83

skipif mysql # not compatible
query I rowsort label-3418
SELECT - - col1 + 65 / 85 - col2 AS col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT - - col0 * col0 * 9 + col2 FROM tab0 AS cor0
----
11026
5217
71371

query I rowsort
SELECT ALL - col2 * cor0.col2 FROM tab0 AS cor0
----
-1
-1089
-6724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3421
SELECT - col0 * + CAST( col1 * col0 AS SIGNED ) + - col2 + col1 AS col1 FROM tab2 cor0
----
-106118
-1515
-358923

skipif mysql # not compatible
query I rowsort label-3421
SELECT - col0 * + CAST ( col1 * col0 AS INTEGER ) + - col2 + col1 AS col1 FROM tab2 cor0
----
-106118
-1515
-358923

query I rowsort
SELECT ALL col0 * 64 FROM tab1 AS cor0
----
192
4096
5120

query I rowsort
SELECT DISTINCT + + col2 - ( col1 * + col0 ) AS col1 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT + 77 FROM tab1, tab1 cor0
----
9 values hashing to 051bf10c50e061d74ad0a4d205a1c622

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col0 col1 FROM tab2
----
7
78
79

query I rowsort
SELECT + + col2 + - ( col2 ) * col1 FROM tab1 AS cor0
----
-1152
-1350
-513

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3427
SELECT + CAST( NULL AS SIGNED ) + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3427
SELECT + CAST ( NULL AS INTEGER ) + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 + + col2 + + col0 FROM tab1 AS cor0
----
185
256
60

query I rowsort
SELECT ALL - - 30 AS col0 FROM tab0, tab2 cor0, tab2, tab1 cor1
----
81 values hashing to 1ae25494a21836bac07879aa19fd4615

onlyif mysql # use DIV operator for integer division
query I rowsort label-3430
SELECT col2 + ( + col0 ) DIV ( - 20 ) AS col2 FROM tab1
----
54
54
92

skipif mysql # not compatible
query I rowsort label-3430
SELECT col2 + ( + col0 ) / ( - 20 ) AS col2 FROM tab1
----
54
54
92

query I rowsort
SELECT ALL - col0 * col1 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT col1 * - col2 AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + tab2.col2 + - col2 AS col2 FROM tab2
----
0
0
0

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0, tab2 AS cor0, tab0 cor1
----
972 values hashing to 86dbd337f00ab84c613ad03d6fc06e28

query I rowsort
SELECT - col0 + col1 AS col0 FROM tab2
----
-19
-62
24

query I rowsort
SELECT ALL col0 * col1 * col2 AS col0 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT ALL col1 * + col2 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT - 23 + col1 AS col0 FROM tab2 AS cor0
----
-6
36
8

query I rowsort
SELECT - 72 + 27 + cor1.col1 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 0867b82ee1d9c9249b0381d9f9eab9e6

query I rowsort
SELECT + - col1 * col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - - col0 + cor0.col2 * col0 AS col2 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT DISTINCT col0 * + col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT - col1 + - col1 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT + + col2 * col2 AS col0 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL - + col2 + + col1 FROM tab2 AS cor0
----
-21
33
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-3446
SELECT - col0 DIV + col0 + - col2 * 86 FROM tab2 AS cor0
----
-2237
-2323
-3269

skipif mysql # not compatible
query I rowsort label-3446
SELECT - col0 / + col0 + - col2 * 86 FROM tab2 AS cor0
----
-2237
-2323
-3269

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3447
SELECT + CAST( NULL AS SIGNED ) + + col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3447
SELECT + CAST ( NULL AS INTEGER ) + + col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 + col2 AS col0 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3449
SELECT CAST( - 35 AS SIGNED ) * col1 + col0 AS col0 FROM tab2 AS cor0
----
-1078
-1987
-516

skipif mysql # not compatible
query I rowsort label-3449
SELECT CAST ( - 35 AS INTEGER ) * col1 + col0 AS col0 FROM tab2 AS cor0
----
-1078
-1987
-516

query I rowsort
SELECT - ( col0 ) FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT ( - 21 ) * col2 + col1 * cor0.col2 FROM tab0 AS cor0
----
2145
5740
76

query I rowsort
SELECT ALL - tab2.col0 * + 86 AS col0 FROM tab2
----
-602
-6708
-6794

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3453
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col2 FROM tab0, tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3453
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col2 FROM tab0, tab2 AS cor0
----
NULL

query I rowsort
SELECT + tab2.col0 * - ( col0 ) FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT ALL - 97 AS col1 FROM tab1
----
-97
-97
-97

query IIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 cor0 CROSS JOIN tab0
----
243 values hashing to 566180e0144350a78b0ef3318e8f4c00

query I rowsort
SELECT 42 AS col1 FROM tab0
----
42
42
42

query I rowsort
SELECT + 41 * col1 * cor0.col0 + + 80 FROM tab2 AS cor0
----
188762
55143
8977

query I rowsort
SELECT + col0 + cor0.col0 * + cor0.col2 + col0 AS col1 FROM tab0 cor0
----
105
7476
840

onlyif mysql # use DIV operator for integer division
query I rowsort label-3460
SELECT - 35 + 95 DIV col0 FROM tab0 AS cor0
----
-32
-33
-34

skipif mysql # not compatible
query I rowsort label-3460
SELECT - 35 + 95 / col0 FROM tab0 AS cor0
----
-32
-33
-34

query I rowsort
SELECT 52 FROM tab2
----
52
52
52

query I rowsort
SELECT DISTINCT + col1 * - col0 * - col0 AS col0 FROM tab0 AS cor0
----
118825
49536
720811

query I rowsort
SELECT + 24 + col0 * - col2 FROM tab2 AS cor0
----
-165
-2004
-2978

query I rowsort
SELECT ALL col2 + 81 * + col2 AS col0 FROM tab0 cor0
----
2706
6724
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-3465
SELECT ALL col2 DIV col0 AS col0 FROM tab0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3465
SELECT ALL col2 / col0 AS col0 FROM tab0
----
0
0
1

query I rowsort
SELECT 54 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

query I rowsort
SELECT DISTINCT + ( col0 ) * 37 + 11 + + col1 AS col0 FROM tab2 cor0
----
2951
2956
301

query I rowsort
SELECT ALL - - 36 AS col0 FROM tab2 AS cor0
----
36
36
36

query I rowsort
SELECT col0 + col1 * col0 FROM tab1 cor0
----
1120
704
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 * - col2 + + 85 col1 FROM tab2 AS cor0
----
1529
761
814

query I rowsort
SELECT DISTINCT + + 79 + col0 AS col2 FROM tab1 AS cor0
----
143
159
82

query I rowsort
SELECT DISTINCT - col0 - col0 * - col1 AS col2 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT + 60 AS col2 FROM tab2 AS cor0
----
60
60
60

query I rowsort
SELECT ALL + - cor0.col2 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT + - col1 AS col2 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT + ( - cor0.col2 ) * + cor0.col2 + col0 * + col1 AS col0 FROM tab2 AS cor0
----
-101
-512
3926

query I rowsort
SELECT - col2 + col0 AS col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT col0 * - 59 + + col2 * + col0 FROM tab2 cor0
----
-1659
-224
-2574

query I rowsort
SELECT ALL cor0.col2 + + col0 FROM tab0 AS cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-3480
SELECT + col2 + col1 * cor0.col1 DIV col1 FROM tab0 AS cor0
----
119
173
98

skipif mysql # not compatible
query I rowsort label-3480
SELECT + col2 + col1 * cor0.col1 / col1 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3481
SELECT - tab1.col1 DIV col0 AS col0 FROM tab1
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-3481
SELECT - tab1.col1 / col0 AS col0 FROM tab1
----
-8
0
0

query I rowsort
SELECT col1 * col0 AS col2 FROM tab2
----
1343
217
4602

query I rowsort
SELECT DISTINCT - + col1 AS col2 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT + col0 - col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT cor0.col2 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT + - col2 + + 31 FROM tab2 AS cor0
----
-7
4
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-3487
SELECT - col2 DIV + ( col0 ) FROM tab2
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-3487
SELECT - col2 / + ( col0 ) FROM tab2
----
-3
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3488
SELECT CAST( NULL AS SIGNED ) FROM tab2 AS cor0 CROSS JOIN tab2, tab0 cor1, tab1 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-3488
SELECT CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 CROSS JOIN tab2, tab0 cor1, tab1 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3489
SELECT + col1 + - CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3489
SELECT + col1 + - CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + cor0.col2 + col2 col0 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT col0 + + 47 * - col1 FROM tab1 cor0
----
-1219
-406
-531

onlyif mysql # use DIV operator for integer division
query I rowsort label-3492
SELECT - 12 * col1 + + col0 + - col0 DIV - 69 FROM tab1 AS cor0
----
-309
-56
-75

skipif mysql # not compatible
query I rowsort label-3492
SELECT - 12 * col1 + + col0 + - col0 / - 69 FROM tab1 AS cor0
----
-309
-56
-75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + col2 + col2 * col2 col0 FROM tab0 AS cor0
----
13448
2
2178

query I rowsort
SELECT DISTINCT 74 + - 0 AS col2 FROM tab2 AS cor0
----
74

query I rowsort
SELECT ALL - 41 FROM tab0, tab2 AS cor0
----
9 values hashing to 4ba0c102091f9cbc9fe9439b04584e70

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 cor0 CROSS JOIN tab2, tab2 cor1, tab1, tab0 AS cor2
----
3645 values hashing to 6a63085e8cab6f97591fd0a6b6ffff07

query I rowsort
SELECT DISTINCT - - col2 + - ( col1 ) AS col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT 37 + + 93 AS col1 FROM tab0 AS cor0
----
130
130
130

query I rowsort
SELECT - col0 + - col1 AS col2 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT - cor0.col0 + col0 AS col1 FROM tab2 cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3501
SELECT - tab1.col0 DIV - 76 AS col1 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3501
SELECT - tab1.col0 / - 76 AS col1 FROM tab1
----
0
0
1

query I rowsort
SELECT + + col0 * - col0 AS col1 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT - 50 + 10 FROM tab1
----
-40
-40
-40

query I rowsort
SELECT tab2.col1 * cor0.col2 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 24458b87d784ecaf9184f99bd12fb51a

query I rowsort
SELECT DISTINCT - col0 * + col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL tab2.col1 AS col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT ALL cor0.col2 FROM tab1, tab0 cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3508
SELECT + CAST( ( + col1 ) AS SIGNED ) FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-3508
SELECT + CAST ( ( + col1 ) AS INTEGER ) FROM tab0
----
86
91
97

query IIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
243 values hashing to b3323704f6873113d863f8e27386b356

query I rowsort
SELECT 33 FROM tab2
----
33
33
33

query I rowsort
SELECT DISTINCT + 56 AS col2 FROM tab1, tab1 cor0
----
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-3512
SELECT DISTINCT 83 DIV + cor0.col2 AS col0 FROM tab1, tab0 AS cor0
----
1
2
83

skipif mysql # not compatible
query I rowsort label-3512
SELECT DISTINCT 83 / + cor0.col2 AS col0 FROM tab1, tab0 AS cor0
----
1
2
83

query I rowsort
SELECT DISTINCT + col0 * ( - col2 ) FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT - col1 AS col1 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT - 66 FROM tab2 cor0
----
-66

query I rowsort
SELECT DISTINCT col2 * + col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT col2 * + col0 - col0 AS col1 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT ALL + + col2 + - col2 AS col1 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3519
SELECT DISTINCT - col1 DIV col0 col2 FROM tab0 AS cor0
----
-1
-2
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3519
SELECT DISTINCT - col1 / col0 col2 FROM tab0 AS cor0
----
-1
-2
-3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3520
SELECT CAST( ( - col1 ) AS SIGNED ) * - 71 + + col0 FROM tab2
----
1286
2208
4267

skipif mysql # not compatible
query I rowsort label-3520
SELECT CAST ( ( - col1 ) AS INTEGER ) * - 71 + + col0 FROM tab2
----
1286
2208
4267

query I rowsort
SELECT - 42 FROM tab0, tab2 cor0
----
9 values hashing to 9894093f29c0defae91347934f060329

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 cor0, tab2, tab0 AS cor1
----
972 values hashing to 9345325155d9f4d7dc4986690c631cb9

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 AS cor0, tab0, tab0 AS cor1
----
972 values hashing to 8b4fcda7f1ca76bad7c7d728f54a51e0

query I rowsort
SELECT col0 * tab2.col1 AS col0 FROM tab2
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT - col1 * col2 + - CAST ( col2 AS REAL ) col0 FROM tab0
----
-2871
-7544
-98

query I rowsort
SELECT col0 * tab1.col2 AS col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT + col1 + col0 + ( col2 ) FROM tab0
----
133
143
262

query I rowsort
SELECT - col2 * - col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT col1 + + col2 FROM tab1
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + col2 col2 FROM tab1
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - col0 + cor0.col1 col2 FROM tab0 AS cor0
----
-1978
-3298
-8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-3532
SELECT DISTINCT + + col0 + - cor0.col1 DIV - 97 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-3532
SELECT DISTINCT + + col0 + - cor0.col1 / - 97 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - - col0 * col1 AS col1 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - - col2 AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL col0 + col1 AS col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT - col2 * col1 - col2 AS col1 FROM tab2
----
-1560
-684
-864

query I rowsort
SELECT ALL 87 * cor1.col2 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 5123bfd9988bb394b329db06f843d940

query I rowsort
SELECT - - col1 + + ( col2 * + col1 ) FROM tab1 AS cor0
----
1261
1430
580

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3539
SELECT ALL - - CAST( NULL AS SIGNED ) + + col1 col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3539
SELECT ALL - - CAST ( NULL AS INTEGER ) + + col1 col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 * + col0 col2 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL - 66 + 66 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - col0 * col2 * + col0 AS col0 FROM tab1 AS cor0
----
-233472
-486
-614400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 col2 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT - col1 * + 47 AS col2 FROM tab2 AS cor0
----
-1457
-2773
-799

query I rowsort
SELECT ALL - 52 FROM tab2, tab0 AS cor0
----
9 values hashing to 9500afe5646d620d5e8943351a29d082

query I rowsort
SELECT DISTINCT col2 + + 39 FROM tab1 AS cor0
----
135
93
96

query I rowsort
SELECT - 20 * col1 FROM tab2 AS cor0
----
-1180
-340
-620

query I rowsort
SELECT ALL + 21 * col0 * col0 FROM tab1 AS cor0
----
134400
189
86016

query I rowsort
SELECT - col2 * + col0 * col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT 75 FROM tab2 AS cor0
----
75

query I rowsort
SELECT 49 FROM tab1 cor0
----
49
49
49

query I rowsort
SELECT ALL + - 36 * col1 AS col1 FROM tab2 cor0
----
-1116
-2124
-612

query I rowsort
SELECT + - col0 * cor0.col0 AS col2 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL - 21 FROM tab1 AS cor0
----
-21
-21
-21

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3555
SELECT DISTINCT + CAST( NULL AS DECIMAL ) * col1 + - col2 * 29 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3555
SELECT DISTINCT + CAST ( NULL AS REAL ) * col1 + - col2 * 29 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 10 col1 FROM tab1 AS cor0
----
10
10
10

query I rowsort
SELECT ALL - col1 + + col0 * + col2 AS col2 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT + 30 + ( col1 ) FROM tab2
----
47
61
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 12 + - col2 * + col2 + cor0.col0 col2 FROM tab2 AS cor0
----
-1353
-586
-710

query I rowsort
SELECT ALL - col0 + ( + col2 ) FROM tab1 AS cor0
----
-7
16
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 6 * + col0 ) col1 FROM tab1
----
18
384
480

query I rowsort
SELECT - col2 + - col0 * - col1 FROM tab2 AS cor0
----
1305
190
4576

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0, tab0 AS cor1, tab1 cor2
----
972 values hashing to 465d072d2d9eababbfc8e88b82707474

query I rowsort
SELECT DISTINCT - 82 FROM tab1, tab2 AS cor0, tab2 AS cor1, tab0 AS cor2
----
-82

query I rowsort
SELECT ALL + cor0.col0 * col2 - col2 AS col0 FROM tab0 AS cor0
----
34
7216
759

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( - col0 ) * - col1 + - col1 * col0 + + col2 col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT - cor0.col2 * - col2 FROM tab1 AS cor0
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-3568
SELECT DISTINCT + col0 DIV + col2 - - col0 * 94 col1 FROM tab0 AS cor0
----
2256
3325
8367

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3568
SELECT DISTINCT + col0 / + col2 - - col0 * 94 col1 FROM tab0 AS cor0
----
2256
3325
8367

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3569
SELECT ALL - col2 + col0 - CAST( col1 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-63
-84
-95

skipif mysql # not compatible
query I rowsort label-3569
SELECT ALL - col2 + col0 - CAST ( col1 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-63
-84
-95

query I rowsort
SELECT - 82 + - cor0.col0 AS col0 FROM tab2 AS cor0
----
-160
-161
-89

query I rowsort
SELECT ALL + 33 FROM tab1 AS cor0
----
33
33
33

query I rowsort
SELECT DISTINCT - - ( col0 ) + + cor0.col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + 33 + col1 + + ( - col1 ) AS col0 FROM tab1 AS cor0
----
33

query I rowsort
SELECT + cor0.col2 * cor0.col0 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-3575
SELECT + cor0.col1 DIV col1 AS col1 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3575
SELECT + cor0.col1 / col1 AS col1 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT ALL - - col0 * col1 * + 83 FROM tab1 AS cor0
----
53120
6474
86320

query I rowsort
SELECT + + cor0.col2 * - col1 AS col0 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT + ( + col0 ) FROM tab2
----
7
78
79

query I rowsort
SELECT - col1 + + col1 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3580
SELECT DISTINCT + col1 + col0 DIV + cor0.col1 FROM tab0 cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-3580
SELECT DISTINCT + col1 + col0 / + cor0.col1 FROM tab0 cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 - + col2 col2 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT + + col1 + - col2 FROM tab1 cor0
----
-28
-47
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-3583
SELECT ALL + col0 DIV col0 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3583
SELECT ALL + col0 / col0 FROM tab0 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3584
SELECT DISTINCT col2 DIV + 76 + cor0.col2 col2 FROM tab1 AS cor0
----
54
57
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3584
SELECT DISTINCT col2 / + 76 + cor0.col2 col2 FROM tab1 AS cor0
----
54
57
97

query I rowsort
SELECT cor0.col1 * - col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT col1 * - ( col0 ) AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT - col2 * - col2 * + cor0.col1 AS col0 FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT DISTINCT + + col0 + + col1 AS col1 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-3589
SELECT DISTINCT - cor0.col0 DIV - col0 + col0 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-3589
SELECT DISTINCT - cor0.col0 / - col0 + col0 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT col1 + - col2 * - ( col0 ) AS col1 FROM tab1 cor0
----
188
3658
7693

query I rowsort
SELECT ALL col0 * - cor0.col2 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - col1 + ( col2 ) FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT + col2 + col2 AS col1 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT DISTINCT + - col1 * ( + col1 ) + + cor0.col0 * 77 * col2 AS col0 FROM tab1 AS cor0
----
11798
280796
591191

query I rowsort
SELECT + col2 + - col1 + 33 FROM tab0
----
-20
-63
24

query I rowsort
SELECT DISTINCT - 35 FROM tab2, tab1, tab2 AS cor0
----
-35

query I rowsort
SELECT DISTINCT - col1 + col2 AS col2 FROM tab2
----
-33
-4
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * + col0 + tab0.col0 + tab0.col2 col2 FROM tab0
----
-7127
-735
1

query I rowsort
SELECT DISTINCT + col1 * - tab1.col0 + + ( - 33 ) * col2 + ( + col1 * - col1 + 57 ) AS col1 FROM tab1
----
-2479
-2564
-4320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col2 col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT + col0 * col0 AS col1 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL + - col2 + - col1 * + cor0.col0 FROM tab1 AS cor0
----
-1136
-132
-697

onlyif mysql # use DIV operator for integer division
query I rowsort label-3603
SELECT DISTINCT - col0 DIV 89 AS col0 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-3603
SELECT DISTINCT - col0 / 89 AS col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT + col2 * + 43 - + col2 AS col1 FROM tab1 AS cor0
----
2268
2394
4032

query I rowsort
SELECT tab1.col0 FROM tab1, tab1 cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
243 values hashing to 26173f1193178352de9a2e4ca7f09d53

query I rowsort
SELECT ALL col0 + col1 AS col0 FROM tab1
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-3608
SELECT col0 * + 25 + col1 DIV + col1 col1 FROM tab2
----
176
1951
1976

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3608
SELECT col0 * + 25 + col1 / + col1 col1 FROM tab2
----
176
1951
1976

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0, tab2 AS cor1, tab0 AS cor2
----
972 values hashing to 9a5ab925af18e11f7748f3b2e722ff3d

query I rowsort
SELECT col1 + - col0 AS col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT DISTINCT - - col0 + 88 FROM tab0 AS cor0
----
112
123
177

query I rowsort
SELECT + col2 * ( col1 ) + - col1 FROM tab0 AS cor0
----
0
2752
7371

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3613
SELECT + CAST( NULL AS SIGNED ) FROM tab1, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3613
SELECT + CAST ( NULL AS INTEGER ) FROM tab1, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - col2 + tab2.col0 FROM tab2
----
-20
41
52

query I rowsort
SELECT + 7 AS col1 FROM tab0 AS cor0
----
7
7
7

query I rowsort
SELECT + col0 + col1 * 19 AS col2 FROM tab2 cor0
----
1199
402
596

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col0 col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT + cor0.col0 * + col2 + - 64 AS col1 FROM tab2 AS cor0
----
125
1964
2938

query I rowsort
SELECT + 62 + + col0 AS col2 FROM tab0 cor0
----
151
86
97

query I rowsort
SELECT DISTINCT - - col2 AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT - 24 * + cor0.col0 + col1 FROM tab0 cor0
----
-2045
-490
-743

query I rowsort
SELECT + + col2 + - cor0.col1 FROM tab2 cor0
----
-33
-4
21

query I rowsort
SELECT - col0 + col2 + - col1 * - ( + col2 ) FROM tab2
----
1482
605
857

query I rowsort
SELECT DISTINCT col0 + 88 + + col2 AS col2 FROM tab1
----
145
209
264

onlyif mysql # use DIV operator for integer division
query I rowsort label-3625
SELECT DISTINCT col1 + col2 DIV + col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-3625
SELECT DISTINCT col1 + col2 / + col1 FROM tab0
----
86
91
97

query I rowsort
SELECT col2 * - 71 FROM tab2
----
-1846
-1917
-2698

query I rowsort
SELECT DISTINCT - 7 * - 32 * col1 + - ( - col1 * + col2 ) FROM tab1
----
2810
4160
7228

query I rowsort
SELECT col2 - - col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT + - cor0.col2 * cor0.col2 * col0 + - col0 AS col1 FROM tab0 AS cor0
----
-26160
-598525
-70

query I rowsort
SELECT - 14 + col0 * cor0.col2 FROM tab0 AS cor0
----
21
7284
778

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3631
SELECT 81 + cor0.col1 * CAST( NULL AS DECIMAL ) - + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3631
SELECT 81 + cor0.col1 * CAST ( NULL AS REAL ) - + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 63 + tab2.col1 AS col2 FROM tab2
----
-32
-4
-46

query I rowsort
SELECT ALL 53 * 71 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 4e71cf06d830bfe4725b26038841dc2c

query I rowsort
SELECT - - cor0.col0 + col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT + tab1.col1 AS col1 FROM tab1, tab1 AS cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * + col0 col2 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT - col0 + + 15 * + col2 AS col0 FROM tab2
----
312
398
491

query I rowsort
SELECT + - ( - col0 ) * - col2 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT - - ( + 15 ) * + col0 AS col0 FROM tab2 cor0
----
105
1170
1185

query I rowsort
SELECT DISTINCT + 63 FROM tab0, tab2 AS cor0
----
63

query I rowsort
SELECT - + 35 * col0 FROM tab1 AS cor0
----
-105
-2240
-2800

query I rowsort
SELECT 1 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT ALL col2 * col1 AS col0 FROM tab1
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col2 col2 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT - 85 AS col2 FROM tab2
----
-85
-85
-85

query I rowsort
SELECT DISTINCT - col2 * + ( - col2 + + ( + col1 ) * - col2 ) AS col2 FROM tab1
----
129024
35739
78732

query I rowsort
SELECT ALL tab2.col0 AS col1 FROM tab2
----
7
78
79

query I rowsort
SELECT DISTINCT + ( col1 ) * + col1 FROM tab1
----
100
169
676

query I rowsort
SELECT 63 FROM tab2
----
63
63
63

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( 65 AS REAL ) + + col1 AS col2 FROM tab0
----
21
26
32

query I rowsort
SELECT cor0.col1 FROM tab1, tab2 cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0, tab1 AS cor1, tab2, tab1 AS cor2
----
3645 values hashing to 35707ade138fec4b370f5140a4cd2963

query I rowsort
SELECT + col1 * col2 * + col0 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT DISTINCT col1 + 39 * col0 FROM tab1 cor0
----
143
2506
3133

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 83 + + col1 col1 FROM tab0 AS cor0
----
14
3
8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3656
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3656
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - 95 FROM tab2 cor0
----
-95
-95
-95

query I rowsort
SELECT ALL - 7 AS col1 FROM tab0 AS cor0
----
-7
-7
-7

query I rowsort
SELECT + cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT + + 61 * - col0 + col0 FROM tab1 AS cor0
----
-180
-3840
-4800

query I rowsort
SELECT + + 53 FROM tab1 cor0
----
53
53
53

query I rowsort
SELECT 32 + col0 AS col0 FROM tab1
----
112
35
96

query I rowsort
SELECT DISTINCT - col2 - + col1 FROM tab1
----
-109
-67
-80

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0, tab2 AS cor1, tab2 cor2
----
972 values hashing to 163d7732097d78f1cda7f65c2cea5a08

query I rowsort
SELECT 82 + col1 AS col1 FROM tab1 AS cor0
----
108
92
95

query I rowsort
SELECT - col1 * - col0 FROM tab2 AS cor0
----
1343
217
4602

skipif mysql # not compatible
query I rowsort
SELECT col2 * + CAST ( 10 * col1 AS REAL ) FROM tab2
----
15340
6460
8370

query I rowsort
SELECT cor0.col2 + - col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT cor0.col1 + cor0.col0 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 882fef197e3b41358c58e24f2db2f2e1

query I rowsort
SELECT - col0 + - col2 AS col1 FROM tab1 cor0
----
-121
-176
-57

query I rowsort
SELECT - - col1 + 27 AS col1 FROM tab0 AS cor0
----
113
118
124

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3672
SELECT - + CAST( NULL AS SIGNED ) * - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3672
SELECT - + CAST ( NULL AS INTEGER ) * - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 56 FROM tab1 AS cor0
----
56
56
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT + ( + col2 ) * cor0.col0 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-3676
SELECT col0 DIV col0 FROM tab2 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3676
SELECT col0 / col0 FROM tab2 cor0
----
1
1
1

query I rowsort
SELECT - 7 AS col2 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 82db7c0390abae7ccf4512b1302a6466

query I rowsort
SELECT - + col2 + + col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT tab1.col1 * - ( + col0 ) FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - + col2 + - col0 * - 75 * + col2 AS col2 FROM tab0 AS cor0
----
2624
547268
59367

query I rowsort
SELECT ALL - cor0.col2 FROM tab0, tab0 AS cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT ALL - + col2 AS col2 FROM tab0 cor0
----
-1
-33
-82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3683
SELECT ALL CAST( NULL AS SIGNED ) FROM tab1, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3683
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab1, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - col0 * cor0.col0 * col2 FROM tab0 AS cor0
----
-1225
-19008
-649522

query I rowsort
SELECT 18 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to b95bafa733666df39c5d3f94760d010f

query I rowsort
SELECT + col2 - - 36 AS col0 FROM tab0
----
118
37
69

query I rowsort
SELECT + col2 * - col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - - cor0.col2 * - col1 AS col0 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL col2 * + col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + cor0.col1 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

onlyif mysql # use DIV operator for integer division
query I rowsort label-3691
SELECT DISTINCT - col1 + - col0 DIV - ( col1 * cor0.col0 ) FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-3691
SELECT DISTINCT - col1 + - col0 / - ( col1 * cor0.col0 ) FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT + col2 + + 12 AS col2 FROM tab2
----
38
39
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 col2 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT col0 + ( 14 * tab2.col1 ) AS col0 FROM tab2
----
317
441
904

query I rowsort
SELECT col1 + + 33 * 26 FROM tab0
----
944
949
955

query I rowsort
SELECT DISTINCT tab0.col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3697
SELECT DISTINCT CAST( + col0 + col0 AS SIGNED ) FROM tab1
----
128
160
6

skipif mysql # not compatible
query I rowsort label-3697
SELECT DISTINCT CAST ( + col0 + col0 AS INTEGER ) FROM tab1
----
128
160
6

query I rowsort
SELECT + ( - col2 ) * - tab1.col1 AS col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ( col1 ) AS col1 FROM tab2
----
17
31
59

query I rowsort
SELECT - 67 FROM tab1
----
-67
-67
-67

query I rowsort
SELECT DISTINCT - col0 + cor0.col1 + + col0 AS col1 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT + + col1 * col1 * col1 FROM tab2 cor0
----
205379
29791
4913

query I rowsort
SELECT tab1.col2 * ( tab1.col2 ) * - 1 AS col0 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT col1 - col1 AS col1 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT + col1 + + col2 FROM tab1
----
109
67
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3706
SELECT CAST( NULL AS SIGNED ) * - col0 * + col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3706
SELECT CAST ( NULL AS INTEGER ) * - col0 * + col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - tab2.col2 AS col2 FROM tab2, tab1, tab1 AS cor0, tab0
----
81 values hashing to c569638e8a09ff819458d62ddbde994c

query I rowsort
SELECT - 52 FROM tab2, tab2 AS cor0
----
9 values hashing to 9500afe5646d620d5e8943351a29d082

query I rowsort
SELECT DISTINCT - col1 + col0 + col0 FROM tab1
----
-20
118
147

query I rowsort
SELECT col1 * + col2 + col1 + 65 * col0 AS col2 FROM tab2 AS cor0
----
1323
5798
6663

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL col1 * col0 AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL col0 + cor0.col0 + col2 FROM tab0 cor0
----
260
71
81

query I rowsort
SELECT + col2 + cor0.col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL + + 19 FROM tab1 AS cor0
----
19
19
19

query I rowsort
SELECT + - col1 * + cor0.col0 AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT cor0.col0 * cor0.col0 AS col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT + 32 * - col2 + + col1 + col1 * - col0 AS col0 FROM tab2 AS cor0
----
-1050
-2542
-5375

query I rowsort
SELECT + cor0.col0 * col0 * col2 AS col1 FROM tab0 AS cor0
----
1225
19008
649522

onlyif mysql # use DIV operator for integer division
query I rowsort label-3720
SELECT ALL + col1 DIV col2 FROM tab0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-3720
SELECT ALL + col1 / col2 FROM tab0
----
1
2
97

query I rowsort
SELECT ALL 60 AS col2 FROM tab0, tab1, tab0 cor0
----
27 values hashing to 1d2ab302ae60f95b15e68cf89083b162

query I rowsort
SELECT ALL 45 FROM tab1
----
45
45
45

query I rowsort
SELECT DISTINCT - col0 + col2 * + ( + tab0.col1 ) AS col1 FROM tab0
----
2814
62
7373

query I rowsort
SELECT col0 + + col2 * - col2 * - col2 FROM tab2
----
17654
19690
54951

query I rowsort
SELECT ALL + col0 + col0 * col1 + tab1.col0 FROM tab1
----
1200
768
84

query I rowsort
SELECT col0 * col1 + col0 AS col1 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT ALL - + 1 + + col2 + + col2 FROM tab1 AS cor0
----
107
113
191

query I rowsort
SELECT DISTINCT + 50 FROM tab2 AS cor0
----
50

query I rowsort
SELECT ALL - + col1 * col0 + - col1 FROM tab0 cor0
----
-2150
-3492
-8190

query I rowsort
SELECT ALL - 37 AS col0 FROM tab1
----
-37
-37
-37

query I rowsort
SELECT ALL + col2 AS col1 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT DISTINCT + cor0.col2 * col2 + - col1 * + cor0.col0 * col1 AS col1 FROM tab2 AS cor0
----
-21387
-270842
-5998

query I rowsort
SELECT + col0 * - col2 + - col2 FROM tab1 AS cor0
----
-216
-3705
-7776

query I rowsort
SELECT + 9 FROM tab0 AS cor0
----
9
9
9

query I rowsort
SELECT - col0 * 43 FROM tab1 AS cor0
----
-129
-2752
-3440

query I rowsort
SELECT DISTINCT + col2 * + ( col1 ) AS col0 FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-3737
SELECT + + col1 DIV - ( col2 * cor0.col2 + col0 * 76 ) AS col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3737
SELECT + + col1 / - ( col2 * cor0.col2 + col0 * 76 ) AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - - cor0.col2 AS col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT - - col0 AS col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT - col1 + 25 AS col2 FROM tab2 AS cor0
----
-34
-6
8

query I rowsort
SELECT ALL col1 * + col1 AS col2 FROM tab1 cor0
----
100
169
676

query I rowsort
SELECT + - col1 + - col2 * + 3 AS col2 FROM tab1 AS cor0
----
-181
-188
-301

query I rowsort
SELECT ALL - col0 + + col0 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT col0 + + col1 * 63 FROM tab1
----
1641
694
899

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 80 + col2 col2 FROM tab2
----
106
107
118

query I rowsort
SELECT - col2 + + col2 AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT - col2 * col0 + col2 FROM tab0
----
-34
-7216
-759

query I rowsort
SELECT - - col0 * - 64 FROM tab1 cor0
----
-192
-4096
-5120

query I rowsort
SELECT DISTINCT + cor0.col2 + + col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT + - col1 + 60 AS col1 FROM tab0 AS cor0
----
-26
-31
-37

query I rowsort
SELECT - col2 + 89 * + 91 FROM tab1 cor0
----
8003
8042
8045

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( col2 AS REAL ) AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT col2 - + cor0.col1 AS col0 FROM tab0 AS cor0
----
-53
-9
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 20 + + col2 col0 FROM tab2 AS cor0
----
46
47
58

query I rowsort
SELECT ALL col0 * 94 AS col1 FROM tab0 cor0
----
2256
3290
8366

query I rowsort
SELECT - ( + col1 ) AS col0 FROM tab2 cor0
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-3757
SELECT + + ( - col2 ) - + col0 DIV cor0.col1 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-3757
SELECT + + ( - col2 ) - + col0 / cor0.col1 FROM tab0 AS cor0
----
-1
-33
-82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3758
SELECT ALL - - CAST( ( - col2 - 66 ) AS SIGNED ) + col0 + cor0.col2 col0 FROM tab2 AS cor0
----
-59
12
13

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3758
SELECT ALL - - CAST ( ( - col2 - 66 ) AS INTEGER ) + col0 + cor0.col2 col0 FROM tab2 AS cor0
----
-59
12
13

onlyif mysql # use DIV operator for integer division
query I rowsort label-3759
SELECT DISTINCT + 17 DIV 89 + col2 AS col0 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-3759
SELECT DISTINCT + 17 / 89 + col2 AS col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ( col2 ) AS col1 FROM tab2
----
26
27
38

query IIIIIIIII rowsort
SELECT * FROM tab1, tab1 cor0 CROSS JOIN tab1 AS cor1
----
243 values hashing to 2464a6f4cfabe66aeca50fcb4cd85bf5

query I rowsort
SELECT DISTINCT col0 + col1 * col1 * + col0 FROM tab1
----
13600
2031
6464

query I rowsort
SELECT tab1.col0 * - col1 + - col0 * + 66 FROM tab1
----
-276
-4864
-6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-3764
SELECT DISTINCT + 29 DIV + 58 FROM tab0 cor0
----
0

skipif mysql # not compatible
query I rowsort label-3764
SELECT DISTINCT + 29 / + 58 FROM tab0 cor0
----
0

query I rowsort
SELECT ( - col1 ) FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT - 62 * - col1 + + col2 FROM tab1 AS cor0
----
1666
677
902

query I rowsort
SELECT DISTINCT - 26 * cor0.col0 * + col1 FROM tab0 AS cor0
----
-210574
-53664
-88270

query I rowsort
SELECT + - ( col0 ) AS col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT 80 * 64 + col1 + + col2 AS col1 FROM tab0 AS cor0
----
5218
5239
5293

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT col0 * col2 AS col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL - col0 * - col2 AS col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT + ( + col1 ) * + cor0.col2 * 51 FROM tab0 AS cor0
----
144738
380562
4947

query I rowsort
SELECT ALL - - 32 AS col1 FROM tab0 cor0
----
32
32
32

query I rowsort
SELECT DISTINCT - - 42 * - cor0.col0 - col1 AS col0 FROM tab0 cor0
----
-1094
-1567
-3829

query I rowsort
SELECT cor0.col1 * col2 + + col2 AS col2 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT - cor0.col1 - col0 * + col2 AS col2 FROM tab2 cor0
----
-2087
-220
-3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-3778
SELECT DISTINCT col2 DIV col0 + col2 DIV + col1 FROM tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-3778
SELECT DISTINCT col2 / col0 + col2 / + col1 FROM tab0 AS cor0
----
0
1

query I rowsort
SELECT ALL + 45 * - 39 FROM tab2 AS cor0
----
-1755
-1755
-1755

query I rowsort
SELECT DISTINCT - col0 * - col1 + col1 AS col1 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT ALL + 44 - - 7 FROM tab1 AS cor0
----
51
51
51

query I rowsort
SELECT 6 + 10 AS col0 FROM tab0 AS cor0
----
16
16
16

query I rowsort
SELECT DISTINCT col0 - + col1 FROM tab0 cor0
----
-2
-62

query I rowsort
SELECT - - 97 + col2 * col2 AS col0 FROM tab1 AS cor0
----
3013
3346
9313

query I rowsort
SELECT ALL - 57 + - 36 * col0 FROM tab0 AS cor0
----
-1317
-3261
-921

query I rowsort
SELECT ALL ( cor0.col2 ) + + col1 AS col0 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3787
SELECT - CAST( col0 AS SIGNED ) * + col0 + - 79 - - col0 FROM tab2
----
-121
-6085
-6241

skipif mysql # not compatible
query I rowsort label-3787
SELECT - CAST ( col0 AS INTEGER ) * + col0 + - 79 - - col0 FROM tab2
----
-121
-6085
-6241

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT + col1 + col2 AS col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT + + 11 FROM tab0 AS cor0
----
11

query I rowsort
SELECT + ( - col0 ) + col2 + + 41 FROM tab2 cor0
----
-11
0
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 91 * col0 col2 FROM tab1 AS cor0
----
273
5824
7280

query I rowsort
SELECT ALL col2 + cor0.col1 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3794
SELECT ALL + + ( - col2 ) * - cor0.col0 + ( col1 ) * - CAST( NULL AS SIGNED ) + + 70 * + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3794
SELECT ALL + + ( - col2 ) * - cor0.col0 + ( col1 ) * - CAST ( NULL AS INTEGER ) + + 70 * + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3795
SELECT DISTINCT ( col2 * tab0.col2 ) - + CAST( NULL AS SIGNED ) FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-3795
SELECT DISTINCT ( col2 * tab0.col2 ) - + CAST ( NULL AS INTEGER ) FROM tab0
----
NULL

query I rowsort
SELECT DISTINCT 20 + tab2.col1 FROM tab2
----
37
51
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-3797
SELECT ALL col0 * ( col0 ) DIV col0 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-3797
SELECT ALL col0 * ( col0 ) / col0 FROM tab1
----
3
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3798
SELECT ALL CAST( NULL AS SIGNED ) col2 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3798
SELECT ALL CAST ( NULL AS INTEGER ) col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - ( - col1 ) AS col2 FROM tab2
----
17
31
59

query I rowsort
SELECT + cor0.col0 * - cor0.col0 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 4734c38591591662f77999e8d1e5daf1

query IIIIIIIII rowsort
SELECT * FROM tab1, tab0 cor0, tab0 cor1
----
243 values hashing to 3581f59ff9574f9d6290fc6bca0b5e4d

query I rowsort
SELECT ALL 34 * col0 FROM tab2 AS cor0
----
238
2652
2686

query I rowsort
SELECT 16 FROM tab2
----
16
16
16

query I rowsort
SELECT + 19 FROM tab0 AS cor0
----
19
19
19

query I rowsort
SELECT + col0 + + col2 AS col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT + + col0 * - cor0.col0 + + col0 AS col2 FROM tab0 AS cor0
----
-1190
-552
-7832

onlyif mysql # use DIV operator for integer division
query I rowsort label-3807
SELECT col1 + - col1 DIV col1 FROM tab1 AS cor0
----
12
25
9

skipif mysql # not compatible
query I rowsort label-3807
SELECT col1 + - col1 / col1 FROM tab1 AS cor0
----
12
25
9

query I rowsort
SELECT col0 * col2 + + col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT + - col2 * col2 * col2 - - ( col1 ) * + 8 * col1 FROM tab0 AS cor0
----
-485120
23231
75271

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( - col1 * col2 AS REAL ) FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT - col0 + col1 FROM tab0 AS cor0
----
2
62
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - col2 * - 70 col2 FROM tab0 AS cor0
----
167
2396
5831

query I rowsort
SELECT ALL col1 * col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT DISTINCT - - cor0.col1 + ( ( cor0.col2 ) ) FROM tab2 AS cor0
----
55
58
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3815
SELECT DISTINCT - cor0.col1 + CAST( NULL AS SIGNED ) + + col1 * + col2 * col0 AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3815
SELECT DISTINCT - cor0.col1 + CAST ( NULL AS INTEGER ) + + col1 * + col2 * col0 AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT col0 * cor0.col2 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT - col2 + col1 AS col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT ALL + col0 * col1 * + col0 FROM tab1 AS cor0
----
234
40960
83200

query I rowsort
SELECT col1 + - ( cor0.col1 ) * + col1 FROM tab2 AS cor0
----
-272
-3422
-930

query I rowsort
SELECT + col1 + - col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT col0 * col1 + col2 AS col2 FROM tab1 AS cor0
----
1136
132
697

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 96 + - tab0.col1 col2 FROM tab0
----
-1
10
5

query I rowsort
SELECT - ( col1 * - col2 ) + + 29 * + col2 AS col0 FROM tab2
----
1620
1748
2288

query I rowsort
SELECT - tab2.col1 FROM tab2, tab1, tab1 cor0
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT ALL - + 73 AS col0 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 2931474b870c05694e446771031a6949

query I rowsort
SELECT - col1 + - 6 FROM tab2 AS cor0
----
-23
-37
-65

query I rowsort
SELECT - + col2 + col2 * - cor0.col0 AS col1 FROM tab0 cor0
----
-36
-7380
-825

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * cor0.col0 col1 FROM tab2, tab2 AS cor0, tab2 cor1
----
27 values hashing to a95320dbb4fb4aa98e2920d866f19abe

query I rowsort
SELECT 77 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to d7b027bca5d37c67e29013904def8125

query I rowsort
SELECT ALL - - ( + cor1.col0 ) AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT + 58 AS col0 FROM tab1 AS cor0
----
58
58
58

query I rowsort
SELECT - ( cor0.col0 ) FROM tab2 AS cor0
----
-7
-78
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3833
SELECT ALL CAST( NULL AS DECIMAL ) AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3833
SELECT ALL CAST ( NULL AS REAL ) AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT ( col1 ) + cor0.col2 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3835
SELECT - CAST( col0 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-3835
SELECT - CAST ( col0 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL - 94 * col0 FROM tab1 AS cor0
----
-282
-6016
-7520

query I rowsort
SELECT - col1 + + 15 FROM tab0 AS cor0
----
-71
-76
-82

query I rowsort
SELECT ALL + 81 FROM tab0 cor0
----
81
81
81

query I rowsort
SELECT col0 * col1 + - col2 FROM tab2 AS cor0
----
1305
190
4576

query I rowsort
SELECT 59 * col0 AS col2 FROM tab1 AS cor0
----
177
3776
4720

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3841
SELECT + CAST( + 24 AS SIGNED ) * - col0 AS col0 FROM tab0 AS cor0
----
-2136
-576
-840

skipif mysql # not compatible
query I rowsort label-3841
SELECT + CAST ( + 24 AS INTEGER ) * - col0 AS col0 FROM tab0 AS cor0
----
-2136
-576
-840

query I rowsort
SELECT - col0 + - col1 * + col2 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT - ( + 4 ) + - col1 * - ( ( - col0 ) ) * + col0 AS col1 FROM tab0 AS cor0
----
-118829
-49540
-720815

query I rowsort
SELECT col1 * - col0 AS col1 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT + col0 * + col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT ALL cor0.col1 * col2 + + col0 - col1 AS col2 FROM tab1 AS cor0
----
1315
1381
624

query I rowsort
SELECT ALL 88 FROM tab1 AS cor0
----
88
88
88

query I rowsort
SELECT DISTINCT + + col1 + 25 * col1 FROM tab1 AS cor0
----
260
338
676

query I rowsort
SELECT DISTINCT col1 * cor0.col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT 25 * + 71 FROM tab1, tab2 AS cor0
----
9 values hashing to 5d8328f0795e4af8e954492eeba12946

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3851
SELECT - CAST( col0 AS SIGNED ) * - cor0.col2 FROM tab1 AS cor0
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-3851
SELECT - CAST ( col0 AS INTEGER ) * - cor0.col2 FROM tab1 AS cor0
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - col2 * tab1.col0 ) col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT + col0 + - col2 * col1 FROM tab2
----
-1456
-567
-830

query I rowsort
SELECT - - ( col2 ) + col2 * - 29 AS col1 FROM tab0 AS cor0
----
-2296
-28
-924

query I rowsort
SELECT DISTINCT + 77 AS col2 FROM tab2
----
77

query I rowsort
SELECT ALL col2 * - cor0.col2 + col2 FROM tab1 AS cor0
----
-2862
-3192
-9120

query I rowsort
SELECT ALL 52 - col1 AS col0 FROM tab2
----
-7
21
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 77 + + col2 - ( cor0.col0 ) * + col1 col0 FROM tab0 AS cor0
----
-1954
-3317
-7940

query I rowsort
SELECT ( + tab0.col0 ) FROM tab0
----
24
35
89

query I rowsort
SELECT + col1 * col0 AS col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT - + col2 * - cor0.col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - col0 * 51 AS col1 FROM tab0
----
-1224
-1785
-4539

query I rowsort
SELECT ALL - col2 * + col2 + col1 FROM tab2
----
-1427
-617
-698

query I rowsort
SELECT DISTINCT + tab1.col1 + col0 FROM tab1
----
29
74
93

query I rowsort
SELECT col0 * + tab2.col1 + - col1 * tab2.col1 AS col2 FROM tab2
----
-744
1054
1121

onlyif mysql # use DIV operator for integer division
query I rowsort label-3866
SELECT + + cor0.col0 DIV + col0 + + col0 FROM tab1 AS cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-3866
SELECT + + cor0.col0 / + col0 + + col0 FROM tab1 AS cor0
----
4
65
81

query I rowsort
SELECT - col2 + + 88 FROM tab1 AS cor0
----
-8
31
34

query I rowsort
SELECT ALL + 27 * + col2 AS col2 FROM tab0 AS cor0
----
2214
27
891

query I rowsort
SELECT + 48 + col0 * col2 AS col0 FROM tab2 AS cor0
----
2076
237
3050

query I rowsort
SELECT DISTINCT 15 AS col2 FROM tab0 AS cor0
----
15

onlyif mysql # use DIV operator for integer division
query I rowsort label-3871
SELECT + col2 + - col0 DIV 95 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-3871
SELECT + col2 + - col0 / 95 FROM tab2 AS cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT - - ( col2 ) FROM tab2 AS cor0
----
26
27
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3874
SELECT DISTINCT 3 * + col0 * + CAST( NULL AS SIGNED ) + col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3874
SELECT DISTINCT 3 * + col0 * + CAST ( NULL AS INTEGER ) + col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL - - col0 - - col1 AS col1 FROM tab2 AS cor0
----
137
38
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3876
SELECT ALL + - col1 * + col1 * + CAST( col0 + cor0.col1 AS SIGNED ) AS col1 FROM tab2 cor0
----
-27744
-36518
-476897

skipif mysql # not compatible
query I rowsort label-3876
SELECT ALL + - col1 * + col1 * + CAST ( col0 + cor0.col1 AS INTEGER ) AS col1 FROM tab2 cor0
----
-27744
-36518
-476897

query I rowsort
SELECT col1 * - col0 + 90 FROM tab2 AS cor0
----
-1253
-127
-4512

query I rowsort
SELECT DISTINCT - - 75 FROM tab0 AS cor0
----
75

query I rowsort
SELECT ALL - col0 + + col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL + 44 * col2 - + col0 AS col0 FROM tab1 cor0
----
2373
2444
4144

query I rowsort
SELECT DISTINCT col0 + col2 AS col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT + - 18 + col2 * col2 AS col2 FROM tab2 AS cor0
----
1426
658
711

query I rowsort
SELECT DISTINCT 44 + - col2 AS col0 FROM tab1 AS cor0
----
-10
-13
-52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3884
SELECT ALL - - col0 + - cor0.col1 * - CAST( col1 + - col2 AS SIGNED ) FROM tab0 AS cor0
----
4582
908
9347

skipif mysql # not compatible
query I rowsort label-3884
SELECT ALL - - col0 + - cor0.col1 * - CAST ( col1 + - col2 AS INTEGER ) FROM tab0 AS cor0
----
4582
908
9347

query I rowsort
SELECT col2 + + col1 AS col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL + + ( - cor0.col0 ) AS col2 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT - ( col0 ) + - col1 * col2 AS col1 FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT - + col1 * + col0 + + col0 AS col2 FROM tab0 AS cor0
----
-2040
-3360
-8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-3889
SELECT + ( cor0.col1 ) DIV col1 + cor0.col1 * col0 FROM tab2 AS cor0
----
1344
218
4603

skipif mysql # not compatible
query I rowsort label-3889
SELECT + ( cor0.col1 ) / col1 + cor0.col1 * col0 FROM tab2 AS cor0
----
1344
218
4603

query I rowsort
SELECT - cor0.col1 * + col2 AS col1 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT + col0 * ( col2 ) FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT + - col1 * - ( - cor0.col2 ) + cor0.col0 FROM tab2 AS cor0
----
-1456
-567
-830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + cor0.col0 * cor0.col2 col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - col1 + + col2 * - col0 AS col0 FROM tab2 AS cor0
----
-2087
-220
-3019

query I rowsort
SELECT ALL - col2 * col2 + - 15 FROM tab1 AS cor0
----
-2931
-3264
-9231

query I rowsort
SELECT DISTINCT - - col1 + col2 AS col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT + 78 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3898
SELECT ALL CAST( ( col0 ) AS SIGNED ) + cor0.col1 FROM tab1 AS cor0
----
29
74
93

skipif mysql # not compatible
query I rowsort label-3898
SELECT ALL CAST ( ( col0 ) AS INTEGER ) + cor0.col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT - 23 FROM tab2 AS cor0
----
-23
-23
-23

query I rowsort
SELECT ALL - 98 + col1 FROM tab2 AS cor0
----
-39
-67
-81

query I rowsort
SELECT - - ( col0 ) FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT ALL + - col0 * + cor0.col0 AS col2 FROM tab1 AS cor0
----
-4096
-6400
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 91 col2 FROM tab0 AS cor0
----
-91
-91
-91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 99 + col1 * col0 col0 FROM tab2 AS cor0
----
1442
316
4701

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3905
SELECT ALL - CAST( NULL AS SIGNED ) * col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3905
SELECT ALL - CAST ( NULL AS INTEGER ) * col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col0 + + ( col1 ) FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT DISTINCT - col0 + col0 * col1 * cor0.col2 + col1 * col2 FROM tab1 AS cor0
----
101008
36986
5613

query I rowsort
SELECT + + col1 - - col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT + col0 + - 43 FROM tab1 AS cor0
----
-40
21
37

query I rowsort
SELECT + 37 + col1 * col1 AS col0 FROM tab0 AS cor0
----
7433
8318
9446

query I rowsort
SELECT ALL + col1 + - 79 FROM tab2
----
-20
-48
-62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3912
SELECT - CAST( col0 AS SIGNED ) - - col1 * col1 col1 FROM tab2
----
210
3403
954

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3912
SELECT - CAST ( col0 AS INTEGER ) - - col1 * col1 col1 FROM tab2
----
210
3403
954

query I rowsort
SELECT col1 - 35 * col0 * 4 FROM tab1
----
-11187
-394
-8950

onlyif mysql # use DIV operator for integer division
query I rowsort label-3914
SELECT ALL 69 DIV col1 + + col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-3914
SELECT ALL 69 / col1 + + col1 FROM tab0
----
86
91
97

query I rowsort
SELECT ALL 85 + - col1 FROM tab2 AS cor0
----
26
54
68

query I rowsort
SELECT ALL - col1 * - col1 + cor0.col0 AS col1 FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT ALL 93 FROM tab0
----
93
93
93

query I rowsort
SELECT DISTINCT + + col2 * + col2 - + col0 * + col0 FROM tab1 cor0
----
-847
2816
2907

query I rowsort
SELECT DISTINCT + tab0.col2 + - 81 * - tab0.col0 * + ( + 45 ) FROM tab0
----
127576
324487
87513

query I rowsort
SELECT DISTINCT - ( col2 ) + + col1 AS col0 FROM tab2
----
-21
33
4

query I rowsort
SELECT DISTINCT + col1 + col1 FROM tab0
----
172
182
194

query I rowsort
SELECT + tab2.col2 * tab2.col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT col0 * - 23 + + col0 * col2 FROM tab1
----
2176
5840
93

query I rowsort
SELECT - col2 + col0 AS col1 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT - col2 * + cor0.col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - 54 AS col1 FROM tab1 AS cor0
----
-54

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3927
SELECT + 48 + col1 * - CAST( NULL AS DECIMAL ) * col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3927
SELECT + 48 + col1 * - CAST ( NULL AS REAL ) * col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 * - col1 + ( - cor0.col2 ) col1 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT ALL + col1 * ( col1 ) * col0 + + 5 + - col2 AS col2 FROM tab1
----
13429
1979
6348

query I rowsort
SELECT 29 + tab2.col1 * col2 + + col2 FROM tab2
----
1589
713
893

query I rowsort
SELECT DISTINCT - col1 + + col1 + - col1 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT 51 * + col2 FROM tab1
----
2754
2907
4896

query I rowsort
SELECT ALL + 24 AS col0 FROM tab1
----
24
24
24

query I rowsort
SELECT ALL + cor0.col1 - tab2.col2 AS col1 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 9ab3c14b8f82aa41e5170ac3662aec0f

query I rowsort
SELECT ALL col1 + cor0.col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT col1 + + col2 AS col2 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT + - cor0.col2 + col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ALL 14 AS col1 FROM tab2
----
14
14
14

query I rowsort
SELECT ALL + ( + col2 + 89 ) AS col1 FROM tab1
----
143
146
185

onlyif mysql # use DIV operator for integer division
query I rowsort label-3940
SELECT ALL + cor0.col0 * col1 DIV 84 + + cor0.col0 * cor0.col2 AS col0 FROM tab1 AS cor0
----
162
3655
7692

skipif mysql # not compatible
query I rowsort label-3940
SELECT ALL + cor0.col0 * col1 / 84 + + cor0.col0 * cor0.col2 AS col0 FROM tab1 AS cor0
----
162
3655
7692

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3941
SELECT ALL - col1 + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3941
SELECT ALL - col1 + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col0 * 10 * col1 AS col2 FROM tab0
----
20640
33950
80990

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1, tab0 AS cor0, tab2 AS cor1
----
972 values hashing to 9600bdf5bac0caec3229e87170cc40b3

query I rowsort
SELECT col2 * col1 + + col0 * tab0.col0 AS col1 FROM tab0
----
1322
15383
3414

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col0 * 15 col0 FROM tab2
----
-105
-1170
-1185

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3946
SELECT - col1 - col1 * col2 * - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3946
SELECT - col1 - col1 * col2 * - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + col1 * ( + col0 ) + + ( + col1 ) * col1 AS col2 FROM tab1 AS cor0
----
1209
740
754

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + + col0 - - col0 col0 FROM tab2 AS cor0
----
21
234
237

query I rowsort
SELECT DISTINCT - + 37 + col2 AS col0 FROM tab0 AS cor0
----
-36
-4
45

query I rowsort
SELECT + 22 + col2 FROM tab2 AS cor0
----
48
49
60

query I rowsort
SELECT ALL + 68 + col1 * - cor0.col1 FROM tab0 AS cor0
----
-7328
-8213
-9341

query I rowsort
SELECT - - 16 + - col1 FROM tab1 cor0
----
-10
3
6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3953
SELECT DISTINCT + CAST( + col2 AS SIGNED ) FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-3953
SELECT DISTINCT + CAST ( + col2 AS INTEGER ) FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL + 71 * cor0.col2 FROM tab2 AS cor0
----
1846
1917
2698

query I rowsort
SELECT - - col0 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT 74 FROM tab1, tab2 AS cor0
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

onlyif mysql # use DIV operator for integer division
query I rowsort label-3957
SELECT + col0 DIV - 72 AS col1 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3957
SELECT + col0 / - 72 AS col1 FROM tab0 AS cor0
----
-1
0
0

query I rowsort
SELECT ALL + + ( - col1 ) + col2 * + ( - cor0.col2 ) FROM tab1 cor0
----
-2942
-3259
-9229

query I rowsort
SELECT + 84 * col0 AS col2 FROM tab1 AS cor0
----
252
5376
6720

onlyif mysql # use DIV operator for integer division
query I rowsort label-3960
SELECT 17 DIV col1 AS col2 FROM tab2 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3960
SELECT 17 / col1 AS col2 FROM tab2 AS cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3961
SELECT ALL 18 DIV + col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3961
SELECT ALL 18 / + col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT cor0.col0 * 54 FROM tab1 AS cor0
----
162
3456
4320

query I rowsort
SELECT DISTINCT 71 FROM tab0 AS cor0
----
71

query I rowsort
SELECT ALL + col1 * + col1 * + col2 FROM tab0 AS cor0
----
244068
679042
9409

query I rowsort
SELECT DISTINCT - col1 + 21 AS col1 FROM tab1 cor0
----
-5
11
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-3966
SELECT + 3 DIV col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3966
SELECT + 3 / col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + ( col0 ) AS col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - 39 FROM tab0 cor0
----
-39
-39
-39

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3969
SELECT + - CAST( 53 AS SIGNED ) FROM tab2 AS cor0
----
-53
-53
-53

skipif mysql # not compatible
query I rowsort label-3969
SELECT + - CAST ( 53 AS INTEGER ) FROM tab2 AS cor0
----
-53
-53
-53

query I rowsort
SELECT DISTINCT 39 + - col2 * - col1 FROM tab0 AS cor0
----
136
2877
7501

query I rowsort
SELECT ALL ( + col1 ) FROM tab2
----
17
31
59

query I rowsort
SELECT DISTINCT col1 * + col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT ( + col2 ) AS col2 FROM tab2
----
26
27
38

query I rowsort
SELECT - col2 * col0 * 77 FROM tab1
----
-12474
-280896
-591360

onlyif mysql # use DIV operator for integer division
query I rowsort label-3975
SELECT - col2 + ( - col0 ) DIV col0 FROM tab0 AS cor0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-3975
SELECT - col2 + ( - col0 ) / col0 FROM tab0 AS cor0
----
-2
-34
-83

query I rowsort
SELECT ALL - 86 AS col2 FROM tab2
----
-86
-86
-86

query I rowsort
SELECT ALL + 69 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 2810c3097fe4771e273cfff903357b40

query I rowsort
SELECT 58 * - tab2.col1 FROM tab2
----
-1798
-3422
-986

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * col1 + 23 col0 FROM tab0 AS cor0
----
-7373
-8258
-9386

query I rowsort
SELECT ALL - cor0.col0 + + col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT 99 * - col0 AS col2 FROM tab0
----
-2376
-3465
-8811

query I rowsort
SELECT DISTINCT tab0.col1 * col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - ( + col0 ) * - 58 FROM tab1
----
174
3712
4640

query I rowsort
SELECT - col0 * col0 * col0 FROM tab2
----
-343
-474552
-493039

query I rowsort
SELECT + col1 * col2 AS col2 FROM tab0 AS cor0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 col2 FROM tab0 AS cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-3987
SELECT ALL col0 DIV + col1 AS col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3987
SELECT ALL col0 / + col1 AS col0 FROM tab0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3988
SELECT col1 / CAST( NULL AS SIGNED ) col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3988
SELECT col1 / CAST ( NULL AS INTEGER ) col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * + 23 AS col2 FROM tab0 AS cor0
----
-1978
-2093
-2231

query I rowsort
SELECT + col0 * col2 AS col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT 0 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT + + col1 + cor0.col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL - 18 AS col2 FROM tab1 AS cor0
----
-18
-18
-18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 98 col0 FROM tab0
----
98

query I rowsort
SELECT DISTINCT ( col2 + col0 ) FROM tab0
----
171
36
57

query I rowsort
SELECT - ( - col1 ) AS col0 FROM tab2 AS cor0
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-3997
SELECT + col2 DIV - col1 + cor0.col1 * + ( col2 ) AS col2 FROM tab2 AS cor0
----
1534
644
837

skipif mysql # not compatible
query I rowsort label-3997
SELECT + col2 / - col1 + cor0.col1 * + ( col2 ) AS col2 FROM tab2 AS cor0
----
1534
644
837

query I rowsort
SELECT - col1 * 68 AS col0 FROM tab2 AS cor0
----
-1156
-2108
-4012

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + 87 col0 FROM tab2 AS cor0
----
8
80
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4000
SELECT + CAST( NULL AS SIGNED ) * + cor0.col2 + + col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4000
SELECT + CAST ( NULL AS INTEGER ) * + cor0.col2 + + col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 98 - col0 * - col1 * + col2 FROM tab1 AS cor0
----
36382
4114
99742

query I rowsort
SELECT DISTINCT col1 * - col2 + + col2 + col1 FROM tab0 AS cor0
----
-2719
-7289
1

query I rowsort
SELECT DISTINCT - ( ( - cor0.col2 ) ) + + 62 FROM tab0 AS cor0
----
144
63
95

query I rowsort
SELECT ALL 84 + col0 FROM tab1 AS cor0
----
148
164
87

query I rowsort
SELECT - col2 + + ( + col2 ) AS col2 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * - col1 col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL - 49 + col2 AS col0 FROM tab2 AS cor0
----
-11
-22
-23

query I rowsort
SELECT + col2 + col0 FROM tab1 cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-4009
SELECT + + col2 + + col0 DIV cor0.col1 + col1 AS col2 FROM tab2 cor0
----
58
59
86

skipif mysql # not compatible
query I rowsort label-4009
SELECT + + col2 + + col0 / cor0.col1 + col1 AS col2 FROM tab2 cor0
----
58
59
86

query I rowsort
SELECT cor0.col2 FROM tab1, tab0 cor0, tab2 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT col0 * - col1 + + 20 AS col0 FROM tab2 AS cor0
----
-1323
-197
-4582

query I rowsort
SELECT + 46 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 2f97924b57b73102233df7c9ce8ad602

query I rowsort
SELECT col0 * col2 + 61 + - cor0.col2 AS col0 FROM tab2 AS cor0
----
2063
223
3025

onlyif mysql # use DIV operator for integer division
query I rowsort label-4014
SELECT - col1 DIV - col2 + col0 FROM tab1 cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-4014
SELECT - col1 / - col2 + col0 FROM tab1 cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 38 col2 FROM tab0 AS cor0
----
-38
-38
-38

query I rowsort
SELECT - + 71 + cor0.col2 * - 53 AS col0 FROM tab1 cor0
----
-2933
-3092
-5159

query I rowsort
SELECT + 93 * + col1 + - 38 * ( col2 * - col2 ) AS col2 FROM tab2 AS cor0
----
30585
31175
56453

onlyif mysql # use DIV operator for integer division
query I rowsort label-4018
SELECT DISTINCT col0 DIV - col1 + + col2 FROM tab1 AS cor0
----
51
54
90

skipif mysql # not compatible
query I rowsort label-4018
SELECT DISTINCT col0 / - col1 + + col2 FROM tab1 AS cor0
----
51
54
90

query I rowsort
SELECT ALL + - cor0.col2 + col1 - - ( + cor0.col0 ) * col2 FROM tab1 AS cor0
----
134
3601
7597

query I rowsort
SELECT col2 + + cor0.col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL + 39 * - col2 FROM tab2 AS cor0
----
-1014
-1053
-1482

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT ALL + 61 * cor0.col0 + - 74 FROM tab0 AS cor0
----
1390
2061
5355

onlyif mysql # use DIV operator for integer division
query I rowsort label-4024
SELECT col1 DIV - col2 AS col0 FROM tab0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-4024
SELECT col1 / - col2 AS col0 FROM tab0
----
-1
-2
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * + col0 col1 FROM tab1 cor0
----
-1040
-640
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4026
SELECT + - 59 * - cor0.col0 + CAST( 45 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
458
4647
4706

skipif mysql # not compatible
query I rowsort label-4026
SELECT + - 59 * - cor0.col0 + CAST ( 45 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
458
4647
4706

query I rowsort
SELECT - + cor0.col2 + col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - 97 - cor0.col0 AS col2 FROM tab1 AS cor0
----
-100
-161
-177

query I rowsort
SELECT DISTINCT + col0 * col1 + - col2 * + col0 - - col2 AS col0 FROM tab0 AS cor0
----
1305
3361
883

query I rowsort
SELECT ALL - col1 + col0 * col0 FROM tab1 AS cor0
----
-17
4086
6387

query I rowsort
SELECT + 84 AS col2 FROM tab1
----
84
84
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-4032
SELECT ALL - col2 DIV col0 - ( + col0 * col0 ) FROM tab1 AS cor0
----
-27
-4096
-6401

skipif mysql # not compatible
query I rowsort label-4032
SELECT ALL - col2 / col0 - ( + col0 * col0 ) FROM tab1 AS cor0
----
-27
-4096
-6401

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0, tab1 AS cor1, tab2, tab1 AS cor2
----
3645 values hashing to 91c4f11552b395e0eb390f09eebaec3d

query I rowsort
SELECT ALL + col0 + + ( col2 ) * col0 FROM tab2 AS cor0
----
196
2106
3081

onlyif mysql # use DIV operator for integer division
query I rowsort label-4035
SELECT ALL + - col1 + + ( + col2 + col2 ) DIV col2 AS col0 FROM tab0 AS cor0
----
-84
-89
-95

skipif mysql # not compatible
query I rowsort label-4035
SELECT ALL + - col1 + + ( + col2 + col2 ) / col2 AS col0 FROM tab0 AS cor0
----
-84
-89
-95

query I rowsort
SELECT ALL 39 FROM tab0
----
39
39
39

query I rowsort
SELECT ALL + tab2.col2 + - col0 FROM tab2
----
-41
-52
20

query I rowsort
SELECT ALL ( col1 * + col1 ) FROM tab0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT + 92 FROM tab2, tab2 AS cor0
----
92

query I rowsort
SELECT 95 * 72 FROM tab1 AS cor0
----
6840
6840
6840

query I rowsort
SELECT DISTINCT - - ( cor0.col0 ) * col1 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4042
SELECT + CAST( + col1 AS SIGNED ) + cor0.col2 AS col2 FROM tab1 AS cor0
----
109
67
80

skipif mysql # not compatible
query I rowsort label-4042
SELECT + CAST ( + col1 AS INTEGER ) + cor0.col2 AS col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT - + col1 + - col2 AS col0 FROM tab2 AS cor0
----
-55
-58
-85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * - ( col2 * - col1 ) col2 FROM tab0 cor0
----
244068
679042
9409

query I rowsort
SELECT - 16 + - 99 FROM tab0, tab0 AS cor0
----
9 values hashing to 3565cde0e9e7c7a2aebe3ad80a374839

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT ALL - 99 FROM tab2, tab0 cor0
----
9 values hashing to 64d06513850a26495bc6c2fddeb254b7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col1 * 80 * + 13 col0 FROM tab0
----
-100880
-89440
-94640

query I rowsort
SELECT DISTINCT ( ( cor0.col0 ) + + 17 ) AS col2 FROM tab2, tab0, tab2 AS cor0
----
24
95
96

query I rowsort
SELECT + 96 + 10 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to a64ba54e418231a2dbc2879c8d9fbfb0

query I rowsort
SELECT - col0 * - tab1.col0 FROM tab1
----
4096
6400
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * 5 col2 FROM tab1
----
270
285
480

query I rowsort
SELECT ALL + 34 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 1146d159f0b9b4378a8b738b963f7039

query I rowsort
SELECT col2 * + col1 AS col0 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT ALL col0 * ( col1 ) AS col1 FROM tab0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4056
SELECT ( - col2 * col1 ) + + CAST( - 1 AS SIGNED ) AS col0 FROM tab1
----
-1249
-1405
-571

skipif mysql # not compatible
query I rowsort label-4056
SELECT ( - col2 * col1 ) + + CAST ( - 1 AS INTEGER ) AS col0 FROM tab1
----
-1249
-1405
-571

query I rowsort
SELECT ALL 0 FROM tab1, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4058
SELECT DISTINCT col0 + CAST( + col2 AS SIGNED ) FROM tab1 AS cor0
----
121
176
57

skipif mysql # not compatible
query I rowsort label-4058
SELECT DISTINCT col0 + CAST ( + col2 AS INTEGER ) FROM tab1 AS cor0
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 col1 FROM tab1 AS cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4060
SELECT col0 * col2 - col2 DIV - cor0.col1 AS col1 FROM tab0 AS cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-4060
SELECT col0 * col2 - col2 / - cor0.col1 AS col1 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4061
SELECT ALL - col2 * CAST( NULL AS SIGNED ) * col1 + col0 * 97 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4061
SELECT ALL - col2 * CAST ( NULL AS INTEGER ) * col1 + col0 * 97 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 + 40 AS col0 FROM tab2 AS cor0
----
66
67
78

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0, tab0, tab1 cor1
----
972 values hashing to 2d99dda76af061a3fac120e0e49e6c53

query I rowsort
SELECT + col0 + 88 AS col2 FROM tab0 cor0
----
112
123
177

onlyif mysql # use DIV operator for integer division
query I rowsort label-4065
SELECT - - col1 + + 68 DIV col0 + col1 FROM tab0 AS cor0
----
174
182
195

skipif mysql # not compatible
query I rowsort label-4065
SELECT - - col1 + + 68 / col0 + col1 FROM tab0 AS cor0
----
174
182
195

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4066
SELECT ALL CAST( NULL AS SIGNED ) * 51 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4066
SELECT ALL CAST ( NULL AS INTEGER ) * 51 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4067
SELECT DISTINCT - 66 DIV + col1 AS col2 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4067
SELECT DISTINCT - 66 / + col1 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL - col1 * + 48 FROM tab0 AS cor0
----
-4128
-4368
-4656

query I rowsort
SELECT DISTINCT + cor0.col2 * + ( col0 ) AS col1 FROM tab1 AS cor0
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 19 ) + - col2 * col1 col2 FROM tab2 AS cor0
----
-1553
-665
-856

query I rowsort
SELECT + cor0.col1 + - col0 + col2 FROM tab0 cor0
----
63
84
95

query I rowsort
SELECT 60 + - cor0.col0 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 601300951e4808c5574196591d042938

query I rowsort
SELECT + col0 * + cor0.col1 + col2 AS col0 FROM tab0 cor0
----
2097
3396
8181

query I rowsort
SELECT ALL + ( ( col2 ) ) * - cor0.col2 AS col1 FROM tab2 AS cor0
----
-1444
-676
-729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 + 59 col0 FROM tab2 cor0
----
85
86
97

query I rowsort
SELECT col1 * col1 AS col1 FROM tab2 AS cor0
----
289
3481
961

query IIIIIIIII rowsort
SELECT ALL * FROM tab1 cor0 CROSS JOIN tab1, tab0 AS cor1
----
243 values hashing to 3a953203ced079e372111d61dbd9e35f

query I rowsort
SELECT - 26 * col2 + + col2 * - cor0.col2 * - col0 + col0 AS col0 FROM tab2 AS cor0
----
113167
4408
52130

query I rowsort
SELECT DISTINCT - col1 * - col2 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0, tab1 AS cor1, tab1, tab1 cor2
----
3645 values hashing to 0a3bf4d9642f43f11aad64de0d046e6b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4081
SELECT ALL + col0 * ( - col2 ) + + CAST( col0 AS SIGNED ) FROM tab2 AS cor0
----
-182
-1950
-2923

skipif mysql # not compatible
query I rowsort label-4081
SELECT ALL + col0 * ( - col2 ) + + CAST ( col0 AS INTEGER ) FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT ALL col0 * - col2 + cor0.col0 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT + col0 * cor0.col2 + col1 * 71 FROM tab0 AS cor0
----
13759
6898
6922

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + tab2.col0 ) col1 FROM tab2
----
7
78
79

query I rowsort
SELECT ALL + ( col2 ) + ( + ( + col1 ) * - cor0.col2 + - col0 ) AS col2 FROM tab1 AS cor0
----
-1232
-1353
-577

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 93 col0 FROM tab2 AS cor0
----
-93
-93
-93

query I rowsort
SELECT DISTINCT + - col0 AS col1 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT - col0 + - col1 AS col2 FROM tab2 cor0
----
-137
-38
-96

query I rowsort
SELECT ALL col0 * + col2 + - 62 FROM tab1 cor0
----
100
3586
7618

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4090
SELECT ALL col2 + + col0 - ( - col0 * + col1 + CAST( col1 AS SIGNED ) ) AS col2 FROM tab2 AS cor0
----
1443
220
4647

skipif mysql # not compatible
query I rowsort label-4090
SELECT ALL col2 + + col0 - ( - col0 * + col1 + CAST ( col1 AS INTEGER ) ) AS col2 FROM tab2 AS cor0
----
1443
220
4647

query I rowsort
SELECT + cor0.col1 + + col1 * + col1 * col2 FROM tab2 AS cor0
----
10999
25978
90565

query I rowsort
SELECT cor0.col2 * - cor0.col2 * - 70 AS col1 FROM tab2 AS cor0
----
101080
47320
51030

query I rowsort
SELECT ALL + col1 AS col2 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT DISTINCT + - col1 + col1 AS col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL - + col2 * 66 FROM tab1 AS cor0
----
-3564
-3762
-6336

query I rowsort
SELECT ALL + col1 * + col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL + col1 + - 36 * col2 AS col2 FROM tab0 AS cor0
----
-1102
-2861
61

query I rowsort
SELECT + col1 + 27 FROM tab2 AS cor0
----
44
58
86

query I rowsort
SELECT DISTINCT - cor0.col1 + 64 FROM tab0 AS cor0
----
-22
-27
-33

query I rowsort
SELECT DISTINCT col2 + col0 AS col2 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT DISTINCT - col2 + 84 FROM tab2 AS cor0
----
46
57
58

query I rowsort
SELECT - col2 * 85 + 62 * - col0 AS col2 FROM tab1 AS cor0
----
-13120
-4776
-8813

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4103
SELECT + + col1 * - CAST( NULL AS SIGNED ) - - col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4103
SELECT + + col1 * - CAST ( NULL AS INTEGER ) - - col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col2 * 92 AS col2 FROM tab0 AS cor0
----
3036
7544
92

query I rowsort
SELECT DISTINCT - col0 + ( col0 ) * col1 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT DISTINCT + col2 * - 26 FROM tab2 AS cor0
----
-676
-702
-988

query I rowsort
SELECT + col2 * col0 - col2 AS col0 FROM tab1 AS cor0
----
108
3591
7584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 14 col2 FROM tab2
----
-14
-14
-14

query I rowsort
SELECT + col1 + - col2 FROM tab1
----
-28
-47
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - col1 col1 FROM tab2
----
-33
-4
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-4111
SELECT DISTINCT - col1 DIV + 92 AS col2 FROM tab2 cor0
----
0

skipif mysql # not compatible
query I rowsort label-4111
SELECT DISTINCT - col1 / + 92 AS col2 FROM tab2 cor0
----
0

query I rowsort
SELECT DISTINCT col0 - col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL col2 * - 0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col2 * cor0.col2 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT - col2 + + col1 AS col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT ALL - - col0 * col0 AS col2 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT + col2 * - col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT - 52 AS col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to e8a5cb10c0973a78554f344d4f6e7e74

query I rowsort
SELECT DISTINCT 19 AS col2 FROM tab0, tab2 AS cor0
----
19

query I rowsort
SELECT - 27 AS col0 FROM tab2, tab0 cor0, tab0 cor1
----
27 values hashing to 0259a67676b131a4843853be4811b775

query I rowsort
SELECT - col0 * 61 AS col0 FROM tab0 AS cor0
----
-1464
-2135
-5429

query I rowsort
SELECT - col2 * - 75 AS col1 FROM tab2 AS cor0
----
1950
2025
2850

query I rowsort
SELECT - + col0 - col1 AS col2 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT DISTINCT + col2 + 12 AS col0 FROM tab0
----
13
45
94

query I rowsort
SELECT DISTINCT + col0 + - ( + col2 ) FROM tab1
----
-16
-51
7

query I rowsort
SELECT DISTINCT cor0.col1 * 63 FROM tab1, tab0 AS cor0
----
5418
5733
6111

query I rowsort
SELECT + col1 * + 97 AS col2 FROM tab1
----
1261
2522
970

query I rowsort
SELECT + col2 * - 54 + col0 * - col1 AS col2 FROM tab2
----
-1675
-3395
-6006

onlyif mysql # use DIV operator for integer division
query I rowsort label-4129
SELECT - + col1 DIV - cor0.col1 + col2 * - col1 FROM tab0 AS cor0
----
-2837
-7461
-96

skipif mysql # not compatible
query I rowsort label-4129
SELECT - + col1 / - cor0.col1 + col2 * - col1 FROM tab0 AS cor0
----
-2837
-7461
-96

query I rowsort
SELECT tab2.col1 + + tab2.col1 AS col2 FROM tab2
----
118
34
62

query I rowsort
SELECT - ( 34 ) - - col0 AS col0 FROM tab0
----
-10
1
55

query I rowsort
SELECT ALL - col1 * + col2 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT + ( + col1 ) * 27 + + 40 * + col0 + ( - col1 ) AS col1 FROM tab0 AS cor0
----
3196
3922
5926

query I rowsort
SELECT + - col2 * + col2 * - 48 FROM tab1 AS cor0
----
139968
155952
442368

query I rowsort
SELECT ALL + - 5 + col0 FROM tab0 AS cor0
----
19
30
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col1 col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

onlyif mysql # use DIV operator for integer division
query I rowsort label-4137
SELECT DISTINCT col2 + col2 DIV + col0 AS col0 FROM tab1
----
57
72
97

skipif mysql # not compatible
query I rowsort label-4137
SELECT DISTINCT col2 + col2 / + col0 AS col0 FROM tab1
----
57
72
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 48 col0 FROM tab1, tab2 cor0
----
-48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col0 ) * ( - col2 + tab1.col1 ) col2 FROM tab1
----
-3008
-6640
-84

query I rowsort
SELECT DISTINCT col1 * col1 AS col0 FROM tab0
----
7396
8281
9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4141
SELECT + + CAST( NULL AS SIGNED ) FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4141
SELECT + + CAST ( NULL AS INTEGER ) FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - cor0.col0 + + col1 * 6 AS col0 FROM tab2 AS cor0
----
179
23
276

onlyif mysql # use DIV operator for integer division
query I rowsort label-4143
SELECT ALL - 9 DIV + cor0.col0 FROM tab2 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4143
SELECT ALL - 9 / + cor0.col0 FROM tab2 AS cor0
----
-1
0
0

query I rowsort
SELECT ALL + 66 AS col1 FROM tab1 cor0
----
66
66
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-4145
SELECT - col0 DIV col0 AS col1 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4145
SELECT - col0 / col0 AS col1 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + - cor0.col0 * col0 AS col2 FROM tab0 cor0
----
-1225
-576
-7921

query I rowsort
SELECT col1 + + col2 * + col0 AS col0 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT ALL + col1 * - col0 + - cor0.col1 AS col2 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT - 38 FROM tab2 AS cor0
----
-38
-38
-38

query I rowsort
SELECT DISTINCT + col2 * col1 AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL + 7 * - col2 FROM tab2 cor0
----
-182
-189
-266

query I rowsort
SELECT cor0.col1 * + cor0.col2 FROM tab2, tab2 AS cor0
----
9 values hashing to f5605ce6cbd6ecc79a4a887488bb6947

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab2, tab2 AS cor0
----
-7
-78
-79

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab1 AS cor2
----
972 values hashing to 92235dbc382d83baa93d6546ed489b0c

query IIIIIIIII rowsort
SELECT * FROM tab2 cor0 CROSS JOIN tab1, tab0 AS cor1
----
243 values hashing to 2ba47a833971d4c4b0287e849fb0cfb8

query I rowsort
SELECT DISTINCT - cor1.col0 AS col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
-3
-64
-80

query I rowsort
SELECT col1 * col1 * col0 + ( col1 * cor0.col2 + + col2 ) FROM tab2 AS cor0
----
23515
273078
7591

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 CROSS JOIN tab2, tab0 AS cor1
----
243 values hashing to 566180e0144350a78b0ef3318e8f4c00

onlyif mysql # use DIV operator for integer division
query I rowsort label-4159
SELECT ALL - col2 * - col2 + 14 DIV - col0 AS col2 FROM tab0 AS cor0
----
1
1089
6724

skipif mysql # not compatible
query I rowsort label-4159
SELECT ALL - col2 * - col2 + 14 / - col0 AS col2 FROM tab0 AS cor0
----
1
1089
6724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4160
SELECT DISTINCT - ( col1 ) * CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4160
SELECT DISTINCT - ( col1 ) * CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT col2 * - col2 AS col1 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT + cor0.col0 + - cor0.col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 318a6997409c5decbbc3333c9d493ad3

query I rowsort
SELECT + cor0.col1 FROM tab1, tab2 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( col2 AS REAL ) FROM tab1
----
54
57
96

query I rowsort
SELECT DISTINCT + tab1.col0 + col2 FROM tab1
----
121
176
57

query I rowsort
SELECT + col1 * 37 AS col0 FROM tab0 AS cor0
----
3182
3367
3589

query I rowsort
SELECT col2 * - col0 + col1 * 92 AS col1 FROM tab1 AS cor0
----
-2728
-6484
2230

query I rowsort
SELECT col2 * + col1 AS col2 FROM tab1
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT - CAST ( col0 AS REAL ) col0 FROM tab2
----
-7
-78
-79

query I rowsort
SELECT - col0 * col1 AS col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT 60 * col0 AS col1 FROM tab2
----
420
4680
4740

query I rowsort
SELECT ALL 40 + col1 AS col2 FROM tab2
----
57
71
99

query I rowsort
SELECT DISTINCT - 5 + col0 FROM tab2
----
2
73
74

query I rowsort
SELECT - 64 FROM tab1
----
-64
-64
-64

query I rowsort
SELECT + col0 * - col1 + ( col1 ) FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT - col0 - - 16 AS col2 FROM tab1 AS cor0
----
-48
-64
13

query I rowsort
SELECT DISTINCT 80 * col2 FROM tab2
----
2080
2160
3040

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2, tab0 AS cor0, tab1
----
972 values hashing to 82e15d5967b272804e574774895a0222

onlyif mysql # use DIV operator for integer division
query I rowsort label-4179
SELECT ALL + 44 DIV tab1.col0 FROM tab1
----
0
0
14

skipif mysql # not compatible
query I rowsort label-4179
SELECT ALL + 44 / tab1.col0 FROM tab1
----
0
0
14

query I rowsort
SELECT DISTINCT 1 FROM tab2
----
1

query I rowsort
SELECT - 70 AS col1 FROM tab2, tab2 cor0
----
9 values hashing to 35707a5d99c98b2657c084a50ff1b073

query I rowsort
SELECT - col0 * col2 - - col1 FROM tab2 cor0
----
-158
-1969
-2985

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4183
SELECT col1 * CAST( NULL AS SIGNED ) + - 77 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4183
SELECT col1 * CAST ( NULL AS INTEGER ) + - 77 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col1 + cor0.col1 FROM tab2 cor0
----
118
34
62

query I rowsort
SELECT - col0 + cor0.col1 AS col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT - col2 - - col2 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT ALL col1 * - col2 - col2 AS col0 FROM tab0
----
-2871
-7544
-98

query I rowsort
SELECT ALL col0 * - 5 FROM tab2
----
-35
-390
-395

query I rowsort
SELECT - col2 * + col2 - + col0 AS col0 FROM tab2
----
-1523
-736
-754

query I rowsort
SELECT DISTINCT - col1 * - col2 * 90 AS col2 FROM tab2
----
138060
58140
75330

query I rowsort
SELECT - col1 * 15 + col2 AS col1 FROM tab1 AS cor0
----
-336
-93
-99

query I rowsort
SELECT + col1 * + 49 + + col0 * - ( cor0.col0 ) FROM tab0 cor0
----
-3462
3528
3638

query I rowsort
SELECT - ( col0 ) * + col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL + ( 35 ) AS col0 FROM tab0 AS cor0
----
35
35
35

query I rowsort
SELECT + 83 + col0 FROM tab1 AS cor0
----
147
163
86

query I rowsort
SELECT DISTINCT + col2 * - cor0.col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT + + ( - col1 ) + col1 AS col1 FROM tab2 AS cor0
----
0

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0, tab2, tab1 AS cor1
----
972 values hashing to 4634d10e8b6b37510bb99745aade36ab

query I rowsort
SELECT ALL 63 + col1 * col2 FROM tab2
----
1597
709
900

onlyif mysql # use DIV operator for integer division
query I rowsort label-4200
SELECT - + col1 DIV - col1 AS col0 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4200
SELECT - + col1 / - col1 AS col0 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT ALL - 50 FROM tab2 AS cor0
----
-50
-50
-50

query I rowsort
SELECT - - col1 + - col1 - - col0 * + col1 FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-4203
SELECT DISTINCT - col0 DIV + col0 FROM tab0 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-4203
SELECT DISTINCT - col0 / + col0 FROM tab0 AS cor0
----
-1

query I rowsort
SELECT DISTINCT 83 FROM tab1 cor0
----
83

query I rowsort
SELECT col1 * col2 + col2 FROM tab2 cor0
----
1560
684
864

query I rowsort
SELECT ALL - - ( - 86 ) AS col2 FROM tab1 AS cor0
----
-86
-86
-86

query I rowsort
SELECT ALL - + 68 AS col1 FROM tab1 AS cor0
----
-68
-68
-68

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4208
SELECT CAST( NULL AS SIGNED ) * col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4208
SELECT CAST ( NULL AS INTEGER ) * col2 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 63 * + 56 AS col0 FROM tab1 cor0
----
3528

query I rowsort
SELECT DISTINCT - 43 AS col1 FROM tab0 AS cor0
----
-43

query I rowsort
SELECT ALL - ( ( - col0 ) ) AS col2 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - - 15 * col2 AS col2 FROM tab1 AS cor0
----
1440
810
855

query I rowsort
SELECT ALL - + 72 * cor0.col0 AS col0 FROM tab0 AS cor0
----
-1728
-2520
-6408

onlyif mysql # use DIV operator for integer division
query I rowsort label-4214
SELECT + col0 DIV + col0 - - col0 col1 FROM tab2 cor0
----
79
8
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4214
SELECT + col0 / + col0 - - col0 col1 FROM tab2 cor0
----
79
8
80

query I rowsort
SELECT ALL + - cor0.col1 FROM tab1 AS cor0
----
-10
-13
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-4216
SELECT - col1 + col1 DIV col2 AS col2 FROM tab0 AS cor0
----
-84
-90
0

skipif mysql # not compatible
query I rowsort label-4216
SELECT - col1 + col1 / col2 AS col2 FROM tab0 AS cor0
----
-84
-90
0

query I rowsort
SELECT DISTINCT - 69 * 85 AS col2 FROM tab1 cor0
----
-5865

onlyif mysql # use DIV operator for integer division
query I rowsort label-4218
SELECT + 48 DIV - col0 AS col2 FROM tab2 AS cor0
----
-6
0
0

skipif mysql # not compatible
query I rowsort label-4218
SELECT + 48 / - col0 AS col2 FROM tab2 AS cor0
----
-6
0
0

query I rowsort
SELECT ( col2 ) * - ( 39 ) * col0 AS col1 FROM tab0 AS cor0
----
-1365
-284622
-30888

query I rowsort
SELECT ALL - 86 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 9ac806793c03d3a6b5e3a3029d20e4da

query I rowsort
SELECT 79 FROM tab2 AS cor0
----
79
79
79

query I rowsort
SELECT ALL + + col1 * - col1 FROM tab0 cor0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL col1 - col1 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col0 + + col0 AS col2 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT + cor0.col2 + col1 * ( - col2 ) AS col2 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT ALL - - col2 + cor0.col2 FROM tab0 AS cor0
----
164
2
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4227
SELECT - col1 * CAST( + col1 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-7396
-8281
-9409

skipif mysql # not compatible
query I rowsort label-4227
SELECT - col1 * CAST ( + col1 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-7396
-8281
-9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4228
SELECT - col0 + CAST( NULL AS SIGNED ) * + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4228
SELECT - col0 + CAST ( NULL AS INTEGER ) * + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4229
SELECT DISTINCT - 21 DIV 77 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
0

skipif mysql # not compatible
query I rowsort label-4229
SELECT DISTINCT - 21 / 77 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + col0 col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL col0 * col2 + + col1 AS col2 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT DISTINCT + 69 - + col1 FROM tab2 AS cor0
----
10
38
52

query I rowsort
SELECT DISTINCT + col1 + + col0 * 35 * col0 FROM tab2 cor0
----
1746
212999
218452

query I rowsort
SELECT - 41 AS col2 FROM tab1 AS cor0
----
-41
-41
-41

query I rowsort
SELECT DISTINCT 42 AS col2 FROM tab1 AS cor0
----
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 79 * - col2 * ( col2 ) - - cor0.col2 * col1 * cor0.col0 col2 FROM tab0 AS cor0
----
1195314
154143
3474

query I rowsort
SELECT ALL col0 * col1 AS col0 FROM tab2 AS cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * col2 col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT col0 * col0 * 33 FROM tab1 AS cor0
----
135168
211200
297

query I rowsort
SELECT + cor0.col1 - col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - - cor0.col2 + col1 * + col0 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT + ( col0 ) + 56 * 59 AS col1 FROM tab1 cor0
----
3307
3368
3384

query I rowsort
SELECT ALL - col2 * + col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT ALL 47 AS col1 FROM tab1
----
47
47
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 35 col0 FROM tab2
----
35
35
35

query I rowsort
SELECT ALL ( - col1 ) AS col2 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT DISTINCT + ( - col2 ) * col1 + + 60 FROM tab2
----
-1474
-586
-777

query I rowsort
SELECT - + col1 AS col0 FROM tab2 cor0
----
-17
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 2 + col0 col0 FROM tab1 AS cor0
----
5
66
82

query I rowsort
SELECT ALL - - col2 - + col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT col1 + col2 * 12 * + cor0.col0 FROM tab1 AS cor0
----
1970
43786
92173

query I rowsort
SELECT DISTINCT 6 + col0 * - col0 * col2 FROM tab2 AS cor0
----
-1317
-158178
-237152

query I rowsort
SELECT - + 97 AS col0 FROM tab2 AS cor0
----
-97
-97
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4254
SELECT ALL + col2 - col2 DIV - col0 AS col1 FROM tab1 cor0
----
57
72
97

skipif mysql # not compatible
query I rowsort label-4254
SELECT ALL + col2 - col2 / - col0 AS col1 FROM tab1 cor0
----
57
72
97

query I rowsort
SELECT ALL - col1 + - col2 * + col0 * + col2 FROM tab0 AS cor0
----
-132
-26222
-598527

onlyif mysql # use DIV operator for integer division
query I rowsort label-4256
SELECT ALL - col2 + col2 DIV 80 FROM tab2
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-4256
SELECT ALL - col2 + col2 / 80 FROM tab2
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-4257
SELECT + - col0 + col1 DIV - CAST( - col1 * + col2 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-4257
SELECT + - col0 + col1 / - CAST ( - col1 * + col2 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT ALL + + ( cor0.col2 ) + col1 FROM tab2 AS cor0
----
55
58
85

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab2 cor2
----
972 values hashing to 9600bdf5bac0caec3229e87170cc40b3

query I rowsort
SELECT col1 + + ( 48 ) * + cor0.col0 + + ( - cor0.col0 ) * col1 AS col0 FROM tab1 AS cor0
----
2442
2813
92

query I rowsort
SELECT ALL - col2 * cor0.col1 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 68 * 57 col1 FROM tab0 AS cor0
----
3876
3876
3876

onlyif mysql # use DIV operator for integer division
query I rowsort label-4263
SELECT DISTINCT + 4 DIV - col0 - - col2 AS col2 FROM tab1 AS cor0
----
53
57
96

skipif mysql # not compatible
query I rowsort label-4263
SELECT DISTINCT + 4 / - col0 - - col2 AS col2 FROM tab1 AS cor0
----
53
57
96

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - col1 AS REAL ) FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT + + ( + 60 ) - + col0 * - col1 FROM tab2 cor0
----
1403
277
4662

query I rowsort
SELECT 65 + tab2.col1 FROM tab2
----
124
82
96

query I rowsort
SELECT DISTINCT + 54 FROM tab2
----
54

query I rowsort
SELECT col2 * 8 + - col0 AS col2 FROM tab1
----
392
429
688

query I rowsort
SELECT ALL + 73 * col2 AS col2 FROM tab2 AS cor0
----
1898
1971
2774

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * + col1 * cor0.col0 col2 FROM tab0 AS cor0
----
-177504
-329315
-737009

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 33 col2 FROM tab1 AS cor0
----
-33

onlyif mysql # use DIV operator for integer division
query I rowsort label-4272
SELECT + + col1 DIV col0 AS col2 FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-4272
SELECT + + col1 / col0 AS col2 FROM tab1 AS cor0
----
0
0
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 63 * col2 col2 FROM tab0 AS cor0
----
-2079
-5166
-63

query I rowsort
SELECT cor0.col1 AS col0 FROM tab2, tab0 cor0, tab1 cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT DISTINCT + col0 + 81 * - col0 * + col0 FROM tab1 cor0
----
-331712
-518320
-726

query I rowsort
SELECT ALL + 2 FROM tab2, tab0 cor0
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

query I rowsort
SELECT - + col0 * col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL + 70 * col2 FROM tab1 AS cor0
----
3780
3990
6720

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 - col1 * col2 FROM tab2
----
-1534
-646
-837

query IIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
243 values hashing to 3e8bd9634a3f5947d8becd5f5799bb7f

query I rowsort
SELECT DISTINCT 53 FROM tab2
----
53

query I rowsort
SELECT DISTINCT + col2 + col2 AS col1 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT + cor0.col1 + + col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL + 35 + col2 + col0 FROM tab2 AS cor0
----
139
152
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-4286
SELECT ALL - col2 DIV + col1 FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-4286
SELECT ALL - col2 / + col1 FROM tab1 AS cor0
----
-2
-5
-7

query I rowsort
SELECT DISTINCT - col0 + col2 FROM tab1 cor0
----
-7
16
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4288
SELECT DISTINCT - CAST( 60 AS SIGNED ) FROM tab0 AS cor0
----
-60

skipif mysql # not compatible
query I rowsort label-4288
SELECT DISTINCT - CAST ( 60 AS INTEGER ) FROM tab0 AS cor0
----
-60

query I rowsort
SELECT ALL - - col0 + col2 * col1 AS col2 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT + col0 * col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL + 2 AS col2 FROM tab0 AS cor0
----
2
2
2

query I rowsort
SELECT ALL + - 56 FROM tab2 AS cor0
----
-56
-56
-56

query I rowsort
SELECT ALL - - 73 * 15 FROM tab1 AS cor0
----
1095
1095
1095

query I rowsort
SELECT - + cor0.col2 * cor0.col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL col0 + cor0.col1 AS col0 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT + - ( - col1 ) AS col2 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT + cor0.col1 * col0 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 cor0, tab0 AS cor1, tab2 AS cor2
----
972 values hashing to 591a9a93560839231c038a1e10bd240a

onlyif mysql # use DIV operator for integer division
query I rowsort label-4299
SELECT + 73 DIV cor0.col0 AS col2 FROM tab2 AS cor0
----
0
0
10

skipif mysql # not compatible
query I rowsort label-4299
SELECT + 73 / cor0.col0 AS col2 FROM tab2 AS cor0
----
0
0
10

query I rowsort
SELECT + 44 AS col2 FROM tab0 AS cor0
----
44
44
44

query I rowsort
SELECT DISTINCT col1 * + col0 + col2 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT ALL col0 * ( + col2 + col2 ) FROM tab2 AS cor0
----
378
4056
6004

query I rowsort
SELECT ALL + - col1 + 7 * col0 + + col0 FROM tab2 cor0
----
25
565
615

query I rowsort
SELECT ALL - col0 * cor0.col1 AS col1 FROM tab0 cor0
----
-2064
-3395
-8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4305
SELECT + - cor0.col1 * + CAST( col0 AS SIGNED ) + col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

skipif mysql # not compatible
query I rowsort label-4305
SELECT + - cor0.col1 * + CAST ( col0 AS INTEGER ) + col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT - cor0.col0 + col2 AS col1 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT + cor0.col0 + ( col1 * cor0.col1 ) FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT DISTINCT + - col2 + - col0 * - col0 + col2 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT col1 + + col1 AS col0 FROM tab2 AS cor0
----
118
34
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4310
SELECT - CAST( NULL AS SIGNED ) + + col2 col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4310
SELECT - CAST ( NULL AS INTEGER ) + + col2 col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4311
SELECT + 18 + - 99 DIV - col0 FROM tab1 AS cor0
----
19
19
51

skipif mysql # not compatible
query I rowsort label-4311
SELECT + 18 + - 99 / - col0 FROM tab1 AS cor0
----
19
19
51

query I rowsort
SELECT - col2 * - col0 AS col1 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT col1 * col0 + col2 * col0 * + col1 FROM tab1 AS cor0
----
100880
37120
4290

query I rowsort
SELECT ALL col1 + col1 + + col2 FROM tab2
----
144
72
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4315
SELECT - CAST( NULL AS SIGNED ) * 56 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4315
SELECT - CAST ( NULL AS INTEGER ) * 56 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-4316
SELECT col1 DIV col1 + + col1 FROM tab0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-4316
SELECT col1 / col1 + + col1 FROM tab0
----
87
92
98

query I rowsort
SELECT + col1 * + col2 * + col2 AS col2 FROM tab0 cor0
----
611884
93654
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4318
SELECT DISTINCT col1 + col2 DIV + col1 AS col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-4318
SELECT DISTINCT col1 + col2 / + col1 AS col1 FROM tab0
----
86
91
97

query I rowsort
SELECT DISTINCT + col0 FROM tab2 WHERE NULL NOT BETWEEN NULL AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4320
SELECT col1 DIV - col1 + - tab0.col1 FROM tab0
----
-87
-92
-98

skipif mysql # not compatible
query I rowsort label-4320
SELECT col1 / - col1 + - tab0.col1 FROM tab0
----
-87
-92
-98

query I rowsort
SELECT - col1 * + col2 * + col1 + tab2.col2 FROM tab2
----
-10944
-25920
-90480

query I rowsort
SELECT - col0 * col0 + col0 * col1 * - col1 FROM tab0
----
-178080
-330540
-744930

onlyif mysql # use DIV operator for integer division
query I rowsort label-4323
SELECT DISTINCT + col0 DIV col0 AS col0 FROM tab2
----
1

skipif mysql # not compatible
query I rowsort label-4323
SELECT DISTINCT + col0 / col0 AS col0 FROM tab2
----
1

query I rowsort
SELECT + col1 + col0 AS col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT - cor0.col2 + - col2 * + col0 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT DISTINCT tab2.col1 FROM tab2 WHERE col0 * col1 * col2 + col2 IN ( + col0 + col0 )
----

query I rowsort
SELECT ALL + col2 * - tab1.col1 AS col2 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT ALL col2 + - col2 FROM tab0
----
0
0
0

query I rowsort
SELECT - col2 * col1 * + col1 FROM tab2
----
-10982
-25947
-90506

query I rowsort
SELECT DISTINCT tab2.col1 * - col0 * + col0 - - col0 * + tab2.col2 FROM tab2
----
-103095
-1330
-356928

query I rowsort
SELECT + col2 + - col0 + col2 AS col1 FROM tab2
----
-26
-3
47

query I rowsort
SELECT col1 * tab1.col1 * col2 - - col2 AS col1 FROM tab1
----
16320
36558
5757

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * + col0 col1 FROM tab0
----
1225
576
7921

query I rowsort
SELECT col1 AS col2 FROM tab2 WHERE col1 < + col2
----
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 col2 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT + col2 + col1 FROM tab0
----
119
173
98

query I rowsort
SELECT ALL + col0 * col1 FROM tab2 WHERE NULL NOT BETWEEN NULL AND - col2
----

query I rowsort
SELECT - col2 - + col1 FROM tab1
----
-109
-67
-80

query I rowsort
SELECT ALL + col2 * + col0 + + col0 * - tab0.col1 FROM tab0
----
-1272
-3360
-801

query I rowsort
SELECT - tab2.col2 - + col0 FROM tab2
----
-104
-117
-34

query I rowsort
SELECT col2 * col1 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT - col2 AS col1 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT - + col1 * + col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL col2 * col1 AS col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT DISTINCT + tab0.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0
----
24
35
89

query I rowsort
SELECT ALL - col2 - col2 * - col0 FROM tab2 AS cor0
----
162
2002
2964

query I rowsort
SELECT ALL + col0 + - col2 AS col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT - - col1 * + col0 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT ALL col2 - + col1 FROM tab1 cor0
----
28
47
83

query I rowsort
SELECT DISTINCT + col2 * + cor0.col2 * + col2 FROM tab1 AS cor0
----
157464
185193
884736

query I rowsort
SELECT - col1 * + col1 AS col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT DISTINCT - col2 * ( col1 ) FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL - - col0 * ( - col2 ) FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + col0 * cor0.col2 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT col2 + - col1 FROM tab1 cor0
----
28
47
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4356
SELECT ALL + cor0.col0 * CAST( col1 AS SIGNED ) - col0 FROM tab1 AS cor0
----
576
75
960

skipif mysql # not compatible
query I rowsort label-4356
SELECT ALL + cor0.col0 * CAST ( col1 AS INTEGER ) - col0 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT - col1 * col1 AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

onlyif mysql # use DIV operator for integer division
query I rowsort label-4358
SELECT ALL - col0 DIV - col1 FROM tab2
----
0
1
4

skipif mysql # not compatible
query I rowsort label-4358
SELECT ALL - col0 / - col1 FROM tab2
----
0
1
4

query I rowsort
SELECT DISTINCT 84 FROM tab2
----
84

query I rowsort
SELECT ALL - 70 * + col0 AS col0 FROM tab0
----
-1680
-2450
-6230

query I rowsort
SELECT DISTINCT + col2 * col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT ALL 79 * col2 AS col1 FROM tab1
----
4266
4503
7584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 - 71 col0 FROM tab0
----
15
20
26

query I rowsort
SELECT DISTINCT col0 * - ( + 51 ) FROM tab2
----
-357
-3978
-4029

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + ( ( - col0 ) ) col0 FROM tab0 AS cor0
----
2
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-4366
SELECT ALL + col0 DIV - col2 AS col1 FROM tab1 cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4366
SELECT ALL + col0 / - col2 AS col1 FROM tab1 cor0
----
-1
0
0

query I rowsort
SELECT - - col2 * + 56 FROM tab0 cor0
----
1848
4592
56

query I rowsort
SELECT + col1 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT + col1 * + col1 AS col2 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT + col2 + - col2 + col1 * - col0 AS col2 FROM tab1
----
-1040
-640
-78

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL BETWEEN ( NULL ) AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4372
SELECT - col2 + + col0 * + tab1.col2 DIV - col2 FROM tab1
----
-121
-176
-57

skipif mysql # not compatible
query I rowsort label-4372
SELECT - col2 + + col0 * + tab1.col2 / - col2 FROM tab1
----
-121
-176
-57

query I rowsort
SELECT DISTINCT tab1.col0 * + col0 * - col1 - col2 * - tab1.col1 AS col2 FROM tab1
----
-40390
-81952
1170

query I rowsort
SELECT DISTINCT + col1 * col1 * - col1 - col2 * col1 AS col1 FROM tab0
----
-638894
-761033
-912770

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + + col0 * col1 col1 FROM tab0
----
2040
3360
8010

query I rowsort
SELECT DISTINCT - col2 / - tab2.col1 FROM tab2 WHERE NULL < NULL
----

query I rowsort
SELECT col0 + + col1 AS col2 FROM tab2
----
137
38
96

query I rowsort
SELECT - col0 + tab1.col1 * - col2 FROM tab1
----
-1328
-1407
-634

query I rowsort
SELECT col2 * - col2 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT + col1 * - col1 AS col0 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT - col2 * - col0 AS col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT col2 + col0 * tab2.col2 * + col2 AS col2 FROM tab2
----
114114
5130
52754

query I rowsort
SELECT DISTINCT + tab2.col2 * col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT - col2 AS col1 FROM tab0 WHERE col0 + col2 * col2 NOT IN ( col0 )
----
-1
-33
-82

query I rowsort
SELECT DISTINCT tab1.col0 * col1 AS col2 FROM tab1
----
1040
640
78

query III rowsort
SELECT * FROM tab1 WHERE NULL > ( col1 / col2 )
----

query I rowsort
SELECT - col1 + - col2 * - col1 FROM tab1 WHERE NOT - col0 + col1 NOT IN ( + tab1.col0 / + col0 + col0 )
----

query I rowsort
SELECT col2 + + col1 AS col2 FROM tab0
----
119
173
98

query I rowsort
SELECT ALL tab0.col2 * col2 * col0 FROM tab0
----
26136
35
598436

query I rowsort
SELECT ALL + col1 + tab1.col1 * col0 * col1 + - col0 * + col2 AS col0 FROM tab1
----
1892
2762
5853

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * col1 col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT col0 + col0 AS col1 FROM tab2 AS cor0
----
14
156
158

onlyif mysql # use DIV operator for integer division
query I rowsort label-4393
SELECT + col1 DIV - col0 + + col1 * + col2 * col0 FROM tab2 AS cor0
----
119652
51034
5855

skipif mysql # not compatible
query I rowsort label-4393
SELECT + col1 / - col0 + + col1 * + col2 * col0 FROM tab2 AS cor0
----
119652
51034
5855

query I rowsort
SELECT ALL 94 + col2 + col1 AS col0 FROM tab0 AS cor0
----
192
213
267

query I rowsort
SELECT DISTINCT - 7 AS col0 FROM tab0 AS cor0
----
-7

query I rowsort
SELECT col2 + + col2 FROM tab1
----
108
114
192

query I rowsort
SELECT - + col2 * - col1 * + 52 + + col1 + + col2 * cor0.col2 FROM tab0 AS cor0
----
148751
394839
5142

query I rowsort
SELECT ALL 53 FROM tab1 AS cor0
----
53
53
53

query I rowsort
SELECT ALL + cor0.col1 * - col0 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT + ( - 0 ) + cor2.col2 FROM tab2, tab1 AS cor0, tab1 AS cor1, tab1, tab1 AS cor2
----
54
57
96

query I rowsort
SELECT - + col2 * cor0.col2 AS col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT ALL - cor0.col2 + + col1 AS col0 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT + - col1 AS col0 FROM tab2 AS cor0
----
-17
-31
-59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4404
SELECT ALL col0 * + CAST( NULL AS SIGNED ) + - cor0.col2 * - col2 - col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4404
SELECT ALL col0 * + CAST ( NULL AS INTEGER ) + - cor0.col2 * - col2 - col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col2 + col0 AS col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT - col0 - - 52 FROM tab2 AS cor0
----
-26
-27
45

query I rowsort
SELECT ALL - col1 * 83 FROM tab0 AS cor0
----
-7138
-7553
-8051

query I rowsort
SELECT DISTINCT - col2 + 77 FROM tab1 cor0
----
-19
20
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-4409
SELECT ALL col2 DIV + col1 + + col0 + - cor0.col0 * + col0 AS col2 FROM tab2 AS cor0
----
-42
-6006
-6160

skipif mysql # not compatible
query I rowsort label-4409
SELECT ALL col2 / + col1 + + col0 + - cor0.col0 * + col0 AS col2 FROM tab2 AS cor0
----
-42
-6006
-6160

query I rowsort
SELECT - col1 * ( + col0 ) AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4411
SELECT DISTINCT + 6 * col2 + - CAST( NULL AS SIGNED ) AS col2 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-4411
SELECT DISTINCT + 6 * col2 + - CAST ( NULL AS INTEGER ) AS col2 FROM tab0
----
NULL

query IIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2, tab1 AS cor0 WHERE NOT NULL > ( NULL )
----

query I rowsort
SELECT DISTINCT col1 + + col1 * - col0 AS col0 FROM tab1
----
-1027
-52
-630

query I rowsort
SELECT ALL - - col2 + - 84 FROM tab1 AS cor0
----
-27
-30
12

query I rowsort
SELECT ALL col1 + - col1 * - 29 * - col2 FROM tab2 AS cor0
----
-18717
-24242
-44427

query I rowsort
SELECT ALL + col0 * ( + col2 ) + + col0 + col1 AS col2 FROM tab1 cor0
----
191
3722
7773

query I rowsort
SELECT DISTINCT + col1 * + col0 AS col2 FROM tab2
----
1343
217
4602

query I rowsort
SELECT ALL cor0.col0 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

onlyif mysql # use DIV operator for integer division
query I rowsort label-4419
SELECT DISTINCT col1 DIV + 4 + - col1 * cor0.col1 AS col1 FROM tab2 AS cor0
----
-285
-3467
-954

skipif mysql # not compatible
query I rowsort label-4419
SELECT DISTINCT col1 / + 4 + - col1 * cor0.col1 AS col1 FROM tab2 AS cor0
----
-285
-3467
-954

query I rowsort
SELECT ( col2 ) AS col0 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT DISTINCT + - col2 + ( + col1 * + col2 ) AS col2 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT - - ( cor0.col2 ) FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL + 65 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 1c9d0bf96cd3361942fadad668138b9c

query I rowsort
SELECT ALL cor0.col0 - + col2 AS col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT + + 18 + - col1 * col1 AS col2 FROM tab1 AS cor0
----
-151
-658
-82

query I rowsort
SELECT ALL - + col2 * - col0 AS col0 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-4427
SELECT col1 + - col2 DIV col1 AS col2 FROM tab1 AS cor0
----
24
5
6

skipif mysql # not compatible
query I rowsort label-4427
SELECT col1 + - col2 / col1 AS col2 FROM tab1 AS cor0
----
24
5
6

query I rowsort
SELECT ALL - - col0 + + col1 * - col1 FROM tab1 cor0
----
-36
-673
-89

query I rowsort
SELECT ALL + - col2 * - col0 AS col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT 48 AS col0 FROM tab1, tab1 AS cor0
----
48

query I rowsort
SELECT ALL 82 FROM tab2
----
82
82
82

query I rowsort
SELECT ( + col1 * - col1 ) AS col1 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT - 88 AS col0 FROM tab2
----
-88
-88
-88

query I rowsort
SELECT - 38 - - col1 AS col1 FROM tab1
----
-12
-25
-28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 col0 FROM tab1
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4436
SELECT DISTINCT col2 DIV col0 + - col1 AS col1 FROM tab1
----
-10
-12
-8

skipif mysql # not compatible
query I rowsort label-4436
SELECT DISTINCT col2 / col0 + - col1 AS col1 FROM tab1
----
-10
-12
-8

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0, tab0 AS cor1, tab1 AS cor2
----
972 values hashing to 0210050fb1701e2797a9b17e1ebac91e

query I rowsort
SELECT DISTINCT - + 12 FROM tab0 AS cor0
----
-12

query I rowsort
SELECT + 97 + col1 * cor0.col1 * col1 FROM tab2 AS cor0
----
205476
29888
5010

query I rowsort
SELECT ALL - 97 + - col0 AS col0 FROM tab2 AS cor0
----
-104
-175
-176

query I rowsort
SELECT ALL 53 + + col0 * - col0 AS col0 FROM tab0
----
-1172
-523
-7868

query I rowsort
SELECT + cor0.col1 * + tab2.col2 AS col2 FROM tab2, tab0 cor0
----
9 values hashing to 3aa3dc9c06ac75ec040ed5bc20953cf9

query I rowsort
SELECT + cor0.col0 * - cor0.col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 9bb5096fcd17e3f131152e7a67a5338f

query I rowsort
SELECT DISTINCT col0 * col2 * col1 AS col0 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT ALL 8 AS col1 FROM tab1 AS cor0
----
8
8
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-4446
SELECT ALL + + col0 + - col2 DIV col1 AS col2 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-4446
SELECT ALL + + col0 + - col2 / col1 AS col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT col2 + tab2.col0 AS col0 FROM tab2
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-4448
SELECT DISTINCT + col2 DIV col0 - col2 * - col1 * col0 AS col1 FROM tab0 AS cor0
----
3395
664118
68113

skipif mysql # not compatible
query I rowsort label-4448
SELECT DISTINCT + col2 / col0 - col2 * - col1 * col0 AS col1 FROM tab0 AS cor0
----
3395
664118
68113

query I rowsort
SELECT DISTINCT - col0 * - col2 + - col1 * col1 FROM tab1 AS cor0
----
-514
3548
7511

query I rowsort
SELECT DISTINCT col1 * col1 AS col2 FROM tab1
----
100
169
676

query I rowsort
SELECT - col0 + col1 AS col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT - + col2 + col1 AS col2 FROM tab1 AS cor0
----
-28
-47
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-4453
SELECT DISTINCT cor0.col2 + - col0 DIV col0 AS col2 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-4453
SELECT DISTINCT cor0.col2 + - col0 / col0 AS col2 FROM tab0 AS cor0
----
0
32
81

query I rowsort
SELECT ALL - col2 AS col2 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT + - col2 * cor0.col0 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-4456
SELECT + col1 DIV col0 AS col0 FROM tab1
----
0
0
8

skipif mysql # not compatible
query I rowsort label-4456
SELECT + col1 / col0 AS col0 FROM tab1
----
0
0
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + col1 + col0 + col1 col0 FROM tab1
----
174
262
705

query I rowsort
SELECT DISTINCT col1 * - col0 + - col0 * col0 AS col2 FROM tab1
----
-4736
-7440
-87

onlyif mysql # use DIV operator for integer division
query I rowsort label-4459
SELECT 29 DIV - 24 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4459
SELECT 29 / - 24 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT ALL - ( + ( col0 ) ) * col1 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-4461
SELECT DISTINCT col0 + - 43 DIV col1 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-4461
SELECT DISTINCT col0 + - 43 / col1 FROM tab0
----
24
35
89

query I rowsort
SELECT ( 3 ) * col0 FROM tab2
----
21
234
237

query I rowsort
SELECT col2 + - col1 + col2 AS col0 FROM tab0
----
-20
-95
73

query I rowsort
SELECT + 22 + tab1.col1 FROM tab1
----
32
35
48

query I rowsort
SELECT col2 * - col2 + + col0 FROM tab0 AS cor0
----
-1065
-6635
34

query I rowsort
SELECT ALL 36 * col1 FROM tab1 AS cor0
----
360
468
936

query I rowsort
SELECT + 20 FROM tab0, tab1 AS cor0
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

onlyif mysql # use DIV operator for integer division
query I rowsort label-4468
SELECT + + CAST( + col2 AS SIGNED ) + - col0 DIV + col0 AS col0 FROM tab1 AS cor0
----
53
56
95

skipif mysql # not compatible
query I rowsort label-4468
SELECT + + CAST ( + col2 AS INTEGER ) + - col0 / + col0 AS col0 FROM tab1 AS cor0
----
53
56
95

query I rowsort
SELECT ALL + col0 * col1 + cor0.col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT 80 AS col1 FROM tab2 AS cor0
----
80

query I rowsort
SELECT 87 * + col0 + col0 AS col0 FROM tab0 cor0
----
2112
3080
7832

onlyif mysql # use DIV operator for integer division
query I rowsort label-4472
SELECT + + 11 * col0 DIV + col1 + + col1 AS col2 FROM tab2 AS cor0
----
33
68
73

skipif mysql # not compatible
query I rowsort label-4472
SELECT + + 11 * col0 / + col1 + + col1 AS col2 FROM tab2 AS cor0
----
33
68
73

query I rowsort
SELECT - + col1 - + col0 * + col0 FROM tab0 cor0
----
-1322
-662
-8012

onlyif mysql # use DIV operator for integer division
query I rowsort label-4474
SELECT DISTINCT cor0.col1 + col1 DIV col1 FROM tab2 AS cor0
----
18
32
60

skipif mysql # not compatible
query I rowsort label-4474
SELECT DISTINCT cor0.col1 + col1 / col1 FROM tab2 AS cor0
----
18
32
60

query I rowsort
SELECT col1 * - col2 + + col0 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT DISTINCT + col2 + col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT DISTINCT + + cor0.col0 * cor0.col0 + col2 AS col2 FROM tab2 cor0
----
6110
6279
76

query I rowsort
SELECT - col1 * + col0 * col0 + col0 AS col0 FROM tab0 AS cor0
----
-118790
-49512
-720722

query I rowsort
SELECT ALL + 44 * - cor0.col2 + col1 FROM tab2 AS cor0
----
-1085
-1157
-1655

query I rowsort
SELECT - - 30 + cor0.col2 AS col0 FROM tab0 AS cor0
----
112
31
63

query I rowsort
SELECT DISTINCT + cor0.col0 AS col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL - col0 * col2 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - 84 + col0 * col0 AS col1 FROM tab0 AS cor0
----
1141
492
7837

query I rowsort
SELECT + col0 + col2 AS col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT - - col0 * - col2 + cor0.col1 * - col0 * col2 FROM tab2 AS cor0
----
-121680
-54036
-6048

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * 5 + - tab1.col2 col1 FROM tab1
----
216
228
384

query I rowsort
SELECT DISTINCT - col2 + 23 * - col0 FROM tab2
----
-1820
-1855
-188

query I rowsort
SELECT ( col2 * col1 ) + + col0 * + col1 FROM tab0
----
15561
3492
4902

query I rowsort
SELECT col0 * 57 + col1 * col2 AS col0 FROM tab2
----
1236
5149
5980

onlyif mysql # use DIV operator for integer division
query I rowsort label-4490
SELECT 15 DIV - 40 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4490
SELECT 15 / - 40 FROM tab0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4491
SELECT CAST( - col2 AS SIGNED ) + + tab2.col0 + - col1 AS col2 FROM tab2
----
-51
-7
24

skipif mysql # not compatible
query I rowsort label-4491
SELECT CAST ( - col2 AS INTEGER ) + + tab2.col0 + - col1 AS col2 FROM tab2
----
-51
-7
24

query I rowsort
SELECT - ( - col1 ) * col2 AS col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT + 55 - + col2 * tab0.col1 AS col1 FROM tab0
----
-2783
-42
-7407

query I rowsort
SELECT DISTINCT col0 * col2 * tab1.col2 FROM tab1
----
207936
737280
8748

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0, tab1, tab0 AS cor1
----
972 values hashing to 909b7ebab62aff8f69dc42ccbb5c2eae

query I rowsort
SELECT - - 97 * - col2 AS col0 FROM tab2 AS cor0
----
-2522
-2619
-3686

onlyif mysql # use DIV operator for integer division
query I rowsort label-4497
SELECT - 35 DIV col2 AS col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4497
SELECT - 35 / col2 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + 36 + cor0.col2 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to f25bfb8d8f22382b7ec4844856832cd0

query I rowsort
SELECT DISTINCT col2 * tab0.col0 FROM tab0
----
35
7298
792

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0, tab2, tab2 AS cor1
----
972 values hashing to 163d7732097d78f1cda7f65c2cea5a08

query I rowsort
SELECT col1 AS col2 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT - 40 FROM tab0 AS cor0
----
-40
-40
-40

query I rowsort
SELECT DISTINCT - col2 - col2 * tab2.col2 FROM tab2
----
-1482
-702
-756

onlyif mysql # use DIV operator for integer division
query I rowsort label-4504
SELECT - tab1.col0 DIV + tab1.col2 FROM tab1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4504
SELECT - tab1.col0 / + tab1.col2 FROM tab1
----
-1
0
0

query I rowsort
SELECT ( col0 ) * + tab2.col0 FROM tab2
----
49
6084
6241

query I rowsort
SELECT - col0 - + col1 AS col2 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT DISTINCT + 77 - - col2 FROM tab2
----
103
104
115

query I rowsort
SELECT + 5 * col0 AS col2 FROM tab1 AS cor0
----
15
320
400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col0 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT ALL 91 AS col0 FROM tab0 AS cor0
----
91
91
91

query I rowsort
SELECT DISTINCT col2 * col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT cor1.col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 18 col2 FROM tab1, tab2 AS cor0, tab1 cor1
----
27 values hashing to 903ac227935c1532300db45a8537c595

query I rowsort
SELECT cor0.col2 FROM tab1, tab0 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT + col2 * - col1 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT + + col1 + col0 * col2 * col1 AS col2 FROM tab0 AS cor0
----
3492
664209
68198

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - cor0.col0 * col0 + + col2 col1 FROM tab1 AS cor0
----
-3982
-6208
99

query I rowsort
SELECT + col2 * - cor0.col1 * - col2 AS col0 FROM tab0 AS cor0
----
611884
93654
97

query I rowsort
SELECT + col0 * - 33 AS col1 FROM tab2 AS cor0
----
-231
-2574
-2607

query I rowsort
SELECT + - 15 + 90 AS col1 FROM tab2 AS cor0
----
75
75
75

query I rowsort
SELECT - - 68 * + cor0.col2 AS col1 FROM tab2 AS cor0
----
1768
1836
2584

query I rowsort
SELECT + col0 * - col0 * cor0.col0 AS col0 FROM tab1 AS cor0
----
-262144
-27
-512000

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4523
SELECT - - CAST( NULL AS SIGNED ) / col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4523
SELECT - - CAST ( NULL AS INTEGER ) / col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 15 * col1 AS col0 FROM tab2 AS cor0
----
-255
-465
-885

query I rowsort
SELECT col0 + col2 AS col1 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT 43 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 199105619049271147956de52e7f5ed4

onlyif mysql # use DIV operator for integer division
query I rowsort label-4527
SELECT ALL - col1 DIV - ( ( tab1.col1 ) ) FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4527
SELECT ALL - col1 / - ( ( tab1.col1 ) ) FROM tab1
----
1
1
1

query I rowsort
SELECT col1 + - col0 * cor0.col1 * + col0 FROM tab1 AS cor0
----
-208
-40950
-83187

query I rowsort
SELECT DISTINCT - + col1 AS col0 FROM tab2 AS cor0
----
-17
-31
-59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4530
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4530
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL tab1.col0 * - col1 AS col2 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT + cor0.col1 + - col2 AS col2 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT DISTINCT 29 * col1 - cor0.col0 * cor0.col1 AS col2 FROM tab0 cor0
----
-5460
-582
430

query I rowsort
SELECT ALL + 90 * 6 FROM tab0 AS cor0
----
540
540
540

query I rowsort
SELECT + + 40 * + col2 FROM tab2 AS cor0
----
1040
1080
1520

query I rowsort
SELECT ALL - + col0 + cor0.col1 * + cor0.col2 AS col1 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT DISTINCT + 5 + - col1 FROM tab1 AS cor0
----
-21
-5
-8

query I rowsort
SELECT DISTINCT - 3 + col1 FROM tab0 AS cor0
----
83
88
94

query I rowsort
SELECT ALL - col2 * - ( - col1 ) FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4540
SELECT ALL - + CAST( NULL AS SIGNED ) * + ( col0 ) + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4540
SELECT ALL - + CAST ( NULL AS INTEGER ) * + ( col0 ) + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0, tab2 AS cor1, tab2 AS cor2
----
972 values hashing to a47a9db07c7de4927c7c28efb4cd13f2

query I rowsort
SELECT + 69 + cor0.col1 AS col1 FROM tab2 AS cor0
----
100
128
86

query I rowsort
SELECT DISTINCT + ( + col0 ) + + col1 FROM tab1 AS cor0
----
29
74
93

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0, tab2 AS cor1, tab2, tab0 AS cor2
----
3645 values hashing to 35998cdc87c8b13ea047f14c9f5dc8d6

query I rowsort
SELECT ALL - + 12 + col2 AS col1 FROM tab1 AS cor0
----
42
45
84

query I rowsort
SELECT DISTINCT - + col1 * col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + tab0.col0 AS col0 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

onlyif mysql # use DIV operator for integer division
query I rowsort label-4548
SELECT DISTINCT - col2 DIV col1 FROM tab1
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-4548
SELECT DISTINCT - col2 / col1 FROM tab1
----
-2
-5
-7

onlyif mysql # use DIV operator for integer division
query I rowsort label-4549
SELECT DISTINCT - 34 + - col2 DIV ( + cor0.col1 ) FROM tab1 AS cor0
----
-36
-39
-41

skipif mysql # not compatible
query I rowsort label-4549
SELECT DISTINCT - 34 + - col2 / ( + cor0.col1 ) FROM tab1 AS cor0
----
-36
-39
-41

query I rowsort
SELECT DISTINCT + 61 + col0 * col0 AS col2 FROM tab0 cor0
----
1286
637
7982

query I rowsort
SELECT DISTINCT col0 + + col1 AS col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT 43 FROM tab0 cor0
----
43

query I rowsort
SELECT + - col2 AS col0 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT 90 FROM tab1
----
90

query I rowsort
SELECT ( + col2 ) + + col1 FROM tab0
----
119
173
98

query I rowsort
SELECT + col2 + 59 FROM tab0
----
141
60
92

query I rowsort
SELECT ALL 28 AS col2 FROM tab0
----
28
28
28

query I rowsort
SELECT col2 * 1 + - col0 AS col1 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT - - col1 + cor0.col2 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT - col1 * col2 * + col2 AS col1 FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT ALL - + col1 + 62 FROM tab1 AS cor0
----
36
49
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-4562
SELECT + col1 DIV col0 - cor0.col2 * col0 AS col1 FROM tab0 AS cor0
----
-33
-7297
-789

skipif mysql # not compatible
query I rowsort label-4562
SELECT + col1 / col0 - cor0.col2 * col0 AS col1 FROM tab0 AS cor0
----
-33
-7297
-789

query I rowsort
SELECT DISTINCT + - col1 + - col1 * - col1 FROM tab0 AS cor0
----
7310
8190
9312

query I rowsort
SELECT col0 * col2 - col2 * - col1 FROM tab2 AS cor0
----
1026
3562
3648

query I rowsort
SELECT ALL - + col1 * 66 AS col1 FROM tab1 cor0
----
-1716
-660
-858

onlyif mysql # use DIV operator for integer division
query I rowsort label-4566
SELECT DISTINCT - - col2 * + cor0.col0 DIV + col0 col2 FROM tab2 AS cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4566
SELECT DISTINCT - - col2 * + cor0.col0 / + col0 col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL tab1.col1 AS col2 FROM tab1
----
10
13
26

query I rowsort
SELECT ALL - col2 * + col2 AS col1 FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT ALL col2 * col2 + col2 - + ( col2 ) AS col1 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT + 46 * - tab2.col0 AS col2 FROM tab2
----
-322
-3588
-3634

query I rowsort
SELECT ALL 26 * + col1 * col2 AS col0 FROM tab2
----
16796
21762
39884

query I rowsort
SELECT - col0 * + cor0.col0 + col2 * cor0.col0 AS col0 FROM tab2 AS cor0
----
-3239
-4056
140

query I rowsort
SELECT + col2 + 82 FROM tab0 AS cor0
----
115
164
83

query I rowsort
SELECT DISTINCT + 47 + col0 * - col1 + - tab0.col0 FROM tab0
----
-2041
-3383
-8141

query I rowsort
SELECT + 45 * + col0 * col2 AS col0 FROM tab2
----
135090
8505
91260

query I rowsort
SELECT col2 * col1 + - ( col1 * col1 ) FROM tab2
----
-124
-1947
357

query I rowsort
SELECT - 83 * + col2 AS col2 FROM tab0 AS cor0
----
-2739
-6806
-83

query I rowsort
SELECT ALL - + 69 FROM tab2 AS cor0
----
-69
-69
-69

query I rowsort
SELECT ALL - col2 * col1 * col1 FROM tab1 AS cor0
----
-16224
-36504
-5700

query I rowsort
SELECT - 91 + - col0 + cor0.col1 AS col1 FROM tab1 AS cor0
----
-145
-158
-68

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4581
SELECT ALL 43 + col2 * CAST( NULL AS DECIMAL ) * 34 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4581
SELECT ALL 43 + col2 * CAST ( NULL AS REAL ) * 34 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT DISTINCT - + col2 * 26 AS col0 FROM tab2 AS cor0
----
-676
-702
-988

query I rowsort
SELECT ALL + + col1 * col2 + - col2 FROM tab0 AS cor0
----
2805
7380
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4585
SELECT + col0 * CAST( col0 * - col2 AS SIGNED ) col1 FROM tab2 AS cor0
----
-1323
-158184
-237158

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4585
SELECT + col0 * CAST ( col0 * - col2 AS INTEGER ) col1 FROM tab2 AS cor0
----
-1323
-158184
-237158

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4586
SELECT DISTINCT col0 * + CAST( NULL AS SIGNED ) * 58 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4586
SELECT DISTINCT col0 * + CAST ( NULL AS INTEGER ) * 58 FROM tab1 cor0
----
NULL

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT - + cor0.col0 * + cor0.col0 * + 38 + + col0 * col2 FROM tab2 AS cor0
----
-1673
-229164
-234156

query I rowsort
SELECT DISTINCT + col1 * - col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT ALL col0 * + ( col0 ) AS col2 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT - col1 * - cor0.col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT - col1 + + col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT col0 * + ( - 98 ) FROM tab2 AS cor0
----
-686
-7644
-7742

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + - col0 col2 FROM tab2
----
-41
-52
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col0 + col0 col0 FROM tab0 AS cor0
----
-1190
-552
-7832

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4596
SELECT DISTINCT - ( col1 ) * col0 + CAST( + col2 AS SIGNED ) + col2 * - 96 FROM tab1 AS cor0
----
-10160
-5208
-6055

skipif mysql # not compatible
query I rowsort label-4596
SELECT DISTINCT - ( col1 ) * col0 + CAST ( + col2 AS INTEGER ) + col2 * - 96 FROM tab1 AS cor0
----
-10160
-5208
-6055

onlyif mysql # use DIV operator for integer division
query I rowsort label-4597
SELECT ALL - 85 DIV col2 + col2 FROM tab1 AS cor0
----
53
56
96

skipif mysql # not compatible
query I rowsort label-4597
SELECT ALL - 85 / col2 + col2 FROM tab1 AS cor0
----
53
56
96

query I rowsort
SELECT ALL + 38 + - cor0.col0 FROM tab0 cor0
----
-51
14
3

query I rowsort
SELECT ALL - col1 * col0 - + col2 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT 88 * - col1 + col1 * - ( + 8 ) FROM tab1 cor0
----
-1248
-2496
-960

query I rowsort
SELECT DISTINCT + 91 + + col1 AS col1 FROM tab0 AS cor0
----
177
182
188

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4602
SELECT ALL CAST( NULL AS SIGNED ) + col0 * - col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4602
SELECT ALL CAST ( NULL AS INTEGER ) + col0 * - col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 42 * col0 - - col1 FROM tab1 AS cor0
----
152
2698
3373

query I rowsort
SELECT ALL + 64 FROM tab0 AS cor0
----
64
64
64

query I rowsort
SELECT ALL + + 51 * col1 FROM tab1 AS cor0
----
1326
510
663

query I rowsort
SELECT ALL - ( + col0 ) + cor0.col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + - col0 AS col1 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT - - 47 FROM tab1 AS cor0
----
47
47
47

query I rowsort
SELECT + - ( + 81 ) - - col2 * col0 FROM tab2 cor0
----
108
1947
2921

query I rowsort
SELECT ALL - - col2 + - ( col0 ) AS col1 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT ( col0 ) + col2 AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT + ( + col0 ) * + cor0.col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT + cor0.col2 - col1 AS col0 FROM tab2 AS cor0
----
-33
-4
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-4614
SELECT ALL - 9 DIV + 20 AS col1 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4614
SELECT ALL - 9 / + 20 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT col1 - - cor0.col2 * - cor0.col0 AS col0 FROM tab1 cor0
----
-136
-3638
-7667

query I rowsort
SELECT ALL + 10 + + col1 FROM tab0 AS cor0
----
101
107
96

query I rowsort
SELECT DISTINCT - 66 FROM tab1 cor0
----
-66

query I rowsort
SELECT DISTINCT cor0.col0 * + col0 AS col0 FROM tab1 AS cor0
----
4096
6400
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-4619
SELECT + 95 * 89 + col1 + ( - cor0.col1 ) * col0 DIV ( col0 ) col1 FROM tab0 AS cor0
----
8455
8455
8455

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4619
SELECT + 95 * 89 + col1 + ( - cor0.col1 ) * col0 / ( col0 ) col1 FROM tab0 AS cor0
----
8455
8455
8455

query I rowsort
SELECT DISTINCT + 71 FROM tab0 AS cor0
----
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-4621
SELECT - - col2 DIV + ( cor0.col1 * - col0 ) FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4621
SELECT - - col2 / + ( cor0.col1 * - col0 ) FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - cor0.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-4623
SELECT - CAST( NULL AS SIGNED ) + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4623
SELECT - CAST ( NULL AS INTEGER ) + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4624
SELECT DISTINCT CAST( NULL AS SIGNED ) + cor0.col1 * + col2 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4624
SELECT DISTINCT CAST ( NULL AS INTEGER ) + cor0.col1 * + col2 FROM tab0 cor0
----
NULL

query I rowsort
SELECT ALL - + cor0.col2 + 13 FROM tab1 AS cor0
----
-41
-44
-83

query I rowsort
SELECT col1 * + cor0.col1 + col0 * 73 AS col2 FROM tab0 AS cor0
----
11964
14778
9148

query I rowsort
SELECT ALL + - col0 + - 97 AS col0 FROM tab1 cor0
----
-100
-161
-177

query I rowsort
SELECT ALL - col2 * col1 FROM tab2 cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-4629
SELECT DISTINCT - - col1 DIV col2 + cor0.col0 + 90 FROM tab0 AS cor0
----
116
180
222

skipif mysql # not compatible
query I rowsort label-4629
SELECT DISTINCT - - col1 / col2 + cor0.col0 + 90 FROM tab0 AS cor0
----
116
180
222

query I rowsort
SELECT cor0.col1 * col2 + col1 FROM tab2 AS cor0
----
1593
663
868

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4631
SELECT DISTINCT - col2 + + col1 * + CAST( + 45 AS SIGNED ) * - col2 FROM tab0 AS cor0
----
-127743
-335872
-4366

skipif mysql # not compatible
query I rowsort label-4631
SELECT DISTINCT - col2 + + col1 * + CAST ( + 45 AS INTEGER ) * - col2 FROM tab0 AS cor0
----
-127743
-335872
-4366

onlyif mysql # use DIV operator for integer division
query I rowsort label-4632
SELECT - 65 DIV - col1 + - col0 FROM tab1 AS cor0
----
-1
-58
-75

skipif mysql # not compatible
query I rowsort label-4632
SELECT - 65 / - col1 + - col0 FROM tab1 AS cor0
----
-1
-58
-75

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0, tab1, tab1 AS cor1
----
972 values hashing to fe55095fff3a5ecc2f113d14a8c6f823

query I rowsort
SELECT DISTINCT + 3 * tab0.col2 + col2 AS col1 FROM tab0
----
132
328
4

query I rowsort
SELECT col1 * col2 + - col2 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT col0 - col1 AS col2 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT - col0 * col2 - col2 AS col1 FROM tab0 AS cor0
----
-36
-7380
-825

query I rowsort
SELECT + cor0.col2 + col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL cor0.col1 * - col0 + + col1 + + col2 * + cor0.col0 * 87 FROM tab1 AS cor0
----
14042
316746
667133

query I rowsort
SELECT DISTINCT col2 * - col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL - col2 + + col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT + - col1 AS col0 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT - cor0.col2 + col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT + 42 FROM tab0
----
42
42
42

query I rowsort
SELECT DISTINCT + ( col2 ) + + col0 AS col0 FROM tab0
----
171
36
57

query I rowsort
SELECT 51 + cor0.col1 FROM tab2 AS cor0
----
110
68
82

query I rowsort
SELECT + 18 + - col0 FROM tab0 AS cor0
----
-17
-6
-71

query I rowsort
SELECT + cor0.col1 + + 58 FROM tab1, tab1 AS cor0
----
9 values hashing to 618b19e78c364ba5ad0e1ce88f1f96cd

query I rowsort
SELECT ALL ( col2 ) AS col1 FROM tab0
----
1
33
82

query I rowsort
SELECT DISTINCT 70 AS col0 FROM tab1
----
70

query I rowsort
SELECT - cor0.col0 + col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - cor0.col0 - - cor0.col1 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 023677f2362ebf8bd60cb629f4090df4

query I rowsort
SELECT DISTINCT col2 + - col1 FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT ALL + - ( - col0 ) * - ( col2 ) + col2 * + col0 AS col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT col1 + - 62 * - col1 * col1 FROM tab2
----
17935
215881
59613

query I rowsort
SELECT + cor0.col1 + col0 * cor0.col2 FROM tab2 AS cor0
----
2087
220
3019

query IIIIIIIII rowsort
SELECT * FROM tab1 cor0 CROSS JOIN tab2, tab0 AS cor1
----
243 values hashing to 566180e0144350a78b0ef3318e8f4c00

query I rowsort
SELECT ( - 22 ) AS col0 FROM tab0
----
-22
-22
-22

query I rowsort
SELECT DISTINCT - tab1.col0 + col2 * col1 AS col1 FROM tab1
----
1168
1401
506

query I rowsort
SELECT - ( 50 ) * - col1 AS col1 FROM tab2
----
1550
2950
850

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4661
SELECT CAST( NULL AS SIGNED ) * 95 * col1 col1 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4661
SELECT CAST ( NULL AS INTEGER ) * 95 * col1 col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - 97 + - 22 * - col1 + tab1.col1 AS col0 FROM tab1
----
133
202
501

query I rowsort
SELECT + - 25 * cor0.col1 FROM tab0 AS cor0
----
-2150
-2275
-2425

query I rowsort
SELECT + col0 * col0 AS col2 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT - 78 * col2 AS col1 FROM tab0 AS cor0
----
-2574
-6396
-78

query I rowsort
SELECT DISTINCT col1 + col0 AS col0 FROM tab1 AS cor0
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col2 ) * cor0.col1 col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL col0 - + 62 FROM tab0 AS cor0
----
-27
-38
27

query I rowsort
SELECT col0 + tab2.col1 * col2 FROM tab2
----
1612
725
844

query I rowsort
SELECT + col2 * col1 FROM tab2 cor0
----
1534
646
837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4671
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab0, tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4671
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab0, tab0 AS cor0
----
NULL

query I rowsort
SELECT + col1 * cor0.col2 AS col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT cor0.col0 * col1 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT col0 + col2 AS col0 FROM tab2 cor0
----
104
117
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 col1 FROM tab1
----
3
64
80

query I rowsort
SELECT ALL ( + col2 + - col1 ) * 10 FROM tab1
----
280
470
830

query I rowsort
SELECT + 78 AS col0 FROM tab1
----
78
78
78

query I rowsort
SELECT DISTINCT - 62 AS col2 FROM tab0
----
-62

query I rowsort
SELECT ALL col0 * - 36 FROM tab1
----
-108
-2304
-2880

query I rowsort
SELECT col2 * col1 + - col2 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT 30 * - col0 FROM tab0
----
-1050
-2670
-720

query I rowsort
SELECT col2 * 11 AS col2 FROM tab1
----
1056
594
627

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4683
SELECT ALL + CAST( NULL AS DECIMAL ) * + ( col2 + col2 ) * col2 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4683
SELECT ALL + CAST ( NULL AS REAL ) * + ( col2 + col2 ) * col2 AS col1 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4684
SELECT col2 + + col1 DIV + 56 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-4684
SELECT col2 + + col1 / + 56 FROM tab0 AS cor0
----
2
34
83

query I rowsort
SELECT - - 72 * - col2 + 45 AS col1 FROM tab0 AS cor0
----
-2331
-27
-5859

query I rowsort
SELECT + ( cor0.col2 ) * 54 + col1 FROM tab1 AS cor0
----
2942
3088
5197

query I rowsort
SELECT + col2 + + col2 * 92 + + col1 FROM tab1 cor0
----
5048
5311
8941

query I rowsort
SELECT - 94 * col1 FROM tab2 AS cor0
----
-1598
-2914
-5546

query I rowsort
SELECT ( + col1 ) * + tab2.col0 AS col1 FROM tab2
----
1343
217
4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4690
SELECT + col0 * col0 + + CAST( col1 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
1322
662
8012

skipif mysql # not compatible
query I rowsort label-4690
SELECT + col0 * col0 + + CAST ( col1 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT DISTINCT + 6 FROM tab2
----
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-4692
SELECT tab1.col2 * 14 + + col2 DIV + ( 93 ) FROM tab1
----
1345
756
798

skipif mysql # not compatible
query I rowsort label-4692
SELECT tab1.col2 * 14 + + col2 / + ( 93 ) FROM tab1
----
1345
756
798

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4693
SELECT + - col0 + col2 + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4693
SELECT + - col0 + col2 + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 63 + col0 * + col0 * col2 FROM tab2 AS cor0
----
1260
158121
237095

query I rowsort
SELECT + + 48 FROM tab0 AS cor0
----
48
48
48

query I rowsort
SELECT ALL - 85 * col1 + + col2 FROM tab2
----
-1407
-2608
-4989

query I rowsort
SELECT DISTINCT col2 + - tab2.col2 * + ( + col1 + tab2.col2 ) AS col2 FROM tab2
----
-1539
-2052
-2184

query I rowsort
SELECT DISTINCT - col1 + col1 * + tab2.col1 FROM tab2
----
272
3422
930

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + - col2 col1 FROM tab0
----
-9
34
7

query I rowsort
SELECT DISTINCT - + col0 * - col2 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL col0 * col2 * - 67 + ( - col1 ) AS col0 FROM tab2 AS cor0
----
-12694
-135935
-201151

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0, tab1 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to f9101173abc9e524c6310e6c0eeefb0c

query I rowsort
SELECT col2 * + col0 + - col1 + - 25 FROM tab2 AS cor0
----
133
1944
2960

query I rowsort
SELECT - col0 + + col1 + + col1 FROM tab1 AS cor0
----
-44
-54
49

onlyif mysql # use DIV operator for integer division
query I rowsort label-4705
SELECT 59 * - col0 + + ( 60 ) * cor0.col2 DIV 80 + 14 FROM tab0 AS cor0
----
-1378
-2051
-5176

skipif mysql # not compatible
query I rowsort label-4705
SELECT 59 * - col0 + + ( 60 ) * cor0.col2 / 80 + 14 FROM tab0 AS cor0
----
-1378
-2051
-5176

query I rowsort
SELECT + + 81 * col2 * - 60 FROM tab2 AS cor0
----
-126360
-131220
-184680

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col0 + - col2 AS col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - cor0.col2 * + col0 + col1 FROM tab1 cor0
----
-136
-3638
-7667

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT - col2 + - 55 * + cor0.col2 + col1 AS col1 FROM tab1 AS cor0
----
-2998
-3182
-5363

onlyif mysql # use DIV operator for integer division
query I rowsort label-4711
SELECT DISTINCT - col0 DIV ( - 46 ) AS col1 FROM tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-4711
SELECT DISTINCT - col0 / ( - 46 ) AS col1 FROM tab0 AS cor0
----
0
1

query I rowsort
SELECT - - col0 * 73 + - col0 + col1 FROM tab0 AS cor0
----
1814
2617
6499

query I rowsort
SELECT DISTINCT - + col1 AS col0 FROM tab1 cor0
----
-10
-13
-26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4714
SELECT + cor0.col2 * col2 + col1 + col2 * CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4714
SELECT + cor0.col2 * col2 + col1 + col2 * CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + col2 + - col0 AS col1 FROM tab2 AS cor0
----
-41
-52
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col2 col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT - - col1 + - col2 + - 4 AS col2 FROM tab1 AS cor0
----
-32
-51
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT + + col2 * + col1 + col2 + col1 FROM tab1 AS cor0
----
1357
1484
637

query I rowsort
SELECT col0 * 4 AS col1 FROM tab0 AS cor0
----
140
356
96

query I rowsort
SELECT ALL - 68 AS col1 FROM tab0, tab1, tab1 cor0
----
27 values hashing to 6fbba7db5bccb533a35aa5125a231f88

onlyif mysql # use DIV operator for integer division
query I rowsort label-4722
SELECT + + col2 + ( - col1 ) DIV + col0 + cor0.col2 AS col2 FROM tab1 AS cor0
----
100
114
192

skipif mysql # not compatible
query I rowsort label-4722
SELECT + + col2 + ( - col1 ) / + col0 + cor0.col2 AS col2 FROM tab1 AS cor0
----
100
114
192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ALL col2 * + ( col0 ) AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ( + 86 ) FROM tab1 AS cor0
----
86
86
86

onlyif mysql # use DIV operator for integer division
query I rowsort label-4726
SELECT ALL - col2 DIV col2 AS col1 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4726
SELECT ALL - col2 / col2 AS col1 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + 37 * col1 AS col2 FROM tab2 AS cor0
----
1147
2183
629

query I rowsort
SELECT ( col0 ) FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT 44 FROM tab2 AS cor0
----
44
44
44

query I rowsort
SELECT ( - 91 ) + col0 * - 75 AS col2 FROM tab0 AS cor0
----
-1891
-2716
-6766

query I rowsort
SELECT - ( col0 ) FROM tab2 AS cor0
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col0 col1 FROM tab2
----
-7
-78
-79

query I rowsort
SELECT DISTINCT 81 * + col1 + + col0 AS col2 FROM tab2 cor0
----
1456
2518
4857

query I rowsort
SELECT ALL col1 + - col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - + 84 AS col2 FROM tab2 AS cor0
----
-84
-84
-84

query I rowsort
SELECT DISTINCT - col1 * cor0.col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + col1 + 42 - col2 FROM tab2 AS cor0
----
21
46
75

query I rowsort
SELECT 50 FROM tab0 AS cor0
----
50
50
50

query I rowsort
SELECT - 1 * + cor0.col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

onlyif mysql # use DIV operator for integer division
query I rowsort label-4740
SELECT + ( + col1 ) DIV col0 AS col0 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-4740
SELECT + ( + col1 ) / col0 AS col0 FROM tab0
----
1
2
3

query I rowsort
SELECT + + cor0.col0 + + col0 AS col1 FROM tab1 cor0
----
128
160
6

query I rowsort
SELECT DISTINCT - - 60 * - col2 + 58 FROM tab0 cor0
----
-1922
-2
-4862

query I rowsort
SELECT DISTINCT + col0 + + col0 * + col0 AS col2 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT DISTINCT - ( 20 ) - tab2.col1 FROM tab2
----
-37
-51
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-4745
SELECT col2 DIV col1 AS col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4745
SELECT col2 / col1 AS col1 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4746
SELECT ALL col1 + + 66 DIV 94 + - col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4746
SELECT ALL col1 + + 66 / 94 + - col1 FROM tab0
----
0
0
0

query I rowsort
SELECT - col2 + tab1.col0 - 92 AS col0 FROM tab1
----
-108
-143
-85

query I rowsort
SELECT DISTINCT - col1 + - col1 * + 8 FROM tab0
----
-774
-819
-873

onlyif mysql # use DIV operator for integer division
query I rowsort label-4749
SELECT col2 + 51 DIV + col0 AS col0 FROM tab0
----
2
35
82

skipif mysql # not compatible
query I rowsort label-4749
SELECT col2 + 51 / + col0 AS col0 FROM tab0
----
2
35
82

query I rowsort
SELECT - ( + ( col2 ) ) + col0 * cor0.col1 AS col1 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT + 14 * col2 + - cor0.col1 * col2 AS col2 FROM tab1 AS cor0
----
-648
228
96

query I rowsort
SELECT ALL + col0 + col0 * col0 + col1 * + col0 FROM tab2
----
10764
273
7663

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + ( - ( col2 ) ) * - col1 + col2 col2 FROM tab2
----
1638
763
871

onlyif mysql # use DIV operator for integer division
query I rowsort label-4754
SELECT + col2 * col1 DIV - tab1.col0 FROM tab1
----
-15
-468
-8

skipif mysql # not compatible
query I rowsort label-4754
SELECT + col2 * col1 / - tab1.col0 FROM tab1
----
-15
-468
-8

query I rowsort
SELECT + tab2.col2 * + 99 FROM tab2
----
2574
2673
3762

query I rowsort
SELECT col2 * col2 + - 41 + tab0.col2 FROM tab0
----
-39
1081
6765

onlyif mysql # use DIV operator for integer division
query I rowsort label-4757
SELECT DISTINCT - col0 + 41 DIV + col0 col2 FROM tab2
----
-2
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4757
SELECT DISTINCT - col0 + 41 / + col0 col2 FROM tab2
----
-2
-78
-79

query I rowsort
SELECT DISTINCT - 54 FROM tab1, tab0 AS cor0
----
-54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( - ( col2 ) ) * cor0.col2 + col0 col1 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT ALL col1 - + col2 * - col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT - col2 + + 0 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT ALL 39 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 5ecc4d3de68ae828a2d522dff8571cbf

query I rowsort
SELECT ALL 81 * - col2 FROM tab2 AS cor0
----
-2106
-2187
-3078

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + col2 ) col1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - 57 + col1 AS col1 FROM tab2 AS cor0
----
-26
-40
2

query I rowsort
SELECT ALL - col2 * + col2 AS col0 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT + 55 * - 40 + col1 AS col1 FROM tab2 AS cor0
----
-2141
-2169
-2183

query I rowsort
SELECT ALL 24 FROM tab0 cor0
----
24
24
24

query I rowsort
SELECT DISTINCT 59 FROM tab2 AS cor0
----
59

query I rowsort
SELECT ALL + + cor0.col2 * - col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + + col1 + + ( col1 ) * - 29 FROM tab1 cor0
----
-280
-364
-728

query I rowsort
SELECT DISTINCT + ( - col2 ) AS col1 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT - + ( ( col0 ) ) * col0 AS col2 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT ALL - ( + col1 ) + - col2 AS col2 FROM tab2 cor0
----
-55
-58
-85

query I rowsort
SELECT ALL + ( - col2 ) - + col1 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT DISTINCT + - cor0.col2 * + col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT - ( - col1 ) - + col2 AS col0 FROM tab1 AS cor0
----
-28
-47
-83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4778
SELECT + CAST( - col2 AS SIGNED ) + - col2 FROM tab2 AS cor0
----
-52
-54
-76

skipif mysql # not compatible
query I rowsort label-4778
SELECT + CAST ( - col2 AS INTEGER ) + - col2 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT ALL col0 + ( + col2 ) FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT DISTINCT + 39 AS col2 FROM tab2
----
39

query I rowsort
SELECT tab0.col2 * - col0 - - ( col1 ) FROM tab0
----
-706
-7207
62

query I rowsort
SELECT - ( col1 ) + 77 FROM tab2
----
18
46
60

query I rowsort
SELECT ALL + + col1 + col2 AS col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT + col1 + col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT - 37 * col0 AS col0 FROM tab1 AS cor0
----
-111
-2368
-2960

query I rowsort
SELECT ALL - col0 * col2 AS col2 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT + - col1 + col2 AS col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT + - col0 * col2 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT - 37 * - col0 + ( col1 ) AS col1 FROM tab2 AS cor0
----
290
2940
2945

query I rowsort
SELECT + - col0 + cor0.col1 * + col0 AS col2 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT + col2 + cor0.col1 * + 81 FROM tab0 AS cor0
----
6999
7453
7858

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col1 col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT 50 * + col1 AS col2 FROM tab1
----
1300
500
650

query I rowsort
SELECT ALL - col0 + + ( col2 ) * + col1 FROM tab2 AS cor0
----
1456
567
830

onlyif mysql # use DIV operator for integer division
query I rowsort label-4795
SELECT - col2 + col0 * 19 DIV - col1 FROM tab1 AS cor0
----
-178
-212
-56

skipif mysql # not compatible
query I rowsort label-4795
SELECT - col2 + col0 * 19 / - col1 FROM tab1 AS cor0
----
-178
-212
-56

skipif mysql # not compatible
query I rowsort
SELECT ALL - col1 * - CAST ( col0 AS REAL ) + + col2 AS col0 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT DISTINCT - col1 + + cor0.col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT col2 + cor0.col2 * + col1 FROM tab2 AS cor0
----
1560
684
864

onlyif mysql # use DIV operator for integer division
query I rowsort label-4799
SELECT DISTINCT col2 + - col0 DIV - 79 FROM tab2 AS cor0
----
26
27
39

skipif mysql # not compatible
query I rowsort label-4799
SELECT DISTINCT col2 + - col0 / - 79 FROM tab2 AS cor0
----
26
27
39

query I rowsort
SELECT + col0 * - 56 FROM tab0 cor0
----
-1344
-1960
-4984

query I rowsort
SELECT ALL + + col1 + 7 AS col1 FROM tab0 AS cor0
----
104
93
98

query I rowsort
SELECT DISTINCT + col2 * 66 + col1 AS col0 FROM tab0 AS cor0
----
163
2264
5503

query I rowsort
SELECT - + col1 * - ( 57 ) AS col1 FROM tab2 AS cor0
----
1767
3363
969

onlyif mysql # use DIV operator for integer division
query I rowsort label-4804
SELECT ALL col2 DIV - 58 + - col2 FROM tab0 AS cor0
----
-1
-33
-83

skipif mysql # not compatible
query I rowsort label-4804
SELECT ALL col2 / - 58 + - col2 FROM tab0 AS cor0
----
-1
-33
-83

query I rowsort
SELECT - - col1 * + 36 FROM tab0 AS cor0
----
3096
3276
3492

query I rowsort
SELECT ( + col1 ) * - col2 + - col0 AS col0 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab1, tab2 AS cor0 WHERE NULL <= NULL
----

query I rowsort
SELECT + ( + col2 ) + - col0 FROM tab0 cor0
----
-34
-7
9

query I rowsort
SELECT + ( + tab2.col1 ) AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT - col0 * cor0.col2 + + col1 FROM tab1 AS cor0
----
-136
-3638
-7667

onlyif mysql # use DIV operator for integer division
query I rowsort label-4811
SELECT + + col2 DIV col2 + - col1 AS col1 FROM tab0 AS cor0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-4811
SELECT + + col2 / col2 + - col1 AS col1 FROM tab0 AS cor0
----
-85
-90
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4812
SELECT - CAST( NULL AS SIGNED ) AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4812
SELECT - CAST ( NULL AS INTEGER ) AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4813
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab1, tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4813
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab1, tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL 79 FROM tab0, tab2 AS cor0
----
9 values hashing to 40a2261caa2c5cdbfd80965d7df1231f

query I rowsort
SELECT - 92 FROM tab0 AS cor0
----
-92
-92
-92

query I rowsort
SELECT + col0 * col2 AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT col0 + col0 * 28 - col0 * col1 AS col1 FROM tab2 AS cor0
----
-14
-2340
948

query I rowsort
SELECT ALL - col1 - + col1 AS col2 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT ALL col0 + ( + col0 + + col1 ) FROM tab2
----
175
215
45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4820
SELECT CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4820
SELECT CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ( - col1 ) * col0 + ( + col2 + tab2.col1 ) * - ( 70 ) FROM tab2
----
-10552
-4277
-5193

query I rowsort
SELECT + 82 FROM tab0
----
82
82
82

query I rowsort
SELECT DISTINCT - - 69 AS col0 FROM tab2, tab0, tab1 AS cor0
----
69

query I rowsort
SELECT + 49 + + col1 FROM tab0 AS cor0
----
135
140
146

query I rowsort
SELECT ALL - - col1 * col2 + col2 * + col2 + cor0.col2 * col0 * col2 AS col1 FROM tab2 AS cor0
----
116166
54938
6669

query I rowsort
SELECT DISTINCT col1 - col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT + - col0 * col2 + + 80 FROM tab2 AS cor0
----
-109
-1948
-2922

query I rowsort
SELECT DISTINCT - - col0 + col1 * - 85 * 16 AS col2 FROM tab0 cor0
----
-116936
-123671
-131885

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 col2 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT DISTINCT - 20 FROM tab0
----
-20

query I rowsort
SELECT 60 AS col1 FROM tab0
----
60
60
60

query I rowsort
SELECT + + col1 * col2 + col2 FROM tab1 AS cor0
----
1344
1458
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-4833
SELECT - - cor0.col1 * + col1 DIV cor0.col1 + - col2 AS col1 FROM tab0 AS cor0
----
53
9
96

skipif mysql # not compatible
query I rowsort label-4833
SELECT - - cor0.col1 * + col1 / cor0.col1 + - col2 AS col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT col2 + col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL + cor0.col1 * + col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL + col0 * col1 + cor0.col2 + col0 AS col1 FROM tab2 cor0
----
1460
251
4706

query I rowsort
SELECT - col0 * - cor0.col2 + + col2 * - col0 AS col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4839
SELECT col2 DIV + tab1.col0 FROM tab1
----
0
1
18

skipif mysql # not compatible
query I rowsort label-4839
SELECT col2 / + tab1.col0 FROM tab1
----
0
1
18

query I rowsort
SELECT + col1 * col1 AS col1 FROM tab0
----
7396
8281
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col1 col0 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT + col0 + col1 + cor0.col1 * - col2 FROM tab1 AS cor0
----
-1155
-1375
-496

onlyif mysql # use DIV operator for integer division
query I rowsort label-4843
SELECT + col0 + col1 DIV - cor0.col0 + - col0 AS col0 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-4843
SELECT + col0 + col1 / - cor0.col0 + - col0 AS col0 FROM tab2 AS cor0
----
-4
0
0

query I rowsort
SELECT + col2 * - col0 + cor0.col1 + + col0 FROM tab0 AS cor0
----
-682
-7118
97

query I rowsort
SELECT ALL + cor0.col0 + - col0 * col2 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT - - col1 + + col0 * cor0.col0 * - col2 + col0 FROM tab1 AS cor0
----
-233398
-457
-614307

query I rowsort
SELECT DISTINCT - col2 + cor0.col0 FROM tab1 AS cor0
----
-16
-51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-4848
SELECT - col0 DIV + cor0.col1 col1 FROM tab2 cor0
----
-1
-4
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4848
SELECT - col0 / + cor0.col1 col1 FROM tab2 cor0
----
-1
-4
0

query III rowsort
SELECT ALL * FROM tab0 AS cor0 WHERE NOT - col0 + col1 * col1 > - col2 * + col1
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4850
SELECT DISTINCT col2 * - cor0.col2 + - col1 DIV + col0 AS col1 FROM tab2 AS cor0
----
-1444
-676
-733

skipif mysql # not compatible
query I rowsort label-4850
SELECT DISTINCT col2 * - cor0.col2 + - col1 / + col0 AS col1 FROM tab2 AS cor0
----
-1444
-676
-733

query I rowsort
SELECT ALL col1 * col2 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT - col2 + col2 * col1 + col1 FROM tab1 AS cor0
----
1165
1376
523

query I rowsort
SELECT col2 + + col2 * + cor0.col1 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT DISTINCT col2 + col0 FROM tab0
----
171
36
57

query I rowsort
SELECT ALL col1 + col2 AS col0 FROM tab1
----
109
67
80

query I rowsort
SELECT + col1 + col2 * col2 FROM tab0 AS cor0
----
1175
6815
98

query I rowsort
SELECT - - col0 * + col2 AS col2 FROM tab1 AS cor0
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + col2 * col1 col1 FROM tab0 AS cor0
----
194
2924
7553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 col1 FROM tab1
----
3
64
80

query I rowsort
SELECT ALL 56 FROM tab2
----
56
56
56

query I rowsort
SELECT ALL col2 * + col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT + tab1.col2 AS col1 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

onlyif mysql # use DIV operator for integer division
query I rowsort label-4863
SELECT ALL + col0 DIV - col1 FROM tab1
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-4863
SELECT ALL + col0 / - col1 FROM tab1
----
-6
-6
0

query I rowsort
SELECT ALL - col1 * col1 - + col1 FROM tab2
----
-306
-3540
-992

query I rowsort
SELECT DISTINCT col2 - + col0 AS col1 FROM tab2
----
-41
-52
20

query I rowsort
SELECT + col0 * tab2.col2 AS col2 FROM tab2
----
189
2028
3002

query I rowsort
SELECT - col2 + col2 + + col2 AS col2 FROM tab0
----
1
33
82

query I rowsort
SELECT ALL col2 + - col0 * col2 AS col1 FROM tab2
----
-162
-2002
-2964

query I rowsort
SELECT tab2.col1 - col2 AS col1 FROM tab2
----
-21
33
4

query I rowsort
SELECT ALL col1 * col1 + + col2 - col2 AS col1 FROM tab0
----
7396
8281
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-4871
SELECT + col1 DIV - col2 + tab1.col0 AS col2 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-4871
SELECT + col1 / - col2 + tab1.col0 AS col2 FROM tab1
----
3
64
80

query I rowsort
SELECT tab1.col2 + - tab1.col1 AS col2 FROM tab1
----
28
47
83

query I rowsort
SELECT + col2 * tab2.col0 FROM tab2
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-4874
SELECT + col2 * col2 DIV - tab1.col0 + - tab1.col2 FROM tab1
----
-1026
-107
-211

skipif mysql # not compatible
query I rowsort label-4874
SELECT + col2 * col2 / - tab1.col0 + - tab1.col2 FROM tab1
----
-1026
-107
-211

query I rowsort
SELECT ALL - + 93 * col2 * - ( + 47 ) AS col1 FROM tab0 AS cor0
----
144243
358422
4371

onlyif mysql # use DIV operator for integer division
query I rowsort label-4876
SELECT DISTINCT - - col0 DIV col0 AS col2 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-4876
SELECT DISTINCT - - col0 / col0 AS col2 FROM tab0 AS cor0
----
1

query I rowsort
SELECT - tab2.col2 + col1 * col1 FROM tab2
----
251
3455
934

query I rowsort
SELECT col1 + tab0.col1 AS col0 FROM tab0
----
172
182
194

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT col1 <> NULL
----

query III rowsort
SELECT * FROM tab0 WHERE NOT ( + col2 ) > + col0 * - col2 * col2 + col2
----

query I rowsort
SELECT col0 * + col2 AS col2 FROM tab2
----
189
2028
3002

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2, tab2 AS cor0, tab2 AS cor1
----
972 values hashing to 163d7732097d78f1cda7f65c2cea5a08

query I rowsort
SELECT DISTINCT + col2 + col0 FROM tab2
----
104
117
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + col1 col2 FROM tab0
----
53
9
96

query I rowsort
SELECT DISTINCT col0 * + col0 + 55 FROM tab1
----
4151
64
6455

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0, tab2 AS cor0, tab1 cor1
----
972 values hashing to 75a813ebd5ec5ec2e67a66d0593ff763

query I rowsort
SELECT ALL col0 * col0 + - col1 FROM tab0
----
1128
490
7830

onlyif mysql # use DIV operator for integer division
query I rowsort label-4888
SELECT DISTINCT + 68 * col0 DIV - col1 + tab1.col0 FROM tab1
----
-338
-371
-4

skipif mysql # not compatible
query I rowsort label-4888
SELECT DISTINCT + 68 * col0 / - col1 + tab1.col0 FROM tab1
----
-338
-371
-4

onlyif mysql # use DIV operator for integer division
query I rowsort label-4889
SELECT - tab0.col2 DIV - col1 AS col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4889
SELECT - tab0.col2 / - col1 AS col1 FROM tab0
----
0
0
0

query I rowsort
SELECT col2 + - col0 AS col1 FROM tab2
----
-41
-52
20

query I rowsort
SELECT DISTINCT + tab1.col1 + tab1.col1 * tab1.col2 FROM tab1
----
1261
1430
580

query I rowsort
SELECT + col1 + + col2 AS col1 FROM tab0 AS cor0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT - + col0 * cor0.col0 + + 68 FROM tab1 AS cor0
----
-4028
-6332
59

query I rowsort
SELECT ALL + 37 AS col0 FROM tab0 AS cor0
----
37
37
37

query I rowsort
SELECT ALL - cor0.col2 + col2 AS col2 FROM tab0 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col0 + col0 * - cor0.col0 col1 FROM tab1 AS cor0
----
-4032
-6
-6320

query I rowsort
SELECT DISTINCT - tab2.col1 + - col2 * - col1 FROM tab2
----
1475
629
806

query I rowsort
SELECT ALL - tab0.col2 + col0 FROM tab0
----
-9
34
7

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL IN ( + col2 - col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + col0 col0 FROM tab0
----
-9
34
7

query I rowsort
SELECT tab1.col0 + + col0 * col0 FROM tab1
----
12
4160
6480

query I rowsort
SELECT DISTINCT + tab1.col2 * col2 / - col2 FROM tab1 WHERE NOT NULL BETWEEN NULL AND NULL
----

query I rowsort
SELECT - col1 * tab1.col2 AS col2 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT + tab0.col0 + col0 + + col0 AS col1 FROM tab0
----
105
267
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-4906
SELECT tab2.col0 DIV col1 AS col0 FROM tab2
----
0
1
4

skipif mysql # not compatible
query I rowsort label-4906
SELECT tab2.col0 / col1 AS col0 FROM tab2
----
0
1
4

query I rowsort
SELECT col0 - - col0 FROM tab1 WHERE NULL NOT IN ( + col0 + col1 * - col0 / + col2 + - col1 )
----

query I rowsort
SELECT DISTINCT + col2 + cor0.col1 AS col2 FROM tab2 AS cor0
----
55
58
85

query III rowsort
SELECT * FROM tab0 WHERE NULL NOT IN ( + col2 * + col0 )
----

query I rowsort
SELECT ALL col0 + - col0 AS col0 FROM tab1
----
0
0
0

query III rowsort
SELECT * FROM tab1 cor0 WHERE NOT NULL NOT BETWEEN NULL AND ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col2 col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT ALL col0 - + col2 * col2 AS col0 FROM tab0
----
-1065
-6635
34

query I rowsort
SELECT DISTINCT - col1 + - col0 AS col0 FROM tab0
----
-110
-132
-180

query I rowsort
SELECT col0 * tab2.col0 AS col0 FROM tab2
----
49
6084
6241

query I rowsort
SELECT ALL col2 + - col1 AS col0 FROM tab1
----
28
47
83

query I rowsort
SELECT DISTINCT tab2.col1 + - col1 FROM tab2
----
0

query I rowsort
SELECT col2 + - col1 FROM tab2
----
-33
-4
21

query I rowsort
SELECT DISTINCT - tab1.col1 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT - col1 + - col0 AS col1 FROM tab2
----
-137
-38
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT - col1 * + col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL + + col1 + - col0 FROM tab0 cor0
----
2
62
62

query I rowsort
SELECT ALL + - cor0.col1 + cor0.col1 * + cor0.col1 FROM tab1 AS cor0
----
156
650
90

query I rowsort
SELECT - col2 * - col0 AS col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL - cor0.col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4927
SELECT ALL + ( - col2 * - CAST( NULL AS DECIMAL ) ) + col1 * + col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4927
SELECT ALL + ( - col2 * - CAST ( NULL AS REAL ) ) + col1 * + col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - tab2.col2 AS col0 FROM tab2, tab1, tab0 AS cor0, tab0
----
81 values hashing to c569638e8a09ff819458d62ddbde994c

onlyif mysql # use DIV operator for integer division
query I rowsort label-4929
SELECT + tab0.col1 * + col2 + col0 + tab0.col0 DIV tab0.col0 FROM tab0
----
133
2863
7552

skipif mysql # not compatible
query I rowsort label-4929
SELECT + tab0.col1 * + col2 + col0 + tab0.col0 / tab0.col0 FROM tab0
----
133
2863
7552

query I rowsort
SELECT DISTINCT + tab0.col0 + + col1 AS col1 FROM tab0
----
110
132
180

query I rowsort
SELECT DISTINCT - tab1.col0 FROM tab1, tab0 AS cor0
----
-3
-64
-80

query I rowsort
SELECT + col0 * + cor0.col0 + cor0.col1 FROM tab1 AS cor0
----
35
4106
6413

onlyif mysql # use DIV operator for integer division
query I rowsort label-4933
SELECT + col2 DIV col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4933
SELECT + col2 / col1 FROM tab0
----
0
0
0

query I rowsort
SELECT - 46 * col2 AS col1 FROM tab1
----
-2484
-2622
-4416

query I rowsort
SELECT + tab1.col0 * + col0 FROM tab1
----
4096
6400
9

query I rowsort
SELECT DISTINCT col1 + - col2 AS col0 FROM tab2
----
-21
33
4

query I rowsort
SELECT 27 + col2 AS col1 FROM tab0
----
109
28
60

query I rowsort
SELECT + 12 FROM tab1
----
12
12
12

onlyif mysql # use DIV operator for integer division
query I rowsort label-4939
SELECT + 49 DIV col0 FROM tab0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-4939
SELECT + 49 / col0 FROM tab0
----
0
1
2

query I rowsort
SELECT - cor0.col0 FROM tab2, tab1, tab2 cor0
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT - 5 * - col2 FROM tab2
----
130
135
190

query I rowsort
SELECT + - col0 * + col2 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + 31 * col0 AS col0 FROM tab0 cor0
----
1085
2759
744

query I rowsort
SELECT - + 26 AS col1 FROM tab1 AS cor0
----
-26
-26
-26

query I rowsort
SELECT + col0 + 85 AS col1 FROM tab0
----
109
120
174

query I rowsort
SELECT col1 + - 7 * tab2.col2 AS col2 FROM tab2
----
-123
-158
-249

query I rowsort
SELECT - tab2.col2 + - ( - col2 * tab2.col1 ) AS col0 FROM tab2
----
1508
608
810

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col2 col1 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT + col2 * col2 AS col2 FROM tab2 AS cor0
----
1444
676
729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + + 13 col2 FROM tab0 AS cor0
----
-11
-22
-76

onlyif mysql # use DIV operator for integer division
query I rowsort label-4951
SELECT DISTINCT + ( 28 ) + + col0 DIV 90 AS col2 FROM tab2 AS cor0
----
28

skipif mysql # not compatible
query I rowsort label-4951
SELECT DISTINCT + ( 28 ) + + col0 / 90 AS col2 FROM tab2 AS cor0
----
28

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4952
SELECT + CAST( - ( col2 ) AS SIGNED ) * 89 AS col1 FROM tab1 cor0
----
-4806
-5073
-8544

skipif mysql # not compatible
query I rowsort label-4952
SELECT + CAST ( - ( col2 ) AS INTEGER ) * 89 AS col1 FROM tab1 cor0
----
-4806
-5073
-8544

query I rowsort
SELECT + tab2.col2 AS col1 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT DISTINCT 92 FROM tab1, tab1 AS cor0
----
92

query I rowsort
SELECT col0 - tab0.col2 FROM tab0
----
-9
34
7

query I rowsort
SELECT ALL col1 * col1 FROM tab2
----
289
3481
961

query I rowsort
SELECT ( + col1 ) FROM tab0
----
86
91
97

query I rowsort
SELECT ALL ( tab1.col2 * + tab1.col0 ) FROM tab1, tab1 AS cor0
----
9 values hashing to cf1383d310e5e3e19470e0b8dc064d0c

query I rowsort
SELECT - ( + col0 ) * col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT + ( - col1 ) AS col0 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT - col0 * + 92 + cor0.col0 + 53 FROM tab0 cor0
----
-2131
-3132
-8046

query I rowsort
SELECT ALL - cor0.col2 * 95 FROM tab1 AS cor0
----
-5130
-5415
-9120

query I rowsort
SELECT ALL + 61 + - col0 + cor0.col0 AS col0 FROM tab2 AS cor0
----
61
61
61

query I rowsort
SELECT DISTINCT 87 * + col2 - col0 FROM tab0 AS cor0
----
2847
52
7045

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4965
SELECT ALL - col1 * 41 + col0 + CAST( NULL AS SIGNED ) col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4965
SELECT ALL - col1 * 41 + col0 + CAST ( NULL AS INTEGER ) col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 60 + col1 FROM tab0 AS cor0
----
146
151
157

query I rowsort
SELECT DISTINCT + - ( + col0 ) * - col1 * col2 + col1 FROM tab1 AS cor0
----
36490
4238
99853

query I rowsort
SELECT DISTINCT col0 + cor0.col2 * - col2 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT ALL + 68 * + col0 FROM tab0
----
1632
2380
6052

query I rowsort
SELECT DISTINCT col0 * - 77 * tab2.col2 FROM tab2
----
-14553
-156156
-231154

query I rowsort
SELECT 31 FROM tab2
----
31
31
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col0 col1 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT ALL - col2 * col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL 81 * col0 AS col0 FROM tab0 AS cor0
----
1944
2835
7209

query I rowsort
SELECT - 70 FROM tab2
----
-70
-70
-70

query I rowsort
SELECT ALL + ( - col2 + + col1 ) AS col0 FROM tab2
----
-21
33
4

query I rowsort
SELECT tab0.col2 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT + - ( - col1 ) * col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL - col1 * col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - - cor0.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * col2 col2 FROM tab2
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - cor1.col1 col0 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT - col0 * col0 AS col1 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT - + 3 + col0 * cor0.col0 FROM tab0 AS cor0
----
1222
573
7918

query I rowsort
SELECT - col0 * + cor0.col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT 81 FROM tab2 AS cor0
----
81
81
81

query I rowsort
SELECT + col0 * ( - 55 ) FROM tab1
----
-165
-3520
-4400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + col0 col1 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4989
SELECT DISTINCT - cor0.col2 * + CAST( NULL AS SIGNED ) + 52 AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4989
SELECT DISTINCT - cor0.col2 * + CAST ( NULL AS INTEGER ) + 52 AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - col1 * ( 22 * - cor0.col2 ) AS col2 FROM tab1 AS cor0
----
12540
27456
30888

query I rowsort
SELECT - - col1 * cor0.col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT - col2 - col1 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT + + cor0.col1 * - col1 * + col2 FROM tab1 AS cor0
----
-16224
-36504
-5700

query I rowsort
SELECT cor0.col2 * col2 + - col1 * + col0 FROM tab1 cor0
----
2609
2838
8176

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4995
SELECT - + col2 + CAST( + 78 AS SIGNED ) + col2 AS col1 FROM tab2 AS cor0
----
78
78
78

skipif mysql # not compatible
query I rowsort label-4995
SELECT - + col2 + CAST ( + 78 AS INTEGER ) + col2 AS col1 FROM tab2 AS cor0
----
78
78
78

query I rowsort
SELECT ALL - + col0 AS col0 FROM tab2 AS cor0
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 + + 65 col0 FROM tab1 AS cor0
----
75
78
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - - col1 * - col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL + + col0 FROM tab1 cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5001
SELECT + cor0.col2 * cor0.col0 * - ( - cor0.col0 ) + - cor0.col0 DIV col1 + - col1 AS col0 FROM tab2 AS cor0
----
1292
158124
237137

skipif mysql # not compatible
query I rowsort label-5001
SELECT + cor0.col2 * cor0.col0 * - ( - cor0.col0 ) + - cor0.col0 / col1 + - col1 AS col0 FROM tab2 AS cor0
----
1292
158124
237137

query I rowsort
SELECT ( + cor0.col2 ) + cor0.col1 + + col2 FROM tab0 AS cor0
----
152
255
99

query I rowsort
SELECT ALL ( cor0.col1 ) + cor0.col2 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 5484e660e65aa37f29a1eca3fc30f5cc

query I rowsort
SELECT + + 96 + + col1 AS col2 FROM tab2 AS cor0
----
113
127
155

query I rowsort
SELECT 90 + col2 * + col0 * + col0 AS col1 FROM tab2 cor0
----
1413
158274
237248

query I rowsort
SELECT + col1 * col2 - col1 AS col1 FROM tab1
----
1235
1378
560

query I rowsort
SELECT ALL 77 FROM tab0, tab2 AS cor0, tab2, tab2 AS cor1
----
81 values hashing to 38f487c2147ee2fe05527e38c5e0503b

query I rowsort
SELECT DISTINCT 66 FROM tab1, tab1 cor0
----
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-5009
SELECT - col0 DIV 33 AS col2 FROM tab1 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-5009
SELECT - col0 / 33 AS col2 FROM tab1 AS cor0
----
-1
-2
0

query I rowsort
SELECT col1 * + 41 * - col2 AS col1 FROM tab2 AS cor0
----
-26486
-34317
-62894

query I rowsort
SELECT col2 * 17 AS col0 FROM tab1 cor0
----
1632
918
969

query I rowsort
SELECT col1 + + 69 FROM tab0 AS cor0
----
155
160
166

onlyif mysql # use DIV operator for integer division
query I rowsort label-5013
SELECT - col2 * 10 DIV - col0 col2 FROM tab1 AS cor0
----
12
180
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5013
SELECT - col2 * 10 / - col0 col2 FROM tab1 AS cor0
----
12
180
8

query I rowsort
SELECT ALL cor0.col1 FROM tab1, tab2 cor0, tab1 cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT - cor0.col2 * 12 + - col1 FROM tab1 AS cor0
----
-1165
-674
-694

query I rowsort
SELECT col0 * col1 + col0 + col2 * 35 AS col2 FROM tab2 AS cor0
----
1169
2752
5590

onlyif mysql # use DIV operator for integer division
query I rowsort label-5017
SELECT tab1.col0 DIV + col2 AS col0 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5017
SELECT tab1.col0 / + col2 AS col0 FROM tab1
----
0
0
1

query I rowsort
SELECT 36 FROM tab0, tab1 AS cor0
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

query I rowsort
SELECT ALL + + ( col0 ) AS col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL - - col1 AS col0 FROM tab0 AS cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT + - col1 * cor0.col1 AS col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT - col1 * col2 AS col0 FROM tab0 AS cor0
----
-2838
-7462
-97

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0 CROSS JOIN tab2, tab2 AS cor1
----
972 values hashing to f9adf26f20dc8fcc43c2de18a5fd4859

query I rowsort
SELECT DISTINCT + 42 * 56 AS col1 FROM tab1, tab0 AS cor0, tab0 cor1
----
2352

query I rowsort
SELECT DISTINCT - cor0.col0 + + col2 + - col0 * + col2 FROM tab1 AS cor0
----
-111
-3655
-7664

query I rowsort
SELECT cor0.col0 * - 79 FROM tab0 AS cor0
----
-1896
-2765
-7031

query I rowsort
SELECT ALL - - col2 + col0 AS col1 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT - cor0.col0 + 37 FROM tab1 cor0
----
-27
-43
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5030
SELECT ALL - col0 + - CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5030
SELECT ALL - col0 + - CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 67 FROM tab2
----
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 90 col0 FROM tab2
----
-90

query I rowsort
SELECT ALL + tab0.col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT DISTINCT - col1 * - 18 AS col0 FROM tab0 AS cor0
----
1548
1638
1746

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0, tab2 AS cor1, tab2 AS cor2
----
972 values hashing to 617c9545df26d6d983e3967864e8e9e4

query I rowsort
SELECT - 13 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 1c6aaa07ba8d3dc01ee616e16bef60f2

query I rowsort
SELECT DISTINCT + col2 * col2 - col1 AS col0 FROM tab2 AS cor0
----
1427
617
698

query I rowsort
SELECT ALL col1 * cor0.col1 + 48 * col0 - 37 FROM tab0 AS cor0
----
11052
12516
8511

query I rowsort
SELECT ALL col2 + - col1 FROM tab0 cor0
----
-53
-9
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 * ( + 61 ) col0 FROM tab0 cor0
----
-5246
-5551
-5917

query I rowsort
SELECT DISTINCT col1 + col2 * 84 FROM tab0 AS cor0
----
181
2858
6979

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0, tab2 AS cor1, tab1, tab2 AS cor2
----
3645 values hashing to e3f81e329d34d83e4528a9ef7b933946

query I rowsort
SELECT - col1 + + 30 FROM tab1 AS cor0
----
17
20
4

query I rowsort
SELECT col1 * - col0 AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT + cor0.col0 + - col2 AS col1 FROM tab0 cor0
----
-9
34
7

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0, tab1 AS cor1, tab2, tab2 AS cor2
----
3645 values hashing to e3826bc27970dd1a441a9cd4c13b096d

query I rowsort
SELECT - col0 + 36 FROM tab0
----
-53
1
12

query I rowsort
SELECT ALL - 78 * + 1 AS col2 FROM tab0
----
-78
-78
-78

query I rowsort
SELECT DISTINCT 64 FROM tab2, tab1, tab1 cor0
----
64

query I rowsort
SELECT 21 + cor0.col2 AS col0 FROM tab2 AS cor0
----
47
48
59

query I rowsort
SELECT DISTINCT - 70 + - col1 * + ( - 89 ) FROM tab1 AS cor0
----
1087
2244
820

query I rowsort
SELECT col0 * + cor0.col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL + col1 * col1 * 61 AS col0 FROM tab1 AS cor0
----
10309
41236
6100

query I rowsort
SELECT ALL - - col2 * - col1 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * - col2 * col2 col0 FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT ALL + ( - col0 ) * + col1 AS col2 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT ( + 97 ) FROM tab1
----
97
97
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5058
SELECT tab2.col1 * col1 + col1 + col2 DIV 86 AS col0 FROM tab2
----
306
3540
992

skipif mysql # not compatible
query I rowsort label-5058
SELECT tab2.col1 * col1 + col1 + col2 / 86 AS col0 FROM tab2
----
306
3540
992

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5059
SELECT + CAST( NULL AS SIGNED ) * col2 + + col1 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5059
SELECT + CAST ( NULL AS INTEGER ) * col2 + + col1 AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 * col2 + + col2 AS col2 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT - tab1.col0 + + ( tab1.col2 ) AS col1 FROM tab1
----
-7
16
51

query I rowsort
SELECT DISTINCT col1 + ( - col1 ) + 23 AS col1 FROM tab0
----
23

query I rowsort
SELECT DISTINCT col2 * cor0.col0 * ( - col2 * cor0.col1 ) AS col1 FROM tab2 AS cor0
----
-158193
-1939292
-3110952

query I rowsort
SELECT + col2 * col0 + + 22 * - col0 FROM tab1 AS cor0
----
2240
5920
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 35 * - col2 + + col0 col0 FROM tab2 AS cor0
----
-1251
-832
-938

query I rowsort
SELECT ALL - col2 * - col2 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT + 52 * + col2 - - col2 AS col0 FROM tab0 AS cor0
----
1749
4346
53

query I rowsort
SELECT DISTINCT + - cor0.col0 * col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL col0 + + col1 * - 74 FROM tab2 AS cor0
----
-1179
-2287
-4288

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + col2 ) col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT + 34 AS col2 FROM tab0 AS cor0
----
34

query I rowsort
SELECT ALL - col0 - - col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab1 AS cor0
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * col2 + col2 col1 FROM tab2 cor0
----
1560
684
864

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 col2 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT + + cor0.col0 + + 1 AS col1 FROM tab1 AS cor0
----
4
65
81

query I rowsort
SELECT DISTINCT - cor1.col0 FROM tab2, tab0 AS cor0, tab2 cor1
----
-7
-78
-79

query I rowsort
SELECT - ( - col1 ) AS col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT - 37 AS col2 FROM tab0, tab0 AS cor0
----
-37

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5080
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-5080
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab2
----
NULL

query I rowsort
SELECT + ( + 89 ) FROM tab0
----
89
89
89

query I rowsort
SELECT ALL - 85 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 8ebc8ffafb1517ea04e3a6fc4059d88a

query I rowsort
SELECT DISTINCT - - col0 + + col0 * col0 FROM tab0 cor0
----
1260
600
8010

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5084
SELECT ALL - col0 + 86 * - col1 * - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5084
SELECT ALL - col0 + 86 * - col1 * - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 82 col2 FROM tab1, tab0 AS cor0
----
9 values hashing to f318fd9dac2de7af4b82cc7574bbca2c

query I rowsort
SELECT ALL - col0 * - 30 * + col0 FROM tab1 AS cor0
----
122880
192000
270

query I rowsort
SELECT DISTINCT ( + col2 ) * cor0.col2 AS col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT - 8 * col1 + + col0 AS col2 FROM tab2 AS cor0
----
-241
-394
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5089
SELECT + + CAST( - col1 AS SIGNED ) * - col0 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-5089
SELECT + + CAST ( - col1 AS INTEGER ) * - col0 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT + + col1 + col1 * + col2 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT + col2 * col0 * 3 FROM tab1 AS cor0
----
10944
23040
486

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 88 + + col2 col2 FROM tab2 AS cor0
----
114
115
126

query I rowsort
SELECT DISTINCT col2 * + col2 AS col2 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT - + col2 * col2 AS col1 FROM tab0 AS cor0
----
-1
-1089
-6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-5095
SELECT ALL - col1 DIV col0 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-5095
SELECT ALL - col1 / col0 FROM tab2 AS cor0
----
-4
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 65 * - col2 col1 FROM tab1 AS cor0
----
-3510
-3705
-6240

query I rowsort
SELECT ALL + + col0 * col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL - + col1 * - col1 * + col0 + cor0.col1 * - col2 FROM tab1 AS cor0
----
12272
5830
624

query I rowsort
SELECT DISTINCT - col0 + - col0 * + 18 AS col0 FROM tab1 AS cor0
----
-1216
-1520
-57

query I rowsort
SELECT - - col2 * + col2 AS col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ALL + tab1.col2 * tab1.col2 * tab1.col1 AS col0 FROM tab1
----
119808
32490
75816

query I rowsort
SELECT ALL - 7 * col2 * + col0 FROM tab1
----
-1134
-25536
-53760

query I rowsort
SELECT DISTINCT + 77 FROM tab2, tab0 AS cor0
----
77

query I rowsort
SELECT ALL - col2 * ( + col0 ) FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - + cor0.col1 + col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT ALL - cor0.col2 * col0 + - col0 AS col1 FROM tab0 AS cor0
----
-70
-7387
-816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + col2 col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT col2 * ( + col2 ) * col2 + - col0 AS col2 FROM tab0 cor0
----
-34
35913
551279

query I rowsort
SELECT DISTINCT - col2 + col1 - + 62 FROM tab1 AS cor0
----
-109
-145
-90

query I rowsort
SELECT col2 * - ( 4 ) + col1 AS col0 FROM tab1 cor0
----
-190
-218
-371

query I rowsort
SELECT ALL - col2 * col2 + + 86 * col2 FROM tab1 AS cor0
----
-960
1653
1728

query I rowsort
SELECT cor0.col0 + 85 AS col1 FROM tab0 AS cor0
----
109
120
174

query I rowsort
SELECT ALL + col0 + - 20 * col1 FROM tab0 AS cor0
----
-1696
-1731
-1905

query I rowsort
SELECT + col2 + - col1 * - col0 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT DISTINCT col0 * ( cor0.col0 ) * + col2 AS col0 FROM tab2 AS cor0
----
1323
158184
237158

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT ALL - - col1 + - ( col1 + + col1 ) AS col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT + col1 - col1 AS col2 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL 8 + - col1 AS col2 FROM tab0
----
-78
-83
-89

query I rowsort
SELECT ( + col2 ) + - col0 + 89 FROM tab2
----
109
37
48

query I rowsort
SELECT ALL col1 * + col1 + + tab1.col0 FROM tab1
----
164
249
679

query I rowsort
SELECT DISTINCT + tab2.col0 + - col1 FROM tab2
----
-24
19
62

query I rowsort
SELECT ALL ( col1 ) + col2 FROM tab0
----
119
173
98

query I rowsort
SELECT DISTINCT col1 + col2 AS col0 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT col0 + cor0.col1 AS col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT - col0 + + col1 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT + - col1 * 30 + + 40 FROM tab0 AS cor0
----
-2540
-2690
-2870

query I rowsort
SELECT 75 FROM tab0 AS cor0
----
75
75
75

query I rowsort
SELECT + 55 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
27 values hashing to 832128adb1ddc65c3105e29cc2c8b3a3

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab0 cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-5131
SELECT ALL col1 DIV cor0.col2 + col2 AS col1 FROM tab0 AS cor0
----
35
83
98

skipif mysql # not compatible
query I rowsort label-5131
SELECT ALL col1 / cor0.col2 + col2 AS col1 FROM tab0 AS cor0
----
35
83
98

query I rowsort
SELECT col1 + col1 FROM tab2 AS cor0
----
118
34
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + 5 * col0 col2 FROM tab1 AS cor0
----
330
41
413

query I rowsort
SELECT + - 25 + 0 * + col2 AS col2 FROM tab0 AS cor0
----
-25
-25
-25

query I rowsort
SELECT 92 + - col0 AS col0 FROM tab1 AS cor0
----
12
28
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5136
SELECT + col2 * + CAST( NULL AS SIGNED ) col2 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5136
SELECT + col2 * + CAST ( NULL AS INTEGER ) col2 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 34 + - col0 * cor0.col1 col0 FROM tab2 AS cor0
----
-1377
-251
-4636

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col0 col0 FROM tab0
----
24
35
89

query I rowsort
SELECT col1 * col0 AS col1 FROM tab1
----
1040
640
78

query I rowsort
SELECT DISTINCT + 23 AS col2 FROM tab2
----
23

query I rowsort
SELECT DISTINCT + col2 * 32 * tab0.col2 FROM tab0
----
215168
32
34848

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( col0 AS REAL ) AS col1 FROM tab1
----
3
64
80

query I rowsort
SELECT + ( col2 ) + + col1 * - col2 AS col1 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT - 89 FROM tab2 AS cor0
----
-89
-89
-89

query I rowsort
SELECT - - 33 + + col0 AS col1 FROM tab0 AS cor0
----
122
57
68

query I rowsort
SELECT DISTINCT - 88 * - col0 + + col0 AS col2 FROM tab2 AS cor0
----
623
6942
7031

query I rowsort
SELECT DISTINCT - col0 * - col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT - - 55 AS col1 FROM tab1 AS cor0
----
55
55
55

query I rowsort
SELECT ALL + tab2.col2 + col0 + + ( ( + col0 ) ) AS col0 FROM tab2
----
182
196
41

query I rowsort
SELECT DISTINCT col2 * + col0 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL - - 19 FROM tab1 AS cor0
----
19
19
19

query I rowsort
SELECT - cor0.col0 * + col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL - col0 + col2 * cor0.col2 FROM tab2 cor0
----
1365
598
722

query I rowsort
SELECT - - 89 * + col0 FROM tab2 AS cor0
----
623
6942
7031

query I rowsort
SELECT ALL - + 50 FROM tab1 cor0
----
-50
-50
-50

query I rowsort
SELECT col2 * cor0.col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT 80 * col0 AS col2 FROM tab1 AS cor0
----
240
5120
6400

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5158
SELECT - col0 * + CAST( 17 * col0 AS SIGNED ) FROM tab0 cor0
----
-134657
-20825
-9792

skipif mysql # not compatible
query I rowsort label-5158
SELECT - col0 * + CAST ( 17 * col0 AS INTEGER ) FROM tab0 cor0
----
-134657
-20825
-9792

query I rowsort
SELECT + cor0.col2 - - cor0.col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT - - col2 * col2 + + 75 * + col1 FROM tab0 AS cor0
----
13549
7276
7539

query I rowsort
SELECT ALL + col2 + - col1 FROM tab2
----
-33
-4
21

query I rowsort
SELECT col2 + - ( col0 ) FROM tab0 AS cor0
----
-34
-7
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + col2 col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL - 26 FROM tab2 AS cor0
----
-26
-26
-26

query I rowsort
SELECT DISTINCT col0 * + col2 * col1 AS col1 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT DISTINCT 28 * + 8 FROM tab0
----
224

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + - col2 col1 FROM tab1 AS cor0
----
-121
-176
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-5168
SELECT DISTINCT 8 DIV cor0.col2 - 85 AS col2 FROM tab1 cor0
----
-85

skipif mysql # not compatible
query I rowsort label-5168
SELECT DISTINCT 8 / cor0.col2 - 85 AS col2 FROM tab1 cor0
----
-85

query I rowsort
SELECT DISTINCT + cor0.col0 * - cor0.col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT - 25 AS col0 FROM tab1 AS cor0
----
-25
-25
-25

query I rowsort
SELECT DISTINCT 74 * + col0 - + col0 FROM tab0 AS cor0
----
1752
2555
6497

query I rowsort
SELECT DISTINCT - + col1 - col0 AS col1 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT ALL - ( col1 ) + col0 FROM tab1 cor0
----
-23
54
67

query I rowsort
SELECT + 83 FROM tab0
----
83
83
83

query I rowsort
SELECT DISTINCT - 17 FROM tab0
----
-17

query I rowsort
SELECT - 18 + - col2 AS col2 FROM tab1
----
-114
-72
-75

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5177
SELECT DISTINCT - CAST( NULL AS DECIMAL ) * - ( tab2.col0 + col2 ) * - col2 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-5177
SELECT DISTINCT - CAST ( NULL AS REAL ) * - ( tab2.col0 + col2 ) * - col2 FROM tab2
----
NULL

query I rowsort
SELECT DISTINCT + 83 AS col2 FROM tab0
----
83

query I rowsort
SELECT DISTINCT tab0.col0 - + col0 AS col1 FROM tab0
----
0

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0, tab1, tab2 cor1
----
972 values hashing to 49c8bf3e931a898ba7af63d0e377eb79

query I rowsort
SELECT + tab2.col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT DISTINCT + - col0 * col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT - ( cor0.col2 ) * + 17 FROM tab2 AS cor0
----
-442
-459
-646

query I rowsort
SELECT DISTINCT - 56 * col2 FROM tab1 AS cor0
----
-3024
-3192
-5376

query I rowsort
SELECT DISTINCT - - 45 AS col1 FROM tab0 AS cor0
----
45

query I rowsort
SELECT ALL 85 + - cor0.col0 FROM tab2 AS cor0
----
6
7
78

query I rowsort
SELECT ALL + col1 * + col1 + - col0 FROM tab0 AS cor0
----
7372
8192
9374

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 57 + col2 col0 FROM tab1 AS cor0
----
111
114
153

query I rowsort
SELECT - - cor0.col1 + ( col0 + + col2 * - col1 ) FROM tab0 AS cor0
----
-2728
-7282
35

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 76903cfa3a27727fd541d9dcdf362a4c

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0, tab2 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to fb3687512d3714969d7c6afc5561ed79

query I rowsort
SELECT cor0.col1 AS col1 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT + + 21 AS col0 FROM tab1 AS cor0
----
21
21
21

query I rowsort
SELECT - - col2 * col2 AS col1 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT ALL + cor0.col1 FROM tab0, tab2 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT - 29 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 0cc9ddad93fc783055518ae4b6be054b

query I rowsort
SELECT DISTINCT + cor0.col2 * + col0 + col0 * + ( 52 ) FROM tab2 AS cor0
----
553
6084
7110

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col1 + col0 col1 FROM tab1 AS cor0
----
-576
-75
-960

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0, tab1, tab1 AS cor1
----
972 values hashing to d222ba302bd1ddd1c8b2ddf1a4d0b07a

query I rowsort
SELECT DISTINCT - 22 + + ( + col0 ) * 64 FROM tab2 AS cor0
----
426
4970
5034

onlyif mysql # use DIV operator for integer division
query I rowsort label-5201
SELECT - col1 * - col0 + col0 DIV cor0.col1 + + col1 DIV - col0 FROM tab0 cor0
----
2061
3393
8098

skipif mysql # not compatible
query I rowsort label-5201
SELECT - col1 * - col0 + col0 / cor0.col1 + + col1 / - col0 FROM tab0 cor0
----
2061
3393
8098

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( + col1 ) col0 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT + ( col2 ) AS col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT col1 * 2 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT ALL - col1 * col0 + - cor0.col1 + col0 * + col2 * col0 AS col2 FROM tab2 AS cor0
----
1075
153523
235798

query I rowsort
SELECT + col1 + - col2 AS col2 FROM tab2 AS cor0
----
-21
33
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-5207
SELECT ALL - 96 DIV col2 AS col2 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5207
SELECT ALL - 96 / col2 AS col2 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + ( + 95 ) + + col0 FROM tab1 AS cor0
----
159
175
98

query I rowsort
SELECT ALL + - ( + col0 ) FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT ( 55 ) FROM tab2 AS cor0
----
55

query I rowsort
SELECT + + cor0.col1 AS col2 FROM tab2 AS cor0
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-5212
SELECT ALL - 45 * 75 + col2 DIV - cor0.col0 FROM tab0 AS cor0
----
-3375
-3375
-3376

skipif mysql # not compatible
query I rowsort label-5212
SELECT ALL - 45 * 75 + col2 / - cor0.col0 FROM tab0 AS cor0
----
-3375
-3375
-3376

query I rowsort
SELECT DISTINCT ( - col2 ) AS col0 FROM tab1 cor0
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( 18 ) col1 FROM tab0 AS cor0
----
18

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5215
SELECT ( + col1 ) + col2 * - CAST( + col0 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-158
-1969
-2985

skipif mysql # not compatible
query I rowsort label-5215
SELECT ( + col1 ) + col2 * - CAST ( + col0 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT ALL + 98 FROM tab0 AS cor0
----
98
98
98

query I rowsort
SELECT DISTINCT + cor0.col1 * - col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + 92 * col0 FROM tab2 AS cor0
----
644
7176
7268

query I rowsort
SELECT ( - col0 ) * - col2 + + 1 AS col1 FROM tab0 cor0
----
36
7299
793

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + col2 col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL col0 + + col0 * - 30 AS col1 FROM tab0 AS cor0
----
-1015
-2581
-696

query I rowsort
SELECT - - col0 * - cor0.col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT - col2 + cor0.col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL 22 * col0 AS col2 FROM tab2 AS cor0
----
154
1716
1738

query I rowsort
SELECT - cor0.col2 * col0 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT - 86 AS col0 FROM tab2 cor0
----
-86

query I rowsort
SELECT DISTINCT + 56 * - col1 * + col1 AS col0 FROM tab0 AS cor0
----
-414176
-463736
-526904

query I rowsort
SELECT DISTINCT cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 19 col2 FROM tab2, tab2 AS cor0 CROSS JOIN tab0
----
27 values hashing to 86c53e8567a17c8d91fc5aff119e0498

query I rowsort
SELECT DISTINCT + 46 AS col2 FROM tab0
----
46

query I rowsort
SELECT col1 + + col2 FROM tab2 AS cor0
----
55
58
85

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0, tab1 AS cor1, tab1 cor2
----
972 values hashing to 7864aada86bf5bf5e1621c7905de8dcd

query I rowsort
SELECT DISTINCT - + col0 + + 68 FROM tab0 AS cor0
----
-21
33
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col1 col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL - - col2 * col1 AS col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL + col1 * + 67 FROM tab2 AS cor0
----
1139
2077
3953

query I rowsort
SELECT ALL - + cor0.col0 - ( col0 ) FROM tab2 AS cor0
----
-14
-156
-158

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0, tab2 AS cor1, tab1 AS cor2
----
972 values hashing to 980274175fafec015a83080672486a9a

query I rowsort
SELECT + 4 FROM tab0, tab1 cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5240
SELECT - cor0.col1 + CAST( col0 * col2 AS SIGNED ) + + col1 FROM tab1 AS cor0
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-5240
SELECT - cor0.col1 + CAST ( col0 * col2 AS INTEGER ) + + col1 FROM tab1 AS cor0
----
162
3648
7680

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 AS cor0, tab0 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 028fd38910121a0fa7c5b9a24c207cf0

query I rowsort
SELECT col0 + - ( ( col0 ) ) FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT col2 + 95 AS col2 FROM tab2
----
121
122
133

query I rowsort
SELECT DISTINCT - col0 + - 11 FROM tab2
----
-18
-89
-90

query I rowsort
SELECT ALL col2 + - ( + 25 ) FROM tab2
----
1
13
2

query I rowsort
SELECT ALL - col1 * - ( - col2 ) FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL 80 AS col2 FROM tab1 AS cor0
----
80
80
80

query I rowsort
SELECT + 25 * col0 + + col1 * 92 FROM tab2 AS cor0
----
3027
3539
7378

query I rowsort
SELECT ALL - col2 * + tab1.col0 + + tab1.col0 * + tab1.col2 * - col0 FROM tab1
----
-237120
-622080
-648

query I rowsort
SELECT tab2.col1 + - 65 + 4 FROM tab2
----
-2
-30
-44

query I rowsort
SELECT DISTINCT + col1 + + tab0.col0 * + col1 FROM tab0
----
2150
3492
8190

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + ( - col0 ) + - col1 col2 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT - col1 * tab2.col2 * col0 + col0 FROM tab2
----
-119574
-50955
-5852

query I rowsort
SELECT DISTINCT + col0 + - 84 * + col0 * col2 AS col0 FROM tab2
----
-15869
-170274
-252089

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab0, tab1 cor0
----
54
57
96

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0, tab0, tab0 AS cor1
----
972 values hashing to ea0f747588ddf5869ee18a5e22d9f237

query I rowsort
SELECT DISTINCT cor1.col2 AS col0 FROM tab1, tab2 cor0, tab1 AS cor1
----
54
57
96

query I rowsort
SELECT DISTINCT + col0 - + col1 AS col1 FROM tab1 cor0
----
-23
54
67

query I rowsort
SELECT - - col2 * col1 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + - col1 + - col0 FROM tab0 AS cor0
----
-110
-132
-180

onlyif mysql # use DIV operator for integer division
query I rowsort label-5261
SELECT ALL - + col2 + - col1 * col0 DIV 41 AS col0 FROM tab1 AS cor0
----
-121
-55
-72

skipif mysql # not compatible
query I rowsort label-5261
SELECT ALL - + col2 + - col1 * col0 / 41 AS col0 FROM tab1 AS cor0
----
-121
-55
-72

query I rowsort
SELECT DISTINCT + 24 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
24

query I rowsort
SELECT ALL - col2 + + 8 FROM tab1 cor0
----
-46
-49
-88

query I rowsort
SELECT DISTINCT - col1 * cor0.col2 - - col0 * + col0 FROM tab1 cor0
----
-1395
3526
5152

query I rowsort
SELECT col0 * + 98 + - 59 FROM tab0 AS cor0
----
2293
3371
8663

query I rowsort
SELECT - col1 * + 57 + - 47 AS col0 FROM tab2 AS cor0
----
-1016
-1814
-3410

query I rowsort
SELECT + - cor0.col1 + - col1 FROM tab1 cor0
----
-20
-26
-52

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT - col1 + - ( - col1 ) * col1 * cor0.col2 AS col1 FROM tab0 AS cor0
----
243982
678951
9312

query I rowsort
SELECT col0 + - col1 * - col1 FROM tab1
----
164
249
679

query I rowsort
SELECT 94 * col0 AS col2 FROM tab1
----
282
6016
7520

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5272
SELECT DISTINCT CAST( - 88 AS SIGNED ) * col1 + - col2 FROM tab2
----
-1534
-2755
-5218

skipif mysql # not compatible
query I rowsort label-5272
SELECT DISTINCT CAST ( - 88 AS INTEGER ) * col1 + - col2 FROM tab2
----
-1534
-2755
-5218

query I rowsort
SELECT DISTINCT 59 * + col1 + col2 + + col2 FROM tab2
----
1079
1883
3533

query I rowsort
SELECT ALL - ( col0 ) * col1 + tab1.col1 * col2 + - col2 FROM tab1
----
-127
112
1272

query I rowsort
SELECT col0 + tab0.col2 + - col1 FROM tab0
----
-29
-61
80

query I rowsort
SELECT DISTINCT col2 + 70 AS col1 FROM tab2
----
108
96
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5277
SELECT col1 DIV - col0 AS col1 FROM tab0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-5277
SELECT col1 / - col0 AS col1 FROM tab0
----
-1
-2
-3

query I rowsort
SELECT ALL cor0.col1 * 60 FROM tab0 AS cor0
----
5160
5460
5820

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
-10
-13
-26

query I rowsort
SELECT ALL + col0 * col0 + col0 FROM tab2 cor0
----
56
6162
6320

query I rowsort
SELECT - - col0 + - ( - col2 ) * + ( 76 ) AS col1 FROM tab2 AS cor0
----
2054
2059
2967

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( col0 ) col2 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT cor0.col0 + + col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT DISTINCT + ( - 53 ) AS col1 FROM tab0 AS cor0
----
-53

query I rowsort
SELECT DISTINCT + + 48 + 68 * col1 FROM tab2 AS cor0
----
1204
2156
4060

query I rowsort
SELECT ALL - ( + cor0.col0 ) + + col0 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT - - ( + col1 ) * - col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT - col1 AS col0 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT + + 12 * cor0.col1 * - cor0.col0 + col2 FROM tab0 AS cor0
----
-24735
-40739
-97106

query I rowsort
SELECT 0 + col2 * + 2 FROM tab0 cor0
----
164
2
66

query I rowsort
SELECT DISTINCT + col1 * col2 + 64 * ( - col1 ) AS col2 FROM tab0 AS cor0
----
-2666
-6111
1638

query I rowsort
SELECT + col2 + col2 AS col0 FROM tab0 cor0
----
164
2
66

query I rowsort
SELECT ALL - - col2 AS col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT + ( cor0.col0 ) * col0 AS col0 FROM tab1 AS cor0
----
4096
6400
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 col1 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT + ( col0 ) * col1 AS col0 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - - col2 + - cor0.col2 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT + - col2 * - col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ALL - + col0 * col2 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT col2 * + cor0.col0 AS col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT + col2 * - col0 + - col1 * 22 FROM tab0
----
-2169
-2684
-9300

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5302
SELECT + CAST( - col1 * col0 AS SIGNED ) + col0 + 31 * col0 * - 43 FROM tab2
----
-106571
-108498
-9541

skipif mysql # not compatible
query I rowsort label-5302
SELECT + CAST ( - col1 * col0 AS INTEGER ) + col0 + 31 * col0 * - 43 FROM tab2
----
-106571
-108498
-9541

query I rowsort
SELECT - tab0.col2 * col2 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT 99 AS col0 FROM tab2
----
99
99
99

query I rowsort
SELECT + col0 * + col2 + - 78 FROM tab1 AS cor0
----
3570
7602
84

query I rowsort
SELECT + 90 * + col1 + - 28 FROM tab2 AS cor0
----
1502
2762
5282

query I rowsort
SELECT col2 + - cor0.col2 * + col0 AS col0 FROM tab0 cor0
----
-34
-7216
-759

query I rowsort
SELECT - cor1.col0 FROM tab0, tab2 AS cor0, tab2 cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT ALL - ( - col1 * col1 ) FROM tab2
----
289
3481
961

query I rowsort
SELECT 18 AS col2 FROM tab2 cor0
----
18
18
18

query I rowsort
SELECT col1 * + cor0.col1 + + 63 FROM tab0 AS cor0
----
7459
8344
9472

query I rowsort
SELECT ALL - col1 + col1 AS col0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5313
SELECT + - col0 + col2 DIV + col2 + col2 * col2 DIV - cor0.col2 FROM tab0 cor0
----
-170
-35
-56

skipif mysql # not compatible
query I rowsort label-5313
SELECT + - col0 + col2 / + col2 + col2 * col2 / - cor0.col2 FROM tab0 cor0
----
-170
-35
-56

query I rowsort
SELECT DISTINCT - - col0 + - col0 * - col1 AS col1 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT ALL + col1 + + col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT + col0 * + ( + 16 ) * - col0 FROM tab2 AS cor0
----
-784
-97344
-99856

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 col0 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT cor0.col0 + 88 + col2 FROM tab2 AS cor0
----
122
192
205

query I rowsort
SELECT + col1 + - ( + col0 ) + + cor0.col1 * - ( cor0.col2 ) FROM tab0 cor0
----
-2776
-35
-7460

query I rowsort
SELECT - col0 * col1 AS col0 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT tab1.col2 FROM tab1, tab0, tab1 cor0
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT - + col1 * col1 + col2 AS col2 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT - 73 FROM tab2 AS cor0
----
-73
-73
-73

query I rowsort
SELECT - - ( + col0 ) + col1 * + col2 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT - ( 2 ) AS col2 FROM tab2 AS cor0
----
-2
-2
-2

query I rowsort
SELECT + + col0 * cor0.col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT ALL + 12 AS col0 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 702478c53caf2f7ebb9fff96d800f5a6

query I rowsort
SELECT - col2 + + 38 FROM tab1
----
-16
-19
-58

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

query I rowsort
SELECT ALL col2 + + col2 FROM tab2
----
52
54
76

query I rowsort
SELECT - ( - col2 ) * col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ALL + col2 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT + ( cor0.col2 ) FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT + col2 * + col2 + + col1 + - cor0.col0 FROM tab0 AS cor0
----
1151
63
6726

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT + - CAST ( col0 AS REAL ) col1 FROM tab2 AS cor0
----
-7
-78
-79

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 cor0, tab2, tab2 AS cor1
----
972 values hashing to a698694a7dac245e42212ff0316bdf45

query I rowsort
SELECT - cor0.col2 * ( - 55 ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8a756501255b38d6a7d7b424505dacb7

query I rowsort
SELECT ALL - - col1 * 6 + cor0.col2 * - col1 + col2 AS col2 FROM tab1 AS cor0
----
-1074
-1194
-453

query I rowsort
SELECT ALL - + col2 - 34 * cor0.col0 FROM tab1 AS cor0
----
-156
-2233
-2816

query I rowsort
SELECT DISTINCT + - col0 * col2 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT + col0 + - col1 * 36 FROM tab1 AS cor0
----
-296
-388
-933

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5342
SELECT ALL - col1 + - CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5342
SELECT ALL - col1 + - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5343
SELECT DISTINCT + cor0.col2 DIV col0 - 86 FROM tab0 AS cor0
----
-85
-86

skipif mysql # not compatible
query I rowsort label-5343
SELECT DISTINCT + cor0.col2 / col0 - 86 FROM tab0 AS cor0
----
-85
-86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 * - 67 - 30 col1 FROM tab1 cor0
----
-231
-4318
-5390

query I rowsort
SELECT ALL col1 * + col1 AS col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT col1 + + ( col2 ) FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT - - col2 * + ( - col1 ) AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + col1 * - col0 AS col1 FROM tab1
----
-1040
-640
-78

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0, tab0 AS cor0, tab1 AS cor1
----
972 values hashing to 5621675b1bd32b061d284d0444c76601

query I rowsort
SELECT 78 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to d8e5ef4db3419fc251e82c50ba04e048

query I rowsort
SELECT ALL col2 * + 93 + + cor0.col0 AS col1 FROM tab1 AS cor0
----
5025
5365
9008

query I rowsort
SELECT DISTINCT + cor0.col2 * - ( - cor0.col2 ) + - col1 FROM tab1 AS cor0
----
2890
3239
9203

query I rowsort
SELECT DISTINCT + 28 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
28

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab1, tab0 AS cor2
----
3645 values hashing to 3b4587ab6c08d2179c6df094d2f76ad7

query I rowsort
SELECT + col1 * 26 FROM tab1 AS cor0
----
260
338
676

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT ALL + tab2.col0 AS col1 FROM tab2, tab1 cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0, tab2, tab0 AS cor1
----
972 values hashing to e4c748f267e8d2a0e6d563281e1fb975

query I rowsort
SELECT DISTINCT 23 FROM tab2, tab1 cor0
----
23

query I rowsort
SELECT ALL 34 - - col0 * cor0.col1 FROM tab1 AS cor0
----
1074
112
674

query I rowsort
SELECT - 92 FROM tab1, tab1 AS cor0
----
9 values hashing to 1af709a79a3e56281ffdce4d931d5965

query I rowsort
SELECT + cor0.col2 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT ALL - + cor0.col2 * col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + 52 - + ( col1 ) AS col1 FROM tab0
----
-34
-39
-45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 + + col1 col1 FROM tab0 AS cor0
----
2
62
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-5366
SELECT - tab0.col2 DIV - 46 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 953562d3ce2a62a1679a1ae0451294c6

skipif mysql # not compatible
query I rowsort label-5366
SELECT - tab0.col2 / - 46 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 953562d3ce2a62a1679a1ae0451294c6

query I rowsort
SELECT - tab1.col1 * - col0 - - col1 * - col1 FROM tab1
----
-598
540
871

query I rowsort
SELECT DISTINCT + 36 AS col2 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
36

onlyif mysql # use DIV operator for integer division
query I rowsort label-5369
SELECT tab2.col2 DIV + col0 - col2 AS col1 FROM tab2
----
-24
-26
-38

skipif mysql # not compatible
query I rowsort label-5369
SELECT tab2.col2 / + col0 - col2 AS col1 FROM tab2
----
-24
-26
-38

query I rowsort
SELECT 78 FROM tab0
----
78
78
78

query I rowsort
SELECT + col0 + + tab1.col2 FROM tab1
----
121
176
57

query I rowsort
SELECT DISTINCT + col1 + + col2 AS col1 FROM tab2
----
55
58
85

query I rowsort
SELECT + col1 + col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT + 49 + - cor0.col2 FROM tab2 AS cor0
----
11
22
23

query I rowsort
SELECT col2 * + col2 AS col2 FROM tab0
----
1
1089
6724

query I rowsort
SELECT DISTINCT + 72 * + col1 + + 36 * - 12 + col2 AS col1 FROM tab1
----
1494
345
600

onlyif mysql # use DIV operator for integer division
query I rowsort label-5377
SELECT + col0 DIV col1 AS col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5377
SELECT + col0 / col1 AS col1 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col1 + col0 col2 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT ALL 61 FROM tab2 AS cor0
----
61
61
61

query I rowsort
SELECT DISTINCT 30 + col2 FROM tab2 AS cor0
----
56
57
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL - cor0.col0 + + cor0.col2 AS col1 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT + col0 + col2 * + cor0.col2 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT ALL + cor0.col1 * ( - 18 ) AS col0 FROM tab2 AS cor0
----
-1062
-306
-558

query I rowsort
SELECT DISTINCT cor0.col2 * + ( + 79 + - cor0.col2 ) FROM tab0 AS cor0
----
-246
1518
78

query I rowsort
SELECT - col1 * + 49 + + col2 FROM tab0 cor0
----
-4181
-4377
-4752

query I rowsort
SELECT ALL col2 + + col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT tab1.col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + cor0.col2 + + 55 col1 FROM tab2 AS cor0
----
-1479
-591
-782

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * col0 + - col0 col0 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT DISTINCT - col1 - + col0 * 41 FROM tab1 AS cor0
----
-149
-2634
-3293

query I rowsort
SELECT DISTINCT + col1 + col1 AS col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT + col0 * - col1 - - 9 FROM tab2
----
-1334
-208
-4593

query I rowsort
SELECT ALL + col1 * + 94 * + ( - col2 ) + + col2 FROM tab0 cor0
----
-266739
-701346
-9117

onlyif mysql # use DIV operator for integer division
query I rowsort label-5395
SELECT ALL - + cor0.col2 - col0 DIV - 9 FROM tab2 AS cor0
----
-18
-27
-30

skipif mysql # not compatible
query I rowsort label-5395
SELECT ALL - + cor0.col2 - col0 / - 9 FROM tab2 AS cor0
----
-18
-27
-30

query I rowsort
SELECT - 7 AS col0 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 82db7c0390abae7ccf4512b1302a6466

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5397
SELECT CAST( NULL AS SIGNED ) * + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5397
SELECT CAST ( NULL AS INTEGER ) * + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 51 AS col2 FROM tab1 AS cor0
----
51
51
51

query I rowsort
SELECT - 70 AS col2 FROM tab2
----
-70
-70
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-5400
SELECT ALL - col2 DIV - col1 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-5400
SELECT ALL - col2 / - col1 FROM tab1
----
2
5
7

query I rowsort
SELECT ALL + + ( col1 ) + col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT 71 FROM tab2 AS cor0
----
71
71
71

query IIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0 WHERE ( NULL ) <> NULL
----

query I rowsort
SELECT ALL 48 AS col1 FROM tab1 AS cor0
----
48
48
48

query I rowsort
SELECT + 22 * cor0.col2 FROM tab1 cor0
----
1188
1254
2112

query I rowsort
SELECT DISTINCT - col0 + + col0 * + col1 AS col2 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT ( col0 ) FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT col1 + 66 AS col0 FROM tab2 AS cor0
----
125
83
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab1, tab0 AS cor0, tab1 cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT DISTINCT - 91 * - col2 FROM tab2 cor0
----
2366
2457
3458

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5411
SELECT 91 * col1 / + CAST( NULL AS SIGNED ) col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5411
SELECT 91 * col1 / + CAST ( NULL AS INTEGER ) col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 + - col0 * col2 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT DISTINCT - + col2 + cor0.col2 AS col2 FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT - col0 * + col0 + cor0.col1 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT ALL + 3 AS col2 FROM tab0 AS cor0
----
3
3
3

query I rowsort
SELECT + col1 + col0 * - cor0.col2 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT ALL col0 * cor0.col0 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT cor0.col0 * cor0.col1 + - col2 * cor0.col0 FROM tab2 AS cor0
----
-1659
2574
28

query I rowsort
SELECT DISTINCT - ( col0 ) * cor0.col0 FROM tab2 AS cor0
----
-49
-6084
-6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-5421
SELECT 9 DIV + col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5421
SELECT 9 / + col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + + col2 AS col0 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT + + 67 * + cor0.col2 + - 47 AS col1 FROM tab0 AS cor0
----
20
2164
5447

query I rowsort
SELECT ALL col2 * col1 AS col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT - 13 FROM tab0 AS cor0
----
-13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 2 col0 FROM tab1
----
2
2
2

query I rowsort
SELECT - col2 * 64 FROM tab2
----
-1664
-1728
-2432

query I rowsort
SELECT DISTINCT - ( 8 ) * col2 + col0 - + col0 AS col2 FROM tab0
----
-264
-656
-8

query I rowsort
SELECT - 65 * cor0.col2 + + col0 * ( col2 * + col2 ) FROM tab0 AS cor0
----
-30
23991
593106

query I rowsort
SELECT - - 35 + - col0 FROM tab1 AS cor0
----
-29
-45
32

query I rowsort
SELECT - 62 + + 12 AS col0 FROM tab2 AS cor0
----
-50
-50
-50

query I rowsort
SELECT ( - 34 ) + - cor0.col2 * + 20 FROM tab1 AS cor0
----
-1114
-1174
-1954

query I rowsort
SELECT ALL col1 + + col1 AS col0 FROM tab2
----
118
34
62

query I rowsort
SELECT col2 + - col1 + col1 AS col1 FROM tab2
----
26
27
38

query I rowsort
SELECT col0 + col0 + + col0 * tab1.col2 FROM tab1
----
168
3776
7840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5436
SELECT + CAST( NULL AS SIGNED ) * col1 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5436
SELECT + CAST ( NULL AS INTEGER ) * col1 AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( 25 ) FROM tab0
----
25
25
25

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5438
SELECT CAST( NULL AS SIGNED ) * + 88 + + col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5438
SELECT CAST ( NULL AS INTEGER ) * + 88 + + col1 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5439
SELECT + CAST( col0 * + col0 AS SIGNED ) + - col1 AS col0 FROM tab1
----
-17
4086
6387

skipif mysql # not compatible
query I rowsort label-5439
SELECT + CAST ( col0 * + col0 AS INTEGER ) + - col1 AS col0 FROM tab1
----
-17
4086
6387

query I rowsort
SELECT - ( - 37 ) AS col1 FROM tab1
----
37
37
37

query I rowsort
SELECT 96 AS col0 FROM tab1 AS cor0
----
96
96
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5442
SELECT col2 * col2 + + col0 * CAST( NULL AS DECIMAL ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5442
SELECT col2 * col2 + + col0 * CAST ( NULL AS REAL ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5443
SELECT ALL + CAST( + col0 AS SIGNED ) + + col0 * + CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5443
SELECT ALL + CAST ( + col0 AS INTEGER ) + + col0 * + CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 * - col0 AS col0 FROM tab1
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-5445
SELECT DISTINCT - col2 DIV col0 FROM tab1
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-5445
SELECT DISTINCT - col2 / col0 FROM tab1
----
-1
-18
0

query I rowsort
SELECT ALL ( col2 ) * - col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT - 63 AS col1 FROM tab1
----
-63
-63
-63

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1, tab0 AS cor0, tab1 AS cor1
----
972 values hashing to 0a9194f200a4220e419d35c461f9fcfe

query I rowsort
SELECT DISTINCT + 7 * col0 AS col1 FROM tab2
----
49
546
553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT - col1 * - col0 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT col2 * col1 AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL - col0 + col1 * 67 AS col2 FROM tab1 AS cor0
----
1739
606
791

query I rowsort
SELECT DISTINCT + col1 * col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT DISTINCT - ( col0 ) FROM tab1
----
-3
-64
-80

query I rowsort
SELECT ALL col0 + 78 * col2 FROM tab0 AS cor0
----
113
2598
6485

query I rowsort
SELECT DISTINCT + + cor0.col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT - col1 * cor0.col0 + 29 AS col0 FROM tab2 AS cor0
----
-1314
-188
-4573

query I rowsort
SELECT ALL col1 * + ( - 8 ) AS col0 FROM tab0 AS cor0
----
-688
-728
-776

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab2 cor0
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-5461
SELECT col2 DIV 6 + col2 + col2 * + ( - 51 ) FROM tab0 AS cor0
----
-1645
-4087
-50

skipif mysql # not compatible
query I rowsort label-5461
SELECT col2 / 6 + col2 + col2 * + ( - 51 ) FROM tab0 AS cor0
----
-1645
-4087
-50

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT col1 * - 69 * cor0.col2 FROM tab0 AS cor0
----
-195822
-514878
-6693

query I rowsort
SELECT + cor0.col1 * + ( - col1 ) + col2 AS col1 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT 62 FROM tab0, tab0 AS cor0
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

query IIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab1 AS cor2
----
972 values hashing to ed80235f6457dada5cbb50ce9e2a8923

query I rowsort
SELECT col2 * - 64 AS col1 FROM tab1 AS cor0
----
-3456
-3648
-6144

query I rowsort
SELECT - col2 * ( col2 + col2 ) FROM tab1 AS cor0
----
-18432
-5832
-6498

query I rowsort
SELECT DISTINCT + + col1 * 73 FROM tab1 AS cor0
----
1898
730
949

query I rowsort
SELECT ALL - col2 * + cor0.col2 + col0 * - col1 FROM tab0 AS cor0
----
-14823
-3153
-3396

query I rowsort
SELECT ALL + col0 * - col1 + - col2 FROM tab0 cor0
----
-2097
-3396
-8181

skipif mysql # not compatible
query I rowsort
SELECT ALL col1 + + CAST ( col0 AS REAL ) FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT cor0.col1 * + ( - col2 ) + + col2 + + col2 FROM tab2 AS cor0
----
-1482
-570
-783

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 * ( col2 ) - - col1 col1 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT DISTINCT - col2 + col1 + - col2 AS col1 FROM tab0 AS cor0
----
-73
20
95

query I rowsort
SELECT ALL col2 - - col2 * cor0.col0 AS col1 FROM tab0 AS cor0
----
36
7380
825

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 cor0, tab2 cor1
----
243 values hashing to 5ac29bd6e3a9e69ed9c73ca7a34114f7

query I rowsort
SELECT DISTINCT - col0 * - col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT DISTINCT - col1 * tab0.col0 FROM tab0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - tab1.col0 col2 FROM tab1, tab0, tab1 cor0
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query I rowsort
SELECT DISTINCT 63 AS col2 FROM tab2, tab2 cor0, tab1 AS cor1, tab1, tab0 AS cor2
----
63

query I rowsort
SELECT - col1 * - col0 + col1 AS col1 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT - col0 * col0 + + col1 + col2 FROM tab0 AS cor0
----
-1127
-457
-7748

query I rowsort
SELECT - col2 + - ( col2 ) - 17 AS col2 FROM tab2 AS cor0
----
-69
-71
-93

query I rowsort
SELECT - + ( - col2 ) + col0 * - 10 AS col0 FROM tab0 AS cor0
----
-207
-349
-808

query I rowsort
SELECT + - col0 * - col0 AS col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT - 48 * + col0 FROM tab1 AS cor0
----
-144
-3072
-3840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col2 + - 79 col2 FROM tab2
----
-41
-52
-53

query I rowsort
SELECT ALL 1 FROM tab0, tab0 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT - tab0.col1 + cor0.col2 * 85 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 6f86a7001485dae10acdf941cc3b26c0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * - col2 - + col0 col1 FROM tab0 AS cor0
----
-1113
-36
-6813

query I rowsort
SELECT DISTINCT + ( - col1 ) * + col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT 59 + + col0 * ( - ( col2 ) ) AS col2 FROM tab1 AS cor0
----
-103
-3589
-7621

query I rowsort
SELECT ALL - col0 * + col2 + + col0 AS col0 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT + - 63 + cor0.col2 FROM tab2 AS cor0
----
-25
-36
-37

query I rowsort
SELECT - 39 FROM tab2 AS cor0
----
-39
-39
-39

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 - 60 AS col1 FROM tab0 AS cor0
----
-60
-60
-60

query I rowsort
SELECT + col2 * - col2 + - cor0.col0 * + col1 * + col2 + - cor0.col1 FROM tab2 AS cor0
----
-120387
-52495
-6619

query I rowsort
SELECT + cor0.col2 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT ( col0 ) AS col1 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-5502
SELECT + + col2 + + col0 DIV - ( + 22 ) FROM tab0 AS cor0
----
0
32
78

skipif mysql # not compatible
query I rowsort label-5502
SELECT + + col2 + + col0 / - ( + 22 ) FROM tab0 AS cor0
----
0
32
78

query I rowsort
SELECT + col1 * col1 AS col2 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT 7 * + 52 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 61b9fab5576f3a496305a254f7621a51

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab0, tab0 AS cor0
----
1
33
82

query I rowsort
SELECT + + col0 * col2 AS col0 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5507
SELECT - cor0.col1 * CAST( NULL AS SIGNED ) * - 28 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5507
SELECT - cor0.col1 * CAST ( NULL AS INTEGER ) * - 28 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col2 * + 97 * - col1 FROM tab2 AS cor0
----
-148798
-62662
-81189

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col0 FROM tab0, tab2 AS cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT - 15 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 91b10a00c89b36b5bf0bed723e656ccc

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5511
SELECT DISTINCT - tab1.col1 / col1 + CAST( NULL AS SIGNED ) * - col0 + - col2 AS col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-5511
SELECT DISTINCT - tab1.col1 / col1 + CAST ( NULL AS INTEGER ) * - col0 + - col2 AS col2 FROM tab1
----
NULL

query I rowsort
SELECT + col0 + col1 AS col0 FROM tab2
----
137
38
96

query I rowsort
SELECT DISTINCT - ( + col1 ) + - col0 * + cor0.col2 * col0 FROM tab0 AS cor0
----
-1322
-19094
-649613

query I rowsort
SELECT ALL - cor0.col2 * + col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL + + col2 + col1 AS col1 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT - cor0.col2 * - col1 + 38 FROM tab0 AS cor0
----
135
2876
7500

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 0 col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + col0 * cor0.col0 AS col2 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT - + col1 * - ( - col0 ) + + cor0.col1 + + 9 * cor0.col0 FROM tab0 AS cor0
----
-1762
-2983
-7207

query I rowsort
SELECT ALL + col1 * col1 * + col1 FROM tab0 AS cor0
----
636056
753571
912673

query I rowsort
SELECT + cor0.col1 * 20 AS col2 FROM tab1 AS cor0
----
200
260
520

query I rowsort
SELECT ALL + - col2 + ( - col0 ) * - col1 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT col2 + col2 * ( col0 ) FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT DISTINCT + col1 * + col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT + + col0 * col1 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL + col2 + - 67 AS col0 FROM tab0 AS cor0
----
-34
-66
15

query I rowsort
SELECT - + cor0.col1 + col2 AS col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT col0 * cor0.col0 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT + col1 * + 17 * 10 AS col2 FROM tab1 AS cor0
----
1700
2210
4420

query I rowsort
SELECT + cor0.col2 * col2 AS col0 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ALL col1 * 92 AS col0 FROM tab0 AS cor0
----
7912
8372
8924

query I rowsort
SELECT ALL tab1.col1 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT ALL 57 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 220a93709e207779b34ef74b544764a5

query I rowsort
SELECT 61 * + tab1.col1 AS col0 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to e7926ee5bdefb0a1ebd8d8f19898efa4

query I rowsort
SELECT DISTINCT 74 + - col2 AS col1 FROM tab2
----
36
47
48

query I rowsort
SELECT - 13 FROM tab0
----
-13
-13
-13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 23 * tab1.col1 col1 FROM tab1
----
-230
-299
-598

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab0 cor0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5539
SELECT + - col0 * CAST( 62 AS SIGNED ) + - col1 * + col2 * col0 AS col1 FROM tab1 AS cor0
----
-104800
-40448
-4398

skipif mysql # not compatible
query I rowsort label-5539
SELECT + - col0 * CAST ( 62 AS INTEGER ) + - col1 * + col2 * col0 AS col1 FROM tab1 AS cor0
----
-104800
-40448
-4398

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * col2 col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL + col2 + 54 FROM tab1 AS cor0
----
108
111
150

query I rowsort
SELECT DISTINCT col2 * col2 FROM tab1 cor0
----
2916
3249
9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + cor0.col0 + - col2 col1 FROM tab0 AS cor0
----
131
77
98

query I rowsort
SELECT + col1 * cor0.col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT col0 * + 60 + - col1 AS col1 FROM tab1 AS cor0
----
154
3830
4787

query I rowsort
SELECT + col0 + + col2 - col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - - 64 * col1 + col0 * ( col0 ) AS col1 FROM tab0 cor0
----
13745
6080
7433

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5548
SELECT + + CAST( NULL AS DECIMAL ) + + col2 / - col2 col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5548
SELECT + + CAST ( NULL AS REAL ) + + col2 / - col2 col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col1 * - 46 FROM tab2 AS cor0
----
1426
2714
782

query I rowsort
SELECT DISTINCT + tab0.col1 * - col0 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL ( - 29 ) AS col1 FROM tab2 AS cor0
----
-29
-29
-29

query I rowsort
SELECT + 89 AS col0 FROM tab1 AS cor0
----
89
89
89

query I rowsort
SELECT ALL + 99 + 71 FROM tab1 AS cor0
----
170
170
170

query I rowsort
SELECT ALL + ( col0 ) FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT ALL 2 + - col1 FROM tab2 AS cor0
----
-15
-29
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-5556
SELECT - col2 DIV + col0 AS col1 FROM tab2
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-5556
SELECT - col2 / + col0 AS col1 FROM tab2
----
-3
0
0

query I rowsort
SELECT DISTINCT - 93 * col2 FROM tab2 AS cor0
----
-2418
-2511
-3534

query I rowsort
SELECT - 85 + cor0.col0 AS col1 FROM tab0 AS cor0
----
-50
-61
4

query I rowsort
SELECT 45 * col0 + col2 AS col2 FROM tab2 AS cor0
----
342
3536
3593

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0, tab1 cor1, tab2 AS cor2
----
972 values hashing to caf6adb9936510208f5945a7e5c76f14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 23 col2 FROM tab1 cor0
----
23
23
23

query I rowsort
SELECT DISTINCT 14 - + ( + col2 ) FROM tab0
----
-19
-68
13

query I rowsort
SELECT DISTINCT - col1 * col0 + col0 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT ALL + col1 * cor0.col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT + + ( col2 ) - - 86 AS col1 FROM tab2 AS cor0
----
112
113
124

onlyif mysql # use DIV operator for integer division
query I rowsort label-5566
SELECT DISTINCT - + col1 + col2 DIV - col2 FROM tab0 AS cor0
----
-87
-92
-98

skipif mysql # not compatible
query I rowsort label-5566
SELECT DISTINCT - + col1 + col2 / - col2 FROM tab0 AS cor0
----
-87
-92
-98

query I rowsort
SELECT - - col1 + col1 AS col2 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT 20 + cor0.col2 FROM tab2 AS cor0
----
46
47
58

query I rowsort
SELECT - ( + col2 ) FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT col1 * + cor0.col1 + - col2 AS col1 FROM tab1 AS cor0
----
43
622
73

query I rowsort
SELECT ALL 67 * - col0 FROM tab0 AS cor0
----
-1608
-2345
-5963

query I rowsort
SELECT ALL 84 * - col0 + + col0 * col0 AS col1 FROM tab0 AS cor0
----
-1440
-1715
445

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5573
SELECT ALL + 75 + + col2 / CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5573
SELECT ALL + 75 + + col2 / CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - col1 col1 FROM tab0 cor0
----
-110
-132
-180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5575
SELECT DISTINCT + + 43 * col1 + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5575
SELECT DISTINCT + + 43 * col1 + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL - 7 FROM tab2 AS cor0
----
-7
-7
-7

query I rowsort
SELECT + 23 + col2 FROM tab2 AS cor0
----
49
50
61

query I rowsort
SELECT + 63 - - col0 AS col1 FROM tab2 AS cor0
----
141
142
70

query I rowsort
SELECT DISTINCT - col0 + col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT + + col2 * - cor0.col1 + + ( cor0.col2 ) FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT col1 * col2 + + col2 FROM tab0
----
2871
7544
98

query I rowsort
SELECT DISTINCT + tab1.col0 AS col2 FROM tab1, tab2 AS cor0
----
3
64
80

query I rowsort
SELECT ALL - 19 FROM tab2
----
-19
-19
-19

onlyif mysql # use DIV operator for integer division
query I rowsort label-5584
SELECT + 44 * 85 DIV - col1 + col2 * - col1 AS col2 FROM tab2
----
-1597
-866
-957

skipif mysql # not compatible
query I rowsort label-5584
SELECT + 44 * 85 / - col1 + col2 * - col1 AS col2 FROM tab2
----
-1597
-866
-957

query I rowsort
SELECT ALL - col1 + + col2 FROM tab1
----
28
47
83

query I rowsort
SELECT DISTINCT col2 + col1 + col1 * - tab1.col0 FROM tab1
----
-573
-931
2

query I rowsort
SELECT ALL + + col1 * + col2 + col2 AS col2 FROM tab1 AS cor0
----
1344
1458
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-5588
SELECT - col1 + - cor0.col0 DIV - 11 + + col2 AS col0 FROM tab2 AS cor0
----
-26
-4
28

skipif mysql # not compatible
query I rowsort label-5588
SELECT - col1 + - cor0.col0 / - 11 + + col2 AS col0 FROM tab2 AS cor0
----
-26
-4
28

query I rowsort
SELECT + + cor0.col1 AS col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT + 61 + col1 FROM tab2 AS cor0
----
120
78
92

query I rowsort
SELECT DISTINCT 77 * - col1 FROM tab2 AS cor0
----
-1309
-2387
-4543

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5592
SELECT - cor0.col2 + + CAST( col1 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
53
9
96

skipif mysql # not compatible
query I rowsort label-5592
SELECT - cor0.col2 + + CAST ( col1 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT col2 * col2 AS col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT + col0 + - 42 FROM tab2 AS cor0
----
-35
36
37

query I rowsort
SELECT + 69 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

query I rowsort
SELECT - 7 FROM tab2
----
-7
-7
-7

query I rowsort
SELECT ALL - - ( col2 ) - col1 FROM tab1 cor0
----
28
47
83

query I rowsort
SELECT DISTINCT + 5 FROM tab1 AS cor0
----
5

query I rowsort
SELECT 9 * col1 FROM tab1 AS cor0
----
117
234
90

query I rowsort
SELECT ALL + + col2 * - col1 - col2 AS col2 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT ALL + 53 AS col1 FROM tab2
----
53
53
53

query I rowsort
SELECT 94 FROM tab0
----
94
94
94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5603
SELECT ALL - CAST( NULL AS SIGNED ) + - col1 * + col2 / + col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5603
SELECT ALL - CAST ( NULL AS INTEGER ) + - col1 * + col2 / + col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - ( + col2 ) * - col0 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT - + col2 * - col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL 96 FROM tab1, tab0 AS cor0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to e03080212e3345d8b37e64e3264019c4

query I rowsort
SELECT DISTINCT 48 * + cor0.col2 FROM tab1 AS cor0
----
2592
2736
4608

query I rowsort
SELECT + col2 * + col0 AS col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ( + cor0.col0 ) * - col0 FROM tab1 AS cor0
----
-4096
-6400
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 * - col0 col2 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - + ( 22 ) FROM tab2 AS cor0
----
-22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * 15 + col2 col2 FROM tab2 AS cor0
----
-217
-438
-859

onlyif mysql # use DIV operator for integer division
query I rowsort label-5613
SELECT + col2 DIV cor0.col0 AS col0 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5613
SELECT + col2 / cor0.col0 AS col0 FROM tab0 AS cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-5614
SELECT DISTINCT + cor0.col2 + + ( 78 ) * - col1 + 46 DIV 71 FROM tab0 AS cor0
----
-6675
-7016
-7565

skipif mysql # not compatible
query I rowsort label-5614
SELECT DISTINCT + cor0.col2 + + ( 78 ) * - col1 + 46 / 71 FROM tab0 AS cor0
----
-6675
-7016
-7565

query I rowsort
SELECT - 7 FROM tab2, tab1 AS cor0
----
9 values hashing to ba940cd66e21e94e95aada5f28e1faf5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5616
SELECT ( cor0.col1 ) + CAST( NULL AS SIGNED ) * + 93 AS col2 FROM tab2, tab1 cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-5616
SELECT ( cor0.col1 ) + CAST ( NULL AS INTEGER ) * + 93 AS col2 FROM tab2, tab1 cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT + + col1 + + cor0.col0 * - 40 FROM tab0 cor0
----
-1303
-3469
-874

query I rowsort
SELECT col0 + 91 AS col2 FROM tab0 AS cor0
----
115
126
180

query I rowsort
SELECT col0 + ( + 47 ) * - col1 * + col2 FROM tab2 AS cor0
----
-30283
-39332
-72020

query I rowsort
SELECT + col2 * + ( + cor0.col2 ) FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT - col1 + + ( - 69 ) AS col1 FROM tab0 AS cor0
----
-155
-160
-166

query I rowsort
SELECT - cor0.col2 + cor0.col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - col1 + col2 FROM tab2 cor0
----
-33
-4
21

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5624
SELECT - CAST( NULL AS SIGNED ) + 22 * col2 AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5624
SELECT - CAST ( NULL AS INTEGER ) + 22 * col2 AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 + col2 * + col2 AS col1 FROM tab0 cor0
----
1113
36
6813

query I rowsort
SELECT + ( - col2 ) + + cor0.col1 FROM tab1 AS cor0
----
-28
-47
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col2 col1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT + col2 + cor0.col0 * col0 AS col0 FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT ALL 72 * cor0.col1 + ( ( - col2 ) ) FROM tab0 AS cor0
----
6159
6470
6983

query I rowsort
SELECT cor0.col0 + - col2 AS col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT ALL - col0 * col1 + + col2 * + col0 FROM tab0 AS cor0
----
-1272
-3360
-801

query I rowsort
SELECT DISTINCT + 73 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
73

query I rowsort
SELECT tab0.col2 * + col1 FROM tab0
----
2838
7462
97

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NULL BETWEEN col1 AND NULL
----

query I rowsort
SELECT - col1 * + col2 AS col2 FROM tab2 WHERE NULL IN ( - tab2.col1 * - tab2.col0 + - col0 * + col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + tab0.col1 col2 FROM tab0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL + tab0.col2 * tab0.col2 + col1 AS col1 FROM tab0 WHERE NOT NULL NOT IN ( col1 / col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5638
SELECT tab1.col1 + - tab1.col2 * - col1 DIV - col1 FROM tab1
----
-28
-47
-83

skipif mysql # not compatible
query I rowsort label-5638
SELECT tab1.col1 + - tab1.col2 * - col1 / - col1 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT col0 * tab2.col2 - - col0 FROM tab2
----
196
2106
3081

query I rowsort
SELECT - - col0 + col0 AS col1 FROM tab0 AS cor0
----
178
48
70

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2, tab1 cor0, tab0
----
972 values hashing to 9b91cf9fcc064ee1c13074a678b72ac7

query I rowsort
SELECT ALL + 13 FROM tab2
----
13
13
13

query I rowsort
SELECT + + col0 * 3 AS col0 FROM tab2 AS cor0
----
21
234
237

query I rowsort
SELECT 60 FROM tab2
----
60
60
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + col1 col2 FROM tab1 AS cor0
----
1040
640
78

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0, tab1 AS cor1, tab2 AS cor2
----
972 values hashing to 49c8bf3e931a898ba7af63d0e377eb79

query I rowsort
SELECT DISTINCT - + 28 * col1 AS col1 FROM tab2 AS cor0
----
-1652
-476
-868

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT col2 AS col0 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT - + col0 AS col0 FROM tab2 cor0
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 - - col0 * - col0 col1 FROM tab1 AS cor0
----
-4153
-63
-6496

query I rowsort
SELECT DISTINCT - + col2 AS col2 FROM tab2 AS cor0
----
-26
-27
-38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5653
SELECT + col2 + + CAST( + 82 AS SIGNED ) FROM tab1
----
136
139
178

skipif mysql # not compatible
query I rowsort label-5653
SELECT + col2 + + CAST ( + 82 AS INTEGER ) FROM tab1
----
136
139
178

query I rowsort
SELECT ALL 21 + - 31 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to f68f33032846e21ee6b2c668fc10355e

query I rowsort
SELECT - col2 * 83 FROM tab0 AS cor0
----
-2739
-6806
-83

query I rowsort
SELECT DISTINCT 23 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
23

query I rowsort
SELECT ALL col1 * 46 AS col1 FROM tab0
----
3956
4186
4462

query I rowsort
SELECT ALL 71 FROM tab1
----
71
71
71

query I rowsort
SELECT ALL col2 * + 50 AS col0 FROM tab2
----
1300
1350
1900

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 84 col1 FROM tab0
----
84
84
84

query I rowsort
SELECT ALL ( ( col2 ) ) AS col2 FROM tab0
----
1
33
82

query I rowsort
SELECT cor0.col2 * - 32 AS col2 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to e5332de97df6b86c1964b275fd53c326

query I rowsort
SELECT DISTINCT 77 AS col0 FROM tab1, tab0 AS cor0
----
77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5664
SELECT cor0.col1 + - CAST( NULL AS DECIMAL ) FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-5664
SELECT cor0.col1 + - CAST ( NULL AS REAL ) FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT 82 + - cor0.col1 FROM tab1 AS cor0
----
56
69
72

query I rowsort
SELECT ALL + ( - col1 ) FROM tab0
----
-86
-91
-97

query I rowsort
SELECT - tab1.col1 FROM tab1, tab2 AS cor0
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query I rowsort
SELECT ALL + 19 * + col1 + - col1 AS col1 FROM tab2 AS cor0
----
1062
306
558

onlyif mysql # use DIV operator for integer division
query I rowsort label-5669
SELECT ALL - ( 12 ) DIV - col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5669
SELECT ALL - ( 12 ) / - col2 FROM tab1
----
0
0
0

query I rowsort
SELECT - col0 * - col1 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - - 70 AS col0 FROM tab2 AS cor0
----
70
70
70

query I rowsort
SELECT - col2 * - col0 + col1 FROM tab2 cor0
----
2087
220
3019

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT + col1 + - cor0.col0 AS col2 FROM tab0 AS cor0
----
2
62
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-5675
SELECT + col1 * col1 + col2 DIV col0 FROM tab1 AS cor0
----
100
170
694

skipif mysql # not compatible
query I rowsort label-5675
SELECT + col1 * col1 + col2 / col0 FROM tab1 AS cor0
----
100
170
694

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * + col0 - col1 * + col1 * + col2 col1 FROM tab1 cor0
----
-22624
-36513
-9796

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5677
SELECT ( col2 ) * CAST( cor0.col0 AS SIGNED ) + col0 FROM tab0 AS cor0
----
70
7387
816

skipif mysql # not compatible
query I rowsort label-5677
SELECT ( col2 ) * CAST ( cor0.col0 AS INTEGER ) + col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT - - col0 * + cor0.col1 * - ( + 74 ) + + col1 AS col1 FROM tab2 AS cor0
----
-16027
-340489
-99365

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col0 + - cor0.col0 col0 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT + 15 AS col2 FROM tab2
----
15
15
15

query I rowsort
SELECT ALL + tab0.col1 + - col1 - + col2 * col0 AS col2 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT ALL - tab0.col0 - 24 FROM tab0
----
-113
-48
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-5683
SELECT ALL col2 * + CAST( - col2 AS SIGNED ) - tab1.col2 DIV col0 FROM tab1
----
-2934
-3249
-9217

skipif mysql # not compatible
query I rowsort label-5683
SELECT ALL col2 * + CAST ( - col2 AS INTEGER ) - tab1.col2 / col0 FROM tab1
----
-2934
-3249
-9217

query I rowsort
SELECT ALL col1 - col1 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT - 21 * cor0.col1 AS col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 82a8680fdac0412ace172f60f1e83dfe

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 68 * - cor0.col0 col2 FROM tab2, tab1 AS cor0, tab2 AS cor1, tab1, tab0 AS cor2
----
243 values hashing to 56d395a4992db60fc4c41d1fd4eade5e

query I rowsort
SELECT ALL - col1 - - 99 FROM tab1
----
73
86
89

query I rowsort
SELECT - col0 * 91 AS col0 FROM tab1 AS cor0
----
-273
-5824
-7280

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 10 + - col2 col0 FROM tab0 cor0
----
-23
-72
9

query I rowsort
SELECT + + 10 * + 1 FROM tab0 AS cor0
----
10
10
10

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5691
SELECT DISTINCT + - CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5691
SELECT DISTINCT + - CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL - ( - col1 ) FROM tab0 AS cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5693
SELECT - col2 - col1 DIV col0 AS col2 FROM tab1 AS cor0
----
-57
-62
-96

skipif mysql # not compatible
query I rowsort label-5693
SELECT - col2 - col1 / col0 AS col2 FROM tab1 AS cor0
----
-57
-62
-96

query I rowsort
SELECT DISTINCT - - ( + col1 ) * - col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT cor0.col2 FROM tab2, tab0 AS cor0, tab1, tab2 AS cor1
----
81 values hashing to e938777ebffc2e3e9c0cdfaa4f732c05

onlyif mysql # use DIV operator for integer division
query I rowsort label-5696
SELECT ALL - ( + col2 ) + col0 DIV col1 AS col0 FROM tab2
----
-25
-27
-34

skipif mysql # not compatible
query I rowsort label-5696
SELECT ALL - ( + col2 ) + col0 / col1 AS col0 FROM tab2
----
-25
-27
-34

query I rowsort
SELECT 21 + + col0 FROM tab1 AS cor0
----
101
24
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5698
SELECT + + CAST( col1 AS SIGNED ) * col2 - - ( + 39 + + col0 ) FROM tab0 AS cor0
----
171
2901
7590

skipif mysql # not compatible
query I rowsort label-5698
SELECT + + CAST ( col1 AS INTEGER ) * col2 - - ( + 39 + + col0 ) FROM tab0 AS cor0
----
171
2901
7590

query I rowsort
SELECT DISTINCT - + col2 + - col1 AS col2 FROM tab1 AS cor0
----
-109
-67
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 88 - + col2 col1 FROM tab2 AS cor0
----
50
61
62

query I rowsort
SELECT ( - col0 ) * + col2 + + col2 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT ALL - - col2 + col0 AS col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT - - cor0.col2 * + ( - col0 ) + ( col0 ) FROM tab1 AS cor0
----
-159
-3584
-7600

onlyif mysql # use DIV operator for integer division
query I rowsort label-5704
SELECT DISTINCT - 78 DIV col2 + col0 FROM tab0 AS cor0
----
-43
22
89

skipif mysql # not compatible
query I rowsort label-5704
SELECT DISTINCT - 78 / col2 + col0 FROM tab0 AS cor0
----
-43
22
89

query I rowsort
SELECT DISTINCT col2 + - col0 AS col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL + ( - ( col1 ) ) FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL - + 71 + col1 * + col1 FROM tab1 AS cor0
----
29
605
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + col0 col1 FROM tab0 cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT 37 * + 18 FROM tab2 AS cor0
----
666

onlyif mysql # use DIV operator for integer division
query I rowsort label-5710
SELECT ALL + col0 DIV - col2 FROM tab0 AS cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-5710
SELECT ALL + col0 / - col2 FROM tab0 AS cor0
----
-1
-35
0

query I rowsort
SELECT + + col1 + - col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5712
SELECT - + col0 + 65 DIV + cor0.col2 FROM tab1 AS cor0
----
-2
-63
-80

skipif mysql # not compatible
query I rowsort label-5712
SELECT - + col0 + 65 / + cor0.col2 FROM tab1 AS cor0
----
-2
-63
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5713
SELECT ALL - CAST( NULL AS DECIMAL ) + + col2 * col0 col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5713
SELECT ALL - CAST ( NULL AS REAL ) + + col2 * col0 col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col0 + - 40 * col1 * col1 + col1 * - cor0.col0 * - ( col1 ) FROM tab0 AS cor0
----
-118312
-47010
405858

query I rowsort
SELECT + - col1 + col1 * ( + ( + col0 ) ) AS col0 FROM tab0 AS cor0
----
1978
3298
8008

query I rowsort
SELECT - tab1.col0 AS col2 FROM tab1, tab1 cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

query I rowsort
SELECT ALL + cor0.col0 + col2 * - col2 FROM tab2 AS cor0
----
-1365
-598
-722

query I rowsort
SELECT 51 * col1 AS col0 FROM tab2 AS cor0
----
1581
3009
867

query I rowsort
SELECT ALL + + cor0.col0 AS col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + 89 * - col0 AS col0 FROM tab1 AS cor0
----
-267
-5696
-7120

query I rowsort
SELECT + - 16 * col2 + col1 AS col2 FROM tab0 AS cor0
----
-1221
-442
81

query I rowsort
SELECT + 56 AS col0 FROM tab0 AS cor0
----
56
56
56

query I rowsort
SELECT DISTINCT - + col1 * + 69 AS col0 FROM tab2 AS cor0
----
-1173
-2139
-4071

query I rowsort
SELECT - col1 * - col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT col0 + col1 AS col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL cor0.col2 * 7 * + col2 AS col0 FROM tab0 AS cor0
----
47068
7
7623

query I rowsort
SELECT - cor0.col0 * 99 FROM tab2 AS cor0
----
-693
-7722
-7821

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0, tab0, tab0 AS cor1
----
972 values hashing to b2fa3f9d060540fe1eb4ad1c0754e163

query I rowsort
SELECT ALL col1 * + col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT DISTINCT cor1.col2 FROM tab1, tab1 AS cor0, tab2 AS cor1, tab2 AS cor2
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-5731
SELECT - cor0.col1 DIV col1 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5731
SELECT - cor0.col1 / col1 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - col0 * + col1 * + col1 FROM tab2
----
-22831
-271518
-6727

query I rowsort
SELECT col1 + + col0 AS col2 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT + cor0.col1 * 29 + + cor0.col0 FROM tab1 AS cor0
----
354
457
757

query I rowsort
SELECT ALL - col0 + col0 * 98 + - col0 AS col0 FROM tab0 AS cor0
----
2304
3360
8544

onlyif mysql # use DIV operator for integer division
query I rowsort label-5736
SELECT ALL cor0.col2 DIV + col0 + col0 * col1 FROM tab2 AS cor0
----
1343
220
4602

skipif mysql # not compatible
query I rowsort label-5736
SELECT ALL cor0.col2 / + col0 + col0 * col1 FROM tab2 AS cor0
----
1343
220
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-5737
SELECT ALL + col2 DIV col0 + + col0 FROM tab0 AS cor0
----
25
35
89

skipif mysql # not compatible
query I rowsort label-5737
SELECT ALL + col2 / col0 + + col0 FROM tab0 AS cor0
----
25
35
89

query I rowsort
SELECT col1 + 42 * + col2 * col0 FROM tab2 AS cor0
----
126101
7969
85235

query I rowsort
SELECT ALL + + cor0.col2 AS col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT - cor0.col1 + - col2 * col1 AS col1 FROM tab2 AS cor0
----
-1593
-663
-868

query I rowsort
SELECT col1 * + col2 + + 6 AS col0 FROM tab2
----
1540
652
843

query I rowsort
SELECT 53 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 866ae1b4ab9e5b4043ac1bcfd413aaa6

query I rowsort
SELECT col1 + - 47 FROM tab0 AS cor0
----
39
44
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * col1 * + col2 + cor0.col0 + - col0 col1 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT DISTINCT - col2 - + col1 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab0 cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5747
SELECT ALL + col1 * col1 DIV ( col0 ) col1 FROM tab2 AS cor0
----
137
3
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5747
SELECT ALL + col1 * col1 / ( col0 ) col1 FROM tab2 AS cor0
----
137
3
44

query I rowsort
SELECT DISTINCT col1 * - 40 FROM tab2 cor0
----
-1240
-2360
-680

query I rowsort
SELECT DISTINCT - - col2 * + col2 AS col1 FROM tab1 AS cor0
----
2916
3249
9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 54 col2 FROM tab1, tab2 AS cor0
----
54

query I rowsort
SELECT 42 + - 53 AS col2 FROM tab0 AS cor0
----
-11
-11
-11

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 cor0 CROSS JOIN tab2, tab2 cor1, tab0, tab1 AS cor2
----
3645 values hashing to d865c68b86e66898eeac28f450e48e70

query I rowsort
SELECT col0 + ( + col0 + - tab0.col1 * 22 ) AS col1 FROM tab0
----
-1824
-1844
-2064

onlyif mysql # use DIV operator for integer division
query I rowsort label-5754
SELECT - col2 * 22 - + tab0.col0 DIV + col0 FROM tab0
----
-1805
-23
-727

skipif mysql # not compatible
query I rowsort label-5754
SELECT - col2 * 22 - + tab0.col0 / + col0 FROM tab0
----
-1805
-23
-727

onlyif mysql # use DIV operator for integer division
query I rowsort label-5755
SELECT DISTINCT + 43 DIV tab1.col2 AS col0 FROM tab1, tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5755
SELECT DISTINCT + 43 / tab1.col2 AS col0 FROM tab1, tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT + col2 * - 27 FROM tab0
----
-2214
-27
-891

query I rowsort
SELECT DISTINCT cor0.col2 - col2 AS col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT - col1 + col0 * 18 AS col1 FROM tab1 AS cor0
----
1142
1427
28

query I rowsort
SELECT DISTINCT - + col1 * col1 - - col2 AS col1 FROM tab1 cor0
----
-43
-622
-73

query I rowsort
SELECT DISTINCT + col0 + - col1 FROM tab1 cor0
----
-23
54
67

query I rowsort
SELECT ALL - col2 + col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + col0 * col2 AS col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT + - 27 AS col1 FROM tab1 cor0
----
-27

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0, tab2, tab2 cor1
----
972 values hashing to 64ce0e736818e884f0a9ecd075da5eb7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5765
SELECT + CAST( 45 AS SIGNED ) * col2 + - col1 AS col1 FROM tab1
----
2404
2555
4307

skipif mysql # not compatible
query I rowsort label-5765
SELECT + CAST ( 45 AS INTEGER ) * col2 + - col1 AS col1 FROM tab1
----
2404
2555
4307

query I rowsort
SELECT col2 + + col0 FROM tab1
----
121
176
57

query I rowsort
SELECT 55 AS col2 FROM tab0
----
55
55
55

query I rowsort
SELECT - 13 AS col0 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 1c6aaa07ba8d3dc01ee616e16bef60f2

query I rowsort
SELECT DISTINCT + col0 * col0 + - 42 * 78 FROM tab0 cor0
----
-2051
-2700
4645

query I rowsort
SELECT + col2 + + col2 AS col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT DISTINCT + + 69 + + col2 FROM tab2 AS cor0
----
107
95
96

query I rowsort
SELECT 79 AS col0 FROM tab0
----
79
79
79

query I rowsort
SELECT DISTINCT col0 * - 28 AS col2 FROM tab2
----
-196
-2184
-2212

query I rowsort
SELECT DISTINCT + + ( + 47 ) * + col1 FROM tab0 AS cor0
----
4042
4277
4559

query I rowsort
SELECT + + col0 * + col2 AS col1 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 63 col2 FROM tab0 AS cor0
----
-63
-63
-63

query I rowsort
SELECT DISTINCT - ( col0 ) FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT 51 * col0 * - col0 FROM tab0 cor0
----
-29376
-403971
-62475

query I rowsort
SELECT + ( + col0 ) * - col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT cor0.col1 * - 84 AS col1 FROM tab0 cor0
----
-7224
-7644
-8148

onlyif mysql # use DIV operator for integer division
query I rowsort label-5781
SELECT DISTINCT - 29 * col1 DIV col1 AS col1 FROM tab1 AS cor0
----
-29

skipif mysql # not compatible
query I rowsort label-5781
SELECT DISTINCT - 29 * col1 / col1 AS col1 FROM tab1 AS cor0
----
-29

query I rowsort
SELECT 92 * - col1 AS col0 FROM tab0 cor0
----
-7912
-8372
-8924

query I rowsort
SELECT ALL - cor0.col0 * col2 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT + ( col2 ) FROM tab0 cor0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 49 col0 FROM tab2
----
-49
-49
-49

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0, tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT - - col2 * + cor0.col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - col1 + + cor0.col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT - col2 * col2 * col0 FROM tab1 AS cor0
----
-207936
-737280
-8748

query I rowsort
SELECT + 61 FROM tab1, tab2 AS cor0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to 9b52d3939da22c8931e3d5a72ddfb1b1

query I rowsort
SELECT DISTINCT col0 + 31 AS col0 FROM tab0 cor0
----
120
55
66

query I rowsort
SELECT - col2 * col0 + - 1 * cor0.col2 FROM tab0 AS cor0
----
-36
-7380
-825

onlyif mysql # use DIV operator for integer division
query I rowsort label-5793
SELECT ALL col1 * ( col1 ) DIV col1 + ( 1 * - col1 ) AS col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5793
SELECT ALL col1 * ( col1 ) / col1 + ( 1 * - col1 ) AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col0 * 86 FROM tab0 AS cor0
----
-2064
-3010
-7654

query I rowsort
SELECT ALL - col1 * - 87 * - ( col0 * + col1 ) FROM tab2
----
-1986297
-23622066
-585249

onlyif mysql # use DIV operator for integer division
query I rowsort label-5796
SELECT - col0 - 48 DIV + 35 FROM tab2 AS cor0
----
-79
-8
-80

skipif mysql # not compatible
query I rowsort label-5796
SELECT - col0 - 48 / + 35 FROM tab2 AS cor0
----
-79
-8
-80

query I rowsort
SELECT ALL + + col0 + ( col2 * col1 ) FROM tab2 AS cor0
----
1612
725
844

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - col2 AS REAL ) + cor0.col2 * col2 FROM tab1 AS cor0
----
2862
3192
9120

query I rowsort
SELECT col0 * - 61 AS col2 FROM tab1
----
-183
-3904
-4880

query I rowsort
SELECT DISTINCT col0 + ( 26 ) FROM tab1
----
106
29
90

query I rowsort
SELECT - ( + col0 ) + col1 + - col0 * col2 AS col0 FROM tab0 cor0
----
-7296
-730
27

query I rowsort
SELECT + + col1 * 43 FROM tab1 AS cor0
----
1118
430
559

onlyif mysql # use DIV operator for integer division
query I rowsort label-5803
SELECT + 63 DIV col1 + col1 + - col0 FROM tab2 AS cor0
----
-18
-59
26

skipif mysql # not compatible
query I rowsort label-5803
SELECT + 63 / col1 + col1 + - col0 FROM tab2 AS cor0
----
-18
-59
26

query I rowsort
SELECT col2 * + 72 + col1 AS col0 FROM tab0 cor0
----
169
2462
5995

query I rowsort
SELECT + ( + 36 ) * - tab1.col2 + + 50 FROM tab1, tab2 AS cor0
----
9 values hashing to 20c4cf6fae6026f101606856df44ab67

query I rowsort
SELECT tab0.col2 * - 44 + col1 FROM tab0
----
-1366
-3517
53

query I rowsort
SELECT + col1 + - ( - col1 ) AS col2 FROM tab2
----
118
34
62

query I rowsort
SELECT DISTINCT + tab1.col0 * col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT - col2 + 72 * - cor0.col1 FROM tab0 AS cor0
----
-6225
-6634
-6985

query I rowsort
SELECT - + 42 + + col1 * col2 FROM tab2 cor0
----
1492
604
795

query I rowsort
SELECT 90 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

query IIIIIIIII rowsort
SELECT * FROM tab0, tab2 cor0, tab0 cor1
----
243 values hashing to 5c33e96b85afe1ea51bb6d4e9fa6f993

onlyif mysql # use DIV operator for integer division
query I rowsort label-5813
SELECT ALL col2 DIV + ( 90 ) AS col0 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5813
SELECT ALL col2 / + ( 90 ) AS col0 FROM tab2
----
0
0
0

query I rowsort
SELECT + ( col0 ) AS col2 FROM tab2
----
7
78
79

query I rowsort
SELECT ALL + col0 * + col0 AS col0 FROM tab2 AS cor0
----
49
6084
6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-5816
SELECT - col1 DIV + col1 FROM tab0 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5816
SELECT - col1 / + col1 FROM tab0 cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-5817
SELECT DISTINCT - 94 DIV col2 AS col2 FROM tab0 AS cor0
----
-1
-2
-94

skipif mysql # not compatible
query I rowsort label-5817
SELECT DISTINCT - 94 / col2 AS col2 FROM tab0 AS cor0
----
-1
-2
-94

onlyif mysql # use DIV operator for integer division
query I rowsort label-5818
SELECT ALL col0 DIV - col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5818
SELECT ALL col0 / - col1 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5819
SELECT DISTINCT CAST( 80 AS SIGNED ) DIV col0 AS col2 FROM tab2
----
1
11

skipif mysql # not compatible
query I rowsort label-5819
SELECT DISTINCT CAST ( 80 AS INTEGER ) / col0 AS col2 FROM tab2
----
1
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 64 col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 601ec439a72fb4786a9cb7a6547ace5e

onlyif mysql # use DIV operator for integer division
query I rowsort label-5821
SELECT DISTINCT 67 + col0 + + col2 DIV - 9 AS col2 FROM tab0
----
102
147
88

skipif mysql # not compatible
query I rowsort label-5821
SELECT DISTINCT 67 + col0 + + col2 / - 9 AS col2 FROM tab0
----
102
147
88

query I rowsort
SELECT DISTINCT - 92 * + col0 + - tab1.col0 FROM tab1
----
-279
-5952
-7440

query I rowsort
SELECT - - 16 * col0 + cor0.col1 FROM tab2 AS cor0
----
1281
1307
143

query I rowsort
SELECT ( col1 ) * col0 AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT 2 AS col0 FROM tab0
----
2

query I rowsort
SELECT DISTINCT - ( + col2 * - tab1.col0 ) FROM tab1
----
162
3648
7680

query I rowsort
SELECT - ( col0 ) AS col0 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT ALL 32 + - col1 * ( - tab2.col0 ) AS col1 FROM tab2
----
1375
249
4634

query I rowsort
SELECT DISTINCT - col0 + tab0.col1 FROM tab0
----
2
62

query I rowsort
SELECT DISTINCT - col2 + col1 * + col2 AS col1 FROM tab2
----
1508
608
810

query I rowsort
SELECT 42 * col2 FROM tab1
----
2268
2394
4032

query I rowsort
SELECT - col0 + 59 AS col2 FROM tab1 AS cor0
----
-21
-5
56

query I rowsort
SELECT + + col2 - col2 * + 54 FROM tab0 AS cor0
----
-1749
-4346
-53

query I rowsort
SELECT DISTINCT 5 AS col0 FROM tab2
----
5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5835
SELECT DISTINCT - tab0.col2 * CAST( NULL AS SIGNED ) FROM tab0, tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5835
SELECT DISTINCT - tab0.col2 * CAST ( NULL AS INTEGER ) FROM tab0, tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL 43 FROM tab0
----
43
43
43

onlyif mysql # use DIV operator for integer division
query I rowsort label-5837
SELECT - 97 + col0 + 39 DIV col1 AS col0 FROM tab0
----
-62
-73
-8

skipif mysql # not compatible
query I rowsort label-5837
SELECT - 97 + col0 + 39 / col1 AS col0 FROM tab0
----
-62
-73
-8

query I rowsort
SELECT + 38 AS col0 FROM tab2
----
38
38
38

query I rowsort
SELECT ALL 99 AS col1 FROM tab2, tab2 cor0, tab1 AS cor1
----
27 values hashing to 05ea182fd6036c7f5e0ea08fc061cc67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 29 + - col1 * - 18 col2 FROM tab1
----
209
263
497

query I rowsort
SELECT ALL ( - cor1.col0 ) * cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 5ac8aba7baafe9bd6ceb7b5654f2c0b7

query I rowsort
SELECT 66 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 29794915b585eea848ad670075452c88

query I rowsort
SELECT + 21 + + 77 FROM tab0, tab1 AS cor0
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

query I rowsort
SELECT + - col2 + + col2 * + cor0.col1 * col2 FROM tab2 AS cor0
----
22572
24510
39858

query I rowsort
SELECT - - col0 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT + + col1 * + 82 + ( - col0 ) FROM tab0 AS cor0
----
7028
7373
7919

query I rowsort
SELECT + col2 + + 62 FROM tab1 AS cor0
----
116
119
158

onlyif mysql # use DIV operator for integer division
query I rowsort label-5848
SELECT - - col0 DIV - ( - col2 ) + + col0 FROM tab1 AS cor0
----
3
65
80

skipif mysql # not compatible
query I rowsort label-5848
SELECT - - col0 / - ( - col2 ) + + col0 FROM tab1 AS cor0
----
3
65
80

query I rowsort
SELECT DISTINCT - + col0 * - col0 + + 50 AS col1 FROM tab0 AS cor0
----
1275
626
7971

query I rowsort
SELECT cor0.col0 * col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL 50 * - col2 FROM tab0 cor0
----
-1650
-4100
-50

query I rowsort
SELECT ALL + 16 AS col1 FROM tab1 AS cor0
----
16
16
16

query I rowsort
SELECT ALL + 91 + + col0 * col2 + - col1 AS col0 FROM tab2 AS cor0
----
2060
249
3076

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + cor0.col2 col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL + col1 + col1 AS col0 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT DISTINCT + col2 + col0 * col2 AS col0 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT 95 FROM tab0 AS cor0
----
95
95
95

query I rowsort
SELECT + col2 * col0 + + col1 AS col1 FROM tab2
----
2087
220
3019

query I rowsort
SELECT DISTINCT - ( tab2.col0 * + col1 ) - col1 * - col1 * ( + 10 ) FROM tab2
----
1547
30208
9393

query I rowsort
SELECT ( tab1.col2 * 62 ) FROM tab1
----
3348
3534
5952

query I rowsort
SELECT DISTINCT col0 * col0 + 23 - col0 FROM tab0
----
1213
575
7855

query I rowsort
SELECT ALL + 14 FROM tab0
----
14
14
14

query I rowsort
SELECT col1 + + col0 * tab2.col0 FROM tab2
----
6143
6258
80

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 cor0, tab0 AS cor1, tab0 AS cor2
----
972 values hashing to d522b52b67b20888d3544d25cb98f232

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + - col0 col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 24 AS col2 FROM tab1
----
24
24
24

query I rowsort
SELECT - col0 + col1 AS col2 FROM tab2
----
-19
-62
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 72 col2 FROM tab1, tab2 AS cor0
----
72

query I rowsort
SELECT ( - tab2.col2 ) FROM tab2, tab2 AS cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + col1 col0 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT + col1 * col1 + + col2 AS col2 FROM tab1 AS cor0
----
157
265
730

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5872
SELECT ALL CAST( col0 AS SIGNED ) + - col0 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5872
SELECT ALL CAST ( col0 AS INTEGER ) + - col0 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - 30 FROM tab2 cor0
----
-30
-30
-30

query I rowsort
SELECT DISTINCT - ( - col0 ) FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL + col0 * cor0.col0 + + col0 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT col2 + - ( + col2 ) AS col1 FROM tab2
----
0
0
0

query I rowsort
SELECT - col0 + col1 * col0 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT tab1.col1 * col1 + tab1.col2 FROM tab1
----
157
265
730

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5879
SELECT DISTINCT - col1 + CAST( col0 AS SIGNED ) col0 FROM tab0
----
-2
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5879
SELECT DISTINCT - col1 + CAST ( col0 AS INTEGER ) col0 FROM tab0
----
-2
-62

query I rowsort
SELECT DISTINCT col1 + 58 * tab0.col2 AS col2 FROM tab0
----
155
2000
4847

query I rowsort
SELECT DISTINCT col1 * + col0 + - 71 AS col0 FROM tab1
----
569
7
969

query I rowsort
SELECT - + 16 * cor0.col0 AS col2 FROM tab2 AS cor0
----
-112
-1248
-1264

query I rowsort
SELECT DISTINCT + - col2 * - col2 + col1 * + 33 AS col0 FROM tab2 AS cor0
----
1752
2005
2623

query I rowsort
SELECT ALL col0 * col0 FROM tab2 AS cor0
----
49
6084
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 67 + 43 * col0 col1 FROM tab1 AS cor0
----
2685
3373
62

query I rowsort
SELECT DISTINCT + col0 * - col1 + + col1 AS col1 FROM tab0 cor0
----
-1978
-3298
-8008

query I rowsort
SELECT - 11 * - 92 * + col1 + - col2 * - cor0.col2 AS col2 FROM tab0 AS cor0
----
88121
98165
98816

query I rowsort
SELECT - ( col0 ) AS col2 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL 79 + 64 * cor0.col2 AS col0 FROM tab0 AS cor0
----
143
2191
5327

query I rowsort
SELECT DISTINCT col0 * col2 - col0 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT - 79 AS col1 FROM tab2 AS cor0
----
-79
-79
-79

query I rowsort
SELECT DISTINCT + col2 * 43 + - col2 * 57 + cor0.col0 AS col2 FROM tab2 AS cor0
----
-286
-371
-453

query I rowsort
SELECT ALL 90 - 22 * - col0 AS col1 FROM tab2 cor0
----
1806
1828
244

query I rowsort
SELECT - col0 * 32 FROM tab1 AS cor0
----
-2048
-2560
-96

query I rowsort
SELECT ALL col2 + col0 AS col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL - 6 * + col2 * + col1 AS col0 FROM tab2
----
-3876
-5022
-9204

query I rowsort
SELECT DISTINCT - col0 * + 59 FROM tab2
----
-413
-4602
-4661

query I rowsort
SELECT col0 + tab2.col0 FROM tab2
----
14
156
158

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5899
SELECT DISTINCT + CAST( col0 AS SIGNED ) FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-5899
SELECT DISTINCT + CAST ( col0 AS INTEGER ) FROM tab0
----
24
35
89

query I rowsort
SELECT + tab2.col0 * col2 + - tab2.col2 AS col2 FROM tab2
----
162
2002
2964

query I rowsort
SELECT DISTINCT - 72 * ( - cor0.col0 * - 32 ) + col1 + col1 FROM tab0 AS cor0
----
-204874
-55124
-80446

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab2, tab1 AS cor0
----
54
57
96

query I rowsort
SELECT - col2 + 39 * - col1 AS col1 FROM tab2 cor0
----
-1236
-2327
-701

query I rowsort
SELECT DISTINCT + col1 * + col0 AS col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT col2 * - col2 AS col1 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT ALL + - col0 + + col1 FROM tab0 cor0
----
2
62
62

query I rowsort
SELECT - ( col1 ) AS col2 FROM tab2 AS cor0
----
-17
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 - + col1 * cor0.col0 col0 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT + 40 * + col1 + col0 FROM tab0 AS cor0
----
3464
3729
3915

query I rowsort
SELECT ALL - 51 FROM tab2
----
-51
-51
-51

query I rowsort
SELECT ALL col0 * + cor0.col0 - col1 FROM tab2 AS cor0
----
18
6025
6224

query I rowsort
SELECT DISTINCT - + col0 + col2 AS col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT + + col0 + col1 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-5914
SELECT 20 DIV - col0 + col2 AS col2 FROM tab2
----
25
26
38

skipif mysql # not compatible
query I rowsort label-5914
SELECT 20 / - col0 + col2 AS col2 FROM tab2
----
25
26
38

query I rowsort
SELECT + 46 FROM tab2 cor0
----
46
46
46

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5916
SELECT CAST( + 22 AS SIGNED ) * - col0 FROM tab1
----
-1408
-1760
-66

skipif mysql # not compatible
query I rowsort label-5916
SELECT CAST ( + 22 AS INTEGER ) * - col0 FROM tab1
----
-1408
-1760
-66

query I rowsort
SELECT - cor0.col0 * - col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT col2 * col2 AS col1 FROM tab1 cor0
----
2916
3249
9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * 91 col2 FROM tab1 AS cor0
----
273
5824
7280

onlyif mysql # use DIV operator for integer division
query I rowsort label-5920
SELECT + - col0 DIV ( - ( col1 ) ) FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5920
SELECT + - col0 / ( - ( col1 ) ) FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT cor0.col2 * col2 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT ALL - col0 * 90 FROM tab0 AS cor0
----
-2160
-3150
-8010

query I rowsort
SELECT DISTINCT + cor0.col0 * col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT col1 * col2 - + col2 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT col1 * 9 FROM tab1 cor0
----
117
234
90

query I rowsort
SELECT + col1 * - 35 - 0 * cor0.col2 AS col0 FROM tab1 AS cor0
----
-350
-455
-910

query I rowsort
SELECT DISTINCT + col0 * - col0 AS col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT - col0 - 40 AS col2 FROM tab1 AS cor0
----
-104
-120
-43

query I rowsort
SELECT col0 * + 17 FROM tab1 AS cor0
----
1088
1360
51

query I rowsort
SELECT col0 * col1 * col2 - col0 * col2 * + col0 AS col2 FROM tab0 AS cor0
----
14596
2170
49104

query I rowsort
SELECT DISTINCT + + col2 * - ( - col2 ) + + col0 FROM tab1 AS cor0
----
2919
3313
9296

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 - + col2 col1 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT - col0 + - col2 FROM tab2 cor0
----
-104
-117
-34

onlyif mysql # use DIV operator for integer division
query I rowsort label-5934
SELECT col2 + + col0 DIV cor0.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-5934
SELECT col2 + + col0 / cor0.col1 col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL col1 * 71 AS col0 FROM tab0 AS cor0
----
6106
6461
6887

query I rowsort
SELECT - + col1 * - col0 + + 59 - - col2 AS col1 FROM tab1 cor0
----
1195
191
756

query I rowsort
SELECT ALL - + col2 AS col1 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT + col2 + - cor0.col2 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col1 + + 71 AS col2 FROM tab2 AS cor0
----
102
130
88

query I rowsort
SELECT DISTINCT - - col0 + ( col2 * col2 ) AS col1 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT DISTINCT + col2 + 47 FROM tab2 cor0
----
73
74
85

query I rowsort
SELECT + col2 + col1 AS col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL + + col2 * + 11 FROM tab2 AS cor0
----
286
297
418

query I rowsort
SELECT + cor0.col2 + col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT + cor0.col0 - col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT + 98 + col0 AS col2 FROM tab1 AS cor0
----
101
162
178

query I rowsort
SELECT + 49 + 77 * cor0.col2 + - ( col2 ) * - cor0.col0 FROM tab2 AS cor0
----
2317
4079
5977

query I rowsort
SELECT + - 81 - - cor1.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to c88587a79007fb5f152cb316540023af

query I rowsort
SELECT col2 * col0 AS col0 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT - + col2 + col0 FROM tab0 AS cor0
----
-9
34
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - cor0.col2 col0 FROM tab2 cor0
----
-1444
-676
-729

query I rowsort
SELECT - col0 * - col0 + + ( col2 ) AS col0 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT + col1 * col0 * ( col0 ) FROM tab0
----
118825
49536
720811

query I rowsort
SELECT DISTINCT + 39 AS col1 FROM tab2
----
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 89 col2 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 860d55eb6785972467218a9c3badb5ad

query I rowsort
SELECT + ( col1 ) * 79 * - col0 FROM tab1
----
-50560
-6162
-82160

query I rowsort
SELECT DISTINCT - 10 FROM tab1
----
-10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * 22 + 25 col1 FROM tab0 AS cor0
----
1829
47
751

query I rowsort
SELECT + col2 + - cor0.col0 * col1 FROM tab0 AS cor0
----
-2031
-3394
-8017

query IIIIIIIII rowsort
SELECT * FROM tab2 cor0 CROSS JOIN tab0, tab0 AS cor1
----
243 values hashing to 021da207cdc2a046fb0a79bf7cfc38ae

query I rowsort
SELECT col0 + - ( col1 ) AS col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT + + cor0.col1 AS col2 FROM tab0 AS cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 37 + tab2.col1 col2 FROM tab2, tab1 AS cor0
----
-20
-6
22

query I rowsort
SELECT - ( + 0 ) AS col1 FROM tab0, tab1 AS cor0 CROSS JOIN tab2
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT - ( - col2 ) * col0 * + col2 AS col0 FROM tab0
----
26136
35
598436

query I rowsort
SELECT DISTINCT + col2 * + 41 AS col0 FROM tab2 AS cor0
----
1066
1107
1558

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 53 - 91 col1 FROM tab1 cor0
----
-38
-38
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col0 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT ALL - - cor0.col1 FROM tab1 AS cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT - - ( + col1 ) * col0 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - + col1 * - 40 FROM tab2 cor0
----
1240
2360
680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * - cor0.col1 + 12 col1 FROM tab0 AS cor0
----
-7384
-8269
-9397

query I rowsort
SELECT - 29 FROM tab0
----
-29
-29
-29

query I rowsort
SELECT ALL 72 FROM tab0
----
72
72
72

query I rowsort
SELECT ALL - - col0 + + col2 AS col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT - col1 * - cor0.col0 + - col1 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT + col2 + col2 * col0 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT + col2 + col0 * col1 AS col0 FROM tab1 cor0
----
1136
132
697

query I rowsort
SELECT - + cor0.col0 + + col2 FROM tab2 AS cor0
----
-41
-52
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-5981
SELECT DISTINCT col1 - + col1 DIV ( + 97 ) FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-5981
SELECT DISTINCT col1 - + col1 / ( + 97 ) FROM tab1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-5982
SELECT + col2 + - col0 DIV col2 AS col1 FROM tab1
----
54
56
96

skipif mysql # not compatible
query I rowsort label-5982
SELECT + col2 + - col0 / col2 AS col1 FROM tab1
----
54
56
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5983
SELECT ALL + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-5983
SELECT ALL + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - 23 AS col2 FROM tab2
----
-23
-23
-23

onlyif mysql # use DIV operator for integer division
query I rowsort label-5985
SELECT + + col2 * col2 - - 71 DIV - 83 FROM tab1 AS cor0
----
2916
3249
9216

skipif mysql # not compatible
query I rowsort label-5985
SELECT + + col2 * col2 - - 71 / - 83 FROM tab1 AS cor0
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-5986
SELECT col0 * col1 - - col2 DIV ( col1 * + col0 ) FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-5986
SELECT col0 * col1 - - col2 / ( col1 * + col0 ) FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT + + col1 + col2 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT - col2 + col0 AS col0 FROM tab0 AS cor0
----
-9
34
7

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0, tab1 AS cor1, tab0 AS cor2
----
972 values hashing to 95920403df268a272c4e933cd0bbe0be

onlyif mysql # use DIV operator for integer division
query I rowsort label-5990
SELECT 2 DIV col0 AS col1 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5990
SELECT 2 / col0 AS col1 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5991
SELECT - - col2 * ( + col2 ) * col2 - - col0 DIV + col1 AS col2 FROM tab2 AS cor0
----
17577
19683
54876

skipif mysql # not compatible
query I rowsort label-5991
SELECT - - col2 * ( + col2 ) * col2 - - col0 / + col1 AS col2 FROM tab2 AS cor0
----
17577
19683
54876

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5992
SELECT col1 * + CAST( NULL AS SIGNED ) + 6 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5992
SELECT col1 * + CAST ( NULL AS INTEGER ) + 6 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + 13 ) col1 FROM tab1 AS cor0
----
13
13
13

query I rowsort
SELECT 23 * - col2 AS col1 FROM tab0 AS cor0
----
-1886
-23
-759

query I rowsort
SELECT DISTINCT - 86 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
-86

query I rowsort
SELECT DISTINCT col2 * + col1 * col0 AS col2 FROM tab1
----
36480
4212
99840

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 cor0, tab2 AS cor1, tab2 cor2
----
972 values hashing to 64ce0e736818e884f0a9ecd075da5eb7

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2, tab2 AS cor0
----
7
78
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5999
SELECT - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5999
SELECT - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + col2 * col1 AS col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL + - ( + col2 ) + col2 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - 54 FROM tab1 AS cor0
----
-54

query I rowsort
SELECT + 44 AS col0 FROM tab0 AS cor0
----
44
44
44

query I rowsort
SELECT ALL - 12 * col2 * - ( + cor0.col1 ) AS col0 FROM tab0 cor0
----
1164
34056
89544

query I rowsort
SELECT ALL + - 29 * - col2 FROM tab2 AS cor0
----
1102
754
783

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT + 87 FROM tab1
----
87
87
87

query I rowsort
SELECT - 69 FROM tab0
----
-69
-69
-69

query I rowsort
SELECT cor0.col2 * + col1 + - col2 + cor0.col1 AS col1 FROM tab0 AS cor0
----
193
2891
7471

query I rowsort
SELECT col0 * col1 + col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT ALL col2 * col1 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab2 AS cor0
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-6013
SELECT ALL + col1 + col2 DIV + cor0.col0 AS col1 FROM tab0 AS cor0
----
87
91
97

skipif mysql # not compatible
query I rowsort label-6013
SELECT ALL + col1 + col2 / + cor0.col0 AS col1 FROM tab0 AS cor0
----
87
91
97

query I rowsort
SELECT + cor0.col2 + cor1.col0 AS col2 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 17e6537ffee10dccd14f4a1f12215238

onlyif mysql # use DIV operator for integer division
query I rowsort label-6015
SELECT ALL + col0 DIV + cor0.col2 + col1 FROM tab0 cor0
----
132
86
92

skipif mysql # not compatible
query I rowsort label-6015
SELECT ALL + col0 / + cor0.col2 + col1 FROM tab0 cor0
----
132
86
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * - col2 + cor0.col0 col1 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT DISTINCT col1 * col0 FROM tab0 AS cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col0 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT + col2 + - col1 FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6020
SELECT DISTINCT + col1 DIV - col1 FROM tab2
----
-1

skipif mysql # not compatible
query I rowsort label-6020
SELECT DISTINCT + col1 / - col1 FROM tab2
----
-1

query IIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0 WHERE NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT cor0.col2 * + cor0.col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT + col2 * col2 * - col1 FROM tab1 AS cor0
----
-119808
-32490
-75816

query I rowsort
SELECT + col0 * + col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL + - cor0.col0 AS col1 FROM tab1 AS cor0
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

onlyif mysql # use DIV operator for integer division
query I rowsort label-6027
SELECT col0 DIV col1 + + col2 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-6027
SELECT col0 / col1 + + col2 FROM tab0
----
1
33
82

query I rowsort
SELECT DISTINCT + col0 * + col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab1, tab0 AS cor0
----
1
33
82

query I rowsort
SELECT col0 * - col1 - - col0 FROM tab1
----
-576
-75
-960

query I rowsort
SELECT + col2 + tab0.col0 * col0 FROM tab0
----
1226
609
8003

query I rowsort
SELECT - - col1 + - col2 * - col1 AS col2 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT ALL + 60 * - col1 AS col0 FROM tab2 AS cor0
----
-1020
-1860
-3540

query I rowsort
SELECT + col2 * col2 - - col1 * col1 * col2 FROM tab2 cor0
----
12426
26676
91182

query I rowsort
SELECT DISTINCT - col2 * + col2 + - col1 + - col2 AS col1 FROM tab0 cor0
----
-1208
-6897
-99

query I rowsort
SELECT + ( col2 ) + col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL col2 + + col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL 69 - col1 * + col0 FROM tab2 AS cor0
----
-1274
-148
-4533

query I rowsort
SELECT DISTINCT 67 FROM tab2 AS cor0
----
67

query I rowsort
SELECT DISTINCT + 65 + + col0 AS col1 FROM tab2 AS cor0
----
143
144
72

query I rowsort
SELECT DISTINCT 17 AS col1 FROM tab2 AS cor0
----
17

query I rowsort
SELECT - cor0.col1 * + col2 + - cor0.col1 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT ALL col2 + cor0.col2 + col1 FROM tab2 AS cor0
----
111
85
93

query I rowsort
SELECT - + col0 + col1 FROM tab2 cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT + - col2 + + col2 FROM tab0 cor0
----
0

query I rowsort
SELECT DISTINCT + col1 * - col1 + col1 AS col0 FROM tab2 AS cor0
----
-272
-3422
-930

query I rowsort
SELECT ALL + 15 FROM tab2 AS cor0
----
15
15
15

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6048
SELECT ALL CAST( + col1 AS SIGNED ) AS col2 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-6048
SELECT ALL CAST ( + col1 AS INTEGER ) AS col2 FROM tab1
----
10
13
26

query I rowsort
SELECT ALL tab2.col0 - + ( - tab2.col0 + col0 ) FROM tab2
----
7
78
79

query I rowsort
SELECT ALL col0 - 84 AS col0 FROM tab2
----
-5
-6
-77

query I rowsort
SELECT DISTINCT - 44 FROM tab0
----
-44

query I rowsort
SELECT ( 68 ) FROM tab2
----
68
68
68

query I rowsort
SELECT ALL - tab1.col1 * - col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT 42 AS col1 FROM tab2
----
42
42
42

query I rowsort
SELECT ALL + col1 + col1 AS col1 FROM tab2
----
118
34
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col0 ) col1 FROM tab2
----
7
78
79

query I rowsort
SELECT col0 * - col2 * + col1 AS col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT ALL - 5 + - col0 AS col2 FROM tab0
----
-29
-40
-94

query I rowsort
SELECT - col1 + col2 AS col2 FROM tab2 AS cor0
----
-33
-4
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col1 col2 FROM tab2
----
118
34
62

query I rowsort
SELECT DISTINCT col1 * - col2 AS col0 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT col2 * + col2 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT DISTINCT - col0 * + col0 AS col2 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT col0 * - col0 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT ALL col1 * col1 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT col2 * col0 * - col2 FROM tab2 WHERE ( NULL ) NOT IN ( col2 )
----

query I rowsort
SELECT DISTINCT col2 * col1 * - col1 FROM tab2
----
-10982
-25947
-90506

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL <= ( col1 * col0 * - col0 )
----

query I rowsort
SELECT ALL col1 * col1 AS col0 FROM tab2
----
289
3481
961

query I rowsort
SELECT ALL - col2 * + col2 AS col1 FROM tab0
----
-1
-1089
-6724

query III rowsort
SELECT * FROM tab0 WHERE NOT col1 + + col1 NOT IN ( + col0 + tab0.col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6072
SELECT ALL - tab0.col0 + - col2 DIV col1 + tab0.col1 FROM tab0
----
2
62
62

skipif mysql # not compatible
query I rowsort label-6072
SELECT ALL - tab0.col0 + - col2 / col1 + tab0.col1 FROM tab0
----
2
62
62

query I rowsort
SELECT ALL - col2 * + col1 AS col0 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT ALL - col1 * - col1 + col0 AS col0 FROM tab2
----
3559
368
968

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col0 * col2 * - col0 col0 FROM tab2
----
-1323
-158184
-237158

query I rowsort
SELECT - tab1.col1 * tab1.col0 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT + col1 * col0 AS col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT DISTINCT + tab2.col1 * col0 + + col2 AS col1 FROM tab2
----
1381
244
4628

query I rowsort
SELECT - tab0.col0 AS col2 FROM tab0 WHERE NOT ( NULL ) IN ( + col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + col0 * col0 - col2 col2 FROM tab0
----
118824
49503
720729

query I rowsort
SELECT ALL + col2 * - col2 * - col1 FROM tab2 WHERE NOT ( - col0 ) > col1
----
22599
24548
39884

query III rowsort
SELECT * FROM tab2 WHERE + col1 = NULL
----

query I rowsort
SELECT col1 + tab0.col1 AS col2 FROM tab0 WHERE - col2 NOT IN ( col1 * - col1 + col1 - - tab0.col1 * - col2 )
----
172
182
194

query I rowsort
SELECT - col1 + + col1 AS col1 FROM tab0
----
0
0
0

query I rowsort
SELECT col2 + + col2 + + col2 FROM tab1
----
162
171
288

query I rowsort
SELECT DISTINCT + col0 * col1 AS col1 FROM tab0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col1 col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT col1 * col0 + col0 FROM tab0
----
2088
3430
8188

query I rowsort
SELECT + col2 + tab0.col1 AS col1 FROM tab0
----
119
173
98

query I rowsort
SELECT ALL + col0 * - col2 * + col2 FROM tab1
----
-207936
-737280
-8748

query I rowsort
SELECT DISTINCT - col2 + + col0 * + col2 AS col1 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT + col0 * + col2 AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT col2 * - col0 * cor0.col0 FROM tab0 AS cor0
----
-1225
-19008
-649522

query I rowsort
SELECT - col0 * + cor0.col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - col2 + + col1 * + col2 AS col0 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT DISTINCT + col0 + col2 * + col2 FROM tab0 AS cor0
----
1113
36
6813

query I rowsort
SELECT ALL + col1 + - col2 * + col0 FROM tab1 AS cor0
----
-136
-3638
-7667

onlyif mysql # use DIV operator for integer division
query I rowsort label-6098
SELECT DISTINCT + col2 * col0 DIV col1 FROM tab1 AS cor0
----
364
590
6

skipif mysql # not compatible
query I rowsort label-6098
SELECT DISTINCT + col2 * col0 / col1 FROM tab1 AS cor0
----
364
590
6

query I rowsort
SELECT ALL - + col1 AS col0 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ALL + col0 + col1 * + col0 AS col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT cor0.col0 + - col2 * col1 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT ALL col0 + - col2 FROM tab1 cor0
----
-16
-51
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col1 col2 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - col0 * col0 - + col1 * - col1 AS col0 FROM tab2
----
-2603
-5952
912

onlyif mysql # use DIV operator for integer division
query I rowsort label-6105
SELECT col0 DIV - col1 + col2 * col2 AS col2 FROM tab1
----
2916
3243
9210

skipif mysql # not compatible
query I rowsort label-6105
SELECT col0 / - col1 + col2 * col2 AS col2 FROM tab1
----
2916
3243
9210

onlyif mysql # use DIV operator for integer division
query I rowsort label-6106
SELECT cor0.col2 DIV + col2 + col0 FROM tab1 AS cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-6106
SELECT cor0.col2 / + col2 + col0 FROM tab1 AS cor0
----
4
65
81

query I rowsort
SELECT DISTINCT col1 * - col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT + col2 + + col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT - col2 * col2 + col1 + + col2 FROM tab1 AS cor0
----
-2836
-3182
-9107

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE NOT NULL <= NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6111
SELECT - col2 DIV + col2 AS col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6111
SELECT - col2 / + col2 AS col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col0 * 68 + - col0 col0 FROM tab0 AS cor0
----
1608
2345
5963

onlyif mysql # use DIV operator for integer division
query I rowsort label-6113
SELECT - 55 DIV col0 + col1 FROM tab2 cor0
----
17
24
59

skipif mysql # not compatible
query I rowsort label-6113
SELECT - 55 / col0 + col1 FROM tab2 cor0
----
17
24
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + 20 + - col1 col0 FROM tab2 cor0
----
461
509
743

onlyif mysql # use DIV operator for integer division
query I rowsort label-6115
SELECT DISTINCT + col2 DIV 30 AS col1 FROM tab0 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-6115
SELECT DISTINCT + col2 / 30 AS col1 FROM tab0 AS cor0
----
0
1
2

query I rowsort
SELECT + col1 - + ( + col1 ) FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6117
SELECT col0 / + 36 + - col2 * tab2.col0 + + CAST( NULL AS SIGNED ) AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6117
SELECT col0 / + 36 + - col2 * tab2.col0 + + CAST ( NULL AS INTEGER ) AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ( cor0.col1 ) FROM tab2, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + 44 col1 FROM tab0
----
133
68
79

query I rowsort
SELECT - 16 + + 45 AS col0 FROM tab2 AS cor0
----
29
29
29

query I rowsort
SELECT - col0 * 18 FROM tab0 AS cor0
----
-1602
-432
-630

query I rowsort
SELECT - + col0 - cor0.col0 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT 37 + col2 FROM tab1 AS cor0
----
133
91
94

query I rowsort
SELECT + 95 FROM tab0 AS cor0
----
95
95
95

query I rowsort
SELECT + 46 FROM tab2, tab1 AS cor0
----
9 values hashing to 31818c9d4d325eb248735c97cb1dce39

query I rowsort
SELECT ALL - + ( cor0.col2 ) * - col0 * 12 AS col1 FROM tab0 AS cor0
----
420
87576
9504

query IIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
243 values hashing to 098e223d780e18b6582523fd6f55eec9

query I rowsort
SELECT - cor0.col0 + col2 AS col0 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT 6 AS col2 FROM tab1, tab0 AS cor0, tab0 cor1, tab2, tab2 AS cor2
----
6

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 cor0, tab1 AS cor1, tab1 AS cor2
----
972 values hashing to fe55095fff3a5ecc2f113d14a8c6f823

query I rowsort
SELECT 21 AS col0 FROM tab2
----
21
21
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-6132
SELECT col1 DIV 19 FROM tab0
----
4
4
5

skipif mysql # not compatible
query I rowsort label-6132
SELECT col1 / 19 FROM tab0
----
4
4
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-6133
SELECT col1 DIV 2 AS col1 FROM tab2
----
15
29
8

skipif mysql # not compatible
query I rowsort label-6133
SELECT col1 / 2 AS col1 FROM tab2
----
15
29
8

query I rowsort
SELECT col1 + + col2 * - col0 FROM tab1
----
-136
-3638
-7667

onlyif mysql # use DIV operator for integer division
query I rowsort label-6135
SELECT - cor0.col0 DIV col0 AS col0 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6135
SELECT - cor0.col0 / col0 AS col0 FROM tab2 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-6136
SELECT ALL - col1 + col2 DIV - col1 AS col2 FROM tab2 AS cor0
----
-19
-31
-59

skipif mysql # not compatible
query I rowsort label-6136
SELECT ALL - col1 + col2 / - col1 AS col2 FROM tab2 AS cor0
----
-19
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-6137
SELECT + cor0.col2 DIV - cor0.col2 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6137
SELECT + cor0.col2 / - cor0.col2 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - cor0.col0 * col0 FROM tab2 AS cor0
----
-49
-6084
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL col2 + + ( col1 ) * - cor0.col0 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT ALL - 51 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 08d3853e39924d3c636260a6dd856837

query I rowsort
SELECT ALL + 12 FROM tab0, tab1 AS cor0
----
9 values hashing to d4f5a8e032294c3b9342821617800972

query I rowsort
SELECT + col0 * 79 FROM tab1 AS cor0
----
237
5056
6320

query I rowsort
SELECT ALL + col0 * + 91 AS col1 FROM tab1
----
273
5824
7280

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6145
SELECT + - CAST( NULL AS DECIMAL ) + 75 AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6145
SELECT + - CAST ( NULL AS REAL ) + 75 AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT tab2.col0 * - col0 * + col1 FROM tab2
----
-106097
-1519
-358956

query I rowsort
SELECT ALL col1 - + tab0.col2 * col2 AS col0 FROM tab0
----
-1003
-6633
96

query I rowsort
SELECT ALL + 63 * 44 AS col0 FROM tab0 AS cor0
----
2772
2772
2772

query I rowsort
SELECT DISTINCT - - 29 * 56 + - col2 * col0 * col1 FROM tab2 AS cor0
----
-118028
-4235
-49410

query I rowsort
SELECT ALL col1 * + col2 + - cor0.col1 AS col1 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT DISTINCT - col2 * ( col1 ) AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + col2 + cor0.col0 col1 FROM tab2 AS cor0
----
100
3
45

query I rowsort
SELECT DISTINCT + - cor0.col1 FROM tab2, tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT 23 + col2 AS col1 FROM tab2 AS cor0
----
49
50
61

query I rowsort
SELECT col1 * + col1 - col2 * + col1 FROM tab0
----
4558
819
9312

query I rowsort
SELECT - col0 * + cor0.col1 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT col1 * col2 * + col1 + - ( col2 ) * - col1 + col1 AS col0 FROM tab0
----
246992
686595
9603

query I rowsort
SELECT 52 FROM tab1
----
52
52
52

query I rowsort
SELECT DISTINCT tab1.col1 AS col2 FROM tab1
----
10
13
26

query I rowsort
SELECT 69 + col2 + - col1 * col1 AS col2 FROM tab0 AS cor0
----
-7294
-8130
-9339

query I rowsort
SELECT + - col1 * - ( - cor0.col2 ) FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT col1 * + ( - col1 ) FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL ( - col1 ) * - ( col2 ) FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT - 94 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
-94

query I rowsort
SELECT cor0.col2 + tab0.col2 AS col0 FROM tab0, tab0 cor0
----
9 values hashing to e8b9809976f40d5c02f4bd40ba0d7515

onlyif mysql # use DIV operator for integer division
query I rowsort label-6166
SELECT ALL col1 DIV col2 AS col2 FROM tab0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-6166
SELECT ALL col1 / col2 AS col2 FROM tab0
----
1
2
97

query IIIIII rowsort
SELECT * FROM tab1 cor0 CROSS JOIN tab2 cor1
----
54 values hashing to d8165ceb99ded93f34ad83c310a80ea7

query I rowsort
SELECT - ( col1 ) + + 58 * + col1 FROM tab0 AS cor0
----
4902
5187
5529

onlyif mysql # use DIV operator for integer division
query I rowsort label-6169
SELECT DISTINCT col2 + col0 * col0 DIV + col1 AS col1 FROM tab2 AS cor0
----
129
28
405

skipif mysql # not compatible
query I rowsort label-6169
SELECT DISTINCT col2 + col0 * col0 / + col1 AS col1 FROM tab2 AS cor0
----
129
28
405

query I rowsort
SELECT DISTINCT + - col1 + col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT ALL + + col0 + + col2 - + 68 FROM tab0 AS cor0
----
-11
-32
103

onlyif mysql # use DIV operator for integer division
query I rowsort label-6172
SELECT DISTINCT - 34 DIV col1 + 3 AS col2 FROM tab1 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-6172
SELECT DISTINCT - 34 / col1 + 3 AS col2 FROM tab1 AS cor0
----
0
1
2

query I rowsort
SELECT + + 33 FROM tab2 AS cor0
----
33
33
33

query I rowsort
SELECT DISTINCT ( + 59 ) AS col0 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 90 * - cor0.col2 col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 22b061673c4b575edb328df657d4470e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col2 * col0 + 88 col2 FROM tab1 AS cor0
----
250
3736
7768

query I rowsort
SELECT DISTINCT - - col2 + + 49 AS col1 FROM tab0 AS cor0
----
131
50
82

query I rowsort
SELECT + col2 + - col2 AS col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6179
SELECT ALL - - cor0.col1 + - 46 DIV cor0.col0 FROM tab0 cor0
----
85
91
96

skipif mysql # not compatible
query I rowsort label-6179
SELECT ALL - - cor0.col1 + - 46 / cor0.col0 FROM tab0 cor0
----
85
91
96

query I rowsort
SELECT ALL col2 * + 28 FROM tab2 cor0
----
1064
728
756

query I rowsort
SELECT + col2 * 52 FROM tab2 AS cor0
----
1352
1404
1976

query I rowsort
SELECT DISTINCT - col0 * cor0.col2 + + 34 AS col1 FROM tab0 AS cor0
----
-1
-7264
-758

query I rowsort
SELECT + cor0.col0 * - 93 + cor0.col2 FROM tab2 AS cor0
----
-624
-7228
-7309

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0, tab1 AS cor1, tab1 AS cor2
----
972 values hashing to f8fe28681e8720551e1ec173631fc529

query I rowsort
SELECT col0 + + col1 AS col1 FROM tab1
----
29
74
93

query I rowsort
SELECT ALL 5 - col2 * - tab1.col1 AS col0 FROM tab1
----
1253
1409
575

skipif mysql # not compatible
query I rowsort
SELECT + + CAST ( - cor0.col1 AS REAL ) FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT - 31 * col1 AS col2 FROM tab2 AS cor0
----
-1829
-527
-961

query I rowsort
SELECT + 81 * - 75 AS col1 FROM tab0 cor0
----
-6075
-6075
-6075

query I rowsort
SELECT DISTINCT + ( - 53 ) + - col2 FROM tab2 AS cor0
----
-79
-80
-91

query I rowsort
SELECT ALL col2 * + col2 * - col0 AS col0 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT ALL + + ( col0 ) AS col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT + - ( + col2 ) * col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + - cor0.col0 AS col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT 79 * cor2.col2 FROM tab0, tab1 AS cor0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to c452cfa4bc729bc1a115c965a1c2c5f9

query I rowsort
SELECT + 61 + - col1 * col1 AS col1 FROM tab0 AS cor0
----
-7335
-8220
-9348

query I rowsort
SELECT DISTINCT 45 * + col2 FROM tab2 cor0
----
1170
1215
1710

query I rowsort
SELECT DISTINCT 22 FROM tab0 cor0
----
22

query I rowsort
SELECT col1 * cor0.col2 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL col1 + - cor0.col1 * - 57 FROM tab1 AS cor0
----
1508
580
754

query I rowsort
SELECT DISTINCT - - 98 * - col0 AS col0 FROM tab2 cor0
----
-686
-7644
-7742

query I rowsort
SELECT - col0 - col1 AS col0 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT ALL - ( + col0 ) * - col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - - 2 + + col2 * - 37 - col1 FROM tab2 AS cor0
----
-1019
-1028
-1421

query I rowsort
SELECT DISTINCT ( + col0 ) * - col0 AS col0 FROM tab1 AS cor0
----
-4096
-6400
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-6206
SELECT DISTINCT + col0 DIV col2 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-6206
SELECT DISTINCT + col0 / col2 FROM tab0 AS cor0
----
0
1
35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6207
SELECT + + col1 * col2 + CAST( - col0 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
1456
567
830

skipif mysql # not compatible
query I rowsort label-6207
SELECT + + col1 * col2 + CAST ( - col0 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT DISTINCT - + col0 * + cor0.col1 + + col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT ALL col1 * cor0.col2 + + col2 * col1 FROM tab2 AS cor0
----
1292
1674
3068

query I rowsort
SELECT - + col0 + + col2 AS col1 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT + col0 + col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL + cor0.col1 + + col2 AS col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT + 58 * - col0 - - cor0.col2 FROM tab1 AS cor0
----
-120
-3655
-4544

query I rowsort
SELECT DISTINCT - cor1.col2 * - cor0.col0 AS col1 FROM tab2, tab1 cor0, tab1 AS cor1
----
9 values hashing to d678abade8bf70a0dcfdc79d6219306c

query I rowsort
SELECT + col2 * + ( col0 ) AS col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT DISTINCT - 55 - 92 AS col2 FROM tab0
----
-147

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6217
SELECT CAST( NULL AS SIGNED ) * - col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6217
SELECT CAST ( NULL AS INTEGER ) * - col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 + - tab1.col0 - - col1 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT DISTINCT 45 AS col1 FROM tab2 cor0
----
45

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 cor0, tab1 AS cor1, tab0 AS cor2
----
972 values hashing to e84152c0bf436177d3b3d80e42832d4f

query I rowsort
SELECT - col2 * + cor0.col1 + - ( - cor0.col2 + col0 ) FROM tab0 AS cor0
----
-131
-2829
-7469

query I rowsort
SELECT DISTINCT + col0 + - col2 AS col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT ALL - + ( col0 ) + 13 * - cor0.col1 FROM tab0 AS cor0
----
-1142
-1272
-1296

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0, tab2 AS cor1, tab2 AS cor2
----
972 values hashing to 958533d1a7bf61199ed7c03eadf37f9a

query I rowsort
SELECT col1 + col2 + + col0 AS col0 FROM tab0
----
133
143
262

onlyif mysql # use DIV operator for integer division
query I rowsort label-6226
SELECT DISTINCT + col0 + col1 DIV col1 AS col2 FROM tab0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-6226
SELECT DISTINCT + col0 + col1 / col1 AS col2 FROM tab0
----
25
36
90

query I rowsort
SELECT 92 + - col2 * + tab0.col0 AS col2 FROM tab0
----
-700
-7206
57

query I rowsort
SELECT - col2 * - col2 + col2 * col0 * col1 AS col2 FROM tab0 AS cor0
----
3396
670842
69201

query I rowsort
SELECT - col0 * + ( + col0 ) AS col2 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT 31 AS col2 FROM tab1
----
31
31
31

query I rowsort
SELECT - tab2.col2 * col0 AS col0 FROM tab2
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-6232
SELECT + 10 DIV + col2 col2 FROM tab0
----
0
0
10

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6232
SELECT + 10 / + col2 col2 FROM tab0
----
0
0
10

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6233
SELECT DISTINCT + 89 + - col2 + - CAST( NULL AS SIGNED ) * + col2 col0 FROM tab1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6233
SELECT DISTINCT + 89 + - col2 + - CAST ( NULL AS INTEGER ) * + col2 col0 FROM tab1
----
NULL

query I rowsort
SELECT - col1 * col1 AS col0 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT DISTINCT + col2 + + col1 FROM tab2
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - col0 ) col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT col2 + col1 * + 97 * + col0 AS col0 FROM tab0
----
200241
329316
785685

query I rowsort
SELECT + cor0.col1 * 72 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to b17d67bfae071d4f4915cb046f6991b0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 - + col1 * - col0 col2 FROM tab0
----
2040
3360
8010

query I rowsort
SELECT + + 78 * col2 FROM tab1 cor0
----
4212
4446
7488

query I rowsort
SELECT DISTINCT + 29 * + 88 FROM tab0 AS cor0
----
2552

query I rowsort
SELECT + col0 + + col1 AS col2 FROM tab1
----
29
74
93

query I rowsort
SELECT DISTINCT - tab2.col1 AS col1 FROM tab2
----
-17
-31
-59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6244
SELECT 58 * col1 + col2 / - CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6244
SELECT 58 * col1 + col2 / - CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 97 FROM tab0 cor0
----
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6246
SELECT ALL + ( 73 ) + - col2 DIV col0 col0 FROM tab0 AS cor0
----
72
73
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6246
SELECT ALL + ( 73 ) + - col2 / col0 col0 FROM tab0 AS cor0
----
72
73
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-6247
SELECT + 97 * 11 DIV col1 FROM tab2 AS cor0
----
18
34
62

skipif mysql # not compatible
query I rowsort label-6247
SELECT + 97 * 11 / col1 FROM tab2 AS cor0
----
18
34
62

query I rowsort
SELECT ALL - col0 * - 81 FROM tab0 cor0
----
1944
2835
7209

onlyif mysql # use DIV operator for integer division
query I rowsort label-6249
SELECT col2 + col0 DIV - cor0.col1 AS col1 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-6249
SELECT col2 + col0 / - cor0.col1 AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL + + 68 FROM tab1 AS cor0
----
68
68
68

query I rowsort
SELECT DISTINCT + + col0 + - 81 * col0 AS col2 FROM tab1 AS cor0
----
-240
-5120
-6400

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6252
SELECT + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6252
SELECT + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col0 * + ( + cor0.col0 ) FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL col1 * + 13 - col2 FROM tab2 AS cor0
----
183
376
741

query I rowsort
SELECT ALL + + col0 * - col0 + col2 FROM tab1 AS cor0
----
-4039
-6304
45

query I rowsort
SELECT DISTINCT + ( col2 ) + col1 + col1 FROM tab1 AS cor0
----
106
122
77

query I rowsort
SELECT ALL + tab2.col2 * - 1 FROM tab2, tab0 AS cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT ALL - col2 * 51 FROM tab1
----
-2754
-2907
-4896

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - col2 col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT + cor0.col2 * 5 FROM tab0 AS cor0
----
165
410
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - 27 ) - col2 col2 FROM tab1 AS cor0
----
-123
-81
-84

onlyif mysql # use DIV operator for integer division
query I rowsort label-6262
SELECT - cor0.col0 * ( - col0 ) + col2 DIV + col2 AS col1 FROM tab0 AS cor0
----
1226
577
7922

skipif mysql # not compatible
query I rowsort label-6262
SELECT - cor0.col0 * ( - col0 ) + col2 / + col2 AS col1 FROM tab0 AS cor0
----
1226
577
7922

query I rowsort
SELECT 57 * 20 AS col2 FROM tab0 AS cor0
----
1140
1140
1140

query I rowsort
SELECT + + cor0.col0 - col1 * - col2 AS col0 FROM tab2 AS cor0
----
1612
725
844

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6265
SELECT - - CAST( - 92 AS SIGNED ) * + cor0.col1 FROM tab1 cor0
----
-1196
-2392
-920

skipif mysql # not compatible
query I rowsort label-6265
SELECT - - CAST ( - 92 AS INTEGER ) * + cor0.col1 FROM tab1 cor0
----
-1196
-2392
-920

query I rowsort
SELECT ALL - col0 AS col2 FROM tab2 cor0
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 * 20 + - col0 col2 FROM tab0 cor0
----
1696
1731
1905

query I rowsort
SELECT ALL col1 * - col0 AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6269
SELECT + col2 * + CAST( NULL AS SIGNED ) * - col0 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6269
SELECT + col2 * + CAST ( NULL AS INTEGER ) * - col0 AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - 38 FROM tab2, tab0 AS cor0
----
9 values hashing to e571541ae40cb0ddaca16e11f4359507

query I rowsort
SELECT col0 * 40 + + col0 AS col0 FROM tab2 AS cor0
----
287
3198
3239

query I rowsort
SELECT ALL - - col0 * 70 AS col1 FROM tab0 AS cor0
----
1680
2450
6230

query I rowsort
SELECT + col2 * + col2 + + col0 AS col0 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT DISTINCT + col0 * + col1 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-6275
SELECT col1 + - col1 + col1 DIV cor0.col0 AS col0 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-6275
SELECT col1 + - col1 + col1 / cor0.col0 AS col0 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT + + 25 AS col2 FROM tab1 AS cor0
----
25
25
25

query I rowsort
SELECT DISTINCT - ( + col2 ) * tab1.col0 * + ( col0 ) AS col2 FROM tab1
----
-233472
-486
-614400

query I rowsort
SELECT ALL - 19 AS col0 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 339c9d62143bf2f7566b89a1b56eeeb4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 51 + col2 col0 FROM tab1
----
105
108
147

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT + + cor0.col0 * col1 + - col0 AS col1 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT - - ( + 10 ) AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to a47194429f3e0358a3aebffd5f050113

query I rowsort
SELECT - 62 FROM tab1
----
-62
-62
-62

query I rowsort
SELECT DISTINCT + 89 * col0 FROM tab0
----
2136
3115
7921

query I rowsort
SELECT + col0 * - col1 AS col1 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT - col0 * - col2 * + cor0.col0 AS col2 FROM tab2 AS cor0
----
1323
158184
237158

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6287
SELECT DISTINCT + col0 + + CAST( col2 * - col1 AS SIGNED ) col0 FROM tab1 AS cor0
----
-1168
-1401
-506

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6287
SELECT DISTINCT + col0 + + CAST ( col2 * - col1 AS INTEGER ) col0 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT - - col1 * col1 FROM tab1 AS cor0
----
100
169
676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6289
SELECT ALL + col0 * CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6289
SELECT ALL + col0 * CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + col0 * + col0 AS col0 FROM tab0 AS cor0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-6291
SELECT col2 DIV col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6291
SELECT col2 / col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + col0 * + 15 * col2 AS col1 FROM tab1 AS cor0
----
115200
2430
54720

query I rowsort
SELECT - - col1 * 25 FROM tab2 AS cor0
----
1475
425
775

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * col0 col2 FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-6295
SELECT DISTINCT cor0.col1 * 93 DIV - col0 col2 FROM tab1 AS cor0
----
-14
-15
-806

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6295
SELECT DISTINCT cor0.col1 * 93 / - col0 col2 FROM tab1 AS cor0
----
-14
-15
-806

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT ALL + col1 + col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL col1 * tab2.col1 AS col2 FROM tab2
----
289
3481
961

query I rowsort
SELECT DISTINCT - 82 + + cor0.col1 * - col2 AS col0 FROM tab1 AS cor0
----
-1330
-1486
-652

query I rowsort
SELECT - 37 * 99 FROM tab0 AS cor0
----
-3663
-3663
-3663

query I rowsort
SELECT + + col2 * 13 AS col0 FROM tab1 AS cor0
----
1248
702
741

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab0 AS cor2
----
972 values hashing to d522b52b67b20888d3544d25cb98f232

query I rowsort
SELECT 89 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

onlyif mysql # use DIV operator for integer division
query I rowsort label-6304
SELECT CAST( - 92 AS SIGNED ) * col2 DIV + col1 FROM tab2
----
-205
-40
-80

skipif mysql # not compatible
query I rowsort label-6304
SELECT CAST ( - 92 AS INTEGER ) * col2 / + col1 FROM tab2
----
-205
-40
-80

query I rowsort
SELECT ALL + col2 + + cor0.col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL - cor1.col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT + cor0.col2 - - col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL - + col1 + - cor0.col2 AS col2 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT DISTINCT - - col0 AS col0 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT + col0 - + 94 AS col2 FROM tab0
----
-5
-59
-70

query I rowsort
SELECT - col2 + col2 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT + col2 + col0 AS col2 FROM tab2
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-6313
SELECT DISTINCT - col1 DIV col2 + - 72 AS col2 FROM tab0
----
-169
-73
-74

skipif mysql # not compatible
query I rowsort label-6313
SELECT DISTINCT - col1 / col2 + - 72 AS col2 FROM tab0
----
-169
-73
-74

query I rowsort
SELECT + col1 * col2 + 47 * + tab2.col2 FROM tab2
----
2106
2432
2756

query I rowsort
SELECT 9 - col1 AS col1 FROM tab1
----
-1
-17
-4

query I rowsort
SELECT DISTINCT 89 * + tab1.col2 FROM tab1
----
4806
5073
8544

query I rowsort
SELECT col0 - tab0.col1 AS col1 FROM tab0
----
-2
-62
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-6318
SELECT ALL - col1 + col1 * tab1.col0 DIV - col2 + tab1.col2 col1 FROM tab1
----
27
36
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6318
SELECT ALL - col1 + col1 * tab1.col0 / - col2 + tab1.col2 col1 FROM tab1
----
27
36
73

query I rowsort
SELECT ( col1 ) * + col1 + col0 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT + + col2 * - col2 + 23 * col0 AS col1 FROM tab0 AS cor0
----
-4677
-537
804

query I rowsort
SELECT DISTINCT cor0.col1 AS col1 FROM tab0, tab1 cor0, tab1 AS cor1, tab1 AS cor2
----
10
13
26

query I rowsort
SELECT - ( + cor0.col0 ) FROM tab0 AS cor0
----
-24
-35
-89

query IIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab1 AS cor2
----
972 values hashing to 4634d10e8b6b37510bb99745aade36ab

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6324
SELECT DISTINCT + CAST( NULL AS DECIMAL ) + col1 AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6324
SELECT DISTINCT + CAST ( NULL AS REAL ) + col1 AS col2 FROM tab1 AS cor0
----
NULL

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 cor0, tab1, tab2 AS cor1
----
972 values hashing to 49c8bf3e931a898ba7af63d0e377eb79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + 41 + col2 col0 FROM tab0 AS cor0
----
41
41
41

query I rowsort
SELECT DISTINCT + col1 * col1 + col0 AS col1 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT - - col1 + + 16 FROM tab0 AS cor0
----
102
107
113

onlyif mysql # use DIV operator for integer division
query I rowsort label-6329
SELECT + CAST( - 91 AS SIGNED ) - cor0.col2 DIV + 8 AS col1 FROM tab2 AS cor0
----
-94
-94
-95

skipif mysql # not compatible
query I rowsort label-6329
SELECT + CAST ( - 91 AS INTEGER ) - cor0.col2 / + 8 AS col1 FROM tab2 AS cor0
----
-94
-94
-95

query I rowsort
SELECT ALL + 40 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

query I rowsort
SELECT + cor2.col1 * 8 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to 51aa1d142ee449f1288748df8e2b2379

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 col0 FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort
SELECT col0 + CAST ( col1 AS REAL ) + + col2 * + col2 AS col2 FROM tab2
----
1540
767
813

query I rowsort
SELECT + ( + 84 ) AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

query I rowsort
SELECT col2 * - col0 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT - cor0.col1 * tab0.col2 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 9248dc8e2a9503d5bb41eb88b96ebec3

query I rowsort
SELECT ALL 26 + ( + col2 ) * + tab0.col0 AS col2 FROM tab0
----
61
7324
818

query I rowsort
SELECT DISTINCT col2 + + ( col0 + col1 ) FROM tab0
----
133
143
262

query I rowsort
SELECT - ( + col0 ) AS col2 FROM tab1
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-6340
SELECT ALL col0 DIV - col2 + col2 AS col2 FROM tab0 cor0
----
-34
33
81

skipif mysql # not compatible
query I rowsort label-6340
SELECT ALL col0 / - col2 + col2 AS col2 FROM tab0 cor0
----
-34
33
81

query I rowsort
SELECT ALL + 68 * col2 FROM tab0 AS cor0
----
2244
5576
68

onlyif mysql # use DIV operator for integer division
query I rowsort label-6342
SELECT + - ( col1 ) * col2 + - 7 * col1 * + col2 + - col1 * col2 DIV col1 col0 FROM tab2 cor0
----
-12298
-5206
-6723

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6342
SELECT + - ( col1 ) * col2 + - 7 * col1 * + col2 + - col1 * col2 / col1 col0 FROM tab2 cor0
----
-12298
-5206
-6723

query I rowsort
SELECT DISTINCT + 21 * col2 FROM tab0 cor0
----
1722
21
693

query I rowsort
SELECT + 26 FROM tab0 AS cor0
----
26
26
26

query I rowsort
SELECT ALL + - 72 + 34 AS col1 FROM tab0 AS cor0
----
-38
-38
-38

query I rowsort
SELECT DISTINCT 91 * + cor0.col2 AS col2 FROM tab2 AS cor0
----
2366
2457
3458

query I rowsort
SELECT - 31 * tab1.col1 - + col2 FROM tab1
----
-367
-499
-860

query I rowsort
SELECT - col2 + - col0 AS col0 FROM tab1
----
-121
-176
-57

query I rowsort
SELECT 68 * col1 - + ( + 77 ) AS col2 FROM tab1
----
1691
603
807

query I rowsort
SELECT + col2 - col2 AS col2 FROM tab2
----
0
0
0

query I rowsort
SELECT + - cor0.col0 * cor0.col1 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-6352
SELECT DISTINCT + col2 + + col1 * + col2 * - 85 - + cor0.col2 DIV col0 AS col1 FROM tab1 AS cor0
----
-105985
-119304
-48393

skipif mysql # not compatible
query I rowsort label-6352
SELECT DISTINCT + col2 + + col1 * + col2 * - 85 - + cor0.col2 / col0 AS col1 FROM tab1 AS cor0
----
-105985
-119304
-48393

query I rowsort
SELECT + 2 * + col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL + col2 * - ( col2 ) * col2 AS col1 FROM tab2 AS cor0
----
-17576
-19683
-54872

query I rowsort
SELECT ALL + - cor0.col0 * col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT col2 * col0 + col1 AS col0 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT ALL - col2 * - ( - col0 ) - col1 AS col0 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT DISTINCT + col1 + 51 AS col0 FROM tab2 cor0
----
110
68
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6359
SELECT - + col1 * - CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6359
SELECT - + col1 * - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab2, tab1 AS cor1
----
243 values hashing to 877a8dbac0e29b86e845fb64ed9d2242

query I rowsort
SELECT + - col2 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT + col0 * + ( col2 ) + col1 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT DISTINCT 56 FROM tab0
----
56

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6364
SELECT ALL + col2 * + CAST( + 58 AS SIGNED ) FROM tab2 cor0
----
1508
1566
2204

skipif mysql # not compatible
query I rowsort label-6364
SELECT ALL + col2 * + CAST ( + 58 AS INTEGER ) FROM tab2 cor0
----
1508
1566
2204

query I rowsort
SELECT - - cor0.col2 * col1 AS col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT col0 * - ( + 70 ) AS col0 FROM tab2 AS cor0
----
-490
-5460
-5530

query I rowsort
SELECT + 11 FROM tab1
----
11
11
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * 44 col1 FROM tab2 AS cor0
----
1364
2596
748

query I rowsort
SELECT ALL col1 + - col0 AS col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT ALL + col0 + ( col0 ) AS col2 FROM tab2 cor0
----
14
156
158

query I rowsort
SELECT - col0 * + col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL cor0.col1 * cor0.col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL - - col0 AS col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL - col0 * + 33 FROM tab1
----
-2112
-2640
-99

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab0, tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT + - col2 * col2 * - 1 AS col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL col1 * + col1 + - 11 * - col1 * + 80 FROM tab0 AS cor0
----
83076
88361
94769

query I rowsort
SELECT DISTINCT - col2 * - 19 FROM tab1 AS cor0
----
1026
1083
1824

query I rowsort
SELECT - + col2 * 18 AS col0 FROM tab2 AS cor0
----
-468
-486
-684

onlyif mysql # use DIV operator for integer division
query I rowsort label-6380
SELECT + + col0 + col1 DIV cor0.col2 AS col1 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-6380
SELECT + + col0 + col1 / cor0.col2 AS col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL + + cor0.col2 + + col1 * + ( col2 ) * col1 AS col2 FROM tab0 AS cor0
----
244101
679124
9410

query I rowsort
SELECT + ( cor0.col1 ) FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT 58 + col0 * - col0 AS col2 FROM tab2 AS cor0
----
-6026
-6183
9

query I rowsort
SELECT + + 57 + + col1 AS col2 FROM tab2 AS cor0
----
116
74
88

query I rowsort
SELECT + ( - col0 ) * + col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT + 70 AS col2 FROM tab2 AS cor0
----
70

query I rowsort
SELECT ALL - - 1 + col1 AS col1 FROM tab2 AS cor0
----
18
32
60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6388
SELECT - - CAST( NULL AS SIGNED ) + + cor0.col1 * - cor0.col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6388
SELECT - - CAST ( NULL AS INTEGER ) + + cor0.col1 * - cor0.col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col0 * + 7 * col2 FROM tab1
----
-1134
-25536
-53760

query I rowsort
SELECT + ( - col2 ) * col1 * - 77 FROM tab2 AS cor0
----
118118
49742
64449

onlyif mysql # use DIV operator for integer division
query I rowsort label-6391
SELECT DISTINCT - - col2 + - col1 DIV col0 FROM tab0 AS cor0
----
-1
30
81

skipif mysql # not compatible
query I rowsort label-6391
SELECT DISTINCT - - col2 + - col1 / col0 FROM tab0 AS cor0
----
-1
30
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6392
SELECT + + col1 + col0 + CAST( NULL AS SIGNED ) AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6392
SELECT + + col1 + col0 + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6393
SELECT - + col0 DIV col1 + - col2 AS col1 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-6393
SELECT - + col0 / col1 + - col2 AS col1 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT + 13 FROM tab2 AS cor0
----
13

query I rowsort
SELECT DISTINCT - 67 + col0 * ( + col2 ) AS col0 FROM tab1 AS cor0
----
3581
7613
95

query I rowsort
SELECT - col2 * col0 + + col0 AS col0 FROM tab0 AS cor0
----
-7209
-768
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6397
SELECT ALL + col0 + + cor0.col2 + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6397
SELECT ALL + col0 + + cor0.col2 + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 17 + + col0 col2 FROM tab1 AS cor0
----
20
81
97

query I rowsort
SELECT + ( + cor0.col0 ) FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT 10 * - col2 FROM tab1 AS cor0
----
-540
-570
-960

query I rowsort
SELECT DISTINCT - + 86 * + col2 FROM tab0 AS cor0
----
-2838
-7052
-86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6402
SELECT - col0 / - col2 + CAST( NULL AS SIGNED ) * - cor0.col1 + - cor0.col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6402
SELECT - col0 / - col2 + CAST ( NULL AS INTEGER ) * - cor0.col1 + - cor0.col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + col2 + + cor0.col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT - cor0.col0 + - col1 + - col1 AS col1 FROM tab0 AS cor0
----
-196
-229
-271

onlyif mysql # use DIV operator for integer division
query I rowsort label-6405
SELECT DISTINCT cor0.col0 + - col2 DIV - 65 + + col1 FROM tab1 AS cor0
----
29
74
94

skipif mysql # not compatible
query I rowsort label-6405
SELECT DISTINCT cor0.col0 + - col2 / - 65 + + col1 FROM tab1 AS cor0
----
29
74
94

query I rowsort
SELECT ALL col0 + - col0 * + col2 * ( col1 ) + col1 FROM tab1
----
-36406
-4183
-99747

query I rowsort
SELECT ALL col0 + - 41 FROM tab0
----
-17
-6
48

query I rowsort
SELECT DISTINCT + col1 + col1 + 8 AS col2 FROM tab1 AS cor0
----
28
34
60

query I rowsort
SELECT DISTINCT col0 + + col2 * col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT - 45 AS col1 FROM tab0 AS cor0
----
-45
-45
-45

query I rowsort
SELECT + 26 FROM tab0, tab0 AS cor0
----
9 values hashing to 2d1c3129ed17fd721d4876b21c035584

query I rowsort
SELECT + col1 * col0 AS col2 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT - - col0 * col0 AS col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL - + cor0.col1 + + col0 * col2 AS col1 FROM tab0 AS cor0
----
-62
706
7207

query I rowsort
SELECT ALL - col2 * - cor0.col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT + col2 + + col2 FROM tab0
----
164
2
66

query I rowsort
SELECT - - 90 AS col1 FROM tab2 cor0
----
90
90
90

query I rowsort
SELECT + col2 * + cor0.col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT 26 AS col0 FROM tab2
----
26

query I rowsort
SELECT + 67 FROM tab2, tab0 AS cor0
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6421
SELECT DISTINCT CAST( NULL AS SIGNED ) * 6 + - col2 AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6421
SELECT DISTINCT CAST ( NULL AS INTEGER ) * 6 + - col2 AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - - 46 + - 93 AS col1 FROM tab2 AS cor0
----
-47
-47
-47

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab2, tab2 AS cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col1 col1 FROM tab0
----
86
91
97

query I rowsort
SELECT + - col2 AS col2 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT + 96 FROM tab0
----
96

query I rowsort
SELECT + ( + col2 ) * col2 AS col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT - + col0 * - 9 + + cor0.col2 FROM tab2 AS cor0
----
728
749
90

query I rowsort
SELECT ALL col1 * - col1 + + col0 AS col1 FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT DISTINCT + col1 * 64 AS col2 FROM tab1 AS cor0
----
1664
640
832

query I rowsort
SELECT - col2 + + col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT + + col1 + - col1 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + + cor0.col1 * - cor0.col2 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT + col0 * col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL col2 * 82 AS col1 FROM tab0 AS cor0
----
2706
6724
82

query I rowsort
SELECT - - col2 + col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT - + col2 * + 10 + - col1 * - col2 FROM tab0 AS cor0
----
2508
6642
87

query I rowsort
SELECT - col2 + col0 FROM tab1 AS cor0
----
-16
-51
7

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0, tab1 AS cor1, tab0, tab2 AS cor2
----
3645 values hashing to da83d3eeaeb9e24a3cb14bb7058757dd

query I rowsort
SELECT 61 FROM tab2 AS cor0
----
61
61
61

query I rowsort
SELECT - ( + 77 ) * col2 + - 58 AS col1 FROM tab2 AS cor0
----
-2060
-2137
-2984

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6442
SELECT - CAST( col2 AS SIGNED ) FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-6442
SELECT - CAST ( col2 AS INTEGER ) FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT + col1 + + col2 AS col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT - 48 FROM tab1, tab0 cor0
----
9 values hashing to 31c94943c073954e4ca20b170ab61f8c

query I rowsort
SELECT + + 28 * col0 AS col1 FROM tab0 AS cor0
----
2492
672
980

query I rowsort
SELECT + - 51 + col0 * col0 + 6 * - col1 AS col2 FROM tab1 AS cor0
----
-198
3985
6271

query I rowsort
SELECT - 97 + 56 * col0 FROM tab0 AS cor0
----
1247
1863
4887

query I rowsort
SELECT + + cor0.col0 + col0 + col0 FROM tab1 AS cor0
----
192
240
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-6449
SELECT DISTINCT 94 + + col1 * col1 DIV - 30 FROM tab1 AS cor0
----
72
89
91

skipif mysql # not compatible
query I rowsort label-6449
SELECT DISTINCT 94 + + col1 * col1 / - 30 FROM tab1 AS cor0
----
72
89
91

query I rowsort
SELECT ALL + 20 FROM tab1 AS cor0
----
20
20
20

query I rowsort
SELECT - - ( - col0 ) + - cor0.col2 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT ALL - ( - col1 ) AS col0 FROM tab1 AS cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + col2 col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col1 + 89 FROM tab1 AS cor0
----
102
115
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( + cor0.col0 ) col0 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT ALL col0 * col0 FROM tab1
----
4096
6400
9

query I rowsort
SELECT - col1 * col2 * - col0 FROM tab1 AS cor0
----
36480
4212
99840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6458
SELECT DISTINCT - + CAST( - col1 AS SIGNED ) FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-6458
SELECT DISTINCT - + CAST ( - col1 AS INTEGER ) FROM tab2 AS cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * + cor0.col2 col1 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT - 99 * col0 AS col0 FROM tab0 AS cor0
----
-2376
-3465
-8811

query I rowsort
SELECT - 9 + + cor0.col1 * - col2 FROM tab1 AS cor0
----
-1257
-1413
-579

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 14 + + 29 col2 FROM tab1 AS cor0
----
43
43
43

onlyif mysql # use DIV operator for integer division
query I rowsort label-6463
SELECT ALL - col0 DIV + col2 AS col1 FROM tab0 cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-6463
SELECT ALL - col0 / + col2 AS col1 FROM tab0 cor0
----
-1
-35
0

query I rowsort
SELECT DISTINCT + cor0.col2 + + col0 * + col1 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT ALL + + col2 AS col2 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT ALL - col0 * col2 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6467
SELECT ALL CAST( NULL AS SIGNED ) AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-6467
SELECT ALL CAST ( NULL AS INTEGER ) AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT - 95 AS col1 FROM tab2
----
-95
-95
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 29 col0 FROM tab0, tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
27 values hashing to 4c56285992bcb76e1aac22e6d23d1318

query I rowsort
SELECT DISTINCT - cor0.col1 + - col2 AS col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT - col0 + col0 * ( + col0 + - col0 ) AS col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT + cor0.col0 * - col1 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-6473
SELECT DISTINCT - 69 + col2 DIV - col0 FROM tab2 AS cor0
----
-69
-72

skipif mysql # not compatible
query I rowsort label-6473
SELECT DISTINCT - 69 + col2 / - col0 FROM tab2 AS cor0
----
-69
-72

query I rowsort
SELECT + 34 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 1146d159f0b9b4378a8b738b963f7039

query I rowsort
SELECT ALL + cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT + 40 FROM tab1, tab2 AS cor0
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

query I rowsort
SELECT ALL - col0 * 30 AS col1 FROM tab0
----
-1050
-2670
-720

query I rowsort
SELECT 12 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to d4f5a8e032294c3b9342821617800972

query I rowsort
SELECT + + col0 + col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT col2 * 57 + 77 FROM tab0 AS cor0
----
134
1958
4751

query I rowsort
SELECT ALL col2 + + ( col1 ) * col2 AS col2 FROM tab0 cor0
----
2871
7544
98

query I rowsort
SELECT ALL 35 AS col1 FROM tab0, tab1 cor0, tab0 AS cor1
----
27 values hashing to 0d13dfd4c4a9d51ace3582c31cadcdbc

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6483
SELECT cor0.col0 * CAST( NULL AS DECIMAL ) + 35 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6483
SELECT cor0.col0 * CAST ( NULL AS REAL ) + 35 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6484
SELECT - - col2 DIV - col2 + + 54 * + col2 FROM tab0 AS cor0
----
1781
4427
53

skipif mysql # not compatible
query I rowsort label-6484
SELECT - - col2 / - col2 + + 54 * + col2 FROM tab0 AS cor0
----
1781
4427
53

query I rowsort
SELECT ALL - col1 * col0 + + cor0.col0 * - col1 AS col2 FROM tab1 AS cor0
----
-1280
-156
-2080

query I rowsort
SELECT + + 98 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

query I rowsort
SELECT DISTINCT + tab0.col0 + 4 AS col0 FROM tab0, tab0 AS cor0
----
28
39
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-6488
SELECT ALL col1 DIV + col0 - 13 FROM tab1
----
-13
-13
-5

skipif mysql # not compatible
query I rowsort label-6488
SELECT ALL col1 / + col0 - 13 FROM tab1
----
-13
-13
-5

query I rowsort
SELECT + col1 * 98 FROM tab1
----
1274
2548
980

query I rowsort
SELECT col1 * + 0 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT + 61 AS col1 FROM tab2, tab0 AS cor0
----
61

query I rowsort
SELECT 46 FROM tab0, tab2 cor0
----
9 values hashing to 31818c9d4d325eb248735c97cb1dce39

query I rowsort
SELECT + cor0.col1 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT ALL col0 - - tab0.col0 * col2 AS col1 FROM tab0
----
70
7387
816

query I rowsort
SELECT DISTINCT - col1 - - tab1.col2 AS col0 FROM tab1
----
28
47
83

query I rowsort
SELECT ALL col0 * col1 - + 14 AS col0 FROM tab0
----
2050
3381
8085

query I rowsort
SELECT - ( + col0 ) * col1 AS col2 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL + ( col0 ) FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + + 54 * col2 FROM tab0 AS cor0
----
1782
4428
54

query I rowsort
SELECT ALL - col1 * col1 AS col2 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT ALL + 43 AS col2 FROM tab0 AS cor0
----
43
43
43

query I rowsort
SELECT ALL + - 81 * col1 FROM tab2 AS cor0
----
-1377
-2511
-4779

query I rowsort
SELECT DISTINCT - ( + col0 ) + cor0.col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT ALL + col1 * col2 AS col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL 3 * col1 AS col2 FROM tab0 AS cor0
----
258
273
291

query I rowsort
SELECT - + col1 * + col1 * + col1 FROM tab1 AS cor0
----
-1000
-17576
-2197

onlyif mysql # use DIV operator for integer division
query I rowsort label-6507
SELECT - col1 * - col0 DIV col0 AS col0 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-6507
SELECT - col1 * - col0 / col0 AS col0 FROM tab2 AS cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 * col2 col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT 82 FROM tab2 cor0
----
82

query I rowsort
SELECT col0 + col1 * col0 FROM tab1 AS cor0
----
1120
704
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-6511
SELECT ALL - 73 DIV - col1 + cor0.col0 * col0 AS col1 FROM tab2 AS cor0
----
51
6085
6245

skipif mysql # not compatible
query I rowsort label-6511
SELECT ALL - 73 / - col1 + cor0.col0 * col0 AS col1 FROM tab2 AS cor0
----
51
6085
6245

query I rowsort
SELECT DISTINCT + - 44 AS col0 FROM tab2 AS cor0
----
-44

query I rowsort
SELECT ALL + col2 * cor0.col0 FROM tab1 cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-6514
SELECT - 20 DIV col1 AS col0 FROM tab2 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-6514
SELECT - 20 / col1 AS col0 FROM tab2 AS cor0
----
-1
0
0

query I rowsort
SELECT ALL + 37 * - col0 AS col2 FROM tab2
----
-259
-2886
-2923

query I rowsort
SELECT + col0 * + cor0.col1 + cor0.col1 AS col2 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT DISTINCT col0 + + cor0.col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT cor1.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT + ( - col2 ) + + col2 AS col1 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6520
SELECT DISTINCT 83 DIV col2 FROM tab0
----
1
2
83

skipif mysql # not compatible
query I rowsort label-6520
SELECT DISTINCT 83 / col2 FROM tab0
----
1
2
83

query I rowsort
SELECT + 28 FROM tab2
----
28
28
28

query I rowsort
SELECT col0 + col0 * - col1 AS col1 FROM tab1
----
-576
-75
-960

query I rowsort
SELECT - - col0 * + 39 + col2 * col1 + col2 FROM tab0 AS cor0
----
11015
1463
3807

query I rowsort
SELECT DISTINCT + col1 * ( col0 * - col2 ) + - col1 FROM tab1 AS cor0
----
-36490
-4238
-99853

onlyif mysql # use DIV operator for integer division
query I rowsort label-6525
SELECT ALL + 25 DIV 76 AS col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6525
SELECT ALL + 25 / 76 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col0 * col1 + cor0.col2 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT ALL 68 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

query I rowsort
SELECT + col1 * col2 AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL - + cor0.col2 + + 30 FROM tab2 cor0
----
-8
3
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6530
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6530
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6531
SELECT ( - col2 ) DIV col1 + + col0 FROM tab2
----
7
77
78

skipif mysql # not compatible
query I rowsort label-6531
SELECT ( - col2 ) / col1 + + col0 FROM tab2
----
7
77
78

query I rowsort
SELECT ALL 18 * ( - col0 * tab0.col2 ) AS col2 FROM tab0
----
-131364
-14256
-630

query I rowsort
SELECT ALL col0 * - 88 AS col2 FROM tab0
----
-2112
-3080
-7832

query I rowsort
SELECT 87 + 46 * + col2 AS col0 FROM tab1
----
2571
2709
4503

query I rowsort
SELECT DISTINCT + col0 * col1 FROM tab2
----
1343
217
4602

query I rowsort
SELECT DISTINCT + tab0.col0 AS col1 FROM tab0
----
24
35
89

query I rowsort
SELECT DISTINCT - 19 * 79 FROM tab0
----
-1501

query I rowsort
SELECT 99 FROM tab1
----
99
99
99

query I rowsort
SELECT ALL + col1 * - col0 AS col0 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT + 21 FROM tab1
----
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-6541
SELECT ALL + 57 + + 53 DIV col2 AS col1 FROM tab0 AS cor0
----
110
57
58

skipif mysql # not compatible
query I rowsort label-6541
SELECT ALL + 57 + + 53 / col2 AS col1 FROM tab0 AS cor0
----
110
57
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-6542
SELECT ALL cor0.col0 + col1 * - col0 DIV col0 FROM tab1 AS cor0
----
-23
54
67

skipif mysql # not compatible
query I rowsort label-6542
SELECT ALL cor0.col0 + col1 * - col0 / col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT - col1 + - ( + col2 ) * col2 AS col2 FROM tab1 AS cor0
----
-2942
-3259
-9229

onlyif mysql # use DIV operator for integer division
query I rowsort label-6544
SELECT DISTINCT col0 DIV - col0 col0 FROM tab0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6544
SELECT DISTINCT col0 / - col0 col0 FROM tab0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab1.col0 * col1 col2 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT ALL + col2 * col1 + - col1 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query III rowsort
SELECT * FROM tab1 cor0 WHERE NOT - col1 IN ( cor0.col2 + col1 + col2 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT DISTINCT col1 AS col0 FROM tab2 AS cor0 WHERE col0 + + col1 = NULL
----

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab0, tab1 AS cor0 CROSS JOIN tab1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 cor0 CROSS JOIN tab0
----
243 values hashing to 2ba47a833971d4c4b0287e849fb0cfb8

query I rowsort
SELECT col2 + col2 * col2 FROM tab2
----
1482
702
756

query I rowsort
SELECT tab0.col1 AS col2 FROM tab0
----
86
91
97

query I rowsort
SELECT ALL col2 * + col1 / - tab2.col1 FROM tab2 WHERE col0 * col2 IN ( tab2.col2 )
----

query I rowsort
SELECT DISTINCT col2 + - col1 AS col1 FROM tab1
----
28
47
83

query I rowsort
SELECT ALL - col1 + col0 FROM tab0
----
-2
-62
-62

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL NOT BETWEEN + col2 AND col2
----

query I rowsort
SELECT ALL + tab0.col2 + - col2 AS col0 FROM tab0
----
0
0
0

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE NOT ( col2 * cor0.col1 + col2 * - col0 * - col1 ) IN ( - col2 * + col2 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + cor0.col1 col2 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT col0 + col2 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT DISTINCT + tab0.col1 + - col1 AS col2 FROM tab0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6563
SELECT + col2 * + col1 + - col2 DIV tab0.col2 + + col0 AS col2 FROM tab0
----
131
2861
7550

skipif mysql # not compatible
query I rowsort label-6563
SELECT + col2 * + col1 + - col2 / tab0.col2 + + col0 AS col2 FROM tab0
----
131
2861
7550

query I rowsort
SELECT DISTINCT col2 * col1 * col2 FROM tab2
----
22599
24548
39884

query I rowsort
SELECT DISTINCT + tab1.col0 + - col0 FROM tab1
----
0

query I rowsort
SELECT + col1 + col0 AS col1 FROM tab0
----
110
132
180

query I rowsort
SELECT DISTINCT + tab0.col2 + - col0 AS col1 FROM tab0
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-6568
SELECT col2 DIV tab2.col0 col0 FROM tab2
----
0
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6568
SELECT col2 / tab2.col0 col0 FROM tab2
----
0
0
3

query I rowsort
SELECT - col1 * col2 AS col2 FROM tab0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6570
SELECT DISTINCT col1 DIV col0 + + col0 FROM tab1
----
11
64
80

skipif mysql # not compatible
query I rowsort label-6570
SELECT DISTINCT col1 / col0 + + col0 FROM tab1
----
11
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - col0 col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT col1 + + col1 FROM tab1 AS cor0
----
20
26
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - cor0.col2 + - col2 * - col2 col1 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT ALL + col1 + - cor0.col2 * col0 FROM tab0 AS cor0
----
-706
-7207
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - col0 col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT ALL - col0 + cor0.col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT col1 * + col2 AS col0 FROM tab2 AS cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - cor0.col0 * col2 col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + col1 + - col0 * - cor0.col0 AS col1 FROM tab0 cor0
----
1322
662
8012

query I rowsort
SELECT + col1 * col2 + col1 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT ALL - col0 + - col2 * col2 * col2 AS col2 FROM tab2 AS cor0
----
-17654
-19690
-54951

query I rowsort
SELECT ALL - col2 * cor0.col1 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 + col2 * cor0.col1 col2 FROM tab1 AS cor0
----
1328
1407
634

onlyif mysql # use DIV operator for integer division
query I rowsort label-6584
SELECT DISTINCT + + col0 DIV col0 AS col1 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-6584
SELECT DISTINCT + + col0 / col0 AS col1 FROM tab0 AS cor0
----
1

query I rowsort
SELECT ALL - col1 * + col2 + cor0.col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT col1 * col2 + col2 AS col2 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT DISTINCT - - cor0.col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL + col2 + col1 AS col1 FROM tab2 cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-6589
SELECT DISTINCT col0 DIV col0 + col2 AS col0 FROM tab1
----
55
58
97

skipif mysql # not compatible
query I rowsort label-6589
SELECT DISTINCT col0 / col0 + col2 AS col0 FROM tab1
----
55
58
97

query I rowsort
SELECT + col0 * + col2 AS col1 FROM tab2
----
189
2028
3002

query I rowsort
SELECT - col1 + col2 * col2 FROM tab2
----
1427
617
698

query I rowsort
SELECT cor0.col1 + - col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - col1 * col1 + + col1 * cor0.col2 FROM tab1 AS cor0
----
1079
470
728

query I rowsort
SELECT col1 + col2 * + col2 FROM tab2
----
1461
735
760

query I rowsort
SELECT + cor0.col0 + - cor0.col2 AS col1 FROM tab0 cor0
----
-9
34
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6596
SELECT + + col2 + - col0 DIV col0 + col2 FROM tab2 AS cor0
----
51
53
75

skipif mysql # not compatible
query I rowsort label-6596
SELECT + + col2 + - col0 / col0 + col2 FROM tab2 AS cor0
----
51
53
75

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2, tab1 AS cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6598
SELECT col2 DIV col1 + + col0 + col1 AS col2 FROM tab2 AS cor0
----
137
38
98

skipif mysql # not compatible
query I rowsort label-6598
SELECT col2 / col1 + + col0 + col1 AS col2 FROM tab2 AS cor0
----
137
38
98

query I rowsort
SELECT cor0.col1 + + col2 * + 19 + - col2 FROM tab2 AS cor0
----
517
527
701

query I rowsort
SELECT + + col1 + + 23 FROM tab0 AS cor0
----
109
114
120

query I rowsort
SELECT DISTINCT + + col2 + - ( + col1 * col2 ) + + col2 * - col0 AS col0 FROM tab1 cor0
----
-1512
-4161
-8832

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 74 col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

query I rowsort
SELECT 43 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to ee5108f6248be48c54e069545f81c5d9

onlyif mysql # use DIV operator for integer division
query I rowsort label-6604
SELECT ALL + col1 * - col0 DIV - col0 + - col0 * col1 FROM tab2 AS cor0
----
-1326
-186
-4543

skipif mysql # not compatible
query I rowsort label-6604
SELECT ALL + col1 * - col0 / - col0 + - col0 * col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT + col0 + col0 * col2 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT DISTINCT ( - cor0.col1 + 82 ) FROM tab2, tab2 AS cor0, tab0 AS cor1
----
23
51
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-6607
SELECT + col1 + ( 89 ) DIV col0 FROM tab2
----
18
43
60

skipif mysql # not compatible
query I rowsort label-6607
SELECT + col1 + ( 89 ) / col0 FROM tab2
----
18
43
60

query I rowsort
SELECT + col1 * cor0.col1 + col0 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT ALL + col2 * + 13 AS col2 FROM tab2
----
338
351
494

query I rowsort
SELECT ALL col1 * + col0 * col0 FROM tab2
----
106097
1519
358956

query I rowsort
SELECT col1 + - col2 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT col0 * - 93 AS col2 FROM tab1
----
-279
-5952
-7440

query I rowsort
SELECT ALL + col1 + + col0 AS col1 FROM tab1
----
29
74
93

query I rowsort
SELECT DISTINCT col1 + 65 AS col1 FROM tab2
----
124
82
96

query I rowsort
SELECT ALL 65 FROM tab1, tab2 AS cor0
----
9 values hashing to 8bef2ea1f05f3514633f851312bdd805

query I rowsort
SELECT 32 FROM tab2, tab2 AS cor0
----
9 values hashing to d30a2acbf33c88274474306936d3227b

query I rowsort
SELECT - 64 * - col2 FROM tab2 AS cor0
----
1664
1728
2432

query I rowsort
SELECT - - col2 + + col1 * - 84 FROM tab1 AS cor0
----
-2130
-783
-996

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6619
SELECT cor0.col0 * col2 + CAST( col2 AS SIGNED ) * col0 * cor0.col0 FROM tab0 AS cor0
----
1260
19800
656820

skipif mysql # not compatible
query I rowsort label-6619
SELECT cor0.col0 * col2 + CAST ( col2 AS INTEGER ) * col0 * cor0.col0 FROM tab0 AS cor0
----
1260
19800
656820

query I rowsort
SELECT - + 5 * - col1 - - col2 FROM tab2 AS cor0
----
123
182
321

query I rowsort
SELECT DISTINCT + 47 AS col0 FROM tab0, tab0 AS cor0
----
47

query I rowsort
SELECT tab0.col2 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6624
SELECT + CAST( + col2 * col0 AS SIGNED ) AS col1 FROM tab1
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-6624
SELECT + CAST ( + col2 * col0 AS INTEGER ) AS col1 FROM tab1
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 0 * col1 col2 FROM tab0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 21 col0 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 312c166f4dc412730c43555105b1f44b

query I rowsort
SELECT 97 * - 3 AS col2 FROM tab0
----
-291
-291
-291

query I rowsort
SELECT 47 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 4fe192f296791e1e40ea00a68aa8dab7

query I rowsort
SELECT ALL 59 AS col2 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to e29fef8cdec1ee45a71d213f16d2f1d3

query I rowsort
SELECT DISTINCT ( col1 + + col2 ) AS col0 FROM tab2
----
55
58
85

query I rowsort
SELECT + - ( 93 ) FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 38f445d95788c7dc754ff688a62df03b

query I rowsort
SELECT ( + cor1.col0 ) AS col1 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT DISTINCT - ( tab0.col2 ) FROM tab0
----
-1
-33
-82

query I rowsort
SELECT + 74 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to dc22979e6d261795bd3ce2990fdbbf82

onlyif mysql # use DIV operator for integer division
query I rowsort label-6635
SELECT - cor0.col0 DIV col0 + cor0.col0 FROM tab2 AS cor0
----
6
77
78

skipif mysql # not compatible
query I rowsort label-6635
SELECT - cor0.col0 / col0 + cor0.col0 FROM tab2 AS cor0
----
6
77
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-6636
SELECT + 68 + cor0.col1 DIV - col2 AS col0 FROM tab1 AS cor0
----
68
68
68

skipif mysql # not compatible
query I rowsort label-6636
SELECT + 68 + cor0.col1 / - col2 AS col0 FROM tab1 AS cor0
----
68
68
68

query I rowsort
SELECT + - 97 - + col2 FROM tab1 AS cor0
----
-151
-154
-193

query I rowsort
SELECT + 49 + + col1 FROM tab2 AS cor0
----
108
66
80

query I rowsort
SELECT 99 * + cor0.col0 FROM tab1 AS cor0
----
297
6336
7920

query I rowsort
SELECT ALL - tab0.col1 - + col1 AS col1 FROM tab0
----
-172
-182
-194

query I rowsort
SELECT ALL tab0.col0 - col1 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT ALL 60 FROM tab0
----
60
60
60

query I rowsort
SELECT DISTINCT - - col2 + 13 * col2 FROM tab0 AS cor0
----
1148
14
462

query I rowsort
SELECT - 66 AS col2 FROM tab0
----
-66
-66
-66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6645
SELECT - ( + col0 * CAST( NULL AS SIGNED ) ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6645
SELECT - ( + col0 * CAST ( NULL AS INTEGER ) ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - ( - col0 ) FROM tab0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-6647
SELECT ALL ( + col2 ) DIV + ( - 32 ) - - col1 FROM tab1
----
10
25
9

skipif mysql # not compatible
query I rowsort label-6647
SELECT ALL ( + col2 ) / + ( - 32 ) - - col1 FROM tab1
----
10
25
9

query I rowsort
SELECT DISTINCT ( + col0 ) - - col1 AS col1 FROM tab2
----
137
38
96

query I rowsort
SELECT + - col0 * + 14 + cor0.col2 FROM tab1 AS cor0
----
-1024
-839
12

query I rowsort
SELECT ALL + - col0 + cor0.col0 FROM tab1 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6651
SELECT + + col2 DIV col1 + col2 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-6651
SELECT + + col2 / col1 + col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT - + col0 + - col1 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT - col0 + - ( 73 ) AS col2 FROM tab0 cor0
----
-108
-162
-97

query I rowsort
SELECT DISTINCT cor0.col1 * ( - col0 ) + col1 * col2 AS col2 FROM tab2 AS cor0
----
-3068
-697
620

query I rowsort
SELECT - + cor0.col0 + - 51 FROM tab1 AS cor0
----
-115
-131
-54

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0, tab0, tab0 AS cor1
----
972 values hashing to ea0f747588ddf5869ee18a5e22d9f237

query I rowsort
SELECT + cor0.col2 * + col1 - col1 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT DISTINCT + - col1 + col2 - + col1 FROM tab1 cor0
----
2
37
70

query I rowsort
SELECT col2 * col0 - + col2 AS col0 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT ALL + + col0 + + 46 FROM tab0 AS cor0
----
135
70
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-6661
SELECT DISTINCT - col2 DIV - col2 - - col0 FROM tab1 AS cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-6661
SELECT DISTINCT - col2 / - col2 - - col0 FROM tab1 AS cor0
----
4
65
81

query I rowsort
SELECT + - col1 - - col2 AS col0 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT - cor0.col2 * ( 73 ) FROM tab0 AS cor0
----
-2409
-5986
-73

query I rowsort
SELECT ALL + + col0 + col1 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT ALL col0 + - 86 AS col0 FROM tab0 AS cor0
----
-51
-62
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-6666
SELECT + col0 DIV + cor0.col0 + - col2 FROM tab1 AS cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-6666
SELECT + col0 / + cor0.col0 + - col2 FROM tab1 AS cor0
----
-53
-56
-95

query I rowsort
SELECT DISTINCT - col1 + + 71 * col1 AS col1 FROM tab2 AS cor0
----
1190
2170
4130

query I rowsort
SELECT ALL + col2 + col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT cor0.col0 AS col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ( col1 + col0 ) FROM tab2
----
137
38
96

query I rowsort
SELECT + 52 * col0 AS col2 FROM tab2 cor0
----
364
4056
4108

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6672
SELECT DISTINCT CAST( 63 AS SIGNED ) FROM tab1 AS cor0
----
63

skipif mysql # not compatible
query I rowsort label-6672
SELECT DISTINCT CAST ( 63 AS INTEGER ) FROM tab1 AS cor0
----
63

query I rowsort
SELECT DISTINCT - 90 * 33 AS col0 FROM tab0 AS cor0
----
-2970

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6674
SELECT ALL + CAST( NULL AS SIGNED ) * + 50 + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6674
SELECT ALL + CAST ( NULL AS INTEGER ) * + 50 + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + cor0.col1 FROM tab2 AS cor0
----
17
31
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6676
SELECT - + CAST( NULL AS SIGNED ) * 31 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6676
SELECT - + CAST ( NULL AS INTEGER ) * 31 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 * 3 * + col0 FROM tab2 AS cor0
----
147
18252
18723

onlyif mysql # use DIV operator for integer division
query I rowsort label-6678
SELECT - + ( 10 ) DIV col2 AS col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6678
SELECT - + ( 10 ) / col2 AS col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6679
SELECT DISTINCT - + 36 + + col2 * CAST( 2 AS SIGNED ) * + col0 AS col0 FROM tab0 AS cor0
----
14560
1548
34

skipif mysql # not compatible
query I rowsort label-6679
SELECT DISTINCT - + 36 + + col2 * CAST ( 2 AS INTEGER ) * + col0 AS col0 FROM tab0 AS cor0
----
14560
1548
34

query I rowsort
SELECT DISTINCT - col2 * col0 + col0 + col1 * + col0 FROM tab0 AS cor0
----
1296
3395
890

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col1 col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT + + 41 * + col0 FROM tab0 cor0
----
1435
3649
984

query I rowsort
SELECT col0 + col2 AS col2 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-6684
SELECT ALL + - 87 * col2 + col2 * + col0 + + col2 DIV cor0.col0 AS col2 FROM tab2 AS cor0
----
-2157
-234
-304

skipif mysql # not compatible
query I rowsort label-6684
SELECT ALL + - 87 * col2 + col2 * + col0 + + col2 / cor0.col0 AS col2 FROM tab2 AS cor0
----
-2157
-234
-304

query I rowsort
SELECT DISTINCT col0 * + col0 AS col1 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT ALL - cor0.col1 * col1 AS col0 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT cor0.col0 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT ALL - col0 * 54 AS col2 FROM tab2
----
-378
-4212
-4266

query I rowsort
SELECT ALL 35 + col0 FROM tab0 AS cor0
----
124
59
70

query I rowsort
SELECT - + 21 FROM tab2 AS cor0
----
-21
-21
-21

query I rowsort
SELECT DISTINCT - 86 + - ( col1 ) FROM tab1 AS cor0
----
-112
-96
-99

query I rowsort
SELECT ALL - - 86 AS col1 FROM tab2 cor0
----
86
86
86

query I rowsort
SELECT ( - col0 ) AS col0 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT - col1 + - ( + col1 ) * col0 + - col0 * + col2 * - col1 FROM tab2 AS cor0
----
114991
49674
5611

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 4 col1 FROM tab0 AS cor0
----
4
4
4

query I rowsort
SELECT DISTINCT + col0 * + col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT ( - ( + cor0.col2 ) ) * + col1 + col2 + + cor0.col0 * - col2 AS col0 FROM tab0 AS cor0
----
-131
-14678
-3597

query I rowsort
SELECT DISTINCT 77 * col2 FROM tab2 AS cor0
----
2002
2079
2926

query I rowsort
SELECT ALL col2 * + 7 + - col1 FROM tab2 cor0
----
123
158
249

query I rowsort
SELECT DISTINCT col0 * + cor0.col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - + ( col1 ) * col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT + ( 67 ) + col1 FROM tab1 AS cor0
----
77
80
93

query I rowsort
SELECT col0 * col0 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT ALL - + cor0.col2 * 93 FROM tab2 AS cor0
----
-2418
-2511
-3534

query I rowsort
SELECT DISTINCT + - ( cor0.col2 ) AS col2 FROM tab2 AS cor0
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-6706
SELECT DISTINCT + 41 + col2 DIV col2 AS col0 FROM tab1 AS cor0
----
42

skipif mysql # not compatible
query I rowsort label-6706
SELECT DISTINCT + 41 + col2 / col2 AS col0 FROM tab1 AS cor0
----
42

query I rowsort
SELECT + - col2 + + 74 + - col0 FROM tab2 AS cor0
----
-30
-43
40

query I rowsort
SELECT ALL - 92 * - col0 AS col2 FROM tab0 AS cor0
----
2208
3220
8188

query I rowsort
SELECT ALL + + ( + col0 ) FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT DISTINCT 46 + + col0 FROM tab2 AS cor0
----
124
125
53

query I rowsort
SELECT DISTINCT + + cor0.col2 AS col1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - col2 * col2 + - col1 * 55 + - col0 AS col0 FROM tab1 AS cor0
----
-10011
-3863
-4349

query I rowsort
SELECT DISTINCT 27 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 22 * col0 col2 FROM tab0 cor0
----
-1958
-528
-770

query I rowsort
SELECT DISTINCT 35 * - 4 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
-140

query I rowsort
SELECT DISTINCT col0 * + col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT + col0 + col2 * col1 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT - 22 FROM tab0 AS cor0
----
-22
-22
-22

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - ( - col0 ) + col0 col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT - col0 * - col2 + col1 - - col0 * + col0 AS col1 FROM tab0 AS cor0
----
1357
1454
15310

onlyif mysql # use DIV operator for integer division
query I rowsort label-6721
SELECT ALL - - cor0.col2 DIV + col2 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6721
SELECT ALL - - cor0.col2 / + col2 FROM tab0 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 57 col0 FROM tab2 AS cor0
----
57
57
57

query I rowsort
SELECT - cor0.col2 * - col0 * - 16 AS col0 FROM tab0 AS cor0
----
-116768
-12672
-560

query I rowsort
SELECT DISTINCT 35 AS col0 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
35

query I rowsort
SELECT col2 + 92 + - col1 FROM tab1 cor0
----
120
139
175

query I rowsort
SELECT + col0 * - col0 + col1 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT ALL + + col0 AS col2 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT - col0 * ( col0 + + col1 ) AS col2 FROM tab0 AS cor0
----
-16020
-2640
-4620

query I rowsort
SELECT DISTINCT col2 * - ( - col1 ) FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT + col2 * 68 + - 95 * col0 + + ( + col1 * + col0 ) AS col0 FROM tab1 cor0
----
-1564
-32
3465

query I rowsort
SELECT DISTINCT col2 * 20 AS col1 FROM tab1 AS cor0
----
1080
1140
1920

query I rowsort
SELECT DISTINCT - col1 * - 29 FROM tab0 AS cor0
----
2494
2639
2813

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6733
SELECT DISTINCT + col2 + CAST( NULL AS DECIMAL ) AS col1 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6733
SELECT DISTINCT + col2 + CAST ( NULL AS REAL ) AS col1 FROM tab2 cor0
----
NULL

query I rowsort
SELECT + + col1 - col1 * ( - col2 + col2 ) AS col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT col2 * col1 + - col2 FROM tab0 cor0
----
2805
7380
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6736
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col2 FROM tab2, tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6736
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col2 FROM tab2, tab1 AS cor0
----
NULL

query I rowsort
SELECT + 4 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

query I rowsort
SELECT ALL - 44 AS col0 FROM tab0, tab0 cor0
----
9 values hashing to 07457d9e571e036a9a3a0f5a5a2e1ef2

query I rowsort
SELECT DISTINCT col0 + col0 * col1 FROM tab2 cor0
----
1422
224
4680

query I rowsort
SELECT ALL + + 78 + + col2 AS col2 FROM tab2 AS cor0
----
104
105
116

query I rowsort
SELECT + - col1 * 70 + + col0 AS col2 FROM tab1 cor0
----
-1817
-636
-830

query I rowsort
SELECT DISTINCT + - 83 AS col0 FROM tab2 cor0
----
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + 14 col2 FROM tab2
----
31
45
73

query I rowsort
SELECT DISTINCT 64 FROM tab0, tab1 cor0
----
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor1.col1 col2 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
-17
-31
-59

query I rowsort
SELECT col0 * + col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT ALL tab2.col0 + col1 * col2 FROM tab2
----
1612
725
844

query I rowsort
SELECT tab1.col0 * col0 * col2 + - col0 FROM tab1
----
233408
483
614320

query I rowsort
SELECT - ( - col0 ) + col1 + + col2 AS col1 FROM tab2 AS cor0
----
134
163
65

query I rowsort
SELECT + 61 + col2 + col1 FROM tab2 AS cor0
----
116
119
146

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 - + 12 col1 FROM tab1 AS cor0
----
-9
52
68

query I rowsort
SELECT - col1 * 48 * col0 + ( col2 ) + + cor0.col2 AS col2 FROM tab1 AS cor0
----
-30606
-3636
-49728

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + col2 col1 FROM tab2
----
52
54
76

query I rowsort
SELECT + 65 FROM tab0, tab2 AS cor0
----
9 values hashing to 8bef2ea1f05f3514633f851312bdd805

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 40 col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
40

onlyif mysql # use DIV operator for integer division
query I rowsort label-6756
SELECT col1 DIV col0 AS col1 FROM tab1
----
0
0
8

skipif mysql # not compatible
query I rowsort label-6756
SELECT col1 / col0 AS col1 FROM tab1
----
0
0
8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6757
SELECT CAST( + col0 AS SIGNED ) * + tab1.col1 * + col0 AS col0 FROM tab1
----
234
40960
83200

skipif mysql # not compatible
query I rowsort label-6757
SELECT CAST ( + col0 AS INTEGER ) * + tab1.col1 * + col0 AS col0 FROM tab1
----
234
40960
83200

query I rowsort
SELECT ALL - + col2 AS col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT - ( 51 ) * + cor0.col1 + col0 FROM tab2 AS cor0
----
-1574
-2931
-788

query I rowsort
SELECT DISTINCT + ( + ( col0 ) ) + - col2 * + col2 AS col0 FROM tab1 AS cor0
----
-2913
-3185
-9136

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6761
SELECT ALL CAST( - col0 AS SIGNED ) AS col1 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-6761
SELECT ALL CAST ( - col0 AS INTEGER ) AS col1 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT ALL 75 * + col2 + + col1 FROM tab1 AS cor0
----
4076
4285
7213

query I rowsort
SELECT + tab1.col1 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT ALL 68 FROM tab2
----
68
68
68

query I rowsort
SELECT - cor0.col1 + cor0.col1 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT - 74 * col1 * + col2 FROM tab2 AS cor0
----
-113516
-47804
-61938

query I rowsort
SELECT ALL col0 + col2 * - ( + cor0.col0 + col0 ) AS col1 FROM tab1 AS cor0
----
-15280
-321
-7232

query I rowsort
SELECT DISTINCT - 1 AS col2 FROM tab1, tab0 AS cor0, tab2 cor1
----
-1

query I rowsort
SELECT + col1 + tab2.col1 FROM tab2
----
118
34
62

query I rowsort
SELECT tab2.col1 * col0 + tab2.col1 AS col0 FROM tab2
----
1360
248
4661

query I rowsort
SELECT + 6 FROM tab1, tab1 cor0, tab0 cor1
----
27 values hashing to f1e8f0199f3714ee8fcc24ce0cc3ea04

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * - col2 + col0 col1 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT + col0 + ( - col1 + + cor0.col1 ) * col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT col2 + + col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT + cor0.col2 + 44 * col1 AS col0 FROM tab0 AS cor0
----
3817
4086
4269

query I rowsort
SELECT ALL - col1 + + col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + col2 + - col0 AS col1 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT - - col2 * col1 AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL + - cor0.col2 * ( col2 ) + col2 * col1 * cor0.col0 AS col2 FROM tab1 AS cor0
----
1296
33231
90624

query I rowsort
SELECT - cor0.col1 - 64 * + col2 AS col2 FROM tab0 cor0
----
-161
-2198
-5339

onlyif mysql # use DIV operator for integer division
query I rowsort label-6781
SELECT DISTINCT col1 DIV + col0 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-6781
SELECT DISTINCT col1 / + col0 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT ALL + col0 + - 52 * col0 AS col0 FROM tab0 AS cor0
----
-1224
-1785
-4539

query I rowsort
SELECT - col0 * ( + col0 ) + + cor0.col1 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT DISTINCT + col0 + 92 AS col1 FROM tab1 cor0
----
156
172
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * cor0.col2 + cor0.col0 col1 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT - + col0 + + 6 * 38 FROM tab0 cor0
----
139
193
204

query I rowsort
SELECT DISTINCT col2 - col0 AS col1 FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT ALL + - cor0.col1 + 89 AS col1 FROM tab0 AS cor0
----
-2
-8
3

query I rowsort
SELECT ALL + col1 * - ( - cor0.col0 ) FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - col1 - col1 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT - col2 + col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT + 99 * col1 AS col0 FROM tab2 AS cor0
----
1683
3069
5841

query I rowsort
SELECT ALL - tab2.col0 * + col0 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT ALL + ( col2 ) - - tab0.col0 * + col0 FROM tab0
----
1226
609
8003

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 - col1 col2 FROM tab1
----
28
47
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-6796
SELECT - col2 * col1 + col2 DIV ( + cor0.col0 ) FROM tab0 AS cor0
----
-2837
-7462
-97

skipif mysql # not compatible
query I rowsort label-6796
SELECT - col2 * col1 + col2 / ( + cor0.col0 ) FROM tab0 AS cor0
----
-2837
-7462
-97

query I rowsort
SELECT - - col1 * + col2 + col1 FROM tab2 cor0
----
1593
663
868

query I rowsort
SELECT - col0 * - col1 + col1 * + 97 AS col0 FROM tab2 AS cor0
----
10325
2992
3224

query I rowsort
SELECT col2 + + col0 * + col2 FROM tab2 AS cor0
----
2054
216
3040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * - col0 + + ( + 7 ) col0 FROM tab1 AS cor0
----
169
3655
7687

query I rowsort
SELECT cor0.col0 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT ALL + col2 * - col1 * + col1 - + col1 * col2 AS col1 FROM tab0 AS cor0
----
-246906
-686504
-9506

query I rowsort
SELECT DISTINCT col0 AS col2 FROM tab2 cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-6804
SELECT col1 DIV - col2 + col1 AS col1 FROM tab0 cor0
----
0
84
90

skipif mysql # not compatible
query I rowsort label-6804
SELECT col1 / - col2 + col1 AS col1 FROM tab0 cor0
----
0
84
90

query I rowsort
SELECT ALL + cor0.col1 + - ( + col0 ) FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT - - col2 * + ( + col1 + col2 ) FROM tab0 AS cor0
----
14186
3927
98

query I rowsort
SELECT ALL - col1 * + col2 * col2 AS col1 FROM tab0 AS cor0
----
-611884
-93654
-97

query I rowsort
SELECT ALL - cor0.col2 + col0 AS col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT - col2 * - 60 FROM tab1 AS cor0
----
3240
3420
5760

query I rowsort
SELECT DISTINCT - 26 FROM tab0
----
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col2 + + ( - col2 ) col1 FROM tab2 AS cor0
----
1406
650
702

onlyif mysql # use DIV operator for integer division
query I rowsort label-6812
SELECT DISTINCT + 14 DIV col1 col0 FROM tab0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6812
SELECT DISTINCT + 14 / col1 col0 FROM tab0
----
0

query I rowsort
SELECT - ( 94 ) FROM tab1, tab2 AS cor0, tab1 cor1
----
27 values hashing to 7eeab220fc6bbc2fb3fa4aef8600159f

query I rowsort
SELECT tab1.col1 + col1 FROM tab1
----
20
26
52

query I rowsort
SELECT col1 FROM tab1 WHERE NOT col2 * col0 / - col1 NOT IN ( - tab1.col2 )
----

query I rowsort
SELECT col2 * col1 AS col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT col1 + col2 FROM tab0 WHERE NOT NULL <= NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + tab1.col2 col2 FROM tab1
----
-162
-3648
-7680

query III rowsort
SELECT * FROM tab0 WHERE NOT ( NULL ) IN ( + col1 )
----

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL NOT BETWEEN col1 AND ( + col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + + col1 col0 FROM tab1
----
0
0
0

query I rowsort
SELECT + col2 * tab0.col2 AS col0 FROM tab0
----
1
1089
6724

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab2 WHERE NULL BETWEEN NULL AND NULL
----

query I rowsort
SELECT col0 * + col1 AS col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT + col1 - + col2 * + col2 * col0 AS col0 FROM tab0
----
-26050
-598345
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 - - col1 col0 FROM tab1
----
109
67
80

query I rowsort
SELECT col0 * col2 AS col0 FROM tab1
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-6828
SELECT DISTINCT + col2 + tab1.col0 DIV col2 FROM tab1
----
54
58
96

skipif mysql # not compatible
query I rowsort label-6828
SELECT DISTINCT + col2 + tab1.col0 / col2 FROM tab1
----
54
58
96

query I rowsort
SELECT ALL - col0 + col0 AS col1 FROM tab2
----
0
0
0

query I rowsort
SELECT - col0 + + col1 AS col2 FROM tab1
----
-54
-67
23

query I rowsort
SELECT col0 AS col1 FROM tab1 WHERE - col2 * + tab1.col1 NOT IN ( - col1 )
----
3
64
80

query I rowsort
SELECT col0 AS col2 FROM tab0 WHERE NULL IN ( + col0 * col0 / + col0 )
----

query I rowsort
SELECT col0 + - col0 - + col2 FROM tab1 WHERE NOT col0 BETWEEN col2 AND + col1 + col0
----
-54
-96

query I rowsort
SELECT ALL - col1 - col2 * + col2 AS col1 FROM tab0
----
-1175
-6815
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * + col2 col1 FROM tab2
----
189
2028
3002

query I rowsort
SELECT - tab0.col2 AS col0 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT + col1 * + col1 AS col0 FROM tab1
----
100
169
676

query I rowsort
SELECT DISTINCT col0 / col0 AS col0 FROM tab0 WHERE NOT ( NULL ) <= NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6839
SELECT col1 DIV + col2 AS col1 FROM tab0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-6839
SELECT col1 / + col2 AS col1 FROM tab0
----
1
2
97

query I rowsort
SELECT ALL col1 - col2 AS col1 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT DISTINCT col1 - + tab0.col0 AS col0 FROM tab0
----
2
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + col0 col1 FROM tab1
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col0 col2 FROM tab1
----
29
74
93

query I rowsort
SELECT ALL + col0 + - col0 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT ALL - col1 + col0 * ( ( + col0 ) ) AS col1 FROM tab1 AS cor0
----
-17
4086
6387

query I rowsort
SELECT DISTINCT - + cor0.col2 * col0 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL - col1 * + col0 AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT - 15 * + col0 AS col1 FROM tab0 AS cor0
----
-1335
-360
-525

query I rowsort
SELECT col2 * col0 AS col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL 89 AS col1 FROM tab1 AS cor0
----
89
89
89

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT col2 * col2 + - CAST ( col2 AS REAL ) FROM tab0 AS cor0
----
0
1056
6642

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 56 col0 FROM tab2 AS cor0
----
-56
-56
-56

query I rowsort
SELECT - 57 FROM tab1
----
-57
-57
-57

query I rowsort
SELECT DISTINCT - 55 AS col0 FROM tab1
----
-55

query I rowsort
SELECT DISTINCT ( - 27 ) AS col0 FROM tab2
----
-27

query I rowsort
SELECT - 58 FROM tab0
----
-58
-58
-58

query I rowsort
SELECT + ( - col2 * col0 ) AS col0 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - 65 FROM tab2
----
-65

query I rowsort
SELECT DISTINCT 88 * cor0.col0 FROM tab1, tab2 AS cor0
----
616
6864
6952

query I rowsort
SELECT - 18 - + 7 * col0 FROM tab1
----
-39
-466
-578

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( 96 AS REAL ) AS col0 FROM tab2
----
96

query I rowsort
SELECT ALL + col0 - col2 AS col2 FROM tab1
----
-16
-51
7

query I rowsort
SELECT + - col2 * - col0 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT - 10 * col2 + - col2 * - 9 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT ALL - col1 - - col2 AS col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT DISTINCT - col0 + - col2 AS col2 FROM tab0 AS cor0
----
-171
-36
-57

query IIIIIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab0, tab2 AS cor2, tab1
----
13122 values hashing to 5445cb56f27302ed83a1c39f50d604cc

query I rowsort
SELECT - cor0.col1 * - cor0.col2 AS col0 FROM tab0 AS cor0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - ( - cor0.col2 + col1 ) col1 FROM tab0 AS cor0
----
1272
3360
801

query I rowsort
SELECT - col2 * col0 + col1 FROM tab0 cor0
----
-706
-7207
62

query I rowsort
SELECT - col2 * + tab1.col2 + col2 AS col2 FROM tab1
----
-2862
-3192
-9120

query I rowsort
SELECT ALL + tab0.col1 * col2 + + col1 * + col2 FROM tab0
----
14924
194
5676

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0, tab2 AS cor1, tab1, tab2 cor2
----
3645 values hashing to e3f81e329d34d83e4528a9ef7b933946

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 90 col2 FROM tab0
----
90
90
90

query I rowsort
SELECT + + 71 AS col1 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 95a6ff35b7b8f00868fb58bcaa32d0c2

query I rowsort
SELECT + - 72 FROM tab1 cor0
----
-72
-72
-72

query I rowsort
SELECT DISTINCT + cor1.col2 AS col0 FROM tab2, tab1 cor0, tab1 AS cor1
----
54
57
96

query I rowsort
SELECT - 23 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to ce60bf4b0647d0fcb18a0562e351c52d

query I rowsort
SELECT DISTINCT + 85 + + col2 * - cor0.col0 AS col2 FROM tab0 AS cor0
----
-707
-7213
50

query I rowsort
SELECT ALL - - 0 FROM tab0 AS cor0
----
0
0
0

query IIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab1, tab0 cor1
----
243 values hashing to 2ba47a833971d4c4b0287e849fb0cfb8

query I rowsort
SELECT DISTINCT + 20 - - cor0.col0 AS col0 FROM tab1 AS cor0
----
100
23
84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6883
SELECT ALL - col1 + + ( - col0 ) * CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6883
SELECT ALL - col1 + + ( - col0 ) * CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - 71 + col1 AS col2 FROM tab0 AS cor0
----
15
20
26

query I rowsort
SELECT ALL + + col1 AS col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL col0 + col0 + ( + col0 + col2 ) AS col2 FROM tab1
----
249
336
63

query I rowsort
SELECT - cor0.col1 + col2 * col2 AS col2 FROM tab1 AS cor0
----
2890
3239
9203

query I rowsort
SELECT - col2 + cor0.col1 AS col2 FROM tab2 AS cor0
----
-21
33
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-6889
SELECT - col1 DIV col0 FROM tab1
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-6889
SELECT - col1 / col0 FROM tab1
----
-8
0
0

query I rowsort
SELECT DISTINCT + col2 * + col1 * - 45 + ( + col0 ) * col2 FROM tab0
----
-126918
-328492
-4330

query I rowsort
SELECT col2 * + col1 + 84 * - 78 AS col2 FROM tab1
----
-5148
-5304
-5982

query I rowsort
SELECT col2 + + col0 AS col0 FROM tab1
----
121
176
57

query I rowsort
SELECT ALL 76 FROM tab2, tab2 AS cor0, tab2 cor1
----
27 values hashing to 7b2b08dd3f1adef028d3f40ef7c716da

query I rowsort
SELECT DISTINCT + 81 * - col2 + 83 AS col1 FROM tab2
----
-2023
-2104
-2995

query I rowsort
SELECT DISTINCT col0 * - col0 + col0 * col0 * + tab0.col1 FROM tab0
----
117600
48960
712890

query I rowsort
SELECT DISTINCT + col2 * 77 AS col2 FROM tab0
----
2541
6314
77

query I rowsort
SELECT ALL - + col0 * 9 AS col1 FROM tab2 AS cor0
----
-63
-702
-711

query I rowsort
SELECT - - col0 + col0 AS col1 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT 50 FROM tab1, tab0 AS cor0
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

query I rowsort
SELECT DISTINCT + col0 AS col1 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT DISTINCT + - col0 + col0 * - cor0.col2 FROM tab2 AS cor0
----
-196
-2106
-3081

query I rowsort
SELECT + + col1 + - col0 AS col0 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT - - col1 * + col2 + 18 + + col0 FROM tab1 AS cor0
----
1346
1425
652

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6904
SELECT ALL - col0 / + 57 + + ( - col0 + CAST( NULL AS SIGNED ) * - col1 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6904
SELECT ALL - col0 / + 57 + + ( - col0 + CAST ( NULL AS INTEGER ) * - col1 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col0 * col2 + - col2 * col2 AS col1 FROM tab0 AS cor0
----
-297
34
574

query I rowsort
SELECT ALL + col1 + - 81 AS col2 FROM tab0 cor0
----
10
16
5

query I rowsort
SELECT ALL col1 * - cor0.col2 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT - col1 + - col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT DISTINCT - col2 * col0 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6910
SELECT ALL - col1 * CAST( NULL AS SIGNED ) + + col2 * - col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6910
SELECT ALL - col1 * CAST ( NULL AS INTEGER ) + + col2 * - col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - col1 * - col1 + + col0 FROM tab0 cor0
----
-7372
-8192
-9374

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6912
SELECT col2 + - CAST( NULL AS SIGNED ) * - col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6912
SELECT col2 + - CAST ( NULL AS INTEGER ) * - col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col0 * col0 + col1 AS col1 FROM tab1 AS cor0
----
35
4106
6413

query I rowsort
SELECT + col2 + - 8 * - col0 FROM tab1
----
569
736
78

query I rowsort
SELECT 44 FROM tab2, tab1 AS cor0
----
9 values hashing to ab2bc2b9f8baa300df7755e5980a319d

query I rowsort
SELECT DISTINCT - 80 + cor0.col2 * - col2 AS col0 FROM tab1 AS cor0
----
-2996
-3329
-9296

query I rowsort
SELECT DISTINCT + 93 + 95 FROM tab2 AS cor0
----
188

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6918
SELECT + + CAST( - col2 AS SIGNED ) FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-6918
SELECT + + CAST ( - col2 AS INTEGER ) FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL ( col1 ) FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT - 39 * - ( - col2 ) + col1 AS col0 FROM tab1 AS cor0
----
-2080
-2213
-3731

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - col0 col2 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + - 70 AS col0 FROM tab1 AS cor0
----
-70
-70
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-6923
SELECT ALL - + cor0.col0 DIV col0 - + col2 AS col1 FROM tab1 cor0
----
-55
-58
-97

skipif mysql # not compatible
query I rowsort label-6923
SELECT ALL - + cor0.col0 / col0 - + col2 AS col1 FROM tab1 cor0
----
-55
-58
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6924
SELECT DISTINCT + CAST( NULL AS SIGNED ) * col2 + + col0 * + 16 AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6924
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * col2 + + col0 * + 16 AS col0 FROM tab1 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6925
SELECT - + CAST( NULL AS SIGNED ) + + 53 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6925
SELECT - + CAST ( NULL AS INTEGER ) + + 53 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 4 * 37 FROM tab0 AS cor0
----
-148
-148
-148

query I rowsort
SELECT ALL + 58 + col2 + - col1 AS col0 FROM tab0 AS cor0
----
-38
49
5

query I rowsort
SELECT ALL - - 78 * col2 FROM tab1 cor0
----
4212
4446
7488

query I rowsort
SELECT DISTINCT col2 * col2 + col1 AS col1 FROM tab0 AS cor0
----
1175
6815
98

query I rowsort
SELECT ( - col1 ) + - ( 33 ) * - cor0.col1 FROM tab1 AS cor0
----
320
416
832

query I rowsort
SELECT + col0 + col0 AS col1 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT + + col0 + cor0.col0 * 9 FROM tab2 AS cor0
----
70
780
790

query I rowsort
SELECT DISTINCT col1 + - cor0.col0 AS col1 FROM tab0 AS cor0
----
2
62

query I rowsort
SELECT DISTINCT - col0 * - col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL + col0 - - tab0.col1 FROM tab0
----
110
132
180

query IIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 CROSS JOIN tab2
----
243 values hashing to 5d85c5683e3ffd6d68920690d7302f7d

query I rowsort
SELECT DISTINCT 7 - + 70 * col2 FROM tab2
----
-1813
-1883
-2653

query I rowsort
SELECT DISTINCT col0 + + col1 + cor0.col2 FROM tab1 AS cor0
----
131
189
83

query I rowsort
SELECT DISTINCT 60 * - col1 FROM tab0 AS cor0
----
-5160
-5460
-5820

query I rowsort
SELECT ALL - + col2 * + col0 - col1 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT ALL + 58 + cor0.col2 AS col1 FROM tab0 AS cor0
----
140
59
91

query I rowsort
SELECT DISTINCT + 15 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
15

query I rowsort
SELECT + col2 * + col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT + - cor0.col1 + col0 FROM tab0 AS cor0
----
-2
-62

query I rowsort
SELECT DISTINCT - + col1 * + col0 - - col0 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT ( col2 ) * + 4 FROM tab0 cor0
----
132
328
4

query I rowsort
SELECT col0 * - cor0.col0 * 23 FROM tab0 AS cor0
----
-13248
-182183
-28175

query I rowsort
SELECT - - col0 * - col1 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT + col1 * col2 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT col0 * col0 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT - + col1 * - 37 - 83 AS col0 FROM tab2 cor0
----
1064
2100
546

onlyif mysql # use DIV operator for integer division
query I rowsort label-6952
SELECT - - col2 + + col2 * col2 DIV col0 FROM tab2 cor0
----
131
34
56

skipif mysql # not compatible
query I rowsort label-6952
SELECT - - col2 + + col2 * col2 / col0 FROM tab2 cor0
----
131
34
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-6953
SELECT - col1 DIV col1 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6953
SELECT - col1 / col1 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT + ( - 20 ) * - col0 FROM tab2 AS cor0
----
140
1560
1580

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( cor0.col2 ) col0 FROM tab2, tab1 cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT ( + col2 ) * + col0 AS col2 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-6957
SELECT DISTINCT - ( cor0.col0 ) * col0 * + col1 + - 18 DIV - col2 AS col0 FROM tab1 AS cor0
----
-234
-40960
-83200

skipif mysql # not compatible
query I rowsort label-6957
SELECT DISTINCT - ( cor0.col0 ) * col0 * + col1 + - 18 / - col2 AS col0 FROM tab1 AS cor0
----
-234
-40960
-83200

query I rowsort
SELECT DISTINCT col1 + + col2 * - col1 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT 86 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 2d8c3a0d19ea51447f83cd18b49fee19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * + 73 col0 FROM tab2 AS cor0
----
-1241
-2263
-4307

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab2, tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL - 67 AS col1 FROM tab1
----
-67
-67
-67

query I rowsort
SELECT + 83 + col0 AS col1 FROM tab1 cor0
----
147
163
86

query I rowsort
SELECT 78 FROM tab0, tab2 AS cor0
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

query I rowsort
SELECT DISTINCT - cor0.col2 + + col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT + - col1 * - 74 AS col2 FROM tab2 AS cor0
----
1258
2294
4366

query I rowsort
SELECT ALL - 57 FROM tab0
----
-57
-57
-57

query I rowsort
SELECT DISTINCT + - col2 * - 24 + + col1 * col2 AS col0 FROM tab1 AS cor0
----
1938
2700
3552

query I rowsort
SELECT - ( col2 ) AS col0 FROM tab2 AS cor0
----
-26
-27
-38

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to d10b928ceb6690f7c98bfe77a5adfcac

onlyif mysql # use DIV operator for integer division
query I rowsort label-6971
SELECT ALL tab1.col1 DIV + col0 + - col1 * col1 * col0 - - col1 FROM tab1
----
-13507
-1994
-6390

skipif mysql # not compatible
query I rowsort label-6971
SELECT ALL tab1.col1 / + col0 + - col1 * col1 * col0 - - col1 FROM tab1
----
-13507
-1994
-6390

onlyif mysql # use DIV operator for integer division
query I rowsort label-6972
SELECT + ( + col0 ) * - col1 DIV col1 FROM tab2 cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-6972
SELECT + ( + col0 ) * - col1 / col1 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT - 57 + + col0 + col1 * - col0 FROM tab1 AS cor0
----
-1017
-132
-633

query I rowsort
SELECT ALL - col2 - + ( - col2 ) FROM tab1
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6975
SELECT - + CAST( 87 AS SIGNED ) AS col0 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to c0011cd00aa3e86f06bebc13678997f9

skipif mysql # not compatible
query I rowsort label-6975
SELECT - + CAST ( 87 AS INTEGER ) AS col0 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to c0011cd00aa3e86f06bebc13678997f9

query I rowsort
SELECT ALL - col1 + 36 * col1 - col2 FROM tab2
----
1058
2039
557

onlyif mysql # use DIV operator for integer division
query I rowsort label-6977
SELECT ALL + ( col2 ) * col1 - col2 DIV - col0 AS col2 FROM tab0
----
2839
7462
97

skipif mysql # not compatible
query I rowsort label-6977
SELECT ALL + ( col2 ) * col1 - col2 / - col0 AS col2 FROM tab0
----
2839
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6978
SELECT cor0.col1 + col0 DIV col1 AS col2 FROM tab1 AS cor0
----
16
19
26

skipif mysql # not compatible
query I rowsort label-6978
SELECT cor0.col1 + col0 / col1 AS col2 FROM tab1 AS cor0
----
16
19
26

query I rowsort
SELECT ALL + col1 + + col0 * + col2 AS col2 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT ALL + - col0 * col2 + - col2 AS col2 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT DISTINCT col1 + col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT + col0 + col2 * + cor0.col1 * col1 FROM tab2 AS cor0
----
11061
25954
90584

query I rowsort
SELECT DISTINCT 39 * - col0 * col0 FROM tab2 AS cor0
----
-1911
-237276
-243399

query I rowsort
SELECT DISTINCT col1 * - 8 + col0 FROM tab2 AS cor0
----
-241
-394
-57

query I rowsort
SELECT - 7 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to ba940cd66e21e94e95aada5f28e1faf5

query I rowsort
SELECT DISTINCT col1 + + col0 AS col1 FROM tab2
----
137
38
96

query I rowsort
SELECT ALL col2 * - col0 + + ( + 97 + + col0 ) FROM tab2
----
-1853
-2826
-85

query I rowsort
SELECT - + col1 + - cor0.col1 + - col2 * - cor0.col0 FROM tab1 cor0
----
110
3628
7654

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6989
SELECT DISTINCT - CAST( NULL AS DECIMAL ) * cor0.col2 col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6989
SELECT DISTINCT - CAST ( NULL AS REAL ) * cor0.col2 col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
NULL

query I rowsort
SELECT + col1 * - col1 + 67 AS col2 FROM tab0 AS cor0
----
-7329
-8214
-9342

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col2 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT col0 * col0 + 53 FROM tab1 AS cor0
----
4149
62
6453

onlyif mysql # use DIV operator for integer division
query I rowsort label-6993
SELECT DISTINCT - col1 DIV 32 + ( col0 + + col2 ) AS col0 FROM tab1 cor0
----
121
176
57

skipif mysql # not compatible
query I rowsort label-6993
SELECT DISTINCT - col1 / 32 + ( col0 + + col2 ) AS col0 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT + col1 * - col1 AS col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT - + col2 * col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT ALL + col1 * col0 + + 78 FROM tab0 AS cor0
----
2142
3473
8177

query I rowsort
SELECT ALL + cor0.col2 - - col0 * col0 * + cor0.col1 FROM tab2 AS cor0
----
106135
1546
358982

query I rowsort
SELECT ALL - col1 + + col1 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + col1 * + ( col1 ) + + col1 - ( - col2 ) * + col0 * + col2 FROM tab1 AS cor0
----
207846
737124
8098

query I rowsort
SELECT DISTINCT col1 * - 64 * - col0 AS col1 FROM tab1 cor0
----
40960
4992
66560

onlyif mysql # use DIV operator for integer division
query I rowsort label-7001
SELECT ALL - + col2 DIV col1 FROM tab2 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-7001
SELECT ALL - + col2 / col1 FROM tab2 AS cor0
----
-2
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7002
SELECT DISTINCT - col2 + CAST( 82 AS SIGNED ) + + col0 FROM tab2 AS cor0
----
123
134
62

skipif mysql # not compatible
query I rowsort label-7002
SELECT DISTINCT - col2 + CAST ( 82 AS INTEGER ) + + col0 FROM tab2 AS cor0
----
123
134
62

query I rowsort
SELECT + - col2 + + 44 + col2 * col0 FROM tab0 AS cor0
----
7260
78
803

query I rowsort
SELECT ALL + - col2 * 33 AS col1 FROM tab2 AS cor0
----
-1254
-858
-891

onlyif mysql # use DIV operator for integer division
query I rowsort label-7005
SELECT DISTINCT col0 DIV + ( col1 ) FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-7005
SELECT DISTINCT col0 / + ( col1 ) FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7006
SELECT col0 DIV - ( - col2 + - col0 ) FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7006
SELECT col0 / - ( - col2 + - col0 ) FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + - 76 AS col1 FROM tab2 cor0
----
-76
-76
-76

onlyif mysql # use DIV operator for integer division
query I rowsort label-7008
SELECT DISTINCT - - col1 - col2 DIV col2 FROM tab0 AS cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-7008
SELECT DISTINCT - - col1 - col2 / col2 FROM tab0 AS cor0
----
85
90
96

query I rowsort
SELECT - col0 - ( col0 ) AS col1 FROM tab1
----
-128
-160
-6

query I rowsort
SELECT col1 * + ( col1 ) + col2 AS col0 FROM tab0
----
7429
8363
9410

query I rowsort
SELECT ALL col1 * - 12 FROM tab0
----
-1032
-1092
-1164

query I rowsort
SELECT DISTINCT - col2 + col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT - + ( - ( cor0.col2 ) ) - + ( + col0 ) AS col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT ALL - col2 + - 67 AS col0 FROM tab0 AS cor0
----
-100
-149
-68

query I rowsort
SELECT - 93 AS col1 FROM tab0 AS cor0
----
-93
-93
-93

query I rowsort
SELECT + col2 + col0 AS col0 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7017
SELECT CAST( NULL AS DECIMAL ) * + cor0.col0 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-7017
SELECT CAST ( NULL AS REAL ) * + cor0.col0 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + tab0.col1 * col1 + col0 AS col2 FROM tab0
----
7420
8370
9444

query I rowsort
SELECT - col0 + 71 FROM tab0
----
-18
36
47

query I rowsort
SELECT col1 + - col2 FROM tab0
----
53
9
96

query I rowsort
SELECT col0 + col1 + 52 AS col0 FROM tab0 AS cor0
----
162
184
232

query I rowsort
SELECT ALL - 86 FROM tab2 AS cor0
----
-86
-86
-86

query I rowsort
SELECT DISTINCT + col0 * - col2 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + - col0 col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT 90 * + col1 FROM tab2 AS cor0
----
1530
2790
5310

query I rowsort
SELECT col2 * col1 + + col2 + + col0 * - col0 * - cor0.col1 AS col0 FROM tab2 AS cor0
----
106781
2383
360516

query I rowsort
SELECT DISTINCT - + col1 * col2 AS col2 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT - ( cor0.col2 ) * + cor0.col2 AS col1 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT + + col2 * col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL + 55 * col0 AS col1 FROM tab2 AS cor0
----
385
4290
4345

query I rowsort
SELECT DISTINCT + col2 + - cor0.col0 AS col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT 44 * col1 + - col2 + - col2 FROM tab0 AS cor0
----
3718
3840
4266

query I rowsort
SELECT + 30 + - col1 + 72 AS col0 FROM tab2 AS cor0
----
43
71
85

query I rowsort
SELECT DISTINCT col0 + col2 * - 58 FROM tab0 AS cor0
----
-1890
-23
-4667

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 93 * - ( col1 ) - + 30 * col1 col2 FROM tab2
----
1071
1953
3717

query I rowsort
SELECT ALL col1 - + col2 * + col2 AS col2 FROM tab0
----
-1003
-6633
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-7037
SELECT col0 DIV col1 col0 FROM tab2
----
0
1
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7037
SELECT col0 / col1 col0 FROM tab2
----
0
1
4

query I rowsort
SELECT - 81 * - col0 * col2 FROM tab0
----
2835
591138
64152

query I rowsort
SELECT ALL - 33 FROM tab2
----
-33
-33
-33

query I rowsort
SELECT + col1 - + col2 FROM tab0
----
53
9
96

query I rowsort
SELECT 66 + tab2.col2 FROM tab2
----
104
92
93

query I rowsort
SELECT - 31 * col1 + + ( col2 ) AS col0 FROM tab2 cor0
----
-1803
-489
-934

query I rowsort
SELECT + ( - col0 ) * - col0 * col1 + col0 + + col2 AS col1 FROM tab0 AS cor0
----
118861
49593
720982

onlyif mysql # use DIV operator for integer division
query I rowsort label-7044
SELECT 81 DIV + col1 FROM tab2 AS cor0
----
1
2
4

skipif mysql # not compatible
query I rowsort label-7044
SELECT 81 / + col1 FROM tab2 AS cor0
----
1
2
4

query I rowsort
SELECT ALL col0 * + 59 * col2 AS col0 FROM tab1 AS cor0
----
215232
453120
9558

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 2 * col1 + col2 col1 FROM tab1 AS cor0
----
106
122
77

query I rowsort
SELECT DISTINCT + 85 FROM tab2 cor0
----
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-7048
SELECT + - 83 DIV 22 AS col2 FROM tab2 AS cor0
----
-3
-3
-3

skipif mysql # not compatible
query I rowsort label-7048
SELECT + - 83 / 22 AS col2 FROM tab2 AS cor0
----
-3
-3
-3

query I rowsort
SELECT DISTINCT - cor0.col2 * 75 FROM tab1 AS cor0
----
-4050
-4275
-7200

query I rowsort
SELECT - 9 * col1 - col1 FROM tab0 AS cor0
----
-860
-910
-970

query I rowsort
SELECT DISTINCT 11 + + 94 FROM tab2 cor0
----
105

query I rowsort
SELECT ALL 44 FROM tab2 AS cor0
----
44
44
44

query I rowsort
SELECT - 97 + col2 AS col2 FROM tab2 AS cor0
----
-59
-70
-71

onlyif mysql # use DIV operator for integer division
query I rowsort label-7054
SELECT DISTINCT col1 DIV + col2 AS col2 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-7054
SELECT DISTINCT col1 / + col2 AS col2 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT - col0 * - col2 + - col1 AS col2 FROM tab1 cor0
----
136
3638
7667

onlyif mysql # use DIV operator for integer division
query I rowsort label-7056
SELECT cor0.col0 + + col0 DIV - col1 AS col2 FROM tab1 AS cor0
----
3
58
74

skipif mysql # not compatible
query I rowsort label-7056
SELECT cor0.col0 + + col0 / - col1 AS col2 FROM tab1 AS cor0
----
3
58
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-7057
SELECT - - cor0.col0 + col1 - col2 DIV + ( col2 + cor0.col0 ) FROM tab1 AS cor0
----
29
74
93

skipif mysql # not compatible
query I rowsort label-7057
SELECT - - cor0.col0 + col1 - col2 / + ( col2 + cor0.col0 ) FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + col0 + + 54 - col0 * col2 FROM tab1
----
-105
-3530
-7546

query I rowsort
SELECT DISTINCT - col1 + col2 FROM tab1
----
28
47
83

query I rowsort
SELECT DISTINCT + col0 * - col0 + col0 AS col1 FROM tab0 AS cor0
----
-1190
-552
-7832

onlyif mysql # use DIV operator for integer division
query I rowsort label-7061
SELECT - col1 DIV 33 AS col1 FROM tab2 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7061
SELECT - col1 / 33 AS col1 FROM tab2 AS cor0
----
-1
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7062
SELECT DISTINCT - col2 DIV + cor0.col2 AS col1 FROM tab1 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-7062
SELECT DISTINCT - col2 / + cor0.col2 AS col1 FROM tab1 AS cor0
----
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7063
SELECT DISTINCT CAST( + col1 AS SIGNED ) * + col0 FROM tab2 AS cor0
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-7063
SELECT DISTINCT CAST ( + col1 AS INTEGER ) * + col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - - col1 + + cor0.col0 * col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT + ( + col0 ) AS col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL - 40 * + col2 + - col0 FROM tab0 cor0
----
-1344
-3369
-75

query I rowsort
SELECT ALL tab1.col2 + 58 * tab1.col0 * - tab1.col1 AS col0 FROM tab1
----
-37063
-4470
-60224

query I rowsort
SELECT ALL + 68 AS col2 FROM tab0
----
68
68
68

query I rowsort
SELECT 58 * + col1 AS col2 FROM tab1 AS cor0
----
1508
580
754

onlyif mysql # use DIV operator for integer division
query I rowsort label-7070
SELECT ALL - cor0.col2 + + col2 DIV - col0 FROM tab0 AS cor0
----
-1
-34
-82

skipif mysql # not compatible
query I rowsort label-7070
SELECT ALL - cor0.col2 + + col2 / - col0 FROM tab0 AS cor0
----
-1
-34
-82

query I rowsort
SELECT DISTINCT col1 + + col2 + col1 * + col1 FROM tab0 AS cor0
----
7515
8454
9507

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7072
SELECT col2 / + col1 + + CAST( NULL AS SIGNED ) * col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7072
SELECT col2 / + col1 + + CAST ( NULL AS INTEGER ) * col1 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7073
SELECT ALL col1 DIV + col0 FROM tab1
----
0
0
8

skipif mysql # not compatible
query I rowsort label-7073
SELECT ALL col1 / + col0 FROM tab1
----
0
0
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + col0 col2 FROM tab1 cor0
----
-23
54
67

query I rowsort
SELECT - 16 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to be22ac76b42c6f7212ecc0ba7c89eb34

query I rowsort
SELECT + cor0.col0 + ( - col1 ) FROM tab2 cor0
----
-24
19
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-7077
SELECT ALL col2 DIV + col0 FROM tab2
----
0
0
3

skipif mysql # not compatible
query I rowsort label-7077
SELECT ALL col2 / + col0 FROM tab2
----
0
0
3

query I rowsort
SELECT ALL col2 * - ( col1 ) AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT col0 + + ( ( - col1 ) ) FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT + - col1 * col1 + 66 + + cor0.col2 AS col1 FROM tab0 AS cor0
----
-7297
-8133
-9342

query I rowsort
SELECT ALL - - 10 * - cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 61078693a69c9f1a2095d9ffa3080946

query I rowsort
SELECT col1 * - col2 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL col0 + - col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT ALL col0 * + col0 AS col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT + - col1 * - col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + - col2 + col0 AS col0 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT ALL - col2 + + 5 AS col0 FROM tab1 AS cor0
----
-49
-52
-91

query I rowsort
SELECT col1 * + 25 FROM tab1 AS cor0
----
250
325
650

query I rowsort
SELECT ALL - col0 * - cor0.col1 * - col0 AS col1 FROM tab0 AS cor0
----
-118825
-49536
-720811

query I rowsort
SELECT DISTINCT - tab1.col2 FROM tab1, tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT - col2 + + 56 AS col0 FROM tab0 AS cor0
----
-26
23
55

query I rowsort
SELECT ALL - col0 + - col0 AS col0 FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT - ( - col2 ) AS col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1, tab0 cor0, tab0 AS cor1
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-7095
SELECT ALL + col1 DIV + col2 AS col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7095
SELECT ALL + col1 / + col2 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + col1 + + col2 * ( cor0.col1 ) AS col1 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT col0 * + col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL + col0 * col0 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT cor0.col1 + + col2 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-7100
SELECT DISTINCT + col0 DIV col0 FROM tab1
----
1

skipif mysql # not compatible
query I rowsort label-7100
SELECT DISTINCT + col0 / col0 FROM tab1
----
1

query I rowsort
SELECT ALL + 91 AS col2 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to deebbcfb9c7803a34dca6bd860849afe

query I rowsort
SELECT ALL tab2.col2 * col0 AS col1 FROM tab2
----
189
2028
3002

query I rowsort
SELECT - col0 + col2 AS col0 FROM tab0 AS cor0
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-7104
SELECT + col1 * col0 + cor0.col1 DIV col1 FROM tab1 AS cor0
----
1041
641
79

skipif mysql # not compatible
query I rowsort label-7104
SELECT + col1 * col0 + cor0.col1 / col1 FROM tab1 AS cor0
----
1041
641
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7105
SELECT + 49 * + cor0.col1 + CAST( NULL AS SIGNED ) + col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7105
SELECT + 49 * + cor0.col1 + CAST ( NULL AS INTEGER ) + col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor2.col1 FROM tab1, tab2 cor0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to a5b6acb471910ea4ad7f31cae3b818f7

query I rowsort
SELECT + col1 * - col1 + 26 AS col2 FROM tab2 AS cor0
----
-263
-3455
-935

query I rowsort
SELECT + - col2 * + col0 + 64 AS col2 FROM tab2 AS cor0
----
-125
-1964
-2938

query I rowsort
SELECT - col1 * + 38 FROM tab1 AS cor0
----
-380
-494
-988

query I rowsort
SELECT - tab0.col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query I rowsort
SELECT - + col0 + cor0.col0 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - 65 AS col1 FROM tab1
----
-65
-65
-65

query I rowsort
SELECT - col2 * col2 AS col2 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT ALL 2 * col1 AS col0 FROM tab2
----
118
34
62

query I rowsort
SELECT col1 * + col2 * col1 FROM tab2
----
10982
25947
90506

query I rowsort
SELECT DISTINCT 16 FROM tab2
----
16

query I rowsort
SELECT + col2 * col0 + ( - col1 ) FROM tab0
----
-62
706
7207

query I rowsort
SELECT ALL col0 * - cor0.col1 AS col1 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL 51 FROM tab2, tab0 AS cor0
----
9 values hashing to d8bf0a05c9c4d2a93812d106baae4752

query I rowsort
SELECT + - 94 FROM tab0 AS cor0
----
-94
-94
-94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 79 col2 FROM tab1, tab2 AS cor0 CROSS JOIN tab0
----
27 values hashing to 4857f2e1b1dbd184de4827f145dd02a1

query I rowsort
SELECT DISTINCT - 20 AS col2 FROM tab0
----
-20

query I rowsort
SELECT ( tab1.col2 + col2 ) FROM tab1
----
108
114
192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( col0 ) * + ( + 81 ) col1 FROM tab0
----
1944
2835
7209

query I rowsort
SELECT + tab2.col0 * + col0 - 18 FROM tab2
----
31
6066
6223

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + col1 col0 FROM tab0
----
110
132
180

query I rowsort
SELECT DISTINCT 10 FROM tab0
----
10

query I rowsort
SELECT ( tab1.col0 ) AS col2 FROM tab1
----
3
64
80

query I rowsort
SELECT 75 FROM tab0
----
75
75
75

query I rowsort
SELECT cor0.col1 * + col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT + 50 + col2 AS col1 FROM tab2 cor0
----
76
77
88

query I rowsort
SELECT DISTINCT - tab2.col2 AS col1 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT + col2 * + tab0.col2 AS col2 FROM tab0
----
1
1089
6724

query I rowsort
SELECT - - col2 + - col1 AS col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT cor0.col0 + - 45 AS col1 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to c3c11eaeba10c02eac26ac3fadcc1047

query I rowsort
SELECT ALL + col1 - - 39 * col1 AS col2 FROM tab1
----
1040
400
520

query I rowsort
SELECT - col1 + 93 FROM tab1 AS cor0
----
67
80
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-7138
SELECT - ( - col0 ) DIV - col1 + col1 FROM tab2 AS cor0
----
13
31
58

skipif mysql # not compatible
query I rowsort label-7138
SELECT - ( - col0 ) / - col1 + col1 FROM tab2 AS cor0
----
13
31
58

query I rowsort
SELECT - - col2 * ( + col1 ) + + col2 FROM tab1 AS cor0
----
1344
1458
627

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7140
SELECT DISTINCT + ( 74 ) + col2 + CAST( - col0 + - col2 AS SIGNED ) * ( + col0 ) * - col2 col2 FROM tab1
----
1351850
441539
9362

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7140
SELECT DISTINCT + ( 74 ) + col2 + CAST ( - col0 + - col2 AS INTEGER ) * ( + col0 ) * - col2 col2 FROM tab1
----
1351850
441539
9362

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( + col2 AS REAL ) * col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT 25 FROM tab1 AS cor0
----
25
25
25

query I rowsort
SELECT ALL + col2 - 0 FROM tab1 AS cor0
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col0 + - cor0.col1 col1 FROM tab0 AS cor0
----
-132
-7389
-878

query I rowsort
SELECT ALL + col2 * col1 + col0 AS col1 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT - col1 * ( + col0 ) + col0 AS col2 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT + tab1.col1 * + tab1.col2 AS col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT + 59 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to e29fef8cdec1ee45a71d213f16d2f1d3

query I rowsort
SELECT DISTINCT col2 + col2 AS col2 FROM tab2
----
52
54
76

query I rowsort
SELECT 81 + col1 - - col1 AS col1 FROM tab2
----
115
143
199

query I rowsort
SELECT 80 + - ( tab2.col2 ) AS col1 FROM tab2
----
42
53
54

onlyif mysql # use DIV operator for integer division
query I rowsort label-7152
SELECT col2 DIV - col2 + col2 FROM tab0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-7152
SELECT col2 / - col2 + col2 FROM tab0
----
0
32
81

query I rowsort
SELECT ALL + - 38 AS col0 FROM tab2 cor0
----
-38
-38
-38

query I rowsort
SELECT DISTINCT 40 FROM tab0, tab1 AS cor0
----
40

onlyif mysql # use DIV operator for integer division
query I rowsort label-7155
SELECT CAST( 15 AS SIGNED ) + + col2 DIV 41 FROM tab0 AS cor0
----
15
15
17

skipif mysql # not compatible
query I rowsort label-7155
SELECT CAST ( 15 AS INTEGER ) + + col2 / 41 FROM tab0 AS cor0
----
15
15
17

query I rowsort
SELECT - col2 + + cor0.col1 * + cor0.col2 * - col2 FROM tab2 AS cor0
----
-22626
-24586
-39910

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 53 + - 9 col2 FROM tab2 AS cor0
----
44
44
44

query I rowsort
SELECT ALL col0 * + 17 AS col2 FROM tab0 AS cor0
----
1513
408
595

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7159
SELECT DISTINCT - CAST( col2 AS SIGNED ) FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-7159
SELECT DISTINCT - CAST ( col2 AS INTEGER ) FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT - ( col0 ) * + ( - cor0.col0 * col1 + - col2 * col0 ) AS col2 FROM tab1 AS cor0
----
274432
697600
720

query I rowsort
SELECT DISTINCT + cor0.col2 + - col1 AS col0 FROM tab1 AS cor0
----
28
47
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-7162
SELECT DISTINCT - 89 + col2 DIV - col2 FROM tab0 AS cor0
----
-90

skipif mysql # not compatible
query I rowsort label-7162
SELECT DISTINCT - 89 + col2 / - col2 FROM tab0 AS cor0
----
-90

query I rowsort
SELECT ALL + + 34 + col1 * - col0 FROM tab0 AS cor0
----
-2030
-3361
-8065

query I rowsort
SELECT ALL + col2 + + col2 AS col1 FROM tab1 AS cor0
----
108
114
192

onlyif mysql # use DIV operator for integer division
query I rowsort label-7165
SELECT - + col0 * col2 + - col1 DIV col0 AS col2 FROM tab2 AS cor0
----
-193
-2028
-3002

skipif mysql # not compatible
query I rowsort label-7165
SELECT - + col0 * col2 + - col1 / col0 AS col2 FROM tab2 AS cor0
----
-193
-2028
-3002

query I rowsort
SELECT ALL - + 0 + + cor0.col0 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT DISTINCT + 62 FROM tab1 AS cor0
----
62

query I rowsort
SELECT ALL col0 + col1 * 50 AS col1 FROM tab1 AS cor0
----
1303
564
730

query I rowsort
SELECT ALL + 63 FROM tab0 AS cor0
----
63
63
63

query I rowsort
SELECT ALL - col2 + + col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT - + ( - cor0.col0 ) FROM tab0 AS cor0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 95 * + col2 + - cor0.col2 * col2 * + col1 col0 FROM tab0 AS cor0
----
-2
-604094
-90519

query I rowsort
SELECT - col2 * + col0 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL - - 24 + col2 AS col2 FROM tab0 AS cor0
----
106
25
57

query I rowsort
SELECT ALL col1 + col2 AS col0 FROM tab2
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-7176
SELECT DISTINCT + col0 * col2 DIV - ( col2 ) - col1 DIV + cor0.col2 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-7176
SELECT DISTINCT + col0 * col2 / - ( col2 ) - col1 / + cor0.col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT ALL cor0.col0 * - col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - 57 * + col2 + 84 FROM tab0 AS cor0
----
-1797
-4590
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - ( + col0 ) + - 33 col1 FROM tab1 AS cor0
----
-30
31
47

query I rowsort
SELECT - col1 * + col2 AS col0 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + - col0 + + col0 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col2 * tab1.col0 AS col1 FROM tab1
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-7183
SELECT - col0 DIV + ( + col1 ) AS col1 FROM tab2 cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-7183
SELECT - col0 / + ( + col1 ) AS col1 FROM tab2 cor0
----
-1
-4
0

query I rowsort
SELECT DISTINCT - + cor0.col0 * + col0 AS col1 FROM tab0 AS cor0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-7185
SELECT DISTINCT + - col1 DIV + col0 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-7185
SELECT DISTINCT + - col1 / + col0 FROM tab0 AS cor0
----
-1
-2
-3

query I rowsort
SELECT - + col0 + 40 FROM tab2 AS cor0
----
-38
-39
33

query I rowsort
SELECT - + cor0.col2 * - cor0.col0 AS col2 FROM tab1 cor0
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7188
SELECT col1 * CAST( NULL AS SIGNED ) + col1 * col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7188
SELECT col1 * CAST ( NULL AS INTEGER ) + col1 * col2 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT + col2 * + ( col1 ) * col1 AS col1 FROM tab2 cor0
----
10982
25947
90506

query I rowsort
SELECT + 48 AS col1 FROM tab2
----
48
48
48

query IIIIIIIII rowsort
SELECT * FROM tab0, tab1 cor0, tab2 cor1
----
243 values hashing to ea21cea53be47edd19229592e3d26141

query I rowsort
SELECT + col2 * - col2 * cor0.col0 FROM tab1 AS cor0
----
-207936
-737280
-8748

query I rowsort
SELECT DISTINCT + - col2 + + col2 AS col2 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL + cor0.col2 + - col1 * + 39 AS col2 FROM tab0 AS cor0
----
-3321
-3467
-3782

query I rowsort
SELECT - + col1 * - 67 AS col1 FROM tab2 cor0
----
1139
2077
3953

query I rowsort
SELECT DISTINCT - + col2 + col1 * - cor0.col0 FROM tab2 AS cor0
----
-1381
-244
-4628

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 * col2 col1 FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-7199
SELECT col1 DIV col0 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-7199
SELECT col1 / col0 FROM tab0
----
1
2
3

query I rowsort
SELECT - - cor0.col0 + - col2 * col1 * - col2 FROM tab0 cor0
----
132
611973
93678

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7201
SELECT DISTINCT - CAST( col0 AS SIGNED ) + + col1 AS col0 FROM tab0 AS cor0
----
2
62

skipif mysql # not compatible
query I rowsort label-7201
SELECT DISTINCT - CAST ( col0 AS INTEGER ) + + col1 AS col0 FROM tab0 AS cor0
----
2
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 - + col2 col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - + col2 * - col0 + - col0 AS col0 FROM tab1 cor0
----
159
3584
7600

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 - ( - 68 * col0 ) col1 FROM tab1
----
258
4409
5536

onlyif mysql # use DIV operator for integer division
query I rowsort label-7205
SELECT col1 + - 7 DIV 43 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-7205
SELECT col1 + - 7 / 43 FROM tab2
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-7206
SELECT ALL col2 DIV col0 + - 41 - col0 AS col1 FROM tab0
----
-130
-64
-76

skipif mysql # not compatible
query I rowsort label-7206
SELECT ALL col2 / col0 + - 41 - col0 AS col1 FROM tab0
----
-130
-64
-76

query I rowsort
SELECT 29 FROM tab1, tab0 AS cor0
----
9 values hashing to 1e7120ba8e9191084172ddced17e5eb2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * + col1 col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + col0 + col0 * col0 AS col1 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT ALL col0 - col2 AS col1 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT - cor0.col0 * col1 * col1 FROM tab0 cor0
----
-177504
-329315
-737009

query I rowsort
SELECT 88 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to c46e7cf9bf516fdfde88534336a28177

query I rowsort
SELECT ALL + col0 * col0 AS col2 FROM tab2
----
49
6084
6241

query I rowsort
SELECT + col0 * ( - col0 ) FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL - col0 + + 18 * col1 FROM tab2 AS cor0
----
227
551
984

query I rowsort
SELECT - - col1 * - ( - ( - col2 ) * + col0 ) AS col2 FROM tab2 AS cor0
----
-119652
-51034
-5859

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7217
SELECT ALL + col2 - CAST( col2 AS SIGNED ) * - col0 FROM tab1 AS cor0
----
216
3705
7776

skipif mysql # not compatible
query I rowsort label-7217
SELECT ALL + col2 - CAST ( col2 AS INTEGER ) * - col0 FROM tab1 AS cor0
----
216
3705
7776

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 cor0, tab0 AS cor1, tab1 AS cor2
----
972 values hashing to 88213a0de4c0a44aaefe8bbffbcaf44a

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0, tab0 AS cor1, tab1 AS cor2
----
972 values hashing to 2d99dda76af061a3fac120e0e49e6c53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7220
SELECT col0 * CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7220
SELECT col0 * CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 15 * - col1 FROM tab0 AS cor0
----
-1290
-1365
-1455

query I rowsort
SELECT + + 87 AS col2 FROM tab2 AS cor0
----
87
87
87

query I rowsort
SELECT - 28 AS col2 FROM tab1 AS cor0
----
-28
-28
-28

query I rowsort
SELECT 1 + + col0 AS col0 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT DISTINCT col1 * 67 + + col2 * - col0 AS col1 FROM tab2 AS cor0
----
-1863
1888
1925

query I rowsort
SELECT + col2 * - 31 FROM tab2 AS cor0
----
-1178
-806
-837

query I rowsort
SELECT + - col0 + 20 FROM tab2 AS cor0
----
-58
-59
13

query I rowsort
SELECT ALL 80 FROM tab2, tab0 AS cor0
----
9 values hashing to 878f012d707aab113cedaf56e6c52e94

query I rowsort
SELECT - 58 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to a38440572743ed8a3d8af7b49a5388c9

query I rowsort
SELECT - 4 + + 62 FROM tab2 AS cor0
----
58
58
58

query I rowsort
SELECT col0 + col0 * - 58 FROM tab0
----
-1368
-1995
-5073

query I rowsort
SELECT - tab2.col2 * + col2 * tab2.col2 + col0 * + ( tab2.col0 ) FROM tab2
----
-11492
-19634
-48631

query I rowsort
SELECT DISTINCT 96 AS col0 FROM tab0, tab0 cor0, tab0 AS cor1
----
96

query I rowsort
SELECT DISTINCT - col1 + + col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT ALL col1 - + cor0.col0 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT - 20 * + col2 AS col0 FROM tab1 AS cor0
----
-1080
-1140
-1920

query I rowsort
SELECT ALL - col1 + + col2 FROM tab0 cor0
----
-53
-9
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - col1 col2 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-7239
SELECT ALL - col0 * col2 DIV col0 AS col0 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-7239
SELECT ALL - col0 * col2 / col0 AS col0 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT cor0.col1 * - col1 + + cor0.col1 * cor0.col1 AS col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT + col1 * - cor0.col2 * col2 AS col0 FROM tab1 AS cor0
----
-119808
-32490
-75816

query I rowsort
SELECT DISTINCT - - col0 * col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL + + 39 AS col0 FROM tab0 AS cor0
----
39
39
39

query I rowsort
SELECT col0 * col1 AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + + col1 * - col1 + - cor0.col1 FROM tab0 AS cor0
----
-7482
-8372
-9506

query I rowsort
SELECT ALL - - col1 + col2 AS col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT - col2 + col2 * + 32 AS col2 FROM tab0 AS cor0
----
1023
2542
31

query I rowsort
SELECT + 67 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

query I rowsort
SELECT tab0.col0 FROM tab0, tab0 AS cor0, tab0 cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT + tab2.col0 * 12 * col1 AS col0 FROM tab2
----
16116
2604
55224

query I rowsort
SELECT ALL - ( col0 ) * ( + ( cor0.col1 ) ) AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + col1 + - col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT 89 FROM tab1 AS cor0
----
89
89
89

query I rowsort
SELECT ALL ( - tab0.col2 ) FROM tab0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT + 5 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
5

query I rowsort
SELECT ALL + ( col0 ) * ( col2 ) * + col2 AS col2 FROM tab1
----
207936
737280
8748

query I rowsort
SELECT ALL - + col0 * col2 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL 91 FROM tab1
----
91
91
91

query I rowsort
SELECT - col0 * 96 FROM tab0 AS cor0
----
-2304
-3360
-8544

query I rowsort
SELECT + col1 * cor0.col2 + + col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT - col0 * col0 AS col1 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT col2 + + col1 FROM tab0 cor0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT + 8 * - col2 FROM tab2
----
-208
-216
-304

query I rowsort
SELECT ( col1 ) * col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT 97 AS col0 FROM tab2
----
97

query I rowsort
SELECT ( + col0 ) * - tab2.col0 AS col0 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT 82 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 99920d9f7cd9cdccef99cfa459ae6944

query I rowsort
SELECT DISTINCT ( - col2 ) * - 14 FROM tab1
----
1344
756
798

query I rowsort
SELECT ( - 41 ) FROM tab1, tab0 AS cor0
----
9 values hashing to 4ba0c102091f9cbc9fe9439b04584e70

query I rowsort
SELECT DISTINCT tab1.col1 * - col2 AS col0 FROM tab1
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-7272
SELECT + col0 DIV - ( col1 ) AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7272
SELECT + col0 / - ( col1 ) AS col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7273
SELECT + cor0.col0 * ( 24 ) + col1 + - cor0.col1 * col2 DIV - col0 AS col2 FROM tab2 AS cor0
----
1921
1950
318

skipif mysql # not compatible
query I rowsort label-7273
SELECT + cor0.col0 * ( 24 ) + col1 + - cor0.col1 * col2 / - col0 AS col2 FROM tab2 AS cor0
----
1921
1950
318

query I rowsort
SELECT + col0 * + 14 AS col2 FROM tab0 AS cor0
----
1246
336
490

onlyif mysql # use DIV operator for integer division
query I rowsort label-7275
SELECT - ( col1 ) DIV tab2.col1 AS col1 FROM tab2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7275
SELECT - ( col1 ) / tab2.col1 AS col1 FROM tab2
----
-1
-1
-1

query I rowsort
SELECT ALL tab1.col0 + col2 * col2 FROM tab1
----
2919
3313
9296

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab0, tab1 AS cor0, tab2, tab1 AS cor1
----
-10
-13
-26

query I rowsort
SELECT DISTINCT - - 84 - col0 AS col1 FROM tab2 AS cor0
----
5
6
77

query I rowsort
SELECT + - ( - col2 ) + col2 AS col1 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT ALL + + 26 + + col2 * col1 AS col1 FROM tab2 cor0
----
1560
672
863

query I rowsort
SELECT DISTINCT 82 + - col1 FROM tab2 AS cor0
----
23
51
65

query I rowsort
SELECT DISTINCT - col1 + col0 + cor0.col0 AS col1 FROM tab1 AS cor0
----
-20
118
147

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0 CROSS JOIN tab2, tab1 cor1
----
972 values hashing to 4634d10e8b6b37510bb99745aade36ab

query I rowsort
SELECT DISTINCT - col1 * - cor0.col2 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - cor0.col0 * - col0 + + col1 * + col0 + col0 FROM tab0 AS cor0
----
16109
2664
4655

query I rowsort
SELECT - - col2 - - col0 FROM tab1 AS cor0
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 * + cor0.col2 * cor0.col1 + - col2 col0 FROM tab0 AS cor0
----
244035
678960
9408

query I rowsort
SELECT - 30 * - col0 + col1 AS col0 FROM tab2 AS cor0
----
2387
2399
241

query I rowsort
SELECT + + cor0.col0 + - cor0.col1 * 39 + col2 FROM tab0 AS cor0
----
-3297
-3378
-3747

query I rowsort
SELECT - col2 * col2 AS col2 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT + col2 * col2 FROM tab2
----
1444
676
729

query I rowsort
SELECT + col1 * col2 AS col1 FROM tab2
----
1534
646
837

query I rowsort
SELECT ALL col2 * - col1 * col0 AS col1 FROM tab0
----
-3395
-664118
-68112

query I rowsort
SELECT ALL col0 * + col0 AS col2 FROM tab1
----
4096
6400
9

query I rowsort
SELECT DISTINCT col0 * tab2.col1 FROM tab2
----
1343
217
4602

query I rowsort
SELECT tab2.col1 + + col1 * + col0 - + col2 FROM tab2
----
1322
221
4635

query I rowsort
SELECT ALL col2 - col2 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL - col2 * + col0 * col1 FROM tab2
----
-119652
-51034
-5859

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * col0 col0 FROM tab1
----
162
3648
7680

query III rowsort
SELECT ALL * FROM tab1 WHERE col0 > NULL
----

query I rowsort
SELECT DISTINCT col1 + col1 FROM tab1
----
20
26
52

query I rowsort
SELECT - col0 * col1 + + col2 AS col0 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT ALL + col1 * col0 AS col0 FROM tab0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 col0 FROM tab1
----
10
13
26

query I rowsort
SELECT ALL 89 * + col0 - + col1 FROM tab0 AS cor0
----
2050
3018
7830

query I rowsort
SELECT DISTINCT - 5 FROM tab2 AS cor0
----
-5

query I rowsort
SELECT - col1 + col1 * col0 FROM tab0
----
1978
3298
8008

query I rowsort
SELECT - + 0 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + 1 FROM tab2 AS cor0
----
1

query I rowsort
SELECT + col2 + + col0 + + col1 FROM tab1 cor0
----
131
189
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-7311
SELECT col2 DIV + col1 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-7311
SELECT col2 / + col1 FROM tab1
----
2
5
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-7312
SELECT + tab0.col0 DIV - tab0.col0 col0 FROM tab0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7312
SELECT + tab0.col0 / - tab0.col0 col0 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT col2 + col1 * col2 + + col0 AS col0 FROM tab2
----
1638
763
871

query I rowsort
SELECT ALL - col1 * + col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT ALL col0 * - col0 AS col2 FROM tab1
----
-4096
-6400
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-7316
SELECT + col0 DIV col2 AS col0 FROM tab0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-7316
SELECT + col0 / col2 AS col0 FROM tab0
----
0
1
35

query I rowsort
SELECT DISTINCT + col1 - - col2 AS col2 FROM tab1
----
109
67
80

query I rowsort
SELECT + col1 + col0 * + col0 * + tab1.col0 FROM tab1
----
262154
512013
53

query I rowsort
SELECT - col0 + + col2 * + col1 FROM tab2 WHERE NOT ( col0 ) IN ( col2 + col2 + col1 )
----
1456
567
830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 col1 FROM tab2
----
17
31
59

query I rowsort
SELECT - col0 + tab0.col2 FROM tab0
----
-34
-7
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col0 col2 FROM tab1
----
3
64
80

query I rowsort
SELECT ALL col0 * col1 * col2 FROM tab0 AS cor0
----
3395
664118
68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-7324
SELECT - col2 DIV + cor0.col2 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7324
SELECT - col2 / + cor0.col2 FROM tab1 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-7325
SELECT - col1 DIV col1 + col1 AS col1 FROM tab1 AS cor0
----
12
25
9

skipif mysql # not compatible
query I rowsort label-7325
SELECT - col1 / col1 + col1 AS col1 FROM tab1 AS cor0
----
12
25
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + col0 col2 FROM tab0 AS cor0
----
110
132
180

query III rowsort
SELECT * FROM tab1 WHERE NOT col1 - col1 * col2 NOT IN ( + col0 + col0 + + col1 * + col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7328
SELECT ALL col0 * col1 DIV - col0 col1 FROM tab0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7328
SELECT ALL col0 * col1 / - col0 col1 FROM tab0
----
-86
-91
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-7329
SELECT tab1.col0 DIV col0 col0 FROM tab1
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7329
SELECT tab1.col0 / col0 col0 FROM tab1
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-7330
SELECT - col2 * col1 DIV col1 col1 FROM tab1
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7330
SELECT - col2 * col1 / col1 col1 FROM tab1
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-7331
SELECT DISTINCT - col2 DIV col1 FROM tab2
----
-2
0

skipif mysql # not compatible
query I rowsort label-7331
SELECT DISTINCT - col2 / col1 FROM tab2
----
-2
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 * - col1 * tab0.col1 col0 FROM tab0
----
-177504
-329315
-737009

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT NULL IN ( col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7334
SELECT ALL - col2 DIV tab0.col2 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7334
SELECT ALL - col2 / tab0.col2 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT col1 * tab2.col2 + col2 FROM tab2
----
1560
684
864

query I rowsort
SELECT col2 + + col1 * col2 FROM tab2
----
1560
684
864

query I rowsort
SELECT DISTINCT col2 * col0 + col0 FROM tab2
----
196
2106
3081

query I rowsort
SELECT col0 * tab2.col1 - + col1 FROM tab2
----
1326
186
4543

query I rowsort
SELECT DISTINCT + tab1.col1 + - col1 + col2 * tab1.col1 AS col0 FROM tab1
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-7340
SELECT cor0.col0 DIV - col1 AS col2 FROM tab1 AS cor0
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-7340
SELECT cor0.col0 / - col1 AS col2 FROM tab1 AS cor0
----
-6
-6
0

query I rowsort
SELECT - col1 + + col2 AS col1 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL - col2 + col0 * + tab1.col2 + + tab1.col2 FROM tab1
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-7343
SELECT ALL + 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-7343
SELECT ALL + col1 / - col1 col2 FROM tab0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 17 + + cor0.col2 col2 FROM tab2 cor0
----
43
44
55

query I rowsort
SELECT + 54 AS col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 81150d59d6c3fc48b4ef5a4a5495bc7a

query I rowsort
SELECT DISTINCT - col2 * - cor0.col1 + col1 FROM tab0 AS cor0
----
194
2924
7553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 35 col1 FROM tab0, tab0 AS cor0
----
9 values hashing to c12e8bdd687c9040a5600dab3b6adf5b

onlyif mysql # use DIV operator for integer division
query I rowsort label-7348
SELECT ALL + 36 DIV cor0.col0 FROM tab0 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-7348
SELECT ALL + 36 / cor0.col0 FROM tab0 AS cor0
----
0
1
1

query I rowsort
SELECT ALL col2 + col1 * col2 AS col1 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT DISTINCT col0 + - ( 31 ) FROM tab2
----
-24
47
48

query I rowsort
SELECT ALL tab1.col0 * 80 + + col0 FROM tab1
----
243
5184
6480

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT + col1 * - col2 + - tab2.col1 FROM tab2
----
-1593
-663
-868

query I rowsort
SELECT DISTINCT - col1 * col2 - col1 * + col2 AS col2 FROM tab0
----
-14924
-194
-5676

query I rowsort
SELECT DISTINCT 26 + ( col1 ) AS col2 FROM tab1
----
36
39
52

query I rowsort
SELECT - 3 * col0 FROM tab1
----
-192
-240
-9

query I rowsort
SELECT 70 * - 34 * + col2 AS col2 FROM tab0
----
-195160
-2380
-78540

query I rowsort
SELECT col0 + - 9 FROM tab2
----
-2
69
70

query I rowsort
SELECT + 36 FROM tab0
----
36
36
36

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7360
SELECT DISTINCT col0 / col0 + + col1 + + CAST( NULL AS SIGNED ) * col1 AS col0 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-7360
SELECT DISTINCT col0 / col0 + + col1 + + CAST ( NULL AS INTEGER ) * col1 AS col0 FROM tab1
----
NULL

query I rowsort
SELECT DISTINCT + 96 * - tab1.col0 + col2 * 71 AS col2 FROM tab1
----
-2097
-864
3546

query I rowsort
SELECT DISTINCT 65 FROM tab1, tab2, tab0 AS cor0, tab2 AS cor1
----
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * col1 * + col0 + col2 col0 FROM tab0
----
118826
49569
720893

query I rowsort
SELECT ALL - tab1.col2 + - tab1.col1 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 5f7b5c5678d2f6f42d8763f44ca95184

query I rowsort
SELECT DISTINCT - 50 + - col1 * - col1 + ( col2 ) AS col1 FROM tab2
----
277
3457
938

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7366
SELECT + + CAST( NULL AS DECIMAL ) / 16 + col2 * - col1 * 80 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7366
SELECT + + CAST ( NULL AS REAL ) / 16 + col2 * - col1 * 80 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( - 79 ) + col0 AS col0 FROM tab0 AS cor0
----
-44
-55
10

onlyif mysql # use DIV operator for integer division
query I rowsort label-7368
SELECT DISTINCT 25 DIV col1 AS col2 FROM tab1 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-7368
SELECT DISTINCT 25 / col1 AS col2 FROM tab1 AS cor0
----
0
1
2

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0, tab2 AS cor1, tab0 AS cor2
----
972 values hashing to 9a5ab925af18e11f7748f3b2e722ff3d

onlyif mysql # use DIV operator for integer division
query I rowsort label-7370
SELECT - col2 * + col0 + - cor0.col0 DIV col2 AS col0 FROM tab0 AS cor0
----
-70
-7299
-792

skipif mysql # not compatible
query I rowsort label-7370
SELECT - col2 * + col0 + - cor0.col0 / col2 AS col0 FROM tab0 AS cor0
----
-70
-7299
-792

query I rowsort
SELECT ALL 47 + - cor0.col0 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 4701f3a4cf2e27f4365f80179475b3f5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 col1 FROM tab0 cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-7373
SELECT ALL - col0 * cor0.col2 DIV + cor0.col1 FROM tab0 cor0
----
-80
-9
0

skipif mysql # not compatible
query I rowsort label-7373
SELECT ALL - col0 * cor0.col2 / + cor0.col1 FROM tab0 cor0
----
-80
-9
0

query I rowsort
SELECT ALL cor1.col0 AS col0 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT ALL - ( + col0 ) FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT 22 AS col2 FROM tab1, tab1 AS cor0, tab1 cor1
----
27 values hashing to 7dda382e7c08428abac8600fd696eb3e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7377
SELECT ( col1 ) + - CAST( NULL AS SIGNED ) * + col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7377
SELECT ( col1 ) + - CAST ( NULL AS INTEGER ) * + col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT col1 * - col1 * - col2 + - ( col1 ) FROM tab1
----
16211
36478
5690

query I rowsort
SELECT + 74 AS col0 FROM tab1 AS cor0
----
74
74
74

query I rowsort
SELECT ALL + cor0.col1 - + col1 * col2 * 55 FROM tab0 AS cor0
----
-156004
-410319
-5238

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT DISTINCT col0 + ( + col2 ) FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL + cor0.col1 + - col0 * + col2 AS col0 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT + + col1 * + col0 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - - col0 * - 63 AS col0 FROM tab0 cor0
----
-1512
-2205
-5607

query I rowsort
SELECT ALL - cor0.col0 * col0 AS col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT - col2 + + 0 AS col2 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT ALL - - cor0.col0 + - 43 FROM tab0 AS cor0
----
-19
-8
46

onlyif mysql # use DIV operator for integer division
query I rowsort label-7390
SELECT DISTINCT + col2 DIV cor0.col0 + col0 AS col0 FROM tab1 AS cor0
----
21
64
81

skipif mysql # not compatible
query I rowsort label-7390
SELECT DISTINCT + col2 / cor0.col0 + col0 AS col0 FROM tab1 AS cor0
----
21
64
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 + + col0 + + 76 col1 FROM tab0 AS cor0
----
112
133
247

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7392
SELECT DISTINCT - col2 * CAST( NULL AS SIGNED ) + col1 / col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7392
SELECT DISTINCT - col2 * CAST ( NULL AS INTEGER ) + col1 / col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT 91 FROM tab1
----
91
91
91

query I rowsort
SELECT - 36 AS col0 FROM tab1
----
-36
-36
-36

query I rowsort
SELECT DISTINCT + + col1 + cor0.col1 + col1 FROM tab2 AS cor0
----
177
51
93

query I rowsort
SELECT ALL + + cor0.col2 * - col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT - 37 FROM tab0, tab1 AS cor0
----
9 values hashing to ed4644af7729c2425ea6cc3d84c6504f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 19 col1 FROM tab1
----
19
19
19

query I rowsort
SELECT tab1.col2 + - col1 * col1 FROM tab1
----
-43
-622
-73

query I rowsort
SELECT ALL ( col0 ) - col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT 30 * col1 + col1 AS col1 FROM tab1 cor0
----
310
403
806

query I rowsort
SELECT ALL - 20 FROM tab1 AS cor0
----
-20
-20
-20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + col0 * + col2 * - 9 col0 FROM tab1
----
-1404
-32775
-69024

query I rowsort
SELECT + ( - 73 ) + col1 * - col1 AS col0 FROM tab1 cor0
----
-173
-242
-749

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7405
SELECT DISTINCT + CAST( col1 AS SIGNED ) + col0 FROM tab2 AS cor0
----
137
38
96

skipif mysql # not compatible
query I rowsort label-7405
SELECT DISTINCT + CAST ( col1 AS INTEGER ) + col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT - col2 + col0 * + cor0.col2 AS col0 FROM tab0 cor0
----
34
7216
759

query I rowsort
SELECT ALL - + 74 * col0 + + ( col2 ) FROM tab1 AS cor0
----
-168
-4679
-5824

onlyif mysql # use DIV operator for integer division
query I rowsort label-7408
SELECT DISTINCT + col0 + + col1 DIV ( + 66 * col0 ) col0 FROM tab2 AS cor0
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7408
SELECT DISTINCT + col0 + + col1 / ( + 66 * col0 ) col0 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-7409
SELECT ALL + 33 DIV col2 + - col0 * col1 + col1 AS col1 FROM tab1 AS cor0
----
-1027
-52
-630

skipif mysql # not compatible
query I rowsort label-7409
SELECT ALL + 33 / col2 + - col0 * col1 + col1 AS col1 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT DISTINCT - ( - col0 * col2 ) AS col1 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL col2 + cor0.col0 + col1 AS col0 FROM tab2 cor0
----
134
163
65

query I rowsort
SELECT ALL + - ( + col1 ) FROM tab2 AS cor0
----
-17
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * - col1 col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT 60 * cor0.col1 FROM tab1 AS cor0
----
1560
600
780

query I rowsort
SELECT 78 AS col1 FROM tab1 AS cor0
----
78
78
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7416
SELECT tab2.col2 * col0 + + col2 * CAST( + 4 AS SIGNED ) FROM tab2
----
2132
297
3154

skipif mysql # not compatible
query I rowsort label-7416
SELECT tab2.col2 * col0 + + col2 * CAST ( + 4 AS INTEGER ) FROM tab2
----
2132
297
3154

query I rowsort
SELECT ( col2 ) * tab2.col1 AS col1 FROM tab2
----
1534
646
837

query I rowsort
SELECT + cor0.col1 - col0 * col0 AS col2 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT ALL - col0 + - 31 FROM tab0 AS cor0
----
-120
-55
-66

query I rowsort
SELECT ALL - col1 - col2 AS col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT DISTINCT - cor0.col0 * - col2 * 82 FROM tab0 AS cor0
----
2870
598436
64944

query I rowsort
SELECT DISTINCT - - col2 * - ( - col1 ) * col2 + 63 * + 28 * cor0.col2 - - col0 FROM tab1 AS cor0
----
133102
171075
289232

query I rowsort
SELECT col2 * + 58 AS col0 FROM tab0 AS cor0
----
1914
4756
58

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7424
SELECT col0 * + CAST( + 38 AS SIGNED ) + col2 FROM tab1 AS cor0
----
168
2489
3136

skipif mysql # not compatible
query I rowsort label-7424
SELECT col0 * + CAST ( + 38 AS INTEGER ) + col2 FROM tab1 AS cor0
----
168
2489
3136

query I rowsort
SELECT ALL + col2 + 72 AS col1 FROM tab0 AS cor0
----
105
154
73

query I rowsort
SELECT ALL + 69 AS col1 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 2810c3097fe4771e273cfff903357b40

query I rowsort
SELECT cor0.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT ALL - col0 * 51 * + col1 + tab1.col1 AS col2 FROM tab1
----
-32630
-3952
-53027

query IIIIII rowsort
SELECT * FROM tab2 cor0 CROSS JOIN tab1 cor1
----
54 values hashing to 69e208df4a305efdfcc036bb4b31e720

query I rowsort
SELECT ALL 12 AS col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 702478c53caf2f7ebb9fff96d800f5a6

query I rowsort
SELECT + col2 * ( + 42 ) AS col0 FROM tab1 cor0
----
2268
2394
4032

query I rowsort
SELECT ALL cor0.col1 * col0 * cor0.col0 AS col0 FROM tab0 AS cor0
----
118825
49536
720811

query I rowsort
SELECT col1 * - cor0.col1 + - col2 FROM tab1 AS cor0
----
-157
-265
-730

query I rowsort
SELECT + col0 + col0 - - 42 AS col0 FROM tab0 AS cor0
----
112
220
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-7435
SELECT ALL cor0.col1 DIV - 67 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7435
SELECT ALL cor0.col1 / - 67 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - col1 * col0 + - 36 FROM tab0 AS cor0
----
-2100
-3431
-8135

query I rowsort
SELECT ALL - col2 * + 86 FROM tab1 cor0
----
-4644
-4902
-8256

query I rowsort
SELECT + col1 - col2 * 83 FROM tab0 AS cor0
----
-2653
-6715
14

query I rowsort
SELECT DISTINCT - col1 * + 20 * - col2 AS col1 FROM tab1 AS cor0
----
11400
24960
28080

onlyif mysql # use DIV operator for integer division
query I rowsort label-7440
SELECT ALL cor0.col0 DIV - 27 col2 FROM tab0 AS cor0
----
-1
-3
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7440
SELECT ALL cor0.col0 / - 27 col2 FROM tab0 AS cor0
----
-1
-3
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7441
SELECT - col1 + CAST( NULL AS SIGNED ) * cor0.col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7441
SELECT - col1 + CAST ( NULL AS INTEGER ) * cor0.col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 AS col1 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT col1 * 47 * + 85 + + col0 AS col2 FROM tab0 AS cor0
----
343594
363634
387550

query I rowsort
SELECT ALL - + col2 * + 98 + + col2 FROM tab1 AS cor0
----
-5238
-5529
-9312

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0, tab1 AS cor1, tab2 AS cor2
----
972 values hashing to f0b9665afa0b835e4e5097af17c51766

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab0, tab1 AS cor0
----
10
13
26

query I rowsort
SELECT + col0 + - 14 FROM tab0 AS cor0
----
10
21
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 + - cor0.col2 col2 FROM tab0 AS cor0
----
53
9
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 col0 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT DISTINCT col1 + col1 AS col2 FROM tab2
----
118
34
62

query I rowsort
SELECT col1 * col0 + col1 FROM tab1
----
104
1053
650

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab1 AS cor2, tab1 AS cor3
----
3645 values hashing to f1666fadc663c90ea9374fcb108b4477

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7453
SELECT ALL CAST( NULL AS SIGNED ) AS col0 FROM tab2, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-7453
SELECT ALL CAST ( NULL AS INTEGER ) AS col0 FROM tab2, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT tab1.col2 + - cor0.col1 AS col1 FROM tab1, tab2 AS cor0
----
-2
-5
23
26
37
40
65
79

query I rowsort
SELECT DISTINCT + col0 * - tab2.col1 + + 44 FROM tab2
----
-1299
-173
-4558

query I rowsort
SELECT + + 63 + col2 + + col2 * + col0 AS col0 FROM tab0 AS cor0
----
7443
888
99

query I rowsort
SELECT cor0.col2 * col1 * - col2 AS col2 FROM tab0 AS cor0
----
-611884
-93654
-97

query I rowsort
SELECT - col1 * - 86 FROM tab2 AS cor0
----
1462
2666
5074

onlyif mysql # use DIV operator for integer division
query I rowsort label-7459
SELECT col0 DIV 45 col2 FROM tab0 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7459
SELECT col0 / 45 col2 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT - - cor0.col0 + + col2 FROM tab0 AS cor0
----
171
36
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7461
SELECT + CAST( NULL AS SIGNED ) * + ( - col0 ) AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7461
SELECT + CAST ( NULL AS INTEGER ) * + ( - col0 ) AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 29 + + col0 * - col1 FROM tab1 AS cor0
----
-1011
-49
-611

query I rowsort
SELECT col2 + + 92 FROM tab1 cor0
----
146
149
188

query I rowsort
SELECT ALL col2 + col1 + 43 AS col2 FROM tab0
----
141
162
216

query I rowsort
SELECT tab0.col1 * col2 + 70 AS col2 FROM tab0
----
167
2908
7532

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + col1 col1 FROM tab1
----
20
26
52

query I rowsort
SELECT ALL col1 * col1 + col2 * - col1 + col1 AS col0 FROM tab2
----
-340
155
2006

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7468
SELECT - CAST( NULL AS SIGNED ) * 61 - col0 * + col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7468
SELECT - CAST ( NULL AS INTEGER ) * 61 - col0 * + col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - cor0.col0 + col2 * - col1 * col1 FROM tab2 AS cor0
----
-10903
-25940
-90428

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7470
SELECT + CAST( NULL AS SIGNED ) - + col0 / col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7470
SELECT + CAST ( NULL AS INTEGER ) - + col0 / col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - tab1.col0 AS col0 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT DISTINCT col1 * 85 FROM tab1
----
1105
2210
850

query I rowsort
SELECT DISTINCT + + cor0.col2 + + cor0.col0 * col2 FROM tab0 cor0
----
36
7380
825

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 6 col1 FROM tab1, tab2 AS cor0
----
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col1 * col1 + + col0 col0 FROM tab1
----
1064
17579
2277

query I rowsort
SELECT DISTINCT ( cor0.col2 ) * cor0.col1 + cor0.col0 AS col1 FROM tab0, tab0 cor0
----
132
2862
7551

query I rowsort
SELECT ALL - 27 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 0259a67676b131a4843853be4811b775

onlyif mysql # use DIV operator for integer division
query I rowsort label-7478
SELECT - col0 DIV col0 AS col0 FROM tab2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7478
SELECT - col0 / col0 AS col0 FROM tab2
----
-1
-1
-1

query I rowsort
SELECT col2 * + ( 56 ) FROM tab0
----
1848
4592
56

query I rowsort
SELECT + col2 * - 53 FROM tab0
----
-1749
-4346
-53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7481
SELECT ALL CAST( NULL AS SIGNED ) * + ( tab1.col1 ) FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-7481
SELECT ALL CAST ( NULL AS INTEGER ) * + ( tab1.col1 ) FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-7482
SELECT + col0 DIV - 38 AS col0 FROM tab0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-7482
SELECT + col0 / - 38 AS col0 FROM tab0
----
-2
0
0

query I rowsort
SELECT col2 * - col1 AS col2 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT col0 * ( col1 ) FROM tab1
----
1040
640
78

query I rowsort
SELECT - cor0.col0 + 41 AS col0 FROM tab2 AS cor0
----
-37
-38
34

query I rowsort
SELECT ALL cor1.col2 AS col1 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

onlyif mysql # use DIV operator for integer division
query I rowsort label-7487
SELECT col2 DIV - col1 FROM tab2 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-7487
SELECT col2 / - col1 FROM tab2 AS cor0
----
-2
0
0

query I rowsort
SELECT DISTINCT col1 + - col1 * ( - col2 ) * + 75 + + ( col2 + 27 ) FROM tab2 AS cor0
----
115162
48532
62860

query I rowsort
SELECT + col0 + col2 FROM tab2
----
104
117
34

query I rowsort
SELECT - 51 + + col0 AS col2 FROM tab0
----
-16
-27
38

query I rowsort
SELECT ( + col0 ) FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - cor0.col1 + - col2 - col2 * col0 AS col0 FROM tab2 AS cor0
----
-2113
-247
-3057

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7493
SELECT + col2 + col1 * CAST( - col1 AS SIGNED ) FROM tab0 AS cor0
----
-7363
-8199
-9408

skipif mysql # not compatible
query I rowsort label-7493
SELECT + col2 + col1 * CAST ( - col1 AS INTEGER ) FROM tab0 AS cor0
----
-7363
-8199
-9408

onlyif mysql # use DIV operator for integer division
query I rowsort label-7494
SELECT + col1 DIV col1 + col0 AS col0 FROM tab1 AS cor0
----
4
65
81

skipif mysql # not compatible
query I rowsort label-7494
SELECT + col1 / col1 + col0 AS col0 FROM tab1 AS cor0
----
4
65
81

query I rowsort
SELECT DISTINCT - col1 * - 90 + + col1 AS col0 FROM tab2 AS cor0
----
1547
2821
5369

query I rowsort
SELECT - col2 + col0 AS col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT + - col1 * - col2 + + 9 AS col1 FROM tab2 AS cor0
----
1543
655
846

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7498
SELECT DISTINCT - + col0 + - CAST( - 27 AS SIGNED ) FROM tab1 AS cor0
----
-37
-53
24

skipif mysql # not compatible
query I rowsort label-7498
SELECT DISTINCT - + col0 + - CAST ( - 27 AS INTEGER ) FROM tab1 AS cor0
----
-37
-53
24

query I rowsort
SELECT + col0 * + 94 + col0 AS col1 FROM tab2 AS cor0
----
665
7410
7505

query I rowsort
SELECT - col2 * + cor0.col2 + + 98 AS col2 FROM tab1 cor0
----
-2818
-3151
-9118

query I rowsort
SELECT + + col0 + + col0 AS col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT DISTINCT cor0.col0 + 57 FROM tab2 AS cor0
----
135
136
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * 2 + - ( + col0 * - 81 ) col1 FROM tab1 AS cor0
----
249
5312
6640

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7504
SELECT + CAST( NULL AS DECIMAL ) * + col1 * - col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7504
SELECT + CAST ( NULL AS REAL ) * + col1 * - col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7505
SELECT DISTINCT col1 DIV ( col0 * - ( col1 ) ) FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-7505
SELECT DISTINCT col1 / ( col0 * - ( col1 ) ) FROM tab0
----
0

query I rowsort
SELECT - + cor0.col2 * - col1 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT ALL 12 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to d4f5a8e032294c3b9342821617800972

query I rowsort
SELECT DISTINCT 11 FROM tab0 cor0
----
11

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 cor0, tab0 cor1
----
243 values hashing to 74e36edda45186a5c45856859d8e21f0

query I rowsort
SELECT ALL - + col2 + + col2 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT cor0.col2 * col1 - ( + col1 + + col2 ) FROM tab1 AS cor0
----
1139
1324
503

query I rowsort
SELECT ALL col2 * + col2 * - cor0.col1 + + col0 FROM tab2 AS cor0
----
-22592
-24469
-39806

query I rowsort
SELECT DISTINCT - col1 - - col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT + 94 AS col1 FROM tab1
----
94
94
94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7515
SELECT - CAST( col0 AS SIGNED ) AS col2 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-7515
SELECT - CAST ( col0 AS INTEGER ) AS col2 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT + col1 * col0 - 97 AS col2 FROM tab1 AS cor0
----
-19
543
943

query I rowsort
SELECT DISTINCT - + 39 * + col1 FROM tab1 AS cor0
----
-1014
-390
-507

onlyif mysql # use DIV operator for integer division
query I rowsort label-7518
SELECT + + col2 + - col0 - + col2 DIV col1 FROM tab2 AS cor0
----
-43
-52
20

skipif mysql # not compatible
query I rowsort label-7518
SELECT + + col2 + - col0 - + col2 / col1 FROM tab2 AS cor0
----
-43
-52
20

query I rowsort
SELECT ALL + col2 AS col2 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT + col1 * - col0 + 77 - col2 * cor0.col2 FROM tab1 AS cor0
----
-10179
-2917
-3812

query I rowsort
SELECT DISTINCT - - 76 FROM tab1 cor0
----
76

query I rowsort
SELECT ALL col2 + - cor0.col2 + - col0 AS col1 FROM tab1 AS cor0
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col1 col1 FROM tab2
----
17
31
59

query I rowsort
SELECT + col2 - 82 * - col0 * 76 FROM tab1
----
18750
398905
498656

query I rowsort
SELECT 44 FROM tab0
----
44
44
44

query I rowsort
SELECT ALL col0 + + col2 * col2 AS col0 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT ALL - 83 AS col2 FROM tab2 AS cor0
----
-83
-83
-83

query I rowsort
SELECT - col2 + - col2 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT DISTINCT ( + col2 ) AS col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL - - ( + col1 ) AS col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT - + cor0.col1 * + col0 AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0, tab0, tab2 cor1
----
972 values hashing to 591a9a93560839231c038a1e10bd240a

query I rowsort
SELECT + col2 * - col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL ( col1 ) AS col1 FROM tab0 cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * tab1.col2 col2 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT ALL - col2 - + col1 AS col2 FROM tab2
----
-55
-58
-85

query I rowsort
SELECT cor0.col2 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - col1 - + col2 col1 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT DISTINCT - 44 FROM tab0, tab2, tab0 AS cor0
----
-44

query I rowsort
SELECT col1 - col1 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT ( + col1 ) * - col2 - ( col1 ) AS col2 FROM tab0
----
-194
-2924
-7553

query I rowsort
SELECT ALL 66 - + tab1.col2 * - 97 FROM tab1
----
5304
5595
9378

query I rowsort
SELECT 63 FROM tab0
----
63
63
63

query I rowsort
SELECT 57 + - col2 FROM tab2
----
19
30
31

query I rowsort
SELECT + + 3 + - col1 FROM tab1 AS cor0
----
-10
-23
-7

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL 53 * - col0 + + tab0.col0 - - col0 AS col1 FROM tab0
----
-1224
-1785
-4539

query I rowsort
SELECT ALL col1 * col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT - - cor0.col0 * - 26 AS col2 FROM tab1, tab2, tab2 cor0
----
27 values hashing to 5fa0b6d923711cc64b8b3211215233f4

query I rowsort
SELECT DISTINCT + col2 * - col0 AS col0 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT col1 * col1 + 65 AS col0 FROM tab1
----
165
234
741

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7552
SELECT ALL col1 * ( + col0 ) * col0 + - CAST( NULL AS SIGNED ) + + col0 col1 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7552
SELECT ALL col1 * ( + col0 ) * col0 + - CAST ( NULL AS INTEGER ) + + col0 col1 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7553
SELECT + + CAST( 17 AS SIGNED ) * - col0 + 71 AS col2 FROM tab2 cor0
----
-1255
-1272
-48

skipif mysql # not compatible
query I rowsort label-7553
SELECT + + CAST ( 17 AS INTEGER ) * - col0 + 71 AS col2 FROM tab2 cor0
----
-1255
-1272
-48

query I rowsort
SELECT ALL - col1 * ( col0 ) + + 67 * col1 AS col1 FROM tab1 AS cor0
----
-169
1664
30

query I rowsort
SELECT DISTINCT + + 93 + cor0.col1 * + col2 * ( + col2 * col1 ) AS col2 FROM tab0 AS cor0
----
55681537
8054337
9502

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( cor0.col0 ) * - col0 col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL 85 * cor0.col2 FROM tab2 AS cor0
----
2210
2295
3230

onlyif mysql # use DIV operator for integer division
query I rowsort label-7558
SELECT DISTINCT + tab1.col0 DIV col0 FROM tab1
----
1

skipif mysql # not compatible
query I rowsort label-7558
SELECT DISTINCT + tab1.col0 / col0 FROM tab1
----
1

query I rowsort
SELECT + col0 + - col2 FROM tab1
----
-16
-51
7

query I rowsort
SELECT ALL col0 + - 9 FROM tab0
----
15
26
80

query I rowsort
SELECT ALL + col1 + col2 FROM tab1
----
109
67
80

query I rowsort
SELECT ALL - col0 + + 19 * + col1 FROM tab2
----
1043
244
582

query I rowsort
SELECT ALL - ( + 43 ) * col2 AS col0 FROM tab2
----
-1118
-1161
-1634

query I rowsort
SELECT 56 + 21 AS col1 FROM tab0 AS cor0
----
77
77
77

query I rowsort
SELECT ALL + col1 * - col1 + cor0.col1 * ( + col1 ) AS col2 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7566
SELECT + CAST( ( - col2 ) AS SIGNED ) + - cor0.col0 FROM tab1 AS cor0
----
-121
-176
-57

skipif mysql # not compatible
query I rowsort label-7566
SELECT + CAST ( ( - col2 ) AS INTEGER ) + - cor0.col0 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT ALL - - 38 * - col1 + + col1 AS col2 FROM tab1 AS cor0
----
-370
-481
-962

query I rowsort
SELECT DISTINCT - - 94 FROM tab2 AS cor0
----
94

query I rowsort
SELECT DISTINCT + - col1 * - col1 AS col2 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT + ( col0 ) * - col0 AS col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT ALL + - col2 + + col2 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col2 * + col2 AS col0 FROM tab2 AS cor0
----
1444
676
729

onlyif mysql # use DIV operator for integer division
query I rowsort label-7573
SELECT ALL - ( col0 ) DIV + col0 col2 FROM tab2 AS cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7573
SELECT ALL - ( col0 ) / + col0 col2 FROM tab2 AS cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * col1 + - col2 * ( + cor0.col1 ) col0 FROM tab2 AS cor0
----
-1292
-1674
-3068

query I rowsort
SELECT DISTINCT + - col1 * col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT - - col2 + + 88 FROM tab2 AS cor0
----
114
115
126

onlyif mysql # use DIV operator for integer division
query I rowsort label-7577
SELECT - 38 + - col0 DIV + col0 col1 FROM tab1 AS cor0
----
-39
-39
-39

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7577
SELECT - 38 + - col0 / + col0 col1 FROM tab1 AS cor0
----
-39
-39
-39

query I rowsort
SELECT ALL + + cor0.col2 * + col2 FROM tab2 AS cor0
----
1444
676
729

onlyif mysql # use DIV operator for integer division
query I rowsort label-7579
SELECT - + col2 DIV 38 FROM tab1 cor0
----
-1
-1
-2

skipif mysql # not compatible
query I rowsort label-7579
SELECT - + col2 / 38 FROM tab1 cor0
----
-1
-1
-2

query I rowsort
SELECT ALL - col1 + - col0 * + col1 FROM tab0 AS cor0
----
-2150
-3492
-8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-7581
SELECT DISTINCT 43 DIV cor0.col2 AS col0 FROM tab0 cor0
----
0
1
43

skipif mysql # not compatible
query I rowsort label-7581
SELECT DISTINCT 43 / cor0.col2 AS col0 FROM tab0 cor0
----
0
1
43

query I rowsort
SELECT ALL cor0.col0 * - cor0.col2 + col2 AS col0 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT 59 AS col0 FROM tab0, tab0 cor0, tab0 AS cor1
----
27 values hashing to e29fef8cdec1ee45a71d213f16d2f1d3

query I rowsort
SELECT DISTINCT + ( - 42 ) FROM tab0, tab1 cor0
----
-42

query I rowsort
SELECT cor0.col2 + - col2 * - col0 FROM tab0 cor0
----
36
7380
825

query I rowsort
SELECT - tab0.col2 FROM tab0, tab0 AS cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT ALL - 65 + + tab1.col0 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 5c9d7b39e7bd1226f3f79c45175cda36

query I rowsort
SELECT - col2 + col2 FROM tab1
----
0
0
0

query I rowsort
SELECT + col0 + - ( + col2 + col2 * col0 ) AS col1 FROM tab0
----
-1
-7291
-801

query I rowsort
SELECT + col2 + 44 + + col0 FROM tab0 AS cor0
----
101
215
80

query I rowsort
SELECT DISTINCT + col0 * 2 + - 13 AS col0 FROM tab2 cor0
----
1
143
145

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7592
SELECT col2 * CAST( + col0 AS SIGNED ) FROM tab1 AS cor0
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-7592
SELECT col2 * CAST ( + col0 AS INTEGER ) FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL 66 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 29794915b585eea848ad670075452c88

query I rowsort
SELECT - col2 * ( - 10 ) FROM tab1
----
540
570
960

query I rowsort
SELECT ALL - col2 * tab0.col0 AS col0 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT + 22 + cor0.col0 FROM tab0, tab0 cor0
----
9 values hashing to 2db72803afc9edec7fcc9ef560f6e2c7

query I rowsort
SELECT ALL + 33 FROM tab2
----
33
33
33

query I rowsort
SELECT 94 * - col0 - col2 AS col1 FROM tab1
----
-336
-6073
-7616

query I rowsort
SELECT DISTINCT 9 AS col1 FROM tab0
----
9

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0, tab1 cor1, tab0 AS cor2
----
972 values hashing to b51b4342db121ebc2d3d353dcd8ed521

query I rowsort
SELECT ALL - - 14 AS col1 FROM tab1 cor0
----
14
14
14

query I rowsort
SELECT DISTINCT 5 FROM tab1, tab1 AS cor0, tab0 AS cor1, tab1 cor2
----
5

query I rowsort
SELECT ALL - ( col1 * col1 ) FROM tab0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL - - 95 * col2 + ( - col1 * cor0.col2 ) FROM tab2 AS cor0
----
1728
2964
936

query IIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 CROSS JOIN tab0 cor1
----
54 values hashing to b8667d60d280879b35ad1450a82b3a49

query I rowsort
SELECT DISTINCT + cor0.col1 AS col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT cor0.col2 * col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT + + 68 * - cor0.col2 FROM tab0 AS cor0
----
-2244
-5576
-68

query I rowsort
SELECT ALL - 63 AS col0 FROM tab0 cor0
----
-63
-63
-63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 33 * + col1 col0 FROM tab2 AS cor0
----
1023
1947
561

query I rowsort
SELECT ALL - - col2 * cor0.col1 AS col0 FROM tab2 cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-7613
SELECT - ( col0 ) DIV col0 AS col2 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7613
SELECT - ( col0 ) / col0 AS col2 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL - cor1.col2 AS col2 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT ( col0 ) + col1 AS col2 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-7616
SELECT + col1 DIV col0 - - ( + 71 ) FROM tab0 AS cor0
----
72
73
74

skipif mysql # not compatible
query I rowsort label-7616
SELECT + col1 / col0 - - ( + 71 ) FROM tab0 AS cor0
----
72
73
74

query I rowsort
SELECT ALL - col1 + col1 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - col1 * - col2 * - col0 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT ALL - 86 + + col2 * - 77 AS col0 FROM tab2 AS cor0
----
-2088
-2165
-3012

query I rowsort
SELECT ALL + - col0 AS col0 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT + 69 * col1 AS col0 FROM tab2 AS cor0
----
1173
2139
4071

query I rowsort
SELECT col1 - col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT + col2 + - cor0.col1 AS col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT ALL - - 5 * col0 FROM tab1 AS cor0
----
15
320
400

query I rowsort
SELECT + - col2 - - col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - 14 FROM tab1
----
-14
-14
-14

query I rowsort
SELECT DISTINCT 52 FROM tab1
----
52

query I rowsort
SELECT 23 AS col2 FROM tab2
----
23
23
23

query I rowsort
SELECT DISTINCT col1 * col1 FROM tab2
----
289
3481
961

query I rowsort
SELECT 68 AS col0 FROM tab1
----
68
68
68

query I rowsort
SELECT DISTINCT + 19 FROM tab0
----
19

query I rowsort
SELECT 87 FROM tab2
----
87
87
87

query I rowsort
SELECT DISTINCT + 26 AS col1 FROM tab0
----
26

query I rowsort
SELECT 16 * + col1 + - ( + col2 + col0 * col1 ) FROM tab2
----
-1109
-3684
252

query I rowsort
SELECT - 77 FROM tab2 AS cor0
----
-77
-77
-77

query I rowsort
SELECT + 66 FROM tab2 AS cor0
----
66
66
66

query I rowsort
SELECT - col1 + 73 * - col0 + col0 FROM tab0 AS cor0
----
-1814
-2617
-6499

query I rowsort
SELECT + + col2 + col2 + col0 FROM tab0 AS cor0
----
253
37
90

query I rowsort
SELECT DISTINCT tab0.col1 * tab0.col1 - col2 FROM tab0
----
7363
8199
9408

query I rowsort
SELECT col1 + col1 AS col0 FROM tab1 cor0
----
20
26
52

query I rowsort
SELECT - + col0 + cor0.col0 AS col0 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT cor0.col0 * + col0 + - 90 * col0 FROM tab0 cor0
----
-1584
-1925
-89

query I rowsort
SELECT ALL - + col1 * 30 AS col1 FROM tab1 AS cor0
----
-300
-390
-780

query I rowsort
SELECT 85 AS col0 FROM tab2
----
85
85
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-7645
SELECT tab1.col1 DIV + tab1.col0 AS col2 FROM tab1
----
0
0
8

skipif mysql # not compatible
query I rowsort label-7645
SELECT tab1.col1 / + tab1.col0 AS col2 FROM tab1
----
0
0
8

query I rowsort
SELECT ALL col2 * ( col2 + + col0 ) FROM tab0 AS cor0
----
14022
1881
36

query I rowsort
SELECT DISTINCT - col0 + col1 FROM tab0 AS cor0
----
2
62

query I rowsort
SELECT - - 20 * - col2 FROM tab1 AS cor0
----
-1080
-1140
-1920

query I rowsort
SELECT - 14 AS col0 FROM tab1 AS cor0
----
-14
-14
-14

query I rowsort
SELECT + - 3 FROM tab2 AS cor0
----
-3
-3
-3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7651
SELECT DISTINCT + CAST( NULL AS SIGNED ) * ( col1 ) AS col1 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-7651
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * ( col1 ) AS col1 FROM tab0
----
NULL

query I rowsort
SELECT ALL 86 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 2d8c3a0d19ea51447f83cd18b49fee19

query I rowsort
SELECT DISTINCT - - 91 AS col0 FROM tab0 AS cor0
----
91

query I rowsort
SELECT ALL - col1 * 1 AS col1 FROM tab1 AS cor0
----
-10
-13
-26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7655
SELECT CAST( NULL AS SIGNED ) * - 94 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7655
SELECT CAST ( NULL AS INTEGER ) * - 94 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 + 48 * cor0.col0 FROM tab1 cor0
----
118
3062
3827

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * ( col0 ) col1 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT + + cor0.col0 + col2 * cor0.col2 AS col2 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT DISTINCT + - ( + 92 ) FROM tab2, tab2 AS cor0
----
-92

query I rowsort
SELECT + col1 * - cor0.col2 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - 37 * col2 FROM tab1 AS cor0
----
-1998
-2109
-3552

query I rowsort
SELECT 10 FROM tab0, tab0 AS cor0 CROSS JOIN tab1
----
27 values hashing to 0fe3e45a9ecd49584c2ab442100d5176

query I rowsort
SELECT + 63 * + col0 AS col0 FROM tab1 AS cor0
----
189
4032
5040

query I rowsort
SELECT ALL - col2 + 44 AS col0 FROM tab1 AS cor0
----
-10
-13
-52

query I rowsort
SELECT DISTINCT - - 28 FROM tab0 AS cor0
----
28

query I rowsort
SELECT DISTINCT + ( + col0 ) * col0 * 9 + + 15 + col0 FROM tab0 AS cor0
----
11075
5223
71393

query I rowsort
SELECT DISTINCT col1 * - 99 FROM tab2
----
-1683
-3069
-5841

onlyif mysql # use DIV operator for integer division
query I rowsort label-7668
SELECT - - 70 DIV - col0 col1 FROM tab2 AS cor0
----
-10
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7668
SELECT - - 70 / - col0 col1 FROM tab2 AS cor0
----
-10
0
0

query I rowsort
SELECT ALL - - ( - col1 ) AS col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT - col0 * 41 + + col1 AS col1 FROM tab1 AS cor0
----
-2614
-3267
-97

query I rowsort
SELECT ALL col2 + - col2 * + col2 AS col2 FROM tab2 AS cor0
----
-1406
-650
-702

onlyif mysql # use DIV operator for integer division
query I rowsort label-7672
SELECT 53 DIV cor0.col2 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7672
SELECT 53 / cor0.col2 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col1 * - col0 + col1 * cor0.col1 * col2 + - col1 FROM tab0 AS cor0
----
241918
5917
670852

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7674
SELECT DISTINCT - CAST( NULL AS SIGNED ) + + 51 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7674
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + + 51 FROM tab1 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7675
SELECT - + CAST( - col2 AS SIGNED ) + + col2 AS col0 FROM tab2 AS cor0
----
52
54
76

skipif mysql # not compatible
query I rowsort label-7675
SELECT - + CAST ( - col2 AS INTEGER ) + + col2 AS col0 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT tab2.col0 + col0 * + 28 FROM tab2
----
203
2262
2291

query I rowsort
SELECT DISTINCT tab2.col1 + 64 FROM tab2
----
123
81
95

query I rowsort
SELECT ALL + 59 * 3 - col0 AS col2 FROM tab1
----
113
174
97

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 cor0 CROSS JOIN tab0, tab1 AS cor1
----
972 values hashing to 2d99dda76af061a3fac120e0e49e6c53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 81 + tab2.col0 - - col2 col0 FROM tab2
----
115
185
198

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
972 values hashing to caf6adb9936510208f5945a7e5c76f14

query I rowsort
SELECT DISTINCT - ( + 31 ) AS col2 FROM tab2 AS cor0
----
-31

query I rowsort
SELECT + + col1 + ( + col0 ) FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL - - cor0.col2 * - cor0.col0 * + col1 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT col1 + + col0 AS col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT 29 AS col0 FROM tab2 AS cor0
----
29

query I rowsort
SELECT + col2 * + 94 + cor0.col0 FROM tab1 AS cor0
----
5079
5422
9104

query I rowsort
SELECT tab2.col0 + - col2 AS col1 FROM tab2
----
-20
41
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7689
SELECT CAST( - 24 AS SIGNED ) * col1 - + 3 FROM tab1 AS cor0
----
-243
-315
-627

skipif mysql # not compatible
query I rowsort label-7689
SELECT CAST ( - 24 AS INTEGER ) * col1 - + 3 FROM tab1 AS cor0
----
-243
-315
-627

query I rowsort
SELECT - + col1 * col0 * cor0.col0 + + col2 AS col0 FROM tab0 AS cor0
----
-118824
-49503
-720729

query I rowsort
SELECT 62 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7692
SELECT - CAST( NULL AS SIGNED ) + 5 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-7692
SELECT - CAST ( NULL AS INTEGER ) + 5 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT + 93 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
93

query I rowsort
SELECT 92 AS col0 FROM tab0 cor0
----
92
92
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-7695
SELECT ALL - tab0.col2 + col2 DIV col2 AS col0 FROM tab0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-7695
SELECT ALL - tab0.col2 + col2 / col2 AS col0 FROM tab0
----
-32
-81
0

query I rowsort
SELECT - 83 FROM tab2, tab1 AS cor0
----
9 values hashing to d55748f39f403ec273099c0d87b0bfbb

query I rowsort
SELECT + tab0.col2 * col1 - 52 * col0 FROM tab0
----
-1723
1590
2834

query I rowsort
SELECT 83 - - 91 FROM tab2, tab1 AS cor0
----
9 values hashing to f6bd16b0193e77d364d53a1d41f250af

query I rowsort
SELECT DISTINCT - cor0.col2 * - ( col2 ) FROM tab2 cor0
----
1444
676
729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col0 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-7701
SELECT ALL - - col1 DIV - ( + col1 ) + - col0 * col1 + 30 FROM tab0 AS cor0
----
-2035
-3366
-8070

skipif mysql # not compatible
query I rowsort label-7701
SELECT ALL - - col1 / - ( + col1 ) + - col0 * col1 + 30 FROM tab0 AS cor0
----
-2035
-3366
-8070

query I rowsort
SELECT ALL + col0 * + col0 AS col1 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL + col2 * 16 * col0 FROM tab2
----
3024
32448
48032

query I rowsort
SELECT ALL col1 * + col0 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-7705
SELECT DISTINCT cor0.col0 DIV + col2 + col0 col1 FROM tab0 AS cor0
----
24
70
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7705
SELECT DISTINCT cor0.col0 / + col2 + col0 col1 FROM tab0 AS cor0
----
24
70
90

query I rowsort
SELECT DISTINCT - col0 * - ( col0 ) + - col1 FROM tab2 AS cor0
----
18
6025
6224

query I rowsort
SELECT - - col2 * col2 AS col2 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT ALL + col1 - + ( - cor0.col0 + + col0 ) AS col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT + + col1 * - col1 AS col0 FROM tab0 cor0
----
-7396
-8281
-9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7710
SELECT DISTINCT - col0 * CAST( - col1 AS SIGNED ) FROM tab2 AS cor0
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-7710
SELECT DISTINCT - col0 * CAST ( - col1 AS INTEGER ) FROM tab2 AS cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + + ( cor0.col0 ) * + col2 col1 FROM tab2 AS cor0
----
2054
216
3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-7712
SELECT - cor0.col0 + ( col2 ) DIV + col1 AS col2 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-7712
SELECT - cor0.col0 + ( col2 ) / + col1 AS col2 FROM tab0 AS cor0
----
-24
-35
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7713
SELECT DISTINCT + col2 * CAST( NULL AS SIGNED ) - 29 AS col2 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7713
SELECT DISTINCT + col2 * CAST ( NULL AS INTEGER ) - 29 AS col2 FROM tab2 cor0
----
NULL

query I rowsort
SELECT - col0 + col1 AS col0 FROM tab2 cor0
----
-19
-62
24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7715
SELECT - - cor0.col0 + CAST( NULL AS SIGNED ) * + col2 * - col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7715
SELECT - - cor0.col0 + CAST ( NULL AS INTEGER ) * + col2 * - col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col0 * 8 + 9 * cor0.col1 FROM tab0 AS cor0
----
107
582
593

query I rowsort
SELECT + cor0.col2 * col1 + - col2 FROM tab0 cor0
----
2805
7380
96

query I rowsort
SELECT ALL + col1 + + ( - col1 * + col2 ) AS col2 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT DISTINCT - col1 + col2 AS col0 FROM tab2 cor0
----
-33
-4
21

query I rowsort
SELECT ALL - ( + col2 ) + + col2 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + 90 AS col1 FROM tab1 AS cor0
----
-90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7722
SELECT - + CAST( col1 AS SIGNED ) FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-7722
SELECT - + CAST ( col1 AS INTEGER ) FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT cor0.col1 + + col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL 24 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to b0d834ef9e4346801b6aaa0e74b2c8ef

query I rowsort
SELECT DISTINCT + 98 * 59 * col0 + ( col2 * - col1 ) - + col2 FROM tab1 AS cor0
----
15888
369421
461216

query I rowsort
SELECT DISTINCT - 26 FROM tab0 AS cor0
----
-26

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab2, tab0 cor1
----
243 values hashing to 5c33e96b85afe1ea51bb6d4e9fa6f993

query I rowsort
SELECT + + col1 * + col0 + 6 FROM tab2 AS cor0
----
1349
223
4608

query I rowsort
SELECT DISTINCT + ( + col1 ) * + ( cor0.col1 ) FROM tab1 cor0
----
100
169
676

query I rowsort
SELECT ALL + 11 + col0 AS col0 FROM tab1 AS cor0
----
14
75
91

query I rowsort
SELECT DISTINCT - col0 * + cor0.col2 + col0 AS col2 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT - + col0 * - cor0.col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL + col2 + + col1 AS col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT - 48 FROM tab2, tab0 cor0
----
9 values hashing to 31c94943c073954e4ca20b170ab61f8c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 89 * + col0 + col0 * - 98 * col0 col2 FROM tab0 AS cor0
----
-123165
-58584
-784179

query I rowsort
SELECT 87 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 8661ffbd1a72897c495405c53b816e50

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7737
SELECT ALL 49 * - col1 * - CAST( + col0 AS SIGNED ) + + col1 FROM tab1 AS cor0
----
31370
3848
50973

skipif mysql # not compatible
query I rowsort label-7737
SELECT ALL 49 * - col1 * - CAST ( + col0 AS INTEGER ) + + col1 FROM tab1 AS cor0
----
31370
3848
50973

onlyif mysql # use DIV operator for integer division
query I rowsort label-7738
SELECT - col2 * col1 + cor0.col1 DIV cor0.col0 FROM tab1 AS cor0
----
-1248
-1396
-570

skipif mysql # not compatible
query I rowsort label-7738
SELECT - col2 * col1 + cor0.col1 / cor0.col0 FROM tab1 AS cor0
----
-1248
-1396
-570

query I rowsort
SELECT DISTINCT - col0 + col2 * + ( col2 ) FROM tab1 AS cor0
----
2913
3185
9136

query I rowsort
SELECT col0 * - col2 + 0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - - col2 - + col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT DISTINCT ( col2 ) AS col1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL + col2 + col0 AS col0 FROM tab0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-7744
SELECT ALL + col2 + col2 DIV - ( + tab1.col0 + col2 ) FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-7744
SELECT ALL + col2 + col2 / - ( + tab1.col0 + col2 ) FROM tab1
----
54
57
96

query I rowsort
SELECT 56 * tab1.col0 + + col0 AS col1 FROM tab1
----
171
3648
4560

skipif mysql # not compatible
query I rowsort
SELECT ALL - col2 * CAST ( + 56 AS REAL ) FROM tab1 AS cor0
----
-3024
-3192
-5376

query I rowsort
SELECT + col1 * 35 AS col1 FROM tab2 AS cor0
----
1085
2065
595

query I rowsort
SELECT DISTINCT + col2 * 6 AS col0 FROM tab2 cor0
----
156
162
228

query I rowsort
SELECT - + col1 * - 92 + - 54 AS col2 FROM tab2 AS cor0
----
1510
2798
5374

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab0, tab1, tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT + tab1.col0 * - col0 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT 71 + + col0 + + 18 FROM tab2
----
167
168
96

query I rowsort
SELECT DISTINCT - 8 FROM tab2 AS cor0
----
-8

query I rowsort
SELECT ALL col1 + + col0 AS col1 FROM tab1 AS cor0
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( col0 ) * + col2 col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + ( col2 ) * col0 + + col2 AS col0 FROM tab1 cor0
----
216
3705
7776

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7757
SELECT CAST( NULL AS SIGNED ) * cor0.col1 col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7757
SELECT CAST ( NULL AS INTEGER ) * cor0.col1 col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 63 + + cor0.col2 FROM tab2, tab0 cor0
----
9 values hashing to 463786698f291fc13c99b81af717472d

onlyif mysql # use DIV operator for integer division
query I rowsort label-7759
SELECT ALL col2 + 30 DIV + col0 FROM tab2
----
26
31
38

skipif mysql # not compatible
query I rowsort label-7759
SELECT ALL col2 + 30 / + col0 FROM tab2
----
26
31
38

query I rowsort
SELECT + ( - col0 ) + col1 * col0 + + col1 FROM tab1
----
101
586
973

query I rowsort
SELECT + col2 * + col0 AS col1 FROM tab0
----
35
7298
792

query I rowsort
SELECT col2 + 82 AS col0 FROM tab1
----
136
139
178

query I rowsort
SELECT ALL - col0 + + tab1.col1 * tab1.col0 FROM tab1
----
576
75
960

query I rowsort
SELECT ALL + col2 + col2 FROM tab2
----
52
54
76

query I rowsort
SELECT ALL 77 + - tab2.col2 AS col0 FROM tab2
----
39
50
51

query I rowsort
SELECT + col0 * col0 + + col1 FROM tab1 AS cor0
----
35
4106
6413

query I rowsort
SELECT ALL 96 AS col2 FROM tab1, tab1 cor0
----
9 values hashing to 22c5141a629f0ef396738ee2c8be6303

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7768
SELECT DISTINCT CAST( col1 * col2 AS SIGNED ) FROM tab0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-7768
SELECT DISTINCT CAST ( col1 * col2 AS INTEGER ) FROM tab0
----
2838
7462
97

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

onlyif mysql # use DIV operator for integer division
query I rowsort label-7770
SELECT CAST( - col2 AS SIGNED ) * col0 DIV col0 col0 FROM tab1
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7770
SELECT CAST ( - col2 AS INTEGER ) * col0 / col0 col0 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT tab2.col1 FROM tab2, tab2 cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT ALL col2 + + 85 FROM tab1
----
139
142
181

query I rowsort
SELECT - ( col1 + col2 ) FROM tab1
----
-109
-67
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-7774
SELECT - col2 * col0 + col2 + col1 DIV tab1.col1 AS col2 FROM tab1
----
-107
-3590
-7583

skipif mysql # not compatible
query I rowsort label-7774
SELECT - col2 * col0 + col2 + col1 / tab1.col1 AS col2 FROM tab1
----
-107
-3590
-7583

query I rowsort
SELECT DISTINCT + 63 FROM tab1
----
63

query I rowsort
SELECT + col1 + tab0.col1 * tab0.col2 AS col2 FROM tab0
----
194
2924
7553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 * col0 col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT + - col0 + + col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT + col2 * - 3 + col1 FROM tab0 AS cor0
----
-13
-155
94

query I rowsort
SELECT - tab1.col1 * - tab1.col2 + 56 AS col1 FROM tab1
----
1304
1460
626

query I rowsort
SELECT DISTINCT ( - tab0.col1 ) FROM tab0
----
-86
-91
-97

query I rowsort
SELECT + col1 + - col2 AS col1 FROM tab0
----
53
9
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col0 * col2 + ( + col1 * col2 ) col1 FROM tab0
----
132
14760
3630

query I rowsort
SELECT 39 FROM tab2
----
39
39
39

query I rowsort
SELECT DISTINCT - cor0.col2 AS col2 FROM tab1, tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT + tab1.col1 AS col0 FROM tab1
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * + col0 col2 FROM tab1
----
1040
640
78

query I rowsort
SELECT ( - col0 ) + col0 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT col1 * tab2.col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT + 48 + - tab1.col0 AS col1 FROM tab1, tab2, tab1 AS cor0
----
-16
-32
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * - col2 col0 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT - 43 FROM tab1, tab2 AS cor0
----
9 values hashing to ab0c314d2b589ccedb9a875beeb1f86a

query I rowsort
SELECT + 50 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

query I rowsort
SELECT - col2 + ( - col0 ) AS col1 FROM tab1
----
-121
-176
-57

query I rowsort
SELECT DISTINCT col0 * 47 AS col0 FROM tab0
----
1128
1645
4183

query I rowsort
SELECT 37 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to a10b03e72860b949bdff53827700a9a8

query I rowsort
SELECT 88 AS col1 FROM tab0, tab1 cor0
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

query I rowsort
SELECT ALL + col1 * - ( col0 ) FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT - - col0 * + col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL + col2 * + col2 AS col2 FROM tab0 AS cor0
----
1
1089
6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * + col1 col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + col0 * + ( 71 ) FROM tab0 AS cor0
----
1704
2485
6319

query I rowsort
SELECT DISTINCT col2 * - 80 + - col0 * - cor0.col1 FROM tab2 cor0
----
-1697
-1943
2522

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7804
SELECT col2 * + CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7804
SELECT col2 * + CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col0 * col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT col1 AS col1 FROM tab0 WHERE NULL <> NULL AND col0 = - col0
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7807
SELECT DISTINCT col0 DIV col1 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-7807
SELECT DISTINCT col0 / col1 FROM tab0
----
0

query I rowsort
SELECT ALL col1 + + col0 * + col2 FROM tab2 AS cor0
----
2087
220
3019

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col0 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT - col1 + col1 FROM tab2 cor0
----
0

query IIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0 WHERE NOT ( NULL ) = NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7812
SELECT cor0.col2 DIV - tab2.col0 FROM tab1 AS cor0 CROSS JOIN tab2
----
9 values hashing to f1c87f43df3f27baae0e20a33e578e6d

skipif mysql # not compatible
query I rowsort label-7812
SELECT cor0.col2 / - tab2.col0 FROM tab1 AS cor0 CROSS JOIN tab2
----
9 values hashing to f1c87f43df3f27baae0e20a33e578e6d

query I rowsort
SELECT + col0 * - col0 * - col1 + + col0 FROM tab2
----
106176
1526
359034

onlyif mysql # use DIV operator for integer division
query I rowsort label-7814
SELECT - + col2 DIV - col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7814
SELECT - + col2 / - col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - col1 * - cor0.col1 AS col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT col1 * col1 AS col2 FROM tab1 AS cor0
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-7817
SELECT - col0 DIV + cor0.col2 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7817
SELECT - col0 / + cor0.col2 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT col1 * col0 AS col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + cor0.col1 * col0 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-7820
SELECT + - col2 DIV col2 AS col2 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7820
SELECT + - col2 / col2 AS col2 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + col2 * col1 AS col2 FROM tab2
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col0 col2 FROM tab1
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 + - col2 * cor0.col1 col2 FROM tab1 cor0
----
-1344
-1458
-627

query I rowsort
SELECT + + col1 + - col2 * col2 AS col2 FROM tab0 AS cor0
----
-1003
-6633
96

query I rowsort
SELECT - + ( - col2 ) FROM tab2 AS cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * col1 col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT - ( - col2 ) * + col2 * - col2 + + col0 FROM tab2 AS cor0
----
-17498
-19676
-54793

query I rowsort
SELECT DISTINCT - + 20 + col1 * + col2 FROM tab1 AS cor0
----
1228
1384
550

query I rowsort
SELECT DISTINCT - 9 * - cor0.col1 - cor0.col2 * + cor0.col2 FROM tab0 cor0
----
-315
-5905
872

query I rowsort
SELECT + - cor0.col2 * cor0.col2 + col0 * col2 AS col2 FROM tab2 AS cor0
----
-540
1352
1558

onlyif mysql # use DIV operator for integer division
query I rowsort label-7831
SELECT ALL + - 59 DIV col0 AS col0 FROM tab1 AS cor0
----
-19
0
0

skipif mysql # not compatible
query I rowsort label-7831
SELECT ALL + - 59 / col0 AS col0 FROM tab1 AS cor0
----
-19
0
0

query I rowsort
SELECT ALL 16 AS col1 FROM tab2 AS cor0
----
16
16
16

query I rowsort
SELECT + col2 * col2 + cor0.col0 * + col0 FROM tab1 AS cor0
----
15616
2925
7345

query I rowsort
SELECT col0 + + col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL - + 85 FROM tab2 AS cor0
----
-85
-85
-85

query I rowsort
SELECT + col2 + - cor0.col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT + - col1 + cor0.col1 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT - col2 - + cor0.col1 * ( - col1 ) AS col2 FROM tab0 cor0
----
7363
8199
9408

query I rowsort
SELECT DISTINCT + 10 + + col0 * + 25 AS col0 FROM tab1 AS cor0
----
1610
2010
85

query I rowsort
SELECT ALL + col1 * - col1 * + ( + col2 * col0 ) FROM tab1 AS cor0
----
-109512
-1297920
-364800

onlyif mysql # use DIV operator for integer division
query I rowsort label-7841
SELECT ALL col0 DIV + cor0.col1 FROM tab1 AS cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-7841
SELECT ALL col0 / + cor0.col1 FROM tab1 AS cor0
----
0
6
6

query I rowsort
SELECT col1 + col0 AS col2 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-7843
SELECT ALL - col2 DIV col0 AS col2 FROM tab2 AS cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-7843
SELECT ALL - col2 / col0 AS col2 FROM tab2 AS cor0
----
-3
0
0

query I rowsort
SELECT + - 54 AS col1 FROM tab1 cor0
----
-54
-54
-54

query I rowsort
SELECT DISTINCT 35 AS col2 FROM tab0 AS cor0
----
35

query I rowsort
SELECT ALL + ( + col2 ) * col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT tab2.col1 AS col1 FROM tab2, tab0 cor0, tab0 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

onlyif mysql # use DIV operator for integer division
query I rowsort label-7848
SELECT ALL 61 DIV col0 AS col1 FROM tab0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-7848
SELECT ALL 61 / col0 AS col1 FROM tab0
----
0
1
2

query I rowsort
SELECT DISTINCT - - col1 + col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT - 93 FROM tab1 AS cor0
----
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-7851
SELECT DISTINCT - col2 DIV + col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-7851
SELECT DISTINCT - col2 / + col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL + col1 * col1 * col1 AS col1 FROM tab2 AS cor0
----
205379
29791
4913

query I rowsort
SELECT - 99 AS col2 FROM tab2
----
-99
-99
-99

query I rowsort
SELECT ALL ( + col0 ) FROM tab1
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col0 * + col0 col1 FROM tab1
----
-17
4086
6387

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7856
SELECT ALL + - col1 * CAST( col1 AS SIGNED ) FROM tab1 AS cor0
----
-100
-169
-676

skipif mysql # not compatible
query I rowsort label-7856
SELECT ALL + - col1 * CAST ( col1 AS INTEGER ) FROM tab1 AS cor0
----
-100
-169
-676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7857
SELECT - + col2 * CAST( col1 AS SIGNED ) AS col2 FROM tab1 cor0
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort label-7857
SELECT - + col2 * CAST ( col1 AS INTEGER ) AS col2 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT - col2 * - 95 FROM tab2 cor0
----
2470
2565
3610

query I rowsort
SELECT DISTINCT 20 * + col0 AS col0 FROM tab2
----
140
1560
1580

query I rowsort
SELECT + - cor0.col2 * col0 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 94 col1 FROM tab0 AS cor0
----
-94
-94
-94

query I rowsort
SELECT col1 + col2 AS col1 FROM tab0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-7863
SELECT ALL - col2 + 18 DIV col1 AS col2 FROM tab1 AS cor0
----
-54
-56
-95

skipif mysql # not compatible
query I rowsort label-7863
SELECT ALL - col2 + 18 / col1 AS col2 FROM tab1 AS cor0
----
-54
-56
-95

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT ALL - cor0.col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query I rowsort
SELECT - 92 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 1af709a79a3e56281ffdce4d931d5965

query I rowsort
SELECT ALL col2 + col2 + - col0 FROM tab0 AS cor0
----
-33
42
75

query I rowsort
SELECT ALL + cor0.col2 + 31 + - cor0.col1 FROM tab1 cor0
----
114
59
78

query I rowsort
SELECT DISTINCT col1 - - col2 * tab0.col2 AS col1 FROM tab0
----
1175
6815
98

query I rowsort
SELECT + cor1.col2 * - 69 FROM tab2 cor0 CROSS JOIN tab0, tab1 AS cor1
----
27 values hashing to d903e3d82f0ceab43f8d1750eeddd32d

query I rowsort
SELECT col1 * 64 - 34 AS col2 FROM tab0
----
5470
5790
6174

query I rowsort
SELECT 68 + cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 3f5021a255431cf91513da287feefb13

query I rowsort
SELECT DISTINCT 61 FROM tab2, tab1 AS cor0, tab0, tab0 cor1
----
61

query I rowsort
SELECT - + 17 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 490d008f3fb5b70d3971cfc6d84503f4

query I rowsort
SELECT ( + 31 ) FROM tab2, tab1 cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

query I rowsort
SELECT ALL col0 + tab0.col2 FROM tab0
----
171
36
57

query I rowsort
SELECT ( col1 ) + - col2 FROM tab0
----
53
9
96

query I rowsort
SELECT 11 * + col1 - - col2 FROM tab1
----
167
239
340

onlyif mysql # use DIV operator for integer division
query I rowsort label-7879
SELECT ALL - tab0.col1 + - col0 DIV col2 + - ( + col1 * - col1 + + 4 ) AS col1 FROM tab0
----
7306
8185
9273

skipif mysql # not compatible
query I rowsort label-7879
SELECT ALL - tab0.col1 + - col0 / col2 + - ( + col1 * - col1 + + 4 ) AS col1 FROM tab0
----
7306
8185
9273

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7880
SELECT CAST( NULL AS SIGNED ) - 63 AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7880
SELECT CAST ( NULL AS INTEGER ) - 63 AS col2 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7881
SELECT + CAST( NULL AS SIGNED ) * col2 + - col2 + col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7881
SELECT + CAST ( NULL AS INTEGER ) * col2 + - col2 + col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col2 * col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT 30 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to da5de0c411a2c0f445400f1b63ea9f89

query I rowsort
SELECT + col2 + 26 + + cor0.col2 AS col2 FROM tab0 AS cor0
----
190
28
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-7885
SELECT - 51 DIV + col2 AS col0 FROM tab0 AS cor0
----
-1
-51
0

skipif mysql # not compatible
query I rowsort label-7885
SELECT - 51 / + col2 AS col0 FROM tab0 AS cor0
----
-1
-51
0

query I rowsort
SELECT col1 * col0 + + col2 AS col2 FROM tab1 cor0
----
1136
132
697

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0, tab2 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 79b6ae096785aaecea9c1428e4a43e5f

onlyif mysql # use DIV operator for integer division
query I rowsort label-7888
SELECT 90 DIV - cor0.col1 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 4e3347998456087d34723e0325f8b4f8

skipif mysql # not compatible
query I rowsort label-7888
SELECT 90 / - cor0.col1 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 4e3347998456087d34723e0325f8b4f8

onlyif mysql # use DIV operator for integer division
query I rowsort label-7889
SELECT DISTINCT - cor0.col2 DIV + cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
-2
0

skipif mysql # not compatible
query I rowsort label-7889
SELECT DISTINCT - cor0.col2 / + cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
-2
0

query I rowsort
SELECT ALL + 81 + col0 * cor0.col0 FROM tab2 AS cor0
----
130
6165
6322

query I rowsort
SELECT + - col1 * + col1 + cor0.col0 AS col0 FROM tab0 AS cor0
----
-7372
-8192
-9374

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7892
SELECT ALL - - CAST( NULL AS SIGNED ) + - 86 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7892
SELECT ALL - - CAST ( NULL AS INTEGER ) + - 86 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT 30 - col1 AS col1 FROM tab2 AS cor0
----
-1
-29
13

onlyif mysql # use DIV operator for integer division
query I rowsort label-7895
SELECT ALL - 97 DIV + col0 + - col1 AS col2 FROM tab0 AS cor0
----
-90
-92
-99

skipif mysql # not compatible
query I rowsort label-7895
SELECT ALL - 97 / + col0 + - col1 AS col2 FROM tab0 AS cor0
----
-90
-92
-99

query I rowsort
SELECT ALL + col0 * col0 AS col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL col0 * col2 * col0 + ( - 61 ) FROM tab2
----
1262
158123
237097

query I rowsort
SELECT DISTINCT + + col0 + + col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT + 80 AS col2 FROM tab2 AS cor0
----
80

query I rowsort
SELECT DISTINCT + col0 * col0 FROM tab0 A