sqllogictest

Artifact [a889a9bdf1]
Login

Artifact a889a9bdf116a5e83d91a10e0c2763b4926939b7:


hash-threshold 8

statement ok
CREATE TABLE tab0(col0 INTEGER, col1 INTEGER, col2 INTEGER)

statement ok
CREATE TABLE tab1(col0 INTEGER, col1 INTEGER, col2 INTEGER)

statement ok
CREATE TABLE tab2(col0 INTEGER, col1 INTEGER, col2 INTEGER)

statement ok
INSERT INTO tab0 VALUES(89,91,82)

statement ok
INSERT INTO tab0 VALUES(35,97,1)

statement ok
INSERT INTO tab0 VALUES(24,86,33)

statement ok
INSERT INTO tab1 VALUES(64,10,57)

statement ok
INSERT INTO tab1 VALUES(3,26,54)

statement ok
INSERT INTO tab1 VALUES(80,13,96)

statement ok
INSERT INTO tab2 VALUES(7,31,27)

statement ok
INSERT INTO tab2 VALUES(79,17,38)

statement ok
INSERT INTO tab2 VALUES(78,59,26)

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

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

skipif mysql # not compatible
query I rowsort label-1
SELECT - col1 + - col0 / - ( + col0 ) AS col2 FROM tab1 AS cor0
----
-12
-25
-9

query I rowsort
SELECT ALL - col1 * - 27 AS col1 FROM tab1 cor0
----
270
351
702

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

skipif mysql # not compatible
query I rowsort label-3
SELECT col1 * - CAST ( + 9 + - col0 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
1290
2522
7280

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

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

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

query I rowsort
SELECT DISTINCT col2 * - 22 * 43 FROM tab1 AS cor0
----
-51084
-53922
-90816

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7
SELECT DISTINCT + cor0.col0 + + col1 / + col2 col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT + + col1 + + 50 * - col2 FROM tab0 AS cor0
----
-1564
-4009
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 * + 61 col1 FROM tab2 AS cor0
----
-427
-4758
-4819

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + col1 * - col2 col0 FROM tab0
----
-2805
-7380
-96

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

query I rowsort
SELECT ALL - 59 * + 9 + - col2 * ( cor0.col1 + - cor0.col2 ) * col1 FROM tab2 AS cor0
----
-3879
-51153
13035

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT 52 * col2 FROM tab0 cor0
----
1716
4264
52

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

query I rowsort
SELECT DISTINCT ( - col0 ) * + col1 + 23 FROM tab2 AS cor0
----
-1320
-194
-4579

query I rowsort
SELECT col2 * - col1 * - col2 AS col2 FROM tab1 AS cor0
----
119808
32490
75816

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

query I rowsort
SELECT DISTINCT 21 + col1 FROM tab0 AS cor0
----
107
112
118

query I rowsort
SELECT DISTINCT tab1.col1 * + 16 FROM tab1
----
160
208
416

query I rowsort
SELECT col0 + - 95 FROM tab2 AS cor0
----
-16
-17
-88

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-26
SELECT ALL - + 91 DIV col0 + col0 FROM tab2 AS cor0
----
-6
77
78

skipif mysql # not compatible
query I rowsort label-26
SELECT ALL - + 91 / col0 + col0 FROM tab2 AS cor0
----
-6
77
78

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( + 18 AS REAL ) - col1 * - 3 AS col1 FROM tab2 cor0
----
111
195
69

query I rowsort
SELECT ALL ( col1 ) - col0 * 76 AS col1 FROM tab0
----
-1738
-2563
-6673

query I rowsort
SELECT + 47 FROM tab1, tab1 AS cor0
----
9 values hashing to 4fe192f296791e1e40ea00a68aa8dab7

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

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

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

skipif mysql # not compatible
query I rowsort label-32
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col0 FROM tab2, tab0 AS cor0 CROSS JOIN tab1
----
NULL

query I rowsort
SELECT 2 FROM tab1, tab0 AS cor0
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

query I rowsort
SELECT + col0 * - 91 FROM tab2 AS cor0
----
-637
-7098
-7189

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-35
SELECT ALL + + CAST( col0 AS SIGNED ) - col2 * + col2 FROM tab2 cor0
----
-1365
-598
-722

skipif mysql # not compatible
query I rowsort label-35
SELECT ALL + + CAST ( col0 AS INTEGER ) - col2 * + col2 FROM tab2 cor0
----
-1365
-598
-722

query I rowsort
SELECT + col2 * 66 FROM tab0 AS cor0
----
2178
5412
66

query I rowsort
SELECT DISTINCT col1 - col1 * - col0 * col2 AS col1 FROM tab0
----
3492
664209
68198

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-39
SELECT DISTINCT 56 * col2 * col2 + + col2 DIV col2 FROM tab1
----
163297
181945
516097

skipif mysql # not compatible
query I rowsort label-39
SELECT DISTINCT 56 * col2 * col2 + + col2 / col2 FROM tab1
----
163297
181945
516097

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-43
SELECT col2 + + tab1.col0 DIV + col2 col0 FROM tab1
----
54
58
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-43
SELECT col2 + + tab1.col0 / + col2 col0 FROM tab1
----
54
58
96

query I rowsort
SELECT DISTINCT + col2 * - 88 AS col0 FROM tab1
----
-4752
-5016
-8448

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - tab1.col1 + ( - tab1.col1 ) ) col1 FROM tab1
----
-20
-26
-52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( col0 ) col1 FROM tab0 AS cor0
----
24
35
89

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-50
SELECT ALL - col0 - - cor0.col2 DIV + ( col0 ) AS col0 FROM tab2 cor0
----
-4
-78
-79

skipif mysql # not compatible
query I rowsort label-50
SELECT ALL - col0 - - cor0.col2 / + ( col0 ) AS col0 FROM tab2 cor0
----
-4
-78
-79

query I rowsort
SELECT DISTINCT - + 88 + cor0.col0 AS col0 FROM tab0 AS cor0
----
-53
-64
1

query I rowsort
SELECT + - col2 - + col1 * - col0 AS col2 FROM tab2 AS cor0
----
1305
190
4576

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-58
SELECT col1 DIV + 43 + 84 + - col2 AS col1 FROM tab0 AS cor0
----
4
53
85

skipif mysql # not compatible
query I rowsort label-58
SELECT col1 / + 43 + 84 + - col2 AS col1 FROM tab0 AS cor0
----
4
53
85

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

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

query I rowsort
SELECT - col0 + 19 + cor0.col2 FROM tab2 AS cor0
----
-22
-33
39

query I rowsort
SELECT DISTINCT - col0 * + col1 + 13 FROM tab0 AS cor0
----
-2051
-3382
-8086

query I rowsort
SELECT DISTINCT - col1 * - col2 * + col1 + + col2 AS col1 FROM tab1 AS cor0
----
16320
36558
5757

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

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

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

query I rowsort
SELECT ALL - col1 * col0 * col0 AS col0 FROM tab1 AS cor0
----
-234
-40960
-83200

query I rowsort
SELECT ALL - col2 * 31 FROM tab1 AS cor0
----
-1674
-1767
-2976

query I rowsort
SELECT DISTINCT - ( 12 ) - + col1 AS col0 FROM tab2 AS cor0
----
-29
-43
-71

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

query I rowsort
SELECT DISTINCT + - col1 * + 26 AS col1 FROM tab0 cor0
----
-2236
-2366
-2522

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

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

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

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

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

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

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

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

query I rowsort
SELECT + - col0 * 27 + col1 AS col0 FROM tab2 AS cor0
----
-158
-2047
-2116

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

query I rowsort
SELECT ALL + + ( col2 ) + - col1 * 77 FROM tab1 AS cor0
----
-1948
-713
-905

query I rowsort
SELECT - + col0 * 54 - col2 AS col2 FROM tab0 AS cor0
----
-1329
-1891
-4888

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

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

query I rowsort
SELECT + - 82 + col2 AS col0 FROM tab1 AS cor0
----
-25
-28
14

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 cor0, tab0, tab0 AS cor1
----
972 values hashing to 3406497351e4789c89a295ee9b64b201

query I rowsort
SELECT tab1.col2 * 55 FROM tab1, tab1 AS cor0
----
9 values hashing to 777aeb0da5ce5f61c19a9328706ad2ec

query I rowsort
SELECT cor0.col0 * + cor1.col1 FROM tab1, tab0 cor0, tab1 AS cor1
----
27 values hashing to 55963bf0362c7e00773b409d4454ed69

query I rowsort
SELECT ALL - + col2 * col1 - 6 * col0 FROM tab2 AS cor0
----
-1120
-2002
-879

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

query I rowsort
SELECT ALL - 19 AS col2 FROM tab0
----
-19
-19
-19

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-92
SELECT DISTINCT - 29 DIV - 48 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
0

skipif mysql # not compatible
query I rowsort label-92
SELECT DISTINCT - 29 / - 48 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-93
SELECT DISTINCT 81 + + tab0.col0 DIV ( col0 * tab0.col1 ) + - ( - 35 ) * + tab0.col2 * - ( col0 ) AS col1 FROM tab0
----
-1144
-255349
-27639

skipif mysql # not compatible
query I rowsort label-93
SELECT DISTINCT 81 + + tab0.col0 / ( col0 * tab0.col1 ) + - ( - 35 ) * + tab0.col2 * - ( col0 ) AS col1 FROM tab0
----
-1144
-255349
-27639

onlyif mysql # use DIV operator for integer division
query I rowsort label-94
SELECT - col2 - - col1 DIV col0 FROM tab2
----
-23
-26
-38

skipif mysql # not compatible
query I rowsort label-94
SELECT - col2 - - col1 / col0 FROM tab2
----
-23
-26
-38

query I rowsort
SELECT - col1 + - 26 AS col1 FROM tab0
----
-112
-117
-123

query I rowsort
SELECT col0 * - 19 + ( + col1 + ( col2 ) * - col0 ) FROM tab2
----
-291
-3451
-4486

onlyif mysql # use DIV operator for integer division
query I rowsort label-97
SELECT col1 - col2 DIV col0 FROM tab0
----
85
91
97

skipif mysql # not compatible
query I rowsort label-97
SELECT col1 - col2 / col0 FROM tab0
----
85
91
97

query I rowsort
SELECT ALL + col1 * + col2 * + 25 FROM tab2 AS cor0
----
16150
20925
38350

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-100
SELECT ALL col2 DIV - 36 FROM tab2 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-100
SELECT ALL col2 / - 36 FROM tab2 AS cor0
----
-1
0
0

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

query I rowsort
SELECT DISTINCT + col1 * col1 - - col0 * col1 * 57 FROM tab2
----
13330
265795
76840

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

query I rowsort
SELECT DISTINCT - col0 * col2 * - col0 - col0 AS col0 FROM tab0
----
1190
18984
649433

onlyif mysql # use DIV operator for integer division
query I rowsort label-105
SELECT 83 DIV - 44 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-105
SELECT 83 / - 44 FROM tab1
----
-1
-1
-1

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

query I rowsort
SELECT col0 * ( col0 ) + ( + 46 ) FROM tab2 AS cor0
----
6130
6287
95

query I rowsort
SELECT + + 56 + cor0.col1 * - col0 FROM tab0 AS cor0
----
-2008
-3339
-8043

query I rowsort
SELECT - col0 + 5 AS col1 FROM tab0 AS cor0
----
-19
-30
-84

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

query I rowsort
SELECT - 60 * + col0 + ( cor0.col0 ) AS col0 FROM tab1 AS cor0
----
-177
-3776
-4720

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

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

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

query I rowsort
SELECT + - 99 * + col0 * + ( 71 ) FROM tab0 AS cor0
----
-168696
-246015
-625581

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

query I rowsort
SELECT + + col0 * col2 + - ( - 66 ) + + col1 AS col0 FROM tab0 AS cor0
----
198
7455
944

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

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

query I rowsort
SELECT - + 38 * - col1 + - col1 * col1 * + col2 AS col0 FROM tab1 AS cor0
----
-15730
-35516
-5320

query I rowsort
SELECT DISTINCT - + 38 FROM tab1 AS cor0
----
-38

query I rowsort
SELECT + 8 * + col1 * 68 + 39 + + col0 * col2 * - col1 FROM tab0 AS cor0
----
-21289
-614575
49412

onlyif mysql # use DIV operator for integer division
query I rowsort label-122
SELECT DISTINCT col2 * col2 DIV - col0 FROM tab0 AS cor0
----
-45
-75
0

skipif mysql # not compatible
query I rowsort label-122
SELECT DISTINCT col2 * col2 / - col0 FROM tab0 AS cor0
----
-45
-75
0

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

query I rowsort
SELECT - 53 + col2 + cor0.col0 * col2 AS col1 FROM tab1 AS cor0
----
163
3652
7723

query I rowsort
SELECT ALL tab2.col0 - ( - col1 ) FROM tab2
----
137
38
96

query I rowsort
SELECT ALL tab0.col2 * col1 + col2 * + col1 FROM tab0
----
14924
194
5676

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * + ( - cor0.col2 * col2 ) col2 FROM tab0 AS cor0
----
-611884
-93654
-97

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

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

skipif mysql # not compatible
query I rowsort label-130
SELECT DISTINCT - 88 / - cor1.col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
0
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-131
SELECT CAST( - col1 AS SIGNED ) + col0 FROM tab1 AS cor0
----
-23
54
67

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

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

query I rowsort
SELECT DISTINCT + - 8 FROM tab2 AS cor0
----
-8

query I rowsort
SELECT + 20 + col1 * col0 FROM tab0 AS cor0
----
2084
3415
8119

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

query I rowsort
SELECT - + 48 * cor0.col0 * col0 + col2 FROM tab0 AS cor0
----
-27615
-380126
-58799

onlyif mysql # use DIV operator for integer division
query I rowsort label-137
SELECT - + col0 * 3 DIV col0 AS col0 FROM tab1 AS cor0
----
-3
-3
-3

skipif mysql # not compatible
query I rowsort label-137
SELECT - + col0 * 3 / col0 AS col0 FROM tab1 AS cor0
----
-3
-3
-3

query I rowsort
SELECT DISTINCT - - cor0.col2 + 39 AS col1 FROM tab0 cor0
----
121
40
72

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

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

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

query I rowsort
SELECT tab0.col0 * - 39 - 93 AS col2 FROM tab0
----
-1029
-1458
-3564

query I rowsort
SELECT - tab0.col2 - + 15 * 47 AS col0 FROM tab0
----
-706
-738
-787

query I rowsort
SELECT ALL - col1 * 22 FROM tab0 cor0
----
-1892
-2002
-2134

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-148
SELECT col2 DIV + 53 AS col2 FROM tab2 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-148
SELECT col2 / + 53 AS col2 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT ( + 41 ) * + col1 + 72 * - col0 * - col0 FROM tab1 AS cor0
----
1714
295322
461333

query I rowsort
SELECT ALL 88 AS col2 FROM tab0 cor0
----
88
88
88

query I rowsort
SELECT DISTINCT - 96 + + col0 + - ( + col2 ) FROM tab0 AS cor0
----
-105
-62
-89

query I rowsort
SELECT + 23 + col1 AS col0 FROM tab2
----
40
54
82

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

query I rowsort
SELECT ALL col1 * cor0.col1 + 1 FROM tab0 AS cor0
----
7397
8282
9410

query I rowsort
SELECT ALL + + 28 * + col1 + ( + col2 ) FROM tab2 AS cor0
----
1678
514
895

query I rowsort
SELECT ALL + 89 - col1 AS col1 FROM tab2 AS cor0
----
30
58
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-157
SELECT ALL - col0 * - col2 + - 96 * + col0 + - col2 DIV - col0 AS col0 FROM tab0 AS cor0
----
-1246
-1511
-3325

skipif mysql # not compatible
query I rowsort label-157
SELECT ALL - col0 * - col2 + - 96 * + col0 + - col2 / - col0 AS col0 FROM tab0 AS cor0
----
-1246
-1511
-3325

query I rowsort
SELECT DISTINCT - col1 * - col2 + - col1 FROM tab2 AS cor0
----
1475
629
806

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

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

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

query I rowsort
SELECT DISTINCT - ( col2 ) + - col2 + - col0 AS col1 FROM tab2 AS cor0
----
-130
-155
-61

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

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

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT cor0.col0 + - CAST ( col1 AS REAL ) / - col1 FROM tab2 AS cor0
----
79
8
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + cor0.col2 col2 FROM tab2 cor0
----
-1444
-676
-729

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

query I rowsort
SELECT - cor0.col0 * 20 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to ccfb9472d49e97d47978520fbdf5cbf1

query I rowsort
SELECT ALL + col2 + - col0 - + 98 AS col2 FROM tab2 AS cor0
----
-139
-150
-78

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

query I rowsort
SELECT col0 + 97 AS col2 FROM tab0 AS cor0
----
121
132
186

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * col1 + + col0 col1 FROM tab1 AS cor0
----
-1168
-1401
-506

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-176
SELECT + col0 + col2 / + tab1.col0 col1 FROM tab1
----
21
64
81

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

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

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

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

query I rowsort
SELECT 90 - 21 FROM tab1, tab2 AS cor0
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

query I rowsort
SELECT col0 * tab2.col1 + - 72 AS col2 FROM tab2
----
1271
145
4530

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

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

query I rowsort
SELECT DISTINCT col2 + + 88 AS col0 FROM tab2
----
114
115
126

query I rowsort
SELECT - + 23 AS col0 FROM tab0 AS cor0
----
-23
-23
-23

query I rowsort
SELECT ALL 93 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

onlyif mysql # use DIV operator for integer division
query I rowsort label-188
SELECT ALL - col0 + - col0 + - col2 DIV - col1 FROM tab1
----
-123
-153
-4

skipif mysql # not compatible
query I rowsort label-188
SELECT ALL - col0 + - col0 + - col2 / - col1 FROM tab1
----
-123
-153
-4

query I rowsort
SELECT 80 * col0 + col1 FROM tab2
----
591
6299
6337

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

query I rowsort
SELECT - 27 * cor0.col2 FROM tab1 cor0
----
-1458
-1539
-2592

query I rowsort
SELECT + - 53 * + col2 + cor0.col0 * + col1 FROM tab2 cor0
----
-1214
-671
3224

query I rowsort
SELECT + col2 * + col2 + col0 FROM tab1 cor0
----
2919
3313
9296

query I rowsort
SELECT - ( 70 ) FROM tab0
----
-70
-70
-70

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

query I rowsort
SELECT + ( - 39 ) FROM tab2 cor0
----
-39
-39
-39

query I rowsort
SELECT - col0 + + 8 FROM tab0 AS cor0
----
-16
-27
-81

query I rowsort
SELECT DISTINCT - col1 * - col2 * 0 FROM tab2 AS cor0
----
0

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

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

query I rowsort
SELECT col2 * + 81 + cor0.col1 * col1 FROM tab1 AS cor0
----
4717
5050
7945

query I rowsort
SELECT DISTINCT + col2 - col2 * + 61 FROM tab2 AS cor0
----
-1560
-1620
-2280

query I rowsort
SELECT + col1 + + 41 FROM tab0 cor0
----
127
132
138

query I rowsort
SELECT col1 + - col2 * col1 + col0 AS col2 FROM tab2
----
-1397
-550
-799

query I rowsort
SELECT DISTINCT - 84 + + col2 FROM tab0
----
-2
-51
-83

query I rowsort
SELECT tab2.col0 + + ( tab2.col1 ) FROM tab2
----
137
38
96

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

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

query I rowsort
SELECT col0 * + tab0.col0 * - tab0.col1 FROM tab0
----
-118825
-49536
-720811

query I rowsort
SELECT col2 * - 69 FROM tab2
----
-1794
-1863
-2622

query I rowsort
SELECT - 43 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 2f72bd9cab68c8d8c38874510a290a3c

query I rowsort
SELECT ALL - ( 23 ) AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to ce60bf4b0647d0fcb18a0562e351c52d

query I rowsort
SELECT col2 + + 2 FROM tab1 AS cor0
----
56
59
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 - ( + col2 + col2 ) col1 FROM tab1 AS cor0
----
-111
-178
-272

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

query I rowsort
SELECT DISTINCT 81 * col2 - - col1 AS col0 FROM tab1 AS cor0
----
4400
4627
7789

onlyif mysql # use DIV operator for integer division
query I rowsort label-217
SELECT ALL - 53 * + col2 + - col0 DIV col1 FROM tab2 AS cor0
----
-1379
-1431
-2018

skipif mysql # not compatible
query I rowsort label-217
SELECT ALL - 53 * + col2 + - col0 / col1 FROM tab2 AS cor0
----
-1379
-1431
-2018

query I rowsort
SELECT DISTINCT - ( 84 ) FROM tab0, tab1 cor0, tab1 AS cor1, tab1 AS cor2
----
-84

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

query I rowsort
SELECT 52 * + tab2.col0 FROM tab2
----
364
4056
4108

onlyif mysql # use DIV operator for integer division
query I rowsort label-221
SELECT ALL 47 DIV + col2 + - col0 * col1 FROM tab1
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-221
SELECT ALL 47 / + col2 + - col0 * col1 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT ALL - 7 * - col0 + - col2 AS col2 FROM tab0
----
135
244
541

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

query I rowsort
SELECT DISTINCT - 2 + col2 AS col1 FROM tab0
----
-1
31
80

query I rowsort
SELECT DISTINCT - + col2 * col0 * ( cor0.col0 + - 69 ) AS col2 FROM tab1 AS cor0
----
-84480
10692
18240

query I rowsort
SELECT - + col2 + - cor0.col1 - col1 FROM tab0 AS cor0
----
-195
-205
-264

onlyif mysql # use DIV operator for integer division
query I rowsort label-227
SELECT DISTINCT + col1 + + CAST( + col0 AS SIGNED ) + - col2 * 33 DIV - 6 FROM tab0 AS cor0
----
137
291
631

skipif mysql # not compatible
query I rowsort label-227
SELECT DISTINCT + col1 + + CAST ( + col0 AS INTEGER ) + - col2 * 33 / - 6 FROM tab0 AS cor0
----
137
291
631

query I rowsort
SELECT DISTINCT col0 * col2 * 60 FROM tab2 AS cor0
----
11340
121680
180120

onlyif mysql # use DIV operator for integer division
query I rowsort label-229
SELECT ( tab0.col1 ) DIV col1 + col0 FROM tab0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-229
SELECT ( tab0.col1 ) / col1 + col0 FROM tab0
----
25
36
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-230
SELECT DISTINCT col0 * col2 DIV 87 col2 FROM tab1
----
1
41
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-230
SELECT DISTINCT col0 * col2 / 87 col2 FROM tab1
----
1
41
88

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-234
SELECT + + col2 * col2 DIV - col0 + cor0.col1 AS col2 FROM tab1 AS cor0
----
-102
-40
-946

skipif mysql # not compatible
query I rowsort label-234
SELECT + + col2 * col2 / - col0 + cor0.col1 AS col2 FROM tab1 AS cor0
----
-102
-40
-946

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + 51 col2 FROM tab2 AS cor0
----
77
78
89

query I rowsort
SELECT col1 + + 17 FROM tab2
----
34
48
76

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 43 * - 13 col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 398dd90a7024fa6c0f0d6dee2bf3e465

query I rowsort
SELECT cor0.col2 + - col1 - col1 AS col2 FROM tab1 AS cor0
----
2
37
70

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

query I rowsort
SELECT - col0 * ( + col1 * cor0.col2 ) + col1 AS col1 FROM tab1 AS cor0
----
-36470
-4186
-99827

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

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

query I rowsort
SELECT - 12 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to e698dd57d3aac30af14ce35da434bb45

query I rowsort
SELECT col2 + + ( + col2 ) FROM tab1
----
108
114
192

onlyif mysql # use DIV operator for integer division
query I rowsort label-246
SELECT + col0 DIV 71 + col2 FROM tab0
----
1
33
83

skipif mysql # not compatible
query I rowsort label-246
SELECT + col0 / 71 + col2 FROM tab0
----
1
33
83

query I rowsort
SELECT ALL + ( + 30 ) AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to da5de0c411a2c0f445400f1b63ea9f89

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

query I rowsort
SELECT - - col2 * 98 * cor0.col0 AS col1 FROM tab2 AS cor0
----
18522
198744
294196

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 87 col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 84bcab58a965cc8ae97b39d2d01b3d23

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

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

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

query I rowsort
SELECT DISTINCT - 13 + - col1 AS col1 FROM tab0
----
-104
-110
-99

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

query I rowsort
SELECT ALL - 1 AS col2 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 84da757b1b7b0069ce25607f39bc08d9

query I rowsort
SELECT ALL - 42 FROM tab2, tab0, tab0 AS cor0, tab1
----
81 values hashing to 9fa3c02ecae23525dd0e284c4751c1df

query I rowsort
SELECT + col0 * col1 * cor0.col0 FROM tab1 cor0
----
234
40960
83200

query I rowsort
SELECT DISTINCT col2 * + col0 + tab0.col1 * + col2 + 0 AS col2 FROM tab0
----
132
14760
3630

query I rowsort
SELECT + col2 * col2 + col1 + + ( + col1 ) FROM tab2 AS cor0
----
1478
791
794

query I rowsort
SELECT ALL + - col0 * + 70 AS col2 FROM tab2 AS cor0
----
-490
-5460
-5530

query I rowsort
SELECT ALL 76 * col1 + + col0 FROM tab0
----
6560
7005
7407

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

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

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

query I rowsort
SELECT DISTINCT + cor0.col1 + cor0.col0 - 2 AS col0 FROM tab2 cor0
----
135
36
94

query I rowsort
SELECT + 85 + - col0 FROM tab1 cor0
----
21
5
82

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

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

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

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

query I rowsort
SELECT + 61 + col0 + + 21 AS col1 FROM tab1 AS cor0
----
146
162
85

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

query I rowsort
SELECT - 76 + col1 AS col0 FROM tab2 AS cor0
----
-17
-45
-59

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 62 * col1 col1 FROM tab2 AS cor0
----
-1054
-1922
-3658

query I rowsort
SELECT 44 * col0 + 4 + - 80 * - col2 FROM tab1 cor0
----
11204
4456
7380

query I rowsort
SELECT DISTINCT + + 21 FROM tab2 cor0
----
21

query I rowsort
SELECT tab0.col0 + ( 84 ) FROM tab0, tab1 AS cor0
----
9 values hashing to 3f730adb0125410b47de9f7c299042ec

query I rowsort
SELECT + - col0 + + col0 + - ( - 76 * col2 ) AS col1 FROM tab1 AS cor0
----
4104
4332
7296

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 + col2 * - col2 + 47 col1 FROM tab2 AS cor0
----
-1414
-688
-713

query I rowsort
SELECT + + cor0.col2 * - 80 FROM tab1 AS cor0
----
-4320
-4560
-7680

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

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

query I rowsort
SELECT + cor0.col1 + col1 + 36 AS col2 FROM tab1 AS cor0
----
56
62
88

query I rowsort
SELECT ALL + + col2 * - col0 + + cor0.col0 + 92 * col2 AS col0 FROM tab0 AS cor0
----
2268
335
92

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

query I rowsort
SELECT DISTINCT ( - col2 ) + col2 * 5 AS col0 FROM tab2 AS cor0
----
104
108
152

onlyif mysql # use DIV operator for integer division
query I rowsort label-287
SELECT ALL 18 + col1 DIV + col0 AS col2 FROM tab2 AS cor0
----
18
18
22

skipif mysql # not compatible
query I rowsort label-287
SELECT ALL 18 + col1 / + col0 AS col2 FROM tab2 AS cor0
----
18
18
22

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col0 + - col1 col1 FROM tab0 AS cor0
----
-62
706
7207

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

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

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

query I rowsort
SELECT - col0 + + ( + 10 ) AS col0 FROM tab2
----
-68
-69
3

query I rowsort
SELECT - - 2 + + ( col2 ) FROM tab1 AS cor0
----
56
59
98

query I rowsort
SELECT DISTINCT - + 70 + col1 AS col1 FROM tab0 AS cor0
----
16
21
27

query I rowsort
SELECT - - cor0.col0 * + col2 - - col2 * 81 AS col2 FROM tab0 AS cor0
----
116
13940
3465

query I rowsort
SELECT 52 + + cor0.col0 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 7a53cb0eefbaba432aa29271caf3e719

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

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT NULL < col2 + + col1
----

query I rowsort
SELECT col2 - col0 * col2 AS col1 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT col0 * - col2 + col2 AS col1 FROM tab2
----
-162
-2002
-2964

query I rowsort
SELECT ALL col2 + tab0.col0 * + col1 * col0 AS col0 FROM tab0
----
118826
49569
720893

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

skipif mysql # not compatible
query I rowsort label-303
SELECT - col0 / - col0 AS col0 FROM tab2
----
1
1
1

query I rowsort
SELECT col1 + col0 FROM tab0 WHERE NOT ( NULL ) < col1
----

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

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

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

query I rowsort
SELECT DISTINCT - tab0.col2 + - tab0.col2 AS col2 FROM tab0
----
-164
-2
-66

onlyif mysql # use DIV operator for integer division
query I rowsort label-309
SELECT ALL col0 * col0 + + col0 DIV col1 FROM tab1
----
4102
6406
9

skipif mysql # not compatible
query I rowsort label-309
SELECT ALL col0 * col0 + + col0 / col1 FROM tab1
----
4102
6406
9

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

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

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

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

query I rowsort
SELECT col2 + - col1 - tab1.col2 FROM tab1
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 col2 FROM tab0 WHERE NOT NULL BETWEEN ( NULL ) AND ( col2 )
----

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

query I rowsort
SELECT + tab0.col2 * + col1 + + col2 + + tab0.col2 AS col2 FROM tab0
----
2904
7626
99

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * tab0.col1 col2 FROM tab0
----
7396
8281
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + tab2.col1 + col1 * - col0 col1 FROM tab2 WHERE NULL NOT IN ( + col0 )
----

query I rowsort
SELECT col1 AS col0 FROM tab2 WHERE NULL IN ( col1 + - col1 )
----

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

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

query I rowsort
SELECT DISTINCT + col0 * - col2 * - col1 + + col2 FROM tab2
----
119678
51072
5886

query I rowsort
SELECT DISTINCT col1 / + col1 FROM tab2 WHERE col2 IN ( - col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-326
SELECT - col0 + + col0 DIV - col1 AS col0 FROM tab2 AS cor0
----
-7
-79
-83

skipif mysql # not compatible
query I rowsort label-326
SELECT - col0 + + col0 / - col1 AS col0 FROM tab2 AS cor0
----
-7
-79
-83

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

skipif mysql # not compatible
query I rowsort label-327
SELECT DISTINCT + col0 * col1 / tab1.col0 AS col1 FROM tab1
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 col0 FROM tab1 WHERE NOT NULL NOT IN ( - col0 * + col1 )
----

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

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

query IIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0 WHERE NOT NULL <= NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-332
SELECT tab2.col1 DIV col1 AS col2 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-332
SELECT tab2.col1 / col1 AS col2 FROM tab2
----
1
1
1

query I rowsort
SELECT DISTINCT col0 + col0 * + col2 + col1 AS col0 FROM tab0
----
167
7478
902

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

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

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

query I rowsort
SELECT col0 + + col1 * + tab2.col1 FROM tab2
----
3559
368
968

query I rowsort
SELECT + + col1 + + cor0.col1 FROM tab2 AS cor0
----
118
34
62

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

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

query I rowsort
SELECT ALL cor0.col1 + col1 AS col2 FROM tab2 AS cor0
----
118
34
62

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-341
SELECT DISTINCT col2 + col2 / ( - col1 ) col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL - cor0.col0 * - 25 + + col2 AS col0 FROM tab0 AS cor0
----
2307
633
876

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

query I rowsort
SELECT col2 * + col2 - - col0 * + col1 FROM tab1 AS cor0
----
10256
2994
3889

query I rowsort
SELECT - col2 + - cor0.col2 * - col2 FROM tab2 AS cor0
----
1406
650
702

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

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

query I rowsort
SELECT + col0 * col0 + - ( col1 ) - + 87 * + col2 * col2 FROM tab0 AS cor0
----
-577158
-94253
1041

query I rowsort
SELECT ALL - col0 * - col1 + ( + cor0.col2 ) * 45 AS col2 FROM tab2 cor0
----
1432
3053
5772

query I rowsort
SELECT DISTINCT 94 AS col1 FROM tab1 AS cor0
----
94

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

skipif mysql # not compatible
query I rowsort label-350
SELECT DISTINCT + CAST ( - col2 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-54
-57
-96

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

query I rowsort
SELECT DISTINCT - - col0 + ( col0 + - 50 ) AS col0 FROM tab2 AS cor0
----
-36
106
108

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

query I rowsort
SELECT ( ( + col0 ) ) - ( + 25 ) AS col1 FROM tab2 cor0
----
-18
53
54

query I rowsort
SELECT ALL col0 * col2 - col1 FROM tab1
----
136
3638
7667

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

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

query I rowsort
SELECT 36 * - col1 FROM tab0 AS cor0
----
-3096
-3276
-3492

query I rowsort
SELECT ALL col0 * + col0 + col2 FROM tab2
----
6110
6279
76

query III rowsort
SELECT ALL * FROM tab1 WHERE NULL NOT BETWEEN NULL AND - col2 * col2
----

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

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

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

query I rowsort
SELECT ALL + 39 * - col2 FROM tab1 AS cor0
----
-2106
-2223
-3744

query I rowsort
SELECT DISTINCT + 43 + col1 AS col2 FROM tab0 AS cor0
----
129
134
140

query I rowsort
SELECT 0 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

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

query I rowsort
SELECT 71 AS col0 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 95a6ff35b7b8f00868fb58bcaa32d0c2

query I rowsort
SELECT - - 19 * col2 AS col0 FROM tab0 AS cor0
----
1558
19
627

query I rowsort
SELECT ALL + 69 FROM tab0, tab2 AS cor0, tab1 cor1, tab0 AS cor2
----
81 values hashing to dfada1ee7a4e3e5c74a063a1282769f9

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

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

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

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

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab1, tab0 AS cor0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

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

query I rowsort
SELECT col0 * + 64 + col0 AS col0 FROM tab1 AS cor0
----
195
4160
5200

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

query I rowsort
SELECT ALL - 9 * + col1 * + col2 FROM tab0 AS cor0
----
-25542
-67158
-873

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

query I rowsort
SELECT DISTINCT + ( + col0 ) * col1 - col2 AS col0 FROM tab2 AS cor0
----
1305
190
4576

query I rowsort
SELECT DISTINCT + ( 54 ) + col0 FROM tab1 AS cor0
----
118
134
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-380
SELECT - tab0.col1 DIV col0 + tab0.col1 AS col0 FROM tab0
----
83
90
95

skipif mysql # not compatible
query I rowsort label-380
SELECT - tab0.col1 / col0 + tab0.col1 AS col0 FROM tab0
----
83
90
95

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

query I rowsort
SELECT ALL - 76 * 11 AS col2 FROM tab1, tab0, tab2 cor0
----
27 values hashing to f1b06a3bc89b4420adacd045b141028b

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

skipif mysql # not compatible
query I rowsort label-383
SELECT DISTINCT CAST ( NULL AS REAL ) AS col2 FROM tab0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-384
SELECT - CAST( + col2 AS SIGNED ) FROM tab2
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-384
SELECT - CAST ( + col2 AS INTEGER ) FROM tab2
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-385
SELECT 15 + + col0 DIV - tab1.col0 AS col1 FROM tab1
----
14
14
14

skipif mysql # not compatible
query I rowsort label-385
SELECT 15 + + col0 / - tab1.col0 AS col1 FROM tab1
----
14
14
14

query I rowsort
SELECT ( col0 ) + + 50 AS col0 FROM tab0 cor0
----
139
74
85

query I rowsort
SELECT DISTINCT + cor0.col2 - + 55 FROM tab2 AS cor0
----
-17
-28
-29

query I rowsort
SELECT - 36 * + col1 FROM tab0
----
-3096
-3276
-3492

query I rowsort
SELECT + 54 * col0 * - tab0.col0 + col0 AS col2 FROM tab0
----
-31080
-427645
-66115

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

query I rowsort
SELECT DISTINCT + cor0.col1 * - col0 - 43 AS col2 FROM tab1 AS cor0
----
-1083
-121
-683

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-393
SELECT DISTINCT 46 DIV cor0.col1 AS col2 FROM tab1, tab2, tab2 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-393
SELECT DISTINCT 46 / cor0.col1 AS col2 FROM tab1, tab2, tab2 AS cor0
----
0
1
2

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-395
SELECT col0 + 92 DIV + cor0.col1 FROM tab1 AS cor0
----
6
73
87

skipif mysql # not compatible
query I rowsort label-395
SELECT col0 + 92 / + cor0.col1 FROM tab1 AS cor0
----
6
73
87

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

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

query I rowsort
SELECT DISTINCT col0 - col0 * col2 FROM tab1
----
-159
-3584
-7600

query I rowsort
SELECT ALL + col2 * - col1 + - 0 + col1 FROM tab2
----
-1475
-629
-806

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

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

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

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

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

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

query I rowsort
SELECT ALL + col0 + ( - 61 ) * - col2 AS col1 FROM tab2 AS cor0
----
1654
1664
2397

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

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

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

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

query I rowsort
SELECT DISTINCT - col2 * 56 FROM tab0 AS cor0
----
-1848
-4592
-56

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

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

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

query I rowsort
SELECT ALL col0 + + ( col2 ) - - col2 FROM tab2 AS cor0
----
130
155
61

onlyif mysql # use DIV operator for integer division
query I rowsort label-414
SELECT - tab0.col0 DIV col1 col2 FROM tab0
----
0
0
0

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

query I rowsort
SELECT ALL col2 + 91 FROM tab1
----
145
148
187

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

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

query I rowsort
SELECT DISTINCT col0 * + 14 AS col0 FROM tab1
----
1120
42
896

query I rowsort
SELECT ALL - 13 - 21 * - cor0.col2 FROM tab1 AS cor0
----
1121
1184
2003

query I rowsort
SELECT ALL - col0 * col1 + + col0 FROM tab2 AS cor0
----
-1264
-210
-4524

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

query I rowsort
SELECT DISTINCT + 16 - - col1 FROM tab2 AS cor0
----
33
47
75

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-424
SELECT 66 * col1 + - col0 DIV - col0 AS col0 FROM tab1 AS cor0
----
1717
661
859

skipif mysql # not compatible
query I rowsort label-424
SELECT 66 * col1 + - col0 / - col0 AS col0 FROM tab1 AS cor0
----
1717
661
859

query I rowsort
SELECT ALL col0 * col0 * - col1 AS col0 FROM tab1 AS cor0
----
-234
-40960
-83200

query I rowsort
SELECT + 45 * + 12 FROM tab2 AS cor0
----
540
540
540

query I rowsort
SELECT DISTINCT - col2 * + col2 + col1 * cor0.col1 FROM tab1 AS cor0
----
-2240
-3149
-9047

query I rowsort
SELECT DISTINCT - 97 * - col0 FROM tab1
----
291
6208
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-429
SELECT + CAST( col0 AS SIGNED ) DIV col2 AS col2 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-429
SELECT + CAST ( col0 AS INTEGER ) / col2 AS col2 FROM tab0 AS cor0
----
0
1
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-430
SELECT - cor0.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-430
SELECT - cor0.col1 / - ( + col0 ) col2 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT - + ( col2 ) * + col0 + 34 * col2 AS col2 FROM tab2 AS cor0
----
-1144
-1710
729

onlyif mysql # use DIV operator for integer division
query I rowsort label-432
SELECT + 74 DIV - 16 + col2 FROM tab1 AS cor0
----
50
53
92

skipif mysql # not compatible
query I rowsort label-432
SELECT + 74 / - 16 + col2 FROM tab1 AS cor0
----
50
53
92

query I rowsort
SELECT - 86 * + col0 AS col0 FROM tab1 AS cor0
----
-258
-5504
-6880

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

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

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

query I rowsort
SELECT DISTINCT - 80 * col1 + + col1 * - 61 AS col2 FROM tab1 AS cor0
----
-1410
-1833
-3666

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

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

query I rowsort
SELECT DISTINCT - - col1 + - col1 FROM tab2 cor0
----
0

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - ( cor0.col2 ) - 99 FROM tab0, tab0 cor0, tab2 AS cor1, tab1, tab1 AS cor2
----
-100
-132
-181

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

query I rowsort
SELECT + col0 * - 96 FROM tab0 AS cor0
----
-2304
-3360
-8544

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

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

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

query I rowsort
SELECT + col0 * col1 + 87 AS col1 FROM tab2 AS cor0
----
1430
304
4689

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

query I rowsort
SELECT + 38 * + col0 FROM tab0
----
1330
3382
912

query I rowsort
SELECT DISTINCT + col1 * col0 * col0 AS col2 FROM tab0
----
118825
49536
720811

query I rowsort
SELECT DISTINCT - 39 * col1 FROM tab2 cor0
----
-1209
-2301
-663

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

query I rowsort
SELECT ALL - - 5 * cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to a3cd0c0b28963a2380d707bcd6aedc1a

query I rowsort
SELECT 65 + col2 FROM tab0
----
147
66
98

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-459
SELECT - col0 - col1 DIV 41 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-459
SELECT - col0 - col1 / 41 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT + col2 * ( col1 * tab0.col0 + - 56 ) FROM tab0
----
3339
659526
66264

query I rowsort
SELECT ALL - col0 * - ( + 23 * cor0.col0 ) AS col0 FROM tab2 cor0
----
1127
139932
143543

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-463
SELECT CAST( - 81 + col2 AS SIGNED ) FROM tab0
----
-48
-80
1

skipif mysql # not compatible
query I rowsort label-463
SELECT CAST ( - 81 + col2 AS INTEGER ) FROM tab0
----
-48
-80
1

query I rowsort
SELECT ALL 36 FROM tab0, tab1 AS cor0, tab2 AS cor1, tab2 AS cor2
----
81 values hashing to e09b197365a04fabbaaf0718d2ae88c5

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-466
SELECT - ( - 57 ) * col2 DIV col1 FROM tab1
----
118
324
420

skipif mysql # not compatible
query I rowsort label-466
SELECT - ( - 57 ) * col2 / col1 FROM tab1
----
118
324
420

query I rowsort
SELECT DISTINCT tab2.col0 * + 10 FROM tab2
----
70
780
790

query I rowsort
SELECT DISTINCT - 63 * col0 * - col0 AS col2 FROM tab0
----
36288
499023
77175

query I rowsort
SELECT DISTINCT ( - 85 * col2 + 97 ) FROM tab0
----
-2708
-6873
12

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

query I rowsort
SELECT - 26 * + 48 FROM tab0 AS cor0
----
-1248
-1248
-1248

query I rowsort
SELECT + cor0.col0 * 25 AS col2 FROM tab2 AS cor0
----
175
1950
1975

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

query I rowsort
SELECT - + col2 * 12 FROM tab1 AS cor0
----
-1152
-648
-684

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

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

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

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

query I rowsort
SELECT ALL + 7 + + col2 AS col1 FROM tab2 cor0
----
33
34
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-479
SELECT ALL - - 3 + cor0.col1 DIV col2 AS col1 FROM tab0 cor0
----
100
4
5

skipif mysql # not compatible
query I rowsort label-479
SELECT ALL - - 3 + cor0.col1 / col2 AS col1 FROM tab0 cor0
----
100
4
5

query I rowsort
SELECT DISTINCT - 10 * col0 AS col2 FROM tab1 AS cor0
----
-30
-640
-800

onlyif mysql # use DIV operator for integer division
query I rowsort label-481
SELECT ALL + - cor0.col2 + + col2 DIV + cor0.col2 AS col2 FROM tab1 AS cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-481
SELECT ALL + - cor0.col2 + + col2 / + cor0.col2 AS col2 FROM tab1 AS cor0
----
-53
-56
-95

query I rowsort
SELECT - col0 + 96 FROM tab0 AS cor0
----
61
7
72

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

query I rowsort
SELECT - - col2 + - col2 * + 53 AS col2 FROM tab0 AS cor0
----
-1716
-4264
-52

query I rowsort
SELECT tab0.col0 * 29 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 6e07a482375ef46face061c7c2824f9b

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

query I rowsort
SELECT ALL + tab1.col1 * + ( 50 ) + col1 FROM tab1
----
1326
510
663

query I rowsort
SELECT ALL col1 + 51 AS col2 FROM tab1
----
61
64
77

query I rowsort
SELECT DISTINCT col0 + - ( 33 ) AS col1 FROM tab2
----
-26
45
46

query I rowsort
SELECT DISTINCT col2 * + 39 + 68 AS col1 FROM tab2
----
1082
1121
1550

query I rowsort
SELECT - 24 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 797d0f7c145f8ac623924448c714bbcc

query I rowsort
SELECT DISTINCT + col2 * + 21 FROM tab2 cor0
----
546
567
798

query I rowsort
SELECT + + cor0.col0 * 79 + - 84 AS col2 FROM tab0 cor0
----
1812
2681
6947

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

query I rowsort
SELECT ALL + cor0.col0 * - ( cor0.col1 ) - col1 AS col2 FROM tab2 cor0
----
-1360
-248
-4661

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

skipif mysql # not compatible
query I rowsort label-496
SELECT ALL - col0 + + CAST ( - col0 AS INTEGER ) FROM tab1 cor0
----
-128
-160
-6

query I rowsort
SELECT - + col2 * + col0 + 2 AS col0 FROM tab1 AS cor0
----
-160
-3646
-7678

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

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

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

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

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

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

query I rowsort
SELECT - + col2 * 8 AS col0 FROM tab1 AS cor0
----
-432
-456
-768

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

query I rowsort
SELECT DISTINCT - - 71 * - 7 FROM tab0 cor0
----
-497

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

query I rowsort
SELECT col1 + + 29 * - tab2.col0 AS col2 FROM tab2
----
-172
-2203
-2274

query I rowsort
SELECT ALL col1 * - 32 FROM tab0
----
-2752
-2912
-3104

query I rowsort
SELECT DISTINCT + 57 * cor0.col1 FROM tab1, tab1 AS cor0
----
1482
570
741

query I rowsort
SELECT + 91 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

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

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

query I rowsort
SELECT 51 FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to d8bf0a05c9c4d2a93812d106baae4752

query I rowsort
SELECT DISTINCT + 80 * + cor0.col0 AS col0 FROM tab1 cor0
----
240
5120
6400

query I rowsort
SELECT + 55 * col0 AS col2 FROM tab2 AS cor0
----
385
4290
4345

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

query I rowsort
SELECT - col0 + - col1 * + ( - cor0.col0 * col0 + col2 ) FROM tab2 AS cor0
----
105372
357344
675

onlyif mysql # use DIV operator for integer division
query I rowsort label-516
SELECT - - col0 + cor0.col0 DIV - 48 AS col0 FROM tab2 cor0
----
7
77
78

skipif mysql # not compatible
query I rowsort label-516
SELECT - - col0 + cor0.col0 / - 48 AS col0 FROM tab2 cor0
----
7
77
78

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

query I rowsort
SELECT DISTINCT + ( - cor0.col0 ) * 30 FROM tab0 AS cor0
----
-1050
-2670
-720

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

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

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

skipif mysql # not compatible
query I rowsort label-520
SELECT - + col2 / 94 + col1 / cor0.col0 FROM tab1 AS cor0
----
-1
0
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-521
SELECT 17 DIV + cor0.col1 AS col1 FROM tab1, tab0 cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-521
SELECT 17 / + cor0.col1 AS col1 FROM tab1, tab0 cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

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

query I rowsort
SELECT - + col0 * cor0.col1 + - 68 + col0 FROM tab2 AS cor0
----
-1332
-278
-4592

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

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

query I rowsort
SELECT DISTINCT - 9 * - col1 + ( - col0 + col1 ) * + 60 AS col0 FROM tab1
----
-3150
-3903
1614

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

skipif mysql # not compatible
query I rowsort label-526
SELECT - + col1 + + CAST ( + col1 AS INTEGER ) * - col2 * col2 FROM tab0 AS cor0
----
-194
-611975
-93740

query I rowsort
SELECT DISTINCT 60 * - col1 AS col2 FROM tab2 AS cor0
----
-1020
-1860
-3540

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 * - 15 col0 FROM tab2 AS cor0
----
105
1170
1185

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

query I rowsort
SELECT - 48 * + 40 * - col2 FROM tab0 cor0
----
157440
1920
63360

query I rowsort
SELECT ALL ( 42 ) * - col1 FROM tab2 AS cor0
----
-1302
-2478
-714

query I rowsort
SELECT DISTINCT 6 * col0 FROM tab2 AS cor0
----
42
468
474

query I rowsort
SELECT + 52 + + col0 FROM tab0 AS cor0
----
141
76
87

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

query I rowsort
SELECT DISTINCT - col0 * ( + col0 ) + 59 - - 93 * col1 AS col2 FROM tab0
----
601
7481
7855

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

query I rowsort
SELECT DISTINCT col1 - col2 * tab0.col1 * col1 FROM tab0
----
-243982
-678951
-9312

query I rowsort
SELECT DISTINCT 63 * + col0 * - col0 FROM tab2 AS cor0
----
-3087
-383292
-393183

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

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

query I rowsort
SELECT DISTINCT + 3 * + col0 + + col0 AS col2 FROM tab0 AS cor0
----
140
356
96

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

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

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

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

query I rowsort
SELECT - col2 * col0 + cor0.col2 * + 86 FROM tab1 AS cor0
----
1254
4482
576

query I rowsort
SELECT 50 * col1 AS col0 FROM tab1
----
1300
500
650

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-551
SELECT 11 DIV tab1.col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-551
SELECT 11 / tab1.col2 FROM tab1
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-552
SELECT DISTINCT - CAST( - 59 AS SIGNED ) AS col0 FROM tab1
----
59

skipif mysql # not compatible
query I rowsort label-552
SELECT DISTINCT - CAST ( - 59 AS INTEGER ) AS col0 FROM tab1
----
59

query I rowsort
SELECT ALL col1 * col2 + tab2.col1 * col1 FROM tab2
----
1798
5015
935

query I rowsort
SELECT DISTINCT - 91 AS col0 FROM tab1
----
-91

query I rowsort
SELECT ALL + 17 + + col2 FROM tab1
----
113
71
74

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

query I rowsort
SELECT 59 * - col2 AS col2 FROM tab1
----
-3186
-3363
-5664

query I rowsort
SELECT + col0 + - ( col2 ) * + tab0.col2 FROM tab0
----
-1065
-6635
34

query I rowsort
SELECT + ( 12 ) * - tab1.col2 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to f18a9594e601a52547c7ee3ea06f7ef6

query I rowsort
SELECT + 94 FROM tab0, tab2 AS cor0
----
9 values hashing to b0ffb7527f4fbf44f30945e1ccb58c24

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

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

query I rowsort
SELECT + 12 FROM tab1, tab1 AS cor0, tab1 cor1
----
27 values hashing to 702478c53caf2f7ebb9fff96d800f5a6

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

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

query I rowsort
SELECT - col1 * 76 AS col1 FROM tab2
----
-1292
-2356
-4484

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT + CAST ( + ( col2 ) AS REAL ) col2 FROM tab2 AS cor0
----
26
27
38

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-573
SELECT DISTINCT - col1 DIV - 42 FROM tab2
----
0
1

skipif mysql # not compatible
query I rowsort label-573
SELECT DISTINCT - col1 / - 42 FROM tab2
----
0
1

query I rowsort
SELECT DISTINCT + col1 * 26 FROM tab1
----
260
338
676

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + - 63 * - col0 * 54 + + 48 col1 FROM tab2 AS cor0
----
23835
265378
268768

query I rowsort
SELECT - + 62 + cor0.col2 * + col2 FROM tab1 AS cor0
----
2854
3187
9154

query I rowsort
SELECT ALL + 14 * col1 FROM tab0 AS cor0
----
1204
1274
1358

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-582
SELECT + - ( col1 ) * col1 DIV + col0 AS col1 FROM tab0 AS cor0
----
-268
-308
-93

skipif mysql # not compatible
query I rowsort label-582
SELECT + - ( col1 ) * col1 / + col0 AS col1 FROM tab0 AS cor0
----
-268
-308
-93

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

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

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

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

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

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

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

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

query I rowsort
SELECT + 45 * col2 AS col1 FROM tab2 AS cor0
----
1170
1215
1710

query I rowsort
SELECT - 13 + + col1 FROM tab2 AS cor0
----
18
4
46

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

query I rowsort
SELECT - 1 + cor0.col0 * cor0.col0 FROM tab1 AS cor0
----
4095
6399
8

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

query I rowsort
SELECT ( 35 ) AS col0 FROM tab1
----
35
35
35

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-595
SELECT - col2 + col2 DIV - col2 FROM tab0 AS cor0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-595
SELECT - col2 + col2 / - col2 FROM tab0 AS cor0
----
-2
-34
-83

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

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

query I rowsort
SELECT ALL - 31 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to f4b05206ee2fc0cf8007d9c3514885fa

query I rowsort
SELECT 83 - + tab1.col0 * - col1 FROM tab1
----
1123
161
723

query I rowsort
SELECT DISTINCT 68 + col0 FROM tab2
----
146
147
75

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-601
SELECT CAST( cor0.col2 AS SIGNED ) AS col0 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

skipif mysql # not compatible
query I rowsort label-601
SELECT CAST ( cor0.col2 AS INTEGER ) AS col0 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT - 8 AS col1 FROM tab1
----
-8
-8
-8

query I rowsort
SELECT col0 * - col1 * col0 AS col1 FROM tab1 AS cor0
----
-234
-40960
-83200

query I rowsort
SELECT ALL - + col1 + 22 * - col1 AS col1 FROM tab0 AS cor0
----
-1978
-2093
-2231

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

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

query I rowsort
SELECT - col1 + - 27 FROM tab0 AS cor0
----
-113
-118
-124

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

query I rowsort
SELECT ALL + col0 * + ( + 70 ) FROM tab1 cor0
----
210
4480
5600

query I rowsort
SELECT DISTINCT + col1 * 53 - col2 AS col2 FROM tab1 AS cor0
----
1324
473
593

query I rowsort
SELECT + col1 * + col2 + 55 * + col2 FROM tab0 AS cor0
----
11972
152
4653

query I rowsort
SELECT ALL - cor0.col1 * - 22 + col0 AS col1 FROM tab1 cor0
----
284
366
575

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

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

query I rowsort
SELECT DISTINCT - col2 + - col2 + - col2 AS col2 FROM tab0 AS cor0
----
-246
-3
-99

query I rowsort
SELECT + col1 * ( - 82 ) FROM tab1 AS cor0
----
-1066
-2132
-820

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + 44 col2 FROM tab0 AS cor0
----
-1056
-1540
-3916

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

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

query I rowsort
SELECT - cor0.col0 * + 61 AS col0 FROM tab0, tab1, tab1 cor0, tab2
----
81 values hashing to 78c2a4ef37f97acd3f40bd9b54fc1832

query I rowsort
SELECT ALL col1 * col1 + - 65 * - 68 FROM tab0
----
11816
12701
13829

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

query I rowsort
SELECT ALL - col2 + + cor0.col2 * 7 * col2 AS col2 FROM tab0 AS cor0
----
46986
6
7590

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

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

query I rowsort
SELECT cor0.col1 * + 48 AS col1 FROM tab0 AS cor0
----
4128
4368
4656

query I rowsort
SELECT DISTINCT - col1 + - 27 AS col1 FROM tab1 AS cor0
----
-37
-40
-53

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

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

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

query I rowsort
SELECT ALL - 52 - - col2 FROM tab1
----
2
44
5

query I rowsort
SELECT - ( + col2 ) + + ( 17 ) AS col1 FROM tab1 AS cor0
----
-37
-40
-79

query I rowsort
SELECT col1 - - 63 AS col2 FROM tab1 AS cor0
----
73
76
89

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

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

query I rowsort
SELECT col2 * 33 + - col2 - col2 AS col2 FROM tab1 AS cor0
----
1674
1767
2976

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

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

query I rowsort
SELECT DISTINCT - tab2.col0 FROM tab2, tab1, tab2 cor0, tab1 AS cor1
----
-7
-78
-79

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-637
SELECT ALL + col1 / + col0 - + col0 col1 FROM tab2 AS cor0
----
-3
-78
-79

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

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

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

skipif mysql # not compatible
query I rowsort label-640
SELECT - col2 + col1 * + CAST ( - col0 AS INTEGER ) FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT DISTINCT - - col0 - col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - col0 * cor0.col2 + 60 FROM tab2 AS cor0
----
-129
-1968
-2942

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

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

query I rowsort
SELECT ALL - - col0 - col2 * - 6 AS col1 FROM tab0 AS cor0
----
222
41
581

query I rowsort
SELECT ALL - cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query I rowsort
SELECT ALL col2 + - col1 * col1 - - col0 AS col2 FROM tab0
----
-7339
-8110
-9373

query I rowsort
SELECT 46 FROM tab2, tab1 cor0
----
9 values hashing to 31818c9d4d325eb248735c97cb1dce39

query I rowsort
SELECT DISTINCT + col0 * - 50 FROM tab2 cor0
----
-350
-3900
-3950

query I rowsort
SELECT ALL - col0 * 6 AS col0 FROM tab2 AS cor0
----
-42
-468
-474

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

query I rowsort
SELECT + 64 * col0 AS col1 FROM tab0
----
1536
2240
5696

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

query I rowsort
SELECT DISTINCT 41 + ( cor0.col1 ) FROM tab0 AS cor0
----
127
132
138

query I rowsort
SELECT DISTINCT - col2 + 15 * col0 FROM tab2 AS cor0
----
1144
1147
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + 57 ) * col1 + + cor0.col0 col1 FROM tab0 AS cor0
----
4926
5276
5564

query I rowsort
SELECT + 26 + + col2 * + col0 FROM tab0 AS cor0
----
61
7324
818

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

skipif mysql # not compatible
query I rowsort label-658
SELECT CAST ( NULL AS REAL ) + col2 / - col1 AS col0 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-659
SELECT DISTINCT - ( col1 ) + col2 * col1 DIV - col1 FROM tab0
----
-119
-173
-98

skipif mysql # not compatible
query I rowsort label-659
SELECT DISTINCT - ( col1 ) + col2 * col1 / - col1 FROM tab0
----
-119
-173
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + ( - col1 ) col2 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT DISTINCT - col0 * + col0 * col0 AS col1 FROM tab0
----
-13824
-42875
-704969

query I rowsort
SELECT col1 + 35 + col2 AS col2 FROM tab2
----
120
90
93

query I rowsort
SELECT 43 FROM tab2, tab2 cor0
----
9 values hashing to 199105619049271147956de52e7f5ed4

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-666
SELECT + CAST( ( - cor0.col2 - + col2 ) AS SIGNED ) + cor0.col2 - + col2 AS col0 FROM tab2 AS cor0
----
-52
-54
-76

skipif mysql # not compatible
query I rowsort label-666
SELECT + CAST ( ( - cor0.col2 - + col2 ) AS INTEGER ) + cor0.col2 - + col2 AS col0 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT + - col0 + - col2 * - col2 * - col2 FROM tab0 AS cor0
----
-35961
-36
-551457

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

query I rowsort
SELECT + 56 * + col0 + + col2 AS col0 FROM tab0 cor0
----
1377
1961
5066

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

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

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

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

query I rowsort
SELECT ALL - cor0.col2 + + 87 + - col2 * - col1 * + col0 AS col0 FROM tab0 AS cor0
----
3481
664123
68166

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

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

query I rowsort
SELECT ALL - 69 * + col0 FROM tab0
----
-1656
-2415
-6141

query I rowsort
SELECT - col2 * col2 + + col2 * - col0 AS col0 FROM tab1
----
-16896
-3078
-6897

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 38 + + col1 col2 FROM tab1 cor0
----
48
51
64

query I rowsort
SELECT + col1 + col2 * ( - col2 ) + + col2 FROM tab1 AS cor0
----
-2836
-3182
-9107

onlyif mysql # use DIV operator for integer division
query I rowsort label-682
SELECT + col0 * CAST( - col1 AS SIGNED ) DIV + cor0.col1 FROM tab0 AS cor0
----
-24
-35
-89

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

query I rowsort
SELECT + col2 + 80 FROM tab0 AS cor0
----
113
162
81

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-685
SELECT DISTINCT + + col0 DIV 34 FROM tab2 cor0
----
0
2

skipif mysql # not compatible
query I rowsort label-685
SELECT DISTINCT + + col0 / 34 FROM tab2 cor0
----
0
2

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

query I rowsort
SELECT - + col1 * 43 FROM tab2 AS cor0
----
-1333
-2537
-731

onlyif mysql # use DIV operator for integer division
query I rowsort label-688
SELECT - col0 * 94 DIV 58 FROM tab0 AS cor0
----
-144
-38
-56

skipif mysql # not compatible
query I rowsort label-688
SELECT - col0 * 94 / 58 FROM tab0 AS cor0
----
-144
-38
-56

query I rowsort
SELECT DISTINCT col1 + + 8 * col2 AS col0 FROM tab2 AS cor0
----
247
267
321

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

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

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

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

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

query I rowsort
SELECT DISTINCT col0 * col0 * cor0.col0 FROM tab2 cor0
----
343
474552
493039

query I rowsort
SELECT col1 * - 87 AS col0 FROM tab2 AS cor0
----
-1479
-2697
-5133

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

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

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

query I rowsort
SELECT - - col2 * col2 * col2 FROM tab2 AS cor0
----
17576
19683
54872

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

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

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

skipif mysql # not compatible
query I rowsort label-700
SELECT ALL col0 * col2 / - col2 FROM tab1
----
-3
-64
-80

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-702
SELECT + 30 * col0 * col1 + col1 DIV - col0 FROM tab0 AS cor0
----
101848
242969
61917

skipif mysql # not compatible
query I rowsort label-702
SELECT + 30 * col0 * col1 + col1 / - col0 FROM tab0 AS cor0
----
101848
242969
61917

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

skipif mysql # not compatible
query I rowsort label-703
SELECT - 29 / col2 + col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT col0 * col0 + - col2 * col1 * col2 FROM tab0 AS cor0
----
-603963
-93078
1128

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

query I rowsort
SELECT - 81 + col1 FROM tab0 AS cor0
----
10
16
5

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

query I rowsort
SELECT - + col0 * + col0 * + col0 FROM tab0 cor0
----
-13824
-42875
-704969

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

query I rowsort
SELECT - 85 * + cor0.col1 FROM tab2, tab0 AS cor0
----
9 values hashing to a5d165427fd1677b00b3e99e1f5ba5db

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 6 + col2 col2 FROM tab1
----
102
60
63

query I rowsort
SELECT DISTINCT col0 * - col2 * col2 AS col0 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT ALL - 28 * + col2 + col0 FROM tab2 AS cor0
----
-650
-749
-985

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

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

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

query I rowsort
SELECT - - col1 * col1 + + col2 * col0 AS col1 FROM tab1 AS cor0
----
3748
7849
838

query I rowsort
SELECT col2 * - col2 * col1 + + col2 * - col1 AS col0 FROM tab2 AS cor0
----
-23436
-25194
-41418

onlyif mysql # use DIV operator for integer division
query I rowsort label-719
SELECT ALL - 62 DIV + col2 AS col0 FROM tab1
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-719
SELECT ALL - 62 / + col2 AS col0 FROM tab1
----
-1
-1
0

query I rowsort
SELECT - 81 - - ( + tab1.col0 ) AS col2 FROM tab1
----
-1
-17
-78

query I rowsort
SELECT 80 - - col1 FROM tab2
----
111
139
97

query I rowsort
SELECT + col1 + + col2 * + col1 + col0 * col1 FROM tab1 AS cor0
----
1220
1508
2301

query I rowsort
SELECT col1 * col1 * ( + 93 ) FROM tab2 AS cor0
----
26877
323733
89373

query I rowsort
SELECT - + 24 AS col1 FROM tab0 cor0
----
-24
-24
-24

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * col2 + + col0 col1 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT ALL + 10 * col2 FROM tab0 AS cor0
----
10
330
820

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

query I rowsort
SELECT DISTINCT - - 92 FROM tab1 cor0
----
92

query I rowsort
SELECT + col0 + - col1 * + cor0.col0 AS col1 FROM tab2 AS cor0
----
-1264
-210
-4524

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

query I rowsort
SELECT - - 4 AS col1 FROM tab2 AS cor0
----
4
4
4

query I rowsort
SELECT - + 77 * col1 * + 3 FROM tab2 AS cor0
----
-13629
-3927
-7161

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-734
SELECT col1 + - CAST( + 70 AS SIGNED ) * col1 FROM tab2 AS cor0
----
-1173
-2139
-4071

skipif mysql # not compatible
query I rowsort label-734
SELECT col1 + - CAST ( + 70 AS INTEGER ) * col1 FROM tab2 AS cor0
----
-1173
-2139
-4071

query I rowsort
SELECT + cor0.col2 * col1 * 88 - - cor0.col1 * - col2 * 98 FROM tab1 AS cor0
----
-12480
-14040
-5700

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - col0 col1 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT - - col2 + - 63 FROM tab1 AS cor0
----
-6
-9
33

query I rowsort
SELECT + col2 * - 63 - + cor0.col0 AS col0 FROM tab2 AS cor0
----
-1708
-1716
-2473

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + 6 col2 FROM tab1 AS cor0
----
18
384
480

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

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

query I rowsort
SELECT DISTINCT 39 + cor0.col0 * 87 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
648
6825
6912

query I rowsort
SELECT ALL + + col1 * col0 + + col2 * - ( + col2 ) - col1 FROM tab1 cor0
----
-2619
-2864
-8189

query I rowsort
SELECT ALL ( - 9 ) + col0 FROM tab1 AS cor0
----
-6
55
71

query I rowsort
SELECT ALL 37 * - ( + col1 ) + 80 FROM tab1 AS cor0
----
-290
-401
-882

onlyif mysql # use DIV operator for integer division
query I rowsort label-746
SELECT cor0.col0 + col2 + - col0 DIV 35 AS col0 FROM tab0 AS cor0
----
169
35
57

skipif mysql # not compatible
query I rowsort label-746
SELECT cor0.col0 + col2 + - col0 / 35 AS col0 FROM tab0 AS cor0
----
169
35
57

query I rowsort
SELECT DISTINCT + 0 * col1 * + col0 AS col2 FROM tab2 AS cor0
----
0

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

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

query I rowsort
SELECT + col1 + 52 * + col2 FROM tab2
----
1411
1435
1993

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

query I rowsort
SELECT DISTINCT - 79 + 35 FROM tab0 AS cor0
----
-44

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

query I rowsort
SELECT - - col2 + - ( col1 * cor0.col0 + col1 * col0 ) FROM tab0 AS cor0
----
-16116
-4095
-6789

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

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

query I rowsort
SELECT + 70 - + col1 * + col2 FROM tab2 AS cor0
----
-1464
-576
-767

skipif mysql # not compatible
query I rowsort
SELECT ALL ( - 14 ) * col2 * CAST ( - 98 AS REAL ) AS col0 FROM tab1 cor0
----
131712
74088
78204

query I rowsort
SELECT DISTINCT + ( 33 ) + - col1 * ( - col2 ) FROM tab2
----
1567
679
870

onlyif mysql # use DIV operator for integer division
query I rowsort label-759
SELECT ALL - ( - col1 ) DIV 75 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-759
SELECT ALL - ( - col1 ) / 75 FROM tab1 AS cor0
----
0
0
0

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-761
SELECT CAST ( NULL AS INTEGER ) + 7 col2 FROM tab2
----
NULL
NULL
NULL

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

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

query I rowsort
SELECT DISTINCT 65 AS col2 FROM tab2
----
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col0 * col1 * + 21 + + col1 col1 FROM tab0 AS cor0
----
-169988
-43258
-71198

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-766
SELECT DISTINCT - col0 / - ( - col1 + col2 ) col0 FROM tab2 AS cor0
----
-1
-2
3

query I rowsort
SELECT col0 * 8 FROM tab0 AS cor0
----
192
280
712

query I rowsort
SELECT col2 + - ( - 40 ) FROM tab0
----
122
41
73

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

query I rowsort
SELECT ALL 66 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 897b6122ac98340b78905f39d81897fc

onlyif mysql # use DIV operator for integer division
query I rowsort label-771
SELECT col0 + + col2 DIV col1 + col1 * tab1.col0 FROM tab1
----
1127
709
83

skipif mysql # not compatible
query I rowsort label-771
SELECT col0 + + col2 / col1 + col1 * tab1.col0 FROM tab1
----
1127
709
83

query I rowsort
SELECT DISTINCT col1 * col2 - + 13 * col0 FROM tab1
----
-262
1365
208

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

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

query I rowsort
SELECT + - cor0.col2 + + col0 * - ( - col1 + - col1 ) FROM tab0 AS cor0
----
16116
4095
6789

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

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

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

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

query I rowsort
SELECT DISTINCT + col1 + - 5 * 44 AS col0 FROM tab2 AS cor0
----
-161
-189
-203

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

query I rowsort
SELECT DISTINCT col2 + + 60 * - col1 AS col2 FROM tab1 AS cor0
----
-1506
-543
-684

onlyif mysql # use DIV operator for integer division
query I rowsort label-782
SELECT DISTINCT + + col1 DIV + cor0.col0 + 14 AS col1 FROM tab2 AS cor0
----
14
18

skipif mysql # not compatible
query I rowsort label-782
SELECT DISTINCT + + col1 / + cor0.col0 + 14 AS col1 FROM tab2 AS cor0
----
14
18

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-784
SELECT DISTINCT col2 + + 86 * + col0 DIV - col0 AS col1 FROM tab1 AS cor0
----
-29
-32
10

skipif mysql # not compatible
query I rowsort label-784
SELECT DISTINCT col2 + + 86 * + col0 / - col0 AS col1 FROM tab1 AS cor0
----
-29
-32
10

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-787
SELECT col2 + col0 DIV 49 AS col2 FROM tab2 AS cor0
----
27
27
39

skipif mysql # not compatible
query I rowsort label-787
SELECT col2 + col0 / 49 AS col2 FROM tab2 AS cor0
----
27
27
39

query I rowsort
SELECT 30 + col0 * col0 FROM tab1
----
39
4126
6430

query I rowsort
SELECT ALL - 25 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 40ac8fd000b2e49317aed2411077839e

query I rowsort
SELECT ALL 93 FROM tab0, tab2 AS cor0
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

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

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

query I rowsort
SELECT DISTINCT 25 + + tab2.col1 FROM tab2
----
42
56
84

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

query I rowsort
SELECT col2 + ( - col0 ) * 63 + 20 * - col0 * - col0 FROM tab2
----
116792
119881
566

query I rowsort
SELECT - - cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT DISTINCT + ( col2 * + col0 ) + col0 AS col1 FROM tab0
----
70
7387
816

query I rowsort
SELECT + 61 + col2 FROM tab1
----
115
118
157

onlyif mysql # use DIV operator for integer division
query I rowsort label-798
SELECT + col0 + + col0 DIV ( 12 + tab2.col1 ) FROM tab2
----
7
79
81

skipif mysql # not compatible
query I rowsort label-798
SELECT + col0 + + col0 / ( 12 + tab2.col1 ) FROM tab2
----
7
79
81

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

query I rowsort
SELECT DISTINCT 25 * col1 AS col0 FROM tab0 AS cor0
----
2150
2275
2425

query I rowsort
SELECT ALL + col1 * - col0 + 3 FROM tab2 AS cor0
----
-1340
-214
-4599

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

query I rowsort
SELECT DISTINCT - 17 - col2 AS col1 FROM tab1 AS cor0
----
-113
-71
-74

query I rowsort
SELECT 69 * + col1 + col1 AS col2 FROM tab1 AS cor0
----
1820
700
910

onlyif mysql # use DIV operator for integer division
query I rowsort label-805
SELECT + 12 * col0 + col1 DIV - col2 AS col1 FROM tab0 AS cor0
----
1067
286
323

skipif mysql # not compatible
query I rowsort label-805
SELECT + 12 * col0 + col1 / - col2 AS col1 FROM tab0 AS cor0
----
1067
286
323

query I rowsort
SELECT DISTINCT col0 * - cor0.col0 + - ( col0 ) * - cor0.col0 AS col1 FROM tab1 AS cor0
----
0

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

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

query I rowsort
SELECT ( col1 ) * + col2 + col2 * + col2 AS col2 FROM tab0
----
14186
3927
98

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-810
SELECT - + col2 * - 18 + col2 DIV col2 + - CAST( + 81 AS SIGNED ) * - col0 FROM tab0 AS cor0
----
2539
2854
8686

skipif mysql # not compatible
query I rowsort label-810
SELECT - + col2 * - 18 + col2 / col2 + - CAST ( + 81 AS INTEGER ) * - col0 FROM tab0 AS cor0
----
2539
2854
8686

query I rowsort
SELECT DISTINCT + 74 * - cor0.col1 AS col2 FROM tab2, tab1 cor0
----
-1924
-740
-962

query I rowsort
SELECT tab0.col1 + - 64 AS col2 FROM tab0
----
22
27
33

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

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

query I rowsort
SELECT col2 * col2 + + col0 FROM tab0 AS cor0
----
1113
36
6813

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

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

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

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

query I rowsort
SELECT DISTINCT - 92 + col2 AS col2 FROM tab1 AS cor0
----
-35
-38
4

query I rowsort
SELECT DISTINCT tab1.col2 * 86 FROM tab1
----
4644
4902
8256

onlyif mysql # use DIV operator for integer division
query I rowsort label-820
SELECT DISTINCT + 75 DIV 22 FROM tab2
----
3

skipif mysql # not compatible
query I rowsort label-820
SELECT DISTINCT + 75 / 22 FROM tab2
----
3

query I rowsort
SELECT + 81 * tab0.col2 AS col0 FROM tab0
----
2673
6642
81

query I rowsort
SELECT + 88 * ( - col2 ) AS col2 FROM tab2
----
-2288
-2376
-3344

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

skipif mysql # not compatible
query I rowsort label-823
SELECT - 53 + col1 / col1 FROM tab2 AS cor0
----
-52
-52
-52

query I rowsort
SELECT + col0 + col2 * - col2 AS col2 FROM tab1 cor0
----
-2913
-3185
-9136

query I rowsort
SELECT + + col2 * col1 * col2 + col2 AS col1 FROM tab2 AS cor0
----
22626
24586
39910

query I rowsort
SELECT 41 + - col2 FROM tab0 AS cor0
----
-41
40
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-827
SELECT + - 56 DIV - col0 FROM tab1 cor0
----
0
0
18

skipif mysql # not compatible
query I rowsort label-827
SELECT + - 56 / - col0 FROM tab1 cor0
----
0
0
18

query I rowsort
SELECT + + cor0.col2 * col0 + - 39 FROM tab0 AS cor0
----
-4
7259
753

query I rowsort
SELECT col0 * cor0.col1 * - col0 FROM tab0 AS cor0
----
-118825
-49536
-720811

query I rowsort
SELECT + col0 * col0 * 77 AS col2 FROM tab2 AS cor0
----
3773
468468
480557

query I rowsort
SELECT - - ( col0 ) + - 58 AS col2 FROM tab0 AS cor0
----
-23
-34
31

query I rowsort
SELECT DISTINCT col0 + - ( - col1 ) * col2 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT cor0.col0 + 7 * col2 FROM tab2 AS cor0
----
196
260
345

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-835
SELECT DISTINCT + col0 + - col1 DIV + cor0.col0 - - 19 * + 67 AS col1 FROM tab2 cor0
----
1276
1351
1352

skipif mysql # not compatible
query I rowsort label-835
SELECT DISTINCT + col0 + - col1 / + cor0.col0 - - 19 * + 67 AS col1 FROM tab2 cor0
----
1276
1351
1352

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

query I rowsort
SELECT ALL - 90 * cor0.col1 + + col1 * + col2 FROM tab2 AS cor0
----
-1953
-3776
-884

query I rowsort
SELECT ALL col2 * 8 + - col2 * - 93 * col0 FROM tab1
----
15498
339720
715008

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

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

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

query I rowsort
SELECT + - ( 62 ) + col1 AS col2 FROM tab2 AS cor0
----
-3
-31
-45

query I rowsort
SELECT - col2 * + 73 + col2 FROM tab2 AS cor0
----
-1872
-1944
-2736

query I rowsort
SELECT ALL - col1 * + col1 * col1 AS col2 FROM tab1
----
-1000
-17576
-2197

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

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

skipif mysql # not compatible
query I rowsort label-846
SELECT col1 * + CAST ( + cor0.col1 AS INTEGER ) * col0 - cor0.col0 FROM tab2 AS cor0
----
22752
271440
6720

query I rowsort
SELECT DISTINCT + col0 + + 93 AS col2 FROM tab1 AS cor0
----
157
173
96

query I rowsort
SELECT ALL col2 - 6 * - 72 FROM tab1 AS cor0
----
486
489
528

query I rowsort
SELECT + tab1.col0 * + tab1.col0 * - 45 + - col2 FROM tab1
----
-184377
-288096
-459

query I rowsort
SELECT - tab1.col1 * 18 * - col2 AS col2 FROM tab1
----
10260
22464
25272

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-851
SELECT + col1 / + col0 + - col0 col1 FROM tab2 AS cor0
----
-3
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 58 col1 FROM tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1
----
-58

onlyif mysql # use DIV operator for integer division
query I rowsort label-853
SELECT col2 DIV cor0.col1 - - 42 AS col1 FROM tab2 cor0
----
42
42
44

skipif mysql # not compatible
query I rowsort label-853
SELECT col2 / cor0.col1 - - 42 AS col1 FROM tab2 cor0
----
42
42
44

query I rowsort
SELECT DISTINCT col1 * - ( + col0 ) * col0 + - 59 FROM tab1 AS cor0
----
-293
-41019
-83259

query I rowsort
SELECT DISTINCT - - col2 - 68 FROM tab1 AS cor0
----
-11
-14
28

query I rowsort
SELECT ALL - col1 * - 18 + - 60 FROM tab2 AS cor0
----
1002
246
498

query I rowsort
SELECT - + col0 * col1 + - 64 AS col2 FROM tab0 AS cor0
----
-2128
-3459
-8163

query I rowsort
SELECT - col1 + 98 AS col2 FROM tab2 AS cor0
----
39
67
81

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

query I rowsort
SELECT ALL - col1 + - col2 + ( col0 ) AS col2 FROM tab0
----
-63
-84
-95

query I rowsort
SELECT DISTINCT - col2 * + tab0.col0 * 97 + col1 FROM tab0
----
-3298
-707815
-76738

query I rowsort
SELECT DISTINCT - col2 - col2 * - ( + col2 + 30 ) FROM tab0
----
2046
30
9102

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col0 * + col0 + - col2 col2 FROM tab1
----
-4153
-63
-6496

query I rowsort
SELECT - col0 + + 11 * col0 + col2 * + col0 FROM tab1
----
192
4288
8480

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

query I rowsort
SELECT ALL - + col1 * 71 * col2 AS col0 FROM tab0 AS cor0
----
-201498
-529802
-6887

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

query I rowsort
SELECT cor0.col1 AS col1 FROM tab2, tab0 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to 8c9db501a604ea66e3b5e5598f3f2a91

query I rowsort
SELECT 16 * 72 FROM tab2, tab1 AS cor0
----
9 values hashing to c0fbd589ffb6a23b3d06a4e6e8db2139

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-875
SELECT DISTINCT + 21 DIV cor0.col0 FROM tab2 AS cor0
----
0
3

skipif mysql # not compatible
query I rowsort label-875
SELECT DISTINCT + 21 / cor0.col0 FROM tab2 AS cor0
----
0
3

query I rowsort
SELECT ALL cor0.col1 - - ( cor0.col2 + col1 ) FROM tab1 cor0
----
106
122
77

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-878
SELECT - - col0 + + col1 DIV - col2 FROM tab0 AS cor0
----
-62
22
88

skipif mysql # not compatible
query I rowsort label-878
SELECT - - col0 + + col1 / - col2 FROM tab0 AS cor0
----
-62
22
88

query I rowsort
SELECT - 39 * + col1 + - col2 FROM tab1 AS cor0
----
-1068
-447
-603

onlyif mysql # use DIV operator for integer division
query I rowsort label-880
SELECT ALL - col2 * col2 DIV - col1 FROM tab0 cor0
----
0
12
73

skipif mysql # not compatible
query I rowsort label-880
SELECT ALL - col2 * col2 / - col1 FROM tab0 cor0
----
0
12
73

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

query I rowsort
SELECT DISTINCT + col0 * - 96 FROM tab1 AS cor0
----
-288
-6144
-7680

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

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

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

query I rowsort
SELECT + col2 + + 58 FROM tab1
----
112
115
154

query I rowsort
SELECT DISTINCT - col1 + col1 - 52 * col2 FROM tab2
----
-1352
-1404
-1976

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

skipif mysql # not compatible
query I rowsort label-887
SELECT - tab2.col1 / + col1 FROM tab2
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - 74 + + 98 AS col0 FROM tab2 AS cor0
----
24

query I rowsort
SELECT DISTINCT - 42 * - col1 * + col0 + + 87 FROM tab0 AS cor0
----
142677
340245
86775

query I rowsort
SELECT ALL - cor0.col1 - + 16 AS col2 FROM tab1 AS cor0
----
-26
-29
-42

onlyif mysql # use DIV operator for integer division
query I rowsort label-891
SELECT - 21 DIV + col2 + + col2 * 35 FROM tab0 AS cor0
----
1155
14
2870

skipif mysql # not compatible
query I rowsort label-891
SELECT - 21 / + col2 + + col2 * 35 FROM tab0 AS cor0
----
1155
14
2870

query I rowsort
SELECT DISTINCT - - ( + 84 ) + - col0 FROM tab2 AS cor0
----
5
6
77

query I rowsort
SELECT DISTINCT + 77 * - col0 AS col1 FROM tab0 AS cor0
----
-1848
-2695
-6853

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * - col1 * ( cor0.col2 ) col0 FROM tab2 AS cor0
----
-10982
-25947
-90506

query I rowsort
SELECT + 52 * - col2 AS col0 FROM tab2 cor0
----
-1352
-1404
-1976

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

query I rowsort
SELECT - 77 * col2 + + cor0.col2 FROM tab0 AS cor0
----
-2508
-6232
-76

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

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

query I rowsort
SELECT DISTINCT + col2 * + col1 * - ( + col1 ) FROM tab2 AS cor0
----
-10982
-25947
-90506

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

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

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

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

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

query I rowsort
SELECT - 33 * - cor0.col2 AS col2 FROM tab0 AS cor0
----
1089
2706
33

onlyif mysql # use DIV operator for integer division
query I rowsort label-905
SELECT col0 + + col0 DIV - cor0.col0 FROM tab2 cor0
----
6
77
78

skipif mysql # not compatible
query I rowsort label-905
SELECT col0 + + col0 / - cor0.col0 FROM tab2 cor0
----
6
77
78

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

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

query I rowsort
SELECT ALL cor0.col2 + + 97 FROM tab1 AS cor0
----
151
154
193

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

query I rowsort
SELECT cor0.col1 * - 44 AS col0 FROM tab0 AS cor0
----
-3784
-4004
-4268

query I rowsort
SELECT DISTINCT - + col0 * - cor0.col2 * + 65 FROM tab2 AS cor0
----
12285
131820
195130

query I rowsort
SELECT DISTINCT + + col0 * 48 AS col2 FROM tab0 cor0
----
1152
1680
4272

query I rowsort
SELECT ALL - 84 + col0 AS col1 FROM tab0 cor0
----
-49
-60
5

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-915
SELECT DISTINCT col0 * - 24 + + col2 * 92 DIV - ( col0 ) AS col0 FROM tab1 AS cor0
----
-1617
-1728
-2030

skipif mysql # not compatible
query I rowsort label-915
SELECT DISTINCT col0 * - 24 + + col2 * 92 / - ( col0 ) AS col0 FROM tab1 AS cor0
----
-1617
-1728
-2030

query I rowsort
SELECT ALL + 87 + col2 AS col2 FROM tab2 AS cor0
----
113
114
125

query I rowsort
SELECT DISTINCT + - 7 FROM tab2 AS cor0
----
-7

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 87 col0 FROM tab2, tab1 AS cor0, tab0, tab2 AS cor1
----
81 values hashing to 969f31ae779866644763e8a07f1ec501

query I rowsort
SELECT - ( col2 ) * - col2 + + 29 + 35 FROM tab1 AS cor0
----
2980
3313
9280

query I rowsort
SELECT + 34 * col1 AS col1 FROM tab1 AS cor0
----
340
442
884

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

query I rowsort
SELECT ALL ( - 98 ) * + col1 FROM tab0 AS cor0
----
-8428
-8918
-9506

query I rowsort
SELECT 28 * ( col1 ) FROM tab0 AS cor0
----
2408
2548
2716

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-928
SELECT - 2 DIV - 25 col1 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-928
SELECT - 2 / - 25 col1 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - col1 * col1 + 84 col1 FROM tab2 AS cor0
----
-188
-3338
-846

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

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

query I rowsort
SELECT DISTINCT - col1 - + 95 * + 88 * + col0 FROM tab2 AS cor0
----
-58551
-652139
-660457

query I rowsort
SELECT ALL - col1 * - ( - col2 ) + col2 + col0 FROM tab1 AS cor0
----
-1072
-1347
-449

query I rowsort
SELECT cor1.col1 * - cor1.col2 AS col2 FROM tab1, tab2 AS cor0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to aae2bedae66f0ed6053073562e804653

query I rowsort
SELECT col2 + - ( 79 ) FROM tab2 AS cor0
----
-41
-52
-53

query I rowsort
SELECT DISTINCT + col0 * + 46 AS col2 FROM tab0 cor0
----
1104
1610
4094

query I rowsort
SELECT ALL - - col1 + - 89 + + 75 AS col1 FROM tab2 AS cor0
----
17
3
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * + col2 + 34 col0 FROM tab1 AS cor0
----
2950
3283
9250

query I rowsort
SELECT col0 + 33 * col0 AS col0 FROM tab2 AS cor0
----
238
2652
2686

query I rowsort
SELECT ALL + + col0 + 46 FROM tab1 AS cor0
----
110
126
49

onlyif mysql # use DIV operator for integer division
query I rowsort label-941
SELECT 60 DIV 76 AS col1 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-941
SELECT 60 / 76 AS col1 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT ALL - tab2.col1 AS col0 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 + 11 col1 FROM tab2 AS cor0
----
18
89
90

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

query I rowsort
SELECT DISTINCT - col1 + col0 * + col2 * + cor0.col1 AS col2 FROM tab0 AS cor0
----
3298
664027
68026

query I rowsort
SELECT tab1.col2 * + 16 FROM tab1
----
1536
864
912

query I rowsort
SELECT col2 * + 89 FROM tab1
----
4806
5073
8544

query I rowsort
SELECT - ( - col1 ) * col0 + - 64 FROM tab1 AS cor0
----
14
576
976

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

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

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

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

query I rowsort
SELECT 15 * - 81 FROM tab1
----
-1215
-1215
-1215

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 27 * ( + tab1.col1 * col0 ) col0 FROM tab1
----
-17280
-2106
-28080

query I rowsort
SELECT + + cor0.col1 AS col1 FROM tab2, tab0 cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

onlyif mysql # use DIV operator for integer division
query I rowsort label-956
SELECT ALL - 0 DIV - 65 - + col0 * ( - 93 ) AS col1 FROM tab1
----
279
5952
7440

skipif mysql # not compatible
query I rowsort label-956
SELECT ALL - 0 / - 65 - + col0 * ( - 93 ) AS col1 FROM tab1
----
279
5952
7440

query I rowsort
SELECT + + col1 * - col1 + col2 * + 56 * 37 FROM tab1 AS cor0
----
111212
118004
198743

query I rowsort
SELECT ALL 86 FROM tab1 cor0
----
86
86
86

query I rowsort
SELECT ALL + col2 + col2 * - 20 FROM tab1 cor0
----
-1026
-1083
-1824

query I rowsort
SELECT ALL 33 * col1 FROM tab2
----
1023
1947
561

query I rowsort
SELECT + col0 * + 40 FROM tab0 AS cor0
----
1400
3560
960

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

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

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

query I rowsort
SELECT - col1 * col1 + - ( col1 * - col2 + 66 ) FROM tab2 AS cor0
----
-190
-2013
291

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + col0 col1 FROM tab0 cor0
----
178
48
70

query I rowsort
SELECT ALL + - 86 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 9ac806793c03d3a6b5e3a3029d20e4da

query I rowsort
SELECT ALL col2 * col1 + ( col1 ) * - col2 AS col0 FROM tab2
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-969
SELECT + ( col0 ) + CAST( col1 AS SIGNED ) FROM tab1 AS cor0
----
29
74
93

skipif mysql # not compatible
query I rowsort label-969
SELECT + ( col0 ) + CAST ( col1 AS INTEGER ) FROM tab1 AS cor0
----
29
74
93

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 49 * + col1 + + cor0.col2 col1 FROM tab1 AS cor0
----
1328
547
733

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

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

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

query I rowsort
SELECT ALL 67 * col2 AS col2 FROM tab0 AS cor0
----
2211
5494
67

query I rowsort
SELECT + 52 + cor0.col0 * + col2 FROM tab2 AS cor0
----
2080
241
3054

query I rowsort
SELECT + + col2 - + col0 * col0 FROM tab2 AS cor0
----
-22
-6058
-6203

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 + - col0 col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT + 14 * col0 AS col0 FROM tab2
----
1092
1106
98

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

query I rowsort
SELECT - col2 * - col2 * col2 + - col2 * 93 FROM tab0 AS cor0
----
-92
32868
543742

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

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

query I rowsort
SELECT DISTINCT + col1 * col1 + col1 * col2 AS col0 FROM tab2 AS cor0
----
1798
5015
935

query I rowsort
SELECT DISTINCT - col0 + + col0 * ( col0 ) - col1 FROM tab1
----
-20
4022
6307

query I rowsort
SELECT ALL col2 * - col1 - 94 FROM tab2
----
-1628
-740
-931

query I rowsort
SELECT + 77 + - tab1.col0 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 34648b1598e7e5145150d2aed8f6cddd

query I rowsort
SELECT ALL - 12 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 3983bffe2adf88cb2efc3be93ee620c0

query I rowsort
SELECT 69 * - col0 - 52 FROM tab2
----
-535
-5434
-5503

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

query I rowsort
SELECT ALL 18 + 33 AS col0 FROM tab0 cor0
----
51
51
51

query I rowsort
SELECT ALL - - ( 85 ) * + cor0.col0 * + ( ( + cor0.col1 ) ) FROM tab1 AS cor0
----
54400
6630
88400

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 98 col0 FROM tab1 AS cor0
----
-98
-98
-98

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

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

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

query I rowsort
SELECT 82 AS col2 FROM tab2 AS cor0
----
82
82
82

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

skipif mysql # not compatible
query I rowsort
SELECT + - CAST ( + 39 AS REAL ) * col2 AS col0 FROM tab1 AS cor0
----
-2106
-2223
-3744

query I rowsort
SELECT 34 AS col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 4e2ca147a59e0d5661c28cf3e5431caa

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

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

query I rowsort
SELECT - 67 AS col1 FROM tab1 AS cor0
----
-67
-67
-67

query I rowsort
SELECT - - 31 * - 24 + col0 FROM tab2 AS cor0
----
-665
-666
-737

query I rowsort
SELECT ALL - 80 * col2 AS col0 FROM tab0
----
-2640
-6560
-80

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

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

query I rowsort
SELECT ALL - 18 - cor0.col1 * - ( ( col0 ) ) AS col1 FROM tab2 AS cor0
----
1325
199
4584

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

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

query I rowsort
SELECT DISTINCT + 71 * col2 AS col2 FROM tab0
----
2343
5822
71

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1011
SELECT ALL CAST( col1 AS SIGNED ) AS col0 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-1011
SELECT ALL CAST ( col1 AS INTEGER ) AS col0 FROM tab0
----
86
91
97

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

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

query I rowsort
SELECT + 18 + ( + col2 ) AS col2 FROM tab0
----
100
19
51

query I rowsort
SELECT ALL + + col2 * - col0 + - ( 54 + cor0.col1 ) AS col2 FROM tab1 AS cor0
----
-242
-3712
-7747

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

query I rowsort
SELECT 45 * col0 + tab0.col2 FROM tab0
----
1113
1576
4087

query I rowsort
SELECT ALL + + 14 FROM tab1 cor0
----
14
14
14

query I rowsort
SELECT 65 + col1 * col2 AS col1 FROM tab2 AS cor0
----
1599
711
902

query I rowsort
SELECT ALL col2 + col1 * ( col1 + col1 ) * + col1 AS col1 FROM tab1 AS cor0
----
2057
35206
4490

query I rowsort
SELECT ALL col2 - col2 * col2 AS col2 FROM tab2 AS cor0
----
-1406
-650
-702

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

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

query I rowsort
SELECT DISTINCT - col0 - - col2 * col0 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT DISTINCT 15 AS col2 FROM tab1 AS cor0
----
15

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

query I rowsort
SELECT + ( col0 ) * + 21 AS col2 FROM tab1 AS cor0
----
1344
1680
63

onlyif mysql # use DIV operator for integer division
query I rowsort label-1026
SELECT ALL + - 25 + + cor0.col1 + col0 DIV col0 FROM tab0 AS cor0
----
62
67
73

skipif mysql # not compatible
query I rowsort label-1026
SELECT ALL + - 25 + + cor0.col1 + col0 / col0 FROM tab0 AS cor0
----
62
67
73

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - col2 col0 FROM tab2
----
-20
41
52

query I rowsort
SELECT - col2 + 69 * col0 + col2 FROM tab0 AS cor0
----
1656
2415
6141

onlyif mysql # use DIV operator for integer division
query I rowsort label-1031
SELECT - col1 + + 63 DIV cor0.col0 + - col2 * + ( cor0.col2 * col0 ) FROM tab2 cor0
----
-114093
-5125
-52787

skipif mysql # not compatible
query I rowsort label-1031
SELECT - col1 + + 63 / cor0.col0 + - col2 * + ( cor0.col2 * col0 ) FROM tab2 cor0
----
-114093
-5125
-52787

query I rowsort
SELECT col0 * 80 + + 30 + col1 AS col0 FROM tab2 AS cor0
----
621
6329
6367

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

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

query I rowsort
SELECT + cor0.col1 * 75 + - 36 + col0 * - 95 FROM tab0 AS cor0
----
-1666
3914
4134

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1036
SELECT - CAST( - col0 AS SIGNED ) + col1 + + 93 FROM tab0 AS cor0
----
203
225
273

skipif mysql # not compatible
query I rowsort label-1036
SELECT - CAST ( - col0 AS INTEGER ) + col1 + + 93 FROM tab0 AS cor0
----
203
225
273

onlyif mysql # use DIV operator for integer division
query I rowsort label-1037
SELECT - ( - 27 ) * - col0 DIV col0 AS col0 FROM tab2 AS cor0
----
-27
-27
-27

skipif mysql # not compatible
query I rowsort label-1037
SELECT - ( - 27 ) * - col0 / col0 AS col0 FROM tab2 AS cor0
----
-27
-27
-27

query I rowsort
SELECT DISTINCT - 15 * 92 FROM tab0 AS cor0
----
-1380

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

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

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

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

query I rowsort
SELECT + 85 * + ( + cor0.col2 ) * 76 FROM tab0 AS cor0
----
213180
529720
6460

onlyif mysql # use DIV operator for integer division
query I rowsort label-1043
SELECT DISTINCT - - col2 + - col1 DIV - col0 AS col2 FROM tab0 AS cor0
----
3
36
83

skipif mysql # not compatible
query I rowsort label-1043
SELECT DISTINCT - - col2 + - col1 / - col0 AS col2 FROM tab0 AS cor0
----
3
36
83

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

skipif mysql # not compatible
query I rowsort label-1044
SELECT DISTINCT + + CAST ( + 45 AS INTEGER ) / - col0 FROM tab0 cor0
----
-1
0

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

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

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

query I rowsort
SELECT + tab2.col1 + + col2 * - col1 + - col2 AS col2 FROM tab2
----
-1501
-667
-833

query I rowsort
SELECT ALL + - 43 + col0 FROM tab1 AS cor0
----
-40
21
37

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1051
SELECT ALL col0 - ( - 99 ) DIV col0 FROM tab2 cor0
----
21
79
80

skipif mysql # not compatible
query I rowsort label-1051
SELECT ALL col0 - ( - 99 ) / col0 FROM tab2 cor0
----
21
79
80

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

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

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

query I rowsort
SELECT cor0.col1 * + 8 AS col1 FROM tab2 AS cor0
----
136
248
472

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

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

query I rowsort
SELECT DISTINCT - cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
-54
-57
-96

query I rowsort
SELECT - - col0 * 97 AS col2 FROM tab1 cor0
----
291
6208
7760

query I rowsort
SELECT - col1 + + 65 AS col2 FROM tab1 cor0
----
39
52
55

query I rowsort
SELECT + cor0.col1 * + 46 AS col2 FROM tab2 AS cor0
----
1426
2714
782

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

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( - 4 AS REAL ) * col2 FROM tab1 AS cor0
----
-216
-228
-384

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * col0 * + cor0.col2 col0 FROM tab0 AS cor0
----
-1225
-19008
-649522

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 46 * col1 + col1 * cor0.col1 col2 FROM tab1 AS cor0
----
1872
560
767

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

query I rowsort
SELECT col0 + 58 FROM tab0
----
147
82
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 44 * col1 col2 FROM tab0 AS cor0
----
-3784
-4004
-4268

onlyif mysql # use DIV operator for integer division
query I rowsort label-1067
SELECT ALL 79 + col2 DIV + col2 FROM tab0 cor0
----
80
80
80

skipif mysql # not compatible
query I rowsort label-1067
SELECT ALL 79 + col2 / + col2 FROM tab0 cor0
----
80
80
80

query I rowsort
SELECT ALL 31 + + 93 FROM tab1 AS cor0
----
124
124
124

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

query I rowsort
SELECT DISTINCT - col2 + col1 * - col0 AS col2 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT - + 51 FROM tab1 AS cor0
----
-51
-51
-51

query I rowsort
SELECT ALL - + col0 * - col1 * col1 AS col2 FROM tab0 AS cor0
----
177504
329315
737009

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1075
SELECT - + col0 DIV col0 + + 62 FROM tab2 AS cor0
----
61
61
61

skipif mysql # not compatible
query I rowsort label-1075
SELECT - + col0 / col0 + + 62 FROM tab2 AS cor0
----
61
61
61

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col0 + 46 col0 FROM tab1 cor0
----
4142
55
6446

query I rowsort
SELECT - col2 + 39 * - col0 FROM tab0
----
-1366
-3553
-969

query I rowsort
SELECT DISTINCT col2 * + 88 FROM tab0
----
2904
7216
88

query I rowsort
SELECT - col2 + col0 * + col0 AS col0 FROM tab0 AS cor0
----
1224
543
7839

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

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

query I rowsort
SELECT - 94 * + col2 FROM tab0 AS cor0
----
-3102
-7708
-94

query I rowsort
SELECT DISTINCT - 32 + col1 FROM tab2 AS cor0
----
-1
-15
27

query I rowsort
SELECT col0 * - 85 + col0 AS col2 FROM tab2
----
-588
-6552
-6636

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

query I rowsort
SELECT 30 + - col2 FROM tab2 AS cor0
----
-8
3
4

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

query I rowsort
SELECT ALL col2 + + cor0.col0 + col2 AS col2 FROM tab2 cor0
----
130
155
61

query I rowsort
SELECT - + col1 + col1 * col0 * + col1 FROM tab0 AS cor0
----
177418
329218
736918

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

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

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

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

query I rowsort
SELECT + - 60 * ( + cor0.col0 ) + col1 AS col2 FROM tab2 AS cor0
----
-389
-4621
-4723

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

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

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

query I rowsort
SELECT 32 * + col0 AS col1 FROM tab0 AS cor0
----
1120
2848
768

query I rowsort
SELECT - - 47 * + col1 + cor0.col1 AS col1 FROM tab2 AS cor0
----
1488
2832
816

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

query I rowsort
SELECT 2 * 89 FROM tab1 AS cor0
----
178
178
178

query I rowsort
SELECT + 48 FROM tab1, tab1 AS cor0
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0, tab2 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 3ef3d333138b2b558b77004bad9bdabc

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

query I rowsort
SELECT DISTINCT cor0.col0 + cor0.col0 FROM tab2, tab0 AS cor0
----
178
48
70

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

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

query I rowsort
SELECT ALL - + ( col2 ) + - col1 + col2 AS col1 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT + 62 FROM tab0
----
62
62
62

query I rowsort
SELECT + + col0 + + col0 + + 20 * col0 FROM tab1 AS cor0
----
1408
1760
66

query I rowsort
SELECT + 14 * - col0 + ( + cor0.col2 * col2 ) + col1 * - col0 * col0 FROM tab0 cor0
----
-119314
-48783
-715333

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1114
SELECT ALL col1 * col2 + - tab1.col2 DIV col2 + - col2 * col1 * + ( tab1.col2 ) col0 FROM tab1
----
-118561
-31921
-74413

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1114
SELECT ALL col1 * col2 + - tab1.col2 / col2 + - col2 * col1 * + ( tab1.col2 ) col0 FROM tab1
----
-118561
-31921
-74413

query I rowsort
SELECT DISTINCT tab2.col1 * col1 + ( 64 ) AS col1 FROM tab2
----
1025
353
3545

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

query I rowsort
SELECT + + col1 * - col0 + 76 * + 17 + col1 * col1 FROM tab0 AS cor0
----
1474
6624
7306

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1120
SELECT col0 DIV - ( 77 ) AS col0 FROM tab2 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-1120
SELECT col0 / - ( 77 ) AS col0 FROM tab2 AS cor0
----
-1
-1
0

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

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

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

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

query I rowsort
SELECT DISTINCT - - col1 + 7 AS col0 FROM tab1 AS cor0
----
17
20
33

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1127
SELECT DISTINCT - col0 DIV col0 AS col0 FROM tab0 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-1127
SELECT DISTINCT - col0 / col0 AS col0 FROM tab0 AS cor0
----
-1

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

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

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

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

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

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

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

query I rowsort
SELECT + 61 FROM tab0, tab0 cor0
----
9 values hashing to 07149905a72bd87553381f34d19ed290

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

query I rowsort
SELECT - col0 * - 87 * - col0 AS col1 FROM tab2 AS cor0
----
-4263
-529308
-542967

onlyif mysql # use DIV operator for integer division
query I rowsort label-1138
SELECT ALL col2 DIV - ( 19 * + tab0.col0 ) AS col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1138
SELECT ALL col2 / - ( 19 * + tab0.col0 ) AS col0 FROM tab0
----
0
0
0

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

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

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

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

query I rowsort
SELECT DISTINCT col1 * ( + col2 * col0 + + 5 ) FROM tab1
----
36530
4342
99905

query I rowsort
SELECT col1 + + tab0.col2 * 77 * col0 AS col1 FROM tab0
----
2792
562037
61070

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

skipif mysql # not compatible
query I rowsort label-1143
SELECT ALL - col2 + + col1 * CAST ( col0 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
1305
190
4576

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

query I rowsort
SELECT + 13 + - col0 + + col1 FROM tab2
----
-49
-6
37

query I rowsort
SELECT 79 + col1 - + col2 * + col1 AS col1 FROM tab2
----
-1396
-550
-727

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 58 + - tab1.col0 col1 FROM tab1
----
-122
-138
-61

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

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

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

skipif mysql # not compatible
query I rowsort label-1150
SELECT ALL - - col0 / col2 + col1 AS col2 FROM tab1 AS cor0
----
11
13
26

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

query I rowsort
SELECT DISTINCT + col0 * + 3 - - col1 * ( col1 * + col1 ) FROM tab2
----
205613
29812
5150

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1154
SELECT ( col1 ) - - col1 DIV + col1 FROM tab1
----
11
14
27

skipif mysql # not compatible
query I rowsort label-1154
SELECT ( col1 ) - - col1 / + col1 FROM tab1
----
11
14
27

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

query I rowsort
SELECT col2 - col2 * - col2 FROM tab0
----
1122
2
6806

query I rowsort
SELECT + col2 + - 49 FROM tab2
----
-11
-22
-23

query I rowsort
SELECT DISTINCT + col0 * col1 * col0 - ( col1 + col0 ) AS col2 FROM tab0
----
118693
49426
720631

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col2 + - col1 * tab1.col1 col1 FROM tab1
----
-43
-622
-73

query I rowsort
SELECT - tab2.col2 + col1 * 69 AS col0 FROM tab2
----
1135
2112
4045

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

skipif mysql # not compatible
query I rowsort label-1162
SELECT DISTINCT + 1 + col2 / col1 AS col2 FROM tab2 AS cor0
----
1
3

query I rowsort
SELECT DISTINCT + cor0.col0 * col1 * col0 + col1 * col0 + + col1 AS col2 FROM tab0 AS cor0
----
122317
51686
729001

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

query I rowsort
SELECT - 60 * cor0.col1 + + col2 FROM tab1 AS cor0
----
-1506
-543
-684

query I rowsort
SELECT - + 0 * + col0 + col2 FROM tab1 cor0
----
54
57
96

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

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

query I rowsort
SELECT ALL + 97 + - cor0.col2 FROM tab0 cor0
----
15
64
96

query I rowsort
SELECT - + col0 * col0 + - 61 * col1 FROM tab2 AS cor0
----
-1940
-7278
-9683

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

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

query I rowsort
SELECT 82 + col0 FROM tab1
----
146
162
85

query I rowsort
SELECT ALL + ( + ( col1 ) ) AS col2 FROM tab0
----
86
91
97

query I rowsort
SELECT - + 13 * + col2 + + 74 AS col1 FROM tab1 AS cor0
----
-1174
-628
-667

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

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

query I rowsort
SELECT - 73 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 84ab9db5468b4a1781bd8d5c8e0e77fc

query I rowsort
SELECT 98 FROM tab0, tab0 AS cor0
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

query I rowsort
SELECT - 75 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 258bc565c64924d905a55eaaa6e57547

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

query I rowsort
SELECT + 32 + - col0 FROM tab2
----
-46
-47
25

query I rowsort
SELECT DISTINCT cor0.col2 * col1 + col0 * 35 FROM tab2 cor0
----
1082
3411
4264

query I rowsort
SELECT - 73 * - col2 - col2 FROM tab1 AS cor0
----
3888
4104
6912

query I rowsort
SELECT + + col0 * - col1 + col0 * col0 * - col1 AS col0 FROM tab1 AS cor0
----
-312
-41600
-84240

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

query I rowsort
SELECT DISTINCT 26 + col2 AS col1 FROM tab2 AS cor0
----
52
53
64

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

query I rowsort
SELECT + 7 * col2 + 51 FROM tab2 AS cor0
----
233
240
317

query I rowsort
SELECT - 60 AS col2 FROM tab2 AS cor0
----
-60
-60
-60

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

query I rowsort
SELECT ALL + cor0.col1 + ( - 37 ) FROM tab2 AS cor0
----
-20
-6
22

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

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

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

query I rowsort
SELECT DISTINCT col1 * ( col0 ) * - col0 AS col0 FROM tab2 cor0
----
-106097
-1519
-358956

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

query I rowsort
SELECT - 93 * + col2 * + col2 AS col0 FROM tab0 AS cor0
----
-101277
-625332
-93

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

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

query I rowsort
SELECT DISTINCT + cor1.col2 + + 31 * + 94 FROM tab2, tab2 AS cor0, tab0 cor1
----
2915
2947
2996

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

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

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

query I rowsort
SELECT - 53 AS col2 FROM tab1
----
-53
-53
-53

query I rowsort
SELECT 45 * + col2 + col1 FROM tab0 AS cor0
----
142
1571
3781

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

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

skipif mysql # not compatible
query I rowsort label-1206
SELECT DISTINCT 34 / + tab0.col0 AS col1 FROM tab0
----
0
1

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( - 89 AS REAL ) + + col2 AS col1 FROM tab0 AS cor0
----
-56
-7
-88

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

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

query I rowsort
SELECT col1 * cor0.col2 * - ( col2 ) AS col1 FROM tab1 cor0
----
-119808
-32490
-75816

query I rowsort
SELECT + - 46 * + col2 FROM tab1 AS cor0
----
-2484
-2622
-4416

query I rowsort
SELECT - 99 AS col2 FROM tab1, tab2 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to 501094e80bab5e6e81bd79b84ea81e69

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

query I rowsort
SELECT - ( tab2.col1 ) * - cor1.col1 FROM tab2, tab1 AS cor0, tab1, tab1 AS cor1
----
81 values hashing to 73b3f6b72c17d7eb6e1fe1e1130a2611

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

query I rowsort
SELECT - 51 AS col1 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 27bcc31433ce90833ed76619cbd8d6a4

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

query I rowsort
SELECT - col0 + 95 FROM tab1 AS cor0
----
15
31
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + + col0 * ( ( col1 ) ) + CAST ( + col2 AS REAL ) * + cor0.col2 col2 FROM tab2 AS cor0
----
2787
5278
946

query I rowsort
SELECT ALL + cor0.col1 * col2 + cor0.col1 * cor0.col1 AS col0 FROM tab2 AS cor0
----
1798
5015
935

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

query I rowsort
SELECT + col0 * 22 - 20 * col1 AS col1 FROM tab2 cor0
----
-466
1398
536

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col1 + - col0 + col2 col1 FROM tab0
----
63
84
95

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1224
SELECT col0 + tab1.col2 * + CAST( 72 AS SIGNED ) AS col0 FROM tab1
----
3891
4168
6992

skipif mysql # not compatible
query I rowsort label-1224
SELECT col0 + tab1.col2 * + CAST ( 72 AS INTEGER ) AS col0 FROM tab1
----
3891
4168
6992

query I rowsort
SELECT + cor0.col1 * 15 FROM tab2 AS cor0
----
255
465
885

query I rowsort
SELECT col2 + + col2 * - 38 + + col0 AS col2 FROM tab0 AS cor0
----
-1197
-2
-2945

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

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

query I rowsort
SELECT col2 * 47 FROM tab2
----
1222
1269
1786

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

query I rowsort
SELECT ALL 83 FROM tab1, tab2 cor0
----
9 values hashing to 18f405c31a0fb47ce3cc9f7effa8855c

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

query I rowsort
SELECT ALL - tab2.col1 AS col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

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

query I rowsort
SELECT - col0 * col0 - col2 / cor0.col0 AS col2 FROM tab2 AS cor0 WHERE col2 NOT IN ( col2 )
----

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

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

query I rowsort
SELECT ALL - col1 * col0 - - col0 FROM tab0
----
-2040
-3360
-8010

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

skipif mysql # not compatible
query I rowsort label-1239
SELECT tab1.col2 / + col2 AS col2 FROM tab1
----
1
1
1

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1243
SELECT - col1 + - col2 * col1 DIV col1 FROM tab2
----
-55
-58
-85

skipif mysql # not compatible
query I rowsort label-1243
SELECT - col1 + - col2 * col1 / col1 FROM tab2
----
-55
-58
-85

query I rowsort
SELECT col1 AS col2 FROM tab1 WHERE ( NULL ) < NULL
----

query III rowsort
SELECT ALL * FROM tab1 AS cor0 WHERE - col1 = ( NULL )
----

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1247
SELECT col0 - + col2 / col2 col2 FROM tab0
----
23
34
88

query I rowsort
SELECT ALL col1 + col1 - - col2 FROM tab1
----
106
122
77

query I rowsort
SELECT ALL col2 * col2 - - col2 * col1 FROM tab2
----
1566
2090
2210

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

query I rowsort
SELECT DISTINCT + cor0.col2 + + tab1.col1 AS col1 FROM tab1, tab0, tab2 AS cor0
----
9 values hashing to b8b62762005dc0d7237145d0538edb34

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

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

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

query I rowsort
SELECT + cor0.col2 * col2 + col2 + col1 AS col1 FROM tab1 AS cor0
----
2996
3316
9325

query I rowsort
SELECT - col0 * col0 + - col2 * - col2 FROM tab0 AS cor0
----
-1197
-1224
513

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1257
SELECT + - col0 * + col2 + col2 DIV col2 FROM tab0 AS cor0
----
-34
-7297
-791

skipif mysql # not compatible
query I rowsort label-1257
SELECT + - col0 * + col2 + col2 / col2 FROM tab0 AS cor0
----
-34
-7297
-791

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

query I rowsort
SELECT DISTINCT - - col0 - cor0.col2 * - col0 * + cor0.col2 FROM tab0 cor0
----
26160
598525
70

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

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

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

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

query I rowsort
SELECT col0 * + col2 + + col2 * col0 AS col2 FROM tab0
----
14596
1584
70

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

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

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

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

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

query I rowsort
SELECT ALL + 7 + col2 AS col0 FROM tab0
----
40
8
89

query I rowsort
SELECT DISTINCT - col1 + col0 + + col2 FROM tab0
----
-29
-61
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-1271
SELECT + cor0.col2 + cor0.col1 * 31 DIV ( col0 ) FROM tab0 AS cor0
----
113
144
86

skipif mysql # not compatible
query I rowsort label-1271
SELECT + cor0.col2 + cor0.col1 * 31 / ( col0 ) FROM tab0 AS cor0
----
113
144
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 30 * col1 col0 FROM tab2 AS cor0
----
1770
510
930

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

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

query I rowsort
SELECT + ( col1 ) * col0 + col0 + cor0.col1 * + col0 FROM tab2 AS cor0
----
2765
441
9282

query I rowsort
SELECT - - cor0.col2 + + col1 * ( 44 ) FROM tab0 AS cor0
----
3817
4086
4269

query I rowsort
SELECT col0 * col2 + col2 * col1 + col1 FROM tab0 AS cor0
----
14851
229
3716

onlyif mysql # use DIV operator for integer division
query I rowsort label-1277
SELECT - col0 DIV 9 + - col1 * + cor0.col2 + 27 AS col2 FROM tab1 AS cor0
----
-1229
-1377
-550

skipif mysql # not compatible
query I rowsort label-1277
SELECT - col0 / 9 + - col1 * + cor0.col2 + 27 AS col2 FROM tab1 AS cor0
----
-1229
-1377
-550

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

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

query I rowsort
SELECT col1 * 96 + 29 FROM tab0 AS cor0
----
8285
8765
9341

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

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

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

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

skipif mysql # not compatible
query I rowsort label-1282
SELECT DISTINCT + col1 + 11 / col0 AS col1 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-1283
SELECT ALL - 81 DIV col0 + + tab0.col1 * col1 AS col2 FROM tab0
----
7393
8281
9407

skipif mysql # not compatible
query I rowsort label-1283
SELECT ALL - 81 / col0 + + tab0.col1 * col1 AS col2 FROM tab0
----
7393
8281
9407

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

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

query I rowsort
SELECT + tab2.col0 + col0 FROM tab2 WHERE NOT NULL < NULL
----

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

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

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

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

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

query III rowsort
SELECT ALL * FROM tab1 WHERE + col1 NOT IN ( + col2 + col1 * col1 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col2 col0 FROM tab1
----
54
57
96

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

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

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

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

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

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

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

query I rowsort
SELECT + col2 * + col2 * col1 + - col2 FROM tab0
----
611802
93621
96

query I rowsort
SELECT - col0 + col1 + - col0 * + col2 AS col0 FROM tab2
----
-165
-2047
-3064

query I rowsort
SELECT DISTINCT col0 + tab1.col1 + - col2 FROM tab1
----
-25
-3
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 2 + + col1 * col0 col0 FROM tab0 AS cor0
----
2066
3397
8101

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

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

query I rowsort
SELECT col1 + + col0 + - tab1.col0 * tab1.col1 AS col1 FROM tab1
----
-49
-566
-947

query III rowsort
SELECT ALL * FROM tab0 WHERE NULL = ( - col1 + col0 - + col0 * col0 / + col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-1309
SELECT ALL + col1 + col1 DIV col0 + col2 * col1 FROM tab1
----
1261
1438
580

skipif mysql # not compatible
query I rowsort label-1309
SELECT ALL + col1 + col1 / col0 + col2 * col1 FROM tab1
----
1261
1438
580

query I rowsort
SELECT DISTINCT col2 * col2 * col2 FROM tab2
----
17576
19683
54872

query I rowsort
SELECT + col1 * col2 * - col0 FROM tab1
----
-36480
-4212
-99840

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE + col1 * col2 + - col0 IN ( + col1 * - tab1.col2 + col2 * col2 )
----

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

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

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

query I rowsort
SELECT DISTINCT - col2 + col0 + + col0 FROM tab2
----
-13
120
130

query I rowsort
SELECT - col2 * - 8 FROM tab0 cor0
----
264
656
8

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

query I rowsort
SELECT DISTINCT - col1 * + 96 AS col1 FROM tab2
----
-1632
-2976
-5664

query I rowsort
SELECT col1 * - 26 AS col2 FROM tab1 AS cor0
----
-260
-338
-676

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

query I rowsort
SELECT DISTINCT + col1 * + 22 AS col2 FROM tab1
----
220
286
572

query I rowsort
SELECT col1 * + col1 + + col1 * + col0 * - col2 AS col0 FROM tab0 cor0
----
-60716
-655837
6014

query I rowsort
SELECT + 5 * col0 + col0 FROM tab2 AS cor0
----
42
468
474

query I rowsort
SELECT - 88 * col1 + + col0 AS col2 FROM tab0 AS cor0
----
-7544
-7919
-8501

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 40 + 67 * col0 + - 42 col2 FROM tab2
----
467
5224
5291

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

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

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

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

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

query I rowsort
SELECT - 52 * 87 + + tab1.col2 + col0 FROM tab1
----
-4348
-4403
-4467

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1332
SELECT CAST( NULL AS DECIMAL ) FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-1332
SELECT CAST ( NULL AS REAL ) FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1333
SELECT + CAST( NULL AS SIGNED ) * 49 AS col2 FROM tab1 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-1333
SELECT + CAST ( NULL AS INTEGER ) * 49 AS col2 FROM tab1 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

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

skipif mysql # not compatible
query I rowsort label-1334
SELECT - col2 + - col1 + - CAST ( col2 AS INTEGER ) FROM tab2 AS cor0
----
-111
-85
-93

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

query I rowsort
SELECT DISTINCT + cor0.col1 * - col2 + col0 * ( col2 ) AS col0 FROM tab1 AS cor0
----
-1242
3078
6432

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT - 52 * col2 AS col2 FROM tab1
----
-2808
-2964
-4992

query I rowsort
SELECT 71 * col2 AS col0 FROM tab2
----
1846
1917
2698

onlyif mysql # use DIV operator for integer division
query I rowsort label-1347
SELECT ALL col0 DIV col0 + col0 col2 FROM tab2
----
79
8
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1347
SELECT ALL col0 / col0 + col0 col2 FROM tab2
----
79
8
80

query I rowsort
SELECT DISTINCT + 16 FROM tab2, tab2 AS cor0, tab0 cor1
----
16

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + 47 + col1 col1 FROM tab2 AS cor0
----
-298
-3607
-3696

query I rowsort
SELECT ALL 71 AS col0 FROM tab0
----
71
71
71

query I rowsort
SELECT 99 + + 2 * - col2 FROM tab2 AS cor0
----
23
45
47

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

query I rowsort
SELECT 61 + + col1 AS col2 FROM tab0
----
147
152
158

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

query I rowsort
SELECT ALL + - col0 * col1 + + ( col2 ) * - col0 + + ( + 74 ) * - cor0.col2 AS col2 FROM tab1 AS cor0
----
-15824
-4236
-8506

query I rowsort
SELECT DISTINCT col0 - + col2 * ( - ( col1 ) ) * + ( + ( col1 ) + 58 ) FROM tab2 AS cor0
----
179556
48529
74500

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

query I rowsort
SELECT DISTINCT - cor0.col2 AS col2 FROM tab1 cor0 CROSS JOIN tab1 AS cor1
----
-54
-57
-96

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

query I rowsort
SELECT - col2 + + col2 * - 2 FROM tab2 cor0
----
-114
-78
-81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 5 * - col1 + cor0.col0 + + 93 col1 FROM tab0 AS cor0
----
547
613
637

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

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

query I rowsort
SELECT DISTINCT + + cor0.col1 + col1 AS col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT + cor0.col0 + 28 AS col2 FROM tab1 AS cor0
----
108
31
92

query I rowsort
SELECT DISTINCT - 16 AS col2 FROM tab1 AS cor0
----
-16

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

query I rowsort
SELECT - 53 * cor0.col1 FROM tab2, tab0, tab0 AS cor0, tab1
----
81 values hashing to 0cf79a837ccf408f912114245344d464

query I rowsort
SELECT DISTINCT + 44 * col0 AS col0 FROM tab1 AS cor0
----
132
2816
3520

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

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

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

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

query I rowsort
SELECT ALL + 17 * + 95 * cor0.col2 + - col0 FROM tab1 AS cor0
----
154960
87207
91991

query I rowsort
SELECT - col1 - + 67 AS col0 FROM tab0
----
-153
-158
-164

query I rowsort
SELECT DISTINCT + 34 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
34

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1379
SELECT DISTINCT col1 + CAST ( - col2 AS INTEGER ) col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT ALL + col1 * 30 + + col2 FROM tab0 AS cor0
----
2613
2812
2911

query I rowsort
SELECT DISTINCT - 5 AS col0 FROM tab2
----
-5

query I rowsort
SELECT 2 * cor1.col1 AS col1 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to e205c60b0806256e15ecb6a115a429b3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col1 * + 96 col2 FROM tab1
----
1248
2496
960

query I rowsort
SELECT DISTINCT + col1 + + col0 - + 72 * col2 AS col2 FROM tab2
----
-1735
-1906
-2640

onlyif mysql # use DIV operator for integer division
query I rowsort label-1385
SELECT - col1 + tab0.col0 + 89 DIV col2 FROM tab0
----
-1
-60
27

skipif mysql # not compatible
query I rowsort label-1385
SELECT - col1 + tab0.col0 + 89 / col2 FROM tab0
----
-1
-60
27

query I rowsort
SELECT + col1 + + 60 + tab2.col1 * - tab2.col2 * + ( col1 ) FROM tab2
----
-10905
-25856
-90387

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

query I rowsort
SELECT - cor2.col0 AS col0 FROM tab1, tab0 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to 08e380e50b0cb64601bc84e5254deef4

query I rowsort
SELECT - col1 * + 6 + col0 + - col2 * + col1 * 47 FROM tab0 cor0
----
-133878
-351171
-5106

onlyif mysql # use DIV operator for integer division
query I rowsort label-1390
SELECT - col0 * + col0 + col2 DIV col1 FROM tab2 AS cor0
----
-49
-6084
-6239

skipif mysql # not compatible
query I rowsort label-1390
SELECT - col0 * + col0 + col2 / col1 FROM tab2 AS cor0
----
-49
-6084
-6239

query I rowsort
SELECT ALL + col1 + + 20 * - 1 FROM tab2
----
-3
11
39

query I rowsort
SELECT + - col1 * + 62 + - cor0.col2 FROM tab0 cor0
----
-5365
-5724
-6015

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1393
SELECT ALL CAST( - cor0.col2 AS SIGNED ) FROM tab0, tab2 AS cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

skipif mysql # not compatible
query I rowsort label-1393
SELECT ALL CAST ( - cor0.col2 AS INTEGER ) FROM tab0, tab2 AS cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT DISTINCT col2 + - 23 AS col1 FROM tab1 AS cor0
----
31
34
73

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

query I rowsort
SELECT ALL 27 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

query I rowsort
SELECT + cor2.col0 FROM tab1, tab0 AS cor0, tab1 cor1, tab0 AS cor2
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

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

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

query I rowsort
SELECT - ( 25 ) FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 2e7a33467ee3a4d9570560d60302b35a

onlyif mysql # use DIV operator for integer division
query I rowsort label-1400
SELECT col2 DIV - ( col1 ) AS col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1400
SELECT col2 / - ( col1 ) AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT - ( tab0.col1 ) AS col0 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT 31 * col1 + + col2 FROM tab2 AS cor0
----
1855
565
988

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1404
SELECT DISTINCT - col1 DIV + col2 + + col1 + + col2 FROM tab0 AS cor0
----
1
117
172

skipif mysql # not compatible
query I rowsort label-1404
SELECT DISTINCT - col1 / + col2 + + col1 + + col2 FROM tab0 AS cor0
----
1
117
172

query I rowsort
SELECT DISTINCT col0 * col0 - - col2 AS col2 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT col2 * 81 + col0 AS col0 FROM tab0 AS cor0
----
116
2697
6731

query I rowsort
SELECT DISTINCT 40 + col1 FROM tab1 AS cor0
----
50
53
66

query I rowsort
SELECT 41 - - cor0.col1 * cor0.col1 FROM tab1, tab1 cor0
----
9 values hashing to 037573b4b55d10414c9773cc59c38ce5

query I rowsort
SELECT ALL - + 16 AS col1 FROM tab2 AS cor0
----
-16
-16
-16

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

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

query I rowsort
SELECT + col0 * - col0 * cor0.col1 FROM tab1 AS cor0
----
-234
-40960
-83200

query I rowsort
SELECT - col0 + tab1.col0 * + 23 FROM tab1
----
1408
1760
66

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

query I rowsort
SELECT + 27 + + col2 * cor0.col0 FROM tab2 AS cor0
----
2055
216
3029

query I rowsort
SELECT ALL - 40 * col2 FROM tab1 AS cor0
----
-2160
-2280
-3840

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

query I rowsort
SELECT ALL ( - col0 ) * + col1 + + col2 * + col0 AS col1 FROM tab2 AS cor0
----
-2574
-28
1659

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 + - 98 col1 FROM tab2 cor0
----
-124
-125
-136

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

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

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

query I rowsort
SELECT ALL - + col1 - col1 AS col2 FROM tab2 AS cor0
----
-118
-34
-62

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

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

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

query I rowsort
SELECT ( - col0 ) * - 49 + + col2 * + col0 AS col1 FROM tab1
----
11600
309
6784

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT - col2 * col1 * CAST ( + 7 AS REAL ) + - tab1.col2 col0 FROM tab1
----
-4047
-8832
-9882

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

query I rowsort
SELECT - cor0.col2 * - 46 FROM tab2 AS cor0
----
1196
1242
1748

query I rowsort
SELECT ALL + 68 FROM tab2
----
68
68
68

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

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

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

query I rowsort
SELECT ALL - col2 * 0 FROM tab1
----
0
0
0

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

query I rowsort
SELECT DISTINCT 36 * + 70 FROM tab2 AS cor0
----
2520

query I rowsort
SELECT ALL 96 AS col0 FROM tab2, tab2 cor0
----
9 values hashing to 22c5141a629f0ef396738ee2c8be6303

onlyif mysql # use DIV operator for integer division
query I rowsort label-1438
SELECT - - col1 * col1 DIV - cor0.col1 + ( + 55 + col2 ) * 97 FROM tab1 AS cor0
----
10547
10854
14634

skipif mysql # not compatible
query I rowsort label-1438
SELECT - - col1 * col1 / - cor0.col1 + ( + 55 + col2 ) * 97 FROM tab1 AS cor0
----
10547
10854
14634

query I rowsort
SELECT + + 93 + 79 * col1 FROM tab0 AS cor0
----
6887
7282
7756

query I rowsort
SELECT DISTINCT col1 + - col2 - - col0 AS col2 FROM tab1 AS cor0
----
-25
-3
17

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

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

query I rowsort
SELECT 48 * col1 * col1 AS col1 FROM tab2 AS cor0
----
13872
167088
46128

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

query I rowsort
SELECT col2 * - 64 * - col1 AS col1 FROM tab1
----
36480
79872
89856

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

query I rowsort
SELECT + - col2 + + 9 FROM tab1 AS cor0
----
-45
-48
-87

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * ( 8 + cor0.col1 ) * ( - col1 ) col0 FROM tab2 cor0
----
308334
33575
8463

query I rowsort
SELECT ALL col0 * - ( - col1 + col0 ) AS col2 FROM tab0 AS cor0
----
1488
178
2170

query I rowsort
SELECT DISTINCT - col1 + 19 FROM tab1 AS cor0
----
-7
6
9

query I rowsort
SELECT col2 - 87 FROM tab0 AS cor0
----
-5
-54
-86

query I rowsort
SELECT col0 * 74 + 99 AS col1 FROM tab0 AS cor0
----
1875
2689
6685

onlyif mysql # use DIV operator for integer division
query I rowsort label-1455
SELECT col2 DIV 34 FROM tab0 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-1455
SELECT col2 / 34 FROM tab0 AS cor0
----
0
0
2

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

query I rowsort
SELECT DISTINCT col0 + + col0 - 41 AS col0 FROM tab2
----
-27
115
117

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

skipif mysql # not compatible
query I rowsort label-1458
SELECT + + col2 * CAST ( - col2 AS INTEGER ) FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT - - col1 + 93 AS col2 FROM tab0 AS cor0
----
179
184
190

query I rowsort
SELECT + col2 - 18 FROM tab1 cor0
----
36
39
78

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

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

query I rowsort
SELECT DISTINCT - - cor0.col0 FROM tab0, tab2 cor0
----
7
78
79

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

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

query I rowsort
SELECT 5 - + cor0.col1 FROM tab0 cor0
----
-81
-86
-92

query I rowsort
SELECT - + 76 * col1 * + col2 + - 93 FROM tab2 AS cor0
----
-116677
-49189
-63705

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

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

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

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

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

query I rowsort
SELECT - - ( + col2 ) * - col1 * col2 - ( col2 * - ( 73 ) ) FROM tab0 cor0
----
-24
-605898
-91245

query I rowsort
SELECT DISTINCT - tab0.col2 FROM tab0, tab1, tab2 AS cor0
----
-1
-33
-82

query I rowsort
SELECT 7 AS col0 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 4e72e9e33dacac757f48d0ce46094607

query I rowsort
SELECT DISTINCT + 18 * - col2 + - col2 * + col0 AS col0 FROM tab2 AS cor0
----
-2496
-3686
-675

query I rowsort
SELECT - 46 + - col1 * col2 AS col2 FROM tab0 AS cor0
----
-143
-2884
-7508

onlyif mysql # use DIV operator for integer division
query I rowsort label-1475
SELECT 85 + 75 DIV col2 FROM tab1 AS cor0
----
85
86
86

skipif mysql # not compatible
query I rowsort label-1475
SELECT 85 + 75 / col2 FROM tab1 AS cor0
----
85
86
86

onlyif mysql # use DIV operator for integer division
query I rowsort label-1476
SELECT DISTINCT + col0 DIV col1 + + col2 + col0 FROM tab1
----
127
182
57

skipif mysql # not compatible
query I rowsort label-1476
SELECT DISTINCT + col0 / col1 + + col2 + col0 FROM tab1
----
127
182
57

query I rowsort
SELECT DISTINCT 4 + tab1.col0 FROM tab1, tab2 AS cor0
----
68
7
84

query I rowsort
SELECT ALL + + col2 + col0 * + 20 FROM tab1 AS cor0
----
114
1337
1696

query IIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0 CROSS JOIN tab1 WHERE NOT NULL = NULL
----

query I rowsort
SELECT - 32 + col1 * - col2 + - col2 FROM tab0 cor0
----
-130
-2903
-7576

query I rowsort
SELECT - - 4 + - 89 * + cor0.col0 AS col0 FROM tab2 AS cor0
----
-619
-6938
-7027

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * + 22 + + col0 + ( cor0.col1 ) col0 FROM tab1 AS cor0
----
-1334
-1667
-37

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

query I rowsort
SELECT col1 * 0 * - col0 - col1 * + 98 FROM tab0
----
-8428
-8918
-9506

query I rowsort
SELECT DISTINCT - ( 83 ) + col2 * + col1 FROM tab1
----
1165
1321
487

query I rowsort
SELECT - 92 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to a0e6b76227d870d10c4d9f46545a7c83

query I rowsort
SELECT col2 * ( + 94 ) * col1 AS col0 FROM tab0
----
266772
701428
9118

query I rowsort
SELECT - col0 + + 22 FROM tab1 cor0
----
-42
-58
19

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

query I rowsort
SELECT DISTINCT + col1 + col1 * + col1 FROM tab0
----
7482
8372
9506

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

query I rowsort
SELECT + 42 * col2 + - ( - col1 * cor0.col2 ) AS col2 FROM tab1 cor0
----
2964
3672
5280

query I rowsort
SELECT DISTINCT + + col0 + + col1 * + col2 AS col1 FROM tab1 AS cor0
----
1328
1407
634

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1494
SELECT col1 + - col0 - CAST( 14 AS SIGNED ) FROM tab2 AS cor0
----
-33
-76
10

skipif mysql # not compatible
query I rowsort label-1494
SELECT col1 + - col0 - CAST ( 14 AS INTEGER ) FROM tab2 AS cor0
----
-33
-76
10

query I rowsort
SELECT + cor0.col0 * col2 + 12 FROM tab1 AS cor0
----
174
3660
7692

query I rowsort
SELECT DISTINCT - + 32 + col2 FROM tab1 AS cor0
----
22
25
64

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1498
SELECT ( col1 ) DIV - ( col0 ) + - col0 DIV cor0.col0 AS col0 FROM tab0 AS cor0
----
-2
-3
-4

skipif mysql # not compatible
query I rowsort label-1498
SELECT ( col1 ) / - ( col0 ) + - col0 / cor0.col0 AS col0 FROM tab0 AS cor0
----
-2
-3
-4

query I rowsort
SELECT DISTINCT + 28 AS col1 FROM tab1 AS cor0
----
28

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

query I rowsort
SELECT - + col1 * - col1 + - 88 FROM tab2 AS cor0
----
201
3393
873

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

query I rowsort
SELECT ALL - col1 - + cor0.col1 FROM tab2 cor0
----
-118
-34
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-1504
SELECT + col1 DIV ( - col1 ) + + col2 AS col1 FROM tab2 AS cor0
----
25
26
37

skipif mysql # not compatible
query I rowsort label-1504
SELECT + col1 / ( - col1 ) + + col2 AS col1 FROM tab2 AS cor0
----
25
26
37

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

query I rowsort
SELECT ALL col2 * - col2 - - 44 FROM tab1
----
-2872
-3205
-9172

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 - - col1 col0 FROM tab1 AS cor0
----
-28
-47
-83

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

query I rowsort
SELECT DISTINCT - 81 AS col1 FROM tab1 cor0
----
-81

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

query I rowsort
SELECT DISTINCT cor1.col1 * - 4 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
-344
-364
-388

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

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

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

query I rowsort
SELECT ALL - col2 + - 65 FROM tab0 AS cor0
----
-147
-66
-98

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

query I rowsort
SELECT DISTINCT + + cor0.col1 * 26 FROM tab0 AS cor0
----
2236
2366
2522

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

skipif mysql # not compatible
query I rowsort label-1518
SELECT ALL col2 * - col1 / col1 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT col2 + - cor0.col2 * cor0.col2 FROM tab2 AS cor0
----
-1406
-650
-702

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

skipif mysql # not compatible
query I rowsort label-1520
SELECT ALL ( tab1.col0 ) / + col0 AS col2 FROM tab1
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-1521
SELECT + 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-1521
SELECT + col0 / col0 col2 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT ALL - - 49 * - cor0.col0 FROM tab1 AS cor0
----
-147
-3136
-3920

query I rowsort
SELECT ALL + 42 * + col0 AS col1 FROM tab2 AS cor0
----
294
3276
3318

query I rowsort
SELECT + - 94 * col1 AS col1 FROM tab1 AS cor0
----
-1222
-2444
-940

query I rowsort
SELECT ALL 86 FROM tab1, tab2 AS cor0
----
9 values hashing to 2d8c3a0d19ea51447f83cd18b49fee19

query I rowsort
SELECT DISTINCT + 16 * + col2 * - col2 FROM tab1
----
-147456
-46656
-51984

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

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

query I rowsort
SELECT DISTINCT 13 * - cor0.col1 FROM tab2, tab1 AS cor0
----
-130
-169
-338

query I rowsort
SELECT + 38 - col0 FROM tab0
----
-51
14
3

query I rowsort
SELECT + col1 * + 54 + col1 * tab1.col2 * - col2 FROM tab1
----
-119106
-31950
-74412

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

query I rowsort
SELECT ALL - 51 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 27bcc31433ce90833ed76619cbd8d6a4

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

query I rowsort
SELECT ALL - ( col1 ) * 4 FROM tab0 AS cor0
----
-344
-364
-388

query I rowsort
SELECT - col1 + col0 + col0 * 78 FROM tab0
----
1810
2668
6940

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

query I rowsort
SELECT DISTINCT tab0.col2 AS col1 FROM tab0, tab1 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT + 46 + col0 * - 34 AS col1 FROM tab2
----
-192
-2606
-2640

query I rowsort
SELECT 88 + + col2 FROM tab0
----
121
170
89

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

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

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

query I rowsort
SELECT ALL 99 * - col0 FROM tab1
----
-297
-6336
-7920

query I rowsort
SELECT ALL - col0 * col1 + + 76 AS col0 FROM tab2
----
-1267
-141
-4526

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

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

query I rowsort
SELECT ALL - + col2 * - 17 * - cor0.col2 + + col0 FROM tab1 AS cor0
----
-156592
-49569
-55169

query I rowsort
SELECT ALL 53 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 866ae1b4ab9e5b4043ac1bcfd413aaa6

onlyif mysql # use DIV operator for integer division
query I rowsort label-1549
SELECT ALL col0 * col0 + col1 DIV + col2 + - col0 * - ( + col2 * + col1 ) col1 FROM tab1
----
106240
40576
4221

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1549
SELECT ALL col0 * col0 + col1 / + col2 + - col0 * - ( + col2 * + col1 ) col1 FROM tab1
----
106240
40576
4221

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1551
SELECT DISTINCT col0 + - col0 + + col2 DIV 46 FROM tab2 cor0
----
0

skipif mysql # not compatible
query I rowsort label-1551
SELECT DISTINCT col0 + - col0 + + col2 / 46 FROM tab2 cor0
----
0

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

query I rowsort
SELECT DISTINCT - + col0 + + 7 * - cor0.col1 FROM tab1 AS cor0
----
-134
-171
-185

query I rowsort
SELECT ALL + - col1 - + 3 * cor0.col1 * - 47 AS col1 FROM tab1 AS cor0
----
1400
1820
3640

query I rowsort
SELECT ALL col0 + 45 AS col0 FROM tab0 AS cor0
----
134
69
80

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

query I rowsort
SELECT 54 * col1 FROM tab0 cor0
----
4644
4914
5238

onlyif mysql # use DIV operator for integer division
query I rowsort label-1558
SELECT DISTINCT - col1 DIV + col0 + col2 FROM tab2 AS cor0
----
23
26
38

skipif mysql # not compatible
query I rowsort label-1558
SELECT DISTINCT - col1 / + col0 + col2 FROM tab2 AS cor0
----
23
26
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-1559
SELECT col1 DIV + 99 + col0 AS col0 FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort label-1559
SELECT col1 / + 99 + col0 AS col0 FROM tab2
----
7
78
79

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1563
SELECT ALL col0 DIV - ( - col1 * + 66 ) + + col2 AS col2 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-1563
SELECT ALL col0 / - ( - col1 * + 66 ) + + col2 AS col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT + - ( 86 ) FROM tab2 cor0
----
-86

query I rowsort
SELECT DISTINCT - 79 + col2 FROM tab0 AS cor0
----
-46
-78
3

query I rowsort
SELECT - ( 73 ) + - col0 AS col2 FROM tab2 AS cor0
----
-151
-152
-80

query I rowsort
SELECT DISTINCT + + 11 + 60 * + col0 + - 42 * - 7 FROM tab2 AS cor0
----
4985
5045
725

query I rowsort
SELECT ALL + 53 * 72 + + col1 AS col1 FROM tab2 AS cor0
----
3833
3847
3875

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

query I rowsort
SELECT ALL - 13 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 1c6aaa07ba8d3dc01ee616e16bef60f2

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

query I rowsort
SELECT DISTINCT + ( - tab2.col0 + + tab2.col1 ) * - col0 FROM tab2
----
-168
1482
4898

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

query I rowsort
SELECT - 78 AS col1 FROM tab1
----
-78
-78
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1575
SELECT CAST( - col0 * - col2 + 68 AS SIGNED ) AS col0 FROM tab0
----
103
7366
860

skipif mysql # not compatible
query I rowsort label-1575
SELECT CAST ( - col0 * - col2 + 68 AS INTEGER ) AS col0 FROM tab0
----
103
7366
860

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

query I rowsort
SELECT + ( + cor0.col2 ) * cor0.col1 + - 50 + col1 AS col1 FROM tab0 AS cor0
----
144
2874
7503

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

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

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
7
78
79

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

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

query I rowsort
SELECT ALL + - 3 * + col2 AS col2 FROM tab0 AS cor0
----
-246
-3
-99

onlyif mysql # use DIV operator for integer division
query I rowsort label-1584
SELECT ALL + col2 * + col0 DIV col0 - 27 AS col1 FROM tab0 AS cor0
----
-26
55
6

skipif mysql # not compatible
query I rowsort label-1584
SELECT ALL + col2 * + col0 / col0 - 27 AS col1 FROM tab0 AS cor0
----
-26
55
6

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

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

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

query I rowsort
SELECT - col2 * + ( - col1 ) * + col2 + 17 AS col1 FROM tab1 cor0
----
119825
32507
75833

query I rowsort
SELECT - col0 + 28 FROM tab0 AS cor0
----
-61
-7
4

query I rowsort
SELECT DISTINCT - col0 * + ( 56 ) FROM tab1 AS cor0
----
-168
-3584
-4480

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

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

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

query I rowsort
SELECT - col1 - - ( col2 ) AS col1 FROM tab2
----
-33
-4
21

query I rowsort
SELECT - col2 * - col1 - + 89 FROM tab2
----
1445
557
748

query I rowsort
SELECT 5 * 14 + cor0.col1 FROM tab2, tab1 AS cor0
----
9 values hashing to e30a2f1f299c4383765eacbdb3c27ae2

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * + 33 col1 FROM tab1 cor0
----
330
429
858

query I rowsort
SELECT DISTINCT - col2 * cor0.col2 * col0 AS col2 FROM tab0 AS cor0
----
-26136
-35
-598436

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( + col0 AS REAL ) AS col2 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT + 80 AS col1 FROM tab2 cor0
----
80
80
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-1601
SELECT - cor0.col2 + - col2 DIV + col2 - + col0 AS col2 FROM tab0 AS cor0
----
-172
-37
-58

skipif mysql # not compatible
query I rowsort label-1601
SELECT - cor0.col2 + - col2 / + col2 - + col0 AS col2 FROM tab0 AS cor0
----
-172
-37
-58

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1603
SELECT + - col0 * 48 - col2 DIV - cor0.col2 FROM tab0 AS cor0
----
-1151
-1679
-4271

skipif mysql # not compatible
query I rowsort label-1603
SELECT + - col0 * 48 - col2 / - cor0.col2 FROM tab0 AS cor0
----
-1151
-1679
-4271

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1605
SELECT + col0 * - cor0.col0 + col2 * col1 DIV col0 AS col1 FROM tab2 AS cor0
----
-6065
-6233
70

skipif mysql # not compatible
query I rowsort label-1605
SELECT + col0 * - cor0.col0 + col2 * col1 / col0 AS col1 FROM tab2 AS cor0
----
-6065
-6233
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 25 * + ( col1 ) + col2 * ( + cor0.col0 ) col0 FROM tab0 AS cor0
----
2460
2942
9573

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

query I rowsort
SELECT 16 - cor0.col2 FROM tab2 AS cor0
----
-10
-11
-22

query I rowsort
SELECT DISTINCT + + col1 + cor0.col2 * col2 * ( col2 ) AS col1 FROM tab0 cor0
----
36023
551459
98

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

query I rowsort
SELECT + col0 * col1 + + cor0.col1 - 37 FROM tab0 AS cor0
----
2113
3455
8153

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

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

query I rowsort
SELECT + 25 + col1 * + col1 + col1 * - cor0.col0 FROM tab2 AS cor0
----
-1029
-1096
769

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

query I rowsort
SELECT - 47 * - col1 AS col2 FROM tab2 cor0
----
1457
2773
799

onlyif mysql # use DIV operator for integer division
query I rowsort label-1616
SELECT + cor0.col1 DIV + col1 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-1616
SELECT + cor0.col1 / + col1 col1 FROM tab1 AS cor0
----
1
1
1

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1618
SELECT DISTINCT - - cor0.col0 * col2 * 23 + + col2 DIV col1 AS col2 FROM tab1 cor0
----
176647
3728
83909

skipif mysql # not compatible
query I rowsort label-1618
SELECT DISTINCT - - cor0.col0 * col2 * 23 + + col2 / col1 AS col2 FROM tab1 cor0
----
176647
3728
83909

query I rowsort
SELECT ALL - + 53 + col2 AS col1 FROM tab0 cor0
----
-20
-52
29

query I rowsort
SELECT DISTINCT + 39 + + col2 AS col1 FROM tab2 AS cor0
----
65
66
77

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

query I rowsort
SELECT 33 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 76da8bc7cae18ecf856438f872430c80

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1625
SELECT ALL - col2 DIV tab1.col1 col0 FROM tab1
----
-2
-5
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1625
SELECT ALL - col2 / tab1.col1 col0 FROM tab1
----
-2
-5
-7

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

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

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

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

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT NULL BETWEEN NULL AND NULL AND ( + col2 ) NOT IN ( + col0 * col1 )
----

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

query IIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 cor0 JOIN tab2 ON NULL <> NULL
----

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * - col1 + col2 col1 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT ALL col2 + - cor0.col0 * col0 FROM tab0 AS cor0
----
-1224
-543
-7839

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * - cor0.col2 + cor0.col0 col0 FROM tab1 AS cor0
----
2919
3313
9296

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

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

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

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

query I rowsort
SELECT ALL - col0 + col2 * + col2 AS col2 FROM tab1 AS cor0
----
2913
3185
9136

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

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

query I rowsort
SELECT ALL - - cor0.col1 * col1 - - col0 * col1 FROM tab1 AS cor0
----
1209
740
754

query I rowsort
SELECT ALL - + cor0.col0 * col2 * col1 + - col2 FROM tab1 AS cor0
----
-36537
-4266
-99936

query I rowsort
SELECT DISTINCT + 84 + - tab2.col0 * - col2 FROM tab2
----
2112
273
3086

query I rowsort
SELECT ALL - col2 + - col1 * col1 * col2 FROM tab2 AS cor0
----
-11020
-25974
-90532

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 * - cor0.col2 - col1 * - cor0.col2 col2 FROM tab1 cor0
----
10464
3819
4320

query I rowsort
SELECT DISTINCT + 28 * - col1 AS col0 FROM tab0 AS cor0
----
-2408
-2548
-2716

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1655
SELECT DISTINCT + col1 * - col2 + + col2 DIV col0 + cor0.col2 AS col1 FROM tab1 AS cor0
----
-1151
-1332
-513

skipif mysql # not compatible
query I rowsort label-1655
SELECT DISTINCT + col1 * - col2 + + col2 / col0 + cor0.col2 AS col1 FROM tab1 AS cor0
----
-1151
-1332
-513

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1658
SELECT DISTINCT col2 * col1 + - col1 DIV - col2 col1 FROM tab0
----
194
2840
7463

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1658
SELECT DISTINCT col2 * col1 + - col1 / - col2 col1 FROM tab0
----
194
2840
7463

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE ( col2 ) = - col0
----

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

query I rowsort
SELECT col1 + - col2 * - col1 * + col2 AS col1 FROM tab0
----
194
611975
93740

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

query I rowsort
SELECT ALL - col0 FROM tab1 WHERE col0 IN ( + col0 )
----
-3
-64
-80

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT col0 * - col0 IN ( col1 * + col1 * + col0 + - col2 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

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

query I rowsort
SELECT ALL - col1 + + tab2.col2 * col0 FROM tab2
----
158
1969
2985

query I rowsort
SELECT - tab2.col2 + col1 * + tab2.col0 AS col1 FROM tab2 WHERE NULL BETWEEN ( col2 ) AND NULL
----

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + col2 col1 FROM tab1
----
108
114
192

query I rowsort
SELECT DISTINCT - col0 * col0 + col1 * - col1 AS col0 FROM tab2
----
-1010
-6530
-9565

query I rowsort
SELECT col1 + + col1 + col2 * col0 AS col2 FROM tab2
----
2146
251
3036

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

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

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

query I rowsort
SELECT col2 * col0 * ( - col2 ) FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT DISTINCT + col2 FROM tab0 WHERE NOT NULL > + col2 * col0 + + col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * - col0 + + col2 * - tab0.col0 col1 FROM tab0
----
-14596
-1584
-70

query I rowsort
SELECT DISTINCT col2 FROM tab2 WHERE NOT NULL IN ( - col0 + col2 )
----

query I rowsort
SELECT DISTINCT col2 * + col1 * + col0 + + col2 FROM tab0
----
3396
664200
68145

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

query I rowsort
SELECT - col2 * col1 FROM tab1 WHERE NOT NULL > col1 - col0
----

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

query I rowsort
SELECT - col0 + - col2 - + col1 AS col1 FROM tab0
----
-133
-143
-262

query I rowsort
SELECT - col1 * - col0 + + col0 + cor0.col1 * - col0 AS col0 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-1685
SELECT DISTINCT col1 DIV - col2 + - col2 DIV - col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-1685
SELECT DISTINCT col1 / - col2 + - col2 / - col1 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT col1 * + col2 + + col1 FROM tab0 AS cor0
----
194
2924
7553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 - + col2 col0 FROM tab1 AS cor0
----
-109
-67
-80

query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 WHERE NULL IN ( - col1 * - col0 + col0 * + cor0.col0 )
----

query I rowsort
SELECT ALL col1 * col2 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT + col1 * col1 + - col0 FROM tab1 AS cor0
----
36
673
89

query I rowsort
SELECT ALL - col2 - + col2 FROM tab0
----
-164
-2
-66

query I rowsort
SELECT DISTINCT col0 + col0 + - col0 AS col1 FROM tab1
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col1 * col0 + + tab1.col0 col0 FROM tab1
----
1120
704
81

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE + col1 * - col1 + col0 + - col2 <> - col0
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT DISTINCT tab0.col0 * col2 + col0 * + col0 AS col2 FROM tab0
----
1260
1368
15219

query I rowsort
SELECT col0 - + col0 * col1 FROM tab0
----
-2040
-3360
-8010

query I rowsort
SELECT ALL - col1 * + col0 * col2 FROM tab0
----
-3395
-664118
-68112

query I rowsort
SELECT DISTINCT - tab2.col1 + - col0 * + col1 AS col0 FROM tab2
----
-1360
-248
-4661

query I rowsort
SELECT - tab0.col0 * - col0 + col1 AS col0 FROM tab0
----
1322
662
8012

query I rowsort
SELECT ALL - tab2.col0 * tab2.col1 * tab2.col1 FROM tab2
----
-22831
-271518
-6727

query I rowsort
SELECT DISTINCT + col2 * + col1 * + col2 AS col2 FROM tab1
----
119808
32490
75816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * - col1 col0 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - col2 + - col2 * - tab0.col2 AS col2 FROM tab0
----
0
1056
6642

query I rowsort
SELECT - col1 * + col0 + - col2 + col0 FROM tab1 AS cor0
----
-1056
-129
-633

query I rowsort
SELECT - col0 * col1 + - col0 AS col1 FROM tab0
----
-2088
-3430
-8188

query I rowsort
SELECT + col0 * - tab1.col0 + col2 FROM tab1
----
-4039
-6304
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col0 col0 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT 77 AS col2 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-1709
SELECT 74 DIV cor0.col0 FROM tab0 AS cor0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-1709
SELECT 74 / cor0.col0 FROM tab0 AS cor0
----
0
2
3

query I rowsort
SELECT DISTINCT - col2 + + col1 * col2 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT + + col2 - - col1 AS col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT + tab1.col1 * + col1 AS col1 FROM tab1
----
100
169
676

query I rowsort
SELECT DISTINCT - 4 * tab1.col1 AS col0 FROM tab1
----
-104
-40
-52

onlyif mysql # use DIV operator for integer division
query I rowsort label-1714
SELECT - col2 + col0 DIV - col0 col0 FROM tab0 AS cor0
----
-2
-34
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1714
SELECT - col2 + col0 / - col0 col0 FROM tab0 AS cor0
----
-2
-34
-83

query I rowsort
SELECT ALL - 13 AS col1 FROM tab1
----
-13
-13
-13

query I rowsort
SELECT ALL + col0 * - tab2.col1 AS col0 FROM tab2
----
-1343
-217
-4602

skipif mysql # not compatible
query I rowsort
SELECT col2 * CAST ( - col1 AS REAL ) FROM tab0
----
-2838
-7462
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + ( col0 ) col2 FROM tab0 AS cor0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col0 * + col2 col0 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT - col1 * cor0.col2 * - col2 FROM tab2 AS cor0
----
22599
24548
39884

query I rowsort
SELECT + 66 AS col0 FROM tab0 AS cor0
----
66
66
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * - cor0.col2 + cor0.col0 col1 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT ALL ( + 7 ) + col2 * + cor0.col2 FROM tab0 AS cor0
----
1096
6731
8

query I rowsort
SELECT - + cor0.col1 + 60 FROM tab0 AS cor0
----
-26
-31
-37

query I rowsort
SELECT DISTINCT - - cor0.col2 * + ( - col2 ) FROM tab1 AS cor0
----
-2916
-3249
-9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 41 col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 5b18986bb294412b3d9f07b7e6fc821e

query I rowsort
SELECT ALL col0 * + col2 * + col0 FROM tab1
----
233472
486
614400

query I rowsort
SELECT + - 55 FROM tab0, tab2, tab1 cor0
----
27 values hashing to b90e74bece5521b514096c5b6e105fde

query I rowsort
SELECT DISTINCT ( col0 + col1 ) FROM tab1
----
29
74
93

query I rowsort
SELECT col1 - 78 AS col2 FROM tab1
----
-52
-65
-68

query I rowsort
SELECT 61 * + col2 AS col1 FROM tab2 cor0
----
1586
1647
2318

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1732
SELECT - col0 * - col0 + CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1732
SELECT - col0 * - col0 + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 45 * 60 FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to ee2c7dd9dc2fb0bca99b57eeb94d7e8c

query I rowsort
SELECT DISTINCT - cor0.col0 + - 60 AS col0 FROM tab2, tab0 AS cor0
----
-149
-84
-95

query I rowsort
SELECT - col0 * + col2 + - col1 FROM tab0 AS cor0
----
-132
-7389
-878

query I rowsort
SELECT DISTINCT - - 9 * col2 AS col0 FROM tab1 AS cor0
----
486
513
864

query I rowsort
SELECT DISTINCT + - 75 + col2 * ( + cor0.col2 ) AS col1 FROM tab2 AS cor0
----
1369
601
654

query I rowsort
SELECT ALL - col0 + + col1 FROM tab2 cor0
----
-19
-62
24

query I rowsort
SELECT ALL + + 19 * + col0 AS col1 FROM tab0 AS cor0
----
1691
456
665

query I rowsort
SELECT DISTINCT + 51 FROM tab1 AS cor0
----
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 58 + - col1 col2 FROM tab0 AS cor0
----
-28
-33
-39

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 DISTINCT - ( cor0.col1 ) AS col1 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT - 62 + + col2 + col1 FROM tab0 AS cor0
----
111
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-1745
SELECT ALL + + 55 + col2 DIV col0 FROM tab0 AS cor0
----
55
55
56

skipif mysql # not compatible
query I rowsort label-1745
SELECT ALL + + 55 + col2 / col0 FROM tab0 AS cor0
----
55
55
56

query I rowsort
SELECT + + col1 + + cor0.col0 AS col2 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT col2 + 0 + col2 AS col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT - - col1 * - 81 FROM tab0 cor0
----
-6966
-7371
-7857

onlyif mysql # use DIV operator for integer division
query I rowsort label-1749
SELECT - - col1 DIV 71 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1749
SELECT - - col1 / 71 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1750
SELECT - cor0.col0 DIV col1 + + cor0.col2 AS col1 FROM tab1 AS cor0
----
51
54
90

skipif mysql # not compatible
query I rowsort label-1750
SELECT - cor0.col0 / col1 + + cor0.col2 AS col1 FROM tab1 AS cor0
----
51
54
90

query I rowsort
SELECT DISTINCT + col1 * + cor0.col1 * + cor0.col0 AS col0 FROM tab1 AS cor0
----
13520
2028
6400

query I rowsort
SELECT col0 * ( + col0 ) FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT ALL + 73 * col2 FROM tab2 AS cor0
----
1898
1971
2774

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1754
SELECT CAST( ( col2 ) AS SIGNED ) * + col1 col2 FROM tab1 AS cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1754
SELECT CAST ( ( col2 ) AS INTEGER ) * + col1 col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + col0 + + col0 + cor0.col0 AS col0 FROM tab2 AS cor0
----
21
234
237

query I rowsort
SELECT cor0.col2 + - col0 * col1 AS col0 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT + 64 * 36 FROM tab2, tab2 AS cor0, tab0, tab2 cor1
----
81 values hashing to 01f4df4ddc24078873a0878df8d63385

query I rowsort
SELECT ALL + 87 + 22 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 75d8c4a7dcf2a4283954a2a59f1d80d6

query I rowsort
SELECT DISTINCT col0 + col2 * + col2 AS col0 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT ALL - + cor0.col2 * - ( - col2 ) * + col2 + col1 * col1 * col0 AS col2 FROM tab0 AS cor0
----
141567
185641
329314

skipif mysql # not compatible
query I rowsort
SELECT ALL + col1 + CAST ( col2 AS REAL ) AS col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT - col2 * ( 24 + + col1 ) AS col1 FROM tab0 AS cor0
----
-121
-3630
-9430

query I rowsort
SELECT ALL - col0 * - ( + col2 ) * col1 + - 17 AS col2 FROM tab2 AS cor0
----
119635
51017
5842

query I rowsort
SELECT DISTINCT - col0 + - col0 AS col1 FROM tab1 cor0
----
-128
-160
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-1765
SELECT DISTINCT + + col0 DIV cor0.col2 + - col1 FROM tab0 AS cor0
----
-62
-86
-90

skipif mysql # not compatible
query I rowsort label-1765
SELECT DISTINCT + + col0 / cor0.col2 + - col1 FROM tab0 AS cor0
----
-62
-86
-90

query I rowsort
SELECT ALL + + col0 * - 24 FROM tab1 AS cor0
----
-1536
-1920
-72

query I rowsort
SELECT + col0 * 8 + col1 AS col2 FROM tab0 cor0
----
278
377
803

query I rowsort
SELECT ALL + 30 * col1 + ( + col0 ) * - col2 + ( col1 ) AS col0 FROM tab0
----
-4477
1874
2972

onlyif mysql # use DIV operator for integer division
query I rowsort label-1769
SELECT ALL - col0 + col2 DIV col1 FROM tab2
----
-7
-77
-78

skipif mysql # not compatible
query I rowsort label-1769
SELECT ALL - col0 + col2 / col1 FROM tab2
----
-7
-77
-78

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab0 cor2
----
972 values hashing to 9a5ab925af18e11f7748f3b2e722ff3d

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1771
SELECT DISTINCT - col1 * CAST( col2 + col0 AS SIGNED ) col1 FROM tab2
----
-1054
-1989
-6136

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1771
SELECT DISTINCT - col1 * CAST ( col2 + col0 AS INTEGER ) col1 FROM tab2
----
-1054
-1989
-6136

query I rowsort
SELECT 39 AS col0 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to ed2ebd9def3e2c38aa46cb3af60fe229

onlyif mysql # use DIV operator for integer division
query I rowsort label-1773
SELECT ALL + cor0.col0 DIV + col2 AS col1 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-1773
SELECT ALL + cor0.col0 / + col2 AS col1 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT ALL - col2 + 13 FROM tab1 cor0
----
-41
-44
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * col0 col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT 20 FROM tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab2 AS cor2, tab1 AS cor3
----
243 values hashing to 783fdb6630589eb0fa4e0c57a7c774ac

query I rowsort
SELECT + - cor0.col0 * + ( col2 ) FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT + col2 + - col2 * col2 AS col0 FROM tab2 AS cor0
----
-1406
-650
-702

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1779
SELECT - + col1 * + col1 + + col2 * CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1779
SELECT - + col1 * + col1 + + col2 * CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1780
SELECT - col2 - 88 * col1 * + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1780
SELECT - col2 - 88 * col1 * + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + cor0.col1 col1 FROM tab2 AS cor0
----
118
34
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + col2 col1 FROM tab0 cor0
----
164
2
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - col2 col0 FROM tab0
----
-9
34
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-1784
SELECT - col1 DIV col1 + col0 AS col0 FROM tab0 cor0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-1784
SELECT - col1 / col1 + col0 AS col0 FROM tab0 cor0
----
23
34
88

query I rowsort
SELECT DISTINCT - + col1 * col0 + + col1 FROM tab2 cor0
----
-1326
-186
-4543

onlyif mysql # use DIV operator for integer division
query I rowsort label-1786
SELECT ALL + - 12 DIV col1 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-1786
SELECT ALL + - 12 / col1 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT + - col1 * + col2 + 71 * - cor0.col1 FROM tab0 cor0
----
-13923
-6984
-8944

onlyif mysql # use DIV operator for integer division
query I rowsort label-1788
SELECT DISTINCT + col1 + col1 DIV col2 - col0 * col0 FROM tab1 AS cor0
----
-4086
-6387
17

skipif mysql # not compatible
query I rowsort label-1788
SELECT DISTINCT + col1 + col1 / col2 - col0 * col0 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT + col1 * - col1 + - col2 * - col2 AS col2 FROM tab1 AS cor0
----
2240
3149
9047

query I rowsort
SELECT + cor0.col2 + col0 * - ( col2 ) FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT DISTINCT - col2 * col0 - + 15 AS col1 FROM tab1 cor0
----
-177
-3663
-7695

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 + + col1 * - col0 col2 FROM tab1 AS cor0
----
-104
-1053
-650

onlyif mysql # use DIV operator for integer division
query I rowsort label-1793
SELECT ALL + col2 * - col2 DIV col2 - + col0 col2 FROM tab0 AS cor0
----
-171
-36
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1793
SELECT ALL + col2 * - col2 / col2 - + col0 col2 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT DISTINCT - + col0 * col1 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + 59 * + col1 FROM tab2 AS cor0
----
1003
1829
3481

query I rowsort
SELECT DISTINCT + - col0 - cor0.col2 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT + ( - col0 ) * + col2 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL - - ( + col1 ) * cor0.col1 AS col0 FROM tab2 AS cor0
----
289
3481
961

onlyif mysql # use DIV operator for integer division
query I rowsort label-1799
SELECT + col2 DIV col1 + col1 * - cor0.col2 AS col2 FROM tab2 AS cor0
----
-1534
-644
-837

skipif mysql # not compatible
query I rowsort label-1799
SELECT + col2 / col1 + col1 * - cor0.col2 AS col2 FROM tab2 AS cor0
----
-1534
-644
-837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1800
SELECT - 79 * - col1 + + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1800
SELECT - 79 * - col1 + + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1801
SELECT DISTINCT - - col2 - 74 * col2 DIV - cor0.col2 AS col0 FROM tab0 AS cor0
----
107
156
75

skipif mysql # not compatible
query I rowsort label-1801
SELECT DISTINCT - - col2 - 74 * col2 / - cor0.col2 AS col0 FROM tab0 AS cor0
----
107
156
75

query I rowsort
SELECT ALL cor0.col1 - 26 * 30 AS col0 FROM tab2 AS cor0
----
-721
-749
-763

query I rowsort
SELECT ALL + col1 + - col1 + - 10 FROM tab0 AS cor0
----
-10
-10
-10

query I rowsort
SELECT DISTINCT col1 - + ( col2 ) AS col2 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT col2 * + 74 + + col2 AS col0 FROM tab0 cor0
----
2475
6150
75

query I rowsort
SELECT - col1 * + col0 + + col1 FROM tab1 AS cor0
----
-1027
-52
-630

onlyif mysql # use DIV operator for integer division
query I rowsort label-1807
SELECT ALL + ( tab2.col1 ) * - ( + col1 ) + + col2 DIV + ( col0 * - col1 ) FROM tab2
----
-289
-3481
-961

skipif mysql # not compatible
query I rowsort label-1807
SELECT ALL + ( tab2.col1 ) * - ( + col1 ) + + col2 / + ( col0 * - col1 ) FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT DISTINCT - 7 + col2 FROM tab1
----
47
50
89

query I rowsort
SELECT + - 85 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 8ebc8ffafb1517ea04e3a6fc4059d88a

query I rowsort
SELECT DISTINCT - col2 * - cor0.col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - - cor0.col1 * 29 AS col2 FROM tab1 AS cor0
----
290
377
754

onlyif mysql # use DIV operator for integer division
query I rowsort label-1812
SELECT ALL + cor0.col0 DIV + 91 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

skipif mysql # not compatible
query I rowsort label-1812
SELECT ALL + cor0.col0 / + 91 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * col1 col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - + cor0.col2 + ( + col0 ) AS col1 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT + - 81 + col0 * col0 AS col2 FROM tab1 cor0
----
-72
4015
6319

query I rowsort
SELECT ALL + 52 * col1 FROM tab1 AS cor0
----
1352
520
676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 14 + + col2 col1 FROM tab1 AS cor0
----
110
68
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-1818
SELECT - 50 DIV col1 AS col1 FROM tab2 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-1818
SELECT - 50 / col1 AS col1 FROM tab2 AS cor0
----
-1
-2
0

query I rowsort
SELECT - col1 + + ( - col2 ) + col1 FROM tab2
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-1820
SELECT col2 + + col2 DIV - 19 col0 FROM tab2 cor0
----
25
26
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1820
SELECT col2 + + col2 / - 19 col0 FROM tab2 cor0
----
25
26
36

query I rowsort
SELECT ALL + - 84 FROM tab1 AS cor0
----
-84
-84
-84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1822
SELECT + ( - col2 ) * + ( col1 ) - col2 * + CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1822
SELECT + ( - col2 ) * + ( col1 ) - col2 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ( col0 ) + 73 AS col0 FROM tab2 cor0
----
151
152
80

query I rowsort
SELECT col1 + col1 + - col2 FROM tab2
----
-4
35
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 0 col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

onlyif mysql # use DIV operator for integer division
query I rowsort label-1826
SELECT ( col0 + - col2 ) * + tab2.col0 DIV col0 AS col0 FROM tab2
----
-20
41
52

skipif mysql # not compatible
query I rowsort label-1826
SELECT ( col0 + - col2 ) * + tab2.col0 / col0 AS col0 FROM tab2
----
-20
41
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + 4 col0 FROM tab0 AS cor0
----
37
5
86

query I rowsort
SELECT + col2 * ( col2 ) AS col0 FROM tab2 AS cor0
----
1444
676
729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1829
SELECT + + CAST( col1 AS SIGNED ) AS col2 FROM tab1 cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-1829
SELECT + + CAST ( col1 AS INTEGER ) AS col2 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT DISTINCT + - 40 AS col1 FROM tab0 cor0
----
-40

query I rowsort
SELECT 40 FROM tab1, tab1 cor0
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

query I rowsort
SELECT + 0 + + col1 * - col1 * + 71 AS col1 FROM tab2 cor0
----
-20519
-247151
-68231

query I rowsort
SELECT ( + col1 ) * 4 FROM tab0
----
344
364
388

query I rowsort
SELECT 1 + col1 * col1 FROM tab1 AS cor0
----
101
170
677

query I rowsort
SELECT - ( - col1 ) AS col1 FROM tab1
----
10
13
26

query I rowsort
SELECT ALL - + cor0.col1 * - 72 FROM tab1, tab2 cor0
----
9 values hashing to 1bad8c8491d79cb604cc0ab815936781

query I rowsort
SELECT + + 92 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to c64cb7a81da51f4be0b6906a223e8817

query I rowsort
SELECT ALL - cor0.col1 + col2 * - col2 FROM tab0 cor0
----
-1175
-6815
-98

query I rowsort
SELECT - col0 * - col2 * + 49 FROM tab1
----
178752
376320
7938

query I rowsort
SELECT + 94 * - tab0.col1 FROM tab0
----
-8084
-8554
-9118

query I rowsort
SELECT - col2 * ( col0 ) AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL - col0 * 22 AS col2 FROM tab2 AS cor0
----
-154
-1716
-1738

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1843
SELECT DISTINCT - cor0.col1 * + CAST( 75 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-1275
-2325
-4425

skipif mysql # not compatible
query I rowsort label-1843
SELECT DISTINCT - cor0.col1 * + CAST ( 75 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-1275
-2325
-4425

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + + cor0.col1 col1 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT - col1 + ( col0 ) + col0 FROM tab2 AS cor0
----
-17
141
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 * cor0.col2 + + col0 col2 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT ALL - col0 + col1 * cor0.col0 FROM tab0 AS cor0
----
2040
3360
8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-1848
SELECT - - col2 DIV + ( col1 ) FROM tab2 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-1848
SELECT - - col2 / + ( col1 ) FROM tab2 AS cor0
----
0
0
2

query I rowsort
SELECT ALL ( col1 ) - - col2 AS col1 FROM tab0
----
119
173
98

query I rowsort
SELECT 57 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 61da70c624ad60604a668f7f8f29392a

query I rowsort
SELECT ALL col1 + col2 * ( - col2 ) * - col1 + col1 AS col1 FROM tab1
----
119834
32510
75868

query I rowsort
SELECT ALL col0 + 16 + tab1.col0 FROM tab1
----
144
176
22

query I rowsort
SELECT DISTINCT col1 * ( - col1 ) FROM tab1
----
-100
-169
-676

query I rowsort
SELECT + col1 + - ( - col0 ) AS col0 FROM tab2
----
137
38
96

query I rowsort
SELECT DISTINCT + col0 + 12 * - col2 * tab2.col0 + + col2 AS col0 FROM tab2
----
-2234
-24232
-35907

onlyif mysql # use DIV operator for integer division
query I rowsort label-1856
SELECT ALL - col1 * - col2 + 32 * col2 DIV col2 + col0 FROM tab1
----
1360
1439
666

skipif mysql # not compatible
query I rowsort label-1856
SELECT ALL - col1 * - col2 + 32 * col2 / col2 + col0 FROM tab1
----
1360
1439
666

query I rowsort
SELECT col2 + + 27 FROM tab2
----
53
54
65

query I rowsort
SELECT ALL tab0.col1 * - 60 + - col2 AS col1 FROM tab0
----
-5193
-5542
-5821

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 60 col0 FROM tab0, tab1, tab2 AS cor0, tab2
----
81 values hashing to 1ef27a1d2784b3ab642571630db70349

query I rowsort
SELECT - col0 * cor0.col1 + 77 FROM tab1 AS cor0
----
-1
-563
-963

query I rowsort
SELECT DISTINCT - 48 AS col2 FROM tab2 AS cor0
----
-48

query I rowsort
SELECT DISTINCT - 64 + + col2 AS col2 FROM tab1 cor0
----
-10
-7
32

query I rowsort
SELECT ALL - + col2 * + col0 + - 38 * col0 FROM tab1 AS cor0
----
-10720
-276
-6080

query I rowsort
SELECT + col0 + - 62 AS col1 FROM tab0
----
-27
-38
27

query I rowsort
SELECT col2 * 7 - - col1 FROM tab1
----
404
409
685

query I rowsort
SELECT ALL - 46 FROM tab1, tab2 AS cor0
----
9 values hashing to 491ad1fb79fec0b5715ea54949d1aa2d

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1867
SELECT col0 * + col0 + - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1867
SELECT col0 * + col0 + - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 42 + - col2 col2 FROM tab2 AS cor0
----
15
16
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1869
SELECT - col2 + + col2 * CAST( 23 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
1188
1254
2112

skipif mysql # not compatible
query I rowsort label-1869
SELECT - col2 + + col2 * CAST ( 23 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
1188
1254
2112

query I rowsort
SELECT 55 * col2 - + ( - ( - col2 ) ) FROM tab0 AS cor0
----
1782
4428
54

onlyif mysql # use DIV operator for integer division
query I rowsort label-1871
SELECT - col0 + col0 * 43 DIV 73 + col1 * - ( 52 ) AS col1 FROM tab1 AS cor0
----
-1354
-547
-709

skipif mysql # not compatible
query I rowsort label-1871
SELECT - col0 + col0 * 43 / 73 + col1 * - ( 52 ) AS col1 FROM tab1 AS cor0
----
-1354
-547
-709

query I rowsort
SELECT ALL + ( + cor0.col0 ) - + col0 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT cor0.col0 * col1 + - ( col1 ) * - col2 + - ( ( col1 ) + + col1 ) FROM tab2 cor0
----
1955
6018
992

query I rowsort
SELECT DISTINCT + col1 + - col1 * cor0.col0 AS col1 FROM tab1 cor0
----
-1027
-52
-630

query I rowsort
SELECT + col0 - - col0 * - ( col2 * col0 ) AS col0 FROM tab0 AS cor0
----
-1190
-18984
-649433

query I rowsort
SELECT 58 + col1 AS col2 FROM tab1 AS cor0
----
68
71
84

query I rowsort
SELECT - col0 * col2 * + col2 FROM tab2 cor0
----
-114076
-5103
-52728

query I rowsort
SELECT + + cor0.col0 - + col2 FROM tab0 cor0
----
-9
34
7

query I rowsort
SELECT + 99 - col1 FROM tab0 AS cor0
----
13
2
8

query I rowsort
SELECT ALL - ( + col2 ) + col0 * col1 AS col1 FROM tab2 AS cor0
----
1305
190
4576

query I rowsort
SELECT DISTINCT col0 * - col0 * col2 FROM tab2 AS cor0
----
-1323
-158184
-237158

query I rowsort
SELECT - - 67 * col0 + + col2 AS col1 FROM tab2 AS cor0
----
496
5252
5331

query I rowsort
SELECT ALL - - 39 * - col1 FROM tab2 AS cor0
----
-1209
-2301
-663

query I rowsort
SELECT ALL + - 20 + - cor0.col0 FROM tab0 AS cor0
----
-109
-44
-55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + + col0 * - col0 col2 FROM tab1 cor0
----
-4086
-6387
17

query I rowsort
SELECT + - col1 * col0 + col1 FROM tab0 cor0
----
-1978
-3298
-8008

query I rowsort
SELECT ALL + - 44 + col1 AS col2 FROM tab1 AS cor0
----
-18
-31
-34

onlyif mysql # use DIV operator for integer division
query I rowsort label-1888
SELECT 31 + - cor0.col0 DIV - ( col1 + col0 * + col2 ) FROM tab1 AS cor0
----
31
31
31

skipif mysql # not compatible
query I rowsort label-1888
SELECT 31 + - cor0.col0 / - ( col1 + col0 * + col2 ) FROM tab1 AS cor0
----
31
31
31

query I rowsort
SELECT ALL - col2 + col0 + col2 AS col1 FROM tab0 AS cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-1890
SELECT DISTINCT - - col2 - - cor0.col1 DIV + col1 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-1890
SELECT DISTINCT - - col2 - - cor0.col1 / + col1 FROM tab0 AS cor0
----
2
34
83

query I rowsort
SELECT ALL + - 54 + col2 AS col1 FROM tab1 AS cor0
----
0
3
42

query I rowsort
SELECT DISTINCT - cor0.col0 * col2 + 44 FROM tab1 AS cor0
----
-118
-3604
-7636

query I rowsort
SELECT ALL + col0 * - col2 + col1 AS col2 FROM tab0
----
-706
-7207
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1894
SELECT ALL - ( col2 ) * tab2.col1 + + CAST( NULL AS DECIMAL ) AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1894
SELECT ALL - ( col2 ) * tab2.col1 + + CAST ( NULL AS REAL ) AS col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT 55 + 4 AS col1 FROM tab1
----
59
59
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + 3 col1 FROM tab0
----
36
4
85

query I rowsort
SELECT DISTINCT + 56 + 64 FROM tab2
----
120

query I rowsort
SELECT - 71 * + col0 - col0 * col2 AS col1 FROM tab1
----
-13360
-375
-8192

query I rowsort
SELECT DISTINCT + + cor0.col1 + 15 FROM tab2 AS cor0
----
32
46
74

query I rowsort
SELECT DISTINCT - + col1 * - col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + - col0 * - ( - col2 ) FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1902
SELECT ALL col1 + - CAST( NULL AS SIGNED ) * + cor0.col0 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-1902
SELECT ALL col1 + - CAST ( NULL AS INTEGER ) * + cor0.col0 col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1903
SELECT DISTINCT + col0 * CAST( - col0 * col2 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-1225
-19008
-649522

skipif mysql # not compatible
query I rowsort label-1903
SELECT DISTINCT + col0 * CAST ( - col0 * col2 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-1225
-19008
-649522

onlyif mysql # use DIV operator for integer division
query I rowsort label-1904
SELECT col1 - CAST( col1 AS SIGNED ) DIV col0 col2 FROM tab2 AS cor0
----
17
27
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1904
SELECT col1 - CAST ( col1 AS INTEGER ) / col0 col2 FROM tab2 AS cor0
----
17
27
59

query I rowsort
SELECT + + col1 - + ( + col1 + cor0.col0 ) AS col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL - + col1 + 5 AS col0 FROM tab2 AS cor0
----
-12
-26
-54

query I rowsort
SELECT DISTINCT + col2 * col2 * - col1 FROM tab0 AS cor0
----
-611884
-93654
-97

query I rowsort
SELECT ALL col1 + cor0.col1 * - col1 FROM tab1 AS cor0
----
-156
-650
-90

query I rowsort
SELECT - col1 - ( + col0 ) * col1 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT DISTINCT + + col2 + col1 * ( - col0 ) FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT - ( col0 ) - - col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - tab0.col1 * + 20 - + col0 FROM tab0
----
-1744
-1909
-1975

query I rowsort
SELECT ALL col1 * + col2 * 73 FROM tab2 AS cor0
----
111982
47158
61101

query I rowsort
SELECT DISTINCT - cor0.col1 * ( 27 ) AS col1 FROM tab2 AS cor0
----
-1593
-459
-837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1915
SELECT DISTINCT col2 + CAST( NULL AS SIGNED ) * + tab1.col0 col0 FROM tab1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1915
SELECT DISTINCT col2 + CAST ( NULL AS INTEGER ) * + tab1.col0 col0 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort
SELECT CAST ( + cor0.col1 AS REAL ) AS col1 FROM tab1, tab1 cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT ALL - 67 FROM tab0, tab2 AS cor0
----
9 values hashing to fbe03b15d6b951410b38f7e98895006f

onlyif mysql # use DIV operator for integer division
query I rowsort label-1918
SELECT DISTINCT - col1 DIV ( + col1 ) + + col1 FROM tab1
----
12
25
9

skipif mysql # not compatible
query I rowsort label-1918
SELECT DISTINCT - col1 / ( + col1 ) + + col1 FROM tab1
----
12
25
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col2 * col0 - col2 * - 85 col2 FROM tab2 AS cor0
----
182
2106
228

query I rowsort
SELECT DISTINCT 58 AS col0 FROM tab2, tab0 AS cor0
----
58

query I rowsort
SELECT + - col1 + - col0 * + col2 + + col0 * + col0 * col0 FROM tab0 AS cor0
----
12946
42743
697580

query I rowsort
SELECT + 55 + col2 * + col0 FROM tab1 AS cor0
----
217
3703
7735

query I rowsort
SELECT - col2 * + 17 - col2 FROM tab2 cor0
----
-468
-486
-684

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( - 14 AS REAL ) + tab2.col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 5ae2bd83f81f991899cb411f09518787

query I rowsort
SELECT + col0 * + ( col0 ) + tab1.col2 FROM tab1
----
4153
63
6496

query I rowsort
SELECT col2 + - 68 + 31 FROM tab0
----
-36
-4
45

query I rowsort
SELECT + col1 * col2 * + tab1.col2 FROM tab1
----
119808
32490
75816

query I rowsort
SELECT - 32 AS col2 FROM tab2, tab2 AS cor0 CROSS JOIN tab0
----
27 values hashing to 7106326ae056e78044adc0aef747ef08

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 42 ) + col2 col0 FROM tab0 AS cor0
----
-41
-9
40

query I rowsort
SELECT ALL + col2 * + col1 + col2 * - col0 FROM tab2 AS cor0
----
-2356
-494
648

query I rowsort
SELECT - - 5 * 70 - - cor0.col2 * 96 FROM tab2 AS cor0
----
2846
2942
3998

query I rowsort
SELECT 60 * - cor0.col1 AS col2 FROM tab1 AS cor0
----
-1560
-600
-780

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab1, tab2 AS cor0 CROSS JOIN tab2, tab1 AS cor1
----
81 values hashing to 05835f29dd9cd4fa16889de54dec3cb6

query I rowsort
SELECT DISTINCT + col0 * - 14 AS col2 FROM tab2 AS cor0
----
-1092
-1106
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + cor0.col0 + 86 col2 FROM tab0 AS cor0
----
-3
51
62

query I rowsort
SELECT DISTINCT + ( - 55 ) FROM tab1 AS cor0
----
-55

query I rowsort
SELECT ALL + - 37 * + col1 AS col1 FROM tab1 AS cor0
----
-370
-481
-962

query I rowsort
SELECT - 86 * col1 FROM tab0 AS cor0
----
-7396
-7826
-8342

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 49 col2 FROM tab0 AS cor0
----
49

query I rowsort
SELECT + + col0 * col1 + + col1 AS col2 FROM tab1 AS cor0
----
104
1053
650

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1941
SELECT ALL cor0.col1 * + col0 + - CAST( - col0 AS SIGNED ) FROM tab0 AS cor0
----
2088
3430
8188

skipif mysql # not compatible
query I rowsort label-1941
SELECT ALL cor0.col1 * + col0 + - CAST ( - col0 AS INTEGER ) FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT + 78 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to d8e5ef4db3419fc251e82c50ba04e048

onlyif mysql # use DIV operator for integer division
query I rowsort label-1943
SELECT ALL col1 DIV - 77 AS col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1943
SELECT ALL col1 / - 77 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col0 * + ( col0 ) FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT - col1 + + ( - cor0.col1 ) AS col0 FROM tab1 cor0
----
-20
-26
-52

onlyif mysql # use DIV operator for integer division
query I rowsort label-1946
SELECT ALL - cor0.col0 DIV col1 FROM tab2 cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-1946
SELECT ALL - cor0.col0 / col1 FROM tab2 cor0
----
-1
-4
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col0 col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT 1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to da8a72a7967c0c73d91239275230aed9

query I rowsort
SELECT ALL + + 67 FROM tab1, tab2 AS cor0
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

query I rowsort
SELECT DISTINCT - 92 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
-92

query I rowsort
SELECT ALL - - col0 * col0 AS col2 FROM tab2 AS cor0
----
49
6084
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * col2 + - cor0.col0 col0 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT - - col1 + + cor0.col0 * col0 * + cor0.col0 AS col2 FROM tab0 AS cor0
----
13910
42972
705060

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1954
SELECT DISTINCT + col2 * CAST( NULL AS SIGNED ) * + col2 col1 FROM tab0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1954
SELECT DISTINCT + col2 * CAST ( NULL AS INTEGER ) * + col2 col1 FROM tab0
----
NULL

query I rowsort
SELECT + col2 * col1 + + col2 * cor0.col1 * - col2 FROM tab0 AS cor0
----
-604422
-90816
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1956
SELECT - col1 DIV cor0.col0 + + cor0.col1 AS col2 FROM tab0 AS cor0
----
83
90
95

skipif mysql # not compatible
query I rowsort label-1956
SELECT - col1 / cor0.col0 + + cor0.col1 AS col2 FROM tab0 AS cor0
----
83
90
95

query I rowsort
SELECT + - 6 * - col1 AS col1 FROM tab1 cor0
----
156
60
78

query I rowsort
SELECT 45 + + col2 FROM tab0 AS cor0
----
127
46
78

query I rowsort
SELECT col0 * cor0.col2 + col0 * col0 AS col2 FROM tab2 AS cor0
----
238
8112
9243

onlyif mysql # use DIV operator for integer division
query I rowsort label-1960
SELECT + 32 + col1 DIV - col1 FROM tab0 AS cor0
----
31
31
31

skipif mysql # not compatible
query I rowsort label-1960
SELECT + 32 + col1 / - col1 FROM tab0 AS cor0
----
31
31
31

query I rowsort
SELECT + ( 8 ) + + col1 FROM tab0 AS cor0
----
105
94
99

query I rowsort
SELECT ( - col1 ) * col0 + - col2 FROM tab2 AS cor0
----
-1381
-244
-4628

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1963
SELECT ALL col2 * CAST( col2 * col0 AS SIGNED ) AS col2 FROM tab1
----
207936
737280
8748

skipif mysql # not compatible
query I rowsort label-1963
SELECT ALL col2 * CAST ( col2 * col0 AS INTEGER ) AS col2 FROM tab1
----
207936
737280
8748

query I rowsort
SELECT ALL + tab0.col0 * col2 + - 20 FROM tab0
----
15
7278
772

query I rowsort
SELECT col2 * 72 FROM tab0
----
2376
5904
72

query I rowsort
SELECT ( 22 ) * col0 AS col0 FROM tab1 AS cor0
----
1408
1760
66

query I rowsort
SELECT + 93 * col2 AS col1 FROM tab0 AS cor0
----
3069
7626
93

query I rowsort
SELECT - ( - 30 ) * - col1 + col2 * + col0 FROM tab2 AS cor0
----
-741
2492
258

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1969
SELECT + CAST( NULL AS DECIMAL ) + 13 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1969
SELECT + CAST ( NULL AS REAL ) + 13 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1970
SELECT 32 + - col2 DIV col2 AS col2 FROM tab0 AS cor0
----
31
31
31

skipif mysql # not compatible
query I rowsort label-1970
SELECT 32 + - col2 / col2 AS col2 FROM tab0 AS cor0
----
31
31
31

query I rowsort
SELECT cor0.col0 * - col2 + col1 AS col2 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT + col1 * + 48 FROM tab0
----
4128
4368
4656

query I rowsort
SELECT ALL - + col1 + + 21 * - col0 AS col2 FROM tab1 AS cor0
----
-1354
-1693
-89

query I rowsort
SELECT ALL + ( 1 ) FROM tab2, tab1 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( - col0 ) col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT cor1.col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-1977
SELECT DISTINCT + 89 DIV + 99 + col0 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-1977
SELECT DISTINCT + 89 / + 99 + col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT 94 - col1 * - col2 * col2 AS col0 FROM tab1 AS cor0
----
119902
32584
75910

query I rowsort
SELECT ALL + col2 * - col2 FROM tab0 cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT - - 75 FROM tab1 AS cor0
----
75

query I rowsort
SELECT col0 * col0 * + col2 FROM tab2
----
1323
158184
237158

query I rowsort
SELECT ALL - col2 - - col1 * + col0 * - col2 AS col2 FROM tab2 AS cor0
----
-119678
-51072
-5886

query I rowsort
SELECT DISTINCT + 9 AS col2 FROM tab0 AS cor0
----
9

query I rowsort
SELECT col2 + + col1 * col0 AS col2 FROM tab2 cor0
----
1381
244
4628

query I rowsort
SELECT ALL 15 * col0 AS col1 FROM tab0 cor0
----
1335
360
525

onlyif mysql # use DIV operator for integer division
query I rowsort label-1986
SELECT DISTINCT + col2 * col0 DIV col0 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-1986
SELECT DISTINCT + col2 * col0 / col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL 24 + + 97 AS col0 FROM tab1
----
121
121
121

query I rowsort
SELECT - ( - col2 ) + col1 AS col2 FROM tab0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-1989
SELECT ALL - ( - 96 ) * + tab2.col1 + tab2.col0 DIV col1 FROM tab2
----
1636
2976
5665

skipif mysql # not compatible
query I rowsort label-1989
SELECT ALL - ( - 96 ) * + tab2.col1 + tab2.col0 / col1 FROM tab2
----
1636
2976
5665

query I rowsort
SELECT ( + col1 ) + - tab2.col2 * + col0 - col1 * + tab2.col1 FROM tab2
----
-1119
-3274
-5450

onlyif mysql # use DIV operator for integer division
query I rowsort label-1991
SELECT DISTINCT + tab0.col0 DIV + tab0.col0 col1 FROM tab0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1991
SELECT DISTINCT + tab0.col0 / + tab0.col0 col1 FROM tab0
----
1

query I rowsort
SELECT 54 * - col1 AS col0 FROM tab2
----
-1674
-3186
-918

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 45 col1 FROM tab2
----
45
45
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-1994
SELECT 78 DIV 9 - tab0.col2 AS col1 FROM tab0
----
-25
-74
7

skipif mysql # not compatible
query I rowsort label-1994
SELECT 78 / 9 - tab0.col2 AS col1 FROM tab0
----
-25
-74
7

query I rowsort
SELECT DISTINCT - col2 * 44 + + col2 * + col1 + col2 FROM tab0 AS cor0
----
1419
3936
54

query I rowsort
SELECT DISTINCT col1 + + ( - cor0.col1 ) * col2 FROM tab1 cor0
----
-1235
-1378
-560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1997
SELECT ALL - col2 * - CAST( - col1 AS SIGNED ) + + col1 AS col0 FROM tab1 AS cor0
----
-1235
-1378
-560

skipif mysql # not compatible
query I rowsort label-1997
SELECT ALL - col2 * - CAST ( - col1 AS INTEGER ) + + col1 AS col0 FROM tab1 AS cor0
----
-1235
-1378
-560

onlyif mysql # use DIV operator for integer division
query I rowsort label-1998
SELECT ALL col1 DIV col0 + + col0 * + col1 FROM tab0 AS cor0
----
2067
3397
8100

skipif mysql # not compatible
query I rowsort label-1998
SELECT ALL col1 / col0 + + col0 * + col1 FROM tab0 AS cor0
----
2067
3397
8100

onlyif mysql # use DIV operator for integer division
query I rowsort label-1999
SELECT - col1 DIV 90 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1999
SELECT - col1 / 90 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2000
SELECT ALL - + col0 * CAST( NULL AS SIGNED ) * - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2000
SELECT ALL - + col0 * CAST ( NULL AS INTEGER ) * - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * - ( 73 ) * col0 FROM tab0 cor0
----
-42048
-578233
-89425

onlyif mysql # use DIV operator for integer division
query I rowsort label-2002
SELECT ALL col2 DIV + col1 col1 FROM tab1
----
2
5
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2002
SELECT ALL col2 / + col1 col1 FROM tab1
----
2
5
7

query I rowsort
SELECT 37 AS col1 FROM tab1, tab2 AS cor0, tab0 cor1
----
27 values hashing to c023509f63faa044d654943e6df55ca2

query I rowsort
SELECT ALL tab2.col0 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT DISTINCT - col0 - col1 AS col1 FROM tab0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT 92 * tab1.col2 + col2 FROM tab1
----
5022
5301
8928

query I rowsort
SELECT DISTINCT + 73 * col0 AS col2 FROM tab1 AS cor0
----
219
4672
5840

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 DISTINCT col1 * + col1 + - 2 * cor0.col1 + + col1 FROM tab2 AS cor0
----
272
3422
930

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - col1 col1 FROM tab2 cor0
----
-33
-4
21

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2011
SELECT ALL col2 + - col0 * + CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2011
SELECT ALL col2 + - col0 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - ( tab0.col0 ) * + col1 AS col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL 27 + col0 FROM tab1
----
107
30
91

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2014
SELECT ALL - col2 * col2 + + CAST( - col0 AS SIGNED ) * - col1 FROM tab0
----
1375
3394
975

skipif mysql # not compatible
query I rowsort label-2014
SELECT ALL - col2 * col2 + + CAST ( - col0 AS INTEGER ) * - col1 FROM tab0
----
1375
3394
975

query I rowsort
SELECT ALL 54 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 81150d59d6c3fc48b4ef5a4a5495bc7a

query I rowsort
SELECT col0 * + col1 + - 95 AS col2 FROM tab2 AS cor0
----
122
1248
4507

query I rowsort
SELECT DISTINCT + - col0 - - ( + col1 ) FROM tab2 AS cor0
----
-19
-62
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-2018
SELECT + col0 DIV 60 - 50 * col2 * cor0.col2 AS col2 FROM tab0 AS cor0
----
-336199
-50
-54450

skipif mysql # not compatible
query I rowsort label-2018
SELECT + col0 / 60 - 50 * col2 * cor0.col2 AS col2 FROM tab0 AS cor0
----
-336199
-50
-54450

query I rowsort
SELECT DISTINCT - + col2 + - ( - col0 * col0 ) FROM tab1 AS cor0
----
-45
4039
6304

query I rowsort
SELECT + col0 * 87 + col1 * - col0 AS col0 FROM tab0 AS cor0
----
-350
-356
24

query I rowsort
SELECT DISTINCT + + cor0.col0 + - 32 AS col1 FROM tab0 AS cor0
----
-8
3
57

query I rowsort
SELECT col1 + 84 FROM tab0 AS cor0
----
170
175
181

query I rowsort
SELECT DISTINCT + cor0.col1 + - tab0.col1 * 72 AS col0 FROM tab0, tab2, tab0 AS cor0
----
9 values hashing to 4d607f593f7698df0584d9b7fb082798

query I rowsort
SELECT - 82 * - col0 * + col0 - - 45 FROM tab0
----
100495
47277
649567

query I rowsort
SELECT + col0 + col0 * col2 * col0 FROM tab1 AS cor0
----
233536
489
614480

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2026
SELECT ALL + col1 * ( 74 ) + + col0 / CAST( NULL AS DECIMAL ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2026
SELECT ALL + col1 * ( 74 ) + + col0 / CAST ( NULL AS REAL ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - col1 - - col2 AS col0 FROM tab2 AS cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-2028
SELECT + col2 DIV cor0.col2 + + 90 col2 FROM tab1 AS cor0
----
91
91
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2028
SELECT + col2 / cor0.col2 + + 90 col2 FROM tab1 AS cor0
----
91
91
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * - col2 col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + - 27 + - cor0.col1 FROM tab1 AS cor0
----
-37
-40
-53

query I rowsort
SELECT col2 * + 53 AS col1 FROM tab0 AS cor0
----
1749
4346
53

query I rowsort
SELECT + - cor0.col2 * + 53 FROM tab1 cor0
----
-2862
-3021
-5088

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2033
SELECT + CAST( - 82 AS SIGNED ) * - cor0.col2 * cor0.col0 AS col1 FROM tab1 cor0
----
13284
299136
629760

skipif mysql # not compatible
query I rowsort label-2033
SELECT + CAST ( - 82 AS INTEGER ) * - cor0.col2 * cor0.col0 AS col1 FROM tab1 cor0
----
13284
299136
629760

query I rowsort
SELECT ALL - ( + col1 ) + col0 FROM tab0 AS cor0
----
-2
-62
-62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2035
SELECT - - 63 * ( col2 ) + CAST( + col1 AS SIGNED ) FROM tab2 AS cor0
----
1697
1732
2411

skipif mysql # not compatible
query I rowsort label-2035
SELECT - - 63 * ( col2 ) + CAST ( + col1 AS INTEGER ) FROM tab2 AS cor0
----
1697
1732
2411

query I rowsort
SELECT ALL + col0 + + col0 * col0 AS col0 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT DISTINCT + + col2 + - 45 FROM tab0 cor0
----
-12
-44
37

query I rowsort
SELECT DISTINCT 36 + col0 AS col1 FROM tab0 AS cor0
----
125
60
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 86 + col2 * col0 col0 FROM tab1 AS cor0
----
248
3734
7766

onlyif mysql # use DIV operator for integer division
query I rowsort label-2040
SELECT + + cor0.col0 DIV col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2040
SELECT + + cor0.col0 / col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - - cor0.col2 * + col0 AS col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - - 72 AS col1 FROM tab1 cor0
----
72
72
72

query I rowsort
SELECT + - cor0.col2 * - col2 * - 22 AS col1 FROM tab2 cor0
----
-14872
-16038
-31768

query I rowsort
SELECT ALL 97 * col2 AS col2 FROM tab1 AS cor0
----
5238
5529
9312

query I rowsort
SELECT 21 AS col2 FROM tab0 AS cor0
----
21
21
21

query I rowsort
SELECT + 29 - - 7 FROM tab0
----
36
36
36

query I rowsort
SELECT - ( + cor0.col0 ) AS col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT + - 82 * + col0 + col1 FROM tab2 AS cor0
----
-543
-6337
-6461

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2049
SELECT - ( cor0.col2 ) * CAST( + 95 AS SIGNED ) + col0 FROM tab2 cor0
----
-2392
-2558
-3531

skipif mysql # not compatible
query I rowsort label-2049
SELECT - ( cor0.col2 ) * CAST ( + 95 AS INTEGER ) + col0 FROM tab2 cor0
----
-2392
-2558
-3531

query I rowsort
SELECT - - col2 * cor0.col2 AS col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT - col2 * + col0 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + 47 * + col0 FROM tab2 cor0
----
329
3666
3713

query I rowsort
SELECT 93 * + col0 AS col1 FROM tab2 cor0
----
651
7254
7347

query I rowsort
SELECT col1 * col0 + - tab1.col2 FROM tab1
----
24
583
944

query I rowsort
SELECT ALL - tab0.col2 * 35 AS col0 FROM tab0
----
-1155
-2870
-35

query I rowsort
SELECT DISTINCT - col2 * col0 * - col2 AS col2 FROM tab2
----
114076
5103
52728

query I rowsort
SELECT - + 70 * col1 AS col0 FROM tab1 cor0
----
-1820
-700
-910

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * + col1 col2 FROM tab2
----
289
3481
961

query I rowsort
SELECT - + col1 + - 96 * 85 AS col0 FROM tab2 cor0
----
-8177
-8191
-8219

query I rowsort
SELECT - - col2 + + 36 AS col1 FROM tab2 AS cor0
----
62
63
74

query I rowsort
SELECT + 48 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 0ef571a8722ab7270aa7272c1174b88e

onlyif mysql # use DIV operator for integer division
query I rowsort label-2062
SELECT + tab2.col1 DIV + 68 FROM tab2, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-2062
SELECT + tab2.col1 / + 68 FROM tab2, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT DISTINCT cor0.col2 * + col2 + + col1 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT - col1 + + ( col2 + col1 * 46 ) AS col2 FROM tab2
----
1422
2681
803

query I rowsort
SELECT ALL + 42 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 64c29db9f1cd7ed4ddeb1735e3e0d442

query I rowsort
SELECT DISTINCT + col1 + 97 AS col2 FROM tab1
----
107
110
123

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab2 AS cor2, tab0 AS cor3
----
3645 values hashing to 1205718fd82145a8cd84cdb475e7805d

query I rowsort
SELECT DISTINCT + col2 * - col1 * + tab0.col0 AS col1 FROM tab0
----
-3395
-664118
-68112

query I rowsort
SELECT ( - col1 + + col0 ) * - 42 FROM tab2
----
-2604
-798
1008

query I rowsort
SELECT col0 * tab2.col2 + - tab2.col0 FROM tab2
----
182
1950
2923

query I rowsort
SELECT - col1 * col2 + col1 FROM tab2
----
-1475
-629
-806

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0, tab2 AS cor1, tab2 cor2
----
972 values hashing to f94a4a64ac54a61fc21f78e2b831ebee

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2073
SELECT 19 * 45 + + col1 * CAST( - 71 * + col2 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-39615
-87753
-98829

skipif mysql # not compatible
query I rowsort label-2073
SELECT 19 * 45 + + col1 * CAST ( - 71 * + col2 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-39615
-87753
-98829

query I rowsort
SELECT DISTINCT - 17 + + col1 FROM tab0 AS cor0
----
69
74
80

query I rowsort
SELECT - + col0 * + cor0.col2 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT - 70 * 39 AS col2 FROM tab0 AS cor0
----
-2730

query I rowsort
SELECT 22 * - col0 + - col0 AS col2 FROM tab2 AS cor0
----
-161
-1794
-1817

query I rowsort
SELECT + cor0.col0 - - 19 AS col2 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 28791077756a7ac8414be4d7c7605549

query I rowsort
SELECT ALL - cor2.col2 AS col2 FROM tab2, tab1 AS cor0, tab2 cor1, tab1, tab1 AS cor2
----
243 values hashing to 1d38a1a4aacea9827ed2338191291f0e

query I rowsort
SELECT + col2 + + col1 * cor0.col0 AS col2 FROM tab1 cor0
----
1136
132
697

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( - 54 AS REAL ) + col1 FROM tab2 AS cor0
----
-23
-37
5

query I rowsort
SELECT - 73 + + col2 + - col1 FROM tab0 AS cor0
----
-126
-169
-82

query I rowsort
SELECT ALL - ( + col1 ) + col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2084
SELECT ( + col2 ) + - col2 DIV + col1 AS col2 FROM tab2 AS cor0
----
26
27
36

skipif mysql # not compatible
query I rowsort label-2084
SELECT ( + col2 ) + - col2 / + col1 AS col2 FROM tab2 AS cor0
----
26
27
36

query I rowsort
SELECT DISTINCT + ( cor0.col2 ) * + col1 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT 46 * 57 AS col0 FROM tab1 AS cor0
----
2622
2622
2622

query I rowsort
SELECT - ( - col1 ) + + col1 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT - ( - 62 ) FROM tab0 AS cor0
----
62
62
62

query I rowsort
SELECT - 19 + + 5 FROM tab0 AS cor0
----
-14
-14
-14

query I rowsort
SELECT 31 * + 31 FROM tab1, tab0 AS cor0
----
9 values hashing to a149e5d8fd1a5483b6cd6d6a00e21750

onlyif mysql # use DIV operator for integer division
query I rowsort label-2091
SELECT + tab1.col2 DIV 1 AS col0 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-2091
SELECT + tab1.col2 / 1 AS col0 FROM tab1
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

onlyif mysql # use DIV operator for integer division
query I rowsort label-2093
SELECT - cor0.col1 * col0 + col1 + col2 DIV ( - col0 * 15 ) AS col2 FROM tab0 AS cor0
----
-1978
-3298
-8008

skipif mysql # not compatible
query I rowsort label-2093
SELECT - cor0.col1 * col0 + col1 + col2 / ( - col0 * 15 ) AS col2 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT + 66 * - col0 * + col2 FROM tab1 AS cor0
----
-10692
-240768
-506880

query I rowsort
SELECT 25 + - 18 * col0 * + col2 FROM tab1 AS cor0
----
-138215
-2891
-65639

query I rowsort
SELECT ALL col1 * 51 * 70 FROM tab2
----
110670
210630
60690

query I rowsort
SELECT DISTINCT cor0.col1 + - 98 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
-39
-67
-81

query I rowsort
SELECT ALL + 46 FROM tab2, tab2 AS cor0
----
9 values hashing to 31818c9d4d325eb248735c97cb1dce39

query I rowsort
SELECT - + col1 + - ( col1 ) * 81 FROM tab0 AS cor0
----
-7052
-7462
-7954

query I rowsort
SELECT ALL 83 * col2 + col2 * + tab2.col0 FROM tab2
----
2430
4186
6156

query I rowsort
SELECT DISTINCT cor1.col2 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor1.col0 col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
-24
-35
-89

query I rowsort
SELECT - col1 * col0 + col2 - + col1 * - tab2.col1 FROM tab2
----
-1016
-1095
771

query I rowsort
SELECT + cor0.col2 - + 89 FROM tab0, tab1 AS cor0
----
9 values hashing to 7f4c5edbfaea72a937662134d716dc52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2105
SELECT DISTINCT + CAST( 5 AS SIGNED ) FROM tab2, tab2 AS cor0
----
5

skipif mysql # not compatible
query I rowsort label-2105
SELECT DISTINCT + CAST ( 5 AS INTEGER ) FROM tab2, tab2 AS cor0
----
5

query I rowsort
SELECT col0 + - col0 * cor0.col1 FROM tab0 AS cor0
----
-2040
-3360
-8010

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 cor0, tab2 cor1, tab2, tab2 AS cor2
----
3645 values hashing to 677ef6b86493a7e48d2f6a3cfd7eea4c

query I rowsort
SELECT + + col1 + + 3 * 91 AS col1 FROM tab1 AS cor0
----
283
286
299

query I rowsort
SELECT ALL - 59 AS col2 FROM tab1, tab2 AS cor0, tab2 cor1
----
27 values hashing to 582c5aa5e5b4fc3f2ea27e7637992d1f

query I rowsort
SELECT DISTINCT 41 + + 40 * + cor0.col2 FROM tab2 AS cor0
----
1081
1121
1561

query I rowsort
SELECT DISTINCT - ( - 72 ) + tab1.col2 FROM tab1
----
126
129
168

query I rowsort
SELECT DISTINCT 0 * + col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL ( + col0 ) * - col1 + + 38 AS col2 FROM tab1 AS cor0
----
-1002
-40
-602

query I rowsort
SELECT ALL - - 85 + cor0.col1 * + cor0.col1 FROM tab2 AS cor0
----
1046
3566
374

query I rowsort
SELECT - col1 * 71 * col0 + col1 * col0 FROM tab0 AS cor0
----
-144480
-237650
-566930

query I rowsort
SELECT + 27 + - 4 FROM tab2 AS cor0
----
23
23
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-2117
SELECT DISTINCT - + col0 + + ( col1 ) DIV + col1 col1 FROM tab1 AS cor0
----
-2
-63
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2117
SELECT DISTINCT - + col0 + + ( col1 ) / + col1 col1 FROM tab1 AS cor0
----
-2
-63
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-2118
SELECT DISTINCT + + col1 + + col0 DIV col2 col1 FROM tab1 AS cor0
----
11
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2118
SELECT DISTINCT + + col1 + + col0 / col2 col1 FROM tab1 AS cor0
----
11
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-2119
SELECT ALL - cor0.col0 DIV + cor0.col0 + - col0 FROM tab2 cor0
----
-79
-8
-80

skipif mysql # not compatible
query I rowsort label-2119
SELECT ALL - cor0.col0 / + cor0.col0 + - col0 FROM tab2 cor0
----
-79
-8
-80

query I rowsort
SELECT col1 * - col1 + - col2 AS col2 FROM tab1 AS cor0
----
-157
-265
-730

query I rowsort
SELECT - col1 + - cor0.col1 * - 11 AS col1 FROM tab0 AS cor0
----
860
910
970

query I rowsort
SELECT - - cor0.col2 * col0 + col2 + + 16 * col2 AS col2 FROM tab2 AS cor0
----
2470
3648
648

query I rowsort
SELECT ALL + col0 + - col2 * - 11 AS col2 FROM tab1
----
1136
597
691

query I rowsort
SELECT DISTINCT + + col1 + cor0.col1 AS col0 FROM tab2 cor0
----
118
34
62

query I rowsort
SELECT + 94 + col0 * - ( cor0.col1 ) AS col1 FROM tab1 AS cor0
----
-546
-946
16

query I rowsort
SELECT ALL - cor0.col1 - cor0.col1 FROM tab0 cor0
----
-172
-182
-194

query I rowsort
SELECT DISTINCT col0 + - ( 33 ) * col2 AS col2 FROM tab1 AS cor0
----
-1779
-1817
-3088

query I rowsort
SELECT DISTINCT + + col2 * col1 + 43 - + col0 AS col2 FROM tab0 cor0
----
105
2857
7416

onlyif mysql # use DIV operator for integer division
query I rowsort label-2129
SELECT ALL - + col0 DIV - ( col1 ) AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2129
SELECT ALL - + col0 / - ( col1 ) AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col2 * 62 + 55 FROM tab2 AS cor0
----
1667
1729
2411

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2131
SELECT ALL col2 / + CAST( NULL AS SIGNED ) + + col0 * cor0.col1 col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2131
SELECT ALL col2 / + CAST ( NULL AS INTEGER ) + + col0 * cor0.col1 col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * - col0 col1 FROM tab0 cor0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-2133
SELECT DISTINCT col0 + - 96 DIV col0 FROM tab1 AS cor0
----
-29
63
79

skipif mysql # not compatible
query I rowsort label-2133
SELECT DISTINCT col0 + - 96 / col0 FROM tab1 AS cor0
----
-29
63
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-2134
SELECT ALL col2 + - col1 DIV col2 + col1 * 17 FROM tab1 AS cor0
----
227
317
496

skipif mysql # not compatible
query I rowsort label-2134
SELECT ALL col2 + - col1 / col2 + col1 * 17 FROM tab1 AS cor0
----
227
317
496

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2135
SELECT DISTINCT + col0 - CAST( NULL AS SIGNED ) AS col2 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2135
SELECT DISTINCT + col0 - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2136
SELECT DISTINCT + col2 + + col1 + CAST( NULL AS SIGNED ) AS col2 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-2136
SELECT DISTINCT + col2 + + col1 + CAST ( NULL AS INTEGER ) AS col2 FROM tab2
----
NULL

query I rowsort
SELECT col1 * + col1 + + col2 * - col0 FROM tab1
----
-3548
-7511
514

query I rowsort
SELECT ALL 55 * - 68 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 0925c6d8df1df2745796efb414cfe53b

query I rowsort
SELECT DISTINCT tab1.col0 AS col0 FROM tab1, tab0 cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2140
SELECT 66 DIV cor0.col0 AS col0 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to eff82df49d5880477456e4901e030e04

skipif mysql # not compatible
query I rowsort label-2140
SELECT 66 / cor0.col0 AS col0 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to eff82df49d5880477456e4901e030e04

onlyif mysql # use DIV operator for integer division
query I rowsort label-2141
SELECT DISTINCT - col1 DIV 49 FROM tab0
----
-1

skipif mysql # not compatible
query I rowsort label-2141
SELECT DISTINCT - col1 / 49 FROM tab0
----
-1

query I rowsort
SELECT - col0 * col1 * - 8 FROM tab0 AS cor0
----
16512
27160
64792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - tab2.col1 col0 FROM tab2
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-2144
SELECT col1 DIV col0 col2 FROM tab1
----
0
0
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2144
SELECT col1 / col0 col2 FROM tab1
----
0
0
8

query I rowsort
SELECT DISTINCT 66 AS col0 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2146
SELECT - CAST( NULL AS DECIMAL ) FROM tab2, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2146
SELECT - CAST ( NULL AS REAL ) FROM tab2, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT + col1 * - col0 + + col1 + col1 FROM tab0
----
-1892
-3201
-7917

query I rowsort
SELECT + ( - col2 ) + + col1 FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT + + 78 * - col1 + + col0 AS col0 FROM tab2 AS cor0
----
-1247
-2411
-4524

query I rowsort
SELECT ALL + tab1.col1 + col2 * col2 FROM tab1
----
2942
3259
9229

query I rowsort
SELECT + cor0.col2 + 78 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 510cf06d01cc60c22c145f5a7ff34874

query I rowsort
SELECT DISTINCT 99 FROM tab0, tab0 AS cor0
----
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2153
SELECT tab2.col1 + + CAST( NULL AS SIGNED ) * col1 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2153
SELECT tab2.col1 + + CAST ( NULL AS INTEGER ) * col1 AS col1 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2154
SELECT DISTINCT - col1 DIV + col0 + col2 FROM tab1 AS cor0
----
46
57
96

skipif mysql # not compatible
query I rowsort label-2154
SELECT DISTINCT - col1 / + col0 + col2 FROM tab1 AS cor0
----
46
57
96

query I rowsort
SELECT col1 * + col1 + ( cor0.col2 * - col0 ) FROM tab2 AS cor0
----
-2713
1453
772

query I rowsort
SELECT DISTINCT + col1 * col2 + + col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT ALL 82 * - col0 FROM tab2 AS cor0
----
-574
-6396
-6478

query I rowsort
SELECT ALL + ( + 44 ) + + col0 FROM tab0 AS cor0
----
133
68
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2159
SELECT DISTINCT - + CAST( - 29 AS SIGNED ) + - col1 AS col0 FROM tab0 AS cor0
----
-57
-62
-68

skipif mysql # not compatible
query I rowsort label-2159
SELECT DISTINCT - + CAST ( - 29 AS INTEGER ) + - col1 AS col0 FROM tab0 AS cor0
----
-57
-62
-68

query I rowsort
SELECT DISTINCT col2 + + col2 AS col2 FROM tab2 cor0
----
52
54
76

query I rowsort
SELECT ALL 44 AS col1 FROM tab0, tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
27 values hashing to 0cc3e52e781e46962291c3060c6ae73b

query I rowsort
SELECT ( - col1 ) + + col1 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - 48 + 56 AS col1 FROM tab2 AS cor0
----
8
8
8

query I rowsort
SELECT DISTINCT - col1 + col0 FROM tab2 cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT + + col1 + cor0.col1 * - col0 AS col0 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT DISTINCT + 94 * - col2 + col2 AS col2 FROM tab0 AS cor0
----
-3069
-7626
-93

query I rowsort
SELECT + col1 + - 4 AS col2 FROM tab1 AS cor0
----
22
6
9

query I rowsort
SELECT ALL + ( + col2 ) * + col1 + col0 + + col0 FROM tab2 AS cor0
----
1690
804
851

query I rowsort
SELECT - + 0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 73 + 18 FROM tab2 cor0
----
91

query I rowsort
SELECT DISTINCT - 38 + col1 + - col1 FROM tab0 AS cor0
----
-38

query I rowsort
SELECT DISTINCT ( + col0 ) * - col1 - ( - cor0.col0 + col1 ) * 86 * + col2 AS col1 FROM tab0 AS cor0
----
-178020
-22203
-8727

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 3 ) col2 FROM tab2
----
3
3
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2174
SELECT + CAST( col0 AS SIGNED ) * - col1 FROM tab0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort label-2174
SELECT + CAST ( col0 AS INTEGER ) * - col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT 49 * tab2.col1 AS col1 FROM tab2
----
1519
2891
833

query I rowsort
SELECT 55 * col2 + col0 FROM tab2
----
1492
1508
2169

query I rowsort
SELECT - 20 FROM tab1
----
-20
-20
-20

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2178
SELECT + CAST( col2 * + col2 AS SIGNED ) FROM tab2
----
1444
676
729

skipif mysql # not compatible
query I rowsort label-2178
SELECT + CAST ( col2 * + col2 AS INTEGER ) FROM tab2
----
1444
676
729

query I rowsort
SELECT col2 + col2 * col0 FROM tab1 AS cor0
----
216
3705
7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-2180
SELECT - cor0.col1 * 6 + col2 DIV col0 FROM tab2 AS cor0
----
-102
-183
-354

skipif mysql # not compatible
query I rowsort label-2180
SELECT - cor0.col1 * 6 + col2 / col0 FROM tab2 AS cor0
----
-102
-183
-354

query I rowsort
SELECT ALL - col1 * 31 - col0 FROM tab0 AS cor0
----
-2690
-2910
-3042

query I rowsort
SELECT - + 19 FROM tab1 cor0
----
-19
-19
-19

query I rowsort
SELECT + - 92 * - col1 AS col2 FROM tab2 AS cor0
----
1564
2852
5428

query I rowsort
SELECT DISTINCT + 34 FROM tab2, tab0, tab1 AS cor0
----
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2185
SELECT + CAST( NULL AS SIGNED ) + + col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2185
SELECT + CAST ( NULL AS INTEGER ) + + col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + + col2 + - col2 AS col1 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2187
SELECT col0 DIV + 20 + - col0 AS col0 FROM tab0 AS cor0
----
-23
-34
-85

skipif mysql # not compatible
query I rowsort label-2187
SELECT col0 / + 20 + - col0 AS col0 FROM tab0 AS cor0
----
-23
-34
-85

query I rowsort
SELECT ALL - col0 * + col0 AS col1 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT col0 - col1 AS col0 FROM tab0 AS cor0
----
-2
-62

query I rowsort
SELECT ALL + col0 * col2 + col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT + + col2 + cor0.col2 - col1 FROM tab1 AS cor0
----
104
179
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-2192
SELECT DISTINCT + 71 - col1 DIV col1 FROM tab2
----
70

skipif mysql # not compatible
query I rowsort label-2192
SELECT DISTINCT + 71 - col1 / col1 FROM tab2
----
70

query I rowsort
SELECT ALL - col2 + + col0 * + col1 + - 91 AS col1 FROM tab0
----
1940
3303
7926

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - 36 * col2 col2 FROM tab2 AS cor0
----
-1330
-910
-945

query I rowsort
SELECT DISTINCT col2 + col2 * + tab0.col1 + + 52 FROM tab0
----
150
2923
7596

query I rowsort
SELECT - - tab0.col0 FROM tab2, tab1, tab2 AS cor0, tab0
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

query I rowsort
SELECT col1 * - 27 AS col1 FROM tab1 AS cor0
----
-270
-351
-702

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2198
SELECT + + col1 * - ( col2 ) + + col1 * CAST( col2 AS SIGNED ) - col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-2198
SELECT + + col1 * - ( col2 ) + + col1 * CAST ( col2 AS INTEGER ) - col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + col1 * + col2 col2 FROM tab1 AS cor0
----
1261
1430
580

onlyif mysql # use DIV operator for integer division
query I rowsort label-2200
SELECT 60 DIV - col1 + - col1 FROM tab2 AS cor0
----
-20
-32
-60

skipif mysql # not compatible
query I rowsort label-2200
SELECT 60 / - col1 + - col1 FROM tab2 AS cor0
----
-20
-32
-60

query I rowsort
SELECT DISTINCT - col2 * - 90 AS col0 FROM tab2
----
2340
2430
3420

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + col0 col0 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 96 col2 FROM tab0 AS cor0
----
-96
-96
-96

query I rowsort
SELECT 5 + col0 FROM tab0
----
29
40
94

query I rowsort
SELECT cor1.col1 AS col1 FROM tab1, tab1 AS cor0, tab2, tab0 AS cor1
----
81 values hashing to 8c9db501a604ea66e3b5e5598f3f2a91

query I rowsort
SELECT + - 16 AS col2 FROM tab2 AS cor0
----
-16
-16
-16

query I rowsort
SELECT 81 * col0 FROM tab1 AS cor0
----
243
5184
6480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col1 ) + col0 * col1 col0 FROM tab0 cor0
----
1978
3298
8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-2209
SELECT 81 DIV col2 FROM tab0 AS cor0
----
0
2
81

skipif mysql # not compatible
query I rowsort label-2209
SELECT 81 / col2 FROM tab0 AS cor0
----
0
2
81

query I rowsort
SELECT DISTINCT col1 + col2 * - 36 * col2 AS col0 FROM tab0 AS cor0
----
-241973
-39118
61

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2211
SELECT ALL - + cor0.col0 * - col1 + CAST( NULL AS SIGNED ) * cor0.col0 + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2211
SELECT ALL - + cor0.col0 * - col1 + CAST ( NULL AS INTEGER ) * cor0.col0 + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 * cor0.col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL col0 * - 21 - col1 AS col0 FROM tab2 AS cor0
----
-1676
-1697
-178

query I rowsort
SELECT ALL - col2 - col0 AS col2 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT - - col0 + + col2 * + col1 FROM tab1 cor0
----
1328
1407
634

query I rowsort
SELECT DISTINCT col1 + + 58 FROM tab0 AS cor0
----
144
149
155

query I rowsort
SELECT DISTINCT + col1 + - col1 - + 1 * col2 AS col1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT - ( + col2 + + 10 ) FROM tab0
----
-11
-43
-92

onlyif mysql # use DIV operator for integer division
query I rowsort label-2219
SELECT 98 DIV - col1 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2219
SELECT 98 / - col1 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT cor0.col0 * 86 AS col0 FROM tab2 AS cor0
----
602
6708
6794

onlyif mysql # use DIV operator for integer division
query I rowsort label-2221
SELECT cor0.col2 DIV + 52 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2221
SELECT cor0.col2 / + 52 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - ( 78 ) * col0 FROM tab1 AS cor0
----
-234
-4992
-6240

query I rowsort
SELECT ( + cor0.col2 ) FROM tab1, tab0 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

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 85 * 5 col0 FROM tab1, tab2 AS cor0, tab0, tab2 AS cor1
----
81 values hashing to 9fafcae996e48da352467032dfcd176a

query I rowsort
SELECT ALL 85 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to aafa8e5cfb9e02cea8717833e7581f7b

query I rowsort
SELECT ( + 0 + + col2 ) AS col2 FROM tab2
----
26
27
38

query I rowsort
SELECT DISTINCT tab0.col1 FROM tab0, tab0 cor0, tab2 AS cor1
----
86
91
97

query I rowsort
SELECT ( 22 ) FROM tab2 AS cor0
----
22
22
22

query I rowsort
SELECT ( + col0 ) * col1 AS col0 FROM tab2 cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-2231
SELECT ALL - ( + tab0.col0 ) DIV col2 FROM tab0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-2231
SELECT ALL - ( + tab0.col0 ) / col2 FROM tab0
----
-1
-35
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2232
SELECT DISTINCT CAST( - col0 AS SIGNED ) * tab1.col1 FROM tab1
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-2232
SELECT DISTINCT CAST ( - col0 AS INTEGER ) * tab1.col1 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT col0 + ( - col2 ) * 1 * - col1 FROM tab2
----
1612
725
844

query I rowsort
SELECT DISTINCT col2 * col2 * col1 AS col2 FROM tab0
----
611884
93654
97

query I rowsort
SELECT - col0 * - col2 + col0 FROM tab2
----
196
2106
3081

onlyif mysql # use DIV operator for integer division
query I rowsort label-2236
SELECT DISTINCT - col1 DIV - col2 AS col1 FROM tab0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-2236
SELECT DISTINCT - col1 / - col2 AS col1 FROM tab0
----
1
2
97

query I rowsort
SELECT ALL - ( + col0 ) * col2 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + + col1 * col1 + 37 FROM tab1 AS cor0
----
137
206
713

query I rowsort
SELECT - + 68 FROM tab0 cor0
----
-68
-68
-68

query I rowsort
SELECT DISTINCT + col1 * - tab2.col1 * col1 + col1 * + tab2.col0 AS col1 FROM tab2
----
-200777
-29574
-3570

onlyif mysql # use DIV operator for integer division
query I rowsort label-2241
SELECT DISTINCT col0 + + col0 DIV tab0.col1 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-2241
SELECT DISTINCT col0 + + col0 / tab0.col1 FROM tab0
----
24
35
89

query I rowsort
SELECT tab0.col2 + ( + col2 ) - + col2 AS col2 FROM tab0
----
1
33
82

query I rowsort
SELECT + - cor0.col0 * col2 - + 85 FROM tab0 AS cor0
----
-120
-7383
-877

query I rowsort
SELECT + col1 + 38 * col1 FROM tab0 AS cor0
----
3354
3549
3783

query I rowsort
SELECT 28 + col1 AS col2 FROM tab1 AS cor0
----
38
41
54

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2246
SELECT DISTINCT ( col0 ) * - col1 + CAST( ( + col0 ) AS SIGNED ) * - ( col1 ) FROM tab1 AS cor0
----
-1280
-156
-2080

skipif mysql # not compatible
query I rowsort label-2246
SELECT DISTINCT ( col0 ) * - col1 + CAST ( ( + col0 ) AS INTEGER ) * - ( col1 ) FROM tab1 AS cor0
----
-1280
-156
-2080

query I rowsort
SELECT ALL 30 + col2 * col1 AS col0 FROM tab1 AS cor0
----
1278
1434
600

query I rowsort
SELECT + 45 * col1 AS col1 FROM tab1 cor0
----
1170
450
585

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * 98 - col2 * - ( ( col2 ) ) col0 FROM tab2 AS cor0
----
3110
3767
6458

query I rowsort
SELECT + - col2 + - col1 AS col0 FROM tab2 cor0
----
-55
-58
-85

query I rowsort
SELECT + 14 + cor0.col1 AS col0 FROM tab1 cor0
----
24
27
40

query I rowsort
SELECT - - col2 * + cor0.col0 + col1 AS col1 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT DISTINCT + ( cor0.col0 ) * col0 - + 38 * col2 * col1 AS col1 FROM tab1 AS cor0
----
-17564
-41024
-53343

query I rowsort
SELECT - 86 * col2 AS col2 FROM tab0 AS cor0
----
-2838
-7052
-86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col1 ) * col2 col1 FROM tab0 cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2256
SELECT ALL - ( - col2 ) * cor0.col2 DIV col2 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-2256
SELECT ALL - ( - col2 ) * cor0.col2 / col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ( - 35 ) FROM tab0 AS cor0
----
-35
-35
-35

onlyif mysql # use DIV operator for integer division
query I rowsort label-2258
SELECT ALL - + col0 * col1 + + cor0.col2 DIV ( + 35 ) FROM tab1 AS cor0
----
-1038
-639
-77

skipif mysql # not compatible
query I rowsort label-2258
SELECT ALL - + col0 * col1 + + cor0.col2 / ( + 35 ) FROM tab1 AS cor0
----
-1038
-639
-77

query I rowsort
SELECT DISTINCT + 14 AS col0 FROM tab0 cor0
----
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 + - 4 col1 FROM tab1 AS cor0
----
-14
-17
-30

query I rowsort
SELECT ALL - col2 * col0 + cor0.col1 FROM tab0 AS cor0
----
-706
-7207
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2262
SELECT + + col1 + - CAST( cor0.col1 AS SIGNED ) * col0 FROM tab0 AS cor0
----
-1978
-3298
-8008

skipif mysql # not compatible
query I rowsort label-2262
SELECT + + col1 + - CAST ( cor0.col1 AS INTEGER ) * col0 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT ALL + + cor0.col2 + col2 AS col0 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT DISTINCT - cor0.col1 * - ( - 80 ) FROM tab0 cor0
----
-6880
-7280
-7760

query I rowsort
SELECT - col1 * 57 FROM tab2 cor0
----
-1767
-3363
-969

query I rowsort
SELECT ALL cor0.col0 * + 36 * col0 FROM tab0 AS cor0
----
20736
285156
44100

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2267
SELECT ALL - col2 * CAST( NULL AS SIGNED ) + + col2 * - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2267
SELECT ALL - col2 * CAST ( NULL AS INTEGER ) + + col2 * - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + tab0.col2 * - 77 AS col2 FROM tab0
----
-2541
-6314
-77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 56 * col0 col1 FROM tab1 AS cor0
----
-168
-3584
-4480

query I rowsort
SELECT + col2 * 2 AS col2 FROM tab0 AS cor0
----
164
2
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2271
SELECT - CAST( NULL AS DECIMAL ) * col1 AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2271
SELECT - CAST ( NULL AS REAL ) * col1 AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 55 FROM tab2, tab1 cor0
----
9 values hashing to ac76841ceecd2311e80c621d15bacdd3

query I rowsort
SELECT col2 + ( + col0 ) FROM tab2
----
104
117
34

query I rowsort
SELECT cor1.col2 AS col2 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT DISTINCT + 49 * col2 + - ( - 63 ) AS col1 FROM tab1 AS cor0
----
2709
2856
4767

query I rowsort
SELECT - 67 + - col2 AS col0 FROM tab2 AS cor0
----
-105
-93
-94

query I rowsort
SELECT ALL - cor0.col0 * - col0 AS col2 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT + tab1.col0 - 67 * col0 AS col1 FROM tab1
----
-198
-4224
-5280

onlyif mysql # use DIV operator for integer division
query I rowsort label-2279
SELECT DISTINCT + col1 DIV + col0 - - col2 * col0 AS col1 FROM tab0
----
37
7299
795

skipif mysql # not compatible
query I rowsort label-2279
SELECT DISTINCT + col1 / + col0 - - col2 * col0 AS col1 FROM tab0
----
37
7299
795

query I rowsort
SELECT DISTINCT col0 + cor0.col0 * - 52 AS col1 FROM tab2 AS cor0
----
-357
-3978
-4029

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - col0 + col1 * col0 + cor0.col1 col0 FROM tab1 AS cor0
----
-2998
-58
-6627

query I rowsort
SELECT DISTINCT 71 * + col2 AS col0 FROM tab0 AS cor0
----
2343
5822
71

query I rowsort
SELECT - col2 + - 27 + tab2.col1 * + ( col1 ) AS col1 FROM tab2
----
224
3428
907

onlyif mysql # use DIV operator for integer division
query I rowsort label-2284
SELECT + ( 94 ) DIV col1 col2 FROM tab2
----
1
3
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2284
SELECT + ( 94 ) / col1 col2 FROM tab2
----
1
3
5

query I rowsort
SELECT 66 + 39 * col2 FROM tab0
----
105
1353
3264

query I rowsort
SELECT ALL 99 + 20 AS col0 FROM tab1
----
119
119
119

query I rowsort
SELECT DISTINCT tab2.col2 - + tab2.col1 AS col1 FROM tab2
----
-33
-4
21

query I rowsort
SELECT DISTINCT - col0 * 62 * col0 + - col1 AS col0 FROM tab0
----
-35798
-491193
-76047

query I rowsort
SELECT col0 * col0 * ( tab2.col0 ) AS col2 FROM tab2
----
343
474552
493039

query I rowsort
SELECT DISTINCT - col0 + col0 * + ( - col1 + col1 ) AS col0 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT DISTINCT - - col0 * cor0.col0 AS col1 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT ALL col0 * - col1 + col0 * - col0 + + col1 FROM tab2 AS cor0
----
-10627
-235
-7567

query I rowsort
SELECT 83 * col0 FROM tab2 AS cor0
----
581
6474
6557

query I rowsort
SELECT ALL col2 * - col0 + + col1 AS col0 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT + - cor0.col0 * cor0.col2 + - 33 AS col0 FROM tab0 AS cor0
----
-68
-7331
-825

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - col2 + ( tab0.col1 ) col0 FROM tab0
----
-1003
-6633
96

query I rowsort
SELECT - col2 * ( col1 ) + col0 * + 84 + - 4 FROM tab0 AS cor0
----
-826
10
2839

query I rowsort
SELECT ALL + col0 + col0 * 92 FROM tab1
----
279
5952
7440

query I rowsort
SELECT + col0 * col1 * - col1 FROM tab2
----
-22831
-271518
-6727

query I rowsort
SELECT DISTINCT + - 52 AS col1 FROM tab1 AS cor0
----
-52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 1 col0 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to da8a72a7967c0c73d91239275230aed9

query I rowsort
SELECT ALL 43 AS col1 FROM tab2
----
43
43
43

query I rowsort
SELECT ALL cor0.col2 + - ( col0 ) FROM tab2 AS cor0
----
-41
-52
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-2304
SELECT DISTINCT - col0 DIV + 65 + col0 FROM tab2 AS cor0
----
7
77
78

skipif mysql # not compatible
query I rowsort label-2304
SELECT DISTINCT - col0 / + 65 + col0 FROM tab2 AS cor0
----
7
77
78

query I rowsort
SELECT + + col0 * col1 + + col1 * col0 * - 37 AS col2 FROM tab2 AS cor0
----
-165672
-48348
-7812

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2306
SELECT - col1 * CAST( NULL AS SIGNED ) + - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2306
SELECT - col1 * CAST ( NULL AS INTEGER ) + - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col2 * - col0 + + col2 AS col0 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT - col0 + - col1 AS col2 FROM tab0 cor0
----
-110
-132
-180

query I rowsort
SELECT ALL ( - 12 ) FROM tab0 cor0
----
-12
-12
-12

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2310
SELECT - - CAST( + col1 AS SIGNED ) * - col2 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort label-2310
SELECT - - CAST ( + col1 AS INTEGER ) * - col2 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT - col0 + - col0 * + col1 FROM tab0 AS cor0
----
-2088
-3430
-8188

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2312
SELECT - CAST( col1 AS SIGNED ) * - col2 + ( 95 ) FROM tab0 AS cor0
----
192
2933
7557

skipif mysql # not compatible
query I rowsort label-2312
SELECT - CAST ( col1 AS INTEGER ) * - col2 + ( 95 ) FROM tab0 AS cor0
----
192
2933
7557

query I rowsort
SELECT ALL + + col1 + + cor0.col2 * - col2 * col2 AS col1 FROM tab0 AS cor0
----
-35851
-551277
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2314
SELECT ALL CAST( col2 AS SIGNED ) DIV + cor0.col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2314
SELECT ALL CAST ( col2 AS INTEGER ) / + cor0.col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col1 * col1 + + col1 FROM tab0 AS cor0
----
-7310
-8190
-9312

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2316
SELECT + CAST( col0 AS SIGNED ) + col0 * col1 FROM tab0 AS cor0
----
2088
3430
8188

skipif mysql # not compatible
query I rowsort label-2316
SELECT + CAST ( col0 AS INTEGER ) + col0 * col1 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT + ( - ( + cor0.col0 ) ) AS col1 FROM tab0 AS cor0
----
-24
-35
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2318
SELECT DISTINCT - CAST( NULL AS DECIMAL ) + ( cor0.col1 ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2318
SELECT DISTINCT - CAST ( NULL AS REAL ) + ( cor0.col1 ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT cor0.col2 * col2 - - col1 AS col1 FROM tab0 AS cor0
----
1175
6815
98

query I rowsort
SELECT - - col1 * col2 + cor0.col1 AS col2 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT DISTINCT - 5 + + col0 * col1 FROM tab1 AS cor0
----
1035
635
73

query I rowsort
SELECT 4 + col0 FROM tab2 AS cor0
----
11
82
83

query I rowsort
SELECT - col2 + + col2 * ( + col1 ) AS col2 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT + - 4 - col0 FROM tab0 AS cor0
----
-28
-39
-93

query I rowsort
SELECT ALL col2 * - ( col1 ) + col1 + col0 FROM tab2
----
-1397
-550
-799

query I rowsort
SELECT DISTINCT 97 AS col0 FROM tab0, tab1 AS cor0
----
97

query I rowsort
SELECT ALL tab2.col2 * - tab2.col0 AS col1 FROM tab2
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - col0 AS REAL ) * - col2 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT - ( + col2 ) * - col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT - col0 + - col2 * col2 AS col0 FROM tab1 AS cor0
----
-2919
-3313
-9296

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 44 * - col1 col0 FROM tab0 AS cor0
----
-3784
-4004
-4268

query I rowsort
SELECT ALL + - col1 * - col2 + col1 + 80 * - col0 FROM tab2 AS cor0
----
-4647
-5657
308

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2333
SELECT DISTINCT + - CAST( NULL AS SIGNED ) + col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2333
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) + col0 FROM tab2 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2334
SELECT + CAST( + 32 AS SIGNED ) FROM tab2 AS cor0
----
32
32
32

skipif mysql # not compatible
query I rowsort label-2334
SELECT + CAST ( + 32 AS INTEGER ) FROM tab2 AS cor0
----
32
32
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + - ( + col2 ) col1 FROM tab0 cor0
----
53
9
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2336
SELECT DISTINCT - CAST( NULL AS SIGNED ) + 42 + - col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2336
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + 42 + - col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL - + ( col1 ) + col1 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2338
SELECT DISTINCT - - CAST( NULL AS SIGNED ) + - 59 AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2338
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) + - 59 AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL 97 * + 29 + - col1 FROM tab2 cor0
----
2754
2782
2796

query I rowsort
SELECT DISTINCT cor0.col1 + - 39 * + cor0.col0 + col1 FROM tab0 AS cor0
----
-1171
-3289
-764

query I rowsort
SELECT DISTINCT 26 + tab0.col0 FROM tab0
----
115
50
61

query I rowsort
SELECT + col2 * + col2 + - col2 AS col1 FROM tab2 AS cor0
----
1406
650
702

query I rowsort
SELECT 77 * - col1 + + col0 AS col0 FROM tab1 AS cor0
----
-1999
-706
-921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 4 * + col1 + - col1 col0 FROM tab2 cor0
----
-155
-295
-85

query I rowsort
SELECT - col0 * col2 + + 4 AS col0 FROM tab0 AS cor0
----
-31
-7294
-788

query I rowsort
SELECT - + ( col0 ) * col1 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-2347
SELECT + col1 DIV + col0 - col1 * + col0 AS col1 FROM tab2 cor0
----
-1343
-213
-4602

skipif mysql # not compatible
query I rowsort label-2347
SELECT + col1 / + col0 - col1 * + col0 AS col1 FROM tab2 cor0
----
-1343
-213
-4602

query I rowsort
SELECT + col2 * 49 FROM tab1 AS cor0
----
2646
2793
4704

query I rowsort
SELECT ALL - + col1 + 4 AS col0 FROM tab2 AS cor0
----
-13
-27
-55

query I rowsort
SELECT DISTINCT - 49 AS col2 FROM tab1
----
-49

onlyif mysql # use DIV operator for integer division
query I rowsort label-2351
SELECT + - col2 DIV + col0 + col2 FROM tab1 AS cor0
----
36
57
95

skipif mysql # not compatible
query I rowsort label-2351
SELECT + - col2 / + col0 + col2 FROM tab1 AS cor0
----
36
57
95

query I rowsort
SELECT DISTINCT + col1 * + ( - cor0.col1 ) + - col2 FROM tab0 AS cor0
----
-7429
-8363
-9410

query I rowsort
SELECT - + col2 + + col1 AS col0 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT ALL col2 + - 95 * - col2 FROM tab1 AS cor0
----
5184
5472
9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + cor0.col1 col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL cor0.col1 + - 58 FROM tab2 AS cor0
----
-27
-41
1

query I rowsort
SELECT DISTINCT col2 * + cor0.col2 - ( - col0 ) FROM tab2 cor0
----
1523
736
754

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2358
SELECT ALL + col0 * - CAST( + cor0.col0 + col1 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-16020
-2640
-4620

skipif mysql # not compatible
query I rowsort label-2358
SELECT ALL + col0 * - CAST ( + cor0.col0 + col1 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-16020
-2640
-4620

query I rowsort
SELECT ALL - - col2 * + col1 + 43 + col1 AS col0 FROM tab0 AS cor0
----
237
2967
7596

query I rowsort
SELECT DISTINCT - col0 * + col2 - - ( cor0.col1 ) * col0 AS col0 FROM tab1 AS cor0
----
-3008
-6640
-84

query I rowsort
SELECT + col2 * 55 + 78 FROM tab0 AS cor0
----
133
1893
4588

onlyif mysql # use DIV operator for integer division
query I rowsort label-2362
SELECT ALL - cor0.col2 DIV col1 + - cor0.col2 FROM tab1 AS cor0
----
-103
-56
-62

skipif mysql # not compatible
query I rowsort label-2362
SELECT ALL - cor0.col2 / col1 + - cor0.col2 FROM tab1 AS cor0
----
-103
-56
-62

query I rowsort
SELECT + + col2 * 98 + - cor0.col2 * cor0.col0 * cor0.col2 AS col0 FROM tab1 AS cor0
----
-202350
-3456
-727872

query I rowsort
SELECT - + col1 * + 77 FROM tab1 AS cor0
----
-1001
-2002
-770

query I rowsort
SELECT DISTINCT - - col0 * col1 AS col1 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT ALL col0 * ( col0 ) AS col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL - + col0 + col0 * + cor0.col2 FROM tab1 cor0
----
159
3584
7600

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2368
SELECT col1 * - CAST( cor0.col2 * - col1 AS SIGNED ) col0 FROM tab2 cor0
----
10982
25947
90506

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2368
SELECT col1 * - CAST ( cor0.col2 * - col1 AS INTEGER ) col0 FROM tab2 cor0
----
10982
25947
90506

query I rowsort
SELECT col1 + + 67 AS col0 FROM tab1 AS cor0
----
77
80
93

query I rowsort
SELECT ALL - 66 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to cd4a3594ee8b45223ebf9f25840cd112

query I rowsort
SELECT DISTINCT + col0 * 11 * col1 AS col1 FROM tab2
----
14773
2387
50622

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2372
SELECT DISTINCT col2 + + CAST( + 98 AS SIGNED ) FROM tab2
----
124
125
136

skipif mysql # not compatible
query I rowsort label-2372
SELECT DISTINCT col2 + + CAST ( + 98 AS INTEGER ) FROM tab2
----
124
125
136

query I rowsort
SELECT DISTINCT - 32 FROM tab1 cor0
----
-32

query I rowsort
SELECT DISTINCT 4 * + col0 * - 93 FROM tab2 AS cor0
----
-2604
-29016
-29388

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - col2 col1 FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT DISTINCT ( + col2 ) + - 96 * col0 AS col2 FROM tab2 AS cor0
----
-645
-7462
-7546

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 24 col1 FROM tab0 AS cor0
----
24

query I rowsort
SELECT + col0 * col1 - col2 AS col1 FROM tab1 AS cor0
----
24
583
944

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2379
SELECT DISTINCT - CAST( - col0 AS SIGNED ) FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-2379
SELECT DISTINCT - CAST ( - col0 AS INTEGER ) FROM tab1
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2380
SELECT + col2 DIV + 84 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2380
SELECT + col2 / + 84 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT - ( col2 ) * + tab0.col1 + + col2 FROM tab0
----
-2805
-7380
-96

query I rowsort
SELECT 67 * - col0 * - col1 AS col0 FROM tab1
----
42880
5226
69680

query I rowsort
SELECT DISTINCT 17 * col1 + - ( - tab2.col1 * + col1 ) + tab2.col0 * + col1 FROM tab2
----
1705
1921
9086

query I rowsort
SELECT ALL - ( col2 ) * col1 + - col1 FROM tab2
----
-1593
-663
-868

query I rowsort
SELECT DISTINCT + col1 * col0 + col1 + + col1 AS col1 FROM tab0
----
2236
3589
8281

query I rowsort
SELECT + col1 + - cor0.col0 AS col0 FROM tab0 AS cor0
----
2
62
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-2387
SELECT ALL + 98 DIV - col1 col1 FROM tab2 AS cor0
----
-1
-3
-5

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2387
SELECT ALL + 98 / - col1 col1 FROM tab2 AS cor0
----
-1
-3
-5

query I rowsort
SELECT DISTINCT + 0 + cor0.col1 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2389
SELECT DISTINCT + + col0 * col2 + - CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2389
SELECT DISTINCT + + col0 * col2 + - CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2390
SELECT ALL CAST( - 5 + + col2 AS SIGNED ) AS col2 FROM tab2
----
21
22
33

skipif mysql # not compatible
query I rowsort label-2390
SELECT ALL CAST ( - 5 + + col2 AS INTEGER ) AS col2 FROM tab2
----
21
22
33

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 cor0, tab2, tab2 cor1
----
972 values hashing to 163d7732097d78f1cda7f65c2cea5a08

query I rowsort
SELECT + tab2.col1 + 27 * - col1 AS col0 FROM tab2
----
-1534
-442
-806

query I rowsort
SELECT ALL - - col1 * 23 FROM tab0 AS cor0
----
1978
2093
2231

query I rowsort
SELECT + - ( - col1 ) + - col0 AS col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT ALL + 46 * 80 - col1 * + 87 FROM tab2 AS cor0
----
-1453
2201
983

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * col1 + - col2 col0 FROM tab0 AS cor0
----
-7429
-8363
-9410

query I rowsort
SELECT ALL 72 - 83 * - col0 * col0 FROM tab1 AS cor0
----
340040
531272
819

query I rowsort
SELECT DISTINCT - 42 + - col1 AS col2 FROM tab2 AS cor0
----
-101
-59
-73

query I rowsort
SELECT ALL + 45 * 47 AS col0 FROM tab0 AS cor0
----
2115
2115
2115

query I rowsort
SELECT DISTINCT ( + 26 ) AS col2 FROM tab1
----
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col1 + - 21 * - col2 col0 FROM tab1 cor0
----
1160
1207
2029

query I rowsort
SELECT - + ( - col0 ) + - cor0.col1 AS col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT ALL 61 + 12 FROM tab2 cor0
----
73
73
73

query I rowsort
SELECT ALL 91 * col0 FROM tab0 AS cor0
----
2184
3185
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-2405
SELECT ( col2 ) DIV - 77 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2405
SELECT ( col2 ) / - 77 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + - 28 * + cor0.col1 + + ( - col0 ) FROM tab0 AS cor0
----
-2432
-2637
-2751

query I rowsort
SELECT ALL 21 + col0 AS col1 FROM tab0 AS cor0
----
110
45
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-2408
SELECT + + col1 + - col0 DIV cor0.col2 FROM tab0 cor0
----
62
86
90

skipif mysql # not compatible
query I rowsort label-2408
SELECT + + col1 + - col0 / cor0.col2 FROM tab0 cor0
----
62
86
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col2 + tab0.col0 col2 FROM tab0
----
171
36
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2410
SELECT DISTINCT - tab0.col2 * - tab0.col1 + - col1 * + CAST( col0 AS SIGNED ) AS col2 FROM tab0
----
-3298
-637
774

skipif mysql # not compatible
query I rowsort label-2410
SELECT DISTINCT - tab0.col2 * - tab0.col1 + - col1 * + CAST ( col0 AS INTEGER ) AS col2 FROM tab0
----
-3298
-637
774

query I rowsort
SELECT DISTINCT 63 + tab1.col1 AS col0 FROM tab1
----
73
76
89

query I rowsort
SELECT + 77 * - col2 + - col2 * col2 AS col1 FROM tab2 AS cor0
----
-2678
-2808
-4370

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2413
SELECT DISTINCT - CAST( NULL AS SIGNED ) * - 26 FROM tab2, tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2413
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * - 26 FROM tab2, tab2 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * ( - col1 ) col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL - col0 + - ( col1 ) FROM tab2 cor0
----
-137
-38
-96

query I rowsort
SELECT DISTINCT col2 * + 9 + - col1 FROM tab1
----
460
503
851

query I rowsort
SELECT tab0.col2 * - tab0.col2 AS col2 FROM tab0
----
-1
-1089
-6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + + 27 col1 FROM tab2
----
44
58
86

query I rowsort
SELECT + cor0.col0 * cor0.col2 + col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT + cor0.col1 * 81 FROM tab1 AS cor0
----
1053
2106
810

query I rowsort
SELECT ALL + - cor0.col2 + - ( + 69 ) * + col0 FROM tab1 cor0
----
-261
-4473
-5616

query I rowsort
SELECT - col1 * - ( 99 ) FROM tab1 AS cor0
----
1287
2574
990

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col1 * col0 col2 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT cor0.col0 + - col0 * col1 AS col1 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT ALL - + 53 FROM tab2 AS cor0
----
-53
-53
-53

query I rowsort
SELECT col1 + - 20 FROM tab1 AS cor0
----
-10
-7
6

query I rowsort
SELECT + ( 3 ) FROM tab2 AS cor0
----
3
3
3

query I rowsort
SELECT DISTINCT col1 * - 72 + + tab0.col1 AS col1 FROM tab0
----
-6106
-6461
-6887

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2429
SELECT ALL + col0 * + CAST( NULL AS SIGNED ) + + tab1.col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2429
SELECT ALL + col0 * + CAST ( NULL AS INTEGER ) + + tab1.col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT col0 + tab2.col2 AS col1 FROM tab2
----
104
117
34

query I rowsort
SELECT col1 + - 16 * + 91 FROM tab1
----
-1430
-1443
-1446

query I rowsort
SELECT tab2.col0 * - ( ( col0 ) ) + + col2 + - tab2.col0 AS col0 FROM tab2
----
-29
-6136
-6282

query I rowsort
SELECT + 61 + col2 AS col1 FROM tab1 AS cor0
----
115
118
157

query I rowsort
SELECT - ( cor0.col2 ) * col0 + + cor0.col2 * col0 * - col1 AS col2 FROM tab0 AS cor0
----
-3430
-671416
-68904

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2435
SELECT CAST( NULL AS SIGNED ) + ( - col2 ) * 50 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2435
SELECT CAST ( NULL AS INTEGER ) + ( - col2 ) * 50 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2436
SELECT ALL col2 * CAST( NULL AS SIGNED ) / + tab2.col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2436
SELECT ALL col2 * CAST ( NULL AS INTEGER ) / + tab2.col1 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2437
SELECT col0 DIV col1 + - tab2.col0 FROM tab2
----
-7
-75
-77

skipif mysql # not compatible
query I rowsort label-2437
SELECT col0 / col1 + - tab2.col0 FROM tab2
----
-7
-75
-77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col1 FROM tab0, tab1 cor0
----
3
64
80

query I rowsort
SELECT DISTINCT - 23 AS col1 FROM tab1, tab2 AS cor0
----
-23

onlyif mysql # use DIV operator for integer division
query I rowsort label-2440
SELECT + cor0.col2 DIV + col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-2440
SELECT + cor0.col2 / + col1 FROM tab1 AS cor0
----
2
5
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-2441
SELECT - - col1 + col2 DIV 1 AS col0 FROM tab1 AS cor0
----
109
67
80

skipif mysql # not compatible
query I rowsort label-2441
SELECT - - col1 + col2 / 1 AS col0 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT + ( col2 ) * + col2 + 93 FROM tab1 AS cor0
----
3009
3342
9309

query I rowsort
SELECT DISTINCT + 38 FROM tab1, tab0 AS cor0
----
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 61 col2 FROM tab2
----
61

query I rowsort
SELECT - cor0.col1 * + cor0.col0 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT 75 * - col0 FROM tab0
----
-1800
-2625
-6675

query I rowsort
SELECT + ( col1 * ( + col2 ) ) FROM tab0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - cor0.col2 * - cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2449
SELECT - + col2 * - CAST( - col2 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-1
-1089
-6724

skipif mysql # not compatible
query I rowsort label-2449
SELECT - + col2 * - CAST ( - col2 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT 75 * - 14 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 1acc3cd8929f7cea3ca08388f6e74594

query I rowsort
SELECT ALL col1 * + col2 * - col1 FROM tab0 AS cor0
----
-244068
-679042
-9409

query I rowsort
SELECT ALL + col0 + + 20 * col2 FROM tab0 AS cor0
----
1729
55
684

onlyif mysql # use DIV operator for integer division
query I rowsort label-2453
SELECT - + col1 DIV + ( ( cor0.col0 ) ) FROM tab1 AS cor0
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-2453
SELECT - + col1 / + ( ( cor0.col0 ) ) FROM tab1 AS cor0
----
-8
0
0

query I rowsort
SELECT ALL - col2 * - 96 * col2 FROM tab2 cor0
----
138624
64896
69984

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col1 * - col0 col2 FROM tab1
----
1040
640
78

query I rowsort
SELECT DISTINCT 54 * - tab0.col0 AS col2 FROM tab0
----
-1296
-1890
-4806

query I rowsort
SELECT DISTINCT col0 * + col0 * + col0 AS col2 FROM tab0 cor0
----
13824
42875
704969

onlyif mysql # use DIV operator for integer division
query I rowsort label-2458
SELECT ALL - col0 + col1 DIV 18 FROM tab0 AS cor0
----
-20
-30
-84

skipif mysql # not compatible
query I rowsort label-2458
SELECT ALL - col0 + col1 / 18 FROM tab0 AS cor0
----
-20
-30
-84

query I rowsort
SELECT DISTINCT - + col0 + + cor0.col0 AS col2 FROM tab1 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2460
SELECT + col2 DIV 20 FROM tab0 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-2460
SELECT + col2 / 20 FROM tab0 AS cor0
----
0
1
4

query I rowsort
SELECT DISTINCT 93 + col1 AS col1 FROM tab0
----
179
184
190

query I rowsort
SELECT DISTINCT + 89 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
89

query I rowsort
SELECT ALL + ( 82 ) FROM tab0 AS cor0 CROSS JOIN tab1, tab1 AS cor1
----
27 values hashing to 99920d9f7cd9cdccef99cfa459ae6944

query I rowsort
SELECT DISTINCT col0 * tab0.col2 AS col0 FROM tab0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-2465
SELECT - tab0.col0 - col1 DIV + col0 AS col1 FROM tab0
----
-27
-37
-90

skipif mysql # not compatible
query I rowsort label-2465
SELECT - tab0.col0 - col1 / + col0 AS col1 FROM tab0
----
-27
-37
-90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2466
SELECT - + col2 * - CAST( + col2 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
1444
676
729

skipif mysql # not compatible
query I rowsort label-2466
SELECT - + col2 * - CAST ( + col2 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT - col2 * 32 + + col2 + col0 * 93 FROM tab1 AS cor0
----
-1395
4185
4464

query I rowsort
SELECT col2 AS col2 FROM tab1 WHERE NOT NULL BETWEEN NULL AND ( + col0 * col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2469
SELECT DISTINCT tab2.col0 + + col2 DIV - col1 AS col1 FROM tab2
----
7
77
78

skipif mysql # not compatible
query I rowsort label-2469
SELECT DISTINCT tab2.col0 + + col2 / - col1 AS col1 FROM tab2
----
7
77
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col2 * col1 + - col1 col1 FROM tab2
----
1475
629
806

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE col1 = NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2472
SELECT DISTINCT - col1 DIV col0 + col1 FROM tab1
----
10
13
18

skipif mysql # not compatible
query I rowsort label-2472
SELECT DISTINCT - col1 / col0 + col1 FROM tab1
----
10
13
18

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NULL NOT BETWEEN NULL AND + col0 + col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2474
SELECT ALL - tab0.col1 * - col1 DIV + col1 + + tab0.col0 + - col2 * + col0 FROM tab0
----
-682
-7118
97

skipif mysql # not compatible
query I rowsort label-2474
SELECT ALL - tab0.col1 * - col1 / + col1 + + tab0.col0 + - col2 * + col0 FROM tab0
----
-682
-7118
97

query III rowsort
SELECT ALL * FROM tab2 WHERE NULL NOT IN ( col2 + - col1 + - tab2.col2 )
----

query I rowsort
SELECT DISTINCT col1 + - col2 - + col1 * + col1 * - col2 AS col2 FROM tab0
----
244121
679051
9505

query I rowsort
SELECT - col1 * + col1 * + col0 AS col0 FROM tab0
----
-177504
-329315
-737009

query I rowsort
SELECT + col0 * - col1 * + col0 - col0 AS col1 FROM tab1
----
-237
-41024
-83280

query I rowsort
SELECT + tab0.col2 * - col0 + + col2 + col1 FROM tab0
----
-673
-7125
63

onlyif mysql # use DIV operator for integer division
query I rowsort label-2480
SELECT ALL - col0 * col2 DIV tab1.col0 FROM tab1
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-2480
SELECT ALL - col0 * col2 / tab1.col0 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT DISTINCT + 74 FROM tab1, tab1 AS cor0, tab2 cor1, tab2, tab2 AS cor2
----
74

query I rowsort
SELECT DISTINCT + tab2.col1 + col1 AS col2 FROM tab2
----
118
34
62

query I rowsort
SELECT ALL - col1 + col2 * - col2 + 76 AS col2 FROM tab0
----
-1099
-22
-6739

query I rowsort
SELECT ALL - col2 + - col1 - + 20 AS col0 FROM tab2 AS cor0
----
-105
-75
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-2485
SELECT - col2 + col1 DIV + col0 col0 FROM tab1
----
-46
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2485
SELECT - col2 + col1 / + col0 col0 FROM tab1
----
-46
-57
-96

query I rowsort
SELECT ALL col2 * + col0 + - tab0.col0 FROM tab0
----
0
7209
768

query I rowsort
SELECT 68 * col0 FROM tab1
----
204
4352
5440

onlyif mysql # use DIV operator for integer division
query I rowsort label-2488
SELECT 49 * col2 + - 75 DIV 20 - cor0.col1 FROM tab0 cor0
----
-51
1528
3924

skipif mysql # not compatible
query I rowsort label-2488
SELECT 49 * col2 + - 75 / 20 - cor0.col1 FROM tab0 cor0
----
-51
1528
3924

query I rowsort
SELECT DISTINCT col1 + - col0 FROM tab0 AS cor0
----
2
62

query I rowsort
SELECT cor0.col1 * - col0 + - 45 * + 75 FROM tab1 AS cor0
----
-3453
-4015
-4415

query I rowsort
SELECT ALL - col1 * cor0.col0 AS col0 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT - col1 * col2 - + 63 FROM tab1 AS cor0
----
-1311
-1467
-633

query I rowsort
SELECT ALL - - 43 * col2 * col1 FROM tab0 AS cor0
----
122034
320866
4171

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 72 col2 FROM tab1 AS cor0
----
72
72
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * - col2 col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT cor0.col1 + col0 - + col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + + col1 + - col1 FROM tab1 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2498
SELECT + 96 DIV cor0.col0 + + CAST( + 37 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
38
38
69

skipif mysql # not compatible
query I rowsort label-2498
SELECT + 96 / cor0.col0 + + CAST ( + 37 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
38
38
69

query I rowsort
SELECT ALL col0 * ( 49 * - col1 ) FROM tab1 AS cor0
----
-31360
-3822
-50960

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0, tab2 AS cor1, tab0, tab2 cor2
----
3645 values hashing to 6a08afba67ce3272fad6d766e76c67f0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2501
SELECT ALL - col0 / CAST( NULL AS SIGNED ) + - 75 * col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2501
SELECT ALL - col0 / CAST ( NULL AS INTEGER ) + - 75 * col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col0 * 86 col1 FROM tab1 AS cor0
----
-258
-5504
-6880

query I rowsort
SELECT ALL col1 * - cor0.col1 - col2 FROM tab0 AS cor0
----
-7429
-8363
-9410

onlyif mysql # use DIV operator for integer division
query I rowsort label-2504
SELECT DISTINCT + + col2 DIV col1 AS col0 FROM tab2 AS cor0
----
0
2

skipif mysql # not compatible
query I rowsort label-2504
SELECT DISTINCT + + col2 / col1 AS col0 FROM tab2 AS cor0
----
0
2

query I rowsort
SELECT DISTINCT cor0.col2 * + ( 98 ) - - col2 * col2 FROM tab1 AS cor0
----
18624
8208
8835

query I rowsort
SELECT col2 + - cor0.col2 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + + col0 + ( col2 ) FROM tab2 AS cor0
----
104
117
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * - col2 + + cor0.col0 * - col0 col1 FROM tab1 AS cor0
----
-15616
-2925
-7345

query I rowsort
SELECT - + cor0.col2 + ( - 91 ) * - col0 FROM tab2 AS cor0
----
610
7072
7151

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2510
SELECT cor0.col2 * CAST( - col1 AS SIGNED ) + col0 AS col2 FROM tab1 AS cor0
----
-1168
-1401
-506

skipif mysql # not compatible
query I rowsort label-2510
SELECT cor0.col2 * CAST ( - col1 AS INTEGER ) + col0 AS col2 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT DISTINCT - col1 * - 37 + 73 AS col2 FROM tab2 cor0
----
1220
2256
702

query I rowsort
SELECT + - cor0.col0 - - col2 * - 63 FROM tab2 AS cor0
----
-1708
-1716
-2473

query I rowsort
SELECT DISTINCT - col0 * - 14 FROM tab2 AS cor0
----
1092
1106
98

query I rowsort
SELECT ALL - tab0.col1 * col0 - ( tab0.col2 ) FROM tab0
----
-2097
-3396
-8181

query I rowsort
SELECT - col0 * 51 * col2 FROM tab2 AS cor0
----
-103428
-153102
-9639

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2516
SELECT + CAST( + 59 AS SIGNED ) * + col0 AS col0 FROM tab0 AS cor0
----
1416
2065
5251

skipif mysql # not compatible
query I rowsort label-2516
SELECT + CAST ( + 59 AS INTEGER ) * + col0 AS col0 FROM tab0 AS cor0
----
1416
2065
5251

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2517
SELECT ALL - + CAST( 34 AS SIGNED ) + col0 * col2 AS col0 FROM tab0 AS cor0
----
1
7264
758

skipif mysql # not compatible
query I rowsort label-2517
SELECT ALL - + CAST ( 34 AS INTEGER ) + col0 * col2 AS col0 FROM tab0 AS cor0
----
1
7264
758

query I rowsort
SELECT + col1 * 46 AS col0 FROM tab0 AS cor0
----
3956
4186
4462

onlyif mysql # use DIV operator for integer division
query I rowsort label-2519
SELECT ALL col0 DIV - tab1.col2 AS col0 FROM tab1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-2519
SELECT ALL col0 / - tab1.col2 AS col0 FROM tab1
----
-1
0
0

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 cor0 CROSS JOIN tab2, tab0 AS cor1, tab2 AS cor2
----
972 values hashing to 89714dd446b7a97f8787d5744bdbf323

onlyif mysql # use DIV operator for integer division
query I rowsort label-2521
SELECT ( col0 ) DIV - col0 AS col2 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2521
SELECT ( col0 ) / - col0 AS col2 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL 96 + 0 FROM tab0 AS cor0
----
96
96
96

query I rowsort
SELECT ALL - col1 * + col2 * + col2 + - col2 * col2 FROM tab1 AS cor0
----
-129024
-35739
-78732

query I rowsort
SELECT DISTINCT 99 * + col1 + + ( col1 * col2 ) AS col1 FROM tab1 AS cor0
----
1560
2535
3978

query I rowsort
SELECT ALL 65 + cor0.col0 - col2 * col1 AS col0 FROM tab0 AS cor0
----
-2749
-7308
3

query I rowsort
SELECT + + col2 + col0 * col1 AS col0 FROM tab1 AS cor0
----
1136
132
697

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + - col2 * col2 * col0 col0 FROM tab0 cor0
----
-26103
-34
-598354

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2528
SELECT ALL + CAST( 77 AS SIGNED ) * col1 FROM tab2
----
1309
2387
4543

skipif mysql # not compatible
query I rowsort label-2528
SELECT ALL + CAST ( 77 AS INTEGER ) * col1 FROM tab2
----
1309
2387
4543

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2529
SELECT + CAST( + 75 AS SIGNED ) FROM tab2
----
75
75
75

skipif mysql # not compatible
query I rowsort label-2529
SELECT + CAST ( + 75 AS INTEGER ) FROM tab2
----
75
75
75

query I rowsort
SELECT col0 + + 27 FROM tab1
----
107
30
91

query I rowsort
SELECT - col2 + - tab0.col2 * col1 AS col2 FROM tab0
----
-2871
-7544
-98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2532
SELECT 44 * col0 + + col2 * CAST( NULL AS SIGNED ) AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2532
SELECT 44 * col0 + + col2 * CAST ( NULL AS INTEGER ) AS col2 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2533
SELECT - col1 - col1 DIV - cor0.col2 FROM tab0 AS cor0
----
-84
-90
0

skipif mysql # not compatible
query I rowsort label-2533
SELECT - col1 - col1 / - cor0.col2 FROM tab0 AS cor0
----
-84
-90
0

query I rowsort
SELECT DISTINCT + + col2 * cor0.col0 + + cor0.col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT DISTINCT - - 24 AS col0 FROM tab2 AS cor0
----
24

query I rowsort
SELECT ALL + ( tab2.col1 ) * col1 + - col1 FROM tab2
----
272
3422
930

query I rowsort
SELECT ALL + tab0.col0 * col1 * col2 AS col2 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT DISTINCT col0 * tab1.col1 AS col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT - cor0.col1 * + col0 + cor0.col1 + + col2 AS col1 FROM tab2 AS cor0
----
-1288
-159
-4517

onlyif mysql # use DIV operator for integer division
query I rowsort label-2540
SELECT DISTINCT + col0 DIV + col1 FROM tab2 cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-2540
SELECT DISTINCT + col0 / + col1 FROM tab2 cor0
----
0
1
4

query I rowsort
SELECT - - col1 - - cor0.col0 * col0 AS col2 FROM tab2 AS cor0
----
6143
6258
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2542
SELECT DISTINCT - + cor0.col0 + cor0.col0 DIV - col0 AS col2 FROM tab0 AS cor0
----
-25
-36
-90

skipif mysql # not compatible
query I rowsort label-2542
SELECT DISTINCT - + cor0.col0 + cor0.col0 / - col0 AS col2 FROM tab0 AS cor0
----
-25
-36
-90

onlyif mysql # use DIV operator for integer division
query I rowsort label-2543
SELECT + col2 + col1 DIV col2 AS col2 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-2543
SELECT + col2 + col1 / col2 AS col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT - cor0.col1 * - col1 FROM tab2 cor0
----
289
3481
961

query I rowsort
SELECT ALL col2 + col2 + col2 FROM tab0 AS cor0
----
246
3
99

query I rowsort
SELECT ( + 60 ) + col1 FROM tab1
----
70
73
86

query I rowsort
SELECT DISTINCT + ( col2 * tab0.col2 ) AS col1 FROM tab0
----
1
1089
6724

query I rowsort
SELECT DISTINCT - 37 FROM tab2, tab1 AS cor0
----
-37

query I rowsort
SELECT cor0.col0 * col2 * col2 FROM tab0 AS cor0
----
26136
35
598436

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2550
SELECT + CAST( NULL AS SIGNED ) * col1 * col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2550
SELECT + CAST ( NULL AS INTEGER ) * col1 * col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 36 * + col1 + col2 - - col1 AS col0 FROM tab2 cor0
----
1174
2209
667

query I rowsort
SELECT ALL + ( 33 ) - - col2 * - col1 FROM tab1 AS cor0
----
-1215
-1371
-537

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 46 + cor0.col0 * + col0 col1 FROM tab2 AS cor0
----
6130
6287
95

query I rowsort
SELECT ( + 46 ) * cor0.col2 * col1 FROM tab0 AS cor0
----
130548
343252
4462

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 47 * + cor0.col2 col0 FROM tab1, tab0 AS cor0
----
9 values hashing to f914ae4533844db68702949391c4acd3

query I rowsort
SELECT DISTINCT 90 + + col0 FROM tab0 AS cor0
----
114
125
179

query I rowsort
SELECT DISTINCT cor0.col2 * + col2 * + col0 + col1 AS col0 FROM tab2 cor0
----
114093
5134
52787

query I rowsort
SELECT - + 19 AS col2 FROM tab2 AS cor0
----
-19
-19
-19

query I rowsort
SELECT cor0.col0 * col0 * - col0 AS col2 FROM tab2 AS cor0
----
-343
-474552
-493039

onlyif mysql # use DIV operator for integer division
query I rowsort label-2560
SELECT - 95 DIV + col0 AS col0 FROM tab2 AS cor0
----
-1
-1
-13

skipif mysql # not compatible
query I rowsort label-2560
SELECT - 95 / + col0 AS col0 FROM tab2 AS cor0
----
-1
-1
-13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( + col2 ) * - col2 col1 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT ALL - + col2 + + col2 FROM tab2 cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2563
SELECT + CAST( col1 AS SIGNED ) + - col2 AS col2 FROM tab1
----
-28
-47
-83

skipif mysql # not compatible
query I rowsort label-2563
SELECT + CAST ( col1 AS INTEGER ) + - col2 AS col2 FROM tab1
----
-28
-47
-83

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE NOT col1 NOT BETWEEN NULL AND ( col0 )
----

query I rowsort
SELECT ALL - col0 - - col1 * + tab2.col2 FROM tab2
----
1456
567
830

query I rowsort
SELECT - col1 FROM tab2 AS cor0 WHERE NOT NULL <= + cor0.col1 * - col0
----

query IIIIII rowsort
SELECT ALL * FROM tab1, tab1 cor0 WHERE NOT NULL <= NULL
----

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 WHERE NOT NULL NOT BETWEEN col2 AND col2
----

query I rowsort
SELECT DISTINCT + col2 FROM tab0 WHERE + col2 NOT BETWEEN col2 + - col2 AND - col1 + col2 * col1
----
1

query I rowsort
SELECT + tab2.col1 + - col0 AS col0 FROM tab2
----
-19
-62
24

query I rowsort
SELECT ALL + col0 + - col0 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT + col0 / col0 FROM tab0 WHERE ( col1 ) > NULL
----

query I rowsort
SELECT col1 - col0 * col0 AS col1 FROM tab0
----
-1128
-490
-7830

query I rowsort
SELECT DISTINCT + col0 FROM tab1 WHERE NOT NULL NOT BETWEEN NULL AND + col2
----

query I rowsort
SELECT ALL - col0 * + col2 - tab0.col2 * col2 AS col1 FROM tab0
----
-14022
-1881
-36

onlyif mysql # use DIV operator for integer division
query I rowsort label-2576
SELECT DISTINCT - col1 DIV - col1 + - tab2.col0 AS col0 FROM tab2
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort label-2576
SELECT DISTINCT - col1 / - col1 + - tab2.col0 AS col0 FROM tab2
----
-6
-77
-78

query I rowsort
SELECT DISTINCT + col0 * + col2 + - col2 AS col2 FROM tab0
----
34
7216
759

query I rowsort
SELECT - col0 FROM tab2 WHERE col2 NOT BETWEEN NULL AND + col1 + col0
----

query I rowsort
SELECT DISTINCT col0 * - tab1.col0 + col1 AS col1 FROM tab1
----
-4086
-6387
17

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT col1 <> - col0
----

query I rowsort
SELECT ALL col0 + - col0 * col0 FROM tab2
----
-42
-6006
-6162

query I rowsort
SELECT col2 * + col0 + - col1 + - col1 AS col0 FROM tab1 AS cor0
----
110
3628
7654

onlyif mysql # use DIV operator for integer division
query I rowsort label-2583
SELECT col2 + col0 DIV - col1 AS col2 FROM tab2 AS cor0
----
25
27
34

skipif mysql # not compatible
query I rowsort label-2583
SELECT col2 + col0 / - col1 AS col2 FROM tab2 AS cor0
----
25
27
34

query I rowsort
SELECT + col1 * col0 + col1 + + col1 AS col2 FROM tab1 AS cor0
----
1066
130
660

query I rowsort
SELECT - - col1 + + col0 + cor0.col1 FROM tab0 cor0
----
196
229
271

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * col2 * col2 + col2 col2 FROM tab2
----
-114038
-5076
-52702

query I rowsort
SELECT col0 + + col0 FROM tab0 WHERE ( col1 ) >= col1
----
178
48
70

query I rowsort
SELECT ALL - col1 * - col0 AS col0 FROM tab1
----
1040
640
78

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 WHERE NULL BETWEEN col0 * - col2 AND ( - col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2590
SELECT + col1 DIV - cor0.col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2590
SELECT + col1 / - cor0.col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab1
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT cor0.col0 + + col0 + - cor0.col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + cor0.col0 * + col1 + - col0 * col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT + 13 + col1 FROM tab2 AS cor0
----
30
44
72

query I rowsort
SELECT DISTINCT + ( - col1 ) + col1 * 9 + + col1 FROM tab2
----
153
279
531

onlyif mysql # use DIV operator for integer division
query I rowsort label-2596
SELECT col0 * col2 + cor0.col0 DIV + col0 AS col2 FROM tab0 AS cor0
----
36
7299
793

skipif mysql # not compatible
query I rowsort label-2596
SELECT col0 * col2 + cor0.col0 / + col0 AS col2 FROM tab0 AS cor0
----
36
7299
793

query I rowsort
SELECT - ( - 5 ) + col1 FROM tab1 AS cor0
----
15
18
31

query I rowsort
SELECT - + col2 - 33 * cor0.col2 AS col1 FROM tab2 cor0
----
-1292
-884
-918

onlyif mysql # use DIV operator for integer division
query I rowsort label-2599
SELECT col1 * col2 DIV col2 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-2599
SELECT col1 * col2 / col2 FROM tab1
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2600
SELECT + CAST( NULL AS SIGNED ) - ( cor0.col1 ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2600
SELECT + CAST ( NULL AS INTEGER ) - ( cor0.col1 ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + 28 + - col2 FROM tab2 AS cor0
----
-54
-55
-66

query I rowsort
SELECT ALL - - ( col2 ) + 64 AS col2 FROM tab2 AS cor0
----
102
90
91

query I rowsort
SELECT - ( cor0.col2 ) * + col0 * col1 AS col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-2604
SELECT ALL - 91 DIV col0 AS col2 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-2604
SELECT ALL - 91 / col0 AS col2 FROM tab0 AS cor0
----
-1
-2
-3

query I rowsort
SELECT - col0 * col1 + - 19 FROM tab2 AS cor0
----
-1362
-236
-4621

query I rowsort
SELECT DISTINCT cor0.col0 + col2 AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT 52 FROM tab1, tab2, tab2 AS cor0, tab1 AS cor1
----
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-2608
SELECT + col0 DIV col0 + col2 - + ( tab0.col1 ) FROM tab0
----
-52
-8
-95

skipif mysql # not compatible
query I rowsort label-2608
SELECT + col0 / col0 + col2 - + ( tab0.col1 ) FROM tab0
----
-52
-8
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-2609
SELECT - col2 * - col0 DIV - col0 + col1 FROM tab1
----
-28
-47
-83

skipif mysql # not compatible
query I rowsort label-2609
SELECT - col2 * - col0 / - col0 + col1 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT + - col1 * ( col0 ) FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + + col1 * + col1 FROM tab1 cor0
----
100
169
676

query I rowsort
SELECT DISTINCT + col2 + ( - 98 ) * - col0 AS col0 FROM tab1 cor0
----
348
6329
7936

query I rowsort
SELECT DISTINCT - col2 * + col1 * - col1 FROM tab2
----
10982
25947
90506

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab1, tab0 cor1, tab2, tab0 AS cor2
----
3645 values hashing to 0705df526be8eeded96d0c20ae938712

query I rowsort
SELECT DISTINCT + tab0.col1 * col0 - tab0.col1 FROM tab0
----
1978
3298
8008

query I rowsort
SELECT ALL 79 FROM tab2 cor0 CROSS JOIN tab1, tab2 AS cor1
----
27 values hashing to 4857f2e1b1dbd184de4827f145dd02a1

query I rowsort
SELECT - col1 + ( 8 ) * col2 * + col0 AS col1 FROM tab1 AS cor0
----
1270
29174
61427

query I rowsort
SELECT DISTINCT + 72 * cor0.col0 + + col2 FROM tab0 AS cor0
----
1761
2521
6490

query I rowsort
SELECT ALL + 79 + col1 FROM tab0 cor0
----
165
170
176

query I rowsort
SELECT ALL + 80 * + 74 AS col2 FROM tab1 AS cor0
----
5920
5920
5920

query I rowsort
SELECT - cor0.col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - col2 * + col1 + - col0 col1 FROM tab1
----
-119888
-32554
-75819

query I rowsort
SELECT 57 FROM tab0, tab0 cor0
----
9 values hashing to 61da70c624ad60604a668f7f8f29392a

query I rowsort
SELECT col2 * col0 - tab0.col1 AS col1 FROM tab0
----
-62
706
7207

query I rowsort
SELECT col1 * ( col2 ) FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL ( col1 ) * - col1 AS col2 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT - cor0.col1 * - col1 + col0 FROM tab0 cor0
----
7420
8370
9444

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + + 22 col1 FROM tab2 cor0
----
48
49
60

query I rowsort
SELECT ALL 66 + col1 AS col0 FROM tab1 AS cor0
----
76
79
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-2630
SELECT - 31 DIV ( - col0 ) FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2630
SELECT - 31 / ( - col0 ) FROM tab0 AS cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2631
SELECT DISTINCT - + col2 DIV cor0.col2 + + col2 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-2631
SELECT DISTINCT - + col2 / cor0.col2 + + col2 FROM tab0 AS cor0
----
0
32
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-2632
SELECT ALL - + col1 + col2 DIV cor0.col0 AS col0 FROM tab1 AS cor0
----
-10
-12
-8

skipif mysql # not compatible
query I rowsort label-2632
SELECT ALL - + col1 + col2 / cor0.col0 AS col0 FROM tab1 AS cor0
----
-10
-12
-8

query I rowsort
SELECT 4 FROM tab0 cor0
----
4
4
4

query I rowsort
SELECT ALL cor0.col1 + col2 AS col0 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT 52 + - col2 FROM tab1 AS cor0
----
-2
-44
-5

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( - col1 AS REAL ) FROM tab0 AS cor0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2637
SELECT + CAST( NULL AS SIGNED ) / 11 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2637
SELECT + CAST ( NULL AS INTEGER ) / 11 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + col1 * 84 * + col1 AS col2 FROM tab2 AS cor0
----
24276
292404
80724

onlyif mysql # use DIV operator for integer division
query I rowsort label-2639
SELECT - col2 + + col2 - + col1 DIV ( - col0 ) AS col2 FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-2639
SELECT - col2 + + col2 - + col1 / ( - col0 ) AS col2 FROM tab1 AS cor0
----
0
0
8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2640
SELECT ALL + CAST( + col2 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-2640
SELECT ALL + CAST ( + col2 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-2641
SELECT - 81 DIV 4 FROM tab1 AS cor0
----
-20
-20
-20

skipif mysql # not compatible
query I rowsort label-2641
SELECT - 81 / 4 FROM tab1 AS cor0
----
-20
-20
-20

query I rowsort
SELECT DISTINCT 0 + + col2 + col2 * col1 AS col1 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT ALL + cor1.col1 + ( + cor1.col1 ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 1a063bfb694f348122cd0739295ca641

query I rowsort
SELECT - - col1 * cor0.col1 + + col0 * - 31 AS col0 FROM tab1 AS cor0
----
-1884
-2311
583

query I rowsort
SELECT DISTINCT + col0 * col1 + ( + col0 ) * + col1 FROM tab0 cor0
----
16198
4128
6790

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * col0 - ( + col2 + col0 ) col2 FROM tab0 AS cor0
----
-2121
-3431
-8270

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - col0 + - col0 col1 FROM tab1 AS cor0
----
-1120
-704
-81

query I rowsort
SELECT 46 AS col2 FROM tab1 AS cor0
----
46
46
46

query I rowsort
SELECT DISTINCT - col2 * col0 + + col2 AS col2 FROM tab0 cor0
----
-34
-7216
-759

query I rowsort
SELECT ALL + - col1 * 48 FROM tab0 AS cor0
----
-4128
-4368
-4656

query I rowsort
SELECT ALL - col0 * col2 + col2 AS col2 FROM tab0
----
-34
-7216
-759

query I rowsort
SELECT DISTINCT + col0 * - 88 AS col2 FROM tab2 AS cor0
----
-616
-6864
-6952

query I rowsort
SELECT DISTINCT + + cor0.col0 + 81 AS col1 FROM tab0 AS cor0
----
105
116
170

query I rowsort
SELECT ALL - - col1 * + 98 FROM tab1 AS cor0
----
1274
2548
980

query I rowsort
SELECT 50 * + col0 AS col1 FROM tab2 AS cor0
----
350
3900
3950

query I rowsort
SELECT + cor0.col1 * col1 * + 56 FROM tab0 AS cor0
----
414176
463736
526904

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 10 * - cor0.col0 col1 FROM tab2 AS cor0
----
70
780
790

query I rowsort
SELECT ALL + col2 * col2 * 29 AS col2 FROM tab0 AS cor0
----
194996
29
31581

query I rowsort
SELECT 16 * col0 AS col0 FROM tab2 AS cor0
----
112
1248
1264

query I rowsort
SELECT ALL + 5 + col0 AS col2 FROM tab2
----
12
83
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 3 col1 FROM tab1
----
-3

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to 8bda8b9cf32f196464e0ee0b41a5162d

query I rowsort
SELECT - + 29 * + cor0.col0 FROM tab1 AS cor0
----
-1856
-2320
-87

query I rowsort
SELECT + 75 AS col0 FROM tab1
----
75
75
75

query I rowsort
SELECT DISTINCT + ( - col0 ) AS col2 FROM tab0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 87 col0 FROM tab0
----
87
87
87

onlyif mysql # use DIV operator for integer division
query I rowsort label-2667
SELECT - col0 DIV col1 + col1 * 73 * col1 AS col0 FROM tab2
----
21093
254112
70153

skipif mysql # not compatible
query I rowsort label-2667
SELECT - col0 / col1 + col1 * 73 * col1 AS col0 FROM tab2
----
21093
254112
70153

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 83 col2 FROM tab1 AS cor0
----
83
83
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-2669
SELECT - col1 DIV 82 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2669
SELECT - col1 / 82 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2670
SELECT ALL col1 + col1 DIV + col0 FROM tab1 AS cor0
----
10
13
34

skipif mysql # not compatible
query I rowsort label-2670
SELECT ALL col1 + col1 / + col0 FROM tab1 AS cor0
----
10
13
34

query I rowsort
SELECT ALL - 63 * 82 AS col1 FROM tab1 cor0
----
-5166
-5166
-5166

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0, tab0 AS cor1, tab1 cor2
----
972 values hashing to 9af67d6f98010464af5d560bf949d487

query I rowsort
SELECT + 39 FROM tab1 cor0
----
39
39
39

query IIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 WHERE NOT ( NULL ) > NULL
----

query I rowsort
SELECT ALL + 22 AS col2 FROM tab2
----
22
22
22

query I rowsort
SELECT - 22 AS col1 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 647e567609c5ada1d3454d2102819bfe

query I rowsort
SELECT ( cor0.col0 ) AS col0 FROM tab0 AS cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-2678
SELECT DISTINCT - + col1 DIV - col0 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-2678
SELECT DISTINCT - + col1 / - col0 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT tab0.col1 * - col2 AS col0 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT ALL + + col2 + - ( - col2 + col1 ) AS col0 FROM tab1 AS cor0
----
104
179
82

query I rowsort
SELECT ALL cor1.col2 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT - 54 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 4ecdb0f1b85f0d4fdc3a826efd9f2342

query I rowsort
SELECT col1 + cor0.col1 * cor0.col1 FROM tab1 AS cor0
----
110
182
702

query I rowsort
SELECT + col1 * + col0 - ( col0 ) FROM tab1 AS cor0
----
576
75
960

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col0 + - col1 col1 FROM tab1 AS cor0
----
-104
-1053
-650

query I rowsort
SELECT - + 1 * 69 AS col2 FROM tab0 AS cor0
----
-69
-69
-69

query I rowsort
SELECT 86 + + cor0.col0 AS col0 FROM tab1 AS cor0
----
150
166
89

query I rowsort
SELECT ALL ( tab2.col1 ) AS col0 FROM tab2
----
17
31
59

query I rowsort
SELECT ALL - 51 AS col2 FROM tab2
----
-51
-51
-51

query I rowsort
SELECT - col1 * - col1 - 6 FROM tab2 AS cor0
----
283
3475
955

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2691
SELECT ALL + col0 + + CAST( col2 AS SIGNED ) + cor0.col1 AS col0 FROM tab0 AS cor0
----
133
143
262

skipif mysql # not compatible
query I rowsort label-2691
SELECT ALL + col0 + + CAST ( col2 AS INTEGER ) + cor0.col1 AS col0 FROM tab0 AS cor0
----
133
143
262

query I rowsort
SELECT ALL + - col1 * + col0 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT + - col2 * + col2 - - cor0.col0 FROM tab2 AS cor0
----
-1365
-598
-722

onlyif mysql # use DIV operator for integer division
query I rowsort label-2694
SELECT DISTINCT + + col2 + - col0 DIV 18 FROM tab1 AS cor0
----
54
92

skipif mysql # not compatible
query I rowsort label-2694
SELECT DISTINCT + + col2 + - col0 / 18 FROM tab1 AS cor0
----
54
92

query I rowsort
SELECT - col1 + 96 FROM tab0 AS cor0
----
-1
10
5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2696
SELECT - col0 + + CAST( col2 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-34
-7
9

skipif mysql # not compatible
query I rowsort label-2696
SELECT - col0 + + CAST ( col2 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT + col0 * cor0.col1 + + cor0.col1 + + cor0.col2 FROM tab0 cor0
----
2183
3493
8272

query I rowsort
SELECT ALL + cor0.col1 * ( - col0 ) + col0 * ( + col0 ) AS col0 FROM tab2 AS cor0
----
-168
1482
4898

query I rowsort
SELECT ALL + tab0.col2 * - 42 FROM tab0, tab1 AS cor0
----
9 values hashing to 1b5c65be4eb3a857f9dc00223508cc62

query I rowsort
SELECT - cor0.col2 - - cor0.col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col1 + - col0 + col2 FROM tab2 AS cor0
----
-24
51
7

query I rowsort
SELECT - + col1 + + cor0.col0 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT col2 * col2 + - cor0.col1 * col2 FROM tab2 AS cor0
----
-108
-858
798

query I rowsort
SELECT DISTINCT - + col1 * - ( col2 * - col0 ) AS col2 FROM tab0 AS cor0
----
-3395
-664118
-68112

query I rowsort
SELECT - col1 * - 73 AS col2 FROM tab2 AS cor0
----
1241
2263
4307

query I rowsort
SELECT - + col2 * 30 AS col2 FROM tab2 AS cor0
----
-1140
-780
-810

query I rowsort
SELECT 67 + col0 FROM tab1 AS cor0
----
131
147
70

query I rowsort
SELECT - + col1 + 23 FROM tab1 AS cor0
----
-3
10
13

query I rowsort
SELECT ALL col0 * + 61 AS col1 FROM tab0 AS cor0
----
1464
2135
5429

query I rowsort
SELECT DISTINCT + - 88 AS col0 FROM tab2 AS cor0
----
-88

onlyif mysql # use DIV operator for integer division
query I rowsort label-2711
SELECT ALL + col1 DIV ( 9 ) AS col0 FROM tab1
----
1
1
2

skipif mysql # not compatible
query I rowsort label-2711
SELECT ALL + col1 / ( 9 ) AS col0 FROM tab1
----
1
1
2

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT + col2 * + ( - col2 ) FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL + 34 * - col1 FROM tab2 AS cor0
----
-1054
-2006
-578

query I rowsort
SELECT ALL + 33 * col0 AS col0 FROM tab2 AS cor0
----
231
2574
2607

query I rowsort
SELECT ALL + - ( + col0 ) AS col1 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2717
SELECT ALL col2 * - col2 + 90 * + col2 DIV - col2 FROM tab0 AS cor0
----
-1179
-6814
-91

skipif mysql # not compatible
query I rowsort label-2717
SELECT ALL col2 * - col2 + 90 * + col2 / - col2 FROM tab0 AS cor0
----
-1179
-6814
-91

query I rowsort
SELECT - 75 * col1 * col2 + + tab2.col1 * - col1 * col0 AS col1 FROM tab2
----
-386568
-69502
-71281

query I rowsort
SELECT - col1 + - col2 * - ( 45 ) AS col1 FROM tab2 AS cor0
----
1111
1184
1693

query I rowsort
SELECT ALL - + 72 * col1 * - 22 FROM tab0 AS cor0
----
136224
144144
153648

query I rowsort
SELECT DISTINCT - col0 * - col2 + + cor0.col2 AS col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT DISTINCT + 4 * - col2 FROM tab1 AS cor0
----
-216
-228
-384

query I rowsort
SELECT - - cor0.col0 * col1 AS col1 FROM tab2 AS cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * col1 * cor0.col0 col1 FROM tab1 cor0
----
-13520
-2028
-6400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 24 col2 FROM tab0 AS cor0
----
-24

query I rowsort
SELECT - tab1.col2 + - 0 FROM tab1
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2727
SELECT + col1 DIV col1 + col2 col1 FROM tab0
----
2
34
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2727
SELECT + col1 / col1 + col2 col1 FROM tab0
----
2
34
83

query I rowsort
SELECT ALL 63 + - 12 FROM tab2
----
51
51
51

query I rowsort
SELECT tab0.col1 - + 68 FROM tab0
----
18
23
29

query I rowsort
SELECT DISTINCT - 26 + + col1 FROM tab2
----
-9
33
5

query I rowsort
SELECT DISTINCT 94 * col0 + col1 FROM tab2
----
689
7391
7443

query I rowsort
SELECT col2 + 51 FROM tab1
----
105
108
147

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 81 col0 FROM tab2 AS cor0
----
81

query I rowsort
SELECT - + col2 * cor0.col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL + 99 * col2 AS col2 FROM tab1 AS cor0
----
5346
5643
9504

onlyif mysql # use DIV operator for integer division
query I rowsort label-2736
SELECT DISTINCT 92 * cor0.col0 DIV col1 FROM tab1 AS cor0
----
10
566
588

skipif mysql # not compatible
query I rowsort label-2736
SELECT DISTINCT 92 * cor0.col0 / col1 FROM tab1 AS cor0
----
10
566
588

query I rowsort
SELECT + 89 + - cor0.col0 * 63 FROM tab1 AS cor0
----
-100
-3943
-4951

onlyif mysql # use DIV operator for integer division
query I rowsort label-2738
SELECT ALL - col1 DIV + col0 + + cor0.col0 FROM tab0 AS cor0
----
21
33
88

skipif mysql # not compatible
query I rowsort label-2738
SELECT ALL - col1 / + col0 + + cor0.col0 FROM tab0 AS cor0
----
21
33
88

query I rowsort
SELECT + tab2.col1 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT + col1 + - 94 AS col2 FROM tab1 cor0
----
-68
-81
-84

query I rowsort
SELECT DISTINCT - - ( 80 ) + col2 * - 81 FROM tab0 cor0
----
-1
-2593
-6562

query I rowsort
SELECT ALL col1 * ( + col2 ) + col2 AS col0 FROM tab0
----
2871
7544
98

query I rowsort
SELECT col2 * - 31 * 76 + + col2 FROM tab0
----
-193110
-2355
-77715

query I rowsort
SELECT + col2 + + ( + col0 ) * col0 * + col1 + - col1 FROM tab0 cor0
----
118729
49483
720802

query I rowsort
SELECT ALL col1 * - tab1.col2 AS col0 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT ALL + + ( + cor0.col2 ) + col1 * + 83 FROM tab1 AS cor0
----
1175
2212
887

query I rowsort
SELECT ALL + ( 78 ) * col2 AS col0 FROM tab0 AS cor0
----
2574
6396
78

query I rowsort
SELECT DISTINCT 26 * + col1 AS col2 FROM tab2 AS cor0
----
1534
442
806

onlyif mysql # use DIV operator for integer division
query I rowsort label-2749
SELECT col1 DIV - cor0.col0 + col0 * - ( col2 ) * + col1 + ( 90 ) col2 FROM tab2 AS cor0
----
-119562
-50944
-5773

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2749
SELECT col1 / - cor0.col0 + col0 * - ( col2 ) * + col1 + ( 90 ) col2 FROM tab2 AS cor0
----
-119562
-50944
-5773

query I rowsort
SELECT DISTINCT - 58 + + 58 AS col0 FROM tab0 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 85 + col0 * + col0 col2 FROM tab1 AS cor0
----
4181
6485
94

query I rowsort
SELECT - + col2 + - 99 + col0 * + col0 * col1 AS col2 FROM tab0 AS cor0
----
118725
49404
720630

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2753
SELECT DISTINCT + CAST( + 24 AS SIGNED ) AS col0 FROM tab1 cor0
----
24

skipif mysql # not compatible
query I rowsort label-2753
SELECT DISTINCT + CAST ( + 24 AS INTEGER ) AS col0 FROM tab1 cor0
----
24

query I rowsort
SELECT DISTINCT + ( ( + cor0.col0 ) ) * col1 + col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT ALL 7 AS col1 FROM tab0 AS cor0
----
7
7
7

query I rowsort
SELECT ALL col0 - - cor0.col0 AS col1 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT DISTINCT + col0 + 2 FROM tab2 AS cor0
----
80
81
9

query I rowsort
SELECT ALL + col2 * col2 * col2 FROM tab1
----
157464
185193
884736

query I rowsort
SELECT col1 + + 88 + 38 AS col2 FROM tab2 cor0
----
143
157
185

query I rowsort
SELECT col1 * - 63 + + 21 + col1 AS col2 FROM tab1 AS cor0
----
-1591
-599
-785

query I rowsort
SELECT DISTINCT - col2 * col1 + col1 + + col2 AS col1 FROM tab1 AS cor0
----
-1139
-1324
-503

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2762
SELECT ALL - - col1 * + CAST( - col1 AS SIGNED ) - + cor0.col2 col1 FROM tab0 AS cor0
----
-7429
-8363
-9410

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2762
SELECT ALL - - col1 * + CAST ( - col1 AS INTEGER ) - + cor0.col2 col1 FROM tab0 AS cor0
----
-7429
-8363
-9410

query I rowsort
SELECT DISTINCT col0 + 54 FROM tab2 AS cor0
----
132
133
61

query I rowsort
SELECT ALL col0 * - col1 - - 55 FROM tab2 AS cor0
----
-1288
-162
-4547

query I rowsort
SELECT - ( + 54 ) FROM tab0 cor0
----
-54
-54
-54

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2766
SELECT ALL + CAST( NULL AS SIGNED ) * + 93 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2766
SELECT ALL + CAST ( NULL AS INTEGER ) * + 93 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + 78 FROM tab0, tab2 AS cor0
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2768
SELECT CAST( + 64 AS SIGNED ) AS col0 FROM tab2, tab1 AS cor0, tab1, tab2 AS cor1
----
81 values hashing to 9bd8c7417aea89812d57dc6142310b3f

skipif mysql # not compatible
query I rowsort label-2768
SELECT CAST ( + 64 AS INTEGER ) AS col0 FROM tab2, tab1 AS cor0, tab1, tab2 AS cor1
----
81 values hashing to 9bd8c7417aea89812d57dc6142310b3f

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to bce5cbf48f4a41569415c085ae91ae7c

query I rowsort
SELECT col0 + - col0 * - 79 FROM tab0 AS cor0
----
1920
2800
7120

query I rowsort
SELECT + col1 * - col2 - col2 AS col1 FROM tab2 AS cor0
----
-1560
-684
-864

query I rowsort
SELECT + - col1 + cor0.col0 * - cor0.col1 FROM tab1 AS cor0
----
-104
-1053
-650

query I rowsort
SELECT - 65 + - col2 AS col1 FROM tab2 AS cor0
----
-103
-91
-92

query I rowsort
SELECT 59 * col2 + - ( - 13 ) FROM tab1 AS cor0
----
3199
3376
5677

query I rowsort
SELECT DISTINCT + + col1 - col0 FROM tab0 AS cor0
----
2
62

query I rowsort
SELECT ALL col0 + + 55 FROM tab0
----
144
79
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + col2 col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL - 40 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 01aad4539198a6509248e086869f90a6

query I rowsort
SELECT DISTINCT 58 + - tab0.col2 * 66 AS col0 FROM tab0
----
-2120
-5354
-8

query I rowsort
SELECT DISTINCT + col1 + col1 AS col1 FROM tab0
----
172
182
194

query I rowsort
SELECT ALL - tab0.col2 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT DISTINCT col2 + col0 * - 9 * 7 FROM tab0
----
-1479
-2204
-5525

query I rowsort
SELECT DISTINCT + 0 AS col1 FROM tab0
----
0

query I rowsort
SELECT + 91 AS col0 FROM tab0
----
91
91
91

query I rowsort
SELECT + col0 * col1 * + 34 + col1 AS col2 FROM tab2 AS cor0
----
156527
45679
7409

query I rowsort
SELECT + cor0.col1 * - col1 + 17 AS col0 FROM tab2 AS cor0
----
-272
-3464
-944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col2 ) * + col1 * col2 col1 FROM tab1
----
119808
32490
75816

query I rowsort
SELECT DISTINCT - col2 * - col2 AS col2 FROM tab0
----
1
1089
6724

query I rowsort
SELECT - 36 AS col2 FROM tab2, tab1 cor0
----
9 values hashing to afecaf209e79e23b6674a73fffa3e837

query I rowsort
SELECT DISTINCT col2 * col1 * tab1.col0 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT - col1 * + col2 + cor0.col2 FROM tab1 AS cor0
----
-1152
-1350
-513

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * col2 + - 65 col0 FROM tab2 cor0
----
-1509
-741
-794

query I rowsort
SELECT DISTINCT tab0.col2 + col0 FROM tab0
----
171
36
57

query I rowsort
SELECT ALL 83 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 002a717a3d902d97220759065fb107c3

onlyif mysql # use DIV operator for integer division
query I rowsort label-2795
SELECT - tab1.col1 DIV + col2 + - col1 AS col2 FROM tab1
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-2795
SELECT - tab1.col1 / + col2 + - col1 AS col2 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT DISTINCT - col0 - 67 FROM tab0 AS cor0
----
-102
-156
-91

query I rowsort
SELECT + + 2 FROM tab2 AS cor0
----
2
2
2

query I rowsort
SELECT - + ( + cor0.col0 ) * + col2 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT - + ( + col0 ) * - 43 + - col0 AS col0 FROM tab0 AS cor0
----
1008
1470
3738

query I rowsort
SELECT + cor0.col2 + col2 * cor0.col0 + + col0 AS col2 FROM tab1 AS cor0
----
219
3769
7856

query I rowsort
SELECT col1 * col2 - 15 FROM tab0 AS cor0
----
2823
7447
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - col0 - - ( col1 ) col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT - 29 + - col0 AS col1 FROM tab0 AS cor0
----
-118
-53
-64

onlyif mysql # use DIV operator for integer division
query I rowsort label-2804
SELECT col2 + + col1 DIV col2 FROM tab0
----
35
83
98

skipif mysql # not compatible
query I rowsort label-2804
SELECT col2 + + col1 / col2 FROM tab0
----
35
83
98

query I rowsort
SELECT DISTINCT - col1 + col2 * col0 AS col0 FROM tab1
----
136
3638
7667

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + - col1 col0 FROM tab1
----
-20
-26
-52

query I rowsort
SELECT + col2 + + col2 AS col2 FROM tab1 WHERE + col2 = col1 * - col1 + col2
----

query I rowsort
SELECT ALL tab2.col0 + - tab2.col0 * + col2 AS col0 FROM tab2
----
-182
-1950
-2923

query I rowsort
SELECT DISTINCT - col1 * col0 FROM tab2 WHERE NOT ( col2 * - col2 ) <> + col1 * + col1 + - col2
----

query I rowsort
SELECT DISTINCT - 95 AS col1 FROM tab1 AS cor0
----
-95

query I rowsort
SELECT DISTINCT + tab1.col0 + - col1 FROM tab1
----
-23
54
67

query I rowsort
SELECT - col0 + - col0 + col0 FROM tab2
----
-7
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-2813
SELECT + col2 DIV + col1 col1 FROM tab2
----
0
0
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2813
SELECT + col2 / + col1 col1 FROM tab2
----
0
0
2

query I rowsort
SELECT ALL col1 * col1 + - col1 AS col2 FROM tab1
----
156
650
90

query I rowsort
SELECT ALL + 57 AS col1 FROM tab2
----
57
57
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 4 col0 FROM tab1
----
-4
-4
-4

query I rowsort
SELECT 3 + col1 FROM tab2
----
20
34
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2818
SELECT ALL ( + col0 ) * - CAST( col2 + col0 AS SIGNED ) FROM tab0
----
-1260
-1368
-15219

skipif mysql # not compatible
query I rowsort label-2818
SELECT ALL ( + col0 ) * - CAST ( col2 + col0 AS INTEGER ) FROM tab0
----
-1260
-1368
-15219

query I rowsort
SELECT cor0.col0 + + 54 + 75 FROM tab0, tab1 AS cor0
----
9 values hashing to 19c5b9ff8f9d45b86f7c7aa91c3bece7

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 cor0, tab1 AS cor1, tab0, tab1 cor2
----
3645 values hashing to 9a402ad2669465fb284445c499a48f2c

query I rowsort
SELECT DISTINCT + + 33 * + col2 * 9 AS col2 FROM tab1 AS cor0
----
16038
16929
28512

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2822
SELECT + col1 + + col0 * CAST( col0 AS SIGNED ) FROM tab1 AS cor0
----
35
4106
6413

skipif mysql # not compatible
query I rowsort label-2822
SELECT + col1 + + col0 * CAST ( col0 AS INTEGER ) FROM tab1 AS cor0
----
35
4106
6413

query I rowsort
SELECT ALL - tab1.col0 * + tab1.col1 FROM tab1
----
-1040
-640
-78

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT col2 / + col2 + - tab1.col0 BETWEEN NULL AND NULL
----

query III rowsort
SELECT ALL * FROM tab0 WHERE NULL IN ( - col1 + col2 )
----

query I rowsort
SELECT DISTINCT col0 * - col0 * - col0 + col2 + + tab1.col1 FROM tab1
----
107
262211
512109

query I rowsort
SELECT DISTINCT - col1 * - tab0.col0 * tab0.col2 AS col1 FROM tab0
----
3395
664118
68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-2828
SELECT + tab1.col0 + tab1.col2 DIV col0 + + col1 * - col2 * + col1 FROM tab1
----
-16143
-36483
-5636

skipif mysql # not compatible
query I rowsort label-2828
SELECT + tab1.col0 + tab1.col2 / col0 + + col1 * - col2 * + col1 FROM tab1
----
-16143
-36483
-5636

query I rowsort
SELECT ALL col0 * + tab2.col0 * - col0 FROM tab2
----
-343
-474552
-493039

query III rowsort
SELECT * FROM tab0 WHERE col0 + + col1 + + col1 NOT BETWEEN ( NULL ) AND ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2831
SELECT - col0 DIV + tab0.col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2831
SELECT - col0 / + tab0.col1 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT tab0.col2 + - col1 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT - col1 + tab0.col1 + tab0.col2 FROM tab0
----
1
33
82

query I rowsort
SELECT col1 + - col2 * + col0 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab1, tab0 cor0
----
1
33
82

query I rowsort
SELECT DISTINCT - col1 * - col0 * col1 FROM tab2 AS cor0 WHERE NOT ( NULL ) <> NULL
----

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 WHERE ( NULL ) NOT IN ( cor0.col2 )
----

query I rowsort
SELECT tab1.col1 * tab1.col0 AS col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT tab1.col0 + col2 * col1 AS col0 FROM tab1 WHERE + col1 * - col2 + col2 NOT IN ( col0 * col2 )
----
1328
1407
634

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT col1 + col0 IN ( tab2.col0 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 col1 FROM tab2 AS cor0 WHERE NOT ( NULL ) BETWEEN NULL AND ( - col0 - col0 )
----

query I rowsort
SELECT DISTINCT + col2 + col1 * col1 FROM tab0
----
7429
8363
9410

query I rowsort
SELECT col2 + col0 * - col2 * col1 AS col1 FROM tab0
----
-3394
-664036
-68079

query I rowsort
SELECT DISTINCT - col0 + - tab1.col2 * + col2 FROM tab1
----
-2919
-3313
-9296

query I rowsort
SELECT col1 * - col1 + + tab2.col2 AS col1 FROM tab2
----
-251
-3455
-934

query III rowsort
SELECT * FROM tab2 WHERE NOT ( + col1 ) IN ( col1 * + tab2.col2 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT DISTINCT col0 * tab2.col0 + - col1 FROM tab2
----
18
6025
6224

onlyif mysql # use DIV operator for integer division
query I rowsort label-2848
SELECT ALL - col1 + + col2 DIV col1 AS col2 FROM tab0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-2848
SELECT ALL - col1 + + col2 / col1 AS col2 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT - col2 AS col1 FROM tab0 WHERE NOT - tab0.col2 NOT IN ( col0 + - tab0.col1 )
----

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2850
SELECT ALL + CAST( NULL AS SIGNED ) * - col0 + 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-2850
SELECT ALL + CAST ( NULL AS INTEGER ) * - col0 + col1 col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + 50 * col2 + + col0 FROM tab0 AS cor0
----
-15
-1626
-4011

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 6 col2 FROM tab0
----
-6
-6
-6

query I rowsort
SELECT DISTINCT + col1 - - ( col0 ) AS col0 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2854
SELECT ALL + CAST( NULL AS SIGNED ) - + col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2854
SELECT ALL + CAST ( NULL AS INTEGER ) - + col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - col2 + + ( col0 ) * col2 FROM tab0 cor0
----
36
7380
825

query I rowsort
SELECT - 27 * cor0.col0 + + col1 AS col0 FROM tab0 AS cor0
----
-2312
-562
-848

query I rowsort
SELECT ALL 51 + - 13 * - col1 FROM tab2 AS cor0
----
272
454
818

query I rowsort
SELECT DISTINCT + 25 * + col0 + cor0.col1 AS col0 FROM tab0 cor0
----
2316
686
972

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2859
SELECT DISTINCT CAST( NULL AS SIGNED ) * cor0.col1 + col1 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2859
SELECT DISTINCT CAST ( NULL AS INTEGER ) * cor0.col1 + col1 FROM tab0 cor0
----
NULL

query I rowsort
SELECT + + col2 + - cor0.col2 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + - 73 - col2 FROM tab0 AS cor0
----
-106
-155
-74

query I rowsort
SELECT ALL + + col0 - col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - col0 * + col1 + ( col0 ) FROM tab1 cor0
----
-576
-75
-960

onlyif mysql # use DIV operator for integer division
query I rowsort label-2864
SELECT ALL col2 + col2 * col0 + - col2 DIV col0 AS col2 FROM tab1 AS cor0
----
198
3705
7775

skipif mysql # not compatible
query I rowsort label-2864
SELECT ALL col2 + col2 * col0 + - col2 / col0 AS col2 FROM tab1 AS cor0
----
198
3705
7775

query I rowsort
SELECT DISTINCT - col2 - - col2 AS col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT + col0 + col0 * + ( cor0.col1 ) AS col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT ALL col2 + 68 AS col1 FROM tab1
----
122
125
164

query I rowsort
SELECT + col0 * col0 + col2 AS col0 FROM tab2 cor0
----
6110
6279
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col0 + + tab1.col1 col0 FROM tab1
----
-1027
-52
-630

query I rowsort
SELECT col1 + - ( col1 ) AS col1 FROM tab0
----
0
0
0

query I rowsort
SELECT + 46 * col2 AS col2 FROM tab1
----
2484
2622
4416

query I rowsort
SELECT DISTINCT 18 * + tab2.col1 + col2 * col2 AS col0 FROM tab2
----
1287
1738
1750

query I rowsort
SELECT DISTINCT - + col1 * + col0 + + 29 FROM tab2 AS cor0
----
-1314
-188
-4573

query I rowsort
SELECT col0 * + cor0.col0 AS col1 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL - cor0.col0 - + col2 AS col0 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT ALL + col2 + cor0.col0 + 37 AS col1 FROM tab0 cor0
----
208
73
94

query I rowsort
SELECT col2 * ( + col0 ) + col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT DISTINCT + - col0 * 28 AS col0 FROM tab1 AS cor0
----
-1792
-2240
-84

query I rowsort
SELECT ALL - cor0.col2 + cor0.col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT - + col0 * 4 FROM tab0 AS cor0
----
-140
-356
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2881
SELECT ALL + + col2 DIV + ( col1 ) FROM tab2 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-2881
SELECT ALL + + col2 / + ( col1 ) FROM tab2 AS cor0
----
0
0
2

query I rowsort
SELECT + - col1 * 29 AS col1 FROM tab2 AS cor0
----
-1711
-493
-899

query I rowsort
SELECT + - cor0.col0 * cor0.col2 + col1 AS col0 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT col2 * - 50 FROM tab1 AS cor0
----
-2700
-2850
-4800

onlyif mysql # use DIV operator for integer division
query I rowsort label-2885
SELECT - - col0 * ( + 40 ) + col2 - col2 DIV col2 AS col0 FROM tab0 cor0
----
1400
3641
992

skipif mysql # not compatible
query I rowsort label-2885
SELECT - - col0 * ( + 40 ) + col2 - col2 / col2 AS col0 FROM tab0 cor0
----
1400
3641
992

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * + ( + col2 ) * col1 col2 FROM tab2 AS cor0
----
119652
51034
5859

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2887
SELECT ALL col0 * + CAST( + col2 AS SIGNED ) col1 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2887
SELECT ALL col0 * + CAST ( + col2 AS INTEGER ) col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - + 53 AS col1 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 2876418587c77a182d88db2907b0a51a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * + cor0.col2 - col1 * + col1 * + 67 col2 FROM tab2 AS cor0
----
-20009
-234761
-65224

query I rowsort
SELECT DISTINCT + col0 * 24 FROM tab1 AS cor0
----
1536
1920
72

query I rowsort
SELECT - - col1 * ( - col0 ) - col0 * 22 AS col2 FROM tab2 AS cor0
----
-3081
-371
-6318

query I rowsort
SELECT DISTINCT + + col0 * col1 * 95 AS col1 FROM tab2 AS cor0
----
127585
20615
437190

skipif mysql # not compatible
query I rowsort
SELECT - col1 * + CAST ( cor0.col0 AS REAL ) AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT tab0.col1 + + tab0.col1 * + 68 FROM tab0
----
5934
6279
6693

onlyif mysql # use DIV operator for integer division
query I rowsort label-2895
SELECT ALL col2 DIV + col2 + tab0.col2 AS col0 FROM tab0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-2895
SELECT ALL col2 / + col2 + tab0.col2 AS col0 FROM tab0
----
2
34
83

query I rowsort
SELECT 31 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

query I rowsort
SELECT + - col2 * 19 AS col1 FROM tab0 AS cor0
----
-1558
-19
-627

onlyif mysql # use DIV operator for integer division
query I rowsort label-2898
SELECT DISTINCT col2 + 34 DIV + tab1.col1 FROM tab1
----
55
60
98

skipif mysql # not compatible
query I rowsort label-2898
SELECT DISTINCT col2 + 34 / + tab1.col1 FROM tab1
----
55
60
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2899
SELECT - col0 + CAST( - col0 AS SIGNED ) FROM tab2 AS cor0
----
-14
-156
-158

skipif mysql # not compatible
query I rowsort label-2899
SELECT - col0 + CAST ( - col0 AS INTEGER ) FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT ALL - cor1.col1 + cor0.col0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2, tab2 AS cor1
----
27 values hashing to 85c64c757f85a1bb1f5a5e43fb2bbe57

query I rowsort
SELECT ALL 61 AS col0 FROM tab1
----
61
61
61

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2902
SELECT ALL CAST( NULL AS SIGNED ) * + 9 AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2902
SELECT ALL CAST ( NULL AS INTEGER ) * + 9 AS col2 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2903
SELECT ALL col1 * tab2.col2 DIV + tab2.col1 AS col0 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-2903
SELECT ALL col1 * tab2.col2 / + tab2.col1 AS col0 FROM tab2
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col0 + + cor0.col1 col2 FROM tab1 cor0
----
-4086
-6387
17

query I rowsort
SELECT DISTINCT - ( tab0.col0 ) + + col1 FROM tab0
----
2
62

query I rowsort
SELECT ALL 81 + + col2 + + col0 * + col1 AS col1 FROM tab0 cor0
----
2178
3477
8262

query I rowsort
SELECT 81 + + col1 * + cor0.col0 FROM tab1 AS cor0
----
1121
159
721

query I rowsort
SELECT + col1 * cor0.col2 + + col0 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT - 91 FROM tab2 AS cor0
----
-91
-91
-91

query I rowsort
SELECT + - ( cor0.col1 ) * + col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT col2 * col0 + col0 + col1 FROM tab1 cor0
----
191
3722
7773

query I rowsort
SELECT + cor0.col0 + + col2 * col0 + - col1 * col0 FROM tab1 AS cor0
----
3072
6720
87

query I rowsort
SELECT + cor0.col2 + + col0 AS col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT + col0 * 61 * ( col0 ) FROM tab2
----
2989
371124
380701

onlyif mysql # use DIV operator for integer division
query I rowsort label-2915
SELECT DISTINCT + col2 DIV - col1 + 43 AS col1 FROM tab0 cor0
----
43

skipif mysql # not compatible
query I rowsort label-2915
SELECT DISTINCT + col2 / - col1 + 43 AS col1 FROM tab0 cor0
----
43

skipif mysql # not compatible
query I rowsort
SELECT ALL + + col1 * CAST ( col1 AS REAL ) AS col0 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL - col2 + - 51 FROM tab0
----
-133
-52
-84

query I rowsort
SELECT ALL - col0 * + 83 + col1 * - col2 FROM tab0 AS cor0
----
-14849
-3002
-4830

query I rowsort
SELECT DISTINCT col1 * col2 - - col0 AS col1 FROM tab0 AS cor0
----
132
2862
7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-2920
SELECT DISTINCT + col0 * cor0.col2 + col2 DIV - cor0.col1 FROM tab1 AS cor0
----
160
3643
7673

skipif mysql # not compatible
query I rowsort label-2920
SELECT DISTINCT + col0 * cor0.col2 + col2 / - cor0.col1 FROM tab1 AS cor0
----
160
3643
7673

query I rowsort
SELECT ALL + col1 * cor0.col0 + col1 AS col1 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT DISTINCT - + col0 * - ( + cor0.col0 ) FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL + col2 * 37 + - 88 AS col1 FROM tab0 cor0
----
-51
1133
2946

query I rowsort
SELECT ALL - - col1 * - col1 + 9 FROM tab1 AS cor0
----
-160
-667
-91

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2925
SELECT - CAST( NULL AS SIGNED ) - cor0.col0 / + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2925
SELECT - CAST ( NULL AS INTEGER ) - cor0.col0 / + col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 53 * col1 - + col2 AS col0 FROM tab2 cor0
----
1616
3101
863

query I rowsort
SELECT - ( - 34 ) + - col1 + + col2 FROM tab0 AS cor0
----
-19
-62
25

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2928
SELECT - - CAST( - cor0.col2 AS SIGNED ) + col1 FROM tab2 AS cor0
----
-21
33
4

skipif mysql # not compatible
query I rowsort label-2928
SELECT - - CAST ( - cor0.col2 AS INTEGER ) + col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT + 31 * + col2 + col0 AS col2 FROM tab1 cor0
----
1677
1831
3056

query I rowsort
SELECT + ( 63 ) AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to c3eea92c46f2c49716f386a58b575025

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 59 - - 94 col1 FROM tab2 AS cor0
----
35
35
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 + cor0.col0 - + cor0.col2 col0 FROM tab0 AS cor0
----
-42
-75
33

onlyif mysql # use DIV operator for integer division
query I rowsort label-2933
SELECT ALL col2 * - col1 - - col1 DIV col1 FROM tab2
----
-1533
-645
-836

skipif mysql # not compatible
query I rowsort label-2933
SELECT ALL col2 * - col1 - - col1 / col1 FROM tab2
----
-1533
-645
-836

query I rowsort
SELECT DISTINCT + col1 * col1 + - col1 AS col2 FROM tab0 AS cor0
----
7310
8190
9312

query I rowsort
SELECT ALL cor0.col0 * + col0 AS col1 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT - col2 + col2 * col1 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT + col2 * - col2 + col1 FROM tab0 AS cor0
----
-1003
-6633
96

query I rowsort
SELECT col0 * - col0 - col2 FROM tab0 AS cor0
----
-1226
-609
-8003

query I rowsort
SELECT col1 + - cor0.col2 FROM tab2 AS cor0 WHERE NOT + col0 NOT IN ( col1 )
----

query I rowsort
SELECT ALL col2 * - col2 + + col0 + col0 FROM tab1 AS cor0
----
-2910
-3121
-9056

query I rowsort
SELECT + col2 - cor0.col0 * col1 AS col1 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT - col0 * + col2 - - col2 AS col1 FROM tab1 cor0
----
-108
-3591
-7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-2943
SELECT DISTINCT col1 * col2 DIV + cor0.col0 + + col0 * col0 - col1 col1 FROM tab0 AS cor0
----
1130
608
7913

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2943
SELECT DISTINCT col1 * col2 / + cor0.col0 + + col0 * col0 - col1 col1 FROM tab0 AS cor0
----
1130
608
7913

query I rowsort
SELECT DISTINCT col0 - col2 * tab1.col0 FROM tab1
----
-159
-3584
-7600

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT - col0 IN ( - tab0.col2 + col0 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT + 3 * col2 FROM tab2
----
114
78
81

query I rowsort
SELECT + + cor0.col2 * + cor0.col2 * + col1 AS col2 FROM tab2 cor0
----
22599
24548
39884

query I rowsort
SELECT - col0 + col1 * col2 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT ALL cor1.col0 AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT DISTINCT + + col2 - col2 AS col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT col2 * cor0.col0 + ( + col0 + cor0.col2 ) AS col1 FROM tab1 AS cor0
----
219
3769
7856

onlyif mysql # use DIV operator for integer division
query I rowsort label-2952
SELECT DISTINCT - cor0.col1 + - 12 DIV - col0 FROM tab2 AS cor0
----
-17
-30
-59

skipif mysql # not compatible
query I rowsort label-2952
SELECT DISTINCT - cor0.col1 + - 12 / - col0 FROM tab2 AS cor0
----
-17
-30
-59

query I rowsort
SELECT - col0 + 46 * - col1 AS col1 FROM tab2 AS cor0
----
-1433
-2792
-861

query I rowsort
SELECT col2 - - 17 AS col2 FROM tab2
----
43
44
55

query I rowsort
SELECT + 71 AS col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 95a6ff35b7b8f00868fb58bcaa32d0c2

query I rowsort
SELECT DISTINCT + col1 + + 39 FROM tab1
----
49
52
65

query I rowsort
SELECT DISTINCT + col2 + - col1 + col1 AS col2 FROM tab0
----
1
33
82

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0, tab0 cor1, tab1 AS cor2
----
972 values hashing to 465d072d2d9eababbfc8e88b82707474

query I rowsort
SELECT col1 + col1 + col1 AS col2 FROM tab2 AS cor0
----
177
51
93

query I rowsort
SELECT ALL + ( - 43 ) * col2 AS col2 FROM tab1
----
-2322
-2451
-4128

query I rowsort
SELECT - col1 * + col2 + col1 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT col0 * + 73 * + tab1.col2 FROM tab1
----
11826
266304
560640

query I rowsort
SELECT + col0 * 46 + - col1 AS col2 FROM tab1
----
112
2934
3667

query I rowsort
SELECT ALL 5 * 98 * - col1 - ( col0 ) FROM tab1
----
-12743
-4964
-6450

query I rowsort
SELECT - tab1.col0 * + 46 AS col2 FROM tab1
----
-138
-2944
-3680

onlyif mysql # use DIV operator for integer division
query I rowsort label-2966
SELECT ALL - tab1.col0 DIV col1 AS col1 FROM tab1
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-2966
SELECT ALL - tab1.col0 / col1 AS col1 FROM tab1
----
-6
-6
0

query I rowsort
SELECT + col1 * - col1 * col0 + col2 AS col2 FROM tab1 AS cor0
----
-13424
-1974
-6343

query I rowsort
SELECT + col1 * col0 + + col2 + - 15 FROM tab1 AS cor0
----
1121
117
682

query I rowsort
SELECT DISTINCT + - col1 * + col0 AS col2 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT - cor0.col1 * col1 - 51 AS col1 FROM tab1 cor0
----
-151
-220
-727

query I rowsort
SELECT + 62 - - col1 AS col2 FROM tab2 cor0
----
121
79
93

query I rowsort
SELECT + ( - cor0.col0 ) FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT - + col0 + - col1 AS col2 FROM tab2 cor0
----
-137
-38
-96

query I rowsort
SELECT ALL - - col1 + + col0 * 75 FROM tab0 AS cor0
----
1886
2722
6766

onlyif mysql # use DIV operator for integer division
query I rowsort label-2975
SELECT + col0 + cor0.col0 + - col1 DIV - 92 AS col0 FROM tab2 AS cor0
----
14
156
158

skipif mysql # not compatible
query I rowsort label-2975
SELECT + col0 + cor0.col0 + - col1 / - 92 AS col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT - col0 * - cor0.col1 + ( + 73 ) + col2 FROM tab2 AS cor0
----
1454
317
4701

query I rowsort
SELECT ALL - 55 + col0 * col1 FROM tab1 AS cor0
----
23
585
985

query I rowsort
SELECT ALL + 14 + col0 FROM tab2
----
21
92
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + col2 * - col1 col1 FROM tab0 AS cor0
----
-2805
-7380
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2980
SELECT ALL col2 * + col1 + CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2980
SELECT ALL col2 * + col1 + CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2981
SELECT ALL - col2 * col0 + col2 DIV + col2 + cor0.col1 FROM tab0 AS cor0
----
-705
-7206
63

skipif mysql # not compatible
query I rowsort label-2981
SELECT ALL - col2 * col0 + col2 / + col2 + cor0.col1 FROM tab0 AS cor0
----
-705
-7206
63

query I rowsort
SELECT DISTINCT + 52 FROM tab0, tab2 AS cor0
----
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-2983
SELECT ALL - col1 DIV + 1 AS col0 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-2983
SELECT ALL - col1 / + 1 AS col0 FROM tab0 AS cor0
----
-86
-91
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2984
SELECT col0 + CAST( NULL AS SIGNED ) + - col1 * col0 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2984
SELECT col0 + CAST ( NULL AS INTEGER ) + - col1 * col0 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2985
SELECT + cor0.col1 + CAST( NULL AS SIGNED ) + col1 * + cor0.col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2985
SELECT + cor0.col1 + CAST ( NULL AS INTEGER ) + col1 * + cor0.col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2986
SELECT DISTINCT - col1 + - col0 * ( - col1 ) + CAST( NULL AS SIGNED ) / col0 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2986
SELECT DISTINCT - col1 + - col0 * ( - col1 ) + CAST ( NULL AS INTEGER ) / col0 FROM tab0 cor0
----
NULL

query I rowsort
SELECT DISTINCT + - col1 - col1 * col0 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT + + col1 + ( - col1 * col2 ) AS col2 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT DISTINCT col2 * 67 FROM tab0 AS cor0
----
2211
5494
67

query I rowsort
SELECT + + col0 + 70 FROM tab2 AS cor0
----
148
149
77

query I rowsort
SELECT + + cor0.col2 + + 45 FROM tab0 AS cor0
----
127
46
78

query I rowsort
SELECT + col2 + + col1 + tab1.col2 FROM tab1
----
124
134
205

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2993
SELECT cor0.col1 + CAST( col0 AS SIGNED ) * col2 * col0 + 49 FROM tab0 AS cor0
----
1371
19143
649662

skipif mysql # not compatible
query I rowsort label-2993
SELECT cor0.col1 + CAST ( col0 AS INTEGER ) * col2 * col0 + 49 FROM tab0 AS cor0
----
1371
19143
649662

query I rowsort
SELECT DISTINCT + col0 + + 73 * col1 FROM tab0 cor0
----
6302
6732
7116

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2995
SELECT - col0 * CAST( NULL AS SIGNED ) * - col1 col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2995
SELECT - col0 * CAST ( NULL AS INTEGER ) * - col1 col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 * 62 AS col0 FROM tab0 AS cor0
----
-2046
-5084
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * ( col0 ) col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT + cor0.col1 + + ( + col1 ) FROM tab0 AS cor0
----
172
182
194

onlyif mysql # use DIV operator for integer division
query I rowsort label-2999
SELECT ALL - - 33 DIV col1 AS col0 FROM tab1 cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-2999
SELECT ALL - - 33 / col1 AS col0 FROM tab1 cor0
----
1
2
3

query I rowsort
SELECT + + 55 AS col1 FROM tab0 AS cor0
----
55
55
55

query I rowsort
SELECT DISTINCT + col1 * + 34 * - col2 + - 93 FROM tab2 AS cor0
----
-22057
-28551
-52249

query I rowsort
SELECT DISTINCT + 89 + col0 FROM tab0 AS cor0
----
113
124
178

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - ( + col1 ) - col2 col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT DISTINCT + + 68 * cor0.col2 * col1 FROM tab2 AS cor0
----
104312
43928
56916

query I rowsort
SELECT ALL col1 * + 18 * cor0.col0 FROM tab1 AS cor0
----
11520
1404
18720

query I rowsort
SELECT + ( - cor0.col2 ) * col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + + col2 * 47 * - col2 AS col2 FROM tab1 cor0
----
-137052
-152703
-433152

onlyif mysql # use DIV operator for integer division
query I rowsort label-3008
SELECT ALL ( col0 ) DIV + col0 AS col0 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3008
SELECT ALL ( col0 ) / + col0 AS col0 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT 90 + - 64 * - col2 AS col0 FROM tab2 AS cor0
----
1754
1818
2522

query I rowsort
SELECT ALL + 92 - col1 FROM tab2 AS cor0
----
33
61
75

query I rowsort
SELECT DISTINCT - + col1 * col0 + - col1 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT - ( ( - col2 ) ) + - 71 FROM tab2 AS cor0
----
-33
-44
-45

query I rowsort
SELECT ALL + cor0.col1 - - col2 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT DISTINCT + 94 + + col2 * - cor0.col2 AS col0 FROM tab0 cor0
----
-6630
-995
93

query I rowsort
SELECT ALL + + col1 * col2 * col0 + col1 AS col0 FROM tab2 cor0
----
119711
51051
5890

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 + - col1 * col2 col1 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT ALL ( col1 ) + col0 * cor0.col0 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT - - 39 AS col1 FROM tab0 AS cor0
----
39
39
39

query I rowsort
SELECT ALL - col2 * + col2 + - cor0.col0 + + cor0.col2 FROM tab2 AS cor0
----
-1485
-709
-728

query I rowsort
SELECT DISTINCT 14 + - col1 AS col1 FROM tab2 AS cor0
----
-17
-3
-45

query I rowsort
SELECT ALL + col1 * col1 + col1 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT DISTINCT - 42 + col2 AS col1 FROM tab2 AS cor0
----
-15
-16
-4

query I rowsort
SELECT + col0 - + col1 * col2 FROM tab1
----
-1168
-1401
-506

query I rowsort
SELECT DISTINCT - cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 1 col2 FROM tab1
----
1

query I rowsort
SELECT + 50 + cor0.col0 FROM tab1 AS cor0
----
114
130
53

query I rowsort
SELECT + - col0 * + ( col1 * + 73 ) + + 65 AS col1 FROM tab2 AS cor0
----
-15776
-335881
-97974

query I rowsort
SELECT - col1 + - 17 AS col1 FROM tab2
----
-34
-48
-76

query I rowsort
SELECT + - col2 + + 1 FROM tab1 cor0
----
-53
-56
-95

query I rowsort
SELECT + 58 * + col2 + col2 AS col2 FROM tab0 cor0
----
1947
4838
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3031
SELECT + CAST( NULL AS SIGNED ) / col1 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3031
SELECT + CAST ( NULL AS INTEGER ) / col1 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 48 AS col2 FROM tab2, tab0 cor0
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

query I rowsort
SELECT + col1 * + ( + col2 ) AS col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT DISTINCT + 96 FROM tab1, tab0 AS cor0
----
96

query I rowsort
SELECT DISTINCT - col1 + ( + col2 ) * col1 + - col2 AS col2 FROM tab0
----
-1
2719
7289

query I rowsort
SELECT col1 * 1 FROM tab2
----
17
31
59

query I rowsort
SELECT col2 + col1 + col0 FROM tab1
----
131
189
83

query I rowsort
SELECT ALL cor0.col2 + cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 8733ba2dd568938e338b27ad757d3e3b

query I rowsort
SELECT - 98 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to f17b7008a7deae1eb5a2e707ec237638

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 cor0 CROSS JOIN tab1, tab2 AS cor1
----
972 values hashing to e610acd60f342127e6cdba18673d9f0e

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0 CROSS JOIN tab0, tab2 cor1, tab0 AS cor2
----
3645 values hashing to 93ed44f621cc970f32b0cc9543b45262

query I rowsort
SELECT ( 71 ) * tab2.col2 FROM tab2
----
1846
1917
2698

query I rowsort
SELECT DISTINCT - col2 + - col2 FROM tab1 cor0
----
-108
-114
-192

query I rowsort
SELECT col1 * + col1 - + col2 FROM tab0 AS cor0
----
7363
8199
9408

query I rowsort
SELECT - ( - 10 ) * col2 FROM tab0
----
10
330
820

query I rowsort
SELECT - + col2 - + col0 * - col2 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT ALL - + ( 61 ) + - col0 * col2 FROM tab0 AS cor0
----
-7359
-853
-96

query I rowsort
SELECT + ( + tab0.col1 ) AS col2 FROM tab0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 + col1 col0 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT + col2 + col2 * 32 AS col1 FROM tab0 AS cor0
----
1089
2706
33

query I rowsort
SELECT DISTINCT - - ( - col2 ) + 40 * - cor0.col0 AS col0 FROM tab0 AS cor0
----
-1401
-3642
-993

query I rowsort
SELECT DISTINCT - col1 + + cor0.col2 + - col1 FROM tab2 AS cor0
----
-35
-92
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-3053
SELECT - + col2 + + col0 DIV + col1 AS col0 FROM tab1 AS cor0
----
-51
-54
-90

skipif mysql # not compatible
query I rowsort label-3053
SELECT - + col2 + + col0 / + col1 AS col0 FROM tab1 AS cor0
----
-51
-54
-90

query I rowsort
SELECT 73 FROM tab0, tab2 AS cor0
----
9 values hashing to e5fbf5d129b181bacd6113bbc8732496

query I rowsort
SELECT DISTINCT + ( + 19 ) + + col1 * col0 FROM tab0 AS cor0
----
2083
3414
8118

query I rowsort
SELECT ALL + col2 * - cor0.col2 + + col2 FROM tab2 AS cor0
----
-1406
-650
-702

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 43 * col0 col2 FROM tab2 AS cor0
----
301
3354
3397

query I rowsort
SELECT - col0 * col2 * col0 AS col0 FROM tab2
----
-1323
-158184
-237158

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3059
SELECT - col1 + col1 * CAST( NULL AS SIGNED ) AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3059
SELECT - col1 + col1 * CAST ( NULL AS INTEGER ) AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 + col1 * ( - 5 + - col0 ) FROM tab2 cor0
----
-1411
-341
-4838

query I rowsort
SELECT + 93 * + tab2.col1 * col2 + + ( col0 ) * + tab2.col2 AS col0 FROM tab2
----
144690
63080
78030

onlyif mysql # use DIV operator for integer division
query I rowsort label-3062
SELECT + col0 DIV + col2 + - col0 * + cor0.col1 * - ( + col1 * + col0 ) AS col2 FROM tab1 AS cor0
----
1081600
409601
6084

skipif mysql # not compatible
query I rowsort label-3062
SELECT + col0 / + col2 + - col0 * + cor0.col1 * - ( + col1 * + col0 ) AS col2 FROM tab1 AS cor0
----
1081600
409601
6084

query I rowsort
SELECT + col2 + + 64 * col1 * col0 AS col2 FROM tab0 AS cor0
----
132129
217281
518418

query I rowsort
SELECT tab2.col2 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT DISTINCT - 56 + - 43 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
-99

query I rowsort
SELECT tab2.col1 * - cor0.col0 AS col2 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to b1d1c8abbc483ff4a42f7a4fd637cd89

query I rowsort
SELECT DISTINCT 93 * + 4 FROM tab0 AS cor0
----
372

query I rowsort
SELECT DISTINCT + ( + col0 ) + + cor0.col1 + - col1 AS col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT cor0.col2 + - col2 * col1 FROM tab1 cor0
----
-1152
-1350
-513

query I rowsort
SELECT + cor0.col2 * - 92 * cor0.col2 + col0 AS col1 FROM tab2 AS cor0
----
-132769
-62114
-67061

query I rowsort
SELECT + 89 - + 90 * - col0 FROM tab1 AS cor0
----
359
5849
7289

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 53 col0 FROM tab1 AS cor0
----
53

query I rowsort
SELECT ALL cor0.col1 * - col0 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL - - ( + cor0.col0 ) FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - 97 - col1 AS col1 FROM tab1 AS cor0
----
-107
-110
-123

onlyif mysql # use DIV operator for integer division
query I rowsort label-3076
SELECT DISTINCT + col2 + + 49 * + cor0.col1 DIV + col1 AS col2 FROM tab0 cor0
----
131
50
82

skipif mysql # not compatible
query I rowsort label-3076
SELECT DISTINCT + col2 + + 49 * + cor0.col1 / + col1 AS col2 FROM tab0 cor0
----
131
50
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3077
SELECT DISTINCT + CAST( NULL AS SIGNED ) * 88 + col1 AS col1 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3077
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * 88 + col1 AS col1 FROM tab2 cor0
----
NULL

query I rowsort
SELECT - cor0.col0 * 44 * col2 + + 93 FROM tab1 cor0
----
-160419
-337827
-7035

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3079
SELECT ALL + ( col2 ) / col2 + + 62 * + ( col1 + + CAST( NULL AS SIGNED ) ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3079
SELECT ALL + ( col2 ) / col2 + + 62 * + ( col1 + + CAST ( NULL AS INTEGER ) ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 48 + + 69 AS col1 FROM tab2 AS cor0
----
117
117
117

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3081
SELECT DISTINCT + CAST( NULL AS SIGNED ) + - 27 + - cor0.col0 AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3081
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + - 27 + - cor0.col0 AS col2 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 + col2 col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL + col1 * col1 * 92 FROM tab1 cor0
----
15548
62192
9200

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3084
SELECT - - col0 * + col0 + - CAST( + col0 AS SIGNED ) * cor0.col2 AS col0 FROM tab0 AS cor0
----
-216
1190
623

skipif mysql # not compatible
query I rowsort label-3084
SELECT - - col0 * + col0 + - CAST ( + col0 AS INTEGER ) * cor0.col2 AS col0 FROM tab0 AS cor0
----
-216
1190
623

query I rowsort
SELECT - + ( - col1 ) * + ( + col1 ) + col2 * - 77 FROM tab0 AS cor0
----
1967
4855
9332

query I rowsort
SELECT DISTINCT + 63 * + col2 - col1 * ( - cor0.col0 ) AS col1 FROM tab2 AS cor0
----
1918
3737
6240

query I rowsort
SELECT - + col2 + col1 + col2 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT ALL - - col0 + + col1 AS col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT - 30 + col1 AS col2 FROM tab1 AS cor0
----
-17
-20
-4

query I rowsort
SELECT DISTINCT col0 - col1 * cor0.col0 AS col2 FROM tab2 AS cor0
----
-1264
-210
-4524

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 cor0 CROSS JOIN tab2, tab0 cor1
----
972 values hashing to deaaa983f771be544ffdc26f04a18657

onlyif mysql # use DIV operator for integer division
query I rowsort label-3092
SELECT DISTINCT cor0.col2 DIV col0 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-3092
SELECT DISTINCT cor0.col2 / col0 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT ALL - + col1 + col0 * + col2 AS col2 FROM tab0 AS cor0
----
-62
706
7207

query I rowsort
SELECT ALL - col0 * col2 * ( col1 ) + - col2 AS col2 FROM tab0 AS cor0
----
-3396
-664200
-68145

query I rowsort
SELECT DISTINCT - col2 * + 92 + col1 FROM tab1 AS cor0
----
-4942
-5234
-8819

query I rowsort
SELECT - col2 * - 62 FROM tab1 AS cor0
----
3348
3534
5952

query I rowsort
SELECT DISTINCT cor0.col1 + + col0 * - 14 * - col0 FROM tab0 AS cor0
----
110985
17247
8150

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * 17 col2 FROM tab2 AS cor0
----
-119
-1326
-1343

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 48 col1 FROM tab1 AS cor0
----
-48

query I rowsort
SELECT ALL + col2 + col2 * col1 + col1 AS col0 FROM tab1 AS cor0
----
1357
1484
637

query I rowsort
SELECT ALL + 39 * - col2 + + col1 + 55 AS col0 FROM tab1 AS cor0
----
-2025
-2158
-3676

query I rowsort
SELECT + ( col2 ) + cor0.col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT + 2 - 13 * - cor0.col1 FROM tab2 cor0
----
223
405
769

query I rowsort
SELECT ALL col0 * + col0 + + col2 AS col2 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT ALL + col2 + 59 * - col2 AS col0 FROM tab1 AS cor0
----
-3132
-3306
-5568

query I rowsort
SELECT + col0 + - ( - 92 ) * - col2 FROM tab2
----
-2314
-2477
-3417

query I rowsort
SELECT + col2 * + 33 + + col1 FROM tab1
----
1808
1891
3181

query I rowsort
SELECT + col2 + + 23 AS col0 FROM tab2
----
49
50
61

query I rowsort
SELECT 64 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 60ab040e931c5c85db7ba19364eacc8e

onlyif mysql # use DIV operator for integer division
query I rowsort label-3110
SELECT ALL - + 26 DIV 95 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3110
SELECT ALL - + 26 / 95 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - 16 * 67 FROM tab2 AS cor0
----
-1072
-1072
-1072

query I rowsort
SELECT DISTINCT col0 * + ( col0 ) AS col2 FROM tab1
----
4096
6400
9

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab0 AS cor2, tab1 AS cor3
----
3645 values hashing to a1a9b1c1e9ca8f59e89e834a7cdebbd0

query I rowsort
SELECT - col2 + 42 AS col1 FROM tab0
----
-40
41
9

query I rowsort
SELECT DISTINCT col2 * 43 + + col0 FROM tab2
----
1168
1196
1713

onlyif mysql # use DIV operator for integer division
query I rowsort label-3116
SELECT - ( - col2 ) * col1 DIV ( col2 ) AS col2 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-3116
SELECT - ( - col2 ) * col1 / ( col2 ) AS col2 FROM tab0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col0 + - col0 col2 FROM tab0
----
0
0
0

query I rowsort
SELECT cor1.col0 AS col2 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT - 82 * + col2 * col0 AS col2 FROM tab1
----
-13284
-299136
-629760

query I rowsort
SELECT DISTINCT - col2 + col0 * tab1.col1 FROM tab1
----
24
583
944

query I rowsort
SELECT 4 * cor0.col2 FROM tab1, tab0 AS cor0
----
9 values hashing to f05afd9473a849c2dc980325118b8c8e

query I rowsort
SELECT + col1 + col2 * - tab1.col1 + - 43 AS col2 FROM tab1
----
-1278
-1421
-603

query I rowsort
SELECT 11 * - col0 + col2 + ( + col0 ) AS col2 FROM tab0
----
-207
-349
-808

query I rowsort
SELECT DISTINCT - 64 * - col1 FROM tab0 AS cor0
----
5504
5824
6208

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3125
SELECT - col0 + 19 * col2 * CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3125
SELECT - col0 + 19 * col2 * CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + ( - col1 ) FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT + - ( - 27 ) * col0 FROM tab2 cor0
----
189
2106
2133

query I rowsort
SELECT - col1 * ( col0 ) * col1 AS col0 FROM tab1
----
-13520
-2028
-6400

query I rowsort
SELECT - 24 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 797d0f7c145f8ac623924448c714bbcc

query I rowsort
SELECT ALL - 29 + - col1 FROM tab2
----
-46
-60
-88

onlyif mysql # use DIV operator for integer division
query I rowsort label-3131
SELECT cor0.col1 DIV ( 59 ) + + col0 + - ( ( - col1 ) ) AS col2 FROM tab0 AS cor0
----
111
133
181

skipif mysql # not compatible
query I rowsort label-3131
SELECT cor0.col1 / ( 59 ) + + col0 + - ( ( - col1 ) ) AS col2 FROM tab0 AS cor0
----
111
133
181

query I rowsort
SELECT ALL 24 + - col0 * col0 AS col1 FROM tab2
----
-25
-6060
-6217

query I rowsort
SELECT tab0.col1 * tab0.col2 AS col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT ALL col0 * + col1 + - col1 AS col1 FROM tab0 AS cor0
----
1978
3298
8008

query I rowsort
SELECT ALL - col2 + + col2 AS col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3136
SELECT DISTINCT - cor0.col0 + CAST( - col2 + col0 AS SIGNED ) * - col2 col2 FROM tab1 AS cor0
----
-463
1456
2751

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3136
SELECT DISTINCT - cor0.col0 + CAST ( - col2 + col0 AS INTEGER ) * - col2 col2 FROM tab1 AS cor0
----
-463
1456
2751

query I rowsort
SELECT col2 * 96 FROM tab2 AS cor0
----
2496
2592
3648

onlyif mysql # use DIV operator for integer division
query I rowsort label-3138
SELECT + - col2 DIV ( cor0.col0 ) AS col1 FROM tab2 AS cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-3138
SELECT + - col2 / ( cor0.col0 ) AS col1 FROM tab2 AS cor0
----
-3
0
0

query I rowsort
SELECT ALL col2 * - 74 FROM tab2 cor0
----
-1924
-1998
-2812

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3140
SELECT - - col1 + CAST( col1 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
172
182
194

skipif mysql # not compatible
query I rowsort label-3140
SELECT - - col1 + CAST ( col1 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT ALL - + cor0.col0 * + cor0.col2 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3142
SELECT ALL - col1 * CAST( NULL AS SIGNED ) AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3142
SELECT ALL - col1 * CAST ( NULL AS INTEGER ) AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 1 * - col2 AS col2 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT + cor2.col2 + - cor2.col0 AS col2 FROM tab2, tab0 AS cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to a7dd239868aa7502273662bd3834ab10

query I rowsort
SELECT DISTINCT - ( + tab0.col1 ) FROM tab0
----
-86
-91
-97

query I rowsort
SELECT ALL - 88 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to eb8cbefa7d831e1a0183e919e2caef32

query I rowsort
SELECT + 6 AS col1 FROM tab1 AS cor0
----
6
6
6

query I rowsort
SELECT col2 * + col1 * 39 + col2 FROM tab0 cor0
----
110715
291100
3784

query I rowsort
SELECT DISTINCT - col0 + col0 * col0 + - col2 * col0 FROM tab1 cor0
----
-1360
-156
384

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * col2 + - cor0.col1 col1 FROM tab0 cor0
----
-194
-2924
-7553

onlyif mysql # use DIV operator for integer division
query I rowsort label-3151
SELECT - col2 + col2 DIV - cor0.col2 FROM tab1 AS cor0
----
-55
-58
-97

skipif mysql # not compatible
query I rowsort label-3151
SELECT - col2 + col2 / - cor0.col2 FROM tab1 AS cor0
----
-55
-58
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 98 * col2 col1 FROM tab0 AS cor0
----
-3234
-8036
-98

query I rowsort
SELECT - + ( - col2 ) * col1 FROM tab1 cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * 89 + col2 col2 FROM tab1 AS cor0
----
321
5753
7216

query I rowsort
SELECT - col1 + col1 * - col0 AS col2 FROM tab1 AS cor0
----
-104
-1053
-650

query I rowsort
SELECT - col0 + + col1 * col0 AS col1 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT - col0 * - 74 * 87 + + col2 * - ( + col0 * + tab0.col1 ) FROM tab0
----
-91136
221935
86400

query I rowsort
SELECT ALL - col0 + + ( - tab2.col2 * col0 ) FROM tab2
----
-196
-2106
-3081

query I rowsort
SELECT 79 AS col0 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 4857f2e1b1dbd184de4827f145dd02a1

query I rowsort
SELECT DISTINCT + ( cor0.col1 ) * cor0.col2 - col2 * col2 FROM tab0 AS cor0
----
1749
738
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3161
SELECT ( 78 ) DIV col1 + ( col0 ) AS col1 FROM tab1 AS cor0
----
6
71
86

skipif mysql # not compatible
query I rowsort label-3161
SELECT ( 78 ) / col1 + ( col0 ) AS col1 FROM tab1 AS cor0
----
6
71
86

query I rowsort
SELECT ALL + + col1 * col1 + col2 AS col1 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT col0 + + col0 AS col0 FROM tab0 cor0
----
178
48
70

query I rowsort
SELECT + + 19 * + col0 FROM tab0 AS cor0
----
1691
456
665

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 col2 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT + 9 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 03b93b53107e36cf7d524e48c509b17b

query I rowsort
SELECT DISTINCT - tab1.col2 AS col2 FROM tab1, tab0, tab0 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT 80 * - col1 FROM tab0 AS cor0
----
-6880
-7280
-7760

query I rowsort
SELECT + + col1 + cor0.col0 + col2 AS col2 FROM tab0 AS cor0
----
133
143
262

query I rowsort
SELECT ALL - col2 + + col0 * + col2 FROM tab2 cor0
----
162
2002
2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-3171
SELECT DISTINCT - 61 + col2 DIV cor0.col2 AS col1 FROM tab0 AS cor0
----
-60

skipif mysql # not compatible
query I rowsort label-3171
SELECT DISTINCT - 61 + col2 / cor0.col2 AS col1 FROM tab0 AS cor0
----
-60

query I rowsort
SELECT DISTINCT col0 + 23 + + tab2.col0 AS col2 FROM tab2
----
179
181
37

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3173
SELECT DISTINCT - CAST( 94 AS SIGNED ) + + col0 * col1 AS col1 FROM tab1
----
-16
546
946

skipif mysql # not compatible
query I rowsort label-3173
SELECT DISTINCT - CAST ( 94 AS INTEGER ) + + col0 * col1 AS col1 FROM tab1
----
-16
546
946

query I rowsort
SELECT + 38 * + col1 + - col1 * - col0 * - tab0.col0 FROM tab0
----
-115139
-46268
-717353

query I rowsort
SELECT DISTINCT + ( - 22 ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
-22

query I rowsort
SELECT + cor0.col0 * + 27 FROM tab2, tab1 AS cor0
----
9 values hashing to 38509f5495f543f696c509446f5cefe4

query I rowsort
SELECT + ( col0 ) * + col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT - col1 + cor0.col2 * - col2 * ( + col2 ) FROM tab0 AS cor0
----
-36023
-551459
-98

query I rowsort
SELECT DISTINCT + 92 * + col2 AS col2 FROM tab2
----
2392
2484
3496

query I rowsort
SELECT + col1 * col1 - - 50 FROM tab0 cor0
----
7446
8331
9459

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3181
SELECT + - cor0.col1 - + CAST( NULL AS SIGNED ) col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3181
SELECT + - cor0.col1 - + CAST ( NULL AS INTEGER ) col2 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + col2 * ( - 36 * col1 ) FROM tab2 AS cor0
----
-23256
-30132
-55224

query I rowsort
SELECT - col0 * - col1 + col2 AS col2 FROM tab2 AS cor0
----
1381
244
4628

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3184
SELECT + + col0 * col0 + - col1 * CAST( NULL AS SIGNED ) / col2 + col1 * - col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3184
SELECT + + col0 * col0 + - col1 * CAST ( NULL AS INTEGER ) / col2 + col1 * - col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col1 + 83 AS col1 FROM tab0 cor0
----
-14
-3
-8

query I rowsort
SELECT + - cor0.col2 + + ( + col1 + col2 ) AS col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT - + 69 + - cor0.col1 AS col1 FROM tab2 AS cor0
----
-100
-128
-86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3188
SELECT ( cor0.col0 * CAST( NULL AS SIGNED ) ) FROM tab1, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3188
SELECT ( cor0.col0 * CAST ( NULL AS INTEGER ) ) FROM tab1, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - col1 + + 34 FROM tab1 AS cor0
----
21
24
8

query I rowsort
SELECT - col2 * + col0 + + tab2.col2 * - 87 AS col1 FROM tab2
----
-2538
-4290
-6308

query I rowsort
SELECT - 55 - + tab1.col1 FROM tab1
----
-65
-68
-81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 * + col0 + col1 + col2 col2 FROM tab1 AS cor0
----
-573
-931
2

query I rowsort
SELECT ALL cor0.col2 + - ( + cor0.col1 ) * col0 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT DISTINCT - col2 * - 88 AS col0 FROM tab2 AS cor0
----
2288
2376
3344

query I rowsort
SELECT col2 + 56 * + col2 FROM tab2 cor0
----
1482
1539
2166

onlyif mysql # use DIV operator for integer division
query I rowsort label-3196
SELECT ALL col1 * - 82 + + col1 DIV - tab2.col0 + 24 col2 FROM tab2
----
-1370
-2522
-4814

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3196
SELECT ALL col1 * - 82 + + col1 / - tab2.col0 + 24 col2 FROM tab2
----
-1370
-2522
-4814

onlyif mysql # use DIV operator for integer division
query I rowsort label-3197
SELECT col0 DIV - ( + 94 ) FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3197
SELECT col0 / - ( + 94 ) FROM tab2
----
0
0
0

query I rowsort
SELECT col2 * - col1 + col0 FROM tab0
----
-2814
-62
-7373

onlyif mysql # use DIV operator for integer division
query I rowsort label-3199
SELECT col0 DIV - cor0.col0 + + col1 FROM tab2 AS cor0
----
16
30
58

skipif mysql # not compatible
query I rowsort label-3199
SELECT col0 / - cor0.col0 + + col1 FROM tab2 AS cor0
----
16
30
58

query I rowsort
SELECT + col2 * ( + col2 ) + + col1 - - col1 * - col2 AS col0 FROM tab2 AS cor0
----
-77
-799
815

query I rowsort
SELECT DISTINCT - col1 + 9 AS col2 FROM tab0 AS cor0
----
-77
-82
-88

query I rowsort
SELECT - 62 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to f0e93f6ff5fc3cf50a14e276206dad5c

onlyif mysql # use DIV operator for integer division
query I rowsort label-3203
SELECT col1 DIV - col1 - 45 FROM tab1 AS cor0
----
-46
-46
-46

skipif mysql # not compatible
query I rowsort label-3203
SELECT col1 / - col1 - 45 FROM tab1 AS cor0
----
-46
-46
-46

query I rowsort
SELECT ALL + + col0 * + 95 AS col0 FROM tab2 cor0
----
665
7410
7505

query I rowsort
SELECT + col2 * + 17 + - cor0.col1 + + col1 * col2 FROM tab2 cor0
----
1265
1275
1917

query I rowsort
SELECT DISTINCT + 23 AS col1 FROM tab2, tab0 cor0
----
23

query I rowsort
SELECT + cor1.col2 * + 21 AS col1 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 538bda1615f9b3883cb275251946d347

query I rowsort
SELECT ALL - - ( col0 ) FROM tab0 cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-3209
SELECT - - col2 DIV - col1 + cor0.col2 AS col2 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-3209
SELECT - - col2 / - col1 + cor0.col2 AS col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT + col2 + - col0 * - col1 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT + cor0.col0 * + col1 - + col0 * - col2 AS col1 FROM tab2 AS cor0
----
406
4345
6630

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3212
SELECT - 64 * col0 * + CAST( NULL AS SIGNED ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3212
SELECT - 64 * col0 * + CAST ( NULL AS INTEGER ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col2 + + col0 * + col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT - col1 + col2 * col1 * - 78 AS col1 FROM tab0 AS cor0
----
-221450
-582127
-7663

query I rowsort
SELECT + ( cor0.col1 ) + 66 AS col0 FROM tab1 AS cor0
----
76
79
92

query I rowsort
SELECT DISTINCT + 91 * + col2 FROM tab2 AS cor0
----
2366
2457
3458

onlyif mysql # use DIV operator for integer division
query I rowsort label-3217
SELECT DISTINCT + + col1 + col2 DIV col2 FROM tab0 AS cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-3217
SELECT DISTINCT + + col1 + col2 / col2 FROM tab0 AS cor0
----
87
92
98

query I rowsort
SELECT DISTINCT col1 + + col2 * + col1 AS col2 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT DISTINCT col1 * col0 + 53 AS col1 FROM tab0 AS cor0
----
2117
3448
8152

query I rowsort
SELECT ALL - col0 * + cor0.col2 + 18 - col1 FROM tab2 AS cor0
----
-202
-2069
-3001

query I rowsort
SELECT - 39 + - col0 FROM tab1
----
-103
-119
-42

query I rowsort
SELECT tab1.col0 + - cor1.col2 + 59 AS col2 FROM tab1, tab0, tab0 cor0, tab1 AS cor1
----
81 values hashing to 23abf5c9d6e434cbe6cf94eaa50f2a40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 48 col0 FROM tab1
----
48
48
48

query I rowsort
SELECT + + col2 + cor0.col1 AS col0 FROM tab2 AS cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-3225
SELECT ALL + 92 + - col2 DIV + col0 FROM tab0 AS cor0
----
91
92
92

skipif mysql # not compatible
query I rowsort label-3225
SELECT ALL + 92 + - col2 / + col0 FROM tab0 AS cor0
----
91
92
92

query I rowsort
SELECT ALL + - col1 * col1 * 14 FROM tab0 AS cor0
----
-103544
-115934
-131726

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 - 35 AS col2 FROM tab0, tab1, tab0 cor0, tab0 AS cor1
----
81 values hashing to 7fbbc209618bf287c81172ef2c617496

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3229
SELECT DISTINCT CAST( NULL AS SIGNED ) * - ( - col0 ) * + 82 AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3229
SELECT DISTINCT CAST ( NULL AS INTEGER ) * - ( - col0 ) * + 82 AS col1 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 20 * + col1 col0 FROM tab0 AS cor0
----
1720
1820
1940

query I rowsort
SELECT - col1 + 92 + - col2 * + 72 FROM tab2 AS cor0
----
-1839
-1883
-2661

query I rowsort
SELECT ALL - + 65 + cor0.col2 * + col1 FROM tab1 AS cor0
----
1183
1339
505

query I rowsort
SELECT DISTINCT + - 4 * ( + col0 ) FROM tab2 AS cor0
----
-28
-312
-316

onlyif mysql # use DIV operator for integer division
query I rowsort label-3234
SELECT DISTINCT + - ( col0 ) DIV col0 AS col1 FROM tab2 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-3234
SELECT DISTINCT + - ( col0 ) / col0 AS col1 FROM tab2 AS cor0
----
-1

query I rowsort
SELECT + ( - 76 ) * col1 + + 41 + + col0 FROM tab2 AS cor0
----
-1172
-2308
-4365

query I rowsort
SELECT col0 + + 26 * - col0 FROM tab1
----
-1600
-2000
-75

query I rowsort
SELECT + col1 + - col0 + - col1 AS col1 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT col0 + - 86 FROM tab2
----
-7
-79
-8

query I rowsort
SELECT col0 - 21 * col0 FROM tab2
----
-140
-1560
-1580

onlyif mysql # use DIV operator for integer division
query I rowsort label-3240
SELECT DISTINCT - col2 + + ( tab0.col1 + + col2 ) DIV col1 FROM tab0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-3240
SELECT DISTINCT - col2 + + ( tab0.col1 + + col2 ) / col1 FROM tab0
----
-32
-81
0

query I rowsort
SELECT col2 * 30 AS col2 FROM tab0
----
2460
30
990

onlyif mysql # use DIV operator for integer division
query I rowsort label-3242
SELECT col0 DIV - col0 + - col2 FROM tab0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-3242
SELECT col0 / - col0 + - col2 FROM tab0
----
-2
-34
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col1 * col0 ) + - 46 * tab0.col2 col2 FROM tab0
----
3349
4327
546

query I rowsort
SELECT DISTINCT + 52 + 76 FROM tab0
----
128

query I rowsort
SELECT - - 52 FROM tab2, tab0 AS cor0 CROSS JOIN tab2 cor1
----
27 values hashing to 76100d10f51995d20efdeb657e444d3c

query I rowsort
SELECT col2 * - 39 * col0 FROM tab1
----
-142272
-299520
-6318

query I rowsort
SELECT DISTINCT + col0 + - 24 * - cor0.col1 FROM tab2 AS cor0
----
1494
487
751

query I rowsort
SELECT ALL + cor0.col1 + 51 * + col0 * col1 AS col1 FROM tab2 AS cor0
----
11098
234761
68510

onlyif mysql # use DIV operator for integer division
query I rowsort label-3249
SELECT ALL 59 DIV - col2 AS col0 FROM tab0 AS cor0
----
-1
-59
0

skipif mysql # not compatible
query I rowsort label-3249
SELECT ALL 59 / - col2 AS col0 FROM tab0 AS cor0
----
-1
-59
0

query I rowsort
SELECT DISTINCT - 30 AS col2 FROM tab0 AS cor0
----
-30

query I rowsort
SELECT + 34 + + col0 FROM tab1 AS cor0
----
114
37
98

query I rowsort
SELECT - ( ( - col0 ) ) * col2 AS col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL - - 78 AS col1 FROM tab2 AS cor0
----
78
78
78

query I rowsort
SELECT ALL 89 * + col1 FROM tab1 AS cor0
----
1157
2314
890

query I rowsort
SELECT ALL - 20 FROM tab0 AS cor0
----
-20
-20
-20

query I rowsort
SELECT col2 * - ( col1 ) AS col0 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT col2 + - ( ( tab1.col1 ) ) AS col0 FROM tab1
----
28
47
83

query I rowsort
SELECT 23 FROM tab2, tab1 cor0, tab1 AS cor1
----
27 values hashing to 546d49aa433406dd83ea19885588e658

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - col2 col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT - col2 + ( col1 ) * - col0 FROM tab1 AS cor0
----
-1136
-132
-697

query I rowsort
SELECT 59 * + ( cor0.col1 ) + + 74 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 9facd68421c3c238d47129365b95af2f

query I rowsort
SELECT col1 + - ( - cor0.col1 ) FROM tab0 AS cor0
----
172
182
194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 94 col2 FROM tab1 cor0
----
94
94
94

query I rowsort
SELECT col0 * + ( - ( col0 ) ) FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT ( col2 ) + - col2 * - col0 FROM tab1 AS cor0
----
216
3705
7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-3266
SELECT + - 26 DIV + col0 + col1 FROM tab1 AS cor0
----
10
13
18

skipif mysql # not compatible
query I rowsort label-3266
SELECT + - 26 / + col0 + col1 FROM tab1 AS cor0
----
10
13
18

query I rowsort
SELECT DISTINCT 14 * col1 AS col1 FROM tab0 AS cor0
----
1204
1274
1358

query I rowsort
SELECT ALL - col1 * cor0.col1 + ( col1 ) AS col1 FROM tab0 AS cor0
----
-7310
-8190
-9312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 48 + + col2 col2 FROM tab2 AS cor0
----
74
75
86

query I rowsort
SELECT + - col0 * col1 + + 84 AS col0 FROM tab1 AS cor0
----
-556
-956
6

query I rowsort
SELECT DISTINCT col1 + ( + col2 * col0 ) FROM tab0
----
132
7389
878

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 17 - - col0 * 53 * 53 col1 FROM tab1 cor0
----
179759
224703
8410

query I rowsort
SELECT - col2 * col2 + + 46 FROM tab0 AS cor0
----
-1043
-6678
45

query I rowsort
SELECT - - col0 + 17 FROM tab0 cor0
----
106
41
52

query I rowsort
SELECT + col0 * + col1 + 6 AS col2 FROM tab2 cor0
----
1349
223
4608

query I rowsort
SELECT ALL col1 * col1 * 17 FROM tab0 AS cor0
----
125732
140777
159953

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3277
SELECT DISTINCT + col1 * - CAST( col1 AS SIGNED ) + + col2 * + col0 AS col1 FROM tab1 AS cor0
----
-514
3548
7511

skipif mysql # not compatible
query I rowsort label-3277
SELECT DISTINCT + col1 * - CAST ( col1 AS INTEGER ) + + col2 * + col0 AS col1 FROM tab1 AS cor0
----
-514
3548
7511

query I rowsort
SELECT DISTINCT - col2 * 1 + 20 * + col0 FROM tab1 cor0
----
1223
1504
6

query I rowsort
SELECT ALL + col2 + col1 * - col1 - + col2 * col1 FROM tab2 AS cor0
----
-1771
-4989
-897

query I rowsort
SELECT + - col1 * + 18 + + cor0.col1 FROM tab0 AS cor0
----
-1462
-1547
-1649

query I rowsort
SELECT + + col0 * 24 FROM tab2 AS cor0
----
168
1872
1896

query I rowsort
SELECT col2 * + col0 * + 29 + - col0 AS col2 FROM tab2 AS cor0
----
5474
58734
86979

query I rowsort
SELECT ALL - + cor0.col0 + - cor0.col0 * + 82 FROM tab0 AS cor0
----
-1992
-2905
-7387

query I rowsort
SELECT ALL col0 + + ( 84 ) AS col2 FROM tab1 AS cor0
----
148
164
87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3285
SELECT ALL - col1 - - CAST( + col1 + + cor0.col2 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-3285
SELECT ALL - col1 - - CAST ( + col1 + + cor0.col2 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT - col1 * + col0 * col0 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT DISTINCT + 98 + + 65 AS col2 FROM tab1 AS cor0
----
163

query I rowsort
SELECT ALL + ( cor0.col0 ) AS col1 FROM tab2 AS cor0
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 + - ( ( - col1 ) ) * 93 col0 FROM tab0 AS cor0
----
8084
8554
9118

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + - col2 * + 44 col0 FROM tab2 AS cor0
----
-1085
-1157
-1655

query I rowsort
SELECT ALL col0 + 17 FROM tab2
----
24
95
96

query I rowsort
SELECT col1 + col0 * + tab0.col0 AS col0 FROM tab0
----
1322
662
8012

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab1 AS cor2
----
3645 values hashing to a8d2ba8b8eb568b0a9a1771ccb0a8f23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col2 + col1 + col0 * 27 col1 FROM tab2 AS cor0
----
2188
2191
247

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 cor0, tab1 AS cor1, tab2 cor2
----
972 values hashing to 0fcd8d0934383dd58863be894b07a6ed

query I rowsort
SELECT ALL + 60 * - col2 AS col0 FROM tab0 AS cor0
----
-1980
-4920
-60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - ( - col2 ) ) col2 FROM tab2
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 - - col2 col1 FROM tab0
----
119
173
98

query I rowsort
SELECT col0 * col1 + col0 AS col2 FROM tab1
----
1120
704
81

query I rowsort
SELECT 86 * - col1 + 53 AS col0 FROM tab2 AS cor0
----
-1409
-2613
-5021

query I rowsort
SELECT ALL 50 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 314aace40e704c20a6be06204a329f80

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab0, tab2, tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - + cor0.col2 * + col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - col2 + col2 * col1 FROM tab1 cor0
----
1152
1350
513

query I rowsort
SELECT DISTINCT - 67 * col0 AS col0 FROM tab1 AS cor0
----
-201
-4288
-5360

query I rowsort
SELECT - 83 AS col1 FROM tab1 AS cor0
----
-83
-83
-83

query I rowsort
SELECT DISTINCT + + ( col1 ) FROM tab1 cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 54 + col1 * col1 col0 FROM tab1 AS cor0
----
154
223
730

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 13 col1 FROM tab2 AS cor0
----
13

query I rowsort
SELECT DISTINCT + col2 + - col0 AS col0 FROM tab0 AS cor0
----
-34
-7
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 89 - 2 col2 FROM tab1
----
-91
-91
-91

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3312
SELECT CAST( NULL AS SIGNED ) + - col1 col0 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3312
SELECT CAST ( NULL AS INTEGER ) + - col1 col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - ( - ( - col2 ) ) * + 36 * col2 + - col1 * 47 FROM tab0
----
-246341
-43246
-4595

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 81 - tab0.col1 col1 FROM tab0
----
-10
-16
-5

onlyif mysql # use DIV operator for integer division
query I rowsort label-3315
SELECT DISTINCT ( + ( + col2 ) ) + - col1 DIV col2 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-3315
SELECT DISTINCT ( + ( + col2 ) ) + - col1 / col2 FROM tab1
----
54
57
96

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab0, tab2 cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT ALL - col2 - col1 * 10 AS col0 FROM tab1 AS cor0
----
-157
-226
-314

onlyif mysql # use DIV operator for integer division
query I rowsort label-3318
SELECT DISTINCT tab2.col1 DIV 72 AS col2 FROM tab2, tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-3318
SELECT DISTINCT tab2.col1 / 72 AS col2 FROM tab2, tab1 AS cor0
----
0

query I rowsort
SELECT tab0.col2 - 39 AS col0 FROM tab0
----
-38
-6
43

query I rowsort
SELECT ALL + col1 + + ( col2 ) * tab2.col1 AS col0 FROM tab2
----
1593
663
868

query I rowsort
SELECT - col1 - - 33 * - ( col2 * col0 ) FROM tab1
----
-120394
-253453
-5372

query I rowsort
SELECT - 51 * col0 + - col1 * - col0 AS col1 FROM tab1 AS cor0
----
-2624
-3040
-75

query I rowsort
SELECT + - col0 - cor0.col0 * + 44 AS col2 FROM tab0 AS cor0
----
-1080
-1575
-4005

onlyif mysql # use DIV operator for integer division
query I rowsort label-3324
SELECT ALL - + col1 DIV - col0 + col2 FROM tab2 AS cor0
----
26
31
38

skipif mysql # not compatible
query I rowsort label-3324
SELECT ALL - + col1 / - col0 + col2 FROM tab2 AS cor0
----
26
31
38

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab1, tab2 AS cor0
----
26
27
38

query I rowsort
SELECT + 14 * - col2 + cor0.col1 AS col2 FROM tab0 cor0
----
-1057
-376
83

query I rowsort
SELECT DISTINCT - 14 - 49 AS col1 FROM tab0 AS cor0
----
-63

onlyif mysql # use DIV operator for integer division
query I rowsort label-3328
SELECT ALL col2 DIV - 91 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3328
SELECT ALL col2 / - 91 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT ALL + ( 33 ) AS col1 FROM tab0 AS cor0
----
33
33
33

skipif mysql # not compatible
query I rowsort
SELECT ALL + CAST ( col2 AS REAL ) AS col1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL + ( 77 ) * col0 + ( col2 ) * + col2 AS col1 FROM tab0 AS cor0
----
13577
2696
2937

query I rowsort
SELECT ( + 10 ) FROM tab0 AS cor0
----
10
10
10

query I rowsort
SELECT DISTINCT + + ( + col1 ) * - col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT col0 * 41 + cor0.col0 AS col0 FROM tab1 AS cor0
----
126
2688
3360

query I rowsort
SELECT ALL ( - col1 ) * col2 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3336
SELECT + col1 * col1 + col0 * col2 + - col1 DIV col1 FROM tab2 AS cor0
----
1149
3290
5508

skipif mysql # not compatible
query I rowsort label-3336
SELECT + col1 * col1 + col0 * col2 + - col1 / col1 FROM tab2 AS cor0
----
1149
3290
5508

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 89 * 84 col1 FROM tab1 AS cor0
----
-7476

query I rowsort
SELECT + 30 + 74 FROM tab0 AS cor0
----
104
104
104

query I rowsort
SELECT ALL + - col0 + - col2 * + cor0.col0 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT + + col1 + + col0 * 13 AS col0 FROM tab2 cor0
----
1044
1073
122

query I rowsort
SELECT DISTINCT - col2 * cor0.col1 + + col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT DISTINCT cor0.col1 * col0 + + ( col2 + col0 ) FROM tab0 AS cor0
----
2121
3431
8270

query I rowsort
SELECT - + ( col0 ) + + col1 * - col0 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT DISTINCT + 64 FROM tab0, tab2 AS cor0, tab1 AS cor1, tab1 cor2
----
64

query I rowsort
SELECT ALL + - cor1.col1 FROM tab0 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT ALL col2 + col0 * + tab2.col0 FROM tab2
----
6110
6279
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-3347
SELECT DISTINCT + col1 DIV + 34 FROM tab0 AS cor0
----
2

skipif mysql # not compatible
query I rowsort label-3347
SELECT DISTINCT + col1 / + 34 FROM tab0 AS cor0
----
2

query I rowsort
SELECT DISTINCT + col2 + + col0 * - 97 * + col1 AS col1 FROM tab1
----
-100784
-62023
-7512

query I rowsort
SELECT DISTINCT + tab1.col0 + 98 AS col1 FROM tab1
----
101
162
178

query I rowsort
SELECT - col2 * + 92 * col1 + col2 * 5 AS col2 FROM tab1 AS cor0
----
-114336
-128898
-52155

query I rowsort
SELECT ALL - cor0.col1 * 35 FROM tab2 AS cor0
----
-1085
-2065
-595

query I rowsort
SELECT + col0 * ( - 92 ) FROM tab0 cor0
----
-2208
-3220
-8188

query I rowsort
SELECT DISTINCT - col0 * - col1 + col2 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT ALL + cor0.col2 * - ( - col0 ) + - col0 * - col0 * col2 FROM tab0 AS cor0
----
1260
19800
656820

query I rowsort
SELECT + 86 * - col0 - + col2 AS col2 FROM tab1 AS cor0
----
-312
-5561
-6976

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 54 + - col1 col0 FROM tab0 AS cor0
----
-32
-37
-43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col0 + + 39 col1 FROM tab2 cor0
----
-39
-40
32

query I rowsort
SELECT DISTINCT col2 + 30 AS col0 FROM tab0
----
112
31
63

query I rowsort
SELECT - tab1.col0 + col0 + col1 FROM tab1
----
10
13
26

query I rowsort
SELECT - 23 FROM tab2, tab0 AS cor0, tab2 cor1
----
27 values hashing to 9bd721f99d79dce21b1de2860fd51ed5

query I rowsort
SELECT + col2 + + col0 + 40 * col1 AS col2 FROM tab0
----
3497
3811
3916

onlyif mysql # use DIV operator for integer division
query I rowsort label-3362
SELECT DISTINCT col0 + ( + 91 + col2 ) * col2 DIV + 96 FROM tab0
----
236
35
66

skipif mysql # not compatible
query I rowsort label-3362
SELECT DISTINCT col0 + ( + 91 + col2 ) * col2 / + 96 FROM tab0
----
236
35
66

query I rowsort
SELECT col1 * 58 + col0 AS col1 FROM tab1
----
1511
644
834

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3364
SELECT + col0 * CAST( NULL AS SIGNED ) * tab1.col2 + tab1.col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3364
SELECT + col0 * CAST ( NULL AS INTEGER ) * tab1.col2 + tab1.col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * + col2 AS col0 FROM tab0
----
-2838
-7462
-97

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 AS cor0, tab0 cor1, tab0, tab2 AS cor2
----
3645 values hashing to 972d282d6d92f451c90dc8ca51a18f3e

query I rowsort
SELECT DISTINCT - col0 * col0 + - col2 AS col2 FROM tab0 AS cor0
----
-1226
-609
-8003

query I rowsort
SELECT - + col1 * 41 AS col1 FROM tab1 AS cor0
----
-1066
-410
-533

query I rowsort
SELECT + col0 * - col1 + col0 * col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT cor0.col1 - CAST ( + 6 AS REAL ) AS col0 FROM tab1, tab0 AS cor0
----
80
85
91

query I rowsort
SELECT DISTINCT - col0 * tab0.col1 * + 47 AS col0 FROM tab0
----
-159565
-380653
-97008

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3372
SELECT DISTINCT col2 * CAST( NULL AS SIGNED ) FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-3372
SELECT DISTINCT col2 * CAST ( NULL AS INTEGER ) FROM tab2
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3373
SELECT col2 * CAST( 62 AS SIGNED ) * + col0 FROM tab1
----
10044
226176
476160

skipif mysql # not compatible
query I rowsort label-3373
SELECT col2 * CAST ( 62 AS INTEGER ) * + col0 FROM tab1
----
10044
226176
476160

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 13 col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to a90d0f37cec603ae1bc0a60dc7fbaeed

onlyif mysql # use DIV operator for integer division
query I rowsort label-3375
SELECT - col2 + col0 * cor0.col0 DIV col0 + + col0 FROM tab1 AS cor0
----
-48
64
71

skipif mysql # not compatible
query I rowsort label-3375
SELECT - col2 + col0 * cor0.col0 / col0 + + col0 FROM tab1 AS cor0
----
-48
64
71

query I rowsort
SELECT col1 - ( - col0 + - col1 ) * - ( + col2 ) FROM tab2
----
-3503
-3631
-995

query I rowsort
SELECT ALL - ( + 17 * + col1 ) FROM tab2
----
-1003
-289
-527

onlyif mysql # use DIV operator for integer division
query I rowsort label-3378
SELECT DISTINCT + col0 DIV 40 + col2 AS col0 FROM tab2
----
27
39

skipif mysql # not compatible
query I rowsort label-3378
SELECT DISTINCT + col0 / 40 + col2 AS col0 FROM tab2
----
27
39

onlyif mysql # use DIV operator for integer division
query I rowsort label-3379
SELECT DISTINCT 98 DIV - col0 AS col0 FROM tab1
----
-1
-32

skipif mysql # not compatible
query I rowsort label-3379
SELECT DISTINCT 98 / - col0 AS col0 FROM tab1
----
-1
-32

query I rowsort
SELECT + 21 * tab0.col1 AS col1 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to b4ccf4f7bf38aa97368f788b22f4950f

query I rowsort
SELECT 93 AS col0 FROM tab0
----
93
93
93

query I rowsort
SELECT 12 AS col0 FROM tab1
----
12
12
12

onlyif mysql # use DIV operator for integer division
query I rowsort label-3383
SELECT col0 + + cor0.col1 * 8 DIV col2 AS col0 FROM tab0 AS cor0
----
44
811
97

skipif mysql # not compatible
query I rowsort label-3383
SELECT col0 + + cor0.col1 * 8 / col2 AS col0 FROM tab0 AS cor0
----
44
811
97

query I rowsort
SELECT + cor0.col1 + + col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT - + 88 + + cor0.col2 AS col0 FROM tab0 AS cor0
----
-55
-6
-87

query I rowsort
SELECT + - 59 * col2 AS col0 FROM tab0 cor0
----
-1947
-4838
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-3387
SELECT + col1 * - col0 - col1 DIV col0 FROM tab0 AS cor0
----
-2067
-3397
-8100

skipif mysql # not compatible
query I rowsort label-3387
SELECT + col1 * - col0 - col1 / col0 FROM tab0 AS cor0
----
-2067
-3397
-8100

query I rowsort
SELECT - + 62 + - col1 AS col2 FROM tab2 AS cor0
----
-121
-79
-93

query I rowsort
SELECT + 28 - col1 FROM tab2
----
-3
-31
11

query I rowsort
SELECT ALL - 71 * col0 - col1 * + col0 * col1 AS col2 FROM tab0
----
-179208
-331800
-743328

query I rowsort
SELECT ALL 87 - - col2 AS col1 FROM tab1
----
141
144
183

query I rowsort
SELECT ALL 4 FROM tab1, tab1 AS cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to 3347a3237b37ed63205e9440d8818a46

onlyif mysql # use DIV operator for integer division
query I rowsort label-3393
SELECT ALL 35 DIV + col0 FROM tab1 AS cor0
----
0
0
11

skipif mysql # not compatible
query I rowsort label-3393
SELECT ALL 35 / + col0 FROM tab1 AS cor0
----
0
0
11

query I rowsort
SELECT DISTINCT cor0.col1 + col0 * + 72 * + col1 FROM tab1 AS cor0
----
46090
5642
74893

query I rowsort
SELECT DISTINCT + col0 + + col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT ALL col2 * col1 + col2 AS col0 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT ALL - cor0.col1 * - 31 + - cor0.col2 AS col2 FROM tab0 cor0
----
2633
2739
3006

query I rowsort
SELECT - cor0.col1 + + 14 * + col0 FROM tab2 AS cor0
----
1033
1089
67

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3399
SELECT DISTINCT + col1 * + CAST( NULL AS SIGNED ) / col1 AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3399
SELECT DISTINCT + col1 * + CAST ( NULL AS INTEGER ) / col1 AS col1 FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3400
SELECT ALL col1 + col1 DIV col1 col2 FROM tab2 AS cor0
----
18
32
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3400
SELECT ALL col1 + col1 / col1 col2 FROM tab2 AS cor0
----
18
32
60

query I rowsort
SELECT + - col0 * ( - cor0.col1 ) + col1 * - col1 AS col0 FROM tab2 AS cor0
----
-744
1054
1121

query I rowsort
SELECT DISTINCT + col2 * + col0 + - col0 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT - col2 + - col1 + col1 AS col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL - - col2 + col2 AS col0 FROM tab0 cor0
----
164
2
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-3405
SELECT DISTINCT + col2 DIV 71 FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-3405
SELECT DISTINCT + col2 / 71 FROM tab1 AS cor0
----
0
1

query I rowsort
SELECT - col1 * ( + col1 ) FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT col1 + - ( - col0 + col1 ) FROM tab0 cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-3408
SELECT - col2 * - col1 + col1 DIV - col0 + ( cor0.col0 ) AS col0 FROM tab2 AS cor0
----
1612
725
840

skipif mysql # not compatible
query I rowsort label-3408
SELECT - col2 * - col1 + col1 / - col0 + ( cor0.col0 ) AS col0 FROM tab2 AS cor0
----
1612
725
840

query I rowsort
SELECT + 83 FROM tab2 cor0
----
83
83
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * cor0.col0 col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ( + ( - col2 ) ) AS col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT + 18 FROM tab1, tab2 AS cor0
----
18

query I rowsort
SELECT ALL - - ( - col1 ) * - col0 + ( + ( col0 ) ) + ( col0 ) AS col1 FROM tab1 AS cor0
----
1200
768
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-3414
SELECT ALL + - col0 DIV col0 + cor0.col2 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-3414
SELECT ALL + - col0 / col0 + cor0.col2 FROM tab0 AS cor0
----
0
32
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-3415
SELECT DISTINCT - col0 + col2 DIV col1 AS col2 FROM tab2 AS cor0
----
-7
-77
-78

skipif mysql # not compatible
query I rowsort label-3415
SELECT DISTINCT - col0 + col2 / col1 AS col2 FROM tab2 AS cor0
----
-7
-77
-78

query I rowsort
SELECT + col2 + cor0.col2 FROM tab2 cor0
----
52
54
76

query I rowsort
SELECT DISTINCT - col1 + - col1 AS col0 FROM tab2 cor0
----
-118
-34
-62

query I rowsort
SELECT ALL - cor0.col1 + col2 AS col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT + + col0 * + col1 + col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT ALL + 99 FROM tab0, tab1 AS cor0
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

query I rowsort
SELECT ALL + cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT DISTINCT + 46 AS col0 FROM tab1
----
46

query I rowsort
SELECT + - col2 + - col1 * col2 FROM tab0 cor0
----
-2871
-7544
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3424
SELECT col1 DIV cor0.col0 + col2 * + col2 * CAST( + col0 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
114076
5107
52728

skipif mysql # not compatible
query I rowsort label-3424
SELECT col1 / cor0.col0 + col2 * + col2 * CAST ( + col0 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
114076
5107
52728

query I rowsort
SELECT ALL + + col0 * 23 FROM tab1 AS cor0
----
1472
1840
69

query I rowsort
SELECT ALL col0 * + 95 * - col0 FROM tab2 AS cor0
----
-4655
-577980
-592895

query I rowsort
SELECT + - col2 + col0 AS col2 FROM tab1 AS cor0
----
-16
-51
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * col2 - col1 col0 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT - col1 * 69 FROM tab0 cor0
----
-5934
-6279
-6693

query I rowsort
SELECT DISTINCT cor0.col2 * col0 AS col2 FROM tab1 AS cor0
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + 13 + col0 * col1 col2 FROM tab1 cor0
----
37
596
957

query I rowsort
SELECT ALL - cor0.col2 + + col1 + - cor0.col2 FROM tab2 AS cor0
----
-23
-59
7

query I rowsort
SELECT DISTINCT + col1 * col0 - + col2 FROM tab0 AS cor0
----
2031
3394
8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-3434
SELECT ALL col2 DIV ( + cor0.col1 ) FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3434
SELECT ALL col2 / ( + cor0.col1 ) FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3435
SELECT DISTINCT + col0 DIV - ( + col2 * col2 ) + - col1 + - col0 FROM tab0 AS cor0
----
-110
-167
-180

skipif mysql # not compatible
query I rowsort label-3435
SELECT DISTINCT + col0 / - ( + col2 * col2 ) + - col1 + - col0 FROM tab0 AS cor0
----
-110
-167
-180

query I rowsort
SELECT ALL + col0 + - 47 AS col0 FROM tab2 AS cor0
----
-40
31
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * + col1 col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + col2 + - col1 * - col0 * col1 FROM tab0 AS cor0
----
177537
329316
737091

query I rowsort
SELECT ALL + col1 * + 66 FROM tab0 AS cor0
----
5676
6006
6402

query I rowsort
SELECT + ( col2 ) * + col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT 75 * col2 AS col1 FROM tab1 AS cor0
----
4050
4275
7200

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col2 + + col0 - + col0 * + col1 col1 FROM tab0 AS cor0
----
-15472
-3457
-4878

onlyif mysql # use DIV operator for integer division
query I rowsort label-3443
SELECT DISTINCT - + col2 DIV - col2 AS col0 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-3443
SELECT DISTINCT - + col2 / - col2 AS col0 FROM tab0 AS cor0
----
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3444
SELECT 73 DIV col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3444
SELECT 73 / col1 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 col0 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT + cor0.col2 * col0 + 24 * + ( + col0 ) FROM tab1 AS cor0
----
234
5184
9600

query I rowsort
SELECT ALL - 63 + - cor0.col2 AS col2 FROM tab0 AS cor0
----
-145
-64
-96

query I rowsort
SELECT DISTINCT - 93 * + col0 - tab1.col0 AS col1 FROM tab1
----
-282
-6016
-7520

query I rowsort
SELECT ALL - col2 + tab0.col1 + 96 FROM tab0
----
105
149
192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col2 ) + 86 col2 FROM tab1
----
-10
29
32

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3451
SELECT ALL - CAST( NULL AS SIGNED ) AS col2 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-3451
SELECT ALL - CAST ( NULL AS INTEGER ) AS col2 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * col0 + col2 * 36 + - tab2.col2 col2 FROM tab2
----
1134
2938
4332

onlyif mysql # use DIV operator for integer division
query I rowsort label-3453
SELECT ALL + col2 + col1 + tab1.col1 DIV col2 FROM tab1
----
109
67
80

skipif mysql # not compatible
query I rowsort label-3453
SELECT ALL + col2 + col1 + tab1.col1 / col2 FROM tab1
----
109
67
80

query I rowsort
SELECT + 3 AS col1 FROM tab1, tab1 cor0
----
9 values hashing to 3cf1e377a943589897b8d431a834f1ba

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 + + cor0.col1 * cor0.col0 col1 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT + col0 + - col0 AS col2 FROM tab0 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3457
SELECT - col2 DIV col2 + 52 AS col2 FROM tab0 AS cor0
----
51
51
51

skipif mysql # not compatible
query I rowsort label-3457
SELECT - col2 / col2 + 52 AS col2 FROM tab0 AS cor0
----
51
51
51

query I rowsort
SELECT DISTINCT + 40 * 75 FROM tab2, tab2 cor0, tab1 AS cor1
----
3000

query I rowsort
SELECT - + col2 * 94 * col0 + - col0 FROM tab0 cor0
----
-3325
-686101
-74472

query I rowsort
SELECT + 66 * 69 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to f90be468a0821f5019ccd5ecdd99e969

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 62 col0 FROM tab2, tab1 cor0
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

query I rowsort
SELECT DISTINCT - - col2 + 88 AS col1 FROM tab0 AS cor0
----
121
170
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3463
SELECT ALL - col1 * CAST( NULL AS SIGNED ) col0 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3463
SELECT ALL - col1 * CAST ( NULL AS INTEGER ) col0 FROM tab2
----
NULL
NULL
NULL

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0, tab1 AS cor0, tab2 AS cor1
----
972 values hashing to f0b9665afa0b835e4e5097af17c51766

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

onlyif mysql # use DIV operator for integer division
query I rowsort label-3466
SELECT col2 + - col0 DIV + col0 AS col2 FROM tab0 cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-3466
SELECT col2 + - col0 / + col0 AS col2 FROM tab0 cor0
----
0
32
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3467
SELECT - - col2 * + CAST( NULL AS DECIMAL ) - col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3467
SELECT - - col2 * + CAST ( NULL AS REAL ) - col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 + - 13 AS col1 FROM tab0 cor0
----
-102
-37
-48

query I rowsort
SELECT DISTINCT - col2 * - 50 * + col2 AS col2 FROM tab2 AS cor0
----
33800
36450
72200

onlyif mysql # use DIV operator for integer division
query I rowsort label-3470
SELECT DISTINCT - + col0 DIV + 77 FROM tab0 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-3470
SELECT DISTINCT - + col0 / + 77 FROM tab0 AS cor0
----
-1
0

query I rowsort
SELECT ALL + col2 + - 38 AS col2 FROM tab0 AS cor0
----
-37
-5
44

query I rowsort
SELECT - + col0 - - cor0.col2 AS col1 FROM tab0 cor0
----
-34
-7
9

query I rowsort
SELECT - - 45 FROM tab1 cor0
----
45
45
45

query I rowsort
SELECT 53 + - ( - col1 ) AS col1 FROM tab1
----
63
66
79

query I rowsort
SELECT ALL ( + col2 ) * cor0.col2 + - col1 AS col2 FROM tab2 AS cor0
----
1427
617
698

query I rowsort
SELECT + col2 + 44 FROM tab2 AS cor0
----
70
71
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3477
SELECT DISTINCT 44 + ( col1 ) * CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3477
SELECT DISTINCT 44 + ( col1 ) * CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL - col2 + + col1 AS col0 FROM tab2 cor0
----
-21
33
4

query I rowsort
SELECT ALL 19 + col0 AS col2 FROM tab2 AS cor0
----
26
97
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 29 + - col1 col0 FROM tab2 AS cor0
----
-46
-60
-88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3481
SELECT + + col1 * - col1 - - CAST( + 97 AS SIGNED ) FROM tab0 AS cor0
----
-7299
-8184
-9312

skipif mysql # not compatible
query I rowsort label-3481
SELECT + + col1 * - col1 - - CAST ( + 97 AS INTEGER ) FROM tab0 AS cor0
----
-7299
-8184
-9312

onlyif mysql # use DIV operator for integer division
query I rowsort label-3482
SELECT ALL + 31 DIV col2 AS col2 FROM tab0 AS cor0
----
0
0
31

skipif mysql # not compatible
query I rowsort label-3482
SELECT ALL + 31 / col2 AS col2 FROM tab0 AS cor0
----
0
0
31

query I rowsort
SELECT DISTINCT - - col1 * - col2 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + cor0.col0 col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - cor0.col2 * col2 AS col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL + - 60 * - cor0.col2 + col1 * col1 AS col1 FROM tab2 AS cor0
----
2569
2581
5041

query I rowsort
SELECT + 10 FROM tab1, tab2, tab2 cor0
----
27 values hashing to 0fe3e45a9ecd49584c2ab442100d5176

onlyif mysql # use DIV operator for integer division
query I rowsort label-3488
SELECT + - col1 * col0 DIV 63 FROM tab1 AS cor0
----
-1
-10
-16

skipif mysql # not compatible
query I rowsort label-3488
SELECT + - col1 * col0 / 63 FROM tab1 AS cor0
----
-1
-10
-16

onlyif mysql # use DIV operator for integer division
query I rowsort label-3489
SELECT + 50 DIV - col0 AS col1 FROM tab2 AS cor0
----
-7
0
0

skipif mysql # not compatible
query I rowsort label-3489
SELECT + 50 / - col0 AS col1 FROM tab2 AS cor0
----
-7
0
0

query I rowsort
SELECT - col0 - + col1 * - col1 AS col1 FROM tab2 cor0
----
210
3403
954

query I rowsort
SELECT - + 36 + cor0.col2 - + col2 * ( ( col0 ) * + ( col1 ) + cor0.col0 ) FROM tab1 AS cor0
----
-107460
-40107
-4356

query I rowsort
SELECT + col1 * - col2 + col2 AS col2 FROM tab2 AS cor0
----
-1508
-608
-810

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3493
SELECT CAST( - col0 AS SIGNED ) + col0 * col0 AS col1 FROM tab1 AS cor0
----
4032
6
6320

skipif mysql # not compatible
query I rowsort label-3493
SELECT CAST ( - col0 AS INTEGER ) + col0 * col0 AS col1 FROM tab1 AS cor0
----
4032
6
6320

query I rowsort
SELECT ALL + col1 * + 1 AS col1 FROM tab1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-3495
SELECT - col1 - + col1 DIV + col2 FROM tab0 AS cor0
----
-194
-88
-92

skipif mysql # not compatible
query I rowsort label-3495
SELECT - col1 - + col1 / + col2 FROM tab0 AS cor0
----
-194
-88
-92

query I rowsort
SELECT ALL - col1 + + col2 - - cor0.col2 FROM tab1 cor0
----
104
179
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3497
SELECT ALL + col2 * + col1 + CAST( NULL AS SIGNED ) * - 57 / col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3497
SELECT ALL + col2 * + col1 + CAST ( NULL AS INTEGER ) * - 57 / col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - 5 AS col0 FROM tab1 cor0
----
5

query I rowsort
SELECT DISTINCT 43 * - tab0.col2 FROM tab0, tab2 AS cor0
----
-1419
-3526
-43

query I rowsort
SELECT ALL - 47 * tab2.col0 FROM tab2
----
-329
-3666
-3713

query I rowsort
SELECT 58 * - col2 AS col2 FROM tab2
----
-1508
-1566
-2204

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 92 col2 FROM tab1, tab1 cor0
----
9 values hashing to 516fa45c8b06f9f67d6e500bfd435c1a

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab1, tab2 cor2
----
3645 values hashing to d6394df0309139ffe20e7d96c77e26ee

query I rowsort
SELECT + - cor0.col2 * + 9 AS col0 FROM tab0 AS cor0
----
-297
-738
-9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3505
SELECT + cor0.col2 * CAST( + ( - col0 ) AS SIGNED ) FROM tab0 cor0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort label-3505
SELECT + cor0.col2 * CAST ( + ( - col0 ) AS INTEGER ) FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + - col1 + - ( cor0.col1 ) + col2 * ( col1 ) * - col2 AS col1 FROM tab2 AS cor0
----
-22661
-24582
-40002

query I rowsort
SELECT DISTINCT - col1 * - ( - col1 ) - col0 FROM tab1 AS cor0
----
-164
-249
-679

query I rowsort
SELECT + + col0 * ( col0 ) + - col1 AS col0 FROM tab2 AS cor0
----
18
6025
6224

query I rowsort
SELECT DISTINCT col0 * ( col0 + col2 ) * col2 FROM tab1
----
1351680
441408
9234

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3510
SELECT - CAST( col2 AS SIGNED ) * - cor0.col0 FROM tab0 AS cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-3510
SELECT - CAST ( col2 AS INTEGER ) * - cor0.col0 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-3511
SELECT DISTINCT col1 DIV 60 AS col2 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-3511
SELECT DISTINCT col1 / 60 AS col2 FROM tab1
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3512
SELECT DISTINCT col0 * CAST( 74 AS SIGNED ) FROM tab0
----
1776
2590
6586

skipif mysql # not compatible
query I rowsort label-3512
SELECT DISTINCT col0 * CAST ( 74 AS INTEGER ) FROM tab0
----
1776
2590
6586

query I rowsort
SELECT ALL - 29 * - tab0.col0 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 54bc59094b2661807c1d12f560e4953b

query I rowsort
SELECT + 34 AS col1 FROM tab2, tab1 AS cor0, tab1 cor1
----
27 values hashing to 4e2ca147a59e0d5661c28cf3e5431caa

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * ( + col1 * col2 ) col0 FROM tab0
----
244068
679042
9409

query I rowsort
SELECT - - ( 43 ) * + col1 FROM tab0 AS cor0
----
3698
3913
4171

query I rowsort
SELECT + - cor1.col2 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

onlyif mysql # use DIV operator for integer division
query I rowsort label-3518
SELECT - ( + 61 ) + col1 DIV + col1 FROM tab2 AS cor0
----
-60
-60
-60

skipif mysql # not compatible
query I rowsort label-3518
SELECT - ( + 61 ) + col1 / + col1 FROM tab2 AS cor0
----
-60
-60
-60

query I rowsort
SELECT DISTINCT + col0 * + ( cor0.col0 ) AS col0 FROM tab2 AS cor0
----
49
6084
6241

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3520
SELECT DISTINCT CAST( col0 AS SIGNED ) * + col2 AS col2 FROM tab0 AS cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-3520
SELECT DISTINCT CAST ( col0 AS INTEGER ) * + col2 AS col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL - ( + col0 ) + + col2 AS col2 FROM tab1 cor0
----
-7
16
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-3522
SELECT DISTINCT + col1 DIV - col0 FROM tab1 AS cor0
----
-8
0

skipif mysql # not compatible
query I rowsort label-3522
SELECT DISTINCT + col1 / - col0 FROM tab1 AS cor0
----
-8
0

query I rowsort
SELECT DISTINCT + + 57 FROM tab0 AS cor0
----
57

query I rowsort
SELECT ALL + 16 * - cor0.col0 AS col1 FROM tab2 cor0
----
-112
-1248
-1264

query I rowsort
SELECT ( 75 ) FROM tab0 cor0
----
75
75
75

onlyif mysql # use DIV operator for integer division
query I rowsort label-3526
SELECT DISTINCT - - 52 * col0 DIV + col0 FROM tab2 AS cor0
----
52

skipif mysql # not compatible
query I rowsort label-3526
SELECT DISTINCT - - 52 * col0 / + col0 FROM tab2 AS cor0
----
52

query I rowsort
SELECT ALL - col1 * + col2 + cor0.col1 AS col1 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT ALL - col1 + - col2 * ( 99 ) AS col1 FROM tab1
----
-5372
-5653
-9517

query I rowsort
SELECT + 78 + cor0.col2 AS col2 FROM tab2 AS cor0
----
104
105
116

query I rowsort
SELECT + 39 * col1 FROM tab0 cor0
----
3354
3549
3783

onlyif mysql # use DIV operator for integer division
query I rowsort label-3531
SELECT col0 DIV col0 + col1 DIV 18 AS col1 FROM tab1 AS cor0
----
1
1
2

skipif mysql # not compatible
query I rowsort label-3531
SELECT col0 / col0 + col1 / 18 AS col1 FROM tab1 AS cor0
----
1
1
2

query I rowsort
SELECT DISTINCT - col1 + cor0.col2 AS col2 FROM tab1 AS cor0
----
28
47
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 19 + cor0.col2 col1 FROM tab1 AS cor0
----
115
73
76

query I rowsort
SELECT 22 * col1 + + col1 FROM tab2 AS cor0
----
1357
391
713

query I rowsort
SELECT col2 * col1 + - ( col0 ) FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT DISTINCT + col1 - ( + col1 * + cor0.col0 ) AS col2 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT ALL + col2 * + ( col0 ) FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT ALL col1 * - cor0.col0 + - 12 + col2 AS col2 FROM tab1 AS cor0
----
-36
-595
-956

query I rowsort
SELECT DISTINCT col1 * + 6 FROM tab0 AS cor0
----
516
546
582

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col2 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
-26
-27
-38

query I rowsort
SELECT ALL + 94 + - ( cor0.col1 ) FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to be0c24323cefe4fd495a09f61ba20d84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3542
SELECT - col1 * CAST( + 0 + + col0 AS SIGNED ) col0 FROM tab2 AS cor0
----
-1343
-217
-4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3542
SELECT - col1 * CAST ( + 0 + + col0 AS INTEGER ) col0 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-3543
SELECT ALL + col0 DIV + 76 FROM tab2 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-3543
SELECT ALL + col0 / + 76 FROM tab2 AS cor0
----
0
1
1

query I rowsort
SELECT tab0.col2 * ( tab0.col1 ) FROM tab0
----
2838
7462
97

query I rowsort
SELECT DISTINCT col0 + - 37 FROM tab2
----
-30
41
42

query I rowsort
SELECT ALL 47 + col2 FROM tab0
----
129
48
80

query I rowsort
SELECT DISTINCT + tab0.col0 + col0 FROM tab0
----
178
48
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-3548
SELECT + ( col2 ) * col2 + + 42 DIV 16 FROM tab0
----
1091
3
6726

skipif mysql # not compatible
query I rowsort label-3548
SELECT + ( col2 ) * col2 + + 42 / 16 FROM tab0
----
1091
3
6726

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3550
SELECT ALL - - CAST( - col0 AS SIGNED ) * + col1 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-3550
SELECT ALL - - CAST ( - col0 AS INTEGER ) * + col1 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-3551
SELECT - 8 + - col0 + col1 DIV ( - 42 ) FROM tab0
----
-34
-45
-99

skipif mysql # not compatible
query I rowsort label-3551
SELECT - 8 + - col0 + col1 / ( - 42 ) FROM tab0
----
-34
-45
-99

query I rowsort
SELECT DISTINCT + tab2.col1 + - col0 * col0 FROM tab2
----
-18
-6025
-6224

query I rowsort
SELECT ALL - 88 * 89 AS col0 FROM tab0, tab2, tab2 cor0
----
27 values hashing to ae834cdb2adb341f82f6ed80fab91e51

query I rowsort
SELECT DISTINCT - col1 + - col1 * col2 AS col0 FROM tab1 cor0
----
-1261
-1430
-580

query I rowsort
SELECT ALL - 93 AS col2 FROM tab1 AS cor0
----
-93
-93
-93

query I rowsort
SELECT DISTINCT - - ( - col2 ) AS col0 FROM tab0 AS cor0
----
-1
-33
-82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3557
SELECT DISTINCT - cor0.col1 * col0 + CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3557
SELECT DISTINCT - cor0.col1 * col0 + CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 97 * + cor0.col0 col1 FROM tab1 AS cor0
----
291
6208
7760

query I rowsort
SELECT ALL - 35 * - col1 AS col2 FROM tab1 AS cor0
----
350
455
910

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col1 + + col2 * - 46 * col1 col0 FROM tab2 AS cor0
----
-30362
-39339
-72098

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col1 * col2 col2 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT + 90 * col2 + 97 + col2 * - cor0.col0 FROM tab0 AS cor0
----
152
179
2275

query I rowsort
SELECT + 32 + - cor0.col1 + + 91 * col2 FROM tab1 cor0
----
4920
5209
8755

query I rowsort
SELECT DISTINCT - col1 * - col2 * + col0 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT ALL col2 * + cor0.col0 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT ALL + ( col2 ) * 79 + + col2 + col0 FROM tab0 AS cor0
----
115
2664
6649

query I rowsort
SELECT ALL + + cor0.col1 + - ( cor0.col0 ) - col1 AS col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL - col0 + - col2 AS col2 FROM tab0 cor0
----
-171
-36
-57

query I rowsort
SELECT ALL + col1 + col2 * cor0.col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT ALL col2 + col1 * - col1 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT DISTINCT - col1 + col2 AS col1 FROM tab2 AS cor0
----
-33
-4
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 + - ( + col1 ) col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT ALL - + col2 * + col2 + col1 * - col1 FROM tab0 AS cor0
----
-15005
-8485
-9410

query I rowsort
SELECT DISTINCT - col0 * - cor0.col0 + - col2 AS col1 FROM tab2 AS cor0
----
22
6058
6203

onlyif mysql # use DIV operator for integer division
query I rowsort label-3575
SELECT DISTINCT - + col0 + cor0.col2 DIV + col0 + col2 AS col1 FROM tab2 AS cor0
----
-41
-52
23

skipif mysql # not compatible
query I rowsort label-3575
SELECT DISTINCT - + col0 + cor0.col2 / + col0 + col2 AS col1 FROM tab2 AS cor0
----
-41
-52
23

query I rowsort
SELECT col0 * 19 AS col1 FROM tab0 AS cor0
----
1691
456
665

query I rowsort
SELECT ALL + + col1 * - 96 + + col1 AS col0 FROM tab2 cor0
----
-1615
-2945
-5605

query I rowsort
SELECT ALL - - col0 * col2 + col1 AS col0 FROM tab2 AS cor0
----
2087
220
3019

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 * + col1 * col2 + + col2 col2 FROM tab0 AS cor0
----
244101
679124
9410

onlyif mysql # use DIV operator for integer division
query I rowsort label-3580
SELECT ALL - + col0 + col2 DIV cor0.col2 AS col1 FROM tab0 AS cor0
----
-23
-34
-88

skipif mysql # not compatible
query I rowsort label-3580
SELECT ALL - + col0 + col2 / cor0.col2 AS col1 FROM tab0 AS cor0
----
-23
-34
-88

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab0, tab2 cor0, tab1 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3582
SELECT DISTINCT + + CAST( NULL AS SIGNED ) * + col1 + col1 * - ( + col2 * - col0 ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3582
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) * + col1 + col1 * - ( + col2 * - col0 ) FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT - ( col2 ) * col0 * - col1 - col1 * col0 AS col2 FROM tab0 AS cor0
----
0
656019
66048

onlyif mysql # use DIV operator for integer division
query I rowsort label-3584
SELECT col2 * cor0.col0 + - col2 DIV 58 AS col1 FROM tab1 cor0
----
162
3648
7679

skipif mysql # not compatible
query I rowsort label-3584
SELECT col2 * cor0.col0 + - col2 / 58 AS col1 FROM tab1 cor0
----
162
3648
7679

onlyif mysql # use DIV operator for integer division
query I rowsort label-3585
SELECT DISTINCT - ( + 97 ) * col0 + + col2 DIV 35 AS col2 FROM tab1 AS cor0
----
-290
-6207
-7758

skipif mysql # not compatible
query I rowsort label-3585
SELECT DISTINCT - ( + 97 ) * col0 + + col2 / 35 AS col2 FROM tab1 AS cor0
----
-290
-6207
-7758

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - col1 + 96 col1 FROM tab2
----
-193
-3385
-865

query I rowsort
SELECT + col1 + - 57 AS col1 FROM tab1
----
-31
-44
-47

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab1 AS cor2, tab0 AS cor3
----
3645 values hashing to b803f2d602a28da5cf35ddc7c7fa2eeb

onlyif mysql # use DIV operator for integer division
query I rowsort label-3589
SELECT DISTINCT col1 DIV 20 AS col0 FROM tab1
----
0
1

skipif mysql # not compatible
query I rowsort label-3589
SELECT DISTINCT col1 / 20 AS col0 FROM tab1
----
0
1

query I rowsort
SELECT + - col0 * - 97 AS col1 FROM tab0 AS cor0
----
2328
3395
8633

query I rowsort
SELECT ALL + 20 AS col1 FROM tab0 cor0
----
20
20
20

query I rowsort
SELECT DISTINCT + col0 * - col0 + - col1 * + col1 * col0 FROM tab1 AS cor0
----
-10496
-19920
-2037

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 25 col0 FROM tab1 AS cor0
----
25

query I rowsort
SELECT DISTINCT - + ( + col2 ) - col0 * 59 FROM tab2 AS cor0
----
-440
-4628
-4699

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * - 52 col0 FROM tab2 AS cor0
----
1352
1404
1976

query I rowsort
SELECT ALL + col2 + + 55 * cor0.col0 FROM tab2 AS cor0
----
412
4316
4383

query I rowsort
SELECT - - cor0.col0 + - col2 AS col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT ALL - col2 + - tab0.col0 AS col2 FROM tab0
----
-171
-36
-57

query I rowsort
SELECT + col1 * + col1 - col0 FROM tab0 AS cor0
----
7372
8192
9374

query I rowsort
SELECT + col1 * - col2 - + col0 AS col0 FROM tab0 AS cor0
----
-132
-2862
-7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-3601
SELECT ALL ( 69 * + col0 ) + + col1 DIV + tab1.col2 col0 FROM tab1
----
207
4416
5520

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3601
SELECT ALL ( 69 * + col0 ) + + col1 / + tab1.col2 col0 FROM tab1
----
207
4416
5520

query I rowsort
SELECT ALL - 78 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to b6e4cc21599216686f0cf45b85668b2c

query I rowsort
SELECT + 77 AS col2 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to d7b027bca5d37c67e29013904def8125

query I rowsort
SELECT - col0 * + col2 + col1 * + col2 FROM tab0
----
164
2046
62

query I rowsort
SELECT ALL + 77 + + 91 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to b1402786d12a73d4fcc946bf6a6fd981

query I rowsort
SELECT DISTINCT - 34 AS col1 FROM tab0, tab1 cor0
----
-34

query I rowsort
SELECT ALL 88 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to c46e7cf9bf516fdfde88534336a28177

query I rowsort
SELECT ALL col2 * + 40 FROM tab1
----
2160
2280
3840

query I rowsort
SELECT DISTINCT + - tab2.col0 FROM tab2, tab1, tab1 AS cor0
----
-7
-78
-79

query I rowsort
SELECT 38 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to a7827a79248ee7bf2cee915a631d02cb

onlyif mysql # use DIV operator for integer division
query I rowsort label-3611
SELECT DISTINCT + cor0.col1 + - col0 * col0 DIV - col2 AS col0 FROM tab1 AS cor0
----
26
79
81

skipif mysql # not compatible
query I rowsort label-3611
SELECT DISTINCT + cor0.col1 + - col0 * col0 / - col2 AS col0 FROM tab1 AS cor0
----
26
79
81

query I rowsort
SELECT + cor0.col2 + - cor0.col1 AS col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT ALL - - col1 + 33 FROM tab1 AS cor0
----
43
46
59

query I rowsort
SELECT ALL col0 * 41 - - 3 AS col2 FROM tab1 cor0
----
126
2627
3283

query I rowsort
SELECT ALL col2 - ( 11 * - col2 ) AS col0 FROM tab2 AS cor0
----
312
324
456

onlyif mysql # use DIV operator for integer division
query I rowsort label-3616
SELECT - col0 + col1 * 88 DIV col2 AS col0 FROM tab0 AS cor0
----
205
8
8501

skipif mysql # not compatible
query I rowsort label-3616
SELECT - col0 + col1 * 88 / col2 AS col0 FROM tab0 AS cor0
----
205
8
8501

onlyif mysql # use DIV operator for integer division
query I rowsort label-3617
SELECT - ( col1 ) DIV 6 AS col0 FROM tab0 AS cor0
----
-14
-15
-16

skipif mysql # not compatible
query I rowsort label-3617
SELECT - ( col1 ) / 6 AS col0 FROM tab0 AS cor0
----
-14
-15
-16

query I rowsort
SELECT + col2 + - 62 AS col0 FROM tab1 AS cor0
----
-5
-8
34

query I rowsort
SELECT ALL - 72 AS col2 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to ad521144c976ff25e77cdf10a84d1dc6

query I rowsort
SELECT ( cor0.col2 ) + col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT col0 * ( - col1 ) + + ( - col2 ) AS col0 FROM tab0 AS cor0
----
-2097
-3396
-8181

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 91 col1 FROM tab2 AS cor0
----
91
91
91

query I rowsort
SELECT ALL + + col2 * col2 + ( - cor0.col2 * col0 ) FROM tab0 cor0
----
-34
-574
297

query I rowsort
SELECT DISTINCT - col2 * - col0 + ( col2 ) AS col0 FROM tab0 AS cor0
----
36
7380
825

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3625
SELECT DISTINCT CAST( col2 AS SIGNED ) AS col2 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-3625
SELECT DISTINCT CAST ( col2 AS INTEGER ) AS col2 FROM tab0
----
1
33
82

query I rowsort
SELECT ALL - 33 FROM tab1, tab0 AS cor0
----
9 values hashing to 8035c665a75d22be5922be1a4e574e03

query I rowsort
SELECT + 54 AS col0 FROM tab0 AS cor0
----
54
54
54

query I rowsort
SELECT + - 13 FROM tab1 AS cor0
----
-13
-13
-13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 91 col2 FROM tab2
----
91
91
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 29 col1 FROM tab0
----
29
29
29

query I rowsort
SELECT DISTINCT + 70 - cor0.col2 * 21 FROM tab1, tab1 AS cor0
----
-1064
-1127
-1946

query I rowsort
SELECT + - col0 + col0 * + 50 AS col0 FROM tab2 AS cor0
----
343
3822
3871

query I rowsort
SELECT + col1 * col0 + + col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT 10 AS col0 FROM tab1 cor0
----
10
10
10

query I rowsort
SELECT ALL cor0.col0 + col0 * + col0 FROM tab2 cor0
----
56
6162
6320

query I rowsort
SELECT DISTINCT col1 * col1 - col2 FROM tab1 AS cor0
----
43
622
73

query I rowsort
SELECT DISTINCT + + 69 * col2 FROM tab1 AS cor0
----
3726
3933
6624

query I rowsort
SELECT 14 - col1 FROM tab0
----
-72
-77
-83

query I rowsort
SELECT ALL col1 * 21 FROM tab0 cor0
----
1806
1911
2037

query I rowsort
SELECT DISTINCT + ( + col0 * 32 ) FROM tab1
----
2048
2560
96

query I rowsort
SELECT cor0.col0 * + col0 + col2 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT DISTINCT ( - 89 ) FROM tab2, tab1 AS cor0, tab2 AS cor1
----
-89

query I rowsort
SELECT col0 + - tab2.col1 * + 83 AS col1 FROM tab2
----
-1332
-2566
-4819

query I rowsort
SELECT - tab0.col2 AS col2 FROM tab0, tab0 cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT ALL col0 * + 47 AS col0 FROM tab0
----
1128
1645
4183

onlyif mysql # use DIV operator for integer division
query I rowsort label-3646
SELECT DISTINCT - col1 DIV tab0.col1 FROM tab0
----
-1

skipif mysql # not compatible
query I rowsort label-3646
SELECT DISTINCT - col1 / tab0.col1 FROM tab0
----
-1

query I rowsort
SELECT + tab2.col2 * 17 AS col2 FROM tab2
----
442
459
646

query I rowsort
SELECT ALL - col2 * 47 AS col0 FROM tab0 cor0
----
-1551
-3854
-47

query I rowsort
SELECT - ( 99 ) + - col1 FROM tab1 AS cor0
----
-109
-112
-125

onlyif mysql # use DIV operator for integer division
query I rowsort label-3650
SELECT DISTINCT + col1 DIV + col2 AS col1 FROM tab1 cor0
----
0

skipif mysql # not compatible
query I rowsort label-3650
SELECT DISTINCT + col1 / + col2 AS col1 FROM tab1 cor0
----
0

query I rowsort
SELECT - cor0.col1 * - 56 FROM tab0 AS cor0
----
4816
5096
5432

query I rowsort
SELECT ALL + 24 * - col0 FROM tab1 AS cor0
----
-1536
-1920
-72

onlyif mysql # use DIV operator for integer division
query I rowsort label-3653
SELECT + col2 DIV CAST( 80 AS SIGNED ) AS col2 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3653
SELECT + col2 / CAST ( 80 AS INTEGER ) AS col2 FROM tab1
----
0
0
1

query I rowsort
SELECT + col2 + col0 * - col2 + + tab1.col2 AS col2 FROM tab1
----
-3534
-54
-7488

onlyif mysql # use DIV operator for integer division
query I rowsort label-3655
SELECT ALL + col0 DIV - ( col0 ) - col2 DIV col1 AS col0 FROM tab2
----
-1
-1
-3

skipif mysql # not compatible
query I rowsort label-3655
SELECT ALL + col0 / - ( col0 ) - col2 / col1 AS col0 FROM tab2
----
-1
-1
-3

query I rowsort
SELECT - 43 FROM tab2, tab1 cor0
----
9 values hashing to ab0c314d2b589ccedb9a875beeb1f86a

onlyif mysql # use DIV operator for integer division
query I rowsort label-3657
SELECT - 69 + - col2 DIV col1 AS col0 FROM tab1 AS cor0
----
-71
-74
-76

skipif mysql # not compatible
query I rowsort label-3657
SELECT - 69 + - col2 / col1 AS col0 FROM tab1 AS cor0
----
-71
-74
-76

query I rowsort
SELECT - cor0.col0 * - 41 AS col1 FROM tab1 cor0
----
123
2624
3280

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + ( - col0 ) col0 FROM tab0
----
0

query I rowsort
SELECT ALL - col2 * col1 + tab0.col0 FROM tab0
----
-2814
-62
-7373

query I rowsort
SELECT ALL + + col2 * - col2 AS col1 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT + ( - col1 ) + col0 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT - col1 - - col2 AS col1 FROM tab1 AS cor0
----
28
47
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-3664
SELECT col0 * - col2 - col0 DIV ( col2 * col1 ) AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif mysql # not compatible
query I rowsort label-3664
SELECT col0 * - col2 - col0 / ( col2 * col1 ) AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3665
SELECT ALL CAST( col0 AS SIGNED ) + + col1 * + ( - col2 ) FROM tab1 cor0
----
-1168
-1401
-506

skipif mysql # not compatible
query I rowsort label-3665
SELECT ALL CAST ( col0 AS INTEGER ) + + col1 * + ( - col2 ) FROM tab1 cor0
----
-1168
-1401
-506

query I rowsort
SELECT - cor0.col2 + 89 AS col1 FROM tab0 AS cor0
----
56
7
88

query I rowsort
SELECT DISTINCT + ( + 12 ) FROM tab1 AS cor0
----
12

query I rowsort
SELECT + - col1 * 27 + - col2 FROM tab2 AS cor0
----
-1619
-497
-864

query III rowsort
SELECT * FROM tab1 WHERE NULL = + col0
----

query I rowsort
SELECT DISTINCT tab2.col1 + + col0 AS col0 FROM tab2
----
137
38
96

query I rowsort
SELECT ALL col2 + col1 * - col0 AS col0 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT ALL - col0 + + col1 * + col0 FROM tab1
----
576
75
960

query I rowsort
SELECT col0 FROM tab2 WHERE NOT ( NULL ) > - col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + col0 col0 FROM tab2
----
-189
-2028
-3002

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT col1 NOT IN ( - col1 )
----

query I rowsort
SELECT col0 + + col0 AS col2 FROM tab1 WHERE NULL >= - col2 + col0
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3677
SELECT ALL - col1 + col0 DIV col1 + col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3677
SELECT ALL - col1 + col0 / col1 + col1 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT col2 + col1 * col1 FROM tab1
----
157
265
730

query I rowsort
SELECT ALL col1 + col1 * tab0.col2 * - col2 FROM tab0
----
-611793
-93568
0

query I rowsort
SELECT col0 * + tab0.col1 - + col0 * - tab0.col1 FROM tab0
----
16198
4128
6790

query I rowsort
SELECT DISTINCT + col2 * col2 + col1 AS col2 FROM tab0
----
1175
6815
98

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT ( NULL ) < ( col0 * tab2.col2 )
----

query I rowsort
SELECT DISTINCT - cor0.col2 * col2 * col0 + col2 AS col1 FROM tab0 AS cor0
----
-26103
-34
-598354

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + col1 col2 FROM tab1 AS cor0
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - cor0.col1 + cor0.col1 col1 FROM tab2 AS cor0
----
118
34
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-3686
SELECT ALL - col2 DIV col0 + col2 FROM tab0 AS cor0
----
1
32
82

skipif mysql # not compatible
query I rowsort label-3686
SELECT ALL - col2 / col0 + col2 FROM tab0 AS cor0
----
1
32
82

query I rowsort
SELECT ALL cor0.col0 * cor0.col1 AS col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - col1 * - col0 + col0 FROM tab1 AS cor0
----
1120
704
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-3689
SELECT ALL - cor0.col0 DIV + col2 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-3689
SELECT ALL - cor0.col0 / + col2 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT cor0.col0 * col2 AS col1 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT + col2 / + col0 AS col2 FROM tab1 AS cor0 WHERE NULL IN ( - col1 )
----

query IIIIII rowsort
SELECT ALL * FROM tab0, tab0 AS cor0 WHERE ( NULL ) >= NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3693
SELECT DISTINCT col1 DIV col0 + - col0 AS col0 FROM tab0 AS cor0
----
-21
-33
-88

skipif mysql # not compatible
query I rowsort label-3693
SELECT DISTINCT col1 / col0 + - col0 AS col0 FROM tab0 AS cor0
----
-21
-33
-88

query I rowsort
SELECT + col0 * col1 + col2 AS col0 FROM tab0 AS cor0 WHERE NOT NULL NOT IN ( - col0 - - col0 )
----

query I rowsort
SELECT - cor0.col1 * - col1 FROM tab1 cor0 WHERE NULL <> ( NULL )
----

query I rowsort
SELECT ALL + col2 + ( - col0 * + col0 ) + 54 FROM tab0 AS cor0
----
-1170
-489
-7785

query I rowsort
SELECT ALL - + col1 + 25 AS col0 FROM tab0 cor0
----
-61
-66
-72

query I rowsort
SELECT - col2 * col1 + + col1 * cor0.col0 FROM tab2 AS cor0
----
-620
3068
697

query I rowsort
SELECT + col2 * col0 + cor0.col1 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT + col2 + ( cor0.col1 ) FROM tab2 AS cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-3701
SELECT DISTINCT + - col2 DIV - 72 - col2 * + col1 AS col1 FROM tab1 AS cor0
----
-1247
-1404
-570

skipif mysql # not compatible
query I rowsort label-3701
SELECT DISTINCT + - col2 / - 72 - col2 * + col1 AS col1 FROM tab1 AS cor0
----
-1247
-1404
-570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3702
SELECT cor0.col1 * - CAST( + col0 AS SIGNED ) * - col1 FROM tab2 cor0
----
22831
271518
6727

skipif mysql # not compatible
query I rowsort label-3702
SELECT cor0.col1 * - CAST ( + col0 AS INTEGER ) * - col1 FROM tab2 cor0
----
22831
271518
6727

query I rowsort
SELECT DISTINCT - + col1 + - 48 FROM tab0 AS cor0
----
-134
-139
-145

query I rowsort
SELECT 33 * + col1 FROM tab2 AS cor0
----
1023
1947
561

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + ( + col2 ) + + col1 col0 FROM tab0
----
132
7389
878

query I rowsort
SELECT 65 + + cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to 5023507b390c4c0e49467632bf137aa2

query I rowsort
SELECT 24 * + cor0.col2 * - ( + col0 ) AS col2 FROM tab2 AS cor0
----
-4536
-48672
-72048

query I rowsort
SELECT + ( + cor0.col0 ) + + col1 AS col0 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3709
SELECT ALL - col0 - - cor0.col0 * CAST( + col1 AS SIGNED ) * cor0.col1 FROM tab2 AS cor0
----
22752
271440
6720

skipif mysql # not compatible
query I rowsort label-3709
SELECT ALL - col0 - - cor0.col0 * CAST ( + col1 AS INTEGER ) * cor0.col1 FROM tab2 AS cor0
----
22752
271440
6720

query I rowsort
SELECT DISTINCT 94 * - col0 FROM tab1 AS cor0
----
-282
-6016
-7520

query I rowsort
SELECT ALL col2 * - tab2.col1 * - tab2.col0 + - col2 * + col1 + col2 AS col2 FROM tab2
----
118144
50426
5049

query I rowsort
SELECT - col0 AS col0 FROM tab1 WHERE NOT - col0 + - col0 / col0 IN ( - col1 )
----
-3
-64
-80

query I rowsort
SELECT DISTINCT - col2 * + col0 * - col1 FROM tab2
----
119652
51034
5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-3714
SELECT - col0 * col1 - + 96 * col1 DIV col2 AS col2 FROM tab1 AS cor0
----
-1053
-124
-656

skipif mysql # not compatible
query I rowsort label-3714
SELECT - col0 * col1 - + 96 * col1 / col2 AS col2 FROM tab1 AS cor0
----
-1053
-124
-656

query I rowsort
SELECT + - col0 - - col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col0 * col1 + + col0 FROM tab0 WHERE + col1 * col1 + - col2 BETWEEN col1 + - col2 AND NULL
----

query I rowsort
SELECT DISTINCT col0 FROM tab2 WHERE NOT NULL IN ( - col2 + + col0 / col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 16 col2 FROM tab0, tab2 cor0, tab0 AS cor1
----
27 values hashing to ee5bde9f68ee828e8cd86b0d590090bc

onlyif mysql # use DIV operator for integer division
query I rowsort label-3719
SELECT - + col2 + col2 DIV + col0 FROM tab2 cor0
----
-24
-26
-38

skipif mysql # not compatible
query I rowsort label-3719
SELECT - + col2 + col2 / + col0 FROM tab2 cor0
----
-24
-26
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 53 * - col1 + - 14 * col1 col2 FROM tab1 AS cor0
----
-1742
-670
-871

onlyif mysql # use DIV operator for integer division
query I rowsort label-3721
SELECT DISTINCT - col0 * + col2 DIV col2 + 24 AS col0 FROM tab1 AS cor0
----
-40
-56
21

skipif mysql # not compatible
query I rowsort label-3721
SELECT DISTINCT - col0 * + col2 / col2 + 24 AS col0 FROM tab1 AS cor0
----
-40
-56
21

query I rowsort
SELECT col0 * - cor0.col1 + 21 FROM tab1 AS cor0
----
-1019
-57
-619

query I rowsort
SELECT ALL - 20 * ( cor0.col0 ) AS col0 FROM tab0 cor0
----
-1780
-480
-700

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3724
SELECT + CAST( NULL AS SIGNED ) * - col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3724
SELECT + CAST ( NULL AS INTEGER ) * - col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 + tab1.col2 + - col2 AS col0 FROM tab1
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3726
SELECT + - col1 DIV CAST( + col1 * - col1 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3726
SELECT + - col1 / CAST ( + col1 * - col1 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + cor1.col0 AS col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
3
64
80

query I rowsort
SELECT DISTINCT + 53 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
53

query I rowsort
SELECT ALL ( 91 ) * tab1.col2 FROM tab1
----
4914
5187
8736

query I rowsort
SELECT col2 * - ( col0 ) - col2 AS col0 FROM tab1
----
-216
-3705
-7776

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT col1 + - col1 * col2 FROM tab0 cor0
----
-2752
-7371
0

query I rowsort
SELECT col0 * col1 * + col0 FROM tab1
----
234
40960
83200

query I rowsort
SELECT + - col0 + col2 + col2 AS col0 FROM tab2 AS cor0
----
-26
-3
47

query I rowsort
SELECT - cor0.col0 * col2 * 45 + col2 + - col0 * col0 FROM tab1 AS cor0
----
-168199
-351904
-7245

query I rowsort
SELECT col1 + col1 - ( + col0 ) AS col1 FROM tab0 AS cor0
----
148
159
93

query I rowsort
SELECT - col2 + + 16 AS col1 FROM tab1 AS cor0
----
-38
-41
-80

query I rowsort
SELECT + cor0.col1 + + col2 * col0 + col1 FROM tab2 AS cor0
----
2146
251
3036

query I rowsort
SELECT - - col2 * col1 + + col0 + col0 FROM tab2 AS cor0
----
1690
804
851

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3740
SELECT + col2 * - CAST( NULL AS SIGNED ) + col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3740
SELECT + col2 * - CAST ( NULL AS INTEGER ) + col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + cor0.col2 AS col2 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT ALL + + cor0.col0 + ( 55 ) FROM tab0 AS cor0
----
144
79
90

query I rowsort
SELECT - 70 * tab0.col0 * col0 FROM tab0
----
-40320
-554470
-85750

query I rowsort
SELECT + - col2 * - col1 + col2 AS col0 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT + col0 - - col1 * - col2 * cor0.col2 FROM tab0 AS cor0
----
-611795
-62
-93630

query I rowsort
SELECT + - col2 + col1 AS col2 FROM tab2 AS cor0
----
-21
33
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-3747
SELECT DISTINCT - col2 - col0 DIV - col0 AS col2 FROM tab1 AS cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-3747
SELECT DISTINCT - col2 - col0 / - col0 AS col2 FROM tab1 AS cor0
----
-53
-56
-95

query I rowsort
SELECT tab0.col0 * col2 + col2 + tab0.col2 AS col0 FROM tab0
----
37
7462
858

query I rowsort
SELECT DISTINCT + col2 + + col2 * col0 + col2 FROM tab2 AS cor0
----
2080
243
3078

onlyif mysql # use DIV operator for integer division
query I rowsort label-3750
SELECT 82 * col0 DIV + col1 FROM tab2
----
108
18
381

skipif mysql # not compatible
query I rowsort label-3750
SELECT 82 * col0 / + col1 FROM tab2
----
108
18
381

query I rowsort
SELECT + col2 * col2 - + col1 FROM tab1 AS cor0
----
2890
3239
9203

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - col1 * + col2 * col0 col1 FROM tab2 cor0
----
-119574
-50955
-5852

onlyif mysql # use DIV operator for integer division
query I rowsort label-3753
SELECT - cor0.col1 DIV + cor0.col0 + + cor0.col0 col1 FROM tab2 AS cor0
----
3
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3753
SELECT - cor0.col1 / + cor0.col0 + + cor0.col0 col1 FROM tab2 AS cor0
----
3
78
79

query I rowsort
SELECT DISTINCT cor0.col1 - - col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT ALL + + col1 + + col1 FROM tab0 cor0
----
172
182
194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + - col1 col1 FROM tab2 AS cor0
----
-33
-4
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-3757
SELECT col1 * cor0.col1 + + col2 DIV col1 FROM tab0 AS cor0
----
7396
8281
9409

skipif mysql # not compatible
query I rowsort label-3757
SELECT col1 * cor0.col1 + + col2 / col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT - col0 + + col1 AS col1 FROM tab1
----
-54
-67
23

query I rowsort
SELECT ALL + col0 * col2 * - tab2.col0 + - col0 * - tab2.col0 FROM tab2
----
-1274
-152100
-230917

query I rowsort
SELECT DISTINCT tab0.col2 * col2 + col1 AS col1 FROM tab0
----
1175
6815
98

query I rowsort
SELECT ALL + col2 + col0 AS col2 FROM tab2
----
104
117
34

query I rowsort
SELECT - col2 + - col1 * + tab0.col0 FROM tab0
----
-2097
-3396
-8181

query I rowsort
SELECT col2 * col1 + col0 * - col2 FROM tab2
----
-2356
-494
648

query I rowsort
SELECT DISTINCT col0 + - col2 * - col1 FROM tab0
----
132
2862
7551

query I rowsort
SELECT - col0 * col0 * - col0 FROM tab1
----
262144
27
512000

query I rowsort
SELECT ALL col0 * - col1 * col0 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT + col1 + + cor0.col0 * col0 AS col2 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT ALL 34 * - cor0.col2 + col0 FROM tab0 AS cor0
----
-1098
-2699
1

query I rowsort
SELECT - 48 AS col2 FROM tab1
----
-48
-48
-48

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col1 + col0 AS REAL ) AS col0 FROM tab2
----
137
38
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3771
SELECT CAST( - col0 AS SIGNED ) AS col0 FROM tab1
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-3771
SELECT CAST ( - col0 AS INTEGER ) AS col0 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT - ( + 70 ) FROM tab1
----
-70
-70
-70

query I rowsort
SELECT + cor0.col2 + + col2 AS col1 FROM tab2 cor0
----
52
54
76

query I rowsort
SELECT - ( tab1.col2 ) + col0 FROM tab1
----
-16
-51
7

query I rowsort
SELECT ALL col2 - col2 * + col1 AS col0 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT ALL - 64 FROM tab2, tab0 cor0, tab2 AS cor1
----
27 values hashing to 100c625e45715c20368551989514ba64

skipif mysql # not compatible
query I rowsort
SELECT ALL - + col0 + col1 * + ( ( + col0 ) ) + - CAST ( - col2 * + col2 AS REAL ) FROM tab2 AS cor0
----
2708
5200
939

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + ( col2 ) col0 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT ALL ( - cor0.col0 ) FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT ALL + + col0 + + col2 AS col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT col0 + 52 AS col0 FROM tab0 AS cor0
----
141
76
87

query I rowsort
SELECT - ( + tab0.col2 ) FROM tab0
----
-1
-33
-82

query I rowsort
SELECT + 15 AS col1 FROM tab2, tab1 cor0, tab1 AS cor1
----
27 values hashing to 71dda9a71fc978ea7b0ac5d8cd2ef1f0

query I rowsort
SELECT 52 * 45 AS col0 FROM tab2 AS cor0
----
2340
2340
2340

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3785
SELECT - CAST( col2 AS SIGNED ) - + col2 AS col1 FROM tab0 AS cor0
----
-164
-2
-66

skipif mysql # not compatible
query I rowsort label-3785
SELECT - CAST ( col2 AS INTEGER ) - + col2 AS col1 FROM tab0 AS cor0
----
-164
-2
-66

onlyif mysql # use DIV operator for integer division
query I rowsort label-3786
SELECT DISTINCT + col0 DIV - col2 + col2 AS col2 FROM tab1
----
54
56
96

skipif mysql # not compatible
query I rowsort label-3786
SELECT DISTINCT + col0 / - col2 + col2 AS col2 FROM tab1
----
54
56
96

query I rowsort
SELECT + ( col0 ) * + col0 + col2 * + ( col0 ) FROM tab1 AS cor0
----
14080
171
7744

query I rowsort
SELECT ALL + col0 * + 25 * - col0 FROM tab2 AS cor0
----
-1225
-152100
-156025

query I rowsort
SELECT DISTINCT col0 * + cor0.col2 + + col2 + col1 * 68 FROM tab2 AS cor0
----
2324
4196
6066

query I rowsort
SELECT ALL - cor0.col2 * 12 - + col2 AS col0 FROM tab2 AS cor0
----
-338
-351
-494

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3791
SELECT DISTINCT CAST( col2 AS SIGNED ) + col0 AS col2 FROM tab0 cor0
----
171
36
57

skipif mysql # not compatible
query I rowsort label-3791
SELECT DISTINCT CAST ( col2 AS INTEGER ) + col0 AS col2 FROM tab0 cor0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( col0 ) col0 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3793
SELECT DISTINCT 73 * - col0 * - col1 + - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3793
SELECT DISTINCT 73 * - col0 * - col1 + - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + col1 * + 16 + col0 * + col2 * col0 FROM tab2
----
159128
1819
237430

query I rowsort
SELECT tab1.col2 * col1 + - col0 + - col1 * + 71 FROM tab1
----
-204
-445
245

query I rowsort
SELECT DISTINCT + col0 + ( + 98 ) AS col0 FROM tab0
----
122
133
187

query I rowsort
SELECT col0 + - ( + tab0.col1 + col0 ) * col1 * + 56 AS col2 FROM tab0
----
-529736
-716989
-917191

query I rowsort
SELECT col2 * tab1.col1 - col2 FROM tab1
----
1152
1350
513

query I rowsort
SELECT col2 * col0 + col0 * col1 + - col2 * col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT - col1 + tab2.col1 - + 63 * col0 * 90 AS col1 FROM tab2
----
-39690
-442260
-447930

query I rowsort
SELECT col1 + + col0 * 60 FROM tab1
----
206
3850
4813

onlyif mysql # use DIV operator for integer division
query I rowsort label-3802
SELECT DISTINCT col0 DIV tab0.col2 + col2 FROM tab0
----
33
36
83

skipif mysql # not compatible
query I rowsort label-3802
SELECT DISTINCT col0 / tab0.col2 + col2 FROM tab0
----
33
36
83

query I rowsort
SELECT - ( - col2 ) * col1 AS col0 FROM tab0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3804
SELECT DISTINCT - tab1.col0 DIV + cor0.col0 FROM tab0, tab1 AS cor0 CROSS JOIN tab1
----
-1
-21
-26
0

skipif mysql # not compatible
query I rowsort label-3804
SELECT DISTINCT - tab1.col0 / + cor0.col0 FROM tab0, tab1 AS cor0 CROSS JOIN tab1
----
-1
-21
-26
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col0 * + col2 col1 FROM tab2
----
-1323
-158184
-237158

query I rowsort
SELECT ALL - col0 * col1 * + col1 FROM tab1 AS cor0
----
-13520
-2028
-6400

onlyif mysql # use DIV operator for integer division
query I rowsort label-3807
SELECT col2 DIV - ( - col2 ) + 59 AS col0 FROM tab1 AS cor0
----
60
60
60

skipif mysql # not compatible
query I rowsort label-3807
SELECT col2 / - ( - col2 ) + 59 AS col0 FROM tab1 AS cor0
----
60
60
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 36 col2 FROM tab0 AS cor0
----
36
36
36

query I rowsort
SELECT DISTINCT col2 * 77 + col0 * col2 AS col0 FROM tab2 AS cor0
----
2268
4030
5928

query I rowsort
SELECT ALL + col2 * - col0 + - col0 AS col0 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT DISTINCT col2 - - col1 * col1 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT 97 + tab0.col1 FROM tab0
----
183
188
194

query I rowsort
SELECT ALL - col1 + col2 * col1 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT - - col0 * + 79 AS col0 FROM tab1 AS cor0
----
237
5056
6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-3815
SELECT ALL + 10 * cor0.col2 * col0 + 81 DIV 45 + col2 FROM tab0 AS cor0
----
352
73063
7954

skipif mysql # not compatible
query I rowsort label-3815
SELECT ALL + 10 * cor0.col2 * col0 + 81 / 45 + col2 FROM tab0 AS cor0
----
352
73063
7954

query I rowsort
SELECT - ( - col0 ) * + col2 AS col0 FROM tab1
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 61 * col1 col2 FROM tab2
----
1037
1891
3599

query I rowsort
SELECT col1 + col2 + 31 FROM tab2 AS cor0
----
116
86
89

query I rowsort
SELECT ALL ( + 20 ) * - col0 FROM tab1
----
-1280
-1600
-60

query I rowsort
SELECT 37 * col2 AS col2 FROM tab1
----
1998
2109
3552

query I rowsort
SELECT col1 * - ( - col2 * 10 ) FROM tab1
----
12480
14040
5700

query I rowsort
SELECT ALL col1 * ( - cor0.col1 ) * - col1 FROM tab0 AS cor0
----
636056
753571
912673

query I rowsort
SELECT 59 * + col2 * col1 FROM tab2
----
38114
49383
90506

onlyif mysql # use DIV operator for integer division
query I rowsort label-3824
SELECT col1 + col2 DIV - 37 AS col1 FROM tab2 AS cor0
----
16
31
59

skipif mysql # not compatible
query I rowsort label-3824
SELECT col1 + col2 / - 37 AS col1 FROM tab2 AS cor0
----
16
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 * + col1 * - 29 + + cor0.col0 col1 FROM tab1 AS cor0
----
-19601
-2836
-4821

query I rowsort
SELECT - - 71 AS col0 FROM tab2 AS cor0
----
71
71
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - ( - col1 ) col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL + 32 FROM tab1, tab2 AS cor0, tab0 cor1
----
27 values hashing to cf4f01ac97eb83445b1721f3ae28961a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col0 FROM tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1
----
54
57
96

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 CROSS JOIN tab2, tab0 AS cor1, tab2 AS cor2, tab2 AS cor3
----
3645 values hashing to 489dc4a89dc53914f025e2426f93a929

query I rowsort
SELECT DISTINCT - + col2 * + cor0.col2 AS col0 FROM tab1 AS cor0
----
-2916
-3249
-9216

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3832
SELECT col0 * CAST( col0 AS SIGNED ) FROM tab0 AS cor0
----
1225
576
7921

skipif mysql # not compatible
query I rowsort label-3832
SELECT col0 * CAST ( col0 AS INTEGER ) FROM tab0 AS cor0
----
1225
576
7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 + 14 col0 FROM tab2 AS cor0
----
-64
-65
7

query I rowsort
SELECT DISTINCT - cor0.col1 * 89 + - 45 FROM tab1 AS cor0
----
-1202
-2359
-935

onlyif mysql # use DIV operator for integer division
query I rowsort label-3835
SELECT ALL + - col2 DIV - 86 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3835
SELECT ALL + - col2 / - 86 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT DISTINCT - col1 * - ( ( col1 ) ) FROM tab0 cor0
----
7396
8281
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-3837
SELECT DISTINCT + col2 DIV - col0 + - 34 * - col0 * - ( col1 * col2 ) AS col2 FROM tab1 AS cor0
----
-1240320
-143226
-3394561

skipif mysql # not compatible
query I rowsort label-3837
SELECT DISTINCT + col2 / - col0 + - 34 * - col0 * - ( col1 * col2 ) AS col2 FROM tab1 AS cor0
----
-1240320
-143226
-3394561

onlyif mysql # use DIV operator for integer division
query I rowsort label-3838
SELECT - + 98 DIV 24 + col0 + col0 AS col1 FROM tab1 AS cor0
----
124
156
2

skipif mysql # not compatible
query I rowsort label-3838
SELECT - + 98 / 24 + col0 + col0 AS col1 FROM tab1 AS cor0
----
124
156
2

query I rowsort
SELECT + col2 * col2 - + col1 AS col1 FROM tab0 AS cor0
----
-96
1003
6633

query I rowsort
SELECT - - ( col1 ) * + col1 AS col1 FROM tab1 AS cor0
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-3841
SELECT DISTINCT + 95 DIV 99 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-3841
SELECT DISTINCT + 95 / 99 FROM tab1 AS cor0
----
0

query I rowsort
SELECT + col2 - 34 AS col1 FROM tab0 AS cor0
----
-1
-33
48

query I rowsort
SELECT + col1 - col0 * + cor0.col1 * + 83 FROM tab1 AS cor0
----
-53110
-6448
-86307

onlyif mysql # use DIV operator for integer division
query I rowsort label-3844
SELECT col2 DIV - col1 + cor0.col1 * + col0 AS col0 FROM tab2 AS cor0
----
1341
217
4602

skipif mysql # not compatible
query I rowsort label-3844
SELECT col2 / - col1 + cor0.col1 * + col0 AS col0 FROM tab2 AS cor0
----
1341
217
4602

query I rowsort
SELECT DISTINCT + cor0.col1 * + col0 - - col1 AS col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT - col2 * - ( cor0.col1 ) + + col2 FROM tab0 cor0
----
2871
7544
98

query I rowsort
SELECT DISTINCT col2 * + col0 + 10 FROM tab2 AS cor0
----
199
2038
3012

query I rowsort
SELECT DISTINCT col2 - + col1 AS col1 FROM tab1 AS cor0
----
28
47
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3849
SELECT - col0 + CAST( NULL AS DECIMAL ) * cor0.col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3849
SELECT - col0 + CAST ( NULL AS REAL ) * cor0.col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3850
SELECT ALL - col1 * - CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3850
SELECT ALL - col1 * - CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3851
SELECT ALL - - col1 DIV - ( - 38 + cor0.col0 ) FROM tab0 AS cor0
----
-1
32
6

skipif mysql # not compatible
query I rowsort label-3851
SELECT ALL - - col1 / - ( - 38 + cor0.col0 ) FROM tab0 AS cor0
----
-1
32
6

query I rowsort
SELECT + col1 * col1 * + col2 + col1 FROM tab2 AS cor0
----
10999
25978
90565

onlyif mysql # use DIV operator for integer division
query I rowsort label-3853
SELECT ALL + + col2 + cor0.col2 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-3853
SELECT ALL + + col2 + cor0.col2 / + cor0.col1 col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT - - col2 * + col1 + + col0 AS col1 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT 81 * col0 AS col0 FROM tab0
----
1944
2835
7209

query I rowsort
SELECT + + tab0.col1 AS col0 FROM tab0, tab1, tab2 AS cor0, tab2
----
81 values hashing to 8c9db501a604ea66e3b5e5598f3f2a91

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

query I rowsort
SELECT ALL + - col1 + col0 AS col2 FROM tab2 cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT + + col2 * - cor0.col1 FROM tab2 AS cor0
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 * col1 col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL col0 * ( col1 + + col2 ) FROM tab0 AS cor0
----
15397
2856
3430

query I rowsort
SELECT DISTINCT + col2 + + 84 AS col1 FROM tab1 AS cor0
----
138
141
180

query I rowsort
SELECT ALL - + ( 71 ) + + col1 FROM tab1 AS cor0
----
-45
-58
-61

query I rowsort
SELECT ALL - col2 * 37 + tab1.col1 FROM tab1
----
-1972
-2099
-3539

query I rowsort
SELECT - cor0.col0 + - col0 AS col0 FROM tab1 cor0
----
-128
-160
-6

query I rowsort
SELECT 30 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 6c98840ed134c765d56389f4150075f0

query I rowsort
SELECT ALL 79 FROM tab1, tab0 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to da0116d31b8af0da9f685c090d378baf

query I rowsort
SELECT ALL cor0.col0 + + col2 * - col1 - + col0 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 99 col1 FROM tab1, tab1 AS cor0, tab0, tab0 AS cor1
----
81 values hashing to c841a8d826151b422ecdb71db0250739

query I rowsort
SELECT + 94 - - col1 * col2 AS col2 FROM tab2
----
1628
740
931

query I rowsort
SELECT col1 - - col1 AS col2 FROM tab0
----
172
182
194

query I rowsort
SELECT ALL + 0 * - tab1.col0 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT - ( + col2 ) + - col2 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT + - col2 * - col0 + ( col0 ) FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT + col2 * col1 + col0 FROM tab0 cor0
----
132
2862
7551

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 - + col2 col0 FROM tab2 AS cor0
----
-21
33
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-3877
SELECT col2 + + col0 DIV ( + tab0.col2 ) AS col2 FROM tab0
----
33
36
83

skipif mysql # not compatible
query I rowsort label-3877
SELECT col2 + + col0 / ( + tab0.col2 ) AS col2 FROM tab0
----
33
36
83

query I rowsort
SELECT 32 * - 92 FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to bfe0ab49f9b63fbefa41dd13fc1598e1

query I rowsort
SELECT - col1 + col2 AS col1 FROM tab1
----
28
47
83

query I rowsort
SELECT col2 + tab0.col1 * - 21 - + ( + col1 ) AS col0 FROM tab0
----
-1859
-1920
-2133

query I rowsort
SELECT DISTINCT + col0 + col1 * + col2 - col1 FROM tab2
----
1553
708
813

query I rowsort
SELECT DISTINCT + 62 * - tab0.col0 * 88 - col2 * col2 AS col2 FROM tab0
----
-132033
-190961
-492308

query I rowsort
SELECT - + col2 * - cor0.col1 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT - + ( - col2 ) * - col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL 20 * + cor0.col2 + - 60 * 19 FROM tab1 AS cor0
----
-60
0
780

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3886
SELECT + col1 + - col0 * CAST( - 28 AS SIGNED ) FROM tab1
----
110
1802
2253

skipif mysql # not compatible
query I rowsort label-3886
SELECT + col1 + - col0 * CAST ( - 28 AS INTEGER ) FROM tab1
----
110
1802
2253

query I rowsort
SELECT col1 * + 27 AS col1 FROM tab1
----
270
351
702

query I rowsort
SELECT col1 - - ( - col1 ) AS col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3889
SELECT DISTINCT + col0 * + CAST( NULL AS SIGNED ) * + col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3889
SELECT DISTINCT + col0 * + CAST ( NULL AS INTEGER ) * + col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + + col1 - - 62 AS col1 FROM tab1 cor0
----
72
75
88

query I rowsort
SELECT - col1 * + col2 + - col2 * col1 AS col2 FROM tab1 AS cor0
----
-1140
-2496
-2808

query I rowsort
SELECT cor0.col0 + col1 - - col0 FROM tab0 cor0
----
134
167
269

onlyif mysql # use DIV operator for integer division
query I rowsort label-3893
SELECT + + cor0.col1 + cor0.col1 DIV + col1 col2 FROM tab1 AS cor0
----
11
14
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3893
SELECT + + cor0.col1 + cor0.col1 / + col1 col2 FROM tab1 AS cor0
----
11
14
27

query I rowsort
SELECT + 70 * - col0 + col1 AS col1 FROM tab2 AS cor0
----
-459
-5401
-5513

query I rowsort
SELECT ALL tab0.col1 * - tab0.col0 * col1 FROM tab0
----
-177504
-329315
-737009

query I rowsort
SELECT 14 + cor0.col0 FROM tab1 AS cor0
----
17
78
94

query I rowsort
SELECT DISTINCT col2 + col1 AS col2 FROM tab1 cor0
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 - - col2 col1 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL 15 * col0 AS col2 FROM tab1 AS cor0
----
1200
45
960

query I rowsort
SELECT - cor0.col2 * 43 AS col2 FROM tab0 AS cor0
----
-1419
-3526
-43

query I rowsort
SELECT + + 39 + cor0.col0 FROM tab1 AS cor0
----
103
119
42

query I rowsort
SELECT ALL + + 0 + + col1 * ( col1 ) FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT DISTINCT cor0.col1 + col2 * + col0 * + col2 FROM tab2 AS cor0
----
114093
5134
52787

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 47 * cor0.col2 col2 FROM tab0 AS cor0
----
-1551
-3854
-47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 21 col2 FROM tab1 AS cor0
----
21
21
21

query I rowsort
SELECT ALL + cor0.col1 + col1 * col0 AS col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT ALL ( 11 * + col1 ) AS col2 FROM tab1
----
110
143
286

query I rowsort
SELECT col1 * 82 + + col1 AS col2 FROM tab2
----
1411
2573
4897

query I rowsort
SELECT DISTINCT + + 32 + + col0 * + 86 AS col1 FROM tab1 AS cor0
----
290
5536
6912

onlyif mysql # use DIV operator for integer division
query I rowsort label-3910
SELECT DISTINCT - + col2 DIV col1 + col1 * col2 FROM tab1 AS cor0
----
1241
1402
565

skipif mysql # not compatible
query I rowsort label-3910
SELECT DISTINCT - + col2 / col1 + col1 * col2 FROM tab1 AS cor0
----
1241
1402
565

query I rowsort
SELECT 23 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 546d49aa433406dd83ea19885588e658

query I rowsort
SELECT + - col0 + + col2 * - col0 FROM tab1 AS cor0
----
-165
-3712
-7760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3913
SELECT DISTINCT cor0.col0 + CAST( NULL AS DECIMAL ) * - 1 AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3913
SELECT DISTINCT cor0.col0 + CAST ( NULL AS REAL ) * - 1 AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL - col1 * + ( col1 ) FROM tab1
----
-100
-169
-676

query I rowsort
SELECT DISTINCT + 39 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
39

query I rowsort
SELECT ALL + cor0.col1 * ( ( col2 ) * + 86 ) + 79 * - cor0.col1 * col2 AS col1 FROM tab1 AS cor0
----
3990
8736
9828

query I rowsort
SELECT ALL col0 + - col0 * 61 AS col2 FROM tab0 cor0
----
-1440
-2100
-5340

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3918
SELECT ALL + col1 - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3918
SELECT ALL + col1 - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 + + 16 AS col1 FROM tab0 cor0
----
102
107
113

query I rowsort
SELECT ALL col2 * + col1 + - col2 * + cor0.col0 FROM tab0 AS cor0
----
164
2046
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-3921
SELECT ALL + - col2 DIV - col0 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3921
SELECT ALL + - col2 / - col0 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT + - col1 * - 10 + ( - col2 ) FROM tab2 AS cor0
----
132
283
564

query I rowsort
SELECT cor0.col1 * + 19 + - col2 AS col0 FROM tab0 AS cor0
----
1601
1647
1842

query I rowsort
SELECT + 95 + - col2 FROM tab1 cor0
----
-1
38
41

query I rowsort
SELECT ALL - 93 * + col1 AS col1 FROM tab1 AS cor0
----
-1209
-2418
-930

query I rowsort
SELECT + - 46 + col1 FROM tab1 AS cor0
----
-20
-33
-36

query I rowsort
SELECT DISTINCT - + col0 * 86 * col2 FROM tab2 AS cor0
----
-16254
-174408
-258172

query I rowsort
SELECT 34 * - col2 AS col1 FROM tab1 cor0
----
-1836
-1938
-3264

query I rowsort
SELECT DISTINCT - ( - col0 ) * col1 + col2 AS col1 FROM tab0 cor0
----
2097
3396
8181

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - ( - col0 ) * - col0 col1 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT ALL - tab0.col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 9 col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 03b93b53107e36cf7d524e48c509b17b

query I rowsort
SELECT ( + 56 ) FROM tab0 AS cor0
----
56
56
56

query I rowsort
SELECT - col0 * - col1 - + 30 FROM tab0
----
2034
3365
8069

query I rowsort
SELECT col2 + 56 AS col1 FROM tab1
----
110
113
152

query I rowsort
SELECT DISTINCT - col1 + col2 * + col2 FROM tab1
----
2890
3239
9203

onlyif mysql # use DIV operator for integer division
query I rowsort label-3937
SELECT - col1 DIV col2 + + CAST( col1 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
0
84
90

skipif mysql # not compatible
query I rowsort label-3937
SELECT - col1 / col2 + + CAST ( col1 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
0
84
90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3938
SELECT col1 * - col2 - CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3938
SELECT col1 * - col2 - CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 * - col2 * ( 50 ) + col0 AS col1 FROM tab2 AS cor0
----
32379
41857
76778

query I rowsort
SELECT DISTINCT - - 86 + - col0 AS col1 FROM tab0 AS cor0
----
-3
51
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-3941
SELECT ALL 47 DIV col1 - CAST( col0 AS SIGNED ) FROM tab0 cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-3941
SELECT ALL 47 / col1 - CAST ( col0 AS INTEGER ) FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT + 45 + col0 - ( + col2 ) FROM tab2 AS cor0
----
25
86
97

query I rowsort
SELECT ALL + 11 AS col2 FROM tab2 cor0
----
11
11
11

query I rowsort
SELECT - + col1 * + col2 - + col0 * - col0 FROM tab2 AS cor0
----
-788
4550
5595

query I rowsort
SELECT ALL 95 + - col1 AS col2 FROM tab0 AS cor0
----
-2
4
9

query I rowsort
SELECT DISTINCT - 53 + col0 FROM tab2 AS cor0
----
-46
25
26

query I rowsort
SELECT DISTINCT + cor0.col1 * + col0 + - col2 + col1 FROM tab0 AS cor0
----
2117
3491
8108

query I rowsort
SELECT DISTINCT - - 55 AS col1 FROM tab0 AS cor0
----
55

query I rowsort
SELECT ALL 37 + + col0 * cor0.col1 + 78 * col2 AS col1 FROM tab1 AS cor0
----
4327
5123
8565

query I rowsort
SELECT + col1 * cor0.col1 + cor0.col1 AS col1 FROM tab2 AS cor0
----
306
3540
992

query I rowsort
SELECT ALL + + 23 * col2 FROM tab2 AS cor0
----
598
621
874

onlyif mysql # use DIV operator for integer division
query I rowsort label-3952
SELECT 74 DIV + cor0.col2 - 20 FROM tab0 AS cor0
----
-18
-20
54

skipif mysql # not compatible
query I rowsort label-3952
SELECT 74 / + cor0.col2 - 20 FROM tab0 AS cor0
----
-18
-20
54

query I rowsort
SELECT + col0 + col2 * 92 FROM tab0 AS cor0
----
127
3060
7633

query I rowsort
SELECT 59 - col2 FROM tab2
----
21
32
33

query I rowsort
SELECT DISTINCT 43 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
43

query I rowsort
SELECT + col2 + - col2 * + col1 FROM tab0
----
-2805
-7380
-96

query I rowsort
SELECT ALL 73 + + tab0.col2 FROM tab0
----
106
155
74

query I rowsort
SELECT DISTINCT - col0 * col2 + + col1 * - col1 * col1 + - 91 AS col2 FROM tab2 AS cor0
----
-207498
-30071
-8006

query I rowsort
SELECT ( - cor1.col1 ) AS col1 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3960
SELECT - cor0.col0 - CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3960
SELECT - cor0.col0 - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 * - col0 * col0 FROM tab2 AS cor0
----
-1323
-158184
-237158

query I rowsort
SELECT - col1 * - cor0.col2 + 94 AS col1 FROM tab2 AS cor0
----
1628
740
931

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 - col0 col0 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT col2 + + 46 AS col0 FROM tab2 AS cor0
----
72
73
84

query I rowsort
SELECT - col1 + + 91 * col1 AS col0 FROM tab1 AS cor0
----
1170
2340
900

onlyif mysql # use DIV operator for integer division
query I rowsort label-3966
SELECT + 34 * tab1.col1 DIV col1 AS col0 FROM tab1
----
34
34
34

skipif mysql # not compatible
query I rowsort label-3966
SELECT + 34 * tab1.col1 / col1 AS col0 FROM tab1
----
34
34
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3967
SELECT + col1 + - tab1.col2 + - CAST( NULL AS SIGNED ) * - tab1.col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3967
SELECT + col1 + - tab1.col2 + - CAST ( NULL AS INTEGER ) * - tab1.col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 + - col1 + col1 FROM tab2
----
17
31
59

query I rowsort
SELECT DISTINCT ( col0 ) * col2 + - col1 FROM tab1
----
136
3638
7667

query I rowsort
SELECT col2 * 78 AS col1 FROM tab0
----
2574
6396
78

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 cor1
----
7
78
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3972
SELECT - - col1 * ( 96 ) * col0 + + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3972
SELECT - - col1 * ( 96 ) * col0 + + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3973
SELECT col0 DIV col1 + + col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-3973
SELECT col0 / col1 + + col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT col2 + + 2 * col1 FROM tab2 AS cor0
----
144
72
89

query I rowsort
SELECT - - 34 FROM tab1, tab1 AS cor0, tab0, tab2 AS cor1
----
81 values hashing to 6cda47a564e8ee9e9e7915815a3a7769

query I rowsort
SELECT DISTINCT + col1 + - col0 * col1 FROM tab2 AS cor0
----
-1326
-186
-4543

onlyif mysql # use DIV operator for integer division
query I rowsort label-3977
SELECT DISTINCT - col1 DIV + tab2.col1 FROM tab2
----
-1

skipif mysql # not compatible
query I rowsort label-3977
SELECT DISTINCT - col1 / + tab2.col1 FROM tab2
----
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3978
SELECT + CAST( col2 AS SIGNED ) * + col0 FROM tab0 cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-3978
SELECT + CAST ( col2 AS INTEGER ) * + col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT ALL + col0 * ( - col1 ) AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL 69 * - col1 AS col1 FROM tab0 AS cor0
----
-5934
-6279
-6693

query I rowsort
SELECT 97 * + cor0.col1 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 3de22032ab19e2a75816e7b35c94b9a2

query I rowsort
SELECT ALL 32 AS col2 FROM tab1
----
32
32
32

query I rowsort
SELECT ALL + tab2.col0 * - col2 AS col2 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT - col2 - col0 * - col1 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT - 3 + - col2 FROM tab0 AS cor0
----
-36
-4
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-3986
SELECT DISTINCT + 41 DIV col0 col2 FROM tab2 AS cor0
----
0
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3986
SELECT DISTINCT + 41 / col0 col2 FROM tab2 AS cor0
----
0
5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3987
SELECT DISTINCT CAST( col0 AS SIGNED ) * + col1 FROM tab0 cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-3987
SELECT DISTINCT CAST ( col0 AS INTEGER ) * + col1 FROM tab0 cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-3988
SELECT ALL 68 DIV - 55 + col2 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-3988
SELECT ALL 68 / - 55 + col2 FROM tab0 AS cor0
----
0
32
81

query I rowsort
SELECT DISTINCT col1 * - col2 * cor0.col1 + + col2 FROM tab2 AS cor0
----
-10944
-25920
-90480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 32 * + col0 + + col1 col2 FROM tab0 AS cor0
----
1217
2939
854

query I rowsort
SELECT col1 + - 27 * - col0 AS col1 FROM tab2 AS cor0
----
2150
2165
220

query I rowsort
SELECT ALL ( cor0.col2 ) * + col1 + col1 FROM tab0 cor0
----
194
2924
7553

query I rowsort
SELECT ALL - 7 * 47 FROM tab1, tab1 AS cor0
----
9 values hashing to 8541d28541d211054a0bad8d8836ab37

query I rowsort
SELECT ALL cor0.col2 + - col1 AS col0 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT + col1 * col1 * + col1 + - col2 AS col0 FROM tab2 AS cor0
----
205353
29764
4875

query I rowsort
SELECT DISTINCT + ( - col0 ) + - 29 * + 55 AS col2 FROM tab0 AS cor0
----
-1619
-1630
-1684

query I rowsort
SELECT DISTINCT - + ( + col1 ) AS col0 FROM tab0 AS cor0
----
-86
-91
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3998
SELECT + col2 * - col1 + + CAST( NULL AS SIGNED ) + + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3998
SELECT + col2 * - col1 + + CAST ( NULL AS INTEGER ) + + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 + - col2 + + 6 FROM tab0 AS cor0
----
-3
13
40

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4000
SELECT + CAST( NULL AS SIGNED ) AS col1 FROM tab2, tab2 AS cor0 CROSS JOIN tab1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-4000
SELECT + CAST ( NULL AS INTEGER ) AS col1 FROM tab2, tab2 AS cor0 CROSS JOIN tab1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT + col0 + - 56 FROM tab2 AS cor0
----
-49
22
23

query I rowsort
SELECT ALL - 42 FROM tab1
----
-42
-42
-42

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col0 FROM tab0, tab2, tab2 cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT + col1 + + ( col1 ) FROM tab1 cor0
----
20
26
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - ( - col0 ) * - col0 col2 FROM tab2
----
-42
-6006
-6162

query I rowsort
SELECT DISTINCT + + col2 * - col1 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + 25 * col2 AS col1 FROM tab1 AS cor0
----
1350
1425
2400

query I rowsort
SELECT - cor0.col1 + - col2 * - col1 FROM tab1 AS cor0
----
1235
1378
560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 * col0 col1 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-4011
SELECT DISTINCT - col0 DIV 49 AS col1 FROM tab2
----
-1
0

skipif mysql # not compatible
query I rowsort label-4011
SELECT DISTINCT - col0 / 49 AS col1 FROM tab2
----
-1
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4012
SELECT - tab0.col0 * - CAST( + col2 AS SIGNED ) + - col1 FROM tab0
----
-62
706
7207

skipif mysql # not compatible
query I rowsort label-4012
SELECT - tab0.col0 * - CAST ( + col2 AS INTEGER ) + - col1 FROM tab0
----
-62
706
7207

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4013
SELECT + col0 + + CAST( NULL AS SIGNED ) * col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4013
SELECT + col0 + + CAST ( NULL AS INTEGER ) * col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 65 AS col2 FROM tab2, tab0 AS cor0
----
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col1 col2 FROM tab0, tab2, tab1 AS cor0, tab1
----
86
91
97

query I rowsort
SELECT + col2 * + ( col2 ) AS col0 FROM tab2 cor0
----
1444
676
729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 * - 57 * col2 col0 FROM tab1 AS cor0
----
-207936
-437760
-9234

query I rowsort
SELECT - col1 * + cor0.col2 * cor0.col2 FROM tab2 AS cor0
----
-22599
-24548
-39884

onlyif mysql # use DIV operator for integer division
query I rowsort label-4019
SELECT DISTINCT col0 + 7 DIV col2 AS col1 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-4019
SELECT DISTINCT col0 + 7 / col2 AS col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab0, tab0 cor0
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4021
SELECT - CAST( NULL AS SIGNED ) * 24 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4021
SELECT - CAST ( NULL AS INTEGER ) * 24 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4022
SELECT - CAST( NULL AS SIGNED ) + - ( col0 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4022
SELECT - CAST ( NULL AS INTEGER ) + - ( col0 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 * - 25 FROM tab2 AS cor0
----
1475
425
775

query I rowsort
SELECT DISTINCT - col2 + ( + col0 ) * + cor0.col2 AS col1 FROM tab2 AS cor0
----
162
2002
2964

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * tab2.col2 * tab2.col1 col0 FROM tab2
----
-10982
-25947
-90506

query I rowsort
SELECT ALL + 21 * col1 * col1 FROM tab1
----
14196
2100
3549

query I rowsort
SELECT - col1 - + col1 AS col2 FROM tab1
----
-20
-26
-52

query I rowsort
SELECT cor0.col2 AS col0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4029
SELECT ALL - CAST( NULL AS DECIMAL ) AS col2 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-4029
SELECT ALL - CAST ( NULL AS REAL ) AS col2 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT - tab0.col0 FROM tab0, tab2 AS cor0
----
-24
-35
-89

query I rowsort
SELECT + tab0.col2 + - col2 + col2 AS col1 FROM tab0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + col0 col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ALL col0 + - ( col0 ) FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - col0 * 4 * col0 AS col0 FROM tab1 cor0
----
-16384
-25600
-36

query I rowsort
SELECT - col1 * - ( col0 ) AS col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL col0 + + col1 * + col2 * col0 FROM tab1 AS cor0
----
36544
4215
99920

query I rowsort
SELECT DISTINCT + + col1 + - col2 AS col1 FROM tab1 AS cor0
----
-28
-47
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-4038
SELECT col2 DIV - col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4038
SELECT col2 / - col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + col0 * + ( - col1 ) * + col2 AS col2 FROM tab0 AS cor0
----
-3395
-664118
-68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-4040
SELECT + + col0 DIV col1 + - col1 AS col2 FROM tab1 cor0
----
-26
-4
-7

skipif mysql # not compatible
query I rowsort label-4040
SELECT + + col0 / col1 + - col1 AS col2 FROM tab1 cor0
----
-26
-4
-7

query I rowsort
SELECT DISTINCT + col2 + + ( - 68 ) FROM tab1 AS cor0
----
-11
-14
28

query I rowsort
SELECT - + col0 * - 94 + cor0.col2 FROM tab2 AS cor0
----
685
7358
7464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * cor0.col0 col2 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL col1 + + col0 + + col0 * col0 AS col0 FROM tab1
----
38
4170
6493

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT - col0 * col2 * col0 + + tab1.col0 AS col0 FROM tab1
----
-233408
-483
-614320

onlyif mysql # use DIV operator for integer division
query I rowsort label-4047
SELECT ALL - col1 * - col2 + + tab0.col2 DIV + col0 AS col1 FROM tab0
----
2839
7462
97

skipif mysql # not compatible
query I rowsort label-4047
SELECT ALL - col1 * - col2 + + tab0.col2 / + col0 AS col1 FROM tab0
----
2839
7462
97

query I rowsort
SELECT - col2 * col0 + - col1 FROM tab1
----
-188
-3658
-7693

query I rowsort
SELECT + tab2.col1 * - col2 + col1 FROM tab2
----
-1475
-629
-806

query I rowsort
SELECT + col0 * col0 + - col1 FROM tab0 AS cor0
----
1128
490
7830

onlyif mysql # use DIV operator for integer division
query I rowsort label-4051
SELECT col2 + + col1 DIV col0 FROM tab2 AS cor0
----
26
31
38

skipif mysql # not compatible
query I rowsort label-4051
SELECT col2 + + col1 / col0 FROM tab2 AS cor0
----
26
31
38

query I rowsort
SELECT ALL col0 * - col0 * col1 FROM tab2 AS cor0
----
-106097
-1519
-358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-4053
SELECT DISTINCT col2 DIV col0 AS col2 FROM tab1
----
0
1
18

skipif mysql # not compatible
query I rowsort label-4053
SELECT DISTINCT col2 / col0 AS col2 FROM tab1
----
0
1
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-4054
SELECT DISTINCT tab1.col0 DIV + col2 col0 FROM tab1
----
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4054
SELECT DISTINCT tab1.col0 / + col2 col0 FROM tab1
----
0
1

query I rowsort
SELECT ALL col0 * - col0 * tab2.col1 AS col0 FROM tab2
----
-106097
-1519
-358956

query I rowsort
SELECT cor0.col1 FROM tab0, tab1, tab2 cor0
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT ALL col0 * col2 + - col2 AS col0 FROM tab1 cor0
----
108
3591
7584

query I rowsort
SELECT ALL + cor0.col2 * col2 AS col2 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT ALL col0 * - col1 + col2 AS col1 FROM tab1 AS cor0
----
-24
-583
-944

onlyif mysql # use DIV operator for integer division
query I rowsort label-4060
SELECT DISTINCT col2 * cor0.col2 DIV - col0 AS col1 FROM tab0 AS cor0
----
-45
-75
0

skipif mysql # not compatible
query I rowsort label-4060
SELECT DISTINCT col2 * cor0.col2 / - col0 AS col1 FROM tab0 AS cor0
----
-45
-75
0

query I rowsort
SELECT + + cor0.col1 * + col2 + cor0.col1 AS col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT DISTINCT + cor0.col2 + col0 * col2 AS col1 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT col1 * - col2 + + col0 AS col0 FROM tab0 AS cor0
----
-2814
-62
-7373

onlyif mysql # use DIV operator for integer division
query I rowsort label-4064
SELECT DISTINCT - col2 DIV + col0 AS col0 FROM tab0
----
-1
0

skipif mysql # not compatible
query I rowsort label-4064
SELECT DISTINCT - col2 / + col0 AS col0 FROM tab0
----
-1
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4065
SELECT ALL CAST( NULL AS SIGNED ) FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-4065
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL + 89 * tab1.col0 AS col0 FROM tab1
----
267
5696
7120

query I rowsort
SELECT 61 * - col0 FROM tab2 AS cor0
----
-427
-4758
-4819

query I rowsort
SELECT - col2 * + col0 + col1 FROM tab2 AS cor0
----
-158
-1969
-2985

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4069
SELECT - - col0 * CAST( NULL AS SIGNED ) col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4069
SELECT - - col0 * CAST ( NULL AS INTEGER ) col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col1 - 41 AS col0 FROM tab1 AS cor0
----
-51
-54
-67

onlyif mysql # use DIV operator for integer division
query I rowsort label-4071
SELECT - col1 + + cor0.col2 DIV - ( col1 ) AS col1 FROM tab2 AS cor0
----
-19
-31
-59

skipif mysql # not compatible
query I rowsort label-4071
SELECT - col1 + + cor0.col2 / - ( col1 ) AS col1 FROM tab2 AS cor0
----
-19
-31
-59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4072
SELECT - + col1 + CAST( - col0 AS SIGNED ) FROM tab0 AS cor0
----
-110
-132
-180

skipif mysql # not compatible
query I rowsort label-4072
SELECT - + col1 + CAST ( - col0 AS INTEGER ) FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT + - col2 + col1 AS col0 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT 33 * + col0 AS col2 FROM tab0
----
1155
2937
792

query I rowsort
SELECT ALL 25 * col0 AS col0 FROM tab0
----
2225
600
875

query I rowsort
SELECT + cor1.col1 AS col0 FROM tab1, tab0, tab2 AS cor0, tab0 AS cor1
----
81 values hashing to 8c9db501a604ea66e3b5e5598f3f2a91

query I rowsort
SELECT - 40 AS col0 FROM tab1
----
-40
-40
-40

query I rowsort
SELECT DISTINCT - tab0.col0 + - col0 * col1 FROM tab0
----
-2088
-3430
-8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-4079
SELECT + col1 - col0 DIV col0 AS col2 FROM tab2
----
16
30
58

skipif mysql # not compatible
query I rowsort label-4079
SELECT + col1 - col0 / col0 AS col2 FROM tab2
----
16
30
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-4080
SELECT ALL - col2 DIV + col0 - + col1 col1 FROM tab0
----
-87
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4080
SELECT ALL - col2 / + col0 - + col1 col1 FROM tab0
----
-87
-91
-97

query I rowsort
SELECT ALL tab0.col2 * - col0 + + col1 FROM tab0
----
-706
-7207
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col2 - col1 col1 FROM tab2 WHERE ( NULL ) NOT BETWEEN ( NULL ) AND ( NULL )
----

query III rowsort
SELECT * FROM tab2 WHERE ( - col0 + col1 ) IN ( + col0 * col1 )
----

query I rowsort
SELECT ALL - col0 * col0 + - col2 AS col1 FROM tab0
----
-1226
-609
-8003

query I rowsort
SELECT col2 * + tab1.col1 FROM tab1 WHERE col0 >= NULL
----

query I rowsort
SELECT + col1 * + col2 * tab2.col1 AS col2 FROM tab2 WHERE NOT col1 IN ( col0 * - tab2.col0 * col1 + col0 * tab2.col2 )
----
10982
25947
90506

query III rowsort
SELECT * FROM tab2 WHERE NOT col2 <= - col2 + col2 * + col0
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4088
SELECT DISTINCT + col0 DIV col2 + + tab0.col1 AS col2 FROM tab0
----
132
86
92

skipif mysql # not compatible
query I rowsort label-4088
SELECT DISTINCT + col0 / col2 + + tab0.col1 AS col2 FROM tab0
----
132
86
92

query I rowsort
SELECT DISTINCT col2 * + col1 AS col1 FROM tab1 WHERE NOT ( NULL ) > ( NULL )
----

query I rowsort
SELECT + tab1.col2 + + col0 - col0 FROM tab1
----
54
57
96

query III rowsort
SELECT * FROM tab0 WHERE NULL BETWEEN NULL AND ( col2 - col1 )
----

query I rowsort
SELECT DISTINCT tab0.col1 * - col0 + - col2 FROM tab0
----
-2097
-3396
-8181

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - tab1.col1 col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT col0 AS col1 FROM tab1 WHERE NOT NULL BETWEEN NULL AND NULL
----

query I rowsort
SELECT col0 + + col0 * - col1 FROM tab0 WHERE NOT NULL <> - col2 + col1
----

query I rowsort
SELECT - tab2.col1 + + col0 * - col1 FROM tab2
----
-1360
-248
-4661

query I rowsort
SELECT ALL col0 * col0 * col0 + col2 FROM tab0
----
13857
42876
705051

query I rowsort
SELECT DISTINCT col1 + col2 * col1 AS col1 FROM tab2
----
1593
663
868

query I rowsort
SELECT ALL + col1 AS col1 FROM tab1 WHERE NOT NULL > - col2 + + col2
----

query I rowsort
SELECT col1 + - col0 * col2 FROM tab2
----
-158
-1969
-2985

onlyif mysql # use DIV operator for integer division
query I rowsort label-4101
SELECT ALL - col2 DIV col0 + + col2 * - col2 * + col0 FROM tab2
----
-114076
-5106
-52728

skipif mysql # not compatible
query I rowsort label-4101
SELECT ALL - col2 / col0 + + col2 * - col2 * + col0 FROM tab2
----
-114076
-5106
-52728

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4102
SELECT DISTINCT tab2.col0 * + CAST( NULL AS SIGNED ) AS col1 FROM tab2, tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4102
SELECT DISTINCT tab2.col0 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab2, tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + 36 * col0 FROM tab0
----
1260
3204
864

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4104
SELECT + tab2.col1 * - col1 - CAST( NULL AS DECIMAL ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4104
SELECT + tab2.col1 * - col1 - CAST ( NULL AS REAL ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 8 AS col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 33069adc3c1142d31511ec88fcfa40af

query I rowsort
SELECT + 94 AS col2 FROM tab2
----
94
94
94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4107
SELECT + + cor0.col2 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4107
SELECT + + cor0.col2 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - tab2.col0 * col1 - col1 AS col2 FROM tab2
----
-1360
-248
-4661

query I rowsort
SELECT + col2 + ( cor0.col0 ) * cor0.col2 * col0 AS col1 FROM tab0 AS cor0
----
1226
19041
649604

query I rowsort
SELECT DISTINCT - col1 + + col0 + col2 AS col0 FROM tab1 AS cor0
----
111
163
31

query I rowsort
SELECT DISTINCT - col0 + - col1 * - 71 AS col2 FROM tab2 AS cor0
----
1128
2194
4111

query I rowsort
SELECT DISTINCT + cor0.col2 + ( col0 ) + - col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT - col2 * 32 + 40 FROM tab1 AS cor0
----
-1688
-1784
-3032

query I rowsort
SELECT ALL cor0.col2 - col0 AS col1 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT col1 * + 10 * + col1 AS col2 FROM tab2 AS cor0
----
2890
34810
9610

query I rowsort
SELECT ALL col1 * ( col1 * + col1 ) AS col2 FROM tab0 AS cor0
----
636056
753571
912673

query I rowsort
SELECT ( - col1 ) * col1 AS col0 FROM tab0
----
-7396
-8281
-9409

query I rowsort
SELECT - + ( - cor0.col0 ) + - col0 AS col2 FROM tab1 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4119
SELECT ALL + col1 DIV + cor0.col2 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-4119
SELECT ALL + col1 / + cor0.col2 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT - - col1 * - cor0.col0 + col2 AS col2 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT DISTINCT - ( col1 ) * 90 FROM tab2 cor0
----
-1530
-2790
-5310

query I rowsort
SELECT ALL + col2 + cor0.col1 AS col0 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT + 36 * col0 FROM tab2 AS cor0
----
252
2808
2844

onlyif mysql # use DIV operator for integer division
query I rowsort label-4124
SELECT - + col1 DIV col0 FROM tab0 cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-4124
SELECT - + col1 / col0 FROM tab0 cor0
----
-1
-2
-3

query I rowsort
SELECT DISTINCT 13 * - col1 FROM tab2 AS cor0
----
-221
-403
-767

query I rowsort
SELECT ALL - col0 * + col2 * + col2 AS col0 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT DISTINCT + + col2 * - col2 + col0 * - col0 AS col0 FROM tab1 AS cor0
----
-15616
-2925
-7345

onlyif mysql # use DIV operator for integer division
query I rowsort label-4128
SELECT DISTINCT - + 39 + col1 DIV cor0.col2 FROM tab0 AS cor0
----
-37
-38
58

skipif mysql # not compatible
query I rowsort label-4128
SELECT DISTINCT - + 39 + col1 / cor0.col2 FROM tab0 AS cor0
----
-37
-38
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-4129
SELECT ALL cor0.col2 DIV + col0 AS col1 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-4129
SELECT ALL cor0.col2 / + col0 AS col1 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT DISTINCT - col0 + + col2 AS col2 FROM tab1 cor0
----
-7
16
51

query I rowsort
SELECT - col2 * - col1 + col1 AS col2 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT DISTINCT ( cor0.col1 ) AS col1 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4133
SELECT 19 DIV + cor0.col2 AS col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4133
SELECT 19 / + cor0.col2 AS col0 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 98 + - cor0.col2 * - col2 col1 FROM tab1 AS cor0
----
3014
3347
9314

onlyif mysql # use DIV operator for integer division
query I rowsort label-4135
SELECT ALL - col1 DIV + col0 - + col0 AS col1 FROM tab2 AS cor0
----
-11
-78
-79

skipif mysql # not compatible
query I rowsort label-4135
SELECT ALL - col1 / + col0 - + col0 AS col1 FROM tab2 AS cor0
----
-11
-78
-79

query I rowsort
SELECT ALL + + cor0.col2 * + col2 AS col0 FROM tab1 AS cor0
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-4137
SELECT ALL col2 DIV + col2 + col2 * + tab1.col1 FROM tab1
----
1249
1405
571

skipif mysql # not compatible
query I rowsort label-4137
SELECT ALL col2 / + col2 + col2 * + tab1.col1 FROM tab1
----
1249
1405
571

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 81 + - col0 col2 FROM tab2
----
-159
-160
-88

query I rowsort
SELECT + 64 * col1 AS col1 FROM tab2 cor0
----
1088
1984
3776

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 60 + - col1 col2 FROM tab1 cor0
----
34
47
50

onlyif mysql # use DIV operator for integer division
query I rowsort label-4141
SELECT ALL + 33 DIV - col0 + col2 * - col2 FROM tab0 AS cor0
----
-1
-1090
-6724

skipif mysql # not compatible
query I rowsort label-4141
SELECT ALL + 33 / - col0 + col2 * - col2 FROM tab0 AS cor0
----
-1
-1090
-6724

query I rowsort
SELECT ALL 59 * + col2 - col0 AS col2 FROM tab2 AS cor0
----
1456
1586
2163

query I rowsort
SELECT col0 + - col0 * col0 AS col0 FROM tab1 AS cor0
----
-4032
-6
-6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-4144
SELECT DISTINCT + col0 DIV + cor0.col0 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-4144
SELECT DISTINCT + col0 / + cor0.col0 FROM tab0 AS cor0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 + - cor0.col0 col0 FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT - col2 * + col2 + + col0 * col2 AS col1 FROM tab1 AS cor0
----
-1536
-2754
399

query I rowsort
SELECT DISTINCT + col0 + - col2 * - col1 * - col1 AS col1 FROM tab1 AS cor0
----
-16144
-36501
-5636

query I rowsort
SELECT ( ( + col0 ) ) - col1 * col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT - ( col1 ) + col0 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT - col0 + 49 + + col2 FROM tab0 AS cor0
----
15
42
58

query I rowsort
SELECT DISTINCT tab2.col2 - + col0 FROM tab2
----
-41
-52
20

query I rowsort
SELECT col2 + ( col0 ) FROM tab2
----
104
117
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col2 col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 - tab2.col1 col1 FROM tab2
----
-137
-38
-96

query I rowsort
SELECT + col2 * ( - col0 ) + tab0.col2 + tab0.col1 * - col2 FROM tab0
----
-131
-14678
-3597

query I rowsort
SELECT - ( 69 ) + - col0 + col2 FROM tab1
----
-18
-53
-76

query I rowsort
SELECT DISTINCT + tab0.col2 * ( + col1 ) + - col1 * tab0.col1 AS col2 FROM tab0
----
-4558
-819
-9312

query I rowsort
SELECT DISTINCT - 81 + + col0 AS col2 FROM tab2
----
-2
-3
-74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + col2 * - col0 * + col2 col0 FROM tab1
----
-207926
-737267
-8722

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4160
SELECT CAST( col1 AS SIGNED ) * col2 FROM tab0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-4160
SELECT CAST ( col1 AS INTEGER ) * col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT + col0 - 79 AS col0 FROM tab1
----
-15
-76
1

query I rowsort
SELECT ALL col2 * col0 + col2 AS col1 FROM tab0
----
36
7380
825

query I rowsort
SELECT DISTINCT - tab1.col1 + 12 AS col0 FROM tab1
----
-1
-14
2

query I rowsort
SELECT ALL - ( + col2 ) + + tab1.col1 AS col1 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT - col1 + - col1 - + tab1.col0 FROM tab1
----
-106
-55
-84

query I rowsort
SELECT 57 * - cor0.col0 + - col0 FROM tab2 cor0
----
-406
-4524
-4582

query I rowsort
SELECT + + col0 + + cor0.col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT ALL + col2 * + cor0.col0 + - col0 * cor0.col0 + cor0.col0 AS col0 FROM tab1 AS cor0
----
-384
1360
156

query I rowsort
SELECT 47 * 20 FROM tab2
----
940
940
940

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4170
SELECT - CAST( + col2 AS SIGNED ) * col0 FROM tab2
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-4170
SELECT - CAST ( + col2 AS INTEGER ) * col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT + ( + col2 ) * + cor0.col0 AS col2 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4172
SELECT - CAST( NULL AS DECIMAL ) + col2 * - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4172
SELECT - CAST ( NULL AS REAL ) + col2 * - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 25 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

onlyif mysql # use DIV operator for integer division
query I rowsort label-4174
SELECT ALL - - col0 DIV + col0 + + col1 FROM tab0 AS cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-4174
SELECT ALL - - col0 / + col0 + + col1 FROM tab0 AS cor0
----
87
92
98

query I rowsort
SELECT tab1.col0 * 8 + + col0 AS col1 FROM tab1
----
27
576
720

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 33 ) col1 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 76da8bc7cae18ecf856438f872430c80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4177
SELECT CAST( col0 AS SIGNED ) * - col1 * col1 FROM tab0
----
-177504
-329315
-737009

skipif mysql # not compatible
query I rowsort label-4177
SELECT CAST ( col0 AS INTEGER ) * - col1 * col1 FROM tab0
----
-177504
-329315
-737009

query I rowsort
SELECT DISTINCT ( 8 ) * col0 + - col1 FROM tab1
----
-2
502
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-4179
SELECT DISTINCT + CAST( ( col0 ) AS SIGNED ) + col2 DIV - col1 FROM tab2
----
7
77
78

skipif mysql # not compatible
query I rowsort label-4179
SELECT DISTINCT + CAST ( ( col0 ) AS INTEGER ) + col2 / - col1 FROM tab2
----
7
77
78

query I rowsort
SELECT ALL col1 * ( + cor0.col1 ) + - 54 + - cor0.col0 FROM tab0 AS cor0
----
7318
8138
9320

query I rowsort
SELECT DISTINCT 91 AS col0 FROM tab1
----
91

query I rowsort
SELECT DISTINCT ( col1 ) * + col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT 86 + - col1 FROM tab1
----
60
73
76

query I rowsort
SELECT + 15 * col1 AS col0 FROM tab2 AS cor0
----
255
465
885

query I rowsort
SELECT DISTINCT 73 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
73

query I rowsort
SELECT col1 + + col1 * + col1 FROM tab0
----
7482
8372
9506

query I rowsort
SELECT DISTINCT + col0 + - cor0.col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT - col0 * + 15 AS col0 FROM tab2 AS cor0
----
-105
-1170
-1185

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4189
SELECT ALL + CAST( + cor0.col2 AS SIGNED ) FROM tab1, tab0 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

skipif mysql # not compatible
query I rowsort label-4189
SELECT ALL + CAST ( + cor0.col2 AS INTEGER ) FROM tab1, tab0 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT DISTINCT cor0.col2 + col1 * + 17 FROM tab2 AS cor0
----
1029
327
554

query I rowsort
SELECT - col0 * 56 AS col1 FROM tab1 AS cor0
----
-168
-3584
-4480

query I rowsort
SELECT ALL col1 * cor0.col0 AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + col2 * + 32 AS col0 FROM tab2 AS cor0
----
1216
832
864

query I rowsort
SELECT cor0.col2 * 91 FROM tab1 AS cor0
----
4914
5187
8736

query I rowsort
SELECT - col1 + col1 * col2 AS col2 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT + - col2 + - cor0.col2 AS col0 FROM tab2 AS cor0
----
-52
-54
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * ( - col2 ) col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT col2 * + 88 FROM tab1 AS cor0
----
4752
5016
8448

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * col1 col0 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT 80 AS col0 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 6dd5038be71dffa82f5ceba787caab91

query I rowsort
SELECT ALL 49 + - 43 FROM tab2, tab0 AS cor0
----
9 values hashing to 5d1cb90ed58fa7573895d2f95b211821

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 15 col2 FROM tab0 AS cor0
----
-15
-15
-15

onlyif mysql # use DIV operator for integer division
query I rowsort label-4203
SELECT CAST( col0 AS SIGNED ) DIV col2 AS col0 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4203
SELECT CAST ( col0 AS INTEGER ) / col2 AS col0 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT - - 55 AS col2 FROM tab0 AS cor0
----
55
55
55

query I rowsort
SELECT - col2 + - 36 * col0 * - col2 AS col2 FROM tab1 AS cor0
----
131271
276384
5778

query I rowsort
SELECT - ( col2 ) + col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT - 73 + 73 * col0 AS col1 FROM tab2 AS cor0
----
438
5621
5694

onlyif mysql # use DIV operator for integer division
query I rowsort label-4208
SELECT + + col0 + - ( + col2 ) DIV CAST( - col2 AS SIGNED ) FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-4208
SELECT + + col0 + - ( + col2 ) / CAST ( - col2 AS INTEGER ) FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT DISTINCT 38 + col0 FROM tab1 AS cor0
----
102
118
41

query I rowsort
SELECT - col1 * - col2 + + col0 * col2 AS col0 FROM tab0 AS cor0
----
132
14760
3630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 * cor0.col1 col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT - col1 * - col0 + col2 + + col0 * col0 FROM tab0 cor0
----
16102
2673
4621

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4213
SELECT + col1 * - col0 + - CAST( - col0 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-2040
-3360
-8010

skipif mysql # not compatible
query I rowsort label-4213
SELECT + col1 * - col0 + - CAST ( - col0 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT ALL + - 88 AS col1 FROM tab0 AS cor0
----
-88
-88
-88

query I rowsort
SELECT DISTINCT cor0.col2 * + col1 + col1 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT 14 AS col2 FROM tab2 cor0
----
14
14
14

query I rowsort
SELECT - col1 + + col1 * - ( + col0 ) + - col0 FROM tab1 AS cor0
----
-107
-1133
-714

query I rowsort
SELECT - + 86 + col2 AS col1 FROM tab1 AS cor0
----
-29
-32
10

query I rowsort
SELECT 8 * - col2 AS col0 FROM tab0 cor0
----
-264
-656
-8

query I rowsort
SELECT + + ( cor0.col2 ) AS col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT + col0 * + ( ( col2 ) ) + + 14 + + col1 AS col0 FROM tab1 AS cor0
----
202
3672
7707

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4222
SELECT col0 / CAST( NULL AS SIGNED ) AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4222
SELECT col0 / CAST ( NULL AS INTEGER ) AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4223
SELECT + col2 DIV + 74 col2 FROM tab1 cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4223
SELECT + col2 / + 74 col2 FROM tab1 cor0
----
0
0
1

query I rowsort
SELECT + 71 FROM tab0, tab1 AS cor0, tab0 cor1
----
27 values hashing to 95a6ff35b7b8f00868fb58bcaa32d0c2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4225
SELECT DISTINCT + CAST( NULL AS SIGNED ) / 62 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-4225
SELECT DISTINCT + CAST ( NULL AS INTEGER ) / 62 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
NULL

query I rowsort
SELECT ALL - col0 * col0 * + tab2.col1 AS col1 FROM tab2
----
-106097
-1519
-358956

query I rowsort
SELECT ALL 28 FROM tab0, tab1 AS cor0
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - - cor0.col0 + - col1 * - ( + col2 ) - - col0 * + CAST ( - 42 AS REAL ) AS col2 FROM tab0 cor0
----
-1338
1854
3813

query I rowsort
SELECT + cor0.col1 * col1 + + 26 FROM tab2 AS cor0
----
315
3507
987

query I rowsort
SELECT ALL - col1 * col0 - col2 AS col1 FROM tab1 AS cor0
----
-1136
-132
-697

query I rowsort
SELECT ALL - - col0 * + col0 AS col1 FROM tab2 AS cor0
----
49
6084
6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-4232
SELECT col1 DIV - ( + col1 ) - + ( ( col0 ) ) DIV 26 AS col1 FROM tab1
----
-1
-3
-4

skipif mysql # not compatible
query I rowsort label-4232
SELECT col1 / - ( + col1 ) - + ( ( col0 ) ) / 26 AS col1 FROM tab1
----
-1
-3
-4

query I rowsort
SELECT DISTINCT ( + 3 ) * col2 * col0 FROM tab0
----
105
21894
2376

query I rowsort
SELECT DISTINCT - 12 AS col0 FROM tab0
----
-12

query I rowsort
SELECT + - 53 * cor0.col2 FROM tab0 AS cor0
----
-1749
-4346
-53

query I rowsort
SELECT DISTINCT - - col1 + col2 + - ( 65 ) AS col2 FROM tab2 cor0
----
-10
-7
20

query I rowsort
SELECT + + col2 + - col1 * - 6 AS col1 FROM tab0 AS cor0
----
549
583
628

onlyif mysql # use DIV operator for integer division
query I rowsort label-4238
SELECT DISTINCT - 70 DIV 19 AS col2 FROM tab2, tab0 AS cor0
----
-3

skipif mysql # not compatible
query I rowsort label-4238
SELECT DISTINCT - 70 / 19 AS col2 FROM tab2, tab0 AS cor0
----
-3

query I rowsort
SELECT - col2 - cor0.col2 AS col1 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT DISTINCT col1 - - ( + col0 ) FROM tab1
----
29
74
93

query IIIIII rowsort
SELECT * FROM tab2, tab2 cor0 WHERE NULL <> NULL
----

query I rowsort
SELECT + - col0 * 25 + col2 * col2 * col2 + - cor0.col0 AS col0 FROM tab0 AS cor0
----
-909
35313
549054

query I rowsort
SELECT DISTINCT tab2.col0 * tab2.col1 + + tab2.col1 FROM tab2
----
1360
248
4661

query I rowsort
SELECT ALL + cor0.col1 * - col2 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT + 65 - 70 FROM tab0 AS cor0
----
-5
-5
-5

query I rowsort
SELECT ( + col0 ) + col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT + ( col1 ) + - cor0.col2 AS col0 FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT DISTINCT + col1 * ( col1 ) FROM tab1 cor0
----
100
169
676

query I rowsort
SELECT + ( + cor0.col2 ) * - col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT ALL - 47 * col0 FROM tab0 AS cor0
----
-1128
-1645
-4183

query I rowsort
SELECT DISTINCT + col0 * 98 * + col0 FROM tab1 AS cor0
----
401408
627200
882

query I rowsort
SELECT ALL - - 10 * cor0.col0 AS col2 FROM tab1 AS cor0
----
30
640
800

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col1 * - col1 col2 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT DISTINCT col2 + - ( + col2 ) * + col0 FROM tab2 cor0
----
-162
-2002
-2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-4255
SELECT ALL + ( cor0.col1 ) DIV col0 FROM tab2 AS cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-4255
SELECT ALL + ( cor0.col1 ) / col0 FROM tab2 AS cor0
----
0
0
4

query I rowsort
SELECT DISTINCT 81 + col0 * + col0 FROM tab0 AS cor0
----
1306
657
8002

query I rowsort
SELECT DISTINCT + 90 - col0 AS col0 FROM tab1 cor0
----
10
26
87

query I rowsort
SELECT + + col0 * col1 - - col1 AS col2 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT ALL + + 64 + - 39 AS col1 FROM tab1 AS cor0
----
25
25
25

query I rowsort
SELECT - 83 AS col0 FROM tab1 AS cor0
----
-83
-83
-83

query I rowsort
SELECT DISTINCT - 48 * col2 + + col2 AS col0 FROM tab0 AS cor0
----
-1551
-3854
-47

onlyif mysql # use DIV operator for integer division
query I rowsort label-4262
SELECT ALL + + ( col2 ) DIV ( col2 ) FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4262
SELECT ALL + + ( col2 ) / ( col2 ) FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT - + 26 + col0 + - 18 FROM tab2 AS cor0
----
-37
34
35

query I rowsort
SELECT + + 31 AS col2 FROM tab1 AS cor0
----
31
31
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 52 + + cor0.col1 * - 6 col1 FROM tab0 AS cor0
----
-464
-494
-530

query I rowsort
SELECT col0 * - col2 + + 60 * cor0.col2 FROM tab0 AS cor0
----
-2378
1188
25

onlyif mysql # use DIV operator for integer division
query I rowsort label-4267
SELECT DISTINCT + col2 DIV - col0 FROM tab2 cor0
----
-3
0

skipif mysql # not compatible
query I rowsort label-4267
SELECT DISTINCT + col2 / - col0 FROM tab2 cor0
----
-3
0

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 AS cor0, tab2 AS cor1, tab2, tab1 AS cor2
----
3645 values hashing to c0625992cd48bef51317edf43a55d9e4

query I rowsort
SELECT DISTINCT + - 1 * col1 FROM tab1 AS cor0
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 97 col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to c73fa6978df8525c99d6bc792bb27123

query I rowsort
SELECT - 61 AS col2 FROM tab2
----
-61
-61
-61

query I rowsort
SELECT ALL tab2.col1 + - col0 AS col2 FROM tab2
----
-19
-62
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * - col0 + 71 col1 FROM tab1 AS cor0
----
1111
149
711

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 35 col1 FROM tab1 AS cor0
----
-35

query I rowsort
SELECT 36 * + col0 AS col1 FROM tab0 AS cor0
----
1260
3204
864

query I rowsort
SELECT DISTINCT + + col1 + 86 AS col0 FROM tab0 AS cor0
----
172
177
183

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4277
SELECT + + col0 * + CAST( NULL AS SIGNED ) + col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4277
SELECT + + col0 * + CAST ( NULL AS INTEGER ) + col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col0 * + 48 AS col0 FROM tab0 AS cor0
----
1152
1680
4272

onlyif mysql # use DIV operator for integer division
query I rowsort label-4279
SELECT ALL + col2 DIV + 61 + + 26 AS col0 FROM tab1 AS cor0
----
26
26
27

skipif mysql # not compatible
query I rowsort label-4279
SELECT ALL + col2 / + 61 + + 26 AS col0 FROM tab1 AS cor0
----
26
26
27

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4280
SELECT ALL - cor0.col0 * - CAST( + col2 AS SIGNED ) * col1 + + 85 FROM tab0 AS cor0
----
3480
664203
68197

skipif mysql # not compatible
query I rowsort label-4280
SELECT ALL - cor0.col0 * - CAST ( + col2 AS INTEGER ) * col1 + + 85 FROM tab0 AS cor0
----
3480
664203
68197

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * col2 + ( + col2 + - ( - col0 ) ) col1 FROM tab0 AS cor0
----
71
7469
849

query I rowsort
SELECT ALL - - col1 + 99 AS col1 FROM tab1 AS cor0
----
109
112
125

query I rowsort
SELECT DISTINCT + 94 AS col2 FROM tab1, tab2, tab1 AS cor0, tab1 AS cor1
----
94

query I rowsort
SELECT + col1 * 58 + col0 FROM tab1 AS cor0
----
1511
644
834

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4285
SELECT ALL + - CAST( col2 AS SIGNED ) FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-4285
SELECT ALL + - CAST ( col2 AS INTEGER ) FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT + - col0 * col0 - col0 AS col0 FROM tab0 AS cor0
----
-1260
-600
-8010

query I rowsort
SELECT DISTINCT + + 47 * col2 AS col0 FROM tab2 cor0
----
1222
1269
1786

query I rowsort
SELECT DISTINCT + + ( 89 ) + + col2 AS col1 FROM tab0 AS cor0
----
122
171
90

query I rowsort
SELECT ALL + ( cor0.col2 ) * - cor0.col0 * - ( col0 ) AS col1 FROM tab0 cor0
----
1225
19008
649522

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4290
SELECT - col2 * ( + col2 ) + col2 * - CAST( NULL AS SIGNED ) / col2 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4290
SELECT - col2 * ( + col2 ) + col2 * - CAST ( NULL AS INTEGER ) / col2 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col0 * + tab1.col2 - 84 AS col2 FROM tab1
----
3564
7596
78

query I rowsort
SELECT DISTINCT col2 - col0 * 54 FROM tab2
----
-351
-4186
-4228

query I rowsort
SELECT col0 + ( col0 ) AS col0 FROM tab1
----
128
160
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-4294
SELECT ALL 43 DIV tab0.col0 FROM tab0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-4294
SELECT ALL 43 / tab0.col0 FROM tab0
----
0
1
1

query I rowsort
SELECT DISTINCT col0 * col1 + + ( col0 ) AS col1 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT + - cor0.col2 * col0 + col1 * + col1 AS col0 FROM tab1 AS cor0
----
-3548
-7511
514

query I rowsort
SELECT ALL - + 91 * + col0 FROM tab0 cor0
----
-2184
-3185
-8099

query I rowsort
SELECT DISTINCT + 62 + + col0 AS col1 FROM tab1 AS cor0
----
126
142
65

query I rowsort
SELECT ALL 0 + + 15 FROM tab2, tab0 AS cor0
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

query I rowsort
SELECT - 27 AS col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 0259a67676b131a4843853be4811b775

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4301
SELECT DISTINCT - col1 * col0 / CAST( NULL AS SIGNED ) FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-4301
SELECT DISTINCT - col1 * col0 / CAST ( NULL AS INTEGER ) FROM tab1
----
NULL

query I rowsort
SELECT DISTINCT col2 + 76 FROM tab1 cor0
----
130
133
172

query I rowsort
SELECT - ( - col2 ) + cor0.col2 AS col1 FROM tab2 cor0
----
52
54
76

query I rowsort
SELECT ALL col1 + + 16 AS col2 FROM tab1 AS cor0
----
26
29
42

query I rowsort
SELECT DISTINCT + - col1 + + col1 * - col1 FROM tab2 AS cor0
----
-306
-3540
-992

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab2, tab1 AS cor2
----
3645 values hashing to 1b06ddc48fd89ff2b1df6d82072316da

query I rowsort
SELECT + 35 + col2 FROM tab2
----
61
62
73

query I rowsort
SELECT + ( 43 + - col0 ) FROM tab2
----
-35
-36
36

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4309
SELECT + + 29 * - col1 * CAST( 3 + col0 * 14 AS SIGNED ) FROM tab1 AS cor0
----
-260710
-33930
-423371

skipif mysql # not compatible
query I rowsort label-4309
SELECT + + 29 * - col1 * CAST ( 3 + col0 * 14 AS INTEGER ) FROM tab1 AS cor0
----
-260710
-33930
-423371

query I rowsort
SELECT - col2 + ( + col2 ) * tab0.col2 * + col0 FROM tab0
----
26103
34
598354

query I rowsort
SELECT DISTINCT 86 * - tab0.col2 FROM tab0
----
-2838
-7052
-86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4312
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab1, tab2, tab1 cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-4312
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab1, tab2, tab1 cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT - - col0 + + col0 AS col1 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT 74 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

query I rowsort
SELECT DISTINCT - col0 * + cor0.col0 * ( - cor0.col0 ) AS col0 FROM tab1 AS cor0
----
262144
27
512000

query I rowsort
SELECT 88 + + col2 * col1 FROM tab1 AS cor0
----
1336
1492
658

query I rowsort
SELECT - + 60 AS col0 FROM tab0 AS cor0
----
-60
-60
-60

query I rowsort
SELECT + 80 + - cor0.col2 FROM tab1 AS cor0
----
-16
23
26

query I rowsort
SELECT + cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT ALL 85 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to e4cf94cf0cc632acff30ad1dac617cb7

query I rowsort
SELECT 96 - tab0.col0 AS col1 FROM tab0
----
61
7
72

query I rowsort
SELECT + 91 + - col0 AS col1 FROM tab0
----
2
56
67

query I rowsort
SELECT - col0 - + col2 * - col0 * - ( - col0 ) AS col1 FROM tab2
----
1316
158106
237079

query I rowsort
SELECT DISTINCT + tab2.col1 + + col1 * + col2 * col1 AS col1 FROM tab2
----
10999
25978
90565

query I rowsort
SELECT ALL - + 81 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 205b3ff2d7b1817c98d7980b8c17e6c1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4326
SELECT + col2 DIV ( col0 ) AS col2 FROM tab1
----
0
1
18

skipif mysql # not compatible
query I rowsort label-4326
SELECT + col2 / ( col0 ) AS col2 FROM tab1
----
0
1
18

query I rowsort
SELECT tab0.col1 * + col1 AS col1 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT col2 * + 13 AS col0 FROM tab0
----
1066
13
429

query I rowsort
SELECT DISTINCT cor0.col2 + 61 * cor0.col0 + - 67 FROM tab0, tab2 AS cor0
----
387
4717
4790

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab2, tab1, tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT col0 + 25 * + col0 FROM tab0
----
2314
624
910

query I rowsort
SELECT + col1 * + ( + cor0.col0 ) FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - 25 AS col1 FROM tab1, tab2 cor0
----
-25

onlyif mysql # use DIV operator for integer division
query I rowsort label-4334
SELECT + 27 DIV - 63 - + col2 * col0 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-4334
SELECT + 27 / - 63 - + col2 * 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 * col2 - - col1 col2 FROM tab2 AS cor0
----
1354
158243
237175

query I rowsort
SELECT - - 51 FROM tab1 AS cor0
----
51
51
51

query I rowsort
SELECT + cor0.col0 + + col1 * cor0.col1 FROM tab0 cor0
----
7420
8370
9444

query I rowsort
SELECT + col2 * + col0 + + 88 + col1 FROM tab2 AS cor0
----
2175
308
3107

query I rowsort
SELECT col1 + col0 + - ( + cor0.col1 + col0 ) * + col0 FROM tab0 AS cor0
----
-15840
-2530
-4488

query I rowsort
SELECT DISTINCT col2 + 96 AS col1 FROM tab2 AS cor0
----
122
123
134

onlyif mysql # use DIV operator for integer division
query I rowsort label-4341
SELECT DISTINCT - col2 + - ( + col1 ) * col0 DIV - col1 + + ( + col2 ) FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-4341
SELECT DISTINCT - col2 + - ( + col1 ) * col0 / - col1 + + ( + col2 ) FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - col0 * + col1 + - col0 AS col1 FROM tab1 AS cor0
----
-1120
-704
-81

onlyif mysql # use DIV operator for integer division
query I rowsort label-4343
SELECT DISTINCT - cor0.col1 + col1 + 37 DIV col1 AS col0 FROM tab0 cor0
----
0

skipif mysql # not compatible
query I rowsort label-4343
SELECT DISTINCT - cor0.col1 + col1 + 37 / col1 AS col0 FROM tab0 cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4344
SELECT ALL + + col1 DIV col1 + col0 + - col0 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4344
SELECT ALL + + col1 / col1 + col0 + - col0 FROM tab1 AS cor0
----
1
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4345
SELECT DISTINCT + col2 + cor0.col0 * ( - col1 + + CAST( col1 AS SIGNED ) ) AS col1 FROM tab0 cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-4345
SELECT DISTINCT + col2 + cor0.col0 * ( - col1 + + CAST ( col1 AS INTEGER ) ) AS col1 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT - + col0 * ( + col0 ) - col0 AS col1 FROM tab2 cor0
----
-56
-6162
-6320

query I rowsort
SELECT ALL - 53 * 89 AS col1 FROM tab2 AS cor0
----
-4717
-4717
-4717

query I rowsort
SELECT + col1 * + col1 * - col2 + + 36 FROM tab0 cor0
----
-244032
-679006
-9373

query I rowsort
SELECT DISTINCT + col1 * 11 AS col2 FROM tab0 AS cor0
----
1001
1067
946

query I rowsort
SELECT - - col1 * + 57 AS col0 FROM tab2 AS cor0
----
1767
3363
969

query I rowsort
SELECT + ( col2 ) + - col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - 48 * 28 FROM tab2 cor0
----
-1344

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 + 42 + - col0 col1 FROM tab2 AS cor0
----
42
42
42

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4354
SELECT col0 + - CAST( - col2 AS SIGNED ) * + col0 + - CAST( 56 AS SIGNED ) AS col1 FROM tab2
----
140
2050
3025

skipif mysql # not compatible
query I rowsort label-4354
SELECT col0 + - CAST ( - col2 AS INTEGER ) * + col0 + - CAST ( 56 AS INTEGER ) AS col1 FROM tab2
----
140
2050
3025

query I rowsort
SELECT col2 - - 26 AS col1 FROM tab2
----
52
53
64

query I rowsort
SELECT DISTINCT + col2 + - 7 + col1 * + col1 AS col0 FROM tab1
----
150
258
723

query I rowsort
SELECT ALL + col0 + + col0 AS col0 FROM tab2
----
14
156
158

query I rowsort
SELECT DISTINCT ( + col0 ) + + col0 AS col2 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT ALL + + 87 FROM tab1 cor0
----
87
87
87

query I rowsort
SELECT ALL + col1 + - col0 * col2 * - cor0.col0 FROM tab0 AS cor0
----
1322
19094
649613

query I rowsort
SELECT DISTINCT 58 * col0 FROM tab1 AS cor0
----
174
3712
4640

query I rowsort
SELECT DISTINCT - - 68 * col1 + - cor0.col0 AS col2 FROM tab1 AS cor0
----
1765
616
804

query I rowsort
SELECT ALL - + col2 - col0 * 98 AS col1 FROM tab1 AS cor0
----
-348
-6329
-7936

query I rowsort
SELECT ALL col1 * + col0 * 61 AS col1 FROM tab2 AS cor0
----
13237
280722
81923

query I rowsort
SELECT 78 + col0 AS col2 FROM tab2 AS cor0
----
156
157
85

query I rowsort
SELECT - ( col1 ) * 13 FROM tab1 AS cor0
----
-130
-169
-338

query I rowsort
SELECT - 12 FROM tab0, tab0 AS cor0
----
9 values hashing to e698dd57d3aac30af14ce35da434bb45

query I rowsort
SELECT DISTINCT 80 * tab2.col1 AS col0 FROM tab2
----
1360
2480
4720

query I rowsort
SELECT + - 90 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to c0d96679aba507520916e8654e5a6618

query I rowsort
SELECT - 3 * - col0 FROM tab1 AS cor0
----
192
240
9

query I rowsort
SELECT ( - ( + col1 ) + 6 ) AS col1 FROM tab0
----
-80
-85
-91

query I rowsort
SELECT DISTINCT + ( - tab2.col1 ) FROM tab2
----
-17
-31
-59

query I rowsort
SELECT DISTINCT - 13 AS col0 FROM tab0
----
-13

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0, tab0, tab2 cor1
----
972 values hashing to d41be7437523f0dba2158c7f0439f329

query I rowsort
SELECT + col0 * col1 * cor0.col2 - 34 AS col1 FROM tab1 AS cor0
----
36446
4178
99806

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4376
SELECT ALL ( + tab2.col1 ) * CAST( - col1 AS SIGNED ) AS col2 FROM tab2
----
-289
-3481
-961

skipif mysql # not compatible
query I rowsort label-4376
SELECT ALL ( + tab2.col1 ) * CAST ( - col1 AS INTEGER ) AS col2 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT - col2 + col2 * col1 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT 70 FROM tab0, tab0 cor0, tab0 AS cor1
----
27 values hashing to c76157a7a7ec18de56823b2058b49f32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 7 col0 FROM tab0
----
7
7
7

query I rowsort
SELECT ALL + col1 + ( + col0 + - col1 ) FROM tab1
----
3
64
80

query I rowsort
SELECT + - col1 + + 11 AS col2 FROM tab2 cor0
----
-20
-48
-6

query I rowsort
SELECT + col1 + + col2 - + col2 AS col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL - - col1 * + 15 AS col0 FROM tab2 AS cor0
----
255
465
885

query I rowsort
SELECT - cor0.col0 * - 97 FROM tab1 cor0
----
291
6208
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-4385
SELECT DISTINCT + - col2 DIV - col2 AS col2 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-4385
SELECT DISTINCT + - col2 / - col2 AS col2 FROM tab0 AS cor0
----
1

query I rowsort
SELECT ALL cor0.col2 + - 74 FROM tab0 AS cor0
----
-41
-73
8

query I rowsort
SELECT ALL - col2 + 73 + col0 AS col0 FROM tab2 AS cor0
----
114
125
53

query I rowsort
SELECT - col2 * cor0.col0 + 92 FROM tab1 AS cor0
----
-3556
-70
-7588

onlyif mysql # use DIV operator for integer division
query I rowsort label-4389
SELECT + col2 DIV - col0 + - col0 FROM tab1 AS cor0
----
-21
-64
-81

skipif mysql # not compatible
query I rowsort label-4389
SELECT + col2 / - col0 + - col0 FROM tab1 AS cor0
----
-21
-64
-81

query I rowsort
SELECT ALL - col0 + + col1 * col0 - + col2 AS col0 FROM tab1 AS cor0
----
21
519
864

query I rowsort
SELECT + cor0.col0 + - col1 * + col1 AS col1 FROM tab0 AS cor0
----
-7372
-8192
-9374

query I rowsort
SELECT DISTINCT col0 + ( col2 ) FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT ALL + col2 * + cor0.col2 AS col0 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT ALL 20 FROM tab1 cor0
----
20
20
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 * - cor0.col0 col2 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-4396
SELECT col2 * col2 DIV + col1 col2 FROM tab0 AS cor0
----
0
12
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4396
SELECT col2 * col2 / + col1 col2 FROM tab0 AS cor0
----
0
12
73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4397
SELECT DISTINCT + + CAST( + col2 AS SIGNED ) + cor0.col1 AS col0 FROM tab2 AS cor0
----
55
58
85

skipif mysql # not compatible
query I rowsort label-4397
SELECT DISTINCT + + CAST ( + col2 AS INTEGER ) + cor0.col1 AS col0 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT 69 * - col0 + col0 * - col1 FROM tab0
----
-14240
-3720
-5810

query I rowsort
SELECT ALL - + cor0.col1 + + cor1.col0 * + 34 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to b5e495989dd89c21d31134df86785e7d

onlyif mysql # use DIV operator for integer division
query I rowsort label-4400
SELECT 21 DIV - col2 AS col0 FROM tab0 AS cor0
----
-21
0
0

skipif mysql # not compatible
query I rowsort label-4400
SELECT 21 / - col2 AS col0 FROM tab0 AS cor0
----
-21
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4401
SELECT DISTINCT + 22 * col0 / - col1 + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4401
SELECT DISTINCT + 22 * col0 / - col1 + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL + col2 * col0 * col1 FROM tab0 cor0
----
3395
664118
68112

query I rowsort
SELECT ALL - col0 * - col0 + + ( cor0.col2 ) AS col0 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT ALL - 19 AS col2 FROM tab1 cor0
----
-19
-19
-19

query I rowsort
SELECT ALL 73 * col2 * + col0 AS col1 FROM tab0 AS cor0
----
2555
532754
57816

query I rowsort
SELECT DISTINCT - 75 * + col2 AS col2 FROM tab0 AS cor0
----
-2475
-6150
-75

query I rowsort
SELECT ALL 53 * - col0 FROM tab1 cor0
----
-159
-3392
-4240

query I rowsort
SELECT - col1 * - cor0.col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + 73 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
73

query I rowsort
SELECT 80 AS col1 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 6dd5038be71dffa82f5ceba787caab91

query I rowsort
SELECT tab2.col2 * col2 * - col2 FROM tab2
----
-17576
-19683
-54872

query I rowsort
SELECT ALL + + cor0.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * cor0.col1 + + 99 col2 FROM tab2 AS cor0
----
-1435
-547
-738

query I rowsort
SELECT col1 + + 98 * col0 FROM tab2 AS cor0
----
717
7703
7759

query I rowsort
SELECT ALL + col0 + 20 AS col2 FROM tab1 AS cor0
----
100
23
84

query I rowsort
SELECT - col2 * ( - col0 ) + cor0.col1 + + col0 FROM tab1 AS cor0
----
191
3722
7773

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4417
SELECT DISTINCT + col2 * + CAST( NULL AS SIGNED ) AS col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-4417
SELECT DISTINCT + col2 * + CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4418
SELECT DISTINCT - + col0 * col1 + col0 + - col2 * + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4418
SELECT DISTINCT - + col0 * col1 + col0 + - col2 * + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + - col0 + - 97 + - 43 * col0 AS col0 FROM tab0 AS cor0
----
-1153
-1637
-4013

query I rowsort
SELECT ALL col0 * + 21 * cor0.col2 FROM tab2 AS cor0
----
3969
42588
63042

onlyif mysql # use DIV operator for integer division
query I rowsort label-4421
SELECT ALL + + col0 * col2 DIV col0 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-4421
SELECT ALL + + col0 * col2 / col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT 51 + - col0 * - col0 AS col0 FROM tab2 AS cor0
----
100
6135
6292

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4423
SELECT DISTINCT CAST( NULL AS DECIMAL ) + + col0 * - col0 AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4423
SELECT DISTINCT CAST ( NULL AS REAL ) + + col0 * - col0 AS col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + ( col2 ) + - cor0.col0 * ( + col1 ) * + col1 AS col2 FROM tab1 AS cor0
----
-13424
-1974
-6343

query I rowsort
SELECT DISTINCT - col0 * + cor0.col2 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-4426
SELECT + col1 DIV + col0 AS col1 FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-4426
SELECT + col1 / + col0 AS col1 FROM tab1 AS cor0
----
0
0
8

query I rowsort
SELECT DISTINCT 27 * + cor0.col2 * + col2 AS col0 FROM tab2 AS cor0
----
18252
19683
38988

query I rowsort
SELECT - col2 * col1 + 14 * + col0 AS col1 FROM tab2 AS cor0
----
-442
-739
460

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 11 col2 FROM tab1 cor0
----
-11

query I rowsort
SELECT DISTINCT + col2 * col2 * 34 FROM tab1 cor0
----
110466
313344
99144

onlyif mysql # use DIV operator for integer division
query I rowsort label-4431
SELECT 20 DIV col1 FROM tab1
----
0
1
2

skipif mysql # not compatible
query I rowsort label-4431
SELECT 20 / col1 FROM tab1
----
0
1
2

query I rowsort
SELECT col2 * col0 * ( + 79 ) AS col1 FROM tab2
----
14931
160212
237158

query I rowsort
SELECT + cor2.col2 FROM tab0, tab2 AS cor0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to e938777ebffc2e3e9c0cdfaa4f732c05

query I rowsort
SELECT DISTINCT cor0.col0 + col1 FROM tab1 AS cor0
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - ( cor0.col2 * col1 + col0 ) col0 FROM tab2 AS cor0
----
-12325
-26164
-95108

query I rowsort
SELECT + col0 * ( col2 ) + col2 + - cor0.col2 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT - cor0.col1 * col0 * + col2 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT col1 * - col0 + col0 AS col0 FROM tab0
----
-2040
-3360
-8010

query I rowsort
SELECT + col2 * - col2 * col2 + col1 * 4 FROM tab1 AS cor0
----
-157360
-185153
-884684

query I rowsort
SELECT col2 + + ( col0 ) * + col2 * col1 FROM tab2 AS cor0
----
119678
51072
5886

query I rowsort
SELECT cor0.col2 * - col1 + - ( + col1 * ( + col2 ) ) FROM tab1 AS cor0
----
-1140
-2496
-2808

query I rowsort
SELECT ALL - 54 + col0 * 17 FROM tab1
----
-3
1034
1306

onlyif mysql # use DIV operator for integer division
query I rowsort label-4443
SELECT ALL col2 + col0 DIV col1 FROM tab1
----
102
54
63

skipif mysql # not compatible
query I rowsort label-4443
SELECT ALL col2 + col0 / col1 FROM tab1
----
102
54
63

query I rowsort
SELECT + + 59 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

query I rowsort
SELECT DISTINCT + 93 AS col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
93

query I rowsort
SELECT DISTINCT col2 * - col1 - - 91 FROM tab1 AS cor0
----
-1157
-1313
-479

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 - 18 col1 FROM tab0 AS cor0
----
17
6
71

query I rowsort
SELECT DISTINCT - + col1 + 43 FROM tab1 AS cor0
----
17
30
33

query I rowsort
SELECT cor0.col2 + col1 + - col0 AS col1 FROM tab2 AS cor0
----
-24
51
7

query I rowsort
SELECT - col0 * 74 AS col1 FROM tab0 AS cor0
----
-1776
-2590
-6586

query I rowsort
SELECT DISTINCT - - col1 + + col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + 44 * col0 FROM tab2 AS cor0
----
308
3432
3476

query I rowsort
SELECT DISTINCT + + 63 * 42 FROM tab0 AS cor0
----
2646

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4454
SELECT - tab1.col0 * CAST( NULL AS SIGNED ) AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4454
SELECT - tab1.col0 * CAST ( NULL AS INTEGER ) AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 - + col1 * - col1 FROM tab0
----
7429
8363
9410

onlyif mysql # use DIV operator for integer division
query I rowsort label-4456
SELECT ALL col0 + + col0 * col1 DIV + col1 - col0 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-4456
SELECT ALL col0 + + col0 * col1 / + col1 - col0 FROM tab1
----
3
64
80

query I rowsort
SELECT ALL + ( + col1 ) AS col1 FROM tab2
----
17
31
59

query I rowsort
SELECT - cor1.col0 FROM tab2, tab1 cor0, tab0 AS cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 53 col1 FROM tab1 AS cor0
----
-53
-53
-53

query I rowsort
SELECT ALL tab1.col1 * - 72 FROM tab1
----
-1872
-720
-936

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * col2 col0 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT + 34 AS col2 FROM tab2
----
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 col1 FROM tab2, tab0 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT cor0.col1 * + col2 * col2 FROM tab2 AS cor0
----
22599
24548
39884

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + col0 col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT + + 59 AS col2 FROM tab0 AS cor0
----
59
59
59

query I rowsort
SELECT DISTINCT - 71 + col1 * col1 - + ( - col1 ) * col2 FROM tab2
----
1727
4944
864

query I rowsort
SELECT ALL + 10 - - col0 AS col0 FROM tab1
----
13
74
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-4469
SELECT ALL col1 DIV col0 - - col1 FROM tab2
----
17
35
59

skipif mysql # not compatible
query I rowsort label-4469
SELECT ALL col1 / col0 - - col1 FROM tab2
----
17
35
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4470
SELECT ALL + CAST( NULL AS SIGNED ) - + col1 col2 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4470
SELECT ALL + CAST ( NULL AS INTEGER ) - + col1 col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 + col2 - + tab0.col2 AS col2 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT ( col0 * col2 ) + - col1 - + tab2.col1 AS col0 FROM tab2
----
127
1910
2968

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4473
SELECT DISTINCT + CAST( - cor0.col1 AS SIGNED ) + + col1 AS col2 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4473
SELECT DISTINCT + CAST ( - cor0.col1 AS INTEGER ) + + col1 AS col2 FROM tab2 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * col2 col2 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT 38 * - col1 AS col2 FROM tab2 AS cor0
----
-1178
-2242
-646

query I rowsort
SELECT DISTINCT - col1 * - cor0.col0 * 57 FROM tab1 AS cor0
----
36480
4446
59280

query I rowsort
SELECT DISTINCT - cor0.col0 + - col0 AS col1 FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT - cor0.col2 * col2 - + 37 AS col2 FROM tab2 AS cor0
----
-1481
-713
-766

query I rowsort
SELECT + 98 * col2 AS col0 FROM tab2 AS cor0
----
2548
2646
3724

query I rowsort
SELECT - - 24 + col0 FROM tab2 AS cor0
----
102
103
31

query I rowsort
SELECT 23 * - col2 + col2 FROM tab1 AS cor0
----
-1188
-1254
-2112

query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col2 AS col1 FROM tab2 cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-4483
SELECT ALL col0 DIV col1 AS col1 FROM tab2
----
0
1
4

skipif mysql # not compatible
query I rowsort label-4483
SELECT ALL col0 / col1 AS col1 FROM tab2
----
0
1
4

query I rowsort
SELECT - 85 * col1 AS col2 FROM tab2
----
-1445
-2635
-5015

query I rowsort
SELECT ALL 84 * - cor0.col1 AS col0 FROM tab2 AS cor0
----
-1428
-2604
-4956

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT + 99 + - col1 FROM tab2 AS cor0
----
40
68
82

query I rowsort
SELECT DISTINCT - - 51 * col2 AS col1 FROM tab2 AS cor0
----
1326
1377
1938

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 9 col2 FROM tab0 AS cor0
----
9
9
9

query I rowsort
SELECT DISTINCT + - 94 AS col1 FROM tab1 AS cor0
----
-94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 45 * + col2 + col1 col2 FROM tab0 AS cor0
----
142
1571
3781

query I rowsort
SELECT + 79 - col0 FROM tab0 AS cor0
----
-10
44
55

query I rowsort
SELECT - col2 * + 76 FROM tab2 AS cor0
----
-1976
-2052
-2888

query I rowsort
SELECT + cor0.col2 * + ( + col0 ) AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL - 27 AS col1 FROM tab0
----
-27
-27
-27

query I rowsort
SELECT ALL 9 * col0 FROM tab2
----
63
702
711

onlyif mysql # use DIV operator for integer division
query I rowsort label-4497
SELECT ALL + col2 + ( - cor0.col1 ) * col0 DIV + col1 FROM tab2 AS cor0
----
-41
-52
20

skipif mysql # not compatible
query I rowsort label-4497
SELECT ALL + col2 + ( - cor0.col1 ) * col0 / + col1 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT + col1 + 64 FROM tab1 AS cor0
----
74
77
90

query I rowsort
SELECT ALL - col0 * + ( 61 ) - col0 FROM tab1 AS cor0
----
-186
-3968
-4960

query I rowsort
SELECT + + col0 * 70 FROM tab0 AS cor0
----
1680
2450
6230

query I rowsort
SELECT DISTINCT - 43 * 91 FROM tab1 AS cor0
----
-3913

query I rowsort
SELECT DISTINCT + 45 * cor0.col2 AS col0 FROM tab2 AS cor0
----
1170
1215
1710

query I rowsort
SELECT ALL - - col1 * 91 AS col0 FROM tab2 AS cor0
----
1547
2821
5369

query I rowsort
SELECT 96 * ( - col1 ) + + 44 FROM tab1 AS cor0
----
-1204
-2452
-916

query I rowsort
SELECT DISTINCT col2 * + 43 FROM tab0 AS cor0
----
1419
3526
43

query I rowsort
SELECT - 65 * + 46 FROM tab2 AS cor0
----
-2990
-2990
-2990

query I rowsort
SELECT - tab2.col2 + + col0 FROM tab2
----
-20
41
52

query I rowsort
SELECT ALL + - 14 * col2 - col0 AS col0 FROM tab1 AS cor0
----
-1424
-759
-862

query I rowsort
SELECT DISTINCT - ( col1 ) AS col2 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT ALL col1 * col2 + + col0 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT ( col0 ) + - col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT ALL - 98 FROM tab0 cor0
----
-98
-98
-98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4513
SELECT - + CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4513
SELECT - + CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 14 + col0 AS col2 FROM tab2 AS cor0
----
21
92
93

query I rowsort
SELECT DISTINCT ( col1 ) + col2 AS col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT + col1 + - cor0.col1 * col1 AS col1 FROM tab0 AS cor0
----
-7310
-8190
-9312

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4517
SELECT - CAST( + 46 AS SIGNED ) + + col1 FROM tab0 AS cor0
----
40
45
51

skipif mysql # not compatible
query I rowsort label-4517
SELECT - CAST ( + 46 AS INTEGER ) + + col1 FROM tab0 AS cor0
----
40
45
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4518
SELECT DISTINCT - col2 * CAST( 98 AS SIGNED ) * + tab2.col2 FROM tab2
----
-141512
-66248
-71442

skipif mysql # not compatible
query I rowsort label-4518
SELECT DISTINCT - col2 * CAST ( 98 AS INTEGER ) * + tab2.col2 FROM tab2
----
-141512
-66248
-71442

query I rowsort
SELECT DISTINCT col1 * 67 FROM tab1
----
1742
670
871

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4520
SELECT + CAST( + 36 AS SIGNED ) AS col2 FROM tab2
----
36
36
36

skipif mysql # not compatible
query I rowsort label-4520
SELECT + CAST ( + 36 AS INTEGER ) AS col2 FROM tab2
----
36
36
36

query I rowsort
SELECT - tab1.col1 FROM tab2, tab1 AS cor0 CROSS JOIN tab1, tab2 cor1
----
81 values hashing to 96e9ef2950805bca93a295eeea43ef5b

query I rowsort
SELECT ALL - ( cor0.col2 ) AS col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT + - 47 * col0 + col0 FROM tab1 AS cor0
----
-138
-2944
-3680

query I rowsort
SELECT ALL + col2 * col1 + col0 AS col2 FROM tab1 AS cor0
----
1328
1407
634

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * tab1.col0 * col2 + + ( tab1.col1 + col0 ) col0 FROM tab1
----
208010
737373
8777

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query I rowsort
SELECT ALL - - col1 * - cor0.col1 AS col0 FROM tab1 cor0
----
-100
-169
-676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + + col1 * + col2 col2 FROM tab1
----
1168
1401
506

onlyif mysql # use DIV operator for integer division
query I rowsort label-4529
SELECT DISTINCT - 19 DIV + col0 + - 78 * col0 AS col2 FROM tab1
----
-240
-4992
-6240

skipif mysql # not compatible
query I rowsort label-4529
SELECT DISTINCT - 19 / + col0 + - 78 * col0 AS col2 FROM tab1
----
-240
-4992
-6240

query I rowsort
SELECT ALL - col1 + + ( col1 * col0 ) - - col1 AS col0 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT ALL - col2 + col1 - col1 AS col1 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL col1 * col2 + col2 * col2 AS col0 FROM tab1 AS cor0
----
10464
3819
4320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - cor0.col0 * + col2 + + col1 col1 FROM tab0 AS cor0
----
-7289
-739
61

onlyif mysql # use DIV operator for integer division
query I rowsort label-4534
SELECT DISTINCT col1 + + col1 DIV - cor0.col2 AS col0 FROM tab0 AS cor0
----
0
84
90

skipif mysql # not compatible
query I rowsort label-4534
SELECT DISTINCT col1 + + col1 / - cor0.col2 AS col0 FROM tab0 AS cor0
----
0
84
90

query I rowsort
SELECT - col2 * col0 + 31 FROM tab2 AS cor0
----
-158
-1997
-2971

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4536
SELECT + - col0 - ( col1 + - col1 * - CAST( NULL AS SIGNED ) ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4536
SELECT + - col0 - ( col1 + - col1 * - CAST ( NULL AS INTEGER ) ) FROM tab2 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4537
SELECT col0 + + col0 + - CAST( col0 + - col2 AS SIGNED ) AS col2 FROM tab1
----
121
176
57

skipif mysql # not compatible
query I rowsort label-4537
SELECT col0 + + col0 + - CAST ( col0 + - col2 AS INTEGER ) AS col2 FROM tab1
----
121
176
57

query I rowsort
SELECT + + col1 * - 90 + 56 FROM tab2 AS cor0
----
-1474
-2734
-5254

query I rowsort
SELECT col1 - 30 FROM tab1 AS cor0
----
-17
-20
-4

onlyif mysql # use DIV operator for integer division
query I rowsort label-4540
SELECT DISTINCT col0 + col0 DIV + 93 AS col2 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-4540
SELECT DISTINCT col0 + col0 / + 93 AS col2 FROM tab0
----
24
35
89

query I rowsort
SELECT + col1 * + col1 * - col0 + col0 + tab2.col2 * + 85 FROM tab2
----
-19522
-269230
-4425

query I rowsort
SELECT + col1 * + col0 + ( - col0 ) FROM tab1
----
576
75
960

query I rowsort
SELECT DISTINCT - 13 + tab2.col0 AS col1 FROM tab2
----
-6
65
66

query I rowsort
SELECT 13 AS col0 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to a90d0f37cec603ae1bc0a60dc7fbaeed

query I rowsort
SELECT DISTINCT - + cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
-3
-64
-80

query I rowsort
SELECT - + col1 + col0 * - cor0.col2 FROM tab0 AS cor0
----
-132
-7389
-878

query I rowsort
SELECT + - col0 * 93 - - col1 AS col1 FROM tab2 AS cor0
----
-620
-7195
-7330

query I rowsort
SELECT - + 77 FROM tab2 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 3a24155cb91ceff1e67bb51c07b72107

query I rowsort
SELECT - col2 * - 15 AS col2 FROM tab2
----
390
405
570

query I rowsort
SELECT DISTINCT ( - col0 + + col2 ) * + 88 FROM tab2
----
-3608
-4576
1760

query I rowsort
SELECT + 2 * cor0.col1 FROM tab0 AS cor0
----
172
182
194

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4552
SELECT ALL - CAST( NULL AS SIGNED ) * 89 * + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4552
SELECT ALL - CAST ( NULL AS INTEGER ) * 89 * + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4553
SELECT ALL + CAST( - col0 AS SIGNED ) * - col1 FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-4553
SELECT ALL + CAST ( - col0 AS INTEGER ) * - col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL - 84 + + cor0.col0 * ( col2 + - col2 * - col1 ) AS col2 FROM tab0 AS cor0
----
3346
671332
68820

query I rowsort
SELECT 41 * + col0 FROM tab1
----
123
2624
3280

onlyif mysql # use DIV operator for integer division
query I rowsort label-4556
SELECT 53 DIV - col2 AS col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4556
SELECT 53 / - col2 AS col2 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4557
SELECT + - 59 DIV - col0 FROM tab1 AS cor0
----
0
0
19

skipif mysql # not compatible
query I rowsort label-4557
SELECT + - 59 / - col0 FROM tab1 AS cor0
----
0
0
19

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4558
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-4558
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
NULL

query I rowsort
SELECT + col2 + + cor0.col2 AS col1 FROM tab2 cor0
----
52
54
76

query I rowsort
SELECT - 1 AS col1 FROM tab2 cor0
----
-1
-1
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4561
SELECT col1 * col0 * CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4561
SELECT col1 * col0 * CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 27 * + col0 col1 FROM tab2 cor0
----
189
2106
2133

query I rowsort
SELECT + + 18 * + col2 AS col2 FROM tab0 AS cor0
----
1476
18
594

query I rowsort
SELECT DISTINCT - + cor0.col0 * 53 * + col1 FROM tab0 AS cor0
----
-109392
-179935
-429247

query I rowsort
SELECT + col1 * + ( col1 ) - col1 FROM tab1 AS cor0
----
156
650
90

query I rowsort
SELECT - col1 * 77 FROM tab0 cor0
----
-6622
-7007
-7469

query I rowsort
SELECT DISTINCT col2 * + col2 AS col0 FROM tab1 AS cor0
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-4568
SELECT DISTINCT + + col2 DIV - ( col1 ) FROM tab2 AS cor0
----
-2
0

skipif mysql # not compatible
query I rowsort label-4568
SELECT DISTINCT + + col2 / - ( col1 ) FROM tab2 AS cor0
----
-2
0

query I rowsort
SELECT ALL - col1 * + 64 AS col1 FROM tab2 AS cor0
----
-1088
-1984
-3776

query I rowsort
SELECT ( - 18 ) AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 09afafec657a5e9f082beb6a16ec85de

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4571
SELECT + ( - col1 ) * - col1 + CAST( + col1 AS SIGNED ) * col0 FROM tab2 AS cor0
----
1178
1632
8083

skipif mysql # not compatible
query I rowsort label-4571
SELECT + ( - col1 ) * - col1 + CAST ( + col1 AS INTEGER ) * col0 FROM tab2 AS cor0
----
1178
1632
8083

query I rowsort
SELECT - cor0.col0 * 49 FROM tab1 AS cor0
----
-147
-3136
-3920

onlyif mysql # use DIV operator for integer division
query I rowsort label-4573
SELECT - - col0 + col1 DIV col0 + col1 DIV cor0.col1 col0 FROM tab1 AS cor0
----
12
65
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4573
SELECT - - col0 + col1 / col0 + col1 / cor0.col1 col0 FROM tab1 AS cor0
----
12
65
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4574
SELECT ( ( + tab0.col2 ) ) - + CAST( - col0 * - col0 AS SIGNED ) FROM tab0
----
-1224
-543
-7839

skipif mysql # not compatible
query I rowsort label-4574
SELECT ( ( + tab0.col2 ) ) - + CAST ( - col0 * - col0 AS INTEGER ) FROM tab0
----
-1224
-543
-7839

query I rowsort
SELECT + 65 AS col2 FROM tab0
----
65
65
65

skipif mysql # not compatible
query I rowsort
SELECT CAST ( + col0 AS REAL ) FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT 62 * + col0 AS col2 FROM tab2 cor0
----
434
4836
4898

query I rowsort
SELECT DISTINCT - 60 AS col1 FROM tab0 cor0
----
-60

query I rowsort
SELECT ALL - - col1 * col0 + + 48 FROM tab1 AS cor0
----
1088
126
688

query I rowsort
SELECT 75 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

query I rowsort
SELECT + ( + tab2.col0 ) AS col0 FROM tab2
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * ( tab2.col1 ) * - col1 col0 FROM tab2
----
22831
271518
6727

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 61 col2 FROM tab0
----
61
61
61

query I rowsort
SELECT DISTINCT - + col0 * - col0 + + cor0.col2 AS col0 FROM tab0 AS cor0
----
1226
609
8003

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 98 col1 FROM tab1 cor0
----
98
98
98

query I rowsort
SELECT ALL - - 16 AS col1 FROM tab1 cor0
----
16
16
16

query I rowsort
SELECT DISTINCT + cor0.col0 + - ( col2 ) AS col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT 32 AS col0 FROM tab2, tab0 AS cor0
----
32

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4589
SELECT + CAST( NULL AS SIGNED ) + 33 * col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4589
SELECT + CAST ( NULL AS INTEGER ) + 33 * col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 29 * + cor0.col1 FROM tab1, tab0 AS cor0
----
2494
2639
2813

query I rowsort
SELECT + cor1.col2 AS col2 FROM tab0, tab1 AS cor0, tab0 AS cor1, tab1, tab2 AS cor2
----
243 values hashing to 291cdf20f55dc7bbcb55f561dc0b74d8

query I rowsort
SELECT DISTINCT 10 + - col2 FROM tab0 AS cor0
----
-23
-72
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4593
SELECT DISTINCT + + CAST( + 26 AS SIGNED ) FROM tab2 cor0
----
26

skipif mysql # not compatible
query I rowsort label-4593
SELECT DISTINCT + + CAST ( + 26 AS INTEGER ) FROM tab2 cor0
----
26

query I rowsort
SELECT ALL - 15 + 20 AS col1 FROM tab0 AS cor0
----
5
5
5

query I rowsort
SELECT - 41 - - col2 * - 1 AS col1 FROM tab0
----
-123
-42
-74

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4596
SELECT col1 + + col1 + + CAST( NULL AS DECIMAL ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4596
SELECT col1 + + col1 + + CAST ( NULL AS REAL ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 + col0 * - 0 FROM tab2
----
7
78
79

query I rowsort
SELECT DISTINCT + tab0.col2 + - col1 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT + tab2.col1 * 22 * cor1.col0 AS col2 FROM tab2, tab1, tab0 AS cor0, tab2 AS cor1
----
9 values hashing to c13d4f702f2efe82d56a5bcc7b4b1753

query I rowsort
SELECT ALL ( - col2 ) * col2 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT - 10 * - col0 + col0 + col2 FROM tab0 AS cor0
----
1061
297
386

query I rowsort
SELECT col1 * + col2 + - 32 * - 62 AS col1 FROM tab1
----
2554
3232
3388

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 82 + + col1 col2 FROM tab1
----
-56
-69
-72

query I rowsort
SELECT DISTINCT 41 + + col2 AS col2 FROM tab0
----
123
42
74

query I rowsort
SELECT DISTINCT cor0.col0 + - col2 AS col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ALL + + col0 * + col0 - - 23 FROM tab2 AS cor0
----
6107
6264
72

query I rowsort
SELECT col0 + + 23 FROM tab1 AS cor0
----
103
26
87

query I rowsort
SELECT ALL col1 + col0 - col0 AS col1 FROM tab1 AS cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * - col2 col2 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4610
SELECT - col0 * col2 * cor0.col0 + - col0 + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4610
SELECT - col0 * col2 * cor0.col0 + - col0 + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + col1 + + ( 30 ) FROM tab1 AS cor0
----
40
43
56

query I rowsort
SELECT 58 FROM tab1, tab1 AS cor0, tab0 cor1
----
27 values hashing to 9ee363c6ac19cfdb8a50c7dfd5cc2b8a

query I rowsort
SELECT DISTINCT - + col1 + - col1 * col2 AS col0 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT ALL - col0 + - cor0.col0 * cor0.col2 * - cor0.col2 FROM tab2 cor0
----
113997
5096
52650

query I rowsort
SELECT DISTINCT - 93 * - 51 AS col2 FROM tab0, tab2 AS cor0
----
4743

query I rowsort
SELECT col2 * col1 + - col1 * col0 FROM tab2 AS cor0
----
-3068
-697
620

query I rowsort
SELECT ALL + - col0 * - 14 FROM tab1 AS cor0
----
1120
42
896

query I rowsort
SELECT ALL col2 * - 88 AS col0 FROM tab0 cor0
----
-2904
-7216
-88

query I rowsort
SELECT DISTINCT + + col0 + ( 22 ) * - col1 FROM tab1 AS cor0
----
-156
-206
-569

query I rowsort
SELECT ALL - + ( + 37 ) + col0 FROM tab1 cor0
----
-34
27
43

onlyif mysql # use DIV operator for integer division
query I rowsort label-4621
SELECT DISTINCT col1 - 75 DIV col0 AS col1 FROM tab2 AS cor0
----
17
21
59

skipif mysql # not compatible
query I rowsort label-4621
SELECT DISTINCT col1 - 75 / col0 AS col1 FROM tab2 AS cor0
----
17
21
59

query I rowsort
SELECT - + ( 19 ) * col0 AS col2 FROM tab1 AS cor0
----
-1216
-1520
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-4623
SELECT DISTINCT + + col1 DIV - col2 - + col1 AS col0 FROM tab0 AS cor0
----
-194
-88
-92

skipif mysql # not compatible
query I rowsort label-4623
SELECT DISTINCT + + col1 / - col2 - + col1 AS col0 FROM tab0 AS cor0
----
-194
-88
-92

query I rowsort
SELECT + col0 * - col2 + + col0 * col1 FROM tab0
----
1272
3360
801

query I rowsort
SELECT ALL 16 FROM tab1 AS cor0
----
16
16
16

query I rowsort
SELECT 34 * + cor0.col0 + + col1 + + 89 AS col2 FROM tab1 AS cor0
----
217
2275
2822

query I rowsort
SELECT ALL + 15 + - col1 AS col2 FROM tab2 AS cor0
----
-16
-2
-44

query I rowsort
SELECT ALL + col2 + - col2 * cor0.col2 FROM tab0 AS cor0
----
-1056
-6642
0

query I rowsort
SELECT + + 69 + col0 * + ( 10 ) FROM tab2 cor0
----
139
849
859

query I rowsort
SELECT DISTINCT - 18 * + col1 FROM tab0 AS cor0
----
-1548
-1638
-1746

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 - - col0 col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL + col0 * - col1 AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL + col2 - + col0 * - col2 AS col0 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT ALL - ( col0 ) * - 7 FROM tab1 AS cor0
----
21
448
560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4635
SELECT + col2 + - col0 * CAST( + ( col1 ) AS SIGNED ) * CAST( 77 AS SIGNED ) col1 FROM tab1 AS cor0
----
-49223
-5952
-79984

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4635
SELECT + col2 + - col0 * CAST ( + ( col1 ) AS INTEGER ) * CAST ( 77 AS INTEGER ) col1 FROM tab1 AS cor0
----
-49223
-5952
-79984

query I rowsort
SELECT DISTINCT + + col1 * + col1 AS col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT DISTINCT + col1 * + cor0.col1 + - col0 AS col1 FROM tab0 cor0
----
7372
8192
9374

query I rowsort
SELECT - col0 * + col2 * col0 FROM tab0
----
-1225
-19008
-649522

query I rowsort
SELECT DISTINCT - 53 - + col0 FROM tab2
----
-131
-132
-60

query I rowsort
SELECT DISTINCT + - cor0.col0 + - col0 AS col1 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT ALL + col2 + - cor0.col1 + 19 AS col0 FROM tab0 AS cor0
----
-34
-77
10

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4642
SELECT 23 + + col1 * - CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4642
SELECT 23 + + col1 * - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 84 + + col0 FROM tab0
----
-49
-60
5

query I rowsort
SELECT ALL + ( + col2 ) + - ( 44 ) FROM tab2
----
-17
-18
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-4645
SELECT + + col0 + + CAST( cor0.col0 AS SIGNED ) * - col2 + col1 DIV + col0 FROM tab1 AS cor0
----
-151
-3584
-7600

skipif mysql # not compatible
query I rowsort label-4645
SELECT + + col0 + + CAST ( cor0.col0 AS INTEGER ) * - col2 + col1 / + col0 FROM tab1 AS cor0
----
-151
-3584
-7600

query I rowsort
SELECT + col0 + + col2 AS col1 FROM tab0 cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-4647
SELECT DISTINCT tab1.col1 DIV 34 AS col1 FROM tab1, tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4647
SELECT DISTINCT tab1.col1 / 34 AS col1 FROM tab1, tab1 AS cor0
----
0

query I rowsort
SELECT ALL - 48 + - col2 * - ( col2 ) FROM tab0 AS cor0
----
-47
1041
6676

onlyif mysql # use DIV operator for integer division
query I rowsort label-4649
SELECT DISTINCT + cor0.col1 + - col1 * col0 DIV + col0 + + col1 * CAST( col1 AS SIGNED ) FROM tab0 AS cor0
----
7396
8281
9409

skipif mysql # not compatible
query I rowsort label-4649
SELECT DISTINCT + cor0.col1 + - col1 * col0 / + col0 + + col1 * CAST ( col1 AS INTEGER ) FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT - col1 * - 40 FROM tab0 AS cor0
----
3440
3640
3880

query I rowsort
SELECT - + 70 * - 81 + - col0 AS col1 FROM tab2 AS cor0
----
5591
5592
5663

query I rowsort
SELECT DISTINCT + + 78 FROM tab2 AS cor0
----
78

query I rowsort
SELECT - + 69 * + col2 AS col2 FROM tab2 AS cor0
----
-1794
-1863
-2622

query I rowsort
SELECT DISTINCT 19 AS col0 FROM tab1 AS cor0
----
19

onlyif mysql # use DIV operator for integer division
query I rowsort label-4655
SELECT - ( col2 ) * col2 DIV - ( col1 ) FROM tab1 AS cor0
----
112
324
708

skipif mysql # not compatible
query I rowsort label-4655
SELECT - ( col2 ) * col2 / - ( col1 ) FROM tab1 AS cor0
----
112
324
708

query I rowsort
SELECT + + 57 AS col1 FROM tab1 AS cor0
----
57
57
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-4657
SELECT - cor0.col0 + col0 * col1 DIV col1 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4657
SELECT - cor0.col0 + col0 * col1 / col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - 77 FROM tab0, tab0 AS cor0
----
9 values hashing to 3a24155cb91ceff1e67bb51c07b72107

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4659
SELECT + CAST( ( col2 ) AS SIGNED ) AS col0 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-4659
SELECT + CAST ( ( col2 ) AS INTEGER ) AS col0 FROM tab2
----
26
27
38

query I rowsort
SELECT + cor0.col2 * - col0 + 44 FROM tab1 AS cor0
----
-118
-3604
-7636

query I rowsort
SELECT 29 * col1 FROM tab1
----
290
377
754

onlyif mysql # use DIV operator for integer division
query I rowsort label-4662
SELECT - col1 DIV col0 + CAST( + col0 AS SIGNED ) FROM tab0
----
21
33
88

skipif mysql # not compatible
query I rowsort label-4662
SELECT - col1 / col0 + CAST ( + col0 AS INTEGER ) FROM tab0
----
21
33
88

query I rowsort
SELECT - tab1.col0 + col1 * - col2 FROM tab1
----
-1328
-1407
-634

query I rowsort
SELECT 68 AS col1 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 10aa25f1c6b97582c34521ac6452e0b4

query I rowsort
SELECT - 32 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 7106326ae056e78044adc0aef747ef08

query I rowsort
SELECT DISTINCT col2 - col2 FROM tab2 AS cor0
----
0

query I rowsort
SELECT - col2 + + ( col2 ) * - col2 FROM tab1 AS cor0
----
-2970
-3306
-9312

query I rowsort
SELECT ALL 20 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

query I rowsort
SELECT col1 * - 85 * tab1.col1 FROM tab1
----
-14365
-57460
-8500

query I rowsort
SELECT + 88 - cor0.col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 718ef8882c769380c0952623139438fc

query I rowsort
SELECT ALL - - 21 + + ( col2 ) FROM tab2 AS cor0
----
47
48
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 19 col0 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

query I rowsort
SELECT col1 * 32 FROM tab0 AS cor0
----
2752
2912
3104

query I rowsort
SELECT DISTINCT + - 28 FROM tab0 AS cor0
----
-28

query I rowsort
SELECT + ( col1 ) * col2 * col2 AS col0 FROM tab0 AS cor0
----
611884
93654
97

query I rowsort
SELECT - 32 * + 76 FROM tab1 AS cor0
----
-2432
-2432
-2432

query I rowsort
SELECT - 69 + - col1 AS col1 FROM tab0 AS cor0
----
-155
-160
-166

query I rowsort
SELECT + - 63 * + col0 - ( col2 ) AS col0 FROM tab2 AS cor0
----
-468
-4940
-5015

query I rowsort
SELECT col0 + col2 * + 19 FROM tab0 AS cor0
----
1647
54
651

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4680
SELECT + col1 * CAST( NULL AS SIGNED ) + + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4680
SELECT + col1 * CAST ( NULL AS INTEGER ) + + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 50 * col2 FROM tab0
----
-1650
-4100
-50

query I rowsort
SELECT ALL + + col1 + + col1 * col1 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT + col1 * - col2 AS col1 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT + col1 + 41 * col0 FROM tab0 AS cor0
----
1070
1532
3740

query I rowsort
SELECT DISTINCT + 14 + + col2 * cor0.col0 FROM tab2 AS cor0
----
203
2042
3016

query I rowsort
SELECT ALL col2 * col2 * 99 FROM tab1 AS cor0
----
288684
321651
912384

query I rowsort
SELECT col1 * col1 AS col1 FROM tab2 cor0
----
289
3481
961

query I rowsort
SELECT + 42 + + col2 * - cor0.col1 FROM tab1 AS cor0
----
-1206
-1362
-528

query I rowsort
SELECT ALL - 37 AS col1 FROM tab2 AS cor0
----
-37
-37
-37

query I rowsort
SELECT ALL + col0 * col1 * + 79 AS col0 FROM tab1 AS cor0
----
50560
6162
82160

query I rowsort
SELECT ALL - 25 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 40ac8fd000b2e49317aed2411077839e

query I rowsort
SELECT tab0.col1 * - col1 - col1 FROM tab0
----
-7482
-8372
-9506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 * 72 col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 7d4ec77d4c9012b9f428488f271ccb63

onlyif mysql # use DIV operator for integer division
query I rowsort label-4694
SELECT col1 DIV + tab1.col1 + 82 * - col1 FROM tab1
----
-1065
-2131
-819

skipif mysql # not compatible
query I rowsort label-4694
SELECT col1 / + tab1.col1 + 82 * - col1 FROM tab1
----
-1065
-2131
-819

query I rowsort
SELECT col2 * - 44 AS col2 FROM tab0 AS cor0
----
-1452
-3608
-44

query I rowsort
SELECT tab0.col2 FROM tab0, tab1, tab0 cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT col0 * + col1 + col1 AS col0 FROM tab2
----
1360
248
4661

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4698
SELECT ALL CAST( 41 AS SIGNED ) FROM tab2, tab2 AS cor0
----
9 values hashing to 5b18986bb294412b3d9f07b7e6fc821e

skipif mysql # not compatible
query I rowsort label-4698
SELECT ALL CAST ( 41 AS INTEGER ) FROM tab2, tab2 AS cor0
----
9 values hashing to 5b18986bb294412b3d9f07b7e6fc821e

query I rowsort
SELECT ALL + col0 + + cor0.col0 AS col0 FROM tab1 cor0
----
128
160
6

query I rowsort
SELECT + + col2 + + col2 * col1 FROM tab0 AS cor0
----
2871
7544
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-4701
SELECT ALL - ( - 45 ) DIV + col1 - - CAST( + col1 AS SIGNED ) FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-4701
SELECT ALL - ( - 45 ) / + col1 - - CAST ( + col1 AS INTEGER ) FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT + col0 + 16 FROM tab2 AS cor0
----
23
94
95

query I rowsort
SELECT DISTINCT - ( cor0.col1 ) * - col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT col1 * ( + tab1.col2 ) AS col0 FROM tab1
----
1248
1404
570

query I rowsort
SELECT col0 + + 8 FROM tab0
----
32
43
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + col2 + + col2 col0 FROM tab1
----
111
178
272

query I rowsort
SELECT ALL 2 FROM tab0, tab1 AS cor0
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

query I rowsort
SELECT ALL - 17 * col0 AS col1 FROM tab2 AS cor0
----
-119
-1326
-1343

query I rowsort
SELECT DISTINCT - 17 * col2 AS col0 FROM tab0 cor0
----
-1394
-17
-561

query I rowsort
SELECT - + col2 * 88 AS col1 FROM tab0 AS cor0
----
-2904
-7216
-88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4711
SELECT - + CAST( - col1 AS SIGNED ) * col1 * CAST( col2 AS SIGNED ) FROM tab1 AS cor0
----
16224
36504
5700

skipif mysql # not compatible
query I rowsort label-4711
SELECT - + CAST ( - col1 AS INTEGER ) * col1 * CAST ( col2 AS INTEGER ) FROM tab1 AS cor0
----
16224
36504
5700

query I rowsort
SELECT ALL col0 * - col0 * - col0 - + col0 AS col1 FROM tab1 AS cor0
----
24
262080
511920

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4713
SELECT + - CAST( NULL AS SIGNED ) * - col2 * cor0.col1 + + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4713
SELECT + - CAST ( NULL AS INTEGER ) * - col2 * cor0.col1 + + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 * + 86 AS col0 FROM tab2
----
1462
2666
5074

onlyif mysql # use DIV operator for integer division
query I rowsort label-4715
SELECT 62 + - 84 DIV + col1 + + col0 FROM tab1
----
118
136
62

skipif mysql # not compatible
query I rowsort label-4715
SELECT 62 + - 84 / + col1 + + col0 FROM tab1
----
118
136
62

query I rowsort
SELECT DISTINCT col0 * + col2 + col0 AS col1 FROM tab2
----
196
2106
3081

query I rowsort
SELECT DISTINCT col1 + col2 * + col1 FROM tab2
----
1593
663
868

query I rowsort
SELECT col1 * 24 FROM tab2
----
1416
408
744

onlyif mysql # use DIV operator for integer division
query I rowsort label-4719
SELECT + - cor0.col1 DIV col0 + - col0 AS col1 FROM tab2 AS cor0
----
-11
-78
-79

skipif mysql # not compatible
query I rowsort label-4719
SELECT + - cor0.col1 / col0 + - col0 AS col1 FROM tab2 AS cor0
----
-11
-78
-79

query I rowsort
SELECT DISTINCT 6 + col0 FROM tab1 AS cor0
----
70
86
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-4721
SELECT + 14 DIV - tab1.col0 AS col2 FROM tab1
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-4721
SELECT + 14 / - tab1.col0 AS col2 FROM tab1
----
-4
0
0

query I rowsort
SELECT col2 * + 29 + - col0 AS col1 FROM tab1
----
1563
1589
2704

query I rowsort
SELECT DISTINCT 88 + - col2 FROM tab2
----
50
61
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col0 + - cor0.col2 col0 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT - 34 AS col1 FROM tab1 AS cor0
----
-34
-34
-34

onlyif mysql # use DIV operator for integer division
query I rowsort label-4726
SELECT ALL - - col1 * col2 DIV - col0 - cor0.col2 * + col1 AS col1 FROM tab0 AS cor0
----
-2956
-7545
-99

skipif mysql # not compatible
query I rowsort label-4726
SELECT ALL - - col1 * col2 / - col0 - cor0.col2 * + col1 AS col1 FROM tab0 AS cor0
----
-2956
-7545
-99

query I rowsort
SELECT ALL cor0.col1 + col1 AS col2 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT ALL - 63 * cor0.col0 - - col1 * col0 AS col1 FROM tab1 cor0
----
-111
-3392
-4000

query I rowsort
SELECT DISTINCT - + col0 * - col2 AS col2 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-4730
SELECT ALL + col1 DIV col1 + CAST( - col1 AS SIGNED ) + col1 AS col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4730
SELECT ALL + col1 / col1 + CAST ( - col1 AS INTEGER ) + col1 AS col1 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT cor0.col0 - col1 AS col0 FROM tab0 cor0
----
-2
-62

query I rowsort
SELECT DISTINCT + - col2 * + col1 FROM tab1 cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-4733
SELECT DISTINCT - + col2 + col1 * col2 DIV - col2 + col2 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-4733
SELECT DISTINCT - + col2 + col1 * col2 / - col2 + col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT + 62 + + col1 * col0 AS col2 FROM tab1 cor0
----
1102
140
702

query I rowsort
SELECT ALL + ( col1 ) + col2 FROM tab0
----
119
173
98

query I rowsort
SELECT 38 + col2 FROM tab2 cor0
----
64
65
76

query I rowsort
SELECT - 31 + - col2 FROM tab1 AS cor0
----
-127
-85
-88

query I rowsort
SELECT ALL + col0 * + col0 * + col0 FROM tab0 AS cor0
----
13824
42875
704969

onlyif mysql # use DIV operator for integer division
query I rowsort label-4739
SELECT - col1 * - col0 + ( col2 ) + col2 DIV - 61 AS col1 FROM tab2 AS cor0
----
1381
244
4628

skipif mysql # not compatible
query I rowsort label-4739
SELECT - col1 * - col0 + ( col2 ) + col2 / - 61 AS col1 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT ALL col1 * ( + 19 + col0 ) FROM tab0 AS cor0
----
3698
5238
9828

query I rowsort
SELECT cor1.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

onlyif mysql # use DIV operator for integer division
query I rowsort label-4742
SELECT col0 + 52 DIV cor0.col1 FROM tab2 AS cor0
----
78
8
82

skipif mysql # not compatible
query I rowsort label-4742
SELECT col0 + 52 / cor0.col1 FROM tab2 AS cor0
----
78
8
82

query I rowsort
SELECT - + cor0.col2 * 46 AS col2 FROM tab2 AS cor0
----
-1196
-1242
-1748

query I rowsort
SELECT DISTINCT col2 + col0 AS col2 FROM tab0 cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-4745
SELECT - - cor0.col2 DIV - 28 AS col1 FROM tab0 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-4745
SELECT - - cor0.col2 / - 28 AS col1 FROM tab0 AS cor0
----
-1
-2
0

query I rowsort
SELECT - col1 * ( + col2 ) FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL cor0.col2 + ( 78 ) FROM tab0 AS cor0
----
111
160
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4748
SELECT DISTINCT col0 + CAST( NULL AS SIGNED ) + - col2 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4748
SELECT DISTINCT col0 + CAST ( NULL AS INTEGER ) + - col2 FROM tab0 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * cor0.col1 col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL - + col0 * 72 * + cor0.col0 + + cor0.col0 FROM tab2 AS cor0
----
-3521
-437970
-449273

query I rowsort
SELECT DISTINCT + col0 - col0 FROM tab2 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4752
SELECT + cor0.col0 + + col0 DIV + col0 FROM tab2 AS cor0
----
79
8
80

skipif mysql # not compatible
query I rowsort label-4752
SELECT + cor0.col0 + + col0 / + col0 FROM tab2 AS cor0
----
79
8
80

query I rowsort
SELECT DISTINCT + + col1 * - cor0.col2 + + cor0.col2 FROM tab2 AS cor0
----
-1508
-608
-810

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4754
SELECT DISTINCT - col0 * + CAST( col1 AS SIGNED ) + cor0.col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

skipif mysql # not compatible
query I rowsort label-4754
SELECT DISTINCT - col0 * + CAST ( col1 AS INTEGER ) + cor0.col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT ALL - 7 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to ba940cd66e21e94e95aada5f28e1faf5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4756
SELECT - col1 + - col2 - + col2 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4756
SELECT - col1 + - col2 - + col2 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 * col1 - col0 AS col1 FROM tab2 AS cor0
----
-1422
-224
-4680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 28 * + col1 - - cor0.col0 col2 FROM tab0 AS cor0
----
2432
2637
2751

query I rowsort
SELECT cor0.col1 - + col1 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + ( col0 ) * + col2 AS col0 FROM tab1 cor0
----
162
3648
7680

skipif mysql # not compatible
query I rowsort
SELECT - col2 * ( col1 ) + CAST ( - col2 AS REAL ) FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT ALL - 29 FROM tab1, tab2 AS cor0
----
9 values hashing to 0cc9ddad93fc783055518ae4b6be054b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4763
SELECT tab1.col1 + CAST( NULL AS SIGNED ) * col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4763
SELECT tab1.col1 + CAST ( NULL AS INTEGER ) * col0 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4764
SELECT col2 DIV ( + col0 ) - col0 FROM tab0
----
-23
-35
-89

skipif mysql # not compatible
query I rowsort label-4764
SELECT col2 / ( + col0 ) - col0 FROM tab0
----
-23
-35
-89

query I rowsort
SELECT ALL + 81 + - tab2.col2 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 99eaf23c5d57d438983003e2126feac2

query I rowsort
SELECT + col1 * - col1 * col2 FROM tab1 cor0
----
-16224
-36504
-5700

query I rowsort
SELECT DISTINCT col2 * + col2 * - col2 AS col1 FROM tab2
----
-17576
-19683
-54872

query I rowsort
SELECT 49 AS col2 FROM tab1
----
49
49
49

query I rowsort
SELECT - - 8 * + col0 AS col0 FROM tab1 cor0
----
24
512
640

query I rowsort
SELECT + col2 * col0 + - 39 FROM tab0 AS cor0
----
-4
7259
753

query I rowsort
SELECT col2 + 86 * cor0.col1 AS col1 FROM tab0 cor0
----
7429
7908
8343

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4772
SELECT DISTINCT - CAST( NULL AS SIGNED ) / - col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4772
SELECT DISTINCT - CAST ( NULL AS INTEGER ) / - col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT col2 * 12 FROM tab0 AS cor0
----
12
396
984

query I rowsort
SELECT ALL 92 AS col2 FROM tab1 AS cor0
----
92
92
92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4775
SELECT + + CAST( - 96 AS SIGNED ) + + col1 + col0 FROM tab0 AS cor0
----
14
36
84

skipif mysql # not compatible
query I rowsort label-4775
SELECT + + CAST ( - 96 AS INTEGER ) + + col1 + col0 FROM tab0 AS cor0
----
14
36
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-4776
SELECT + + col2 + col2 DIV col2 AS col2 FROM tab1 AS cor0
----
55
58
97

skipif mysql # not compatible
query I rowsort label-4776
SELECT + + col2 + col2 / col2 AS col2 FROM tab1 AS cor0
----
55
58
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 28 col0 FROM tab0 AS cor0
----
-28
-28
-28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 + col1 * - col2 col2 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT ALL col1 * + cor0.col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT + col2 * + 50 * col1 AS col1 FROM tab2 cor0
----
32300
41850
76700

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4781
SELECT - + CAST( NULL AS SIGNED ) * + cor0.col2 + + col1 * - col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4781
SELECT - + CAST ( NULL AS INTEGER ) * + cor0.col2 + + col1 * - col1 FROM tab0 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4782
SELECT - + ( + col1 ) * - col1 + - CAST( col0 AS SIGNED ) FROM tab1 AS cor0
----
36
673
89

skipif mysql # not compatible
query I rowsort label-4782
SELECT - + ( + col1 ) * - col1 + - CAST ( col0 AS INTEGER ) FROM tab1 AS cor0
----
36
673
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-4783
SELECT + 78 DIV col0 + col1 FROM tab2 AS cor0
----
17
42
60

skipif mysql # not compatible
query I rowsort label-4783
SELECT + 78 / col0 + col1 FROM tab2 AS cor0
----
17
42
60

query I rowsort
SELECT 49 + + col2 * col2 FROM tab1 AS cor0
----
2965
3298
9265

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0 CROSS JOIN tab1, tab0 cor1, tab1 AS cor2
----
3645 values hashing to f464d40c605db608927f2c4d66190a23

query I rowsort
SELECT + 55 + col0 * col2 FROM tab2 AS cor0
----
2083
244
3057

query I rowsort
SELECT 21 * col0 + + 59 * col0 * - cor0.col2 + cor0.col1 AS col2 FROM tab0 AS cor0
----
-1233
-428622
-46138

query I rowsort
SELECT DISTINCT - cor0.col2 + - col0 + - 73 FROM tab0 AS cor0
----
-109
-130
-244

query I rowsort
SELECT + col0 + + col1 * + 19 AS col1 FROM tab1 cor0
----
254
327
497

onlyif mysql # use DIV operator for integer division
query I rowsort label-4790
SELECT - + col1 * + col1 + + 18 DIV - 54 + - col0 FROM tab2 AS cor0
----
-3559
-368
-968

skipif mysql # not compatible
query I rowsort label-4790
SELECT - + col1 * + col1 + + 18 / - 54 + - col0 FROM tab2 AS cor0
----
-3559
-368
-968

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * col2 col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL - col2 * + col2 + ( 30 ) AS col2 FROM tab1 AS cor0
----
-2886
-3219
-9186

query I rowsort
SELECT + 66 + col0 + + col1 * - cor0.col1 AS col1 FROM tab0 AS cor0
----
-7306
-8126
-9308

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 59 col2 FROM tab0 AS cor0
----
-59
-59
-59

query I rowsort
SELECT + col1 * - col2 + - 62 + - col2 AS col0 FROM tab0 AS cor0
----
-160
-2933
-7606

onlyif mysql # use DIV operator for integer division
query I rowsort label-4796
SELECT ( col1 ) DIV col1 col1 FROM tab2 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4796
SELECT ( col1 ) / col1 col1 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT 64 * + 80 FROM tab1
----
5120
5120
5120

query I rowsort
SELECT + + col0 + col1 * cor0.col1 FROM tab1 cor0
----
164
249
679

query I rowsort
SELECT ALL + ( + col1 ) * - ( + col2 ) AS col0 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL + - col0 * col0 + + col2 AS col0 FROM tab0 AS cor0
----
-1224
-543
-7839

query I rowsort
SELECT 63 * - cor0.col1 + - ( - col0 ) * - col1 AS col0 FROM tab0 AS cor0
----
-13832
-7482
-9506

query I rowsort
SELECT ALL col0 * - col1 + col2 * + col2 * - cor0.col1 + - col0 FROM tab1 AS cor0
----
-120928
-33194
-75897

query I rowsort
SELECT - + col1 * + cor0.col2 + - 52 AS col0 FROM tab0 AS cor0
----
-149
-2890
-7514

query I rowsort
SELECT ALL + 15 + col1 AS col2 FROM tab2 cor0
----
32
46
74

query I rowsort
SELECT - col1 * 62 AS col0 FROM tab2
----
-1054
-1922
-3658

onlyif mysql # use DIV operator for integer division
query I rowsort label-4806
SELECT ALL + col1 DIV col1 + + CAST( col1 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-4806
SELECT ALL + col1 / col1 + + CAST ( col1 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
87
92
98

query I rowsort
SELECT ALL 7 FROM tab2, tab1 AS cor0
----
9 values hashing to 3362c0cb2b2c663037159d0699d46b76

query I rowsort
SELECT DISTINCT + col0 * + col0 + ( - col2 ) * col1 FROM tab0
----
-2262
1128
459

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4809
SELECT + 84 * col2 + CAST( + col1 AS SIGNED ) FROM tab2 AS cor0
----
2243
2299
3209

skipif mysql # not compatible
query I rowsort label-4809
SELECT + 84 * col2 + CAST ( + col1 AS INTEGER ) FROM tab2 AS cor0
----
2243
2299
3209

query I rowsort
SELECT - ( 85 ) - col0 FROM tab2 AS cor0
----
-163
-164
-92

onlyif mysql # use DIV operator for integer division
query I rowsort label-4811
SELECT DISTINCT + cor1.col0 DIV 71 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
0
1

skipif mysql # not compatible
query I rowsort label-4811
SELECT DISTINCT + cor1.col0 / 71 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
0
1

query I rowsort
SELECT - + col0 * 79 - - cor0.col0 AS col0 FROM tab2 AS cor0
----
-546
-6084
-6162

query I rowsort
SELECT DISTINCT - 68 + - col2 FROM tab1 AS cor0
----
-122
-125
-164

query I rowsort
SELECT col0 + 53 FROM tab0 AS cor0
----
142
77
88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4815
SELECT ALL - CAST( NULL AS SIGNED ) - + col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4815
SELECT ALL - CAST ( NULL AS INTEGER ) - + col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 83 FROM tab2, tab2 AS cor0
----
9 values hashing to d55748f39f403ec273099c0d87b0bfbb

query I rowsort
SELECT DISTINCT - 1 - col2 AS col2 FROM tab0
----
-2
-34
-83

query I rowsort
SELECT col1 + + col1 + col1 FROM tab2
----
177
51
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 20 col1 FROM tab2
----
20
20
20

query I rowsort
SELECT ALL - col0 + 32 - + col1 AS col1 FROM tab0
----
-100
-148
-78

query I rowsort
SELECT ( - col2 ) - col0 AS col1 FROM tab1 cor0
----
-121
-176
-57

query I rowsort
SELECT - + ( col1 ) * + cor0.col1 * + ( - col2 ) + col0 AS col0 FROM tab0 cor0
----
244092
679131
9444

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col1 * + col2 col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL cor1.col2 * cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 16ae0e1090cb09b93854a4788f17716b

query I rowsort
SELECT ALL tab2.col2 + 32 * + col2 + + col1 AS col0 FROM tab2
----
1271
917
922

query I rowsort
SELECT DISTINCT + 92 FROM tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
92

query I rowsort
SELECT ALL + col2 + 71 FROM tab0
----
104
153
72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4828
SELECT - cor0.col1 + CAST( col1 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4828
SELECT - cor0.col1 + CAST ( col1 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - cor0.col2 * col1 + col1 AS col2 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT - col0 * 11 AS col0 FROM tab0 cor0
----
-264
-385
-979

query I rowsort
SELECT ALL + col0 + - 83 AS col2 FROM tab0 AS cor0
----
-48
-59
6

query I rowsort
SELECT DISTINCT - - cor0.col0 * + col1 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - + col1 * + ( - cor0.col1 ) * + cor0.col1 AS col0 FROM tab0 AS cor0
----
636056
753571
912673

query I rowsort
SELECT + cor0.col1 + - ( + cor0.col0 ) AS col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT + col0 - + ( col0 ) * + cor0.col2 AS col1 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT ALL + + col1 * col1 AS col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT ALL + + ( col1 ) + col1 AS col0 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT + cor0.col2 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT DISTINCT - 36 FROM tab2, tab0 AS cor0, tab1 AS cor1, tab1 AS cor2
----
-36

onlyif mysql # use DIV operator for integer division
query I rowsort label-4840
SELECT ALL + col2 DIV 70 - - col1 AS col1 FROM tab1 AS cor0
----
10
14
26

skipif mysql # not compatible
query I rowsort label-4840
SELECT ALL + col2 / 70 - - col1 AS col1 FROM tab1 AS cor0
----
10
14
26

query I rowsort
SELECT DISTINCT - - 65 * cor0.col1 AS col0 FROM tab2 AS cor0
----
1105
2015
3835

query I rowsort
SELECT - - col2 + 33 AS col1 FROM tab1 cor0
----
129
87
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col1 * col2 col1 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT DISTINCT - 87 + col1 * col2 FROM tab2 AS cor0
----
1447
559
750

query I rowsort
SELECT ALL - 60 + - col2 * - col2 AS col2 FROM tab2 AS cor0
----
1384
616
669

query I rowsort
SELECT ALL + + cor0.col2 - col1 AS col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT + 40 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

query I rowsort
SELECT tab1.col1 * + tab1.col1 + col0 AS col2 FROM tab1
----
164
249
679

query I rowsort
SELECT DISTINCT + col2 + col1 AS col2 FROM tab0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 * col1 col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT - 99 * + col1 FROM tab2 AS cor0
----
-1683
-3069
-5841

query I rowsort
SELECT - + 49 * + col0 FROM tab1 AS cor0
----
-147
-3136
-3920

query I rowsort
SELECT ALL + - cor0.col0 + - cor0.col0 AS col1 FROM tab2 cor0
----
-14
-156
-158

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab0 AS cor2
----
3645 values hashing to 38dccc9c32724260ec175f754830d863

query I rowsort
SELECT ALL cor0.col1 * cor0.col2 FROM tab0, tab2 AS cor0
----
9 values hashing to f5605ce6cbd6ecc79a4a887488bb6947

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - col1 + - 71 * col0 col2 FROM tab0 AS cor0
----
-14418
-3768
-5880

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 - tab0.col2 col0 FROM tab0
----
53
9
96

query I rowsort
SELECT DISTINCT + 65 AS col1 FROM tab1, tab2, tab2 AS cor0
----
65

query I rowsort
SELECT DISTINCT col0 + tab2.col1 * col0 * - col0 - tab2.col0 FROM tab2
----
-106097
-1519
-358956

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4860
SELECT - + col2 + CAST( NULL AS SIGNED ) / 87 + - col1 * + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4860
SELECT - + col2 + CAST ( NULL AS INTEGER ) / 87 + - col1 * + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - col1 + + col1 * col2 AS col2 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT - col2 * + 9 FROM tab0 cor0
----
-297
-738
-9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4863
SELECT ALL + - col2 * + CAST( - col1 + col1 AS SIGNED ) col0 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4863
SELECT ALL + - col2 * + CAST ( - col1 + col1 AS INTEGER ) col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - - col1 + - cor0.col0 * 82 * - col0 AS col0 FROM tab1 AS cor0
----
335882
524813
764

query I rowsort
SELECT ALL 5 * + col0 AS col2 FROM tab1
----
15
320
400

query I rowsort
SELECT ALL + 74 * - col0 + - col2 - - 54 FROM tab2
----
-491
-5744
-5830

query I rowsort
SELECT ALL - 62 + col2 - + tab2.col1 AS col1 FROM tab2
----
-41
-66
-95

query I rowsort
SELECT ALL - cor0.col1 FROM tab1, tab0, tab2 cor0
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT + tab0.col2 * - cor0.col0 AS col0 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 730403255d59bd0bae6b3991e182991d

query I rowsort
SELECT col2 + ( 99 ) AS col0 FROM tab2
----
125
126
137

query I rowsort
SELECT ALL - 29 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 56a8aa9e4c5d3c934d1853afeb22653e

query I rowsort
SELECT + col0 * + col0 * 86 AS col1 FROM tab2
----
4214
523224
536726

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4873
SELECT - col2 * CAST( 73 AS SIGNED ) AS col1 FROM tab1
----
-3942
-4161
-7008

skipif mysql # not compatible
query I rowsort label-4873
SELECT - col2 * CAST ( 73 AS INTEGER ) AS col1 FROM tab1
----
-3942
-4161
-7008

onlyif mysql # use DIV operator for integer division
query I rowsort label-4874
SELECT ALL col1 + col0 * 51 DIV + col0 AS col1 FROM tab0
----
137
142
148

skipif mysql # not compatible
query I rowsort label-4874
SELECT ALL col1 + col0 * 51 / + col0 AS col1 FROM tab0
----
137
142
148

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 26 col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 2d1c3129ed17fd721d4876b21c035584

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4876
SELECT DISTINCT + col2 * + CAST( NULL AS SIGNED ) / - col0 + - col0 + + col1 AS col0 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-4876
SELECT DISTINCT + col2 * + CAST ( NULL AS INTEGER ) / - col0 + - col0 + + col1 AS col0 FROM tab2
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4877
SELECT ALL - col1 DIV - col0 FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-4877
SELECT ALL - col1 / - col0 FROM tab1 AS cor0
----
0
0
8

query I rowsort
SELECT DISTINCT + col2 + cor0.col1 AS col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT + - col0 * col1 + col0 AS col1 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT DISTINCT - + col0 + 62 FROM tab1 AS cor0
----
-18
-2
59

query I rowsort
SELECT - - cor0.col0 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - 26 col0 FROM tab0
----
-2132
-26
-858

query I rowsort
SELECT + 22 * col1 * + col1 FROM tab2
----
21142
6358
76582

query I rowsort
SELECT DISTINCT + ( + col1 + col1 ) FROM tab1
----
20
26
52

query I rowsort
SELECT ( col0 ) * col1 + - col1 * + 90 * col0 FROM tab2
----
-119527
-19313
-409578

query I rowsort
SELECT + + 15 AS col2 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 71dda9a71fc978ea7b0ac5d8cd2ef1f0

query I rowsort
SELECT col0 + - col0 * tab2.col2 AS col1 FROM tab2
----
-182
-1950
-2923

query I rowsort
SELECT ALL 42 * - col0 * - col1 FROM tab1
----
26880
3276
43680

query I rowsort
SELECT ALL - + col2 + col1 + col0 FROM tab2 AS cor0
----
11
111
58

query I rowsort
SELECT DISTINCT 54 * + col0 + + col2 FROM tab2 cor0
----
405
4238
4304

query I rowsort
SELECT + + ( col2 ) + col2 AS col1 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL + + 97 - col1 AS col0 FROM tab0 AS cor0
----
0
11
6

query I rowsort
SELECT DISTINCT - col2 + col0 * col0 FROM tab0 AS cor0
----
1224
543
7839

query I rowsort
SELECT ALL col1 * - col2 + - 34 AS col0 FROM tab2 AS cor0
----
-1568
-680
-871

query I rowsort
SELECT DISTINCT + 83 * - col2 FROM tab2 AS cor0
----
-2158
-2241
-3154

query I rowsort
SELECT ( + cor0.col1 ) + + col0 * 59 AS col1 FROM tab2 AS cor0
----
444
4661
4678

query I rowsort
SELECT 41 FROM tab1 cor0
----
41
41
41

query I rowsort
SELECT ALL - + ( - col1 ) * 75 + col1 AS col2 FROM tab1 AS cor0
----
1976
760
988

query I rowsort
SELECT 37 * col1 AS col2 FROM tab2 AS cor0
----
1147
2183
629

query I rowsort
SELECT DISTINCT - - ( cor0.col1 ) - cor0.col0 AS col2 FROM tab2 cor0
----
-19
-62
24

query I rowsort
SELECT + col0 + - col1 * cor0.col2 FROM tab1 cor0
----
-1168
-1401
-506

query I rowsort
SELECT ALL - col1 - + tab1.col1 AS col1 FROM tab1 WHERE + col2 * col2 <= NULL AND NOT + col1 * - col2 NOT IN ( col2 )
----

query I rowsort
SELECT - - col0 * - col0 AS col0 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT col2 * - col2 * col2 AS col1 FROM tab2
----
-17576
-19683
-54872

onlyif mysql # use DIV operator for integer division
query I rowsort label-4905
SELECT + cor0.col0 DIV - col0 + + col0 FROM tab2 AS cor0
----
6
77
78

skipif mysql # not compatible
query I rowsort label-4905
SELECT + cor0.col0 / - col0 + + col0 FROM tab2 AS cor0
----
6
77
78

query I rowsort
SELECT + col1 * - cor0.col1 + cor0.col2 FROM tab1 AS cor0
----
-43
-622
-73

query III rowsort
SELECT * FROM tab0 cor0 WHERE ( + col0 ) < NULL OR ( NULL ) NOT IN ( + col2 )
----

query I rowsort
SELECT col2 * cor0.col0 + col1 AS col2 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT + + col2 * cor0.col1 * col1 AS col0 FROM tab1 AS cor0
----
16224
36504
5700

query I rowsort
SELECT + 30 * - col0 FROM tab1
----
-1920
-2400
-90

onlyif mysql # use DIV operator for integer division
query I rowsort label-4911
SELECT + col0 + col0 DIV col1 AS col2 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-4911
SELECT + col0 + col0 / col1 AS col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT + 69 + - col1 AS col1 FROM tab0 AS cor0
----
-17
-22
-28

query I rowsort
SELECT ALL - - 34 AS col1 FROM tab1 AS cor0
----
34
34
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 - col2 col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT + 95 FROM tab0 cor0
----
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col0 FROM tab0, tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT - + col2 + cor0.col2 AS col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT + + col1 * + cor0.col2 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT ALL col2 FROM tab1 WHERE col2 - - col0 NOT IN ( col0 )
----
54
57
96

query I rowsort
SELECT ALL - col0 + - col2 + + col1 AS col2 FROM tab1
----
-111
-163
-31

query I rowsort
SELECT col1 AS col2 FROM tab0 WHERE NOT col1 + col1 + col0 BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT col2 * col0 * + tab2.col0 AS col0 FROM tab2
----
1323
158184
237158

query I rowsort
SELECT DISTINCT - col1 + col1 * + col2 + - col2 * - col2 AS col2 FROM tab1
----
10451
3809
4294

query I rowsort
SELECT col0 + + col1 * col0 + tab0.col0 FROM tab0
----
2112
3465
8277

query I rowsort
SELECT ALL col0 * + tab1.col1 + col2 * col2 * + col1 + col0 * col2 FROM tab1
----
128528
36778
76056

query I rowsort
SELECT + col0 * col2 * col0 AS col2 FROM tab1
----
233472
486
614400

onlyif mysql # use DIV operator for integer division
query I rowsort label-4927
SELECT DISTINCT col2 DIV + col0 AS col0 FROM tab0
----
0
1

skipif mysql # not compatible
query I rowsort label-4927
SELECT DISTINCT col2 / + col0 AS col0 FROM tab0
----
0
1

query I rowsort
SELECT ALL col2 + col1 + col1 * - tab2.col0 FROM tab2
----
-1288
-159
-4517

query I rowsort
SELECT + col2 * - col0 AS col1 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT col0 * + col0 * - col1 AS col2 FROM tab0
----
-118825
-49536
-720811

onlyif mysql # use DIV operator for integer division
query I rowsort label-4931
SELECT ALL col2 DIV + col1 AS col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4931
SELECT ALL col2 / + col1 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT + col2 AS col2 FROM tab1 WHERE NULL <> ( NULL )
----

query I rowsort
SELECT ALL - col2 * col1 + + col0 FROM tab0
----
-2814
-62
-7373

onlyif mysql # use DIV operator for integer division
query I rowsort label-4934
SELECT DISTINCT + col2 * - col2 + col1 DIV col1 AS col2 FROM tab0
----
-1088
-6723
0

skipif mysql # not compatible
query I rowsort label-4934
SELECT DISTINCT + col2 * - col2 + col1 / col1 AS col2 FROM tab0
----
-1088
-6723
0

query III rowsort
SELECT * FROM tab1 WHERE NOT ( NULL ) BETWEEN + col1 + + col0 - + col0 AND NULL
----

query I rowsort
SELECT + col0 + + col1 * col2 AS col1 FROM tab0
----
132
2862
7551

query I rowsort
SELECT - tab2.col0 * - col2 * + tab2.col2 AS col1 FROM tab2
----
114076
5103
52728

query I rowsort
SELECT DISTINCT tab2.col0 * col1 * col0 FROM tab2
----
106097
1519
358956

query I rowsort
SELECT DISTINCT + tab0.col1 + col1 + col1 FROM tab0
----
258
273
291

query I rowsort
SELECT col2 FROM tab0 WHERE NOT - col1 * - col1 / col2 + col1 NOT BETWEEN + col2 / col0 AND NULL
----

query I rowsort
SELECT + ( + col2 ) + - col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT DISTINCT - - col1 * col1 + ( + col0 * - cor0.col2 ) - + cor0.col1 FROM tab1 cor0
----
-3558
-7524
488

query I rowsort
SELECT ALL - 66 + + 56 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to f68f33032846e21ee6b2c668fc10355e

query I rowsort
SELECT ALL col2 + col0 + + col2 FROM tab1
----
111
178
272

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT NULL IN ( col2 * col2 * col2 )
----

query I rowsort
SELECT DISTINCT - col1 + col0 * col1 + tab0.col2 AS col1 FROM tab0
----
2011
3299
8090

query I rowsort
SELECT + col0 - + col0 * tab2.col1 * + col2 FROM tab2
----
-119574
-50955
-5852

query I rowsort
SELECT + col0 * tab1.col2 + + col0 * tab1.col0 * col1 AS col1 FROM tab1
----
396
44608
90880

query I rowsort
SELECT - col0 FROM tab2 WHERE + col2 <= NULL
----

query I rowsort
SELECT DISTINCT col2 + col1 * + col0 FROM tab2
----
1381
244
4628

query I rowsort
SELECT - tab2.col1 * - col0 + col0 FROM tab2
----
1422
224
4680

query I rowsort
SELECT ALL - col2 + - cor0.col2 + col1 * cor0.col0 FROM tab2 AS cor0
----
1267
163
4550

query IIIIII rowsort
SELECT ALL * FROM tab0, tab0 cor0 WHERE NULL > NULL
----

query III rowsort
SELECT * FROM tab2 WHERE NOT ( - col0 ) NOT IN ( col2 + col1 )
----

query I rowsort
SELECT DISTINCT + col1 + cor0.col0 * + col1 FROM tab1 AS cor0
----
104
1053
650

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT NULL IN ( col2 )
----

query I rowsort
SELECT DISTINCT tab1.col1 + col1 * col2 FROM tab1
----
1261
1430
580

query I rowsort
SELECT + tab2.col0 AS col0 FROM tab2 WHERE NOT NULL < NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 col0 FROM tab1 WHERE NOT col0 / - col0 = + col2
----
54
57
96

query III rowsort
SELECT ALL * FROM tab2 WHERE ( NULL ) NOT BETWEEN NULL AND - col0
----

query I rowsort
SELECT ALL col2 + + tab2.col0 * col0 FROM tab2
----
6110
6279
76

query I rowsort
SELECT col2 FROM tab2 AS cor0 WHERE NOT NULL BETWEEN NULL AND cor0.col1
----

query I rowsort
SELECT DISTINCT - col2 * - col1 - col0 AS col0 FROM tab1
----
1168
1401
506

onlyif mysql # use DIV operator for integer division
query I rowsort label-4964
SELECT col2 DIV + col2 col0 FROM tab1
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4964
SELECT col2 / + col2 col0 FROM tab1
----
1
1
1

query I rowsort
SELECT ALL + col1 * col0 + + col2 * - col0 AS col2 FROM tab0
----
1272
3360
801

query I rowsort
SELECT + 79 AS col0 FROM tab2 AS cor0
----
79
79
79

query I rowsort
SELECT DISTINCT + ( col0 ) * col2 AS col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL - - col0 * cor0.col2 AS col2 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + + col1 col0 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT - + 29 + - 83 AS col2 FROM tab0 AS cor0
----
-112

query I rowsort
SELECT - 69 AS col0 FROM tab2
----
-69
-69
-69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + + col0 col2 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT col2 * col2 - + 71 * col0 AS col1 FROM tab0 AS cor0
----
-2484
-615
405

query I rowsort
SELECT ALL + 53 * - col1 + + col2 FROM tab2 AS cor0
----
-1616
-3101
-863

query I rowsort
SELECT DISTINCT - cor0.col2 + + col0 - - col2 * - col2 FROM tab2 cor0
----
-1403
-624
-749

query I rowsort
SELECT DISTINCT + + 9 + + col0 * col0 AS col1 FROM tab1 AS cor0
----
18
4105
6409

query I rowsort
SELECT DISTINCT col2 + tab2.col0 FROM tab2
----
104
117
34

query I rowsort
SELECT DISTINCT - + 47 + + cor0.col2 FROM tab1, tab2, tab2 AS cor0
----
-20
-21
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-4979
SELECT + 66 DIV col0 FROM tab0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-4979
SELECT + 66 / col0 FROM tab0
----
0
1
2

query I rowsort
SELECT ALL - 36 AS col1 FROM tab1 AS cor0
----
-36
-36
-36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col0 col0 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - - 78 * col0 AS col2 FROM tab0 AS cor0
----
1872
2730
6942

query I rowsort
SELECT + cor0.col1 * + col2 + - col1 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT DISTINCT + 46 * + col2 + col0 FROM tab2 cor0
----
1249
1274
1827

query I rowsort
SELECT ALL - ( - cor0.col2 ) * - ( + col2 ) + col1 - cor0.col2 * col1 AS col0 FROM tab1 AS cor0
----
-10451
-3809
-4294

query I rowsort
SELECT - 55 * col1 + col1 FROM tab0 cor0
----
-4644
-4914
-5238

onlyif mysql # use DIV operator for integer division
query I rowsort label-4987
SELECT ALL - col0 DIV ( + col1 * - col0 ) AS col1 FROM tab2 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4987
SELECT ALL - col0 / ( + col1 * - col0 ) AS col1 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + col2 * - 29 FROM tab2 AS cor0
----
1102
754
783

onlyif mysql # use DIV operator for integer division
query I rowsort label-4989
SELECT cor0.col1 DIV + col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4989
SELECT cor0.col1 / + col1 FROM tab0 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 43 + + col2 * cor0.col2 col2 FROM tab1 AS cor0
----
2959
3292
9259

query I rowsort
SELECT ALL 4 * col1 FROM tab1 AS cor0
----
104
40
52

query I rowsort
SELECT - - 87 AS col2 FROM tab0 AS cor0
----
87
87
87

query I rowsort
SELECT DISTINCT col0 * + col0 * + cor0.col2 FROM tab2 AS cor0
----
1323
158184
237158

query I rowsort
SELECT - + ( 84 ) + col1 AS col2 FROM tab1 AS cor0
----
-58
-71
-74

onlyif mysql # use DIV operator for integer division
query I rowsort label-4995
SELECT + col0 DIV ( + col1 ) FROM tab1 cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-4995
SELECT + col0 / ( + col1 ) FROM tab1 cor0
----
0
6
6

query I rowsort
SELECT ALL + 38 + - col1 AS col0 FROM tab2 AS cor0
----
-21
21
7

query I rowsort
SELECT DISTINCT + 5 AS col0 FROM tab0 AS cor0
----
5

query I rowsort
SELECT DISTINCT col0 * col0 - + col0 AS col2 FROM tab1 AS cor0
----
4032
6
6320

query I rowsort
SELECT ALL + 10 AS col1 FROM tab1 AS cor0
----
10
10
10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 + + cor0.col2 col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5001
SELECT col2 - CAST( + col1 AS SIGNED ) AS col2 FROM tab1
----
28
47
83

skipif mysql # not compatible
query I rowsort label-5001
SELECT col2 - CAST ( + col1 AS INTEGER ) AS col2 FROM tab1
----
28
47
83

query I rowsort
SELECT ALL tab0.col0 * col1 * + col2 AS col0 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT DISTINCT + col1 + - col2 * + col0 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT ALL + ( + col0 ) * + col2 AS col2 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-5005
SELECT DISTINCT - col2 DIV ( cor0.col0 ) AS col1 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-5005
SELECT DISTINCT - col2 / ( cor0.col0 ) AS col1 FROM tab1 AS cor0
----
-1
-18
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5006
SELECT + col1 + - col2 DIV col0 AS col2 FROM tab2
----
17
28
59

skipif mysql # not compatible
query I rowsort label-5006
SELECT + col1 + - col2 / col0 AS col2 FROM tab2
----
17
28
59

query I rowsort
SELECT + col0 + 60 AS col2 FROM tab1
----
124
140
63

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5008
SELECT + - CAST( ( col2 ) AS SIGNED ) * + col2 FROM tab2 AS cor0
----
-1444
-676
-729

skipif mysql # not compatible
query I rowsort label-5008
SELECT + - CAST ( ( col2 ) AS INTEGER ) * + col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT cor1.col1 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT ALL + 85 + - col1 * col1 * - col2 FROM tab2 AS cor0
----
11067
26032
90591

query I rowsort
SELECT ALL ( + cor0.col0 ) + col1 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT ALL 22 FROM tab0, tab2 AS cor0
----
9 values hashing to c55ee7433d8d39a59b1de2aadd9538c9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 29 col0 FROM tab0 AS cor0
----
-29
-29
-29

query I rowsort
SELECT + 61 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 07149905a72bd87553381f34d19ed290

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 + + cor0.col1 col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT - - col1 * - col2 + - col1 AS col1 FROM tab2 AS cor0
----
-1593
-663
-868

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( col1 AS REAL ) col2 FROM tab1
----
10
13
26

query I rowsort
SELECT + 9 + + ( col0 ) * - col2 AS col1 FROM tab2
----
-180
-2019
-2993

query I rowsort
SELECT - 26 AS col2 FROM tab0
----
-26
-26
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-5020
SELECT - + col1 DIV + col1 + + col0 FROM tab2 cor0
----
6
77
78

skipif mysql # not compatible
query I rowsort label-5020
SELECT - + col1 / + col1 + + col0 FROM tab2 cor0
----
6
77
78

query I rowsort
SELECT col1 * col1 + + ( + cor0.col2 ) * + col0 FROM tab0 AS cor0
----
15579
8188
9444

query I rowsort
SELECT DISTINCT 33 + - col2 AS col1 FROM tab2
----
-5
6
7

query I rowsort
SELECT ALL - - col0 * - 76 + col1 AS col0 FROM tab2 AS cor0
----
-501
-5869
-5987

query I rowsort
SELECT ALL + col1 * 4 AS col1 FROM tab2 AS cor0
----
124
236
68

query I rowsort
SELECT ALL col1 * col2 + 75 FROM tab1 AS cor0
----
1323
1479
645

onlyif mysql # use DIV operator for integer division
query I rowsort label-5026
SELECT tab0.col0 DIV - col1 + col1 * col1 FROM tab0
----
7396
8281
9409

skipif mysql # not compatible
query I rowsort label-5026
SELECT tab0.col0 / - col1 + col1 * col1 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT ALL - 59 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 582c5aa5e5b4fc3f2ea27e7637992d1f

query I rowsort
SELECT tab0.col2 + + col1 AS col0 FROM tab0
----
119
173
98

query I rowsort
SELECT - 82 + - col1 AS col0 FROM tab1
----
-108
-92
-95

query I rowsort
SELECT DISTINCT col2 + col2 * + tab2.col1 FROM tab2
----
1560
684
864

query I rowsort
SELECT + ( + col1 ) + col1 FROM tab0
----
172
182
194

query I rowsort
SELECT - 11 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 7120875811e4d19a19b69cd34b6bc202

query I rowsort
SELECT DISTINCT + col0 * - col0 * col2 FROM tab0
----
-1225
-19008
-649522

query I rowsort
SELECT ALL - + cor0.col2 * cor0.col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT + col2 + - ( - col1 ) AS col2 FROM tab1 AS cor0
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + - 23 col2 FROM tab1 AS cor0
----
-20
41
57

query I rowsort
SELECT ALL - col0 * col0 + + col0 AS col2 FROM tab0 AS cor0
----
-1190
-552
-7832

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5038
SELECT DISTINCT + col1 - CAST( col1 AS SIGNED ) FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5038
SELECT DISTINCT + col1 - CAST ( col1 AS INTEGER ) FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT - col0 * ( col1 ) * + col2 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT col2 * - 72 AS col2 FROM tab0 AS cor0
----
-2376
-5904
-72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * - col2 + + cor0.col1 col2 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT col1 + + ( - col1 ) + + col1 AS col2 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT + col1 + col2 * + ( col2 ) * col0 FROM tab1 AS cor0
----
207946
737293
8774

query I rowsort
SELECT col2 + - col1 + + col2 * - col0 * - cor0.col1 AS col1 FROM tab2 AS cor0
----
119619
51055
5855

query I rowsort
SELECT ALL - col0 * - col1 * + 40 + + col0 AS col0 FROM tab0
----
135835
324049
82584

onlyif mysql # use DIV operator for integer division
query I rowsort label-5046
SELECT col0 DIV + CAST( col1 * col0 AS SIGNED ) - - ( + col2 ) FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-5046
SELECT col0 / + CAST ( col1 * col0 AS INTEGER ) - - ( + col2 ) FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT col2 * + col0 - + col2 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT DISTINCT col1 + + ( 16 + + col2 * 88 ) FROM tab2 AS cor0
----
2363
2423
3377

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5049
SELECT + col0 * + CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5049
SELECT + col0 * + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 86 + cor0.col1 AS col0 FROM tab1 cor0
----
112
96
99

query I rowsort
SELECT + col2 * + col0 * col0 + cor0.col2 + col0 * col1 AS col1 FROM tab0 AS cor0
----
21105
4621
657703

query I rowsort
SELECT + - cor0.col0 * col1 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + - col0 * + 19 FROM tab2 AS cor0
----
-133
-1482
-1501

onlyif mysql # use DIV operator for integer division
query I rowsort label-5054
SELECT ALL - col0 * col0 + col2 DIV - col1 + 65 * col1 FROM tab1 cor0
----
-3451
-5562
1679

skipif mysql # not compatible
query I rowsort label-5054
SELECT ALL - col0 * col0 + col2 / - col1 + 65 * col1 FROM tab1 cor0
----
-3451
-5562
1679

query I rowsort
SELECT + col0 * 28 FROM tab0
----
2492
672
980

query I rowsort
SELECT DISTINCT + col2 + + ( col2 ) * + col0 - col1 * + col2 FROM tab2
----
-621
2394
520

query I rowsort
SELECT ALL 7 + - tab1.col2 AS col2 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 42dded81f2b09334b9e23099156d6091

query I rowsort
SELECT + col1 * col1 + col0 AS col2 FROM tab0 cor0
----
7420
8370
9444

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5059
SELECT ALL + col1 - CAST( NULL AS SIGNED ) AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5059
SELECT ALL + col1 - CAST ( NULL AS INTEGER ) AS col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - ( - 17 ) FROM tab1
----
17
17
17

query I rowsort
SELECT col1 + - col0 * ( - ( col0 ) ) AS col1 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT - 98 * - col2 AS col0 FROM tab1 AS cor0
----
5292
5586
9408

query I rowsort
SELECT ALL - tab2.col2 AS col0 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT DISTINCT ( 38 ) * - col1 FROM tab2
----
-1178
-2242
-646

query I rowsort
SELECT DISTINCT 34 + - 41 FROM tab1, tab0, tab2 AS cor0
----
-7

query I rowsort
SELECT ALL - ( - 0 ) AS col1 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT + 2 * + col1 + 29 FROM tab0 cor0
----
201
211
223

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5068
SELECT + ( col2 + - CAST( col2 AS SIGNED ) ) FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5068
SELECT + ( col2 + - CAST ( col2 AS INTEGER ) ) FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT 12 AS col2 FROM tab2
----
12

query I rowsort
SELECT col1 * ( + col2 ) FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + 30 + + col0 AS col1 FROM tab0
----
119
54
65

query I rowsort
SELECT - 80 AS col2 FROM tab0
----
-80
-80
-80

query I rowsort
SELECT - col1 * 75 FROM tab0
----
-6450
-6825
-7275

query I rowsort
SELECT 42 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 64c29db9f1cd7ed4ddeb1735e3e0d442

query I rowsort
SELECT ALL 82 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to f318fd9dac2de7af4b82cc7574bbca2c

query I rowsort
SELECT DISTINCT col1 - - ( col2 + - col1 ) FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL - cor0.col0 + 71 FROM tab0 AS cor0
----
-18
36
47

query I rowsort
SELECT ALL + col2 + col0 * cor0.col0 * - col2 AS col1 FROM tab2 AS cor0
----
-1296
-158158
-237120

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col0 * - col0 * ( col2 ) + col0 col2 FROM tab2 AS cor0
----
1330
158262
237237

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5080
SELECT DISTINCT - col0 - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5080
SELECT DISTINCT - col0 - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5081
SELECT DISTINCT - + col2 DIV col0 + - col0 * col0 FROM tab2 cor0
----
-52
-6084
-6241

skipif mysql # not compatible
query I rowsort label-5081
SELECT DISTINCT - + col2 / col0 + - col0 * col0 FROM tab2 cor0
----
-52
-6084
-6241

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5082
SELECT ALL col0 * CAST( NULL AS SIGNED ) + - col0 * + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5082
SELECT ALL col0 * CAST ( NULL AS INTEGER ) + - col0 * + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 * - ( + cor0.col2 ) AS col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT - cor0.col2 * - cor0.col0 FROM tab1 cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-5085
SELECT 69 DIV col2 + + col0 AS col2 FROM tab1
----
4
65
80

skipif mysql # not compatible
query I rowsort label-5085
SELECT 69 / col2 + + col0 AS col2 FROM tab1
----
4
65
80

query IIIIIIIII rowsort
SELECT * FROM tab2, tab0 cor0 CROSS JOIN tab0 cor1
----
243 values hashing to 021da207cdc2a046fb0a79bf7cfc38ae

query I rowsort
SELECT + ( 34 ) + col2 * cor0.col0 AS col1 FROM tab1 AS cor0
----
196
3682
7714

query I rowsort
SELECT col2 * - 43 + col1 + - col2 AS col0 FROM tab0 AS cor0
----
-1366
-3517
53

query I rowsort
SELECT DISTINCT + + cor0.col1 * - col0 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL ( - ( - col0 ) ) + - col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT 89 + col1 * col0 FROM tab1 AS cor0
----
1129
167
729

query I rowsort
SELECT - 30 + cor0.col1 AS col0 FROM tab2 AS cor0
----
-13
1
29

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + + cor0.col0 + + col2 * CAST ( + col1 AS REAL ) FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT ALL - 77 FROM tab2 cor0
----
-77
-77
-77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col1 * cor0.col0 col1 FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5096
SELECT ALL - + CAST( NULL AS DECIMAL ) col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5096
SELECT ALL - + CAST ( NULL AS REAL ) col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 16 col2 FROM tab1 AS cor0
----
16

query I rowsort
SELECT ALL 30 * + col2 FROM tab1 AS cor0
----
1620
1710
2880

query I rowsort
SELECT ( 76 ) FROM tab0 AS cor0
----
76
76
76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5100
SELECT DISTINCT + CAST( NULL AS SIGNED ) + + col0 AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5100
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + + col0 AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL 15 + + col1 AS col1 FROM tab1 cor0
----
25
28
41

query I rowsort
SELECT ALL - ( 18 ) + - col0 FROM tab2 AS cor0
----
-25
-96
-97

query I rowsort
SELECT DISTINCT 4 FROM tab2, tab2 AS cor0 CROSS JOIN tab0
----
4

query I rowsort
SELECT ALL ( + cor0.col2 ) + - cor0.col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + - col1 + - col0 AS col2 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT + 38 AS col0 FROM tab2 cor0
----
38
38
38

query I rowsort
SELECT - 69 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 3bd7460efa48c66c072ad5f3c2def7e9

query I rowsort
SELECT ALL + 93 AS col2 FROM tab1, tab0 cor0
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

query I rowsort
SELECT ALL - col2 * col0 + + col1 + col0 * col0 FROM tab0 cor0
----
-130
1287
714

query I rowsort
SELECT - 45 * col1 FROM tab0 cor0
----
-3870
-4095
-4365

onlyif mysql # use DIV operator for integer division
query I rowsort label-5111
SELECT ALL + col0 DIV + col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5111
SELECT ALL + col0 / + col1 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT - - col2 + - col0 * ( + cor0.col1 + - 30 ) AS col2 FROM tab0 AS cor0
----
-1311
-2344
-5347

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab1, tab0 cor0, tab0 cor1
----
-1
-33
-82

query I rowsort
SELECT ALL - col0 + 53 AS col1 FROM tab1 AS cor0
----
-11
-27
50

query I rowsort
SELECT col1 + 68 FROM tab0 AS cor0
----
154
159
165

onlyif mysql # use DIV operator for integer division
query I rowsort label-5116
SELECT DISTINCT - col1 DIV ( + cor0.col1 ) + cor0.col0 FROM tab1 cor0
----
2
63
79

skipif mysql # not compatible
query I rowsort label-5116
SELECT DISTINCT - col1 / ( + cor0.col1 ) + cor0.col0 FROM tab1 cor0
----
2
63
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5117
SELECT - + col1 * CAST( col2 AS SIGNED ) * + col2 FROM tab0 AS cor0
----
-611884
-93654
-97

skipif mysql # not compatible
query I rowsort label-5117
SELECT - + col1 * CAST ( col2 AS INTEGER ) * + col2 FROM tab0 AS cor0
----
-611884
-93654
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * - 43 col2 FROM tab2 AS cor0
----
301
3354
3397

query I rowsort
SELECT + col1 * - 81 + - col1 FROM tab0 cor0
----
-7052
-7462
-7954

query I rowsort
SELECT col0 + col0 + 81 FROM tab2 AS cor0
----
237
239
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 * + 61 * col0 col2 FROM tab0 AS cor0
----
2135
445178
48312

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5122
SELECT ALL - col0 * - CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5122
SELECT ALL - col0 * - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5123
SELECT - col1 * + CAST( NULL AS SIGNED ) col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5123
SELECT - col1 * + CAST ( NULL AS INTEGER ) col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col2 + + 17 * col2 FROM tab2 AS cor0
----
468
486
684

query I rowsort
SELECT - - cor0.col1 + 72 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to a84e1f9c09388c8750768fd88f294f37

query I rowsort
SELECT - + col0 * - col1 * col2 FROM tab2 cor0
----
119652
51034
5859

query I rowsort
SELECT DISTINCT - cor1.col2 FROM tab1, tab2 AS cor0, tab2 AS cor1, tab2, tab1 AS cor2
----
-26
-27
-38

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0, tab1 AS cor1, tab0, tab2 cor2
----
3645 values hashing to d6a6e32c6adcc8525ed3eb7827781237

query I rowsort
SELECT - - 54 * col1 AS col1 FROM tab2 AS cor0
----
1674
3186
918

query I rowsort
SELECT + cor0.col0 * + col0 * + cor0.col2 FROM tab1 AS cor0
----
233472
486
614400

query I rowsort
SELECT ALL col1 + cor0.col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL 33 * cor0.col2 FROM tab0 AS cor0
----
1089
2706
33

query I rowsort
SELECT ALL + + 64 FROM tab1 AS cor0
----
64
64
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col2 col1 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT 64 * + col0 FROM tab0
----
1536
2240
5696

query I rowsort
SELECT DISTINCT + + col0 + - col0 AS col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT 7 AS col2 FROM tab1, tab2 AS cor0, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to bd991c690468eea3ef45a96817ca3617

query I rowsort
SELECT ALL 60 + + col0 AS col2 FROM tab2
----
138
139
67

query I rowsort
SELECT + 31 + tab1.col0 FROM tab1
----
111
34
95

query I rowsort
SELECT col2 + - col1 + - col2 AS col2 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT - - col2 + + col1 * col0 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT - col2 + - 24 * col0 AS col0 FROM tab2 AS cor0
----
-1898
-1934
-195

query I rowsort
SELECT DISTINCT - col0 + - col0 AS col1 FROM tab2
----
-14
-156
-158

query I rowsort
SELECT ALL + col0 + + col2 + + col0 * + col1 FROM tab2
----
1460
251
4706

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + + col2 col1 FROM tab1
----
121
176
57

query I rowsort
SELECT DISTINCT - ( col1 ) + ( col1 ) FROM tab0
----
0

query I rowsort
SELECT + col1 + col0 + ( col2 ) * col0 FROM tab1
----
191
3722
7773

query I rowsort
SELECT ( col2 * + col0 ) FROM tab1
----
162
3648
7680

query I rowsort
SELECT DISTINCT - 17 AS col0 FROM tab2, tab2 cor0
----
-17

query I rowsort
SELECT DISTINCT tab0.col0 * - ( col1 ) AS col0 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL ( + col2 + col0 ) * col2 AS col1 FROM tab1
----
16896
3078
6897

query I rowsort
SELECT - 43 + + col2 FROM tab2
----
-16
-17
-5

query I rowsort
SELECT - 84 FROM tab1, tab1 AS cor0
----
9 values hashing to 975e2ef2a3bf1ee2622362f4e435752f

query I rowsort
SELECT col2 * ( + col0 + 77 * + col2 ) FROM tab1 AS cor0
----
224694
253821
717312

query I rowsort
SELECT + - 98 * - col1 - + cor0.col2 AS col1 FROM tab1 AS cor0
----
1178
2494
923

query I rowsort
SELECT + 50 * - col1 FROM tab1 cor0
----
-1300
-500
-650

query I rowsort
SELECT DISTINCT 53 * 27 FROM tab2
----
1431

query I rowsort
SELECT DISTINCT ( + col1 ) * - ( col1 ) AS col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT 34 * - tab0.col1 FROM tab0
----
-2924
-3094
-3298

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col1 * - col0 col2 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT + col1 * col0 + + col0 AS col1 FROM tab1 AS cor0
----
1120
704
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5162
SELECT - cor0.col0 * CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5162
SELECT - cor0.col0 * CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 * - 58 AS col0 FROM tab0 AS cor0
----
-4988
-5278
-5626

query I rowsort
SELECT DISTINCT - 19 FROM tab2, tab0, tab1 AS cor0
----
-19

query I rowsort
SELECT 24 + - col1 FROM tab1
----
-2
11
14

query I rowsort
SELECT col1 + 82 * ( - col2 ) AS col2 FROM tab0 cor0
----
-2620
-6633
15

query I rowsort
SELECT DISTINCT - col0 * - ( + ( col0 ) ) * col1 AS col2 FROM tab2
----
106097
1519
358956

query I rowsort
SELECT - - col0 * ( - col0 ) AS col2 FROM tab1 cor0
----
-4096
-6400
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-5169
SELECT ALL - col1 DIV 52 + + col1 FROM tab0 AS cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-5169
SELECT ALL - col1 / 52 + + col1 FROM tab0 AS cor0
----
85
90
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5170
SELECT DISTINCT - CAST( NULL AS SIGNED ) * col0 + + cor0.col0 * col2 AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5170
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * col0 + + cor0.col0 * col2 AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL + col0 * 85 + col1 AS col2 FROM tab0 AS cor0
----
2126
3072
7656

query I rowsort
SELECT - 67 + + 56 FROM tab2 AS cor0
----
-11
-11
-11

query I rowsort
SELECT DISTINCT 52 * col1 AS col2 FROM tab1 cor0
----
1352
520
676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * 79 + - cor0.col2 * - col1 * col1 col2 FROM tab0 AS cor0
----
1746
237274
671853

query I rowsort
SELECT ALL - - ( 93 ) + col0 * col0 + ( col0 ) FROM tab2 AS cor0
----
149
6255
6413

query I rowsort
SELECT ALL + 71 * - 10 FROM tab1 AS cor0
----
-710
-710
-710

query I rowsort
SELECT DISTINCT col1 - - col1 * + col2 AS col0 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT + + 21 * + col2 AS col0 FROM tab0 AS cor0
----
1722
21
693

query I rowsort
SELECT ALL - 19 AS col1 FROM tab2 AS cor0
----
-19
-19
-19

query I rowsort
SELECT DISTINCT + 3 * cor0.col2 FROM tab1, tab2 AS cor0
----
114
78
81

query I rowsort
SELECT DISTINCT tab1.col1 + 30 * tab1.col1 AS col2 FROM tab1
----
310
403
806

query I rowsort
SELECT cor0.col2 * + col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT + + 34 FROM tab2 AS cor0
----
34
34
34

query I rowsort
SELECT DISTINCT col1 * - col0 + col0 AS col2 FROM tab1 cor0
----
-576
-75
-960

query I rowsort
SELECT - - 54 AS col0 FROM tab0 cor0
----
54
54
54

query I rowsort
SELECT cor0.col1 + 13 FROM tab0, tab2 AS cor0
----
9 values hashing to e921e0e42794a07c2713c40a63f683f4

query I rowsort
SELECT 57 * + col1 FROM tab1
----
1482
570
741

query I rowsort
SELECT ( cor0.col0 ) * + ( - 64 ) FROM tab2 AS cor0
----
-448
-4992
-5056

query I rowsort
SELECT DISTINCT + ( + col0 ) - - col1 * 15 FROM tab0
----
1314
1454
1490

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5190
SELECT + - col2 * col1 + CAST( NULL AS SIGNED ) * 11 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5190
SELECT + - col2 * col1 + CAST ( NULL AS INTEGER ) * 11 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 + - tab0.col1 * + col1 * + col1 AS col1 FROM tab0
----
-636023
-753489
-912672

skipif mysql # not compatible
query I rowsort
SELECT + + col0 * CAST ( - col1 AS REAL ) + - col2 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT DISTINCT col0 + - 79 FROM tab0
----
-44
-55
10

query I rowsort
SELECT DISTINCT - col2 + ( tab1.col1 ) FROM tab1
----
-28
-47
-83

query I rowsort
SELECT DISTINCT - ( cor0.col2 ) FROM tab1, tab0 AS cor0, tab2 cor1
----
-1
-33
-82

query I rowsort
SELECT ALL + col1 - col2 AS col0 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT DISTINCT + cor0.col0 * - 23 FROM tab2 AS cor0
----
-161
-1794
-1817

query I rowsort
SELECT ALL - col0 * ( 94 ) * - col1 FROM tab2 AS cor0
----
126242
20398
432588

onlyif mysql # use DIV operator for integer division
query I rowsort label-5199
SELECT ALL col0 DIV - col1 AS col0 FROM tab1 AS cor0
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-5199
SELECT ALL col0 / - col1 AS col0 FROM tab1 AS cor0
----
-6
-6
0

query I rowsort
SELECT + 67 + - col1 AS col1 FROM tab0 AS cor0
----
-19
-24
-30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( - cor0.col2 ) * ( col1 ) col0 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT - + 82 FROM tab0 AS cor0
----
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-5203
SELECT DISTINCT col0 * - cor0.col2 DIV - cor0.col2 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-5203
SELECT DISTINCT col0 * - cor0.col2 / - cor0.col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT 76 * - col1 + 16 AS col1 FROM tab1 AS cor0
----
-1960
-744
-972

query I rowsort
SELECT ALL tab0.col0 * + col0 * + col2 + tab0.col0 FROM tab0
----
1260
19032
649611

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT ALL + - cor0.col2 * + cor0.col0 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-5208
SELECT ALL - col0 DIV col0 col1 FROM tab0 AS cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5208
SELECT ALL - col0 / col0 col1 FROM tab0 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-5209
SELECT - - ( - col0 ) DIV col1 FROM tab2 AS cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-5209
SELECT - - ( - col0 ) / col1 FROM tab2 AS cor0
----
-1
-4
0

query I rowsort
SELECT DISTINCT - + col0 + - col2 * - col1 FROM tab1 AS cor0
----
1168
1401
506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 18 col2 FROM tab2, tab0 AS cor0
----
9 values hashing to b95bafa733666df39c5d3f94760d010f

query I rowsort
SELECT DISTINCT 81 * + col0 AS col1 FROM tab2
----
567
6318
6399

onlyif mysql # use DIV operator for integer division
query I rowsort label-5213
SELECT DISTINCT - tab2.col2 DIV col1 AS col1 FROM tab2
----
-2
0

skipif mysql # not compatible
query I rowsort label-5213
SELECT DISTINCT - tab2.col2 / col1 AS col1 FROM tab2
----
-2
0

query I rowsort
SELECT - ( tab0.col0 ) + 78 AS col0 FROM tab0
----
-11
43
54

query I rowsort
SELECT - col1 + 14 * col1 - 81 AS col1 FROM tab1 cor0
----
257
49
88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5216
SELECT ALL CAST( + col0 AS SIGNED ) * col0 + cor0.col1 AS col0 FROM tab2 cor0
----
6143
6258
80

skipif mysql # not compatible
query I rowsort label-5216
SELECT ALL CAST ( + col0 AS INTEGER ) * col0 + cor0.col1 AS col0 FROM tab2 cor0
----
6143
6258
80

query I rowsort
SELECT ALL - col2 + col2 + cor0.col1 AS col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT - 89 * col2 + - col2 + col0 FROM tab0 AS cor0
----
-2946
-55
-7291

query I rowsort
SELECT + col0 + + 46 AS col2 FROM tab1 AS cor0
----
110
126
49

query I rowsort
SELECT ALL + col1 * col2 - col2 AS col0 FROM tab1 cor0
----
1152
1350
513

query I rowsort
SELECT + 90 FROM tab0, tab2 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to 3b4644ef0734ed220952cae7e0648c4b

query I rowsort
SELECT ALL + col0 * + cor0.col2 + + cor0.col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT ( 37 ) FROM tab0 AS cor0
----
37
37
37

query I rowsort
SELECT col0 + + ( col2 ) AS col1 FROM tab0
----
171
36
57

query I rowsort
SELECT DISTINCT 65 + + col0 FROM tab1
----
129
145
68

onlyif mysql # use DIV operator for integer division
query I rowsort label-5226
SELECT DISTINCT col0 * col2 + col0 DIV - 58 AS col1 FROM tab1
----
162
3647
7679

skipif mysql # not compatible
query I rowsort label-5226
SELECT DISTINCT col0 * col2 + col0 / - 58 AS col1 FROM tab1
----
162
3647
7679

query I rowsort
SELECT DISTINCT - col2 + col2 + - tab2.col2 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT 34 + - col1 FROM tab0
----
-52
-57
-63

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5229
SELECT ALL + - 42 * col0 + + col0 + - CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5229
SELECT ALL + - 42 * col0 + + col0 + - CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor2.col1 + 21 AS col0 FROM tab1, tab1 AS cor0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to 608b1f5c67cdc8caacf62e658e2df96c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 62 * + col1 + col1 col1 FROM tab1 AS cor0
----
1638
630
819

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 18 + col1 col0 FROM tab0 AS cor0
----
68
73
79

query I rowsort
SELECT - 28 FROM tab0, tab2 cor0
----
9 values hashing to c3e7fa3d059fc708f03c60e9cef0c115

query I rowsort
SELECT ( + col2 ) * - col2 AS col1 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT + 84 * + col2 * - col0 + 60 * col0 FROM tab2 AS cor0
----
-15456
-165672
-247428

query I rowsort
SELECT - 82 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to ce62f59690969f4492d78eb57c3181f0

query I rowsort
SELECT DISTINCT 4 AS col2 FROM tab1
----
4

query I rowsort
SELECT - cor0.col0 * - cor0.col1 * - cor0.col2 + col0 AS col0 FROM tab0 cor0
----
-3360
-664029
-68088

onlyif mysql # use DIV operator for integer division
query I rowsort label-5239
SELECT col0 DIV + col0 - + ( - 41 ) * - cor0.col0 FROM tab2 AS cor0
----
-286
-3197
-3238

skipif mysql # not compatible
query I rowsort label-5239
SELECT col0 / + col0 - + ( - 41 ) * - cor0.col0 FROM tab2 AS cor0
----
-286
-3197
-3238

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5240
SELECT + CAST( NULL AS DECIMAL ) AS col1 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-5240
SELECT + CAST ( NULL AS REAL ) AS col1 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT + cor0.col0 * cor0.col0 + + col2 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT DISTINCT - col0 + - col0 * - ( 10 ) FROM tab0 AS cor0
----
216
315
801

onlyif mysql # use DIV operator for integer division
query I rowsort label-5243
SELECT ALL + ( - col0 ) * + 9 + col0 DIV cor0.col0 col2 FROM tab0 AS cor0
----
-215
-314
-800

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5243
SELECT ALL + ( - col0 ) * + 9 + col0 / cor0.col0 col2 FROM tab0 AS cor0
----
-215
-314
-800

onlyif mysql # use DIV operator for integer division
query I rowsort label-5244
SELECT - col0 + - col2 DIV col1 AS col0 FROM tab2 AS cor0
----
-7
-78
-81

skipif mysql # not compatible
query I rowsort label-5244
SELECT - col0 + - col2 / col1 AS col0 FROM tab2 AS cor0
----
-7
-78
-81

query I rowsort
SELECT DISTINCT + col1 * - 90 AS col1 FROM tab2
----
-1530
-2790
-5310

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5246
SELECT CAST( - 17 AS SIGNED ) + - cor0.col1 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 5bd4d19f6c5150b1840a60f352bfc69d

skipif mysql # not compatible
query I rowsort label-5246
SELECT CAST ( - 17 AS INTEGER ) + - cor0.col1 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 5bd4d19f6c5150b1840a60f352bfc69d

query I rowsort
SELECT - 81 AS col1 FROM tab2, tab1 cor0
----
9 values hashing to 205b3ff2d7b1817c98d7980b8c17e6c1

onlyif mysql # use DIV operator for integer division
query I rowsort label-5248
SELECT + col0 + ( ( - col0 DIV ( - cor0.col1 ) DIV + col2 ) ) * + ( col2 ) * col1 col2 FROM tab1 cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5248
SELECT + col0 + ( ( - col0 / ( - cor0.col1 ) / + col2 ) ) * + ( col2 ) * col1 col2 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT ALL + col1 * + 48 AS col1 FROM tab1 cor0
----
1248
480
624

query I rowsort
SELECT - - col1 * + ( + 96 ) FROM tab1 cor0
----
1248
2496
960

query I rowsort
SELECT DISTINCT + col0 * + col1 AS col1 FROM tab2 cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + 93 col1 FROM tab2 AS cor0
----
2418
2511
3534

query I rowsort
SELECT DISTINCT - col1 * - 49 AS col0 FROM tab1 AS cor0
----
1274
490
637

query I rowsort
SELECT DISTINCT - 94 * col2 + - col2 FROM tab2 AS cor0
----
-2470
-2565
-3610

onlyif mysql # use DIV operator for integer division
query I rowsort label-5255
SELECT + - CAST( + col2 AS SIGNED ) DIV cor0.col1 - + ( - 20 ) * + cor0.col1 FROM tab1 cor0
----
195
253
518

skipif mysql # not compatible
query I rowsort label-5255
SELECT + - CAST ( + col2 AS INTEGER ) / cor0.col1 - + ( - 20 ) * + cor0.col1 FROM tab1 cor0
----
195
253
518

query I rowsort
SELECT ALL 88 * col2 + - col2 FROM tab0 AS cor0
----
2871
7134
87

query I rowsort
SELECT ALL ( + ( + col1 ) ) * - 0 + + col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT + col1 * 59 * - col2 + 26 - 39 * cor0.col2 AS col1 FROM tab0 AS cor0
----
-168703
-443430
-5736

query I rowsort
SELECT + - col0 + + col2 AS col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT - col1 * col0 - col2 * col1 FROM tab1 cor0
----
-1210
-1482
-2288

query I rowsort
SELECT + col0 * 26 + col0 - + col0 * 90 AS col2 FROM tab2 AS cor0
----
-441
-4914
-4977

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * - col2 * col0 col2 FROM tab1 AS cor0
----
233472
486
614400

query I rowsort
SELECT ALL - col1 + 49 + col2 AS col2 FROM tab0 AS cor0
----
-4
-47
40

query I rowsort
SELECT ALL - col0 * - col0 * - col2 AS col0 FROM tab1
----
-233472
-486
-614400

query I rowsort
SELECT ( cor0.col1 ) + col2 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT DISTINCT col2 * + col0 * + col0 AS col2 FROM tab2
----
1323
158184
237158

query I rowsort
SELECT DISTINCT + 74 AS col1 FROM tab2
----
74

query I rowsort
SELECT ALL + + col1 + + col2 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT ALL col0 + tab1.col2 * col0 FROM tab1
----
165
3712
7760

query I rowsort
SELECT DISTINCT + 64 AS col0 FROM tab0
----
64

onlyif mysql # use DIV operator for integer division
query I rowsort label-5271
SELECT DISTINCT - cor0.col1 DIV - cor0.col2 FROM tab1, tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5271
SELECT DISTINCT - cor0.col1 / - cor0.col2 FROM tab1, tab1 AS cor0
----
0

query I rowsort
SELECT ALL col2 * col1 * col1 AS col0 FROM tab1
----
16224
36504
5700

onlyif mysql # use DIV operator for integer division
query I rowsort label-5273
SELECT - col2 DIV cor0.col2 FROM tab0 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5273
SELECT - col2 / cor0.col2 FROM tab0 cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - col1 * - col2 + - col1 + col0 AS col2 FROM tab0 AS cor0
----
2776
35
7460

query I rowsort
SELECT DISTINCT + col0 + col1 * + col0 FROM tab1 cor0
----
1120
704
81

query I rowsort
SELECT ALL - tab2.col1 - col0 FROM tab2
----
-137
-38
-96

query IIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 WHERE ( NULL > NULL ) AND ( NULL ) > ( NULL )
----

query I rowsort
SELECT ALL + 76 AS col1 FROM tab2
----
76
76
76

query I rowsort
SELECT ALL - tab0.col1 * col2 AS col0 FROM tab0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5280
SELECT + ( + col2 ) DIV col1 + - cor0.col0 * col2 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3000

skipif mysql # not compatible
query I rowsort label-5280
SELECT + ( + col2 ) / col1 + - cor0.col0 * col2 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3000

query I rowsort
SELECT + - col1 + - 76 * - col0 FROM tab2 AS cor0
----
501
5869
5987

query I rowsort
SELECT col1 * - col2 + - col2 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT + 59 AS col1 FROM tab0 AS cor0
----
59
59
59

query I rowsort
SELECT col0 + col1 * - col0 + col2 * col0 FROM tab1 AS cor0
----
3072
6720
87

query I rowsort
SELECT + 94 FROM tab2 cor0
----
94
94
94

query I rowsort
SELECT DISTINCT - 46 * col2 AS col1 FROM tab2
----
-1196
-1242
-1748

query I rowsort
SELECT ( 61 ) FROM tab0
----
61
61
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col2 col0 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT ALL col0 + col1 * + cor0.col0 FROM tab1 cor0
----
1120
704
81

query I rowsort
SELECT DISTINCT + ( col0 ) - col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT - cor0.col2 + - cor0.col1 AS col0 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT ALL - 34 + - col1 FROM tab0 AS cor0
----
-120
-125
-131

query I rowsort
SELECT 92 + + col2 * - col2 FROM tab1 AS cor0
----
-2824
-3157
-9124

onlyif mysql # use DIV operator for integer division
query I rowsort label-5294
SELECT DISTINCT cor0.col1 DIV col1 + col1 FROM tab0 AS cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-5294
SELECT DISTINCT cor0.col1 / col1 + col1 FROM tab0 AS cor0
----
87
92
98

query I rowsort
SELECT DISTINCT ( - col0 ) - col1 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT - - cor0.col0 + col0 * + col1 FROM tab2 AS cor0
----
1422
224
4680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - tab0.col0 * col2 col1 FROM tab0
----
-34
-7216
-759

onlyif mysql # use DIV operator for integer division
query I rowsort label-5298
SELECT + col1 DIV col0 + col2 FROM tab2 AS cor0
----
26
31
38

skipif mysql # not compatible
query I rowsort label-5298
SELECT + col1 / col0 + col2 FROM tab2 AS cor0
----
26
31
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 - - col0 col2 FROM tab2
----
137
38
96

query I rowsort
SELECT - col2 * col1 + col1 * col0 AS col2 FROM tab0
----
-774
3298
637

query I rowsort
SELECT DISTINCT - col1 + col1 * col2 * tab2.col1 AS col0 FROM tab2
----
10965
25916
90447

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - col1 col0 FROM tab0
----
-2064
-3395
-8099

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE - col1 * col1 IN ( - col1 )
----

query III rowsort
SELECT ALL * FROM tab2 WHERE + col2 + col1 BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT col2 AS col2 FROM tab2 AS cor0 WHERE NOT + col0 > ( NULL )
----

query I rowsort
SELECT ALL + tab0.col0 * + col1 * - col2 + - tab0.col1 FROM tab0
----
-3492
-664209
-68198

query I rowsort
SELECT col1 + + col1 * col1 * tab0.col0 FROM tab0
----
177590
329412
737100

query I rowsort
SELECT DISTINCT col0 + col1 * - col1 FROM tab1
----
-36
-673
-89

query I rowsort
SELECT + col1 * - col1 * tab2.col0 + col2 FROM tab2
----
-22793
-271492
-6700

query I rowsort
SELECT DISTINCT tab2.col1 * col2 * col1 AS col2 FROM tab2
----
10982
25947
90506

query I rowsort
SELECT ALL + col0 FROM tab2 WHERE + col1 + col1 BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT DISTINCT - col0 * col0 * - col0 AS col2 FROM tab1
----
262144
27
512000

query I rowsort
SELECT ALL tab0.col2 FROM tab0 WHERE ( - col0 + - col1 / + col0 ) <> NULL
----

query III rowsort
SELECT * FROM tab2 WHERE NOT ( NULL ) NOT IN ( col2 )
----

query I rowsort
SELECT DISTINCT col2 + col0 + + col2 * col1 FROM tab0
----
133
2895
7633

onlyif mysql # use DIV operator for integer division
query I rowsort label-5316
SELECT - col1 DIV - col1 col2 FROM tab0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5316
SELECT - col1 / - col1 col2 FROM tab0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + col0 col0 FROM tab0
----
-9
34
7

query I rowsort
SELECT ALL - tab1.col1 * - col1 * + col1 FROM tab1
----
1000
17576
2197

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 * col2 col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - + col0 * - col2 * col2 AS col1 FROM tab2 AS cor0
----
114076
5103
52728

query I rowsort
SELECT - - col1 + col1 * - col0 FROM tab2 AS cor0
----
-1326
-186
-4543

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + col1 * + col0 col2 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT ALL col0 + + col0 * col0 AS col2 FROM tab1 cor0
----
12
4160
6480

query I rowsort
SELECT col2 * col2 * col2 + col1 FROM tab1
----
157490
185203
884749

query I rowsort
SELECT col0 - + col1 * col2 * col1 FROM tab1
----
-16144
-36501
-5636

onlyif mysql # use DIV operator for integer division
query I rowsort label-5326
SELECT DISTINCT col0 DIV col0 - col0 FROM tab2
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort label-5326
SELECT DISTINCT col0 / col0 - col0 FROM tab2
----
-6
-77
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col0 col0 FROM tab1, tab0 cor0 CROSS JOIN tab2
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT ALL + col2 - tab0.col1 * col1 AS col1 FROM tab0
----
-7363
-8199
-9408

query I rowsort
SELECT DISTINCT col2 * col1 - - col2 FROM tab1
----
1344
1458
627

query I rowsort
SELECT DISTINCT - tab2.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2
----
-7
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-5331
SELECT - - col1 - col1 DIV - cor0.col0 FROM tab1 AS cor0
----
10
13
34

skipif mysql # not compatible
query I rowsort label-5331
SELECT - - col1 - col1 / - cor0.col0 FROM tab1 AS cor0
----
10
13
34

query I rowsort
SELECT - + col1 * + col0 + col0 AS col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT col1 + - col1 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - cor0.col2 + + col0 * + col2 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT ALL - tab0.col1 * col0 * + col1 - - col0 AS col0 FROM tab0
----
-177480
-329280
-736920

query I rowsort
SELECT col1 * - col0 * + col2 - col2 AS col2 FROM tab0
----
-3396
-664200
-68145

query I rowsort
SELECT DISTINCT col0 * + col0 + col1 FROM tab0
----
1322
662
8012

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5338
SELECT - col0 / - CAST( NULL AS SIGNED ) + col1 + col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5338
SELECT - col0 / - CAST ( NULL AS INTEGER ) + col1 + col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - tab2.col0 + + col0 AS col2 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT col2 * - ( - col0 ) + + tab1.col1 FROM tab1
----
188
3658
7693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col2 * 0 col0 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL - col2 * + col2 + - col1 FROM tab1
----
-2942
-3259
-9229

query I rowsort
SELECT DISTINCT + tab1.col0 + - col1 AS col0 FROM tab1
----
-23
54
67

query I rowsort
SELECT - cor0.col2 + col1 * col1 * col1 AS col1 FROM tab1 AS cor0
----
17522
2101
943

query I rowsort
SELECT ALL col0 * col1 + col1 AS col0 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT ALL + - col0 + ( 29 ) FROM tab2 AS cor0
----
-49
-50
22

onlyif mysql # use DIV operator for integer division
query I rowsort label-5347
SELECT + col1 DIV 61 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5347
SELECT + col1 / 61 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT - ( cor0.col2 ) * - col1 - col0 AS col0 FROM tab1 AS cor0
----
1168
1401
506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5349
SELECT CAST( NULL AS DECIMAL ) + - col2 * col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5349
SELECT CAST ( NULL AS REAL ) + - col2 * col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 10 * + col0 + col0 FROM tab1 AS cor0
----
33
704
880

onlyif mysql # use DIV operator for integer division
query I rowsort label-5351
SELECT ALL col1 * - col1 DIV col1 FROM tab1 cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-5351
SELECT ALL col1 * - col1 / col1 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT cor0.col0 + + col1 * - col0 AS col2 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT + 20 * + 54 + - col1 AS col0 FROM tab1 AS cor0
----
1054
1067
1070

query I rowsort
SELECT ALL + 45 + - col2 FROM tab0 AS cor0
----
-37
12
44

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5355
SELECT - CAST( + col2 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-5355
SELECT - CAST ( + col2 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL + - ( 72 ) * - col1 FROM tab0 AS cor0
----
6192
6552
6984

query I rowsort
SELECT - - 66 * + col2 + - cor0.col0 AS col0 FROM tab1 cor0
----
3561
3698
6256

onlyif mysql # use DIV operator for integer division
query I rowsort label-5358
SELECT ALL - + col0 + + col0 DIV col2 + col2 * col1 * col0 FROM tab0 cor0
----
3395
664030
68088

skipif mysql # not compatible
query I rowsort label-5358
SELECT ALL - + col0 + + col0 / col2 + col2 * col1 * col0 FROM tab0 cor0
----
3395
664030
68088

query I rowsort
SELECT DISTINCT + + 83 + + 85 * col2 FROM tab2 AS cor0
----
2293
2378
3313

query I rowsort
SELECT 89 + - col2 FROM tab1 AS cor0
----
-7
32
35

query I rowsort
SELECT DISTINCT - col2 + - col0 * + col1 AS col2 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT ALL - 79 + - ( - col2 ) * - col1 AS col2 FROM tab1 cor0
----
-1327
-1483
-649

query I rowsort
SELECT - - cor0.col1 + - 6 FROM tab0 AS cor0
----
80
85
91

query I rowsort
SELECT DISTINCT 80 * col1 AS col1 FROM tab1 AS cor0
----
1040
2080
800

query I rowsort
SELECT + cor0.col2 * ( + col0 ) + - col2 AS col1 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT + col1 * - cor0.col1 + + col1 FROM tab0 AS cor0
----
-7310
-8190
-9312

query I rowsort
SELECT DISTINCT + ( col1 ) + - col0 AS col1 FROM tab0 AS cor0
----
2
62

query I rowsort
SELECT DISTINCT 57 AS col1 FROM tab0 AS cor0
----
57

query I rowsort
SELECT ALL col1 * + cor0.col1 * - col1 + 66 AS col0 FROM tab1 AS cor0
----
-17510
-2131
-934

query I rowsort
SELECT DISTINCT + col0 + + col1 - - 98 AS col1 FROM tab2 AS cor0
----
136
194
235

query I rowsort
SELECT DISTINCT - - 47 FROM tab1 cor0
----
47

query I rowsort
SELECT - - 52 AS col2 FROM tab2 cor0
----
52
52
52

query I rowsort
SELECT ALL ( cor0.col2 ) * col0 AS col2 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-5374
SELECT DISTINCT - - 74 + - cor0.col2 DIV + 89 FROM tab2 AS cor0
----
74

skipif mysql # not compatible
query I rowsort label-5374
SELECT DISTINCT - - 74 + - cor0.col2 / + 89 FROM tab2 AS cor0
----
74

query I rowsort
SELECT - col1 * - col0 * 28 FROM tab1 AS cor0
----
17920
2184
29120

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + + col0 * + 10 * 65 col0 FROM tab0 AS cor0
----
15633
22751
57932

query I rowsort
SELECT + col0 - 10 FROM tab1 AS cor0
----
-7
54
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5378
SELECT + col0 - - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5378
SELECT + col0 - - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 * col2 * col0 - col0 AS col1 FROM tab2 AS cor0
----
-1330
-158262
-237237

onlyif mysql # use DIV operator for integer division
query I rowsort label-5380
SELECT DISTINCT - col2 DIV - col0 AS col2 FROM tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-5380
SELECT DISTINCT - col2 / - col0 AS col2 FROM tab0 AS cor0
----
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 + col2 col0 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL + ( tab2.col2 ) - 78 AS col2 FROM tab2
----
-40
-51
-52

query I rowsort
SELECT - col2 + col0 * col0 FROM tab2 cor0
----
22
6058
6203

query I rowsort
SELECT - col1 * + ( col2 ) AS col1 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL + 29 FROM tab2, tab0 cor0, tab0 AS cor1
----
27 values hashing to 4c56285992bcb76e1aac22e6d23d1318

query I rowsort
SELECT DISTINCT - + col2 * ( - col2 ) FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT - - cor0.col1 * + ( - col0 ) FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - - col1 * + ( col1 ) AS col0 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT col1 * - col2 AS col0 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL 50 FROM tab1, tab2 AS cor0
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

query I rowsort
SELECT ALL - col0 * + col2 + - col1 FROM tab2
----
-2087
-220
-3019

query I rowsort
SELECT + + 88 * - col1 AS col2 FROM tab2 AS cor0
----
-1496
-2728
-5192

query I rowsort
SELECT - cor1.col0 AS col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT ( - col1 ) AS col1 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT + - col1 + + col2 * + col1 * + col0 FROM tab0 AS cor0
----
3298
664027
68026

query I rowsort
SELECT + ( col0 ) * + 85 FROM tab1 AS cor0
----
255
5440
6800

query I rowsort
SELECT ALL 83 * - col1 AS col2 FROM tab1 AS cor0
----
-1079
-2158
-830

onlyif mysql # use DIV operator for integer division
query I rowsort label-5398
SELECT ALL + 75 * col2 + 69 * col1 DIV col2 AS col1 FROM tab1 AS cor0
----
4083
4287
7209

skipif mysql # not compatible
query I rowsort label-5398
SELECT ALL + 75 * col2 + 69 * col1 / col2 AS col1 FROM tab1 AS cor0
----
4083
4287
7209

query I rowsort
SELECT 44 * - col2 AS col2 FROM tab1 AS cor0
----
-2376
-2508
-4224

query I rowsort
SELECT ALL 41 AS col0 FROM tab2 AS cor0
----
41
41
41

onlyif mysql # use DIV operator for integer division
query I rowsort label-5401
SELECT - + col2 * + col0 DIV - col0 AS col2 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-5401
SELECT - + col2 * + col0 / - col0 AS col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT + 65 * cor0.col0 FROM tab1 AS cor0
----
195
4160
5200

onlyif mysql # use DIV operator for integer division
query I rowsort label-5403
SELECT ALL + 68 DIV + cor0.col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5403
SELECT ALL + 68 / + cor0.col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + - 10 * - col0 + col0 FROM tab1 AS cor0
----
33
704
880

query I rowsort
SELECT ( col0 + col2 ) * col1 FROM tab1
----
1210
1482
2288

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5406
SELECT DISTINCT CAST( NULL AS SIGNED ) AS col2 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-5406
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col2 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
NULL

query I rowsort
SELECT - 77 * col0 * 73 + + ( + col1 ) AS col2 FROM tab2 AS cor0
----
-39316
-438379
-444042

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5408
SELECT ALL + cor0.col1 * CAST( NULL AS SIGNED ) FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-5408
SELECT ALL + cor0.col1 * CAST ( NULL AS INTEGER ) FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + col1 - + col1 * col2 * tab1.col2 AS col2 FROM tab1
----
-119795
-32480
-75790

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5410
SELECT DISTINCT - ( col2 ) * - CAST( NULL AS SIGNED ) + - 12 / + col0 AS col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-5410
SELECT DISTINCT - ( col2 ) * - CAST ( NULL AS INTEGER ) + - 12 / + col0 AS col0 FROM tab0
----
NULL

query I rowsort
SELECT ALL - tab1.col0 + col1 * col2 AS col0 FROM tab1
----
1168
1401
506

query I rowsort
SELECT ALL - 10 FROM tab1, tab0 AS cor0, tab0 cor1
----
27 values hashing to bb7f754a7a056e665155ed52a63f5bc0

query I rowsort
SELECT ALL + col0 + 5 FROM tab0
----
29
40
94

query I rowsort
SELECT ALL 93 * 74 FROM tab2, tab0 AS cor0
----
9 values hashing to ac6ef5008d8379a4a7cbae622ad59c69

query I rowsort
SELECT 0 + 46 - - col2 AS col0 FROM tab0 AS cor0
----
128
47
79

query I rowsort
SELECT + ( col0 ) + + col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT col1 * col0 + - cor0.col1 * - col1 AS col2 FROM tab0 cor0
----
12804
16380
9460

query I rowsort
SELECT - cor0.col2 * + col0 + col2 * col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col1 - 47 FROM tab0
----
39
44
50

query I rowsort
SELECT - col2 - 37 FROM tab1 AS cor0
----
-133
-91
-94

query I rowsort
SELECT + 75 - 43 AS col2 FROM tab0 cor0
----
32
32
32

query I rowsort
SELECT DISTINCT ( col0 ) * cor0.col2 AS col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - - col0 + col2 * - col0 AS col1 FROM tab0 AS cor0
----
-7209
-768
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5424
SELECT col0 DIV col2 + col2 * col2 col1 FROM tab1 AS cor0
----
2916
3250
9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5424
SELECT col0 / col2 + col2 * col2 col1 FROM tab1 AS cor0
----
2916
3250
9216

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5425
SELECT - CAST( col2 AS SIGNED ) + + cor0.col0 FROM tab0 cor0
----
-9
34
7

skipif mysql # not compatible
query I rowsort label-5425
SELECT - CAST ( col2 AS INTEGER ) + + cor0.col0 FROM tab0 cor0
----
-9
34
7

query I rowsort
SELECT col2 + - 90 * col2 AS col1 FROM tab2
----
-2314
-2403
-3382

query I rowsort
SELECT ALL - 96 + - col0 AS col1 FROM tab2
----
-103
-174
-175

query I rowsort
SELECT ALL + col0 * tab0.col2 * col1 - + col0 * col1 FROM tab0
----
0
656019
66048

query I rowsort
SELECT 50 + - 10 * + col0 * col0 AS col1 FROM tab1 AS cor0
----
-40
-40910
-63950

query I rowsort
SELECT ALL - + col0 * - col1 AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT cor0.col2 * cor0.col0 + - cor0.col1 AS col2 FROM tab0 AS cor0
----
-62
706
7207

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5432
SELECT ALL + col0 * + col2 + CAST( NULL AS SIGNED ) * + cor0.col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5432
SELECT ALL + col0 * + col2 + CAST ( NULL AS INTEGER ) * + cor0.col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 37 + + col2 AS col1 FROM tab0 AS cor0
----
119
38
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-5434
SELECT ALL + cor0.col0 DIV col0 + + 18 FROM tab2 AS cor0
----
19
19
19

skipif mysql # not compatible
query I rowsort label-5434
SELECT ALL + cor0.col0 / col0 + + 18 FROM tab2 AS cor0
----
19
19
19

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5435
SELECT DISTINCT 40 * col2 + CAST( NULL AS SIGNED ) - col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5435
SELECT DISTINCT 40 * col2 + CAST ( NULL AS INTEGER ) - col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + col1 * col1 - ( cor0.col2 ) AS col1 FROM tab2 AS cor0
----
251
3455
934

onlyif mysql # use DIV operator for integer division
query I rowsort label-5437
SELECT - col1 * + col1 + col1 DIV 26 FROM tab2 AS cor0
----
-289
-3479
-960

skipif mysql # not compatible
query I rowsort label-5437
SELECT - col1 * + col1 + col1 / 26 FROM tab2 AS cor0
----
-289
-3479
-960

query I rowsort
SELECT ALL + cor0.col2 * + col2 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT + col2 * + col1 + - 10 AS col2 FROM tab0 AS cor0
----
2828
7452
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 11 col0 FROM tab1 AS cor0
----
-11
-11
-11

query I rowsort
SELECT DISTINCT cor0.col1 + - col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT + col1 * col2 - + 90 FROM tab0 cor0
----
2748
7
7372

query I rowsort
SELECT ALL + ( col1 * + tab2.col2 + col0 ) FROM tab2
----
1612
725
844

query I rowsort
SELECT - ( + 60 ) * + col2 FROM tab1
----
-3240
-3420
-5760

onlyif mysql # use DIV operator for integer division
query I rowsort label-5445
SELECT ALL - + col1 DIV - col2 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-5445
SELECT ALL - + col1 / - col2 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT + - 82 * - cor0.col1 - - ( + col2 ) FROM tab2 AS cor0
----
1432
2569
4864

query I rowsort
SELECT DISTINCT 75 * col1 + + 80 AS col1 FROM tab0 AS cor0
----
6530
6905
7355

query I rowsort
SELECT ALL col2 + cor0.col0 * + col0 FROM tab2 AS cor0
----
6110
6279
76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5449
SELECT DISTINCT - col2 + - col1 / CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5449
SELECT DISTINCT - col2 + - col1 / CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - cor0.col0 + col2 * - 58 AS col1 FROM tab0 cor0
----
-1938
-4845
-93

query I rowsort
SELECT ALL + + 84 * + col0 FROM tab0 AS cor0
----
2016
2940
7476

onlyif mysql # use DIV operator for integer division
query I rowsort label-5452
SELECT DISTINCT + col0 DIV + cor0.col1 + + col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-5452
SELECT DISTINCT + col0 / + cor0.col1 + + col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT - col1 * + ( col1 + col0 ) FROM tab0 AS cor0
----
-12804
-16380
-9460

query I rowsort
SELECT cor0.col1 * 73 + + col1 FROM tab2 AS cor0
----
1258
2294
4366

query I rowsort
SELECT col2 + col1 * - col1 FROM tab0 AS cor0
----
-7363
-8199
-9408

query I rowsort
SELECT DISTINCT + tab0.col2 AS col0 FROM tab0, tab2 AS cor0
----
1
33
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5457
SELECT DISTINCT + col1 * CAST( ( - col0 ) AS SIGNED ) FROM tab1 AS cor0
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-5457
SELECT DISTINCT + col1 * CAST ( ( - col0 ) AS INTEGER ) FROM tab1 AS cor0
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col1 * col2 col2 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT + col1 * 98 * - 5 AS col2 FROM tab1 AS cor0
----
-12740
-4900
-6370

query I rowsort
SELECT ALL - col0 * - ( col0 ) AS col2 FROM tab0 AS cor0
----
1225
576
7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-5461
SELECT - + cor0.col0 + + col1 DIV + col1 AS col1 FROM tab1 AS cor0
----
-2
-63
-79

skipif mysql # not compatible
query I rowsort label-5461
SELECT - + cor0.col0 + + col1 / + col1 AS col1 FROM tab1 AS cor0
----
-2
-63
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 * + col0 col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL + col1 + + 12 FROM tab1 AS cor0
----
22
25
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5464
SELECT + CAST( NULL AS DECIMAL ) * - col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5464
SELECT + CAST ( NULL AS REAL ) * - col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5465
SELECT + - CAST( NULL AS SIGNED ) / 83 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5465
SELECT + - CAST ( NULL AS INTEGER ) / 83 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - - 70 * - 61 AS col2 FROM tab1 cor0
----
-4270

query I rowsort
SELECT DISTINCT + 46 + col0 * + col1 AS col1 FROM tab0 cor0
----
2110
3441
8145

query I rowsort
SELECT ALL + col1 + col0 + - cor0.col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL tab1.col1 * ( - col1 ) * col1 AS col2 FROM tab1
----
-1000
-17576
-2197

query I rowsort
SELECT + 83 AS col1 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 002a717a3d902d97220759065fb107c3

query I rowsort
SELECT - col0 * col0 * - col2 + col1 FROM tab2 cor0
----
1354
158243
237175

query I rowsort
SELECT col1 + 31 FROM tab1 AS cor0
----
41
44
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-5473
SELECT - + col1 * - 76 + col2 DIV col0 AS col2 FROM tab2 AS cor0
----
1292
2359
4484

skipif mysql # not compatible
query I rowsort label-5473
SELECT - + col1 * - 76 + col2 / col0 AS col2 FROM tab2 AS cor0
----
1292
2359
4484

query I rowsort
SELECT + 10 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 0fe3e45a9ecd49584c2ab442100d5176

query I rowsort
SELECT ALL col1 + - ( + 86 ) AS col2 FROM tab1
----
-60
-73
-76

query I rowsort
SELECT ALL - col0 + + 52 + cor0.col0 AS col0 FROM tab0 AS cor0
----
52
52
52

query I rowsort
SELECT DISTINCT + col2 * col0 + 69 + col2 AS col2 FROM tab1 AS cor0
----
285
3774
7845

query I rowsort
SELECT ALL + col2 * 41 FROM tab1 cor0
----
2214
2337
3936

query I rowsort
SELECT + col2 * - 20 AS col0 FROM tab0 AS cor0
----
-1640
-20
-660

query I rowsort
SELECT - + col2 * cor0.col1 - + col0 AS col0 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT DISTINCT + - col0 + + ( - 9 ) AS col1 FROM tab0 AS cor0
----
-33
-44
-98

query I rowsort
SELECT - col2 + 57 FROM tab2 AS cor0
----
19
30
31

query I rowsort
SELECT DISTINCT - cor0.col1 + ( ( - cor0.col2 ) + - 94 ) FROM tab0 AS cor0
----
-192
-213
-267

query I rowsort
SELECT DISTINCT + + col1 * ( 2 ) FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT ALL + col2 + - ( + col2 ) AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - + col1 + col2 + - 24 FROM tab1 AS cor0
----
23
4
59

query I rowsort
SELECT - col2 + ( - cor0.col0 ) FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT DISTINCT + col1 + + 81 FROM tab1 AS cor0
----
107
91
94

query I rowsort
SELECT - col0 - + 63 FROM tab1 AS cor0
----
-127
-143
-66

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NULL NOT IN ( col1 * col0 + - col1 )
----

query I rowsort
SELECT DISTINCT tab0.col0 FROM tab0 WHERE NULL NOT IN ( - col2 + + col1 * col1 )
----

query I rowsort
SELECT ALL + col0 * + col1 + + tab0.col2 FROM tab0
----
2097
3396
8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-5493
SELECT + col2 + col1 DIV col1 - col2 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5493
SELECT + col2 + col1 / col1 - col2 FROM tab2
----
1
1
1

query I rowsort
SELECT + tab0.col1 + col0 - + col2 FROM tab0
----
131
77
98

query III rowsort
SELECT * FROM tab2 WHERE NULL NOT BETWEEN NULL AND - col1 * col2
----

query I rowsort
SELECT - col1 + + col1 * + col0 AS col2 FROM tab1
----
1027
52
630

onlyif mysql # use DIV operator for integer division
query I rowsort label-5497
SELECT DISTINCT + col0 * col2 DIV col1 + col0 FROM tab0
----
169
33
35

skipif mysql # not compatible
query I rowsort label-5497
SELECT DISTINCT + col0 * col2 / col1 + col0 FROM tab0
----
169
33
35

query I rowsort
SELECT ALL + 32 * + col0 * + col2 FROM tab0 AS cor0
----
1120
233536
25344

query I rowsort
SELECT + ( - col1 ) * - col0 + + 88 FROM tab0 cor0
----
2152
3483
8187

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + - col0 col1 FROM tab1 cor0
----
-54
-67
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 + + col2 col1 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT - col2 * col2 * + col1 AS col2 FROM tab0 AS cor0
----
-611884
-93654
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col1 * col0 col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - col0 - - col0 * + col0 AS col1 FROM tab1
----
4032
6
6320

query I rowsort
SELECT DISTINCT col0 * - col0 AS col1 FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL + col1 + - col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 92 AS col2 FROM tab1
----
92
92
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 12 * col1 col0 FROM tab0 AS cor0
----
-1032
-1092
-1164

query I rowsort
SELECT DISTINCT + col0 + cor0.col0 AS col2 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT + 1 * - cor0.col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT - + col0 + col0 * col1 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT - 38 + - col2 * col2 AS col2 FROM tab1 AS cor0
----
-2954
-3287
-9254

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col0 * cor0.col0 col1 FROM tab0 AS cor0
----
1190
552
7832

query I rowsort
SELECT + col0 * + 49 AS col1 FROM tab2 cor0
----
343
3822
3871

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 21 col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to c5272facdaaa11f884c8cc0d9d4f41c7

onlyif mysql # use DIV operator for integer division
query I rowsort label-5517
SELECT + CAST( - col2 AS SIGNED ) + col0 DIV + ( 3 ) FROM tab2 cor0
----
-12
-25
0

skipif mysql # not compatible
query I rowsort label-5517
SELECT + CAST ( - col2 AS INTEGER ) + col0 / + ( 3 ) FROM tab2 cor0
----
-12
-25
0

query I rowsort
SELECT ALL + 62 * cor0.col0 + + cor0.col0 + - col1 * + col1 AS col1 FROM tab2 AS cor0
----
-520
1433
4688

query I rowsort
SELECT DISTINCT 54 + 64 AS col2 FROM tab1, tab2 AS cor0
----
118

onlyif mysql # use DIV operator for integer division
query I rowsort label-5520
SELECT - 38 DIV 81 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5520
SELECT - 38 / 81 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + + col0 + cor0.col1 * - col2 FROM tab0 cor0
----
-2814
-62
-7373

query I rowsort
SELECT col0 * col2 + - tab1.col0 * tab1.col2 FROM tab1
----
0
0
0

query I rowsort
SELECT - tab1.col0 + + col1 AS col2 FROM tab1
----
-54
-67
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-5524
SELECT + 32 + col2 DIV col0 AS col0 FROM tab1 AS cor0
----
32
33
50

skipif mysql # not compatible
query I rowsort label-5524
SELECT + 32 + col2 / col0 AS col0 FROM tab1 AS cor0
----
32
33
50

onlyif mysql # use DIV operator for integer division
query I rowsort label-5525
SELECT DISTINCT ( - 68 ) DIV col0 col1 FROM tab0
----
-1
-2
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5525
SELECT DISTINCT ( - 68 ) / col0 col1 FROM tab0
----
-1
-2
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 28 col1 FROM tab2 AS cor0
----
-28
-28
-28

query I rowsort
SELECT ALL - 59 AS col0 FROM tab1
----
-59
-59
-59

query I rowsort
SELECT ALL + - col1 + 26 FROM tab2 AS cor0
----
-33
-5
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 0 + 5 * - cor0.col1 col0 FROM tab1 AS cor0
----
-130
-50
-65

query I rowsort
SELECT ALL + tab0.col2 AS col2 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT cor0.col1 - + cor0.col2 * ( col0 ) FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT - col1 + ( - col1 ) * col2 AS col1 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT col1 - - 66 FROM tab0 AS cor0
----
152
157
163

onlyif mysql # use DIV operator for integer division
query I rowsort label-5534
SELECT ALL - - col2 DIV 92 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5534
SELECT ALL - - col2 / 92 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT ALL + - col0 + - cor0.col1 * col1 AS col0 FROM tab1 AS cor0
----
-164
-249
-679

query I rowsort
SELECT col1 * + 7 + - col1 * col0 AS col1 FROM tab2 cor0
----
-1224
-4189
0

query I rowsort
SELECT - + col0 - cor0.col1 * + col2 * col2 FROM tab0 AS cor0
----
-132
-611973
-93678

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5538
SELECT + col2 + - CAST( - col2 AS SIGNED ) AS col0 FROM tab1 cor0
----
108
114
192

skipif mysql # not compatible
query I rowsort label-5538
SELECT + col2 + - CAST ( - col2 AS INTEGER ) AS col0 FROM tab1 cor0
----
108
114
192

onlyif mysql # use DIV operator for integer division
query I rowsort label-5539
SELECT ALL + col2 DIV + 51 AS col1 FROM tab0 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5539
SELECT ALL + col2 / + 51 AS col1 FROM tab0 cor0
----
0
0
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5540
SELECT DISTINCT - col2 * + CAST( col0 AS SIGNED ) FROM tab1 AS cor0
----
-162
-3648
-7680

skipif mysql # not compatible
query I rowsort label-5540
SELECT DISTINCT - col2 * + CAST ( col0 AS INTEGER ) FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT ( 75 ) AS col2 FROM tab0 cor0
----
75

query I rowsort
SELECT ALL - 46 + col0 AS col2 FROM tab2 AS cor0
----
-39
32
33

onlyif mysql # use DIV operator for integer division
query I rowsort label-5543
SELECT + ( + col0 ) DIV col0 + + col2 AS col2 FROM tab1 cor0
----
55
58
97

skipif mysql # not compatible
query I rowsort label-5543
SELECT + ( + col0 ) / col0 + + col2 AS col2 FROM tab1 cor0
----
55
58
97

query I rowsort
SELECT DISTINCT 7 * col2 FROM tab1 AS cor0
----
378
399
672

query I rowsort
SELECT - 44 * col0 + - col1 * 37 AS col1 FROM tab2 AS cor0
----
-1455
-4105
-5615

query I rowsort
SELECT ( col0 ) + col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - ( - col1 ) + - col0 AS col1 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT DISTINCT 56 FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab2 AS cor2
----
56

query I rowsort
SELECT + 2 * - cor1.col1 + 32 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to c604763baa1f888f4670ec09171118e2

query I rowsort
SELECT + - 50 * - col0 FROM tab2 AS cor0
----
350
3900
3950

query I rowsort
SELECT + ( ( - col2 ) + 40 ) FROM tab2
----
13
14
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col1 * - col1 col1 FROM tab0 AS cor0
----
-244068
-679042
-9409

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
-24
-35
-89

query I rowsort
SELECT DISTINCT 67 AS col2 FROM tab1
----
67

query I rowsort
SELECT - ( col2 * 24 + col2 ) FROM tab2
----
-650
-675
-950

query I rowsort
SELECT - cor0.col0 + - 13 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to fd35d1f86fa2d220513a122808d7a421

query I rowsort
SELECT DISTINCT - 72 * + col2 * + 87 AS col1 FROM tab2
----
-162864
-169128
-238032

query I rowsort
SELECT col1 * - col0 - col2 FROM tab0
----
-2097
-3396
-8181

query I rowsort
SELECT - col0 * 35 FROM tab2 AS cor0
----
-245
-2730
-2765

query I rowsort
SELECT DISTINCT - 76 AS col2 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
-76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5561
SELECT ALL col2 * CAST( NULL AS SIGNED ) + + col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5561
SELECT ALL col2 * CAST ( NULL AS INTEGER ) + + col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col0 * ( - ( col1 ) ) + col2 FROM tab2 AS cor0
----
-1305
-190
-4576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col2 + 43 * - col1 col0 FROM tab1 AS cor0
----
-1064
-373
-463

onlyif mysql # use DIV operator for integer division
query I rowsort label-5564
SELECT DISTINCT col1 + + 39 DIV col2 AS col1 FROM tab0 cor0
----
136
87
91

skipif mysql # not compatible
query I rowsort label-5564
SELECT DISTINCT col1 + + 39 / col2 AS col1 FROM tab0 cor0
----
136
87
91

query I rowsort
SELECT ALL + 33 AS col1 FROM tab1
----
33
33
33

query I rowsort
SELECT ALL - col0 * + 12 * + col1 + - col0 AS col1 FROM tab2
----
-16195
-2611
-55302

query I rowsort
SELECT DISTINCT - col0 * - col0 + col1 AS col1 FROM tab1 AS cor0
----
35
4106
6413

onlyif mysql # use DIV operator for integer division
query I rowsort label-5568
SELECT ALL - col1 DIV col0 AS col2 FROM tab0 cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-5568
SELECT ALL - col1 / col0 AS col2 FROM tab0 cor0
----
-1
-2
-3

query I rowsort
SELECT + col2 + - 61 * + col2 FROM tab1 AS cor0
----
-3240
-3420
-5760

query I rowsort
SELECT ALL col1 * + col0 + ( col0 ) FROM tab0 cor0
----
2088
3430
8188

query I rowsort
SELECT ALL + 22 AS col2 FROM tab2, tab1 cor0
----
9 values hashing to c55ee7433d8d39a59b1de2aadd9538c9

query I rowsort
SELECT DISTINCT + 65 + + cor0.col2 FROM tab1, tab2 AS cor0
----
103
91
92

query I rowsort
SELECT + col1 + col0 - + col2 FROM tab0
----
131
77
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5574
SELECT DISTINCT + ( + col1 ) * col2 / + CAST( NULL AS SIGNED ) + col1 col0 FROM tab2
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5574
SELECT DISTINCT + ( + col1 ) * col2 / + CAST ( NULL AS INTEGER ) + col1 col0 FROM tab2
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col0 ) + + tab1.col0 col0 FROM tab1
----
128
160
6

query I rowsort
SELECT - cor0.col1 + cor0.col1 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT ( - 72 ) * + col0 AS col0 FROM tab1
----
-216
-4608
-5760

query I rowsort
SELECT DISTINCT - col1 * - cor0.col2 + col0 + + col2 AS col1 FROM tab1 AS cor0
----
1424
1461
691

onlyif mysql # use DIV operator for integer division
query I rowsort label-5579
SELECT ALL + col2 + col1 DIV col0 FROM tab2 cor0
----
26
31
38

skipif mysql # not compatible
query I rowsort label-5579
SELECT ALL + col2 + col1 / col0 FROM tab2 cor0
----
26
31
38

query I rowsort
SELECT DISTINCT 44 - col1 * - col0 FROM tab0 AS cor0
----
2108
3439
8143

query I rowsort
SELECT + col0 * - col2 + cor0.col2 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT col0 * cor0.col1 AS col2 FROM tab1 cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + cor0.col0 col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL - col0 - + cor0.col0 AS col2 FROM tab0 cor0
----
-178
-48
-70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 + col2 + - 19 * col2 col0 FROM tab1 AS cor0
----
-1026
-1083
-1824

onlyif mysql # use DIV operator for integer division
query I rowsort label-5586
SELECT + col2 DIV + col1 + - col0 AS col0 FROM tab2 AS cor0
----
-7
-77
-78

skipif mysql # not compatible
query I rowsort label-5586
SELECT + col2 / + col1 + - col0 AS col0 FROM tab2 AS cor0
----
-7
-77
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-5587
SELECT ALL col1 + - col1 DIV + cor0.col0 AS col1 FROM tab1 AS cor0
----
10
13
18

skipif mysql # not compatible
query I rowsort label-5587
SELECT ALL col1 + - col1 / + cor0.col0 AS col1 FROM tab1 AS cor0
----
10
13
18

query I rowsort
SELECT DISTINCT + - col1 + - col0 + - 21 AS col2 FROM tab2 AS cor0
----
-117
-158
-59

query I rowsort
SELECT DISTINCT + + 10 FROM tab1 AS cor0
----
10

query I rowsort
SELECT DISTINCT - - cor0.col2 + col0 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT - 54 * - col0 AS col1 FROM tab0 AS cor0
----
1296
1890
4806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 * - col1 col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ( cor0.col2 ) * - col2 AS col1 FROM tab1 AS cor0
----
-2916
-3249
-9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-5594
SELECT + ( + cor0.col1 ) DIV + cor0.col1 AS col1 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5594
SELECT + ( + cor0.col1 ) / + cor0.col1 AS col1 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT + - col0 * 3 * col2 AS col2 FROM tab0 AS cor0
----
-105
-21894
-2376

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5596
SELECT ALL - CAST( col2 AS SIGNED ) * + col2 AS col0 FROM tab0 AS cor0
----
-1
-1089
-6724

skipif mysql # not compatible
query I rowsort label-5596
SELECT ALL - CAST ( col2 AS INTEGER ) * + col2 AS col0 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL - 14 * + col0 FROM tab2 AS cor0
----
-1092
-1106
-98

query I rowsort
SELECT ALL + - col1 + + 87 FROM tab0 AS cor0
----
-10
-4
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 * 80 col1 FROM tab1 AS cor0
----
1040
2080
800

query I rowsort
SELECT + - 4 + + col0 * - col1 AS col2 FROM tab2 AS cor0
----
-1347
-221
-4606

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5601
SELECT CAST( NULL AS SIGNED ) + - 35 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5601
SELECT CAST ( NULL AS INTEGER ) + - 35 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 * + col1 AS col2 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT DISTINCT col1 * ( col2 ) + col0 AS col1 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT + col0 + 2 * cor0.col2 AS col2 FROM tab2 AS cor0
----
130
155
61

query I rowsort
SELECT DISTINCT cor0.col0 + + col2 * col2 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT DISTINCT col0 * - ( - col2 ) AS col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT col2 + - col0 + - 17 AS col0 FROM tab0
----
-24
-51
-8

query I rowsort
SELECT col1 * - col2 * - col1 FROM tab1
----
16224
36504
5700

query I rowsort
SELECT DISTINCT + 37 * col1 * col2 + - col1 * col1 AS col0 FROM tab0
----
-5820
267813
97610

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5610
SELECT DISTINCT col0 + col2 / - CAST( NULL AS SIGNED ) FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-5610
SELECT DISTINCT col0 + col2 / - CAST ( NULL AS INTEGER ) FROM tab2
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5611
SELECT tab1.col0 DIV + col2 + - col2 FROM tab1
----
-54
-56
-96

skipif mysql # not compatible
query I rowsort label-5611
SELECT tab1.col0 / + col2 + - col2 FROM tab1
----
-54
-56
-96

query I rowsort
SELECT ALL + 50 + col1 * tab2.col1 FROM tab2
----
1011
339
3531

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 70 col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 35707a5d99c98b2657c084a50ff1b073

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5614
SELECT DISTINCT - + col2 * CAST( col0 AS SIGNED ) FROM tab0 AS cor0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort label-5614
SELECT DISTINCT - + col2 * CAST ( col0 AS INTEGER ) FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - col1 * ( + cor0.col1 ) AS col2 FROM tab2 cor0
----
-289
-3481
-961

query I rowsort
SELECT DISTINCT + - col1 + - col0 * + col2 AS col1 FROM tab0 cor0
----
-132
-7389
-878

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * 82 + + ( col1 + - col1 ) col1 FROM tab0 AS cor0
----
2706
6724
82

query I rowsort
SELECT ALL + cor0.col2 + 9 * 85 FROM tab2 AS cor0
----
791
792
803

query I rowsort
SELECT DISTINCT + col0 + + 21 * 61 FROM tab0 cor0
----
1305
1316
1370

query I rowsort
SELECT ALL - cor0.col2 * cor0.col1 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5621
SELECT + + cor0.col1 + + CAST( NULL AS SIGNED ) + col2 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5621
SELECT + + cor0.col1 + + CAST ( NULL AS INTEGER ) + col2 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col0 * - 38 FROM tab2 AS cor0
----
266
2964
3002

query I rowsort
SELECT col1 * - ( col0 * - col0 ) AS col0 FROM tab2
----
106097
1519
358956

query I rowsort
SELECT - col0 * ( 94 * + col1 + + col0 ) AS col1 FROM tab2
----
-132483
-20447
-438672

query I rowsort
SELECT col0 * + 54 AS col2 FROM tab1 AS cor0
----
162
3456
4320

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 DISTINCT - + 71 - - cor0.col1 * cor0.col0 col2 FROM tab2 AS cor0
----
1272
146
4531

query I rowsort
SELECT - col0 + cor0.col0 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - + 91 * - col1 + cor0.col1 AS col2 FROM tab2 cor0
----
1564
2852
5428

query I rowsort
SELECT + tab1.col1 * - ( - ( + col0 ) ) AS col2 FROM tab1
----
1040
640
78

query I rowsort
SELECT DISTINCT cor1.col1 AS col1 FROM tab2, tab0 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - ( + cor0.col2 ) col2 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT - col2 * - col2 + col0 AS col1 FROM tab2 AS cor0
----
1523
736
754

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5634
SELECT + CAST( col0 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-5634
SELECT + CAST ( col0 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT + - ( - 20 ) + col1 FROM tab2 cor0
----
37
51
79

query I rowsort
SELECT - 96 + col0 * col1 * + col0 AS col1 FROM tab1 AS cor0
----
138
40864
83104

onlyif mysql # use DIV operator for integer division
query I rowsort label-5637
SELECT - + 3 DIV col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5637
SELECT - + 3 / col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + - cor0.col1 * + col0 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL + col1 * col0 - + ( col0 ) AS col2 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT ALL + cor0.col0 * - cor0.col1 + + col1 * + col0 AS col1 FROM tab0 cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5641
SELECT DISTINCT + col2 + - col1 + CAST( - col1 AS SIGNED ) * col1 * - CAST( NULL AS SIGNED ) col0 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5641
SELECT DISTINCT + col2 + - col1 + CAST ( - col1 AS INTEGER ) * col1 * - CAST ( NULL AS INTEGER ) col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + + col0 + + cor0.col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT - + 74 * - col1 + + 63 * - ( - cor0.col1 ) AS col2 FROM tab1 AS cor0
----
1370
1781
3562

query I rowsort
SELECT DISTINCT - + 48 FROM tab0 AS cor0
----
-48

query I rowsort
SELECT ALL col1 - + col0 AS col0 FROM tab0 cor0
----
2
62
62

query I rowsort
SELECT col1 * cor0.col0 * - col2 + col0 FROM tab1 AS cor0
----
-36416
-4209
-99760

query I rowsort
SELECT - col0 + 88 FROM tab2 AS cor0
----
10
81
9

query I rowsort
SELECT + col2 * col2 * + 9 + col0 FROM tab1 AS cor0
----
26247
29305
83024

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5649
SELECT + CAST( 38 AS SIGNED ) + col2 AS col1 FROM tab2
----
64
65
76

skipif mysql # not compatible
query I rowsort label-5649
SELECT + CAST ( 38 AS INTEGER ) + col2 AS col1 FROM tab2
----
64
65
76

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5650
SELECT + CAST( col0 AS SIGNED ) AS col1 FROM tab2 cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-5650
SELECT + CAST ( col0 AS INTEGER ) AS col1 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT + + 74 AS col0 FROM tab2 cor0
----
74
74
74

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5652
SELECT - CAST( NULL AS SIGNED ) * - col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5652
SELECT - CAST ( NULL AS INTEGER ) * - col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - cor0.col1 + + 30 AS col1 FROM tab0 AS cor0
----
-56
-61
-67

query I rowsort
SELECT + - 25 * - col1 + - col2 FROM tab1 AS cor0
----
193
229
596

query I rowsort
SELECT DISTINCT col0 + col1 * + col2 + col1 * - col1 AS col0 FROM tab1 AS cor0
----
1159
534
731

query I rowsort
SELECT ALL - - col0 + + col2 * 50 AS col0 FROM tab0 AS cor0
----
1674
4189
85

query I rowsort
SELECT + - col1 - - col1 * col0 FROM tab1 AS cor0
----
1027
52
630

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5658
SELECT DISTINCT + col0 + col1 * CAST( col2 * col0 AS SIGNED ) FROM tab0 AS cor0
----
3430
664207
68136

skipif mysql # not compatible
query I rowsort label-5658
SELECT DISTINCT + col0 + col1 * CAST ( col2 * col0 AS INTEGER ) FROM tab0 AS cor0
----
3430
664207
68136

query I rowsort
SELECT + + 14 + - col0 AS col2 FROM tab1 AS cor0
----
-50
-66
11

query I rowsort
SELECT + col2 * col1 + col0 AS col1 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT DISTINCT + col1 * + col1 - + ( + 97 ) FROM tab0 AS cor0
----
7299
8184
9312

query I rowsort
SELECT ALL col2 * col0 + + 58 * col2 AS col0 FROM tab1 AS cor0
----
13248
3294
6954

query I rowsort
SELECT ALL + col2 + col0 + 81 AS col0 FROM tab0 AS cor0
----
117
138
252

query IIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0 WHERE NULL <> NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5665
SELECT + col2 DIV - ( col1 ) FROM tab1 cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-5665
SELECT + col2 / - ( col1 ) FROM tab1 cor0
----
-2
-5
-7

query I rowsort
SELECT 86 * 93 FROM tab1, tab2, tab2 AS cor0, tab0 AS cor1
----
81 values hashing to 8ef4915657838e14c7f704210077f35a

query I rowsort
SELECT DISTINCT col2 * - tab0.col0 * col0 + + col0 + 65 * col2 FROM tab0
----
-1125
-16839
-644103

query I rowsort
SELECT + col1 * tab2.col2 - + 20 FROM tab2
----
1514
626
817

query I rowsort
SELECT DISTINCT - col1 * 17 + + col1 FROM tab0
----
-1376
-1456
-1552

onlyif mysql # use DIV operator for integer division
query I rowsort label-5670
SELECT - col1 DIV ( col0 ) FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-5670
SELECT - col1 / ( col0 ) FROM tab2 AS cor0
----
-4
0
0

query I rowsort
SELECT DISTINCT - + col1 + col1 * col1 AS col0 FROM tab0 cor0
----
7310
8190
9312

query I rowsort
SELECT + - col1 * 0 AS col0 FROM tab1 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5673
SELECT - ( + col0 ) DIV + col0 AS col2 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5673
SELECT - ( + col0 ) / + col0 AS col2 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT - + col1 + 88 FROM tab0 AS cor0
----
-3
-9
2

query I rowsort
SELECT 49 * + 27 AS col0 FROM tab1 cor0
----
1323
1323
1323

query I rowsort
SELECT ALL - + col1 * 60 FROM tab0 AS cor0
----
-5160
-5460
-5820

query I rowsort
SELECT DISTINCT - - 54 * + col0 * col1 FROM tab0 cor0
----
111456
183330
437346

query I rowsort
SELECT DISTINCT - 84 * col2 * - col0 FROM tab2 AS cor0
----
15876
170352
252168

query I rowsort
SELECT ALL - tab0.col0 * - col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT ALL - col0 * 52 AS col1 FROM tab1
----
-156
-3328
-4160

query I rowsort
SELECT + col1 * - ( - col0 ) - + col0 AS col2 FROM tab0
----
2040
3360
8010

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + + CAST ( col0 AS REAL ) * col0 AS col1 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT ALL - ( - 36 ) AS col0 FROM tab0 AS cor0
----
36
36
36

query I rowsort
SELECT ALL ( + col0 ) * cor0.col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT + col0 + 27 FROM tab1
----
107
30
91

query I rowsort
SELECT DISTINCT + ( + col0 ) * col0 AS col0 FROM tab0 AS cor0
----
1225
576
7921

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5687
SELECT CAST( ( - col0 ) AS SIGNED ) AS col2 FROM tab2
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-5687
SELECT CAST ( ( - col0 ) AS INTEGER ) AS col2 FROM tab2
----
-7
-78
-79

query I rowsort
SELECT - col2 + - 21 FROM tab2
----
-47
-48
-59

query I rowsort
SELECT - 49 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 01b1fa22fee872a7ba64f90d6046ffae

query I rowsort
SELECT + col0 - + tab2.col0 FROM tab2
----
0
0
0

query I rowsort
SELECT col0 * col0 - col2 * tab2.col0 FROM tab2
----
-140
3239
4056

query I rowsort
SELECT tab1.col1 * + ( + col1 ) + 71 FROM tab1
----
171
240
747

query I rowsort
SELECT ALL + 85 * + col2 * col0 FROM tab0
----
2975
620330
67320

query I rowsort
SELECT - col0 + ( + col1 ) FROM tab0
----
2
62
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * + col1 col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - ( - col2 ) + col0 AS col1 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT + 97 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 5e0d31ac41981bcdf6a665538a71a09c

query I rowsort
SELECT - 71 * col2 FROM tab1
----
-3834
-4047
-6816

onlyif mysql # use DIV operator for integer division
query I rowsort label-5699
SELECT ALL + col1 DIV col2 col0 FROM tab0
----
1
2
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5699
SELECT ALL + col1 / col2 col0 FROM tab0
----
1
2
97

query I rowsort
SELECT ALL - 86 AS col2 FROM tab1
----
-86
-86
-86

query I rowsort
SELECT DISTINCT col1 * + col1 + 37 FROM tab2 AS cor0
----
326
3518
998

query I rowsort
SELECT DISTINCT + - col1 * 96 * + col0 + col0 + col0 FROM tab2 AS cor0
----
-128770
-20818
-441636

query I rowsort
SELECT + col2 + 48 * cor0.col1 * col2 FROM tab1 AS cor0
----
27417
60000
67446

query I rowsort
SELECT DISTINCT cor0.col1 + - 11 FROM tab1 AS cor0
----
-1
15
2

query I rowsort
SELECT ALL - col2 * - ( col1 ) - + col1 * + 62 * col0 FROM tab1 AS cor0
----
-3432
-39110
-63232

query I rowsort
SELECT ALL + col2 + + 86 FROM tab2 AS cor0
----
112
113
124

query I rowsort
SELECT DISTINCT - + col1 + 74 AS col1 FROM tab2 AS cor0
----
15
43
57

query I rowsort
SELECT ALL + col1 - col2 * ( col0 + col2 ) FROM tab0
----
-13931
-1795
61

query I rowsort
SELECT + 52 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 76100d10f51995d20efdeb657e444d3c

onlyif mysql # use DIV operator for integer division
query I rowsort label-5710
SELECT col0 + - col1 + + col2 DIV col0 FROM tab2 cor0
----
-21
19
62

skipif mysql # not compatible
query I rowsort label-5710
SELECT col0 + - col1 + + col2 / col0 FROM tab2 cor0
----
-21
19
62

query I rowsort
SELECT DISTINCT - col0 + col1 AS col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT 43 FROM tab0, tab0 AS cor0
----
9 values hashing to 199105619049271147956de52e7f5ed4

query I rowsort
SELECT DISTINCT + cor0.col1 + + 82 AS col0 FROM tab1 AS cor0
----
108
92
95

query I rowsort
SELECT ALL + + col0 * 23 + col1 FROM tab1 cor0
----
1482
1853
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-5715
SELECT + cor0.col1 DIV + col0 + col1 AS col0 FROM tab0 AS cor0
----
89
92
99

skipif mysql # not compatible
query I rowsort label-5715
SELECT + cor0.col1 / + col0 + col1 AS col0 FROM tab0 AS cor0
----
89
92
99

query I rowsort
SELECT DISTINCT - col2 + cor0.col2 AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL col1 + ( 82 * col2 ) FROM tab2 AS cor0
----
2191
2245
3133

query I rowsort
SELECT ALL cor0.col0 * col1 - col2 * - col0 FROM tab2 AS cor0
----
406
4345
6630

query I rowsort
SELECT ALL col1 * - tab0.col0 AS col0 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT - 14 * + col0 AS col1 FROM tab1 cor0
----
-1120
-42
-896

query I rowsort
SELECT ALL + 87 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 8661ffbd1a72897c495405c53b816e50

query I rowsort
SELECT + + col0 * + cor0.col2 + - cor0.col2 + col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT col1 * col1 - col1 FROM tab0 AS cor0
----
7310
8190
9312

query I rowsort
SELECT ALL + 54 AS col0 FROM tab0 cor0
----
54
54
54

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5725
SELECT + - col2 * + CAST( + ( col0 ) AS SIGNED ) AS col0 FROM tab1 cor0
----
-162
-3648
-7680

skipif mysql # not compatible
query I rowsort label-5725
SELECT + - col2 * + CAST ( + ( col0 ) AS INTEGER ) AS col0 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT + col0 + + ( col1 ) * + col2 AS col2 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT + col0 * col0 * col2 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT DISTINCT 23 * - col2 AS col0 FROM tab1
----
-1242
-1311
-2208

query I rowsort
SELECT 7 + col0 AS col0 FROM tab1
----
10
71
87

query I rowsort
SELECT DISTINCT + - col0 * - ( col2 ) + ( - 45 + - col1 ) AS col2 FROM tab2 AS cor0
----
113
1924
2940

onlyif mysql # use DIV operator for integer division
query I rowsort label-5731
SELECT - 16 * col2 - col1 DIV + 42 FROM tab1 AS cor0
----
-1536
-864
-912

skipif mysql # not compatible
query I rowsort label-5731
SELECT - 16 * col2 - col1 / + 42 FROM tab1 AS cor0
----
-1536
-864
-912

query I rowsort
SELECT DISTINCT - + col2 + - col0 * + col2 FROM tab0 AS cor0
----
-36
-7380
-825

query I rowsort
SELECT ALL col1 * - ( - col0 ) FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT - - cor0.col0 + - cor0.col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT + - col2 * + col2 + - col1 AS col0 FROM tab2 AS cor0
----
-1461
-735
-760

query I rowsort
SELECT 10 * - col0 AS col1 FROM tab1 AS cor0
----
-30
-640
-800

query I rowsort
SELECT + - col0 * 59 FROM tab2 cor0
----
-413
-4602
-4661

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 61 col2 FROM tab1 cor0
----
61
61
61

query I rowsort
SELECT ALL + - ( + col2 ) * + col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT - ( - col1 ) * cor0.col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + - 61 * col2 AS col1 FROM tab0 AS cor0
----
-2013
-5002
-61

query I rowsort
SELECT DISTINCT 57 * col2 FROM tab2 AS cor0
----
1482
1539
2166

query I rowsort
SELECT ALL + 16 + col0 FROM tab1 AS cor0
----
19
80
96

query I rowsort
SELECT DISTINCT + col0 + + 10 AS col1 FROM tab0 cor0
----
34
45
99

query I rowsort
SELECT ALL col0 * - col0 * 87 - - col0 AS col2 FROM tab1
----
-356288
-556720
-780

query I rowsort
SELECT - + ( - 86 ) - - col1 FROM tab0 AS cor0
----
172
177
183

query I rowsort
SELECT - 99 * col1 FROM tab1 AS cor0
----
-1287
-2574
-990

query I rowsort
SELECT 34 * col2 - col0 * 91 AS col2 FROM tab0 AS cor0
----
-1062
-3151
-5311

query I rowsort
SELECT DISTINCT + tab1.col0 + - tab1.col1 + - col0 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT ( 38 ) * + tab1.col0 - ( + col2 ) FROM tab1
----
2375
2944
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-5751
SELECT ALL col2 * 67 DIV - col1 + - 52 FROM tab0
----
-112
-52
-77

skipif mysql # not compatible
query I rowsort label-5751
SELECT ALL col2 * 67 / - col1 + - 52 FROM tab0
----
-112
-52
-77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5752
SELECT col0 * 55 + + col0 / CAST( NULL AS DECIMAL ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5752
SELECT col0 * 55 + + col0 / CAST ( NULL AS REAL ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - 20 + cor0.col2 FROM tab1 AS cor0
----
34
37
76

query I rowsort
SELECT + col0 * - ( - col1 ) * + 32 AS col0 FROM tab2
----
147264
42976
6944

query I rowsort
SELECT - ( - col0 ) * + tab1.col1 + - col0 + col0 AS col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT col0 * + col2 * - col0 AS col1 FROM tab0
----
-1225
-19008
-649522

query I rowsort
SELECT DISTINCT - col1 + + tab1.col1 FROM tab1
----
0

query I rowsort
SELECT ALL + 8 + col2 AS col2 FROM tab1
----
104
62
65

query I rowsort
SELECT ALL 79 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 4857f2e1b1dbd184de4827f145dd02a1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 + - col0 + - 35 * col1 col1 FROM tab2 AS cor0
----
-1123
-2202
-691

skipif mysql # not compatible
query I rowsort
SELECT col0 * col2 - CAST ( + 54 AS REAL ) * col0 AS col0 FROM tab0 AS cor0
----
-1855
-504
2492

query I rowsort
SELECT - col0 * col1 + 76 + col2 FROM tab2 AS cor0
----
-114
-1229
-4500

query I rowsort
SELECT ALL - tab0.col2 AS col2 FROM tab0, tab1 cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT + + 53 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to fede6033dee346dbd272085c05724fda

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5765
SELECT DISTINCT CAST( NULL AS SIGNED ) + - 46 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-5765
SELECT DISTINCT CAST ( NULL AS INTEGER ) + - 46 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 cor1
----
NULL

query I rowsort
SELECT - 76 * col1 AS col1 FROM tab0
----
-6536
-6916
-7372

query I rowsort
SELECT DISTINCT tab1.col2 * - 6 AS col2 FROM tab1, tab2 cor0
----
-324
-342
-576

query I rowsort
SELECT DISTINCT + 34 AS col2 FROM tab1, tab0 AS cor0
----
34

query I rowsort
SELECT ALL - + col0 * 49 FROM tab0 cor0
----
-1176
-1715
-4361

query I rowsort
SELECT DISTINCT - col0 * - col2 - 45 AS col0 FROM tab0 AS cor0
----
-10
7253
747

query I rowsort
SELECT DISTINCT + tab1.col2 AS col0 FROM tab1, tab0 AS cor0
----
54
57
96

query I rowsort
SELECT ALL + - 98 + 70 AS col0 FROM tab1 AS cor0
----
-28
-28
-28

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + col2 ) col1 FROM tab1
----
54
57
96

query I rowsort
SELECT - col0 + - 47 * col1 FROM tab2 AS cor0
----
-1464
-2851
-878

query I rowsort
SELECT DISTINCT + 78 AS col0 FROM tab1 cor0
----
78

query I rowsort
SELECT - cor0.col0 * + 11 FROM tab2 cor0
----
-77
-858
-869

query I rowsort
SELECT ALL - cor0.col1 AS col0 FROM tab0, tab0 cor0, tab0 AS cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5778
SELECT CAST( NULL AS SIGNED ) + - col2 * cor0.col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5778
SELECT CAST ( NULL AS INTEGER ) + - col2 * cor0.col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + ( cor0.col2 ) * col1 + - col1 + + 42 FROM tab1 AS cor0
----
-1219
-1388
-538

query I rowsort
SELECT - cor1.col2 + cor1.col1 AS col2 FROM tab1, tab2, tab0 cor0, tab1 AS cor1
----
81 values hashing to 9303c3165fda5f0f705d03d27107c33a

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5781
SELECT + CAST( NULL AS SIGNED ) AS col0 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-5781
SELECT + CAST ( NULL AS INTEGER ) AS col0 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT + col1 * col1 * + col0 FROM tab2
----
22831
271518
6727

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( col0 ) * col0 col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT + ( + col2 ) + + col2 FROM tab2 cor0
----
52
54
76

query I rowsort
SELECT ALL cor0.col1 * + col1 + + col1 AS col0 FROM tab1 AS cor0
----
110
182
702

query I rowsort
SELECT + + 60 AS col1 FROM tab0 cor0
----
60
60
60

query I rowsort
SELECT col1 * 23 FROM tab0
----
1978
2093
2231

query I rowsort
SELECT DISTINCT - col2 + - 62 AS col0 FROM tab2 cor0
----
-100
-88
-89

query I rowsort
SELECT ALL + + 36 AS col2 FROM tab0 AS cor0
----
36
36
36

query I rowsort
SELECT DISTINCT - col1 * + col1 + col1 + + col2 * - col2 FROM tab2 cor0
----
-1659
-1716
-4098

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5791
SELECT DISTINCT - CAST( col1 AS SIGNED ) + + col0 FROM tab1 AS cor0
----
-23
54
67

skipif mysql # not compatible
query I rowsort label-5791
SELECT DISTINCT - CAST ( col1 AS INTEGER ) + + col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT ALL - ( + 50 ) * col1 FROM tab0 AS cor0
----
-4300
-4550
-4850

query I rowsort
SELECT ALL col1 + + ( + tab0.col2 ) + + col0 AS col2 FROM tab0
----
133
143
262

onlyif mysql # use DIV operator for integer division
query I rowsort label-5794
SELECT ALL col0 DIV - 8 AS col0 FROM tab2
----
-9
-9
0

skipif mysql # not compatible
query I rowsort label-5794
SELECT ALL col0 / - 8 AS col0 FROM tab2
----
-9
-9
0

query I rowsort
SELECT 39 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 5ecc4d3de68ae828a2d522dff8571cbf

query I rowsort
SELECT - 9 + col1 AS col0 FROM tab0
----
77
82
88

query I rowsort
SELECT DISTINCT 42 FROM tab1, tab2 AS cor0 CROSS JOIN tab2
----
42

query I rowsort
SELECT ALL + 65 * - cor0.col0 AS col0 FROM tab0 AS cor0
----
-1560
-2275
-5785

query I rowsort
SELECT DISTINCT + 64 * + col0 FROM tab0 cor0
----
1536
2240
5696

query I rowsort
SELECT DISTINCT - - col2 * + col2 AS col1 FROM tab0 AS cor0
----
1
1089
6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + col1 ) * col2 col0 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL + cor0.col2 * 62 AS col1 FROM tab2 AS cor0
----
1612
1674
2356

query I rowsort
SELECT + + 19 * col1 FROM tab0 AS cor0
----
1634
1729
1843

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT - + col1 + 0 * + col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT - col2 * col2 + - col0 * tab2.col1 FROM tab2
----
-2787
-5278
-946

query I rowsort
SELECT ALL - tab2.col2 + col0 * 7 FROM tab2
----
22
515
520

query I rowsort
SELECT col1 - - 9 AS col1 FROM tab0
----
100
106
95

query I rowsort
SELECT + col2 + + 81 FROM tab2
----
107
108
119

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 77 col2 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to d7b027bca5d37c67e29013904def8125

onlyif mysql # use DIV operator for integer division
query I rowsort label-5811
SELECT DISTINCT col0 + cor0.col0 DIV 81 AS col1 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-5811
SELECT DISTINCT col0 + cor0.col0 / 81 AS col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT - 96 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab2 AS cor2, tab2 AS cor3
----
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * col1 + - col2 col1 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT DISTINCT - col0 + ( 80 ) AS col2 FROM tab0 cor0
----
-9
45
56

query I rowsort
SELECT ALL + col2 - + col2 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col0 * - 30 AS col2 FROM tab0 AS cor0
----
-1050
-2670
-720

query I rowsort
SELECT ALL col2 * + ( col2 ) * + cor0.col2 + 70 - - col0 FROM tab1 AS cor0
----
157537
185327
884886

onlyif mysql # use DIV operator for integer division
query I rowsort label-5818
SELECT DISTINCT col0 + - CAST( - cor0.col1 AS SIGNED ) DIV + cor0.col2 col2 FROM tab1 AS cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5818
SELECT DISTINCT col0 + - CAST ( - cor0.col1 AS INTEGER ) / + cor0.col2 col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT - col0 - - 65 FROM tab0 AS cor0
----
-24
30
41

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5820
SELECT DISTINCT - + col0 + CAST( cor0.col2 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-34
-7
9

skipif mysql # not compatible
query I rowsort label-5820
SELECT DISTINCT - + col0 + CAST ( cor0.col2 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT - + col0 + col1 * col1 * + col2 FROM tab2 AS cor0
----
10903
25940
90428

query I rowsort
SELECT ALL cor0.col2 * - col0 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - col2 * 12 + cor0.col0 FROM tab1 AS cor0
----
-1072
-620
-645

query I rowsort
SELECT ALL - cor0.col1 + ( + 52 ) - - col0 FROM tab2 cor0
----
114
28
71

query I rowsort
SELECT ALL - + 73 AS col2 FROM tab2 AS cor0
----
-73
-73
-73

query I rowsort
SELECT + col1 + ( - col1 ) AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + - col1 - col0 * - col1 AS col0 FROM tab2 cor0
----
1326
186
4543

query I rowsort
SELECT - + ( 93 ) * col1 + 74 * 38 FROM tab2 AS cor0
----
-2675
-71
1231

query I rowsort
SELECT + - ( - cor0.col1 ) FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL 15 FROM tab1, tab1 AS cor0
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

query I rowsort
SELECT DISTINCT cor0.col2 + - col1 * 45 FROM tab0 AS cor0
----
-3837
-4013
-4364

query I rowsort
SELECT col0 + col0 * - ( + cor0.col2 * col2 ) AS col1 FROM tab1 AS cor0
----
-207872
-737200
-8745

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 25 * col1 col0 FROM tab0 cor0
----
2150
2275
2425

query I rowsort
SELECT - - 65 * + cor0.col1 AS col0 FROM tab1 AS cor0
----
1690
650
845

query I rowsort
SELECT + ( ( - col0 ) + - 85 * 39 ) AS col2 FROM tab0
----
-3339
-3350
-3404

query I rowsort
SELECT DISTINCT - + col1 + + cor0.col2 - ( + cor0.col0 ) FROM tab2 AS cor0
----
-11
-111
-58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - col2 col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT - + 26 AS col1 FROM tab1 AS cor0
----
-26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5839
SELECT DISTINCT - tab0.col2 * col1 * CAST( NULL AS SIGNED ) - tab0.col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-5839
SELECT DISTINCT - tab0.col2 * col1 * CAST ( NULL AS INTEGER ) - tab0.col0 FROM tab0
----
NULL

query I rowsort
SELECT col1 * col2 - ( 83 ) * + col2 FROM tab1
----
-3078
-4161
-6720

onlyif mysql # use DIV operator for integer division
query I rowsort label-5841
SELECT + col2 DIV - col0 + col1 * tab2.col1 AS col0 FROM tab2
----
289
3481
958

skipif mysql # not compatible
query I rowsort label-5841
SELECT + col2 / - col0 + col1 * tab2.col1 AS col0 FROM tab2
----
289
3481
958

query I rowsort
SELECT + col2 - + 76 FROM tab0 AS cor0
----
-43
-75
6

query I rowsort
SELECT - cor0.col0 * - ( 38 ) AS col1 FROM tab2 AS cor0
----
266
2964
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + 6 * col2 col2 FROM tab2 AS cor0
----
182
189
266

query I rowsort
SELECT + col1 - + col0 AS col2 FROM tab1 AS cor0
----
-54
-67
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + + col1 col2 FROM tab2
----
137
38
96

query I rowsort
SELECT ALL - col2 - col1 AS col1 FROM tab0
----
-119
-173
-98

query I rowsort
SELECT ALL ( col0 ) - ( - tab1.col2 ) FROM tab1
----
121
176
57

query I rowsort
SELECT ALL 33 * col1 - col0 AS col2 FROM tab1
----
266
349
855

query I rowsort
SELECT ALL - col2 - col1 * - col0 AS col2 FROM tab2
----
1305
190
4576

query I rowsort
SELECT DISTINCT - col2 * - tab2.col0 * col0 FROM tab2
----
1323
158184
237158

query I rowsort
SELECT - col1 + - tab1.col2 + col0 FROM tab1
----
-29
-3
-77

query I rowsort
SELECT + col1 * col2 FROM tab0 WHERE ( NULL ) NOT IN ( tab0.col1 )
----

query I rowsort
SELECT ALL + col1 * tab0.col1 * col1 AS col0 FROM tab0
----
636056
753571
912673

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT ( NULL ) IN ( - col0 )
----

query I rowsort
SELECT col0 + - col0 * + col1 + - col2 FROM tab2 WHERE NULL NOT IN ( - tab2.col2 * - col0 )
----

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab0 WHERE NOT NULL IN ( - col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col0 * + col1 * - col0 + + col0 * tab2.col0 col1 FROM tab2
----
112338
1568
365040

query I rowsort
SELECT tab2.col0 AS col2 FROM tab2 WHERE NULL > + col1
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT + col2 IN ( + col1 + tab2.col1 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT DISTINCT tab2.col1 + - tab2.col2 * col1 FROM tab2
----
-1475
-629
-806

query I rowsort
SELECT ALL col0 / col1 FROM tab2 WHERE NULL < ( NULL )
----

query I rowsort
SELECT + col0 * col2 * tab1.col2 FROM tab1
----
207936
737280
8748

query I rowsort
SELECT ALL + + col1 * + col1 + + 63 * ( - col0 ) FROM tab1 cor0
----
-3932
-4871
487

query I rowsort
SELECT - 87 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to c0011cd00aa3e86f06bebc13678997f9

query I rowsort
SELECT - 37 * col1 FROM tab0
----
-3182
-3367
-3589

query I rowsort
SELECT + + col2 + col0 + + col1 FROM tab2 AS cor0
----
134
163
65

query I rowsort
SELECT 3 + col1 * + col0 + - cor0.col1 AS col2 FROM tab0 cor0
----
1981
3301
8011

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5869
SELECT + col0 * col2 + CAST( - 40 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-5
7258
752

skipif mysql # not compatible
query I rowsort label-5869
SELECT + col0 * col2 + CAST ( - 40 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-5
7258
752

query I rowsort
SELECT DISTINCT col1 * col0 + + col0 AS col2 FROM tab2 WHERE NULL = NULL
----

query I rowsort
SELECT DISTINCT + col0 + + col2 FROM tab0
----
171
36
57

query I rowsort
SELECT col2 + - col0 * + col1 FROM tab0
----
-2031
-3394
-8017

query III rowsort
SELECT * FROM tab1 WHERE + col2 > ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5874
SELECT DISTINCT + col0 + col0 DIV col2 FROM tab1
----
3
65
80

skipif mysql # not compatible
query I rowsort label-5874
SELECT DISTINCT + col0 + col0 / col2 FROM tab1
----
3
65
80

query I rowsort
SELECT - col0 + col0 * + col1 FROM tab2
----
1264
210
4524

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE NOT col1 = NULL
----

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab1, tab1 AS cor0 WHERE NOT NULL IN ( - cor0.col0 )
----

query I rowsort
SELECT ALL cor0.col0 + cor0.col0 FROM tab2 cor0
----
14
156
158

query I rowsort
SELECT ALL - col1 + col1 * - col2 AS col1 FROM tab1
----
-1261
-1430
-580

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 + + tab1.col0 * col2 - + col0 * col0 col1 FROM tab1
----
-391
1376
207

query I rowsort
SELECT ALL + tab2.col1 + col0 + tab2.col2 * col0 FROM tab2
----
2165
227
3098

query I rowsort
SELECT DISTINCT col0 + col1 + col2 AS col0 FROM tab1
----
131
189
83

query I rowsort
SELECT DISTINCT col2 * + col2 * col2 + tab1.col0 AS col2 FROM tab1
----
157467
185257
884816

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT ( col0 ) = NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + + col1 + - col1 col0 FROM tab0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-5886
SELECT DISTINCT tab2.col0 DIV - tab2.col0 FROM tab2
----
-1

skipif mysql # not compatible
query I rowsort label-5886
SELECT DISTINCT tab2.col0 / - tab2.col0 FROM tab2
----
-1

query I rowsort
SELECT DISTINCT + tab1.col1 * - col1 + - col2 FROM tab1
----
-157
-265
-730

query I rowsort
SELECT DISTINCT - col0 * - col2 + col0 * - col2 * + col0 FROM tab0
----
-1190
-18216
-642224

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + col0 * col0 col1 FROM tab1 WHERE NOT - col0 IN ( tab1.col0 * - col2 + col2 + - tab1.col2 / - tab1.col1 )
----
4032
6
6320

query I rowsort
SELECT - tab1.col1 + - col0 - col2 * col0 AS col2 FROM tab1
----
-191
-3722
-7773

query I rowsort
SELECT col0 + + col0 + col2 AS col1 FROM tab2
----
182
196
41

query I rowsort
SELECT DISTINCT col1 + + col0 * tab0.col1 + - col1 FROM tab0
----
2064
3395
8099

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE col2 - col1 NOT BETWEEN ( NULL ) AND NULL
----

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5894
SELECT ALL - CAST( - 41 AS SIGNED ) FROM tab0
----
41
41
41

skipif mysql # not compatible
query I rowsort label-5894
SELECT ALL - CAST ( - 41 AS INTEGER ) FROM tab0
----
41
41
41

query I rowsort
SELECT 88 + + col2 AS col0 FROM tab1 cor0
----
142
145
184

query I rowsort
SELECT + 18 + col1 * - 1 FROM tab0 AS cor0
----
-68
-73
-79

query I rowsort
SELECT 91 * - col1 + + col1 FROM tab1 AS cor0
----
-1170
-2340
-900

query I rowsort
SELECT DISTINCT + - cor0.col1 * - col2 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL ( + col2 ) + 95 * + 4 * - col2 FROM tab1 cor0
----
-20466
-21603
-36384

onlyif mysql # use DIV operator for integer division
query I rowsort label-5900
SELECT + 92 * cor0.col0 - col2 DIV - col1 col1 FROM tab0 cor0
----
2208
3220
8188

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5900
SELECT + 92 * cor0.col0 - col2 / - col1 col1 FROM tab0 cor0
----
2208
3220
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-5901
SELECT - col0 DIV + col1 + + col2 col2 FROM tab1 AS cor0
----
51
54
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5901
SELECT - col0 / + col1 + + col2 col2 FROM tab1 AS cor0
----
51
54
90

query I rowsort
SELECT + 67 * col1 * - 74 - - col0 * - col2 AS col2 FROM tab0 cor0
----
-427180
-458476
-480961

onlyif mysql # use DIV operator for integer division
query I rowsort label-5903
SELECT col2 DIV 21 AS col2 FROM tab0
----
0
1
3

skipif mysql # not compatible
query I rowsort label-5903
SELECT col2 / 21 AS col2 FROM tab0
----
0
1
3

query I rowsort
SELECT - col1 * + ( + 91 + + cor0.col1 ) FROM tab0 cor0
----
-15222
-16562
-18236

query I rowsort
SELECT + - col1 * 48 FROM tab2 AS cor0
----
-1488
-2832
-816

query I rowsort
SELECT + cor0.col2 * 45 * + 62 FROM tab0 AS cor0
----
228780
2790
92070

query I rowsort
SELECT DISTINCT + - 59 AS col0 FROM tab1 AS cor0
----
-59

query I rowsort
SELECT - + 50 * 55 FROM tab0 AS cor0
----
-2750
-2750
-2750

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab0 cor2, tab2 AS cor3
----
3645 values hashing to 59ca7c96f3955e014bebd08b5442edff

query I rowsort
SELECT DISTINCT col1 * + cor0.col2 + col2 FROM tab0 AS cor0
----
2871
7544
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-5911
SELECT col2 * + cor0.col1 + 39 DIV col2 + + col2 FROM tab1 AS cor0
----
1344
1458
627

skipif mysql # not compatible
query I rowsort label-5911
SELECT col2 * + cor0.col1 + 39 / col2 + + col2 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT ALL - 8 * + cor0.col2 AS col2 FROM tab0 AS cor0
----
-264
-656
-8

query I rowsort
SELECT 10 * col0 FROM tab2 AS cor0
----
70
780
790

query I rowsort
SELECT - 84 + - col1 FROM tab0 cor0
----
-170
-175
-181

query I rowsort
SELECT ALL - col1 + - col1 + col1 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT ALL 34 * - col0 AS col0 FROM tab1 AS cor0
----
-102
-2176
-2720

query I rowsort
SELECT DISTINCT - 11 + + col1 FROM tab2 cor0
----
20
48
6

query I rowsort
SELECT - col1 + col0 * col2 FROM tab0 cor0
----
-62
706
7207

query I rowsort
SELECT - tab0.col2 AS col0 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * + col2 * col2 col2 FROM tab2
----
17576
19683
54872

query I rowsort
SELECT DISTINCT 44 + + col1 AS col1 FROM tab0 AS cor0
----
130
135
141

onlyif mysql # use DIV operator for integer division
query I rowsort label-5922
SELECT ALL + + col1 DIV - col0 FROM tab0 cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-5922
SELECT ALL + + col1 / - col0 FROM tab0 cor0
----
-1
-2
-3

query I rowsort
SELECT - 30 * col2 FROM tab0 AS cor0
----
-2460
-30
-990

onlyif mysql # use DIV operator for integer division
query I rowsort label-5924
SELECT DISTINCT - 50 DIV + col1 + 98 + - col0 AS col0 FROM tab2
----
17
20
90

skipif mysql # not compatible
query I rowsort label-5924
SELECT DISTINCT - 50 / + col1 + 98 + - col0 AS col0 FROM tab2
----
17
20
90

query I rowsort
SELECT col1 * - col0 * tab1.col1 FROM tab1
----
-13520
-2028
-6400

query I rowsort
SELECT ALL - 22 * col1 * col0 + + tab0.col1 + col1 * + col0 FROM tab0
----
-169988
-43258
-71198

query I rowsort
SELECT col2 + cor0.col2 + cor0.col0 FROM tab1 AS cor0
----
111
178
272

query I rowsort
SELECT - col2 * - col0 + 27 * - col1 FROM tab1
----
-540
3378
7329

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5929
SELECT ALL + CAST( - ( col1 ) AS SIGNED ) * col0 + col0 col1 FROM tab0 AS cor0
----
-2040
-3360
-8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5929
SELECT ALL + CAST ( - ( col1 ) AS INTEGER ) * col0 + col0 col1 FROM tab0 AS cor0
----
-2040
-3360
-8010

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5930
SELECT DISTINCT + - CAST( NULL AS SIGNED ) * - col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5930
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) * - col2 FROM tab1 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5931
SELECT ALL - ( col0 ) * col1 DIV - 72 + col2 DIV - cor0.col0 FROM tab2 AS cor0
----
0
18
63

skipif mysql # not compatible
query I rowsort label-5931
SELECT ALL - ( col0 ) * col1 / - 72 + col2 / - cor0.col0 FROM tab2 AS cor0
----
0
18
63

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( 50 AS REAL ) * col2 + + ( + col2 ) AS col2 FROM tab2 cor0
----
-1274
-1323
-1862

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0, tab0 AS cor1, tab2, tab2 cor2
----
3645 values hashing to 489dc4a89dc53914f025e2426f93a929

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5934
SELECT ALL - CAST( col1 AS SIGNED ) - + col0 * + col1 FROM tab2
----
-1360
-248
-4661

skipif mysql # not compatible
query I rowsort label-5934
SELECT ALL - CAST ( col1 AS INTEGER ) - + col0 * + col1 FROM tab2
----
-1360
-248
-4661

query I rowsort
SELECT - cor0.col1 * - ( col1 ) + + 25 + + col1 * - col0 FROM tab0 AS cor0
----
207
5357
6039

query I rowsort
SELECT + - col2 - col2 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT - col0 * - col0 + col2 * ( col2 * col1 ) AS col1 FROM tab2 AS cor0
----
22648
30789
45968

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5938
SELECT - CAST( NULL AS SIGNED ) - - cor0.col0 * - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5938
SELECT - CAST ( NULL AS INTEGER ) - - cor0.col0 * - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col0 ) * col1 - - col1 col2 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT ( col1 ) * + col1 + + col2 FROM tab1
----
157
265
730

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5941
SELECT CAST( NULL AS SIGNED ) * col0 * - tab1.col1 + - 73 * + col0 AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5941
SELECT CAST ( NULL AS INTEGER ) * col0 * - tab1.col1 + - 73 * + col0 AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col0 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT DISTINCT ( + cor0.col1 ) - col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT 91 * - col0 * + col1 FROM tab1 AS cor0
----
-58240
-7098
-94640

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5945
SELECT ALL + + cor0.col2 * + col2 + col0 + - CAST( col2 + - col1 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
2891
3266
9213

skipif mysql # not compatible
query I rowsort label-5945
SELECT ALL + + cor0.col2 * + col2 + col0 + - CAST ( col2 + - col1 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
2891
3266
9213

query I rowsort
SELECT + ( col1 ) * cor0.col0 FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5947
SELECT DISTINCT + CAST( NULL AS SIGNED ) + col1 col1 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5947
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + col1 col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL - 65 FROM tab1 cor0
----
-65
-65
-65

query I rowsort
SELECT + ( + col1 * + col1 ) FROM tab2
----
289
3481
961

query I rowsort
SELECT ALL + cor1.col1 * cor0.col2 AS col0 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 6eca0fdf700a988d88ac850bac7633ab

query I rowsort
SELECT - 80 + cor0.col2 AS col0 FROM tab1 AS cor0
----
-23
-26
16

query I rowsort
SELECT ALL col2 * col2 + - col1 FROM tab2 AS cor0
----
1427
617
698

query I rowsort
SELECT ALL + + cor0.col0 * - col2 + - 85 FROM tab0 AS cor0
----
-120
-7383
-877

onlyif mysql # use DIV operator for integer division
query I rowsort label-5954
SELECT DISTINCT - + col0 DIV col2 + - 42 - + col2 AS col1 FROM tab1 AS cor0
----
-100
-138
-96

skipif mysql # not compatible
query I rowsort label-5954
SELECT DISTINCT - + col0 / col2 + - 42 - + col2 AS col1 FROM tab1 AS cor0
----
-100
-138
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5955
SELECT - CAST( NULL AS DECIMAL ) AS col1 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-5955
SELECT - CAST ( NULL AS REAL ) AS col1 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL + - col2 + - col1 FROM tab0 AS cor0
----
-119
-173
-98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5957
SELECT DISTINCT + 62 * + col0 + CAST( NULL AS SIGNED ) * - 39 * col0 AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5957
SELECT DISTINCT + 62 * + col0 + CAST ( NULL AS INTEGER ) * - 39 * col0 AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - col0 + col0 * col2 * 79 + col2 AS col0 FROM tab1 AS cor0
----
12849
288185
606736

query I rowsort
SELECT + col1 * + col2 * col1 - - col0 * col1 AS col1 FROM tab1 AS cor0
----
17264
36582
6340

query I rowsort
SELECT ALL col2 + + col1 + col1 * - col2 FROM tab0 cor0
----
-2719
-7289
1

query I rowsort
SELECT + - 9 + col2 * - 92 + col2 * cor0.col0 AS col2 FROM tab2 AS cor0
----
-2304
-373
-503

query I rowsort
SELECT ALL - col0 + - col0 + 75 AS col1 FROM tab2 AS cor0
----
-81
-83
61

query I rowsort
SELECT ALL + 99 * cor0.col0 AS col1 FROM tab2, tab0 cor0
----
9 values hashing to 9f4d89c89a6c31bd6ad178190f0ab4c5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + 79 * col2 col0 FROM tab1 AS cor0
----
-230364
-256671
-728064

query I rowsort
SELECT DISTINCT - - col0 * cor0.col2 AS col0 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-5966
SELECT DISTINCT + col0 DIV + ( - col1 ) FROM tab2 AS cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-5966
SELECT DISTINCT + col0 / + ( - col1 ) FROM tab2 AS cor0
----
-1
-4
0

query I rowsort
SELECT ALL + - 72 FROM tab0 cor0
----
-72
-72
-72

query I rowsort
SELECT + 47 * + col1 FROM tab1 AS cor0
----
1222
470
611

query I rowsort
SELECT ALL - - col1 + 12 FROM tab2 cor0
----
29
43
71

query I rowsort
SELECT DISTINCT + 48 * + cor0.col2 FROM tab0 AS cor0
----
1584
3936
48

query I rowsort
SELECT DISTINCT ( 11 ) FROM tab0 AS cor0
----
11

query I rowsort
SELECT ALL - 5 + + col0 * col0 AS col2 FROM tab1 AS cor0
----
4
4091
6395

query I rowsort
SELECT - 66 + + col1 * - col2 FROM tab2 AS cor0
----
-1600
-712
-903

query I rowsort
SELECT ALL 41 + + 98 * - col0 * - col1 FROM tab2 cor0
----
131655
21307
451037

query I rowsort
SELECT ALL - col1 * + col2 - cor0.col2 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT + + 1 + - col0 * + col0 * ( cor0.col0 ) FROM tab2 AS cor0
----
-342
-474551
-493038

query I rowsort
SELECT DISTINCT - 45 + + 32 FROM tab1 AS cor0
----
-13

onlyif mysql # use DIV operator for integer division
query I rowsort label-5978
SELECT ALL - - ( - col2 ) * + col2 * col0 + + col1 DIV cor0.col2 FROM tab0 AS cor0
----
-26134
-598435
62

skipif mysql # not compatible
query I rowsort label-5978
SELECT ALL - - ( - col2 ) * + col2 * col0 + + col1 / cor0.col2 FROM tab0 AS cor0
----
-26134
-598435
62

query I rowsort
SELECT - 53 + col1 * cor0.col0 FROM tab1 AS cor0
----
25
587
987

query I rowsort
SELECT DISTINCT + 26 AS col2 FROM tab2 AS cor0
----
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + 57 + - col1 * + cor0.col2 * - cor0.col0 col2 FROM tab1 AS cor0
----
100581
37050
5694

query I rowsort
SELECT ALL - col0 + ( + col2 ) AS col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT - 95 + cor1.col2 AS col2 FROM tab2, tab0 AS cor0, tab2 cor1
----
27 values hashing to 35ad91a5c1a1dc1eb33c8292a2acc1aa

query I rowsort
SELECT + col0 * ( - col2 ) AS col2 FROM tab1 cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-5985
SELECT ( col2 ) DIV 41 + + 27 AS col0 FROM tab2
----
27
27
27

skipif mysql # not compatible
query I rowsort label-5985
SELECT ( col2 ) / 41 + + 27 AS col0 FROM tab2
----
27
27
27

query I rowsort
SELECT tab0.col1 + + col0 * ( ( col1 ) * + col1 ) AS col1 FROM tab0
----
177590
329412
737100

query I rowsort
SELECT col2 * + 90 FROM tab1
----
4860
5130
8640

query I rowsort
SELECT ALL - col1 * ( + col2 ) + col1 AS col2 FROM tab0
----
-2752
-7371
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * tab2.col1 + tab2.col0 col1 FROM tab2
----
1422
224
4680

onlyif mysql # use DIV operator for integer division
query I rowsort label-5990
SELECT ALL col2 + + 37 + col1 DIV col1 FROM tab0
----
120
39
71

skipif mysql # not compatible
query I rowsort label-5990
SELECT ALL col2 + + 37 + col1 / col1 FROM tab0
----
120
39
71

query I rowsort
SELECT DISTINCT + cor0.col1 * - col2 AS col1 FROM tab0 cor0
----
-2838
-7462
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + tab1.col2 col1 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT 63 + - col0 FROM tab0 cor0
----
-26
28
39

onlyif mysql # use DIV operator for integer division
query I rowsort label-5994
SELECT ( 92 ) DIV - col2 + ( - col2 + - col2 * - tab1.col0 ) FROM tab1
----
107
3590
7584

skipif mysql # not compatible
query I rowsort label-5994
SELECT ( 92 ) / - col2 + ( - col2 + - col2 * - tab1.col0 ) FROM tab1
----
107
3590
7584

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5995
SELECT DISTINCT + CAST( - col1 AS SIGNED ) col1 FROM tab0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5995
SELECT DISTINCT + CAST ( - col1 AS INTEGER ) col1 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT + 11 - - 29 FROM tab2
----
40
40
40

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5997
SELECT - CAST( 28 AS SIGNED ) FROM tab2 AS cor0
----
-28
-28
-28

skipif mysql # not compatible
query I rowsort label-5997
SELECT - CAST ( 28 AS INTEGER ) FROM tab2 AS cor0
----
-28
-28
-28

query I rowsort
SELECT ALL - 61 FROM tab2, tab0 AS cor0
----
9 values hashing to 51f53697966a79d306a4570537cd91a1

query I rowsort
SELECT ALL + 40 FROM tab2, tab1, tab0 cor0
----
27 values hashing to e4d10f7d6c34a281f524e45e82ebd2a0

query I rowsort
SELECT ALL - col1 * + cor0.col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL + 92 + cor0.col1 - col2 FROM tab1 AS cor0
----
45
64
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 18 * - cor0.col1 col2 FROM tab1 cor0
----
-180
-234
-468

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 87 col1 FROM tab0 AS cor0
----
87
87
87

onlyif mysql # use DIV operator for integer division
query I rowsort label-6004
SELECT DISTINCT - col1 DIV col1 AS col2 FROM tab0 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-6004
SELECT DISTINCT - col1 / col1 AS col2 FROM tab0 AS cor0
----
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6005
SELECT + col0 + - cor0.col0 * - CAST( NULL AS SIGNED ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6005
SELECT + col0 + - cor0.col0 * - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * col1 + - cor0.col1 col2 FROM tab0 cor0
----
1978
3298
8008

query I rowsort
SELECT - 49 * - col1 * + col1 FROM tab2 AS cor0
----
14161
170569
47089

query I rowsort
SELECT + 89 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 860d55eb6785972467218a9c3badb5ad

query I rowsort
SELECT DISTINCT + 88 AS col1 FROM tab0
----
88

query I rowsort
SELECT 28 AS col2 FROM tab0, tab2 AS cor0, tab2 AS cor1, tab2 AS cor2
----
81 values hashing to 423726553d33e100432ebde49ddd31b5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 50 + - col1 col0 FROM tab2
----
-9
19
33

query I rowsort
SELECT + + 64 * - col0 FROM tab1 cor0
----
-192
-4096
-5120

query I rowsort
SELECT + col0 + - ( + col2 ) FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT - tab1.col1 * + col2 - 96 FROM tab1
----
-1344
-1500
-666

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab2 cor0 CROSS JOIN tab2, tab0 AS cor1
----
7
78
79

query I rowsort
SELECT DISTINCT + col2 + + col1 * + 41 AS col0 FROM tab1 AS cor0
----
1120
467
629

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6017
SELECT DISTINCT - - col0 + + CAST( NULL AS DECIMAL ) AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6017
SELECT DISTINCT - - col0 + + CAST ( NULL AS REAL ) AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - col0 * 2 AS col2 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT ALL + + col1 * - 78 AS col0 FROM tab1 AS cor0
----
-1014
-2028
-780

query I rowsort
SELECT + cor0.col0 + - cor0.col1 AS col1 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT - col0 * 91 FROM tab2 AS cor0
----
-637
-7098
-7189

query I rowsort
SELECT - cor0.col2 * 69 AS col2 FROM tab1 AS cor0
----
-3726
-3933
-6624

query I rowsort
SELECT ALL - col0 * + col0 * + col2 AS col2 FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT - 35 + col0 * + col1 FROM tab1 AS cor0
----
1005
43
605

query I rowsort
SELECT + + cor0.col2 * col0 + col2 + col2 FROM tab0 AS cor0
----
37
7462
858

onlyif mysql # use DIV operator for integer division
query I rowsort label-6026
SELECT + - cor0.col0 * col0 DIV - col0 + - 56 FROM tab0 AS cor0
----
-21
-32
33

skipif mysql # not compatible
query I rowsort label-6026
SELECT + - cor0.col0 * col0 / - col0 + - 56 FROM tab0 AS cor0
----
-21
-32
33

query I rowsort
SELECT + ( - col0 ) * col2 AS col2 FROM tab1
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 + 20 * - col2 * - 74 col0 FROM tab2 AS cor0
----
38454
39933
56202

query I rowsort
SELECT - + 78 + col0 + cor0.col1 AS col0 FROM tab1 AS cor0
----
-4
-49
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 43 * + 95 col1 FROM tab0 AS cor0
----
-4085
-4085
-4085

onlyif mysql # use DIV operator for integer division
query I rowsort label-6031
SELECT - - 87 * 90 - col1 DIV cor0.col2 AS col1 FROM tab0 AS cor0
----
7733
7828
7829

skipif mysql # not compatible
query I rowsort label-6031
SELECT - - 87 * 90 - col1 / cor0.col2 AS col1 FROM tab0 AS cor0
----
7733
7828
7829

query I rowsort
SELECT ALL - ( 33 ) AS col2 FROM tab2
----
-33
-33
-33

query I rowsort
SELECT ALL col1 + + 49 FROM tab2
----
108
66
80

query I rowsort
SELECT DISTINCT col2 - ( + col0 ) * col0 AS col1 FROM tab2
----
-22
-6058
-6203

query I rowsort
SELECT ALL - col1 - 12 FROM tab0
----
-103
-109
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-6036
SELECT ALL + col0 DIV col1 + 29 * + col0 FROM tab2 cor0
----
203
2263
2295

skipif mysql # not compatible
query I rowsort label-6036
SELECT ALL + col0 / col1 + 29 * + col0 FROM tab2 cor0
----
203
2263
2295

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6037
SELECT cor0.col2 - + CAST( col1 AS SIGNED ) * col2 * col0 AS col2 FROM tab2 AS cor0
----
-119626
-50996
-5832

skipif mysql # not compatible
query I rowsort label-6037
SELECT cor0.col2 - + CAST ( col1 AS INTEGER ) * col2 * col0 AS col2 FROM tab2 AS cor0
----
-119626
-50996
-5832

query I rowsort
SELECT ALL + col1 + ( + col0 * col0 ) + - col1 FROM tab1 AS cor0
----
4096
6400
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 + - col1 col2 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT ALL - - 57 + cor0.col2 AS col1 FROM tab0 AS cor0
----
139
58
90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6041
SELECT + - CAST( NULL AS DECIMAL ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6041
SELECT + - CAST ( NULL AS REAL ) FROM tab0 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6042
SELECT ALL - 85 DIV 6 + + col2 AS col0 FROM tab2 AS cor0
----
12
13
24

skipif mysql # not compatible
query I rowsort label-6042
SELECT ALL - 85 / 6 + + col2 AS col0 FROM tab2 AS cor0
----
12
13
24

query I rowsort
SELECT DISTINCT - col0 * 63 FROM tab2 AS cor0
----
-441
-4914
-4977

query I rowsort
SELECT DISTINCT col0 + ( + col0 ) - col0 * col1 AS col1 FROM tab0 AS cor0
----
-2016
-3325
-7921

query I rowsort
SELECT + - 81 + col0 AS col0 FROM tab0 AS cor0
----
-46
-57
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 27 col0 FROM tab0 AS cor0
----
-27
-27
-27

query I rowsort
SELECT DISTINCT + + col2 + - cor0.col1 AS col0 FROM tab2 cor0
----
-33
-4
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-6048
SELECT DISTINCT - cor0.col0 DIV ( col0 ) + + col2 * - col2 AS col0 FROM tab0 AS cor0
----
-1090
-2
-6725

skipif mysql # not compatible
query I rowsort label-6048
SELECT DISTINCT - cor0.col0 / ( col0 ) + + col2 * - col2 AS col0 FROM tab0 AS cor0
----
-1090
-2
-6725

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( 18 AS REAL ) * col2 + col2 FROM tab2 AS cor0
----
-442
-459
-646

query I rowsort
SELECT ALL - 37 * - col1 FROM tab2 cor0
----
1147
2183
629

query I rowsort
SELECT DISTINCT 30 * + col1 + - col2 FROM tab2 cor0
----
1744
472
903

query I rowsort
SELECT ALL col2 + - col2 - - col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT - 17 AS col2 FROM tab0, tab0 AS cor0
----
-17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 - + col1 * col2 col0 FROM tab2
----
-1475
-629
-806

query I rowsort
SELECT col2 - ( 92 ) AS col1 FROM tab2
----
-54
-65
-66

query I rowsort
SELECT + 1 * - ( + col2 ) AS col2 FROM tab0 AS cor0
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 * col0 + col0 col0 FROM tab2 AS cor0
----
-182
-1950
-2923

onlyif mysql # use DIV operator for integer division
query I rowsort label-6058
SELECT col1 DIV - col2 col0 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6058
SELECT col1 / - col2 col0 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * - cor0.col1 + col2 * col2 col1 FROM tab1 AS cor0
----
1512
2679
7968

query I rowsort
SELECT ( - col1 ) + + cor0.col2 AS col1 FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6061
SELECT ALL ( + col2 ) DIV - col1 AS col2 FROM tab2 cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-6061
SELECT ALL ( + col2 ) / - col1 AS col2 FROM tab2 cor0
----
-2
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 5 + + 33 * - cor0.col0 col0 FROM tab0 AS cor0
----
-1150
-2932
-787

query I rowsort
SELECT + - 46 * + col1 AS col1 FROM tab1 AS cor0
----
-1196
-460
-598

query I rowsort
SELECT + + col0 * + col1 AS col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + 56 * col0 * - ( - col1 * col2 ) AS col1 FROM tab1 AS cor0
----
2042880
235872
5591040

query I rowsort
SELECT - 56 * + col0 FROM tab1 AS cor0
----
-168
-3584
-4480

query I rowsort
SELECT ALL + + 58 + + cor0.col0 FROM tab1 AS cor0
----
122
138
61

query I rowsort
SELECT - + 15 + col1 * col2 AS col1 FROM tab2 AS cor0
----
1519
631
822

query I rowsort
SELECT ALL - col1 - + col1 AS col0 FROM tab1 AS cor0
----
-20
-26
-52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 58 col2 FROM tab1 AS cor0
----
-58

query I rowsort
SELECT + - col2 * - col2 AS col0 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT ALL col0 + - col1 * col0 FROM tab1 cor0
----
-576
-75
-960

query I rowsort
SELECT + - col2 * + col2 AS col1 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT ALL + + 49 - col2 AS col2 FROM tab1 AS cor0
----
-47
-5
-8

query I rowsort
SELECT DISTINCT - cor0.col2 * col0 AS col2 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL col0 * col1 + - 83 * col2 AS col1 FROM tab2 AS cor0
----
-1811
-2024
2444

query I rowsort
SELECT ALL + ( + tab2.col2 ) * 88 FROM tab2
----
2288
2376
3344

query I rowsort
SELECT + tab2.col1 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

onlyif mysql # use DIV operator for integer division
query I rowsort label-6079
SELECT DISTINCT col1 + 20 DIV col0 - + col2 DIV + 48 AS col2 FROM tab2 AS cor0
----
17
33
59

skipif mysql # not compatible
query I rowsort label-6079
SELECT DISTINCT col1 + 20 / col0 - + col2 / + 48 AS col2 FROM tab2 AS cor0
----
17
33
59

query I rowsort
SELECT - col0 * + 66 AS col2 FROM tab1 AS cor0
----
-198
-4224
-5280

query I rowsort
SELECT DISTINCT - - col1 * 76 + col0 + col0 AS col1 FROM tab2 AS cor0
----
1450
2370
4640

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6082
SELECT ALL col2 - - CAST( 66 * - cor0.col2 + col1 * + col0 AS SIGNED ) FROM tab0 AS cor0
----
-81
2769
3330

skipif mysql # not compatible
query I rowsort label-6082
SELECT ALL col2 - - CAST ( 66 * - cor0.col2 + col1 * + col0 AS INTEGER ) FROM tab0 AS cor0
----
-81
2769
3330

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT DISTINCT - cor0.col0 * 57 FROM tab1 cor0
----
-171
-3648
-4560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6085
SELECT + col0 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6085
SELECT + col0 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + col2 * cor0.col2 * col0 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT col0 * - 75 AS col1 FROM tab2 AS cor0
----
-525
-5850
-5925

query I rowsort
SELECT ALL col0 * - col0 AS col2 FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT + 57 AS col2 FROM tab2, tab1 cor0, tab2 cor1
----
57

query I rowsort
SELECT DISTINCT - col2 * tab2.col0 * - col2 AS col2 FROM tab2
----
114076
5103
52728

onlyif mysql # use DIV operator for integer division
query I rowsort label-6091
SELECT col2 + + col2 DIV col0 FROM tab1
----
57
72
97

skipif mysql # not compatible
query I rowsort label-6091
SELECT col2 + + col2 / col0 FROM tab1
----
57
72
97

query I rowsort
SELECT - 84 AS col1 FROM tab0
----
-84
-84
-84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col0 * + 95 col0 FROM tab0 AS cor0
----
2313
3326
8537

query I rowsort
SELECT DISTINCT + tab1.col2 * col0 * col1 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT - col0 + 46 AS col0 FROM tab1
----
-18
-34
43

query I rowsort
SELECT DISTINCT tab2.col0 + col2 - col1 * col1 AS col2 FROM tab2
----
-172
-3377
-927

query I rowsort
SELECT ALL - col1 * - ( 29 ) FROM tab2 cor0
----
1711
493
899

onlyif mysql # use DIV operator for integer division
query I rowsort label-6098
SELECT ALL + col1 * - col2 DIV + col2 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-6098
SELECT ALL + col1 * - col2 / + col2 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT cor0.col2 * + ( 23 ) AS col2 FROM tab1 AS cor0
----
1242
1311
2208

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab2.col2 + ( tab2.col0 ) * + 84 col2 FROM tab2
----
615
6578
6674

query I rowsort
SELECT + tab0.col0 - - col1 FROM tab0
----
110
132
180

query I rowsort
SELECT DISTINCT 67 FROM tab2, tab2 cor0, tab0, tab0 cor1
----
67

query I rowsort
SELECT ALL - 13 FROM tab2, tab1 AS cor0
----
9 values hashing to e95f5f4bd0f480397cced5f5e8a23792

query I rowsort
SELECT ALL 86 * col2 AS col1 FROM tab1
----
4644
4902
8256

onlyif mysql # use DIV operator for integer division
query I rowsort label-6105
SELECT DISTINCT 30 DIV - tab2.col0 FROM tab2
----
-4
0

skipif mysql # not compatible
query I rowsort label-6105
SELECT DISTINCT 30 / - tab2.col0 FROM tab2
----
-4
0

query I rowsort
SELECT DISTINCT + 36 * col0 FROM tab0 AS cor0
----
1260
3204
864

query I rowsort
SELECT DISTINCT + col0 + - cor0.col2 * + ( - cor0.col1 ) FROM tab2 cor0
----
1612
725
844

query I rowsort
SELECT + 50 * - cor0.col0 FROM tab0 cor0
----
-1200
-1750
-4450

query I rowsort
SELECT - col2 * + cor0.col1 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL col1 * + col2 + 3 FROM tab0 AS cor0
----
100
2841
7465

query I rowsort
SELECT DISTINCT - - col2 * + col0 AS col1 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT + + cor0.col1 * - cor0.col0 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL + + ( - 44 ) AS col1 FROM tab2 AS cor0
----
-44
-44
-44

query I rowsort
SELECT + col0 * + 98 FROM tab2 AS cor0
----
686
7644
7742

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6115
SELECT + - CAST( + col2 AS SIGNED ) FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-6115
SELECT + - CAST ( + col2 AS INTEGER ) FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT cor1.col1 * + 21 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
1806
1911
2037

query I rowsort
SELECT + 38 * + col0 AS col0 FROM tab0 AS cor0
----
1330
3382
912

query I rowsort
SELECT - 10 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to bb7f754a7a056e665155ed52a63f5bc0

query I rowsort
SELECT 14 + cor0.col1 * - ( col0 ) AS col1 FROM tab2 AS cor0
----
-1329
-203
-4588

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6120
SELECT DISTINCT - - col2 * - CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6120
SELECT DISTINCT - - col2 * - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL + col2 + ( 59 ) FROM tab2 AS cor0
----
85
86
97

query I rowsort
SELECT - - col0 + 30 + 48 * col0 FROM tab1 AS cor0
----
177
3166
3950

query I rowsort
SELECT DISTINCT + col2 + col0 * col1 AS col2 FROM tab1
----
1136
132
697

query I rowsort
SELECT + + col2 + ( col2 ) FROM tab0 AS cor0
----
164
2
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - ( + col2 ) * + col2 col2 FROM tab0
----
26136
35
598436

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + 3 col0 FROM tab2
----
-23
-24
-35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6127
SELECT - + CAST( NULL AS SIGNED ) * + col2 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6127
SELECT - + CAST ( NULL AS INTEGER ) * + col2 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 + ( - 31 ) AS col2 FROM tab1
----
-127
-85
-88

query I rowsort
SELECT ALL - col1 + - 52 AS col0 FROM tab1 AS cor0
----
-62
-65
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 0 col1 FROM tab1, tab2 cor0, tab2 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6131
SELECT ALL - col1 * - CAST( col1 AS SIGNED ) FROM tab1
----
100
169
676

skipif mysql # not compatible
query I rowsort label-6131
SELECT ALL - col1 * - CAST ( col1 AS INTEGER ) FROM tab1
----
100
169
676

query I rowsort
SELECT - col1 * tab2.col2 * - col1 FROM tab2
----
10982
25947
90506

onlyif mysql # use DIV operator for integer division
query I rowsort label-6133
SELECT - col0 DIV + 97 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6133
SELECT - col0 / + 97 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - ( col0 ) AS col0 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT 9 FROM tab0 AS cor0
----
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6136
SELECT - CAST( NULL AS SIGNED ) FROM tab2, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-6136
SELECT - CAST ( NULL AS INTEGER ) FROM tab2, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + 80 col2 FROM tab0
----
-2640
-6560
-80

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 7 * col0 FROM tab2
----
49
546
553

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6140
SELECT + CAST( + 37 AS SIGNED ) FROM tab1
----
37
37
37

skipif mysql # not compatible
query I rowsort label-6140
SELECT + CAST ( + 37 AS INTEGER ) FROM tab1
----
37
37
37

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6141
SELECT DISTINCT + CAST( 31 AS SIGNED ) * + col1 + - 66 FROM tab1
----
244
337
740

skipif mysql # not compatible
query I rowsort label-6141
SELECT DISTINCT + CAST ( 31 AS INTEGER ) * + col1 + - 66 FROM tab1
----
244
337
740

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 6 col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 5d1cb90ed58fa7573895d2f95b211821

query I rowsort
SELECT ALL - 94 * col1 FROM tab1
----
-1222
-2444
-940

onlyif mysql # use DIV operator for integer division
query I rowsort label-6144
SELECT ALL tab1.col2 DIV + ( + col2 + 12 ) AS col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6144
SELECT ALL tab1.col2 / + ( + col2 + 12 ) AS col2 FROM tab1
----
0
0
0

query I rowsort
SELECT + ( - 76 ) + col2 * 35 FROM tab0 AS cor0
----
-41
1079
2794

query I rowsort
SELECT - col1 + 63 FROM tab1 AS cor0
----
37
50
53

query I rowsort
SELECT + col0 + - col0 * - col0 AS col1 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT ALL col1 * - tab1.col2 + + col2 FROM tab1
----
-1152
-1350
-513

query I rowsort
SELECT ALL 93 FROM tab2, tab0 cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to bed80270d2bd273301f8ff63d7ef9f43

query I rowsort
SELECT col2 * - col1 * - col2 AS col2 FROM tab2
----
22599
24548
39884

onlyif mysql # use DIV operator for integer division
query I rowsort label-6151
SELECT ( col1 ) DIV tab2.col0 AS col0 FROM tab2
----
0
0
4

skipif mysql # not compatible
query I rowsort label-6151
SELECT ( col1 ) / tab2.col0 AS col0 FROM tab2
----
0
0
4

query I rowsort
SELECT - 69 - + col1 FROM tab0
----
-155
-160
-166

query I rowsort
SELECT + - col0 - + 52 * - ( col0 ) FROM tab1 AS cor0
----
153
3264
4080

query I rowsort
SELECT col2 - - col1 * + 49 AS col2 FROM tab0 AS cor0
----
4247
4541
4754

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6155
SELECT + col2 * CAST( col2 AS SIGNED ) - cor0.col0 * 70 FROM tab1 AS cor0
----
-1231
2706
3616

skipif mysql # not compatible
query I rowsort label-6155
SELECT + col2 * CAST ( col2 AS INTEGER ) - cor0.col0 * 70 FROM tab1 AS cor0
----
-1231
2706
3616

query I rowsort
SELECT col2 * + 88 + col0 * col2 * cor0.col0 AS col2 FROM tab1 AS cor0
----
238488
5238
622848

query I rowsort
SELECT + col0 - col0 * cor0.col1 FROM tab0 AS cor0
----
-2040
-3360
-8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-6158
SELECT - col2 * col2 DIV cor0.col1 + col2 col1 FROM tab0 cor0
----
1
21
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6158
SELECT - col2 * col2 / cor0.col1 + col2 col1 FROM tab0 cor0
----
1
21
9

query I rowsort
SELECT ( + 4 ) + - col2 AS col0 FROM tab2
----
-22
-23
-34

query I rowsort
SELECT DISTINCT + ( col1 + - col1 ) FROM tab0
----
0

query I rowsort
SELECT ALL - cor0.col2 FROM tab1, tab2, tab1 cor0
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query I rowsort
SELECT ( + cor0.col0 ) + cor0.col0 FROM tab1, tab0 AS cor0
----
9 values hashing to b8cf3a0d946da15d11bb8abf87d58a6b

query I rowsort
SELECT DISTINCT - ( col0 + - col1 ) AS col0 FROM tab2
----
-19
-62
24

query I rowsort
SELECT ( - 54 ) AS col1 FROM tab2
----
-54
-54
-54

query I rowsort
SELECT + col1 * col1 + col0 * col2 AS col0 FROM tab0
----
15579
8188
9444

query I rowsort
SELECT + - ( - col1 ) + col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT + col0 - - col1 * - col0 AS col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT ALL cor0.col2 + cor0.col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT + col0 * cor0.col1 + + cor0.col0 AS col0 FROM tab2 cor0
----
1422
224
4680

query I rowsort
SELECT - col1 * - col0 * col0 FROM tab1
----
234
40960
83200

query I rowsort
SELECT DISTINCT col1 * - col2 + tab1.col1 * col2 AS col0 FROM tab1
----
0

query I rowsort
SELECT DISTINCT + col2 * col0 + + col2 FROM tab0 AS cor0
----
36
7380
825

onlyif mysql # use DIV operator for integer division
query I rowsort label-6173
SELECT + + col2 + col1 * col1 DIV col1 FROM tab0 AS cor0
----
119
173
98

skipif mysql # not compatible
query I rowsort label-6173
SELECT + + col2 + col1 * col1 / col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT 16 * col2 + cor0.col1 FROM tab0 AS cor0
----
113
1403
614

query I rowsort
SELECT DISTINCT + 28 + cor0.col0 AS col1 FROM tab0 AS cor0
----
117
52
63

query I rowsort
SELECT + - 7 FROM tab2 AS cor0
----
-7
-7
-7

query I rowsort
SELECT tab2.col0 * + col0 * col1 + col2 AS col1 FROM tab2
----
106135
1546
358982

onlyif mysql # use DIV operator for integer division
query I rowsort label-6178
SELECT - col0 DIV - col2 + col1 AS col0 FROM tab0 cor0
----
132
86
92

skipif mysql # not compatible
query I rowsort label-6178
SELECT - col0 / - col2 + col1 AS col0 FROM tab0 cor0
----
132
86
92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6179
SELECT + + col1 + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6179
SELECT + + col1 + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor0.col1 - col2 AS col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT ALL + + col1 - + col1 AS col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6182
SELECT DISTINCT - col0 * - CAST( col0 AS SIGNED ) + + col0 AS col2 FROM tab2 cor0
----
56
6162
6320

skipif mysql # not compatible
query I rowsort label-6182
SELECT DISTINCT - col0 * - CAST ( col0 AS INTEGER ) + + col0 AS col2 FROM tab2 cor0
----
56
6162
6320

query I rowsort
SELECT + col0 * + cor0.col1 + + col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT col1 + - 12 AS col1 FROM tab0 AS cor0
----
74
79
85

query I rowsort
SELECT col2 * 62 + - cor0.col1 AS col0 FROM tab2 AS cor0
----
1553
1643
2339

query I rowsort
SELECT ALL col0 * cor0.col1 + + col0 AS col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT 43 * col1 AS col2 FROM tab1 AS cor0
----
1118
430
559

query I rowsort
SELECT ALL 32 AS col0 FROM tab2 cor0
----
32
32
32

onlyif mysql # use DIV operator for integer division
query I rowsort label-6189
SELECT + + col1 DIV - col0 + col2 * + col0 + col0 col1 FROM tab1 AS cor0
----
157
3712
7760

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6189
SELECT + + col1 / - col0 + col2 * + col0 + col0 col1 FROM tab1 AS cor0
----
157
3712
7760

query I rowsort
SELECT + col1 + + col2 * col0 AS col0 FROM tab1 AS cor0
----
188
3658
7693

onlyif mysql # use DIV operator for integer division
query I rowsort label-6191
SELECT DISTINCT - col1 DIV - col1 AS col0 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-6191
SELECT DISTINCT - col1 / - col1 AS col0 FROM tab0 AS cor0
----
1

query I rowsort
SELECT + + cor0.col2 * col2 + + col2 + cor0.col1 * + col0 FROM tab1 AS cor0
----
10352
3048
3946

query I rowsort
SELECT + + col0 * col0 * + col1 FROM tab2 AS cor0
----
106097
1519
358956

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * + col1 * + cor0.col1 col1 FROM tab1 cor0
----
1000
17576
2197

onlyif mysql # use DIV operator for integer division
query I rowsort label-6195
SELECT + col1 + col2 DIV - col2 FROM tab0 AS cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-6195
SELECT + col1 + col2 / - col2 FROM tab0 AS cor0
----
85
90
96

query I rowsort
SELECT DISTINCT - - col0 * - col0 * + col2 AS col1 FROM tab0 AS cor0
----
-1225
-19008
-649522

query I rowsort
SELECT DISTINCT - - col2 + + col1 * cor0.col0 FROM tab0 cor0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT - col0 * - col1 * - col2 AS col0 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT ALL - + col2 * col1 + - col0 AS col0 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT ALL + col0 + - col0 * col1 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT DISTINCT - + col0 + + cor0.col0 - col1 AS col2 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT + col0 * + tab0.col2 * tab0.col2 FROM tab0
----
26136
35
598436

query I rowsort
SELECT ALL tab1.col1 * - col2 * - col1 AS col1 FROM tab1
----
16224
36504
5700

query I rowsort
SELECT ALL col2 * + tab1.col2 FROM tab1
----
2916
3249
9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col1 + - col0 + col2 col0 FROM tab1 AS cor0
----
1056
129
633

onlyif mysql # use DIV operator for integer division
query I rowsort label-6206
SELECT ALL - col1 + - col0 DIV col2 FROM tab0 AS cor0
----
-132
-86
-92

skipif mysql # not compatible
query I rowsort label-6206
SELECT ALL - col1 + - col0 / col2 FROM tab0 AS cor0
----
-132
-86
-92

query I rowsort
SELECT ALL col0 * col1 - col0 AS col1 FROM tab0
----
2040
3360
8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 - - col2 col2 FROM tab1
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-6209
SELECT DISTINCT 68 * col0 - col2 DIV - col0 AS col1 FROM tab1
----
222
4352
5441

skipif mysql # not compatible
query I rowsort label-6209
SELECT DISTINCT 68 * col0 - col2 / - col0 AS col1 FROM tab1
----
222
4352
5441

query I rowsort
SELECT DISTINCT + col2 + col2 + tab1.col0 FROM tab1
----
111
178
272

query I rowsort
SELECT ALL - col0 + tab1.col2 * col0 FROM tab1
----
159
3584
7600

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - col1 col1 FROM tab0
----
-7396
-8281
-9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-6213
SELECT col1 + tab0.col1 DIV - col1 + tab0.col1 col0 FROM tab0
----
171
181
193

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6213
SELECT col1 + tab0.col1 / - col1 + tab0.col1 col0 FROM tab0
----
171
181
193

query I rowsort
SELECT ALL - col1 + col0 * - col1 AS col2 FROM tab0
----
-2150
-3492
-8190

query I rowsort
SELECT col1 - col2 * + tab0.col1 AS col1 FROM tab0
----
-2752
-7371
0

query I rowsort
SELECT col1 * col1 + col2 + col0 AS col0 FROM tab0 AS cor0
----
7453
8452
9445

query I rowsort
SELECT DISTINCT - col0 + col1 * - cor0.col0 * - cor0.col2 AS col2 FROM tab0 cor0
----
3360
664029
68088

query I rowsort
SELECT col2 + + col1 * + col0 * + tab0.col1 AS col1 FROM tab0
----
177537
329316
737091

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col2 + col2 * col1 col1 FROM tab1
----
1566
4218
8928

onlyif mysql # use DIV operator for integer division
query I rowsort label-6220
SELECT DISTINCT - col0 + - col0 + + col0 DIV + col1 FROM tab2
----
-14
-154
-155

skipif mysql # not compatible
query I rowsort label-6220
SELECT DISTINCT - col0 + - col0 + + col0 / + col1 FROM tab2
----
-14
-154
-155

onlyif mysql # use DIV operator for integer division
query I rowsort label-6221
SELECT DISTINCT - col2 + col2 DIV + col0 FROM tab2
----
-24
-26
-38

skipif mysql # not compatible
query I rowsort label-6221
SELECT DISTINCT - col2 + col2 / + col0 FROM tab2
----
-24
-26
-38

query I rowsort
SELECT DISTINCT col0 + col0 * col2 AS col1 FROM tab2
----
196
2106
3081

query I rowsort
SELECT DISTINCT + tab0.col1 + - col1 AS col1 FROM tab0
----
0

query I rowsort
SELECT - cor0.col1 FROM tab0, tab1 AS cor0 WHERE NOT ( NULL ) BETWEEN NULL AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + - col2 * - 88 col2 FROM tab2 AS cor0
----
2366
2383
3423

query I rowsort
SELECT col1 * - col2 + col2 * col1 AS col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT ( - col0 ) * + ( 24 * + cor0.col0 ) FROM tab2 cor0
----
-1176
-146016
-149784

onlyif mysql # use DIV operator for integer division
query I rowsort label-6228
SELECT ALL - col0 DIV col0 + + 56 AS col0 FROM tab2 AS cor0
----
55
55
55

skipif mysql # not compatible
query I rowsort label-6228
SELECT ALL - col0 / col0 + + 56 AS col0 FROM tab2 AS cor0
----
55
55
55

query I rowsort
SELECT + + 34 AS col1 FROM tab2 AS cor0
----
34
34
34

query I rowsort
SELECT + ( - col0 ) + - col2 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT 34 * - tab2.col0 FROM tab2
----
-238
-2652
-2686

query I rowsort
SELECT DISTINCT + - col0 + - cor0.col1 * + col0 FROM tab1 AS cor0
----
-1120
-704
-81

query I rowsort
SELECT col2 * - cor0.col1 + col2 AS col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT cor0.col1 * col1 * col1 FROM tab1 AS cor0
----
1000
17576
2197

onlyif mysql # use DIV operator for integer division
query I rowsort label-6235
SELECT DISTINCT cor0.col1 DIV + cor0.col0 FROM tab1, tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-6235
SELECT DISTINCT cor0.col1 / + cor0.col0 FROM tab1, tab0 AS cor0
----
1
2
3

query I rowsort
SELECT col2 + + 61 FROM tab0 cor0
----
143
62
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 * 5 col1 FROM tab2 AS cor0
----
155
295
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-6238
SELECT col2 DIV 73 + col2 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-6238
SELECT col2 / 73 + col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - - ( - 24 ) + - col2 AS col0 FROM tab1 AS cor0
----
-120
-78
-81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6240
SELECT DISTINCT CAST( + col0 AS SIGNED ) * + col2 * - col2 AS col2 FROM tab2
----
-114076
-5103
-52728

skipif mysql # not compatible
query I rowsort label-6240
SELECT DISTINCT CAST ( + col0 AS INTEGER ) * + col2 * - col2 AS col2 FROM tab2
----
-114076
-5103
-52728

onlyif mysql # use DIV operator for integer division
query I rowsort label-6241
SELECT ( - col0 ) DIV + col0 FROM tab2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6241
SELECT ( - col0 ) / + col0 FROM tab2
----
-1
-1
-1

query I rowsort
SELECT - ( 78 ) + + col2 * - col0 FROM tab2 AS cor0
----
-2106
-267
-3080

onlyif mysql # use DIV operator for integer division
query I rowsort label-6243
SELECT + 68 + cor0.col0 DIV col0 AS col1 FROM tab1 cor0
----
69
69
69

skipif mysql # not compatible
query I rowsort label-6243
SELECT + 68 + cor0.col0 / col0 AS col1 FROM tab1 cor0
----
69
69
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col0 * - col1 col1 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-6245
SELECT ( col2 ) * - ( cor0.col0 ) + - col1 DIV col1 FROM tab2 AS cor0
----
-190
-2029
-3003

skipif mysql # not compatible
query I rowsort label-6245
SELECT ( col2 ) * - ( cor0.col0 ) + - col1 / col1 FROM tab2 AS cor0
----
-190
-2029
-3003

query I rowsort
SELECT DISTINCT col0 * col1 + tab0.col1 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT DISTINCT - 87 + col1 FROM tab2
----
-28
-56
-70

query I rowsort
SELECT + col2 + tab1.col1 AS col2 FROM tab1
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 53 col2 FROM tab2
----
53
53
53

query I rowsort
SELECT col1 + col1 * 80 FROM tab1 AS cor0
----
1053
2106
810

query I rowsort
SELECT - - col1 + + col0 AS col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT col1 - col1 * - col1 * - 58 FROM tab1 AS cor0
----
-39182
-5790
-9789

query I rowsort
SELECT + col0 * - col2 - col2 FROM tab0 AS cor0
----
-36
-7380
-825

query I rowsort
SELECT DISTINCT - 18 * - col2 * + col0 AS col2 FROM tab0
----
131364
14256
630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 47 * + col2 col2 FROM tab0
----
1551
3854
47

query I rowsort
SELECT 63 * - col1 FROM tab2
----
-1071
-1953
-3717

query I rowsort
SELECT ALL - col2 * + col2 - col2 FROM tab1 AS cor0
----
-2970
-3306
-9312

query I rowsort
SELECT ALL - col1 * 36 AS col0 FROM tab2 AS cor0
----
-1116
-2124
-612

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( + col1 ) - tab2.col2 col0 FROM tab2
----
-21
33
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6260
SELECT ALL col2 * tab1.col1 * CAST( 5 AS SIGNED ) + tab1.col1 AS col0 FROM tab1
----
2860
6253
7046

skipif mysql # not compatible
query I rowsort label-6260
SELECT ALL col2 * tab1.col1 * CAST ( 5 AS INTEGER ) + tab1.col1 AS col0 FROM tab1
----
2860
6253
7046

query I rowsort
SELECT ALL col1 + col0 * + col1 FROM tab2
----
1360
248
4661

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6262
SELECT DISTINCT - 76 * - col2 * + CAST( NULL AS SIGNED ) AS col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-6262
SELECT DISTINCT - 76 * - col2 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab1
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6263
SELECT - 1 DIV col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6263
SELECT - 1 / col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - 79 AS col0 FROM tab0 AS cor0
----
-79
-79
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-6265
SELECT + - 13 DIV cor0.col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6265
SELECT + - 13 / cor0.col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + col0 * ( + 68 ) FROM tab2
----
476
5304
5372

query I rowsort
SELECT DISTINCT tab2.col2 * + tab2.col0 FROM tab2, tab1 AS cor0
----
189
2028
3002

query I rowsort
SELECT cor0.col1 + + col0 * - col0 AS col1 FROM tab0 AS cor0
----
-1128
-490
-7830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( ( + col2 ) ) col0 FROM tab1 AS cor0
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6270
SELECT - + 24 DIV col2 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6270
SELECT - + 24 / col2 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - + col0 + col2 * cor0.col1 AS col0 FROM tab2 AS cor0
----
1456
567
830

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6272
SELECT ALL - CAST( + col2 AS SIGNED ) * - col1 FROM tab0 cor0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-6272
SELECT ALL - CAST ( + col2 AS INTEGER ) * - col1 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT + - ( + cor0.col2 ) FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT + col1 + + 3 AS col2 FROM tab2
----
20
34
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-6275
SELECT ALL ( col1 ) DIV - col0 FROM tab1 AS cor0
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-6275
SELECT ALL ( col1 ) / - col0 FROM tab1 AS cor0
----
-8
0
0

query I rowsort
SELECT ALL - - 90 FROM tab1, tab2, tab2 AS cor0, tab0
----
81 values hashing to 3b4644ef0734ed220952cae7e0648c4b

query I rowsort
SELECT - ( tab0.col0 ) + + col0 AS col1 FROM tab0
----
0
0
0

query I rowsort
SELECT ( + col1 ) - - col2 FROM tab2
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-6279
SELECT + 97 * tab0.col0 DIV col1 - + col1 FROM tab0
----
-59
-62
3

skipif mysql # not compatible
query I rowsort label-6279
SELECT + 97 * tab0.col0 / col1 - + col1 FROM tab0
----
-59
-62
3

query I rowsort
SELECT - - ( 38 ) AS col2 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to a7827a79248ee7bf2cee915a631d02cb

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6281
SELECT ALL - + CAST( NULL AS SIGNED ) * col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6281
SELECT ALL - + CAST ( NULL AS INTEGER ) * col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 92 * col2 FROM tab1
----
-4968
-5244
-8832

query I rowsort
SELECT ( col0 * col2 ) AS col0 FROM tab0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 80 * - col1 + col0 * - 31 col0 FROM tab0
----
-10039
-7624
-8845

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * - col0 col2 FROM tab1 AS cor0
----
-4096
-6400
-9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6286
SELECT DISTINCT - + col2 * - CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6286
SELECT DISTINCT - + col2 * - CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6287
SELECT DISTINCT + col1 DIV - col2 AS col0 FROM tab1 cor0
----
0

skipif mysql # not compatible
query I rowsort label-6287
SELECT DISTINCT + col1 / - col2 AS col0 FROM tab1 cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6288
SELECT + - cor0.col1 * 94 DIV col1 + - col2 + col2 * cor0.col1 AS col2 FROM tab1 AS cor0
----
1058
1256
419

skipif mysql # not compatible
query I rowsort label-6288
SELECT + - cor0.col1 * 94 / col1 + - col2 + col2 * cor0.col1 AS col2 FROM tab1 AS cor0
----
1058
1256
419

query I rowsort
SELECT ALL - col1 * + 12 * + col2 FROM tab1 AS cor0
----
-14976
-16848
-6840

query I rowsort
SELECT - ( + col1 ) AS col2 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT - ( + cor0.col2 ) AS col1 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT ALL - 56 - col2 FROM tab0
----
-138
-57
-89

query I rowsort
SELECT - 42 + col1 * - 44 AS col1 FROM tab1
----
-1186
-482
-614

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 18 * col0 - col2 col0 FROM tab1
----
0
1095
1344

query I rowsort
SELECT DISTINCT col0 - + tab1.col1 FROM tab1
----
-23
54
67

query I rowsort
SELECT DISTINCT + 29 AS col0 FROM tab2, tab0 cor0
----
29

query I rowsort
SELECT + + col0 + col1 + + col0 FROM tab1 AS cor0
----
138
173
32

query I rowsort
SELECT DISTINCT col0 + col2 + - col0 FROM tab0
----
1
33
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6299
SELECT DISTINCT + col1 / - CAST( NULL AS SIGNED ) col0 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6299
SELECT DISTINCT + col1 / - CAST ( NULL AS INTEGER ) col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - - cor0.col2 + - 57 FROM tab1 cor0
----
-3
0
39

query I rowsort
SELECT - - col2 * col1 * + col1 + - col2 * + cor0.col1 FROM tab0 AS cor0
----
241230
671580
9312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * col0 + col2 * cor0.col0 + 50 col0 FROM tab2 cor0
----
4106
428
6054

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6303
SELECT DISTINCT col0 + + CAST( - col0 AS SIGNED ) * col2 * + col0 AS col1 FROM tab2 AS cor0
----
-1316
-158106
-237079

skipif mysql # not compatible
query I rowsort label-6303
SELECT DISTINCT col0 + + CAST ( - col0 AS INTEGER ) * col2 * + col0 AS col1 FROM tab2 AS cor0
----
-1316
-158106
-237079

onlyif mysql # use DIV operator for integer division
query I rowsort label-6304
SELECT cor0.col2 DIV col0 + + col0 + + col2 FROM tab2 cor0
----
104
117
37

skipif mysql # not compatible
query I rowsort label-6304
SELECT cor0.col2 / col0 + + col0 + + col2 FROM tab2 cor0
----
104
117
37

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6305
SELECT - col0 + CAST( NULL AS SIGNED ) + col0 * - col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6305
SELECT - col0 + CAST ( NULL AS INTEGER ) + col0 * - col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col2 * col0 + + col1 + - col2 FROM tab2 AS cor0
----
-185
-1995
-3023

query I rowsort
SELECT DISTINCT + - col0 + col1 * col1 AS col1 FROM tab0 AS cor0
----
7372
8192
9374

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6308
SELECT ALL col1 * CAST( - cor0.col0 AS SIGNED ) FROM tab2 AS cor0
----
-1343
-217
-4602

skipif mysql # not compatible
query I rowsort label-6308
SELECT ALL col1 * CAST ( - cor0.col0 AS INTEGER ) FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT col1 * + ( - col1 * + col1 ) + + col2 + - col1 * col0 FROM tab2
----
-209955
-29981
-6218

query I rowsort
SELECT DISTINCT + 57 FROM tab1, tab1 cor0, tab1 AS cor1
----
57

query I rowsort
SELECT ALL + col0 * 88 + col1 FROM tab2
----
647
6923
6969

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6312
SELECT ALL + - col1 * CAST( 73 AS SIGNED ) FROM tab2 AS cor0
----
-1241
-2263
-4307

skipif mysql # not compatible
query I rowsort label-6312
SELECT ALL + - col1 * CAST ( 73 AS INTEGER ) FROM tab2 AS cor0
----
-1241
-2263
-4307

query I rowsort
SELECT - col1 * - tab0.col0 AS col2 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT - 52 + ( - col2 ) * col2 FROM tab1 AS cor0
----
-2968
-3301
-9268

query I rowsort
SELECT DISTINCT - 41 * + col2 FROM tab2 AS cor0
----
-1066
-1107
-1558

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 99 + col1 col2 FROM tab1 AS cor0
----
-73
-86
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6317
SELECT - ( - col0 ) * - col0 + CAST( col1 AS SIGNED ) col0 FROM tab1 AS cor0
----
-4086
-6387
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6317
SELECT - ( - col0 ) * - col0 + CAST ( col1 AS INTEGER ) col0 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT ALL - col2 * - cor0.col1 + col2 * col0 AS col1 FROM tab0 AS cor0
----
132
14760
3630

query I rowsort
SELECT DISTINCT 87 FROM tab0 cor0
----
87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6320
SELECT - CAST( NULL AS SIGNED ) * + col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6320
SELECT - CAST ( NULL AS INTEGER ) * + col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + 67 FROM tab1 AS cor0
----
67

query I rowsort
SELECT - 59 AS col1 FROM tab2 cor0
----
-59
-59
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-6323
SELECT + 39 DIV + col0 AS col2 FROM tab0 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-6323
SELECT + 39 / + col0 AS col2 FROM tab0 AS cor0
----
0
1
1

query I rowsort
SELECT - ( - 89 ) + col1 + + col1 FROM tab1 AS cor0
----
109
115
141

query I rowsort
SELECT ALL + tab0.col0 + ( + ( col2 ) ) * + col2 + col2 AS col0 FROM tab0
----
1146
37
6895

query I rowsort
SELECT - 33 + ( col1 ) FROM tab0 AS cor0
----
53
58
64

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( - 69 AS REAL ) + + col2 FROM tab1 AS cor0
----
123
126
165

query I rowsort
SELECT - 83 + + col1 FROM tab1 AS cor0
----
-57
-70
-73

query I rowsort
SELECT ALL + col0 * col1 + ( + col1 ) FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT ALL + col0 * + cor0.col2 - col2 * - col0 FROM tab1 AS cor0
----
15360
324
7296

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 50 * tab1.col0 * col1 + - col1 col0 FROM tab1
----
31990
3874
51987

query I rowsort
SELECT DISTINCT + 79 AS col0 FROM tab0 AS cor0
----
79

query I rowsort
SELECT ALL - 92 + - col1 + ( col2 ) FROM tab2 AS cor0
----
-125
-71
-96

query I rowsort
SELECT DISTINCT + - col2 - cor0.col1 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT DISTINCT + col0 - + col1 AS col0 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT ALL + 89 AS col0 FROM tab0 AS cor0
----
89
89
89

query I rowsort
SELECT DISTINCT + col2 * col1 + col0 FROM tab1 cor0
----
1328
1407
634

query I rowsort
SELECT DISTINCT - col2 + cor0.col1 * + col0 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT DISTINCT col2 * + col1 AS col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT 9 + - cor0.col1 FROM tab2 cor0
----
-22
-50
-8

onlyif mysql # use DIV operator for integer division
query I rowsort label-6341
SELECT ALL + col1 + ( - ( col0 ) ) + + col0 DIV - col2 AS col0 FROM tab1 AS cor0
----
-55
-67
23

skipif mysql # not compatible
query I rowsort label-6341
SELECT ALL + col1 + ( - ( col0 ) ) + + col0 / - col2 AS col0 FROM tab1 AS cor0
----
-55
-67
23

query I rowsort
SELECT ALL + col1 * - 15 FROM tab0 AS cor0
----
-1290
-1365
-1455

query I rowsort
SELECT DISTINCT + col2 + - col1 + col1 AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT 98 AS col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to c758e8afbdfa6aae279045b0e9cbacc2

onlyif mysql # use DIV operator for integer division
query I rowsort label-6345
SELECT DISTINCT - - cor0.col2 * col1 DIV + col0 + col1 FROM tab1 AS cor0
----
18
28
494

skipif mysql # not compatible
query I rowsort label-6345
SELECT DISTINCT - - cor0.col2 * col1 / + col0 + col1 FROM tab1 AS cor0
----
18
28
494

query I rowsort
SELECT - + col0 * col1 + 6 AS col1 FROM tab0 AS cor0
----
-2058
-3389
-8093

query I rowsort
SELECT DISTINCT col2 + - ( + cor0.col2 ) FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT col2 + + 86 * col0 FROM tab2 AS cor0
----
629
6734
6832

query I rowsort
SELECT ALL col1 * col0 * col2 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT - col1 + - ( - 57 ) FROM tab2 AS cor0
----
-2
26
40

query I rowsort
SELECT cor0.col1 + - 48 AS col0 FROM tab1 AS cor0
----
-22
-35
-38

query I rowsort
SELECT DISTINCT 63 * 87 FROM tab0, tab1 cor0, tab1 AS cor1
----
5481

query I rowsort
SELECT DISTINCT + cor1.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 cor1
----
7
78
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6354
SELECT - cor0.col0 * + col2 + - CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6354
SELECT - cor0.col0 * + col2 + - CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 14 + + col1 + 35 AS col0 FROM tab1 AS cor0
----
59
62
75

query I rowsort
SELECT - col2 - - col2 AS col0 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + tab2.col1 * 55 * + col2 FROM tab2
----
35530
46035
84370

query I rowsort
SELECT - col2 * - tab2.col1 + + tab2.col0 * 34 AS col1 FROM tab2
----
1075
3332
4186

query I rowsort
SELECT + - 13 + 71 FROM tab1 cor0 CROSS JOIN tab1 cor1
----
9 values hashing to ef6e63aeed2581a168f07646d258f666

onlyif mysql # use DIV operator for integer division
query I rowsort label-6360
SELECT + col1 DIV + col1 + - ( 57 * - col0 ) FROM tab0 AS cor0
----
1369
1996
5074

skipif mysql # not compatible
query I rowsort label-6360
SELECT + col1 / + col1 + - ( 57 * - col0 ) FROM tab0 AS cor0
----
1369
1996
5074

query I rowsort
SELECT + + 92 + col0 AS col0 FROM tab2 AS cor0
----
170
171
99

query I rowsort
SELECT 95 * + col1 + + cor0.col0 FROM tab0 AS cor0
----
8194
8734
9250

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6363
SELECT CAST( NULL AS DECIMAL ) + - cor0.col1 / + cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-6363
SELECT CAST ( NULL AS REAL ) + - cor0.col1 / + cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col2 FROM tab1, tab1 cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT DISTINCT 24 FROM tab0, tab0 AS cor0
----
24

query I rowsort
SELECT ( 71 ) AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to c1aace5d5fe27721cc925552513c85c0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6367
SELECT ALL + col1 DIV - col1 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6367
SELECT ALL + col1 / - col1 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT - 81 AS col2 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 205b3ff2d7b1817c98d7980b8c17e6c1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 44 col0 FROM tab2
----
44
44
44

query I rowsort
SELECT ALL + 46 * + ( + cor0.col2 ) AS col1 FROM tab1 AS cor0
----
2484
2622
4416

onlyif mysql # use DIV operator for integer division
query I rowsort label-6371
SELECT - cor0.col1 - + col0 DIV col0 AS col1 FROM tab1 AS cor0
----
-11
-14
-27

skipif mysql # not compatible
query I rowsort label-6371
SELECT - cor0.col1 - + col0 / col0 AS col1 FROM tab1 AS cor0
----
-11
-14
-27

onlyif mysql # use DIV operator for integer division
query I rowsort label-6372
SELECT DISTINCT 60 DIV + col0 col1 FROM tab0
----
0
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6372
SELECT DISTINCT 60 / + col0 col1 FROM tab0
----
0
1
2

query I rowsort
SELECT - ( + col0 ) * col1 AS col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT + 17 AS col1 FROM tab1
----
17
17
17

query I rowsort
SELECT + - cor0.col1 * - 63 + - col1 * col2 AS col2 FROM tab2 cor0
----
1116
2183
425

query I rowsort
SELECT + col0 * cor0.col1 + col2 * 40 AS col0 FROM tab1 cor0
----
2238
2920
4880

query I rowsort
SELECT 33 * - col1 + col2 AS col1 FROM tab2 AS cor0
----
-1921
-523
-996

query I rowsort
SELECT + ( + 29 ) AS col1 FROM tab0 AS cor0
----
29
29
29

query I rowsort
SELECT - 72 * - 99 AS col0 FROM tab2 cor0
----
7128
7128
7128

query I rowsort
SELECT DISTINCT 47 + - cor0.col2 AS col2 FROM tab0 AS cor0
----
-35
14
46

query I rowsort
SELECT + + col2 * col0 - - 4 AS col2 FROM tab1 AS cor0
----
166
3652
7684

query I rowsort
SELECT col2 - col0 * - 90 FROM tab2 AS cor0
----
657
7046
7148

query I rowsort
SELECT ALL 15 + col1 + col1 FROM tab1 AS cor0
----
35
41
67

query I rowsort
SELECT + col1 + cor0.col1 + - 6 * - col2 FROM tab0 AS cor0
----
200
370
674

onlyif mysql # use DIV operator for integer division
query I rowsort label-6385
SELECT col1 DIV - col2 - 40 FROM tab0 AS cor0
----
-137
-41
-42

skipif mysql # not compatible
query I rowsort label-6385
SELECT col1 / - col2 - 40 FROM tab0 AS cor0
----
-137
-41
-42

query I rowsort
SELECT col0 * - col2 + - col2 * col0 AS col1 FROM tab0 AS cor0
----
-14596
-1584
-70

query I rowsort
SELECT DISTINCT - col2 + - col2 AS col0 FROM tab0 cor0
----
-164
-2
-66

query I rowsort
SELECT + - cor0.col0 - + col2 * - col1 AS col2 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT DISTINCT - - col1 + - cor0.col0 * - 81 FROM tab1 AS cor0
----
269
5194
6493

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 34 + - 2 col0 FROM tab2, tab1 AS cor0, tab2 cor1
----
27 values hashing to cf4f01ac97eb83445b1721f3ae28961a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 53 col1 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 2876418587c77a182d88db2907b0a51a

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6392
SELECT + col1 / CAST( NULL AS DECIMAL ) + - col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6392
SELECT + col1 / CAST ( NULL AS REAL ) + - col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + col2 + - col2 + col1 AS col2 FROM tab2 AS cor0
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-6394
SELECT ALL + col2 + col1 DIV + col0 FROM tab1
----
57
62
96

skipif mysql # not compatible
query I rowsort label-6394
SELECT ALL + col2 + col1 / + col0 FROM tab1
----
57
62
96

query I rowsort
SELECT DISTINCT + col1 * - tab2.col0 + - 49 AS col0 FROM tab2
----
-1392
-266
-4651

query I rowsort
SELECT - col2 * - 51 FROM tab1 AS cor0
----
2754
2907
4896

query I rowsort
SELECT DISTINCT + ( - col1 ) * + col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT ALL col2 + + 2 AS col2 FROM tab0 AS cor0
----
3
35
84

query I rowsort
SELECT ALL - cor0.col0 * col2 + col2 * ( 72 * + col0 ) AS col2 FROM tab0 cor0
----
2485
518158
56232

query I rowsort
SELECT DISTINCT + ( - col0 ) * col0 AS col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT - col1 + - 51 FROM tab0 AS cor0
----
-137
-142
-148

query I rowsort
SELECT DISTINCT - - 13 AS col2 FROM tab0 cor0
----
13

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6403
SELECT ALL - CAST( col2 AS SIGNED ) + - cor0.col1 FROM tab0 AS cor0
----
-119
-173
-98

skipif mysql # not compatible
query I rowsort label-6403
SELECT ALL - CAST ( col2 AS INTEGER ) + - cor0.col1 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT ALL + ( 24 ) * col1 - ( + ( - col2 ) ) AS col0 FROM tab1 AS cor0
----
297
408
678

query I rowsort
SELECT DISTINCT + 13 FROM tab0 cor0
----
13

query I rowsort
SELECT DISTINCT 42 + - cor0.col2 FROM tab1 AS cor0
----
-12
-15
-54

query I rowsort
SELECT col0 * - col2 + + 9 * - ( col1 * col0 ) + cor0.col0 AS col1 FROM tab2 AS cor0
----
-15010
-2135
-43368

query I rowsort
SELECT + - cor0.col0 * cor0.col2 + col0 * - 92 AS col1 FROM tab2 AS cor0
----
-10270
-833
-9204

onlyif mysql # use DIV operator for integer division
query I rowsort label-6409
SELECT - 44 DIV col2 + ( + 18 ) FROM tab0 AS cor0
----
-26
17
18

skipif mysql # not compatible
query I rowsort label-6409
SELECT - 44 / col2 + ( + 18 ) FROM tab0 AS cor0
----
-26
17
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-6410
SELECT col1 * - tab1.col2 + col1 DIV - 44 FROM tab1
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort label-6410
SELECT col1 * - tab1.col2 + col1 / - 44 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT col2 * - col1 + - col1 FROM tab1
----
-1261
-1430
-580

query I rowsort
SELECT + col1 * - col2 + - ( + col1 ) * + col1 * - col0 FROM tab0 AS cor0
----
174666
329218
729547

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * + col0 + ( - col0 ) col0 FROM tab1 AS cor0
----
4032
6
6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-6414
SELECT + col0 DIV col1 + 34 * - cor0.col0 AS col2 FROM tab2 AS cor0
----
-238
-2651
-2682

skipif mysql # not compatible
query I rowsort label-6414
SELECT + col0 / col1 + 34 * - cor0.col0 AS col2 FROM tab2 AS cor0
----
-238
-2651
-2682

query I rowsort
SELECT ALL 69 - col0 AS col2 FROM tab2 AS cor0
----
-10
-9
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-6416
SELECT DISTINCT 79 DIV - col1 AS col0 FROM tab1 AS cor0
----
-3
-6
-7

skipif mysql # not compatible
query I rowsort label-6416
SELECT DISTINCT 79 / - col1 AS col0 FROM tab1 AS cor0
----
-3
-6
-7

query I rowsort
SELECT ALL + + cor0.col2 + + col0 AS col1 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT ALL + - cor0.col0 * - col1 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL col2 + col2 * 39 FROM tab2 cor0
----
1040
1080
1520

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + col0 col2 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT - - col0 + + 77 * + col2 - col2 AS col1 FROM tab2 AS cor0
----
2054
2059
2967

query I rowsort
SELECT ALL - col2 * 93 FROM tab0 AS cor0
----
-3069
-7626
-93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6423
SELECT + col2 + CAST( - col0 AS SIGNED ) AS col0 FROM tab2 cor0
----
-41
-52
20

skipif mysql # not compatible
query I rowsort label-6423
SELECT + col2 + CAST ( - col0 AS INTEGER ) AS col0 FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT - cor0.col0 * - col0 + col0 * + col2 AS col1 FROM tab0 cor0
----
1260
1368
15219

query I rowsort
SELECT ALL + ( - col2 ) * col2 + + 30 AS col0 FROM tab1
----
-2886
-3219
-9186

query I rowsort
SELECT ALL + col1 + col0 * ( - cor0.col0 ) + + col1 AS col2 FROM tab0 AS cor0
----
-1031
-404
-7739

onlyif mysql # use DIV operator for integer division
query I rowsort label-6427
SELECT ALL + - cor0.col2 + + ( cor0.col1 ) DIV - col1 AS col1 FROM tab2 AS cor0
----
-27
-28
-39

skipif mysql # not compatible
query I rowsort label-6427
SELECT ALL + - cor0.col2 + + ( cor0.col1 ) / - col1 AS col1 FROM tab2 AS cor0
----
-27
-28
-39

query I rowsort
SELECT DISTINCT - col0 * - col2 - col0 AS col1 FROM tab2 AS cor0
----
182
1950
2923

onlyif mysql # use DIV operator for integer division
query I rowsort label-6429
SELECT DISTINCT + + col2 - ( 35 ) DIV col0 AS col0 FROM tab1 cor0
----
43
57
96

skipif mysql # not compatible
query I rowsort label-6429
SELECT DISTINCT + + col2 - ( 35 ) / col0 AS col0 FROM tab1 cor0
----
43
57
96

query I rowsort
SELECT + - col2 * - ( col0 ) + - col2 * col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col2 * + tab2.col0 + 19 AS col2 FROM tab2
----
-170
-2009
-2983

query I rowsort
SELECT DISTINCT + ( col1 ) * col1 + col2 AS col1 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT DISTINCT - ( col2 ) + cor0.col1 * col2 * + cor0.col0 FROM tab2 AS cor0
----
119626
50996
5832

query I rowsort
SELECT col0 + - col2 * col2 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT - 46 + - col2 - col0 AS col1 FROM tab1 AS cor0
----
-103
-167
-222

query I rowsort
SELECT DISTINCT + 75 * cor0.col2 AS col0 FROM tab1 AS cor0
----
4050
4275
7200

query I rowsort
SELECT + ( + cor0.col0 ) + + col0 AS col1 FROM tab2 AS cor0
----
14
156
158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 26 * cor0.col1 - + col1 * ( 18 * - col2 ) col0 FROM tab0 cor0
----
136682
4268
53320

query I rowsort
SELECT DISTINCT + col1 * + cor0.col2 * - col0 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT col1 + col0 * col2 FROM tab1 cor0
----
188
3658
7693

query I rowsort
SELECT ALL col1 * - col2 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + ( + col0 ) * col2 col2 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-6443
SELECT DISTINCT + + 66 DIV col1 FROM tab2 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-6443
SELECT DISTINCT + + 66 / col1 FROM tab2 AS cor0
----
1
2
3

query I rowsort
SELECT ALL tab2.col0 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT DISTINCT tab0.col2 * tab0.col0 * + col2 AS col1 FROM tab0
----
26136
35
598436

query I rowsort
SELECT ( cor0.col1 ) AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT ( col2 ) + col2 AS col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT + + col2 * 58 + - col1 FROM tab2 AS cor0
----
1449
1535
2187

query I rowsort
SELECT ( col1 + col0 ) * + col0 FROM tab0
----
16020
2640
4620

query I rowsort
SELECT DISTINCT col1 * + col0 - - col0 FROM tab2
----
1422
224
4680

query I rowsort
SELECT ALL + col1 * tab0.col2 - - col2 * tab0.col0 * - col0 AS col1 FROM tab0
----
-1128
-16170
-642060

query I rowsort
SELECT - col2 + + col1 + + col0 FROM tab0
----
131
77
98

query I rowsort
SELECT + - cor0.col1 * - col1 AS col2 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT + col1 * - col1 + cor0.col2 + - 14 * - col2 FROM tab1 AS cor0
----
1271
134
755

query I rowsort
SELECT - ( cor0.col0 ) - - ( col1 ) FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT DISTINCT - 74 FROM tab2, tab0 AS cor0
----
-74

query I rowsort
SELECT ALL - 32 AS col2 FROM tab1
----
-32
-32
-32

query I rowsort
SELECT + 42 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 64c29db9f1cd7ed4ddeb1735e3e0d442

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col2 + col0 col1 FROM tab1 cor0
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 90 - + cor0.col2 col1 FROM tab0 cor0
----
-123
-172
-91

query I rowsort
SELECT + - cor0.col2 * + col2 AS col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT + - 43 + col0 + + col2 AS col1 FROM tab1 AS cor0
----
133
14
78

query I rowsort
SELECT DISTINCT + cor0.col2 * + col1 AS col2 FROM tab0 cor0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 60 * col1 + cor0.col0 col1 FROM tab2 AS cor0
----
1099
1867
3618

onlyif mysql # use DIV operator for integer division
query I rowsort label-6465
SELECT DISTINCT + col2 DIV col0 col2 FROM tab1 AS cor0
----
0
1
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6465
SELECT DISTINCT + col2 / col0 col2 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT ALL + + col1 + + col2 AS col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL - 34 * + col1 AS col1 FROM tab1 AS cor0
----
-340
-442
-884

query I rowsort
SELECT ALL - 90 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to f6f26b9a04da14807208b93d507095c5

query I rowsort
SELECT DISTINCT col1 + col1 + col2 * - col1 FROM tab2 AS cor0
----
-1416
-612
-775

query I rowsort
SELECT ALL col1 * col2 + col0 AS col1 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT DISTINCT - + col1 + - ( col0 ) AS col2 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT DISTINCT + - cor0.col2 + - 79 FROM tab0 AS cor0
----
-112
-161
-80

query I rowsort
SELECT ALL ( col2 ) * col0 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL - - col1 * + col1 + col2 AS col1 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT DISTINCT col2 + 32 AS col0 FROM tab0 AS cor0
----
114
33
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-6476
SELECT ALL - CAST( 42 AS SIGNED ) DIV col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6476
SELECT ALL - CAST ( 42 AS INTEGER ) / col1 FROM tab0
----
0
0
0

query I rowsort
SELECT - 31 - + tab1.col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 57debc10d0571dfcf5c295cd4e7d38b3

onlyif mysql # use DIV operator for integer division
query I rowsort label-6478
SELECT DISTINCT col2 DIV + cor0.col1 FROM tab1 cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-6478
SELECT DISTINCT col2 / + cor0.col1 FROM tab1 cor0
----
2
5
7

query I rowsort
SELECT - + 59 * - col2 AS col2 FROM tab0 cor0
----
1947
4838
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6480
SELECT ALL + CAST( NULL AS SIGNED ) FROM tab1, tab2 AS cor0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-6480
SELECT ALL + CAST ( NULL AS INTEGER ) FROM tab1, tab2 AS cor0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT DISTINCT ( + 13 ) + + col2 FROM tab2 AS cor0
----
39
40
51

query I rowsort
SELECT + ( + 77 ) * col2 FROM tab1 AS cor0
----
4158
4389
7392

query I rowsort
SELECT ( 16 ) * - col1 * - 3 AS col2 FROM tab2 AS cor0
----
1488
2832
816

query I rowsort
SELECT + col2 - 17 AS col2 FROM tab2 cor0
----
10
21
9

query I rowsort
SELECT + - col2 * - col1 - - col2 AS col1 FROM tab2 AS cor0
----
1560
684
864

onlyif mysql # use DIV operator for integer division
query I rowsort label-6486
SELECT - col2 DIV - ( 80 ) AS col1 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6486
SELECT - col2 / - ( 80 ) AS col1 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6487
SELECT - ( - col1 ) DIV col1 - + ( - col0 ) col0 FROM tab0 AS cor0
----
25
36
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6487
SELECT - ( - col1 ) / col1 - + ( - col0 ) col0 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT ALL - ( - ( - col2 ) ) - + cor0.col1 * 33 AS col0 FROM tab2 AS cor0
----
-1050
-1973
-599

query I rowsort
SELECT - col1 - - ( + col1 ) * + 99 FROM tab0 AS cor0
----
8428
8918
9506

onlyif mysql # use DIV operator for integer division
query I rowsort label-6490
SELECT ALL + 40 DIV cor0.col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 0e2f168ccd81058e883ce16d1af974cf

skipif mysql # not compatible
query I rowsort label-6490
SELECT ALL + 40 / cor0.col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 0e2f168ccd81058e883ce16d1af974cf

query I rowsort
SELECT cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

onlyif mysql # use DIV operator for integer division
query I rowsort label-6492
SELECT - col0 DIV + col0 AS col2 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6492
SELECT - col0 / + col0 AS col2 FROM tab1 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-6493
SELECT 73 DIV cor0.col0 FROM tab0 AS cor0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-6493
SELECT 73 / cor0.col0 FROM tab0 AS cor0
----
0
2
3

query I rowsort
SELECT - col1 * + cor0.col1 * 50 AS col0 FROM tab1 AS cor0
----
-33800
-5000
-8450

query I rowsort
SELECT 53 * + col2 AS col0 FROM tab2 AS cor0
----
1378
1431
2014

query I rowsort
SELECT - - 37 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to c023509f63faa044d654943e6df55ca2

onlyif mysql # use DIV operator for integer division
query I rowsort label-6497
SELECT ALL + - col1 - col0 DIV - ( 39 ) AS col0 FROM tab1 AS cor0
----
-11
-26
-9

skipif mysql # not compatible
query I rowsort label-6497
SELECT ALL + - col1 - col0 / - ( 39 ) AS col0 FROM tab1 AS cor0
----
-11
-26
-9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6498
SELECT + - CAST( - 98 AS SIGNED ) AS col2 FROM tab1 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

skipif mysql # not compatible
query I rowsort label-6498
SELECT + - CAST ( - 98 AS INTEGER ) AS col2 FROM tab1 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

query I rowsort
SELECT col0 * 94 FROM tab0 AS cor0
----
2256
3290
8366

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6500
SELECT - - col2 * + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6500
SELECT - - col2 * + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 69 FROM tab2, tab1 cor0, tab2 AS cor1
----
27 values hashing to 2810c3097fe4771e273cfff903357b40

query I rowsort
SELECT ALL cor0.col0 FROM tab1, tab1 AS cor0, tab2 cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT ALL ( - col1 ) + + col2 AS col2 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT 86 AS col0 FROM tab2
----
86

query I rowsort
SELECT ( 18 ) * - col2 FROM tab1
----
-1026
-1728
-972

query I rowsort
SELECT 30 * + col1 + - col2 AS col2 FROM tab1 AS cor0
----
243
294
726

query I rowsort
SELECT + - 35 * - ( col1 ) FROM tab0 AS cor0
----
3010
3185
3395

query I rowsort
SELECT ALL + 35 - col0 FROM tab1 AS cor0
----
-29
-45
32

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6509
SELECT col1 * col2 + + CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6509
SELECT col1 * col2 + + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 40 + + col1 FROM tab1 AS cor0
----
50
53
66

query I rowsort
SELECT DISTINCT ( - cor0.col2 ) * 41 + + col0 + col0 FROM tab2 AS cor0
----
-1093
-1400
-910

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6512
SELECT - col0 + col2 * - CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6512
SELECT - col0 + col2 * - CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 46 - - cor0.col2 AS col1 FROM tab0 cor0
----
128
47
79

query I rowsort
SELECT DISTINCT ( col2 ) * col2 * col2 FROM tab0
----
1
35937
551368

query I rowsort
SELECT DISTINCT col1 * - tab2.col2 + + tab2.col2 * col2 AS col1 FROM tab2
----
-108
-858
798

onlyif mysql # use DIV operator for integer division
query I rowsort label-6516
SELECT DISTINCT - col0 + - ( col2 ) * col2 - - tab2.col1 DIV - col1 FROM tab2
----
-1524
-737
-755

skipif mysql # not compatible
query I rowsort label-6516
SELECT DISTINCT - col0 + - ( col2 ) * col2 - - tab2.col1 / - col1 FROM tab2
----
-1524
-737
-755

query I rowsort
SELECT - col1 * - 0 * - col1 + - col0 * + col2 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT - col2 - col2 * + col1 * + col1 AS col1 FROM tab1 AS cor0
----
-16320
-36558
-5757

onlyif mysql # use DIV operator for integer division
query I rowsort label-6519
SELECT DISTINCT col0 DIV ( 97 ) FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6519
SELECT DISTINCT col0 / ( 97 ) FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT + col0 + 22 AS col2 FROM tab1
----
102
25
86

query I rowsort
SELECT ALL + + 81 * - col2 AS col0 FROM tab1 AS cor0
----
-4374
-4617
-7776

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6522
SELECT + CAST( cor0.col0 AS SIGNED ) + col2 + + col1 * col1 FROM tab0 AS cor0
----
7453
8452
9445

skipif mysql # not compatible
query I rowsort label-6522
SELECT + CAST ( cor0.col0 AS INTEGER ) + col2 + + col1 * col1 FROM tab0 AS cor0
----
7453
8452
9445

query I rowsort
SELECT DISTINCT + col0 * 26 + cor0.col2 AS col2 FROM tab2 AS cor0
----
2054
209
2092

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6524
SELECT + CAST( col2 AS SIGNED ) - - col2 * col1 AS col2 FROM tab2 AS cor0
----
1560
684
864

skipif mysql # not compatible
query I rowsort label-6524
SELECT + CAST ( col2 AS INTEGER ) - - col2 * col1 AS col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT DISTINCT - - col0 * - 10 + cor0.col1 * - col1 FROM tab1 AS cor0
----
-706
-740
-969

query I rowsort
SELECT DISTINCT 58 * col2 + col2 * col1 + + col1 FROM tab0
----
12309
252
4838

query I rowsort
SELECT DISTINCT - col1 * - col0 AS col2 FROM tab1
----
1040
640
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6528
SELECT CAST( NULL AS DECIMAL ) * - col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6528
SELECT CAST ( NULL AS REAL ) * - col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * 16 AS col0 FROM tab2
----
112
1248
1264

query I rowsort
SELECT ALL + 48 + - cor0.col1 * col0 * - col2 AS col0 FROM tab2 AS cor0
----
119700
51082
5907

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0, tab2 AS cor1, tab1, tab2 cor2
----
3645 values hashing to 6193516da5556fc054f35e0d2f4e5372

query I rowsort
SELECT + - ( - col1 ) * col2 * col0 - col0 AS col0 FROM tab2 cor0
----
119574
50955
5852

query I rowsort
SELECT cor0.col1 + cor0.col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 882fef197e3b41358c58e24f2db2f2e1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 75 * + 52 * col0 + + cor0.col2 + cor0.col0 col2 FROM tab2 AS cor0
----
27334
304304
308217

query I rowsort
SELECT DISTINCT col1 * + col1 + + col2 + col2 * + col2 AS col1 FROM tab2 AS cor0
----
1717
1771
4183

query I rowsort
SELECT ALL ( col2 ) * - col0 + col1 * + col0 FROM tab1 AS cor0
----
-3008
-6640
-84

query I rowsort
SELECT + + 94 + 1 * - col2 AS col1 FROM tab2 AS cor0
----
56
67
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col2 + col0 col1 FROM tab0
----
70
7387
816

query I rowsort
SELECT + col1 * col2 + col0 FROM tab2
----
1612
725
844

onlyif mysql # use DIV operator for integer division
query I rowsort label-6540
SELECT - tab1.col0 + col2 DIV 78 AS col2 FROM tab1
----
-3
-64
-79

skipif mysql # not compatible
query I rowsort label-6540
SELECT - tab1.col0 + col2 / 78 AS col2 FROM tab1
----
-3
-64
-79

query I rowsort
SELECT DISTINCT + 30 AS col0 FROM tab0 AS cor0
----
30

query I rowsort
SELECT - 26 * col2 AS col0 FROM tab0 AS cor0
----
-2132
-26
-858

query I rowsort
SELECT ALL + - col2 + - ( + col1 + col2 ) * - col0 * + col1 FROM tab2 AS cor0
----
12559
391144
73827

query I rowsort
SELECT cor0.col2 + ( - col1 ) AS col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT - col1 + - col2 * - col1 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT ALL + + col0 * + 84 AS col1 FROM tab1 AS cor0
----
252
5376
6720

query I rowsort
SELECT DISTINCT col0 - col1 AS col0 FROM tab2 cor0
----
-24
19
62

query I rowsort
SELECT ALL + col1 * - 87 + ( col0 ) * - col1 AS col0 FROM tab1 AS cor0
----
-1510
-2171
-2340

onlyif mysql # use DIV operator for integer division
query I rowsort label-6549
SELECT col1 DIV + 93 FROM tab2 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6549
SELECT col1 / + 93 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT ALL - - col0 + - col1 FROM tab0 cor0
----
-2
-62
-62

query I rowsort
SELECT - - col0 + 25 AS col2 FROM tab1 AS cor0
----
105
28
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-6552
SELECT DISTINCT - - col2 * 38 + - col0 DIV + col2 AS col2 FROM tab1 AS cor0
----
2052
2165
3648

skipif mysql # not compatible
query I rowsort label-6552
SELECT DISTINCT - - col2 * 38 + - col0 / + col2 AS col2 FROM tab1 AS cor0
----
2052
2165
3648

onlyif mysql # use DIV operator for integer division
query I rowsort label-6553
SELECT DISTINCT col0 + + 63 DIV col2 FROM tab1 AS cor0
----
4
65
80

skipif mysql # not compatible
query I rowsort label-6553
SELECT DISTINCT col0 + + 63 / col2 FROM tab1 AS cor0
----
4
65
80

query I rowsort
SELECT ALL col2 * + col2 + 34 FROM tab1 AS cor0
----
2950
3283
9250

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col0 + 41 FROM tab1, tab2 AS cor0
----
-1302
-176
-4561

query I rowsort
SELECT 39 + col2 FROM tab1
----
135
93
96

query I rowsort
SELECT + col1 + + 39 AS col1 FROM tab1 AS cor0
----
49
52
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-6558
SELECT ALL - col0 DIV col1 col2 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6558
SELECT ALL - col0 / col1 col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + col2 - col0 * - col0 FROM tab1
----
4153
63
6496

query I rowsort
SELECT DISTINCT - + 94 + + tab0.col2 FROM tab0, tab2, tab1 cor0
----
-12
-61
-93

query I rowsort
SELECT - + cor0.col2 * col0 * + col1 AS col2 FROM tab2 cor0
----
-119652
-51034
-5859

query I rowsort
SELECT tab1.col2 * col0 * - col0 + col1 AS col1 FROM tab1
----
-233462
-460
-614387

query I rowsort
SELECT + + col1 - - col2 AS col2 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT + - cor0.col2 * + col1 + + col0 FROM tab1 AS cor0
----
-1168
-1401
-506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 79 col2 FROM tab0 AS cor0
----
-79
-79
-79

query I rowsort
SELECT - - cor0.col1 * - col2 * + col1 FROM tab2 AS cor0
----
-10982
-25947
-90506

query I rowsort
SELECT - col2 + col0 * + col0 + - col1 FROM tab0 AS cor0
----
1127
457
7748

onlyif mysql # use DIV operator for integer division
query I rowsort label-6568
SELECT 79 + col2 DIV col0 FROM tab1 AS cor0
----
79
80
97

skipif mysql # not compatible
query I rowsort label-6568
SELECT 79 + col2 / col0 FROM tab1 AS cor0
----
79
80
97

query I rowsort
SELECT DISTINCT - + 89 FROM tab2 AS cor0
----
-89

query I rowsort
SELECT DISTINCT - ( col2 ) + col2 AS col0 FROM tab0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6571
SELECT + CAST( + 24 AS SIGNED ) * + col2 * col2 col0 FROM tab1
----
221184
69984
77976

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6571
SELECT + CAST ( + 24 AS INTEGER ) * + col2 * col2 col0 FROM tab1
----
221184
69984
77976

query I rowsort
SELECT ALL - tab2.col1 + col0 * + col1 FROM tab2
----
1326
186
4543

query I rowsort
SELECT ALL 64 + 58 AS col2 FROM tab2
----
122
122
122

query I rowsort
SELECT ALL + ( tab2.col2 ) + + tab2.col2 + col2 AS col2 FROM tab2
----
114
78
81

query I rowsort
SELECT ALL col0 + - col2 * + col2 AS col0 FROM tab1
----
-2913
-3185
-9136

query I rowsort
SELECT ALL + - ( - col2 ) AS col1 FROM tab2 AS cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 48 * - col1 + col0 col2 FROM tab2 AS cor0
----
1495
2910
895

query I rowsort
SELECT DISTINCT - - cor0.col1 + + cor0.col1 * + col0 - + col2 * + col2 FROM tab2 AS cor0
----
-481
-84
3985

onlyif mysql # use DIV operator for integer division
query I rowsort label-6579
SELECT + 14 * col0 + - col1 * cor0.col0 DIV col2 FROM tab1 AS cor0
----
1110
41
885

skipif mysql # not compatible
query I rowsort label-6579
SELECT + 14 * col0 + - col1 * cor0.col0 / col2 FROM tab1 AS cor0
----
1110
41
885

onlyif mysql # use DIV operator for integer division
query I rowsort label-6580
SELECT ALL - col2 DIV col1 + - col1 AS col0 FROM tab2 AS cor0
----
-19
-31
-59

skipif mysql # not compatible
query I rowsort label-6580
SELECT ALL - col2 / col1 + - col1 AS col0 FROM tab2 AS cor0
----
-19
-31
-59

query I rowsort
SELECT - 97 * col1 + cor0.col0 FROM tab1 AS cor0
----
-1181
-2519
-906

query I rowsort
SELECT DISTINCT - 71 AS col2 FROM tab1
----
-71

onlyif mysql # use DIV operator for integer division
query I rowsort label-6583
SELECT ALL col2 DIV 43 AS col2 FROM tab0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6583
SELECT ALL col2 / 43 AS col2 FROM tab0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * + ( - col2 ) col1 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT 31 * + cor0.col2 AS col0 FROM tab2, tab1 cor0
----
9 values hashing to 5926faa02517b3bd9450e64a60ee04a2

query I rowsort
SELECT - ( col2 ) * + col2 AS col1 FROM tab2 cor0
----
-1444
-676
-729

query I rowsort
SELECT - + cor0.col2 * - col1 AS col1 FROM tab1 cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-6588
SELECT ALL - col1 + + col2 DIV + col0 AS col2 FROM tab1 AS cor0
----
-10
-12
-8

skipif mysql # not compatible
query I rowsort label-6588
SELECT ALL - col1 + + col2 / + col0 AS col2 FROM tab1 AS cor0
----
-10
-12
-8

query I rowsort
SELECT DISTINCT 50 + + col2 FROM tab1 AS cor0
----
104
107
146

query I rowsort
SELECT - 70 + + col1 AS col2 FROM tab2 cor0
----
-11
-39
-53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * + col2 col2 FROM tab2
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-6592
SELECT ALL + 95 * + col0 DIV col0 AS col0 FROM tab0
----
95
95
95

skipif mysql # not compatible
query I rowsort label-6592
SELECT ALL + 95 * + col0 / col0 AS col0 FROM tab0
----
95
95
95

query I rowsort
SELECT ( - cor0.col2 ) AS col1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT ALL + col1 + - col0 + + col1 * - 51 FROM tab2 AS cor0
----
-1557
-3028
-929

query I rowsort
SELECT ALL + + col1 * ( + col2 ) AS col0 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT - col1 * col1 + 77 * col2 * - ( + col1 ) FROM tab0 AS cor0
----
-16878
-225922
-582855

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - 15 * - col2 col0 FROM tab1 AS cor0
----
1453
836
865

query I rowsort
SELECT DISTINCT - + col2 * col0 - 61 * + col0 AS col1 FROM tab0 AS cor0
----
-12727
-2170
-2256

query I rowsort
SELECT + col2 + + col2 * - col2 AS col2 FROM tab1 AS cor0
----
-2862
-3192
-9120

query I rowsort
SELECT 63 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to c3eea92c46f2c49716f386a58b575025

query I rowsort
SELECT - col2 + + ( col1 ) FROM tab0 AS cor0
----
53
9
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6602
SELECT + col0 + - CAST( 74 AS SIGNED ) * - col2 FROM tab0 AS cor0
----
109
2466
6157

skipif mysql # not compatible
query I rowsort label-6602
SELECT + col0 + - CAST ( 74 AS INTEGER ) * - col2 FROM tab0 AS cor0
----
109
2466
6157

query I rowsort
SELECT - cor0.col1 + + 84 * - col1 * col1 AS col0 FROM tab1 AS cor0
----
-14209
-56810
-8410

query I rowsort
SELECT + 27 + + col0 * + col1 AS col0 FROM tab2 AS cor0
----
1370
244
4629

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6605
SELECT + - CAST( + col0 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-6605
SELECT + - CAST ( + col0 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 38 col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to e571541ae40cb0ddaca16e11f4359507

query I rowsort
SELECT ALL 75 FROM tab2, tab1 AS cor0
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

query I rowsort
SELECT tab0.col0 * + 28 FROM tab0
----
2492
672
980

query I rowsort
SELECT DISTINCT + 25 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
25

query I rowsort
SELECT col0 + + cor0.col1 AS col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL + + 85 * + col2 * - col0 FROM tab2 AS cor0
----
-16065
-172380
-255170

onlyif mysql # use DIV operator for integer division
query I rowsort label-6612
SELECT DISTINCT - col2 DIV 10 FROM tab2 AS cor0
----
-2
-3

skipif mysql # not compatible
query I rowsort label-6612
SELECT DISTINCT - col2 / 10 FROM tab2 AS cor0
----
-2
-3

query I rowsort
SELECT + col2 * - col1 + + cor0.col1 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT DISTINCT + ( - ( col0 ) ) FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT + + col0 * 6 AS col0 FROM tab2 AS cor0
----
42
468
474

query I rowsort
SELECT DISTINCT - ( col0 ) * - col2 AS col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT col0 * cor0.col1 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT + - col1 + cor0.col0 + - col0 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT - - col2 * - col0 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL 34 AS col0 FROM tab0 cor0
----
34
34
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-6621
SELECT DISTINCT 98 + + col0 DIV + col1 FROM tab1
----
104
98

skipif mysql # not compatible
query I rowsort label-6621
SELECT DISTINCT 98 + + col0 / + col1 FROM tab1
----
104
98

query IIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 cor0 CROSS JOIN tab1 cor1
----
243 values hashing to 877a8dbac0e29b86e845fb64ed9d2242

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0 CROSS JOIN tab0, tab2, tab2 AS cor1
----
3645 values hashing to f8426cd4d01ba96a72d7348574fbbc8e

query I rowsort
SELECT + cor0.col2 + + col0 * - col0 FROM tab0 AS cor0
----
-1224
-543
-7839

query I rowsort
SELECT + col0 * col0 - 34 FROM tab2 AS cor0
----
15
6050
6207

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6626
SELECT + - col2 * CAST( - col0 AS SIGNED ) FROM tab0 AS cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-6626
SELECT + - col2 * CAST ( - col0 AS INTEGER ) FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT 51 AS col1 FROM tab0
----
51
51
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-6628
SELECT ALL col0 DIV col1 + - tab0.col0 + col1 FROM tab0
----
2
62
62

skipif mysql # not compatible
query I rowsort label-6628
SELECT ALL col0 / col1 + - tab0.col0 + col1 FROM tab0
----
2
62
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6629
SELECT ALL + col2 * + CAST( - col1 AS SIGNED ) - + col0 * col1 AS col0 FROM tab0
----
-15561
-3492
-4902

skipif mysql # not compatible
query I rowsort label-6629
SELECT ALL + col2 * + CAST ( - col1 AS INTEGER ) - + col0 * col1 AS col0 FROM tab0
----
-15561
-3492
-4902

query I rowsort
SELECT - col2 + 85 + - ( col2 ) * col0 FROM tab2
----
-131
-1969
-2955

query I rowsort
SELECT DISTINCT + col2 + - col0 * col2 - col0 FROM tab2
----
-169
-2080
-3043

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6632
SELECT + col1 + - CAST( - col1 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
20
26
52

skipif mysql # not compatible
query I rowsort label-6632
SELECT + col1 + - CAST ( - col1 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT ALL + col0 * 92 AS col1 FROM tab0 AS cor0
----
2208
3220
8188

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6634
SELECT + col0 * - CAST( NULL AS SIGNED ) + 44 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6634
SELECT + col0 * - CAST ( NULL AS INTEGER ) + 44 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6635
SELECT DISTINCT + - col2 DIV ( col1 ) AS col1 FROM tab2 AS cor0
----
-2
0

skipif mysql # not compatible
query I rowsort label-6635
SELECT DISTINCT + - col2 / ( col1 ) AS col1 FROM tab2 AS cor0
----
-2
0

query I rowsort
SELECT ALL - col1 * col2 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL cor0.col2 * 36 + - 77 AS col1 FROM tab2 AS cor0
----
1291
859
895

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6638
SELECT + CAST( NULL AS SIGNED ) col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6638
SELECT + CAST ( NULL AS INTEGER ) col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-6639
SELECT ALL - col2 DIV - col0 + col0 AS col0 FROM tab2
----
10
78
79

skipif mysql # not compatible
query I rowsort label-6639
SELECT ALL - col2 / - col0 + col0 AS col0 FROM tab2
----
10
78
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6640
SELECT + CAST( - 80 AS SIGNED ) col1 FROM tab1, tab1 cor0
----
9 values hashing to 4dde3bd5652d30396b9cadd0e2cfb680

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6640
SELECT + CAST ( - 80 AS INTEGER ) col1 FROM tab1, tab1 cor0
----
9 values hashing to 4dde3bd5652d30396b9cadd0e2cfb680

query I rowsort
SELECT col1 - - 99 AS col2 FROM tab2
----
116
130
158

query I rowsort
SELECT ALL - tab2.col0 + - ( col0 ) * col1 FROM tab2
----
-1422
-224
-4680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + + 79 col1 FROM tab1 cor0
----
133
136
175

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6644
SELECT DISTINCT + - col2 + + CAST( NULL AS DECIMAL ) * col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6644
SELECT DISTINCT + - col2 + + CAST ( NULL AS REAL ) * col1 FROM tab1 AS cor0
----
NULL

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 cor0, tab2 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 79b6ae096785aaecea9c1428e4a43e5f

query I rowsort
SELECT ALL + col1 * 66 FROM tab2
----
1122
2046
3894

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 19 col2 FROM tab0, tab1 AS cor0
----
19

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6648
SELECT DISTINCT + col1 * - CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6648
SELECT DISTINCT + col1 * - CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6649
SELECT ( - col1 ) + - col1 * - CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6649
SELECT ( - col1 ) + - col1 * - CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6650
SELECT + CAST( NULL AS SIGNED ) FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-6650
SELECT + CAST ( NULL AS INTEGER ) FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT col2 * col2 + col0 FROM tab2
----
1523
736
754

query I rowsort
SELECT 10 + col1 AS col2 FROM tab1
----
20
23
36

query I rowsort
SELECT DISTINCT ( + 99 ) * + col1 FROM tab1
----
1287
2574
990

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6654
SELECT ALL - 36 * col1 + + col1 + + CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6654
SELECT ALL - 36 * col1 + + col1 + + CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6655
SELECT - CAST( NULL AS SIGNED ) + + ( + col2 ) * col1 * col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6655
SELECT - CAST ( NULL AS INTEGER ) + + ( + col2 ) * col1 * col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6656
SELECT DISTINCT - CAST( NULL AS SIGNED ) * + col2 + col2 AS col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-6656
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * + col2 + col2 AS col1 FROM tab1
----
NULL

query I rowsort
SELECT DISTINCT 79 + col2 FROM tab1
----
133
136
175

query I rowsort
SELECT + col0 + 81 FROM tab1
----
145
161
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-6659
SELECT - col1 DIV - col0 AS col1 FROM tab2 AS cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-6659
SELECT - col1 / - col0 AS col1 FROM tab2 AS cor0
----
0
0
4

query I rowsort
SELECT DISTINCT 98 * col0 FROM tab1 AS cor0
----
294
6272
7840

query I rowsort
SELECT DISTINCT col2 * + col1 + - 21 * - col2 + + col0 * + col2 AS col1 FROM tab1 AS cor0
----
10944
2700
5415

query I rowsort
SELECT DISTINCT + - 50 * - col2 * cor0.col0 FROM tab0 AS cor0
----
1750
364900
39600

query I rowsort
SELECT ALL col1 * col1 * 19 + cor0.col2 AS col2 FROM tab2 AS cor0
----
18286
5529
66165

query I rowsort
SELECT ALL - - col1 * + col1 + 57 FROM tab1 AS cor0
----
157
226
733

query I rowsort
SELECT - - 87 + col0 AS col2 FROM tab2 cor0
----
165
166
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-6666
SELECT + - cor0.col0 DIV col2 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-6666
SELECT + - cor0.col0 / col2 FROM tab1 AS cor0
----
-1
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6667
SELECT + + col1 DIV - col0 AS col0 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-6667
SELECT + + col1 / - col0 AS col0 FROM tab0 AS cor0
----
-1
-2
-3

onlyif mysql # use DIV operator for integer division
query I rowsort label-6668
SELECT ALL col1 * col2 DIV + 30 AS col2 FROM tab0 AS cor0
----
248
3
94

skipif mysql # not compatible
query I rowsort label-6668
SELECT ALL col1 * col2 / + 30 AS col2 FROM tab0 AS cor0
----
248
3
94

query I rowsort
SELECT DISTINCT 24 * + cor0.col2 FROM tab2 AS cor0
----
624
648
912

query I rowsort
SELECT ALL + col0 * col2 + + cor0.col2 * - 13 AS col1 FROM tab1 AS cor0
----
-540
2907
6432

query I rowsort
SELECT 91 * - col2 + + ( col0 ) * + col2 FROM tab1 AS cor0
----
-1056
-1539
-4752

query I rowsort
SELECT DISTINCT + col0 * + col1 + 72 AS col2 FROM tab1 AS cor0
----
1112
150
712

query I rowsort
SELECT ALL + - ( col1 ) + + col2 * - col1 + col0 * 2 * - col0 FROM tab1 AS cor0
----
-14061
-1448
-8772

onlyif mysql # use DIV operator for integer division
query I rowsort label-6674
SELECT ALL - + col0 + col1 DIV 57 AS col1 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-6674
SELECT ALL - + col0 + col1 / 57 AS col1 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT ALL 65 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 1c9d0bf96cd3361942fadad668138b9c

query I rowsort
SELECT ALL 50 FROM tab1, tab2 cor0, tab2 AS cor1, tab2 AS cor2
----
81 values hashing to 6932c991110d256d3f92f3e9538f8040

query I rowsort
SELECT ALL - - 40 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to e4d10f7d6c34a281f524e45e82ebd2a0

query I rowsort
SELECT DISTINCT + - col1 + + col1 * ( + col0 ) FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT DISTINCT + + col2 + + cor0.col1 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL col0 * col0 - - col0 * + col2 AS col0 FROM tab0 cor0
----
1260
1368
15219

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + ( cor0.col2 ) * col2 col1 FROM tab2 AS cor0
----
22599
24548
39884

query I rowsort
SELECT ALL - - cor0.col1 * + cor0.col0 + + col1 AS col1 FROM tab0 AS cor0
----
2150
3492
8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-6683
SELECT DISTINCT - col1 * col1 DIV - ( + col0 ) AS col0 FROM tab1
----
1
2
225

skipif mysql # not compatible
query I rowsort label-6683
SELECT DISTINCT - col1 * col1 / - ( + col0 ) AS col0 FROM tab1
----
1
2
225

query I rowsort
SELECT + - col2 * - ( - 78 ) AS col0 FROM tab2 AS cor0
----
-2028
-2106
-2964

query I rowsort
SELECT ALL - + ( col2 ) * col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + + col2 - ( - col1 ) FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT + col0 + - 7 * col1 AS col0 FROM tab0 AS cor0
----
-548
-578
-644

onlyif mysql # use DIV operator for integer division
query I rowsort label-6688
SELECT ALL + 55 + + col1 DIV col1 FROM tab2 AS cor0
----
56
56
56

skipif mysql # not compatible
query I rowsort label-6688
SELECT ALL + 55 + + col1 / col1 FROM tab2 AS cor0
----
56
56
56

query I rowsort
SELECT col0 + - 59 FROM tab2 cor0
----
-52
19
20

query I rowsort
SELECT ALL col1 * - col2 + col1 AS col0 FROM tab0 AS cor0
----
-2752
-7371
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6691
SELECT - col2 DIV cor0.col0 + + col2 * - col0 FROM tab2 AS cor0
----
-192
-2028
-3002

skipif mysql # not compatible
query I rowsort label-6691
SELECT - col2 / cor0.col0 + + col2 * - col0 FROM tab2 AS cor0
----
-192
-2028
-3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6692
SELECT ALL - CAST( NULL AS SIGNED ) + - col1 * + col2 + + col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6692
SELECT ALL - CAST ( NULL AS INTEGER ) + - col1 * + col2 + + col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col2 ) col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL + ( 62 ) * col1 + - 50 * col1 FROM tab0 AS cor0
----
1032
1092
1164

query I rowsort
SELECT DISTINCT ( col1 ) * col0 FROM tab0 cor0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6696
SELECT DISTINCT - CAST( col2 AS SIGNED ) - + col1 AS col1 FROM tab2 AS cor0
----
-55
-58
-85

skipif mysql # not compatible
query I rowsort label-6696
SELECT DISTINCT - CAST ( col2 AS INTEGER ) - + col1 AS col1 FROM tab2 AS cor0
----
-55
-58
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-6697
SELECT - CAST( col2 AS SIGNED ) + col1 DIV + 69 AS col0 FROM tab0 AS cor0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-6697
SELECT - CAST ( col2 AS INTEGER ) + col1 / + 69 AS col0 FROM tab0 AS cor0
----
-32
-81
0

query I rowsort
SELECT + ( + col0 ) + + cor0.col2 AS col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL + ( - col2 ) * col1 + col1 AS col2 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT + 91 * col0 - + col0 AS col0 FROM tab2 AS cor0
----
630
7020
7110

query I rowsort
SELECT - col0 + col2 * + col0 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT ALL + tab1.col2 - col1 FROM tab1
----
28
47
83

query I rowsort
SELECT DISTINCT col2 - + ( tab1.col1 ) FROM tab1
----
28
47
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6704
SELECT DISTINCT + - CAST( NULL AS SIGNED ) * - 53 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6704
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) * - 53 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + - 62 * + col0 + col1 FROM tab0 AS cor0
----
-1402
-2073
-5427

onlyif mysql # use DIV operator for integer division
query I rowsort label-6706
SELECT ( - col2 ) DIV col1 AS col1 FROM tab2 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-6706
SELECT ( - col2 ) / col1 AS col1 FROM tab2 AS cor0
----
-2
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * 42 col1 FROM tab0 AS cor0
----
1386
3444
42

query I rowsort
SELECT ALL 7 - - 52 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

query I rowsort
SELECT + ( - 84 ) FROM tab0, tab0 cor0, tab1 cor1
----
27 values hashing to 02f1688b8610806ca28739b1735f6ae4

query I rowsort
SELECT - ( cor0.col2 ) AS col1 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT + col0 * 46 AS col2 FROM tab1
----
138
2944
3680

query I rowsort
SELECT + tab2.col1 * - col0 AS col0 FROM tab2 WHERE NOT NULL <= NULL
----

query I rowsort
SELECT ALL col0 + + col2 AS col0 FROM tab1
----
121
176
57

query III rowsort
SELECT * FROM tab0 WHERE NOT ( + col2 ) >= + col1 * col2 + - col0
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6715
SELECT col1 + col2 DIV tab2.col1 AS col0 FROM tab2
----
19
31
59

skipif mysql # not compatible
query I rowsort label-6715
SELECT col1 + col2 / tab2.col1 AS col0 FROM tab2
----
19
31
59

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT NULL BETWEEN NULL AND + col2
----

query III rowsort
SELECT * FROM tab0 WHERE NOT col1 <= NULL
----

query I rowsort
SELECT ALL - col0 AS col2 FROM tab2 WHERE col2 * - col2 >= ( - col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6719
SELECT col1 + - col1 DIV col2 FROM tab0
----
0
84
90

skipif mysql # not compatible
query I rowsort label-6719
SELECT col1 + - col1 / col2 FROM tab0
----
0
84
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col1 + col1 col0 FROM tab2
----
1360
248
4661

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab1.col0 * col1 - col2 col2 FROM tab1
----
-1136
-132
-697

query I rowsort
SELECT - col2 - - col1 AS col0 FROM tab1
----
-28
-47
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-6723
SELECT ALL col2 + + col2 DIV col2 FROM tab0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-6723
SELECT ALL col2 + + col2 / col2 FROM tab0
----
2
34
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + col2 col2 FROM tab2
----
-33
-4
21

query I rowsort
SELECT DISTINCT + col2 + + col2 AS col2 FROM tab2
----
52
54
76

query I rowsort
SELECT - col1 + - col0 + col2 FROM tab2
----
-11
-111
-58

query I rowsort
SELECT ALL col1 FROM tab2 WHERE NULL BETWEEN - col0 AND col0
----

query I rowsort
SELECT + col0 + tab1.col2 + + col0 FROM tab1
----
185
256
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * col2 * + col1 + tab1.col0 col2 FROM tab1
----
-36416
-4209
-99760

onlyif mysql # use DIV operator for integer division
query I rowsort label-6730
SELECT col2 + + col2 * tab0.col0 DIV col2 - col2 AS col0 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-6730
SELECT col2 + + col2 * tab0.col0 / col2 - col2 AS col0 FROM tab0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-6731
SELECT DISTINCT + col2 + + col1 DIV col1 FROM tab0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-6731
SELECT DISTINCT + col2 + + col1 / col1 FROM tab0
----
2
34
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-6732
SELECT - cor0.col1 DIV + cor0.col1 - col2 * col0 AS col1 FROM tab1 AS cor0
----
-163
-3649
-7681

skipif mysql # not compatible
query I rowsort label-6732
SELECT - cor0.col1 / + cor0.col1 - col2 * col0 AS col1 FROM tab1 AS cor0
----
-163
-3649
-7681

query I rowsort
SELECT - col0 * col1 * tab0.col1 FROM tab0
----
-177504
-329315
-737009

query I rowsort
SELECT DISTINCT + cor0.col0 + - col1 * + col2 - + col1 FROM tab2 AS cor0
----
-1515
-584
-861

query I rowsort
SELECT - + col1 - cor0.col2 AS col2 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT DISTINCT col0 + col2 + cor0.col2 FROM tab0 AS cor0
----
253
37
90

query III rowsort
SELECT ALL * FROM tab2 AS cor0 WHERE NOT ( col0 ) NOT IN ( + col2 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - col0 + col2 col2 FROM tab1 AS cor0
----
105
112
50

query I rowsort
SELECT col0 * col1 + col1 AS col1 FROM tab2 AS cor0
----
1360
248
4661

query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 WHERE ( - col0 * col0 ) NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT - col0 + tab2.col0 FROM tab2
----
0

query I rowsort
SELECT + col0 * + col2 + + col2 FROM tab1 cor0
----
216
3705
7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-6743
SELECT col1 * cor0.col2 - col0 DIV cor0.col2 AS col1 FROM tab0 AS cor0
----
2838
62
7461

skipif mysql # not compatible
query I rowsort label-6743
SELECT col1 * cor0.col2 - col0 / cor0.col2 AS col1 FROM tab0 AS cor0
----
2838
62
7461

query I rowsort
SELECT + col1 * - ( + col2 ) * col1 + - cor0.col1 * - col1 * + col0 FROM tab2 AS cor0
----
-19220
11849
181012

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab2 AS cor2, tab1 cor3
----
3645 values hashing to 7ccb6e2515d95809a8c30b73a5cf5f46

query I rowsort
SELECT ALL + cor0.col0 + ( 38 ) * col1 FROM tab1 AS cor0
----
444
574
991

query I rowsort
SELECT ALL - + col2 * + col1 + + 27 FROM tab0 AS cor0
----
-2811
-70
-7435

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + + 95 + cor0.col1 col2 FROM tab0 AS cor0
----
267
277
289

query I rowsort
SELECT + col0 * 47 - + 99 AS col1 FROM tab0 AS cor0
----
1029
1546
4084

query I rowsort
SELECT DISTINCT - col2 - col1 * - ( col0 ) * + ( + col2 ) FROM tab2 AS cor0
----
119626
50996
5832

query I rowsort
SELECT - col0 - 21 AS col1 FROM tab1 cor0
----
-101
-24
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-6752
SELECT + + col0 + - col1 - col2 DIV - cor0.col1 AS col1 FROM tab0 AS cor0
----
-2
-62
-62

skipif mysql # not compatible
query I rowsort label-6752
SELECT + + col0 + - col1 - col2 / - cor0.col1 AS col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT + cor0.col0 + col2 * + 90 * - col0 AS col0 FROM tab2 AS cor0
----
-17003
-182442
-270101

query I rowsort
SELECT ALL + 3 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 3cf1e377a943589897b8d431a834f1ba

query I rowsort
SELECT DISTINCT + 9 * - col0 AS col0 FROM tab0 cor0
----
-216
-315
-801

query I rowsort
SELECT - col2 * 92 FROM tab0 AS cor0
----
-3036
-7544
-92

onlyif mysql # use DIV operator for integer division
query I rowsort label-6757
SELECT - 24 DIV + cor0.col2 FROM tab2, tab0 cor0
----
9 values hashing to b7f36e5744ef76d47deb4d5376e921aa

skipif mysql # not compatible
query I rowsort label-6757
SELECT - 24 / + cor0.col2 FROM tab2, tab0 cor0
----
9 values hashing to b7f36e5744ef76d47deb4d5376e921aa

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 94 col2 FROM tab2 AS cor0
----
-94

query I rowsort
SELECT - 99 * col2 + col1 FROM tab1 AS cor0
----
-5320
-5633
-9491

query I rowsort
SELECT ALL + col0 * - 81 FROM tab1 AS cor0
----
-243
-5184
-6480

query I rowsort
SELECT col2 - col0 * + 52 AS col1 FROM tab1
----
-102
-3271
-4064

query I rowsort
SELECT DISTINCT 24 * + cor0.col0 * + col1 AS col2 FROM tab0 AS cor0
----
194376
49536
81480

query I rowsort
SELECT 61 * col2 FROM tab2 AS cor0
----
1586
1647
2318

query I rowsort
SELECT DISTINCT - col1 + - col2 * col2 + - col2 * col1 FROM tab2 WHERE - col1 IN ( col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6765
SELECT ALL + col1 + - col1 DIV col1 FROM tab2
----
16
30
58

skipif mysql # not compatible
query I rowsort label-6765
SELECT ALL + col1 + - col1 / col1 FROM tab2
----
16
30
58

query IIIIIIIII rowsort
SELECT * FROM tab1, tab2, tab1 AS cor0 WHERE NOT NULL >= - cor0.col1 / - tab2.col0
----

query I rowsort
SELECT tab1.col2 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * cor0.col2 col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL 70 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to c76157a7a7ec18de56823b2058b49f32

query I rowsort
SELECT ALL cor0.col2 + + col1 AS col0 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT - ( col1 ) * + col0 - - col2 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT DISTINCT + ( + 13 ) FROM tab1 AS cor0
----
13

query I rowsort
SELECT - - col1 * col0 + - col2 FROM tab2 AS cor0
----
1305
190
4576

query I rowsort
SELECT + 69 * cor0.col0 FROM tab1 AS cor0
----
207
4416
5520

query I rowsort
SELECT DISTINCT + 66 + + col1 FROM tab0 AS cor0
----
152
157
163

query I rowsort
SELECT DISTINCT - cor0.col0 * col2 + col1 - cor0.col1 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT + 50 + + 47 AS col0 FROM tab2 AS cor0
----
97
97
97

query I rowsort
SELECT ALL - cor0.col2 + col0 * col2 AS col1 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT col2 + + col0 * col0 * col1 FROM tab1
----
288
41017
83296

query I rowsort
SELECT ALL + col0 + + 0 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT + cor0.col0 * - col2 + + col0 * col0 AS col2 FROM tab1 cor0
----
-1280
-153
448

query I rowsort
SELECT ALL - cor0.col1 + - col1 + + col2 FROM tab0 AS cor0
----
-100
-139
-193

onlyif mysql # use DIV operator for integer division
query I rowsort label-6783
SELECT ALL + col1 + + ( col0 ) DIV col1 FROM tab1
----
16
19
26

skipif mysql # not compatible
query I rowsort label-6783
SELECT ALL + col1 + + ( col0 ) / col1 FROM tab1
----
16
19
26

query I rowsort
SELECT DISTINCT 67 FROM tab1, tab2 AS cor0
----
67

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6785
SELECT DISTINCT - col2 * + 13 + col2 + CAST( NULL AS DECIMAL ) AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6785
SELECT DISTINCT - col2 * + 13 + col2 + CAST ( NULL AS REAL ) AS col1 FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6786
SELECT ALL cor0.col0 DIV + 39 - col1 FROM tab1 AS cor0
----
-11
-26
-9

skipif mysql # not compatible
query I rowsort label-6786
SELECT ALL cor0.col0 / + 39 - col1 FROM tab1 AS cor0
----
-11
-26
-9

query I rowsort
SELECT - col1 + 65 FROM tab0 AS cor0
----
-21
-26
-32

query I rowsort
SELECT ALL + ( col1 ) * col0 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL - + 96 AS col2 FROM tab2 AS cor0
----
-96
-96
-96

query I rowsort
SELECT DISTINCT - - col1 * - ( col1 ) AS col0 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT col2 - 35 * + cor0.col1 AS col2 FROM tab0 AS cor0
----
-2977
-3103
-3394

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0, tab1 cor1, tab2, tab2 AS cor2
----
3645 values hashing to b62c1ebc681aca72d13feadb888b3be7

query I rowsort
SELECT ALL - col0 - + cor0.col1 AS col0 FROM tab1 AS cor0
----
-29
-74
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * - ( - 22 ) * col2 col1 FROM tab0 AS cor0
----
-164164
-2134
-62436

query I rowsort
SELECT 50 * - col0 * ( + col2 ) AS col0 FROM tab0
----
-1750
-364900
-39600

onlyif mysql # use DIV operator for integer division
query I rowsort label-6796
SELECT ALL - col1 DIV + tab1.col2 + + col0 * col1 AS col1 FROM tab1
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-6796
SELECT ALL - col1 / + tab1.col2 + + col0 * col1 AS col1 FROM tab1
----
1040
640
78

query I rowsort
SELECT DISTINCT + col0 + tab2.col1 * col2 AS col2 FROM tab2
----
1612
725
844

query I rowsort
SELECT ALL + 32 + 8 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

query I rowsort
SELECT ALL col2 + + 58 FROM tab0 AS cor0
----
140
59
91

query I rowsort
SELECT - col1 + col2 + 44 * - col2 * col1 FROM tab1
----
-25033
-54829
-61748

query I rowsort
SELECT col1 + + 57 AS col1 FROM tab0
----
143
148
154

query I rowsort
SELECT ALL - col1 * col0 * col0 AS col1 FROM tab0
----
-118825
-49536
-720811

query I rowsort
SELECT col2 + - ( - tab1.col0 ) * - col2 AS col2 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT + col1 * + col2 * col2 AS col0 FROM tab2
----
22599
24548
39884

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 44 ) col1 FROM tab0, tab2 AS cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to 9c887509d218271b9365009eba440976

query I rowsort
SELECT 70 * cor0.col0 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 45057eabdfc9c276a006bcd1599c917f

query I rowsort
SELECT - tab0.col1 AS col2 FROM tab0, tab2 cor0
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT - ( - 50 ) FROM tab2
----
50
50
50

query I rowsort
SELECT ALL 26 * col0 FROM tab0
----
2314
624
910

query I rowsort
SELECT ALL + ( - 78 ) AS col1 FROM tab2
----
-78
-78
-78

query I rowsort
SELECT - - 3 * + cor0.col0 + + col2 AS col1 FROM tab2 AS cor0
----
260
275
48

query I rowsort
SELECT ( tab2.col0 ) + ( col0 ) AS col1 FROM tab2
----
14
156
158

query I rowsort
SELECT + 10 + + col1 * + col1 FROM tab1
----
110
179
686

query I rowsort
SELECT DISTINCT + - col1 * + cor0.col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL 19 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 86c53e8567a17c8d91fc5aff119e0498

query I rowsort
SELECT ALL - - 68 * + cor0.col0 + - col2 AS col1 FROM tab0 AS cor0
----
1599
2379
5970

query I rowsort
SELECT - col2 * col1 + col2 AS col2 FROM tab0 AS cor0
----
-2805
-7380
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6818
SELECT DISTINCT - ( + col2 ) DIV 2 FROM tab2 AS cor0
----
-13
-19

skipif mysql # not compatible
query I rowsort label-6818
SELECT DISTINCT - ( + col2 ) / 2 FROM tab2 AS cor0
----
-13
-19

query I rowsort
SELECT DISTINCT + col0 * - col1 + col0 * + col0 FROM tab1 AS cor0
----
-69
3456
5360

query I rowsort
SELECT - - 56 + col1 FROM tab2 AS cor0
----
115
73
87

query I rowsort
SELECT ALL col0 + 98 AS col2 FROM tab2 AS cor0
----
105
176
177

onlyif mysql # use DIV operator for integer division
query I rowsort label-6822
SELECT col1 * col1 - col1 DIV + cor0.col2 AS col2 FROM tab1 cor0
----
100
169
676

skipif mysql # not compatible
query I rowsort label-6822
SELECT col1 * col1 - col1 / + cor0.col2 AS col2 FROM tab1 cor0
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-6823
SELECT col1 - col2 DIV - 26 FROM tab2 AS cor0
----
18
32
60

skipif mysql # not compatible
query I rowsort label-6823
SELECT col1 - col2 / - 26 FROM tab2 AS cor0
----
18
32
60

query I rowsort
SELECT cor0.col0 * col0 + - cor0.col1 * col2 FROM tab1 cor0
----
-1395
3526
5152

query I rowsort
SELECT DISTINCT + - col2 * 16 FROM tab2 cor0
----
-416
-432
-608

onlyif mysql # use DIV operator for integer division
query I rowsort label-6826
SELECT ALL - + col0 DIV col1 FROM tab2 AS cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-6826
SELECT ALL - + col0 / col1 FROM tab2 AS cor0
----
-1
-4
0

query I rowsort
SELECT + + col0 * ( - col2 ) FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT col2 + col2 + - col2 AS col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - col0 * - col0 + + col2 AS col1 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT ALL - ( col2 ) * - 75 + col0 AS col0 FROM tab1
----
4053
4339
7280

query I rowsort
SELECT - 43 AS col1 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 2f72bd9cab68c8d8c38874510a290a3c

query I rowsort
SELECT - + col2 * - col0 - col2 AS col0 FROM tab2 AS cor0
----
162
2002
2964

query I rowsort
SELECT col2 + - 67 * col0 FROM tab0 AS cor0
----
-1575
-2344
-5881

onlyif mysql # use DIV operator for integer division
query I rowsort label-6834
SELECT col0 * col1 - col1 DIV - col1 AS col2 FROM tab1 AS cor0
----
1041
641
79

skipif mysql # not compatible
query I rowsort label-6834
SELECT col0 * col1 - col1 / - col1 AS col2 FROM tab1 AS cor0
----
1041
641
79

query I rowsort
SELECT DISTINCT - - 63 * col2 FROM tab1 cor0
----
3402
3591
6048

query I rowsort
SELECT + - col0 + col0 * - ( col2 ) AS col1 FROM tab0 cor0
----
-70
-7387
-816

onlyif mysql # use DIV operator for integer division
query I rowsort label-6837
SELECT DISTINCT + 46 + col2 DIV - ( cor0.col2 * + col2 ) FROM tab1 AS cor0
----
46

skipif mysql # not compatible
query I rowsort label-6837
SELECT DISTINCT + 46 + col2 / - ( cor0.col2 * + col2 ) FROM tab1 AS cor0
----
46

query I rowsort
SELECT - col1 * + col0 - - 1 * + cor0.col1 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT - + col0 + 31 AS col0 FROM tab1 cor0
----
-33
-49
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-6840
SELECT ALL + col2 + 74 DIV + 71 AS col0 FROM tab2 AS cor0
----
27
28
39

skipif mysql # not compatible
query I rowsort label-6840
SELECT ALL + col2 + 74 / + 71 AS col0 FROM tab2 AS cor0
----
27
28
39

onlyif mysql # use DIV operator for integer division
query I rowsort label-6841
SELECT ALL + col2 DIV - cor0.col2 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6841
SELECT ALL + col2 / - cor0.col2 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT col2 + + ( - 13 * + col0 ) AS col2 FROM tab1 AS cor0
----
-775
-944
15

query I rowsort
SELECT col0 + ( 79 ) * - col2 FROM tab1 cor0
----
-4263
-4439
-7504

query I rowsort
SELECT DISTINCT + 81 + + col1 FROM tab2
----
112
140
98

query I rowsort
SELECT ALL + 8 + + col2 FROM tab1
----
104
62
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col0 col2 FROM tab0, tab1 cor0
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query I rowsort
SELECT tab2.col0 * col2 - - col2 * tab2.col0 FROM tab2
----
378
4056
6004

query I rowsort
SELECT tab1.col1 * + tab1.col2 - col2 * + col2 AS col2 FROM tab1
----
-1512
-2679
-7968

query I rowsort
SELECT ALL + ( col0 ) * col0 AS col1 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT - 46 * + col1 AS col2 FROM tab0 AS cor0
----
-3956
-4186
-4462

query I rowsort
SELECT - - 17 AS col0 FROM tab1 cor0
----
17
17
17

query I rowsort
SELECT - 15 * - cor0.col1 FROM tab0 AS cor0
----
1290
1365
1455

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6853
SELECT - + CAST( cor0.col1 AS SIGNED ) * - col1 FROM tab1 AS cor0
----
100
169
676

skipif mysql # not compatible
query I rowsort label-6853
SELECT - + CAST ( cor0.col1 AS INTEGER ) * - col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT - cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query I rowsort
SELECT - 69 * col1 FROM tab0 AS cor0
----
-5934
-6279
-6693

query I rowsort
SELECT - + col2 + cor0.col2 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + cor0.col0 * ( col2 ) + col2 - + 25 FROM tab1 AS cor0
----
191
3680
7751

query I rowsort
SELECT - col2 - + col2 AS col1 FROM tab2
----
-52
-54
-76

onlyif mysql # use DIV operator for integer division
query I rowsort label-6859
SELECT ALL + col1 * + col1 DIV - col1 AS col1 FROM tab1
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-6859
SELECT ALL + col1 * + col1 / - col1 AS col1 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT ALL ( + col0 ) + cor0.col0 * 62 AS col2 FROM tab0 AS cor0
----
1512
2205
5607

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 17 col2 FROM tab0
----
17
17
17

query I rowsort
SELECT ( 19 ) * - col1 * - ( + col2 ) + col1 FROM tab2
----
12291
15934
29205

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 90 col1 FROM tab1
----
90
90
90

query I rowsort
SELECT - + col0 + - ( - col1 ) FROM tab2 cor0
----
-19
-62
24

query I rowsort
SELECT 6 - - 92 AS col2 FROM tab1
----
98
98
98

query I rowsort
SELECT 51 + + col0 FROM tab2
----
129
130
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-6867
SELECT - col0 - col1 DIV 34 AS col0 FROM tab0 AS cor0
----
-26
-37
-91

skipif mysql # not compatible
query I rowsort label-6867
SELECT - col0 - col1 / 34 AS col0 FROM tab0 AS cor0
----
-26
-37
-91

query I rowsort
SELECT 52 - cor0.col2 FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to bf5ff7647f1b946f4b13d5d3f2189fbf

query I rowsort
SELECT - ( + col0 ) * ( col1 * col0 ) - col0 FROM tab1 AS cor0
----
-237
-41024
-83280

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + col0 col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT 59 + - col0 * - col1 FROM tab2
----
1402
276
4661

query I rowsort
SELECT DISTINCT 82 + + col2 * col1 FROM tab0 AS cor0
----
179
2920
7544

query I rowsort
SELECT DISTINCT col1 + col1 * 17 FROM tab0 AS cor0
----
1548
1638
1746

query I rowsort
SELECT ALL ( + col0 ) AS col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL + col1 + - col1 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT - ( col2 ) + col1 AS col2 FROM tab0 AS cor0
----
53
9
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6877
SELECT - - col1 DIV - col2 FROM tab0 cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-6877
SELECT - - col1 / - col2 FROM tab0 cor0
----
-1
-2
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6878
SELECT ALL ( col1 ) * + CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6878
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-6879
SELECT - cor0.col2 + + col2 DIV - cor0.col0 FROM tab2 AS cor0
----
-26
-30
-38

skipif mysql # not compatible
query I rowsort label-6879
SELECT - cor0.col2 + + col2 / - cor0.col0 FROM tab2 AS cor0
----
-26
-30
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-6880
SELECT ALL 51 DIV col0 FROM tab0 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-6880
SELECT ALL 51 / col0 FROM tab0 AS cor0
----
0
1
2

query I rowsort
SELECT DISTINCT + - col1 * - col1 + 37 AS col2 FROM tab0 AS cor0
----
7433
8318
9446

onlyif mysql # use DIV operator for integer division
query I rowsort label-6882
SELECT - 36 DIV - col0 FROM tab0 cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-6882
SELECT - 36 / - col0 FROM tab0 cor0
----
0
1
1

query I rowsort
SELECT DISTINCT col2 + - ( + 74 ) + col2 AS col0 FROM tab0
----
-72
-8
90

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 CROSS JOIN tab2, tab1 AS cor1, tab1 AS cor2
----
972 values hashing to cee640567b2a4ba7d97109d5025bf4d9

onlyif mysql # use DIV operator for integer division
query I rowsort label-6885
SELECT col2 DIV + col1 + col0 * - col0 col1 FROM tab2 AS cor0
----
-49
-6084
-6239

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6885
SELECT col2 / + col1 + col0 * - col0 col1 FROM tab2 AS cor0
----
-49
-6084
-6239

query I rowsort
SELECT DISTINCT col1 * col1 + 33 FROM tab2 AS cor0
----
322
3514
994

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6887
SELECT ALL + col2 * + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6887
SELECT ALL + col2 * + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col1 * + col2 * + col0 + + col1 FROM tab1 AS cor0
----
36490
4238
99853

query I rowsort
SELECT ALL - + 37 AS col1 FROM tab2 AS cor0
----
-37
-37
-37

query I rowsort
SELECT ALL 70 FROM tab0, tab2 AS cor0
----
9 values hashing to 9758da65ae4711e3e8c8def2fe026911

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT CAST ( - 75 AS REAL ) col2 FROM tab2 AS cor0
----
-75
-75
-75

query I rowsort
SELECT ALL - + ( col1 ) + cor0.col2 * - col1 FROM tab2 AS cor0
----
-1593
-663
-868

query I rowsort
SELECT DISTINCT ( - 71 ) FROM tab2, tab1 AS cor0
----
-71

query I rowsort
SELECT + - cor0.col1 + ( col2 ) AS col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT + - col0 * - col2 AS col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL - col1 + 62 FROM tab2 cor0
----
3
31
45

query I rowsort
SELECT ALL + col1 * col2 + col0 + + ( - col0 ) AS col1 FROM tab0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6898
SELECT - 37 * col2 + col1 DIV col1 col0 FROM tab2 AS cor0
----
-1405
-961
-998

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6898
SELECT - 37 * col2 + col1 / col1 col0 FROM tab2 AS cor0
----
-1405
-961
-998

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6899
SELECT DISTINCT + col0 - + col2 * + CAST( NULL AS SIGNED ) * + col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6899
SELECT DISTINCT + col0 - + col2 * + CAST ( NULL AS INTEGER ) * + col1 FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6900
SELECT - 54 DIV + col0 + + col0 FROM tab1 AS cor0
----
-15
64
80

skipif mysql # not compatible
query I rowsort label-6900
SELECT - 54 / + col0 + + col0 FROM tab1 AS cor0
----
-15
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6901
SELECT - col1 * + col2 - CAST( NULL AS SIGNED ) col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6901
SELECT - col1 * + col2 - CAST ( NULL AS INTEGER ) col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 77 AS col2 FROM tab1 AS cor0
----
77
77
77

query I rowsort
SELECT DISTINCT cor0.col2 * + col2 + 69 * + col2 AS col0 FROM tab2 AS cor0
----
2470
2592
4066

query I rowsort
SELECT DISTINCT - 62 * + col2 AS col0 FROM tab0 cor0
----
-2046
-5084
-62

query I rowsort
SELECT DISTINCT + - 63 * col0 FROM tab1 AS cor0
----
-189
-4032
-5040

query I rowsort
SELECT + col2 + + col0 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT ALL - - 2 + col2 AS col0 FROM tab1 AS cor0
----
56
59
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 - col1 col0 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT - - col1 - col0 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL 67 + col2 FROM tab2 AS cor0
----
105
93
94

query I rowsort
SELECT DISTINCT - 3 - + col0 AS col0 FROM tab0 AS cor0
----
-27
-38
-92

query I rowsort
SELECT - col0 * cor0.col1 + 20 AS col0 FROM tab2 AS cor0
----
-1323
-197
-4582

query I rowsort
SELECT ALL col2 * - cor0.col0 * 53 + 67 * col0 AS col2 FROM tab1 AS cor0
----
-189056
-401680
-8385

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6914
SELECT DISTINCT col1 * CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6914
SELECT DISTINCT col1 * CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - cor0.col2 * - col1 * - col0 + - col1 AS col0 FROM tab2 AS cor0
----
-119711
-51051
-5890

query I rowsort
SELECT - - col1 * - ( 39 ) FROM tab2 AS cor0
----
-1209
-2301
-663

query I rowsort
SELECT ALL - col0 * + 47 AS col1 FROM tab2 AS cor0
----
-329
-3666
-3713

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + cor0.col2 * col2 col0 FROM tab0 AS cor0
----
1175
6815
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - cor0.col0 * col2 col2 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-6920
SELECT ALL col2 DIV + ( ( + col2 ) ) FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6920
SELECT ALL col2 / + ( ( + col2 ) ) FROM tab0 AS cor0
----
1
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6921
SELECT + 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-6921
SELECT + col0 + CAST ( NULL AS INTEGER ) col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col1 + - tab2.col1 FROM tab2
----
-118
-34
-62

query I rowsort
SELECT col1 * + col1 + col0 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT DISTINCT col2 + - cor0.col1 * + col2 * col1 AS col2 FROM tab1 AS cor0
----
-16128
-36450
-5643

onlyif mysql # use DIV operator for integer division
query I rowsort label-6925
SELECT ALL + cor0.col0 DIV + 42 - col2 AS col1 FROM tab1 AS cor0
----
-54
-56
-95

skipif mysql # not compatible
query I rowsort label-6925
SELECT ALL + cor0.col0 / + 42 - col2 AS col1 FROM tab1 AS cor0
----
-54
-56
-95

query I rowsort
SELECT - col2 * + col1 + col2 AS col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT DISTINCT + col0 * cor0.col2 + + col2 AS col0 FROM tab0 cor0
----
36
7380
825

query I rowsort
SELECT - ( cor0.col1 ) * col0 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-6929
SELECT DISTINCT cor0.col0 DIV col2 AS col2 FROM tab1 cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-6929
SELECT DISTINCT cor0.col0 / col2 AS col2 FROM tab1 cor0
----
0
1

query I rowsort
SELECT ALL col0 * + 59 AS col1 FROM tab0 AS cor0
----
1416
2065
5251

onlyif mysql # use DIV operator for integer division
query I rowsort label-6931
SELECT DISTINCT - cor0.col2 DIV col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6931
SELECT DISTINCT - cor0.col2 / col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT - col1 + col2 * + col2 FROM tab1 cor0
----
2890
3239
9203

query I rowsort
SELECT DISTINCT + + ( 79 ) * - cor0.col2 * col0 FROM tab0 AS cor0
----
-2765
-576542
-62568

onlyif mysql # use DIV operator for integer division
query I rowsort label-6934
SELECT ( + col1 ) DIV - col1 + col1 * col1 col1 FROM tab1 cor0
----
168
675
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6934
SELECT ( + col1 ) / - col1 + col1 * col1 col1 FROM tab1 cor0
----
168
675
99

query I rowsort
SELECT ALL + 67 - col2 * + col0 FROM tab0
----
-7231
-725
32

query I rowsort
SELECT DISTINCT 66 - 75 AS col0 FROM tab2
----
-9

query I rowsort
SELECT DISTINCT - col0 + + col2 * + 79 AS col0 FROM tab2 AS cor0
----
1976
2126
2923

onlyif mysql # use DIV operator for integer division
query I rowsort label-6938
SELECT ALL - - 29 DIV + cor0.col1 AS col2 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6938
SELECT ALL - - 29 / + cor0.col1 AS col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT + ( col0 ) + 93 AS col2 FROM tab0 AS cor0
----
117
128
182

query I rowsort
SELECT ALL - cor0.col2 * + col1 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT + 53 * col1 + ( - col2 ) AS col2 FROM tab1 AS cor0
----
1324
473
593

query I rowsort
SELECT DISTINCT col1 + - col0 * + col2 AS col0 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT ALL + tab1.col1 + - 38 * col2 AS col0 FROM tab1
----
-2026
-2156
-3635

onlyif mysql # use DIV operator for integer division
query I rowsort label-6944
SELECT 74 DIV 26 FROM tab2
----
2
2
2

skipif mysql # not compatible
query I rowsort label-6944
SELECT 74 / 26 FROM tab2
----
2
2
2

query I rowsort
SELECT col2 * 78 AS col1 FROM tab1
----
4212
4446
7488

onlyif mysql # use DIV operator for integer division
query I rowsort label-6946
SELECT col1 DIV col2 - 41 AS col0 FROM tab0 AS cor0
----
-39
-40
56

skipif mysql # not compatible
query I rowsort label-6946
SELECT col1 / col2 - 41 AS col0 FROM tab0 AS cor0
----
-39
-40
56

query I rowsort
SELECT + + 99 - col1 AS col1 FROM tab2 cor0
----
40
68
82

query I rowsort
SELECT ALL col0 * + col1 + 13 * - cor0.col2 AS col0 FROM tab0 AS cor0
----
1635
3382
7033

query I rowsort
SELECT - cor0.col0 + col0 * col0 AS col2 FROM tab0 AS cor0
----
1190
552
7832

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col0 col0 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

query I rowsort
SELECT ALL col2 + - col1 AS col2 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT 46 * - col1 FROM tab2
----
-1426
-2714
-782

onlyif mysql # use DIV operator for integer division
query I rowsort label-6953
SELECT - cor0.col1 + col1 DIV + col1 AS col1 FROM tab0 AS cor0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-6953
SELECT - cor0.col1 + col1 / + col1 AS col1 FROM tab0 AS cor0
----
-85
-90
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6954
SELECT 84 DIV - col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6954
SELECT 84 / - col1 FROM tab0
----
0
0
0

query I rowsort
SELECT - col2 + tab1.col1 * + col2 * - col1 AS col1 FROM tab1
----
-16320
-36558
-5757

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 56 + - col1 * col1 * cor0.col1 col2 FROM tab2 cor0
----
-205435
-29847
-4969

onlyif mysql # use DIV operator for integer division
query I rowsort label-6957
SELECT col0 * + col1 + + 88 DIV col2 col2 FROM tab1
----
1040
641
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6957
SELECT col0 * + col1 + + 88 / col2 col2 FROM tab1
----
1040
641
79

query I rowsort
SELECT - col2 + tab2.col1 FROM tab2
----
-21
33
4

query I rowsort
SELECT + - col0 * + ( col1 ) * + col0 AS col0 FROM tab0 AS cor0
----
-118825
-49536
-720811

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6960
SELECT DISTINCT + CAST( - 43 AS SIGNED ) FROM tab0 AS cor0
----
-43

skipif mysql # not compatible
query I rowsort label-6960
SELECT DISTINCT + CAST ( - 43 AS INTEGER ) FROM tab0 AS cor0
----
-43

query I rowsort
SELECT ALL + - ( col1 ) + cor0.col0 * col2 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT ALL + + 11 + 66 AS col2 FROM tab0 AS cor0
----
77
77
77

query I rowsort
SELECT DISTINCT - 39 AS col0 FROM tab0 AS cor0
----
-39

query I rowsort
SELECT 99 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

query I rowsort
SELECT DISTINCT + col2 - tab0.col0 AS col0 FROM tab0
----
-34
-7
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6966
SELECT + col1 * + col1 + col1 * + tab2.col0 * - CAST( 77 * - col0 AS SIGNED ) FROM tab2
----
117924
27643093
8169758

skipif mysql # not compatible
query I rowsort label-6966
SELECT + col1 * + col1 + col1 * + tab2.col0 * - CAST ( 77 * - col0 AS INTEGER ) FROM tab2
----
117924
27643093
8169758

query I rowsort
SELECT + - col0 * 15 AS col1 FROM tab2 AS cor0
----
-105
-1170
-1185

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6968
SELECT ALL - col2 * col2 + col1 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6968
SELECT ALL - col2 * col2 + col1 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 16 + + col2 AS col2 FROM tab0 AS cor0
----
17
49
98

query I rowsort
SELECT ALL col0 * col1 * col0 FROM tab2 AS cor0
----
106097
1519
358956

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6971
SELECT DISTINCT CAST( ( col2 ) AS SIGNED ) + + col0 + 35 FROM tab0 AS cor0
----
206
71
92

skipif mysql # not compatible
query I rowsort label-6971
SELECT DISTINCT CAST ( ( col2 ) AS INTEGER ) + + col0 + 35 FROM tab0 AS cor0
----
206
71
92

query I rowsort
SELECT 73 * 54 + col2 - + 71 * cor0.col1 AS col0 FROM tab2 AS cor0
----
-221
1768
2773

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6973
SELECT - CAST( NULL AS SIGNED ) * 85 + col1 * - col2 + col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6973
SELECT - CAST ( NULL AS INTEGER ) * 85 + col1 * - col2 + col2 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6974
SELECT - cor0.col1 + - col0 * - col0 + 50 DIV - col2 FROM tab0 AS cor0
----
1078
489
7830

skipif mysql # not compatible
query I rowsort label-6974
SELECT - cor0.col1 + - col0 * - col0 + 50 / - col2 FROM tab0 AS cor0
----
1078
489
7830

onlyif mysql # use DIV operator for integer division
query I rowsort label-6975
SELECT col1 DIV - 79 col0 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6975
SELECT col1 / - 79 col0 FROM tab1
----
0
0
0

query I rowsort
SELECT col2 * - col2 * - col2 FROM tab2
----
17576
19683
54872

query I rowsort
SELECT col0 * 91 - col0 FROM tab2 AS cor0
----
630
7020
7110

onlyif mysql # use DIV operator for integer division
query I rowsort label-6978
SELECT ALL ( col2 ) DIV - col1 + + 60 * - 91 + + col0 AS col1 FROM tab1 AS cor0
----
-5387
-5401
-5459

skipif mysql # not compatible
query I rowsort label-6978
SELECT ALL ( col2 ) / - col1 + + 60 * - 91 + + col0 AS col1 FROM tab1 AS cor0
----
-5387
-5401
-5459

query I rowsort
SELECT DISTINCT - - col1 + col2 * - col0 AS col1 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT 80 * - col0 FROM tab1 AS cor0
----
-240
-5120
-6400

query I rowsort
SELECT + col0 * - col2 * ( + cor0.col2 ) AS col2 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT DISTINCT ( - col2 + + col2 ) AS col2 FROM tab2
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + + 10 col2 FROM tab1 AS cor0
----
13
74
90

query I rowsort
SELECT ALL + 7 AS col1 FROM tab0
----
7
7
7

query I rowsort
SELECT - col0 - col0 * col0 * 90 FROM tab0
----
-110285
-51864
-712979

query I rowsort
SELECT - + cor0.col0 * col0 AS col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT col2 * + 39 AS col2 FROM tab2 AS cor0
----
1014
1053
1482

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * + 51 + col2 col1 FROM tab2 AS cor0
----
-330
-3952
-3991

query I rowsort
SELECT DISTINCT - - col0 - + cor0.col0 AS col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT col1 + + col0 * + col1 AS col0 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT ALL - + col0 * - 63 AS col2 FROM tab2 AS cor0
----
441
4914
4977

query I rowsort
SELECT ALL tab1.col2 * + col1 + 9 FROM tab1
----
1257
1413
579

query I rowsort
SELECT - col2 * + col2 - - ( + tab2.col0 ) FROM tab2
----
-1365
-598
-722

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1, tab0 AS cor0 WHERE NULL = NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6995
SELECT - col1 + ( col2 ) DIV col2 AS col1 FROM tab0 cor0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-6995
SELECT - col1 + ( col2 ) / col2 AS col1 FROM tab0 cor0
----
-85
-90
-96

query I rowsort
SELECT cor0.col0 * - 2 AS col1 FROM tab2 AS cor0
----
-14
-156
-158

onlyif mysql # use DIV operator for integer division
query I rowsort label-6997
SELECT DISTINCT - - col1 DIV ( 91 ) - - col0 FROM tab0 AS cor0
----
24
36
90

skipif mysql # not compatible
query I rowsort label-6997
SELECT DISTINCT - - col1 / ( 91 ) - - col0 FROM tab0 AS cor0
----
24
36
90

query I rowsort
SELECT ALL col2 + 39 AS col2 FROM tab0 cor0
----
121
40
72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6999
SELECT CAST( 97 AS SIGNED ) * - col0 AS col0 FROM tab0 AS cor0
----
-2328
-3395
-8633

skipif mysql # not compatible
query I rowsort label-6999
SELECT CAST ( 97 AS INTEGER ) * - col0 AS col0 FROM tab0 AS cor0
----
-2328
-3395
-8633

query I rowsort
SELECT + col0 + 47 + col0 AS col1 FROM tab0 AS cor0
----
117
225
95

query I rowsort
SELECT DISTINCT - col0 + - tab0.col2 * col2 AS col2 FROM tab0
----
-1113
-36
-6813

query I rowsort
SELECT DISTINCT - col2 * 87 + + tab1.col2 AS col0 FROM tab1
----
-4644
-4902
-8256

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 49 * + col0 col0 FROM tab1 AS cor0
----
147
3136
3920

onlyif mysql # use DIV operator for integer division
query I rowsort label-7004
SELECT + 54 DIV - col0 FROM tab2 AS cor0
----
-7
0
0

skipif mysql # not compatible
query I rowsort label-7004
SELECT + 54 / - col0 FROM tab2 AS cor0
----
-7
0
0

query I rowsort
SELECT DISTINCT + ( + col1 ) + col2 AS col2 FROM tab1
----
109
67
80

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT + col2 * - col2 - + 71 AS col0 FROM tab0
----
-1160
-6795
-72

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - col0 + + col0 + - CAST ( - col2 AS REAL ) * - tab0.col0 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT + col0 + - col0 * ( + col0 ) FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT ALL col2 + + col1 + + 73 FROM tab2 cor0
----
128
131
158

query I rowsort
SELECT DISTINCT - + col2 * + col0 * ( col0 ) AS col2 FROM tab2 AS cor0
----
-1323
-158184
-237158

query I rowsort
SELECT col2 + col2 * - 88 * col0 + - col1 * col2 * 67 FROM tab1 AS cor0
----
-108270
-359157
-759360

onlyif mysql # use DIV operator for integer division
query I rowsort label-7013
SELECT + 45 DIV - cor0.col1 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7013
SELECT + 45 / - cor0.col1 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + ( col2 ) * col2 FROM tab0 AS cor0
----
1
1089
6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - cor0.col0 * - cor0.col1 col0 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT - - col2 * col2 + col1 * + 16 * + col2 FROM tab0 AS cor0
----
126116
1553
46497

query I rowsort
SELECT - - col2 - col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT 17 - + col0 AS col0 FROM tab2 AS cor0
----
-61
-62
10

query I rowsort
SELECT + 56 - col1 AS col1 FROM tab1 AS cor0
----
30
43
46

onlyif mysql # use DIV operator for integer division
query I rowsort label-7020
SELECT + tab2.col2 * + col0 DIV + tab2.col0 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-7020
SELECT + tab2.col2 * + col0 / + tab2.col0 FROM tab2
----
26
27
38

query I rowsort
SELECT ALL tab2.col0 + - col0 * col2 + - col1 FROM tab2
----
-2009
-213
-2940

query I rowsort
SELECT - + 70 * 59 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 137dbbe2053bb0b4c1cf460d5c2d15dc

query I rowsort
SELECT - 19 * - col1 AS col0 FROM tab1 AS cor0
----
190
247
494

query I rowsort
SELECT DISTINCT 33 AS col0 FROM tab1 AS cor0
----
33

query I rowsort
SELECT ALL + col1 * - cor0.col2 AS col2 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL + cor0.col2 + - ( 34 ) FROM tab2 AS cor0
----
-7
-8
4

query I rowsort
SELECT ALL - - col1 + col1 + - col2 * - cor0.col2 AS col0 FROM tab1 AS cor0
----
2968
3269
9242

query I rowsort
SELECT DISTINCT - col0 * - 5 + 20 AS col0 FROM tab0 AS cor0
----
140
195
465

query I rowsort
SELECT DISTINCT - - cor0.col1 * cor0.col1 - col2 FROM tab2 AS cor0
----
251
3455
934

onlyif mysql # use DIV operator for integer division
query I rowsort label-7030
SELECT DISTINCT - col0 * col0 + 59 + + col0 DIV col2 FROM tab1 cor0
----
-4036
-6341
50

skipif mysql # not compatible
query I rowsort label-7030
SELECT DISTINCT - col0 * col0 + 59 + + col0 / col2 FROM tab1 cor0
----
-4036
-6341
50

onlyif mysql # use DIV operator for integer division
query I rowsort label-7031
SELECT DISTINCT col2 DIV col1 + - col2 FROM tab0 cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-7031
SELECT DISTINCT col2 / col1 + - col2 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT - col2 * - col2 AS col1 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT - cor0.col1 AS col2 FROM tab1, tab0 cor0
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT ( + ( col0 ) ) + - 60 AS col1 FROM tab2 AS cor0
----
-53
18
19

query I rowsort
SELECT ALL + col2 + + col2 * - col0 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT ALL col0 * col2 * col0 FROM tab0 AS cor0
----
1225
19008
649522

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col2 col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT + + 13 * + ( col2 ) AS col2 FROM tab0 AS cor0
----
1066
13
429

query I rowsort
SELECT DISTINCT ( cor0.col0 ) + col1 + col2 AS col0 FROM tab1 AS cor0
----
131
189
83

query I rowsort
SELECT + - ( col2 ) * - col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + + 64 FROM tab0 cor0
----
64
64
64

query I rowsort
SELECT col0 * + 78 FROM tab2 AS cor0
----
546
6084
6162

query I rowsort
SELECT + 83 * cor0.col1 FROM tab2 AS cor0
----
1411
2573
4897

query I rowsort
SELECT + cor0.col2 + + col1 AS col0 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT - 49 AS col1 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to adfccb10c9468825d9961e3613140f89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + 40 + + cor0.col2 col2 FROM tab1 AS cor0
----
-2503
-3104
-66

query I rowsort
SELECT DISTINCT col1 + - 50 * + ( - col0 ) FROM tab2 AS cor0
----
381
3959
3967

query I rowsort
SELECT DISTINCT + col0 + 43 AS col1 FROM tab1 AS cor0
----
107
123
46

onlyif mysql # use DIV operator for integer division
query I rowsort label-7049
SELECT + col1 + + col1 DIV 68 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-7049
SELECT + col1 + + col1 / 68 FROM tab2
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * 21 col2 FROM tab2 cor0
----
-147
-1638
-1659

query I rowsort
SELECT col1 * ( - col2 ) + + col0 AS col2 FROM tab2
----
-1456
-567
-830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col2 + + col0 col0 FROM tab1
----
121
176
57

query I rowsort
SELECT ALL - col1 * 2 FROM tab2
----
-118
-34
-62

query I rowsort
SELECT ALL tab1.col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT DISTINCT - col0 FROM tab0 WHERE NOT col1 + col2 = + col0 + col0
----
-24
-35
-89

query III rowsort
SELECT * FROM tab2 AS cor0 WHERE NULL >= col2
----

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NOT NULL NOT IN ( cor0.col1 )
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE ( - col1 ) NOT BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT DISTINCT col1 + col2 * - col1 FROM tab2
----
-1475
-629
-806

query I rowsort
SELECT col1 + - col1 * col2 * - col2 FROM tab2
----
22630
24565
39943

query I rowsort
SELECT col0 FROM tab1 WHERE NOT ( col1 ) < - col0 + - col1 * col1 * col0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col0 + - col1 col1 FROM tab1
----
-23
54
67

query I rowsort
SELECT ALL col0 * + col1 + - col0 FROM tab2
----
1264
210
4524

query I rowsort
SELECT ALL col1 AS col1 FROM tab0 WHERE + col2 NOT BETWEEN NULL AND NULL
----

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL NOT IN ( col0 + col1 - col2 )
----

query I rowsort
SELECT ALL - cor0.col1 AS col2 FROM tab0 AS cor0 WHERE NULL <> ( col0 + col2 * + col1 )
----

query III rowsort
SELECT * FROM tab2 AS cor0 WHERE NULL IN ( + col2 )
----

query I rowsort
SELECT col0 + + tab1.col2 + - col2 FROM tab1
----
3
64
80

query I rowsort
SELECT ALL col0 * - col1 * col2 + - tab2.col0 * + col2 + - col2 * + col1 AS col0 FROM tab2
----
-123214
-54682
-6885

query I rowsort
SELECT - tab0.col1 * + tab0.col2 AS col2 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT col1 * col0 + + cor0.col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT - col0 + + cor0.col1 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT - cor0.col1 FROM tab0, tab2 cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT col0 + col2 * + col2 FROM tab1 AS cor0
----
2919
3313
9296

onlyif mysql # use DIV operator for integer division
query I rowsort label-7075
SELECT - col1 + col1 DIV + col0 FROM tab0 AS cor0
----
-83
-90
-95

skipif mysql # not compatible
query I rowsort label-7075
SELECT - col1 + col1 / + col0 FROM tab0 AS cor0
----
-83
-90
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-7076
SELECT cor0.col2 DIV + col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7076
SELECT cor0.col2 / + col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7077
SELECT ALL col1 DIV col0 FROM tab0 cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-7077
SELECT ALL col1 / col0 FROM tab0 cor0
----
1
2
3

query I rowsort
SELECT DISTINCT - cor0.col2 * + col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT + + col0 * + col0 + - col1 AS col0 FROM tab1 AS cor0
----
-17
4086
6387

query I rowsort
SELECT ALL col1 * cor0.col2 + - 69 FROM tab2 AS cor0
----
1465
577
768

query I rowsort
SELECT DISTINCT + + col1 * col1 + col2 * + col1 AS col2 FROM tab1 AS cor0
----
1417
2080
670

query I rowsort
SELECT ALL cor0.col0 * - col2 + - 24 * 41 AS col0 FROM tab0 AS cor0
----
-1019
-1776
-8282

query I rowsort
SELECT ALL + 59 * - cor0.col2 FROM tab2 AS cor0
----
-1534
-1593
-2242

query I rowsort
SELECT DISTINCT + cor0.col0 - + col0 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL cor0.col1 * col1 AS col2 FROM tab1 cor0
----
100
169
676

query I rowsort
SELECT 4 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 730dff78e83112374961ea711f98ebaa

onlyif mysql # use DIV operator for integer division
query I rowsort label-7087
SELECT ALL - + ( + col1 ) DIV + col1 + + 81 FROM tab2 AS cor0
----
80
80
80

skipif mysql # not compatible
query I rowsort label-7087
SELECT ALL - + ( + col1 ) / + col1 + + 81 FROM tab2 AS cor0
----
80
80
80

query I rowsort
SELECT DISTINCT 27 - col1 FROM tab2 AS cor0
----
-32
-4
10

onlyif mysql # use DIV operator for integer division
query I rowsort label-7089
SELECT - col0 DIV 57 FROM tab2 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-7089
SELECT - col0 / 57 FROM tab2 AS cor0
----
-1
-1
0

query I rowsort
SELECT ALL col1 * + cor0.col1 AS col0 FROM tab0 AS cor0
----
7396
8281
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-7091
SELECT DISTINCT + + col0 DIV ( - col2 ) FROM tab0 AS cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-7091
SELECT DISTINCT + + col0 / ( - col2 ) FROM tab0 AS cor0
----
-1
-35
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * + ( + col1 ) + col1 col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT ALL - col0 * - col0 AS col2 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT ALL - + col2 * + ( + col0 ) FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + col0 * - cor0.col2 + col2 AS col2 FROM tab2 cor0
----
-162
-2002
-2964

query I rowsort
SELECT + col2 * - cor0.col1 + + col0 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT DISTINCT cor0.col2 * + col1 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT col0 + + col2 AS col1 FROM tab1
----
121
176
57

query I rowsort
SELECT ALL 18 * col1 + - 70 AS col0 FROM tab2
----
236
488
992

query I rowsort
SELECT ALL col1 + - col2 * ( ( tab0.col0 ) ) FROM tab0
----
-706
-7207
62

query I rowsort
SELECT DISTINCT - 32 + col1 AS col2 FROM tab1
----
-19
-22
-6

query I rowsort
SELECT ALL + tab0.col2 * col1 + - col2 FROM tab0
----
2805
7380
96

query I rowsort
SELECT DISTINCT + col1 * col1 + col1 FROM tab2
----
306
3540
992

query I rowsort
SELECT + col1 + - col2 AS col2 FROM tab0
----
53
9
96

query I rowsort
SELECT + col2 * col0 + col0 AS col2 FROM tab1
----
165
3712
7760

query I rowsort
SELECT col2 * col1 + col0 AS col1 FROM tab0
----
132
2862
7551

query I rowsort
SELECT DISTINCT col0 * + tab2.col2 AS col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT ALL + col1 * col2 + - col2 * + col0 AS col0 FROM tab1
----
-3078
-6432
1242

query I rowsort
SELECT col2 - col2 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL + col0 + + col1 * + col1 FROM tab1
----
164
249
679

query I rowsort
SELECT col0 - tab1.col1 * - tab1.col2 * + col1 AS col1 FROM tab1
----
16304
36507
5764

onlyif mysql # use DIV operator for integer division
query I rowsort label-7112
SELECT ALL - col0 DIV + col1 col2 FROM tab2
----
-1
-4
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7112
SELECT ALL - col0 / + col1 col2 FROM tab2
----
-1
-4
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7113
SELECT col1 DIV col2 + - col1 * col2 + tab0.col2 FROM tab0
----
-2803
-7379
1

skipif mysql # not compatible
query I rowsort label-7113
SELECT col1 / col2 + - col1 * col2 + tab0.col2 FROM tab0
----
-2803
-7379
1

query I rowsort
SELECT DISTINCT + col2 + - col1 + col0 FROM tab2
----
100
3
45

query I rowsort
SELECT - col0 * tab2.col1 - col2 FROM tab2
----
-1381
-244
-4628

query I rowsort
SELECT ALL col2 - - col2 * + col2 / tab1.col0 AS col1 FROM tab1 WHERE NOT NULL BETWEEN NULL AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 col1 FROM tab2 WHERE NOT - col2 - col0 <= tab2.col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7118
SELECT DISTINCT - col1 DIV + tab1.col2 AS col1 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-7118
SELECT DISTINCT - col1 / + tab1.col2 AS col1 FROM tab1
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7119
SELECT DISTINCT - col1 * + col0 + + col1 DIV - col2 + col2 FROM tab0
----
-2033
-3491
-8018

skipif mysql # not compatible
query I rowsort label-7119
SELECT DISTINCT - col1 * + col0 + + col1 / - col2 + col2 FROM tab0
----
-2033
-3491
-8018

query I rowsort
SELECT col2 * col0 + col2 * col2 FROM tab2
----
2704
4446
918

query I rowsort
SELECT + col1 * col0 + - col2 * + col2 AS col2 FROM tab1
----
-2609
-2838
-8176

query I rowsort
SELECT DISTINCT + col1 * - col2 * + col1 AS col1 FROM tab1
----
-16224
-36504
-5700

onlyif mysql # use DIV operator for integer division
query I rowsort label-7123
SELECT + tab1.col2 DIV - col1 FROM tab1
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-7123
SELECT + tab1.col2 / - col1 FROM tab1
----
-2
-5
-7

query I rowsort
SELECT ALL - col2 + col1 + - col1 AS col0 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT + col2 * + tab0.col2 + col1 + - tab0.col2 AS col1 FROM tab0
----
1142
6733
97

query I rowsort
SELECT col1 + + col2 FROM tab1 WHERE NOT + col0 + col1 BETWEEN ( NULL ) AND ( - col2 + col2 )
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * + col0 * + col0 col0 FROM tab1
----
-234
-40960
-83200

query I rowsort
SELECT DISTINCT - - col0 + col2 + - col1 FROM tab0 AS cor0
----
-29
-61
80

query I rowsort
SELECT ALL - col1 - 45 FROM tab2 AS cor0
----
-104
-62
-76

query I rowsort
SELECT - col1 + + col2 * + 44 FROM tab1 cor0
----
2350
2498
4211

query I rowsort
SELECT - col1 * + ( col2 ) AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 * - col1 + 20 * - col2 + cor0.col0 col1 FROM tab1 AS cor0
----
-1155
-1716
-2880

query I rowsort
SELECT DISTINCT + col2 * cor0.col1 - - col1 AS col1 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT ALL - col2 * 74 AS col0 FROM tab1 AS cor0
----
-3996
-4218
-7104

query I rowsort
SELECT + cor0.col1 + - 80 AS col0 FROM tab1 cor0
----
-54
-67
-70

query I rowsort
SELECT DISTINCT - 44 FROM tab1, tab0, tab0 AS cor0
----
-44

query I rowsort
SELECT tab2.col1 * + 96 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 49fba294aa3c5cff273a0c332a91d3dc

query I rowsort
SELECT col2 * - 69 + 58 FROM tab1 AS cor0
----
-3668
-3875
-6566

query I rowsort
SELECT DISTINCT - col2 + - 0 * ( + col1 * col2 ) FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT - - col2 + - col2 * col0 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT DISTINCT col1 * 5 AS col1 FROM tab1 AS cor0
----
130
50
65

query I rowsort
SELECT col1 + col0 * - col0 FROM tab1
----
-4086
-6387
17

onlyif mysql # use DIV operator for integer division
query I rowsort label-7143
SELECT - CAST( ( - cor0.col1 ) AS SIGNED ) DIV + 76 + 31 FROM tab0, tab2 cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

skipif mysql # not compatible
query I rowsort label-7143
SELECT - CAST ( ( - cor0.col1 ) AS INTEGER ) / + 76 + 31 FROM tab0, tab2 cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

query I rowsort
SELECT 84 * col1 AS col2 FROM tab0
----
7224
7644
8148

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 33 * col1 + col0 col2 FROM tab0
----
-2814
-2914
-3166

query I rowsort
SELECT ALL cor0.col2 * - col0 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT - col1 * - col0 * tab1.col0 FROM tab1
----
234
40960
83200

query I rowsort
SELECT DISTINCT 45 * + col2 AS col0 FROM tab2
----
1170
1215
1710

query I rowsort
SELECT + 94 + col2 AS col0 FROM tab1
----
148
151
190

query I rowsort
SELECT DISTINCT - 29 * - col0 FROM tab1 cor0
----
1856
2320
87

query I rowsort
SELECT + ( - col2 ) * + col0 * col0 FROM tab2 AS cor0
----
-1323
-158184
-237158

query I rowsort
SELECT ALL - tab2.col1 AS col2 FROM tab2, tab0 AS cor0, tab0 cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT - + col2 + col1 * ( col2 ) FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT ALL 4 AS col0 FROM tab1 AS cor0
----
4
4
4

query I rowsort
SELECT DISTINCT + - col1 + + col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT + - col2 * col0 + + 56 FROM tab2 AS cor0
----
-133
-1972
-2946

onlyif mysql # use DIV operator for integer division
query I rowsort label-7157
SELECT ALL - 14 DIV col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7157
SELECT ALL - 14 / col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7158
SELECT DISTINCT col1 * + cor0.col1 + 2 DIV 81 AS col0 FROM tab0 AS cor0
----
7396
8281
9409

skipif mysql # not compatible
query I rowsort label-7158
SELECT DISTINCT col1 * + cor0.col1 + 2 / 81 AS col0 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT + 40 * col0 + 53 FROM tab0 AS cor0
----
1013
1453
3613

query I rowsort
SELECT + ( col0 ) * col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT col1 * 14 FROM tab0 cor0
----
1204
1274
1358

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col0 * col0 col0 FROM tab0
----
1225
576
7921

query I rowsort
SELECT - cor0.col0 * 36 AS col0 FROM tab2 AS cor0
----
-252
-2808
-2844

query I rowsort
SELECT - col0 * - 50 FROM tab2
----
350
3900
3950

query I rowsort
SELECT ALL + + 98 + - cor0.col0 * - col0 FROM tab2 AS cor0
----
147
6182
6339

query I rowsort
SELECT + - col0 + - col2 * cor0.col0 AS col2 FROM tab1 AS cor0
----
-165
-3712
-7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-7167
SELECT ALL - ( + 59 ) + col2 DIV - col1 + - col2 AS col2 FROM tab1 AS cor0
----
-115
-121
-162

skipif mysql # not compatible
query I rowsort label-7167
SELECT ALL - ( + 59 ) + col2 / - col1 + - col2 AS col2 FROM tab1 AS cor0
----
-115
-121
-162

query I rowsort
SELECT ALL 28 AS col1 FROM tab0
----
28
28
28

query I rowsort
SELECT DISTINCT + 51 * + col0 - cor0.col2 AS col2 FROM tab2 AS cor0
----
330
3952
3991

query I rowsort
SELECT - + col1 * ( cor0.col0 ) - col1 FROM tab1 AS cor0
----
-104
-1053
-650

query I rowsort
SELECT ALL + + col0 * col2 + col0 * + 41 FROM tab2 cor0
----
476
5226
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 35 + col1 * col2 col1 FROM tab1 AS cor0
----
1213
1369
535

query I rowsort
SELECT col1 * col2 + col2 AS col1 FROM tab2 cor0
----
1560
684
864

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 65 * cor0.col2 * cor0.col1 + 43 col2 FROM tab2 AS cor0
----
-41947
-54362
-99667

query I rowsort
SELECT - 73 AS col1 FROM tab2 AS cor0
----
-73
-73
-73

query I rowsort
SELECT - cor0.col1 * col1 + - col2 * 71 FROM tab1 AS cor0
----
-4147
-4510
-6985

query I rowsort
SELECT - - col2 * col1 + - col0 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT - 57 FROM tab0 cor0
----
-57
-57
-57

query I rowsort
SELECT - 1 + col0 FROM tab1 AS cor0
----
2
63
79

query I rowsort
SELECT ALL + 13 FROM tab2, tab2 AS cor0
----
9 values hashing to 184e52d7aa5aa66591291e39c67a3dfb

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7181
SELECT ALL col0 * col2 * col0 + - CAST( - 44 AS SIGNED ) AS col1 FROM tab0
----
1269
19052
649566

skipif mysql # not compatible
query I rowsort label-7181
SELECT ALL col0 * col2 * col0 + - CAST ( - 44 AS INTEGER ) AS col1 FROM tab0
----
1269
19052
649566

query I rowsort
SELECT DISTINCT + - 87 * col0 + col1 FROM tab0 AS cor0
----
-2002
-2948
-7652

query I rowsort
SELECT - col2 + - 10 FROM tab1 AS cor0
----
-106
-64
-67

query I rowsort
SELECT DISTINCT + 8 FROM tab1 AS cor0
----
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-7185
SELECT 57 * 24 DIV tab0.col2 + - col2 FROM tab0
----
-66
1367
8

skipif mysql # not compatible
query I rowsort label-7185
SELECT 57 * 24 / tab0.col2 + - col2 FROM tab0
----
-66
1367
8

query I rowsort
SELECT DISTINCT 41 AS col0 FROM tab1, tab0 AS cor0
----
41

onlyif mysql # use DIV operator for integer division
query I rowsort label-7187
SELECT + ( + 60 ) DIV - col2 col2 FROM tab1 AS cor0
----
-1
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7187
SELECT + ( + 60 ) / - col2 col2 FROM tab1 AS cor0
----
-1
-1
0

query I rowsort
SELECT - 77 * - col1 * + col2 FROM tab0
----
218526
574574
7469

onlyif mysql # use DIV operator for integer division
query I rowsort label-7189
SELECT + tab1.col0 DIV 58 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 43a387ef4ba85927dc3d9d573afc12c9

skipif mysql # not compatible
query I rowsort label-7189
SELECT + tab1.col0 / 58 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 43a387ef4ba85927dc3d9d573afc12c9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7190
SELECT ALL col0 * col2 * CAST( NULL AS SIGNED ) AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7190
SELECT ALL col0 * col2 * CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 10 FROM tab0
----
10

query I rowsort
SELECT - - col0 * + col1 + 0 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-7193
SELECT 92 DIV col0 FROM tab2
----
1
1
13

skipif mysql # not compatible
query I rowsort label-7193
SELECT 92 / col0 FROM tab2
----
1
1
13

query I rowsort
SELECT ALL col2 * col1 * 74 AS col2 FROM tab1
----
103896
42180
92352

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7195
SELECT DISTINCT col2 - + col0 * - CAST( + col0 AS SIGNED ) AS col2 FROM tab1
----
4153
63
6496

skipif mysql # not compatible
query I rowsort label-7195
SELECT DISTINCT col2 - + col0 * - CAST ( + col0 AS INTEGER ) AS col2 FROM tab1
----
4153
63
6496

onlyif mysql # use DIV operator for integer division
query I rowsort label-7196
SELECT + col1 DIV - col1 AS col2 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7196
SELECT + col1 / - col1 AS col2 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab1, tab0, tab2 cor0
----
26
27
38

query I rowsort
SELECT ALL + tab2.col2 AS col0 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT - + col2 + - ( col0 ) AS col0 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT DISTINCT + col2 + + col1 + - col0 * tab2.col2 FROM tab2
----
-131
-1943
-2947

query I rowsort
SELECT + col0 * col0 + + col2 + - col0 AS col1 FROM tab1 AS cor0
----
4089
60
6416

query I rowsort
SELECT - col0 + - 84 FROM tab0 AS cor0
----
-108
-119
-173

onlyif mysql # use DIV operator for integer division
query I rowsort label-7203
SELECT col0 DIV CAST( - col0 AS SIGNED ) + col0 * - ( col0 ) * + col1 AS col0 FROM tab0
----
-118826
-49537
-720812

skipif mysql # not compatible
query I rowsort label-7203
SELECT col0 / CAST ( - col0 AS INTEGER ) + col0 * - ( col0 ) * + col1 AS col0 FROM tab0
----
-118826
-49537
-720812

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7204
SELECT col0 * CAST( NULL AS SIGNED ) - 13 / col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7204
SELECT col0 * CAST ( NULL AS INTEGER ) - 13 / col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 * + col1 + col0 AS col0 FROM tab1
----
1328
1407
634

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab1, tab1 cor1, tab1 AS cor2
----
972 values hashing to 635619591835474e6aa6acdff4ab166c

query I rowsort
SELECT + + col2 + col1 * + col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT DISTINCT - + col0 + - 46 AS col0 FROM tab0 AS cor0
----
-135
-70
-81

query I rowsort
SELECT ALL col0 + + 21 FROM tab1 AS cor0
----
101
24
85

query I rowsort
SELECT + col0 + col0 + col2 * cor0.col0 AS col0 FROM tab1 AS cor0
----
168
3776
7840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + ( - col2 ) col0 FROM tab0 AS cor0
----
-2838
-7462
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 + - col2 * - col0 * col1 + cor0.col1 col1 FROM tab0 AS cor0
----
3493
664291
68231

query I rowsort
SELECT ALL col2 * col2 + + col1 * col0 FROM tab1
----
10256
2994
3889

query I rowsort
SELECT ALL col0 + + 38 AS col1 FROM tab2
----
116
117
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * tab2.col0 + + ( tab2.col2 ) col1 FROM tab2
----
2054
216
3040

query I rowsort
SELECT + col0 - 70 AS col2 FROM tab2
----
-63
8
9

query I rowsort
SELECT + 95 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 14faa6dda52e3dfe1f5db2579c274a7e

query I rowsort
SELECT ALL - tab0.col2 * col2 + + col2 FROM tab0
----
-1056
-6642
0

query I rowsort
SELECT tab2.col2 + - col2 * col0 * - tab2.col1 FROM tab2
----
119678
51072
5886

query I rowsort
SELECT DISTINCT - + col1 * 12 + - 20 AS col1 FROM tab2 AS cor0
----
-224
-392
-728

query I rowsort
SELECT col2 * - col1 * - col1 + col2 FROM tab1 AS cor0
----
16320
36558
5757

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7222
SELECT ALL + col0 + CAST( NULL AS SIGNED ) / + col0 AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7222
SELECT ALL + col0 + CAST ( NULL AS INTEGER ) / + col0 AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col2 + ( col0 + col2 ) AS col0 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-7224
SELECT DISTINCT col0 + 75 DIV cor0.col0 AS col0 FROM tab0 AS cor0
----
27
37
89

skipif mysql # not compatible
query I rowsort label-7224
SELECT DISTINCT col0 + 75 / cor0.col0 AS col0 FROM tab0 AS cor0
----
27
37
89

query I rowsort
SELECT ALL col2 * + col1 + 28 + col0 FROM tab2 AS cor0
----
1640
753
872

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * - ( 85 ) col2 FROM tab2 cor0
----
-2210
-2295
-3230

query I rowsort
SELECT + col0 + col0 * - col1 AS col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * + ( col2 ) col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL ( col1 ) AS col0 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT ALL + col1 * cor0.col2 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT col2 + ( + cor0.col0 * col0 ) + col1 AS col0 FROM tab0 cor0
----
1323
695
8094

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7233
SELECT ALL CAST( cor0.col1 AS SIGNED ) + col2 * + col0 AS col0 FROM tab2 cor0
----
2087
220
3019

skipif mysql # not compatible
query I rowsort label-7233
SELECT ALL CAST ( cor0.col1 AS INTEGER ) + col2 * + col0 AS col0 FROM tab2 cor0
----
2087
220
3019

query I rowsort
SELECT - ( 9 ) AS col1 FROM tab0 AS cor0
----
-9
-9
-9

query I rowsort
SELECT + 70 AS col1 FROM tab0 AS cor0
----
70
70
70

query I rowsort
SELECT ALL - cor0.col1 + + ( - col1 ) AS col1 FROM tab2 cor0
----
-118
-34
-62

query I rowsort
SELECT + + col0 + + ( cor0.col2 ) FROM tab0 AS cor0
----
171
36
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7238
SELECT DISTINCT - CAST( + 55 AS SIGNED ) + + cor0.col0 FROM tab1 AS cor0
----
-52
25
9

skipif mysql # not compatible
query I rowsort label-7238
SELECT DISTINCT - CAST ( + 55 AS INTEGER ) + + cor0.col0 FROM tab1 AS cor0
----
-52
25
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-7239
SELECT ALL + CAST( - col0 AS SIGNED ) DIV + col2 AS col2 FROM tab0 AS cor0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-7239
SELECT ALL + CAST ( - col0 AS INTEGER ) / + col2 AS col2 FROM tab0 AS cor0
----
-1
-35
0

query I rowsort
SELECT DISTINCT + col1 + 5 FROM tab1 AS cor0
----
15
18
31

query I rowsort
SELECT + + 31 * ( + col1 ) + col1 FROM tab0 AS cor0
----
2752
2912
3104

query I rowsort
SELECT col1 + - ( col2 * col1 ) FROM tab2
----
-1475
-629
-806

query I rowsort
SELECT DISTINCT - col0 - col2 FROM tab2
----
-104
-117
-34

query I rowsort
SELECT ALL - col2 - + 66 * 29 AS col0 FROM tab1
----
-1968
-1971
-2010

query I rowsort
SELECT + 37 * col0 + col0 - 61 FROM tab2 AS cor0
----
205
2903
2941

query I rowsort
SELECT DISTINCT - + col1 + col2 * - col0 FROM tab2 AS cor0
----
-2087
-220
-3019

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - col2 col1 FROM tab0 AS cor0
----
-1
-1089
-6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-7248
SELECT DISTINCT - cor0.col2 + + 97 DIV col1 + col0 * + col2 col0 FROM tab1 AS cor0
----
111
3600
7591

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7248
SELECT DISTINCT - cor0.col2 + + 97 / col1 + col0 * + col2 col0 FROM tab1 AS cor0
----
111
3600
7591

query I rowsort
SELECT + + 68 AS col1 FROM tab1 cor0
----
68
68
68

query I rowsort
SELECT ALL - 20 + + col2 * col0 * + col2 AS col1 FROM tab1 AS cor0
----
207916
737260
8728

query I rowsort
SELECT DISTINCT - col0 * col0 - + col0 AS col2 FROM tab1 cor0
----
-12
-4160
-6480

query I rowsort
SELECT ALL 86 + col2 * 46 FROM tab2 AS cor0
----
1282
1328
1834

query I rowsort
SELECT DISTINCT + 29 AS col0 FROM tab2 AS cor0
----
29

query I rowsort
SELECT col2 + col2 * - 18 AS col0 FROM tab1 AS cor0
----
-1632
-918
-969

query I rowsort
SELECT ALL - 39 * - col0 AS col1 FROM tab0
----
1365
3471
936

query I rowsort
SELECT DISTINCT 38 * col0 AS col2 FROM tab0
----
1330
3382
912

query I rowsort
SELECT ALL + - col1 * + col1 * - cor0.col0 + cor0.col1 AS col0 FROM tab1 AS cor0
----
13533
2054
6410

query I rowsort
SELECT DISTINCT - 62 - col2 AS col0 FROM tab1 cor0
----
-116
-119
-158

query I rowsort
SELECT DISTINCT ( - col0 ) + 42 * - col1 AS col1 FROM tab2 cor0
----
-1309
-2556
-793

query I rowsort
SELECT ALL + col2 - col0 AS col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT - col2 * col2 * + col2 + 55 + + col0 FROM tab0 AS cor0
----
-35858
-551224
89

query I rowsort
SELECT ALL + + ( col2 ) * - 48 * 4 AS col2 FROM tab0 AS cor0
----
-15744
-192
-6336

query I rowsort
SELECT ALL - col1 * col0 + - col0 AS col1 FROM tab1 AS cor0
----
-1120
-704
-81

query I rowsort
SELECT - + cor0.col2 + - col0 - - cor0.col0 AS col1 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT col0 + + col2 * + cor0.col2 * + cor0.col2 FROM tab0 AS cor0
----
35961
36
551457

query I rowsort
SELECT ALL + cor0.col2 * + col2 + col0 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT cor0.col0 * col0 * 22 + - cor0.col1 FROM tab1 cor0
----
140787
172
90102

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7268
SELECT - col2 * + col2 - CAST( NULL AS SIGNED ) AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7268
SELECT - col2 * + col2 - CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( col1 AS REAL ) + col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT ( + 22 ) FROM tab1
----
22

query I rowsort
SELECT ALL - col0 * - col2 * col2 FROM tab2
----
114076
5103
52728

onlyif mysql # use DIV operator for integer division
query I rowsort label-7272
SELECT 24 * 85 + col1 DIV + col1 col2 FROM tab0 AS cor0
----
2041
2041
2041

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7272
SELECT 24 * 85 + col1 / + col1 col2 FROM tab0 AS cor0
----
2041
2041
2041

query I rowsort
SELECT ALL + - cor0.col1 + cor0.col1 AS col1 FROM tab0, tab0 cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT - 62 AS col0 FROM tab2 cor0
----
-62
-62
-62

query I rowsort
SELECT col2 * - col2 * + col1 FROM tab2 AS cor0
----
-22599
-24548
-39884

onlyif mysql # use DIV operator for integer division
query I rowsort label-7276
SELECT - + 21 DIV col0 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7276
SELECT - + 21 / col0 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col2 + cor0.col1 + 64 FROM tab1 AS cor0
----
131
144
173

query I rowsort
SELECT DISTINCT + 6 FROM tab1, tab0 AS cor0
----
6

query I rowsort
SELECT DISTINCT ( col2 + col1 * - 98 ) FROM tab2
----
-1628
-3011
-5756

query I rowsort
SELECT DISTINCT - 78 AS col1 FROM tab2
----
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-7281
SELECT col2 * - tab0.col1 + - col2 DIV col2 FROM tab0
----
-2839
-7463
-98

skipif mysql # not compatible
query I rowsort label-7281
SELECT col2 * - tab0.col1 + - col2 / col2 FROM tab0
----
-2839
-7463
-98

query I rowsort
SELECT DISTINCT - col1 + ( 50 ) * cor0.col1 FROM tab0 AS cor0
----
4214
4459
4753

query I rowsort
SELECT ALL - cor0.col2 * - col0 + - 53 AS col0 FROM tab0 cor0
----
-18
7245
739

query I rowsort
SELECT + col0 * - ( + 43 ) + col0 FROM tab2 AS cor0
----
-294
-3276
-3318

query I rowsort
SELECT ALL + col0 + - 86 * - col2 FROM tab2 AS cor0
----
2314
2329
3347

onlyif mysql # use DIV operator for integer division
query I rowsort label-7286
SELECT ALL - col0 * 46 DIV - cor0.col2 + col1 AS col2 FROM tab0 cor0
----
119
140
1707

skipif mysql # not compatible
query I rowsort label-7286
SELECT ALL - col0 * 46 / - cor0.col2 + col1 AS col2 FROM tab0 cor0
----
119
140
1707

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7287
SELECT + col1 + + CAST( col1 + col0 AS SIGNED ) FROM tab2 AS cor0
----
113
196
69

skipif mysql # not compatible
query I rowsort label-7287
SELECT + col1 + + CAST ( col1 + col0 AS INTEGER ) FROM tab2 AS cor0
----
113
196
69

query I rowsort
SELECT DISTINCT + + col2 * col2 AS col1 FROM tab0 cor0
----
1
1089
6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-7289
SELECT DISTINCT - col0 + + col1 * + col1 DIV col1 FROM tab0 AS cor0
----
2
62

skipif mysql # not compatible
query I rowsort label-7289
SELECT DISTINCT - col0 + + col1 * + col1 / col1 FROM tab0 AS cor0
----
2
62

query I rowsort
SELECT + col1 + 35 AS col2 FROM tab0 AS cor0
----
121
126
132

query I rowsort
SELECT ALL cor0.col0 * + col1 AS col0 FROM tab2 AS cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * - col1 + col2 col2 FROM tab2 AS cor0
----
-1305
-190
-4576

onlyif mysql # use DIV operator for integer division
query I rowsort label-7293
SELECT - cor0.col2 + 69 DIV - 58 FROM tab0 AS cor0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-7293
SELECT - cor0.col2 + 69 / - 58 FROM tab0 AS cor0
----
-2
-34
-83

query I rowsort
SELECT - col1 * - tab0.col1 - tab0.col2 FROM tab0
----
7363
8199
9408

query I rowsort
SELECT + col2 + + col1 * ( - 91 * col2 ) FROM tab2
----
-139568
-58748
-76140

query I rowsort
SELECT DISTINCT col2 * col0 + col0 AS col0 FROM tab1
----
165
3712
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-7297
SELECT DISTINCT - + cor0.col1 DIV 56 AS col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-7297
SELECT DISTINCT - + cor0.col1 / 56 AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT + col1 * 97 AS col0 FROM tab0 AS cor0
----
8342
8827
9409

query I rowsort
SELECT - - cor0.col2 + + ( + 37 ) FROM tab2 AS cor0
----
63
64
75

query I rowsort
SELECT col2 + col1 * + col1 AS col1 FROM tab0 AS cor0
----
7429
8363
9410

onlyif mysql # use DIV operator for integer division
query I rowsort label-7301
SELECT col1 DIV - ( + ( tab0.col1 ) ) + + 85 * - 8 * col2 AS col2 FROM tab0
----
-22441
-55761
-681

skipif mysql # not compatible
query I rowsort label-7301
SELECT col1 / - ( + ( tab0.col1 ) ) + + 85 * - 8 * col2 AS col2 FROM tab0
----
-22441
-55761
-681

query I rowsort
SELECT col0 * - 17 FROM tab2
----
-119
-1326
-1343

query I rowsort
SELECT - - ( 54 ) * col2 + 78 FROM tab2 cor0
----
1482
1536
2130

query I rowsort
SELECT ( 63 ) + - col0 + - 24 AS col1 FROM tab1 AS cor0
----
-25
-41
36

query I rowsort
SELECT + + col1 * 42 FROM tab2 AS cor0
----
1302
2478
714

query I rowsort
SELECT col0 * - 94 * cor0.col1 + 56 AS col2 FROM tab0 AS cor0
----
-193960
-319074
-761250

query I rowsort
SELECT 49 - col1 * col0 * + ( + col1 * col2 + - 93 ) AS col0 FROM tab1 AS cor0
----
-102209
-1201151
-305231

query I rowsort
SELECT DISTINCT + col0 + + cor0.col2 * col1 AS col1 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT + + cor0.col2 + 56 AS col1 FROM tab0 AS cor0
----
138
57
89

query I rowsort
SELECT + col0 * - col1 + col2 AS col0 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT col0 - 31 AS col0 FROM tab2
----
-24
47
48

query I rowsort
SELECT - 48 AS col1 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 2558735eaa258a08592aef9d33020c18

onlyif mysql # use DIV operator for integer division
query I rowsort label-7313
SELECT - - col2 DIV - col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7313
SELECT - - col2 / - col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + 97 * + col1 + col0 + col2 AS col2 FROM tab2 AS cor0
----
1766
3041
5827

query I rowsort
SELECT DISTINCT - tab0.col1 * col0 AS col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT + col2 + col2 - + col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT + col1 * + col1 + + 81 AS col2 FROM tab0 AS cor0
----
7477
8362
9490

query I rowsort
SELECT + col2 + - col1 - + 64 FROM tab0 AS cor0
----
-117
-160
-73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7319
SELECT - + col0 * - 78 * col1 + + col1 * CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7319
SELECT - + col0 * - 78 * col1 + + col1 * CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 * - tab0.col1 + tab0.col1 + col0 FROM tab0
----
229
2948
7642

query I rowsort
SELECT - + col1 * + cor0.col0 + col0 * col0 * + cor0.col0 FROM tab0 AS cor0
----
11760
39480
696870

query I rowsort
SELECT ALL + 88 * - cor0.col0 + 3 AS col2 FROM tab0 AS cor0
----
-2109
-3077
-7829

onlyif mysql # use DIV operator for integer division
query I rowsort label-7323
SELECT + col1 DIV + col2 + - col0 * + col1 FROM tab1 AS cor0
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-7323
SELECT + col1 / + col2 + - col0 * + col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + + 99 AS col2 FROM tab0 cor0
----
99
99
99

query I rowsort
SELECT ALL - ( col1 ) * col1 + + col2 + + col2 AS col0 FROM tab2 AS cor0
----
-213
-3429
-907

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 60 col1 FROM tab2 AS cor0
----
60

query I rowsort
SELECT + - col1 + - col1 * 5 FROM tab2 AS cor0
----
-102
-186
-354

query I rowsort
SELECT + 53 - + cor0.col1 FROM tab0 AS cor0
----
-33
-38
-44

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7329
SELECT DISTINCT + 20 + col0 + CAST( - ( - col0 ) AS SIGNED ) AS col2 FROM tab0 AS cor0
----
198
68
90

skipif mysql # not compatible
query I rowsort label-7329
SELECT DISTINCT + 20 + col0 + CAST ( - ( - col0 ) AS INTEGER ) AS col2 FROM tab0 AS cor0
----
198
68
90

query I rowsort
SELECT - - col2 + col2 * 6 AS col2 FROM tab1 AS cor0
----
378
399
672

query I rowsort
SELECT DISTINCT + cor0.col2 + col2 + col0 AS col1 FROM tab0 AS cor0
----
253
37
90

query I rowsort
SELECT + - col2 + + ( 36 ) AS col2 FROM tab1 AS cor0
----
-18
-21
-60

query I rowsort
SELECT 22 AS col0 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 7dda382e7c08428abac8600fd696eb3e

onlyif mysql # use DIV operator for integer division
query I rowsort label-7334
SELECT - col1 + cor0.col0 DIV col2 AS col2 FROM tab1 AS cor0
----
-13
-26
-9

skipif mysql # not compatible
query I rowsort label-7334
SELECT - col1 + cor0.col0 / col2 AS col2 FROM tab1 AS cor0
----
-13
-26
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-7335
SELECT DISTINCT col1 DIV - col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-7335
SELECT DISTINCT col1 / - col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL - cor0.col0 * + 12 AS col1 FROM tab1 AS cor0
----
-36
-768
-960

query I rowsort
SELECT DISTINCT col1 + 72 AS col1 FROM tab0 cor0
----
158
163
169

onlyif mysql # use DIV operator for integer division
query I rowsort label-7338
SELECT ALL - col0 + - col2 DIV ( + cor0.col2 ) FROM tab0 AS cor0
----
-25
-36
-90

skipif mysql # not compatible
query I rowsort label-7338
SELECT ALL - col0 + - col2 / ( + cor0.col2 ) FROM tab0 AS cor0
----
-25
-36
-90

query I rowsort
SELECT + 26 AS col2 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to ede8226bb7e602e221f9d98345b4da37

query I rowsort
SELECT ALL - 16 + col2 AS col1 FROM tab2 AS cor0
----
10
11
22

query I rowsort
SELECT DISTINCT - cor1.col0 AS col2 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
-3
-64
-80

query I rowsort
SELECT + 19 + - ( col2 ) FROM tab1 AS cor0
----
-35
-38
-77

query I rowsort
SELECT DISTINCT - col0 + 2 FROM tab2 AS cor0
----
-5
-76
-77

query I rowsort
SELECT DISTINCT col0 * - 52 * col1 - - 62 * col0 * + col1 AS col0 FROM tab1 cor0
----
10400
6400
780

query I rowsort
SELECT DISTINCT - cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
-86
-91
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7346
SELECT DISTINCT + + CAST( + cor0.col2 AS SIGNED ) AS col0 FROM tab0, tab1, tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-7346
SELECT DISTINCT + + CAST ( + cor0.col2 AS INTEGER ) AS col0 FROM tab0, tab1, tab2 AS cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 12 * + col0 + col1 * 36 - col0 col1 FROM tab0
----
2119
2784
3037

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 30 col2 FROM tab0 AS cor0
----
30

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7349
SELECT ALL - CAST( NULL AS SIGNED ) + 58 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-7349
SELECT ALL - CAST ( NULL AS INTEGER ) + 58 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT 69 * - 70 * tab2.col1 AS col2 FROM tab2
----
-149730
-284970
-82110

query I rowsort
SELECT DISTINCT tab0.col2 AS col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-7352
SELECT col1 DIV 59 FROM tab2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7352
SELECT col1 / 59 FROM tab2
----
0
0
1

query I rowsort
SELECT DISTINCT - 51 AS col1 FROM tab2
----
-51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * - cor0.col0 col2 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-7355
SELECT - col0 * - col2 DIV col2 - - 78 * - col2 FROM tab0
----
-2550
-43
-6307

skipif mysql # not compatible
query I rowsort label-7355
SELECT - col0 * - col2 / col2 - - 78 * - col2 FROM tab0
----
-2550
-43
-6307

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0, tab1 cor1, tab1, tab1 AS cor2
----
3645 values hashing to 2c9bc625661696fa1cf187c4d0f703a1

query I rowsort
SELECT - 17 * + col1 FROM tab1 AS cor0
----
-170
-221
-442

query I rowsort
SELECT DISTINCT ( col1 ) * 70 - - col1 FROM tab0 cor0
----
6106
6461
6887

onlyif mysql # use DIV operator for integer division
query I rowsort label-7359
SELECT col2 + + col0 * CAST( col2 AS SIGNED ) + + col0 DIV - col0 FROM tab2
----
2053
215
3039

skipif mysql # not compatible
query I rowsort label-7359
SELECT col2 + + col0 * CAST ( col2 AS INTEGER ) + + col0 / - col0 FROM tab2
----
2053
215
3039

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7360
SELECT DISTINCT + 61 + tab2.col0 * CAST( 34 AS SIGNED ) FROM tab2
----
2713
2747
299

skipif mysql # not compatible
query I rowsort label-7360
SELECT DISTINCT + 61 + tab2.col0 * CAST ( 34 AS INTEGER ) FROM tab2
----
2713
2747
299

query I rowsort
SELECT ALL - col0 + + col0 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT 25 * - col1 + ( 9 ) + - col2 * col2 AS col0 FROM tab0
----
-2417
-3230
-8990

query I rowsort
SELECT 83 * + col1 * - col2 FROM tab0 AS cor0
----
-235554
-619346
-8051

query I rowsort
SELECT - - cor0.col0 + col2 * col0 * col1 AS col1 FROM tab2 AS cor0
----
119730
51113
5866

query I rowsort
SELECT DISTINCT - + cor0.col2 * col0 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT - - ( col0 ) + + ( col0 ) * col1 AS col1 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT ALL - col1 + - col0 * - 26 FROM tab1
----
1654
2067
52

query I rowsort
SELECT ALL + col1 * col0 + col2 * col1 AS col0 FROM tab0 cor0
----
15561
3492
4902

query I rowsort
SELECT ALL cor0.col0 * col0 + 71 AS col1 FROM tab2 AS cor0
----
120
6155
6312

query I rowsort
SELECT col2 + - ( + col1 + col2 ) AS col1 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT ALL col2 + 66 * ( + col0 ) FROM tab0
----
1617
2311
5956

query I rowsort
SELECT - + col0 + - cor0.col1 FROM tab1 cor0
----
-29
-74
-93

query I rowsort
SELECT ALL - col0 + - ( col1 ) FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT col1 + + col2 * col2 * + col1 FROM tab1
----
119821
32500
75842

query I rowsort
SELECT ( - col2 ) * + col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7376
SELECT DISTINCT - + CAST( - col1 AS SIGNED ) * col1 * 31 AS col2 FROM tab0 AS cor0
----
229276
256711
291679

skipif mysql # not compatible
query I rowsort label-7376
SELECT DISTINCT - + CAST ( - col1 AS INTEGER ) * col1 * 31 AS col2 FROM tab0 AS cor0
----
229276
256711
291679

query I rowsort
SELECT DISTINCT + 83 - col0 AS col0 FROM tab2 AS cor0
----
4
5
76

query I rowsort
SELECT - - 37 * - 74 AS col1 FROM tab2 cor0
----
-2738
-2738
-2738

query I rowsort
SELECT DISTINCT 31 * + col2 AS col1 FROM tab1 AS cor0
----
1674
1767
2976

query I rowsort
SELECT + 17 * 57 FROM tab1 AS cor0
----
969
969
969

query I rowsort
SELECT - tab0.col1 AS col1 FROM tab2, tab2 AS cor0 CROSS JOIN tab0
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT ALL + ( + ( col1 ) ) - col0 * col1 * - col0 FROM tab1 AS cor0
----
260
40970
83213

query I rowsort
SELECT DISTINCT + 82 + - col0 * col0 FROM tab1 cor0
----
-4014
-6318
73

query I rowsort
SELECT ALL + - 73 FROM tab2 cor0
----
-73
-73
-73

query I rowsort
SELECT ALL - col0 * 24 FROM tab0 AS cor0
----
-2136
-576
-840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 6 * - col2 col1 FROM tab1 AS cor0
----
-324
-342
-576

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7387
SELECT + CAST( cor0.col2 AS SIGNED ) * + col0 AS col2 FROM tab2 AS cor0
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-7387
SELECT + CAST ( cor0.col2 AS INTEGER ) * + col0 AS col2 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 12 col2 FROM tab1 cor0
----
12

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7389
SELECT ALL - CAST( + col1 AS SIGNED ) * - col2 FROM tab1 AS cor0
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-7389
SELECT ALL - CAST ( + col1 AS INTEGER ) * - col2 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7390
SELECT DISTINCT + CAST( + col2 AS SIGNED ) col0 FROM tab2 AS cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7390
SELECT DISTINCT + CAST ( + col2 AS INTEGER ) col0 FROM tab2 AS cor0
----
26
27
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7391
SELECT ALL - CAST( - col2 AS SIGNED ) * col2 AS col2 FROM tab0 AS cor0
----
1
1089
6724

skipif mysql # not compatible
query I rowsort label-7391
SELECT ALL - CAST ( - col2 AS INTEGER ) * col2 AS col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT ALL - - cor0.col2 + 58 * - col1 AS col0 FROM tab1 AS cor0
----
-1454
-523
-658

onlyif mysql # use DIV operator for integer division
query I rowsort label-7393
SELECT + col2 * + tab2.col0 + 21 DIV - 29 FROM tab2
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-7393
SELECT + col2 * + tab2.col0 + 21 / - 29 FROM tab2
----
189
2028
3002

query I rowsort
SELECT ALL 22 * col2 AS col0 FROM tab1
----
1188
1254
2112

query I rowsort
SELECT ALL ( + tab2.col2 * col0 ) + col1 FROM tab2
----
2087
220
3019

query I rowsort
SELECT DISTINCT + col2 + col0 + col1 AS col0 FROM tab2
----
134
163
65

query I rowsort
SELECT ALL + 62 * col2 + 33 AS col0 FROM tab2
----
1645
1707
2389

query I rowsort
SELECT ALL + + 23 + cor0.col2 FROM tab0, tab1, tab2 cor0
----
27 values hashing to e179f3cde54c0dafd807f66ba70fc22a

onlyif mysql # use DIV operator for integer division
query I rowsort label-7399
SELECT ALL + col0 + col0 DIV + col1 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-7399
SELECT ALL + col0 + col0 / + col1 FROM tab0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7400
SELECT DISTINCT - col0 + col0 * CAST( col0 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
1190
552
7832

skipif mysql # not compatible
query I rowsort label-7400
SELECT DISTINCT - col0 + col0 * CAST ( col0 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
1190
552
7832

query I rowsort
SELECT ALL + - col1 + + col2 + 80 * col0 * + cor0.col0 FROM tab0 AS cor0
----
46027
633671
97904

query I rowsort
SELECT + - col0 + - col2 AS col0 FROM tab2 cor0
----
-104
-117
-34

query I rowsort
SELECT ALL - cor0.col2 * col0 + cor0.col2 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT - tab2.col2 * tab2.col1 AS col1 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT + col0 * col0 * - col1 FROM tab0
----
-118825
-49536
-720811

query I rowsort
SELECT + col0 * col0 * + col1 AS col2 FROM tab0
----
118825
49536
720811

query I rowsort
SELECT - col1 + ( cor0.col2 ) FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT col2 * ( + col0 ) FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT cor0.col1 * 84 AS col1 FROM tab1 AS cor0
----
1092
2184
840

query I rowsort
SELECT ALL + col0 * col0 * col2 AS col1 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT + 60 AS col0 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 1d2ab302ae60f95b15e68cf89083b162

query I rowsort
SELECT ALL - col0 * cor0.col2 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT + - col2 + + ( - col1 * - col2 ) FROM tab2 AS cor0
----
1508
608
810

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 * col2 col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT - - col1 * 4 AS col0 FROM tab0 AS cor0
----
344
364
388

query I rowsort
SELECT + col1 + - col1 * - 22 + - col1 * col0 FROM tab1 AS cor0
----
-410
-741
520

query I rowsort
SELECT 89 * - 12 AS col1 FROM tab1
----
-1068
-1068
-1068

query I rowsort
SELECT DISTINCT + col1 + 74 + + col0 AS col2 FROM tab2
----
112
170
211

query I rowsort
SELECT ALL - + col1 * - 83 FROM tab0 AS cor0
----
7138
7553
8051

query I rowsort
SELECT ALL + col2 + + 2 AS col0 FROM tab0 AS cor0
----
3
35
84

query I rowsort
SELECT DISTINCT + col1 * - 15 * col2 FROM tab0 AS cor0
----
-111930
-1455
-42570

query I rowsort
SELECT DISTINCT col0 * + col1 + - col0 AS col0 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT - col0 * - col0 * + tab2.col1 FROM tab2
----
106097
1519
358956

query I rowsort
SELECT ALL + ( - col0 ) AS col0 FROM tab0 cor0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + col2 ) col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT + + 24 * cor0.col2 + - col0 AS col0 FROM tab2 AS cor0
----
546
641
833

query I rowsort
SELECT + 48 AS col2 FROM tab0 AS cor0
----
48
48
48

onlyif mysql # use DIV operator for integer division
query I rowsort label-7428
SELECT ALL ( col2 ) DIV + col1 + + 91 FROM tab0 AS cor0
----
91
91
91

skipif mysql # not compatible
query I rowsort label-7428
SELECT ALL ( col2 ) / + col1 + + 91 FROM tab0 AS cor0
----
91
91
91

query I rowsort
SELECT + 82 AS col1 FROM tab2 AS cor0
----
82
82
82

query I rowsort
SELECT DISTINCT - + 53 * col1 - + col1 FROM tab0 cor0
----
-4644
-4914
-5238

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7431
SELECT + - CAST( NULL AS SIGNED ) + cor0.col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7431
SELECT + - CAST ( NULL AS INTEGER ) + cor0.col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + ( + col0 ) + col2 * col0 * ( col0 ) AS col1 FROM tab0 AS cor0
----
1190
18984
649433

query I rowsort
SELECT DISTINCT + - cor0.col1 + + 67 * + col1 FROM tab0 AS cor0
----
5676
6006
6402

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7434
SELECT ALL ( - col0 ) * col0 * CAST( - cor0.col2 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
1323
158184
237158

skipif mysql # not compatible
query I rowsort label-7434
SELECT ALL ( - col0 ) * col0 * CAST ( - cor0.col2 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
1323
158184
237158

query I rowsort
SELECT DISTINCT + col1 * + 18 FROM tab2 AS cor0
----
1062
306
558

query I rowsort
SELECT DISTINCT - ( col2 ) + col0 FROM tab2 AS cor0
----
-20
41
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-7437
SELECT ALL + 33 * col0 + - col0 * + col0 DIV - cor0.col0 AS col2 FROM tab0 AS cor0
----
1190
3026
816

skipif mysql # not compatible
query I rowsort label-7437
SELECT ALL + 33 * col0 + - col0 * + col0 / - cor0.col0 AS col2 FROM tab0 AS cor0
----
1190
3026
816

query I rowsort
SELECT + ( - col0 ) AS col0 FROM tab2 cor0
----
-7
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-7439
SELECT 21 DIV + col0 - col1 FROM tab0 cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-7439
SELECT 21 / + col0 - col1 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT + 83 - + col0 FROM tab1 AS cor0
----
19
3
80

query I rowsort
SELECT ALL - col1 + - col2 * - col2 + col2 AS col0 FROM tab0 AS cor0
----
-95
1036
6715

query I rowsort
SELECT - + ( + col0 ) - + col2 AS col0 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT 10 FROM tab2, tab0 cor0, tab0 AS cor1
----
27 values hashing to 0fe3e45a9ecd49584c2ab442100d5176

query I rowsort
SELECT - ( col1 ) * + col0 + - col2 * - col1 AS col2 FROM tab1 AS cor0
----
-70
1326
208

query I rowsort
SELECT col2 + - cor0.col1 * col0 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT - ( - col0 ) * + col0 + + col2 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT + col2 * + col1 + col1 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT DISTINCT 94 * col2 * col1 - + col1 AS col2 FROM tab0
----
266686
701337
9021

query I rowsort
SELECT - + 90 * col1 * - col2 - col2 FROM tab0 AS cor0
----
255387
671498
8729

query I rowsort
SELECT + ( col0 ) + col1 AS col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT + 52 * cor0.col1 AS col0 FROM tab1 AS cor0
----
1352
520
676

query I rowsort
SELECT ALL + ( tab1.col1 ) * - col2 AS col0 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT 54 * col2 FROM tab1 AS cor0
----
2916
3078
5184

query I rowsort
SELECT + col2 * - col2 + + cor0.col0 AS col0 FROM tab2 AS cor0
----
-1365
-598
-722

query I rowsort
SELECT ALL + - col2 * - col1 + col1 + col2 * + col0 AS col2 FROM tab2 AS cor0
----
1057
3621
3665

query I rowsort
SELECT + cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT DISTINCT 1 FROM tab0, tab1 cor0
----
1

query I rowsort
SELECT DISTINCT + col2 * tab1.col2 AS col1 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT 36 * 70 + col2 * + ( - ( cor0.col0 ) + col1 ) FROM tab2 cor0
----
164
2026
3168

query I rowsort
SELECT DISTINCT + + ( - 8 ) FROM tab1 AS cor0
----
-8

query I rowsort
SELECT DISTINCT cor0.col2 + 67 AS col1 FROM tab0 AS cor0
----
100
149
68

query I rowsort
SELECT ALL + 77 + tab1.col2 + - tab1.col1 * 92 * - 77 FROM tab1
----
184315
70974
92265

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7463
SELECT ALL - CAST( - col1 AS SIGNED ) + col0 FROM tab2 AS cor0
----
137
38
96

skipif mysql # not compatible
query I rowsort label-7463
SELECT ALL - CAST ( - col1 AS INTEGER ) + col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT 6 + 63 FROM tab1 AS cor0
----
69
69
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - cor0.col0 * col0 * + cor0.col0 + + ( + 74 * + cor0.col1 ) col2 FROM tab2 AS cor0
----
-470186
-491781
1951

query I rowsort
SELECT tab2.col0 + col1 AS col0 FROM tab2
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-7467
SELECT DISTINCT + col0 DIV - tab1.col0 AS col2 FROM tab1
----
-1

skipif mysql # not compatible
query I rowsort label-7467
SELECT DISTINCT + col0 / - tab1.col0 AS col2 FROM tab1
----
-1

query I rowsort
SELECT DISTINCT + + 99 * - col1 FROM tab1 AS cor0
----
-1287
-2574
-990

onlyif mysql # use DIV operator for integer division
query I rowsort label-7469
SELECT ALL - 42 * cor0.col2 DIV - 66 + 37 AS col0 FROM tab2 AS cor0
----
53
54
61

skipif mysql # not compatible
query I rowsort label-7469
SELECT ALL - 42 * cor0.col2 / - 66 + 37 AS col0 FROM tab2 AS cor0
----
53
54
61

query I rowsort
SELECT ALL + col0 + col0 * + col0 AS col1 FROM tab1 AS cor0
----
12
4160
6480

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col2 * CAST ( - col2 AS REAL ) + - col2 FROM tab0 AS cor0
----
-1122
-2
-6806

query I rowsort
SELECT ALL + col0 + 89 * 75 AS col2 FROM tab0 AS cor0
----
6699
6710
6764

query I rowsort
SELECT 98 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to c758e8afbdfa6aae279045b0e9cbacc2

query I rowsort
SELECT DISTINCT + cor0.col0 + + 10 AS col1 FROM tab2 AS cor0
----
17
88
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-7475
SELECT col2 * col0 DIV 68 FROM tab0 AS cor0
----
0
107
11

skipif mysql # not compatible
query I rowsort label-7475
SELECT col2 * col0 / 68 FROM tab0 AS cor0
----
0
107
11

query I rowsort
SELECT DISTINCT + - col1 + 27 * - col1 FROM tab2 AS cor0
----
-1652
-476
-868

query I rowsort
SELECT + col0 + - 66 AS col2 FROM tab1 AS cor0
----
-2
-63
14

query I rowsort
SELECT ALL + ( col1 * + tab2.col0 ) FROM tab2
----
1343
217
4602

query I rowsort
SELECT DISTINCT 91 FROM tab2, tab0 AS cor0, tab2 cor1
----
91

query I rowsort
SELECT ALL 68 FROM tab1, tab0 AS cor0, tab2 cor1
----
27 values hashing to 10aa25f1c6b97582c34521ac6452e0b4

query I rowsort
SELECT - - col2 * - col0 * + 12 AS col0 FROM tab2 AS cor0
----
-2268
-24336
-36024

query I rowsort
SELECT DISTINCT + - col2 + col0 * col0 FROM tab2 AS cor0
----
22
6058
6203

query I rowsort
SELECT ALL - col2 + 91 * + col1 FROM tab2 AS cor0
----
1509
2794
5343

query I rowsort
SELECT + cor0.col1 + 33 FROM tab1 AS cor0
----
43
46
59

query I rowsort
SELECT ALL + col0 * + col1 * - col0 + cor0.col0 AS col0 FROM tab1 AS cor0
----
-231
-40896
-83120

query I rowsort
SELECT DISTINCT col0 + 28 AS col0 FROM tab2 AS cor0
----
106
107
35

query I rowsort
SELECT DISTINCT + - col1 * col1 + cor0.col1 AS col1 FROM tab1 AS cor0
----
-156
-650
-90

query I rowsort
SELECT - 77 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 3a24155cb91ceff1e67bb51c07b72107

query I rowsort
SELECT + tab1.col1 AS col1 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

onlyif mysql # use DIV operator for integer division
query I rowsort label-7490
SELECT CAST( + col2 AS SIGNED ) DIV + cor0.col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-7490
SELECT CAST ( + col2 AS INTEGER ) / + cor0.col1 FROM tab1 AS cor0
----
2
5
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7491
SELECT - CAST( col1 AS SIGNED ) AS col0 FROM tab2 cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-7491
SELECT - CAST ( col1 AS INTEGER ) AS col0 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT col0 * + col2 - 55 * + col2 AS col0 FROM tab0
----
-1023
-20
2788

onlyif mysql # use DIV operator for integer division
query I rowsort label-7493
SELECT - col1 + col0 DIV - ( col1 + - col2 ) FROM tab2
----
-14
-32
-61

skipif mysql # not compatible
query I rowsort label-7493
SELECT - col1 + col0 / - ( col1 + - col2 ) FROM tab2
----
-14
-32
-61

query I rowsort
SELECT DISTINCT - cor0.col2 * ( - col0 ) FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT + col0 * 53 FROM tab0 AS cor0
----
1272
1855
4717

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7496
SELECT col0 + CAST( NULL AS SIGNED ) * col1 * col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7496
SELECT col0 + CAST ( NULL AS INTEGER ) * col1 * col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT tab0.col0 * + col1 + col2 AS col1 FROM tab0
----
2097
3396
8181

query I rowsort
SELECT ALL - cor0.col1 - + col2 AS col2 FROM tab1 cor0
----
-109
-67
-80

query I rowsort
SELECT DISTINCT + col0 * col2 - + col2 FROM tab0
----
34
7216
759

query I rowsort
SELECT DISTINCT - - col0 + + col1 * 82 FROM tab2 AS cor0
----
1473
2549
4916

query I rowsort
SELECT ALL - + cor0.col0 * + col1 AS col1 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL - col1 + - col0 + col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT + ( + col2 ) * - cor0.col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT - + col1 * col2 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL - col0 * + 3 + tab2.col0 + - tab2.col0 FROM tab2
----
-21
-234
-237

query I rowsort
SELECT ALL col0 + - 16 AS col0 FROM tab0
----
19
73
8

query I rowsort
SELECT tab2.col1 * 57 * tab2.col0 FROM tab2
----
12369
262314
76551

query I rowsort
SELECT ALL - 18 + 8 AS col2 FROM tab1
----
-10
-10
-10

query I rowsort
SELECT DISTINCT + ( + ( - col0 ) ) + col2 * tab2.col0 + col2 AS col1 FROM tab2
----
1976
209
2961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7510
SELECT 63 * col2 + - CAST( + col2 AS SIGNED ) col2 FROM tab2
----
1612
1674
2356

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7510
SELECT 63 * col2 + - CAST ( + col2 AS INTEGER ) col2 FROM tab2
----
1612
1674
2356

query I rowsort
SELECT DISTINCT + 30 * col0 FROM tab1 cor0
----
1920
2400
90

query I rowsort
SELECT - 40 + + col2 FROM tab1 AS cor0
----
14
17
56

query I rowsort
SELECT + col0 + - cor0.col0 * - 62 * + col0 AS col2 FROM tab1 AS cor0
----
254016
396880
561

query I rowsort
SELECT - ( col2 ) + - col1 + col1 FROM tab0 AS cor0
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + col2 * - 95 col0 FROM tab1 AS cor0
----
-5076
-5358
-9024

query I rowsort
SELECT - - 4 * col1 + + col0 FROM tab1 AS cor0
----
104
107
132

query I rowsort
SELECT - 69 * + col1 AS col1 FROM tab2 AS cor0
----
-1173
-2139
-4071

query I rowsort
SELECT DISTINCT + col2 + + col1 * - 22 AS col1 FROM tab0 AS cor0
----
-1859
-1920
-2133

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 26 * col0 col2 FROM tab2 AS cor0
----
-182
-2028
-2054

query I rowsort
SELECT DISTINCT - - 25 FROM tab2, tab0 AS cor0
----
25

onlyif mysql # use DIV operator for integer division
query I rowsort label-7521
SELECT ALL 41 DIV 88 FROM tab1, tab1 AS cor0 CROSS JOIN tab0
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

skipif mysql # not compatible
query I rowsort label-7521
SELECT ALL 41 / 88 FROM tab1, tab1 AS cor0 CROSS JOIN tab0
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT + 4 AS col2 FROM tab1, tab2 cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

query I rowsort
SELECT ALL 33 + col1 FROM tab0
----
119
124
130

query I rowsort
SELECT DISTINCT - ( col2 * col2 ) FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT + 13 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to a90d0f37cec603ae1bc0a60dc7fbaeed

query I rowsort
SELECT + ( + col1 ) * + ( 30 + col2 ) AS col0 FROM tab2
----
1156
1767
3304

query I rowsort
SELECT - col1 * + cor0.col2 * col2 + col1 * - col0 FROM tab2 AS cor0
----
-22816
-25891
-44486

query I rowsort
SELECT + 13 - cor0.col2 FROM tab0 AS cor0
----
-20
-69
12

query I rowsort
SELECT DISTINCT + 36 + col2 * + col0 AS col2 FROM tab1 AS cor0
----
198
3684
7716

query I rowsort
SELECT - 73 + + col0 * ( + col1 ) AS col0 FROM tab0 AS cor0
----
1991
3322
8026

query I rowsort
SELECT DISTINCT 58 + col2 FROM tab0 cor0
----
140
59
91

query I rowsort
SELECT DISTINCT tab0.col0 AS col2 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
24
35
89

query I rowsort
SELECT DISTINCT - tab0.col1 AS col0 FROM tab0, tab1 AS cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT - cor0.col1 + cor0.col1 AS col0 FROM tab0, tab1, tab2 AS cor0
----
0

query I rowsort
SELECT tab2.col1 * tab2.col2 + + col0 * col1 AS col0 FROM tab2
----
1054
1989
6136

query I rowsort
SELECT - - 64 * ( - col2 ) FROM tab2 AS cor0
----
-1664
-1728
-2432

query I rowsort
SELECT DISTINCT col2 * tab1.col1 * + tab1.col1 FROM tab1
----
16224
36504
5700

query I rowsort
SELECT + ( + col2 ) + - cor0.col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT ALL - 64 * - col2 - col1 FROM tab2 AS cor0
----
1605
1697
2415

query I rowsort
SELECT - col2 + - col2 * col1 AS col1 FROM tab2
----
-1560
-684
-864

query I rowsort
SELECT + col1 * - cor0.col2 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * 76 col0 FROM tab0 cor0
----
2508
6232
76

query I rowsort
SELECT ALL + 28 * cor0.col0 + + cor0.col2 + + col0 AS col0 FROM tab1 AS cor0
----
141
1913
2416

query I rowsort
SELECT + ( + ( - cor0.col2 ) ) * ( ( col2 ) ) + ( col1 ) FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT ALL - ( - col1 ) * col1 + 70 - - col0 FROM tab0 cor0
----
7490
8440
9514

query I rowsort
SELECT + + 4 AS col2 FROM tab0 AS cor0
----
4
4
4

query I rowsort
SELECT DISTINCT ( col0 ) * - col2 - ( + 27 ) * + col1 AS col2 FROM tab2 AS cor0
----
-1026
-3461
-3621

query I rowsort
SELECT ALL + - cor0.col0 + + col1 * + col2 AS col1 FROM tab0 cor0
----
2814
62
7373

query I rowsort
SELECT DISTINCT + ( col1 ) * - col1 AS col1 FROM tab0
----
-7396
-8281
-9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 74 col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

query I rowsort
SELECT ALL + 50 FROM tab2, tab2 AS cor0
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7552
SELECT ALL - CAST( NULL AS SIGNED ) * - col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7552
SELECT ALL - CAST ( NULL AS INTEGER ) * - col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT 53 * col1 * + col0 - col2 * - col1 FROM tab0
----
112230
180032
436709

query I rowsort
SELECT 49 FROM tab0 cor0
----
49
49
49

query I rowsort
SELECT + - col0 * col2 * cor0.col1 AS col1 FROM tab1 cor0
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT + + col1 * cor0.col2 AS col1 FROM tab0 cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-7557
SELECT 65 DIV col0 FROM tab2 AS cor0
----
0
0
9

skipif mysql # not compatible
query I rowsort label-7557
SELECT 65 / col0 FROM tab2 AS cor0
----
0
0
9

query I rowsort
SELECT + 79 AS col2 FROM tab1
----
79
79
79

query I rowsort
SELECT ALL 21 AS col2 FROM tab1 AS cor0
----
21
21
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + cor0.col0 col0 FROM tab0 AS cor0
----
-24
-35
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7561
SELECT + + col1 + - CAST( NULL AS SIGNED ) * - 52 / col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7561
SELECT + + col1 + - CAST ( NULL AS INTEGER ) * - 52 / col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7562
SELECT + + col0 DIV - ( col1 * - col1 ) FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7562
SELECT + + col0 / - ( col1 * - col1 ) FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT col2 * ( tab1.col1 ) FROM tab1
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-7564
SELECT cor0.col2 * - 13 + 79 DIV col0 FROM tab1 cor0
----
-1248
-676
-740

skipif mysql # not compatible
query I rowsort label-7564
SELECT cor0.col2 * - 13 + 79 / col0 FROM tab1 cor0
----
-1248
-676
-740

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7565
SELECT + - col1 * + CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7565
SELECT + - col1 * + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 + col0 * + col1 AS col0 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT + + col2 * 62 + 72 FROM tab2 AS cor0
----
1684
1746
2428

query I rowsort
SELECT + 23 * - 15 AS col0 FROM tab0 AS cor0
----
-345
-345
-345

query I rowsort
SELECT - ( col2 ) * col2 AS col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT - ( - col2 ) * col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT + 54 + tab2.col2 AS col0 FROM tab2, tab1 AS cor0
----
80
81
92

query I rowsort
SELECT + cor0.col2 * cor0.col2 + 94 FROM tab1, tab0 AS cor0
----
9 values hashing to c34431cdc1e99333e6d963d1e6c58768

query I rowsort
SELECT ALL - 30 AS col0 FROM tab0, tab0 cor0
----
9 values hashing to 56fa25f9fb8040460fe3c894000ea8fb

query I rowsort
SELECT DISTINCT cor0.col1 * - 84 FROM tab0 AS cor0 CROSS JOIN tab1, tab0 cor1
----
-7224
-7644
-8148

query I rowsort
SELECT DISTINCT + col2 * + 98 FROM tab2 AS cor0
----
2548
2646
3724

onlyif mysql # use DIV operator for integer division
query I rowsort label-7576
SELECT DISTINCT + col0 DIV + 40 - - col1 * col1 AS col1 FROM tab0 AS cor0
----
7396
8283
9409

skipif mysql # not compatible
query I rowsort label-7576
SELECT DISTINCT + col0 / + 40 - - col1 * col1 AS col1 FROM tab0 AS cor0
----
7396
8283
9409

query I rowsort
SELECT ALL - cor0.col2 * 28 + + col2 * col1 AS col0 FROM tab0 cor0
----
1914
5166
69

query I rowsort
SELECT ALL - col1 + - col0 * col1 FROM tab1 AS cor0
----
-104
-1053
-650

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * + col1 * - cor0.col2 col2 FROM tab0 AS cor0
----
-611884
-93654
-97

query I rowsort
SELECT DISTINCT - - cor0.col0 + - 39 AS col0 FROM tab0 AS cor0
----
-15
-4
50

query I rowsort
SELECT ALL - col2 * - ( + col2 + col1 ) FROM tab1 AS cor0
----
10464
3819
4320

query I rowsort
SELECT col2 * 92 FROM tab0 AS cor0
----
3036
7544
92

query I rowsort
SELECT DISTINCT - col0 * + col0 AS col2 FROM tab2 cor0
----
-49
-6084
-6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-7584
SELECT ALL + - col1 DIV - col0 col0 FROM tab0 AS cor0
----
1
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7584
SELECT ALL + - col1 / - col0 col0 FROM tab0 AS cor0
----
1
2
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-7585
SELECT ALL 25 * tab0.col2 DIV + col2 + col2 AS col0 FROM tab0
----
107
26
58

skipif mysql # not compatible
query I rowsort label-7585
SELECT ALL 25 * tab0.col2 / + col2 + col2 AS col0 FROM tab0
----
107
26
58

query I rowsort
SELECT - col0 + + col0 * - col2 * - tab1.col0 FROM tab1
----
233408
483
614320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + + col0 col2 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL col1 * ( 84 ) AS col0 FROM tab0
----
7224
7644
8148

query I rowsort
SELECT + - col1 + - col0 * - col0 FROM tab0 AS cor0
----
1128
490
7830

query I rowsort
SELECT - col2 * - ( ( + cor0.col0 ) ) * col1 FROM tab0 AS cor0
----
3395
664118
68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-7591
SELECT ALL + - col0 DIV cor0.col0 - + col1 * col2 * col2 FROM tab0 cor0
----
-611885
-93655
-98

skipif mysql # not compatible
query I rowsort label-7591
SELECT ALL + - col0 / cor0.col0 - + col1 * col2 * col2 FROM tab0 cor0
----
-611885
-93655
-98

query I rowsort
SELECT DISTINCT + col2 + + col2 * col0 FROM tab0 AS cor0
----
36
7380
825

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7593
SELECT DISTINCT - + cor0.col2 / + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7593
SELECT DISTINCT - + cor0.col2 / + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL col1 * col1 + + 49 FROM tab1 AS cor0
----
149
218
725

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col2 col2 FROM tab0, tab0 cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( - col2 ) * col0 col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT - col2 * - 45 + col1 + - ( - col1 ) FROM tab1 AS cor0
----
2482
2585
4346

query I rowsort
SELECT - col1 - + 8 AS col1 FROM tab0 AS cor0
----
-105
-94
-99

query I rowsort
SELECT DISTINCT + tab1.col1 + + col2 + + col1 FROM tab1
----
106
122
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-7600
SELECT DISTINCT col0 DIV + tab0.col2 + col1 * col1 AS col0 FROM tab0
----
7396
8282
9444

skipif mysql # not compatible
query I rowsort label-7600
SELECT DISTINCT col0 / + tab0.col2 + col1 * col1 AS col0 FROM tab0
----
7396
8282
9444

query I rowsort
SELECT - col0 + + tab2.col0 AS col1 FROM tab2
----
0
0
0

query I rowsort
SELECT col2 + col0 * - tab1.col0 AS col2 FROM tab1
----
-4039
-6304
45

query I rowsort
SELECT 76 + + col0 FROM tab0
----
100
111
165

onlyif mysql # use DIV operator for integer division
query I rowsort label-7604
SELECT col1 DIV col1 col0 FROM tab0 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7604
SELECT col1 / col1 col0 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT ALL - 84 AS col1 FROM tab0 AS cor0
----
-84
-84
-84

query I rowsort
SELECT + col0 * - cor0.col1 + col2 AS col2 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT ALL + 34 * col2 + col2 AS col2 FROM tab0 AS cor0
----
1155
2870
35

query I rowsort
SELECT - 51 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 27bcc31433ce90833ed76619cbd8d6a4

query I rowsort
SELECT DISTINCT - tab0.col1 + col2 + - col2 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT ALL col2 * cor0.col1 AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT + - 12 * + col2 FROM tab0 cor0
----
-12
-396
-984

query I rowsort
SELECT ALL - 25 + + col2 * 58 + + col0 FROM tab2 cor0
----
1548
1561
2258

query I rowsort
SELECT ALL + 72 * + col2 + + col0 * col0 AS col0 FROM tab1 AS cor0
----
13312
3897
8200

query I rowsort
SELECT ALL + 21 * col0 + 60 FROM tab1 AS cor0
----
123
1404
1740

query I rowsort
SELECT + col2 + col1 + + col2 * + col2 AS col1 FROM tab2 AS cor0
----
1499
761
787

query I rowsort
SELECT DISTINCT - col1 * + col2 AS col1 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT - + col0 + cor0.col2 AS col1 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT - cor0.col1 + - col2 * + 33 * col1 AS col2 FROM tab2 AS cor0
----
-21335
-27652
-50681

query I rowsort
SELECT 31 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

query I rowsort
SELECT col0 * 87 FROM tab1 AS cor0
----
261
5568
6960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7621
SELECT ALL - - col2 / CAST( NULL AS SIGNED ) + + cor0.col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7621
SELECT ALL - - col2 / CAST ( NULL AS INTEGER ) + + cor0.col1 FROM tab2 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7622
SELECT + col0 + 18 DIV + 10 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-7622
SELECT + col0 + 18 / + 10 FROM tab0 AS cor0
----
25
36
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-7623
SELECT + col1 DIV - 84 AS col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7623
SELECT + col1 / - 84 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col1 * + col1 * cor0.col0 AS col1 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT DISTINCT - 56 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
-56

query I rowsort
SELECT - 41 + + tab2.col0 AS col0 FROM tab2
----
-34
37
38

query I rowsort
SELECT ALL 97 FROM tab0 cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 5e0d31ac41981bcdf6a665538a71a09c

query I rowsort
SELECT cor0.col1 FROM tab1, tab0 cor0, tab1 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

onlyif mysql # use DIV operator for integer division
query I rowsort label-7629
SELECT - + col0 * + col0 + col0 DIV ( + col2 ) + + col2 AS col1 FROM tab1 AS cor0
----
-4038
-6304
45

skipif mysql # not compatible
query I rowsort label-7629
SELECT - + col0 * + col0 + col0 / ( + col2 ) + + col2 AS col1 FROM tab1 AS cor0
----
-4038
-6304
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-7630
SELECT ALL col2 * - ( - col0 ) + col0 * - col1 + col1 DIV cor0.col1 col0 FROM tab0 cor0
----
-1271
-3359
-800

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7630
SELECT ALL col2 * - ( - col0 ) + col0 * - col1 + col1 / cor0.col1 col0 FROM tab0 cor0
----
-1271
-3359
-800

onlyif mysql # use DIV operator for integer division
query I rowsort label-7631
SELECT + + CAST( 60 AS SIGNED ) * col1 - - 74 DIV col1 AS col1 FROM tab2 AS cor0
----
1024
1862
3541

skipif mysql # not compatible
query I rowsort label-7631
SELECT + + CAST ( 60 AS INTEGER ) * col1 - - 74 / col1 AS col1 FROM tab2 AS cor0
----
1024
1862
3541

query I rowsort
SELECT ALL + col2 * col1 * + cor0.col2 + col0 AS col1 FROM tab0 AS cor0
----
132
611973
93678

query I rowsort
SELECT DISTINCT col1 + 3 * col2 FROM tab0 AS cor0
----
100
185
337

query I rowsort
SELECT ALL col2 - + col0 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT 47 + - cor0.col2 FROM tab1 AS cor0
----
-10
-49
-7

query I rowsort
SELECT ALL 82 * - col2 + col1 AS col1 FROM tab0 cor0
----
-2620
-6633
15

query I rowsort
SELECT DISTINCT - col2 * col0 + col0 AS col0 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT - cor0.col2 + - 54 FROM tab2 AS cor0
----
-80
-81
-92

query I rowsort
SELECT 77 * - col1 - - cor0.col2 AS col1 FROM tab1 AS cor0
----
-1948
-713
-905

query I rowsort
SELECT DISTINCT + ( - cor0.col2 ) FROM tab2, tab0 AS cor0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-7641
SELECT DISTINCT col1 * col0 + cor0.col0 DIV ( col0 ) + - col0 AS col2 FROM tab1 AS cor0
----
577
76
961

skipif mysql # not compatible
query I rowsort label-7641
SELECT DISTINCT col1 * col0 + cor0.col0 / ( col0 ) + - col0 AS col2 FROM tab1 AS cor0
----
577
76
961

query I rowsort
SELECT ALL - col1 + 27 FROM tab2 AS cor0
----
-32
-4
10

onlyif mysql # use DIV operator for integer division
query I rowsort label-7643
SELECT ( 18 ) DIV col1 FROM tab1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-7643
SELECT ( 18 ) / col1 FROM tab1
----
0
1
1

query I rowsort
SELECT + 0 * + col2 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 53 col1 FROM tab0 AS cor0
----
-53

query I rowsort
SELECT DISTINCT - 74 * + col1 AS col2 FROM tab1 AS cor0
----
-1924
-740
-962

query I rowsort
SELECT - cor0.col1 * col1 - 26 * + col0 FROM tab1 AS cor0
----
-1764
-2249
-754

onlyif mysql # use DIV operator for integer division
query I rowsort label-7648
SELECT DISTINCT tab2.col1 + - col1 DIV + tab2.col0 + 49 AS col2 FROM tab2
----
108
66
76

skipif mysql # not compatible
query I rowsort label-7648
SELECT DISTINCT tab2.col1 + - col1 / + tab2.col0 + 49 AS col2 FROM tab2
----
108
66
76

query I rowsort
SELECT ALL + 8 + 14 AS col0 FROM tab0
----
22
22
22

query I rowsort
SELECT 40 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

query I rowsort
SELECT DISTINCT + ( - 77 ) + - col1 + col1 * col2 AS col1 FROM tab0
----
-77
2675
7294

query I rowsort
SELECT - cor1.col1 FROM tab2, tab1 AS cor0, tab2 AS cor1, tab1, tab2 cor2
----
243 values hashing to aad6a39cc782d0570960622f04a07424

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7653
SELECT DISTINCT - + col2 * + CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7653
SELECT DISTINCT - + col2 * + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7654
SELECT + col2 DIV - col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7654
SELECT + col2 / - col1 AS col2 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7655
SELECT DISTINCT + + cor0.col2 DIV - 55 AS col1 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-7655
SELECT DISTINCT + + cor0.col2 / - 55 AS col1 FROM tab1 AS cor0
----
-1
0

query I rowsort
SELECT col0 * - col1 * ( ( tab0.col2 ) * col2 ) + 28 FROM tab0
----
-2247668
-3367
-54457648

query I rowsort
SELECT - col0 * 82 FROM tab0 AS cor0
----
-1968
-2870
-7298

query I rowsort
SELECT - + 47 * + col1 - col1 * + col1 FROM tab1 AS cor0
----
-1898
-570
-780

onlyif mysql # use DIV operator for integer division
query I rowsort label-7659
SELECT - 15 DIV + col2 - - col2 DIV col1 FROM tab0 AS cor0
----
-15
0
0

skipif mysql # not compatible
query I rowsort label-7659
SELECT - 15 / + col2 - - col2 / col1 FROM tab0 AS cor0
----
-15
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7660
SELECT + CAST( NULL AS SIGNED ) * cor0.col2 + col1 + + col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7660
SELECT + CAST ( NULL AS INTEGER ) * cor0.col2 + col1 + + col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7661
SELECT + 89 * col1 + CAST( ( + cor0.col2 ) AS SIGNED ) AS col2 FROM tab2 AS cor0
----
1551
2786
5277

skipif mysql # not compatible
query I rowsort label-7661
SELECT + 89 * col1 + CAST ( ( + cor0.col2 ) AS INTEGER ) AS col2 FROM tab2 AS cor0
----
1551
2786
5277

query I rowsort
SELECT DISTINCT - - col0 + + col2 * + col1 AS col0 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT + 62 FROM tab1 cor0
----
62
62
62

query I rowsort
SELECT + col0 * col1 + col1 + + 89 * - col2 * 0 AS col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT DISTINCT + 63 + tab0.col0 FROM tab0
----
152
87
98

query I rowsort
SELECT ALL 13 + + 40 AS col2 FROM tab1
----
53
53
53

query I rowsort
SELECT ALL - col1 * - col0 + col2 FROM tab2
----
1381
244
4628

query I rowsort
SELECT ALL 29 * col2 AS col2 FROM tab2
----
1102
754
783

query I rowsort
SELECT 82 * col1 * - 43 FROM tab2 AS cor0
----
-109306
-208034
-59942

query I rowsort
SELECT ALL + col0 * - col1 - col2 AS col1 FROM tab1 AS cor0
----
-1136
-132
-697

query I rowsort
SELECT ALL - 32 * col0 FROM tab0 cor0
----
-1120
-2848
-768

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 72 + col0 * - col2 col2 FROM tab1 cor0
----
-234
-3720
-7752

query I rowsort
SELECT - col1 * + col2 + + col2 AS col2 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT ALL - - col1 * - col1 * - col2 AS col1 FROM tab1 AS cor0
----
16224
36504
5700

onlyif mysql # use DIV operator for integer division
query I rowsort label-7675
SELECT DISTINCT + col1 DIV col1 AS col1 FROM tab0 cor0
----
1

skipif mysql # not compatible
query I rowsort label-7675
SELECT DISTINCT + col1 / col1 AS col1 FROM tab0 cor0
----
1

query I rowsort
SELECT DISTINCT - + cor0.col2 * - cor0.col0 + - ( + col2 ) + + col0 FROM tab2 AS cor0
----
169
2080
3043

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 col2 FROM tab0, tab1, tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT + + col0 + 84 * col0 FROM tab1 cor0
----
255
5440
6800

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + + ( col2 ) * col0 col0 FROM tab2 AS cor0
----
158
1969
2985

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + col0 col1 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL - col1 + col1 - - cor0.col2 * - col2 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT + 44 FROM tab2, tab0, tab2 cor0
----
27 values hashing to 0cc3e52e781e46962291c3060c6ae73b

query I rowsort
SELECT col2 * - col0 * + col2 FROM tab2
----
-114076
-5103
-52728

query I rowsort
SELECT ALL + 78 * col2 AS col0 FROM tab1
----
4212
4446
7488

query I rowsort
SELECT + + col2 * - 53 FROM tab1 AS cor0
----
-2862
-3021
-5088

query I rowsort
SELECT + + col0 + ( + cor0.col0 ) FROM tab1 cor0
----
128
160
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + 79 col1 FROM tab2 AS cor0
----
110
138
96

query I rowsort
SELECT DISTINCT + cor1.col0 AS col0 FROM tab1, tab1 AS cor0, tab0, tab2 AS cor1
----
7
78
79

query I rowsort
SELECT ALL 52 FROM tab1, tab1 AS cor0
----
9 values hashing to 7f4ae30893ab330784829711032ae599

query I rowsort
SELECT - tab0.col0 + col1 * col0 FROM tab0
----
2040
3360
8010

query I rowsort
SELECT DISTINCT - + 50 AS col1 FROM tab2 AS cor0
----
-50

query I rowsort
SELECT DISTINCT + ( 81 ) FROM tab1 AS cor0
----
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + ( + col0 ) + + col2 col0 FROM tab0 AS cor0
----
133
143
262

query I rowsort
SELECT ALL col1 * + col0 + + cor0.col0 * + col2 AS col1 FROM tab1 AS cor0
----
240
4288
8720

query I rowsort
SELECT - col0 + col2 + col2 FROM tab0 AS cor0
----
-33
42
75

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7696
SELECT 19 * + col0 + + CAST( + col2 * col0 AS SIGNED ) + - 94 FROM tab2 AS cor0
----
228
3416
4409

skipif mysql # not compatible
query I rowsort label-7696
SELECT 19 * + col0 + + CAST ( + col2 * col0 AS INTEGER ) + - 94 FROM tab2 AS cor0
----
228
3416
4409

query I rowsort
SELECT + 78 * col2 + + col1 + - col2 AS col2 FROM tab1 cor0
----
4184
4399
7405

query I rowsort
SELECT + ( + col1 ) * cor0.col2 + + cor0.col1 + - col0 FROM tab0 AS cor0
----
159
2900
7464

onlyif mysql # use DIV operator for integer division
query I rowsort label-7699
SELECT ALL - col2 DIV 36 AS col1 FROM tab0 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-7699
SELECT ALL - col2 / 36 AS col1 FROM tab0 AS cor0
----
-2
0
0

query I rowsort
SELECT ( ( col2 ) ) * - 65 + - col2 AS col2 FROM tab0 AS cor0
----
-2178
-5412
-66

query I rowsort
SELECT DISTINCT col0 + 34 FROM tab2 AS cor0
----
112
113
41

query I rowsort
SELECT DISTINCT - ( + cor0.col1 ) + col1 FROM tab1 cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7703
SELECT ALL - - col2 * 93 DIV - col1 + + 13 * col0 AS col2 FROM tab0 cor0
----
1074
277
455

skipif mysql # not compatible
query I rowsort label-7703
SELECT ALL - - col2 * 93 / - col1 + + 13 * col0 AS col2 FROM tab0 cor0
----
1074
277
455

query I rowsort
SELECT - 45 + + 95 AS col1 FROM tab0 AS cor0
----
50
50
50

query I rowsort
SELECT + col0 * - 45 + col0 AS col2 FROM tab2 AS cor0
----
-308
-3432
-3476

query I rowsort
SELECT ALL + - col1 * col0 + - col1 * - col2 AS col1 FROM tab0 cor0
----
-3298
-637
774

query I rowsort
SELECT + 31 + - col0 AS col0 FROM tab2 cor0
----
-47
-48
24

query I rowsort
SELECT ALL ( cor0.col0 ) + col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT ALL + col1 + 10 FROM tab0 cor0
----
101
107
96

query I rowsort
SELECT DISTINCT - - cor0.col1 - - col1 * col0 AS col0 FROM tab2 AS cor0
----
1360
248
4661

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7711
SELECT DISTINCT + CAST( NULL AS SIGNED ) * col2 col2 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7711
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * col2 col2 FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7712
SELECT + 42 + col2 DIV col2 AS col2 FROM tab0 AS cor0
----
43
43
43

skipif mysql # not compatible
query I rowsort label-7712
SELECT + 42 + col2 / col2 AS col2 FROM tab0 AS cor0
----
43
43
43

query I rowsort
SELECT DISTINCT - 70 + + col1 AS col1 FROM tab0 AS cor0
----
16
21
27

query I rowsort
SELECT DISTINCT col1 + col1 * - ( + 49 ) AS col1 FROM tab1 AS cor0
----
-1248
-480
-624

query I rowsort
SELECT + 52 + col1 FROM tab0
----
138
143
149

onlyif mysql # use DIV operator for integer division
query I rowsort label-7716
SELECT DISTINCT - col2 * 22 * 73 + + cor0.col0 DIV - ( col1 ) FROM tab2 AS cor0
----
-41757
-43362
-61032

skipif mysql # not compatible
query I rowsort label-7716
SELECT DISTINCT - col2 * 22 * 73 + + cor0.col0 / - ( col1 ) FROM tab2 AS cor0
----
-41757
-43362
-61032

query I rowsort
SELECT col1 + - ( 49 * col0 ) AS col2 FROM tab0 AS cor0
----
-1090
-1618
-4270

query I rowsort
SELECT + 83 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 18f405c31a0fb47ce3cc9f7effa8855c

query I rowsort
SELECT cor0.col2 * col1 - cor0.col1 AS col2 FROM tab1 cor0
----
1235
1378
560

query I rowsort
SELECT ALL col0 * ( - col2 ) AS col0 FROM tab2 cor0
----
-189
-2028
-3002

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0, tab1 AS cor1, tab0, tab2 AS cor2
----
3645 values hashing to 773bb916e463ebc075d701108532badb

query I rowsort
SELECT col1 + 83 * tab1.col0 FROM tab1
----
275
5322
6653

query I rowsort
SELECT ALL col0 + 74 * + 50 AS col0 FROM tab0
----
3724
3735
3789

query I rowsort
SELECT ( 73 ) AS col1 FROM tab0, tab2, tab0 cor0, tab1
----
81 values hashing to 9f0f371d979e70a792c8597c6559f0e2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7725
SELECT DISTINCT + col2 + + CAST( NULL AS SIGNED ) * + 53 col0 FROM tab1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7725
SELECT DISTINCT + col2 + + CAST ( NULL AS INTEGER ) * + 53 col0 FROM tab1
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7726
SELECT col1 DIV + ( - 59 ) - + col0 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-7726
SELECT col1 / + ( - 59 ) - + col0 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT - col0 + + 2 * + col2 FROM tab2 AS cor0
----
-26
-3
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 * ( 35 ) col1 FROM tab2 AS cor0
----
-1085
-2065
-595

query I rowsort
SELECT DISTINCT + col1 * cor0.col0 + col2 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT ALL - + col0 * + col2 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT + col0 * col1 + - col0 - + col1 * + col2 AS col2 FROM tab1 AS cor0
----
-1329
-288
6

query I rowsort
SELECT DISTINCT - + col1 * col2 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT - 82 * - tab2.col0 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 5ed674b86bc66220451666145bcd25fd

query I rowsort
SELECT + col2 * - 55 * col1 AS col2 FROM tab2
----
-35530
-46035
-84370

onlyif mysql # use DIV operator for integer division
query I rowsort label-7735
SELECT DISTINCT + col0 DIV 72 + - col0 * col0 * - 30 FROM tab2
----
1470
182521
187231

skipif mysql # not compatible
query I rowsort label-7735
SELECT DISTINCT + col0 / 72 + - col0 * col0 * - 30 FROM tab2
----
1470
182521
187231

query I rowsort
SELECT DISTINCT - tab1.col0 AS col1 FROM tab1, tab1 cor0
----
-3
-64
-80

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0, tab2 AS cor1, tab0, tab1 cor2
----
3645 values hashing to b8435223668db186a5012e4112253f28

query I rowsort
SELECT - 40 * + cor0.col2 + - col1 FROM tab2 AS cor0
----
-1099
-1111
-1537

query I rowsort
SELECT DISTINCT - 89 - - col2 AS col1 FROM tab1 AS cor0
----
-32
-35
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-7740
SELECT + - col2 DIV - 52 + col1 * cor0.col1 AS col2 FROM tab0 AS cor0
----
7396
8282
9409

skipif mysql # not compatible
query I rowsort label-7740
SELECT + - col2 / - 52 + col1 * cor0.col1 AS col2 FROM tab0 AS cor0
----
7396
8282
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-7741
SELECT DISTINCT - 8 * + col1 + - col2 DIV + 75 FROM tab2 AS cor0
----
-136
-248
-472

skipif mysql # not compatible
query I rowsort label-7741
SELECT DISTINCT - 8 * + col1 + - col2 / + 75 FROM tab2 AS cor0
----
-136
-248
-472

onlyif mysql # use DIV operator for integer division
query I rowsort label-7742
SELECT DISTINCT 43 - - cor0.col0 DIV - col0 AS col0 FROM tab2 AS cor0
----
42

skipif mysql # not compatible
query I rowsort label-7742
SELECT DISTINCT 43 - - cor0.col0 / - col0 AS col0 FROM tab2 AS cor0
----
42

query I rowsort
SELECT - col1 * tab0.col2 * + col2 FROM tab0
----
-611884
-93654
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7744
SELECT DISTINCT - CAST( NULL AS SIGNED ) * col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-7744
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * col0 FROM tab0
----
NULL

query I rowsort
SELECT + ( - col2 ) * cor0.col1 - + col0 AS col0 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT DISTINCT - 90 AS col1 FROM tab1 AS cor0
----
-90

query I rowsort
SELECT - col0 * 15 + + col2 + col0 AS col2 FROM tab2 AS cor0
----
-1066
-1068
-71

query I rowsort
SELECT 83 + + col2 AS col1 FROM tab0
----
116
165
84

query I rowsort
SELECT + col0 + + col1 * 4 FROM tab0
----
368
423
453

query I rowsort
SELECT ALL - 66 FROM tab0 AS cor0
----
-66
-66
-66

query I rowsort
SELECT DISTINCT ( 12 ) AS col2 FROM tab2, tab0 cor0, tab2 AS cor1
----
12

query I rowsort
SELECT cor1.col0 FROM tab2, tab2 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

query I rowsort
SELECT col2 + + col2 * col1 AS col0 FROM tab1 cor0
----
1344
1458
627

query I rowsort
SELECT ALL + 48 AS col1 FROM tab0 cor0
----
48
48
48

query I rowsort
SELECT - - col0 * 96 FROM tab2 AS cor0
----
672
7488
7584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - 90 + + 25 col0 FROM tab1 AS cor0
----
1195
2365
925

query I rowsort
SELECT ALL - col1 + + 61 * - col1 * - col1 FROM tab1 AS cor0
----
10296
41210
6090

onlyif mysql # use DIV operator for integer division
query I rowsort label-7758
SELECT DISTINCT - col1 DIV - ( col2 ) + - col2 * ( + col0 ) col0 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7758
SELECT DISTINCT - col1 / - ( col2 ) + - col2 * ( + col0 ) col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - col0 * - col1 - - col2 * col0 FROM tab2 AS cor0
----
406
4345
6630

query I rowsort
SELECT + cor0.col2 - 33 AS col2 FROM tab1 cor0
----
21
24
63

query I rowsort
SELECT ALL + col2 + cor0.col1 AS col1 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-7762
SELECT ALL + col1 * col1 DIV - 73 FROM tab2
----
-13
-3
-47

skipif mysql # not compatible
query I rowsort label-7762
SELECT ALL + col1 * col1 / - 73 FROM tab2
----
-13
-3
-47

onlyif mysql # use DIV operator for integer division
query I rowsort label-7763
SELECT col0 * + tab1.col1 + - col0 DIV - 74 AS col1 FROM tab1
----
1041
640
78

skipif mysql # not compatible
query I rowsort label-7763
SELECT col0 * + tab1.col1 + - col0 / - 74 AS col1 FROM tab1
----
1041
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + 79 col0 FROM tab1 cor0
----
237
5056
6320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 - - col1 col0 FROM tab1
----
29
74
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7766
SELECT DISTINCT - - CAST( NULL AS DECIMAL ) AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7766
SELECT DISTINCT - - CAST ( NULL AS REAL ) AS col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL + 65 * col0 AS col2 FROM tab1 AS cor0
----
195
4160
5200

query I rowsort
SELECT - cor0.col1 * 99 + cor0.col1 FROM tab1 AS cor0
----
-1274
-2548
-980

query I rowsort
SELECT DISTINCT - 67 + - col2 * - col2 AS col2 FROM tab2 cor0
----
1377
609
662

query I rowsort
SELECT ( - ( col2 ) ) * + col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT 89 * - col0 AS col2 FROM tab0
----
-2136
-3115
-7921

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0, tab1 AS cor1, tab0, tab2 cor2
----
3645 values hashing to d2c0c94b38e721d8cf9f7df226475a2f

query I rowsort
SELECT - col0 * - ( 94 ) FROM tab1
----
282
6016
7520

query I rowsort
SELECT DISTINCT cor0.col0 * + col1 + col0 AS col0 FROM tab2 AS cor0
----
1422
224
4680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7775
SELECT ALL + col1 / CAST( NULL AS SIGNED ) col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7775
SELECT ALL + col1 / CAST ( NULL AS INTEGER ) col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - col2 + ( 81 ) * - col1 AS col1 FROM tab2 cor0
----
-1339
-2484
-4753

query I rowsort
SELECT col0 + - col0 - cor0.col0 * col0 AS col2 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT + - col0 + + col1 + col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT + cor0.col1 * + col2 - + ( + col1 ) FROM tab0 cor0
----
0
2752
7371

query I rowsort
SELECT DISTINCT - col0 + cor0.col1 * col2 FROM tab2 AS cor0
----
1456
567
830

onlyif mysql # use DIV operator for integer division
query I rowsort label-7781
SELECT - col0 + + col0 - + 41 DIV + cor0.col0 AS col0 FROM tab0 cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-7781
SELECT - col0 + + col0 - + 41 / + cor0.col0 AS col0 FROM tab0 cor0
----
-1
-1
0

query I rowsort
SELECT + 70 + col2 AS col1 FROM tab2 cor0
----
108
96
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7783
SELECT + CAST( 85 AS SIGNED ) FROM tab2 AS cor0
----
85
85
85

skipif mysql # not compatible
query I rowsort label-7783
SELECT + CAST ( 85 AS INTEGER ) FROM tab2 AS cor0
----
85
85
85

query I rowsort
SELECT + col2 * ( cor0.col2 * + col2 ) AS col1 FROM tab0 AS cor0
----
1
35937
551368

onlyif mysql # use DIV operator for integer division
query I rowsort label-7785
SELECT + 89 DIV col1 FROM tab1 AS cor0
----
3
6
8

skipif mysql # not compatible
query I rowsort label-7785
SELECT + 89 / col1 FROM tab1 AS cor0
----
3
6
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-7786
SELECT cor0.col2 * - col0 + - col2 + 27 DIV - col1 AS col2 FROM tab2 AS cor0
----
-2054
-216
-3041

skipif mysql # not compatible
query I rowsort label-7786
SELECT cor0.col2 * - col0 + - col2 + 27 / - col1 AS col2 FROM tab2 AS cor0
----
-2054
-216
-3041

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7787
SELECT - CAST( + col2 AS SIGNED ) + col0 FROM tab2 AS cor0
----
-20
41
52

skipif mysql # not compatible
query I rowsort label-7787
SELECT - CAST ( + col2 AS INTEGER ) + col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT - tab2.col1 * ( + col2 * - col0 ) FROM tab2
----
119652
51034
5859

query I rowsort
SELECT ALL - col1 * ( - col1 ) AS col2 FROM tab0
----
7396
8281
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-7790
SELECT cor0.col2 * col1 + col1 * cor0.col1 DIV 28 FROM tab2 AS cor0
----
1658
656
871

skipif mysql # not compatible
query I rowsort label-7790
SELECT cor0.col2 * col1 + col1 * cor0.col1 / 28 FROM tab2 AS cor0
----
1658
656
871

onlyif mysql # use DIV operator for integer division
query I rowsort label-7791
SELECT ALL + col1 * ( col0 ) DIV + col1 + - tab2.col0 DIV col1 + - tab2.col0 AS col2 FROM tab2
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-7791
SELECT ALL + col1 * ( col0 ) / + col1 + - tab2.col0 / col1 + - tab2.col0 AS col2 FROM tab2
----
-1
-4
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * col0 col2 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT col2 + col0 * + col0 AS col1 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
54
57
96

query I rowsort
SELECT DISTINCT ( 4 ) AS col1 FROM tab1 AS cor0
----
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7796
SELECT CAST( - 73 AS SIGNED ) - + col0 FROM tab0 AS cor0
----
-108
-162
-97

skipif mysql # not compatible
query I rowsort label-7796
SELECT CAST ( - 73 AS INTEGER ) - + col0 FROM tab0 AS cor0
----
-108
-162
-97

query I rowsort
SELECT DISTINCT - 38 * 37 + col0 + - col0 AS col2 FROM tab2 AS cor0
----
-1406

query I rowsort
SELECT - col1 - - cor0.col1 * cor0.col2 AS col2 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT DISTINCT - col2 - col0 AS col1 FROM tab1 AS cor0
----
-121
-176
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7800
SELECT - CAST( + col0 AS SIGNED ) AS col0 FROM tab1
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-7800
SELECT - CAST ( + col0 AS INTEGER ) AS col0 FROM tab1
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * cor0.col2 col2 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 * - col1 + - col2 col1 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT cor0.col0 * - cor0.col1 AS col1 FROM tab1 cor0
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * - col0 * cor0.col2 + col2 col2 FROM tab1 AS cor0
----
-36423
-4158
-99744

query I rowsort
SELECT DISTINCT + 55 + - ( col1 ) AS col1 FROM tab2
----
-4
24
38

query I rowsort
SELECT ( 95 ) - col0 * + col0 AS col1 FROM tab1
----
-4001
-6305
86

query I rowsort
SELECT + col0 * - col0 + tab2.col2 - col2 AS col1 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT 16 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 3fdb08ec2e3d4b642dd4594778cca8b3

query I rowsort
SELECT DISTINCT col1 * 46 * + col0 + - col2 FROM tab0
----
156169
372472
94911

query I rowsort
SELECT ALL - 82 + 98 * col1 FROM tab1
----
1192
2466
898

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7811
SELECT + CAST( NULL AS DECIMAL ) - tab2.col1 AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7811
SELECT + CAST ( NULL AS REAL ) - tab2.col1 AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( + 8 AS REAL ) * - col2 * col1 FROM tab2
----
-12272
-5168
-6696

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - cor0.col2 col0 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT - cor0.col0 + - 99 FROM tab1 AS cor0
----
-102
-163
-179

query I rowsort
SELECT ALL + + cor0.col0 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - col2 col0 FROM tab1 AS cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + col1 col1 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT col0 * col1 * cor0.col1 - + col2 FROM tab0 AS cor0
----
177471
329314
736927

query I rowsort
SELECT + col1 * - col2 AS col0 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL - col1 * + ( - col2 ) - tab1.col1 AS col1 FROM tab1
----
1235
1378
560

query I rowsort
SELECT col2 * - col2 - - 33 AS col1 FROM tab1 AS cor0
----
-2883
-3216
-9183

query I rowsort
SELECT + col2 + col0 + + 56 AS col1 FROM tab0
----
113
227
92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7823
SELECT col2 * col0 * CAST( col0 * col2 AS SIGNED ) AS col1 FROM tab2
----
35721
4112784
9012004

skipif mysql # not compatible
query I rowsort label-7823
SELECT col2 * col0 * CAST ( col0 * col2 AS INTEGER ) AS col1 FROM tab2
----
35721
4112784
9012004

query I rowsort
SELECT col2 * col2 + - col1 * + col2 FROM tab2
----
-108
-858
798

onlyif mysql # use DIV operator for integer division
query I rowsort label-7825
SELECT DISTINCT - col0 DIV - col1 + tab2.col1 FROM tab2
----
21
31
60

skipif mysql # not compatible
query I rowsort label-7825
SELECT DISTINCT - col0 / - col1 + tab2.col1 FROM tab2
----
21
31
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-7826
SELECT + col0 DIV tab0.col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7826
SELECT + col0 / tab0.col1 FROM tab0
----
0
0
0

query I rowsort
SELECT - tab2.col2 * - col0 - 26 * + col2 AS col0 FROM tab2
----
-513
1352
2014

query I rowsort
SELECT DISTINCT - + 94 * col0 AS col0 FROM tab2 cor0
----
-658
-7332
-7426

onlyif mysql # use DIV operator for integer division
query I rowsort label-7829
SELECT + cor0.col2 * cor0.col1 + + col0 DIV - col0 + - col2 FROM tab0 cor0
----
2804
7379
95

skipif mysql # not compatible
query I rowsort label-7829
SELECT + cor0.col2 * cor0.col1 + + col0 / - col0 + - col2 FROM tab0 cor0
----
2804
7379
95

query I rowsort
SELECT ALL - col0 + - col1 + + 19 FROM tab2
----
-118
-19
-77

onlyif mysql # use DIV operator for integer division
query I rowsort label-7831
SELECT - 32 + col2 DIV + 98 + - col1 * - col0 * - 32 FROM tab0 cor0
----
-108672
-259200
-66080

skipif mysql # not compatible
query I rowsort label-7831
SELECT - 32 + col2 / + 98 + - col1 * - col0 * - 32 FROM tab0 cor0
----
-108672
-259200
-66080

query I rowsort
SELECT col1 * + 36 FROM tab2 AS cor0
----
1116
2124
612

onlyif mysql # use DIV operator for integer division
query I rowsort label-7833
SELECT DISTINCT - + col0 * col1 - col2 DIV + col1 FROM tab1 AS cor0
----
-1047
-645
-80

skipif mysql # not compatible
query I rowsort label-7833
SELECT DISTINCT - + col0 * col1 - col2 / + col1 FROM tab1 AS cor0
----
-1047
-645
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-7834
SELECT + col2 + col2 DIV 20 col0 FROM tab0 AS cor0
----
1
34
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7834
SELECT + col2 + col2 / 20 col0 FROM tab0 AS cor0
----
1
34
86

onlyif mysql # use DIV operator for integer division
query I rowsort label-7835
SELECT DISTINCT col2 DIV + CAST( col0 AS SIGNED ) + col0 AS col1 FROM tab2 AS cor0
----
10
78
79

skipif mysql # not compatible
query I rowsort label-7835
SELECT DISTINCT col2 / + CAST ( col0 AS INTEGER ) + col0 AS col1 FROM tab2 AS cor0
----
10
78
79

query I rowsort
SELECT ALL + col2 + ( 63 ) FROM tab1 cor0
----
117
120
159

onlyif mysql # use DIV operator for integer division
query I rowsort label-7837
SELECT - col2 DIV 77 + col2 + - col0 AS col0 FROM tab2 AS cor0
----
-41
-52
20

skipif mysql # not compatible
query I rowsort label-7837
SELECT - col2 / 77 + col2 + - col0 AS col0 FROM tab2 AS cor0
----
-41
-52
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 + col0 + col1 col2 FROM tab0 AS cor0
----
133
143
262

query I rowsort
SELECT ALL + cor0.col2 * + col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT - col0 * + col2 * cor0.col1 AS col2 FROM tab1 AS cor0
----
-36480
-4212
-99840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 * - col1 col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7842
SELECT DISTINCT tab1.col0 + col1 - + CAST( NULL AS SIGNED ) AS col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-7842
SELECT DISTINCT tab1.col0 + col1 - + CAST ( NULL AS INTEGER ) AS col1 FROM tab1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + col0 col1 FROM tab2
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-7844
SELECT DISTINCT + - cor0.col1 DIV - col1 AS col1 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-7844
SELECT DISTINCT + - cor0.col1 / - col1 AS col1 FROM tab0 AS cor0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * - 58 col2 FROM tab2 AS cor0
----
406
4524
4582

query I rowsort
SELECT ALL + - col1 + + col2 AS col1 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT + col1 + col2 * col2 * col0 FROM tab2 AS cor0
----
114093
5134
52787

query I rowsort
SELECT - + col2 * + col1 AS col0 FROM tab2 cor0
----
-1534
-646
-837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7849
SELECT DISTINCT + CAST( + 96 AS SIGNED ) FROM tab0
----
96

skipif mysql # not compatible
query I rowsort label-7849
SELECT DISTINCT + CAST ( + 96 AS INTEGER ) FROM tab0
----
96

query I rowsort
SELECT ALL + cor0.col0 * + col2 + + col1 * col1 AS col0 FROM tab1 AS cor0
----
3748
7849
838

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 28 + + 12 col2 FROM tab0 AS cor0
----
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 27 * 20 col0 FROM tab2 AS cor0
----
-540

query I rowsort
SELECT ALL + col0 + col1 * + col0 AS col0 FROM tab2 AS cor0
----
1422
224
4680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 33 + - col2 * col1 col0 FROM tab1 AS cor0
----
-1215
-1371
-537

query I rowsort
SELECT DISTINCT col2 * ( col0 ) + ( col1 ) FROM tab2 AS cor0
----
2087
220
3019

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7856
SELECT ALL + CAST( NULL AS DECIMAL ) * 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-7856
SELECT ALL + 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-7857
SELECT ALL + col0 + - 18 DIV - col1 FROM tab1 AS cor0
----
3
65
81

skipif mysql # not compatible
query I rowsort label-7857
SELECT ALL + col0 + - 18 / - col1 FROM tab1 AS cor0
----
3
65
81

query I rowsort
SELECT + 4 * - ( - col1 ) AS col0 FROM tab0 AS cor0
----
344
364
388

skipif mysql # not compatible
query I rowsort
SELECT ALL + - ( - 37 ) / cor0.col0 + - CAST ( col1 * col1 + + cor0.col0 AS REAL ) AS col2 FROM tab2 AS cor0
----
-3559
-368
-963

query I rowsort
SELECT DISTINCT col1 + + col2 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT DISTINCT + - 63 + col1 FROM tab1 AS cor0
----
-37
-50
-53

query I rowsort
SELECT ALL - ( + col1 ) * + col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL 23 - cor0.col2 FROM tab2, tab0 AS cor0
----
9 values hashing to d1836a526f68be3570b3257a702726fc

query I rowsort
SELECT + col0 * + col2 - col1 * col1 AS col0 FROM tab2 AS cor0
----
-1453
-772
2713

query I rowsort
SELECT DISTINCT - + col0 + col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT - 19 - col1 FROM tab1 AS cor0
----
-29
-32
-45

onlyif mysql # use DIV operator for integer division
query I rowsort label-7867
SELECT ALL - col1 * cor0.col2 DIV 32 + col0 col2 FROM tab0 AS cor0
----
-144
-64
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7867
SELECT ALL - col1 * cor0.col2 / 32 + col0 col2 FROM tab0 AS cor0
----
-144
-64
32

query I rowsort
SELECT ALL - 77 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 3a24155cb91ceff1e67bb51c07b72107

query I rowsort
SELECT - + col1 * - col2 * + col2 FROM tab1 AS cor0
----
119808
32490
75816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col2 ) + + 29 col2 FROM tab1 AS cor0
----
125
83
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + col1 col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT 56 FROM tab0 cor0
----
56
56
56

query I rowsort
SELECT ALL cor0.col0 * col2 + 93 * + col2 + col2 FROM tab1 cor0
----
16704
5238
9006

query I rowsort
SELECT + + cor0.col2 * - col0 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT + cor0.col2 * col2 + col0 FROM tab2 AS cor0
----
1523
736
754

onlyif mysql # use DIV operator for integer division
query I rowsort label-7876
SELECT ( col0 ) DIV - col1 + col0 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-7876
SELECT ( col0 ) / - col1 + col0 FROM tab0
----
24
35
89

query I rowsort
SELECT - + 32 AS col1 FROM tab0 AS cor0
----
-32
-32
-32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + + col1 col1 FROM tab1
----
20
26
52

query I rowsort
SELECT DISTINCT - + cor0.col1 AS col1 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
-10
-13
-26

query I rowsort
SELECT - - 28 AS col2 FROM tab1 AS cor0
----
28
28
28

query I rowsort
SELECT ALL col2 * - col1 + col1 * cor0.col2 * cor0.col2 AS col1 FROM tab1 AS cor0
----
118560
31920
74412

onlyif mysql # use DIV operator for integer division
query I rowsort label-7882
SELECT DISTINCT col1 - col0 DIV ( - col0 + - cor0.col1 ) AS col0 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-7882
SELECT DISTINCT col1 - col0 / ( - col0 + - cor0.col1 ) AS col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT col2 + + 17 AS col0 FROM tab1
----
113
71
74

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab0 cor2
----
972 values hashing to 8b4fcda7f1ca76bad7c7d728f54a51e0

query I rowsort
SELECT DISTINCT col0 + ( col2 ) AS col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT col0 * + 70 + 30 AS col1 FROM tab1
----
240
4510
5630

query I rowsort
SELECT DISTINCT - 34 AS col0 FROM tab0
----
-34

query I rowsort
SELECT ALL + 12 AS col0 FROM tab0 AS cor0
----
12
12
12

query I rowsort
SELECT DISTINCT + col2 * - cor0.col2 + + col0 - col0 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT 51 * col0 + col2 AS col1 FROM tab1
----
207
3321
4176

query I rowsort
SELECT DISTINCT + 96 + cor0.col0 AS col2 FROM tab0 AS cor0
----
120
131
185

query I rowsort
SELECT 51 AS col1 FROM tab0 AS cor0
----
51
51
51

query I rowsort
SELECT DISTINCT - col2 * 44 FROM tab1 cor0
----
-2376
-2508
-4224

query I rowsort
SELECT ALL + col2 + - 89 * + col0 FROM tab0 cor0
----
-2103
-3114
-7839

query I rowsort
SELECT DISTINCT + - 66 AS col1 FROM tab2 cor0
----
-66

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT + + 73 * cor0.col2 AS col2 FROM tab2 AS cor0
----
1898
1971
2774

query I rowsort
SELECT ALL col1 * ( col2 ) AS col0 FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT - tab2.col2 + - 37 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
-63
-64
-75

query I rowsort
SELECT - 65 * col0 FROM tab0
----
-1560
-2275
-5785

query I rowsort
SELECT - ( + 4 ) AS col1 FROM tab0
----
-4
-4
-4

query I rowsort
SELECT DISTINCT + col1 * col0 * col1 AS col0 FROM tab1
----
13520
2028
6400

query I rowsort
SELECT + - ( cor0.col1 ) * - cor0.col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + + col0 + col1 * - col2 AS col1 FROM tab0 cor0
----
-2814
-62
-7373

query I rowsort
SELECT ALL + 46 + 35 FROM tab1, tab0 cor0, tab1 AS cor1
----
27 values hashing to 0a85639e0dddbffdab2cb16b027cb360

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 84 * - col1 col0 FROM tab2
----
-1428
-2604
-4956

onlyif mysql # use DIV operator for integer division
query I rowsort label-7907
SELECT DISTINCT + col0 DIV col0 + - ( 38 ) * + tab0.col0 AS col1 FROM tab0
----
-1329
-3381
-911

skipif mysql # not compatible
query I rowsort label-7907
SELECT DISTINCT + col0 / col0 + - ( 38 ) * + tab0.col0 AS col1 FROM tab0
----
-1329
-3381
-911

query I rowsort
SELECT DISTINCT tab1.col1 + col0 * 70 AS col2 FROM tab1
----
236
4490
5613

query I rowsort
SELECT 42 AS col0 FROM tab0, tab0 AS cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to 4d49d5ffe533e92cf06d98cb59a19b10

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7910
SELECT DISTINCT - + CAST( cor0.col0 AS SIGNED ) AS col1 FROM tab1, tab0 cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-7910
SELECT DISTINCT - + CAST ( cor0.col0 AS INTEGER ) AS col1 FROM tab1, tab0 cor0
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-7911
SELECT col0 DIV col1 col1 FROM tab2 AS cor0
----
0
1
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7911
SELECT col0 / col1 col1 FROM tab2 AS cor0
----
0
1
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 46 col2 FROM tab2 AS cor0
----
-46

query I rowsort
SELECT - + col1 - - col1 * - cor0.col0 * col2 AS col2 FROM tab1 AS cor0
----
-36490
-4238
-99853

query I rowsort
SELECT ALL - - col2 * col2 + + col0 AS col0 FROM tab2 AS cor0
----
1523
736
754

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7915
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-7915
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
NULL

query I rowsort
SELECT + cor0.col2 + col1 * col1 + col2 AS col1 FROM tab0 AS cor0
----
7462
8445
9411

query I rowsort
SELECT + - col0 + - cor0.col1 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT cor0.col1 * ( col0 + - cor0.col1 ) AS col1 FROM tab0 AS cor0
----
-182
-5332
-6014

query I rowsort
SELECT col1 + - ( - 41 ) + + col0 FROM tab2
----
137
178
79

query I rowsort
SELECT + - cor0.col2 * - col2 + - col2 AS col0 FROM tab1 AS cor0
----
2862
3192
9120

query I rowsort
SELECT ALL col1 * - ( col0 ) * + col2 - col0 FROM tab2
----
-119730
-51113
-5866

query I rowsort
SELECT DISTINCT - col0 - col2 * 14 FROM tab0
----
-1237
-486
-49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + - col2 col2 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL cor0.col1 * - 67 AS col2 FROM tab2 AS cor0
----
-1139
-2077
-3953

query I rowsort
SELECT DISTINCT - col0 * + 54 FROM tab2 AS cor0
----
-378
-4212
-4266

query I rowsort
SELECT + ( + col0 ) + - col2 AS col2 FROM tab1 AS cor0
----
-16
-51
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7927
SELECT ALL + CAST( NULL AS SIGNED ) * - col1 AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7927
SELECT ALL + CAST ( NULL AS INTEGER ) * - col1 AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7928
SELECT DISTINCT CAST( col2 AS SIGNED ) + col1 AS col2 FROM tab1 AS cor0
----
109
67
80

skipif mysql # not compatible
query I rowsort label-7928
SELECT DISTINCT CAST ( col2 AS INTEGER ) + col1 AS col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT + - ( 95 ) AS col1 FROM tab1 AS cor0
----
-95

query I rowsort
SELECT DISTINCT 40 * - col1 FROM tab2 AS cor0
----
-1240
-2360
-680

query I rowsort
SELECT tab1.col0 + 12 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 3e253166fd9639397caabc16cdda9bff

onlyif mysql # use DIV operator for integer division
query I rowsort label-7932
SELECT ALL col2 DIV col0 col1 FROM tab2
----
0
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7932
SELECT ALL col2 / col0 col1 FROM tab2
----
0
0
3

query I rowsort
SELECT col0 * 24 AS col0 FROM tab1
----
1536
1920
72

query I rowsort
SELECT ALL + col0 * + tab1.col2 * 51 AS col0 FROM tab1
----
186048
391680
8262

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7935
SELECT DISTINCT col1 * + CAST( + col0 AS SIGNED ) FROM tab2
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-7935
SELECT DISTINCT col1 * + CAST ( + col0 AS INTEGER ) FROM tab2
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-7936
SELECT + - col2 * ( col0 ) - - col1 DIV col0 FROM tab1 AS cor0
----
-154
-3648
-7680

skipif mysql # not compatible
query I rowsort label-7936
SELECT + - col2 * ( col0 ) - - col1 / col0 FROM tab1 AS cor0
----
-154
-3648
-7680

query I rowsort
SELECT DISTINCT - - col1 * - ( - cor0.col1 ) FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT - 67 * col1 + - col2 * - 26 + + 95 * - cor0.col2 FROM tab2 AS cor0
----
-3761
-3940
-5747

query I rowsort
SELECT ( - tab0.col2 + col1 * 11 ) AS col1 FROM tab0
----
1066
913
919

query I rowsort
SELECT - - 66 + + col0 AS col2 FROM tab0 AS cor0
----
101
155
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-7941
SELECT + col0 + - col1 DIV col1 AS col0 FROM tab2
----
6
77
78

skipif mysql # not compatible
query I rowsort label-7941
SELECT + col0 + - col1 / col1 AS col0 FROM tab2
----
6
77
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col1 + col1 col0 FROM tab0
----
172
182
194

query I rowsort
SELECT + col2 * - col1 FROM tab2 AS cor0 WHERE NOT NULL NOT BETWEEN col1 + col0 AND NULL OR NOT - col1 BETWEEN col1 * col1 + + col1 AND NULL
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * cor0.col2 col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL - col1 * tab2.col2 * + col2 FROM tab2
----
-22599
-24548
-39884

query I rowsort
SELECT col0 + tab2.col1 AS col1 FROM tab2
----
137
38
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 - - col2 * tab2.col1 col0 FROM tab2
----
1593
663
868

query I rowsort
SELECT + col2 * col2 + tab2.col1 AS col2 FROM tab2
----
1461
735
760

query I rowsort
SELECT + col1 - col2 AS col1 FROM tab0
----
53
9
96

query I rowsort
SELECT DISTINCT + col1 - + col1 AS col0 FROM tab1 WHERE NULL NOT IN ( tab1.col2 / col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7951
SELECT + tab0.col0 + - col1 DIV - col0 + col0 FROM tab0
----
179
51
72

skipif mysql # not compatible
query I rowsort label-7951
SELECT + tab0.col0 + - col1 / - col0 + col0 FROM tab0
----
179
51
72

query I rowsort
SELECT DISTINCT col0 * col2 + col2 FROM tab2
----
2054
216
3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-7953
SELECT - col1 DIV - col2 + - col0 AS col0 FROM tab0 AS cor0
----
-22
-88
62

skipif mysql # not compatible
query I rowsort label-7953
SELECT - col1 / - col2 + - col0 AS col0 FROM tab0 AS cor0
----
-22
-88
62

query I rowsort
SELECT col0 * - col0 - col2 AS col1 FROM tab0 AS cor0
----
-1226
-609
-8003

query I rowsort
SELECT DISTINCT + - col0 + - col2 FROM tab0 cor0
----
-171
-36
-57

onlyif mysql # use DIV operator for integer division
query I rowsort label-7956
SELECT ALL - col1 * col2 DIV - col2 + col1 - col2 col2 FROM tab0 AS cor0
----
100
139
193

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7956
SELECT ALL - col1 * col2 / - col2 + col1 - col2 col2 FROM tab0 AS cor0
----
100
139
193

query I rowsort
SELECT + - col1 - col1 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT - col0 * cor0.col1 + - cor0.col0 * + col2 FROM tab1 AS cor0
----
-240
-4288
-8720

query I rowsort
SELECT - + col2 * - cor0.col1 + - col2 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT ALL col1 * col1 - col0 * col1 AS col0 FROM tab0 AS cor0
----
182
5332
6014

query I rowsort
SELECT DISTINCT - - cor0.col1 + col1 AS col2 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT ALL - + cor0.col2 + col2 AS col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col0 + cor0.col2 AS col1 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT + 40 - col0 FROM tab0
----
-49
16
5

query I rowsort
SELECT ( - col1 ) * + col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT + + 2 + col0 AS col2 FROM tab1 AS cor0
----
5
66
82

query I rowsort
SELECT DISTINCT - col1 * + col1 + + col0 FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT ALL + + col0 + col0 AS col2 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT + col0 + + col2 * col2 AS col1 FROM tab2 AS cor0
----
1523
736
754

query I rowsort
SELECT + 85 * + col0 FROM tab2 AS cor0
----
595
6630
6715

query I rowsort
SELECT + col2 * col2 + - col0 * - cor0.col0 FROM tab2 AS cor0
----
6760
7685
778

query I rowsort
SELECT + + cor0.col0 + - col1 * - col1 AS col0 FROM tab2 AS cor0
----
3559
368
968

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + col0 * col2 col1 FROM tab0 cor0
----
36
7380
825

query I rowsort
SELECT - col2 + col2 * cor0.col0 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT DISTINCT + + col1 + + cor0.col0 AS col1 FROM tab0 AS cor0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col2 col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT - cor0.col0 * cor0.col1 FROM tab0, tab0 cor0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col0 col2 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL + ( - col2 ) * + col2 FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT ALL - col2 FROM tab0 WHERE ( NULL ) >= NULL
----

query I rowsort
SELECT DISTINCT + col2 FROM tab2 WHERE NOT ( col0 ) < + col2
----
26
38

query I rowsort
SELECT ALL - col1 AS col1 FROM tab0 WHERE NULL BETWEEN NULL AND col1 * + col0 / - col2 + - col2
----

query I rowsort
SELECT DISTINCT + col0 + col1 AS col1 FROM tab1
----
29
74
93

query I rowsort
SELECT DISTINCT col0 * + col0 + col0 AS col1 FROM tab0
----
1260
600
8010

query I rowsort
SELECT ALL tab0.col1 * col2 + col2 * tab0.col1 FROM tab0
----
14924
194
5676

onlyif mysql # use DIV operator for integer division
query I rowsort label-7986
SELECT col0 DIV + col2 col2 FROM tab1
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7986
SELECT col0 / + col2 col2 FROM tab1
----
0
0
1

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT col1 + + col1 BETWEEN ( col1 ) AND + col1 - + col2 * col1
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT ALL col2 * + col0 + col2 AS col2 FROM tab1
----
216
3705
7776

query I rowsort
SELECT ALL - col2 + col2 * - col1 * col1 FROM tab1
----
-16320
-36558
-5757

query I rowsort
SELECT ALL + col0 AS col1 FROM tab0 WHERE NOT ( NULL ) = + col2 * col2
----

query I rowsort
SELECT 45 * - col0 FROM tab2 AS cor0
----
-315
-3510
-3555

query I rowsort
SELECT DISTINCT + tab2.col0 + + tab2.col1 AS col1 FROM tab2
----
137
38
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7993
SELECT - ( - col0 ) * + CAST( NULL AS SIGNED ) * col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7993
SELECT - ( - col0 ) * + CAST ( NULL AS INTEGER ) * col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 63 + + col1 AS col0 FROM tab2 AS cor0
----
122
80
94

query I rowsort
SELECT DISTINCT + tab2.col2 * col2 AS col0 FROM tab2 WHERE NOT + col1 BETWEEN NULL AND + col0
----
729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 - - col1 * - col2 col0 FROM tab2
----
-1475
-629
-806

query I rowsort
SELECT tab1.col0 AS col1 FROM tab1 WHERE NOT NULL IN ( + col0 )
----

query III rowsort
SELECT * FROM tab2 WHERE + col1 * col0 >= NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7999
SELECT ALL + col0 DIV + cor0.col1 AS col2 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7999
SELECT ALL + col0 / + cor0.col1 AS col2 FROM tab0 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8000
SELECT ALL col1 DIV col1 - - cor0.col2 * + col2 col0 FROM tab0 AS cor0
----
1090
2
6725

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8000
SELECT ALL col1 / col1 - - cor0.col2 * + col2 col0 FROM tab0 AS cor0
----
1090
2
6725

query I rowsort
SELECT ALL col2 - - cor0.col1 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-8002
SELECT DISTINCT + col2 * + col0 DIV - col0 + col2 * - col1 AS col2 FROM tab0
----
-2871
-7544
-98

skipif mysql # not compatible
query I rowsort label-8002
SELECT DISTINCT + col2 * + col0 / - col0 + col2 * - col1 AS col2 FROM tab0
----
-2871
-7544
-98

query I rowsort
SELECT ALL col1 FROM tab1 WHERE NOT NULL NOT IN ( tab1.col1 * col2 + - col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-8004
SELECT DISTINCT col1 + col1 DIV col2 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-8004
SELECT DISTINCT col1 + col1 / col2 FROM tab1
----
10
13
26

query I rowsort
SELECT - col1 + + col1 * - col1 * col0 + col2 * col1 FROM tab2 WHERE NOT NULL IN ( + col1 * col1 )
----

query I rowsort
SELECT ALL col1 * col2 FROM tab0 WHERE NULL = + col0
----

query I rowsort
SELECT col1 * + col0 + + col2 FROM tab2
----
1381
244
4628

query I rowsort
SELECT ALL col0 AS col1 FROM tab0 WHERE NULL IN ( + col0 )
----

query I rowsort
SELECT ALL col0 * + col2 + col0 AS col1 FROM tab1
----
165
3712
7760

query I rowsort
SELECT ALL tab1.col0 + col0 * tab1.col2 AS col2 FROM tab1
----
165
3712
7760

query I rowsort
SELECT - col2 * col0 * - col0 + col1 * col1 + + col0 FROM tab1
----
1165
233636
614649

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT NULL < ( col1 )
----

query I rowsort
SELECT col1 + col0 * tab0.col0 AS col1 FROM tab0
----
1322
662
8012

query I rowsort
SELECT ALL col1 * + col0 + - col2 * + col0 FROM tab2
----
-1659
2574
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-8015
SELECT ALL col0 DIV col0 + col1 FROM tab0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-8015
SELECT ALL col0 / col0 + col1 FROM tab0
----
87
92
98

query I rowsort
SELECT + col0 + + cor0.col0 AS col1 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT DISTINCT col1 + - col0 * - col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT DISTINCT col0 - col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT - tab1.col2 * col0 + col2 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT DISTINCT col2 + + col2 * col2 FROM tab0
----
1122
2
6806

query I rowsort
SELECT - 8 + col1 * + 69 FROM tab1 AS cor0
----
1786
682
889

onlyif mysql # use DIV operator for integer division
query I rowsort label-8022
SELECT col0 * col0 + col2 DIV col0 FROM tab2 cor0
----
52
6084
6241

skipif mysql # not compatible
query I rowsort label-8022
SELECT col0 * col0 + col2 / col0 FROM tab2 cor0
----
52
6084
6241

query I rowsort
SELECT col0 * col2 * + col0 + - cor0.col1 AS col0 FROM tab1 AS cor0
----
233462
460
614387

query I rowsort
SELECT - + col0 - - col2 * ( col1 ) FROM tab2 cor0
----
1456
567
830

query I rowsort
SELECT + - col2 * col1 + col2 * 31 AS col0 FROM tab2 AS cor0
----
-728
0
532

query I rowsort
SELECT DISTINCT - ( col2 ) AS col1 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT + - ( + 50 ) FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to faf91d5263c18db4877a3c30c47e2487

query I rowsort
SELECT 51 * + col0 - 49 AS col1 FROM tab1 AS cor0
----
104
3215
4031

query I rowsort
SELECT + 97 * col2 + col0 + 3 AS col0 FROM tab0 AS cor0
----
135
3228
8046

query I rowsort
SELECT DISTINCT - cor0.col0 + + 45 + col2 FROM tab2 AS cor0
----
-7
4
65

query I rowsort
SELECT + 86 * - 36 FROM tab2 AS cor0
----
-3096
-3096
-3096

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0, tab0 cor1, tab0, tab1 AS cor2
----
3645 values hashing to ea1a922b7fccb9d184b31eb4689e063b

query I rowsort
SELECT - 67 FROM tab0, tab0 AS cor0
----
9 values hashing to fbe03b15d6b951410b38f7e98895006f

query I rowsort
SELECT + 34 * + col1 AS col1 FROM tab2 AS cor0
----
1054
2006
578

query I rowsort
SELECT DISTINCT + ( 91 ) + col1 FROM tab1 AS cor0
----
101
104
117

query I rowsort
SELECT ALL - tab0.col1 * + col2 AS col0 FROM tab0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-8037
SELECT + col2 * - 15 + col1 DIV + ( tab1.col1 ) AS col1 FROM tab1
----
-1439
-809
-854

skipif mysql # not compatible
query I rowsort label-8037
SELECT + col2 * - 15 + col1 / + ( tab1.col1 ) AS col1 FROM tab1
----
-1439
-809
-854

query I rowsort
SELECT - tab2.col2 - tab2.col1 FROM tab2
----
-55
-58
-85

query I rowsort
SELECT - + 89 * col1 * - cor0.col1 AS col0 FROM tab2 cor0
----
25721
309809
85529

query I rowsort
SELECT DISTINCT + col2 * + col0 * + col2 AS col2 FROM tab0
----
26136
35
598436

query I rowsort
SELECT DISTINCT 69 * + col2 + + ( 72 ) AS col1 FROM tab0 AS cor0
----
141
2349
5730

query I rowsort
SELECT col0 * col1 * - 60 FROM tab2 AS cor0
----
-13020
-276120
-80580

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - + ( col0 ) * + CAST ( col0 AS REAL ) AS col0 FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT - 10 AS col1 FROM tab0 AS cor0
----
-10
-10
-10

query I rowsort
SELECT DISTINCT - col2 * col2 + - 24 + col0 * - col0 AS col1 FROM tab0 AS cor0
----
-1250
-14669
-1689

query I rowsort
SELECT ALL - col2 * cor0.col2 - col1 FROM tab0 AS cor0
----
-1175
-6815
-98

query I rowsort
SELECT ALL + col1 + - 61 * col2 AS col1 FROM tab2
----
-1527
-1616
-2301

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8048
SELECT col2 * CAST( NULL AS SIGNED ) AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8048
SELECT col2 * CAST ( NULL AS INTEGER ) AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + 63 FROM tab2 cor0
----
63

query I rowsort
SELECT + cor0.col1 * 32 * col0 AS col1 FROM tab0 AS cor0
----
108640
259168
66048

query I rowsort
SELECT + 93 + + cor0.col0 * cor0.col1 FROM tab1 AS cor0
----
1133
171
733

query I rowsort
SELECT ALL - 45 * - col1 AS col0 FROM tab0 AS cor0
----
3870
4095
4365

query I rowsort
SELECT - - cor0.col0 * ( + col1 ) + + col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT ALL - col1 + cor0.col0 * col0 AS col0 FROM tab0 AS cor0
----
1128
490
7830

query I rowsort
SELECT + 48 * + col1 AS col1 FROM tab1 AS cor0
----
1248
480
624

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + 93 * col2 - col0 col2 FROM tab0 AS cor0
----
263910
693877
8986

onlyif mysql # use DIV operator for integer division
query I rowsort label-8057
SELECT + cor0.col1 + col2 DIV - col0 FROM tab0 cor0
----
85
91
97

skipif mysql # not compatible
query I rowsort label-8057
SELECT + cor0.col1 + col2 / - col0 FROM tab0 cor0
----
85
91
97

query I rowsort
SELECT DISTINCT ( + col2 ) * + col2 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT ( + cor0.col0 ) FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + - 44 AS col0 FROM tab0 AS cor0
----
-44

query I rowsort
SELECT DISTINCT - col1 * cor0.col1 AS col2 FROM tab2 cor0
----
-289
-3481
-961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8062
SELECT col1 + CAST( NULL AS DECIMAL ) * 80 * - cor0.col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8062
SELECT col1 + CAST ( NULL AS REAL ) * 80 * - cor0.col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT cor1.col2 FROM tab1, tab0 AS cor0, tab0 cor1
----
1
33
82

query I rowsort
SELECT + 4 FROM tab2, tab1 AS cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

query I rowsort
SELECT + col2 * - col1 * col2 FROM tab0 AS cor0
----
-611884
-93654
-97

query I rowsort
SELECT - tab1.col1 + - col2 * - col2 FROM tab1
----
2890
3239
9203

query I rowsort
SELECT - col0 * 61 + - 70 * tab2.col0 AS col0 FROM tab2
----
-10218
-10349
-917

query I rowsort
SELECT DISTINCT - 80 FROM tab0, tab2 AS cor0
----
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-8069
SELECT + col2 DIV + ( - col1 * - col0 ) + - col2 DIV + col1 FROM tab2
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-8069
SELECT + col2 / + ( - col1 * - col0 ) + - col2 / + col1 FROM tab2
----
-2
0
0

query I rowsort
SELECT DISTINCT + 40 FROM tab0, tab0 AS cor0
----
40

onlyif mysql # use DIV operator for integer division
query I rowsort label-8071
SELECT DISTINCT col0 * + col0 DIV col0 col0 FROM tab1
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8071
SELECT DISTINCT col0 * + col0 / col0 col0 FROM tab1
----
3
64
80

query I rowsort
SELECT DISTINCT col2 * col2 * col1 FROM tab2
----
22599
24548
39884

query I rowsort
SELECT DISTINCT + col2 + - col2 * + tab1.col1 FROM tab1
----
-1152
-1350
-513

query I rowsort
SELECT - col0 + + col1 * + col1 FROM tab2 cor0
----
210
3403
954

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 8 * + cor0.col0 + + col1 col2 FROM tab0 AS cor0
----
278
377
803

onlyif mysql # use DIV operator for integer division
query I rowsort label-8076
SELECT DISTINCT cor0.col0 - col0 DIV - ( - cor0.col0 * cor0.col1 ) FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-8076
SELECT DISTINCT cor0.col0 - col0 / - ( - cor0.col0 * cor0.col1 ) FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT col1 * col1 + - cor0.col0 AS col1 FROM tab2 AS cor0
----
210
3403
954

query I rowsort
SELECT ALL + 96 + + col1 AS col1 FROM tab2 AS cor0
----
113
127
155

query I rowsort
SELECT DISTINCT - + col0 + col0 + + col1 FROM tab1 cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-8080
SELECT ALL - + col1 DIV col1 + 15 FROM tab0 AS cor0
----
14
14
14

skipif mysql # not compatible
query I rowsort label-8080
SELECT ALL - + col1 / col1 + 15 FROM tab0 AS cor0
----
14
14
14

query I rowsort
SELECT DISTINCT + cor0.col2 - col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT - + 53 + col1 * + col1 AS col0 FROM tab2 cor0
----
236
3428
908

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col2 * col1 col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL tab2.col2 FROM tab2, tab0, tab1 AS cor0, tab2 AS cor1
----
81 values hashing to c4e6b1f1d28e731664a15a6f7cda4da9

query I rowsort
SELECT 34 - - col0 FROM tab1
----
114
37
98

query I rowsort
SELECT col1 + + tab2.col0 * + tab2.col2 + col2 AS col1 FROM tab2
----
2113
247
3057

onlyif mysql # use DIV operator for integer division
query I rowsort label-8087
SELECT + tab0.col1 * + col1 * - col2 + 27 DIV ( col2 ) FROM tab0
----
-244068
-679042
-9382

skipif mysql # not compatible
query I rowsort label-8087
SELECT + tab0.col1 * + col1 * - col2 + 27 / ( col2 ) FROM tab0
----
-244068
-679042
-9382

query I rowsort
SELECT 56 * col2 FROM tab2
----
1456
1512
2128

query I rowsort
SELECT - 63 * - col2 * + ( 15 ) FROM tab2
----
24570
25515
35910

query I rowsort
SELECT - - 26 + 28 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

onlyif mysql # use DIV operator for integer division
query I rowsort label-8091
SELECT - - col2 + col2 DIV col0 AS col1 FROM tab1 AS cor0
----
57
72
97

skipif mysql # not compatible
query I rowsort label-8091
SELECT - - col2 + col2 / col0 AS col1 FROM tab1 AS cor0
----
57
72
97

query I rowsort
SELECT ALL 57 * col2 + + ( col1 ) FROM tab2 AS cor0
----
1541
1570
2183

query I rowsort
SELECT ALL - + col1 * col0 + - 61 FROM tab1 AS cor0
----
-1101
-139
-701

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - col1 col1 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT + col0 + col0 * + 55 AS col1 FROM tab1 AS cor0
----
168
3584
4480

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8096
SELECT col0 + - col2 * CAST( col0 AS SIGNED ) FROM tab2 AS cor0
----
-182
-1950
-2923

skipif mysql # not compatible
query I rowsort label-8096
SELECT col0 + - col2 * CAST ( col0 AS INTEGER ) FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT ALL - - 91 + col2 AS col2 FROM tab1 AS cor0
----
145
148
187

onlyif mysql # use DIV operator for integer division
query I rowsort label-8098
SELECT ALL - ( - col1 ) DIV - col1 + 65 FROM tab2 AS cor0
----
64
64
64

skipif mysql # not compatible
query I rowsort label-8098
SELECT ALL - ( - col1 ) / - col1 + 65 FROM tab2 AS cor0
----
64
64
64

query I rowsort
SELECT DISTINCT - col2 + + col2 + 59 AS col0 FROM tab1 AS cor0
----
59

query I rowsort
SELECT - col0 + - col2 + ( + col2 ) * col1 * tab1.col0 FROM tab1
----
36359
4155
99664

query I rowsort
SELECT ALL - + cor0.col2 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query I rowsort
SELECT ALL 38 * col0 * + 89 + col1 AS col0 FROM tab0
----
118467
301089
81254

query I rowsort
SELECT ALL - 73 + + col0 AS col1 FROM tab1
----
-70
-9
7

query I rowsort
SELECT cor0.col1 + + tab1.col2 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 79300974cd337dec3680ee4f303be693

query I rowsort
SELECT ALL - 53 AS col2 FROM tab2 cor0
----
-53
-53
-53

query I rowsort
SELECT ALL + col1 * + 37 AS col0 FROM tab0 AS cor0
----
3182
3367
3589

onlyif mysql # use DIV operator for integer division
query I rowsort label-8107
SELECT ALL - + col2 DIV 78 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-8107
SELECT ALL - + col2 / 78 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT col1 * - ( + col0 ) FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT - col0 * col2 + col2 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT - col0 * + ( col2 ) * + col0 + + ( 46 ) FROM tab1 AS cor0
----
-233426
-440
-614354

query I rowsort
SELECT - col2 + ( col0 * cor0.col2 ) FROM tab1 AS cor0
----
108
3591
7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-8112
SELECT 5 DIV 26 col0 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8112
SELECT 5 / 26 col0 FROM tab0
----
0
0
0

query I rowsort
SELECT - 81 + col2 AS col0 FROM tab0 AS cor0
----
-48
-80
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 64 * - col1 col0 FROM tab2 AS cor0
----
1088
1984
3776

onlyif mysql # use DIV operator for integer division
query I rowsort label-8115
SELECT + + cor0.col2 - col0 DIV - col1 FROM tab2 AS cor0
----
27
27
42

skipif mysql # not compatible
query I rowsort label-8115
SELECT + + cor0.col2 - col0 / - col1 FROM tab2 AS cor0
----
27
27
42

query I rowsort
SELECT col0 * + 2 * tab0.col0 FROM tab0
----
1152
15842
2450

onlyif mysql # use DIV operator for integer division
query I rowsort label-8117
SELECT DISTINCT - col0 DIV + col2 + - col1 FROM tab0
----
-132
-86
-92

skipif mysql # not compatible
query I rowsort label-8117
SELECT DISTINCT - col0 / + col2 + - col1 FROM tab0
----
-132
-86
-92

onlyif mysql # use DIV operator for integer division
query I rowsort label-8118
SELECT 16 DIV 67 col0 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8118
SELECT 16 / 67 col0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8119
SELECT DISTINCT + - col1 DIV + col2 col2 FROM tab1 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8119
SELECT DISTINCT + - col1 / + col2 col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT + - ( - col0 ) * + col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT - + 21 * col1 + - col1 * - col0 + 86 AS col1 FROM tab2 AS cor0
----
-348
1072
3449

query I rowsort
SELECT - 68 * - col1 FROM tab2 AS cor0
----
1156
2108
4012

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 36 + col1 * col1 * + col0 col1 FROM tab0 AS cor0
----
177540
329351
737045

query I rowsort
SELECT + cor0.col0 - - 64 * col0 AS col2 FROM tab0 cor0
----
1560
2275
5785

onlyif mysql # use DIV operator for integer division
query I rowsort label-8125
SELECT ALL - + col1 DIV - 73 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8125
SELECT ALL - + col1 / - 73 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT - col1 + - 41 FROM tab0 AS cor0
----
-127
-132
-138

query I rowsort
SELECT + + cor0.col2 * - col2 AS col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT - 36 * + col1 FROM tab2 AS cor0
----
-1116
-2124
-612

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( - col1 AS REAL ) FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT - 82 AS col0 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to ce62f59690969f4492d78eb57c3181f0

query I rowsort
SELECT 57 + col1 FROM tab1 AS cor0
----
67
70
83

query I rowsort
SELECT col2 * col0 - ( ( col0 ) ) AS col1 FROM tab0 AS cor0
----
0
7209
768

onlyif mysql # use DIV operator for integer division
query I rowsort label-8133
SELECT - + cor0.col1 + + col1 * col0 DIV - col2 FROM tab1 AS cor0
----
-21
-23
-27

skipif mysql # not compatible
query I rowsort label-8133
SELECT - + cor0.col1 + + col1 * col0 / - col2 FROM tab1 AS cor0
----
-21
-23
-27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col1 + col0 col1 FROM tab2 AS cor0
----
137
38
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8135
SELECT + + col1 * CAST( 16 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
272
496
944

skipif mysql # not compatible
query I rowsort label-8135
SELECT + + col1 * CAST ( 16 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
272
496
944

query I rowsort
SELECT - 22 FROM tab0, tab1 AS cor0
----
9 values hashing to fae46f8148b02964f7145eb6ed5819f9

query I rowsort
SELECT - - ( ( + col0 ) ) FROM tab0 AS cor0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8138
SELECT - - CAST( NULL AS SIGNED ) + - col0 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8138
SELECT - - CAST ( NULL AS INTEGER ) + - col0 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col2 + - col1 AS col1 FROM tab0 AS cor0
----
-119
-173
-98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8140
SELECT ALL + - CAST( + col1 AS SIGNED ) col1 FROM tab2 AS cor0
----
-17
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8140
SELECT ALL + - CAST ( + col1 AS INTEGER ) col1 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT 94 * + col0 + 38 AS col0 FROM tab0 AS cor0
----
2294
3328
8404

query I rowsort
SELECT ALL 51 + + col2 FROM tab2 AS cor0
----
77
78
89

query I rowsort
SELECT ALL + cor0.col1 * col0 + - 66 AS col1 FROM tab0 AS cor0
----
1998
3329
8033

query I rowsort
SELECT + - cor0.col1 + + col2 AS col1 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT col0 + + 70 AS col2 FROM tab0
----
105
159
94

query I rowsort
SELECT cor0.col0 * - 39 FROM tab0, tab2 cor0, tab1 AS cor1
----
27 values hashing to 40c54fdfbe91a400b0adfb4daf0199e7

query I rowsort
SELECT DISTINCT + ( cor0.col2 ) FROM tab0, tab1, tab2 cor0
----
26
27
38

query I rowsort
SELECT + 0 * - cor1.col0 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col1 ) col2 FROM tab2
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-8150
SELECT DISTINCT + col2 DIV tab1.col1 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-8150
SELECT DISTINCT + col2 / tab1.col1 FROM tab1
----
2
5
7

query I rowsort
SELECT ALL - cor0.col1 + - ( + 32 ) AS col1 FROM tab0 AS cor0
----
-118
-123
-129

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8152
SELECT CAST( NULL AS SIGNED ) * + cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-8152
SELECT CAST ( NULL AS INTEGER ) * + cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL - - cor0.col1 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT - col2 * col1 * - col0 AS col1 FROM tab2
----
119652
51034
5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-8155
SELECT ALL tab0.col0 DIV - col1 AS col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8155
SELECT ALL tab0.col0 / - col1 AS col1 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8156
SELECT 65 DIV - col1 FROM tab2
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-8156
SELECT 65 / - col1 FROM tab2
----
-1
-2
-3

query I rowsort
SELECT ALL + 91 * cor0.col0 AS col0 FROM tab2 AS cor0
----
637
7098
7189

onlyif mysql # use DIV operator for integer division
query I rowsort label-8158
SELECT ALL - - ( col2 ) DIV - col0 AS col0 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-8158
SELECT ALL - - ( col2 ) / - col0 AS col0 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT DISTINCT + col0 * col0 - col1 FROM tab1
----
-17
4086
6387

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col1 ) col1 FROM tab2
----
17
31
59

query I rowsort
SELECT DISTINCT + tab1.col0 + - 39 - col0 AS col1 FROM tab1
----
-39

query I rowsort
SELECT DISTINCT + col0 + col0 * - col1 + 16 * col2 * - tab0.col1 FROM tab0
----
-127402
-47448
-4912

query I rowsort
SELECT 31 * col2 FROM tab2 AS cor0
----
1178
806
837

query I rowsort
SELECT + + col2 + col0 * col1 FROM tab1 AS cor0
----
1136
132
697

onlyif mysql # use DIV operator for integer division
query I rowsort label-8165
SELECT ALL - tab2.col2 DIV + 58 FROM tab2, tab2 AS cor0, tab0, tab1 AS cor1
----
81 values hashing to 1f117f467f45d8c6b7553e2e3c842942

skipif mysql # not compatible
query I rowsort label-8165
SELECT ALL - tab2.col2 / + 58 FROM tab2, tab2 AS cor0, tab0, tab1 AS cor1
----
81 values hashing to 1f117f467f45d8c6b7553e2e3c842942

query I rowsort
SELECT + - col0 * col2 - - col2 AS col2 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT col1 + + col2 * 92 * col2 FROM tab0 cor0
----
100274
189
618699

query I rowsort
SELECT DISTINCT - + 91 * col1 FROM tab0 AS cor0
----
-7826
-8281
-8827

query I rowsort
SELECT + col1 * col2 + col1 AS col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT - 20 + cor0.col0 AS col2 FROM tab1 AS cor0
----
-17
44
60

query I rowsort
SELECT col1 * + col1 + ( col2 ) FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT + 0 + + col1 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT DISTINCT col1 * ( col1 ) + 75 AS col2 FROM tab2 AS cor0
----
1036
3556
364

query I rowsort
SELECT DISTINCT + col0 - - col2 AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT + col1 * + ( + col1 + 93 ) FROM tab2 AS cor0
----
1870
3844
8968

query I rowsort
SELECT col1 * 98 + col1 * ( - 54 ) AS col2 FROM tab2
----
1364
2596
748

query I rowsort
SELECT ALL 71 * cor0.col1 FROM tab1 AS cor0
----
1846
710
923

query I rowsort
SELECT + + ( - col2 ) AS col2 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT - col1 * + 77 FROM tab2 cor0
----
-1309
-2387
-4543

onlyif mysql # use DIV operator for integer division
query I rowsort label-8180
SELECT - col0 DIV 7 FROM tab1 AS cor0
----
-11
-9
0

skipif mysql # not compatible
query I rowsort label-8180
SELECT - col0 / 7 FROM tab1 AS cor0
----
-11
-9
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8181
SELECT + col2 DIV - 88 AS col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8181
SELECT + col2 / - 88 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT col1 + col1 + col1 FROM tab2 AS cor0
----
177
51
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-8183
SELECT ALL ( + col0 ) DIV + col1 AS col1 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-8183
SELECT ALL ( + col0 ) / + col1 AS col1 FROM tab2 AS cor0
----
0
1
4

query I rowsort
SELECT DISTINCT 15 + col1 * + col0 AS col0 FROM tab2 AS cor0
----
1358
232
4617

query I rowsort
SELECT DISTINCT - - 17 * + col2 AS col0 FROM tab2 AS cor0
----
442
459
646

query I rowsort
SELECT DISTINCT - + col0 + col2 AS col1 FROM tab0 AS cor0
----
-34
-7
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-8187
SELECT DISTINCT + col2 DIV - tab1.col0 AS col2 FROM tab1
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-8187
SELECT DISTINCT + col2 / - tab1.col0 AS col2 FROM tab1
----
-1
-18
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8188
SELECT DISTINCT - col0 * - 88 * + col1 + CAST( + 60 AS SIGNED ) * - col1 FROM tab2
----
117164
17236
401436

skipif mysql # not compatible
query I rowsort label-8188
SELECT DISTINCT - col0 * - 88 * + col1 + CAST ( + 60 AS INTEGER ) * - col1 FROM tab2
----
117164
17236
401436

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col1 FROM tab0, tab2, tab2 AS cor0, tab0 AS cor1
----
81 values hashing to a5b6acb471910ea4ad7f31cae3b818f7

query I rowsort
SELECT ALL - col2 * - ( - col2 ) * + col0 + 80 FROM tab1 AS cor0
----
-207856
-737200
-8668

query I rowsort
SELECT DISTINCT - - col1 * - col2 - - col2 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT ALL - col0 * + col0 + + col1 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT - - cor0.col1 - + 37 AS col0 FROM tab1 AS cor0
----
-11
-24
-27

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8194
SELECT ALL + col1 * - ( - col1 ) + - col0 + + CAST( + col2 AS SIGNED ) AS col2 FROM tab0 cor0
----
7405
8274
9375

skipif mysql # not compatible
query I rowsort label-8194
SELECT ALL + col1 * - ( - col1 ) + - col0 + + CAST ( + col2 AS INTEGER ) AS col2 FROM tab0 cor0
----
7405
8274
9375

query I rowsort
SELECT ALL + - cor0.col1 + col1 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + - col2 * + col1 * 76 + col2 AS col1 FROM tab1 AS cor0
----
-106650
-43263
-94752

query I rowsort
SELECT ALL col2 * + ( - 83 ) + col2 FROM tab2 AS cor0
----
-2132
-2214
-3116

query I rowsort
SELECT + - col0 - + col0 AS col2 FROM tab0 AS cor0
----
-178
-48
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-8199
SELECT ALL - col1 DIV cor0.col2 + col2 * - cor0.col1 FROM tab0 AS cor0
----
-194
-2840
-7463

skipif mysql # not compatible
query I rowsort label-8199
SELECT ALL - col1 / cor0.col2 + col2 * - cor0.col1 FROM tab0 AS cor0
----
-194
-2840
-7463

query I rowsort
SELECT col1 * col1 + + ( col2 ) + - col2 FROM tab0
----
7396
8281
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-8201
SELECT - col1 DIV + col1 + + CAST( col0 AS SIGNED ) * col1 - col1 DIV + col0 AS col1 FROM tab2
----
1342
212
4601

skipif mysql # not compatible
query I rowsort label-8201
SELECT - col1 / + col1 + + CAST ( col0 AS INTEGER ) * col1 - col1 / + col0 AS col1 FROM tab2
----
1342
212
4601

query I rowsort
SELECT DISTINCT - col2 + + 11 FROM tab0
----
-22
-71
10

query I rowsort
SELECT - - col2 + ( 31 ) FROM tab1 AS cor0
----
127
85
88

query I rowsort
SELECT + col2 * - col0 + - col0 AS col0 FROM tab2 AS cor0
----
-196
-2106
-3081

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8205
SELECT ALL - col2 + - CAST( 23 + - col0 AS SIGNED ) * 63 FROM tab0
----
30
4076
755

skipif mysql # not compatible
query I rowsort label-8205
SELECT ALL - col2 + - CAST ( 23 + - col0 AS INTEGER ) * 63 FROM tab0
----
30
4076
755

query I rowsort
SELECT col0 * tab2.col0 AS col1 FROM tab2
----
49
6084
6241

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab2, tab1 cor1, tab1 AS cor2
----
972 values hashing to fe55095fff3a5ecc2f113d14a8c6f823

query I rowsort
SELECT - col2 * + ( + cor0.col0 ) FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - col2 + cor0.col2 * + cor0.col1 AS col1 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT col1 * 86 + cor0.col1 FROM tab2 cor0
----
1479
2697
5133

query I rowsort
SELECT 93 * + col1 AS col1 FROM tab1 AS cor0
----
1209
2418
930

query I rowsort
SELECT ALL + tab2.col0 * 76 * 84 + - col0 FROM tab2
----
44681
497874
504257

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8213
SELECT col2 * CAST( ( col1 ) AS SIGNED ) FROM tab0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-8213
SELECT col2 * CAST ( ( col1 ) AS INTEGER ) FROM tab0
----
2838
7462
97

query I rowsort
SELECT ALL tab0.col2 + col1 AS col2 FROM tab0
----
119
173
98

query I rowsort
SELECT ALL - tab1.col0 + 3 AS col0 FROM tab1
----
-61
-77
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8216
SELECT col2 DIV 31 AS col0 FROM tab1
----
1
1
3

skipif mysql # not compatible
query I rowsort label-8216
SELECT col2 / 31 AS col0 FROM tab1
----
1
1
3

query I rowsort
SELECT DISTINCT col0 * + tab2.col2 + + tab2.col0 FROM tab2
----
196
2106
3081

query I rowsort
SELECT 45 FROM tab2, tab0 cor0
----
9 values hashing to 60b9f935ee8e404d155a2f5e9515c050

onlyif mysql # use DIV operator for integer division
query I rowsort label-8219
SELECT + + col2 DIV col2 + col1 * - col2 col1 FROM tab1 AS cor0
----
-1247
-1403
-569

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8219
SELECT + + col2 / col2 + col1 * - col2 col1 FROM tab1 AS cor0
----
-1247
-1403
-569

query I rowsort
SELECT ALL + 99 * - cor0.col1 FROM tab1 AS cor0
----
-1287
-2574
-990

query I rowsort
SELECT DISTINCT - + col1 + + col0 * col2 FROM tab2 cor0
----
158
1969
2985

query I rowsort
SELECT ALL + ( col0 ) + - col0 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT ( + col0 ) AS col1 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT + 23 + + 74 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 5e0d31ac41981bcdf6a665538a71a09c

query I rowsort
SELECT + + 6 * + col1 FROM tab1 AS cor0
----
156
60
78

query I rowsort
SELECT DISTINCT + 70 AS col1 FROM tab0 AS cor0
----
70

query I rowsort
SELECT ALL col2 * + ( - col1 ) AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + 80 * - cor0.col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 29ef2a61c78243ed711c9f440afaf87f

query I rowsort
SELECT ALL - col1 + col2 * - 31 FROM tab1 AS cor0
----
-1700
-1777
-2989

query I rowsort
SELECT ALL col1 * - ( - col1 ) AS col1 FROM tab1
----
100
169
676

query I rowsort
SELECT ALL - tab2.col1 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT ALL - 66 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to a408108d423d7784b7d610cb779e515a

query I rowsort
SELECT - 47 AS col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to a4d3a02c376c52ddb0a38a801f7b50d5

query I rowsort
SELECT - col0 * ( - col0 ) FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT + tab2.col0 * - col1 * col0 AS col0 FROM tab2
----
-106097
-1519
-358956

query I rowsort
SELECT ALL + cor0.col1 * - 47 + + 11 - col0 * - col1 AS col1 FROM tab0 AS cor0
----
-1153
-1967
3833

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor1.col0 col1 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT ALL + 35 FROM tab0, tab2 AS cor0, tab0 cor1
----
27 values hashing to 0d13dfd4c4a9d51ace3582c31cadcdbc

query I rowsort
SELECT DISTINCT - cor0.col1 * - col0 + col0 AS col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT DISTINCT col0 * 66 + 94 AS col2 FROM tab1 AS cor0
----
292
4318
5374

query I rowsort
SELECT DISTINCT - cor0.col2 - - 85 * cor0.col1 AS col1 FROM tab0 AS cor0
----
7277
7653
8244

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + - col2 col1 FROM tab2 AS cor0
----
-21
33
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col2 - col0 col0 FROM tab1
----
-121
-176
-57

query I rowsort
SELECT - col2 * col1 + col2 AS col0 FROM tab0
----
-2805
-7380
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 col0 FROM tab1 WHERE col0 * col0 NOT BETWEEN ( NULL ) AND ( NULL )
----

query I rowsort
SELECT DISTINCT col2 + col1 * - col2 * col2 AS col2 FROM tab2
----
-22572
-24510
-39858

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col0 * - col2 col0 FROM tab2
----
-114076
-5103
-52728

query I rowsort
SELECT col0 * + tab0.col1 + + tab0.col2 FROM tab0
----
2097
3396
8181

query I rowsort
SELECT + col2 * + tab1.col1 * - col2 AS col2 FROM tab1
----
-119808
-32490
-75816

query I rowsort
SELECT ALL + col0 + col0 + - col1 FROM tab1
----
-20
118
147

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT NULL = col2 * - col1 + col2 * + col2 - col1 * - col0
----

query I rowsort
SELECT col1 - tab0.col2 AS col0 FROM tab0
----
53
9
96

query I rowsort
SELECT ALL col2 * col0 + tab2.col2 FROM tab2
----
2054
216
3040

query I rowsort
SELECT DISTINCT - col2 * + col1 + - col2 FROM tab2
----
-1560
-684
-864

onlyif mysql # use DIV operator for integer division
query I rowsort label-8255
SELECT DISTINCT + tab2.col0 DIV col0 AS col2 FROM tab2
----
1

skipif mysql # not compatible
query I rowsort label-8255
SELECT DISTINCT + tab2.col0 / col0 AS col2 FROM tab2
----
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8256
SELECT + col1 DIV col2 + - ( col1 ) + cor0.col1 * ( ( col0 ) ) * col1 FROM tab1 AS cor0
----
13507
2002
6390

skipif mysql # not compatible
query I rowsort label-8256
SELECT + col1 / col2 + - ( col1 ) + cor0.col1 * ( ( col0 ) ) * col1 FROM tab1 AS cor0
----
13507
2002
6390

query I rowsort
SELECT + col2 AS col1 FROM tab2 WHERE NOT + col1 * col1 NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT - - 16 FROM tab0 cor0
----
16
16
16

query I rowsort
SELECT + ( - col0 ) + col2 AS col1 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT - 96 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to c89b545346f99713888a7934e4caa539

query I rowsort
SELECT ALL - - col0 + + cor0.col2 * - col0 FROM tab1 AS cor0
----
-159
-3584
-7600

onlyif mysql # use DIV operator for integer division
query I rowsort label-8262
SELECT 0 * col2 + - 2 + + col1 DIV + col0 AS col0 FROM tab0 cor0
----
-1
0
1

skipif mysql # not compatible
query I rowsort label-8262
SELECT 0 * col2 + - 2 + + col1 / + col0 AS col0 FROM tab0 cor0
----
-1
0
1

query I rowsort
SELECT ALL + 22 AS col1 FROM tab2 AS cor0
----
22
22
22

query I rowsort
SELECT - 73 + col1 * - ( col0 + col1 ) AS col1 FROM tab1 AS cor0
----
-1282
-813
-827

query I rowsort
SELECT ALL + - col1 * col2 + cor0.col2 FROM tab1 AS cor0
----
-1152
-1350
-513

onlyif mysql # use DIV operator for integer division
query I rowsort label-8266
SELECT - col2 * col1 DIV - 56 + col1 * + col2 * - col1 + col0 * cor0.col2 AS col2 FROM tab2 AS cor0
----
-25744
-7969
-88451

skipif mysql # not compatible
query I rowsort label-8266
SELECT - col2 * col1 / - 56 + col1 * + col2 * - col1 + col0 * cor0.col2 AS col2 FROM tab2 AS cor0
----
-25744
-7969
-88451

query I rowsort
SELECT - 97 + - col0 + + col2 * + col2 AS col0 FROM tab0 AS cor0
----
-131
6538
968

query I rowsort
SELECT cor0.col1 + col0 * 86 * - col0 FROM tab1 AS cor0
----
-352246
-550387
-748

query I rowsort
SELECT ALL + 17 FROM tab0 AS cor0
----
17
17
17

query I rowsort
SELECT + + 78 + col0 + col2 AS col0 FROM tab2 AS cor0
----
112
182
195

onlyif mysql # use DIV operator for integer division
query I rowsort label-8271
SELECT DISTINCT + + col2 DIV + col0 AS col1 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-8271
SELECT DISTINCT + + col2 / + col0 AS col1 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT ALL - - 67 FROM tab1, tab0 AS cor0
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

query I rowsort
SELECT + + col1 + + col2 + col0 AS col0 FROM tab0 AS cor0
----
133
143
262

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 69 + - cor1.col0 col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 821057b288966f40a48f2abb285b51e8

query I rowsort
SELECT ALL + col0 + + col1 * col1 AS col2 FROM tab1
----
164
249
679

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8276
SELECT - CAST( NULL AS SIGNED ) / - tab0.col0 AS col2 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-8276
SELECT - CAST ( NULL AS INTEGER ) / - tab0.col0 AS col2 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT - col0 + 6 AS col1 FROM tab2 AS cor0
----
-1
-72
-73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col0 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT DISTINCT - - col1 + - 14 * + cor0.col2 AS col1 FROM tab0 cor0
----
-1057
-376
83

query I rowsort
SELECT DISTINCT + 35 FROM tab1, tab1 AS cor0
----
35

query I rowsort
SELECT DISTINCT + 79 + - cor0.col0 FROM tab2 AS cor0
----
0
1
72

query I rowsort
SELECT ALL + ( ( col2 ) * col0 ) AS col1 FROM tab2
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( col0 ) col2 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT - 98 + + col1 AS col2 FROM tab1 AS cor0
----
-72
-85
-88

onlyif mysql # use DIV operator for integer division
query I rowsort label-8285
SELECT + 19 DIV - col1 AS col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8285
SELECT + 19 / - col1 AS col1 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 75 col0 FROM tab1, tab0 AS cor0
----
75

query I rowsort
SELECT + 76 - + 81 FROM tab2
----
-5
-5
-5

query I rowsort
SELECT - 7 FROM tab2, tab2 cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to 180f983bbf84f38a53d5012e5c10c628

query I rowsort
SELECT ALL ( - 10 ) * + tab0.col1 - - 91 FROM tab0
----
-769
-819
-879

query I rowsort
SELECT DISTINCT 58 FROM tab0, tab2, tab2 AS cor0
----
58

query I rowsort
SELECT cor1.col0 FROM tab1, tab1 cor0, tab0 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT ALL 11 * col0 + col2 * col0 AS col0 FROM tab2
----
266
2886
3871

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query I rowsort
SELECT DISTINCT - col2 * col0 + + col2 FROM tab1 cor0
----
-108
-3591
-7584

query I rowsort
SELECT DISTINCT - 47 - cor0.col1 AS col2 FROM tab0 AS cor0
----
-133
-138
-144

query I rowsort
SELECT ALL + - 84 + - col1 AS col2 FROM tab1 AS cor0
----
-110
-94
-97

query I rowsort
SELECT col2 * - col2 - col0 * - col2 * col0 FROM tab2 AS cor0
----
157508
235714
594

query I rowsort
SELECT - col1 * - col0 + cor0.col1 AS col1 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT ( - col2 ) + + col1 AS col0 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT - ( col0 ) + col1 AS col2 FROM tab0
----
2
62
62

query I rowsort
SELECT ALL + - col0 - + col0 AS col0 FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT - cor0.col2 * - col1 + col2 AS col1 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT + col1 + col1 * - col0 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT + col2 - - col0 AS col1 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT DISTINCT + cor0.col0 + col0 * - cor0.col0 AS col0 FROM tab1 AS cor0
----
-4032
-6
-6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-8306
SELECT ALL - + col0 DIV + col0 + col1 * col2 FROM tab1 AS cor0
----
1247
1403
569

skipif mysql # not compatible
query I rowsort label-8306
SELECT ALL - + col0 / + col0 + col1 * col2 FROM tab1 AS cor0
----
1247
1403
569

onlyif mysql # use DIV operator for integer division
query I rowsort label-8307
SELECT DISTINCT + ( + col2 ) * col1 DIV col2 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-8307
SELECT DISTINCT + ( + col2 ) * col1 / col2 FROM tab0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8308
SELECT DISTINCT CAST( col2 + col2 AS SIGNED ) * col0 FROM tab0
----
14596
1584
70

skipif mysql # not compatible
query I rowsort label-8308
SELECT DISTINCT CAST ( col2 + col2 AS INTEGER ) * col0 FROM tab0
----
14596
1584
70

query I rowsort
SELECT col0 * + col1 + col2 FROM tab0
----
2097
3396
8181

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( 72 AS REAL ) + tab0.col2 AS col1 FROM tab0
----
-39
-71
10

query I rowsort
SELECT DISTINCT - 16 FROM tab1, tab2 AS cor0
----
-16

query I rowsort
SELECT DISTINCT + 14 FROM tab0, tab0 AS cor0
----
14

query I rowsort
SELECT + 49 * - cor0.col1 AS col2 FROM tab2 AS cor0
----
-1519
-2891
-833

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 ALL col0 * + 92 AS col0 FROM tab2 AS cor0
----
644
7176
7268

onlyif mysql # use DIV operator for integer division
query I rowsort label-8316
SELECT 13 DIV - col2 + col1 col1 FROM tab1 cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8316
SELECT 13 / - col2 + col1 col1 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT DISTINCT - - cor0.col2 * col2 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT + 21 * - col2 * + col2 FROM tab1 AS cor0
----
-193536
-61236
-68229

query I rowsort
SELECT ALL - + col1 * + col1 AS col0 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT col1 * - col0 - col1 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT - cor0.col2 * cor0.col0 + col1 * + col0 AS col1 FROM tab1 AS cor0
----
-3008
-6640
-84

onlyif mysql # use DIV operator for integer division
query I rowsort label-8322
SELECT ALL col0 DIV + cor0.col1 col1 FROM tab1 AS cor0
----
0
6
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8322
SELECT ALL col0 / + cor0.col1 col1 FROM tab1 AS cor0
----
0
6
6

query I rowsort
SELECT - 76 - col2 AS col0 FROM tab1
----
-130
-133
-172

query I rowsort
SELECT - col1 + - 6 * - tab0.col2 FROM tab0
----
-91
112
401

query I rowsort
SELECT ALL - 80 * - col2 FROM tab2
----
2080
2160
3040

query I rowsort
SELECT DISTINCT - col0 * + 24 * col1 FROM tab2
----
-110448
-32232
-5208

query I rowsort
SELECT col0 + 95 FROM tab0
----
119
130
184

onlyif mysql # use DIV operator for integer division
query I rowsort label-8328
SELECT col0 DIV + cor0.col0 AS col2 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8328
SELECT col0 / + cor0.col0 AS col2 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT col0 + + col0 * cor0.col1 AS col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT ALL col0 + col1 * + col1 FROM tab2 WHERE col0 * + col1 <> NULL
----

query I rowsort
SELECT DISTINCT - col0 * + col0 + + col0 * col0 FROM tab1
----
0

query I rowsort
SELECT col2 + col2 / - col2 FROM tab1 AS cor0 WHERE NOT NULL NOT BETWEEN NULL AND col1 * col2
----

query I rowsort
SELECT - col0 + col2 - tab2.col2 * + col0 FROM tab2
----
-169
-2080
-3043

query I rowsort
SELECT ALL + tab1.col0 AS col0 FROM tab1 WHERE ( NULL ) IN ( + col1 + + tab1.col0 )
----

query I rowsort
SELECT DISTINCT col0 + + col2 + - tab2.col0 * col1 FROM tab2
----
-1226
-183
-4498

query I rowsort
SELECT col1 * col1 * - col0 FROM tab2
----
-22831
-271518
-6727

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE ( NULL ) = ( NULL )
----

query I rowsort
SELECT + col0 + - col2 * + col2 FROM tab2
----
-1365
-598
-722

query I rowsort
SELECT ALL col2 + col2 + + col1 FROM tab1
----
124
134
205

query I rowsort
SELECT DISTINCT col2 * + tab1.col0 + col1 + tab1.col1 AS col2 FROM tab1
----
214
3668
7706

onlyif mysql # use DIV operator for integer division
query I rowsort label-8341
SELECT ALL col0 * - col1 DIV - col1 AS col1 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-8341
SELECT ALL col0 * - col1 / - col1 AS col1 FROM tab0
----
24
35
89

query I rowsort
SELECT - col2 + col0 + col2 AS col1 FROM tab2
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-8343
SELECT ALL + tab0.col1 + col1 DIV - tab0.col1 + col0 FROM tab0
----
109
131
179

skipif mysql # not compatible
query I rowsort label-8343
SELECT ALL + tab0.col1 + col1 / - tab0.col1 + col0 FROM tab0
----
109
131
179

query I rowsort
SELECT DISTINCT - col1 + col0 + col0 AS col1 FROM tab1
----
-20
118
147

onlyif mysql # use DIV operator for integer division
query I rowsort label-8345
SELECT col0 + + col0 DIV + col2 AS col0 FROM tab1
----
3
65
80

skipif mysql # not compatible
query I rowsort label-8345
SELECT col0 + + col0 / + col2 AS col0 FROM tab1
----
3
65
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-8346
SELECT DISTINCT + tab1.col0 + - col0 DIV + col2 AS col0 FROM tab1
----
3
63
80

skipif mysql # not compatible
query I rowsort label-8346
SELECT DISTINCT + tab1.col0 + - col0 / + col2 AS col0 FROM tab1
----
3
63
80

query I rowsort
SELECT ALL col0 + - col2 * - tab2.col2 AS col1 FROM tab2
----
1523
736
754

query I rowsort
SELECT DISTINCT + tab1.col0 * + col0 AS col1 FROM tab1
----
4096
6400
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-8349
SELECT col1 + + col2 DIV - col1 AS col0 FROM tab2
----
15
31
59

skipif mysql # not compatible
query I rowsort label-8349
SELECT col1 + + col2 / - col1 AS col0 FROM tab2
----
15
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-8350
SELECT col1 DIV col1 + + tab1.col0 AS col2 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-8350
SELECT col1 / col1 + + tab1.col0 AS col2 FROM tab1
----
4
65
81

query I rowsort
SELECT - col0 * - col1 * col0 AS col1 FROM tab2
----
106097
1519
358956

query I rowsort
SELECT DISTINCT col2 - tab2.col1 / col0 AS col0 FROM tab2 WHERE NULL <= NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + col0 * col1 col0 FROM tab0 AS cor0
----
1978
3298
8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-8354
SELECT DISTINCT col1 + - cor0.col0 DIV col0 + + col2 FROM tab2 AS cor0
----
54
57
84

skipif mysql # not compatible
query I rowsort label-8354
SELECT DISTINCT col1 + - cor0.col0 / col0 + + col2 FROM tab2 AS cor0
----
54
57
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-8355
SELECT + col1 DIV + col0 + + col2 FROM tab2
----
26
31
38

skipif mysql # not compatible
query I rowsort label-8355
SELECT + col1 / + col0 + + col2 FROM tab2
----
26
31
38

query I rowsort
SELECT col1 + col0 * + tab2.col2 * col2 AS col2 FROM tab2
----
114093
5134
52787

query I rowsort
SELECT ALL col1 * col2 * col1 + col0 AS col0 FROM tab2
----
11061
25954
90584

query I rowsort
SELECT + - col1 * col1 + col0 FROM tab2 AS cor0
----
-210
-3403
-954

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab1
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT NULL IN ( - col2 )
----

query I rowsort
SELECT + tab1.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT ALL + col2 + col2 * col0 * col1 FROM tab1 cor0
----
36537
4266
99936

onlyif mysql # use DIV operator for integer division
query I rowsort label-8363
SELECT ALL + col2 DIV col1 + col1 * + col1 + + col2 FROM tab0 cor0
----
7429
8363
9410

skipif mysql # not compatible
query I rowsort label-8363
SELECT ALL + col2 / col1 + col1 * + col1 + + col2 FROM tab0 cor0
----
7429
8363
9410

query I rowsort
SELECT DISTINCT - cor0.col1 + + col2 * col1 FROM tab2 AS cor0
----
1475
629
806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col2 * + cor0.col0 + col0 col2 FROM tab1 AS cor0
----
-159
-3584
-7600

query III rowsort
SELECT ALL * FROM tab1 WHERE + col1 NOT IN ( + col1 * tab1.col1 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8367
SELECT + CAST( NULL AS DECIMAL ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8367
SELECT + CAST ( NULL AS REAL ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8368
SELECT CAST( NULL AS SIGNED ) + + 89 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8368
SELECT CAST ( NULL AS INTEGER ) + + 89 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - ( - col2 ) - - cor0.col0 * 7 * col1 FROM tab2 AS cor0
----
1546
32240
9439

query I rowsort
SELECT - 45 FROM tab2 cor0
----
-45
-45
-45

query I rowsort
SELECT - col1 * 52 FROM tab0
----
-4472
-4732
-5044

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + ( + 94 ) + + col1 col1 FROM tab1 AS cor0
----
104
107
120

query I rowsort
SELECT ALL - 62 + 18 * col0 * + col2 AS col1 FROM tab0
----
131302
14194
568

query I rowsort
SELECT - col1 * + col0 + - col2 * col0 AS col0 FROM tab2 AS cor0
----
-406
-4345
-6630

query I rowsort
SELECT col1 * cor0.col1 + col0 * + col2 FROM tab0 AS cor0
----
15579
8188
9444

onlyif mysql # use DIV operator for integer division
query I rowsort label-8376
SELECT ALL - tab2.col1 DIV col1 FROM tab2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8376
SELECT ALL - tab2.col1 / col1 FROM tab2
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8377
SELECT - tab2.col0 + + 12 - - col0 * col2 DIV 89 FROM tab2
----
-34
-44
7

skipif mysql # not compatible
query I rowsort label-8377
SELECT - tab2.col0 + + 12 - - col0 * col2 / 89 FROM tab2
----
-34
-44
7

query I rowsort
SELECT tab1.col1 + + tab1.col2 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 71bdffb602517a95c6721e05f7b4b3dd

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 11 col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
11

query I rowsort
SELECT col1 * ( 74 ) - cor0.col1 AS col1 FROM tab0 cor0
----
6278
6643
7081

onlyif mysql # use DIV operator for integer division
query I rowsort label-8381
SELECT DISTINCT + + 90 DIV cor0.col2 FROM tab1 cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-8381
SELECT DISTINCT + + 90 / cor0.col2 FROM tab1 cor0
----
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8382
SELECT + col2 DIV + 59 + 5 FROM tab1 AS cor0
----
5
5
6

skipif mysql # not compatible
query I rowsort label-8382
SELECT + col2 / + 59 + 5 FROM tab1 AS cor0
----
5
5
6

query I rowsort
SELECT col0 + - col1 * col1 AS col1 FROM tab1 AS cor0
----
-36
-673
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-8384
SELECT col0 * col0 - - ( + col1 ) DIV col2 FROM tab1 AS cor0
----
4096
6400
9

skipif mysql # not compatible
query I rowsort label-8384
SELECT col0 * col0 - - ( + col1 ) / col2 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT - cor0.col0 * - ( col0 ) FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT col2 * - 99 AS col0 FROM tab0 AS cor0
----
-3267
-8118
-99

query I rowsort
SELECT - + cor0.col1 * cor0.col1 AS col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL 7 FROM tab1 cor0 CROSS JOIN tab1, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to bd991c690468eea3ef45a96817ca3617

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8389
SELECT + CAST( NULL AS SIGNED ) + + ( col2 ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8389
SELECT + CAST ( NULL AS INTEGER ) + + ( col2 ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 + 24 FROM tab0 AS cor0
----
-62
-67
-73

query I rowsort
SELECT + + col0 * ( - col1 ) - - col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8392
SELECT DISTINCT + CAST( col1 AS SIGNED ) - cor0.col2 * col0 AS col2 FROM tab1 AS cor0
----
-136
-3638
-7667

skipif mysql # not compatible
query I rowsort label-8392
SELECT DISTINCT + CAST ( col1 AS INTEGER ) - cor0.col2 * col0 AS col2 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT DISTINCT + col2 * ( - col0 ) * - col0 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT - 95 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 1c7934db0632c123332c43f17b661d6c

onlyif mysql # use DIV operator for integer division
query I rowsort label-8395
SELECT DISTINCT - 66 * col0 + - col1 DIV + col1 AS col2 FROM tab0 AS cor0
----
-1585
-2311
-5875

skipif mysql # not compatible
query I rowsort label-8395
SELECT DISTINCT - 66 * col0 + - col1 / + col1 AS col2 FROM tab0 AS cor0
----
-1585
-2311
-5875

query I rowsort
SELECT ALL - 48 * + col1 AS col1 FROM tab1 cor0
----
-1248
-480
-624

query I rowsort
SELECT DISTINCT - - 59 * col2 FROM tab0 AS cor0
----
1947
4838
59

query I rowsort
SELECT - 90 + col1 * + col0 AS col1 FROM tab2 AS cor0
----
1253
127
4512

query I rowsort
SELECT - - 52 * cor0.col2 AS col1 FROM tab0 AS cor0
----
1716
4264
52

query I rowsort
SELECT ALL col0 * - col1 * cor0.col2 FROM tab2 AS cor0
----
-119652
-51034
-5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-8401
SELECT DISTINCT col0 DIV col1 AS col0 FROM tab0 cor0
----
0

skipif mysql # not compatible
query I rowsort label-8401
SELECT DISTINCT col0 / col1 AS col0 FROM tab0 cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 56 + col1 * col2 col0 FROM tab2 AS cor0
----
1590
702
893

query I rowsort
SELECT DISTINCT 71 AS col1 FROM tab1, tab0 AS cor0, tab2 AS cor1, tab1 AS cor2
----
71

query I rowsort
SELECT ALL - - col2 * - col1 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL + col1 * + ( + 35 * - col2 ) AS col0 FROM tab2 AS cor0
----
-22610
-29295
-53690

query I rowsort
SELECT ALL + col1 + - col0 + + col0 AS col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT cor0.col1 * - 20 AS col2 FROM tab0 AS cor0
----
-1720
-1820
-1940

query I rowsort
SELECT ALL + col2 * - col1 * + col1 FROM tab0 cor0
----
-244068
-679042
-9409

query I rowsort
SELECT col2 + + ( cor0.col0 ) * col2 AS col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT ALL + col2 + + 12 FROM tab1 AS cor0
----
108
66
69

query I rowsort
SELECT DISTINCT - - col2 * ( + col2 ) AS col1 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT + 28 * col0 * col1 AS col2 FROM tab1
----
17920
2184
29120

query I rowsort
SELECT - + 80 FROM tab1 AS cor0
----
-80
-80
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * + col2 col0 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL + 3 * + col0 + - col0 AS col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT ALL - 64 * - col1 + col1 + - 55 * col2 FROM tab2 AS cor0
----
-985
2405
530

query I rowsort
SELECT DISTINCT - - ( + col1 ) * 66 - + cor0.col2 FROM tab1 AS cor0
----
1662
603
762

query I rowsort
SELECT ALL col1 * - col1 + col1 FROM tab0
----
-7310
-8190
-9312

query I rowsort
SELECT ALL + col0 * + col0 + ( - col0 ) * - col2 AS col0 FROM tab2
----
238
8112
9243

query I rowsort
SELECT DISTINCT 88 * col1 + - col0 AS col1 FROM tab1
----
1064
2285
816

query I rowsort
SELECT - col1 * - col1 + col2 FROM tab1
----
157
265
730

onlyif mysql # use DIV operator for integer division
query I rowsort label-8422
SELECT DISTINCT 72 + - col2 + col2 * col0 DIV col1 col2 FROM tab1 cor0
----
24
379
566

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8422
SELECT DISTINCT 72 + - col2 + col2 * col0 / col1 col2 FROM tab1 cor0
----
24
379
566

onlyif mysql # use DIV operator for integer division
query I rowsort label-8423
SELECT - col0 + col0 DIV 95 AS col2 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-8423
SELECT - col0 + col0 / 95 AS col2 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT + ( col1 ) + - 80 * - cor0.col0 + - col1 FROM tab2 AS cor0
----
560
6240
6320

query I rowsort
SELECT col0 * cor0.col2 + 38 * col2 FROM tab0 AS cor0
----
10414
2046
73

query I rowsort
SELECT - col2 * col1 + 87 FROM tab2 AS cor0
----
-1447
-559
-750

query I rowsort
SELECT ALL - tab2.col1 * - 57 AS col1 FROM tab2
----
1767
3363
969

query I rowsort
SELECT ALL + col1 * 14 FROM tab2
----
238
434
826

query I rowsort
SELECT DISTINCT - col0 + col0 * 41 + + col2 * - 62 AS col2 FROM tab2
----
-1394
1508
804

query I rowsort
SELECT col2 * - 24 FROM tab1 AS cor0
----
-1296
-1368
-2304

query I rowsort
SELECT DISTINCT ( col0 ) * + col0 AS col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT - ( cor0.col1 ) + col2 AS col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT col1 + col1 * + col0 AS col2 FROM tab1 cor0
----
104
1053
650

query I rowsort
SELECT ALL - 96 + + col2 FROM tab1 AS cor0
----
-39
-42
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 75 col1 FROM tab0 cor0
----
75
75
75

onlyif mysql # use DIV operator for integer division
query I rowsort label-8436
SELECT DISTINCT - col0 * + 18 + + col2 DIV col0 AS col1 FROM tab1 AS cor0
----
-1152
-1439
-36

skipif mysql # not compatible
query I rowsort label-8436
SELECT DISTINCT - col0 * + 18 + + col2 / col0 AS col1 FROM tab1 AS cor0
----
-1152
-1439
-36

query I rowsort
SELECT ALL + - 74 - 6 AS col0 FROM tab1 AS cor0
----
-80
-80
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8438
SELECT DISTINCT - CAST( - col2 AS SIGNED ) * + col2 col0 FROM tab2 AS cor0
----
1444
676
729

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8438
SELECT DISTINCT - CAST ( - col2 AS INTEGER ) * + col2 col0 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT 84 * - col2 + col2 * 17 FROM tab1 AS cor0
----
-3618
-3819
-6432

query I rowsort
SELECT 34 * col2 AS col1 FROM tab2 cor0
----
1292
884
918

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 87 - col2 col0 FROM tab1 AS cor0
----
-9
30
33

query I rowsort
SELECT - - ( col1 ) AS col2 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT col1 + col1 * col0 AS col2 FROM tab1 AS cor0
----
104
1053
650

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8444
SELECT DISTINCT + - CAST( NULL AS SIGNED ) + - cor0.col2 * col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8444
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) + - cor0.col2 * col1 FROM tab1 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8445
SELECT ALL - 47 DIV - col2 AS col2 FROM tab0 AS cor0
----
0
1
47

skipif mysql # not compatible
query I rowsort label-8445
SELECT ALL - 47 / - col2 AS col2 FROM tab0 AS cor0
----
0
1
47

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8446
SELECT DISTINCT CAST( NULL AS SIGNED ) * - col1 AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8446
SELECT DISTINCT CAST ( NULL AS INTEGER ) * - col1 AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL - 67 * col0 + cor0.col1 FROM tab2 AS cor0
----
-438
-5167
-5276

query I rowsort
SELECT DISTINCT ( 55 ) * + cor0.col1 - - cor0.col0 AS col0 FROM tab2 AS cor0
----
1014
1712
3323

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * 65 col1 FROM tab0 AS cor0
----
-1560
-2275
-5785

query I rowsort
SELECT 39 * - 58 AS col1 FROM tab1
----
-2262
-2262
-2262

query I rowsort
SELECT DISTINCT 7 FROM tab1, tab0 cor0
----
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * - col0 col2 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-8453
SELECT col2 DIV ( + col2 ) FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8453
SELECT col2 / ( + col2 ) FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT ALL - 84 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 975e2ef2a3bf1ee2622362f4e435752f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8455
SELECT - CAST( NULL AS DECIMAL ) + + col0 * + col2 col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8455
SELECT - CAST ( NULL AS REAL ) + + col0 * + col2 col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - 68 + + col0 AS col1 FROM tab0 AS cor0
----
103
157
92

query I rowsort
SELECT DISTINCT + cor0.col2 * cor0.col2 + col2 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT + col1 * col0 * + col0 AS col2 FROM tab1 AS cor0
----
234
40960
83200

query I rowsort
SELECT DISTINCT - - 67 AS col1 FROM tab0 AS cor0
----
67

query I rowsort
SELECT - + 67 AS col2 FROM tab1 AS cor0
----
-67
-67
-67

query I rowsort
SELECT ALL - ( - col0 * col2 ) AS col1 FROM tab1
----
162
3648
7680

query I rowsort
SELECT - 79 * + col2 FROM tab1 AS cor0
----
-4266
-4503
-7584

query I rowsort
SELECT ALL + ( ( + col1 ) ) * col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT - cor0.col0 - + col2 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT ALL + + cor0.col2 + + cor0.col1 AS col0 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT + col0 * + 17 + col2 FROM tab0 AS cor0
----
1595
441
596

query I rowsort
SELECT DISTINCT - + col0 + - 84 FROM tab0 AS cor0
----
-108
-119
-173

query I rowsort
SELECT - - col0 * col0 + - col1 * - cor0.col2 FROM tab2 AS cor0
----
6887
7618
886

query I rowsort
SELECT DISTINCT + col1 + + 99 * - col1 AS col1 FROM tab1 AS cor0
----
-1274
-2548
-980

query I rowsort
SELECT DISTINCT - col2 * col1 AS col1 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL cor0.col1 * col1 + col2 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT DISTINCT + col2 * col1 * + col2 AS col1 FROM tab2 AS cor0
----
22599
24548
39884

query I rowsort
SELECT - col1 * - 5 + 65 - col2 AS col0 FROM tab0 AS cor0
----
438
462
549

query I rowsort
SELECT - col1 + ( - ( col2 ) ) AS col0 FROM tab2 AS cor0
----
-55
-58
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-8475
SELECT cor0.col1 DIV 2 FROM tab0 AS cor0
----
43
45
48

skipif mysql # not compatible
query I rowsort label-8475
SELECT cor0.col1 / 2 FROM tab0 AS cor0
----
43
45
48

query I rowsort
SELECT + col0 + 59 + col2 AS col0 FROM tab2 AS cor0
----
163
176
93

query I rowsort
SELECT DISTINCT - col1 + tab1.col0 FROM tab1
----
-23
54
67

query I rowsort
SELECT + 49 * + col2 FROM tab0 AS cor0
----
1617
4018
49

onlyif mysql # use DIV operator for integer division
query I rowsort label-8479
SELECT col2 DIV + ( col2 * 66 ) AS col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8479
SELECT col2 / + ( col2 * 66 ) AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL 84 FROM tab2, tab2 AS cor0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

query I rowsort
SELECT - col1 * 83 FROM tab0
----
-7138
-7553
-8051

query I rowsort
SELECT ALL 86 FROM tab0, tab0 AS cor0
----
9 values hashing to 2d8c3a0d19ea51447f83cd18b49fee19

query I rowsort
SELECT DISTINCT col0 * + 46 AS col1 FROM tab1
----
138
2944
3680

query I rowsort
SELECT 66 * col2 FROM tab0
----
2178
5412
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-8485
SELECT col2 DIV col0 AS col0 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-8485
SELECT col2 / col0 AS col0 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT 88 - cor0.col2 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to d68f2d8d903cb9db53b68498b532a81e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( - cor0.col1 ) + cor0.col2 col0 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT - + col2 * 52 FROM tab1 cor0
----
-2808
-2964
-4992

query I rowsort
SELECT ALL - col2 * - 26 + + 96 FROM tab1 AS cor0
----
1500
1578
2592

query I rowsort
SELECT DISTINCT cor0.col0 + + 92 * + col0 AS col0 FROM tab2 cor0
----
651
7254
7347

onlyif mysql # use DIV operator for integer division
query I rowsort label-8491
SELECT ALL cor0.col2 DIV col1 AS col0 FROM tab2 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-8491
SELECT ALL cor0.col2 / col1 AS col0 FROM tab2 AS cor0
----
0
0
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 + - col2 col1 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - 87 - cor0.col0 col2 FROM tab2 AS cor0
----
-2340
-2356
-3385

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8494
SELECT - - cor0.col2 + + CAST( col1 AS SIGNED ) FROM tab2 AS cor0
----
55
58
85

skipif mysql # not compatible
query I rowsort label-8494
SELECT - - cor0.col2 + + CAST ( col1 AS INTEGER ) FROM tab2 AS cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-8495
SELECT 97 DIV - col0 FROM tab0
----
-1
-2
-4

skipif mysql # not compatible
query I rowsort label-8495
SELECT 97 / - col0 FROM tab0
----
-1
-2
-4

query I rowsort
SELECT 86 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to ed1a39c2752ca3723602e4a92c54bbc4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col0 * - 70 col2 FROM tab2 AS cor0
----
-497
-5538
-5609

query I rowsort
SELECT - - 96 * - cor0.col2 + col1 AS col0 FROM tab1 AS cor0
----
-5158
-5462
-9203

onlyif mysql # use DIV operator for integer division
query I rowsort label-8499
SELECT - + col0 DIV - cor0.col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8499
SELECT - + col0 / - cor0.col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT col1 * 16 FROM tab0 AS cor0
----
1376
1456
1552

query I rowsort
SELECT + col2 * ( + col2 ) FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT ( + cor0.col0 ) + cor0.col2 * col1 AS col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT + 78 AS col2 FROM tab0 AS cor0
----
78
78
78

query I rowsort
SELECT DISTINCT - 15 * col1 FROM tab1 AS cor0
----
-150
-195
-390

onlyif mysql # use DIV operator for integer division
query I rowsort label-8505
SELECT DISTINCT ( tab1.col0 ) DIV - col1 FROM tab1
----
-6
0

skipif mysql # not compatible
query I rowsort label-8505
SELECT DISTINCT ( tab1.col0 ) / - col1 FROM tab1
----
-6
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8506
SELECT ALL + + col1 + - col0 * 28 DIV + ( + col0 ) FROM tab1 AS cor0
----
-15
-18
-2

skipif mysql # not compatible
query I rowsort label-8506
SELECT ALL + + col1 + - col0 * 28 / + ( + col0 ) FROM tab1 AS cor0
----
-15
-18
-2

query I rowsort
SELECT - 70 * - col2 FROM tab0 AS cor0
----
2310
5740
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 89 + + col2 col1 FROM tab1
----
143
146
185

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8509
SELECT + CAST( NULL AS SIGNED ) - - 59 * + col1 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8509
SELECT + CAST ( NULL AS INTEGER ) - - 59 * + col1 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + col0 col2 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT ALL + 7 * col2 * + 77 AS col1 FROM tab0 AS cor0
----
17787
44198
539

query I rowsort
SELECT DISTINCT - col0 + - cor0.col2 AS col1 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT ALL + + ( - cor0.col1 ) + cor0.col1 FROM tab2 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + - col0 - col2 col1 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL 30 * + col0 * cor0.col0 AS col2 FROM tab1 AS cor0
----
122880
192000
270

query I rowsort
SELECT ALL + col1 * col1 * - cor0.col2 + + col1 FROM tab2 AS cor0
----
-10965
-25916
-90447

query I rowsort
SELECT DISTINCT + col0 * - cor0.col2 AS col1 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT ( col2 ) + + col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT 86 * col2 AS col2 FROM tab2 cor0
----
2236
2322
3268

query I rowsort
SELECT + ( + col0 + + col0 ) AS col2 FROM tab1
----
128
160
6

query I rowsort
SELECT DISTINCT 16 * - 91 AS col2 FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
-1456

query I rowsort
SELECT + 61 AS col2 FROM tab2
----
61
61
61

query I rowsort
SELECT ALL + + 91 AS col0 FROM tab0 cor0
----
91
91
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-8524
SELECT 1 DIV - col0 AS col1 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8524
SELECT 1 / - col0 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col0 * - col2 + - 15 FROM tab0 AS cor0
----
20
7283
777

query I rowsort
SELECT DISTINCT - cor0.col2 * + col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL - 78 + col0 FROM tab2 AS cor0
----
-71
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8528
SELECT DISTINCT + 81 + cor0.col0 DIV + col1 col2 FROM tab0 AS cor0
----
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8528
SELECT DISTINCT + 81 + cor0.col0 / + col1 col2 FROM tab0 AS cor0
----
81

query I rowsort
SELECT - col1 + 56 * col1 * + col0 AS col2 FROM tab0 AS cor0
----
115498
190023
453453

query I rowsort
SELECT + col0 + 43 FROM tab1 AS cor0
----
107
123
46

query I rowsort
SELECT ALL col0 * col0 + col1 + - col0 FROM tab2
----
6065
6179
73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8532
SELECT ALL + - CAST( NULL AS DECIMAL ) * - cor0.col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8532
SELECT ALL + - CAST ( NULL AS REAL ) * - cor0.col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 80 AS col0 FROM tab0
----
-80
-80
-80

query I rowsort
SELECT - - 41 FROM tab0 AS cor0
----
41
41
41

query I rowsort
SELECT col0 * + 45 AS col2 FROM tab0 AS cor0
----
1080
1575
4005

query I rowsort
SELECT DISTINCT - - ( + col0 ) FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL - + 32 + col1 * - col0 AS col2 FROM tab2 AS cor0
----
-1375
-249
-4634

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 32 col1 FROM tab2 cor0
----
32

onlyif mysql # use DIV operator for integer division
query I rowsort label-8539
SELECT - 58 * col1 + - col1 * - col1 DIV + col1 + - col2 * col0 AS col0 FROM tab0 AS cor0
----
-12485
-5564
-5694

skipif mysql # not compatible
query I rowsort label-8539
SELECT - 58 * col1 + - col1 * - col1 / + col1 + - col2 * col0 AS col0 FROM tab0 AS cor0
----
-12485
-5564
-5694

query I rowsort
SELECT + 46 * + 28 + + col1 FROM tab1 cor0
----
1298
1301
1314

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8541
SELECT ALL CAST( - col1 AS SIGNED ) * cor0.col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort label-8541
SELECT ALL CAST ( - col1 AS INTEGER ) * cor0.col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT + - 95 * - col2 AS col0 FROM tab0 AS cor0
----
3135
7790
95

query I rowsort
SELECT cor0.col2 + cor0.col0 * - 10 FROM tab0 AS cor0
----
-207
-349
-808

onlyif mysql # use DIV operator for integer division
query I rowsort label-8544
SELECT DISTINCT col2 * 72 + 56 DIV col1 AS col0 FROM tab1 AS cor0
----
3890
4109
6916

skipif mysql # not compatible
query I rowsort label-8544
SELECT DISTINCT col2 * 72 + 56 / col1 AS col0 FROM tab1 AS cor0
----
3890
4109
6916

query I rowsort
SELECT DISTINCT - + col2 + + 46 AS col0 FROM tab1 AS cor0
----
-11
-50
-8

query I rowsort
SELECT ALL - - col1 * ( - 73 ) FROM tab1 AS cor0
----
-1898
-730
-949

query I rowsort
SELECT - col1 * - 79 + + col0 AS col0 FROM tab2 AS cor0
----
1422
2456
4739

onlyif mysql # use DIV operator for integer division
query I rowsort label-8548
SELECT + col0 + cor0.col0 * + col0 DIV col0 AS col0 FROM tab1 cor0
----
128
160
6

skipif mysql # not compatible
query I rowsort label-8548
SELECT + col0 + cor0.col0 * + col0 / col0 AS col0 FROM tab1 cor0
----
128
160
6

query I rowsort
SELECT DISTINCT - - col1 * - col2 + - col2 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT col2 + cor0.col2 * + ( + col2 ) AS col2 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT - col1 + - ( + col2 ) AS col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT ALL + col2 * - col1 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT cor0.col1 * + col2 + + col0 * col2 AS col2 FROM tab1 cor0
----
1566
4218
8928

query I rowsort
SELECT col2 * cor0.col0 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT ALL cor0.col1 * - cor0.col0 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 9b23e5e74ef3405a4dbf05cceb18c8a8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - ( col1 ) + + col0 * col1 col1 FROM tab1 cor0
----
1027
52
630

query I rowsort
SELECT DISTINCT - + col0 + col0 AS col2 FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8558
SELECT ALL + - col0 + + cor0.col0 * col1 DIV + col0 AS col2 FROM tab0 AS cor0
----
2
62
62

skipif mysql # not compatible
query I rowsort label-8558
SELECT ALL + - col0 + + cor0.col0 * col1 / + col0 AS col2 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT ALL - 42 * cor0.col0 + + ( - col2 * - cor0.col0 ) AS col0 FROM tab1 AS cor0
----
36
4320
960

query I rowsort
SELECT 75 - + col1 FROM tab2
----
16
44
58

query I rowsort
SELECT ALL 77 * - col2 + + col2 FROM tab1
----
-4104
-4332
-7296

query I rowsort
SELECT - col2 * - tab2.col1 + + col1 FROM tab2
----
1593
663
868

query I rowsort
SELECT col0 * + col2 + 36 * - col2 FROM tab1
----
-1782
1596
4224

query I rowsort
SELECT 15 * col0 FROM tab1
----
1200
45
960

query I rowsort
SELECT 79 * - col0 FROM tab2 AS cor0
----
-553
-6162
-6241

query I rowsort
SELECT DISTINCT + col2 + + col2 * - col1 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT ALL - 83 AS col0 FROM tab1 AS cor0
----
-83
-83
-83

query I rowsort
SELECT + col0 * - col0 + - col1 * col0 AS col2 FROM tab0 AS cor0
----
-16020
-2640
-4620

query I rowsort
SELECT ALL col0 * - col2 + - 44 AS col0 FROM tab0 AS cor0
----
-7342
-79
-836

query I rowsort
SELECT DISTINCT + + 48 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
48

query I rowsort
SELECT - 82 * cor0.col2 FROM tab1, tab1 AS cor0
----
9 values hashing to daf94c31f174fdd55fcf05912d22efe0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 33 * col1 col0 FROM tab0
----
2838
3003
3201

query I rowsort
SELECT + 39 * col2 FROM tab0
----
1287
3198
39

query I rowsort
SELECT ALL - 24 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 797d0f7c145f8ac623924448c714bbcc

onlyif mysql # use DIV operator for integer division
query I rowsort label-8575
SELECT ALL 40 DIV cor0.col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 0e2f168ccd81058e883ce16d1af974cf

skipif mysql # not compatible
query I rowsort label-8575
SELECT ALL 40 / cor0.col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 0e2f168ccd81058e883ce16d1af974cf

query I rowsort
SELECT col2 * col1 * cor0.col1 AS col2 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT - col2 * ( + col0 ) FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - col1 * 18 + - 3 * col1 AS col2 FROM tab2 AS cor0
----
-1239
-357
-651

query I rowsort
SELECT - col2 + col0 * col0 FROM tab0 cor0
----
1224
543
7839

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( col2 AS REAL ) + col0 + 16 * col0 * - col2 AS col2 FROM tab1
----
-122704
-2535
-58247

query I rowsort
SELECT - col2 + - tab0.col1 + - col2 AS col2 FROM tab0
----
-152
-255
-99

query I rowsort
SELECT 11 * - col2 AS col0 FROM tab2
----
-286
-297
-418

query I rowsort
SELECT - col2 * tab2.col2 + tab2.col2 FROM tab2
----
-1406
-650
-702

onlyif mysql # use DIV operator for integer division
query I rowsort label-8584
SELECT ALL col0 + col0 DIV col2 col1 FROM tab1
----
3
65
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8584
SELECT ALL col0 + col0 / col2 col1 FROM tab1
----
3
65
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-8585
SELECT ALL - - col0 + + 22 DIV + col2 col2 FROM tab1 AS cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8585
SELECT ALL - - col0 + + 22 / + col2 col2 FROM tab1 AS cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 73 * + col1 col1 FROM tab1 cor0
----
1898
730
949

query I rowsort
SELECT + ( 49 ) FROM tab2 AS cor0
----
49
49
49

query I rowsort
SELECT DISTINCT - 90 AS col2 FROM tab2, tab1 cor0
----
-90

query I rowsort
SELECT - col2 + col1 * + col1 FROM tab1 AS cor0
----
43
622
73

query I rowsort
SELECT + + col1 - + col1 * + ( col2 ) * - col1 FROM tab2 AS cor0
----
10999
25978
90565

query I rowsort
SELECT 22 * col2 + 21 FROM tab0 cor0
----
1825
43
747

query I rowsort
SELECT DISTINCT 19 * + cor0.col2 + col2 AS col0 FROM tab2 AS cor0
----
520
540
760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 * col0 + + 65 - col2 * col1 col2 FROM tab2 AS cor0
----
-555
3133
762

query I rowsort
SELECT DISTINCT + + col2 + - col1 * ( + ( col0 ) + col2 ) FROM tab0 AS cor0
----
-15479
-3491
-4869

query I rowsort
SELECT 35 - + col0 * - col2 FROM tab2 AS cor0
----
2063
224
3037

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col2 * col1 * + ( + col0 + + col0 ) col0 FROM tab1 AS cor0
----
-199680
-72960
-8424

query I rowsort
SELECT - ( + col2 ) - + ( + col2 ) * - col0 * - ( - col0 ) FROM tab2 AS cor0
----
1296
158158
237120

query I rowsort
SELECT - + col2 * + col2 AS col1 FROM tab2 cor0
----
-1444
-676
-729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * col2 * col0 col0 FROM tab1
----
36480
4212
99840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8600
SELECT ALL + tab1.col1 * CAST( NULL AS SIGNED ) AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8600
SELECT ALL + tab1.col1 * CAST ( NULL AS INTEGER ) AS col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col2 FROM tab2, tab0, tab2 cor0, tab1
----
81 values hashing to c4e6b1f1d28e731664a15a6f7cda4da9

query I rowsort
SELECT - - col0 * + 68 AS col2 FROM tab1 cor0
----
204
4352
5440

query I rowsort
SELECT 58 + + col1 * - col2 * - 59 FROM tab2 AS cor0
----
38172
49441
90564

query I rowsort
SELECT 53 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to fede6033dee346dbd272085c05724fda

query I rowsort
SELECT - tab2.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-8606
SELECT + CAST( NULL AS SIGNED ) * - 9 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8606
SELECT + CAST ( NULL AS INTEGER ) * - 9 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ( + col0 ) * + col0 + ( + col2 * - col1 + + tab1.col2 ) FROM tab1
----
-1341
3583
5248

query I rowsort
SELECT DISTINCT - col1 - - 10 FROM tab2 AS cor0
----
-21
-49
-7

query I rowsort
SELECT ALL 37 * 57 FROM tab2 AS cor0
----
2109
2109
2109

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8610
SELECT DISTINCT + CAST( + col2 AS SIGNED ) * - cor0.col0 + CAST( NULL AS SIGNED ) * + ( + col0 ) + col0 AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8610
SELECT DISTINCT + CAST ( + col2 AS INTEGER ) * - cor0.col0 + CAST ( NULL AS INTEGER ) * + ( + col0 ) + col0 AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT 47 + 62 AS col0 FROM tab1 AS cor0
----
109

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( - col0 ) * cor0.col1 - - 88 col0 FROM tab1 cor0
----
-552
-952
10

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8613
SELECT CAST( NULL AS SIGNED ) * col2 * + col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8613
SELECT CAST ( NULL AS INTEGER ) * col2 * + col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 51 AS col0 FROM tab2 AS cor0
----
51
51
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + - col1 col2 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 68 + - cor0.col2 col2 FROM tab1 AS cor0
----
-122
-125
-164

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8617
SELECT DISTINCT - CAST( + col2 AS SIGNED ) col1 FROM tab1 AS cor0
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8617
SELECT DISTINCT - CAST ( + col2 AS INTEGER ) col1 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT 86 * + cor0.col1 + col1 * - 27 FROM tab0 AS cor0
----
5074
5369
5723

query I rowsort
SELECT - + 90 + col2 FROM tab1 cor0
----
-33
-36
6

query I rowsort
SELECT - - col0 * col2 + - 59 AS col1 FROM tab2 AS cor0
----
130
1969
2943

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 54 + cor0.col2 col1 FROM tab1 cor0
----
108
111
150

onlyif mysql # use DIV operator for integer division
query I rowsort label-8622
SELECT cor0.col1 * col1 DIV + col1 AS col2 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-8622
SELECT cor0.col1 * col1 / + col1 AS col2 FROM tab0 AS cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col1 * + 71 col1 FROM tab1 AS cor0
----
1872
720
936

query I rowsort
SELECT + - col2 * + 62 AS col1 FROM tab1 AS cor0
----
-3348
-3534
-5952

onlyif mysql # use DIV operator for integer division
query I rowsort label-8625
SELECT DISTINCT col0 DIV col0 col1 FROM tab0 AS cor0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8625
SELECT DISTINCT col0 / col0 col1 FROM tab0 AS cor0
----
1

query I rowsort
SELECT ALL tab1.col1 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT ALL - 80 * col2 AS col0 FROM tab2
----
-2080
-2160
-3040

query I rowsort
SELECT cor0.col1 * + ( - 43 ) FROM tab2, tab1 AS cor0
----
9 values hashing to 276dfb3253d47d01e27b82b527a52f42

query I rowsort
SELECT DISTINCT col1 * - col2 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT + col0 + + cor0.col1 * + cor0.col1 AS col2 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT DISTINCT col1 - cor0.col2 * ( col0 ) AS col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT ALL - - col1 * 74 + - 55 FROM tab0 cor0
----
6309
6679
7123

query I rowsort
SELECT - - col2 * col0 * cor0.col1 + + col1 AS col1 FROM tab1 AS cor0
----
36490
4238
99853

query I rowsort
SELECT ALL col2 + 99 FROM tab0 AS cor0
----
100
132
181

onlyif mysql # use DIV operator for integer division
query I rowsort label-8635
SELECT + + col2 DIV CAST( 65 AS SIGNED ) + - col2 AS col2 FROM tab0 AS cor0
----
-1
-33
-81

skipif mysql # not compatible
query I rowsort label-8635
SELECT + + col2 / CAST ( 65 AS INTEGER ) + - col2 AS col2 FROM tab0 AS cor0
----
-1
-33
-81

query I rowsort
SELECT ALL - col2 * + 40 AS col2 FROM tab1 AS cor0
----
-2160
-2280
-3840

query I rowsort
SELECT DISTINCT - col2 * col2 * ( + col0 * - col1 ) FROM tab0 AS cor0
----
2247696
3395
54457676

query I rowsort
SELECT DISTINCT - tab1.col2 * col1 * + col1 FROM tab1
----
-16224
-36504
-5700

query I rowsort
SELECT DISTINCT cor1.col1 AS col2 FROM tab1, tab1 cor0, tab0 AS cor1
----
86
91
97

query I rowsort
SELECT - 36 * col1 FROM tab2
----
-1116
-2124
-612

query I rowsort
SELECT 27 * - col1 FROM tab1
----
-270
-351
-702

query I rowsort
SELECT DISTINCT col2 * + col1 + + col2 + col1 AS col0 FROM tab0 AS cor0
----
195
2957
7635

query I rowsort
SELECT DISTINCT - cor0.col2 * col0 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT col2 + cor0.col2 AS col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT DISTINCT - + cor0.col0 + col2 * + cor0.col1 FROM tab0 cor0
----
2814
62
7373

query I rowsort
SELECT + col1 * ( col2 * + col1 ) FROM tab1 cor0
----
16224
36504
5700

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8647
SELECT CAST( 68 AS SIGNED ) * + cor0.col0 col1 FROM tab0 AS cor0
----
1632
2380
6052

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8647
SELECT CAST ( 68 AS INTEGER ) * + cor0.col0 col1 FROM tab0 AS cor0
----
1632
2380
6052

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8648
SELECT + - CAST( col0 AS SIGNED ) * col2 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-8648
SELECT + - CAST ( col0 AS INTEGER ) * col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT + + 23 * col1 AS col2 FROM tab0 AS cor0
----
1978
2093
2231

query I rowsort
SELECT ALL cor1.col2 AS col1 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT + ( - cor0.col0 ) * col1 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab2, tab1 cor1, tab1, tab1 AS cor2
----
3645 values hashing to d10b928ceb6690f7c98bfe77a5adfcac

query I rowsort
SELECT + col2 - col0 * 22 * col0 FROM tab2 AS cor0
----
-1051
-133822
-137264

query I rowsort
SELECT + - col2 + col0 AS col1 FROM tab2 AS cor0
----
-20
41
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8655
SELECT DISTINCT + + cor0.col0 * col2 * + CAST( col1 AS SIGNED ) - col2 FROM tab0 AS cor0
----
3394
664036
68079

skipif mysql # not compatible
query I rowsort label-8655
SELECT DISTINCT + + cor0.col0 * col2 * + CAST ( col1 AS INTEGER ) - col2 FROM tab0 AS cor0
----
3394
664036
68079

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8656
SELECT ALL - + col1 + col1 - CAST( NULL AS SIGNED ) * col0 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8656
SELECT ALL - + col1 + col1 - CAST ( NULL AS INTEGER ) * col0 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 96 col0 FROM tab2
----
96
96
96

query I rowsort
SELECT DISTINCT + col2 * - col0 + col2 * - col0 FROM tab1
----
-15360
-324
-7296

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 28 col0 FROM tab2
----
28
28
28

query I rowsort
SELECT DISTINCT + col1 * col1 + - col1 FROM tab2
----
272
3422
930

query I rowsort
SELECT DISTINCT ( col1 ) + 87 AS col1 FROM tab2
----
104
118
146

query I rowsort
SELECT 26 * + col0 - col1 * col1 * - col0 AS col1 FROM tab0 AS cor0
----
178128
330225
739323

query I rowsort
SELECT - + col2 * col1 - - col2 AS col0 FROM tab2 AS cor0
----
-1508
-608
-810

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8664
SELECT ALL - + col2 + col1 * CAST( - col2 AS SIGNED ) * col1 FROM tab2 AS cor0
----
-11020
-25974
-90532

skipif mysql # not compatible
query I rowsort label-8664
SELECT ALL - + col2 + col1 * CAST ( - col2 AS INTEGER ) * col1 FROM tab2 AS cor0
----
-11020
-25974
-90532

query I rowsort
SELECT + - col0 + + cor0.col2 FROM tab0 AS cor0
----
-34
-7
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8666
SELECT col2 * col2 + CAST( NULL AS SIGNED ) * + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8666
SELECT col2 * col2 + CAST ( NULL AS INTEGER ) * + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col2 + - col1 FROM tab0 AS cor0
----
-119
-173
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 8 col2 FROM tab1, tab1 AS cor0
----
-8

query I rowsort
SELECT ALL - 47 * - col0 AS col0 FROM tab0
----
1128
1645
4183

onlyif mysql # use DIV operator for integer division
query I rowsort label-8670
SELECT ALL + 17 DIV + ( - cor0.col0 ) FROM tab1 AS cor0
----
-5
0
0

skipif mysql # not compatible
query I rowsort label-8670
SELECT ALL + 17 / + ( - cor0.col0 ) FROM tab1 AS cor0
----
-5
0
0

query I rowsort
SELECT + 5 * col0 + - col2 * + col0 AS col0 FROM tab2 AS cor0
----
-154
-1638
-2607

query I rowsort
SELECT DISTINCT - 14 AS col1 FROM tab0 cor0
----
-14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 99 col1 FROM tab1 AS cor0
----
-99

query I rowsort
SELECT DISTINCT + col0 * col2 - cor0.col2 * col1 FROM tab1 AS cor0
----
-1242
3078
6432

query I rowsort
SELECT ALL + col1 * - ( + cor0.col0 ) - col0 * + col0 AS col0 FROM tab1 AS cor0
----
-4736
-7440
-87

query I rowsort
SELECT + 19 + - col2 FROM tab2 AS cor0
----
-19
-7
-8

query I rowsort
SELECT ALL - + 84 FROM tab1 cor0
----
-84
-84
-84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 65 * cor0.col0 col0 FROM tab2 AS cor0
----
-455
-5070
-5135

query I rowsort
SELECT + col0 + col2 * + 55 * + 1 FROM tab2 cor0
----
1492
1508
2169

query I rowsort
SELECT ALL + 50 AS col0 FROM tab1, tab0 cor0, tab0 AS cor1
----
27 values hashing to 314aace40e704c20a6be06204a329f80

query I rowsort
SELECT DISTINCT 65 + - cor0.col1 * + 56 AS col1 FROM tab1 AS cor0
----
-1391
-495
-663

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col2 * col0 col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT + 14 * col1 AS col2 FROM tab2 AS cor0
----
238
434
826

query I rowsort
SELECT - 31 FROM tab0, tab1 cor0
----
9 values hashing to f4b05206ee2fc0cf8007d9c3514885fa

query I rowsort
SELECT - col1 + + col0 * + col2 * + col1 + + col2 AS col0 FROM tab0 AS cor0
----
3299
664109
68059

query I rowsort
SELECT DISTINCT col1 * 4 * col2 + + col0 * - col0 AS col1 FROM tab2 AS cor0
----
-3657
3299
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + col1 * + col0 col0 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT ALL + col0 + - 80 FROM tab1 AS cor0
----
-16
-77
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 - cor0.col1 col0 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT DISTINCT - col0 + ( - col1 ) AS col2 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT ALL + cor0.col2 * - ( - 81 ) AS col1 FROM tab0 AS cor0
----
2673
6642
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8692
SELECT CAST( NULL AS SIGNED ) * 62 + col1 + - col0 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8692
SELECT CAST ( NULL AS INTEGER ) * 62 + col1 + - col0 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 + - 1 FROM tab0
----
0
32
81

query I rowsort
SELECT col1 * 83 * - 29 + col0 * + tab1.col2 AS col2 FROM tab1
----
-20422
-23611
-62420

query I rowsort
SELECT + col2 + 14 * - col2 * - tab2.col0 + - col0 * + col2 FROM tab2
----
2484
26390
39064

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8696
SELECT + CAST( NULL AS SIGNED ) + + col0 * col0 + col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8696
SELECT + CAST ( NULL AS INTEGER ) + + col0 * col0 + col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT tab2.col0 * - 56 * - 61 AS col0 FROM tab2
----
23912
266448
269864

onlyif mysql # use DIV operator for integer division
query I rowsort label-8698
SELECT DISTINCT + col0 DIV 39 + col0 * col2 FROM tab0
----
35
7300
792

skipif mysql # not compatible
query I rowsort label-8698
SELECT DISTINCT + col0 / 39 + col0 * col2 FROM tab0
----
35
7300
792

query I rowsort
SELECT ALL col0 * + 83 + col1 * col2 * - 65 FROM tab1
----
-31738
-74480
-91011

query I rowsort
SELECT ALL + col0 + + ( - col2 ) + col2 FROM tab0
----
24
35
89

query I rowsort
SELECT col1 * - col2 + col1 + - tab1.col0 * col1 FROM tab1
----
-1200
-1456
-2275

query I rowsort
SELECT - col0 + + 46 FROM tab0
----
-43
11
22

query I rowsort
SELECT - col0 + - 43 + - col2 FROM tab1
----
-100
-164
-219

query I rowsort
SELECT ( + col0 ) - + col2 AS col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT + col2 * 27 + - col1 FROM tab1 AS cor0
----
1432
1529
2579

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8706
SELECT - CAST( + col0 AS SIGNED ) * cor0.col0 - col2 AS col2 FROM tab0 AS cor0
----
-1226
-609
-8003

skipif mysql # not compatible
query I rowsort label-8706
SELECT - CAST ( + col0 AS INTEGER ) * cor0.col0 - col2 AS col2 FROM tab0 AS cor0
----
-1226
-609
-8003

query I rowsort
SELECT - + col2 * col0 - col2 AS col2 FROM tab1 cor0
----
-216
-3705
-7776

query I rowsort
SELECT + col1 + + ( 82 ) AS col1 FROM tab1
----
108
92
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 42 col0 FROM tab2
----
-42

query I rowsort
SELECT ALL ( + col2 + + col1 * tab2.col0 ) FROM tab2
----
1381
244
4628

query I rowsort
SELECT - 57 + ( + col0 ) AS col0 FROM tab2 AS cor0
----
-50
21
22

onlyif mysql # use DIV operator for integer division
query I rowsort label-8712
SELECT ALL col2 DIV - col0 AS col2 FROM tab1
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-8712
SELECT ALL col2 / - col0 AS col2 FROM tab1
----
-1
-18
0

query I rowsort
SELECT DISTINCT - cor0.col0 * + col1 + + col0 * + cor0.col1 FROM tab1 AS cor0
----
0

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 cor0, tab0 AS cor1, tab2, tab1 AS cor2
----
3645 values hashing to 5e27196f2932b25a5297ddec46b8b8f1

query I rowsort
SELECT - ( - tab0.col0 + + tab0.col2 ) AS col2 FROM tab0
----
-9
34
7

query I rowsort
SELECT ALL + col0 * 47 - + col2 FROM tab2 AS cor0
----
302
3640
3675

query I rowsort
SELECT ALL + + col2 * - col0 + col0 * cor0.col0 FROM tab0 AS cor0
----
-216
1190
623

query I rowsort
SELECT DISTINCT col0 * 26 + ( col2 + 92 ) AS col1 FROM tab0 AS cor0
----
1003
2488
749

query I rowsort
SELECT - 32 + - 26 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to de0811e670e75d2aeeb657e32bddb0c0

query I rowsort
SELECT DISTINCT 35 * - 92 FROM tab1, tab1 AS cor0
----
-3220

query I rowsort
SELECT + - col0 * col2 + + cor0.col1 AS col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT - + col2 * cor0.col0 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL - + col0 * - 74 FROM tab2 cor0
----
518
5772
5846

query I rowsort
SELECT DISTINCT col2 * + 48 + + 20 + - col0 AS col0 FROM tab2 AS cor0
----
1190
1309
1765

onlyif mysql # use DIV operator for integer division
query I rowsort label-8725
SELECT DISTINCT + col0 DIV CAST( - 5 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-1
-15

skipif mysql # not compatible
query I rowsort label-8725
SELECT DISTINCT + col0 / CAST ( - 5 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-1
-15

query I rowsort
SELECT DISTINCT + col2 * + 67 AS col2 FROM tab0 AS cor0
----
2211
5494
67

query I rowsort
SELECT ALL col2 + col0 * col0 + cor0.col2 * col0 FROM tab1 cor0
----
14176
225
7801

query I rowsort
SELECT DISTINCT col1 + - ( + col0 ) * col0 AS col2 FROM tab1 AS cor0
----
-4086
-6387
17

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8729
SELECT ALL col1 + + CAST( NULL AS SIGNED ) / - ( col1 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8729
SELECT ALL col1 + + CAST ( NULL AS INTEGER ) / - ( col1 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - 6 * cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 4c80b2adc32af3e58d003e875ea4946c

query I rowsort
SELECT ALL + tab0.col2 + + tab0.col0 + col0 FROM tab0
----
260
71
81

query I rowsort
SELECT DISTINCT - col1 * ( - 71 ) AS col2 FROM tab1
----
1846
710
923

query I rowsort
SELECT ALL 51 AS col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 02a7de94365b8cb5b5cb92c4b1d1e7c5

query I rowsort
SELECT - 13 FROM tab0, tab1 AS cor0
----
9 values hashing to e95f5f4bd0f480397cced5f5e8a23792

onlyif mysql # use DIV operator for integer division
query I rowsort label-8735
SELECT tab0.col0 DIV 19 FROM tab0
----
1
1
4

skipif mysql # not compatible
query I rowsort label-8735
SELECT tab0.col0 / 19 FROM tab0
----
1
1
4

query I rowsort
SELECT ALL 23 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

onlyif mysql # use DIV operator for integer division
query I rowsort label-8737
SELECT ALL + 4 DIV + 71 - col2 col2 FROM tab1
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8737
SELECT ALL + 4 / + 71 - col2 col2 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT + col0 - - col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT - + col1 * ( + col1 * col1 ) + 78 AS col1 FROM tab2 AS cor0
----
-205301
-29713
-4835

query I rowsort
SELECT - 88 + col0 AS col2 FROM tab0 AS cor0
----
-53
-64
1

query I rowsort
SELECT ALL col1 + - tab0.col0 * col0 AS col1 FROM tab0
----
-1128
-490
-7830

query I rowsort
SELECT ALL - col1 + col2 AS col2 FROM tab1
----
28
47
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-8743
SELECT + ( - col2 ) DIV 33 + - 76 FROM tab1 AS cor0
----
-77
-77
-78

skipif mysql # not compatible
query I rowsort label-8743
SELECT + ( - col2 ) / 33 + - 76 FROM tab1 AS cor0
----
-77
-77
-78

query I rowsort
SELECT ALL - col1 * + cor0.col2 AS col0 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT - + ( + col0 ) * - col2 * col0 + col0 FROM tab1 AS cor0
----
233536
489
614480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col0 * col2 col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL col2 + col2 * 65 * 47 FROM tab1 AS cor0
----
165024
174192
293376

query I rowsort
SELECT - col2 * col2 + - 80 FROM tab1 AS cor0
----
-2996
-3329
-9296

query I rowsort
SELECT 28 * col1 + + col1 AS col0 FROM tab1 AS cor0
----
290
377
754

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * + col2 * - col1 + col0 col1 FROM tab0 AS cor0
----
244092
679131
9444

query I rowsort
SELECT ALL col0 + + tab1.col0 FROM tab1
----
128
160
6

query I rowsort
SELECT DISTINCT tab0.col2 * + col0 + - col2 FROM tab0
----
34
7216
759

query I rowsort
SELECT ALL col1 + col0 * - col1 AS col0 FROM tab1
----
-1027
-52
-630

query I rowsort
SELECT - cor0.col2 FROM tab2, tab0, tab0 cor0
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT DISTINCT - col1 * + col2 * ( col2 ) + col1 * col2 FROM tab1
----
-118560
-31920
-74412

query I rowsort
SELECT DISTINCT - col0 + - tab1.col1 AS col0 FROM tab1
----
-29
-74
-93

query I rowsort
SELECT 5 * col0 AS col2 FROM tab2
----
35
390
395

query I rowsort
SELECT ALL + col2 * - col1 - col2 FROM tab2 AS cor0
----
-1560
-684
-864

query I rowsort
SELECT cor0.col2 - col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 14 + col1 * tab0.col2 FROM tab0
----
111
2852
7476

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + + col2 col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT - 26 + + col0 AS col0 FROM tab2 AS cor0
----
-19
52
53

query I rowsort
SELECT DISTINCT - + col2 * ( 96 ) FROM tab1 AS cor0
----
-5184
-5472
-9216

query I rowsort
SELECT DISTINCT col0 + + col1 AS col2 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT DISTINCT - + col2 + cor0.col2 FROM tab0 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * 3 col1 FROM tab2 AS cor0
----
177
51
93

query I rowsort
SELECT DISTINCT - + col0 - - ( - col1 + col2 ) AS col1 FROM tab2 AS cor0
----
-11
-111
-58

query I rowsort
SELECT ALL - + col2 * + col1 * + cor0.col2 + col0 FROM tab1 AS cor0
----
-119728
-32426
-75813

onlyif mysql # use DIV operator for integer division
query I rowsort label-8769
SELECT ALL col1 * col0 DIV 21 - - col1 AS col1 FROM tab0 AS cor0
----
184
258
476

skipif mysql # not compatible
query I rowsort label-8769
SELECT ALL col1 * col0 / 21 - - col1 AS col1 FROM tab0 AS cor0
----
184
258
476

query I rowsort
SELECT - col0 * + col2 + - col0 FROM tab2 AS cor0
----
-196
-2106
-3081

query I rowsort
SELECT ALL + + col0 * - ( + 80 ) AS col2 FROM tab0 AS cor0
----
-1920
-2800
-7120

query I rowsort
SELECT ALL + col2 * cor0.col2 AS col1 FROM tab2 cor0
----
1444
676
729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8773
SELECT DISTINCT + + col1 * - CAST( + col1 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

skipif mysql # not compatible
query I rowsort label-8773
SELECT DISTINCT + + col1 * - CAST ( + col1 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT DISTINCT + cor0.col1 * 31 FROM tab0 AS cor0
----
2666
2821
3007

query I rowsort
SELECT ALL col2 * + 22 + - col0 + cor0.col0 FROM tab2 AS cor0
----
572
594
836

query I rowsort
SELECT - - col0 + - ( col2 ) FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT - - col0 + col0 AS col1 FROM tab1 AS cor0
----
128
160
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-8778
SELECT + cor0.col0 DIV cor0.col2 FROM tab0 cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-8778
SELECT + cor0.col0 / cor0.col2 FROM tab0 cor0
----
0
1
35

query I rowsort
SELECT + - 94 AS col2 FROM tab1 AS cor0
----
-94
-94
-94

query I rowsort
SELECT DISTINCT + + ( + cor0.col2 ) + + cor0.col2 AS col1 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT ALL + ( - cor0.col1 ) * + col0 * col1 AS col1 FROM tab1 AS cor0
----
-13520
-2028
-6400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 93 col0 FROM tab0 AS cor0
----
93
93
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-8783
SELECT DISTINCT + col2 DIV cor0.col0 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-8783
SELECT DISTINCT + col2 / cor0.col0 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT DISTINCT - col1 * - ( - 3 ) AS col1 FROM tab1
----
-30
-39
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-8785
SELECT DISTINCT - col0 * col2 DIV col0 AS col1 FROM tab2
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-8785
SELECT DISTINCT - col0 * col2 / col0 AS col1 FROM tab2
----
-26
-27
-38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8786
SELECT ALL + CAST( NULL AS SIGNED ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8786
SELECT ALL + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 81 * col0 AS col2 FROM tab1 AS cor0
----
243
5184
6480

query I rowsort
SELECT DISTINCT - + cor0.col2 + + col2 FROM tab1 cor0
----
0

query I rowsort
SELECT DISTINCT col2 + 29 FROM tab2 AS cor0
----
55
56
67

query I rowsort
SELECT DISTINCT + - col1 * col1 + col1 + + col0 AS col2 FROM tab2 AS cor0
----
-193
-3344
-923

query I rowsort
SELECT ALL - 24 * + col1 FROM tab1 AS cor0
----
-240
-312
-624

query I rowsort
SELECT DISTINCT 48 * cor0.col0 FROM tab2 cor0
----
336
3744
3792

query I rowsort
SELECT + col1 * - col1 + - 80 FROM tab1 cor0
----
-180
-249
-756

query I rowsort
SELECT - - col2 - col0 * col1 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT ALL - 21 + - col1 FROM tab2 AS cor0
----
-38
-52
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-8796
SELECT DISTINCT 63 DIV col2 - col2 * + 19 AS col1 FROM tab0
----
-1558
-626
44

skipif mysql # not compatible
query I rowsort label-8796
SELECT DISTINCT 63 / col2 - col2 * + 19 AS col1 FROM tab0
----
-1558
-626
44

query I rowsort
SELECT DISTINCT col0 + + 79 FROM tab2
----
157
158
86

query I rowsort
SELECT - col2 + - ( + tab0.col2 + - col2 * col0 ) AS col1 FROM tab0
----
33
7134
726

query I rowsort
SELECT - col1 + 46 FROM tab2 AS cor0
----
-13
15
29

query I rowsort
SELECT - ( - 7 ) + + col0 AS col1 FROM tab0 cor0
----
31
42
96

query I rowsort
SELECT + 8 - + col2 FROM tab1 AS cor0
----
-46
-49
-88

query I rowsort
SELECT DISTINCT col2 + + 20 FROM tab2
----
46
47
58

query I rowsort
SELECT 58 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 9ee363c6ac19cfdb8a50c7dfd5cc2b8a

query I rowsort
SELECT DISTINCT + tab0.col2 + 31 FROM tab0
----
113
32
64

query I rowsort
SELECT - tab1.col1 * + ( + col1 * col0 ) FROM tab1
----
-13520
-2028
-6400

query I rowsort
SELECT ALL - col1 + 88 AS col0 FROM tab1
----
62
75
78

query I rowsort
SELECT - ( - col1 ) * - col1 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT ( - cor0.col0 ) FROM tab2, tab0 AS cor0
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query I rowsort
SELECT 10 + ( + col2 ) FROM tab1
----
106
64
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 31 + + col2 col1 FROM tab1 AS cor0
----
127
85
88

query I rowsort
SELECT + col2 * col0 * + col0 + 16 FROM tab2 AS cor0
----
1339
158200
237174

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8812
SELECT - + CAST( NULL AS SIGNED ) + col2 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8812
SELECT - + CAST ( NULL AS INTEGER ) + col2 AS col2 FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8813
SELECT ALL 52 + + 57 DIV cor0.col1 col0 FROM tab2 AS cor0
----
52
53
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8813
SELECT ALL 52 + + 57 / cor0.col1 col0 FROM tab2 AS cor0
----
52
53
55

query I rowsort
SELECT - col2 + col2 + + col2 AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT + + col0 * col2 + col1 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT ALL - ( + col1 ) * col0 + 90 * col0 FROM tab2 AS cor0
----
2418
413
5767

query I rowsort
SELECT + 76 * + col2 + col2 FROM tab1 AS cor0
----
4158
4389
7392

query I rowsort
SELECT ALL 36 * - col0 AS col0 FROM tab0 AS cor0
----
-1260
-3204
-864

query I rowsort
SELECT DISTINCT - col1 + + cor0.col1 FROM tab1 cor0
----
0

query I rowsort
SELECT - ( - col0 ) * + col0 AS col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL + cor0.col1 * + col1 AS col1 FROM tab2 AS cor0
----
289
3481
961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * + col2 col0 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL + col2 - - col0 * 12 AS col2 FROM tab2 cor0
----
111
962
986

query I rowsort
SELECT DISTINCT 8 + col0 AS col2 FROM tab0 AS cor0
----
32
43
97

query I rowsort
SELECT + 47 * col1 FROM tab0 AS cor0
----
4042
4277
4559

query I rowsort
SELECT DISTINCT - col0 * - ( col1 * + col1 ) + 4 + 36 FROM tab2 AS cor0
----
22871
271558
6767

onlyif mysql # use DIV operator for integer division
query I rowsort label-8827
SELECT ALL - col2 DIV + cor0.col1 + + col1 AS col2 FROM tab1 AS cor0
----
24
5
6

skipif mysql # not compatible
query I rowsort label-8827
SELECT ALL - col2 / + cor0.col1 + + col1 AS col2 FROM tab1 AS cor0
----
24
5
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-8828
SELECT ALL col0 + col2 + col2 * cor0.col0 DIV + ( + col2 ) FROM tab0 AS cor0
----
260
71
81

skipif mysql # not compatible
query I rowsort label-8828
SELECT ALL col0 + col2 + col2 * cor0.col0 / + ( + col2 ) FROM tab0 AS cor0
----
260
71
81

query I rowsort
SELECT 22 * + tab0.col1 AS col1 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to dda8c7c541ef66ba5880a6d1dcef2476

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8830
SELECT + cor0.col2 * + ( col1 ) + cor0.col1 * + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8830
SELECT + cor0.col2 * + ( col1 ) + cor0.col1 * + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8831
SELECT - + col2 * CAST( + col1 + col1 AS SIGNED ) FROM tab1 AS cor0
----
-1140
-2496
-2808

skipif mysql # not compatible
query I rowsort label-8831
SELECT - + col2 * CAST ( + col1 + col1 AS INTEGER ) FROM tab1 AS cor0
----
-1140
-2496
-2808

query I rowsort
SELECT ALL + col2 * col0 + + col2 - + col1 FROM tab1 AS cor0
----
190
3695
7763

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 cor0 CROSS JOIN tab2, tab2 AS cor1, tab2 AS cor2, tab0 AS cor3
----
3645 values hashing to 40e4acd618698dd2305f1f7b8b547f7a

query I rowsort
SELECT - col2 + + 37 * col2 AS col2 FROM tab1 AS cor0
----
1944
2052
3456

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8835
SELECT col1 * CAST( - col0 AS SIGNED ) FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort label-8835
SELECT col1 * CAST ( - col0 AS INTEGER ) FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8836
SELECT - col0 * + CAST( NULL AS SIGNED ) AS col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8836
SELECT - col0 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8837
SELECT + + cor0.col0 DIV - 70 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-8837
SELECT + + cor0.col0 / - 70 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT + - col1 - 9 AS col1 FROM tab1 AS cor0
----
-19
-22
-35

query I rowsort
SELECT - 85 * + col0 FROM tab0 AS cor0
----
-2040
-2975
-7565

query I rowsort
SELECT col2 - 11 AS col1 FROM tab1 AS cor0
----
43
46
85

query I rowsort
SELECT DISTINCT 65 FROM tab2 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab0 AS cor2, tab0 AS cor3
----
65

query I rowsort
SELECT 17 + - 68 FROM tab1 AS cor0 CROSS JOIN tab1, tab2 cor1, tab2 AS cor2
----
81 values hashing to 006d860fc40bbb38cbb649ba917d74a9

query I rowsort
SELECT DISTINCT - - col2 * ( - col2 ) FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT ( 41 ) * col2 + 64 - col0 FROM tab0 AS cor0
----
1393
3337
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-8845
SELECT ALL + 27 DIV + col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8845
SELECT ALL + 27 / + col1 FROM tab0
----
0
0
0

query I rowsort
SELECT - col1 + + cor0.col2 * ( + col0 ) AS col1 FROM tab2 AS cor0
----
158
1969
2985

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * + col2 col1 FROM tab2
----
1444
676
729

query I rowsort
SELECT ( + col1 + - col0 ) AS col0 FROM tab0
----
2
62
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-8849
SELECT - col0 DIV col0 col1 FROM tab2 AS cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8849
SELECT - col0 / col0 col1 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + + col2 + col0 + - cor0.col0 AS col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT + cor0.col2 * + col0 + - col2 + + col0 * col0 FROM tab2 AS cor0
----
211
8086
9205

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 22 col0 FROM tab0 AS cor0
----
22
22
22

query I rowsort
SELECT ALL + cor0.col2 + - 25 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 52d37387acaf7c5ebc79a816438527f7

query I rowsort
SELECT ALL + - 22 * - cor0.col0 + col2 * - col1 AS col1 FROM tab1 cor0
----
-1338
512
838

query I rowsort
SELECT ALL - - ( col2 ) * + col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT 97 * cor0.col0 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to e30a30007d8f2794e2c4dddc0f207e12

query I rowsort
SELECT + col2 * col1 * - col1 AS col2 FROM tab2
----
-10982
-25947
-90506

onlyif mysql # use DIV operator for integer division
query I rowsort label-8858
SELECT DISTINCT col1 * col2 DIV + col1 AS col1 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-8858
SELECT DISTINCT col1 * col2 / + col1 AS col1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT - 19 * + col1 FROM tab2 AS cor0
----
-1121
-323
-589

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * - col1 * col2 + cor0.col2 col0 FROM tab1 AS cor0
----
16320
36558
5757

query I rowsort
SELECT ALL - col2 + - cor0.col2 * 80 FROM tab2 cor0
----
-2106
-2187
-3078

onlyif mysql # use DIV operator for integer division
query I rowsort label-8862
SELECT + + 70 DIV + col0 FROM tab1 AS cor0
----
0
1
23

skipif mysql # not compatible
query I rowsort label-8862
SELECT + + 70 / + col0 FROM tab1 AS cor0
----
0
1
23

query I rowsort
SELECT 22 - tab2.col2 * + col0 FROM tab2
----
-167
-2006
-2980

query I rowsort
SELECT DISTINCT - 79 + col0 + + col0 FROM tab1
----
-73
49
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-8865
SELECT DISTINCT 88 + 20 * col2 DIV - ( + col1 ) AS col0 FROM tab2
----
44
71
80

skipif mysql # not compatible
query I rowsort label-8865
SELECT DISTINCT 88 + 20 * col2 / - ( + col1 ) AS col0 FROM tab2
----
44
71
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8866
SELECT ALL CAST( NULL AS SIGNED ) + 93 * + col0 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8866
SELECT ALL CAST ( NULL AS INTEGER ) + 93 * + col0 AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT 32 * tab1.col2 AS col2 FROM tab1
----
1728
1824
3072

query I rowsort
SELECT DISTINCT + ( + col1 ) * col1 AS col0 FROM tab1
----
100
169
676

query I rowsort
SELECT DISTINCT - 28 + col1 AS col1 FROM tab0
----
58
63
69

query I rowsort
SELECT + col1 + + 16 FROM tab2 AS cor0
----
33
47
75

query I rowsort
SELECT DISTINCT - - col1 + col1 FROM tab0 AS cor0
----
172
182
194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 + + col1 * col0 col1 FROM tab1 cor0
----
104
1053
650

query I rowsort
SELECT ALL - cor0.col1 * ( col0 ) * col1 FROM tab2 AS cor0
----
-22831
-271518
-6727

query I rowsort
SELECT DISTINCT + col1 + ( cor0.col1 ) + col1 FROM tab1 AS cor0
----
30
39
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + cor0.col2 + + col2 col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT ALL + 39 AS col0 FROM tab2, tab2 AS cor0, tab2 cor1
----
27 values hashing to ed2ebd9def3e2c38aa46cb3af60fe229

query I rowsort
SELECT ALL - 72 * 88 FROM tab2, tab2 AS cor0
----
9 values hashing to fdb5299edf8d387c482e9679ced75d6a

query I rowsort
SELECT + - col1 + 22 + 16 AS col1 FROM tab0 AS cor0
----
-48
-53
-59

query I rowsort
SELECT - col1 + + col1 * + col0 AS col1 FROM tab2 AS cor0
----
1326
186
4543

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8880
SELECT + col0 + + CAST( NULL AS SIGNED ) + + col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8880
SELECT + col0 + + CAST ( NULL AS INTEGER ) + + col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort
SELECT ALL + ( 84 ) * cor0.col1 - CAST ( + col1 AS REAL ) * + col0 AS col2 FROM tab0 AS cor0
----
-455
4753
5160

query I rowsort
SELECT ALL + - col2 + + col0 AS col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT + 65 + + 9 FROM tab0 AS cor0
----
74
74
74

query I rowsort
SELECT col2 * 48 + col0 FROM tab0
----
1608
4025
83

query I rowsort
SELECT 63 + + 62 * col0 + + col1 AS col2 FROM tab1
----
275
4041
5036

query I rowsort
SELECT + col2 * 83 - col0 * cor0.col1 FROM tab0 AS cor0
----
-1293
-3312
675

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8887
SELECT ALL - CAST( - col2 AS SIGNED ) * col1 + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8887
SELECT ALL - CAST ( - col2 AS INTEGER ) * col1 + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 38 - - col2 col2 FROM tab0 AS cor0
----
120
39
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-8889
SELECT col2 DIV + 24 + col1 AS col0 FROM tab2 AS cor0
----
18
32
60

skipif mysql # not compatible
query I rowsort label-8889
SELECT col2 / + 24 + col1 AS col0 FROM tab2 AS cor0
----
18
32
60

query I rowsort
SELECT ALL - ( - col0 ) AS col2 FROM tab0 AS cor0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col2 * col2 - - col0 * ( 40 ) col2 FROM tab2 AS cor0
----
1009
3796
4604

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor1.col2 col0 FROM tab2 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT DISTINCT + col2 + col2 * - col1 FROM tab1
----
-1152
-1350
-513

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8894
SELECT - - cor0.col1 + + ( + col2 + + CAST( - col0 AS SIGNED ) ) AS col0 FROM tab0 AS cor0
----
63
84
95

skipif mysql # not compatible
query I rowsort label-8894
SELECT - - cor0.col1 + + ( + col2 + + CAST ( - col0 AS INTEGER ) ) AS col0 FROM tab0 AS cor0
----
63
84
95

query I rowsort
SELECT ( + cor0.col1 ) * + col1 * + col2 - 84 * - cor0.col1 FROM tab0 AS cor0
----
17557
251292
686686

query I rowsort
SELECT DISTINCT - - 80 * 13 + col2 FROM tab2 AS cor0
----
1066
1067
1078

query I rowsort
SELECT DISTINCT + col2 + + ( col2 ) AS col0 FROM tab1 AS cor0
----
108
114
192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( col0 ) - col2 col1 FROM tab2 cor0
----
-104
-117
-34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8899
SELECT DISTINCT - CAST( + 27 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-27

skipif mysql # not compatible
query I rowsort label-8899
SELECT DISTINCT - CAST ( + 27 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-27

query I rowsort
SELECT DISTINCT ( - col0 ) + col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL + col2 + + cor0.col1 + - col0 FROM tab1 AS cor0
----
29
3
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-8902
SELECT ALL - col2 * - cor0.col0 DIV col0 AS col0 FROM tab2 cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-8902
SELECT ALL - col2 * - cor0.col0 / col0 AS col0 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT ALL - + ( col1 ) * col0 + - col1 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT DISTINCT + + col1 * - cor0.col1 + col2 AS col2 FROM tab1 AS cor0
----
-43
-622
-73

query I rowsort
SELECT DISTINCT - col1 + + 38 FROM tab0 AS cor0
----
-48
-53
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 - - 50 col0 FROM tab0 AS cor0
----
132
51
83

query I rowsort
SELECT - col1 * - col0 + col2 AS col2 FROM tab2 AS cor0
----
1381
244
4628

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8908
SELECT ALL - CAST( NULL AS SIGNED ) + 24 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8908
SELECT ALL - CAST ( NULL AS INTEGER ) + 24 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( - col0 ) * - col2 - col2 * + col1 AS col2 FROM tab2 cor0
----
-648
2356
494

query I rowsort
SELECT ALL col2 * - col0 * cor0.col1 AS col1 FROM tab0 AS cor0
----
-3395
-664118
-68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-8911
SELECT tab2.col0 + - col0 DIV col1 FROM tab2
----
7
75
77

skipif mysql # not compatible
query I rowsort label-8911
SELECT tab2.col0 + - col0 / col1 FROM tab2
----
7
75
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - ( cor0.col2 ) + ( ( + col1 ) ) * - 94 col1 FROM tab1 AS cor0
----
-1126
-2390
-883

query I rowsort
SELECT - col1 * - col0 + + ( - 19 + col1 ) FROM tab0 AS cor0
----
2131
3473
8171

query I rowsort
SELECT ALL 11 AS col1 FROM tab1 AS cor0
----
11
11
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * + ( - col2 ) * + cor0.col2 col0 FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT DISTINCT - col2 * - cor0.col1 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL - cor0.col2 + col2 * + col2 * col0 FROM tab1 AS cor0
----
207879
737184
8694

query I rowsort
SELECT - - col2 * ( cor0.col0 ) FROM tab0 AS cor0
----
35
7298
792

query IIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 AS cor0 WHERE NULL NOT BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT DISTINCT - + col0 + + col1 * + col1 FROM tab2 cor0
----
210
3403
954

query I rowsort
SELECT DISTINCT - col1 * 83 AS col0 FROM tab0 AS cor0
----
-7138
-7553
-8051

query I rowsort
SELECT ALL + col1 * - col0 + col0 * - col2 + + 16 * + cor0.col1 AS col2 FROM tab1 AS cor0
----
-4128
-8512
176

query I rowsort
SELECT DISTINCT + col2 * col1 * + 17 AS col0 FROM tab2 cor0
----
10982
14229
26078

query I rowsort
SELECT - + cor0.col0 * + 85 FROM tab0 AS cor0
----
-2040
-2975
-7565

query I rowsort
SELECT ALL + col1 * col0 + cor0.col2 AS col2 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT - + 36 * + col2 FROM tab2 AS cor0
----
-1368
-936
-972

query I rowsort
SELECT DISTINCT ( - col2 ) * 26 + 99 * col1 AS col2 FROM tab1 AS cor0
----
-1209
-492
1170

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8928
SELECT ALL - 98 + + col2 * - CAST( col0 + col0 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-15458
-422
-7394

skipif mysql # not compatible
query I rowsort label-8928
SELECT ALL - 98 + + col2 * - CAST ( col0 + col0 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-15458
-422
-7394

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - col1 col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT - 18 * - col0 AS col0 FROM tab2
----
126
1404
1422

query I rowsort
SELECT + 76 + 45 AS col2 FROM tab0
----
121
121
121

query I rowsort
SELECT col2 * col0 + + col2 AS col0 FROM tab2
----
2054
216
3040

query I rowsort
SELECT + ( ( col1 ) ) AS col2 FROM tab0
----
86
91
97

query I rowsort
SELECT + + 69 AS col2 FROM tab1 AS cor0
----
69
69
69

query I rowsort
SELECT + col0 * + col2 - ( cor0.col2 ) FROM tab1 cor0
----
108
3591
7584

query I rowsort
SELECT - cor0.col0 + + col0 * - ( + col1 ) AS col2 FROM tab1 AS cor0
----
-1120
-704
-81

query I rowsort
SELECT DISTINCT - cor0.col2 * cor1.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to a3b44b1349b97a64e1970dbe00e8d983

query I rowsort
SELECT col0 * col1 * tab1.col1 AS col0 FROM tab1
----
13520
2028
6400

onlyif mysql # use DIV operator for integer division
query I rowsort label-8939
SELECT col2 + ( col1 ) DIV col0 FROM tab0
----
3
36
83

skipif mysql # not compatible
query I rowsort label-8939
SELECT col2 + ( col1 ) / col0 FROM tab0
----
3
36
83

query I rowsort
SELECT ALL 43 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 199105619049271147956de52e7f5ed4

query I rowsort
SELECT DISTINCT 4 FROM tab1, tab0 AS cor0
----
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8942
SELECT DISTINCT + CAST( col1 AS SIGNED ) FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-8942
SELECT DISTINCT + CAST ( col1 AS INTEGER ) FROM tab0
----
86
91
97

query I rowsort
SELECT ALL 79 FROM tab0 cor0
----
79
79
79

query I rowsort
SELECT DISTINCT 80 * - col0 FROM tab0 AS cor0
----
-1920
-2800
-7120

query I rowsort
SELECT ALL + ( + cor0.col1 ) + - col2 AS col1 FROM tab2 AS cor0
----
-21
33
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 33 + + col0 * col0 col0 FROM tab1 AS cor0
----
4129
42
6433

query I rowsort
SELECT + ( col2 ) + + col0 FROM tab0 AS cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-8948
SELECT DISTINCT + + 35 + + col2 DIV col1 AS col2 FROM tab1 cor0
----
37
40
42

skipif mysql # not compatible
query I rowsort label-8948
SELECT DISTINCT + + 35 + + col2 / col1 AS col2 FROM tab1 cor0
----
37
40
42

query I rowsort
SELECT ALL + cor0.col1 + - col1 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT DISTINCT - 45 FROM tab1, tab0 AS cor0
----
-45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + col2 ) + + col1 * ( 54 ) col2 FROM tab0 AS cor0
----
4677
4996
5239

query I rowsort
SELECT ( col2 ) + col1 * + col1 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT DISTINCT 77 + - 88 AS col2 FROM tab1 AS cor0
----
-11

query I rowsort
SELECT 74 + col1 * col1 FROM tab1 AS cor0
----
174
243
750

query I rowsort
SELECT ALL 91 AS col0 FROM tab0, tab1 cor0
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

query I rowsort
SELECT col0 + col1 * - ( + col2 ) * - col2 AS col2 FROM tab2 AS cor0
----
22606
24627
39962

query I rowsort
SELECT + col2 + + cor0.col1 AS col0 FROM tab0 cor0
----
119
173
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8959
SELECT CAST( NULL AS SIGNED ) AS col2 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-8959
SELECT CAST ( NULL AS INTEGER ) AS col2 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # use DIV operator for integer division
query I rowsort label-8960
SELECT DISTINCT - col1 DIV - 72 FROM tab2
----
0

skipif mysql # not compatible
query I rowsort label-8960
SELECT DISTINCT - col1 / - 72 FROM tab2
----
0

query I rowsort
SELECT DISTINCT cor1.col1 AS col0 FROM tab0, tab1 cor0, tab2 AS cor1, tab2 AS cor2
----
17
31
59

query I rowsort
SELECT DISTINCT - col1 * col1 + - col0 AS col0 FROM tab1 AS cor0
----
-164
-249
-679

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8963
SELECT ALL CAST( + 83 AS SIGNED ) FROM tab2, tab2 AS cor0
----
9 values hashing to 18f405c31a0fb47ce3cc9f7effa8855c

skipif mysql # not compatible
query I rowsort label-8963
SELECT ALL CAST ( + 83 AS INTEGER ) FROM tab2, tab2 AS cor0
----
9 values hashing to 18f405c31a0fb47ce3cc9f7effa8855c

onlyif mysql # use DIV operator for integer division
query I rowsort label-8964
SELECT - - col2 DIV + 60 + col2 + col0 FROM tab2 AS cor0
----
104
117
34

skipif mysql # not compatible
query I rowsort label-8964
SELECT - - col2 / + 60 + col2 + col0 FROM tab2 AS cor0
----
104
117
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + - 14 * col1 col0 FROM tab2 AS cor0
----
-159
-427
-748

query I rowsort
SELECT + cor0.col1 * + col1 - - col2 AS col1 FROM tab1 AS cor0
----
157
265
730

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8967
SELECT + CAST( + col1 AS SIGNED ) * + col1 + 28 FROM tab1 AS cor0
----
128
197
704

skipif mysql # not compatible
query I rowsort label-8967
SELECT + CAST ( + col1 AS INTEGER ) * + col1 + 28 FROM tab1 AS cor0
----
128
197
704

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 77 col0 FROM tab0 AS cor0
----
77
77
77

query I rowsort
SELECT - 3 * - col0 FROM tab2 AS cor0
----
21
234
237

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8970
SELECT - CAST( NULL AS SIGNED ) * + col2 + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8970
SELECT - CAST ( NULL AS INTEGER ) * + col2 + col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 + 86 * + col0 FROM tab1 AS cor0
----
255
5440
6800

query I rowsort
SELECT - 93 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 38f445d95788c7dc754ff688a62df03b

query I rowsort
SELECT col1 * 48 FROM tab0
----
4128
4368
4656

query I rowsort
SELECT 69 * + cor0.col1 FROM tab2 cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 61be8b4ccea4cb1cc4add000bd70def7

query I rowsort
SELECT col1 + - col1 * ( ( - col2 ) ) FROM tab2 AS cor0
----
1593
663
868

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 53 * + col0 col0 FROM tab0 cor0
----
-1272
-1855
-4717

query I rowsort
SELECT + 21 * - cor0.col2 * 14 FROM tab0 AS cor0
----
-24108
-294
-9702

query I rowsort
SELECT - 7 + - col0 * col0 FROM tab0 AS cor0
----
-1232
-583
-7928

query I rowsort
SELECT DISTINCT + + col1 * 46 FROM tab0 AS cor0
----
3956
4186
4462

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8980
SELECT DISTINCT + col0 + + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8980
SELECT DISTINCT + col0 + + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8981
SELECT DISTINCT col1 * CAST( NULL AS SIGNED ) - col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8981
SELECT DISTINCT col1 * CAST ( NULL AS INTEGER ) - col1 FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8982
SELECT col2 DIV col1 - 86 DIV + cor0.col0 AS col0 FROM tab1 AS cor0
----
-26
4
6

skipif mysql # not compatible
query I rowsort label-8982
SELECT col2 / col1 - 86 / + cor0.col0 AS col0 FROM tab1 AS cor0
----
-26
4
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-8983
SELECT ALL col2 + + col0 DIV + 23 col2 FROM tab0
----
2
34
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8983
SELECT ALL col2 + + col0 / + 23 col2 FROM tab0
----
2
34
85

query I rowsort
SELECT + col0 + 2 FROM tab1 AS cor0
----
5
66
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-8985
SELECT - - col0 * ( 94 ) DIV - col1 - + col2 FROM tab0 cor0
----
-173
-34
-59

skipif mysql # not compatible
query I rowsort label-8985
SELECT - - col0 * ( 94 ) / - col1 - + col2 FROM tab0 cor0
----
-173
-34
-59

query I rowsort
SELECT ALL + - col2 * + 82 AS col1 FROM tab1 AS cor0
----
-4428
-4674
-7872

query I rowsort
SELECT DISTINCT cor0.col0 - col1 AS col2 FROM tab0 AS cor0
----
-2
-62

skipif mysql # not compatible
query I rowsort
SELECT - col1 * CAST ( - col0 AS REAL ) + col0 / col2 AS col2 FROM tab1 AS cor0
----
1040
641
78

query I rowsort
SELECT ALL + - col1 + cor0.col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + cor1.col1 AS col0 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT + cor0.col1 + + cor0.col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 1a063bfb694f348122cd0739295ca641

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8992
SELECT - CAST( NULL AS SIGNED ) FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-8992
SELECT - CAST ( NULL AS INTEGER ) FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT - col0 + + col2 * col1 AS col1 FROM tab2
----
1456
567
830

query I rowsort
SELECT ALL + 21 * 67 AS col1 FROM tab2
----
1407
1407
1407

onlyif mysql # use DIV operator for integer division
query I rowsort label-8995
SELECT + col1 DIV cor0.col0 AS col2 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-8995
SELECT + col1 / cor0.col0 AS col2 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT - col0 * - 77 AS col2 FROM tab0 AS cor0
----
1848
2695
6853

query I rowsort
SELECT + 60 FROM tab0, tab2 AS cor0
----
9 values hashing to a97561e17ecaa618227c75a57b268f33

query I rowsort
SELECT - cor0.col1 AS col0 FROM tab0, tab0 AS cor0, tab1 cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 * col0 col2 FROM tab2 AS cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 97 col0 FROM tab2 AS cor0
----
-97
-97
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-9001
SELECT DISTINCT - col2 DIV + col0 FROM tab1 cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-9001
SELECT DISTINCT - col2 / + col0 FROM tab1 cor0
----
-1
-18
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( col2 ) col1 FROM tab0 cor0
----
-1
-33
-82

query I rowsort
SELECT - - col2 * ( col1 ) FROM tab2 cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col2 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT DISTINCT + 98 AS col0 FROM tab1 cor0
----
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + col2 col1 FROM tab0 cor0
----
-53
-9
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - col0 * - col1 col1 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT DISTINCT 38 + + col0 FROM tab0 AS cor0
----
127
62
73

query I rowsort
SELECT DISTINCT col0 * col2 + + ( col2 + col2 ) * col0 FROM tab0 AS cor0
----
105
21894
2376

query I rowsort
SELECT DISTINCT - + col0 * + col2 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL + ( col2 ) - - 16 FROM tab0 AS cor0
----
17
49
98

query I rowsort
SELECT 94 * + col1 AS col0 FROM tab2 AS cor0
----
1598
2914
5546

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col2 ) * col1 col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT + col1 * + 73 FROM tab1
----
1898
730
949

query I rowsort
SELECT ALL + - 13 + - col0 * cor0.col1 FROM tab1 AS cor0
----
-1053
-653
-91

query I rowsort
SELECT ALL 83 AS col0 FROM tab2 AS cor0
----
83
83
83

query I rowsort
SELECT + + cor0.col1 + col2 * ( + col1 ) FROM tab2 cor0
----
1593
663
868

query I rowsort
SELECT DISTINCT 86 * col2 + cor0.col1 AS col0 FROM tab2 cor0
----
2295
2353
3285

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9019
SELECT DISTINCT - col0 + cor0.col1 * CAST( NULL AS DECIMAL ) * + col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9019
SELECT DISTINCT - col0 + cor0.col1 * CAST ( NULL AS REAL ) * + col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL + + 72 + - col0 * + col1 FROM tab1 AS cor0
----
-568
-6
-968

query I rowsort
SELECT - 71 AS col0 FROM tab1, tab0 AS cor0, tab1 cor1
----
27 values hashing to 3907e0aa4f29c002120742c4abb3e23a

query I rowsort
SELECT - 54 AS col1 FROM tab2
----
-54
-54
-54

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9023
SELECT - - CAST( NULL AS SIGNED ) * cor0.col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9023
SELECT - - CAST ( NULL AS INTEGER ) * cor0.col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9024
SELECT ALL + + col2 DIV - col2 + - col2 AS col0 FROM tab1 cor0
----
-55
-58
-97

skipif mysql # not compatible
query I rowsort label-9024
SELECT ALL + + col2 / - col2 + - col2 AS col0 FROM tab1 cor0
----
-55
-58
-97

query I rowsort
SELECT ALL col1 + - tab2.col0 FROM tab2
----
-19
-62
24

query I rowsort
SELECT DISTINCT - tab2.col2 + - tab2.col0 AS col2 FROM tab2
----
-104
-117
-34

query I rowsort
SELECT DISTINCT + col1 * col2 + - 92 FROM tab0
----
2746
5
7370

query I rowsort
SELECT ALL - 18 * 42 + - cor0.col0 AS col0 FROM tab1 cor0
----
-759
-820
-836

query I rowsort
SELECT ( col0 ) + col0 AS col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT ALL col0 + col1 * 86 AS col2 FROM tab0
----
7420
7915
8377

onlyif mysql # use DIV operator for integer division
query I rowsort label-9031
SELECT + col1 DIV CAST( col0 AS SIGNED ) + col2 AS col1 FROM tab2
----
26
31
38

skipif mysql # not compatible
query I rowsort label-9031
SELECT + col1 / CAST ( col0 AS INTEGER ) + col2 AS col1 FROM tab2
----
26
31
38

query I rowsort
SELECT col1 + ( - col0 ) * col1 + - col1 AS col1 FROM tab1
----
-1040
-640
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9033
SELECT ALL col1 * CAST( NULL AS SIGNED ) + + col0 + - tab0.col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9033
SELECT ALL col1 * CAST ( NULL AS INTEGER ) + + col0 + - tab0.col1 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9034
SELECT - col0 DIV 4 FROM tab1
----
-16
-20
0

skipif mysql # not compatible
query I rowsort label-9034
SELECT - col0 / 4 FROM tab1
----
-16
-20
0

query I rowsort
SELECT - col0 + 15 AS col1 FROM tab1
----
-49
-65
12

query I rowsort
SELECT DISTINCT col2 * + col1 + col0 * col2 AS col2 FROM tab2
----
1026
3562
3648

query I rowsort
SELECT - col1 + + col1 - col0 AS col2 FROM tab0
----
-24
-35
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9038
SELECT tab0.col2 + - CAST( NULL AS SIGNED ) * 5 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9038
SELECT tab0.col2 + - CAST ( NULL AS INTEGER ) * 5 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + tab0.col2 + - ( + ( col2 ) + col1 * 86 ) FROM tab0
----
-7396
-7826
-8342

query I rowsort
SELECT DISTINCT tab2.col0 + + col0 * - col1 * - col0 FROM tab2
----
106176
1526
359034

query I rowsort
SELECT DISTINCT - col2 * - tab2.col2 + col1 AS col0 FROM tab2
----
1461
735
760

query I rowsort
SELECT ( col0 ) - - tab2.col2 * + col0 FROM tab2
----
196
2106
3081

query I rowsort
SELECT ALL col2 * + col0 - + col0 FROM tab1 AS cor0
----
159
3584
7600

onlyif mysql # use DIV operator for integer division
query I rowsort label-9044
SELECT ALL + + 20 DIV cor0.col2 + - col0 * + ( + col1 ) AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-9044
SELECT ALL + + 20 / cor0.col2 + - col0 * + ( + col1 ) AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT - + col0 * + col1 + col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-9046
SELECT ALL - 42 DIV - ( + col0 ) AS col1 FROM tab1 AS cor0
----
0
0
14

skipif mysql # not compatible
query I rowsort label-9046
SELECT ALL - 42 / - ( + col0 ) AS col1 FROM tab1 AS cor0
----
0
0
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 12 * col1 + col1 col1 FROM tab1 AS cor0
----
130
169
338

query I rowsort
SELECT 95 * + col1 + col1 FROM tab0 AS cor0
----
8256
8736
9312

query I rowsort
SELECT + ( + col0 ) * + col0 FROM tab1 AS cor0
----
4096
6400
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - col1 ) col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL - + 86 AS col2 FROM tab1 AS cor0
----
-86
-86
-86

query I rowsort
SELECT - col2 * - col2 * col1 + ( - col0 ) AS col1 FROM tab2 AS cor0
----
22592
24469
39806

query I rowsort
SELECT DISTINCT col0 * - 69 AS col1 FROM tab1 cor0
----
-207
-4416
-5520

query I rowsort
SELECT ALL - + ( - 84 ) * + col1 FROM tab2 AS cor0
----
1428
2604
4956

query I rowsort
SELECT + ( 61 ) AS col0 FROM tab0, tab2 cor0
----
9 values hashing to 07149905a72bd87553381f34d19ed290

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 cor0, tab1 AS cor1, tab2 cor2
----
972 values hashing to bcf430f79386b43bc4077271fcd15cf0

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 ALL col0 * 98 FROM tab0 cor0
----
2352
3430
8722

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * - 37 col1 FROM tab0 AS cor0
----
-1295
-3293
-888

query I rowsort
SELECT DISTINCT - - col2 * 46 FROM tab0 cor0
----
1518
3772
46

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9061
SELECT + + CAST( 74 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
74
74
74

skipif mysql # not compatible
query I rowsort label-9061
SELECT + + CAST ( 74 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
74
74
74

query I rowsort
SELECT + ( + 73 ) FROM tab2 AS cor0
----
73
73
73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9063
SELECT CAST( - col2 AS SIGNED ) * col0 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif mysql # not compatible
query I rowsort label-9063
SELECT CAST ( - col2 AS INTEGER ) * col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL + col0 + ( + col1 ) * col2 * col2 AS col1 FROM tab1 AS cor0
----
119888
32554
75819

query I rowsort
SELECT - col2 * col1 * - col1 + + tab2.col2 * + 27 FROM tab2
----
12008
26676
91208

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col1 + - cor0.col1 + col0 * + col1 col0 FROM tab2 AS cor0
----
1023
1972
6077

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 73 * cor0.col0 col2 FROM tab0 AS cor0
----
1752
2555
6497

query I rowsort
SELECT DISTINCT - + 11 * - col1 FROM tab0 AS cor0
----
1001
1067
946

query I rowsort
SELECT - + col0 + col2 * - col2 AS col0 FROM tab1 AS cor0
----
-2919
-3313
-9296

onlyif mysql # use DIV operator for integer division
query I rowsort label-9070
SELECT DISTINCT cor0.col2 DIV - col1 FROM tab2 AS cor0
----
-2
0

skipif mysql # not compatible
query I rowsort label-9070
SELECT DISTINCT cor0.col2 / - col1 FROM tab2 AS cor0
----
-2
0

query I rowsort
SELECT ALL + cor0.col1 * - col1 FROM tab1 AS cor0
----
-100
-169
-676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 78 col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

query I rowsort
SELECT col2 * tab1.col0 * 3 FROM tab1
----
10944
23040
486

onlyif mysql # use DIV operator for integer division
query I rowsort label-9074
SELECT + cor0.col2 + cor0.col0 + cor0.col1 DIV col2 FROM tab1 AS cor0
----
121
176
57

skipif mysql # not compatible
query I rowsort label-9074
SELECT + cor0.col2 + cor0.col0 + cor0.col1 / col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT - col2 * + col2 * - col1 + cor0.col2 AS col0 FROM tab2 AS cor0
----
22626
24586
39910

query I rowsort
SELECT DISTINCT - + cor0.col0 * + 25 + + col2 FROM tab0 AS cor0
----
-2143
-567
-874

onlyif mysql # use DIV operator for integer division
query I rowsort label-9077
SELECT col1 * cor0.col1 DIV cor0.col0 + col2 FROM tab2 AS cor0
----
164
41
70

skipif mysql # not compatible
query I rowsort label-9077
SELECT col1 * cor0.col1 / cor0.col0 + col2 FROM tab2 AS cor0
----
164
41
70

query I rowsort
SELECT ALL - - cor0.col2 AS col2 FROM tab1 cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-9079
SELECT col2 DIV cor0.col2 + ( + col0 ) * 81 + - ( - col0 ) * 33 FROM tab1 AS cor0
----
343
7297
9121

skipif mysql # not compatible
query I rowsort label-9079
SELECT col2 / cor0.col2 + ( + col0 ) * 81 + - ( - col0 ) * 33 FROM tab1 AS cor0
----
343
7297
9121

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * + 16 * - 77 col1 FROM tab2 AS cor0
----
-32032
-33264
-46816

query I rowsort
SELECT - col1 + + col1 * - col1 FROM tab1 AS cor0
----
-110
-182
-702

query I rowsort
SELECT ALL 85 AS col1 FROM tab1
----
85
85
85

query I rowsort
SELECT + 67 FROM tab2, tab2 AS cor0
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

query I rowsort
SELECT + 59 * 87 FROM tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
27 values hashing to c3965e0891d7f15002f84c7813016736

query I rowsort
SELECT DISTINCT + 72 + col1 FROM tab0
----
158
163
169

query I rowsort
SELECT - ( + col0 ) * + ( + ( - cor0.col0 ) ) AS col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT 90 + + 41 AS col0 FROM tab1 AS cor0
----
131

query I rowsort
SELECT + - 33 AS col1 FROM tab0 cor0
----
-33
-33
-33

query I rowsort
SELECT DISTINCT - 99 FROM tab1, tab2 AS cor0
----
-99

query IIIIIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab0 AS cor2, tab0 AS cor3
----
13122 values hashing to 3d7c480354565913105d1a247d89c45c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9091
SELECT DISTINCT col2 * col2 - ( - 90 ) * col2 * + CAST( NULL AS SIGNED ) FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-9091
SELECT DISTINCT col2 * col2 - ( - 90 ) * col2 * + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL

query I rowsort
SELECT 98 + col0 AS col0 FROM tab2
----
105
176
177

query I rowsort
SELECT col2 * col0 * - ( col2 ) + col1 FROM tab2 AS cor0
----
-114059
-5072
-52669

query I rowsort
SELECT - 94 * col2 FROM tab2
----
-2444
-2538
-3572

query I rowsort
SELECT DISTINCT 35 * - col2 FROM tab0
----
-1155
-2870
-35

query I rowsort
SELECT - - col0 - col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + col0 * + col0 + ( - 15 + cor0.col0 * col1 ) FROM tab2 AS cor0
----
10671
251
7569

query III rowsort
SELECT * FROM tab0 WHERE NOT col2 IN ( - col0 * + col1 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * - col2 * + col0 + col1 * col1 col2 FROM tab2 WHERE NOT - col2 = ( NULL )
----

query I rowsort
SELECT + col0 + - col2 * + col2 AS col1 FROM tab1
----
-2913
-3185
-9136

query I rowsort
SELECT - col1 AS col1 FROM tab0 WHERE col1 <= ( NULL )
----

query I rowsort
SELECT DISTINCT - col1 * - col0 * - ( + col1 * col2 ) + - col0 FROM tab1 AS cor0
----
-109515
-1298000
-364864

query I rowsort
SELECT DISTINCT + tab0.col0 + col0 AS col1 FROM tab0
----
178
48
70

query I rowsort
SELECT ALL col0 + + col0 AS col1 FROM tab0
----
178
48
70

query I rowsort
SELECT + col2 FROM tab2 WHERE ( NULL ) NOT BETWEEN + col2 AND - col0 + col1
----

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL BETWEEN NULL AND col1
----

query I rowsort
SELECT col1 * col0 + col0 * - col0 + + col2 * - col0 FROM tab0
----
-7120
2135
696

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + + col2 + col0 col2 FROM tab1 WHERE NOT + col0 > col0 + col1
----
111
178
272

onlyif mysql # use DIV operator for integer division
query I rowsort label-9109
SELECT + col0 DIV + tab1.col2 + col0 + + col2 * - col1 AS col0 FROM tab1
----
-1168
-1401
-505

skipif mysql # not compatible
query I rowsort label-9109
SELECT + col0 / + tab1.col2 + col0 + + col2 * - col1 AS col0 FROM tab1
----
-1168
-1401
-505

query I rowsort
SELECT ALL - col2 * - col2 + - col0 * col1 AS col0 FROM tab2
----
-3926
101
512

query I rowsort
SELECT - col0 FROM tab1 WHERE NULL <= NULL
----

query I rowsort
SELECT + col2 * - tab0.col2 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT col1 - - col1 AS col0 FROM tab0
----
172
182
194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 * - col1 * 60 + - col0 col1 FROM tab1 cor0
----
38336
4677
62320

onlyif mysql # use DIV operator for integer division
query I rowsort label-9115
SELECT ALL 68 DIV + col1 + cor0.col2 AS col1 FROM tab2 AS cor0
----
27
29
42

skipif mysql # not compatible
query I rowsort label-9115
SELECT ALL 68 / + col1 + cor0.col2 AS col1 FROM tab2 AS cor0
----
27
29
42

onlyif mysql # use DIV operator for integer division
query I rowsort label-9116
SELECT col2 DIV tab2.col1 AS col0 FROM tab2
----
0
0
2

skipif mysql # not compatible
query I rowsort label-9116
SELECT col2 / tab2.col1 AS col0 FROM tab2
----
0
0
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + - col2 - + col1 * + col2 col2 FROM tab0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-9118
SELECT + col2 DIV + col1 AS col0 FROM tab2
----
0
0
2

skipif mysql # not compatible
query I rowsort label-9118
SELECT + col2 / + col1 AS col0 FROM tab2
----
0
0
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-9119
SELECT DISTINCT - col2 DIV + col2 + + col0 FROM tab1
----
2
63
79

skipif mysql # not compatible
query I rowsort label-9119
SELECT DISTINCT - col2 / + col2 + + col0 FROM tab1
----
2
63
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-9120
SELECT DISTINCT col0 DIV col0 + col2 AS col0 FROM tab0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-9120
SELECT DISTINCT col0 / col0 + col2 AS col0 FROM tab0
----
2
34
83

query I rowsort
SELECT col2 * - col2 AS col2 FROM tab1 AS cor0 WHERE NOT ( + col2 ) NOT IN ( col0 )
----

query I rowsort
SELECT DISTINCT col2 * - col1 + + col0 FROM tab2
----
-1456
-567
-830

query I rowsort
SELECT - col0 + + tab1.col2 * col0 AS col0 FROM tab1
----
159
3584
7600

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * tab2.col0 col1 FROM tab2
----
49
6084
6241

query I rowsort
SELECT DISTINCT tab2.col0 * col0 + - col1 AS col0 FROM tab2
----
18
6025
6224

query III rowsort
SELECT * FROM tab1 WHERE NULL <= col1 + + col1
----

query I rowsort
SELECT - col2 + - col2 * tab2.col0 FROM tab2
----
-2054
-216
-3040

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL NOT IN ( col2 + col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + - col1 * col2 col1 FROM tab0
----
-2752
-7371
0

query I rowsort
SELECT ALL tab2.col0 + col2 AS col0 FROM tab2
----
104
117
34

query I rowsort
SELECT DISTINCT - col0 FROM tab0 WHERE NOT ( col2 ) = - col0
----
-24
-35
-89

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE ( NULL ) NOT BETWEEN col2 * col0 AND col0 + col1
----

query I rowsort
SELECT + col2 FROM tab2 WHERE NOT ( NULL ) BETWEEN NULL AND ( col1 )
----

query I rowsort
SELECT col0 FROM tab0 WHERE NOT NULL <> - tab0.col0
----

query I rowsort
SELECT DISTINCT + col0 + col2 * cor0.col1 AS col1 FROM tab2 AS cor0
----
1612
725
844

onlyif mysql # use DIV operator for integer division
query I rowsort label-9136
SELECT ALL - - col2 + - 22 DIV - col1 col2 FROM tab1 AS cor0
----
54
59
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9136
SELECT ALL - - col2 + - 22 / - col1 col2 FROM tab1 AS cor0
----
54
59
97

query I rowsort
SELECT - col2 * col1 + + col2 * 72 AS col0 FROM tab0 AS cor0
----
-1558
-25
-462

query I rowsort
SELECT ALL 91 * + col0 AS col2 FROM tab2
----
637
7098
7189

query I rowsort
SELECT DISTINCT 37 FROM tab1
----
37

onlyif mysql # use DIV operator for integer division
query I rowsort label-9140
SELECT - + 79 DIV col1 AS col2 FROM tab2 AS cor0
----
-1
-2
-4

skipif mysql # not compatible
query I rowsort label-9140
SELECT - + 79 / col1 AS col2 FROM tab2 AS cor0
----
-1
-2
-4

query I rowsort
SELECT DISTINCT + - col0 + 94 FROM tab2 AS cor0
----
15
16
87

query I rowsort
SELECT + cor1.col2 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT ALL - 25 + + col2 AS col1 FROM tab0 AS cor0
----
-24
57
8

query I rowsort
SELECT - + 92 FROM tab2 AS cor0
----
-92
-92
-92

query I rowsort
SELECT DISTINCT - - cor0.col1 + - cor0.col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL - + col2 - + col1 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT col0 * + col2 * + 4 AS col2 FROM tab0 cor0
----
140
29192
3168

query I rowsort
SELECT ALL - col2 + col0 * ( 28 ) FROM tab0 AS cor0
----
2410
639
979

query I rowsort
SELECT ALL + col2 * + col0 - - 37 FROM tab0 AS cor0
----
72
7335
829

query I rowsort
SELECT DISTINCT + + col1 * col2 AS col2 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT + 23 * col1 AS col0 FROM tab2 AS cor0
----
1357
391
713

query I rowsort
SELECT DISTINCT + 1 FROM tab2, tab0 cor0
----
1

query I rowsort
SELECT cor1.col0 AS col2 FROM tab0, tab0 cor0, tab0 cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9154
SELECT DISTINCT CAST( NULL AS SIGNED ) * - 5 col0 FROM tab1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9154
SELECT DISTINCT CAST ( NULL AS INTEGER ) * - 5 col0 FROM tab1
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9155
SELECT col1 + - CAST( col1 AS SIGNED ) * - col2 - 28 FROM tab1 AS cor0
----
1233
1402
552

skipif mysql # not compatible
query I rowsort label-9155
SELECT col1 + - CAST ( col1 AS INTEGER ) * - col2 - 28 FROM tab1 AS cor0
----
1233
1402
552

query I rowsort
SELECT ALL - col0 + ( - col1 ) FROM tab1 cor0
----
-29
-74
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-9157
SELECT DISTINCT + col0 DIV - col2 + col0 col0 FROM tab1 AS cor0
----
3
63
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9157
SELECT DISTINCT + col0 / - col2 + col0 col0 FROM tab1 AS cor0
----
3
63
80

query I rowsort
SELECT DISTINCT + cor0.col1 + + col0 * col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT + + col2 * 50 + - col2 FROM tab1 AS cor0
----
2646
2793
4704

query I rowsort
SELECT ALL + cor0.col0 * col0 AS col1 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT + cor0.col2 * + 32 FROM tab2 AS cor0
----
1216
832
864

query I rowsort
SELECT DISTINCT col1 + col0 + - col2 FROM tab2 AS cor0
----
11
111
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 85 * - col0 col2 FROM tab2 AS cor0
----
-595
-6630
-6715

query I rowsort
SELECT ALL col0 + + 7 AS col0 FROM tab1
----
10
71
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * col0 col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL cor1.col2 + 68 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
27 values hashing to 221fdcd8a70276b0b775b7daa9c7d016

query I rowsort
SELECT col2 * 50 * col1 + - col1 AS col1 FROM tab1
----
28490
62387
70174

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9168
SELECT ALL - - CAST( - ( col2 ) AS SIGNED ) + col2 * col1 + col0 AS col2 FROM tab2 cor0
----
1586
687
817

skipif mysql # not compatible
query I rowsort label-9168
SELECT ALL - - CAST ( - ( col2 ) AS INTEGER ) + col2 * col1 + col0 AS col2 FROM tab2 cor0
----
1586
687
817

query I rowsort
SELECT + - col0 + + 68 AS col2 FROM tab0 AS cor0
----
-21
33
44

query I rowsort
SELECT DISTINCT 9 * col2 FROM tab0 AS cor0
----
297
738
9

query I rowsort
SELECT DISTINCT + - col1 + + col1 * col1 AS col2 FROM tab1 AS cor0
----
156
650
90

query I rowsort
SELECT DISTINCT + - cor0.col0 * - col1 + + col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT + 27 * + tab2.col0 FROM tab2
----
189
2106
2133

query I rowsort
SELECT DISTINCT - ( - col1 ) * - col1 AS col2 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT - col0 + + cor0.col1 AS col1 FROM tab0 cor0
----
2
62
62

query I rowsort
SELECT 34 + - cor0.col0 AS col0 FROM tab1 AS cor0
----
-30
-46
31

query I rowsort
SELECT + + col2 + + cor0.col0 AS col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ( + col2 ) * - cor0.col0 + - col0 AS col1 FROM tab1 AS cor0
----
-165
-3712
-7760

query I rowsort
SELECT + - col1 * cor0.col1 AS col0 FROM tab1 AS cor0
----
-100
-169
-676

onlyif mysql # use DIV operator for integer division
query I rowsort label-9180
SELECT DISTINCT + col1 DIV 96 FROM tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-9180
SELECT DISTINCT + col1 / 96 FROM tab0 AS cor0
----
0
1

query I rowsort
SELECT col0 * - col2 * col2 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT ALL - col0 + - 24 AS col2 FROM tab1
----
-104
-27
-88

query I rowsort
SELECT + ( + 5 ) AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 6035628694bdea36f584f3649088551d

query I rowsort
SELECT ALL col1 * 48 FROM tab0 cor0
----
4128
4368
4656

query I rowsort
SELECT DISTINCT - + col1 * 9 AS col0 FROM tab1 AS cor0
----
-117
-234
-90

query I rowsort
SELECT ALL + cor0.col0 + + 19 AS col1 FROM tab0 AS cor0
----
108
43
54

query I rowsort
SELECT - cor0.col1 - col2 FROM tab0 AS cor0
----
-119
-173
-98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9188
SELECT + + col1 + + CAST( NULL AS DECIMAL ) - col0 * - col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9188
SELECT + + col1 + + CAST ( NULL AS REAL ) - col0 * - col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9189
SELECT ALL - + cor0.col0 DIV 24 FROM tab2 AS cor0
----
-3
-3
0

skipif mysql # not compatible
query I rowsort label-9189
SELECT ALL - + cor0.col0 / 24 FROM tab2 AS cor0
----
-3
-3
0

query I rowsort
SELECT + col0 * + col0 - - col1 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT 82 + - col1 * - col1 AS col2 FROM tab1 AS cor0
----
182
251
758

query I rowsort
SELECT ( + cor0.col1 ) AS col2 FROM tab2 cor0
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-9193
SELECT + col0 * ( col1 ) * col0 + - col1 DIV - col0 FROM tab0 AS cor0
----
118827
49539
720812

skipif mysql # not compatible
query I rowsort label-9193
SELECT + col0 * ( col1 ) * col0 + - col1 / - col0 FROM tab0 AS cor0
----
118827
49539
720812

query I rowsort
SELECT DISTINCT col2 - col1 AS col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT - col0 + + col1 * 91 FROM tab0
----
7802
8192
8792

query I rowsort
SELECT - ( + 48 ) FROM tab0 AS cor0
----
-48
-48
-48

query I rowsort
SELECT col2 + + col1 + col1 AS col1 FROM tab1 AS cor0
----
106
122
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-9198
SELECT col1 + - col2 DIV + col0 FROM tab0 AS cor0
----
85
91
97

skipif mysql # not compatible
query I rowsort label-9198
SELECT col1 + - col2 / + col0 FROM tab0 AS cor0
----
85
91
97

query I rowsort
SELECT - col0 + col0 + cor0.col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT col2 * cor0.col1 - + cor0.col0 AS col2 FROM tab2 AS cor0
----
1456
567
830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * col0 * - cor0.col0 + + col0 col2 FROM tab0 AS cor0
----
13848
42910
705058

query I rowsort
SELECT DISTINCT tab1.col2 + - col0 FROM tab1
----
-7
16
51

query I rowsort
SELECT + cor0.col1 + + col1 + + col2 * col2 * - col0 FROM tab2 AS cor0
----
-114042
-5041
-52610

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab1 cor0 WHERE col1 * col1 * - col2 + col1 = NULL
----

query I rowsort
SELECT tab0.col2 AS col2 FROM tab0 WHERE NOT ( col1 ) NOT BETWEEN ( - col2 ) AND col2 + + col1
----
1
33
82

query I rowsort
SELECT + col1 * col2 * col1 AS col1 FROM tab0
----
244068
679042
9409

query I rowsort
SELECT + col0 * - tab2.col1 * col1 FROM tab2
----
-22831
-271518
-6727

query III rowsort
SELECT * FROM tab2 WHERE NOT col2 + + col0 * col0 NOT IN ( - tab2.col1 )
----

query I rowsort
SELECT + - col0 * col0 * - col1 AS col1 FROM tab1 AS cor0
----
234
40960
83200

onlyif mysql # use DIV operator for integer division
query I rowsort label-9210
SELECT ALL tab1.col0 * col0 DIV col1 FROM tab1
----
0
409
492

skipif mysql # not compatible
query I rowsort label-9210
SELECT ALL tab1.col0 * col0 / col1 FROM tab1
----
0
409
492

query I rowsort
SELECT DISTINCT col1 + col1 * + col0 + + col0 * - col1 AS col2 FROM tab0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col0 * - col1 col0 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - - col0 + + cor0.col2 * - col2 AS col2 FROM tab0 cor0
----
-1065
-6635
34

query I rowsort
SELECT DISTINCT + + col2 + - cor0.col2 FROM tab0 cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9215
SELECT + col1 + ( + 69 ) DIV + col2 FROM tab1 AS cor0
----
11
13
27

skipif mysql # not compatible
query I rowsort label-9215
SELECT + col1 + ( + 69 ) / + col2 FROM tab1 AS cor0
----
11
13
27

query I rowsort
SELECT - col2 * + col0 + + col2 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT ALL + - col2 * ( + 48 + cor0.col2 ) AS col1 FROM tab0 cor0
----
-10660
-2673
-49

onlyif mysql # use DIV operator for integer division
query I rowsort label-9218
SELECT ALL - + col0 DIV - cor0.col0 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9218
SELECT ALL - + col0 / - cor0.col0 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT - + cor0.col1 * col2 FROM tab1 cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-9220
SELECT DISTINCT + col0 DIV + CAST( 67 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-9220
SELECT DISTINCT + col0 / + CAST ( 67 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
0
1

query I rowsort
SELECT - + col1 * - col2 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL - col0 + - cor0.col0 * + col0 AS col1 FROM tab0 AS cor0
----
-1260
-600
-8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-9223
SELECT + col0 DIV ( + 36 + cor0.col1 ) AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9223
SELECT + col0 / ( + 36 + cor0.col1 ) AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - + col2 * 76 + cor0.col2 AS col2 FROM tab1 AS cor0
----
-4050
-4275
-7200

query I rowsort
SELECT - ( - col2 ) * cor0.col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL - ( 80 ) * col1 - - col2 * 87 * col2 FROM tab2 AS cor0
----
124268
54092
60943

query I rowsort
SELECT 38 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

query I rowsort
SELECT ALL - 83 + + col0 AS col1 FROM tab0 cor0
----
-48
-59
6

query I rowsort
SELECT ALL + 86 + + col0 AS col0 FROM tab2 AS cor0
----
164
165
93

query I rowsort
SELECT ALL 28 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

query I rowsort
SELECT 47 FROM tab0 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to 5c7a6f591fb2a38893dafe56c4b9b97f

onlyif mysql # use DIV operator for integer division
query I rowsort label-9232
SELECT + col0 * + 12 + tab0.col0 DIV col2 AS col2 FROM tab0
----
1069
288
455

skipif mysql # not compatible
query I rowsort label-9232
SELECT + col0 * + 12 + tab0.col0 / col2 AS col2 FROM tab0
----
1069
288
455

query I rowsort
SELECT + 38 + + col2 - col1 AS col1 FROM tab2 AS cor0
----
34
5
59

query I rowsort
SELECT DISTINCT 57 AS col2 FROM tab1 AS cor0
----
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-9235
SELECT DISTINCT + col0 DIV + col0 FROM tab2 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-9235
SELECT DISTINCT + col0 / + col0 FROM tab2 AS cor0
----
1

query I rowsort
SELECT DISTINCT - 38 * + col2 FROM tab1 AS cor0
----
-2052
-2166
-3648

query I rowsort
SELECT DISTINCT 86 + col1 + - col0 FROM tab1
----
109
19
32

query I rowsort
SELECT ALL 95 AS col2 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 14faa6dda52e3dfe1f5db2579c274a7e

query I rowsort
SELECT DISTINCT tab2.col0 + col0 + + 92 * + 3 AS col1 FROM tab2
----
290
432
434

query I rowsort
SELECT + 51 * col1 FROM tab2
----
1581
3009
867

query I rowsort
SELECT - 8 + + col2 AS col0 FROM tab2
----
18
19
30

query I rowsort
SELECT tab2.col2 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT ALL - ( col0 ) + - 87 AS col2 FROM tab2 AS cor0
----
-165
-166
-94

onlyif mysql # use DIV operator for integer division
query I rowsort label-9244
SELECT DISTINCT - col1 * + col1 DIV col1 AS col2 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-9244
SELECT DISTINCT - col1 * + col1 / col1 AS col2 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ( col0 ) * + ( + col1 ) + col2 * - col0 FROM tab2 AS cor0
----
-1659
2574
28

query I rowsort
SELECT - + col0 + - 56 FROM tab0 AS cor0
----
-145
-80
-91

query I rowsort
SELECT ALL + - cor0.col0 + col2 AS col0 FROM tab1 cor0
----
-7
16
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-9248
SELECT - + col1 * + col1 + col0 DIV 55 AS col2 FROM tab2 AS cor0
----
-288
-3480
-961

skipif mysql # not compatible
query I rowsort label-9248
SELECT - + col1 * + col1 + col0 / 55 AS col2 FROM tab2 AS cor0
----
-288
-3480
-961

query I rowsort
SELECT DISTINCT - tab0.col0 + + col0 * + 53 FROM tab0
----
1248
1820
4628

query I rowsort
SELECT col2 + col0 + ( - col2 ) * - col0 AS col0 FROM tab0
----
71
7469
849

query I rowsort
SELECT cor0.col0 * col2 + + col1 * col2 * cor0.col0 AS col1 FROM tab2 AS cor0
----
121680
54036
6048

query I rowsort
SELECT DISTINCT - col0 * col2 + - col2 AS col2 FROM tab1 cor0
----
-216
-3705
-7776

query I rowsort
SELECT DISTINCT col1 * + ( col2 * - col2 ) FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT DISTINCT - 84 FROM tab1, tab0 AS cor0
----
-84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 72 col2 FROM tab0, tab1 AS cor0, tab2 cor1
----
27 values hashing to 92cc3d5daa550304e96c1542787691c7

onlyif mysql # use DIV operator for integer division
query I rowsort label-9256
SELECT - col1 * + 76 + col2 DIV cor0.col2 AS col1 FROM tab0 AS cor0
----
-6535
-6915
-7371

skipif mysql # not compatible
query I rowsort label-9256
SELECT - col1 * + 76 + col2 / cor0.col2 AS col1 FROM tab0 AS cor0
----
-6535
-6915
-7371

query I rowsort
SELECT ALL + col1 * - ( col1 ) FROM tab1 AS cor0
----
-100
-169
-676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + 64 + ( - col0 + col2 ) col0 FROM tab2 AS cor0
----
1612
1748
2391

onlyif mysql # use DIV operator for integer division
query I rowsort label-9259
SELECT ALL - tab1.col0 DIV tab1.col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 0cf123df00ec8476d9e0a7b2d2f6001e

skipif mysql # not compatible
query I rowsort label-9259
SELECT ALL - tab1.col0 / tab1.col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 0cf123df00ec8476d9e0a7b2d2f6001e

onlyif mysql # use DIV operator for integer division
query I rowsort label-9260
SELECT 88 DIV col0 + col1 FROM tab1
----
11
14
55

skipif mysql # not compatible
query I rowsort label-9260
SELECT 88 / col0 + col1 FROM tab1
----
11
14
55

query I rowsort
SELECT ( + col1 ) * col1 * col0 + + col0 FROM tab0
----
177528
329350
737098

query I rowsort
SELECT - col0 * ( - tab1.col0 ) + col0 FROM tab1
----
12
4160
6480

query I rowsort
SELECT ALL + 53 AS col2 FROM tab1
----
53
53
53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9264
SELECT - CAST( - 39 AS SIGNED ) * + col0 AS col2 FROM tab0 AS cor0
----
1365
3471
936

skipif mysql # not compatible
query I rowsort label-9264
SELECT - CAST ( - 39 AS INTEGER ) * + col0 AS col2 FROM tab0 AS cor0
----
1365
3471
936

query I rowsort
SELECT ALL - cor0.col0 FROM tab0, tab0 cor0, tab1 AS cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

query I rowsort
SELECT DISTINCT + 76 * col1 AS col2 FROM tab0 AS cor0
----
6536
6916
7372

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 41 col0 FROM tab2, tab0 AS cor0, tab2 AS cor1, tab2 AS cor2
----
81 values hashing to 0733f496a5445ffeac9d19797afe4831

query I rowsort
SELECT DISTINCT + 11 * col2 FROM tab0 AS cor0
----
11
363
902

query I rowsort
SELECT - 84 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 975e2ef2a3bf1ee2622362f4e435752f

query I rowsort
SELECT - + 60 * col1 AS col1 FROM tab1 cor0
----
-1560
-600
-780

query I rowsort
SELECT ALL - col0 * ( + col0 ) FROM tab0 cor0
----
-1225
-576
-7921

query I rowsort
SELECT + ( 2 ) * col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT ALL + 69 + - col0 * + col1 * 7 AS col0 FROM tab1 AS cor0
----
-4411
-477
-7211

query I rowsort
SELECT ALL col2 * col1 + + cor0.col1 AS col0 FROM tab1 cor0
----
1261
1430
580

onlyif mysql # use DIV operator for integer division
query I rowsort label-9275
SELECT ALL - + col0 + + col1 DIV - cor0.col1 FROM tab1 AS cor0
----
-4
-65
-81

skipif mysql # not compatible
query I rowsort label-9275
SELECT ALL - + col0 + + col1 / - cor0.col1 FROM tab1 AS cor0
----
-4
-65
-81

query I rowsort
SELECT DISTINCT - - 1 + + col0 - - 57 FROM tab2 AS cor0
----
136
137
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 - col0 col0 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT DISTINCT + - col0 - col0 * + ( col2 ) FROM tab1 AS cor0
----
-165
-3712
-7760

query I rowsort
SELECT col2 * + col0 * 7 - col2 AS col2 FROM tab0 AS cor0
----
244
51004
5511

query I rowsort
SELECT DISTINCT - cor0.col1 * + col2 + - 46 AS col0 FROM tab1 AS cor0
----
-1294
-1450
-616

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 * + col1 + 88 * - col2 col1 FROM tab2 AS cor0
----
-3213
-3822
-3990

onlyif mysql # use DIV operator for integer division
query I rowsort label-9282
SELECT + col2 DIV col0 + col1 DIV 12 FROM tab1 AS cor0
----
0
2
20

skipif mysql # not compatible
query I rowsort label-9282
SELECT + col2 / col0 + col1 / 12 FROM tab1 AS cor0
----
0
2
20

query I rowsort
SELECT ALL - - col2 + col0 + + col1 * + col1 AS col1 FROM tab1 cor0
----
221
345
733

query I rowsort
SELECT ALL col2 + + col0 AS col2 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-9285
SELECT ALL col2 DIV - col1 + col0 * - 83 AS col1 FROM tab2 AS cor0
----
-581
-6474
-6559

skipif mysql # not compatible
query I rowsort label-9285
SELECT ALL col2 / - col1 + col0 * - 83 AS col1 FROM tab2 AS cor0
----
-581
-6474
-6559

query I rowsort
SELECT - col0 * - ( col1 ) + - ( col0 + - col0 ) AS col2 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT - 88 - col2 * col0 AS col2 FROM tab1 AS cor0
----
-250
-3736
-7768

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col0 + 55 col1 FROM tab0 AS cor0
----
2119
3450
8154

query I rowsort
SELECT col1 + col0 + - col0 * 94 * col2 AS col0 FROM tab0 AS cor0
----
-3158
-685832
-74338

query I rowsort
SELECT - col0 * - cor0.col2 - - cor0.col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT col1 * col0 + cor0.col1 + 4 * col0 * + col0 FROM tab1 AS cor0
----
140
17034
26653

query I rowsort
SELECT 34 - - col1 FROM tab2 AS cor0
----
51
65
93

query I rowsort
SELECT ALL - col0 * 54 + + tab2.col2 FROM tab2
----
-351
-4186
-4228

query I rowsort
SELECT + ( ( + col2 ) ) * + col0 AS col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT + 26 FROM tab0, tab2 AS cor0
----
26

query I rowsort
SELECT ALL - 42 * - col0 FROM tab0
----
1008
1470
3738

query I rowsort
SELECT DISTINCT col2 + + col0 - col0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT 39 * 68 AS col2 FROM tab1
----
2652
2652
2652

query I rowsort
SELECT + 41 FROM tab2, tab1 cor0
----
9 values hashing to 5b18986bb294412b3d9f07b7e6fc821e

query I rowsort
SELECT - 18 * + col1 AS col1 FROM tab0
----
-1548
-1638
-1746

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 60 + 74 * col0 col2 FROM tab1 AS cor0
----
282
4796
5980

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9302
SELECT - CAST( - col1 AS SIGNED ) - - col2 FROM tab0 cor0
----
119
173
98

skipif mysql # not compatible
query I rowsort label-9302
SELECT - CAST ( - col1 AS INTEGER ) - - col2 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT + ( cor0.col2 ) + ( + 56 ) FROM tab1, tab0 AS cor0
----
9 values hashing to aef8106c23171412637331f728066517

query I rowsort
SELECT 48 * 87 - col0 * - ( 22 + - col2 ) * - col2 FROM tab1 AS cor0
----
131856
572496
9360

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9305
SELECT ALL CAST( NULL AS SIGNED ) * col1 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9305
SELECT ALL CAST ( NULL AS INTEGER ) * col1 AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - 77 * 41 AS col2 FROM tab2
----
-3157
-3157
-3157

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col1 col1 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL ( col1 ) * + col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT 46 AS col0 FROM tab1
----
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 2 col0 FROM tab2
----
2
2
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 42 col1 FROM tab1 cor0 CROSS JOIN tab2, tab0 cor1, tab1 AS cor2
----
81 values hashing to 4d49d5ffe533e92cf06d98cb59a19b10

query I rowsort
SELECT ALL + cor0.col1 * - col1 + col1 FROM tab2 AS cor0
----
-272
-3422
-930

query I rowsort
SELECT ALL col2 * cor0.col0 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT - 85 FROM tab1 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 8ebc8ffafb1517ea04e3a6fc4059d88a

query I rowsort
SELECT + + col2 * - cor0.col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT + - cor0.col0 + + col2 AS col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT - + col0 + 82 AS col1 FROM tab1 AS cor0
----
18
2
79

query I rowsort
SELECT - col2 * ( + 27 ) FROM tab1 AS cor0
----
-1458
-1539
-2592

query I rowsort
SELECT ALL 53 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 866ae1b4ab9e5b4043ac1bcfd413aaa6

query I rowsort
SELECT - col0 * - ( + col1 ) AS col0 FROM tab1 AS cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col2 - col2 col2 FROM tab2 AS cor0
----
1508
608
810

onlyif mysql # use DIV operator for integer division
query I rowsort label-9322
SELECT + ( col1 ) DIV + col2 + - col2 * 63 * col2 AS col1 FROM tab1 AS cor0
----
-183708
-204687
-580608

skipif mysql # not compatible
query I rowsort label-9322
SELECT + ( col1 ) / + col2 + - col2 * 63 * col2 AS col1 FROM tab1 AS cor0
----
-183708
-204687
-580608

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 33 col0 FROM tab0, tab2 AS cor0 CROSS JOIN tab2
----
33

query I rowsort
SELECT + cor0.col1 - + col2 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT ALL - + col0 * + ( col2 ) * ( col0 ) - - cor0.col1 AS col2 FROM tab2 cor0
----
-1292
-158125
-237141

query I rowsort
SELECT DISTINCT col1 * 20 FROM tab2 AS cor0
----
1180
340
620

query I rowsort
SELECT ALL - - cor0.col2 * col1 + col2 AS col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT ALL + ( - col0 ) + - col1 + 7 FROM tab1 AS cor0
----
-22
-67
-86

query I rowsort
SELECT DISTINCT col1 + + 80 AS col2 FROM tab2 AS cor0
----
111
139
97

query I rowsort
SELECT DISTINCT - col0 - 4 FROM tab1 AS cor0
----
-68
-7
-84

query I rowsort
SELECT ALL - + ( col1 ) + - col0 AS col1 FROM tab2 cor0
----
-137
-38
-96

query I rowsort
SELECT + - 6 AS col2 FROM tab1 AS cor0
----
-6
-6
-6

query I rowsort
SELECT - 39 + + col0 * col0 FROM tab2 AS cor0
----
10
6045
6202

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9334
SELECT DISTINCT - 89 + col1 * col2 + CAST( NULL AS SIGNED ) * ( - col2 ) col2 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9334
SELECT DISTINCT - 89 + col1 * col2 + CAST ( NULL AS INTEGER ) * ( - col2 ) col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT 21 + col1 * col0 FROM tab1 AS cor0
----
1061
661
99

query I rowsort
SELECT ALL - 43 + 22 FROM tab2 cor0
----
-21
-21
-21

onlyif mysql # use DIV operator for integer division
query I rowsort label-9337
SELECT ALL - col0 DIV - cor0.col2 + col1 DIV - 54 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-9337
SELECT ALL - col0 / - cor0.col2 + col1 / - 54 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT + - col1 + + col0 FROM tab1 cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT - cor1.col1 - 26 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
-112
-117
-123

query I rowsort
SELECT DISTINCT - col0 * col2 * tab2.col2 + 42 FROM tab2
----
-114034
-5061
-52686

query I rowsort
SELECT - - cor0.col0 * - col2 + + ( + col2 ) + cor0.col0 AS col0 FROM tab2 AS cor0
----
-155
-1924
-2885

onlyif mysql # use DIV operator for integer division
query I rowsort label-9342
SELECT - ( col2 ) DIV + CAST( ( col0 ) AS SIGNED ) AS col2 FROM tab1 cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-9342
SELECT - ( col2 ) / + CAST ( ( col0 ) AS INTEGER ) AS col2 FROM tab1 cor0
----
-1
-18
0

query I rowsort
SELECT DISTINCT + col2 * ( + col0 ) * col1 + col1 AS col1 FROM tab2 AS cor0
----
119711
51051
5890

query I rowsort
SELECT DISTINCT - col1 * 4 - col0 * + col1 AS col1 FROM tab1 AS cor0
----
-1092
-182
-680

query I rowsort
SELECT + tab1.col0 * - tab1.col1 FROM tab1
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 18 * cor0.col1 col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to f93d9d5d129a461f5b376b91d272c522

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor1.col0 + - 80 col0 FROM tab2 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 6939eb2768dcfc3158238a6225e83e05

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col2 + cor0.col1 * ( col2 * col1 ) col0 FROM tab0 AS cor0
----
245157
685766
9410

query I rowsort
SELECT ALL + col1 + 78 FROM tab1 AS cor0
----
104
88
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-9350
SELECT - + col2 + - 30 + - col1 DIV + col0 FROM tab1 AS cor0
----
-126
-87
-92

skipif mysql # not compatible
query I rowsort label-9350
SELECT - + col2 + - 30 + - col1 / + col0 FROM tab1 AS cor0
----
-126
-87
-92

query I rowsort
SELECT ALL + ( - col1 ) * col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + col2 - col2 AS col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + col1 * - col0 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9354
SELECT ALL CAST( NULL AS SIGNED ) * col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9354
SELECT ALL CAST ( NULL AS INTEGER ) * col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * - ( col0 ) - col0 col1 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT ALL ( - col2 ) + + col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT - + 60 * 68 FROM tab1 AS cor0
----
-4080
-4080
-4080

query I rowsort
SELECT DISTINCT - col1 + + 69 * + col2 FROM tab1 AS cor0
----
3700
3923
6611

query I rowsort
SELECT + - col0 + - col2 AS col0 FROM tab0 AS cor0
----
-171
-36
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9360
SELECT ALL + - CAST( NULL AS SIGNED ) + + ( + col2 ) * ( + 71 ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9360
SELECT ALL + - CAST ( NULL AS INTEGER ) + + ( + col2 ) * ( + 71 ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + ( 3 ) col0 FROM tab2 AS cor0
----
-3

query I rowsort
SELECT - ( + ( col1 ) ) - ( + 23 + + col1 ) AS col2 FROM tab1 AS cor0
----
-43
-49
-75

onlyif mysql # use DIV operator for integer division
query I rowsort label-9363
SELECT DISTINCT - col2 + + col2 DIV col1 col1 FROM tab1 AS cor0
----
-52
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9363
SELECT DISTINCT - col2 + + col2 / col1 col1 FROM tab1 AS cor0
----
-52
-89

query I rowsort
SELECT ALL 31 + + col0 AS col1 FROM tab2 AS cor0
----
109
110
38

query I rowsort
SELECT DISTINCT + - col0 * col1 * col1 + ( cor0.col0 ) AS col2 FROM tab0 AS cor0
----
-177480
-329280
-736920

query I rowsort
SELECT 20 AS col2 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 0a35fe98f3e7d5fc8ff2ae815bd20ef4

query I rowsort
SELECT + ( 58 ) FROM tab2, tab2 AS cor0
----
9 values hashing to ef6e63aeed2581a168f07646d258f666

query I rowsort
SELECT + 23 + + col0 AS col0 FROM tab0
----
112
47
58

query I rowsort
SELECT ALL + col1 + - col2 * - col0 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT DISTINCT 57 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
57

query I rowsort
SELECT - col2 * col1 * col0 AS col1 FROM tab2 cor0
----
-119652
-51034
-5859

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0, tab2 AS cor1, tab2, tab0 cor2
----
3645 values hashing to 35998cdc87c8b13ea047f14c9f5dc8d6

query I rowsort
SELECT DISTINCT col1 + ( col0 ) FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT ALL - tab2.col0 - - col1 * 62 FROM tab2
----
1915
3580
975

query I rowsort
SELECT DISTINCT - 78 - col1 FROM tab1 cor0
----
-104
-88
-91

query I rowsort
SELECT DISTINCT + 79 * col2 AS col1 FROM tab2 AS cor0
----
2054
2133
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 29 + + col0 * col0 col0 FROM tab0 AS cor0
----
1254
605
7950

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9378
SELECT DISTINCT col2 * - CAST( NULL AS SIGNED ) FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-9378
SELECT DISTINCT col2 * - CAST ( NULL AS INTEGER ) FROM tab2
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col1 + 19 col1 FROM tab2
----
137
53
81

query I rowsort
SELECT ALL col0 + + ( col2 ) - - col0 AS col2 FROM tab1
----
185
256
60

query I rowsort
SELECT DISTINCT - col2 * 82 - + col1 * col0 FROM tab0
----
-14823
-3477
-4770

query I rowsort
SELECT DISTINCT - col2 * - 68 - col0 FROM tab1
----
3669
3812
6448

query I rowsort
SELECT - col0 * col1 - - col1 * - col2 FROM tab2 AS cor0
----
-1054
-1989
-6136

query I rowsort
SELECT - col2 + - 1 * - ( col2 ) FROM tab0
----
0
0
0

query I rowsort
SELECT ALL - 37 AS col2 FROM tab1 cor0
----
-37
-37
-37

query I rowsort
SELECT + col0 * col2 - - col0 AS col2 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9388
SELECT + tab2.col0 * CAST( NULL AS SIGNED ) + col1 * tab2.col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9388
SELECT + tab2.col0 * CAST ( NULL AS INTEGER ) + col1 * tab2.col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( + tab1.col1 ) AS col2 FROM tab1, tab2 AS cor0
----
10
13
26

query I rowsort
SELECT col2 * col2 * + col2 FROM tab0
----
1
35937
551368

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col1 AS REAL ) * col1 FROM tab2
----
289
3481
961

query I rowsort
SELECT 70 * 15 + + col0 * col2 FROM tab2
----
1239
3078
4052

query I rowsort
SELECT + col0 * - col2 + - col1 FROM tab0
----
-132
-7389
-878

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9394
SELECT DISTINCT CAST( col1 AS SIGNED ) + + col2 + col0 AS col2 FROM tab1
----
131
189
83

skipif mysql # not compatible
query I rowsort label-9394
SELECT DISTINCT CAST ( col1 AS INTEGER ) + + col2 + col0 AS col2 FROM tab1
----
131
189
83

query I rowsort
SELECT tab2.col1 + 68 AS col1 FROM tab2
----
127
85
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9396
SELECT ALL CAST( NULL AS DECIMAL ) + + col2 * + col0 / col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9396
SELECT ALL CAST ( NULL AS REAL ) + + col2 * + col0 / col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - 83 * ( col2 ) - + col0 AS col2 FROM tab2 AS cor0
----
-2236
-2248
-3233

query I rowsort
SELECT ALL + - 27 * - col1 AS col0 FROM tab2 AS cor0
----
1593
459
837

query I rowsort
SELECT ALL ( col1 ) AS col2 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT DISTINCT ( - ( - col2 ) * tab1.col2 + col1 ) FROM tab1
----
2942
3259
9229

query I rowsort
SELECT - cor1.col0 AS col2 FROM tab0, tab0 cor0, tab0 AS cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

query I rowsort
SELECT ALL - ( - 34 ) FROM tab2
----
34
34
34

query I rowsort
SELECT ALL + 38 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

query I rowsort
SELECT ALL + + ( col1 ) + cor0.col0 * + col1 + + 33 * cor0.col1 FROM tab2 AS cor0
----
1271
1921
6608

query I rowsort
SELECT 50 AS col0 FROM tab1, tab0 AS cor0, tab1 cor1, tab0 AS cor2
----
81 values hashing to 6932c991110d256d3f92f3e9538f8040

onlyif mysql # use DIV operator for integer division
query I rowsort label-9406
SELECT ( col2 ) * 18 + - col2 DIV col1 FROM tab1 cor0
----
1021
1721
970

skipif mysql # not compatible
query I rowsort label-9406
SELECT ( col2 ) * 18 + - col2 / col1 FROM tab1 cor0
----
1021
1721
970

query I rowsort
SELECT + + col2 + cor0.col0 + col2 AS col0 FROM tab0 AS cor0
----
253
37
90

query I rowsort
SELECT DISTINCT + 4 + col0 FROM tab1 AS cor0
----
68
7
84

query I rowsort
SELECT ALL - ( col2 + 78 ) AS col1 FROM tab0
----
-111
-160
-79

query I rowsort
SELECT ALL col0 * + 52 + cor0.col0 * - col1 FROM tab0 AS cor0
----
-1575
-3471
-816

query I rowsort
SELECT DISTINCT cor0.col2 * col0 + col0 * + cor0.col1 AS col1 FROM tab0 AS cor0
----
15397
2856
3430

query I rowsort
SELECT DISTINCT - + cor0.col1 + 38 FROM tab1 AS cor0
----
12
25
28

query I rowsort
SELECT ALL + col1 * - col1 - 37 * col0 FROM tab2 AS cor0
----
-1220
-3212
-6367

query I rowsort
SELECT DISTINCT + - col1 + ( col1 ) * - col0 * 78 FROM tab2 AS cor0
----
-104771
-16957
-359015

onlyif mysql # use DIV operator for integer division
query I rowsort label-9415
SELECT ALL + col0 DIV col1 + + col2 FROM tab1 AS cor0
----
102
54
63

skipif mysql # not compatible
query I rowsort label-9415
SELECT ALL + col0 / col1 + + col2 FROM tab1 AS cor0
----
102
54
63

query I rowsort
SELECT ALL + cor0.col0 * + col2 + col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT col0 * + 52 AS col2 FROM tab2 AS cor0
----
364
4056
4108

query I rowsort
SELECT - col2 * col0 + + col0 AS col1 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT DISTINCT - col1 * 67 - col0 * cor0.col0 FROM tab1 AS cor0
----
-1751
-4766
-7271

query I rowsort
SELECT ALL col0 * ( - 94 ) FROM tab1 AS cor0
----
-282
-6016
-7520

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 * - ( ( - col1 ) ) * ( col0 ) col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9422
SELECT - ( col1 ) * + 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-9422
SELECT - ( col1 ) * + CAST ( NULL AS INTEGER ) col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 35 * + cor0.col0 col0 FROM tab0 AS cor0
----
1225
3115
840

query I rowsort
SELECT + + col2 + ( - col1 ) FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT + col1 + 38 AS col0 FROM tab1 AS cor0
----
48
51
64

query I rowsort
SELECT col1 + ( col2 * col2 ) FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT + col1 + - 22 * 84 * + col0 FROM tab2 cor0
----
-12905
-144085
-145975

onlyif mysql # use DIV operator for integer division
query I rowsort label-9428
SELECT + 58 DIV tab1.col2 FROM tab1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-9428
SELECT + 58 / tab1.col2 FROM tab1
----
0
1
1

query I rowsort
SELECT ALL - col0 * col0 AS col0 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT - 40 * col2 + - col1 * col1 + col2 AS col2 FROM tab2
----
-1771
-2014
-4495

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * + tab0.col1 + + col2 * col0 col0 FROM tab0
----
132
14760
3630

query I rowsort
SELECT - 1 + - 48 FROM tab0 AS cor0
----
-49
-49
-49

query I rowsort
SELECT DISTINCT col1 * 74 AS col0 FROM tab0 AS cor0
----
6364
6734
7178

onlyif mysql # use DIV operator for integer division
query I rowsort label-9434
SELECT DISTINCT - 51 DIV cor0.col1 AS col2 FROM tab0 cor0
----
0

skipif mysql # not compatible
query I rowsort label-9434
SELECT DISTINCT - 51 / cor0.col1 AS col2 FROM tab0 cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * - col2 col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - 46 AS col0 FROM tab2 cor0
----
-46
-46
-46

query I rowsort
SELECT ALL col1 * - 38 AS col1 FROM tab1
----
-380
-494
-988

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab0 cor2
----
3645 values hashing to 52c9380a39df7a744b9f2f2c5bf55dd5

query I rowsort
SELECT DISTINCT + 66 AS col2 FROM tab0 AS cor0
----
66

query I rowsort
SELECT 70 * - 89 AS col1 FROM tab0 AS cor0
----
-6230
-6230
-6230

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9441
SELECT ALL + CAST( NULL AS SIGNED ) + col2 * - cor0.col2 + 58 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9441
SELECT ALL + CAST ( NULL AS INTEGER ) + col2 * - cor0.col2 + 58 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 29 col1 FROM tab2 AS cor0
----
29
29
29

query I rowsort
SELECT ALL + 95 + 40 FROM tab2 cor0
----
135
135
135

query I rowsort
SELECT DISTINCT ( 21 ) * - col0 FROM tab2 AS cor0
----
-147
-1638
-1659

query I rowsort
SELECT ALL - 33 + col2 * + cor0.col2 AS col2 FROM tab2 AS cor0
----
1411
643
696

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 14 col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 83e5779d2487d12495e7d816c797264f

query I rowsort
SELECT ALL ( + col1 * tab1.col2 ) AS col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL + + ( cor0.col2 ) FROM tab1 AS cor0
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * col0 + col1 + col1 * - col2 col2 FROM tab2 AS cor0
----
-589
3127
714

query I rowsort
SELECT + + 88 * col0 AS col1 FROM tab1 AS cor0
----
264
5632
7040

onlyif mysql # use DIV operator for integer division
query I rowsort label-9451
SELECT + 68 DIV + col1 AS col0 FROM tab1 AS cor0
----
2
5
6

skipif mysql # not compatible
query I rowsort label-9451
SELECT + 68 / + col1 AS col0 FROM tab1 AS cor0
----
2
5
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-9452
SELECT ALL + col0 DIV + col2 + ( - 51 ) AS col1 FROM tab1 cor0
----
-50
-51
-51

skipif mysql # not compatible
query I rowsort label-9452
SELECT ALL + col0 / + col2 + ( - 51 ) AS col1 FROM tab1 cor0
----
-50
-51
-51

query I rowsort
SELECT ( col2 ) - col1 FROM tab0
----
-53
-9
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9454
SELECT DISTINCT CAST( - ( col0 ) AS SIGNED ) FROM tab1
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-9454
SELECT DISTINCT CAST ( - ( col0 ) AS INTEGER ) FROM tab1
----
-3
-64
-80

query I rowsort
SELECT + - 66 AS col0 FROM tab1 AS cor0
----
-66
-66
-66

query I rowsort
SELECT - 89 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 924a74d31360fa4301c953b423a4710e

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 cor0 CROSS JOIN tab1, tab1 AS cor1, tab1 AS cor2, tab2 AS cor3
----
3645 values hashing to f1682f477bbed24d681925c633bed9db

query I rowsort
SELECT col0 * col2 * col2 + col1 * + ( + col2 ) FROM tab1 cor0
----
10152
208506
738528

query I rowsort
SELECT + - col0 * + 85 - col2 FROM tab1 AS cor0
----
-309
-5497
-6896

query I rowsort
SELECT col1 * + col2 * col0 + col2 AS col1 FROM tab0 AS cor0
----
3396
664200
68145

query I rowsort
SELECT - cor0.col2 * + cor0.col2 + 42 AS col1 FROM tab1 AS cor0
----
-2874
-3207
-9174

query I rowsort
SELECT + col1 + 68 FROM tab2 AS cor0
----
127
85
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9463
SELECT + + CAST( col2 AS SIGNED ) FROM tab2 cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-9463
SELECT + + CAST ( col2 AS INTEGER ) FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
7
78
79

query I rowsort
SELECT 4 AS col1 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 730dff78e83112374961ea711f98ebaa

query I rowsort
SELECT ALL - col0 + 95 FROM tab0 cor0
----
6
60
71

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9467
SELECT DISTINCT + CAST( NULL AS SIGNED ) * 55 AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9467
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * 55 AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT 85 * + col1 FROM tab1 AS cor0
----
1105
2210
850

query I rowsort
SELECT + cor2.col1 FROM tab1, tab0 AS cor0, tab1 AS cor1, tab2, tab2 AS cor2
----
243 values hashing to 42b04a30acb32fcd35bf97afdee87fe6

query I rowsort
SELECT cor1.col0 AS col2 FROM tab0, tab1 AS cor0, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

onlyif mysql # use DIV operator for integer division
query I rowsort label-9471
SELECT DISTINCT + col1 * + tab2.col1 DIV col1 AS col0 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-9471
SELECT DISTINCT + col1 * + tab2.col1 / col1 AS col0 FROM tab2
----
17
31
59

query I rowsort
SELECT ALL + tab1.col0 * col0 + + tab1.col2 + col1 * + col2 FROM tab1
----
1467
4723
7744

onlyif mysql # use DIV operator for integer division
query I rowsort label-9473
SELECT ALL col0 * col2 DIV col1 FROM tab0
----
0
80
9

skipif mysql # not compatible
query I rowsort label-9473
SELECT ALL col0 * col2 / col1 FROM tab0
----
0
80
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-9474
SELECT tab1.col2 DIV + tab1.col2 AS col0 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9474
SELECT tab1.col2 / + tab1.col2 AS col0 FROM tab1
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-9475
SELECT DISTINCT col2 DIV col0 col0 FROM tab2
----
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9475
SELECT DISTINCT col2 / col0 col0 FROM tab2
----
0
3

query I rowsort
SELECT DISTINCT + col2 + col1 * tab1.col2 + + col1 AS col1 FROM tab1
----
1357
1484
637

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT - col1 - - col0 <> ( col1 * col2 )
----

query I rowsort
SELECT col0 * - tab2.col2 + col0 * col1 AS col0 FROM tab2
----
-1659
2574
28

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT col2 * tab2.col1 <> ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-9480
SELECT DISTINCT col2 * tab0.col1 DIV col1 AS col0 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-9480
SELECT DISTINCT col2 * tab0.col1 / col1 AS col0 FROM tab0
----
1
33
82

query I rowsort
SELECT DISTINCT col0 + col0 * - col0 + col1 AS col1 FROM tab1
----
-4022
-6307
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-9482
SELECT + col0 DIV + col0 col0 FROM tab0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9482
SELECT + col0 / + col0 col0 FROM tab0
----
1
1
1

query I rowsort
SELECT DISTINCT col2 FROM tab2 WHERE NULL NOT IN ( col0 )
----

query I rowsort
SELECT col1 + tab2.col2 * - col2 FROM tab2
----
-1427
-617
-698

query I rowsort
SELECT + col2 AS col1 FROM tab1 WHERE NOT ( NULL ) < NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-9486
SELECT ALL + col2 DIV col0 col2 FROM tab0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9486
SELECT ALL + col2 / col0 col2 FROM tab0
----
0
0
1

query I rowsort
SELECT + col0 * + col1 * - col1 AS col2 FROM tab1
----
-13520
-2028
-6400

query I rowsort
SELECT ALL + tab2.col0 * col0 + + col2 FROM tab2
----
6110
6279
76

query I rowsort
SELECT - tab0.col2 + - col1 AS col1 FROM tab0
----
-119
-173
-98

query I rowsort
SELECT ALL + col1 + + col1 * + col0 AS col2 FROM tab1
----
104
1053
650

query I rowsort
SELECT DISTINCT + col0 + + col1 AS col1 FROM tab0 WHERE NULL IN ( + col1 * col0 )
----

query I rowsort
SELECT DISTINCT - col1 + + col2 AS col0 FROM tab2
----
-33
-4
21

query I rowsort
SELECT col2 * + col1 + tab2.col0 AS col1 FROM tab2
----
1612
725
844

query III rowsort
SELECT * FROM tab1 WHERE ( col1 * tab1.col2 ) > NULL
----

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL NOT BETWEEN ( + col2 * col2 ) AND NULL
----

query I rowsort
SELECT DISTINCT col1 + + col2 * + col0 AS col0 FROM tab2
----
2087
220
3019

query I rowsort
SELECT - col2 * col2 * - col1 + + tab2.col1 AS col0 FROM tab2
----
22630
24565
39943

onlyif mysql # use DIV operator for integer division
query I rowsort label-9498
SELECT DISTINCT col0 + col2 * col2 DIV col1 col2 FROM tab0
----
162
35
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9498
SELECT DISTINCT col0 + col2 * col2 / col1 col2 FROM tab0
----
162
35
36

query I rowsort
SELECT ALL col2 + col2 * - tab1.col2 FROM tab1
----
-2862
-3192
-9120

query I rowsort
SELECT col0 * col1 - col1 * col2 * col1 FROM tab2 WHERE NOT ( col0 ) <> ( NULL )
----

query I rowsort
SELECT ALL + col0 + col2 * + col2 FROM tab0
----
1113
36
6813

query I rowsort
SELECT cor0.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT DISTINCT + col1 + - cor0.col0 * - cor0.col2 AS col1 FROM tab2 AS cor0
----
2087
220
3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-9505
SELECT col1 DIV col1 + - col1 FROM tab0 AS cor0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-9505
SELECT col1 / col1 + - col1 FROM tab0 AS cor0
----
-85
-90
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-9506
SELECT + col2 DIV col2 + col2 * + col2 AS col0 FROM tab0 AS cor0
----
1090
2
6725

skipif mysql # not compatible
query I rowsort label-9506
SELECT + col2 / col2 + col2 * + col2 AS col0 FROM tab0 AS cor0
----
1090
2
6725

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col1 col1 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT cor0.col2 + col0 * + col2 AS col0 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT cor0.col1 + - col0 * - col0 * col2 FROM tab0 AS cor0
----
1322
19094
649613

query I rowsort
SELECT DISTINCT col2 * - col2 + + col1 AS col1 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT DISTINCT - col2 + - cor0.col1 * col2 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT DISTINCT - cor0.col2 + cor0.col0 FROM tab2, tab1 AS cor0
----
-16
-51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-9513
SELECT ALL col2 DIV col2 AS col2 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9513
SELECT ALL col2 / col2 AS col2 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT ALL col2 + col1 AS col0 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT col1 FROM tab0 AS cor0 WHERE col1 IN ( col2 )
----

query I rowsort
SELECT - tab0.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

onlyif mysql # use DIV operator for integer division
query I rowsort label-9517
SELECT ALL col0 DIV - col1 - + col0 FROM tab2 AS cor0
----
-7
-79
-83

skipif mysql # not compatible
query I rowsort label-9517
SELECT ALL col0 / - col1 - + col0 FROM tab2 AS cor0
----
-7
-79
-83

query I rowsort
SELECT ALL + col2 + + 10 FROM tab2 cor0
----
36
37
48

query I rowsort
SELECT DISTINCT - cor0.col0 - ( - col0 + - col0 ) FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + col2 * + 85 - 73 FROM tab1 AS cor0
----
4517
4772
8087

query I rowsort
SELECT ALL + col1 + - cor0.col0 + - cor0.col0 * + col1 AS col0 FROM tab1 AS cor0
----
-1107
-55
-694

query I rowsort
SELECT 50 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to 6932c991110d256d3f92f3e9538f8040

query I rowsort
SELECT DISTINCT col0 * col2 * col2 AS col2 FROM tab2 cor0
----
114076
5103
52728

query I rowsort
SELECT DISTINCT + col1 * 64 FROM tab0 AS cor0
----
5504
5824
6208

query I rowsort
SELECT - - col0 * 43 AS col2 FROM tab1 AS cor0
----
129
2752
3440

query I rowsort
SELECT + col0 + cor0.col2 * + 86 FROM tab0 AS cor0
----
121
2862
7141

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9527
SELECT - CAST( - col0 AS SIGNED ) * col2 AS col1 FROM tab1 cor0
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-9527
SELECT - CAST ( - col0 AS INTEGER ) * col2 AS col1 FROM tab1 cor0
----
162
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 + - cor0.col0 + - ( 89 * + col2 ) col1 FROM tab1 cor0
----
-4806
-5073
-8544

query I rowsort
SELECT DISTINCT - 51 + - col0 * 14 FROM tab0 cor0
----
-1297
-387
-541

query I rowsort
SELECT ALL + - col1 + col1 * + cor0.col1 AS col0 FROM tab2 cor0
----
272
3422
930

query I rowsort
SELECT + 63 * col1 + + ( ( col0 ) + + 24 * - 3 ) FROM tab0 AS cor0
----
5370
5750
6074

query I rowsort
SELECT DISTINCT col2 * - cor0.col0 * 6 FROM tab0 cor0
----
-210
-43788
-4752

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL BETWEEN ( - col1 * col0 * col0 ) AND col2 + + col2 / col2
----

query I rowsort
SELECT ALL + col1 + + col0 + col1 FROM tab2
----
113
196
69

query I rowsort
SELECT + col2 AS col1 FROM tab0 WHERE NULL NOT BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT col0 * col0 * col2 AS col2 FROM tab1
----
233472
486
614400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + - col0 + col0 col2 FROM tab1
----
10
13
26

query I rowsort
SELECT DISTINCT + col1 * - tab1.col2 AS col1 FROM tab1
----
-1248
-1404
-570

query III rowsort
SELECT * FROM tab1 WHERE NOT + col0 + - col0 <> NULL
----

query I rowsort
SELECT col0 + col2 * - col1 AS col1 FROM tab2
----
-1456
-567
-830

query I rowsort
SELECT ALL col2 * + col2 * col2 FROM tab2
----
17576
19683
54872

query I rowsort
SELECT ALL col0 + + col0 + col2 AS col2 FROM tab1
----
185
256
60

query I rowsort
SELECT ALL col2 * - col0 * col2 FROM tab1
----
-207936
-737280
-8748

onlyif mysql # use DIV operator for integer division
query I rowsort label-9544
SELECT col1 DIV col1 + col2 AS col1 FROM tab1
----
55
58
97

skipif mysql # not compatible
query I rowsort label-9544
SELECT col1 / col1 + col2 AS col1 FROM tab1
----
55
58
97

query I rowsort
SELECT ALL 20 * - col2 FROM tab1 cor0
----
-1080
-1140
-1920

query I rowsort
SELECT DISTINCT 91 + + cor0.col1 * + col1 AS col2 FROM tab1 AS cor0
----
191
260
767

query I rowsort
SELECT DISTINCT - ( - col2 ) * ( + 58 ) + col0 FROM tab0 AS cor0
----
1938
4845
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-9548
SELECT ALL - 68 DIV col2 FROM tab0
----
-2
-68
0

skipif mysql # not compatible
query I rowsort label-9548
SELECT ALL - 68 / col2 FROM tab0
----
-2
-68
0

query I rowsort
SELECT - 76 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to f8b6589bc7503fc720ca5430e3569317

query I rowsort
SELECT - + cor0.col1 + + 86 FROM tab2 AS cor0
----
27
55
69

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9551
SELECT cor0.col2 * CAST( col1 AS SIGNED ) + - col0 FROM tab2 AS cor0
----
1456
567
830

skipif mysql # not compatible
query I rowsort label-9551
SELECT cor0.col2 * CAST ( col1 AS INTEGER ) + - col0 FROM tab2 AS cor0
----
1456
567
830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 22 col1 FROM tab0 AS cor0
----
-22
-22
-22

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9553
SELECT - CAST( col0 AS SIGNED ) col2 FROM tab1 AS cor0
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9553
SELECT - CAST ( col0 AS INTEGER ) col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT - 52 + cor0.col2 FROM tab0 cor0
----
-19
-51
30

query I rowsort
SELECT DISTINCT + 46 + col0 FROM tab0 AS cor0
----
135
70
81

query I rowsort
SELECT + cor1.col0 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT col2 * + tab2.col0 AS col1 FROM tab2
----
189
2028
3002

query I rowsort
SELECT ALL + 83 - + cor0.col1 AS col1 FROM tab2 AS cor0
----
24
52
66

query I rowsort
SELECT 53 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 866ae1b4ab9e5b4043ac1bcfd413aaa6

query I rowsort
SELECT + 45 AS col0 FROM tab2
----
45
45
45

query I rowsort
SELECT DISTINCT - 59 * col0 - col2 FROM tab1 AS cor0
----
-231
-3833
-4816

query I rowsort
SELECT + + 65 * col0 + 55 FROM tab2 AS cor0
----
510
5125
5190

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 + col1 * + col0 FROM tab1 AS cor0
----
576
75
960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9565
SELECT col0 * - CAST( 63 AS SIGNED ) + + col2 AS col1 FROM tab2 AS cor0
----
-414
-4888
-4939

skipif mysql # not compatible
query I rowsort label-9565
SELECT col0 * - CAST ( 63 AS INTEGER ) + + col2 AS col1 FROM tab2 AS cor0
----
-414
-4888
-4939

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * - col0 col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT - col2 + col2 + - tab1.col1 * + col1 * + tab1.col2 AS col2 FROM tab1
----
-16224
-36504
-5700

query I rowsort
SELECT col0 + cor0.col2 AS col1 FROM tab1 AS cor0
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + + col0 col0 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + col1 * + col1 * - col1 + - col1 * col2 FROM tab0 AS cor0
----
-638894
-761033
-912770

query I rowsort
SELECT DISTINCT + + col1 + - col1 - - col1 FROM tab2 AS cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 - col2 * col0 col2 FROM tab2
----
-2054
-216
-3040

query I rowsort
SELECT col0 * + col1 + + col2 FROM tab1
----
1136
132
697

query I rowsort
SELECT DISTINCT + col2 + - col2 + - col0 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT ALL col1 * col1 * - col0 + - col1 * col0 + - col0 AS col1 FROM tab1
----
-14640
-2109
-7104

query I rowsort
SELECT DISTINCT - col2 * - col0 + col2 FROM tab2
----
2054
216
3040

query I rowsort
SELECT + + ( cor0.col0 ) - col2 AS col2 FROM tab1 AS cor0
----
-16
-51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-9578
SELECT DISTINCT - col2 DIV + col2 AS col2 FROM tab0 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-9578
SELECT DISTINCT - col2 / + col2 AS col2 FROM tab0 AS cor0
----
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-9579
SELECT - - col0 DIV + col1 + col0 + cor0.col2 AS col1 FROM tab2 AS cor0
----
105
121
34

skipif mysql # not compatible
query I rowsort label-9579
SELECT - - col0 / + col1 + col0 + cor0.col2 AS col1 FROM tab2 AS cor0
----
105
121
34

query I rowsort
SELECT - + 98 * + col1 * col1 FROM tab0 AS cor0
----
-724808
-811538
-922082

query I rowsort
SELECT + - cor0.col0 * cor0.col0 + cor0.col2 FROM tab1 AS cor0
----
-4039
-6304
45

query I rowsort
SELECT - - 8 * cor0.col1 + col2 FROM tab2 AS cor0
----
174
275
498

query I rowsort
SELECT 81 * - col2 * - col1 + - col1 FROM tab2 AS cor0
----
124195
52309
67766

query I rowsort
SELECT ALL - 94 AS col2 FROM tab0
----
-94
-94
-94

query I rowsort
SELECT DISTINCT - 67 FROM tab1, tab2 cor0
----
-67

query I rowsort
SELECT + 98 AS col0 FROM tab0
----
98
98
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 94 col1 FROM tab1
----
94

query I rowsort
SELECT + tab1.col0 * tab1.col1 * + col2 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT 45 AS col2 FROM tab1
----
45
45
45

query I rowsort
SELECT + 2 AS col1 FROM tab1
----
2
2
2

query I rowsort
SELECT - 51 + col0 AS col1 FROM tab1 cor0
----
-48
13
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 * + col1 + - cor0.col2 * col2 col2 FROM tab0 AS cor0
----
1557
6307
9408

query I rowsort
SELECT + + col0 * + cor0.col0 AS col1 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT cor0.col0 * + col0 AS col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL - col1 * + col1 AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT 47 * col0 AS col0 FROM tab2 cor0
----
329
3666
3713

query I rowsort
SELECT DISTINCT 28 AS col2 FROM tab0 cor0
----
28

query I rowsort
SELECT + - 90 * - col2 AS col2 FROM tab0 AS cor0
----
2970
7380
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 * col1 col2 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL - 43 * - col2 FROM tab0 AS cor0
----
1419
3526
43

query I rowsort
SELECT - 51 * - col2 FROM tab2 AS cor0
----
1326
1377
1938

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9602
SELECT DISTINCT CAST( 3 AS SIGNED ) FROM tab2
----
3

skipif mysql # not compatible
query I rowsort label-9602
SELECT DISTINCT CAST ( 3 AS INTEGER ) FROM tab2
----
3

query I rowsort
SELECT + tab0.col1 + + col0 * col0 FROM tab0
----
1322
662
8012

query I rowsort
SELECT 70 * col1 + + col2 AS col2 FROM tab0
----
6053
6452
6791

query I rowsort
SELECT DISTINCT + col0 * col1 + + col2 FROM tab0 cor0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT - col2 * - col1 * col2 + - col1 AS col2 FROM tab1 AS cor0
----
119795
32480
75790

onlyif mysql # use DIV operator for integer division
query I rowsort label-9607
SELECT ALL + col2 DIV + col0 AS col0 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-9607
SELECT ALL + col2 / + col0 AS col0 FROM tab0 AS cor0
----
0
0
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9608
SELECT cor0.col2 + + CAST( NULL AS SIGNED ) col1 FROM tab2, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9608
SELECT cor0.col2 + + CAST ( NULL AS INTEGER ) col1 FROM tab2, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + + cor1.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT DISTINCT + cor1.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
7
78
79

query I rowsort
SELECT + cor0.col1 * 36 + + col2 * col2 AS col2 FROM tab0 AS cor0
----
10000
3493
4185

query I rowsort
SELECT ALL - col2 + + 60 FROM tab1
----
-36
3
6

query I rowsort
SELECT ALL ( col0 + col0 ) FROM tab0
----
178
48
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-9614
SELECT ALL - col1 DIV 29 AS col2 FROM tab0
----
-2
-3
-3

skipif mysql # not compatible
query I rowsort label-9614
SELECT ALL - col1 / 29 AS col2 FROM tab0
----
-2
-3
-3

query I rowsort
SELECT ALL + - ( col2 ) * col2 FROM tab2 AS cor0
----
-1444
-676
-729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor1.col2 col2 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT - - 11 AS col2 FROM tab2 AS cor0
----
11
11
11

query I rowsort
SELECT + - col1 + + col2 AS col1 FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT ALL + + ( + col0 ) AS col2 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT + - 98 FROM tab1 cor0
----
-98
-98
-98

query I rowsort
SELECT ALL col2 + 34 AS col1 FROM tab1 AS cor0
----
130
88
91

query I rowsort
SELECT + ( - col1 ) * col1 * + 27 AS col2 FROM tab1
----
-18252
-2700
-4563

query I rowsort
SELECT 21 + + col1 AS col0 FROM tab2
----
38
52
80

query I rowsort
SELECT ALL cor0.col1 * col1 * - col0 AS col0 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT + + col1 + ( col1 ) AS col2 FROM tab1 cor0
----
20
26
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9626
SELECT ALL - CAST( NULL AS SIGNED ) * 74 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9626
SELECT ALL - CAST ( NULL AS INTEGER ) * 74 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 + 44 AS col2 FROM tab0 AS cor0
----
-42
-47
-53

query I rowsort
SELECT - - ( + 32 ) * - col1 AS col2 FROM tab0 AS cor0
----
-2752
-2912
-3104

query I rowsort
SELECT ( col0 ) + col0 * ( + col0 ) * col0 + + col0 * + col2 FROM tab2 AS cor0
----
476658
496120
539

query I rowsort
SELECT DISTINCT + ( ( - col2 ) ) * col2 AS col0 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT - col2 * 47 AS col2 FROM tab1
----
-2538
-2679
-4512

query I rowsort
SELECT + + 67 * 93 * col0 + cor0.col2 AS col0 FROM tab2 AS cor0
----
43644
486044
492287

query I rowsort
SELECT DISTINCT + 14 * + col0 AS col0 FROM tab1 AS cor0
----
1120
42
896

onlyif mysql # use DIV operator for integer division
query I rowsort label-9634
SELECT col2 + + 94 DIV col2 FROM tab1 cor0
----
55
58
96

skipif mysql # not compatible
query I rowsort label-9634
SELECT col2 + + 94 / col2 FROM tab1 cor0
----
55
58
96

query I rowsort
SELECT ALL + - 53 FROM tab2 AS cor0
----
-53
-53
-53

query I rowsort
SELECT DISTINCT + - ( col2 ) + cor0.col1 * col2 FROM tab0 cor0
----
2805
7380
96

query I rowsort
SELECT DISTINCT + col0 * cor0.col2 AS col0 FROM tab0 cor0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * + 14 + cor0.col0 col2 FROM tab2, tab0 AS cor0, tab2 cor1
----
27 values hashing to fd13361ef8e8d678cb89dc7a6269021a

onlyif mysql # use DIV operator for integer division
query I rowsort label-9639
SELECT + - 58 DIV + col2 FROM tab1 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-9639
SELECT + - 58 / + col2 FROM tab1 AS cor0
----
-1
-1
0

query I rowsort
SELECT ALL + - col1 * - col0 * col1 AS col1 FROM tab2 AS cor0
----
22831
271518
6727

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col1 * - tab2.col0 col2 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT 82 + col2 * - 7 AS col1 FROM tab2 AS cor0
----
-100
-107
-184

query I rowsort
SELECT col2 * 81 + - col0 AS col2 FROM tab1 AS cor0
----
4371
4553
7696

query I rowsort
SELECT DISTINCT col2 * ( col0 ) AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT col1 + col2 + tab2.col2 * - tab2.col2 FROM tab2
----
-1389
-591
-671

query I rowsort
SELECT DISTINCT col2 * ( ( col1 ) ) - - 15 AS col0 FROM tab1 AS cor0
----
1263
1419
585

onlyif mysql # use DIV operator for integer division
query I rowsort label-9647
SELECT + col0 * cor0.col0 - cor0.col1 DIV col0 col1 FROM tab0 AS cor0
----
1223
573
7920

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9647
SELECT + col0 * cor0.col0 - cor0.col1 / col0 col1 FROM tab0 AS cor0
----
1223
573
7920

query I rowsort
SELECT DISTINCT + + col1 + - 2 * col1 + cor0.col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT col1 - + col2 * - ( - col2 ) * + ( 21 + col2 ) AS col1 FROM tab1 AS cor0
----
-1078259
-218674
-253412

query I rowsort
SELECT - cor0.col2 * col2 - - col1 FROM tab1 AS cor0
----
-2890
-3239
-9203

query I rowsort
SELECT + + col2 - 94 FROM tab0 AS cor0
----
-12
-61
-93

query I rowsort
SELECT DISTINCT - col0 * 55 FROM tab1 AS cor0
----
-165
-3520
-4400

skipif mysql # not compatible
query I rowsort
SELECT col0 * CAST ( - col2 AS REAL ) FROM tab0
----
-35
-7298
-792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9654
SELECT DISTINCT + + CAST( + col1 AS SIGNED ) + + col2 FROM tab1 AS cor0
----
109
67
80

skipif mysql # not compatible
query I rowsort label-9654
SELECT DISTINCT + + CAST ( + col1 AS INTEGER ) + + col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT - ( + col1 ) + + col0 AS col0 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT + cor0.col0 * - cor0.col2 + col2 AS col0 FROM tab2 AS cor0
----
-162
-2002
-2964

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9657
SELECT - CAST( NULL AS SIGNED ) + - 8 * + col2 / ( cor0.col1 + col1 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9657
SELECT - CAST ( NULL AS INTEGER ) + - 8 * + col2 / ( cor0.col1 + col1 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 + + ( + 91 ) * col2 FROM tab0
----
3036
7544
92

query I rowsort
SELECT DISTINCT - col0 * col0 + col1 FROM tab0
----
-1128
-490
-7830

onlyif mysql # use DIV operator for integer division
query I rowsort label-9660
SELECT - col0 * + 65 + col1 DIV + col1 AS col0 FROM tab1
----
-194
-4159
-5199

skipif mysql # not compatible
query I rowsort label-9660
SELECT - col0 * + 65 + col1 / + col1 AS col0 FROM tab1
----
-194
-4159
-5199

query I rowsort
SELECT DISTINCT - col2 * - col2 + ( - col2 ) + + col2 * col2 * - tab2.col2 FROM tab2
----
-16926
-18981
-53466

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * tab0.col0 + 32 * - col1 col1 FROM tab0
----
-1879
-2176
5009

onlyif mysql # use DIV operator for integer division
query I rowsort label-9663
SELECT col2 DIV + 71 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-9663
SELECT col2 / + 71 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT - - col2 * + 19 FROM tab1 AS cor0
----
1026
1083
1824

onlyif mysql # use DIV operator for integer division
query I rowsort label-9665
SELECT + - col1 * ( col0 ) DIV - col0 AS col2 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-9665
SELECT + - col1 * ( col0 ) / - col0 AS col2 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + ( - col2 + - tab0.col0 ) * col2 AS col2 FROM tab0
----
-14022
-1881
-36

query I rowsort
SELECT + 11 * tab1.col0 FROM tab1
----
33
704
880

query I rowsort
SELECT ALL col2 * 10 AS col2 FROM tab0
----
10
330
820

query I rowsort
SELECT DISTINCT + col1 * - 55 * col2 FROM tab2
----
-35530
-46035
-84370

query I rowsort
SELECT - 19 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 339c9d62143bf2f7566b89a1b56eeeb4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + 75 col0 FROM tab0 AS cor0
----
110
164
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 7 col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 3362c0cb2b2c663037159d0699d46b76

query I rowsort
SELECT DISTINCT ( - col2 ) + col2 AS col1 FROM tab2
----
0

query I rowsort
SELECT ALL 17 AS col0 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to e0dd9155e4d67132637a04c18ef46b2a

onlyif mysql # use DIV operator for integer division
query I rowsort label-9675
SELECT ALL + 92 + col0 * - col0 * 78 + col0 DIV - col0 FROM tab1 AS cor0
----
-319397
-499109
-611

skipif mysql # not compatible
query I rowsort label-9675
SELECT ALL + 92 + col0 * - col0 * 78 + col0 / - col0 FROM tab1 AS cor0
----
-319397
-499109
-611

query I rowsort
SELECT DISTINCT 0 AS col1 FROM tab1, tab1 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9677
SELECT ALL - CAST( NULL AS SIGNED ) * col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9677
SELECT ALL - CAST ( NULL AS INTEGER ) * col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9678
SELECT DISTINCT - col1 + 56 DIV - cor0.col0 FROM tab2 cor0
----
-17
-39
-59

skipif mysql # not compatible
query I rowsort label-9678
SELECT DISTINCT - col1 + 56 / - cor0.col0 FROM tab2 cor0
----
-17
-39
-59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9679
SELECT - - col1 * - col0 / CAST( NULL AS DECIMAL ) + - 17 / col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9679
SELECT - - col1 * - col0 / CAST ( NULL AS REAL ) + - 17 / col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col2 * + cor0.col1 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 16ae0e1090cb09b93854a4788f17716b

query I rowsort
SELECT - 17 * + col2 + + col1 FROM tab0 AS cor0
----
-1303
-475
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-9682
SELECT - + col1 + col2 DIV ( - col2 ) AS col2 FROM tab1 AS cor0
----
-11
-14
-27

skipif mysql # not compatible
query I rowsort label-9682
SELECT - + col1 + col2 / ( - col2 ) AS col2 FROM tab1 AS cor0
----
-11
-14
-27

query I rowsort
SELECT - - cor0.col0 + col2 AS col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT + col2 + - 49 AS col1 FROM tab1
----
47
5
8

query I rowsort
SELECT - + 91 * + cor0.col0 FROM tab0 AS cor0
----
-2184
-3185
-8099

query I rowsort
SELECT + col1 + - 38 + col2 AS col0 FROM tab1
----
29
42
71

query I rowsort
SELECT - + col1 * - col2 + ( - col2 + col2 * col2 ) AS col1 FROM tab0 AS cor0
----
14104
3894
97

query I rowsort
SELECT - + cor0.col1 + - col1 * - col1 FROM tab1 cor0
----
156
650
90

query I rowsort
SELECT DISTINCT + col2 - col0 AS col2 FROM tab0
----
-34
-7
9

query I rowsort
SELECT - col2 + - tab2.col2 * + tab2.col1 + + col0 FROM tab2
----
-1482
-605
-857

query I rowsort
SELECT ALL 18 - + col0 FROM tab1
----
-46
-62
15

query I rowsort
SELECT + 61 + col1 AS col1 FROM tab1
----
71
74
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 - + col1 col1 FROM tab2
----
-33
-4
21

query I rowsort
SELECT ALL 86 * col1 - + 49 * col0 * + col2 FROM tab2
----
-145636
-6595
-94298

query I rowsort
SELECT + 80 + + cor1.col2 AS col1 FROM tab1, tab1 AS cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to 8efcbcc3aacfd36bb63978d722356ed0

query I rowsort
SELECT ALL 13 * cor0.col0 FROM tab2 AS cor0
----
1014
1027
91

query I rowsort
SELECT col2 * - col0 - 47 * ( - col1 + col2 ) AS col0 FROM tab2 AS cor0
----
-1
-3989
-477

query I rowsort
SELECT - + 52 + + col2 FROM tab1 AS cor0
----
2
44
5

query I rowsort
SELECT - col2 * col2 - + col1 AS col0 FROM tab1 cor0
----
-2942
-3259
-9229

query I rowsort
SELECT + col0 + col2 * 31 FROM tab2 AS cor0
----
1257
844
884

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + 56 col1 FROM tab1 cor0
----
110
113
152

onlyif mysql # use DIV operator for integer division
query I rowsort label-9702
SELECT ALL - - col1 DIV 89 + 15 * cor0.col0 AS col2 FROM tab1 AS cor0
----
1200
45
960

skipif mysql # not compatible
query I rowsort label-9702
SELECT ALL - - col1 / 89 + 15 * cor0.col0 AS col2 FROM tab1 AS cor0
----
1200
45
960

query I rowsort
SELECT ALL col1 * + col2 + 44 AS col2 FROM tab2 cor0
----
1578
690
881

query I rowsort
SELECT DISTINCT - + cor0.col2 * - col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL - col0 + 61 FROM tab1 AS cor0
----
-19
-3
58

query I rowsort
SELECT ALL - col1 + + col2 * + ( + cor0.col1 ) FROM tab1 AS cor0
----
1235
1378
560

onlyif mysql # use DIV operator for integer division
query I rowsort label-9707
SELECT DISTINCT + - col1 DIV + col1 AS col0 FROM tab2 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-9707
SELECT DISTINCT + - col1 / + col1 AS col0 FROM tab2 AS cor0
----
-1

query I rowsort
SELECT ALL - - col1 * - col2 + - col0 AS col0 FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT - + col1 * + col2 * + 46 + - cor0.col1 AS col2 FROM tab1 AS cor0
----
-26230
-57421
-64610

query I rowsort
SELECT - cor0.col0 * 62 + 80 FROM tab2 AS cor0
----
-354
-4756
-4818

query I rowsort
SELECT ALL + 24 AS col2 FROM tab0
----
24
24
24

query I rowsort
SELECT DISTINCT - col2 - 39 * + 71 * - col0 AS col0 FROM tab0 AS cor0
----
246359
66423
96914

query I rowsort
SELECT col1 - 47 FROM tab1 AS cor0
----
-21
-34
-37

query I rowsort
SELECT ALL + - col1 * - col0 AS col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - col2 * 64 + col2 * col2 FROM tab1 AS cor0
----
-399
-540
3072

query I rowsort
SELECT DISTINCT - col2 - + 40 FROM tab0 AS cor0
----
-122
-41
-73

query I rowsort
SELECT cor0.col1 * + 76 + col0 AS col2 FROM tab2 AS cor0
----
1371
2363
4562

query I rowsort
SELECT ALL 69 * tab1.col0 AS col1 FROM tab1
----
207
4416
5520

query I rowsort
SELECT cor0.col0 * - col0 AS col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT - col0 + + 15 * col1 AS col0 FROM tab0 AS cor0
----
1266
1276
1420

query I rowsort
SELECT - + 28 * col0 AS col2 FROM tab1 cor0
----
-1792
-2240
-84

query I rowsort
SELECT ALL 40 + + col0 * col2 * ( cor0.col2 * + col1 ) FROM tab0 AS cor0
----
2247736
3435
54457716

query I rowsort
SELECT ALL + col1 * 76 * col0 FROM tab2
----
102068
16492
349752

query I rowsort
SELECT DISTINCT + ( col0 ) + col2 AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT - col1 + 24 * + cor0.col2 FROM tab0 AS cor0
----
-73
1877
706

query I rowsort
SELECT ALL 89 + + col2 FROM tab2 AS cor0
----
115
116
127

query I rowsort
SELECT ALL 79 * - col2 FROM tab0 AS cor0
----
-2607
-6478
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-9728
SELECT DISTINCT + col2 DIV 41 FROM tab0 AS cor0
----
0
2

skipif mysql # not compatible
query I rowsort label-9728
SELECT DISTINCT + col2 / 41 FROM tab0 AS cor0
----
0
2

query I rowsort
SELECT + 2 + - 97 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to cf302b83f15b730fe35c19bdd9363c13

query I rowsort
SELECT - 95 FROM tab1 cor0
----
-95
-95
-95

query I rowsort
SELECT ALL + cor0.col2 - + col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL - tab1.col2 * - col2 AS col1 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT 15 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

query I rowsort
SELECT ALL - cor0.col1 * ( 27 ) FROM tab2 AS cor0
----
-1593
-459
-837

query I rowsort
SELECT DISTINCT - + cor0.col1 * col0 AS col2 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT + + col0 + col1 * col1 * col0 AS col1 FROM tab2 AS cor0
----
22910
271596
6734

query I rowsort
SELECT DISTINCT + col0 * col0 + + cor0.col1 AS col2 FROM tab2 cor0
----
6143
6258
80

query I rowsort
SELECT + 68 + - ( - col0 ) FROM tab2 AS cor0
----
146
147
75

query I rowsort
SELECT + ( 15 ) AS col0 FROM tab0 cor0
----
15
15
15

query I rowsort
SELECT - + cor0.col2 * col0 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9741
SELECT col1 - CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9741
SELECT col1 - CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT + - cor0.col2 - + col2 FROM tab0 cor0
----
-164
-2
-66

query I rowsort
SELECT ALL + - 9 FROM tab2 cor0
----
-9
-9
-9

query I rowsort
SELECT 22 + col0 * + 98 FROM tab1 AS cor0
----
316
6294
7862

query I rowsort
SELECT + 45 * - col1 + - 21 * + col0 FROM tab0 AS cor0
----
-4374
-5100
-5964

query I rowsort
SELECT - 4 + col0 * - col1 AS col0 FROM tab1 AS cor0
----
-1044
-644
-82

query I rowsort
SELECT DISTINCT - cor0.col2 * - cor0.col1 * col0 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT DISTINCT 63 * - col0 AS col1 FROM tab2 AS cor0
----
-441
-4914
-4977

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + + col2 col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT 28 + - col1 + + col1 FROM tab1 AS cor0
----
28
28
28

query I rowsort
SELECT - + col1 * + col2 AS col2 FROM tab2 cor0
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 col0 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT ALL - 82 + col2 FROM tab1 AS cor0
----
-25
-28
14

query I rowsort
SELECT ALL 21 + + col2 * ( - 39 ) + + col2 AS col0 FROM tab1 AS cor0
----
-2031
-2145
-3627

query I rowsort
SELECT DISTINCT - col1 * col1 - col2 FROM tab1 AS cor0
----
-157
-265
-730

query I rowsort
SELECT - col1 + 28 + + col2 * tab1.col0 AS col1 FROM tab1
----
164
3666
7695

query I rowsort
SELECT DISTINCT - cor1.col1 AS col0 FROM tab2, tab0 cor0, tab2 AS cor1
----
-17
-31
-59

query I rowsort
SELECT ALL + - 89 FROM tab1 AS cor0
----
-89
-89
-89

query I rowsort
SELECT cor0.col0 + - col2 * 24 AS col2 FROM tab2 AS cor0
----
-546
-641
-833

query I rowsort
SELECT ALL + col2 + + col2 FROM tab1 cor0
----
108
114
192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - 33 + + col1 ) * + ( col0 ) col1 FROM tab1
----
-1472
-1600
-21

onlyif mysql # use DIV operator for integer division
query I rowsort label-9762
SELECT - col2 DIV col0 - + 4 FROM tab1 AS cor0
----
-22
-4
-5

skipif mysql # not compatible
query I rowsort label-9762
SELECT - col2 / col0 - + 4 FROM tab1 AS cor0
----
-22
-4
-5

query I rowsort
SELECT ALL cor1.col0 AS col1 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT col1 * + 70 FROM tab0 AS cor0
----
6020
6370
6790

query I rowsort
SELECT + tab2.col2 + + tab2.col2 + 40 FROM tab2
----
116
92
94

query I rowsort
SELECT 42 + - col1 + - col2 * - col1 AS col2 FROM tab2
----
1517
671
848

query I rowsort
SELECT - col1 + + ( col2 ) * col0 + + ( + 8 ) * col0 FROM tab0 AS cor0
----
218
7919
898

query I rowsort
SELECT DISTINCT - col0 + - col1 + + tab1.col1 * + col1 AS col0 FROM tab1
----
26
647
76

query I rowsort
SELECT ALL tab1.col2 + - col1 FROM tab1
----
28
47
83

query I rowsort
SELECT + col1 + col0 + col0 * col1 FROM tab2
----
1439
255
4739

query I rowsort
SELECT DISTINCT col2 + tab2.col2 * - col2 AS col2 FROM tab2
----
-1406
-650
-702

query I rowsort
SELECT + col0 + ( col1 ) + - col0 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-9773
SELECT col0 + col1 + - col2 DIV + ( col0 ) col1 FROM tab0
----
109
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9773
SELECT col0 + col1 + - col2 / + ( col0 ) col1 FROM tab0
----
109
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 17 col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 28cd5b4c959cb41fbc56389ab43d167e

query I rowsort
SELECT 69 FROM tab0, tab2 cor0
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

query I rowsort
SELECT DISTINCT - col2 + - ( ( col1 ) ) AS col0 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT + col2 + col1 + col2 * - col0 * + 51 FROM tab2 cor0
----
-103343
-153047
-9581

query I rowsort
SELECT ALL - col2 * - 93 AS col2 FROM tab2 AS cor0
----
2418
2511
3534

query I rowsort
SELECT ALL col0 + + 5 AS col0 FROM tab1 AS cor0
----
69
8
85

query I rowsort
SELECT - - ( + col0 ) + + col1 AS col2 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT DISTINCT - - col2 - + col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL - col1 * + col2 + col1 AS col1 FROM tab2 AS cor0
----
-1475
-629
-806

onlyif mysql # use DIV operator for integer division
query I rowsort label-9783
SELECT DISTINCT - col0 - col0 DIV col1 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-9783
SELECT DISTINCT - col0 - col0 / col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL - ( + 27 ) * col0 FROM tab0 AS cor0
----
-2403
-648
-945

query I rowsort
SELECT ALL col1 * - cor0.col2 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + 20 + col0 FROM tab2 AS cor0
----
27
98
99

query I rowsort
SELECT DISTINCT + - 83 * 89 + - col0 AS col0 FROM tab1 AS cor0
----
-7390
-7451
-7467

query I rowsort
SELECT - - cor0.col1 - col2 AS col2 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT + ( col2 ) * cor0.col2 + - col0 + col2 AS col1 FROM tab1 AS cor0
----
2967
3242
9232

query I rowsort
SELECT DISTINCT + col0 + - col2 * + ( 37 * col2 ) FROM tab1 AS cor0
----
-107889
-120149
-340912

query I rowsort
SELECT - tab1.col2 FROM tab1, tab0, tab1 AS cor0, tab2
----
81 values hashing to 2df272448a67587d4635afedff278dcc

onlyif mysql # use DIV operator for integer division
query I rowsort label-9792
SELECT ( col0 ) DIV 43 col0 FROM tab1
----
0
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9792
SELECT ( col0 ) / 43 col0 FROM tab1
----
0
1
1

query I rowsort
SELECT + ( 69 ) AS col1 FROM tab2 AS cor0
----
69
69
69

query I rowsort
SELECT + col0 + + ( col0 ) * + 46 FROM tab0 cor0
----
1128
1645
4183

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col0 * col2 * - col1 col2 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT ( 85 ) * - col0 AS col0 FROM tab0
----
-2040
-2975
-7565

query I rowsort
SELECT - cor0.col2 * + col0 + col1 * - 36 AS col2 FROM tab2 AS cor0
----
-1305
-3614
-4152

onlyif mysql # use DIV operator for integer division
query I rowsort label-9798
SELECT - col2 + + 54 * col0 DIV 70 AS col0 FROM tab2 AS cor0
----
-22
22
34

skipif mysql # not compatible
query I rowsort label-9798
SELECT - col2 + + 54 * col0 / 70 AS col0 FROM tab2 AS cor0
----
-22
22
34

query I rowsort
SELECT ALL + + col2 * + 19 FROM tab2 AS cor0
----
494
513
722

query I rowsort
SELECT col0 - + col0 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 65 * col2 + cor0.col2 AS col1 FROM tab2 AS cor0
----
1716
1782
2508

query I rowsort
SELECT ALL - col0 * - 31 AS col1 FROM tab0 cor0
----
1085
2759
744

query I rowsort
SELECT 14 + + col0 * col1 FROM tab2 AS cor0
----
1357
231
4616

query I rowsort
SELECT + 37 - + col0 AS col2 FROM tab1 AS cor0
----
-27
-43
34

query I rowsort
SELECT - - col0 * + col1 + - col0 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT - 65 AS col1 FROM tab0 AS cor0
----
-65
-65
-65

query I rowsort
SELECT + col1 * col0 * col1 FROM tab0 AS cor0
----
177504
329315
737009

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 63 * col1 col0 FROM tab2 cor0
----
1071
1953
3717

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9809
SELECT DISTINCT tab1.col2 * + col1 * - CAST( col1 AS SIGNED ) AS col0 FROM tab1
----
-16224
-36504
-5700

skipif mysql # not compatible
query I rowsort label-9809
SELECT DISTINCT tab1.col2 * + col1 * - CAST ( col1 AS INTEGER ) AS col0 FROM tab1
----
-16224
-36504
-5700

query I rowsort
SELECT col2 * + ( + col1 * + col2 ) FROM tab1
----
119808
32490
75816

query I rowsort
SELECT DISTINCT 77 FROM tab1, tab2 AS cor0
----
77

query I rowsort
SELECT - col2 * + ( col2 ) + col1 AS col0 FROM tab0 AS cor0
----
-1003
-6633
96

query I rowsort
SELECT col0 * col2 - + col2 * - tab1.col1 FROM tab1
----
1566
4218
8928

query I rowsort
SELECT ALL + 51 + - 22 AS col1 FROM tab1 AS cor0
----
29
29
29

query I rowsort
SELECT col2 - - tab0.col1 AS col0 FROM tab0
----
119
173
98

query I rowsort
SELECT ALL ( + 49 ) FROM tab2, tab0 AS cor0, tab1, tab2 AS cor1
----
81 values hashing to e587c122dea39a2488ff88b884cea462

query I rowsort
SELECT DISTINCT 75 * 94 AS col1 FROM tab1, tab0 AS cor0
----
7050

query I rowsort
SELECT - 24 * tab1.col2 AS col1 FROM tab1
----
-1296
-1368
-2304

query I rowsort
SELECT DISTINCT col2 + - 57 FROM tab0
----
-24
-56
25

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9820
SELECT CAST( + 27 AS SIGNED ) + col2 + - col0 AS col0 FROM tab0
----
-7
20
36

skipif mysql # not compatible
query I rowsort label-9820
SELECT CAST ( + 27 AS INTEGER ) + col2 + - col0 AS col0 FROM tab0
----
-7
20
36

query I rowsort
SELECT ALL - col0 - col1 * - tab2.col1 AS col2 FROM tab2
----
210
3403
954

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + col0 ) col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT + + ( col0 ) + - col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - ( - 99 ) + col0 FROM tab0 AS cor0
----
123
134
188

query I rowsort
SELECT - 74 * + col1 + col2 AS col1 FROM tab1 AS cor0
----
-1870
-683
-866

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 54 * - col0 col2 FROM tab2 AS cor0
----
-378
-4212
-4266

query I rowsort
SELECT DISTINCT + col2 * cor0.col0 + cor0.col1 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT 9 - col1 FROM tab0
----
-77
-82
-88

query I rowsort
SELECT - tab2.col2 - - col0 * - tab2.col1 * + col2 FROM tab2
----
-119678
-51072
-5886

query I rowsort
SELECT DISTINCT + tab0.col2 + col2 * tab0.col2 AS col1 FROM tab0
----
1122
2
6806

query I rowsort
SELECT 56 AS col1 FROM tab0
----
56
56
56

query I rowsort
SELECT - - 16 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to ee5bde9f68ee828e8cd86b0d590090bc

onlyif mysql # use DIV operator for integer division
query I rowsort label-9833
SELECT DISTINCT col1 DIV + col0 col1 FROM tab2
----
0
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9833
SELECT DISTINCT col1 / + col0 col1 FROM tab2
----
0
4

query I rowsort
SELECT ALL + col2 + col1 * - col0 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT col0 * col2 + + col1 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT - col0 * - col0 * - ( ( - col2 ) ) FROM tab1
----
233472
486
614400

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9837
SELECT col1 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9837
SELECT col1 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + col2 * col0 + col1 FROM tab1 AS cor0
----
188
3658
7693

onlyif mysql # use DIV operator for integer division
query I rowsort label-9839
SELECT ALL col2 + - CAST( col1 AS SIGNED ) DIV col2 col0 FROM tab1 AS cor0
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9839
SELECT ALL col2 + - CAST ( col1 AS INTEGER ) / col2 col0 FROM tab1 AS cor0
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + ( 11 ) * col1 col0 FROM tab1 AS cor0
----
1100
1859
7436

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 91 col1 FROM tab0
----
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-9842
SELECT DISTINCT cor0.col0 DIV - ( - col1 ) + col1 + - col0 AS col0 FROM tab0 AS cor0
----
2
62

skipif mysql # not compatible
query I rowsort label-9842
SELECT DISTINCT cor0.col0 / - ( - col1 ) + col1 + - col0 AS col0 FROM tab0 AS cor0
----
2
62

query I rowsort
SELECT - col1 + - 25 AS col0 FROM tab2 AS cor0
----
-42
-56
-84

query I rowsort
SELECT ALL - col1 * ( - col0 ) * + cor0.col2 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT col1 + + col0 AS col0 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT ALL + col2 * col0 + col1 + - col1 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT ALL + - col2 * ( 30 ) + cor0.col0 AS col2 FROM tab2 AS cor0
----
-1061
-702
-803

query I rowsort
SELECT - cor0.col2 * ( 4 ) AS col0 FROM tab2 AS cor0
----
-104
-108
-152

query I rowsort
SELECT ( - col0 * - col2 ) FROM tab0
----
35
7298
792

query I rowsort
SELECT 5 * + tab2.col1 AS col2 FROM tab2
----
155
295
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9851
SELECT + CAST( NULL AS SIGNED ) * col2 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9851
SELECT + CAST ( NULL AS INTEGER ) * col2 AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT 69 * 37 + + col0 FROM tab0
----
2577
2588
2642

query I rowsort
SELECT - ( - 30 ) * col1 * - col1 + + 10 AS col1 FROM tab0
----
-221870
-248420
-282260

query I rowsort
SELECT DISTINCT col0 + 38 FROM tab1
----
102
118
41

query I rowsort
SELECT ALL + ( - col1 ) - col0 AS col1 FROM tab2 AS cor0
----
-137
-38
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-9856
SELECT ALL - - ( ( col0 ) ) * - cor0.col2 - + cor0.col0 * col1 DIV - 33 FROM tab1 AS cor0
----
-160
-3629
-7649

skipif mysql # not compatible
query I rowsort label-9856
SELECT ALL - - ( ( col0 ) ) * - cor0.col2 - + cor0.col0 * col1 / - 33 FROM tab1 AS cor0
----
-160
-3629
-7649

query I rowsort
SELECT - - col0 * + cor0.col0 + + col1 * - 84 FROM tab2 AS cor0
----
-2555
1128
4813

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + col0 * col1 col2 FROM tab2 AS cor0
----
1326
186
4543

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9859
SELECT - CAST( col2 AS SIGNED ) * tab0.col0 AS col2 FROM tab0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort label-9859
SELECT - CAST ( col2 AS INTEGER ) * tab0.col0 AS col2 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT ALL ( tab0.col0 ) * - col0 + col1 AS col0 FROM tab0
----
-1128
-490
-7830

query I rowsort
SELECT DISTINCT - col0 + + cor0.col1 FROM tab2 cor0
----
-19
-62
24

query I rowsort
SELECT - 99 + + col0 FROM tab2 AS cor0
----
-20
-21
-92

onlyif mysql # use DIV operator for integer division
query I rowsort label-9863
SELECT DISTINCT col1 * col0 DIV col0 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-9863
SELECT DISTINCT col1 * col0 / col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - 89 * - col1 AS col2 FROM tab0 AS cor0
----
7654
8099
8633

query I rowsort
SELECT - - col1 + + cor0.col1 AS col0 FROM tab0 cor0
----
172
182
194

query I rowsort
SELECT ALL col2 + - col1 * col2 FROM tab2 cor0
----
-1508
-608
-810

query I rowsort
SELECT ALL - 7 AS col2 FROM tab0 AS cor0
----
-7
-7
-7

onlyif mysql # use DIV operator for integer division
query I rowsort label-9868
SELECT DISTINCT 66 * col2 + + tab1.col2 DIV - 84 col2 FROM tab1
----
3564
3762
6335

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9868
SELECT DISTINCT 66 * col2 + + tab1.col2 / - 84 col2 FROM tab1
----
3564
3762
6335

query I rowsort
SELECT ALL 85 + cor0.col1 AS col1 FROM tab2 AS cor0
----
102
116
144

query I rowsort
SELECT DISTINCT + 22 FROM tab2 cor0
----
22

query I rowsort
SELECT + + col1 * + col0 + - ( 67 + col1 ) AS col0 FROM tab1 AS cor0
----
-15
563
960

onlyif mysql # use DIV operator for integer division
query I rowsort label-9872
SELECT ALL - col0 * col1 DIV 7 AS col1 FROM tab0 AS cor0
----
-1157
-294
-485

skipif mysql # not compatible
query I rowsort label-9872
SELECT ALL - col0 * col1 / 7 AS col1 FROM tab0 AS cor0
----
-1157
-294
-485

query I rowsort
SELECT + + col2 * ( - col2 ) FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL - col2 * + ( + ( col1 ) ) * + cor0.col1 + - col1 AS col2 FROM tab2 cor0
----
-10999
-25978
-90565

query I rowsort
SELECT DISTINCT cor0.col2 + - 30 - + 0 FROM tab2 AS cor0
----
-3
-4
8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9876
SELECT ALL - col2 * - CAST( + col1 AS SIGNED ) AS col1 FROM tab2 cor0
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-9876
SELECT ALL - col2 * - CAST ( + col1 AS INTEGER ) AS col1 FROM tab2 cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * - 79 col0 FROM tab2 AS cor0
----
2054
2133
3002

query I rowsort
SELECT DISTINCT - - col0 - col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT - ( - tab1.col2 ) * - tab1.col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 760e91273f37834612f88abef6e165f8

query I rowsort
SELECT col2 + - col2 * 95 FROM tab1 AS cor0
----
-5076
-5358
-9024

query I rowsort
SELECT ALL col0 * + ( col2 ) AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT - col1 * 10 FROM tab2 AS cor0
----
-170
-310
-590

query I rowsort
SELECT ALL + cor0.col1 + + cor0.col2 AS col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT - col2 * ( 93 ) * col1 AS col0 FROM tab2 AS cor0
----
-142662
-60078
-77841

query I rowsort
SELECT cor0.col1 * cor0.col0 AS col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL - cor0.col2 * - col1 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT - + col0 * 7 FROM tab1 AS cor0
----
-21
-448
-560

onlyif mysql # use DIV operator for integer division
query I rowsort label-9888
SELECT ALL + col2 DIV + col2 AS col2 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9888
SELECT ALL + col2 / + col2 AS col2 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT - - cor0.col2 * - 40 FROM tab2 AS cor0
----
-1040
-1080
-1520

query IIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 cor0 WHERE NULL NOT BETWEEN ( NULL ) AND ( NULL )
----

query I rowsort
SELECT DISTINCT - 93 * cor0.col1 * + cor0.col0 AS col2 FROM tab1 AS cor0
----
-59520
-7254
-96720

query I rowsort
SELECT + col1 - col2 AS col2 FROM tab0 cor0
----
53
9
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-9893
SELECT DISTINCT - col2 DIV - 77 FROM tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-9893
SELECT DISTINCT - col2 / - 77 FROM tab0 AS cor0
----
0
1

query I rowsort
SELECT + ( col0 ) * + col0 AS col0 FROM tab2 cor0
----
49
6084
6241

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 cor0 CROSS JOIN tab1, tab1 cor1, tab1 AS cor2
----
972 values hashing to 635619591835474e6aa6acdff4ab166c

query I rowsort
SELECT DISTINCT - col1 - - col1 FROM tab0
----
0

query I rowsort
SELECT - ( - col2 ) + col1 AS col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT + + 6 * - col0 FROM tab0 AS cor0
----
-144
-210
-534

query I rowsort
SELECT ALL ( col0 ) * col2 + col0 FROM tab1 AS cor0
----
165
3712
7760

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( col2 AS REAL ) - col2 FROM tab1 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9901
SELECT - col1 DIV col1 FROM tab1 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9901
SELECT - col1 / col1 FROM tab1 cor0
----
-1
-1
-1

query I rowsort
SELECT ALL + + cor0.col0 * + col1 AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL 17 * 20 + + col1 * col0 FROM tab1 AS cor0
----
1380
418
980

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col2 + 65 col2 FROM tab1 AS cor0
----
119
122
161

query I rowsort
SELECT ALL + col0 + 13 * col0 AS col0 FROM tab2 cor0
----
1092
1106
98

query I rowsort
SELECT DISTINCT - col2 + 96 * col2 FROM tab0 AS cor0
----
3135
7790
95

query I rowsort
SELECT ALL + ( - col1 ) * - col2 AS col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT 10 * - 76 FROM tab2, tab1 cor0
----
9 values hashing to 940fc1fce2bffe353ea8c243b0091f12

query I rowsort
SELECT col0 + 0 AS col2 FROM tab0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-9910
SELECT col2 DIV + ( + tab1.col1 ) + col2 FROM tab1
----
103
56
62

skipif mysql # not compatible
query I rowsort label-9910
SELECT col2 / + ( + tab1.col1 ) + col2 FROM tab1
----
103
56
62

query I rowsort
SELECT ALL 16 FROM tab0, tab0 cor0
----
9 values hashing to 3fdb08ec2e3d4b642dd4594778cca8b3

query I rowsort
SELECT ALL + cor0.col0 AS col1 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

onlyif mysql # use DIV operator for integer division
query I rowsort label-9913
SELECT CAST( col1 AS SIGNED ) DIV + col2 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9913
SELECT CAST ( col1 AS INTEGER ) / + col2 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT 35 * - col1 AS col1 FROM tab0 AS cor0
----
-3010
-3185
-3395

query I rowsort
SELECT - - col1 * + 39 AS col2 FROM tab1 AS cor0
----
1014
390
507

query I rowsort
SELECT ALL 3 + col0 AS col0 FROM tab2
----
10
81
82

query I rowsort
SELECT + 89 * - cor0.col1 FROM tab2 AS cor0
----
-1513
-2759
-5251

query I rowsort
SELECT DISTINCT 36 * + 57 AS col1 FROM tab0
----
2052

onlyif mysql # use DIV operator for integer division
query I rowsort label-9919
SELECT - col1 DIV - col1 FROM tab2 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9919
SELECT - col1 / - col1 FROM tab2 cor0
----
1
1
1

query I rowsort
SELECT + cor0.col1 * col0 * + col0 AS col0 FROM tab0 AS cor0
----
118825
49536
720811

onlyif mysql # use DIV operator for integer division
query I rowsort label-9921
SELECT + col0 + col2 DIV - ( col0 ) AS col2 FROM tab2
----
4
78
79

skipif mysql # not compatible
query I rowsort label-9921
SELECT + col0 + col2 / - ( col0 ) AS col2 FROM tab2
----
4
78
79

query I rowsort
SELECT 21 * col1 FROM tab0
----
1806
1911
2037

query I rowsort
SELECT + + ( 63 ) FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to c3eea92c46f2c49716f386a58b575025

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 1 col1 FROM tab2
----
1
1
1

query I rowsort
SELECT col0 + col2 * col2 * col1 FROM tab2
----
22606
24627
39962

query I rowsort
SELECT DISTINCT - tab2.col0 * tab2.col1 FROM tab2
----
-1343
-217
-4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9927
SELECT DISTINCT col0 * + CAST( NULL AS SIGNED ) * + 67 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9927
SELECT DISTINCT col0 * + CAST ( NULL AS INTEGER ) * + 67 FROM tab2 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9928
SELECT ALL - col0 + CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9928
SELECT ALL - col0 + CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col0 * - 4 FROM tab0 AS cor0
----
-140
-356
-96

query I rowsort
SELECT ALL + cor0.col0 * - 26 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 0330bf7252f6501c8562d1aa097ebbbb

query I rowsort
SELECT DISTINCT + ( 93 ) FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 61 col1 FROM tab2 AS cor0
----
61
61
61

query I rowsort
SELECT + 63 AS col2 FROM tab0 cor0
----
63
63
63

query I rowsort
SELECT + col2 * - 13 - + col2 AS col1 FROM tab0 AS cor0
----
-1148
-14
-462

query I rowsort
SELECT col2 * + 37 - ( col0 ) FROM tab0 AS cor0
----
1197
2
2945

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9936
SELECT - - col0 * CAST( NULL AS DECIMAL ) / col0 + cor0.col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9936
SELECT - - col0 * CAST ( NULL AS REAL ) / col0 + cor0.col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col0 * 74 - 45 * + col0 AS col2 FROM tab1 cor0
----
1856
2320
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + col1 * col2 col0 FROM tab1 AS cor0
----
16224
36504
5700

onlyif mysql # use DIV operator for integer division
query I rowsort label-9939
SELECT ALL + cor0.col1 DIV + 70 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9939
SELECT ALL + cor0.col1 / + 70 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - col1 + 82 * col1 FROM tab2 AS cor0
----
1377
2511
4779

query I rowsort
SELECT - 86 * 84 FROM tab2 cor0
----
-7224
-7224
-7224

query I rowsort
SELECT DISTINCT col0 * - 57 FROM tab2
----
-399
-4446
-4503

query I rowsort
SELECT + ( ( tab1.col0 ) + ( 81 ) ) FROM tab1
----
145
161
84

query I rowsort
SELECT + ( col2 * + tab2.col2 ) FROM tab2
----
1444
676
729

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( 56 AS REAL ) * + col2 FROM tab1
----
3024
3192
5376

onlyif mysql # use DIV operator for integer division
query I rowsort label-9946
SELECT DISTINCT + col2 DIV 28 FROM tab1
----
1
2
3

skipif mysql # not compatible
query I rowsort label-9946
SELECT DISTINCT + col2 / 28 FROM tab1
----
1
2
3

query I rowsort
SELECT DISTINCT + - ( col1 ) * + col0 + col2 * col0 AS col1 FROM tab0 cor0
----
-1272
-3360
-801

query I rowsort
SELECT ALL - - 8 FROM tab0 AS cor0
----
8
8
8

query I rowsort
SELECT ALL - ( col0 ) * + col0 AS col2 FROM tab1 AS cor0
----
-4096
-6400
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 93 * col1 + + 78 col1 FROM tab1 AS cor0
----
1008
1287
2496

query I rowsort
SELECT + + 27 * + cor0.col2 FROM tab1 AS cor0
----
1458
1539
2592

query I rowsort
SELECT cor1.col1 * + cor0.col1 AS col0 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to b80ce76f8664310580a5197b3984e0f7

onlyif mysql # use DIV operator for integer division
query I rowsort label-9953
SELECT cor0.col2 DIV + 18 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8048428009729dbe6c53a8c68a3c26bc

skipif mysql # not compatible
query I rowsort label-9953
SELECT cor0.col2 / + 18 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8048428009729dbe6c53a8c68a3c26bc

query I rowsort
SELECT ALL ( - col2 ) + + col0 FROM tab1
----
-16
-51
7

query I rowsort
SELECT ALL + 98 * - tab0.col2 AS col1 FROM tab0
----
-3234
-8036
-98

query I rowsort
SELECT DISTINCT - col1 * col2 * - ( - col1 ) AS col0 FROM tab0
----
-244068
-679042
-9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 89 * + col2 * 55 col1 FROM tab1
----
264330
279015
469920

onlyif mysql # use DIV operator for integer division
query I rowsort label-9958
SELECT DISTINCT + 58 DIV col0 FROM tab2
----
0
8

skipif mysql # not compatible
query I rowsort label-9958
SELECT DISTINCT + 58 / col0 FROM tab2
----
0
8

query I rowsort
SELECT ( - col2 ) * + ( - col2 * - col0 ) FROM tab1 AS cor0
----
-207936
-737280
-8748

query I rowsort
SELECT ALL - 31 * + col0 FROM tab0
----
-1085
-2759
-744

query I rowsort
SELECT ALL 93 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 85ef191bf1b307f300b3fd49992fcae7

onlyif mysql # use DIV operator for integer division
query I rowsort label-9962
SELECT DISTINCT - - col0 + col2 + col1 DIV col1 FROM tab1 cor0
----
122
177
58

skipif mysql # not compatible
query I rowsort label-9962
SELECT DISTINCT - - col0 + col2 + col1 / col1 FROM tab1 cor0
----
122
177
58

query I rowsort
SELECT ALL col2 * 74 - - col2 AS col1 FROM tab1
----
4050
4275
7200

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 - 75 * 94 col2 FROM tab0
----
-6953
-6959
-6964

onlyif mysql # use DIV operator for integer division
query I rowsort label-9965
SELECT DISTINCT - col2 DIV ( col1 ) - - col2 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-9965
SELECT DISTINCT - col2 / ( col1 ) - - col2 FROM tab0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 - + col2 col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col0 - tab1.col1 FROM tab1
----
-23
54
67

query I rowsort
SELECT ( col2 ) * + cor0.col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT - 72 + + col0 * col1 FROM tab1 AS cor0
----
568
6
968

query I rowsort
SELECT ALL - tab0.col2 * col0 + col1 * - col2 + tab0.col2 FROM tab0
----
-131
-14678
-3597

query I rowsort
SELECT ALL col1 + 13 AS col0 FROM tab0 AS cor0
----
104
110
99

query I rowsort
SELECT - 93 * - col2 + cor0.col1 FROM tab1 AS cor0
----
5048
5311
8941

query I rowsort
SELECT DISTINCT 98 AS col0 FROM tab0 AS cor0
----
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 3 + - cor0.col0 col1 FROM tab1 AS cor0
----
-6
-67
-83

query I rowsort
SELECT ALL 14 * - col0 * col1 + 30 * 40 FROM tab1 AS cor0
----
-13360
-7760
108

query I rowsort
SELECT DISTINCT - col0 * - col2 + + col1 AS col0 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT DISTINCT 33 AS col2 FROM tab2 AS cor0
----
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 * - cor0.col1 col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 56 * col0 col2 FROM tab0 AS cor0
----
1344
1960
4984

query I rowsort
SELECT ALL ( col0 ) * col1 + cor0.col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT - - col1 * col1 + - col1 + 78 * ( col0 * - col0 ) FROM tab0 AS cor0
----
-37618
-609648
-86238

query I rowsort
SELECT - 22 + 27 * col1 FROM tab0 AS cor0
----
2300
2435
2597

query I rowsort
SELECT + col0 * + cor0.col0 + + col0 AS col2 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT - tab1.col1 - col2 FROM tab1
----
-109
-67
-80

query I rowsort
SELECT ALL - ( + col0 ) + - col2 FROM tab1 AS cor0
----
-121
-176
-57

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 51e2051aff75c58a5edaa314f1412983

query I rowsort
SELECT col2 + - 89 * + col2 AS col1 FROM tab0
----
-2904
-7216
-88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9988
SELECT tab1.col2 + - CAST( col2 AS SIGNED ) * col0 FROM tab1
----
-108
-3591
-7584

skipif mysql # not compatible
query I rowsort label-9988
SELECT tab1.col2 + - CAST ( col2 AS INTEGER ) * col0 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT DISTINCT 73 AS col0 FROM tab2, tab1 AS cor0
----
73

query I rowsort
SELECT ALL col0 + 78 FROM tab2
----
156
157
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-9991
SELECT DISTINCT 89 * + col2 + - tab1.col2 DIV - col1 FROM tab1
----
4808
5078
8551

skipif mysql # not compatible
query I rowsort label-9991
SELECT DISTINCT 89 * + col2 + - tab1.col2 / - col1 FROM tab1
----
4808
5078
8551

query I rowsort
SELECT DISTINCT 84 * + col1 + col1 FROM tab1
----
1105
2210
850

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab0, tab2, tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + col0 + - col0 * col0 + 42 FROM tab2
----
-5964
-6120
0

query I rowsort
SELECT col2 - cor0.col2 AS col1 FROM tab2 cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9996
SELECT DISTINCT - - CAST( + 58 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
58

skipif mysql # not compatible
query I rowsort label-9996
SELECT DISTINCT - - CAST ( + 58 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( - 87 ) col1 FROM tab2 AS cor0
----
-87
-87
-87

query I rowsort
SELECT cor0.col0 + - col0 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - - 83 + col1 AS col2 FROM tab0 AS cor0
----
169
174
180