hash-threshold 8

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

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL col2 * col2 * col1 FROM tab2 AS cor0
----
22599
24548
39884

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

query I rowsort
SELECT - 64 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 100c625e45715c20368551989514ba64

query I rowsort
SELECT DISTINCT + - 22 + col1 * col0 FROM tab1 AS cor0
----
1018
56
618

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 - cor0.col0 * - col2 col2 FROM tab2 cor0
----
182
1950
2923

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + - cor0.col2 * - col0 * 37 col1 FROM tab0 AS cor0
----
1392
270117
29390

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

query I rowsort
SELECT - + 29 * col1 * col2 - col1 * cor0.col1 FROM tab1 AS cor0
----
-16630
-36361
-41392

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-9
SELECT DISTINCT ( col2 ) DIV + col0 + ( - ( + col1 ) ) AS col0 FROM tab2 AS cor0
----
-17
-28
-59

skipif mysql # not compatible
query I rowsort label-9
SELECT DISTINCT ( col2 ) / + col0 + ( - ( + col1 ) ) AS col0 FROM tab2 AS cor0
----
-17
-28
-59

query I rowsort
SELECT ALL - col1 * 94 * col1 AS col0 FROM tab2 cor0
----
-27166
-327214
-90334

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

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

query I rowsort
SELECT + + 13 + - cor0.col0 + - col1 FROM tab2 AS cor0
----
-124
-25
-83

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-16
SELECT + 55 * + col2 + + cor0.col0 DIV - col1 + + 25 FROM tab2 cor0
----
1454
1510
2111

skipif mysql # not compatible
query I rowsort label-16
SELECT + 55 * + col2 + + cor0.col0 / - col1 + + 25 FROM tab2 cor0
----
1454
1510
2111

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-18
SELECT - col2 DIV col0 + col2 + + 61 FROM tab0 AS cor0
----
143
62
93

skipif mysql # not compatible
query I rowsort label-18
SELECT - col2 / col0 + col2 + + 61 FROM tab0 AS cor0
----
143
62
93

query I rowsort
SELECT + 85 AS col2 FROM tab1, tab0 cor0
----
9 values hashing to aafa8e5cfb9e02cea8717833e7581f7b

onlyif mysql # use DIV operator for integer division
query I rowsort label-20
SELECT ALL 21 DIV + cor1.col0 AS col0 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 0a35ad941cb1878fb87082ac21ea8241

skipif mysql # not compatible
query I rowsort label-20
SELECT ALL 21 / + cor1.col0 AS col0 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 0a35ad941cb1878fb87082ac21ea8241

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + ( 23 ) + + tab2.col2 * - col0 col1 FROM tab2
----
-2611
-671
524

query I rowsort
SELECT DISTINCT - col2 + + 47 * + col0 FROM tab0
----
1095
1644
4101

onlyif mysql # use DIV operator for integer division
query I rowsort label-25
SELECT col2 * + col2 + + col0 + col1 DIV 96 col0 FROM tab1
----
2919
3313
9296

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-25
SELECT col2 * + col2 + + col0 + col1 / 96 col0 FROM tab1
----
2919
3313
9296

onlyif mysql # use DIV operator for integer division
query I rowsort label-26
SELECT ALL col2 DIV + 53 + 12 FROM tab0 AS cor0
----
12
12
13

skipif mysql # not compatible
query I rowsort label-26
SELECT ALL col2 / + 53 + 12 FROM tab0 AS cor0
----
12
12
13

query I rowsort
SELECT ALL + 23 AS col2 FROM tab1, tab1 cor0
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

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

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

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

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

skipif mysql # not compatible
query I rowsort label-31
SELECT ALL - CAST ( NULL AS INTEGER ) + - 16 * - tab0.col1 + + CAST ( NULL AS INTEGER ) FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-33
SELECT DISTINCT col0 / col1 col1 FROM tab1 AS cor0
----
0
6

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 14 - tab0.col0 col0 FROM tab0
----
-103
-38
-49

query I rowsort
SELECT DISTINCT + col1 - - 0 AS col0 FROM tab2
----
17
31
59

query I rowsort
SELECT + 59 + - col1 AS col0 FROM tab2 AS cor0
----
0
28
42

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

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

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

query I rowsort
SELECT - + col0 * cor0.col0 AS col2 FROM tab0 AS cor0
----
-1225
-576
-7921

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

query I rowsort
SELECT col1 * 50 AS col2 FROM tab0 AS cor0
----
4300
4550
4850

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

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

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

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

query I rowsort
SELECT DISTINCT col2 - - ( - 55 ) AS col2 FROM tab1 AS cor0
----
-1
2
41

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

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

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

query I rowsort
SELECT DISTINCT - - 46 * col1 + - ( + 87 ) * + col2 * - 22 + col0 AS col1 FROM tab1 AS cor0
----
104555
109622
184422

onlyif mysql # use DIV operator for integer division
query I rowsort label-54
SELECT + cor0.col0 + - col0 * col0 DIV 6 AS col2 FROM tab2 cor0
----
-1
-936
-961

skipif mysql # not compatible
query I rowsort label-54
SELECT + cor0.col0 + - col0 * col0 / 6 AS col2 FROM tab2 cor0
----
-1
-936
-961

onlyif mysql # use DIV operator for integer division
query I rowsort label-55
SELECT ALL col2 DIV col0 + - col2 FROM tab1 AS cor0
----
-36
-57
-95

skipif mysql # not compatible
query I rowsort label-55
SELECT ALL col2 / col0 + - col2 FROM tab1 AS cor0
----
-36
-57
-95

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-57
SELECT col0 DIV 83 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-57
SELECT col0 / 83 FROM tab0 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * 26 col1 FROM tab2 AS cor0
----
-1534
-442
-806

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-59
SELECT ALL - col1 * col1 / ( col0 ) col0 FROM tab0
----
-268
-308
-93

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-61
SELECT - col2 DIV col1 + ( + ( col1 ) ) FROM tab2
----
15
31
59

skipif mysql # not compatible
query I rowsort label-61
SELECT - col2 / col1 + ( + ( col1 ) ) FROM tab2
----
15
31
59

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-63
SELECT col0 + + col0 DIV 17 AS col1 FROM tab2
----
7
82
83

skipif mysql # not compatible
query I rowsort label-63
SELECT col0 + + col0 / 17 AS col1 FROM tab2
----
7
82
83

query I rowsort
SELECT ALL 20 AS col1 FROM tab0 AS cor0
----
20
20
20

query I rowsort
SELECT - tab0.col2 * - 25 FROM tab0
----
2050
25
825

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

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

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

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

skipif mysql # not compatible
query I rowsort label-68
SELECT CAST ( - cor0.col2 AS INTEGER ) + + col2 AS col1 FROM tab1 cor0
----
0
0
0

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

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

query I rowsort
SELECT DISTINCT col0 * - col0 - col0 FROM tab2 cor0
----
-56
-6162
-6320

query I rowsort
SELECT DISTINCT col1 + col1 * + tab0.col1 AS col1 FROM tab0
----
7482
8372
9506

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

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

query I rowsort
SELECT + col0 * + col1 - - 76 * + col0 AS col0 FROM tab2
----
10530
7347
749

onlyif mysql # use DIV operator for integer division
query I rowsort label-75
SELECT col0 DIV + col0 + - col0 * col2 DIV - col1 + + tab1.col2 AS col2 FROM tab1
----
422
61
687

skipif mysql # not compatible
query I rowsort label-75
SELECT col0 / + col0 + - col0 * col2 / - col1 + + tab1.col2 AS col2 FROM tab1
----
422
61
687

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

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

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

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

query I rowsort
SELECT ALL + ( 46 ) AS col1 FROM tab0 cor0
----
46
46
46

query I rowsort
SELECT ALL - col0 * - 0 + cor0.col1 AS col2 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT + col2 * + cor0.col2 + - cor0.col2 FROM tab1 AS cor0
----
2862
3192
9120

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

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

query I rowsort
SELECT ALL - 76 FROM tab1, tab2 AS cor0
----
9 values hashing to f8b6589bc7503fc720ca5430e3569317

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

query I rowsort
SELECT ALL - 91 * - tab1.col0 * tab1.col0 + - col1 + col2 AS col2 FROM tab1
----
372783
582483
847

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

skipif mysql # not compatible
query I rowsort label-86
SELECT ALL 56 / col1 + + tab0.col0 FROM tab0
----
24
35
89

query I rowsort
SELECT - 89 + col2 * tab2.col1 AS col2 FROM tab2
----
1445
557
748

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

query I rowsort
SELECT ( + 10 ) FROM tab1 cor0
----
10
10
10

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

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

query I rowsort
SELECT + 78 * col0 AS col0 FROM tab0 AS cor0
----
1872
2730
6942

query I rowsort
SELECT + 10 + col2 * + col2 AS col0 FROM tab1 AS cor0
----
2926
3259
9226

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-95
SELECT DISTINCT 47 DIV col0 AS col1 FROM tab1 AS cor0
----
0
15

skipif mysql # not compatible
query I rowsort label-95
SELECT DISTINCT 47 / col0 AS col1 FROM tab1 AS cor0
----
0
15

query I rowsort
SELECT ALL + + ( col1 ) + - col2 * + 33 + col0 AS col2 FROM tab1 AS cor0
----
-1753
-1807
-3075

query I rowsort
SELECT DISTINCT + col0 + - col1 * + 95 FROM tab1 cor0
----
-1155
-2467
-886

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-102
SELECT DISTINCT col1 DIV + col0 + - col0 * - 67 * - col1 AS col0 FROM tab1 AS cor0
----
-42880
-5218
-69680

skipif mysql # not compatible
query I rowsort label-102
SELECT DISTINCT col1 / + col0 + - col0 * - 67 * - col1 AS col0 FROM tab1 AS cor0
----
-42880
-5218
-69680

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-104
SELECT DISTINCT - col2 DIV col0 + - 9 + ( col2 ) AS col1 FROM tab0 AS cor0
----
-8
23
73

skipif mysql # not compatible
query I rowsort label-104
SELECT DISTINCT - col2 / col0 + - 9 + ( col2 ) AS col1 FROM tab0 AS cor0
----
-8
23
73

query I rowsort
SELECT ALL + col1 + ( col0 + col2 ) * - 21 * + cor0.col0 AS col0 FROM tab2 AS cor0
----
-170293
-194086
-4967

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

skipif mysql # not compatible
query I rowsort label-106
SELECT + - col2 * - CAST ( - cor0.col1 AS INTEGER ) + + col0 AS col2 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT ALL cor1.col2 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT + cor0.col0 * - cor0.col0 + col0 * col1 FROM tab2 AS cor0
----
-1482
-4898
168

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

skipif mysql # not compatible
query I rowsort label-109
SELECT - col2 / 93 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - col2 * cor0.col0 * + cor0.col2 + col1 - - col0 FROM tab2 cor0
----
-113980
-5065
-52591

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

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

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

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

skipif mysql # not compatible
query I rowsort label-113
SELECT ALL col1 / 65 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT cor0.col1 * - 36 - cor0.col0 * col2 FROM tab0 AS cor0
----
-10574
-3527
-3888

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

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

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

query I rowsort
SELECT + - col1 * 94 AS col2 FROM tab0 AS cor0
----
-8084
-8554
-9118

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 - cor0.col1 * - 67 + + col0 + + col1 col2 FROM tab1 AS cor0
----
1771
744
964

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

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

query I rowsort
SELECT ALL - + 77 * ( - col0 ) AS col0 FROM tab1 AS cor0
----
231
4928
6160

query I rowsort
SELECT ( + col0 ) + + col1 * + 25 * col1 FROM tab1 AS cor0
----
16903
2564
4305

query I rowsort
SELECT ALL + 87 * + col0 FROM tab0 AS cor0
----
2088
3045
7743

query I rowsort
SELECT 26 FROM tab2, tab2 AS cor0, tab0 cor1
----
27 values hashing to ede8226bb7e602e221f9d98345b4da37

query I rowsort
SELECT + 28 + cor0.col2 * - ( - col0 ) AS col1 FROM tab1 AS cor0
----
190
3676
7708

query I rowsort
SELECT col1 - 47 FROM tab2 AS cor0
----
-16
-30
12

query I rowsort
SELECT ALL cor0.col1 - ( ( + col1 ) * - ( 15 ) ) AS col0 FROM tab2 AS cor0
----
272
496
944

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

query I rowsort
SELECT - col2 - + 80 AS col0 FROM tab1 cor0
----
-134
-137
-176

query I rowsort
SELECT DISTINCT + + cor0.col1 * col2 * col2 FROM tab2 AS cor0
----
22599
24548
39884

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

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

query I rowsort
SELECT + + col1 + + col0 + + col0 * ( - col1 ) FROM tab0 AS cor0
----
-1954
-3263
-7919

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

query I rowsort
SELECT col1 * col1 + cor0.col0 AS col1 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT - - ( cor0.col2 ) * col0 + + col1 * - cor0.col1 * + col2 AS col0 FROM tab2 AS cor0
----
-25758
-7980
-88478

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

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

query I rowsort
SELECT - cor0.col0 + 64 * + col2 AS col2 FROM tab0 AS cor0
----
2088
29
5159

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

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

query I rowsort
SELECT - cor0.col1 FROM tab2, tab0 AS cor0 CROSS JOIN tab1, tab1 AS cor1
----
81 values hashing to 786a240f80bef6f9c6a190e92cd4f9e8

query I rowsort
SELECT + cor1.col1 + + ( + 10 ) FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to a8b4b708baa7ef8a92ad6433dc9c3e8e

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

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

query I rowsort
SELECT + 28 + col1 * - ( - 87 * + col0 ) FROM tab0 AS cor0
----
179596
295393
704641

query I rowsort
SELECT DISTINCT - col0 * col2 + col2 * - col1 AS col2 FROM tab2 AS cor0
----
-1026
-3562
-3648

query I rowsort
SELECT tab2.col1 * ( col0 * + tab2.col2 ) AS col1 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT DISTINCT + 47 + col1 FROM tab0 AS cor0
----
133
138
144

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

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

query I rowsort
SELECT DISTINCT - 39 AS col2 FROM tab1
----
-39

query I rowsort
SELECT - + cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query I rowsort
SELECT ALL col0 + cor0.col1 * col2 FROM tab2 cor0
----
1612
725
844

query I rowsort
SELECT DISTINCT - 84 + + 62 AS col1 FROM tab2, tab0 AS cor0
----
-22

query I rowsort
SELECT + - ( - ( col2 ) ) * + 43 + col2 AS col2 FROM tab2 AS cor0
----
1144
1188
1672

query I rowsort
SELECT ALL + 6 + - ( col0 ) FROM tab2 cor0
----
-1
-72
-73

query I rowsort
SELECT DISTINCT + 4 AS col1 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
4

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

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

query I rowsort
SELECT + 81 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab1 cor2
----
81 values hashing to 50d500b1082f81e0b02096b2afac91cd

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

query I rowsort
SELECT col0 * + 31 FROM tab2
----
217
2418
2449

query I rowsort
SELECT 84 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to e8cd683fe8cea77b4326d9b80f21c74a

query I rowsort
SELECT + col2 * col2 + col0 - tab0.col2 * + 90 FROM tab0
----
-1857
-54
-567

query I rowsort
SELECT ( 0 ) * col0 FROM tab1
----
0
0
0

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

query I rowsort
SELECT ( tab0.col2 ) * - tab0.col1 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT 2 * 40 + col1 * col2 * - 67 AS col1 FROM tab2
----
-102698
-43202
-55999

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

skipif mysql # not compatible
query I rowsort label-169
SELECT - ( col2 ) / - cor0.col0 FROM tab1 cor0
----
0
1
18

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

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

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

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

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

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

query I rowsort
SELECT ALL col1 + 49 FROM tab1 AS cor0
----
59
62
75

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

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

query I rowsort
SELECT ALL - + col1 - + 25 * - col1 AS col2 FROM tab2 AS cor0
----
1416
408
744

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + 63 col0 FROM tab1 cor0
----
37
50
53

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

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

query I rowsort
SELECT - + 43 + col2 * col1 FROM tab2 AS cor0
----
1491
603
794

onlyif mysql # use DIV operator for integer division
query I rowsort label-182
SELECT DISTINCT + + col1 + - col1 DIV + col0 FROM tab1 AS cor0
----
10
13
18

skipif mysql # not compatible
query I rowsort label-182
SELECT DISTINCT + + col1 + - col1 / + col0 FROM tab1 AS cor0
----
10
13
18

query I rowsort
SELECT 87 - cor0.col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 34a34dc18be27fa2d12c95944bae4704

query I rowsort
SELECT ALL + + 14 * + col2 + col2 FROM tab0 AS cor0
----
1230
15
495

query I rowsort
SELECT ALL - + 52 + col0 FROM tab2 cor0
----
-45
26
27

query I rowsort
SELECT DISTINCT - col0 * + col0 + col1 * col1 - - col1 * + col1 FROM tab2 AS cor0
----
-5663
1873
878

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

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

query I rowsort
SELECT ALL - - 82 * 54 AS col2 FROM tab1 cor0
----
4428
4428
4428

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-192
SELECT - - 92 + cor0.col0 DIV - ( col1 ) FROM tab2 cor0
----
88
91
92

skipif mysql # not compatible
query I rowsort label-192
SELECT - - 92 + cor0.col0 / - ( col1 ) FROM tab2 cor0
----
88
91
92

query I rowsort
SELECT ALL + col2 + - col1 * col2 * tab0.col1 + + col2 AS col0 FROM tab0
----
-244002
-678878
-9407

query I rowsort
SELECT + 43 * - col1 * 21 AS col1 FROM tab0 AS cor0
----
-77658
-82173
-87591

query I rowsort
SELECT + cor0.col2 * + col1 * col1 FROM tab0 AS cor0
----
244068
679042
9409

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

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

query I rowsort
SELECT DISTINCT - + cor0.col2 * + 37 AS col1 FROM tab1 AS cor0
----
-1998
-2109
-3552

query I rowsort
SELECT - - col0 + col1 * 26 FROM tab0 AS cor0
----
2260
2455
2557

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

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

query I rowsort
SELECT 75 + col0 * col1 + - tab0.col0 * col0 * - 23 FROM tab0
----
15387
190357
31645

query I rowsort
SELECT DISTINCT + ( col1 ) + + 4 AS col1 FROM tab0
----
101
90
95

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

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

skipif mysql # not compatible
query I rowsort label-205
SELECT + cor0.col2 + CAST ( col1 + - col0 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
29
3
77

query I rowsort
SELECT + col1 * 27 * col1 FROM tab2 AS cor0
----
25947
7803
93987

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

query I rowsort
SELECT col2 * col0 * 82 + - col0 + ( + 49 ) FROM tab2
----
15540
166267
246134

query I rowsort
SELECT + 17 + - 95 AS col2 FROM tab1 AS cor0
----
-78
-78
-78

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

query I rowsort
SELECT ALL col1 * ( - col0 * col0 ) FROM tab1
----
-234
-40960
-83200

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

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

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

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

query I rowsort
SELECT 27 + cor0.col1 FROM tab2 AS cor0
----
44
58
86

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

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( - 21 AS REAL ) AS col2 FROM tab1
----
-21

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

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

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

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

query I rowsort
SELECT ALL ( + col0 ) + - col1 * col1 AS col1 FROM tab2 cor0
----
-210
-3403
-954

query I rowsort
SELECT 47 + + col0 AS col2 FROM tab1 AS cor0
----
111
127
50

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

query I rowsort
SELECT ALL + + 25 + + col2 * 24 FROM tab0 AS cor0
----
1993
49
817

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

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

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

query I rowsort
SELECT 22 + + cor0.col2 * 58 FROM tab0 AS cor0
----
1936
4778
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-229
SELECT ALL + 57 * - col0 DIV + col0 AS col1 FROM tab2 AS cor0
----
-57
-57
-57

skipif mysql # not compatible
query I rowsort label-229
SELECT ALL + 57 * - col0 / + col0 AS col1 FROM tab2 AS cor0
----
-57
-57
-57

query I rowsort
SELECT ( col1 ) * 36 AS col1 FROM tab1 AS cor0
----
360
468
936

onlyif mysql # use DIV operator for integer division
query I rowsort label-231
SELECT DISTINCT - - col2 + cor0.col0 DIV + col2 AS col0 FROM tab0 AS cor0
----
33
36
83

skipif mysql # not compatible
query I rowsort label-231
SELECT DISTINCT - - col2 + cor0.col0 / + col2 AS col0 FROM tab0 AS cor0
----
33
36
83

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

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

query I rowsort
SELECT DISTINCT 72 * - col0 FROM tab0
----
-1728
-2520
-6408

query I rowsort
SELECT ALL 12 + - col0 * - col0 FROM tab1 AS cor0
----
21
4108
6412

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

query I rowsort
SELECT DISTINCT + - col0 + + col2 + - col1 * col2 * - col2 FROM tab1 AS cor0
----
119824
32483
75867

query I rowsort
SELECT - 27 + col0 FROM tab1 cor0
----
-24
37
53

query I rowsort
SELECT + col2 + col2 + + col1 AS col1 FROM tab2 AS cor0
----
111
85
93

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

query I rowsort
SELECT tab0.col2 + col0 + col1 AS col1 FROM tab0
----
133
143
262

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

query I rowsort
SELECT DISTINCT col1 * - col2 * + tab2.col2 FROM tab2
----
-22599
-24548
-39884

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT ( NULL ) >= ( + col0 )
----

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-247
SELECT + col2 DIV tab1.col2 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-247
SELECT + col2 / tab1.col2 FROM tab1
----
1
1
1

query I rowsort
SELECT - col1 + + col1 * - col0 + - col2 AS col1 FROM tab2
----
-1398
-275
-4687

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 ALL col2 * - col0 * col2 AS col0 FROM tab2
----
-114076
-5103
-52728

query I rowsort
SELECT DISTINCT + col0 + col0 - + col2 FROM tab1
----
-48
64
71

query I rowsort
SELECT col0 + - col1 + - col0 FROM tab2
----
-17
-31
-59

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

query I rowsort
SELECT DISTINCT tab2.col2 * - col1 * tab2.col2 AS col2 FROM tab2
----
-22599
-24548
-39884

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

query I rowsort
SELECT DISTINCT + col1 + - col2 * col2 * + tab1.col1 FROM tab1 WHERE ( NULL ) NOT BETWEEN ( - col1 ) AND ( - col0 )
----

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-259
SELECT col0 + col0 + 35 * col2 DIV - col1 AS col1 FROM tab2 AS cor0
----
-16
141
80

skipif mysql # not compatible
query I rowsort label-259
SELECT col0 + col0 + 35 * col2 / - col1 AS col1 FROM tab2 AS cor0
----
-16
141
80

query I rowsort
SELECT + col1 + - col2 * + col1 + + cor0.col2 FROM tab2 AS cor0
----
-1449
-591
-779

query I rowsort
SELECT DISTINCT + - ( col1 ) * + ( + 16 + - col1 ) FROM tab0 AS cor0
----
6020
6825
7857

query I rowsort
SELECT - 9 + - cor0.col2 AS col2 FROM tab0 AS cor0
----
-10
-42
-91

query I rowsort
SELECT col1 + + col1 + + col0 * - col1 AS col0 FROM tab2 AS cor0
----
-1309
-155
-4484

query I rowsort
SELECT ALL + ( col1 ) * - ( col1 ) AS col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT - col1 * - col0 + - col2 * tab2.col1 FROM tab2
----
-620
3068
697

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

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE NOT - col1 * + col1 <> cor0.col1
----

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

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

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

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

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

query I rowsort
SELECT - col1 * col1 * - col0 + col2 AS col0 FROM tab1
----
13616
2082
6457

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

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

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

skipif mysql # not compatible
query I rowsort label-275
SELECT DISTINCT + col1 * - tab2.col0 / col0 AS col2 FROM tab2
----
-17
-31
-59

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

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

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

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

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

query I rowsort
SELECT ALL 5 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 6035628694bdea36f584f3649088551d

query I rowsort
SELECT - cor0.col0 * col2 + 80 * 45 FROM tab2 AS cor0
----
1572
3411
598

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

skipif mysql # not compatible
query I rowsort label-282
SELECT ALL CAST ( NULL AS INTEGER ) - + 43 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT 68 AS col1 FROM tab1, tab2 AS cor0 CROSS JOIN tab2
----
27 values hashing to 10aa25f1c6b97582c34521ac6452e0b4

query I rowsort
SELECT DISTINCT + 85 + + col0 AS col1 FROM tab2
----
163
164
92

query I rowsort
SELECT - + col2 * col2 - + col0 * + col1 * - ( + col0 ) FROM tab1 cor0
----
-2682
37711
73984

onlyif mysql # use DIV operator for integer division
query I rowsort label-286
SELECT + ( - 12 ) DIV - col2 col2 FROM tab0
----
0
0
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-286
SELECT + ( - 12 ) / - col2 col2 FROM tab0
----
0
0
12

query I rowsort
SELECT DISTINCT - - 89 + + col1 * - col1 FROM tab1 AS cor0
----
-11
-587
-80

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

skipif mysql # not compatible
query I rowsort label-288
SELECT ALL ( + col0 ) / + cor0.col0 + col2 AS col1 FROM tab2 AS cor0
----
27
28
39

query I rowsort
SELECT DISTINCT 98 * col1 + - col0 AS col1 FROM tab1 AS cor0
----
1194
2545
916

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

query I rowsort
SELECT ALL 46 * - col2 FROM tab1 AS cor0
----
-2484
-2622
-4416

query I rowsort
SELECT ALL - col0 * col2 + 87 AS col1 FROM tab2 AS cor0
----
-102
-1941
-2915

query I rowsort
SELECT DISTINCT + col2 + - col1 * + 35 FROM tab0 AS cor0
----
-2977
-3103
-3394

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

query I rowsort
SELECT + + 32 AS col2 FROM tab2 AS cor0
----
32
32
32

query I rowsort
SELECT ALL - col2 * + 18 FROM tab2
----
-468
-486
-684

query I rowsort
SELECT + col0 + 68 AS col2 FROM tab1
----
132
148
71

query I rowsort
SELECT col1 + - 63 FROM tab1
----
-37
-50
-53

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

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

query I rowsort
SELECT + col1 + ( + col1 ) FROM tab1 cor0
----
20
26
52

query I rowsort
SELECT DISTINCT - col1 + ( 7 ) * - cor0.col0 AS col2 FROM tab1 AS cor0
----
-458
-47
-573

onlyif mysql # use DIV operator for integer division
query I rowsort label-303
SELECT + col1 DIV 55 AS col0 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-303
SELECT + col1 / 55 AS col0 FROM tab0 AS cor0
----
1
1
1

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

query I rowsort
SELECT ( col0 ) + + cor0.col1 * 96 FROM tab2 AS cor0
----
1711
2983
5742

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

query I rowsort
SELECT - + 58 + col0 - col2 FROM tab1 AS cor0
----
-109
-51
-74

query I rowsort
SELECT DISTINCT + col1 - - 26 FROM tab1 AS cor0
----
36
39
52

query I rowsort
SELECT ALL - + 98 * - 8 AS col1 FROM tab1 AS cor0
----
784
784
784

query I rowsort
SELECT col1 * col2 + col0 AS col0 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT - col0 * + 39 + col2 FROM tab1 AS cor0
----
-2439
-3024
-63

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-317
SELECT DISTINCT col0 DIV col1 + col1 + ( cor0.col2 * col1 + - col1 ) FROM tab2 AS cor0
----
1535
650
837

skipif mysql # not compatible
query I rowsort label-317
SELECT DISTINCT col0 / col1 + col1 + ( cor0.col2 * col1 + - col1 ) FROM tab2 AS cor0
----
1535
650
837

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-319
SELECT - - 94 + - col0 DIV + col2 AS col2 FROM tab0 AS cor0
----
59
93
94

skipif mysql # not compatible
query I rowsort label-319
SELECT - - 94 + - col0 / + col2 AS col2 FROM tab0 AS cor0
----
59
93
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 43 + 9 col1 FROM tab1 AS cor0
----
52

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( col2 AS REAL ) + - col1 AS col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT + col0 * - 15 FROM tab0 cor0
----
-1335
-360
-525

query I rowsort
SELECT DISTINCT - 56 + 78 FROM tab0 AS cor0
----
22

query I rowsort
SELECT ALL - ( + ( col2 ) ) + col0 * + col2 + + col1 FROM tab0 AS cor0
----
131
7307
845

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

query I rowsort
SELECT ALL col0 * tab2.col2 * - col2 FROM tab2
----
-114076
-5103
-52728

query I rowsort
SELECT ALL + ( + 20 + col0 ) * col2 FROM tab0
----
1452
55
8938

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-330
SELECT + ( col0 ) + col0 * col0 DIV + col0 AS col2 FROM tab0 AS cor0
----
178
48
70

skipif mysql # not compatible
query I rowsort label-330
SELECT + ( col0 ) + col0 * col0 / + col0 AS col2 FROM tab0 AS cor0
----
178
48
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-331
SELECT + col2 * col1 + - col0 DIV col1 AS col2 FROM tab0 AS cor0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-331
SELECT + col2 * col1 + - col0 / col1 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - 58 - col0 AS col1 FROM tab1 AS cor0
----
-122
-138
-61

onlyif mysql # use DIV operator for integer division
query I rowsort label-333
SELECT ( + 34 ) + + col1 DIV + col1 FROM tab1
----
35
35
35

skipif mysql # not compatible
query I rowsort label-333
SELECT ( + 34 ) + + col1 / + col1 FROM tab1
----
35
35
35

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

skipif mysql # not compatible
query I rowsort label-334
SELECT + col0 / + col0 AS col2 FROM tab0
----
1
1
1

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-336
SELECT ( ( - col0 ) ) * col0 DIV col0 FROM tab2
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-336
SELECT ( ( - col0 ) ) * col0 / col0 FROM tab2
----
-7
-78
-79

query I rowsort
SELECT + ( - col2 * - tab0.col1 ) + col1 AS col1 FROM tab0
----
194
2924
7553

query I rowsort
SELECT DISTINCT 79 AS col2 FROM tab1, tab0 AS cor0
----
79

query I rowsort
SELECT DISTINCT - ( col0 ) + + col0 FROM tab1
----
0

query I rowsort
SELECT + tab0.col1 + ( col2 ) + col2 FROM tab0
----
152
255
99

query I rowsort
SELECT DISTINCT - - col1 + - 59 + + col2 FROM tab0 AS cor0
----
114
39
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * col1 - col0 * col2 col2 FROM tab0 AS cor0
----
6604
9374
983

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

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

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

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

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

query I rowsort
SELECT ALL - + col1 * - 18 AS col1 FROM tab2 cor0
----
1062
306
558

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

query I rowsort
SELECT DISTINCT col0 * col2 + 95 AS col1 FROM tab1
----
257
3743
7775

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

query I rowsort
SELECT 3 - col2 FROM tab0
----
-30
-79
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-353
SELECT - col1 + col2 * col2 DIV col0 FROM tab2
----
-51
1
73

skipif mysql # not compatible
query I rowsort label-353
SELECT - col1 + col2 * col2 / col0 FROM tab2
----
-51
1
73

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-357
SELECT col2 * cor0.col0 + ( cor0.col1 ) DIV - 9 + col1 FROM tab1 AS cor0
----
186
3657
7692

skipif mysql # not compatible
query I rowsort label-357
SELECT col2 * cor0.col0 + ( cor0.col1 ) / - 9 + col1 FROM tab1 AS cor0
----
186
3657
7692

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

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

query I rowsort
SELECT - - 80 FROM tab1, tab2 AS cor0
----
9 values hashing to 878f012d707aab113cedaf56e6c52e94

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

skipif mysql # not compatible
query I rowsort label-360
SELECT - col2 * + CAST ( - col0 AS INTEGER ) + col1 + 86 FROM tab0 AS cor0
----
218
7475
964

query I rowsort
SELECT DISTINCT + 27 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
27

query I rowsort
SELECT - - col1 * - col1 + + col2 + col1 * cor0.col0 FROM tab2 AS cor0
----
-717
1092
1147

query I rowsort
SELECT 62 * + col2 AS col1 FROM tab1 AS cor0
----
3348
3534
5952

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

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

query I rowsort
SELECT - 30 + - col0 AS col0 FROM tab2 cor0
----
-108
-109
-37

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

query I rowsort
SELECT col0 * + 48 FROM tab0
----
1152
1680
4272

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col0 - 38 * + ( - cor0.col1 ) * 86 col1 FROM tab0 AS cor0
----
283112
305487
320391

query I rowsort
SELECT + 66 + col1 * - ( - col0 ) FROM tab2 AS cor0
----
1409
283
4668

onlyif mysql # use DIV operator for integer division
query I rowsort label-372
SELECT - ( - col0 ) DIV col0 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-372
SELECT - ( - col0 ) / col0 FROM tab2
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-373
SELECT ( cor0.col1 ) DIV - ( + cor0.col0 ) - + cor0.col2 FROM tab1 AS cor0
----
-57
-62
-96

skipif mysql # not compatible
query I rowsort label-373
SELECT ( cor0.col1 ) / - ( + cor0.col0 ) - + cor0.col2 FROM tab1 AS cor0
----
-57
-62
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-374
SELECT + col0 * tab0.col1 DIV col2 + 67 FROM tab0
----
129
165
3462

skipif mysql # not compatible
query I rowsort label-374
SELECT + col0 * tab0.col1 / col2 + 67 FROM tab0
----
129
165
3462

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

query I rowsort
SELECT ALL + 5 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 6035628694bdea36f584f3649088551d

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col2 * - col2 col2 FROM tab1
----
-119808
-32490
-75816

query I rowsort
SELECT - + col1 + col1 + - 83 * - col0 AS col1 FROM tab0 AS cor0
----
1992
2905
7387

query I rowsort
SELECT - col2 * col2 + + 89 AS col2 FROM tab1 AS cor0
----
-2827
-3160
-9127

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-381
SELECT - - col1 + + CAST( 0 + - col0 * - 80 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
266
5130
6413

skipif mysql # not compatible
query I rowsort label-381
SELECT - - col1 + + CAST ( 0 + - col0 * - 80 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
266
5130
6413

query I rowsort
SELECT + col0 * + col0 + 15 FROM tab0 AS cor0
----
1240
591
7936

query I rowsort
SELECT ALL - + col1 * 63 + - col1 FROM tab1 cor0
----
-1664
-640
-832

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

query I rowsort
SELECT col1 - - col1 * + 40 FROM tab2
----
1271
2419
697

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-388
SELECT + col2 DIV + col1 - - 95 AS col0 FROM tab1
----
100
102
97

skipif mysql # not compatible
query I rowsort label-388
SELECT + col2 / + col1 - - 95 AS col0 FROM tab1
----
100
102
97

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-390
SELECT col2 + 14 - col1 DIV + col0 FROM tab0 AS cor0
----
13
44
95

skipif mysql # not compatible
query I rowsort label-390
SELECT col2 + 14 - col1 / + col0 FROM tab0 AS cor0
----
13
44
95

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

query I rowsort
SELECT DISTINCT + cor0.col1 * + 56 + cor0.col0 * - col1 + col0 * cor0.col2 FROM tab0 AS cor0
----
2072
3544
4295

query I rowsort
SELECT DISTINCT + col1 + + 50 AS col2 FROM tab0 cor0
----
136
141
147

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

query I rowsort
SELECT + col0 * - 25 + col2 FROM tab0 AS cor0
----
-2143
-567
-874

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

query I rowsort
SELECT DISTINCT - col0 + - cor0.col2 * + col1 FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT - col1 - + 39 AS col1 FROM tab0 AS cor0
----
-125
-130
-136

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

query I rowsort
SELECT DISTINCT + + col0 * + col1 + - 85 FROM tab0 AS cor0
----
1979
3310
8014

query I rowsort
SELECT DISTINCT - - col0 * + col0 + - 91 * col1 FROM tab1 AS cor0
----
-2357
3186
5217

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-403
SELECT - ( - 10 ) / col0 col2 FROM tab2 AS cor0
----
0
0
1

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

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

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

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

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

query I rowsort
SELECT + col2 + col2 - col0 * - cor0.col2 * col2 FROM tab1 AS cor0
----
208050
737472
8856

query I rowsort
SELECT DISTINCT + 13 + - col1 FROM tab0 AS cor0
----
-73
-78
-84

query I rowsort
SELECT DISTINCT - col1 * + col0 + col0 * + col2 FROM tab0 AS cor0
----
-1272
-3360
-801

query I rowsort
SELECT - 58 * + col1 AS col0 FROM tab2 cor0
----
-1798
-3422
-986

onlyif mysql # use DIV operator for integer division
query I rowsort label-412
SELECT - col2 + 30 DIV - col0 col0 FROM tab0 cor0
----
-1
-34
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-412
SELECT - col2 + 30 / - col0 col0 FROM tab0 cor0
----
-1
-34
-82

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 - + 6 * col0 col2 FROM tab2 AS cor0
----
-11
-409
-457

query I rowsort
SELECT DISTINCT col0 * + 43 FROM tab1 cor0
----
129
2752
3440

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 + - 42 col2 FROM tab1 AS cor0
----
-39
22
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-421
SELECT DISTINCT 53 DIV 75 AS col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-421
SELECT DISTINCT 53 / 75 AS col2 FROM tab1 AS cor0
----
0

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-423
SELECT ALL + CAST( col2 AS SIGNED ) + - col2 * col2 + col0 FROM tab1
----
-2859
-3128
-9040

skipif mysql # not compatible
query I rowsort label-423
SELECT ALL + CAST ( col2 AS INTEGER ) + - col2 * col2 + col0 FROM tab1
----
-2859
-3128
-9040

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

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

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

query I rowsort
SELECT + ( + cor0.col1 ) * col1 - col1 * 39 AS col2 FROM tab2 AS cor0
----
-248
-374
1180

query I rowsort
SELECT ALL 62 + + col2 FROM tab1 AS cor0
----
116
119
158

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-430
SELECT DISTINCT col1 + 17 DIV + col2 + col0 * col0 FROM tab0 AS cor0
----
1339
662
8012

skipif mysql # not compatible
query I rowsort label-430
SELECT DISTINCT col1 + 17 / + col2 + col0 * col0 FROM tab0 AS cor0
----
1339
662
8012

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

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

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

query I rowsort
SELECT ALL col2 + + 8 FROM tab1 AS cor0
----
104
62
65

query I rowsort
SELECT + col2 + + ( 27 ) * col2 AS col2 FROM tab0
----
2296
28
924

query I rowsort
SELECT + tab1.col0 * + col2 * + col2 + + col1 * ( 88 * - col1 ) FROM tab1
----
-50740
199136
722408

query I rowsort
SELECT cor0.col0 * - ( + col0 ) AS col1 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT ALL + + col2 * - ( - col1 ) + cor0.col1 AS col0 FROM tab1 cor0
----
1261
1430
580

query I rowsort
SELECT DISTINCT + 35 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
35

query I rowsort
SELECT ALL cor0.col0 * + cor0.col1 + + 89 AS col0 FROM tab0 AS cor0
----
2153
3484
8188

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * + col2 + + cor0.col2 col0 FROM tab1 AS cor0
----
2970
3306
9312

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

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

query I rowsort
SELECT ALL - col2 * - 29 * - col2 AS col2 FROM tab1 cor0
----
-267264
-84564
-94221

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

query I rowsort
SELECT DISTINCT + - cor0.col2 + col1 + ( + col0 * 72 ) AS col2 FROM tab2 AS cor0
----
508
5649
5667

query I rowsort
SELECT ALL col1 + - col0 - 5 * - col0 AS col0 FROM tab2 cor0
----
333
371
59

query I rowsort
SELECT DISTINCT - col1 + ( 14 ) FROM tab0 AS cor0
----
-72
-77
-83

query I rowsort
SELECT ALL - col1 + - ( 98 * col0 + - col2 ) AS col1 FROM tab1 AS cor0
----
-266
-6225
-7757

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * ( - col1 ) + - ( 84 + + col1 ) * col2 col0 FROM tab1 cor0
----
-10352
-5998
-6018

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-451
SELECT ALL + CAST( col1 AS SIGNED ) FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-451
SELECT ALL + CAST ( col1 AS INTEGER ) FROM tab0
----
86
91
97

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

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

query I rowsort
SELECT - 41 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 47b9ef972839428f4f71d9f5b0944edf

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

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

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

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

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

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

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

query I rowsort
SELECT 89 * - col1 AS col2 FROM tab2 AS cor0
----
-1513
-2759
-5251

query I rowsort
SELECT col1 * col2 + ( col2 ) * 2 AS col2 FROM tab2 AS cor0
----
1586
722
891

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

skipif mysql # not compatible
query I rowsort label-462
SELECT ALL - col2 + col0 / ( col1 ) AS col1 FROM tab2 AS cor0
----
-25
-27
-34

query I rowsort
SELECT - cor0.col1 * 91 AS col1 FROM tab1 AS cor0
----
-1183
-2366
-910

query I rowsort
SELECT DISTINCT - cor0.col1 + + col0 - + col0 * col0 FROM tab0 AS cor0
----
-1287
-638
-7923

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

query I rowsort
SELECT + 95 AS col2 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 14faa6dda52e3dfe1f5db2579c274a7e

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-468
SELECT ALL - CAST ( NULL AS INTEGER ) * col0 + col0 - - 2 col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 * + 90 FROM tab0
----
2970
7380
90

query I rowsort
SELECT 27 AS col2 FROM tab1, tab0 cor0
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

query I rowsort
SELECT + 17 * + col0 AS col2 FROM tab1 AS cor0
----
1088
1360
51

query I rowsort
SELECT - + 10 + col2 AS col0 FROM tab0 cor0
----
-9
23
72

query I rowsort
SELECT 7 + cor0.col0 AS col1 FROM tab1 cor0
----
10
71
87

onlyif mysql # use DIV operator for integer division
query I rowsort label-474
SELECT - cor0.col1 DIV + col0 + + ( + 42 ) AS col2 FROM tab0 AS cor0
----
39
40
41

skipif mysql # not compatible
query I rowsort label-474
SELECT - cor0.col1 / + col0 + + ( + 42 ) AS col2 FROM tab0 AS cor0
----
39
40
41

query I rowsort
SELECT ALL + ( + col1 * col1 ) FROM tab1
----
100
169
676

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 51 * + col0 * 59 col2 FROM tab2 AS cor0
----
21063
234702
237711

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

query I rowsort
SELECT ALL + col1 + - 95 AS col1 FROM tab1 AS cor0
----
-69
-82
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-481
SELECT + col1 + - col2 DIV - 51 AS col0 FROM tab0 AS cor0
----
86
92
97

skipif mysql # not compatible
query I rowsort label-481
SELECT + col1 + - col2 / - 51 AS col0 FROM tab0 AS cor0
----
86
92
97

query I rowsort
SELECT ALL col1 + 93 FROM tab1 cor0
----
103
106
119

query I rowsort
SELECT DISTINCT + col0 * 50 AS col0 FROM tab1 AS cor0
----
150
3200
4000

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * 33 col1 FROM tab1 AS cor0
----
-2112
-2640
-99

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

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

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

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

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

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

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

query I rowsort
SELECT cor0.col2 * + 99 + + col2 AS col2 FROM tab2 AS cor0
----
2600
2700
3800

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

skipif mysql # not compatible
query I rowsort label-490
SELECT - + col2 * CAST ( col1 AS INTEGER ) FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + cor0.col1 * + 7 FROM tab0, tab1 cor0
----
9 values hashing to bc64b3faa3f559fb28d4e3c024f671b5

query I rowsort
SELECT DISTINCT - col2 * ( + col2 * col1 ) FROM tab0
----
-611884
-93654
-97

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

query I rowsort
SELECT ALL 68 AS col1 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 10aa25f1c6b97582c34521ac6452e0b4

query I rowsort
SELECT DISTINCT + col1 * 95 AS col2 FROM tab0
----
8170
8645
9215

query I rowsort
SELECT DISTINCT col2 * cor0.col2 + cor0.col0 + - 62 AS col1 FROM tab0 AS cor0
----
-26
1051
6751

query I rowsort
SELECT col1 + + 40 AS col1 FROM tab0 AS cor0
----
126
131
137

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

query I rowsort
SELECT DISTINCT - cor0.col0 * col0 + - col1 * col2 FROM tab2 AS cor0
----
-6887
-7618
-886

query I rowsort
SELECT ALL - col2 - 19 * cor0.col0 FROM tab0 AS cor0
----
-1773
-489
-666

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-503
SELECT DISTINCT ( + 43 ) * col1 + - 86 + + 42 DIV col1 FROM tab2 AS cor0
----
1248
2451
647

skipif mysql # not compatible
query I rowsort label-503
SELECT DISTINCT ( + 43 ) * col1 + - 86 + + 42 / col1 FROM tab2 AS cor0
----
1248
2451
647

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

query I rowsort
SELECT + 25 + + col1 AS col0 FROM tab0 AS cor0
----
111
116
122

query I rowsort
SELECT 46 * 88 AS col0 FROM tab0
----
4048
4048
4048

query I rowsort
SELECT - - 65 + + 95 * cor0.col1 AS col1 FROM tab0 AS cor0
----
8235
8710
9280

onlyif mysql # use DIV operator for integer division
query I rowsort label-508
SELECT + 65 + - col2 * cor0.col1 DIV - col0 col2 FROM tab2 AS cor0
----
184
73
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-508
SELECT + 65 + - col2 * cor0.col1 / - col0 col2 FROM tab2 AS cor0
----
184
73
84

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

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

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

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

query I rowsort
SELECT cor1.col0 AS col0 FROM tab2, tab1 AS cor0, tab1, tab1 cor1
----
81 values hashing to e28bf7f922650ca423ade3642ce0285b

query I rowsort
SELECT - tab2.col1 * - col2 - - col0 FROM tab2
----
1612
725
844

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

query I rowsort
SELECT ALL - + col2 * col1 + - 78 AS col1 FROM tab0 AS cor0
----
-175
-2916
-7540

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

query I rowsort
SELECT ALL col0 + col2 + 50 * cor0.col0 FROM tab2 AS cor0
----
384
4004
4067

query I rowsort
SELECT DISTINCT - + 47 + - col0 * + 40 * 11 FROM tab2 cor0
----
-3127
-34367
-34807

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

query I rowsort
SELECT DISTINCT + 97 + 24 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
121

query I rowsort
SELECT ALL ( - 99 ) AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 64d06513850a26495bc6c2fddeb254b7

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

query I rowsort
SELECT DISTINCT 51 * col1 FROM tab0 AS cor0
----
4386
4641
4947

onlyif mysql # use DIV operator for integer division
query I rowsort label-523
SELECT ALL + col2 + - col2 DIV + 11 AS col1 FROM tab0 AS cor0
----
1
30
75

skipif mysql # not compatible
query I rowsort label-523
SELECT ALL + col2 + - col2 / + 11 AS col1 FROM tab0 AS cor0
----
1
30
75

query I rowsort
SELECT + 56 * - col0 FROM tab1 AS cor0
----
-168
-3584
-4480

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

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

query I rowsort
SELECT 65 + + col0 AS col0 FROM tab1 AS cor0
----
129
145
68

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

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

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

query I rowsort
SELECT DISTINCT - 5 * col0 FROM tab1 AS cor0
----
-15
-320
-400

query I rowsort
SELECT 87 * col2 - col1 FROM tab2
----
2203
2318
3289

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

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

query I rowsort
SELECT ALL cor0.col1 * 95 FROM tab2, tab0 AS cor0
----
9 values hashing to 2a2ddd73a559299c0ba9412b5bb32618

query I rowsort
SELECT DISTINCT + ( col2 ) * col1 * 66 + col0 FROM tab0 AS cor0
----
187332
492581
6437

query I rowsort
SELECT - col0 + 52 * + col1 FROM tab2 AS cor0
----
1605
2990
805

onlyif mysql # use DIV operator for integer division
query I rowsort label-538
SELECT ALL - + col2 DIV - 15 col1 FROM tab1 cor0
----
3
3
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-538
SELECT ALL - + col2 / - 15 col1 FROM tab1 cor0
----
3
3
6

query I rowsort
SELECT - + cor0.col2 * 63 + + cor0.col2 FROM tab1 AS cor0
----
-3348
-3534
-5952

query I rowsort
SELECT DISTINCT - 6 * 46 FROM tab0 AS cor0
----
-276

query I rowsort
SELECT + + ( 78 ) * + col0 FROM tab1 AS cor0
----
234
4992
6240

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

query I rowsort
SELECT 54 FROM tab0 cor0
----
54
54
54

onlyif mysql # use DIV operator for integer division
query I rowsort label-544
SELECT ALL - col2 + col0 + - 88 DIV + col0 AS col1 FROM tab0
----
-12
32
7

skipif mysql # not compatible
query I rowsort label-544
SELECT ALL - col2 + col0 + - 88 / + col0 AS col1 FROM tab0
----
-12
32
7

query I rowsort
SELECT DISTINCT + 73 * 74 AS col1 FROM tab1, tab1 AS cor0
----
5402

query I rowsort
SELECT + 87 * - col1 + + cor0.col0 AS col2 FROM tab0 AS cor0
----
-7458
-7828
-8404

query I rowsort
SELECT DISTINCT + - col1 + col0 + + col0 * col0 AS col1 FROM tab1 AS cor0
----
-14
4150
6467

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col2 + - col1 col1 FROM tab2
----
158
1969
2985

query I rowsort
SELECT ALL 30 + col2 + - col0 FROM tab0
----
-4
23
39

query I rowsort
SELECT - tab2.col0 * - 99 FROM tab2
----
693
7722
7821

query I rowsort
SELECT 85 FROM tab0 cor0
----
85
85
85

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

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

query I rowsort
SELECT ALL 0 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT + 54 * - 98 * col1 + ( - col2 ) FROM tab1
----
-137646
-52977
-68892

query I rowsort
SELECT cor0.col0 * - ( cor0.col2 ) AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to f7e57a354e4e5925116b9650d1011609

query I rowsort
SELECT ALL ( - col0 ) * - 76 * + 94 AS col2 FROM tab1 AS cor0
----
21432
457216
571520

query I rowsort
SELECT ALL - 21 + + col1 * + cor0.col2 AS col0 FROM tab2 AS cor0
----
1513
625
816

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

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

query I rowsort
SELECT DISTINCT col2 * + col1 + 82 AS col0 FROM tab0 AS cor0
----
179
2920
7544

query I rowsort
SELECT ALL - 77 * cor0.col1 AS col1 FROM tab0 AS cor0
----
-6622
-7007
-7469

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * 41 + col1 col1 FROM tab0
----
3612
3822
4074

query I rowsort
SELECT + col0 * 63 FROM tab2
----
441
4914
4977

query I rowsort
SELECT ALL - tab1.col2 + 47 AS col1 FROM tab1
----
-10
-49
-7

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-567
SELECT ALL - col2 + col1 DIV col1 FROM tab2
----
-25
-26
-37

skipif mysql # not compatible
query I rowsort label-567
SELECT ALL - col2 + col1 / col1 FROM tab2
----
-25
-26
-37

query I rowsort
SELECT DISTINCT + col2 * - 66 - - 60 * + col1 AS col2 FROM tab2 AS cor0
----
-1488
1824
78

query I rowsort
SELECT - cor0.col1 - col0 * + col2 * - col1 FROM tab0 AS cor0
----
3298
664027
68026

query I rowsort
SELECT ALL + + cor0.col2 FROM tab2, tab1 AS cor0, tab2 AS cor1, tab1, tab1 AS cor2
----
243 values hashing to 39c7e653e7a493eb9c9e3dad9ba3b8c2

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

query I rowsort
SELECT ALL col2 * col1 * 96 + col2 + + col1 * - col1 FROM tab2 cor0
----
143809
61765
79418

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

skipif mysql # not compatible
query I rowsort label-573
SELECT ALL + CAST ( - col0 AS INTEGER ) + col0 * + 69 * col1 - + col0 FROM tab2 AS cor0
----
14959
317382
92509

skipif mysql # not compatible
query I rowsort
SELECT CAST ( + 72 AS REAL ) * col2 AS col0 FROM tab0 AS cor0
----
2376
5904
72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-575
SELECT ALL - CAST( col2 AS SIGNED ) * - col0 - col0 * + 72 * + col2 FROM tab0 AS cor0
----
-2485
-518158
-56232

skipif mysql # not compatible
query I rowsort label-575
SELECT ALL - CAST ( col2 AS INTEGER ) * - col0 - col0 * + 72 * + col2 FROM tab0 AS cor0
----
-2485
-518158
-56232

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

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

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

query I rowsort
SELECT DISTINCT + col0 - - col0 FROM tab2 cor0
----
14
156
158

query I rowsort
SELECT col2 * cor0.col1 - col2 * + 82 FROM tab0 AS cor0
----
132
15
738

query I rowsort
SELECT DISTINCT - 77 + + col1 * + cor0.col1 AS col1 FROM tab2 AS cor0
----
212
3404
884

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

query I rowsort
SELECT - 36 * - col0 + - cor0.col0 FROM tab2 AS cor0
----
245
2730
2765

query I rowsort
SELECT + col1 + 28 AS col2 FROM tab2 AS cor0
----
45
59
87

query I rowsort
SELECT DISTINCT + col0 + + col0 * + col0 FROM tab1 AS cor0
----
12
4160
6480

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-588
SELECT col2 DIV col1 + col0 + + col2 * - col1 col0 FROM tab1
----
-1161
-1399
-501

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-588
SELECT col2 / col1 + col0 + + col2 * - col1 col0 FROM tab1
----
-1161
-1399
-501

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

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

query I rowsort
SELECT ALL col0 * - col0 - + col1 * col1 FROM tab2
----
-1010
-6530
-9565

onlyif mysql # use DIV operator for integer division
query I rowsort label-592
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-592
SELECT - col1 / + col2 col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - cor0.col2 * cor0.col2 AS col0 FROM tab1, tab1 cor0
----
9 values hashing to 760e91273f37834612f88abef6e165f8

query I rowsort
SELECT DISTINCT + 23 AS col1 FROM tab0
----
23

query I rowsort
SELECT DISTINCT 56 AS col1 FROM tab2
----
56

query I rowsort
SELECT - 94 * cor0.col0 FROM tab1 AS cor0
----
-282
-6016
-7520

query I rowsort
SELECT + cor0.col0 - - cor0.col0 * - tab2.col2 FROM tab2, tab0 AS cor0
----
9 values hashing to a4dbc549e1a09468f985db7223c04ce4

query I rowsort
SELECT ALL 44 AS col0 FROM tab0
----
44
44
44

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

query I rowsort
SELECT 22 * - col0 + col0 FROM tab2 AS cor0
----
-147
-1638
-1659

query I rowsort
SELECT DISTINCT - 74 + cor0.col2 FROM tab1 AS cor0
----
-17
-20
22

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE - col1 BETWEEN col1 * + col1 AND col0 + col2
----

query III rowsort
SELECT * FROM tab0 WHERE NOT col2 * col2 < col1 * col0
----

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

query I rowsort
SELECT DISTINCT col0 * col0 + - col2 AS col0 FROM tab2
----
22
6058
6203

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

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

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

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

query I rowsort
SELECT col1 FROM tab2 WHERE ( col1 ) BETWEEN col2 / + col1 AND col0 * - col1 * - col1
----
17
31
59

query I rowsort
SELECT ALL col0 * + col0 + - col2 FROM tab0
----
1224
543
7839

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

skipif mysql # not compatible
query I rowsort label-612
SELECT + col1 + + tab1.col2 / - col0 AS col1 FROM tab1
----
10
12
8

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * - col1 + col0 col0 FROM tab0 AS cor0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-618
SELECT DISTINCT col2 * col1 * col0 + cor0.col1 DIV col1 FROM tab2 AS cor0
----
119653
51035
5860

skipif mysql # not compatible
query I rowsort label-618
SELECT DISTINCT col2 * col1 * col0 + cor0.col1 / col1 FROM tab2 AS cor0
----
119653
51035
5860

onlyif mysql # use DIV operator for integer division
query I rowsort label-619
SELECT + - col2 DIV + col2 + + col2 + - col2 * col0 FROM tab1 AS cor0
----
-109
-3592
-7585

skipif mysql # not compatible
query I rowsort label-619
SELECT + - col2 / + col2 + + col2 + - col2 * col0 FROM tab1 AS cor0
----
-109
-3592
-7585

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

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

query I rowsort
SELECT + cor0.col2 * - col2 + + col2 FROM tab1 AS cor0
----
-2862
-3192
-9120

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - col1 * - col1 col2 FROM tab2 cor0
----
3559
368
968

query I rowsort
SELECT DISTINCT + col0 * tab2.col1 + + 95 AS col2 FROM tab2
----
1438
312
4697

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-629
SELECT col2 * CAST( 72 * col0 AS SIGNED ) AS col1 FROM tab1
----
11664
262656
552960

skipif mysql # not compatible
query I rowsort label-629
SELECT col2 * CAST ( 72 * col0 AS INTEGER ) AS col1 FROM tab1
----
11664
262656
552960

query I rowsort
SELECT - col2 + 53 FROM tab0
----
-29
20
52

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

query I rowsort
SELECT + - col2 * 16 + 47 AS col2 FROM tab0 AS cor0
----
-1265
-481
31

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-634
SELECT DISTINCT - + ( col2 ) * + col0 + - col1 DIV + 14 FROM tab1 cor0
----
-163
-3648
-7680

skipif mysql # not compatible
query I rowsort label-634
SELECT DISTINCT - + ( col2 ) * + col0 + - col1 / + 14 FROM tab1 cor0
----
-163
-3648
-7680

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

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

query I rowsort
SELECT 42 FROM tab0, tab0 AS cor0 CROSS JOIN tab1
----
27 values hashing to 325aada2239b6fe1fe2d843515ae8c5e

query I rowsort
SELECT 20 * - col2 AS col0 FROM tab0 AS cor0
----
-1640
-20
-660

query I rowsort
SELECT 91 * + col1 AS col0 FROM tab0 AS cor0
----
7826
8281
8827

query I rowsort
SELECT col2 * - 90 FROM tab2 AS cor0
----
-2340
-2430
-3420

query I rowsort
SELECT - 33 + col2 AS col0 FROM tab1 AS cor0
----
21
24
63

query I rowsort
SELECT ALL - 84 + + col2 FROM tab1 AS cor0
----
-27
-30
12

onlyif mysql # use DIV operator for integer division
query I rowsort label-643
SELECT DISTINCT - CAST( + col0 AS SIGNED ) * - col0 - 28 DIV cor0.col2 FROM tab0 AS cor0
----
1197
576
7921

skipif mysql # not compatible
query I rowsort label-643
SELECT DISTINCT - CAST ( + col0 AS INTEGER ) * - col0 - 28 / cor0.col2 FROM tab0 AS cor0
----
1197
576
7921

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-648
SELECT - + col1 DIV - col0 + 47 FROM tab0 AS cor0
----
48
49
50

skipif mysql # not compatible
query I rowsort label-648
SELECT - + col1 / - col0 + 47 FROM tab0 AS cor0
----
48
49
50

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

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

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

query I rowsort
SELECT DISTINCT 98 * col1 + - col2 - col1 FROM tab2 AS cor0
----
1611
2980
5697

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 + - col0 + - col0 col2 FROM tab0 AS cor0
----
-134
-167
-269

onlyif mysql # use DIV operator for integer division
query I rowsort label-655
SELECT DISTINCT - cor0.col1 DIV + col0 + - 6 * col0 - + col0 * ( + col2 * col2 + col1 ) AS col0 FROM tab0 AS cor0
----
-28347
-3642
-607070

skipif mysql # not compatible
query I rowsort label-655
SELECT DISTINCT - cor0.col1 / + col0 + - 6 * col0 - + col0 * ( + col2 * col2 + col1 ) AS col0 FROM tab0 AS cor0
----
-28347
-3642
-607070

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

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

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

query I rowsort
SELECT DISTINCT - 40 * - col2 FROM tab0 cor0
----
1320
3280
40

query I rowsort
SELECT + col2 * + cor0.col0 + col1 - 61 FROM tab0 AS cor0
----
71
7328
817

query I rowsort
SELECT + col0 - col0 * col0 AS col2 FROM tab2 AS cor0
----
-42
-6006
-6162

query I rowsort
SELECT ALL + 47 * - col2 FROM tab0 AS cor0
----
-1551
-3854
-47

query I rowsort
SELECT DISTINCT + col0 + 74 * col1 AS col2 FROM tab2 AS cor0
----
1337
2301
4444

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 col1 + + 78 * col1 * cor0.col2 FROM tab0 cor0
----
221450
582127
7663

query I rowsort
SELECT DISTINCT col0 * col0 * col0 + col1 FROM tab2 AS cor0
----
374
474611
493056

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

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

query I rowsort
SELECT col2 + + 69 FROM tab2 AS cor0
----
107
95
96

query I rowsort
SELECT + + cor0.col2 + col0 * 26 FROM tab2 AS cor0
----
2054
209
2092

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-673
SELECT + - col0 DIV 69 - col2 col0 FROM tab0 AS cor0
----
-1
-33
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-673
SELECT + - col0 / 69 - col2 col0 FROM tab0 AS cor0
----
-1
-33
-83

query I rowsort
SELECT + col0 * col2 + - 78 - col2 FROM tab1 cor0
----
30
3513
7506

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

skipif mysql # not compatible
query I rowsort
SELECT - ( - col0 ) / CAST ( + col0 AS REAL ) FROM tab2
----
1
1
1

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

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

query I rowsort
SELECT - col2 + 25 AS col2 FROM tab1 AS cor0
----
-29
-32
-71

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

query I rowsort
SELECT - 63 * + ( col0 ) + - col2 AS col0 FROM tab0 AS cor0
----
-1545
-2206
-5689

query I rowsort
SELECT + + col0 * col1 + - col0 * + col0 * - col1 + - cor0.col1 * - cor0.col2 FROM tab1 cor0
----
1716
42170
85488

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-682
SELECT + col2 * - CAST( 60 * + col1 AS SIGNED ) FROM tab2
----
-38760
-50220
-92040

skipif mysql # not compatible
query I rowsort label-682
SELECT + col2 * - CAST ( 60 * + col1 AS INTEGER ) FROM tab2
----
-38760
-50220
-92040

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-684
SELECT + CAST ( NULL AS INTEGER ) + - cor1.col2 col2 FROM tab2, tab2 cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

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

query I rowsort
SELECT + 77 + + tab2.col0 * col1 AS col2 FROM tab2
----
1420
294
4679

query I rowsort
SELECT 57 + + tab1.col1 * col2 FROM tab1
----
1305
1461
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-688
SELECT + col1 + - col0 DIV 44 FROM tab0
----
86
89
97

skipif mysql # not compatible
query I rowsort label-688
SELECT + col1 + - col0 / 44 FROM tab0
----
86
89
97

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

skipif mysql # not compatible
query I rowsort label-689
SELECT - 16 / col2 AS col0 FROM tab1
----
0
0
0

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

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

skipif mysql # not compatible
query I rowsort label-691
SELECT DISTINCT col1 * + col1 / - ( ( - col1 ) ) AS col1 FROM tab1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-692
SELECT DISTINCT - col0 * col1 DIV 39 FROM tab0
----
-207
-52
-87

skipif mysql # not compatible
query I rowsort label-692
SELECT DISTINCT - col0 * col1 / 39 FROM tab0
----
-207
-52
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col2 * - tab2.col1 + 42 + + col1 col2 FROM tab2
----
1635
705
910

onlyif mysql # use DIV operator for integer division
query I rowsort label-694
SELECT col2 + - col1 + 91 DIV col2 FROM tab1
----
29
48
83

skipif mysql # not compatible
query I rowsort label-694
SELECT col2 + - col1 + 91 / col2 FROM tab1
----
29
48
83

query I rowsort
SELECT ( col2 + 55 ) FROM tab2
----
81
82
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-696
SELECT tab0.col0 + col1 + 39 DIV col1 AS col0 FROM tab0
----
110
132
180

skipif mysql # not compatible
query I rowsort label-696
SELECT tab0.col0 + col1 + 39 / col1 AS col0 FROM tab0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-697
SELECT DISTINCT - tab1.col1 * col1 DIV col1 + - col0 + + col2 FROM tab1
----
-17
25
3

skipif mysql # not compatible
query I rowsort label-697
SELECT DISTINCT - tab1.col1 * col1 / col1 + - col0 + + col2 FROM tab1
----
-17
25
3

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

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

query I rowsort
SELECT ALL - + col2 + col1 * + 34 AS col2 FROM tab1 AS cor0
----
283
346
830

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

query I rowsort
SELECT ALL cor0.col2 * cor0.col1 * - 32 + + cor0.col0 FROM tab2 AS cor0
----
-20593
-26777
-49010

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

query I rowsort
SELECT ALL col1 * cor0.col1 + - ( + cor0.col0 * col2 ) FROM tab1 AS cor0
----
-3548
-7511
514

query I rowsort
SELECT DISTINCT 52 + + col2 FROM tab1 AS cor0
----
106
109
148

onlyif mysql # use DIV operator for integer division
query I rowsort label-706
SELECT col2 * + col1 DIV - cor0.col1 FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-706
SELECT col2 * + col1 / - cor0.col1 FROM tab2 AS cor0
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-707
SELECT DISTINCT ( col2 ) DIV - col2 FROM tab0
----
-1

skipif mysql # not compatible
query I rowsort label-707
SELECT DISTINCT ( col2 ) / - col2 FROM tab0
----
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-708
SELECT ALL + ( - col0 ) DIV + col0 AS col1 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-708
SELECT ALL + ( - col0 ) / + col0 AS col1 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT ALL - 93 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to ea79c61f7a02d25805171f5e85229fba

query I rowsort
SELECT ALL + 47 * + col2 FROM tab2
----
1222
1269
1786

onlyif mysql # use DIV operator for integer division
query I rowsort label-711
SELECT ALL 33 DIV tab0.col1 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-711
SELECT ALL 33 / tab0.col1 AS col2 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + 86 * + col2 col0 FROM tab0 cor0
----
-11
2752
6961

query I rowsort
SELECT col1 + col2 * - col2 + col1 AS col2 FROM tab1
----
-2864
-3229
-9190

query I rowsort
SELECT + col1 + - ( col1 ) FROM tab0
----
0
0
0

query I rowsort
SELECT - + col1 - - ( cor0.col2 ) * - col0 * - ( col1 ) FROM tab0 AS cor0
----
3298
664027
68026

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

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

query I rowsort
SELECT DISTINCT 62 AS col0 FROM tab1, tab0 cor0, tab0 AS cor1
----
62

query I rowsort
SELECT ALL - col1 * ( + 10 * + col2 ) AS col1 FROM tab1
----
-12480
-14040
-5700

onlyif mysql # use DIV operator for integer division
query I rowsort label-719
SELECT col2 DIV col1 + + cor0.col0 AS col0 FROM tab1 AS cor0
----
5
69
87

skipif mysql # not compatible
query I rowsort label-719
SELECT col2 / col1 + + cor0.col0 AS col0 FROM tab1 AS cor0
----
5
69
87

onlyif mysql # use DIV operator for integer division
query I rowsort label-720
SELECT + col1 + col0 DIV + col1 AS col0 FROM tab1 AS cor0
----
16
19
26

skipif mysql # not compatible
query I rowsort label-720
SELECT + col1 + col0 / + col1 AS col0 FROM tab1 AS cor0
----
16
19
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 37 * cor0.col1 + col2 * col0 + col2 col0 FROM tab0 cor0
----
10747
3625
4007

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

query I rowsort
SELECT - ( 61 ) * + col1 * + col2 + + col0 * + cor0.col0 AS col0 FROM tab1 AS cor0
----
-30674
-69728
-85635

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-725
SELECT DISTINCT col2 + col2 DIV col2 FROM tab1
----
55
58
97

skipif mysql # not compatible
query I rowsort label-725
SELECT DISTINCT col2 + col2 / col2 FROM tab1
----
55
58
97

query I rowsort
SELECT - 24 - col1 FROM tab0
----
-110
-115
-121

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-727
SELECT DISTINCT - 83 * - col0 * col0 + + CAST( 97 AS SIGNED ) AS col2 FROM tab2
----
4164
505069
518100

skipif mysql # not compatible
query I rowsort label-727
SELECT DISTINCT - 83 * - col0 * col0 + + CAST ( 97 AS INTEGER ) AS col2 FROM tab2
----
4164
505069
518100

query I rowsort
SELECT + 47 * + col0 AS col2 FROM tab0
----
1128
1645
4183

query I rowsort
SELECT DISTINCT + 84 + + 99 AS col1 FROM tab1
----
183

query I rowsort
SELECT DISTINCT 29 * - col0 + col0 * - col0 AS col1 FROM tab1
----
-5952
-8720
-96

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

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

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

query I rowsort
SELECT DISTINCT + 73 + cor0.col0 * 61 FROM tab0 AS cor0
----
1537
2208
5502

query I rowsort
SELECT DISTINCT - - ( cor0.col2 ) + - 74 FROM tab0 AS cor0
----
-41
-73
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 76 - col1 * cor0.col0 col0 FROM tab2 cor0
----
-1419
-293
-4678

query I rowsort
SELECT + - col2 * - col0 * col2 FROM tab0 AS cor0
----
26136
35
598436

query I rowsort
SELECT + cor0.col1 * + cor0.col0 + - 97 FROM tab0 AS cor0
----
1967
3298
8002

query I rowsort
SELECT DISTINCT + cor0.col2 * col0 + - 91 + + 97 * col2 AS col1 FROM tab1 AS cor0
----
16901
5309
9086

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

query I rowsort
SELECT ALL + col1 * col0 * 51 + col1 AS col1 FROM tab0 AS cor0
----
105350
173242
413140

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

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

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

query I rowsort
SELECT ALL 74 * col0 + + cor0.col2 * - col1 FROM tab0 AS cor0
----
-1062
-876
2493

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

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

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

query I rowsort
SELECT ALL col1 - + 44 FROM tab2
----
-13
-27
15

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

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

query I rowsort
SELECT ALL - cor0.col2 + 14 AS col1 FROM tab1 cor0
----
-40
-43
-82

query I rowsort
SELECT DISTINCT col0 * ( col0 * col0 ) AS col2 FROM tab0 AS cor0
----
13824
42875
704969

query I rowsort
SELECT - col1 * - 7 * - col0 FROM tab1 AS cor0
----
-4480
-546
-7280

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

skipif mysql # not compatible
query I rowsort label-755
SELECT + col2 / ( cor0.col2 ) FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT ALL + cor0.col2 + - 51 AS col2 FROM tab2 AS cor0
----
-13
-24
-25

onlyif mysql # use DIV operator for integer division
query I rowsort label-757
SELECT ALL + - col0 DIV - 8 AS col2 FROM tab2 AS cor0
----
0
9
9

skipif mysql # not compatible
query I rowsort label-757
SELECT ALL + - col0 / - 8 AS col2 FROM tab2 AS cor0
----
0
9
9

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

skipif mysql # not compatible
query I rowsort label-758
SELECT DISTINCT + - CAST ( col0 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-7
-78
-79

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

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

query I rowsort
SELECT DISTINCT col2 - + 96 FROM tab0
----
-14
-63
-95

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 * ( 75 ) + col1 col1 FROM tab1 AS cor0
----
-4024
-4265
-7187

query I rowsort
SELECT ALL - + col0 + + 44 AS col0 FROM tab1 AS cor0
----
-20
-36
41

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

query I rowsort
SELECT DISTINCT + col2 + col2 * + ( + 89 * col1 ) AS col0 FROM tab2
----
136552
57532
74520

onlyif mysql # use DIV operator for integer division
query I rowsort label-768
SELECT DISTINCT col2 DIV + col2 + tab0.col0 AS col2 FROM tab0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-768
SELECT DISTINCT col2 / + col2 + tab0.col0 AS col2 FROM tab0
----
25
36
90

query I rowsort
SELECT + col0 * + 67 + col0 + col1 * + 54 AS col0 FROM tab1 AS cor0
----
1608
4892
6142

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

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

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

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

query I rowsort
SELECT - col2 + + 7 AS col1 FROM tab1 AS cor0
----
-47
-50
-89

query I rowsort
SELECT ALL - col1 * 4 FROM tab2 AS cor0
----
-124
-236
-68

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

query I rowsort
SELECT ALL - col1 + - cor0.col1 * - 17 + + col2 AS col2 FROM tab1 cor0
----
217
304
470

query I rowsort
SELECT + cor0.col0 + 80 AS col2 FROM tab2 AS cor0
----
158
159
87

query I rowsort
SELECT DISTINCT - - col0 * - 66 + + col2 FROM tab2 AS cor0
----
-435
-5122
-5176

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * col1 - col2 * + col2 col2 FROM tab2 cor0
----
-101
-512
3926

query I rowsort
SELECT - tab2.col0 * - col1 + - col0 AS col2 FROM tab2 WHERE NOT + col2 = - col1
----
1264
210
4524

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

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

query I rowsort
SELECT DISTINCT col0 * - tab1.col2 * col2 - - col1 AS col2 FROM tab1
----
-207926
-737267
-8722

query I rowsort
SELECT col0 * col2 + tab1.col2 + + col1 AS col2 FROM tab1
----
242
3715
7789

query I rowsort
SELECT + col2 + + col1 * + col2 FROM tab2
----
1560
684
864

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col2 * tab2.col0 col0 FROM tab2
----
158
1969
2985

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

query I rowsort
SELECT DISTINCT + col1 * cor0.col0 + - ( 32 * + cor0.col0 + col2 * cor0.col0 ) FROM tab1 cor0
----
-180
-5056
-9200

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

query I rowsort
SELECT ALL + 47 * + col2 * cor0.col0 AS col2 FROM tab0 AS cor0
----
1645
343006
37224

query I rowsort
SELECT DISTINCT + 3 FROM tab0, tab2 cor0, tab0 AS cor1
----
3

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

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

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

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

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

query I rowsort
SELECT ALL - col0 FROM tab0 WHERE ( NULL ) BETWEEN + col2 + col2 AND ( NULL )
----

query I rowsort
SELECT col2 * - col1 + col1 + col2 FROM tab1
----
-1139
-1324
-503

query I rowsort
SELECT ALL - 94 + - col2 * col0 AS col2 FROM tab2 AS cor0
----
-2122
-283
-3096

query I rowsort
SELECT ALL - - 23 + - 91 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 5febf382d36d6e0191889c41b928786f

query I rowsort
SELECT - + 64 * + col2 FROM tab2 AS cor0
----
-1664
-1728
-2432

query I rowsort
SELECT - + ( cor0.col0 ) * cor0.col0 AS col0 FROM tab0 AS cor0
----
-1225
-576
-7921

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

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

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

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

query I rowsort
SELECT - 99 + 73 * col2 FROM tab1 AS cor0
----
3843
4062
6909

skipif mysql # not compatible
query I rowsort
SELECT - - CAST ( col2 AS REAL ) * col2 AS col2 FROM tab0 AS cor0
----
1
1089
6724

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

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

query I rowsort
SELECT ALL - - 44 FROM tab2 AS cor0
----
44
44
44

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

query I rowsort
SELECT - 96 + + 60 FROM tab2 AS cor0
----
-36
-36
-36

query I rowsort
SELECT col0 * col0 + 99 FROM tab0
----
1324
675
8020

query I rowsort
SELECT ALL 77 * 14 FROM tab2
----
1078
1078
1078

query I rowsort
SELECT + - cor0.col0 + + col0 * + ( + 18 + - col2 ) * - col2 FROM tab0 AS cor0
----
-630
11856
466983

query I rowsort
SELECT + cor0.col1 + - tab2.col1 + 19 FROM tab2, tab0 AS cor0, tab0 cor1
----
27 values hashing to 3c5b6be0492e3c0a2d123b55a09c4b53

query I rowsort
SELECT - - 48 FROM tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1
----
27 values hashing to 0ef571a8722ab7270aa7272c1174b88e

onlyif mysql # use DIV operator for integer division
query I rowsort label-819
SELECT + + col1 DIV ( - cor0.col2 ) + - col2 col0 FROM tab0 AS cor0
----
-35
-83
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-819
SELECT + + col1 / ( - cor0.col2 ) + - col2 col0 FROM tab0 AS cor0
----
-35
-83
-98

query I rowsort
SELECT ALL col2 * col1 + + col1 AS col1 FROM tab1
----
1261
1430
580

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

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

query I rowsort
SELECT ALL + cor0.col2 * - ( + col2 ) * col1 FROM tab0 AS cor0
----
-611884
-93654
-97

query I rowsort
SELECT - - col1 + ( - 15 * - col0 ) AS col2 FROM tab1 AS cor0
----
1213
71
970

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

skipif mysql # not compatible
query I rowsort label-825
SELECT ALL + col0 / ( - col0 ) FROM tab0 AS cor0
----
-1
-1
-1

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

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

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

query I rowsort
SELECT + + col0 * 67 AS col0 FROM tab2 AS cor0
----
469
5226
5293

query I rowsort
SELECT - - col1 * 51 FROM tab0 AS cor0
----
4386
4641
4947

query I rowsort
SELECT + col1 + - 74 * + 1 * cor0.col2 AS col1 FROM tab1 AS cor0
----
-3970
-4208
-7091

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

query I rowsort
SELECT DISTINCT - 42 + - col0 * - col2 + 26 * - col2 FROM tab0 AS cor0
----
-108
-33
5124

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

skipif mysql # not compatible
query I rowsort label-834
SELECT ALL - CAST ( NULL AS REAL ) - 15 * col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

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

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

query I rowsort
SELECT - + 79 + 45 FROM tab1 AS cor0
----
-34
-34
-34

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

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

query I rowsort
SELECT ALL + - 68 + + col0 AS col0 FROM tab0 AS cor0
----
-33
-44
21

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

query I rowsort
SELECT - 50 * - cor0.col1 AS col0 FROM tab0, tab2 cor0
----
9 values hashing to 6a95090a12408b94ede4de3f48710fc3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-841
SELECT + col0 - col0 * - CAST( col0 AS SIGNED ) FROM tab2 cor0
----
56
6162
6320

skipif mysql # not compatible
query I rowsort label-841
SELECT + col0 - col0 * - CAST ( col0 AS INTEGER ) FROM tab2 cor0
----
56
6162
6320

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

query I rowsort
SELECT ALL + col0 * + ( col1 * col1 ) + col1 FROM tab1 AS cor0
----
13533
2054
6410

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-847
SELECT col2 + - col0 + tab2.col2 DIV col1 FROM tab2
----
-39
-52
20

skipif mysql # not compatible
query I rowsort label-847
SELECT col2 + - col0 + tab2.col2 / col1 FROM tab2
----
-39
-52
20

query I rowsort
SELECT 98 + + tab1.col1 FROM tab1, tab0 cor0, tab0 AS cor1
----
27 values hashing to 93353a08055f5d9fda266a854f605619

onlyif mysql # use DIV operator for integer division
query I rowsort label-849
SELECT ALL col2 * col0 DIV 8 AS col1 FROM tab2 AS cor0
----
23
253
375

skipif mysql # not compatible
query I rowsort label-849
SELECT ALL col2 * col0 / 8 AS col1 FROM tab2 AS cor0
----
23
253
375

query I rowsort
SELECT col0 * + 2 FROM tab2 AS cor0
----
14
156
158

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

query I rowsort
SELECT - cor0.col0 + - ( col2 ) * col0 * - cor0.col1 FROM tab1 AS cor0
----
36416
4209
99760

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 + + col2 * + 31 col2 FROM tab1 AS cor0
----
1620
1710
2880

query I rowsort
SELECT 52 + col0 FROM tab1
----
116
132
55

query I rowsort
SELECT DISTINCT + col2 - col2 * + col0 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT + 90 * - col0 + + 8 + col2 * + col2 FROM tab1
----
-2503
2024
2654

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

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

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

query I rowsort
SELECT DISTINCT + tab1.col1 * + tab1.col2 + ( + col0 ) * tab1.col0 + - col0 * + col1 AS col2 FROM tab1
----
1335
4026
6608

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

skipif mysql # not compatible
query I rowsort label-861
SELECT DISTINCT + col0 + CAST ( NULL AS INTEGER ) + + 9 * - col0 AS col2 FROM tab0
----
NULL

query I rowsort
SELECT ALL + col2 + + 64 FROM tab2
----
102
90
91

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

skipif mysql # not compatible
query I rowsort label-863
SELECT DISTINCT - col0 / + tab1.col2 + + col0 * col1 AS col1 FROM tab1
----
1040
639
78

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

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

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

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

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
-1
-33
-82

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

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

query I rowsort
SELECT ALL - 90 * - col0 AS col2 FROM tab0
----
2160
3150
8010

query I rowsort
SELECT ALL + + 85 * col0 + - ( - 67 ) * col1 FROM tab2 AS cor0
----
10583
2672
7854

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + cor0.col1 + - ( - 37 + - cor0.col2 ) col2 FROM tab1 AS cor0
----
161
171
242

query I rowsort
SELECT ALL - 76 + - col0 AS col1 FROM tab1 AS cor0
----
-140
-156
-79

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

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

query I rowsort
SELECT - 98 * col1 FROM tab0 AS cor0
----
-8428
-8918
-9506

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

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

query I rowsort
SELECT - cor1.col1 AS col0 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

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

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

query I rowsort
SELECT DISTINCT + col2 * 32 FROM tab0 AS cor0
----
1056
2624
32

query I rowsort
SELECT - - cor0.col1 * - 31 AS col2 FROM tab2 AS cor0
----
-1829
-527
-961

query I rowsort
SELECT ALL 18 AS col0 FROM tab0
----
18
18
18

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

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

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

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

query I rowsort
SELECT DISTINCT - 70 * + col0 + col0 FROM tab1
----
-207
-4416
-5520

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 72 + + cor0.col2 col2 FROM tab2 AS cor0
----
110
98
99

query I rowsort
SELECT - 23 AS col0 FROM tab2, tab2 cor0
----
9 values hashing to ce60bf4b0647d0fcb18a0562e351c52d

query I rowsort
SELECT 91 * 20 AS col0 FROM tab0
----
1820
1820
1820

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-893
SELECT DISTINCT - 79 + - 74 DIV col2 FROM tab0
----
-153
-79
-81

skipif mysql # not compatible
query I rowsort label-893
SELECT DISTINCT - 79 + - 74 / col2 FROM tab0
----
-153
-79
-81

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

skipif mysql # not compatible
query I rowsort label-894
SELECT + 66 / col1 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT 1 * + 45 AS col2 FROM tab1
----
45
45
45

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

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

query I rowsort
SELECT + + col2 * - 19 * col0 FROM tab2 AS cor0
----
-3591
-38532
-57038

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-900
SELECT cor0.col0 * + CAST( - col2 + + cor0.col0 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-216
1190
623

skipif mysql # not compatible
query I rowsort label-900
SELECT cor0.col0 * + CAST ( - col2 + + cor0.col0 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-216
1190
623

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

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

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

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

query I rowsort
SELECT DISTINCT + col1 * + 46 FROM tab1 AS cor0
----
1196
460
598

query I rowsort
SELECT ALL - 50 * tab1.col0 FROM tab1
----
-150
-3200
-4000

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * 57 * cor0.col2 + col2 col0 FROM tab2 AS cor0
----
10800
115622
171152

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

query I rowsort
SELECT tab2.col0 + - tab2.col0 * + col1 FROM tab2
----
-1264
-210
-4524

query I rowsort
SELECT - 51 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 27bcc31433ce90833ed76619cbd8d6a4

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-912
SELECT ALL 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-912
SELECT ALL col0 * CAST ( NULL AS INTEGER ) col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 46 * cor0.col2 FROM tab2 AS cor0
----
1196
1242
1748

query I rowsort
SELECT + col2 * + 83 AS col0 FROM tab2
----
2158
2241
3154

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

query I rowsort
SELECT DISTINCT + col0 * + 32 AS col2 FROM tab0
----
1120
2848
768

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

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

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

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

query I rowsort
SELECT - + 42 + cor0.col0 * col2 FROM tab2 AS cor0
----
147
1986
2960

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-922
SELECT - col2 / col0 + col1 / + col2 col1 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT DISTINCT - 48 - - col1 FROM tab2 AS cor0
----
-17
-31
11

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

query I rowsort
SELECT 99 + - col2 * + 69 AS col0 FROM tab1 AS cor0
----
-3627
-3834
-6525

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-927
SELECT ALL 75 DIV col1 FROM tab2
----
1
2
4

skipif mysql # not compatible
query I rowsort label-927
SELECT ALL 75 / col1 FROM tab2
----
1
2
4

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

query I rowsort
SELECT - 11 + tab0.col0 AS col2 FROM tab0, tab2 cor0, tab2, tab1 AS cor1
----
81 values hashing to ff07da8b8a86e7472a1936303cab1865

onlyif mysql # use DIV operator for integer division
query I rowsort label-930
SELECT - 45 DIV col2 col1 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-930
SELECT - 45 / col2 col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT + + cor1.col2 * 47 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
1551
3854
47

query I rowsort
SELECT col1 * + col2 + col0 AS col0 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT - col0 - - ( col0 ) * + ( col2 ) * col1 AS col1 FROM tab1 AS cor0
----
36416
4209
99760

query I rowsort
SELECT 73 + col0 * - col0 FROM tab0 AS cor0
----
-1152
-503
-7848

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

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

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

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

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

query I rowsort
SELECT ALL col1 * col2 + ( 84 ) + col0 FROM tab0
----
216
2946
7635

query I rowsort
SELECT DISTINCT + 32 + col0 * + ( col0 ) + - col2 FROM tab0
----
1256
575
7871

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-942
SELECT 29 * + col1 + + col0 DIV 17 col0 FROM tab1 AS cor0
----
293
381
754

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-942
SELECT 29 * + col1 + + col0 / 17 col0 FROM tab1 AS cor0
----
293
381
754

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

query I rowsort
SELECT ALL - 80 * col0 + col0 FROM tab1 AS cor0
----
-237
-5056
-6320

query I rowsort
SELECT + - 26 + col0 FROM tab0 AS cor0
----
-2
63
9

query I rowsort
SELECT ALL - ( - 47 ) AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 4fe192f296791e1e40ea00a68aa8dab7

query I rowsort
SELECT - col0 + - 36 AS col0 FROM tab1
----
-100
-116
-39

query I rowsort
SELECT col2 + 81 * + col1 FROM tab2 AS cor0
----
1415
2538
4805

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 87 + + col0 + cor0.col2 * - cor0.col0 col0 FROM tab0 cor0
----
-681
-7122
87

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

query I rowsort
SELECT DISTINCT tab0.col1 * 24 FROM tab0
----
2064
2184
2328

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

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

query I rowsort
SELECT + 93 + 60 * cor0.col1 AS col0 FROM tab2 cor0
----
1113
1953
3633

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-959
SELECT ALL + + col2 + col2 DIV 48 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-959
SELECT ALL + + col2 + col2 / 48 FROM tab2 AS cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 42 * + col0 + + col1 col1 FROM tab1 AS cor0
----
152
2698
3373

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

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

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( + 51 AS REAL ) * + col1 AS col1 FROM tab0
----
4386
4641
4947

query I rowsort
SELECT + 93 + tab2.col0 FROM tab2
----
100
171
172

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - 90 * - col0 ) col2 FROM tab0
----
2160
3150
8010

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

query I rowsort
SELECT 90 + col0 AS col0 FROM tab1
----
154
170
93

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

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

query I rowsort
SELECT DISTINCT + + col2 + + 27 * col0 FROM tab1 AS cor0
----
135
1785
2256

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

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

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

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

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

query I rowsort
SELECT + 84 + col2 * col0 FROM tab0
----
119
7382
876

query I rowsort
SELECT DISTINCT + 84 + col0 FROM tab0
----
108
119
173

query I rowsort
SELECT ALL tab1.col1 + + col1 + - ( - ( + col2 ) ) FROM tab1
----
106
122
77

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

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

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

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

query I rowsort
SELECT + col2 + - 29 * + col0 AS col0 FROM tab0
----
-1014
-2499
-663

query I rowsort
SELECT + col2 + 85 FROM tab2 AS cor0
----
111
112
123

query I rowsort
SELECT - col1 * - 98 + 41 AS col0 FROM tab2 AS cor0
----
1707
3079
5823

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

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

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

query IIIIIIIII rowsort
SELECT * FROM tab2, tab0, tab1 cor0 WHERE NOT NULL NOT BETWEEN NULL AND ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 99 * - col2 col2 FROM tab0
----
-3267
-8118
-99

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

query I rowsort
SELECT ALL col1 * + col1 + - col0 - 98 * col2 AS col1 FROM tab1 cor0
----
-4619
-5550
-9319

query I rowsort
SELECT ALL - - cor0.col1 * cor0.col2 + 3 FROM tab0 AS cor0
----
100
2841
7465

query I rowsort
SELECT 54 AS col0 FROM tab1, tab0 AS cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to c12c2f39593b3ce157086f29d8391c32

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

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

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

query I rowsort
SELECT - - col2 + + 5 AS col2 FROM tab1 AS cor0
----
101
59
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-994
SELECT DISTINCT + col0 + ( 88 ) DIV col0 FROM tab2 AS cor0
----
19
79
80

skipif mysql # not compatible
query I rowsort label-994
SELECT DISTINCT + col0 + ( 88 ) / col0 FROM tab2 AS cor0
----
19
79
80

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

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

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

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

query I rowsort
SELECT + col0 * + cor0.col0 + + col0 * - col1 AS col2 FROM tab0 AS cor0
----
-1488
-178
-2170

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1000
SELECT ALL col0 * - col0 + col0 DIV col1 AS col1 FROM tab0 AS cor0
----
-1225
-576
-7921

skipif mysql # not compatible
query I rowsort label-1000
SELECT ALL col0 * - col0 + col0 / col1 AS col1 FROM tab0 AS cor0
----
-1225
-576
-7921

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

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

query I rowsort
SELECT + col1 * + 96 AS col2 FROM tab0 AS cor0
----
8256
8736
9312

query I rowsort
SELECT ALL - 37 AS col0 FROM tab0 cor0
----
-37
-37
-37

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

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

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

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

query I rowsort
SELECT ALL + 98 * col1 AS col2 FROM tab0 AS cor0
----
8428
8918
9506

query I rowsort
SELECT ALL - ( - col0 ) * cor0.col1 + col0 - - col0 FROM tab0 cor0
----
2112
3465
8277

query I rowsort
SELECT - 42 * + col2 AS col0 FROM tab2 AS cor0
----
-1092
-1134
-1596

query I rowsort
SELECT ALL + tab2.col1 * - 26 + 91 AS col1 FROM tab2
----
-1443
-351
-715

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

query I rowsort
SELECT + + col1 + - col2 + col1 * - 52 FROM tab0 AS cor0
----
-4419
-4723
-4948

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

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

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

query I rowsort
SELECT DISTINCT 7 * col2 AS col0 FROM tab1 AS cor0
----
378
399
672

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

query I rowsort
SELECT DISTINCT + 19 * - col2 FROM tab1 AS cor0
----
-1026
-1083
-1824

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

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

query I rowsort
SELECT col1 * + col2 + 78 + col2 FROM tab2 AS cor0
----
1638
762
942

query I rowsort
SELECT - col0 * col2 + + 15 + - ( col0 ) AS col1 FROM tab2 AS cor0
----
-181
-2091
-3066

query I rowsort
SELECT col2 + col2 + 66 FROM tab0 AS cor0
----
132
230
68

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

query I rowsort
SELECT 16 * + col1 * + cor0.col0 + - 80 FROM tab2 AS cor0
----
21408
3392
73552

onlyif mysql # use DIV operator for integer division
query I rowsort label-1028
SELECT ALL col0 + col0 DIV tab2.col0 col2 FROM tab2
----
79
8
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1028
SELECT ALL col0 + col0 / tab2.col0 col2 FROM tab2
----
79
8
80

query I rowsort
SELECT DISTINCT + col1 * 95 + - col1 * + col1 FROM tab0
----
-194
364
774

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * - 61 - col2 col2 FROM tab1 AS cor0
----
129
3847
4784

query I rowsort
SELECT 71 + + 72 FROM tab1, tab2 AS cor0, tab0, tab1 AS cor1
----
81 values hashing to 8fac7d486b04b3ccabf1f6971dc49ff4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 15 * col2 col2 FROM tab2 AS cor0
----
390
405
570

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1034
SELECT ALL - col2 / + CAST ( NULL AS INTEGER ) + - ( + col0 ) col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

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

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

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

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

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

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( cor0.col2 AS REAL ) + - col2 / + col2 + col1 AS col1 FROM tab1 AS cor0
----
-29
-48
-84

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

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

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

query I rowsort
SELECT + - 23 * cor0.col0 AS col2 FROM tab1 AS cor0
----
-1472
-1840
-69

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

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

query I rowsort
SELECT DISTINCT + 85 + + col1 * + col0 AS col1 FROM tab2 AS cor0
----
1428
302
4687

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

query I rowsort
SELECT ( 82 ) + col2 * col0 * - col2 + + col1 AS col1 FROM tab1
----
-207844
-737185
-8640

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1048
SELECT col2 / col2 + + col0 + CAST ( NULL AS INTEGER ) col0 FROM tab1
----
NULL
NULL
NULL

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

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

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

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

query I rowsort
SELECT + + col0 * + 53 + + col2 FROM tab2 AS cor0
----
398
4160
4225

query I rowsort
SELECT ALL + 57 + + col0 AS col0 FROM tab0
----
146
81
92

query I rowsort
SELECT ALL col1 * col2 * ( tab2.col1 + + col2 * 95 ) FROM tab2
----
2172852
2343042
3879486

query I rowsort
SELECT - col0 * 91 + col1 * col1 FROM tab0
----
182
5212
6224

query I rowsort
SELECT DISTINCT + col0 * - 96 FROM tab2
----
-672
-7488
-7584

query I rowsort
SELECT 67 * + tab2.col2 - - tab2.col2 AS col0 FROM tab2, tab2 cor0
----
9 values hashing to 486094d42a797c9117c6c23c5eb65146

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1059
SELECT ALL col1 / - 57 col1 FROM tab0
----
-1
-1
-1

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 + - cor0.col0 col0 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT ALL - cor0.col1 - - col2 * col1 AS col1 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT ALL + cor0.col1 + 78 AS col0 FROM tab0 AS cor0
----
164
169
175

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1064
SELECT - col1 * + CAST ( NULL AS REAL ) * + col0 col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * - 5 + + col1 AS col2 FROM tab2 AS cor0
----
102
186
354

query I rowsort
SELECT - col0 * ( - col0 * - col1 ) + - col1 * - ( col2 ) AS col2 FROM tab0
----
-118728
-46698
-713349

query I rowsort
SELECT col2 + 84 * ( tab1.col0 ) FROM tab1
----
306
5433
6816

query I rowsort
SELECT + cor0.col1 * col0 + - 62 FROM tab1 cor0
----
16
578
978

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

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

query I rowsort
SELECT ALL + - col2 * + cor0.col1 + col2 * - cor0.col2 AS col0 FROM tab1 AS cor0
----
-10464
-3819
-4320

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

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

query I rowsort
SELECT DISTINCT - col0 * - 18 - col2 AS col1 FROM tab0 cor0
----
1520
399
629

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1077
SELECT + - col0 + - col1 * col2 DIV - col0 FROM tab2 AS cor0
----
-59
-71
112

skipif mysql # not compatible
query I rowsort label-1077
SELECT + - col0 + - col1 * col2 / - col0 FROM tab2 AS cor0
----
-59
-71
112

onlyif mysql # use DIV operator for integer division
query I rowsort label-1078
SELECT ALL - col1 * - ( - col2 ) + col2 DIV - cor0.col2 + + col0 * + col2 FROM tab1 AS cor0
----
-1243
3077
6431

skipif mysql # not compatible
query I rowsort label-1078
SELECT ALL - col1 * - ( - col2 ) + col2 / - cor0.col2 + + col0 * + col2 FROM tab1 AS cor0
----
-1243
3077
6431

query I rowsort
SELECT DISTINCT col0 * - col1 - - col1 FROM tab1 AS cor0
----
-1027
-52
-630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 69 + cor0.col1 + + col2 * col1 * - col1 col2 FROM tab1 AS cor0
----
-16142
-36409
-5621

query I rowsort
SELECT DISTINCT + 38 + - col1 AS col1 FROM tab2 cor0
----
-21
21
7

query I rowsort
SELECT DISTINCT - - cor0.col1 + col1 * - col1 * col0 AS col2 FROM tab1 AS cor0
----
-13507
-2002
-6390

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1084
SELECT - 72 * col1 DIV - col0 AS col2 FROM tab0 AS cor0
----
199
258
73

skipif mysql # not compatible
query I rowsort label-1084
SELECT - 72 * col1 / - col0 AS col2 FROM tab0 AS cor0
----
199
258
73

query I rowsort
SELECT 2 AS col1 FROM tab2, tab2 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to 6d1be3904d6870ba21bc766b979d1110

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

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

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

query I rowsort
SELECT 25 * col2 AS col2 FROM tab1 AS cor0
----
1350
1425
2400

query I rowsort
SELECT ALL - 98 + + col0 AS col1 FROM tab0 AS cor0
----
-63
-74
-9

query I rowsort
SELECT - - 50 * col1 FROM tab2 AS cor0
----
1550
2950
850

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1092
SELECT - 93 * + col1 + CAST( + 40 AS SIGNED ) * col2 AS col2 FROM tab0 AS cor0
----
-5183
-6678
-8981

skipif mysql # not compatible
query I rowsort label-1092
SELECT - 93 * + col1 + CAST ( + 40 AS INTEGER ) * col2 AS col2 FROM tab0 AS cor0
----
-5183
-6678
-8981

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT col0 + - tab0.col1 * CAST ( col1 AS REAL ) FROM tab0
----
-7372
-8192
-9374

query I rowsort
SELECT - ( - 22 ) FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 7dda382e7c08428abac8600fd696eb3e

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 cor0, tab0 AS cor1, tab1 cor2
----
972 values hashing to 5621675b1bd32b061d284d0444c76601

query I rowsort
SELECT + 84 + col2 * + col1 FROM tab0 cor0
----
181
2922
7546

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

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

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

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

query I rowsort
SELECT + col2 + - 60 FROM tab1 AS cor0
----
-3
-6
36

query I rowsort
SELECT ALL col0 * 82 FROM tab1 AS cor0
----
246
5248
6560

query I rowsort
SELECT ALL col1 * 37 FROM tab0 AS cor0
----
3182
3367
3589

query I rowsort
SELECT col2 * 13 + 20 * col0 AS col0 FROM tab1 AS cor0
----
2021
2848
762

query I rowsort
SELECT DISTINCT - col2 + 71 * + cor0.col0 + + col0 AS col0 FROM tab1 AS cor0
----
162
4551
5664

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + col1 * - col2 + - col2 * tab2.col2 * 49 col1 FROM tab2
----
-34736
-36565
-71481

query I rowsort
SELECT DISTINCT col2 * col0 + - tab0.col2 + - tab0.col1 * col1 AS col2 FROM tab0
----
-1065
-6637
-9375

onlyif mysql # use DIV operator for integer division
query I rowsort label-1108
SELECT DISTINCT - col0 DIV + col0 + tab0.col0 FROM tab0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-1108
SELECT DISTINCT - col0 / + col0 + tab0.col0 FROM tab0
----
23
34
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 95 col0 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 14faa6dda52e3dfe1f5db2579c274a7e

query I rowsort
SELECT + 8 * - tab1.col0 AS col2 FROM tab1
----
-24
-512
-640

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

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

query I rowsort
SELECT col1 * col2 + + col2 AS col0 FROM tab2
----
1560
684
864

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1119
SELECT ( + col0 ) * - col2 DIV - col2 AS col2 FROM tab0 cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-1119
SELECT ( + col0 ) * - col2 / - col2 AS col2 FROM tab0 cor0
----
24
35
89

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

query I rowsort
SELECT col0 FROM tab0 WHERE - col0 * + col1 + - col0 NOT IN ( tab0.col2 )
----
24
35
89

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

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT col1 * - col0 + col1 BETWEEN col1 AND NULL
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * + col1 * + col1 col2 FROM tab2
----
-22831
-271518
-6727

query III rowsort
SELECT * FROM tab2 WHERE ( + col2 + - col1 + col1 ) NOT IN ( + tab2.col2 * col2 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

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

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

query I rowsort
SELECT - col2 + - col1 + - col0 * col2 FROM tab0
----
-133
-7471
-911

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1130
SELECT ALL + col1 * col1 - + col2 DIV - col0 FROM tab2 AS cor0
----
289
3481
964

skipif mysql # not compatible
query I rowsort label-1130
SELECT ALL + col1 * col1 - + col2 / - col0 FROM tab2 AS cor0
----
289
3481
964

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

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

query I rowsort
SELECT col0 * col0 + - col0 FROM tab2
----
42
6006
6162

query I rowsort
SELECT DISTINCT - col0 + - tab2.col2 * + col1 + + col0 FROM tab2 WHERE NOT - col0 IN ( - col2 / tab2.col0 )
----
-1534
-646
-837

query I rowsort
SELECT ALL - col1 * col1 * + col1 - col1 * - col1 FROM tab1
----
-16900
-2028
-900

query I rowsort
SELECT col1 * col1 * - col2 - - tab1.col2 AS col0 FROM tab1
----
-16128
-36450
-5643

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

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

query I rowsort
SELECT DISTINCT + col0 + + tab2.col0 - col1 FROM tab2
----
-17
141
97

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

query I rowsort
SELECT col0 * col2 + col2 + + col2 FROM tab1
----
270
3762
7872

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - col2 col0 FROM tab2 WHERE NOT ( NULL ) <> ( col2 )
----

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

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

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

query I rowsort
SELECT + col1 * + col0 * col0 - + col1 * col0 FROM tab1
----
156
40320
82160

query I rowsort
SELECT DISTINCT + col2 * col1 * col1 FROM tab0
----
244068
679042
9409

query I rowsort
SELECT DISTINCT col2 + - col2 FROM tab1 WHERE NOT NULL NOT IN ( + col1 )
----

query I rowsort
SELECT ALL + col1 - 65 FROM tab2
----
-34
-48
-6

query I rowsort
SELECT DISTINCT - col2 * 9 - - col0 FROM tab0
----
-273
-649
26

query I rowsort
SELECT DISTINCT - col1 - 48 FROM tab0
----
-134
-139
-145

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

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

query I rowsort
SELECT ALL - 29 + col2 * col0 AS col0 FROM tab2 AS cor0
----
160
1999
2973

query I rowsort
SELECT + col0 * col1 + ( - 44 ) * - col1 * - 45 + col2 AS col0 FROM tab2 AS cor0
----
-112192
-32279
-61136

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1159
SELECT col0 * 92 DIV tab0.col0 AS col1 FROM tab0
----
92
92
92

skipif mysql # not compatible
query I rowsort label-1159
SELECT col0 * 92 / tab0.col0 AS col1 FROM tab0
----
92
92
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-1160
SELECT DISTINCT + col1 + col0 DIV + col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-1160
SELECT DISTINCT + col1 + col0 / + col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL + + col0 + col2 * - ( ( - col1 ) ) FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT DISTINCT 31 * col2 + ( 42 ) - col1 FROM tab1 AS cor0
----
1690
1799
3005

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

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

query I rowsort
SELECT ALL - col0 * 33 + 32 FROM tab0 AS cor0
----
-1123
-2905
-760

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

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

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

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

query I rowsort
SELECT - 32 + cor0.col2 FROM tab0 AS cor0
----
-31
1
50

query I rowsort
SELECT DISTINCT + col1 * - 75 + col0 AS col0 FROM tab2 AS cor0
----
-1196
-2318
-4347

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

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

query I rowsort
SELECT - 61 * cor0.col2 FROM tab0 AS cor0
----
-2013
-5002
-61

query I rowsort
SELECT + col1 + + col0 * - 38 AS col1 FROM tab1 AS cor0
----
-2422
-3027
-88

query I rowsort
SELECT DISTINCT - + 66 + col1 * col2 FROM tab0 AS cor0
----
2772
31
7396

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

skipif mysql # not compatible
query I rowsort label-1176
SELECT ALL tab0.col2 / col1 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL - col2 * col0 + 2 * - col0 * col1 AS col0 FROM tab0 AS cor0
----
-23496
-4920
-6825

query I rowsort
SELECT DISTINCT - col2 - 15 FROM tab2 AS cor0
----
-41
-42
-53

query I rowsort
SELECT DISTINCT - + col0 * ( + 47 ) AS col1 FROM tab1 AS cor0
----
-141
-3008
-3760

query I rowsort
SELECT DISTINCT cor0.col1 AS col0 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
17
31
59

query I rowsort
SELECT ALL col2 * 92 FROM tab2
----
2392
2484
3496

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + col0 * cor0.col2 col2 FROM tab0 AS cor0
----
70
7387
816

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

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

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

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

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

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

query I rowsort
SELECT 95 - - col0 * - col2 FROM tab0
----
-697
-7203
60

query I rowsort
SELECT 56 - - ( - col2 ) * ( ( col0 ) ) FROM tab0
----
-7242
-736
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 1 + + 69 col2 FROM tab1
----
70
70
70

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

query I rowsort
SELECT 44 FROM tab1, tab1 cor0
----
9 values hashing to ab2bc2b9f8baa300df7755e5980a319d

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

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

query I rowsort
SELECT ( 49 ) * + cor0.col1 FROM tab1 AS cor0
----
1274
490
637

query I rowsort
SELECT ALL - col1 * + col1 + tab2.col2 * + ( col2 + - tab2.col1 ) FROM tab2
----
-1069
-4339
509

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

query I rowsort
SELECT ALL + col0 + + col2 + col2 * col0 FROM tab1
----
219
3769
7856

query I rowsort
SELECT 95 + - col0 FROM tab1 AS cor0
----
15
31
92

query I rowsort
SELECT + - ( + ( col0 ) ) * + col2 + - col1 * + col2 * + col0 - col2 FROM tab2 AS cor0
----
-121706
-54074
-6075

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1201
SELECT DISTINCT 53 DIV - cor0.col1 col1 FROM tab2 cor0
----
-1
-3
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1201
SELECT DISTINCT 53 / - cor0.col1 col1 FROM tab2 cor0
----
-1
-3
0

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

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

query I rowsort
SELECT DISTINCT + 76 AS col1 FROM tab0 AS cor0
----
76

query I rowsort
SELECT 87 + col0 + - 51 AS col1 FROM tab2 AS cor0
----
114
115
43

query I rowsort
SELECT DISTINCT - 86 * col1 + - col2 FROM tab0 AS cor0
----
-7429
-7908
-8343

onlyif mysql # use DIV operator for integer division
query I rowsort label-1207
SELECT col0 * - col1 + - ( col2 ) DIV col1 AS col1 FROM tab0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort label-1207
SELECT col0 * - col1 + - ( col2 ) / col1 AS col1 FROM tab0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-1208
SELECT ALL col1 - + 91 DIV 13 FROM tab0
----
79
84
90

skipif mysql # not compatible
query I rowsort label-1208
SELECT ALL col1 - + 91 / 13 FROM tab0
----
79
84
90

query I rowsort
SELECT ALL + col1 * - 70 FROM tab2 AS cor0
----
-1190
-2170
-4130

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * 31 col2 FROM tab2 cor0
----
1178
806
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-1211
SELECT ALL cor0.col1 - col2 DIV - col0 AS col0 FROM tab1 AS cor0
----
10
14
44

skipif mysql # not compatible
query I rowsort label-1211
SELECT ALL cor0.col1 - col2 / - col0 AS col0 FROM tab1 AS cor0
----
10
14
44

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

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

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

query I rowsort
SELECT ALL + - col1 * - 23 + cor0.col1 AS col0 FROM tab1 AS cor0
----
240
312
624

query I rowsort
SELECT DISTINCT - col1 * 50 + + col0 FROM tab1 AS cor0
----
-1297
-436
-570

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

query I rowsort
SELECT DISTINCT 40 AS col2 FROM tab2 cor0
----
40

query I rowsort
SELECT ALL ( 13 ) AS col0 FROM tab0 AS cor0
----
13
13
13

query I rowsort
SELECT ALL - 9 * col1 + + col0 + col0 FROM tab2 AS cor0
----
-265
-375
5

query I rowsort
SELECT + 5 * + col0 FROM tab2 AS cor0
----
35
390
395

onlyif mysql # use DIV operator for integer division
query I rowsort label-1221
SELECT DISTINCT 90 * 53 + - col1 DIV - col1 FROM tab1 AS cor0
----
4771

skipif mysql # not compatible
query I rowsort label-1221
SELECT DISTINCT 90 * 53 + - col1 / - col1 FROM tab1 AS cor0
----
4771

onlyif mysql # use DIV operator for integer division
query I rowsort label-1222
SELECT - cor0.col0 - 92 DIV col1 FROM tab0 AS cor0
----
-25
-35
-90

skipif mysql # not compatible
query I rowsort label-1222
SELECT - cor0.col0 - 92 / col1 FROM tab0 AS cor0
----
-25
-35
-90

query I rowsort
SELECT ALL + 59 + + 89 + cor0.col2 FROM tab0 AS cor0
----
149
181
230

query I rowsort
SELECT - 18 * 40 + col2 AS col2 FROM tab2 AS cor0
----
-682
-693
-694

onlyif mysql # use DIV operator for integer division
query I rowsort label-1225
SELECT ALL + col2 DIV cor0.col0 + - col2 FROM tab2 AS cor0
----
-24
-26
-38

skipif mysql # not compatible
query I rowsort label-1225
SELECT ALL + col2 / cor0.col0 + - col2 FROM tab2 AS cor0
----
-24
-26
-38

query I rowsort
SELECT + cor0.col1 * + ( col0 ) + + 89 AS col1 FROM tab1 AS cor0
----
1129
167
729

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

query I rowsort
SELECT + 74 + 40 * - col0 FROM tab2 AS cor0
----
-206
-3046
-3086

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

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

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

query I rowsort
SELECT ( + 96 ) - - cor0.col0 FROM tab1 AS cor0
----
160
176
99

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

query I rowsort
SELECT DISTINCT - - 69 * + col2 - cor0.col1 AS col0 FROM tab2 AS cor0
----
1735
1832
2605

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

query I rowsort
SELECT DISTINCT - 89 + - 16 + - col2 FROM tab1 AS cor0
----
-159
-162
-201

onlyif mysql # use DIV operator for integer division
query I rowsort label-1237
SELECT DISTINCT 66 DIV col0 + col0 AS col0 FROM tab2 cor0
----
16
78
79

skipif mysql # not compatible
query I rowsort label-1237
SELECT DISTINCT 66 / col0 + col0 AS col0 FROM tab2 cor0
----
16
78
79

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

skipif mysql # not compatible
query I rowsort label-1238
SELECT + col2 + - col2 * + col0 + - col2 * - CAST ( cor0.col1 AS INTEGER ) FROM tab0 AS cor0
----
2079
246
63

query I rowsort
SELECT ALL + cor0.col2 * + ( - 84 ) FROM tab1 AS cor0
----
-4536
-4788
-8064

query I rowsort
SELECT DISTINCT - col1 * - 42 FROM tab1 AS cor0
----
1092
420
546

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

query I rowsort
SELECT - col0 + + col1 * 72 + ( col2 ) AS col0 FROM tab0
----
6201
6545
6950

query I rowsort
SELECT + col2 * col2 + + ( + col1 ) FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT - cor0.col1 + + cor0.col2 * col1 * cor0.col1 FROM tab1 AS cor0
----
16211
36478
5690

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

query I rowsort
SELECT ALL + col2 * - 51 AS col0 FROM tab0
----
-1683
-4182
-51

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

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

query I rowsort
SELECT + 98 AS col2 FROM tab1, tab1 cor0
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

query I rowsort
SELECT col2 * col1 * 2 FROM tab0 AS cor0
----
14924
194
5676

query I rowsort
SELECT + 35 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

query I rowsort
SELECT ALL - - 35 + cor0.col0 FROM tab2 AS cor0
----
113
114
42

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 80 + - col2 col1 FROM tab0 AS cor0
----
-2
47
79

query I rowsort
SELECT DISTINCT + col2 + + col2 * col2 * - col1 AS col0 FROM tab0 AS cor0
----
-611802
-93621
-96

query I rowsort
SELECT ALL - 85 * col1 FROM tab0 AS cor0
----
-7310
-7735
-8245

query I rowsort
SELECT - col0 * col0 AS col2 FROM tab0 cor0
----
-1225
-576
-7921

query I rowsort
SELECT ALL + 42 * col0 + - 44 FROM tab0 AS cor0
----
1426
3694
964

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

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

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

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

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

query I rowsort
SELECT 89 + col2 FROM tab2 AS cor0
----
115
116
127

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

query I rowsort
SELECT - col0 + 77 AS col2 FROM tab1 AS cor0
----
-3
13
74

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

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

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

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

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

query I rowsort
SELECT + cor0.col1 * 80 + + 74 FROM tab1 AS cor0
----
1114
2154
874

onlyif mysql # use DIV operator for integer division
query I rowsort label-1270
SELECT - col2 * - ( cor0.col1 ) + - col0 DIV + ( col1 ) col0 FROM tab1 AS cor0
----
1242
1404
564

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1270
SELECT - col2 * - ( cor0.col1 ) + - col0 / + ( col1 ) col0 FROM tab1 AS cor0
----
1242
1404
564

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

query I rowsort
SELECT DISTINCT - 9 - 42 FROM tab1 AS cor0
----
-51

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

query I rowsort
SELECT ALL - ( 41 ) AS col2 FROM tab0 AS cor0
----
-41
-41
-41

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( + 36 AS REAL ) + col2 * 27 * + col1 + col0 FROM tab0 AS cor0
----
201527
2618
76614

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

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 cor0, tab2 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to fb3687512d3714969d7c6afc5561ed79

query I rowsort
SELECT 52 AS col2 FROM tab0, tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab0 cor2
----
243 values hashing to 168bbc8293a8c2e376fb7b7f70690cc6

query I rowsort
SELECT ALL cor1.col1 FROM tab0, tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab2 AS cor2
----
243 values hashing to c6425afc100dd55de8d45dec18c469ea

query I rowsort
SELECT DISTINCT col0 + + 80 FROM tab1
----
144
160
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-1281
SELECT + col1 DIV + 15 + col2 * tab1.col2 + - 53 FROM tab1
----
2864
3196
9163

skipif mysql # not compatible
query I rowsort label-1281
SELECT + col1 / + 15 + col2 * tab1.col2 + - 53 FROM tab1
----
2864
3196
9163

query I rowsort
SELECT col2 + - col0 * 29 AS col1 FROM tab0
----
-1014
-2499
-663

query I rowsort
SELECT col2 * 41 + + col2 FROM tab2
----
1092
1134
1596

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

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

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

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

query I rowsort
SELECT DISTINCT col0 * 63 * - tab2.col2 + col1 FROM tab2
----
-11876
-127705
-189109

query I rowsort
SELECT + + cor0.col1 * 90 AS col1 FROM tab1 AS cor0
----
1170
2340
900

query I rowsort
SELECT + col1 + - col1 - col0 FROM tab0
----
-24
-35
-89

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

query I rowsort
SELECT ALL - - 16 * col0 AS col2 FROM tab2 cor0
----
112
1248
1264

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

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

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

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

skipif mysql # not compatible
query I rowsort label-1293
SELECT + CAST ( - ( - col2 ) AS INTEGER ) * - ( - col1 ) * - col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT col0 * + col0 + col0 AS col2 FROM tab2 AS cor0
----
56
6162
6320

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

query I rowsort
SELECT col1 * - 38 + + cor0.col2 * 94 FROM tab0 AS cor0
----
-166
-3592
4250

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

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

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

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

query I rowsort
SELECT ALL + 22 * + 83 FROM tab0 AS cor0
----
1826
1826
1826

query I rowsort
SELECT ALL + 20 * col0 FROM tab2 AS cor0
----
140
1560
1580

query I rowsort
SELECT ALL - col0 * - col1 * col0 AS col2 FROM tab0 AS cor0
----
118825
49536
720811

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

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

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

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

query I rowsort
SELECT ALL + col1 * col1 + col0 AS col1 FROM tab0 AS cor0
----
7420
8370
9444

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

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

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

query I rowsort
SELECT DISTINCT - col1 * + col1 + - cor0.col1 AS col2 FROM tab0 AS cor0
----
-7482
-8372
-9506

onlyif mysql # use DIV operator for integer division
query I rowsort label-1311
SELECT DISTINCT ( - col1 ) + col0 * 85 DIV col2 AS col1 FROM tab0 AS cor0
----
-25
1
2878

skipif mysql # not compatible
query I rowsort label-1311
SELECT DISTINCT ( - col1 ) + col0 * 85 / col2 AS col1 FROM tab0 AS cor0
----
-25
1
2878

query I rowsort
SELECT 91 * + col2 + col0 FROM tab2 AS cor0
----
2444
2464
3537

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

skipif mysql # not compatible
query I rowsort label-1313
SELECT - col0 + col2 / - 92 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT 2 + tab0.col1 + col1 * 18 FROM tab0
----
1636
1731
1845

query I rowsort
SELECT - col0 + - col1 * - 52 FROM tab2 cor0
----
1605
2990
805

query I rowsort
SELECT ALL - 1 + col1 FROM tab1 AS cor0
----
12
25
9

query I rowsort
SELECT + 45 * - col0 AS col0 FROM tab0 AS cor0
----
-1080
-1575
-4005

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

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

query I rowsort
SELECT 46 * col2 AS col2 FROM tab1 AS cor0
----
2484
2622
4416

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

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

query I rowsort
SELECT - - 48 * + col0 AS col0 FROM tab1 AS cor0
----
144
3072
3840

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - col2 * 66 AS col1 FROM tab2 AS cor0
----
-1716
-1782
-2508

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

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

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

skipif mysql # not compatible
query I rowsort
SELECT ALL - col2 + CAST ( + col2 AS REAL ) FROM tab2 cor0
----
0
0
0

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

query I rowsort
SELECT DISTINCT col0 * col1 + ( + col2 * col0 ) FROM tab1 cor0
----
240
4288
8720

query I rowsort
SELECT + col0 + + 76 * - cor0.col0 AS col2 FROM tab2 AS cor0
----
-525
-5850
-5925

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1336
SELECT ALL + col2 * CAST ( - ( col2 ) AS INTEGER ) col1 FROM tab1 AS cor0
----
-2916
-3249
-9216

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

skipif mysql # not compatible
query I rowsort label-1337
SELECT ALL col1 / - col0 FROM tab1
----
-8
0
0

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

query I rowsort
SELECT ALL tab2.col0 + 78 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 447dd2aaff0aa377f4e2bad5139814b8

query I rowsort
SELECT ALL 47 AS col1 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 3f991632e9c7c5142e1d80857cd10a2d

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

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

query I rowsort
SELECT + + col0 * 43 AS col2 FROM tab0 cor0
----
1032
1505
3827

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

query I rowsort
SELECT ( + cor1.col0 ) FROM tab0 AS cor0 CROSS JOIN tab1, tab1 cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * ( 82 ) col2 FROM tab1 AS cor0
----
-1066
-2132
-820

query I rowsort
SELECT DISTINCT - col1 + ( - 70 ) * col2 * col2 AS col1 FROM tab0
----
-167
-470771
-76316

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1349
SELECT + CAST( ( - col1 ) AS SIGNED ) AS col2 FROM tab2
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-1349
SELECT + CAST ( ( - col1 ) AS INTEGER ) AS col2 FROM tab2
----
-17
-31
-59

query I rowsort
SELECT ALL - ( - col0 ) * col2 + + col0 * + col0 FROM tab1 cor0
----
14080
171
7744

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

query I rowsort
SELECT - 60 AS col1 FROM tab1, tab1 AS cor0, tab1 cor1
----
27 values hashing to 1a0b29f8e6f82c54623a665ba4af8fd1

query I rowsort
SELECT 97 * + col1 + - col1 FROM tab0
----
8256
8736
9312

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

query I rowsort
SELECT 67 + col1 AS col1 FROM tab0
----
153
158
164

onlyif mysql # use DIV operator for integer division
query I rowsort label-1356
SELECT col0 DIV col1 + ( ( - col0 ) + tab0.col1 ) AS col0 FROM tab0
----
2
62
62

skipif mysql # not compatible
query I rowsort label-1356
SELECT col0 / col1 + ( ( - col0 ) + tab0.col1 ) AS col0 FROM tab0
----
2
62
62

query I rowsort
SELECT 88 + col1 AS col1 FROM tab1
----
101
114
98

query I rowsort
SELECT ALL - + col0 * col2 + + 8 AS col2 FROM tab0 AS cor0
----
-27
-7290
-784

onlyif mysql # use DIV operator for integer division
query I rowsort label-1359
SELECT ( - col0 ) DIV - 26 AS col1 FROM tab1 AS cor0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-1359
SELECT ( - col0 ) / - 26 AS col1 FROM tab1 AS cor0
----
0
2
3

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0, tab2 cor1, tab1 cor2
----
972 values hashing to 4634d10e8b6b37510bb99745aade36ab

onlyif mysql # use DIV operator for integer division
query I rowsort label-1361
SELECT DISTINCT + col0 * - col1 + col2 DIV 22 + col0 FROM tab1 AS cor0
----
-574
-73
-956

skipif mysql # not compatible
query I rowsort label-1361
SELECT DISTINCT + col0 * - col1 + col2 / 22 + col0 FROM tab1 AS cor0
----
-574
-73
-956

query I rowsort
SELECT DISTINCT + 51 * - col1 * + col0 AS col0 FROM tab0 AS cor0
----
-105264
-173145
-413049

query I rowsort
SELECT ALL - - 27 + cor0.col0 AS col2 FROM tab1 AS cor0
----
107
30
91

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1364
SELECT + - col0 / - col2 col1 FROM tab0 AS cor0
----
0
1
35

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

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

query I rowsort
SELECT DISTINCT 76 * - col0 AS col2 FROM tab1 AS cor0
----
-228
-4864
-6080

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

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

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

query I rowsort
SELECT + + ( cor0.col2 ) * - cor0.col2 + 25 AS col2 FROM tab2 AS cor0
----
-1419
-651
-704

query I rowsort
SELECT DISTINCT - col0 * + 69 FROM tab0 AS cor0
----
-1656
-2415
-6141

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

query I rowsort
SELECT + 81 - col0 FROM tab2 cor0
----
2
3
74

query I rowsort
SELECT - + col2 + cor0.col1 * - col0 * col2 FROM tab2 AS cor0
----
-119678
-51072
-5886

query I rowsort
SELECT DISTINCT ( + tab1.col2 * col0 ) + col0 * + col1 AS col1 FROM tab1
----
240
4288
8720

query I rowsort
SELECT + - col2 + - col2 AS col1 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT - - 54 FROM tab2 cor0
----
54
54
54

onlyif mysql # use DIV operator for integer division
query I rowsort label-1379
SELECT ALL + col1 DIV + 56 + col2 * - col1 AS col2 FROM tab2 AS cor0
----
-1533
-646
-837

skipif mysql # not compatible
query I rowsort label-1379
SELECT ALL + col1 / + 56 + col2 * - col1 AS col2 FROM tab2 AS cor0
----
-1533
-646
-837

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

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

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

query I rowsort
SELECT ALL 10 + + 46 FROM tab2, tab0 AS cor0
----
9 values hashing to 9c4523312174730bbc525b9977aa99fa

query I rowsort
SELECT ALL - + col1 + - 11 + + 22 * + cor0.col2 FROM tab2 AS cor0
----
502
552
808

query I rowsort
SELECT ALL - col1 * - col0 + col1 * col1 AS col1 FROM tab0 AS cor0
----
12804
16380
9460

query I rowsort
SELECT DISTINCT - 84 FROM tab0, tab0 AS cor0
----
-84

query I rowsort
SELECT - 78 * + 92 AS col1 FROM tab2 AS cor0
----
-7176
-7176
-7176

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 28 + + 24 col2 FROM tab0 AS cor0
----
-4
-4
-4

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

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

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

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

query I rowsort
SELECT DISTINCT - - 13 * col1 FROM tab2 AS cor0
----
221
403
767

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

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

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

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

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

query I rowsort
SELECT DISTINCT - ( - 27 ) FROM tab1
----
27

query I rowsort
SELECT - 89 AS col2 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to c36e597b7bc5727536f5bb580e6cebbc

query I rowsort
SELECT DISTINCT col2 * + 42 + - 51 AS col2 FROM tab0 AS cor0
----
-9
1335
3393

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

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

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

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

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

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

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

query I rowsort
SELECT + + col2 * + 80 AS col2 FROM tab2 AS cor0
----
2080
2160
3040

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

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

query I rowsort
SELECT ALL 3 * + col0 AS col2 FROM tab0
----
105
267
72

query I rowsort
SELECT 97 * + col2 FROM tab1 cor0
----
5238
5529
9312

query I rowsort
SELECT + 15 * + col2 * - col2 FROM tab0 cor0
----
-100860
-15
-16335

query I rowsort
SELECT - col1 + col0 * + col0 + + col0 * tab2.col2 AS col0 FROM tab2
----
207
8053
9226

query I rowsort
SELECT col2 * col2 - - col2 FROM tab0
----
1122
2
6806

onlyif mysql # use DIV operator for integer division
query I rowsort label-1413
SELECT ALL 41 - col2 DIV - col0 col2 FROM tab0
----
41
41
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1413
SELECT ALL 41 - col2 / - col0 col2 FROM tab0
----
41
41
42

query I rowsort
SELECT + tab2.col0 * + col2 * - col2 + + col1 AS col2 FROM tab2
----
-114059
-5072
-52669

query I rowsort
SELECT ALL + col1 - tab1.col1 * + tab1.col0 FROM tab1
----
-1027
-52
-630

query I rowsort
SELECT 22 * col0 FROM tab0
----
1958
528
770

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + 14 - col0 * col0 col1 FROM tab0
----
-6647
133
628

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - + col0 + - col1 * + cor0.col0 * col0 AS col2 FROM tab1 cor0
----
-237
-41024
-83280

query I rowsort
SELECT ALL - 76 * col2 * - col2 + col1 * - col0 AS col1 FROM tab2 AS cor0
----
108401
46774
55187

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

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

query I rowsort
SELECT col1 * cor0.col0 + - col1 * col2 * col0 FROM tab1 AS cor0
----
-35840
-4134
-98800

query I rowsort
SELECT - col2 * cor0.col1 + + col0 + col0 * cor0.col2 FROM tab0 AS cor0
----
-2022
-27
-75

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

skipif mysql # not compatible
query I rowsort label-1430
SELECT ALL - + 2 / + col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - 68 + + col0 AS col1 FROM tab2 AS cor0
----
-61
10
11

query I rowsort
SELECT + 80 * cor0.col2 AS col0 FROM tab0 AS cor0
----
2640
6560
80

query I rowsort
SELECT col0 - - 12 FROM tab1
----
15
76
92

query I rowsort
SELECT col1 * 30 + col0 AS col0 FROM tab0
----
2604
2819
2945

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + 20 col1 FROM tab2 AS cor0
----
46
47
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col1 ) * + col2 + col1 * cor0.col1 + col1 col1 FROM tab2 cor0
----
1829
5074
952

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

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

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

query I rowsort
SELECT - - 15 + + 0 FROM tab0 cor0
----
15
15
15

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

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

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

skipif mysql # not compatible
query I rowsort label-1443
SELECT + - CAST ( + col0 AS INTEGER ) * col2 * col1 AS col1 FROM tab1 cor0
----
-36480
-4212
-99840

query I rowsort
SELECT ALL + col1 + + col1 + col0 * - col1 * - col0 FROM tab0 AS cor0
----
119019
49708
720993

onlyif mysql # use DIV operator for integer division
query I rowsort label-1445
SELECT DISTINCT - ( 63 ) DIV col1 AS col2 FROM tab1 AS cor0
----
-2
-4
-6

skipif mysql # not compatible
query I rowsort label-1445
SELECT DISTINCT - ( 63 ) / col1 AS col2 FROM tab1 AS cor0
----
-2
-4
-6

query I rowsort
SELECT DISTINCT + 49 AS col1 FROM tab2 AS cor0
----
49

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

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

query I rowsort
SELECT ALL col1 * - cor0.col1 + - col0 * col2 AS col0 FROM tab1 AS cor0
----
-3748
-7849
-838

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

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

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

skipif mysql # not compatible
query I rowsort label-1452
SELECT DISTINCT - col0 * col2 / - col2 AS col0 FROM tab1 cor0
----
3
64
80

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

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

query I rowsort
SELECT - col0 + tab1.col1 AS col2 FROM tab1
----
-54
-67
23

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

query I rowsort
SELECT ALL + tab1.col0 * - tab1.col0 FROM tab2, tab2 AS cor0 CROSS JOIN tab1
----
27 values hashing to 151b2942c50caff563eede8bd3674ac1

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1460
SELECT + cor0.col1 + col2 DIV col2 + + cor0.col0 FROM tab1 AS cor0
----
30
75
94

skipif mysql # not compatible
query I rowsort label-1460
SELECT + cor0.col1 + col2 / col2 + + cor0.col0 FROM tab1 AS cor0
----
30
75
94

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

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

query I rowsort
SELECT DISTINCT - cor0.col2 * - cor0.col1 + col2 AS col0 FROM tab2 AS cor0
----
1560
684
864

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

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

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

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

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

query I rowsort
SELECT DISTINCT - 99 * col0 - col1 FROM tab2 AS cor0
----
-724
-7781
-7838

query I rowsort
SELECT ALL - - 62 * col0 AS col2 FROM tab1 AS cor0
----
186
3968
4960

query I rowsort
SELECT ALL - col0 * - col1 * ( - col1 ) AS col1 FROM tab0 AS cor0
----
-177504
-329315
-737009

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1471
SELECT ALL + CAST( NULL AS SIGNED ) * 65 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-1471
SELECT ALL + CAST ( NULL AS INTEGER ) * 65 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL - 84 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 02f1688b8610806ca28739b1735f6ae4

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1474
SELECT + col2 * ( + 18 + cor0.col1 ) DIV - 17 FROM tab0 cor0
----
-201
-525
-6

skipif mysql # not compatible
query I rowsort label-1474
SELECT + col2 * ( + 18 + cor0.col1 ) / - 17 FROM tab0 cor0
----
-201
-525
-6

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

query I rowsort
SELECT DISTINCT 30 * - cor0.col2 FROM tab0, tab2 AS cor0
----
-1140
-780
-810

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

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

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

query I rowsort
SELECT - cor0.col2 * + 79 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 781a47a666b0e97655a5b19d853bc693

onlyif mysql # use DIV operator for integer division
query I rowsort label-1481
SELECT + 96 + + col0 DIV - col2 col0 FROM tab1 AS cor0
----
95
96
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1481
SELECT + 96 + + col0 / - col2 col0 FROM tab1 AS cor0
----
95
96
96

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

query I rowsort
SELECT ALL - 12 + 31 * cor0.col2 FROM tab2 AS cor0
----
1166
794
825

query I rowsort
SELECT + - 60 + cor0.col2 FROM tab1 AS cor0
----
-3
-6
36

query I rowsort
SELECT + + ( + col1 ) * - ( - 73 ) FROM tab1 AS cor0
----
1898
730
949

query I rowsort
SELECT DISTINCT col0 * col0 + + col1 * + col2 FROM tab2 AS cor0
----
6887
7618
886

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 92 + + col2 col0 FROM tab2 AS cor0
----
-54
-65
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 69 + + col2 * 78 col2 FROM tab2
----
2097
2175
3033

query I rowsort
SELECT ALL - 0 * col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT ( 96 ) AS col0 FROM tab0, tab1 AS cor0
----
96

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

skipif mysql # not compatible
query I rowsort label-1495
SELECT DISTINCT - + col2 * CAST ( - col0 AS INTEGER ) - - col0 * - col1 AS col0 FROM tab0 AS cor0
----
-1272
-3360
-801

query I rowsort
SELECT + col0 + + col1 + col2 * + col0 AS col1 FROM tab2 cor0
----
2165
227
3098

query I rowsort
SELECT DISTINCT + col1 * 51 FROM tab0 cor0
----
4386
4641
4947

query I rowsort
SELECT ALL + cor0.col1 + - 61 FROM tab1 AS cor0
----
-35
-48
-51

query I rowsort
SELECT col1 * - 69 AS col1 FROM tab2 AS cor0
----
-1173
-2139
-4071

query I rowsort
SELECT ALL - cor0.col0 + 66 + cor0.col2 * + col1 AS col2 FROM tab1 AS cor0
----
1234
1467
572

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 3 + col2 + - col1 col0 FROM tab2
----
-1
-30
24

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

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

query I rowsort
SELECT 1 - col2 AS col1 FROM tab2
----
-25
-26
-37

onlyif mysql # use DIV operator for integer division
query I rowsort label-1504
SELECT col2 - col1 DIV - col1 AS col2 FROM tab1
----
55
58
97

skipif mysql # not compatible
query I rowsort label-1504
SELECT col2 - col1 / - col1 AS col2 FROM tab1
----
55
58
97

query I rowsort
SELECT + col0 * - 38 + col1 * ( + col2 ) FROM tab1 cor0
----
-1792
-1862
1290

onlyif mysql # use DIV operator for integer division
query I rowsort label-1506
SELECT - + col1 * col1 - - cor0.col0 DIV + col0 FROM tab0 cor0
----
-7395
-8280
-9408

skipif mysql # not compatible
query I rowsort label-1506
SELECT - + col1 * col1 - - cor0.col0 / + col0 FROM tab0 cor0
----
-7395
-8280
-9408

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1509
SELECT - col0 + + col0 DIV 84 FROM tab1
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-1509
SELECT - col0 + + col0 / 84 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT DISTINCT - col0 + - col1 * 68 * col0 FROM tab1
----
-43584
-5307
-70800

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

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

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

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

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

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

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

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

query I rowsort
SELECT + col1 + 69 * col2 AS col2 FROM tab0 AS cor0
----
166
2363
5749

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 - + col1 col0 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT 10 - 38 AS col0 FROM tab0 cor0
----
-28
-28
-28

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1520
SELECT CAST ( + tab1.col0 AS INTEGER ) col0 FROM tab1
----
3
64
80

query I rowsort
SELECT + 36 * + col1 * col2 AS col2 FROM tab2 AS cor0
----
23256
30132
55224

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-1523
SELECT DISTINCT + + 36 * col1 - col2 DIV col1 FROM tab0 AS cor0
----
3096
3276
3492

skipif mysql # not compatible
query I rowsort label-1523
SELECT DISTINCT + + 36 * col1 - col2 / col1 FROM tab0 AS cor0
----
3096
3276
3492

query I rowsort
SELECT DISTINCT - + ( col2 ) * col2 + 97 FROM tab2 AS cor0
----
-1347
-579
-632

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

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

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

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

query I rowsort
SELECT DISTINCT + col0 * 79 AS col0 FROM tab2 AS cor0
----
553
6162
6241

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 * - 28 col2 FROM tab2 AS cor0
----
-1652
-476
-868

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

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( col0 AS REAL ) * col0 FROM tab0 AS cor0
----
-1225
-576
-7921

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

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

query I rowsort
SELECT - 96 + col2 * + col1 - cor0.col1 AS col1 FROM tab1 AS cor0
----
1139
1282
464

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

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

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

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

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

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

query I rowsort
SELECT - col2 * + 92 + + col1 AS col1 FROM tab2
----
-2333
-2453
-3479

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT - col2 * + ( col0 ) + cor0.col1 + ( - cor0.col2 ) FROM tab2 cor0
----
-185
-1995
-3023

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

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

skipif mysql # not compatible
query I rowsort label-1548
SELECT DISTINCT + col1 / - col2 AS col2 FROM tab0 AS cor0
----
-1
-2
-97

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

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

query I rowsort
SELECT DISTINCT col2 * col2 * col1 + + 98 * - col1 + col1 FROM tab0
----
-9312
603057
85312

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

query I rowsort
SELECT ALL - - col0 * 75 AS col0 FROM tab1 AS cor0
----
225
4800
6000

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

skipif mysql # not compatible
query I rowsort label-1554
SELECT + - col0 / - ( 14 ) FROM tab2 AS cor0
----
0
5
5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1555
SELECT col0 * - CAST( - col1 AS SIGNED ) col0 FROM tab1
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1555
SELECT col0 * - CAST ( - col1 AS INTEGER ) col0 FROM tab1
----
1040
640
78

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

query I rowsort
SELECT + col2 + 31 * cor0.col1 AS col0 FROM tab0 AS cor0
----
2699
2903
3008

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

query I rowsort
SELECT DISTINCT - 28 * + col0 * col2 AS col2 FROM tab1 AS cor0
----
-102144
-215040
-4536

query I rowsort
SELECT + cor0.col2 * 94 AS col1 FROM tab2 cor0
----
2444
2538
3572

query I rowsort
SELECT DISTINCT + col2 * 29 FROM tab1 cor0
----
1566
1653
2784

query I rowsort
SELECT DISTINCT + 68 AS col0 FROM tab1, tab1 AS cor0
----
68

onlyif mysql # use DIV operator for integer division
query I rowsort label-1563
SELECT cor0.col1 * + col1 DIV col1 AS col2 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-1563
SELECT cor0.col1 * + col1 / col1 AS col2 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL + + 29 + - cor0.col2 AS col2 FROM tab2 AS cor0
----
-9
2
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1565
SELECT ALL CAST( ( col0 ) AS SIGNED ) * + col1 FROM tab1 AS cor0
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-1565
SELECT ALL CAST ( ( col0 ) AS INTEGER ) * + col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - ( - 66 ) + col0 FROM tab1 AS cor0
----
130
146
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-1567
SELECT + col1 DIV col1 AS col0 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1567
SELECT + col1 / col1 AS col0 FROM tab0
----
1
1
1

query I rowsort
SELECT 83 AS col1 FROM tab0 cor0
----
83
83
83

query I rowsort
SELECT ALL - col0 + tab1.col0 * + 19 AS col1 FROM tab1
----
1152
1440
54

query I rowsort
SELECT DISTINCT - + col0 * + col2 + - col1 + - col2 FROM tab0 cor0
----
-133
-7471
-911

query I rowsort
SELECT ALL - + col0 - + col0 AS col1 FROM tab2 AS cor0
----
-14
-156
-158

onlyif mysql # use DIV operator for integer division
query I rowsort label-1572
SELECT + col0 DIV - col2 + 2 * col0 FROM tab0 AS cor0
----
177
35
48

skipif mysql # not compatible
query I rowsort label-1572
SELECT + col0 / - col2 + 2 * col0 FROM tab0 AS cor0
----
177
35
48

onlyif mysql # use DIV operator for integer division
query I rowsort label-1573
SELECT DISTINCT + - col2 + col2 DIV col2 AS col0 FROM tab1 AS cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-1573
SELECT DISTINCT + - col2 + col2 / col2 AS col0 FROM tab1 AS cor0
----
-53
-56
-95

query I rowsort
SELECT ALL col0 * - col1 + - col0 FROM tab0 cor0
----
-2088
-3430
-8188

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1575
SELECT - col0 * col2 - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1575
SELECT - col0 * col2 - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 * col2 - + cor0.col1 FROM tab2 cor0
----
158
1969
2985

query I rowsort
SELECT ALL - + cor0.col2 + col0 AS col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT + - 14 + col1 FROM tab0 AS cor0
----
72
77
83

query I rowsort
SELECT DISTINCT - col1 + col2 * col1 * - cor0.col2 FROM tab1 AS cor0
----
-119821
-32500
-75842

query I rowsort
SELECT DISTINCT - - col2 * + col1 + - 85 FROM tab0 AS cor0
----
12
2753
7377

query I rowsort
SELECT - 97 + col0 FROM tab0 AS cor0
----
-62
-73
-8

query I rowsort
SELECT ALL - + col1 * 95 * - col1 FROM tab0 AS cor0
----
702620
786695
893855

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0, tab0 cor1, tab2 AS cor2
----
972 values hashing to 591a9a93560839231c038a1e10bd240a

query I rowsort
SELECT ALL col1 * + 39 + col1 * col1 FROM tab1 AS cor0
----
1690
490
676

query I rowsort
SELECT col1 * - 81 + - col2 * + col1 * - 54 FROM tab0 AS cor0
----
-2619
146286
395577

query I rowsort
SELECT ALL - + ( + cor0.col2 ) FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

query I rowsort
SELECT + ( + col0 ) * ( - col2 ) + - col2 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT + 86 * + col2 + ( col2 ) FROM tab1 AS cor0
----
4698
4959
8352

query I rowsort
SELECT + - col0 + col1 * ( col0 ) FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT tab0.col2 * + 9 AS col2 FROM tab0
----
297
738
9

query I rowsort
SELECT ALL tab1.col1 AS col0 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT ALL 61 * col2 AS col0 FROM tab1
----
3294
3477
5856

query I rowsort
SELECT + 89 AS col2 FROM tab0 AS cor0
----
89
89
89

query I rowsort
SELECT - col2 * - col1 + 70 AS col2 FROM tab1 AS cor0
----
1318
1474
640

query I rowsort
SELECT ALL 20 * + col2 FROM tab2
----
520
540
760

query I rowsort
SELECT - col1 + col1 * - cor0.col2 + - 3 * col1 FROM tab0 AS cor0
----
-3182
-485
-7826

query I rowsort
SELECT col2 * 72 FROM tab1
----
3888
4104
6912

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 CROSS JOIN tab1, tab1 cor1, tab0 AS cor2, tab0 AS cor3
----
3645 values hashing to 750b3c1b743e18f68d402d034647fcf2

onlyif mysql # use DIV operator for integer division
query I rowsort label-1599
SELECT DISTINCT col1 DIV - 91 AS col0 FROM tab0
----
-1
0

skipif mysql # not compatible
query I rowsort label-1599
SELECT DISTINCT col1 / - 91 AS col0 FROM tab0
----
-1
0

query I rowsort
SELECT DISTINCT - col1 * col0 + col1 FROM tab2 cor0
----
-1326
-186
-4543

query I rowsort
SELECT ALL + cor0.col0 FROM tab0, tab0 cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * cor0.col0 + + col0 col2 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT + + col2 * 30 AS col2 FROM tab1 AS cor0
----
1620
1710
2880

onlyif mysql # use DIV operator for integer division
query I rowsort label-1604
SELECT 73 DIV col2 + + col2 * + col0 - - tab1.col0 FROM tab1
----
166
3713
7760

skipif mysql # not compatible
query I rowsort label-1604
SELECT 73 / col2 + + col2 * + col0 - - tab1.col0 FROM tab1
----
166
3713
7760

query I rowsort
SELECT DISTINCT tab2.col1 - col0 FROM tab2
----
-19
-62
24

query I rowsort
SELECT + col2 * 42 * + col0 AS col0 FROM tab0
----
1470
306516
33264

query I rowsort
SELECT - ( - col1 ) * col2 + col0 FROM tab2 cor0
----
1612
725
844

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1608
SELECT - CAST( NULL AS SIGNED ) * col2 - - col2 * col1 * - col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1608
SELECT - CAST ( NULL AS INTEGER ) * col2 - - col2 * col1 * - col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col1 * - col2 + - 43 FROM tab0 AS cor0
----
2795
54
7419

query I rowsort
SELECT ALL + col2 + col0 AS col0 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT col2 + - col1 + col2 FROM tab2 AS cor0
----
-7
23
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1612
SELECT - col0 + cor0.col0 + - CAST( NULL AS SIGNED ) * + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1612
SELECT - col0 + cor0.col0 + - CAST ( NULL AS INTEGER ) * + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 * ( - col2 ) + col1 * - col0 FROM tab0 AS cor0
----
-15397
-2856
-3430

query I rowsort
SELECT - 1 AS col0 FROM tab2, tab0 cor0, tab1 cor1
----
27 values hashing to 84da757b1b7b0069ce25607f39bc08d9

query I rowsort
SELECT - col0 * - 36 FROM tab2 AS cor0
----
252
2808
2844

query I rowsort
SELECT DISTINCT - col0 * + col0 * col0 FROM tab2 AS cor0
----
-343
-474552
-493039

query I rowsort
SELECT + col1 + - 44 AS col0 FROM tab2 AS cor0
----
-13
-27
15

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1618
SELECT ALL CAST( NULL AS SIGNED ) + 79 FROM tab1, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-1618
SELECT ALL CAST ( NULL AS INTEGER ) + 79 FROM tab1, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT 21 * - col1 AS col1 FROM tab0 AS cor0
----
-1806
-1911
-2037

query I rowsort
SELECT DISTINCT + 11 * col2 + + col0 * ( 7 ) FROM tab2 AS cor0
----
346
832
971

query I rowsort
SELECT DISTINCT - 33 * - col0 + + col0 * ( + 75 ) FROM tab0 AS cor0
----
2592
3780
9612

query I rowsort
SELECT col2 - - col0 AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT ( + 90 ) + tab2.col1 AS col2 FROM tab2, tab2 AS cor0
----
107
121
149

query I rowsort
SELECT - ( - col2 ) AS col2 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT + 38 + col0 FROM tab0
----
127
62
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + + cor0.col1 - + col2 col1 FROM tab1 AS cor0
----
-25
-3
17

query I rowsort
SELECT + 32 * col1 + - cor0.col2 AS col2 FROM tab0 AS cor0
----
2719
2830
3103

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col0 col0 FROM tab0 cor0
----
-24
-35
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1629
SELECT col1 + col2 * - CAST( NULL AS DECIMAL ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1629
SELECT col1 + col2 * - CAST ( NULL AS REAL ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col0 * - col0 * 10 FROM tab1 AS cor0
----
40960
64000
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 26 + - col2 col1 FROM tab0 cor0
----
-108
-27
-59

query I rowsort
SELECT ALL col0 * col0 + ( col1 ) FROM tab2 AS cor0
----
6143
6258
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1633
SELECT DISTINCT + col2 + CAST( NULL AS SIGNED ) / col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1633
SELECT DISTINCT + col2 + CAST ( NULL AS INTEGER ) / col2 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * 32 + - 9 col0 FROM tab2 AS cor0
----
1879
535
983

query I rowsort
SELECT ALL - col0 * + ( 84 ) AS col2 FROM tab0 AS cor0
----
-2016
-2940
-7476

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1636
SELECT ALL - col1 * col1 + + ( col1 ) * - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1636
SELECT ALL - col1 * col1 + + ( col1 ) * - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - col1 * 29 FROM tab0 AS cor0
----
2494
2639
2813

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 - + cor0.col1 * + 87 col2 FROM tab1 AS cor0
----
-1051
-2259
-806

query I rowsort
SELECT + col0 + col2 * ( col0 ) FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT DISTINCT col2 * + 69 + + ( col2 ) * col1 AS col0 FROM tab0 AS cor0
----
13120
166
5115

query I rowsort
SELECT 57 + + col1 * - tab0.col1 AS col0 FROM tab0
----
-7339
-8224
-9352

query I rowsort
SELECT ( - col0 ) + ( + ( + col0 ) + col1 ) * - 62 FROM tab2
----
-2363
-6031
-8572

query I rowsort
SELECT ALL col1 + - 70 + 66 FROM tab1 AS cor0
----
22
6
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 55 - col1 * col0 col1 FROM tab2 AS cor0
----
-1288
-162
-4547

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1645
SELECT ALL CAST( NULL AS SIGNED ) - 79 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1645
SELECT ALL CAST ( NULL AS INTEGER ) - 79 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 + col2 * col0 * - col2 col2 FROM tab2 AS cor0
----
-114059
-5072
-52669

query I rowsort
SELECT col0 * col0 + + col2 FROM tab2 AS cor0
----
6110
6279
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-1648
SELECT DISTINCT ( col1 ) DIV - col2 + - col0 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-1648
SELECT DISTINCT ( col1 ) / - col2 + - col0 FROM tab1 AS cor0
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col2 ) * col2 col0 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT 7 * 11 AS col2 FROM tab0 AS cor0
----
77
77
77

query I rowsort
SELECT - 91 * 32 AS col0 FROM tab2 AS cor0
----
-2912
-2912
-2912

query I rowsort
SELECT DISTINCT + + col1 * ( + col2 * col1 ) + col2 * col1 FROM tab1 AS cor0
----
17472
37908
6270

query I rowsort
SELECT ALL col0 + 21 AS col2 FROM tab2 AS cor0
----
100
28
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col2 ) + + cor0.col2 * cor0.col0 * cor0.col1 col1 FROM tab0 AS cor0
----
3394
664036
68079

query I rowsort
SELECT ALL + 88 AS col2 FROM tab0, tab2 cor0
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

query I rowsort
SELECT + col0 * 76 AS col2 FROM tab1
----
228
4864
6080

onlyif mysql # use DIV operator for integer division
query I rowsort label-1657
SELECT ALL - col1 DIV - 30 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1657
SELECT ALL - col1 / - 30 FROM tab1
----
0
0
0

query I rowsort
SELECT col2 * col0 + - cor0.col1 + - 88 FROM tab2 AS cor0
----
1881
2897
70

query I rowsort
SELECT - ( - col0 + - col2 * tab2.col2 ) FROM tab2
----
1523
736
754

query I rowsort
SELECT col2 + - cor0.col2 + + ( col1 ) AS col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL - - 12 FROM tab0 cor0
----
12
12
12

query I rowsort
SELECT ALL 61 FROM tab0, tab1 cor0
----
9 values hashing to 07149905a72bd87553381f34d19ed290

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col1 * - tab1.col1 + - col0 col2 FROM tab1
----
-164
-249
-679

query I rowsort
SELECT - cor0.col1 * - col2 + - col1 * - col0 FROM tab2 cor0
----
1054
1989
6136

query I rowsort
SELECT cor0.col2 * col2 AS col0 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT + 83 + col2 + + col2 * - 44 AS col2 FROM tab0 cor0
----
-1336
-3443
40

query I rowsort
SELECT 93 * cor0.col1 - - col2 FROM tab0 AS cor0
----
8031
8545
9022

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1668
SELECT - + 89 + col2 * CAST( NULL AS SIGNED ) / col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1668
SELECT - + 89 + col2 * CAST ( NULL AS INTEGER ) / col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 34 + col0 + + col0 AS col0 FROM tab1
----
-28
126
94

query I rowsort
SELECT + ( - col2 + + col2 * col2 ) FROM tab0
----
0
1056
6642

query I rowsort
SELECT ( - tab1.col1 ) + - col1 * + col0 + col0 AS col2 FROM tab1
----
-101
-586
-973

query I rowsort
SELECT DISTINCT + ( col1 ) * col2 + 57 + col2 AS col2 FROM tab1
----
1401
1515
684

query I rowsort
SELECT DISTINCT 47 + 67 AS col0 FROM tab2
----
114

query I rowsort
SELECT - col0 + col2 - - col0 FROM tab0
----
1
33
82

query I rowsort
SELECT + col2 * 56 FROM tab0
----
1848
4592
56

query I rowsort
SELECT DISTINCT 29 AS col1 FROM tab2
----
29

query I rowsort
SELECT - - 23 * col1 FROM tab1 AS cor0
----
230
299
598

query I rowsort
SELECT DISTINCT - + 71 * col2 AS col2 FROM tab0 AS cor0
----
-2343
-5822
-71

query I rowsort
SELECT - + 26 * col1 AS col2 FROM tab2 cor0
----
-1534
-442
-806

query I rowsort
SELECT DISTINCT ( + col1 ) * - 82 + 49 FROM tab0 AS cor0
----
-7003
-7413
-7905

query I rowsort
SELECT - col1 * col2 + - 31 FROM tab1 AS cor0
----
-1279
-1435
-601

query I rowsort
SELECT 96 * - col0 FROM tab1 AS cor0
----
-288
-6144
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 + col2 col0 FROM tab2 cor0
----
52
54
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-1684
SELECT DISTINCT col1 DIV 47 AS col1 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-1684
SELECT DISTINCT col1 / 47 AS col1 FROM tab1
----
0

query I rowsort
SELECT col0 - + 24 * col0 AS col2 FROM tab0
----
-2047
-552
-805

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 cor0 CROSS JOIN tab0, tab2 AS cor1, tab2, tab0 AS cor2
----
3645 values hashing to 52c9380a39df7a744b9f2f2c5bf55dd5

query I rowsort
SELECT DISTINCT + - cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
-17
-31
-59

query I rowsort
SELECT DISTINCT + col0 + col0 * + 3 AS col1 FROM tab0 AS cor0
----
140
356
96

query I rowsort
SELECT DISTINCT col1 + - 19 FROM tab0 AS cor0
----
67
72
78

query I rowsort
SELECT ALL + - col0 + + ( 62 ) AS col1 FROM tab1 AS cor0
----
-18
-2
59

query I rowsort
SELECT DISTINCT col1 + ( + cor0.col2 ) - col0 * col1 * + col2 FROM tab1 AS cor0
----
-36413
-4132
-99731

query I rowsort
SELECT col0 * col2 - + col2 AS col2 FROM tab1 AS cor0
----
108
3591
7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-1693
SELECT - 96 DIV - ( col1 ) FROM tab1
----
3
7
9

skipif mysql # not compatible
query I rowsort label-1693
SELECT - 96 / - ( col1 ) FROM tab1
----
3
7
9

query I rowsort
SELECT ALL - 64 AS col0 FROM tab0 AS cor0
----
-64
-64
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( col2 ) col0 FROM tab0 AS cor0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-1696
SELECT DISTINCT ( - 97 ) DIV col2 AS col2 FROM tab0 AS cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-1696
SELECT DISTINCT ( - 97 ) / col2 AS col2 FROM tab0 AS cor0
----
-1
-2
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-1697
SELECT + - ( col1 ) DIV - col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1697
SELECT + - ( col1 ) / - col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + col0 * - 32 + + col0 FROM tab0 AS cor0
----
-1085
-2759
-744

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * 88 + 69 * + col0 col2 FROM tab2 AS cor0
----
1099
12246
12403

query IIIIIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab2, tab2 AS cor2, tab1
----
13122 values hashing to b4b4e789b5891936f0d1957806addc92

onlyif mysql # use DIV operator for integer division
query I rowsort label-1701
SELECT - + col2 DIV 81 + col1 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-1701
SELECT - + col2 / 81 + col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL - col1 * 0 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - + col2 + 9 AS col1 FROM tab2 AS cor0
----
-17
-18
-29

query I rowsort
SELECT + col1 * + cor0.col0 * - col0 + - col2 FROM tab2 AS cor0
----
-106135
-1546
-358982

query I rowsort
SELECT - col2 * 64 FROM tab1 AS cor0
----
-3456
-3648
-6144

query I rowsort
SELECT + - 36 + - col2 * - col2 AS col1 FROM tab0 AS cor0
----
-35
1053
6688

skipif mysql # not compatible
query I rowsort
SELECT tab1.col2 * CAST ( - col0 AS REAL ) AS col0 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT ALL cor1.col1 AS col1 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT ALL + 65 * + cor0.col1 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to edfae966106cfaf85979f53f0918df72

query I rowsort
SELECT - ( + 15 ) FROM tab1, tab1 AS cor0
----
9 values hashing to 1172c9a62bdad7db0def9205c06ee1f2

query I rowsort
SELECT + col2 * + ( - ( - col0 ) ) AS col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT + - 77 AS col2 FROM tab2 cor0
----
-77
-77
-77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1713
SELECT tab2.col2 * + CAST( NULL AS SIGNED ) AS col2 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-1713
SELECT tab2.col2 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT - col1 * + col2 + col0 AS col0 FROM tab1
----
-1168
-1401
-506

query I rowsort
SELECT ALL - 69 + col2 FROM tab1
----
-12
-15
27

query I rowsort
SELECT + 69 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 2810c3097fe4771e273cfff903357b40

onlyif mysql # use DIV operator for integer division
query I rowsort label-1717
SELECT - tab0.col0 DIV col2 FROM tab0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-1717
SELECT - tab0.col0 / col2 FROM tab0
----
-1
-35
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1718
SELECT DISTINCT cor0.col2 DIV + col0 FROM tab2 AS cor0
----
0
3

skipif mysql # not compatible
query I rowsort label-1718
SELECT DISTINCT cor0.col2 / + col0 FROM tab2 AS cor0
----
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 18 col0 FROM tab0 cor0
----
18

query I rowsort
SELECT ALL - col1 * + tab0.col0 AS col1 FROM tab0
----
-2064
-3395
-8099

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 AS cor0, tab0 AS cor1, tab0, tab2 cor2
----
3645 values hashing to 71180f9f3efadf0ee3a7fec9678208ad

query I rowsort
SELECT + col2 * + col0 - 26 AS col2 FROM tab1
----
136
3622
7654

query I rowsort
SELECT DISTINCT col1 - ( tab0.col0 ) * col1 FROM tab0
----
-1978
-3298
-8008

skipif mysql # not compatible
query I rowsort
SELECT col1 * + col2 + 21 - + col1 * + CAST ( - col0 AS REAL ) / - col0 AS col0 FROM tab1
----
1256
1399
581

query I rowsort
SELECT col2 * ( col1 + - cor0.col1 ) AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col0 - + tab1.col0 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT - col1 * + col2 * col0 - col2 FROM tab0
----
-3396
-664200
-68145

query I rowsort
SELECT + + col2 * - 51 FROM tab2 AS cor0
----
-1326
-1377
-1938

query I rowsort
SELECT ALL + - col2 + + 69 FROM tab1 cor0
----
-27
12
15

query I rowsort
SELECT col0 * 12 FROM tab2 AS cor0
----
84
936
948

onlyif mysql # use DIV operator for integer division
query I rowsort label-1731
SELECT - col2 DIV + 61 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-1731
SELECT - col2 / + 61 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT ALL ( - col1 + col2 ) FROM tab0
----
-53
-9
-96

query I rowsort
SELECT - cor0.col2 * + col1 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT col2 - 72 FROM tab1
----
-15
-18
24

query I rowsort
SELECT - 7 - col1 FROM tab0
----
-104
-93
-98

query I rowsort
SELECT + cor0.col1 * col0 AS col2 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT 54 * + col1 FROM tab1 AS cor0
----
1404
540
702

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 * - col1 col0 FROM tab1 AS cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-1739
SELECT + 77 DIV - cor0.col2 FROM tab0 AS cor0
----
-2
-77
0

skipif mysql # not compatible
query I rowsort label-1739
SELECT + 77 / - cor0.col2 FROM tab0 AS cor0
----
-2
-77
0

query I rowsort
SELECT DISTINCT col1 * col2 + col2 + col0 AS col2 FROM tab1 AS cor0
----
1424
1461
691

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( 89 AS REAL ) FROM tab1
----
89

query I rowsort
SELECT col0 * col1 * 97 AS col0 FROM tab0 AS cor0
----
200208
329315
785603

onlyif mysql # use DIV operator for integer division
query I rowsort label-1743
SELECT ALL - col2 DIV cor0.col0 + + ( col2 + - col1 ) AS col1 FROM tab0 AS cor0
----
-54
-9
-96

skipif mysql # not compatible
query I rowsort label-1743
SELECT ALL - col2 / cor0.col0 + + ( col2 + - col1 ) AS col1 FROM tab0 AS cor0
----
-54
-9
-96

query I rowsort
SELECT + - 29 AS col1 FROM tab1 AS cor0
----
-29
-29
-29

query I rowsort
SELECT ALL - ( col2 ) * - ( + 31 ) AS col0 FROM tab0 AS cor0
----
1023
2542
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - col0 + + col2 * + col2 - col2 col0 FROM tab2
----
-3952
485
63

query I rowsort
SELECT col2 * ( 4 ) * col1 FROM tab2
----
2584
3348
6136

query I rowsort
SELECT DISTINCT + - col2 + - cor0.col1 AS col0 FROM tab2 cor0
----
-55
-58
-85

query I rowsort
SELECT + + col2 + cor0.col0 + - col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT - tab1.col0 * + col2 * + col1 + col1 FROM tab1
----
-36470
-4186
-99827

query I rowsort
SELECT - cor0.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query I rowsort
SELECT ALL + - col2 + + 0 * cor0.col1 AS col1 FROM tab2 AS cor0
----
-26
-27
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + ( - col0 ) col0 FROM tab2
----
-41
-52
20

query I rowsort
SELECT ALL + col1 + + col1 + tab0.col1 * col2 FROM tab0
----
291
3010
7644

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT ALL + col1 + col0 * cor0.col0 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT DISTINCT - 86 AS col2 FROM tab2 AS cor0
----
-86

query I rowsort
SELECT + ( - col0 ) + col2 FROM tab0
----
-34
-7
9

query I rowsort
SELECT ( - col1 ) + + tab0.col1 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL col2 + - 79 * col2 FROM tab2 AS cor0
----
-2028
-2106
-2964

query I rowsort
SELECT ( ( - cor0.col0 ) ) AS col1 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT ALL ( cor0.col1 ) + + col2 * cor0.col0 * col2 FROM tab1 AS cor0
----
207946
737293
8774

query I rowsort
SELECT col1 * cor0.col0 + - col1 * - col0 + - col2 AS col0 FROM tab1 AS cor0
----
102
1223
1984

query I rowsort
SELECT 90 + cor0.col1 FROM tab2 cor0
----
107
121
149

query I rowsort
SELECT col2 * + 27 AS col1 FROM tab2 AS cor0
----
1026
702
729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1766
SELECT - CAST( - col0 AS SIGNED ) FROM tab1 cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-1766
SELECT - CAST ( - col0 AS INTEGER ) FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT DISTINCT - - col0 * cor0.col2 + col1 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT DISTINCT col0 * col2 * - ( + tab0.col1 + col2 ) FROM tab0
----
-1262554
-3430
-94248

query I rowsort
SELECT ALL 76 * + col1 * - tab1.col0 - - col0 FROM tab1
----
-48576
-5925
-78960

query I rowsort
SELECT + 29 * col0 FROM tab2 AS cor0
----
203
2262
2291

query I rowsort
SELECT ALL + - ( col0 ) + 19 AS col0 FROM tab1 AS cor0
----
-45
-61
16

query I rowsort
SELECT - - 33 AS col1 FROM tab1 AS cor0
----
33
33
33

query I rowsort
SELECT DISTINCT col2 + col0 * col0 AS col2 FROM tab0 AS cor0
----
1226
609
8003

onlyif mysql # use DIV operator for integer division
query I rowsort label-1774
SELECT DISTINCT 62 DIV + col0 + + CAST( + 51 AS SIGNED ) - cor0.col2 AS col0 FROM tab1 AS cor0
----
-45
-6
17

skipif mysql # not compatible
query I rowsort label-1774
SELECT DISTINCT 62 / + col0 + + CAST ( + 51 AS INTEGER ) - cor0.col2 AS col0 FROM tab1 AS cor0
----
-45
-6
17

query I rowsort
SELECT ALL 43 * - col1 FROM tab0 AS cor0
----
-3698
-3913
-4171

query I rowsort
SELECT - + col0 + - 5 + col1 AS col2 FROM tab0 AS cor0
----
-3
57
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-1777
SELECT DISTINCT col2 DIV + col0 AS col2 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-1777
SELECT DISTINCT col2 / + col0 AS col2 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT DISTINCT - col0 * 11 FROM tab1 AS cor0
----
-33
-704
-880

onlyif mysql # use DIV operator for integer division
query I rowsort label-1779
SELECT - cor0.col0 + + col2 DIV + col1 + + col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1779
SELECT - cor0.col0 + + col2 / + col1 + + col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - col1 - - 28 AS col1 FROM tab2 AS cor0
----
-3
-31
11

query I rowsort
SELECT - col2 * ( col2 ) + col0 FROM tab2 AS cor0
----
-1365
-598
-722

query I rowsort
SELECT DISTINCT - - col0 + col1 * + cor0.col0 + col0 FROM tab1 AS cor0
----
1200
768
84

query I rowsort
SELECT ALL col2 * col2 * - 56 FROM tab2 AS cor0
----
-37856
-40824
-80864

query I rowsort
SELECT DISTINCT + col2 * 90 + + 59 FROM tab0 AS cor0
----
149
3029
7439

query I rowsort
SELECT + 68 + - col0 + - 26 AS col0 FROM tab2
----
-36
-37
35

query I rowsort
SELECT - col2 * + tab1.col2 + col0 + col1 * col0 FROM tab1
----
-2545
-2835
-8096

query I rowsort
SELECT ALL cor0.col1 * 68 FROM tab1 AS cor0
----
1768
680
884

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + + ( cor0.col1 ) col2 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT ALL + col2 + - col0 AS col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT + col2 + col2 * cor0.col0 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT DISTINCT + cor0.col1 * col1 + - col2 FROM tab2 AS cor0
----
251
3455
934

onlyif mysql # use DIV operator for integer division
query I rowsort label-1792
SELECT DISTINCT + col0 * - col1 + + col1 DIV + cor0.col2 AS col2 FROM tab0 AS cor0
----
-2062
-3298
-8098

skipif mysql # not compatible
query I rowsort label-1792
SELECT DISTINCT + col0 * - col1 + + col1 / + cor0.col2 AS col2 FROM tab0 AS cor0
----
-2062
-3298
-8098

query I rowsort
SELECT - - col2 + col1 * col1 FROM tab0 AS cor0
----
7429
8363
9410

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - cor0.col2 col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT + - col1 + col2 - + col1 AS col0 FROM tab1 cor0
----
2
37
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-1796
SELECT ALL col1 * - col1 + col0 DIV col0 AS col1 FROM tab0
----
-7395
-8280
-9408

skipif mysql # not compatible
query I rowsort label-1796
SELECT ALL col1 * - col1 + col0 / col0 AS col1 FROM tab0
----
-7395
-8280
-9408

query I rowsort
SELECT - col1 + - cor0.col1 AS col1 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT DISTINCT col0 + - tab2.col2 * + col0 FROM tab2
----
-182
-1950
-2923

query I rowsort
SELECT col0 * tab1.col2 * col2 FROM tab1
----
207936
737280
8748

onlyif mysql # use DIV operator for integer division
query I rowsort label-1800
SELECT col2 DIV - col2 AS col0 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1800
SELECT col2 / - col2 AS col0 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + + ( - cor0.col1 ) AS col2 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT + + col1 * cor0.col1 AS col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT ALL 62 + col2 FROM tab0 AS cor0
----
144
63
95

query I rowsort
SELECT DISTINCT - 80 * - col0 AS col2 FROM tab2 AS cor0
----
560
6240
6320

query I rowsort
SELECT tab0.col1 + + 58 FROM tab0
----
144
149
155

query I rowsort
SELECT DISTINCT ( 4 ) * col1 FROM tab1
----
104
40
52

query I rowsort
SELECT - col2 - ( + col2 + col0 ) AS col2 FROM tab2
----
-130
-155
-61

query I rowsort
SELECT + 44 + - col1 FROM tab2
----
-15
13
27

query I rowsort
SELECT DISTINCT - tab1.col1 AS col1 FROM tab1, tab0 cor0
----
-10
-13
-26

query I rowsort
SELECT - col1 * col0 + - col0 * col0 FROM tab1
----
-4736
-7440
-87

query I rowsort
SELECT - col0 * - tab1.col1 * - col1 + - col2 * - col1 FROM tab1
----
-12272
-5830
-624

query I rowsort
SELECT ALL 73 * col0 + col1 FROM tab2 AS cor0
----
542
5753
5784

query I rowsort
SELECT DISTINCT + 84 AS col2 FROM tab0
----
84

query I rowsort
SELECT DISTINCT col0 * - 59 FROM tab0
----
-1416
-2065
-5251

query I rowsort
SELECT ALL ( 44 ) * - col1 FROM tab1
----
-1144
-440
-572

query I rowsort
SELECT DISTINCT - ( - 19 ) * col2 + 59 FROM tab2
----
553
572
781

query I rowsort
SELECT DISTINCT - tab0.col0 * + col2 + col0 AS col0 FROM tab0
----
-7209
-768
0

query I rowsort
SELECT ALL - - 41 AS col0 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to f6a440b478f0d00f8326a8c51fe094b8

query I rowsort
SELECT ALL ( tab0.col1 ) * tab0.col1 AS col0 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT + col0 + col1 * ( 69 ) FROM tab2 AS cor0
----
1252
2146
4149

query I rowsort
SELECT - - cor0.col2 * col0 + cor0.col1 + + col0 AS col0 FROM tab1 AS cor0
----
191
3722
7773

query I rowsort
SELECT ALL col1 * col2 - - col1 * + tab2.col1 FROM tab2
----
1798
5015
935

query I rowsort
SELECT 20 + + col2 * - col2 * - 50 AS col2 FROM tab1 AS cor0
----
145820
162470
460820

onlyif mysql # use DIV operator for integer division
query I rowsort label-1824
SELECT - + 96 DIV + col0 - col0 AS col1 FROM tab0 cor0
----
-28
-37
-90

skipif mysql # not compatible
query I rowsort label-1824
SELECT - + 96 / + col0 - col0 AS col1 FROM tab0 cor0
----
-28
-37
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * col1 col0 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT DISTINCT + 28 * col1 FROM tab2 AS cor0
----
1652
476
868

query I rowsort
SELECT - - ( col0 ) * + 92 AS col1 FROM tab1 AS cor0
----
276
5888
7360

query I rowsort
SELECT col0 * + ( ( col0 ) ) FROM tab1 cor0
----
4096
6400
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1829
SELECT col0 * - CAST( NULL AS DECIMAL ) + - ( col1 + col1 ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1829
SELECT col0 * - CAST ( NULL AS REAL ) + - ( col1 + col1 ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - 9 AS col1 FROM tab0 AS cor0
----
-9
-9
-9

query I rowsort
SELECT - - col0 * + ( - col2 ) FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + col2 + - 54 * col1 FROM tab1 AS cor0
----
-1350
-483
-606

onlyif mysql # use DIV operator for integer division
query I rowsort label-1833
SELECT DISTINCT 54 DIV - col0 + + col1 AS col2 FROM tab2 AS cor0
----
17
24
59

skipif mysql # not compatible
query I rowsort label-1833
SELECT DISTINCT 54 / - col0 + + col1 AS col2 FROM tab2 AS cor0
----
17
24
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1834
SELECT ALL + ( 55 ) + + col0 * CAST( NULL AS DECIMAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1834
SELECT ALL + ( 55 ) + + col0 * CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 48 + + ( cor0.col2 ) FROM tab0 AS cor0
----
130
49
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 95 + col2 * col0 col0 FROM tab0 AS cor0
----
130
7393
887

query I rowsort
SELECT - col0 * 96 FROM tab1 AS cor0
----
-288
-6144
-7680

query I rowsort
SELECT ALL - + 40 - col1 AS col2 FROM tab0 AS cor0
----
-126
-131
-137

query I rowsort
SELECT - ( - 82 ) FROM tab2, tab1 cor0
----
9 values hashing to f318fd9dac2de7af4b82cc7574bbca2c

query I rowsort
SELECT ALL 65 AS col1 FROM tab1 AS cor0
----
65
65
65

query I rowsort
SELECT DISTINCT + ( + col2 ) + + col0 * - ( col0 + cor0.col0 ) * + col1 FROM tab2 AS cor0
----
-212156
-3011
-717886

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1842
SELECT - CAST( NULL AS SIGNED ) * 49 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1842
SELECT - CAST ( NULL AS INTEGER ) * 49 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1843
SELECT - CAST( + cor0.col0 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-1843
SELECT - CAST ( + cor0.col0 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT + + ( - col0 ) + - col0 AS col0 FROM tab0 AS cor0
----
-178
-48
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-1845
SELECT ALL cor0.col0 - - 69 DIV col1 FROM tab1 AS cor0
----
5
70
85

skipif mysql # not compatible
query I rowsort label-1845
SELECT ALL cor0.col0 - - 69 / col1 FROM tab1 AS cor0
----
5
70
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-1846
SELECT ALL + col0 * col1 DIV - col0 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-1846
SELECT ALL + col0 * col1 / - col0 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT - col2 - - ( col2 ) AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT col2 + 45 AS col2 FROM tab2 AS cor0
----
71
72
83

query I rowsort
SELECT DISTINCT - col0 + col0 + col1 * col0 * - 81 AS col0 FROM tab0 AS cor0
----
-167184
-274995
-656019

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 - + 25 col2 FROM tab1 AS cor0
----
-12
-15
1

query I rowsort
SELECT - col1 * + cor0.col1 + - col1 + + col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT DISTINCT cor0.col2 * ( 8 ) * col1 FROM tab1 cor0
----
11232
4560
9984

query I rowsort
SELECT + col1 * + col0 * col1 AS col0 FROM tab0 cor0
----
177504
329315
737009

query I rowsort
SELECT ALL + 35 AS col0 FROM tab1, tab1 cor0, tab1 AS cor1
----
27 values hashing to 0d13dfd4c4a9d51ace3582c31cadcdbc

onlyif mysql # use DIV operator for integer division
query I rowsort label-1855
SELECT 62 * col2 + 50 + col1 DIV col1 FROM tab2
----
1663
1725
2407

skipif mysql # not compatible
query I rowsort label-1855
SELECT 62 * col2 + 50 + col1 / col1 FROM tab2
----
1663
1725
2407

query I rowsort
SELECT DISTINCT + 82 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
82

query I rowsort
SELECT 66 * col1 AS col2 FROM tab1
----
1716
660
858

onlyif mysql # use DIV operator for integer division
query I rowsort label-1858
SELECT col0 DIV ( - col0 ) + - col0 FROM tab1
----
-4
-65
-81

skipif mysql # not compatible
query I rowsort label-1858
SELECT col0 / ( - col0 ) + - col0 FROM tab1
----
-4
-65
-81

query I rowsort
SELECT DISTINCT + col2 + - ( + tab2.col2 + - col2 ) FROM tab2
----
26
27
38

query I rowsort
SELECT DISTINCT + tab2.col0 * - tab2.col1 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT ALL + cor1.col2 AS col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT + col0 * - 29 AS col2 FROM tab0 AS cor0
----
-1015
-2581
-696

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + - 28 col0 FROM tab1
----
-108
-31
-92

query I rowsort
SELECT + col2 + col1 + - 25 * col1 FROM tab2
----
-1390
-370
-717

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1865
SELECT col1 * CAST( + col2 AS SIGNED ) + + col0 * - col0 * col2 FROM tab2 cor0
----
-156650
-236512
-486

skipif mysql # not compatible
query I rowsort label-1865
SELECT col1 * CAST ( + col2 AS INTEGER ) + + col0 * - col0 * col2 FROM tab2 cor0
----
-156650
-236512
-486

query I rowsort
SELECT 97 AS col2 FROM tab2, tab0 cor0, tab1 AS cor1
----
27 values hashing to c73fa6978df8525c99d6bc792bb27123

query I rowsort
SELECT col2 * ( 23 ) * - col2 AS col0 FROM tab2 AS cor0
----
-15548
-16767
-33212

query I rowsort
SELECT + col0 * + 69 + - col1 * col0 FROM tab2 AS cor0
----
266
4108
780

query I rowsort
SELECT DISTINCT + col2 + - tab2.col0 - + 98 FROM tab2
----
-139
-150
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-1870
SELECT + tab2.col2 + col0 * col0 DIV + col0 - col0 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-1870
SELECT + tab2.col2 + col0 * col0 / + col0 - col0 FROM tab2
----
26
27
38

query I rowsort
SELECT DISTINCT col0 - tab1.col2 FROM tab1
----
-16
-51
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-1872
SELECT + col0 DIV + 89 + ( col2 + + 65 ) * tab2.col2 FROM tab2
----
2366
2484
3914

skipif mysql # not compatible
query I rowsort label-1872
SELECT + col0 / + 89 + ( col2 + + 65 ) * tab2.col2 FROM tab2
----
2366
2484
3914

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1873
SELECT col2 / + CAST( NULL AS SIGNED ) + - col2 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1873
SELECT col2 / + CAST ( NULL AS INTEGER ) + - col2 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT - tab2.col0 + - ( col1 + col1 ) * - col1 FROM tab2
----
1915
499
6884

query I rowsort
SELECT DISTINCT - - 67 + + cor0.col0 FROM tab1, tab1 AS cor0
----
131
147
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1876
SELECT + col0 - - CAST( 74 AS SIGNED ) AS col2 FROM tab2 cor0
----
152
153
81

skipif mysql # not compatible
query I rowsort label-1876
SELECT + col0 - - CAST ( 74 AS INTEGER ) AS col2 FROM tab2 cor0
----
152
153
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1877
SELECT col1 * - ( 88 ) + - col1 * - CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1877
SELECT col1 * - ( 88 ) + - col1 * - CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL tab1.col2 + col1 * 94 AS col1 FROM tab1
----
1318
2498
997

query I rowsort
SELECT DISTINCT col1 * ( 76 ) + - col1 AS col0 FROM tab1
----
1950
750
975

query I rowsort
SELECT DISTINCT col0 * ( - 40 ) * + col2 FROM tab2 AS cor0
----
-120080
-7560
-81120

query I rowsort
SELECT col0 - col1 * col0 AS col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT cor0.col2 - 18 FROM tab1, tab0, tab0 cor0
----
27 values hashing to 5ea4c3c2590c3b247c3a87b5ad630695

query I rowsort
SELECT DISTINCT - ( - tab2.col1 + col2 ) * - 47 FROM tab2
----
-1551
-188
987

query I rowsort
SELECT tab1.col0 AS col2 FROM tab1, tab2 cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT ALL - 43 * - col2 FROM tab0 cor0
----
1419
3526
43

onlyif mysql # use DIV operator for integer division
query I rowsort label-1886
SELECT ALL col2 DIV + col1 col2 FROM tab1
----
2
5
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1886
SELECT ALL col2 / + col1 col2 FROM tab1
----
2
5
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-1887
SELECT DISTINCT - 49 DIV col1 FROM tab1
----
-1
-3
-4

skipif mysql # not compatible
query I rowsort label-1887
SELECT DISTINCT - 49 / col1 FROM tab1
----
-1
-3
-4

query I rowsort
SELECT DISTINCT - col1 + - col0 * col0 AS col1 FROM tab2 AS cor0
----
-6143
-6258
-80

query I rowsort
SELECT - ( + col0 ) * col1 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT + col1 + col0 + col1 AS col0 FROM tab1 AS cor0
----
106
55
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-1891
SELECT - - col1 DIV - cor0.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-1891
SELECT - - col1 / - cor0.col0 col0 FROM tab0 AS cor0
----
-1
-2
-3

query I rowsort
SELECT - 51 * + col2 FROM tab1 cor0
----
-2754
-2907
-4896

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col1 * col1 col2 FROM tab2 AS cor0
----
289
3481
961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1894
SELECT ALL + col2 * - col2 + CAST( + 82 AS SIGNED ) FROM tab0 cor0
----
-1007
-6642
81

skipif mysql # not compatible
query I rowsort label-1894
SELECT ALL + col2 * - col2 + CAST ( + 82 AS INTEGER ) FROM tab0 cor0
----
-1007
-6642
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1895
SELECT DISTINCT - col0 * col1 + - CAST( - col2 AS SIGNED ) FROM tab1 AS cor0
----
-24
-583
-944

skipif mysql # not compatible
query I rowsort label-1895
SELECT DISTINCT - col0 * col1 + - CAST ( - col2 AS INTEGER ) FROM tab1 AS cor0
----
-24
-583
-944

onlyif mysql # use DIV operator for integer division
query I rowsort label-1896
SELECT ALL - tab0.col1 * col1 DIV tab0.col0 AS col0 FROM tab0
----
-268
-308
-93

skipif mysql # not compatible
query I rowsort label-1896
SELECT ALL - tab0.col1 * col1 / tab0.col0 AS col0 FROM tab0
----
-268
-308
-93

query I rowsort
SELECT - - 24 FROM tab1 cor0
----
24
24
24

query I rowsort
SELECT ALL + col0 * + col0 + - col2 * + col1 * - col0 FROM tab0 AS cor0
----
4620
672039
68688

query I rowsort
SELECT DISTINCT cor0.col1 * col1 + + 60 AS col0 FROM tab0 AS cor0
----
7456
8341
9469

query I rowsort
SELECT ALL + 8 + col2 FROM tab2 AS cor0
----
34
35
46

onlyif mysql # use DIV operator for integer division
query I rowsort label-1901
SELECT ALL - col2 DIV 33 FROM tab2 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-1901
SELECT ALL - col2 / 33 FROM tab2 AS cor0
----
-1
0
0

query I rowsort
SELECT + col1 + col1 * - col0 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT - col2 * 96 AS col2 FROM tab1 cor0
----
-5184
-5472
-9216

query I rowsort
SELECT + cor0.col2 + - ( col2 + + col2 ) FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT - col2 * ( cor0.col0 ) - col1 AS col2 FROM tab1 cor0
----
-188
-3658
-7693

onlyif mysql # use DIV operator for integer division
query I rowsort label-1906
SELECT ALL cor0.col1 + + col0 DIV col0 AS col1 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-1906
SELECT ALL cor0.col1 + + col0 / col0 AS col1 FROM tab1 AS cor0
----
11
14
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * ( - col2 ) + - cor0.col1 col1 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT + col0 * + col1 + - col2 AS col2 FROM tab1
----
24
583
944

query I rowsort
SELECT + cor0.col1 * + ( - col1 ) FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT col2 * 85 AS col2 FROM tab0 AS cor0
----
2805
6970
85

query I rowsort
SELECT ALL + col1 + col0 * + col2 * - col1 AS col1 FROM tab2 AS cor0
----
-119593
-51017
-5828

query I rowsort
SELECT DISTINCT col1 + + col2 + + col2 FROM tab0 AS cor0
----
152
255
99

query I rowsort
SELECT ALL col2 - - 22 FROM tab0 cor0
----
104
23
55

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1914
SELECT DISTINCT - - CAST( 15 AS SIGNED ) + - col1 AS col2 FROM tab2 AS cor0
----
-16
-2
-44

skipif mysql # not compatible
query I rowsort label-1914
SELECT DISTINCT - - CAST ( 15 AS INTEGER ) + - col1 AS col2 FROM tab2 AS cor0
----
-16
-2
-44

query I rowsort
SELECT DISTINCT + - ( - 31 ) + col2 FROM tab1 AS cor0
----
127
85
88

query I rowsort
SELECT DISTINCT + col1 * - col0 + + col2 AS col2 FROM tab0 cor0
----
-2031
-3394
-8017

query I rowsort
SELECT DISTINCT + col2 + col2 * col2 FROM tab2 AS cor0
----
1482
702
756

query I rowsort
SELECT ALL - + ( 57 ) FROM tab2 AS cor0
----
-57
-57
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT + + ( ( col0 ) ) * + CAST ( - col1 * - col2 AS REAL ) col2 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT ALL - - 67 * - col2 FROM tab1 AS cor0
----
-3618
-3819
-6432

query I rowsort
SELECT DISTINCT + + 56 * - 71 + + cor0.col1 FROM tab2 AS cor0
----
-3917
-3945
-3959

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1922
SELECT - + CAST( NULL AS SIGNED ) + col2 * + col2 * col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1922
SELECT - + CAST ( NULL AS INTEGER ) + col2 * + col2 * col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col0 * - cor0.col2 * col2 FROM tab1 AS cor0
----
207936
737280
8748

query I rowsort
SELECT DISTINCT col0 - col0 * + col0 FROM tab2 AS cor0
----
-42
-6006
-6162

onlyif mysql # use DIV operator for integer division
query I rowsort label-1925
SELECT ALL - ( col0 ) + col2 DIV col0 + col2 AS col2 FROM tab2 AS cor0
----
-41
-52
23

skipif mysql # not compatible
query I rowsort label-1925
SELECT ALL - ( col0 ) + col2 / col0 + col2 AS col2 FROM tab2 AS cor0
----
-41
-52
23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1926
SELECT ALL + - CAST( col1 AS SIGNED ) AS col1 FROM tab0 cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-1926
SELECT ALL + - CAST ( col1 AS INTEGER ) AS col1 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT ALL + + col2 + + 34 AS col0 FROM tab0 AS cor0
----
116
35
67

query I rowsort
SELECT 15 * col1 FROM tab2
----
255
465
885

query I rowsort
SELECT ALL 5 AS col0 FROM tab1, tab0 AS cor0 CROSS JOIN tab0
----
27 values hashing to 6797d40099023779b89feb627d94a3e7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 93 col2 FROM tab1
----
93

query I rowsort
SELECT col0 FROM tab0 WHERE NULL BETWEEN NULL AND NULL
----

query III rowsort
SELECT * FROM tab0 WHERE NOT - col1 < ( NULL )
----

query III rowsort
SELECT * FROM tab2 WHERE NULL < col0 * col2 + + col2
----

query I rowsort
SELECT col1 AS col2 FROM tab1 WHERE NULL < - col2 * col2 * col0
----

query I rowsort
SELECT ALL tab1.col2 AS col1 FROM tab1 WHERE NOT NULL >= + col2 + + col0
----

query I rowsort
SELECT ALL - col2 + + col2 AS col0 FROM tab2 WHERE NOT col0 * col2 < ( NULL )
----

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT - col2 * col0 IN ( col0 * col0 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT ( NULL ) BETWEEN col0 AND col1
----

query I rowsort
SELECT col0 + - col1 * - col2 AS col2 FROM tab0
----
132
2862
7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-1940
SELECT DISTINCT col1 + - col1 DIV + col0 AS col1 FROM tab1
----
10
13
18

skipif mysql # not compatible
query I rowsort label-1940
SELECT DISTINCT col1 + - col1 / + col0 AS col1 FROM tab1
----
10
13
18

query I rowsort
SELECT ALL + col0 FROM tab0 WHERE NOT ( NULL ) NOT IN ( col1 * tab0.col0 + col0 )
----

query I rowsort
SELECT col2 + - col0 * col2 + col1 AS col0 FROM tab0
----
-673
-7125
63

query I rowsort
SELECT DISTINCT + col0 - + col1 FROM tab1
----
-23
54
67

query I rowsort
SELECT DISTINCT + tab0.col1 - col0 FROM tab0
----
2
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col0 * - col0 col0 FROM tab2
----
-49
-6084
-6241

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL NOT IN ( col0 / col0 + col2 + col2 * col2 / - col1 )
----

query I rowsort
SELECT - col1 + col0 + - col1 * + col2 AS col1 FROM tab2
----
-1515
-584
-861

query III rowsort
SELECT * FROM tab0 WHERE NOT ( NULL ) < col0 + - col0
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col1 + col1 col0 FROM tab1
----
20
26
52

query I rowsort
SELECT + col2 + - col2 * + col1 + - tab0.col0 AS col0 FROM tab0
----
-131
-2829
-7469

query I rowsort
SELECT - col0 * + col1 + col0 * - cor0.col1 AS col0 FROM tab1 cor0
----
-1280
-156
-2080

query I rowsort
SELECT ALL + + col1 * - col0 * col1 + + col1 * col2 * - col0 AS col2 FROM tab1 AS cor0
----
-113360
-42880
-6240

onlyif mysql # use DIV operator for integer division
query I rowsort label-1953
SELECT ALL - - col0 + cor0.col2 DIV col0 col0 FROM tab1 AS cor0
----
21
64
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1953
SELECT ALL - - col0 + cor0.col2 / col0 col0 FROM tab1 AS cor0
----
21
64
81

query I rowsort
SELECT DISTINCT + col0 + col0 * cor0.col0 FROM tab2 cor0
----
56
6162
6320

query III rowsort
SELECT ALL * FROM tab1 AS cor0 WHERE ( NULL ) <> NULL
----

query IIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0 WHERE NULL NOT BETWEEN NULL AND NULL
----

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab1 AS cor2, tab2 AS cor3
----
3645 values hashing to 9aea36b1adc82580fae09bf05c24fd77

query I rowsort
SELECT col0 + ( + ( col1 ) ) * + ( + col1 * cor0.col2 + col0 * + ( - col2 ) ) AS col2 FROM tab0 AS cor0
----
15013
175980
6049

query I rowsort
SELECT DISTINCT col2 - + col0 FROM tab0 cor0
----
-34
-7
9

query I rowsort
SELECT DISTINCT - cor0.col0 * - col2 + 31 AS col1 FROM tab2 AS cor0
----
2059
220
3033

query I rowsort
SELECT + - col1 + 91 FROM tab0 AS cor0
----
-6
0
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-1962
SELECT DISTINCT - + col1 DIV + ( col1 ) FROM tab1 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-1962
SELECT DISTINCT - + col1 / + ( col1 ) FROM tab1 AS cor0
----
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1963
SELECT DISTINCT + - col2 + CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1963
SELECT DISTINCT + - col2 + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1964
SELECT ALL + + col2 * + 3 - col1 DIV col1 AS col1 FROM tab1 AS cor0
----
161
170
287

skipif mysql # not compatible
query I rowsort label-1964
SELECT ALL + + col2 * + 3 - col1 / col1 AS col1 FROM tab1 AS cor0
----
161
170
287

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 - + col0 + - 53 FROM tab0 AS cor0
----
-142
-77
-88

query I rowsort
SELECT - col0 + + col0 AS col1 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT ALL - 93 + col2 AS col1 FROM tab0 cor0
----
-11
-60
-92

onlyif mysql # use DIV operator for integer division
query I rowsort label-1969
SELECT DISTINCT col2 - + col2 DIV + col0 AS col0 FROM tab1 AS cor0
----
36
57
95

skipif mysql # not compatible
query I rowsort label-1969
SELECT DISTINCT col2 - + col2 / + col0 AS col0 FROM tab1 AS cor0
----
36
57
95

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1970
SELECT ALL - col2 * + col1 + col2 * CAST( NULL AS DECIMAL ) 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-1970
SELECT ALL - col2 * + col1 + col2 * CAST ( NULL AS REAL ) col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 98 + - col2 * + col1 FROM tab2 AS cor0
----
-1632
-744
-935

query I rowsort
SELECT - cor0.col1 * - col1 AS col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT + 87 AS col0 FROM tab1 cor0
----
87
87
87

query I rowsort
SELECT + - ( + col1 ) * - col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT - col0 + tab0.col0 AS col0 FROM tab0
----
0

query III rowsort
SELECT * FROM tab2 WHERE NOT col0 NOT BETWEEN NULL AND ( + col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-1977
SELECT ALL - col1 + col1 DIV col1 FROM tab2 AS cor0
----
-16
-30
-58

skipif mysql # not compatible
query I rowsort label-1977
SELECT ALL - col1 + col1 / col1 FROM tab2 AS cor0
----
-16
-30
-58

query I rowsort
SELECT ALL + - 55 FROM tab0, tab1 AS cor0
----
9 values hashing to ac76841ceecd2311e80c621d15bacdd3

query I rowsort
SELECT ALL + col0 + - col0 * - col0 * + col2 FROM tab0 cor0
----
1260
19032
649611

query I rowsort
SELECT ALL + + 60 AS col2 FROM tab2 AS cor0
----
60
60
60

query I rowsort
SELECT DISTINCT col2 * - cor0.col2 * - col1 + cor0.col2 AS col0 FROM tab0 cor0
----
611966
93687
98

query I rowsort
SELECT ALL col0 * - 21 AS col0 FROM tab1 AS cor0
----
-1344
-1680
-63

query I rowsort
SELECT - col0 - - tab0.col1 * ( - col2 ) FROM tab0
----
-132
-2862
-7551

query I rowsort
SELECT DISTINCT + 32 + - 44 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
-12

query I rowsort
SELECT ALL tab1.col2 * col1 * - tab1.col0 - col2 AS col1 FROM tab1
----
-36537
-4266
-99936

query I rowsort
SELECT DISTINCT col2 - - col2 * col2 AS col1 FROM tab2
----
1482
702
756

onlyif mysql # use DIV operator for integer division
query I rowsort label-1987
SELECT + col2 * col0 + + col2 DIV + col1 AS col1 FROM tab0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-1987
SELECT + col2 * col0 + + col2 / + col1 AS col1 FROM tab0
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1988
SELECT tab1.col2 / + CAST( NULL AS SIGNED ) AS col2 FROM tab2, tab0, tab1 AS cor0, tab1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-1988
SELECT tab1.col2 / + CAST ( NULL AS INTEGER ) AS col2 FROM tab2, tab0, tab1 AS cor0, tab1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT ALL + - col2 * col2 + + cor0.col0 * col1 FROM tab2 AS cor0
----
-101
-512
3926

query I rowsort
SELECT ALL - col2 + col0 * - cor0.col1 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT ALL + col1 * col0 * col2 FROM tab2 cor0
----
119652
51034
5859

query I rowsort
SELECT - col1 + + ( + col0 ) FROM tab1
----
-23
54
67

query I rowsort
SELECT DISTINCT + 51 FROM tab2, tab1 AS cor0
----
51

query I rowsort
SELECT + - 20 * 7 AS col2 FROM tab2 AS cor0
----
-140
-140
-140

query I rowsort
SELECT DISTINCT + + 43 - - 80 AS col0 FROM tab1 AS cor0
----
123

query I rowsort
SELECT - ( + cor0.col2 ) + cor0.col2 * 13 FROM tab0 cor0
----
12
396
984

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( + col2 ) * - col0 + - 95 col1 FROM tab1 cor0
----
3553
67
7585

query I rowsort
SELECT 68 + col2 AS col2 FROM tab1 AS cor0
----
122
125
164

query I rowsort
SELECT - 27 + 10 AS col2 FROM tab2 AS cor0
----
-17
-17
-17

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2000
SELECT ALL - - CAST( - 4 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-4
-4
-4

skipif mysql # not compatible
query I rowsort label-2000
SELECT ALL - - CAST ( - 4 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-4
-4
-4

query I rowsort
SELECT - - 81 AS col1 FROM tab1 AS cor0
----
81
81
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-2002
SELECT ALL 6 DIV ( col1 ) + + 33 FROM tab2 cor0
----
33
33
33

skipif mysql # not compatible
query I rowsort label-2002
SELECT ALL 6 / ( col1 ) + + 33 FROM tab2 cor0
----
33
33
33

query I rowsort
SELECT DISTINCT + 71 * 30 + + cor0.col2 * - ( - col2 ) AS col1 FROM tab1 AS cor0
----
11346
5046
5379

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2004
SELECT - 13 + cor0.col1 * - CAST( - col0 + col0 AS SIGNED ) AS col0 FROM tab2 cor0
----
-13
-13
-13

skipif mysql # not compatible
query I rowsort label-2004
SELECT - 13 + cor0.col1 * - CAST ( - col0 + col0 AS INTEGER ) AS col0 FROM tab2 cor0
----
-13
-13
-13

onlyif mysql # use DIV operator for integer division
query I rowsort label-2005
SELECT ALL + col0 DIV + col0 AS col1 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2005
SELECT ALL + col0 / + col0 AS col1 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT ALL + 38 AS col0 FROM tab0, tab0 AS cor0, tab2, tab2 AS cor1
----
81 values hashing to 9124b06d33995d82062026964cce3a38

query I rowsort
SELECT ALL 0 * + tab2.col0 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL - col0 + - 89 * cor0.col0 AS col2 FROM tab0 AS cor0
----
-2160
-3150
-8010

query I rowsort
SELECT - col1 + col1 * - 64 AS col1 FROM tab1 AS cor0
----
-1690
-650
-845

query I rowsort
SELECT col2 + 76 FROM tab0 AS cor0
----
109
158
77

query I rowsort
SELECT DISTINCT col2 * col1 + ( col1 ) * ( - col2 + + cor0.col2 ) FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT - cor0.col1 * - col0 + + ( col2 ) FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT 61 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 07149905a72bd87553381f34d19ed290

query I rowsort
SELECT + + col1 * 1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT cor0.col1 * - col1 AS col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT col1 + col0 * - ( + 44 ) - col1 FROM tab2
----
-308
-3432
-3476

query I rowsort
SELECT ALL - tab0.col0 + col1 * 44 FROM tab0
----
3760
3915
4233

query I rowsort
SELECT ALL + + col2 - + col1 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL + - col0 + col0 * 68 * col1 + col2 FROM tab1 cor0
----
43513
5355
70736

query I rowsort
SELECT ALL tab1.col0 * ( - col0 ) AS col0 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT - col0 * - ( + col1 ) AS col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - 57 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 0b74bbd7631afe9b2eeb9f18b9dc6505

query I rowsort
SELECT ALL + col0 * + 64 FROM tab1
----
192
4096
5120

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2024
SELECT - - CAST( - col1 AS SIGNED ) * col2 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort label-2024
SELECT - - CAST ( - col1 AS INTEGER ) * col2 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 11 * ( cor0.col1 ) * col0 + 38 * + col1 + - col0 * col0 col2 FROM tab0 AS cor0
----
25396
39806
84626

query I rowsort
SELECT + col0 * + 77 FROM tab1 AS cor0
----
231
4928
6160

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2027
SELECT DISTINCT + CAST( + col2 + col1 * - ( col1 ) AS SIGNED ) AS col2 FROM tab2
----
-251
-3455
-934

skipif mysql # not compatible
query I rowsort label-2027
SELECT DISTINCT + CAST ( + col2 + col1 * - ( col1 ) AS INTEGER ) AS col2 FROM tab2
----
-251
-3455
-934

query I rowsort
SELECT DISTINCT cor0.col2 * - 71 + col1 FROM tab1 AS cor0
----
-3808
-4037
-6803

query I rowsort
SELECT ALL + - col1 - - col1 AS col2 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2030
SELECT col0 DIV + col0 col2 FROM tab2
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2030
SELECT col0 / + col0 col2 FROM tab2
----
1
1
1

query I rowsort
SELECT tab0.col0 * + col0 + + 78 AS col2 FROM tab0
----
1303
654
7999

query I rowsort
SELECT DISTINCT 18 * + col0 + col0 * + 89 AS col2 FROM tab2
----
749
8346
8453

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2033
SELECT DISTINCT col0 * col2 + CAST( NULL AS SIGNED ) AS col1 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-2033
SELECT DISTINCT col0 * col2 + CAST ( NULL AS INTEGER ) AS col1 FROM tab0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col1 col2 FROM tab1, tab1 cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

onlyif mysql # use DIV operator for integer division
query I rowsort label-2035
SELECT - tab1.col0 + - col1 DIV - col2 + tab1.col0 AS col0 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2035
SELECT - tab1.col0 + - col1 / - col2 + tab1.col0 AS col0 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query I rowsort
SELECT ALL - cor0.col1 + + cor0.col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT - - 49 * cor0.col1 FROM tab0 cor0
----
4214
4459
4753

query I rowsort
SELECT DISTINCT - 27 AS col1 FROM tab1 AS cor0
----
-27

query I rowsort
SELECT + col1 * col2 * tab0.col2 AS col1 FROM tab0
----
611884
93654
97

query I rowsort
SELECT + 98 * col0 AS col1 FROM tab0
----
2352
3430
8722

query I rowsort
SELECT DISTINCT col0 + + col2 * + cor0.col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT ALL - col1 * col0 + 6 FROM tab2 AS cor0
----
-1337
-211
-4596

query I rowsort
SELECT + - col2 + ( col0 ) FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT + col0 + 39 AS col0 FROM tab1 cor0
----
103
119
42

onlyif mysql # use DIV operator for integer division
query I rowsort label-2046
SELECT col0 * ( + col2 ) + - col1 DIV + ( col1 ) AS col1 FROM tab2 AS cor0
----
188
2027
3001

skipif mysql # not compatible
query I rowsort label-2046
SELECT col0 * ( + col2 ) + - col1 / + ( col1 ) AS col1 FROM tab2 AS cor0
----
188
2027
3001

onlyif mysql # use DIV operator for integer division
query I rowsort label-2047
SELECT + col2 + - ( 42 ) DIV - cor0.col0 + + 51 DIV - col1 FROM tab1 AS cor0
----
52
67
93

skipif mysql # not compatible
query I rowsort label-2047
SELECT + col2 + - ( 42 ) / - cor0.col0 + + 51 / - col1 FROM tab1 AS cor0
----
52
67
93

query I rowsort
SELECT DISTINCT - col2 * 72 * col2 FROM tab0 AS cor0
----
-484128
-72
-78408

query I rowsort
SELECT col1 + - 84 * + 22 AS col2 FROM tab0 AS cor0
----
-1751
-1757
-1762

query I rowsort
SELECT ALL col1 + col2 * + col1 * - 29 + + tab2.col1 * tab2.col0 FROM tab2
----
-17374
-24025
-39825

query I rowsort
SELECT + col0 * 22 * - col1 AS col0 FROM tab0 AS cor0
----
-178178
-45408
-74690

onlyif mysql # use DIV operator for integer division
query I rowsort label-2052
SELECT DISTINCT col2 + - tab2.col2 * 42 DIV + col1 AS col2 FROM tab2
----
-55
-9
8

skipif mysql # not compatible
query I rowsort label-2052
SELECT DISTINCT col2 + - tab2.col2 * 42 / + col1 AS col2 FROM tab2
----
-55
-9
8

query I rowsort
SELECT DISTINCT + tab0.col2 + - col2 AS col2 FROM tab0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2054
SELECT DISTINCT - + 24 * col2 + - CAST( - col0 AS SIGNED ) FROM tab1 AS cor0
----
-1293
-1304
-2224

skipif mysql # not compatible
query I rowsort label-2054
SELECT DISTINCT - + 24 * col2 + - CAST ( - col0 AS INTEGER ) FROM tab1 AS cor0
----
-1293
-1304
-2224

query I rowsort
SELECT + col2 + cor0.col2 AS col1 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT ALL + - 22 + + col1 AS col1 FROM tab2 AS cor0
----
-5
37
9

query I rowsort
SELECT ALL - col1 * - col1 + col2 AS col0 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT - + tab1.col0 FROM tab1, tab0, tab1 AS cor0, tab2
----
81 values hashing to 08e380e50b0cb64601bc84e5254deef4

query I rowsort
SELECT ALL col2 + - ( - ( cor0.col0 ) ) FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT 35 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 0d13dfd4c4a9d51ace3582c31cadcdbc

query I rowsort
SELECT ALL tab1.col0 * + col2 AS col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT - ( + 55 ) FROM tab0, tab0 cor0, tab1 AS cor1
----
27 values hashing to b90e74bece5521b514096c5b6e105fde

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col0 col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL col0 + ( ( - col0 ) ) AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + col2 + 95 * col2 AS col1 FROM tab2 AS cor0
----
2444
2538
3572

query I rowsort
SELECT + col1 * 32 FROM tab1 AS cor0
----
320
416
832

query I rowsort
SELECT ALL - col0 * + col0 * 79 + col0 + + col1 AS col1 FROM tab2 AS cor0
----
-3833
-480499
-492943

query I rowsort
SELECT + col0 + - 10 AS col2 FROM tab1 AS cor0
----
-7
54
70

query I rowsort
SELECT DISTINCT col2 * - col1 + 9 * + ( col2 ) * - col0 AS col1 FROM tab0
----
-412
-73144
-9966

query I rowsort
SELECT + 50 * col0 FROM tab2
----
350
3900
3950

query I rowsort
SELECT - 8 * 64 AS col0 FROM tab2 cor0
----
-512
-512
-512

query I rowsort
SELECT - + col1 * - 84 - - col1 * + 80 FROM tab0 AS cor0
----
14104
14924
15908

query I rowsort
SELECT + col2 * col1 + cor0.col2 AS col2 FROM tab1 AS cor0
----
1344
1458
627

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2074
SELECT + - CAST( NULL AS SIGNED ) * + 35 AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2074
SELECT + - CAST ( NULL AS INTEGER ) * + 35 AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2075
SELECT + CAST( NULL AS SIGNED ) + 63 FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2075
SELECT + CAST ( NULL AS INTEGER ) + 63 FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - + tab2.col0 FROM tab2, tab0, tab2 cor0
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT DISTINCT col1 + + col2 * col2 AS col0 FROM tab2
----
1461
735
760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2078
SELECT DISTINCT + col1 + - CAST( NULL AS SIGNED ) FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-2078
SELECT DISTINCT + col1 + - CAST ( NULL AS INTEGER ) FROM tab1
----
NULL

query I rowsort
SELECT + - 84 * + 63 - cor0.col2 FROM tab0 cor0
----
-5293
-5325
-5374

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 + + col1 col2 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT + cor0.col1 + + col1 * cor0.col1 AS col2 FROM tab0 cor0
----
7482
8372
9506

query I rowsort
SELECT - ( 9 ) AS col2 FROM tab0 cor0
----
-9
-9
-9

query I rowsort
SELECT DISTINCT - 75 - 46 AS col2 FROM tab0
----
-121

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 96 + + col2 col1 FROM tab1 AS cor0
----
150
153
192

query I rowsort
SELECT + + ( col2 ) * col0 + + col1 * col2 AS col0 FROM tab1 AS cor0
----
1566
4218
8928

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 74 * col0 col0 FROM tab1
----
222
4736
5920

query I rowsort
SELECT DISTINCT 93 * ( tab1.col1 * col1 ) FROM tab1
----
15717
62868
9300

query I rowsort
SELECT - ( - col2 ) + + 50 + + ( - col1 ) FROM tab1 AS cor0
----
133
78
97

query I rowsort
SELECT ALL + cor0.col1 + - col2 * - col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT + 68 * + cor0.col2 + 82 AS col1 FROM tab0 cor0
----
150
2326
5658

onlyif mysql # use DIV operator for integer division
query I rowsort label-2091
SELECT - 35 DIV + col0 AS col0 FROM tab0 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-2091
SELECT - 35 / + col0 AS col0 FROM tab0 AS cor0
----
-1
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + + col1 col2 FROM tab2
----
55
58
85

query I rowsort
SELECT ALL col0 + col1 * + tab1.col2 * col1 + 5 FROM tab1
----
16309
36512
5769

query I rowsort
SELECT DISTINCT - col2 + + 7 * - tab1.col0 AS col2 FROM tab1
----
-505
-656
-75

query I rowsort
SELECT DISTINCT - tab1.col0 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2096
SELECT ALL + 56 + - tab1.col2 DIV col2 - + 58 AS col1 FROM tab1
----
-3
-3
-3

skipif mysql # not compatible
query I rowsort label-2096
SELECT ALL + 56 + - tab1.col2 / col2 - + 58 AS col1 FROM tab1
----
-3
-3
-3

query I rowsort
SELECT - + col0 + - col0 FROM tab0 cor0
----
-178
-48
-70

query I rowsort
SELECT ALL ( col0 ) * col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - col2 * - cor0.col0 AS col1 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT 25 AS col0 FROM tab0 AS cor0
----
25

query I rowsort
SELECT ALL + 58 AS col1 FROM tab1 cor0
----
58
58
58

query I rowsort
SELECT 80 * - cor0.col2 + col0 AS col0 FROM tab0 cor0
----
-2616
-45
-6471

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + cor0.col1 * col1 col2 FROM tab2 cor0
----
-289
-3481
-961

query I rowsort
SELECT - + col2 * col1 AS col1 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT + - col2 + col0 FROM tab0 cor0
----
-9
34
7

query I rowsort
SELECT ALL + + 99 FROM tab0 AS cor0
----
99
99
99

query I rowsort
SELECT col1 + + 97 FROM tab2 AS cor0
----
114
128
156

onlyif mysql # use DIV operator for integer division
query I rowsort label-2108
SELECT DISTINCT col2 * col2 + + col0 DIV + cor0.col1 AS col1 FROM tab2 AS cor0
----
1448
677
729

skipif mysql # not compatible
query I rowsort label-2108
SELECT DISTINCT col2 * col2 + + col0 / + cor0.col1 AS col1 FROM tab2 AS cor0
----
1448
677
729

query I rowsort
SELECT DISTINCT col2 * - 52 * col2 AS col1 FROM tab2
----
-35152
-37908
-75088

query I rowsort
SELECT - - col2 * + col1 AS col1 FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-2111
SELECT col0 DIV - ( 51 + col1 ) FROM tab2 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-2111
SELECT col0 / - ( 51 + col1 ) FROM tab2 AS cor0
----
-1
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2112
SELECT ( 53 ) * cor0.col2 DIV - 59 AS col2 FROM tab2 AS cor0
----
-23
-24
-34

skipif mysql # not compatible
query I rowsort label-2112
SELECT ( 53 ) * cor0.col2 / - 59 AS col2 FROM tab2 AS cor0
----
-23
-24
-34

query I rowsort
SELECT + - 9 AS col2 FROM tab0 cor0
----
-9
-9
-9

query I rowsort
SELECT ALL + - ( 13 ) + + col0 AS col1 FROM tab2 cor0
----
-6
65
66

query I rowsort
SELECT + col1 * + col2 + - col0 * + cor0.col1 FROM tab2 AS cor0
----
-3068
-697
620

query I rowsort
SELECT DISTINCT + 95 + + col2 FROM tab1 AS cor0
----
149
152
191

query I rowsort
SELECT ALL + - ( col1 ) * - col2 FROM tab1 AS cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * + col2 + ( + 97 ) col0 FROM tab2 AS cor0
----
-1437
-549
-740

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + cor0.col0 col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL 75 * + col1 AS col1 FROM tab2 cor0
----
1275
2325
4425

query I rowsort
SELECT DISTINCT + col1 + + col2 * col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT ALL col0 + - col2 * col0 AS col2 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT + 22 * - col0 + + cor0.col2 FROM tab2 AS cor0
----
-127
-1690
-1700

query I rowsort
SELECT DISTINCT 23 * + col1 * + col0 AS col1 FROM tab1
----
14720
1794
23920

onlyif mysql # use DIV operator for integer division
query I rowsort label-2125
SELECT + + 78 * col1 + + col1 * col1 DIV col0 AS col2 FROM tab1 cor0
----
1016
2253
781

skipif mysql # not compatible
query I rowsort label-2125
SELECT + + 78 * col1 + + col1 * col1 / col0 AS col2 FROM tab1 cor0
----
1016
2253
781

query I rowsort
SELECT DISTINCT ( - col0 ) + cor0.col2 AS col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT DISTINCT col2 + col2 + + col2 AS col0 FROM tab2 AS cor0
----
114
78
81

query I rowsort
SELECT ALL + col2 + 63 FROM tab2 AS cor0
----
101
89
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + - col0 * + col1 col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT DISTINCT col1 * + ( - col0 ) FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT 11 * cor0.col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 2317ce0c4c8f7dfe40c62e4e9ed83fb1

query I rowsort
SELECT + col0 + ( col1 ) * 35 FROM tab0 AS cor0
----
3034
3274
3430

query I rowsort
SELECT DISTINCT + col0 + - col1 * - col2 AS col1 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT DISTINCT + 67 + + 40 FROM tab2
----
107

onlyif mysql # use DIV operator for integer division
query I rowsort label-2135
SELECT - col1 + ( col2 ) DIV + col0 + - tab1.col1 * col1 AS col1 FROM tab1
----
-110
-181
-684

skipif mysql # not compatible
query I rowsort label-2135
SELECT - col1 + ( col2 ) / + col0 + - tab1.col1 * col1 AS col1 FROM tab1
----
-110
-181
-684

query I rowsort
SELECT DISTINCT 62 + - col0 AS col1 FROM tab0
----
-27
27
38

query I rowsort
SELECT + ( ( - col1 ) ) * - col2 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-2138
SELECT DISTINCT ( + 11 ) DIV + col2 + - 25 col0 FROM tab0 AS cor0
----
-14
-25

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2138
SELECT DISTINCT ( + 11 ) / + col2 + - 25 col0 FROM tab0 AS cor0
----
-14
-25

onlyif mysql # use DIV operator for integer division
query I rowsort label-2139
SELECT - + 17 + col1 DIV - col2 FROM tab1 AS cor0
----
-17
-17
-17

skipif mysql # not compatible
query I rowsort label-2139
SELECT - + 17 + col1 / - col2 FROM tab1 AS cor0
----
-17
-17
-17

query I rowsort
SELECT 21 * col1 + - col1 FROM tab0 AS cor0
----
1720
1820
1940

query I rowsort
SELECT ALL ( ( col2 ) ) AS col0 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT col0 * col1 + - col0 AS col0 FROM tab1 AS cor0
----
576
75
960

onlyif mysql # use DIV operator for integer division
query I rowsort label-2143
SELECT DISTINCT - - col1 DIV + cor0.col1 + + 1 FROM tab1 AS cor0
----
2

skipif mysql # not compatible
query I rowsort label-2143
SELECT DISTINCT - - col1 / + cor0.col1 + + 1 FROM tab1 AS cor0
----
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-2144
SELECT ALL - ( 59 ) + - col2 * col2 DIV - 6 + col2 DIV col2 FROM tab1
----
1478
428
483

skipif mysql # not compatible
query I rowsort label-2144
SELECT ALL - ( 59 ) + - col2 * col2 / - 6 + col2 / col2 FROM tab1
----
1478
428
483

query I rowsort
SELECT DISTINCT + col2 + col2 + - tab1.col0 FROM tab1
----
105
112
50

query I rowsort
SELECT DISTINCT + - 6 FROM tab2 cor0
----
-6

query I rowsort
SELECT ALL + - 38 * col0 + ( + col2 ) * col1 * + 87 AS col0 FROM tab1 AS cor0
----
105536
122034
47158

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2148
SELECT DISTINCT - ( - col2 ) * CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2148
SELECT DISTINCT - ( - col2 ) * CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL 16 + cor0.col0 AS col2 FROM tab1 AS cor0
----
19
80
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col0 ) * + ( col1 ) + + col1 col1 FROM tab1 AS cor0
----
-1027
-52
-630

onlyif mysql # use DIV operator for integer division
query I rowsort label-2151
SELECT DISTINCT + col0 DIV col0 + col0 - - col1 AS col0 FROM tab2 AS cor0
----
138
39
97

skipif mysql # not compatible
query I rowsort label-2151
SELECT DISTINCT + col0 / col0 + col0 - - col1 AS col0 FROM tab2 AS cor0
----
138
39
97

query I rowsort
SELECT + 91 + + col2 + - col2 FROM tab2
----
91
91
91

query I rowsort
SELECT 95 * - tab1.col2 AS col2 FROM tab1
----
-5130
-5415
-9120

query I rowsort
SELECT 43 - col1 FROM tab0
----
-43
-48
-54

query I rowsort
SELECT - 72 * + col1 FROM tab2
----
-1224
-2232
-4248

query I rowsort
SELECT cor0.col0 * col1 + - 44 FROM tab1 AS cor0
----
34
596
996

query I rowsort
SELECT col0 + + col0 * - col1 AS col0 FROM tab0 cor0
----
-2040
-3360
-8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 13 col0 FROM tab2 cor0
----
-13
-13
-13

query I rowsort
SELECT DISTINCT col0 + - col0 * ( cor0.col2 ) AS col1 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT - - 32 * cor0.col0 AS col1 FROM tab0 AS cor0
----
1120
2848
768

query I rowsort
SELECT 77 FROM tab2, tab1, tab1 cor0
----
27 values hashing to d7b027bca5d37c67e29013904def8125

query I rowsort
SELECT - tab1.col0 AS col0 FROM tab1, tab2, tab1 cor0
----
27 values hashing to 729c1edda9332398299f39cd174ed840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( tab1.col2 ) col2 FROM tab1
----
54
57
96

query I rowsort
SELECT - 95 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to cf302b83f15b730fe35c19bdd9363c13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 18 col2 FROM tab0
----
-18

query I rowsort
SELECT DISTINCT cor1.col2 AS col0 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
26
27
38

query I rowsort
SELECT + 22 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 7dda382e7c08428abac8600fd696eb3e

query I rowsort
SELECT DISTINCT + ( + cor0.col1 ) FROM tab2, tab0, tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL - - 22 * col2 FROM tab2 AS cor0
----
572
594
836

query I rowsort
SELECT ALL - ( + 89 ) FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to c36e597b7bc5727536f5bb580e6cebbc

query I rowsort
SELECT DISTINCT - tab1.col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
-54
-57
-96

query I rowsort
SELECT DISTINCT - - tab1.col1 FROM tab1, tab0, tab0 cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-2173
SELECT + col0 + + col0 DIV 32 AS col0 FROM tab2
----
7
80
81

skipif mysql # not compatible
query I rowsort label-2173
SELECT + col0 + + col0 / 32 AS col0 FROM tab2
----
7
80
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 13 - + cor0.col0 col1 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 4b90ca167bf509d44e64d3ba69c68991

query I rowsort
SELECT DISTINCT cor1.col2 + - 73 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
-16
-19
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 66 + 66 * col1 + col0 col1 FROM tab0
----
5634
6029
6371

query I rowsort
SELECT DISTINCT + col0 * col0 * col0 FROM tab1 AS cor0
----
262144
27
512000

query I rowsort
SELECT col2 - - col1 * col0 AS col2 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT - + ( + 31 ) + - cor0.col1 - + col2 AS col2 FROM tab2 AS cor0
----
-116
-86
-89

query I rowsort
SELECT - ( ( + col2 ) ) * col2 + col1 AS col2 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT + + cor0.col2 * col0 AS col0 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-2182
SELECT DISTINCT - col1 + + 74 DIV + col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-2182
SELECT DISTINCT - col1 + + 74 / + col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT col2 * 46 FROM tab2 AS cor0
----
1196
1242
1748

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2184
SELECT - CAST( NULL AS DECIMAL ) * - col1 - col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2184
SELECT - CAST ( NULL AS REAL ) * - col1 - col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 97 * 21 * col2 AS col2 FROM tab0 AS cor0
----
167034
2037
67221

query I rowsort
SELECT - + 65 * col1 + + col2 - - col0 FROM tab2 AS cor0
----
-1981
-3731
-988

query I rowsort
SELECT ALL - 34 + col2 AS col0 FROM tab0 AS cor0
----
-1
-33
48

query I rowsort
SELECT col0 * ( col0 * - col2 ) FROM tab0
----
-1225
-19008
-649522

query I rowsort
SELECT + col0 - - col1 * col1 AS col2 FROM tab1 cor0
----
164
249
679

query I rowsort
SELECT ( ( + col1 ) ) + + col0 AS col1 FROM tab1 AS cor0
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 82 * - col1 col1 FROM tab0 AS cor0
----
-7052
-7462
-7954

query I rowsort
SELECT - 99 + - 85 FROM tab2 AS cor0
----
-184
-184
-184

query I rowsort
SELECT ALL - - ( + col1 ) * col1 AS col1 FROM tab1 AS cor0
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-2194
SELECT - - col2 DIV + col0 col1 FROM tab2 AS cor0
----
0
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2194
SELECT - - col2 / + col0 col1 FROM tab2 AS cor0
----
0
0
3

query I rowsort
SELECT - 87 + cor0.col2 * - col2 + col2 FROM tab2 AS cor0
----
-1493
-737
-789

query I rowsort
SELECT - + ( ( + col1 ) ) FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT ( col0 ) * col1 + + col0 FROM tab2 cor0
----
1422
224
4680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2198
SELECT col1 * CAST( col0 + col0 AS SIGNED ) AS col1 FROM tab2
----
2686
434
9204

skipif mysql # not compatible
query I rowsort label-2198
SELECT col1 * CAST ( col0 + col0 AS INTEGER ) AS col1 FROM tab2
----
2686
434
9204

query I rowsort
SELECT + col1 * col0 * + col0 + 2 * + col0 * + col0 + - col1 FROM tab1 AS cor0
----
226
49142
95987

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 + col2 col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2201
SELECT ALL col0 DIV col0 + + ( col1 ) FROM tab1
----
11
14
27

skipif mysql # not compatible
query I rowsort label-2201
SELECT ALL col0 / col0 + + ( col1 ) FROM tab1
----
11
14
27

query I rowsort
SELECT ALL - + col1 * - ( col1 + + col1 ) AS col1 FROM tab0 AS cor0
----
14792
16562
18818

query I rowsort
SELECT ALL col0 * + col2 + - col2 * - col0 + + 89 AS col1 FROM tab0 AS cor0
----
14685
159
1673

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2204
SELECT DISTINCT - col0 * + CAST( 27 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-2403
-648
-945

skipif mysql # not compatible
query I rowsort label-2204
SELECT DISTINCT - col0 * + CAST ( 27 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-2403
-648
-945

query I rowsort
SELECT ALL col2 + - 16 * col2 * + col0 AS col1 FROM tab2 AS cor0
----
-2997
-32422
-47994

query I rowsort
SELECT ALL + col2 * ( 57 ) FROM tab1 cor0
----
3078
3249
5472

query I rowsort
SELECT - - col1 * 49 AS col0 FROM tab1 AS cor0
----
1274
490
637

query I rowsort
SELECT col0 + - col2 * - tab2.col2 AS col2 FROM tab2
----
1523
736
754

query I rowsort
SELECT DISTINCT tab1.col1 AS col1 FROM tab1, tab2 cor0
----
10
13
26

query I rowsort
SELECT DISTINCT - ( col0 + + col0 ) AS col1 FROM tab2
----
-14
-156
-158

onlyif mysql # use DIV operator for integer division
query I rowsort label-2211
SELECT col0 DIV CAST( + col2 + + col0 AS SIGNED ) AS col1 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2211
SELECT col0 / CAST ( + col2 + + col0 AS INTEGER ) AS col1 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2212
SELECT tab0.col0 DIV 34 + + col0 + - col1 AS col0 FROM tab0
----
-61
-62
0

skipif mysql # not compatible
query I rowsort label-2212
SELECT tab0.col0 / 34 + + col0 + - col1 AS col0 FROM tab0
----
-61
-62
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * 64 + tab1.col0 + col1 col0 FROM tab1
----
221
4170
5213

query I rowsort
SELECT + 51 + + 52 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to ecf8639d8d45f60ceb1f0b2da4453a21

query IIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 CROSS JOIN tab0 WHERE NOT ( NULL ) IN ( - cor0.col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 54 + cor0.col2 col2 FROM tab2 AS cor0
----
-16
-27
-28

query I rowsort
SELECT col2 * - cor0.col2 * col0 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT 73 * tab0.col1 FROM tab0
----
6278
6643
7081

query I rowsort
SELECT col2 - + 51 AS col1 FROM tab0
----
-18
-50
31

query I rowsort
SELECT - col0 * col1 - - col0 AS col1 FROM tab2
----
-1264
-210
-4524

query I rowsort
SELECT ALL - col1 * + col2 * ( 28 ) AS col2 FROM tab0
----
-208936
-2716
-79464

query I rowsort
SELECT ALL 40 AS col2 FROM tab0, tab1 AS cor0, tab2 cor1, tab2 AS cor2
----
81 values hashing to 09624b9180d40f03a4dda4b4c17356c0

query I rowsort
SELECT - + ( col2 ) * col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL - - ( - cor0.col0 ) * col2 - cor0.col2 AS col1 FROM tab0 AS cor0
----
-36
-7380
-825

query I rowsort
SELECT ALL - 35 * - col2 AS col0 FROM tab2 AS cor0
----
1330
910
945

query I rowsort
SELECT DISTINCT col0 * col1 + + col2 + + col1 * - col1 FROM tab0 AS cor0
----
-100
-5299
-6013

query I rowsort
SELECT ( + tab1.col0 * col0 ) AS col1 FROM tab1
----
4096
6400
9

query I rowsort
SELECT - col2 + - col0 + col1 * 3 AS col0 FROM tab0
----
102
201
255

query I rowsort
SELECT - tab1.col0 FROM tab1, tab2, tab0 cor0, tab1 AS cor1
----
81 values hashing to 08e380e50b0cb64601bc84e5254deef4

query I rowsort
SELECT tab1.col2 * + col1 + - col1 AS col0 FROM tab1
----
1235
1378
560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - col2 col2 FROM tab1
----
-108
-114
-192

query I rowsort
SELECT ALL - col1 + + col1 * + ( + 17 ) + + col2 FROM tab1 cor0
----
217
304
470

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * - cor0.col1 - - 4 col2 FROM tab0 AS cor0
----
-2060
-3391
-8095

query I rowsort
SELECT - + 93 * - col1 + - col2 * + col1 AS col0 FROM tab1 AS cor0
----
-39
1014
360

query I rowsort
SELECT ALL col2 + col0 * + 61 FROM tab2 AS cor0
----
454
4784
4857

query I rowsort
SELECT + col1 + + col0 * + 73 * 34 FROM tab1 AS cor0
----
158858
198573
7472

query I rowsort
SELECT ALL + + col2 + - col0 * col2 AS col2 FROM tab2 AS cor0
----
-162
-2002
-2964

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2238
SELECT 37 + + col2 * + CAST( + ( col0 ) AS SIGNED ) AS col2 FROM tab2 cor0
----
2065
226
3039

skipif mysql # not compatible
query I rowsort label-2238
SELECT 37 + + col2 * + CAST ( + ( col0 ) AS INTEGER ) AS col2 FROM tab2 cor0
----
2065
226
3039

query I rowsort
SELECT + 5 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 6035628694bdea36f584f3649088551d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col2 * + col0 + - col1 col0 FROM tab0
----
-159
620
7116

query I rowsort
SELECT ALL col1 * 19 AS col0 FROM tab1 AS cor0
----
190
247
494

query I rowsort
SELECT col1 * col2 AS col1 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT + - col0 * + ( 61 + + col2 ) FROM tab1 AS cor0
----
-12560
-345
-7552

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 59 col1 FROM tab2, tab2 cor0
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2245
SELECT DISTINCT + + CAST( col0 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-2245
SELECT DISTINCT + + CAST ( col0 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT col2 * + 69 FROM tab1 AS cor0
----
3726
3933
6624

query I rowsort
SELECT DISTINCT 32 * col1 FROM tab1 AS cor0
----
320
416
832

query I rowsort
SELECT DISTINCT - - 34 + col2 FROM tab2 AS cor0
----
60
61
72

query I rowsort
SELECT + ( 18 ) * col0 AS col2 FROM tab0 AS cor0
----
1602
432
630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 4 + 16 col2 FROM tab2
----
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-2251
SELECT 1 DIV - 16 AS col0 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2251
SELECT 1 / - 16 AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT - + ( + col0 ) * cor0.col0 AS col1 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT ( col0 ) * - col0 + - col2 FROM tab2 AS cor0
----
-6110
-6279
-76

query I rowsort
SELECT DISTINCT + 93 * - 14 AS col1 FROM tab0 AS cor0
----
-1302

query I rowsort
SELECT + - 42 * - col1 AS col0 FROM tab1 AS cor0
----
1092
420
546

query I rowsort
SELECT ALL - 5 AS col0 FROM tab1 cor0
----
-5
-5
-5

query I rowsort
SELECT - col1 * - 94 FROM tab0 AS cor0
----
8084
8554
9118

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2258
SELECT CAST( NULL AS SIGNED ) / - col1 AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2258
SELECT CAST ( NULL AS INTEGER ) / - col1 AS col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 * col2 * col1 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT col1 + + col2 * 50 AS col2 FROM tab1 AS cor0
----
2726
2860
4813

onlyif mysql # use DIV operator for integer division
query I rowsort label-2261
SELECT col2 + col0 DIV ( + 27 ) + + col2 FROM tab2 AS cor0
----
54
54
78

skipif mysql # not compatible
query I rowsort label-2261
SELECT col2 + col0 / ( + 27 ) + + col2 FROM tab2 AS cor0
----
54
54
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2262
SELECT + 45 + col0 + + CAST( NULL AS DECIMAL ) * + cor0.col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2262
SELECT + 45 + col0 + + CAST ( NULL AS REAL ) * + cor0.col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 81 + - col2 + + col0 FROM tab2
----
122
133
61

onlyif mysql # use DIV operator for integer division
query I rowsort label-2264
SELECT col1 DIV 34 + col1 + - col2 col0 FROM tab1
----
-28
-47
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2264
SELECT col1 / 34 + col1 + - col2 col0 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT ALL + - 69 FROM tab0, tab2 AS cor0, tab1, tab1 AS cor1
----
81 values hashing to b367033d2867a8ca951e3972e9b13154

onlyif mysql # use DIV operator for integer division
query I rowsort label-2266
SELECT - cor0.col1 * + col1 + col1 * col1 + col1 * col1 DIV - col2 AS col0 FROM tab1 AS cor0
----
-1
-1
-12

skipif mysql # not compatible
query I rowsort label-2266
SELECT - cor0.col1 * + col1 + col1 * col1 + col1 * col1 / - col2 AS col0 FROM tab1 AS cor0
----
-1
-1
-12

skipif mysql # not compatible
query I rowsort
SELECT 29 + + col2 + - CAST ( col0 + cor0.col1 * col2 AS REAL ) AS col1 FROM tab0 AS cor0
----
-102
-2800
-7440

query I rowsort
SELECT ALL + + col1 * - col2 + 0 AS col0 FROM tab0 cor0
----
-2838
-7462
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2269
SELECT - col0 * CAST( col1 AS SIGNED ) FROM tab1 AS cor0
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-2269
SELECT - col0 * CAST ( col1 AS INTEGER ) FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - - col1 + + col2 * - 1 AS col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT ALL - col2 + col2 - cor0.col1 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT col0 + 31 AS col0 FROM tab2 AS cor0
----
109
110
38

query I rowsort
SELECT DISTINCT col2 + - col2 * + 56 AS col2 FROM tab1 cor0
----
-2970
-3135
-5280

query I rowsort
SELECT - col1 + + ( col2 ) AS col0 FROM tab0 AS cor0
----
-53
-9
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col2 * + tab2.col2 col0 FROM tab2
----
1444
676
729

query I rowsort
SELECT ALL col1 * - col1 * tab1.col0 FROM tab1
----
-13520
-2028
-6400

query I rowsort
SELECT ALL tab2.col0 * + col0 * + col0 FROM tab2
----
343
474552
493039

query I rowsort
SELECT tab1.col1 AS col2 FROM tab1 WHERE col0 + - col2 * - col2 NOT BETWEEN + col1 AND ( NULL )
----

query I rowsort
SELECT DISTINCT - col0 + + col2 * col0 + + col1 AS col2 FROM tab0
----
7300
854
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2280
SELECT ALL col1 DIV - col1 AS col2 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2280
SELECT ALL col1 / - col1 AS col2 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT + tab0.col0 + col1 - col0 FROM tab0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2282
SELECT DISTINCT - col0 + col1 + col2 DIV - col1 AS col0 FROM tab0
----
2
62

skipif mysql # not compatible
query I rowsort label-2282
SELECT DISTINCT - col0 + col1 + col2 / - col1 AS col0 FROM tab0
----
2
62

query I rowsort
SELECT ALL + col2 + + col0 - - tab1.col1 AS col0 FROM tab1
----
131
189
83

query I rowsort
SELECT - col1 + - col1 + - col1 FROM tab0
----
-258
-273
-291

query I rowsort
SELECT DISTINCT - col1 + col2 + + col2 AS col1 FROM tab2
----
-7
23
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-2286
SELECT cor0.col0 - - col0 DIV col2 FROM tab1 AS cor0
----
3
65
80

skipif mysql # not compatible
query I rowsort label-2286
SELECT cor0.col0 - - col0 / col2 FROM tab1 AS cor0
----
3
65
80

query I rowsort
SELECT col0 * - col1 + + col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 - col1 col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT + tab0.col0 * + col1 FROM tab0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-2290
SELECT ALL col2 DIV - col0 AS col1 FROM tab1
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-2290
SELECT ALL col2 / - col0 AS col1 FROM tab1
----
-1
-18
0

query III rowsort
SELECT * FROM tab2 WHERE NOT col0 + col0 + - col2 < ( - col0 - col2 * col2 ) AND ( NULL ) IN ( - col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2292
SELECT cor0.col1 DIV - cor0.col0 AS col2 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-2292
SELECT cor0.col1 / - cor0.col0 AS col2 FROM tab2 AS cor0
----
-4
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2293
SELECT cor0.col0 DIV + col0 AS col2 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2293
SELECT cor0.col0 / + col0 AS col2 FROM tab0 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2294
SELECT - col1 + - cor0.col1 DIV col2 AS col1 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-2294
SELECT - col1 + - cor0.col1 / col2 AS col1 FROM tab1 AS cor0
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col2 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT - tab1.col1 + tab1.col0 FROM tab1
----
-23
54
67

query I rowsort
SELECT - - col0 * - col2 * col2 FROM tab0 AS cor0
----
-26136
-35
-598436

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col0 col1 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT ALL + col1 + col2 * - col2 AS col1 FROM tab1 AS cor0
----
-2890
-3239
-9203

onlyif mysql # use DIV operator for integer division
query I rowsort label-2300
SELECT DISTINCT col2 + - col0 DIV - col2 AS col1 FROM tab1 cor0
----
54
58
96

skipif mysql # not compatible
query I rowsort label-2300
SELECT DISTINCT col2 + - col0 / - col2 AS col1 FROM tab1 cor0
----
54
58
96

query I rowsort
SELECT DISTINCT cor0.col0 + + col0 FROM tab2 AS cor0
----
14
156
158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 88 col2 FROM tab2 AS cor0
----
-88
-88
-88

onlyif mysql # use DIV operator for integer division
query I rowsort label-2303
SELECT - col1 DIV - col0 + col2 FROM tab2 AS cor0
----
26
31
38

skipif mysql # not compatible
query I rowsort label-2303
SELECT - col1 / - col0 + col2 FROM tab2 AS cor0
----
26
31
38

query I rowsort
SELECT DISTINCT - 23 * - col1 + - ( + col0 ) + - col2 AS col0 FROM tab2 AS cor0
----
1253
274
679

onlyif mysql # use DIV operator for integer division
query I rowsort label-2305
SELECT DISTINCT + col2 DIV + col2 + - ( + col2 ) + cor0.col2 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-2305
SELECT DISTINCT + col2 / + col2 + - ( + col2 ) + cor0.col2 FROM tab0 AS cor0
----
1

query I rowsort
SELECT ALL + 48 + col2 * 7 AS col2 FROM tab2 cor0
----
230
237
314

query I rowsort
SELECT ALL - + col1 * cor0.col1 AS col1 FROM tab1 AS cor0
----
-100
-169
-676

onlyif mysql # use DIV operator for integer division
query I rowsort label-2308
SELECT ALL + col1 + + ( - col1 ) DIV col0 + cor0.col2 FROM tab2 AS cor0
----
54
55
85

skipif mysql # not compatible
query I rowsort label-2308
SELECT ALL + col1 + + ( - col1 ) / col0 + cor0.col2 FROM tab2 AS cor0
----
54
55
85

query I rowsort
SELECT + - col1 * + col0 + 71 FROM tab1 AS cor0
----
-569
-7
-969

query I rowsort
SELECT ALL - col0 * 7 + cor0.col0 AS col0 FROM tab0 AS cor0
----
-144
-210
-534

query I rowsort
SELECT ALL + col0 * ( - cor0.col0 ) + col1 + + ( + ( col1 ) ) FROM tab0 AS cor0
----
-1031
-404
-7739

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + - cor0.col2 * + cor0.col0 col0 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT DISTINCT - cor0.col2 + ( col2 ) AS col0 FROM tab1 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2314
SELECT ALL - cor0.col2 * col2 DIV col1 FROM tab0 AS cor0
----
-12
-73
0

skipif mysql # not compatible
query I rowsort label-2314
SELECT ALL - cor0.col2 * col2 / col1 FROM tab0 AS cor0
----
-12
-73
0

query I rowsort
SELECT + 36 * + col1 - 68 AS col0 FROM tab2
----
1048
2056
544

onlyif mysql # use DIV operator for integer division
query I rowsort label-2316
SELECT DISTINCT - col1 DIV col1 - col2 * + col1 col2 FROM tab1
----
-1249
-1405
-571

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2316
SELECT DISTINCT - col1 / col1 - col2 * + col1 col2 FROM tab1
----
-1249
-1405
-571

query I rowsort
SELECT + col0 + - col1 * - col0 FROM tab0
----
2088
3430
8188

query I rowsort
SELECT ALL col2 - - col0 FROM tab0
----
171
36
57

query I rowsort
SELECT DISTINCT - col0 * - col1 AS col1 FROM tab1
----
1040
640
78

query I rowsort
SELECT ALL - col1 * col2 * col2 FROM tab0
----
-611884
-93654
-97

query I rowsort
SELECT col2 AS col2 FROM tab2 WHERE NOT - tab2.col0 + col0 >= - col1
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2322
SELECT col0 DIV + col0 + col0 FROM tab0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-2322
SELECT col0 / + col0 + col0 FROM tab0
----
25
36
90

query I rowsort
SELECT col0 * - col2 - + col0 AS col2 FROM tab0
----
-70
-7387
-816

onlyif mysql # use DIV operator for integer division
query I rowsort label-2324
SELECT col0 DIV tab1.col0 AS col0 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2324
SELECT col0 / tab1.col0 AS col0 FROM tab1
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2325
SELECT DISTINCT - tab2.col2 DIV tab2.col1 - + col0 FROM tab2
----
-7
-78
-81

skipif mysql # not compatible
query I rowsort label-2325
SELECT DISTINCT - tab2.col2 / tab2.col1 - + col0 FROM tab2
----
-7
-78
-81

query I rowsort
SELECT col1 FROM tab1 WHERE NULL < ( NULL )
----

query I rowsort
SELECT + col0 + + col1 * - col2 FROM tab0
----
-2814
-62
-7373

query I rowsort
SELECT 50 + - col0 AS col1 FROM tab2 AS cor0
----
-28
-29
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 62 + col2 * + col2 col1 FROM tab2 AS cor0
----
1382
614
667

query I rowsort
SELECT DISTINCT + - col1 + - col0 AS col0 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT - col2 / - col2 + col1 FROM tab2 WHERE - col1 > NULL
----

query I rowsort
SELECT ALL + col1 + + tab1.col2 AS col1 FROM tab1
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col2 + - col0 col2 FROM tab1
----
-7
16
51

query I rowsort
SELECT col1 * - col1 * - col0 AS col0 FROM tab0
----
177504
329315
737009

query I rowsort
SELECT ALL col1 + - col1 FROM tab1 WHERE NULL IN ( col1 * - col0 )
----

query I rowsort
SELECT - col2 * col1 + - col1 AS col2 FROM tab0
----
-194
-2924
-7553

query III rowsort
SELECT * FROM tab2 WHERE - col2 * + col0 * + col2 + tab2.col0 > - col2
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * - col1 * + col2 col0 FROM tab2
----
-119652
-51034
-5859

query III rowsort
SELECT * FROM tab1 WHERE NOT + tab1.col0 + - col1 NOT IN ( - col1 - col1 )
----

query I rowsort
SELECT DISTINCT col2 * - col0 + + col2 * - col2 AS col2 FROM tab2
----
-2704
-4446
-918

query I rowsort
SELECT - tab1.col2 + col0 + - tab1.col2 * col2 AS col2 FROM tab1
----
-2967
-3242
-9232

query I rowsort
SELECT col0 * - col1 + + col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT + col1 * col1 - - col0 * col2 AS col2 FROM tab1 AS cor0
----
3748
7849
838

query I rowsort
SELECT + col1 * - col0 + + 93 FROM tab2 cor0
----
-124
-1250
-4509

query I rowsort
SELECT - col2 - - 29 AS col2 FROM tab1 AS cor0
----
-25
-28
-67

query I rowsort
SELECT ALL + col1 - + 45 FROM tab1 cor0
----
-19
-32
-35

onlyif mysql # use DIV operator for integer division
query I rowsort label-2347
SELECT ALL + cor0.col0 * cor0.col2 DIV col0 + + col2 FROM tab2 AS cor0
----
52
54
76

skipif mysql # not compatible
query I rowsort label-2347
SELECT ALL + cor0.col0 * cor0.col2 / col0 + + col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT col0 - ( 1 * col1 ) FROM tab2 cor0
----
-24
19
62

query I rowsort
SELECT ALL - col1 * 62 + cor0.col2 FROM tab1 AS cor0
----
-1558
-563
-710

query I rowsort
SELECT DISTINCT col1 + + col2 * col2 - col0 FROM tab1 cor0
----
2939
3195
9149

query I rowsort
SELECT col2 + - 17 * + 42 * col0 AS col1 FROM tab0 AS cor0
----
-17103
-24989
-63464

query I rowsort
SELECT - col2 * + 79 - - cor0.col1 AS col0 FROM tab1 AS cor0
----
-4240
-4493
-7571

query I rowsort
SELECT ALL - + cor0.col2 AS col2 FROM tab1, tab2 cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT - col1 + - col1 + + 59 FROM tab2
----
-3
-59
25

onlyif mysql # use DIV operator for integer division
query I rowsort label-2355
SELECT ALL - tab1.col1 * col1 + col2 * col2 DIV - tab1.col1 FROM tab1
----
-424
-788
-877

skipif mysql # not compatible
query I rowsort label-2355
SELECT ALL - tab1.col1 * col1 + col2 * col2 / - tab1.col1 FROM tab1
----
-424
-788
-877

query I rowsort
SELECT 44 * + col0 AS col0 FROM tab2 AS cor0
----
308
3432
3476

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * - col2 col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ALL 80 - + col1 FROM tab1 cor0
----
54
67
70

query I rowsort
SELECT ALL + cor0.col0 * - cor0.col2 - + 73 AS col2 FROM tab2 AS cor0
----
-2101
-262
-3075

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * col2 col1 FROM tab1 cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-2361
SELECT DISTINCT + col0 * - cor0.col2 + ( 57 ) DIV + cor0.col1 FROM tab1 AS cor0
----
-160
-3643
-7676

skipif mysql # not compatible
query I rowsort label-2361
SELECT DISTINCT + col0 * - cor0.col2 + ( 57 ) / + cor0.col1 FROM tab1 AS cor0
----
-160
-3643
-7676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * + col1 - ( + col0 ) col1 FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT + 9 AS col0 FROM tab0
----
9
9
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-2364
SELECT + ( + cor0.col1 ) DIV col2 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-2364
SELECT + ( + cor0.col1 ) / col2 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT ALL col1 + col2 * - 95 FROM tab2 AS cor0
----
-2411
-2534
-3593

query I rowsort
SELECT ALL col0 * 85 * col0 AS col2 FROM tab2
----
4165
517140
530485

query I rowsort
SELECT ALL + - col2 * + col2 AS col0 FROM tab0 cor0
----
-1
-1089
-6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-2368
SELECT DISTINCT - col1 DIV col1 AS col2 FROM tab2 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-2368
SELECT DISTINCT - col1 / col1 AS col2 FROM tab2 AS cor0
----
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2369
SELECT - col0 DIV - col2 + + cor0.col2 FROM tab1 AS cor0
----
54
58
96

skipif mysql # not compatible
query I rowsort label-2369
SELECT - col0 / - col2 + + cor0.col2 FROM tab1 AS cor0
----
54
58
96

query I rowsort
SELECT - 80 + - cor0.col1 AS col1 FROM tab0 cor0
----
-166
-171
-177

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 87 col1 FROM tab0 AS cor0
----
87
87
87

query I rowsort
SELECT + cor0.col2 + - 78 + cor0.col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 1e7cef5caa634fa31cff94b066584014

query I rowsort
SELECT + 14 + - col1 * + col2 * + 2 AS col1 FROM tab2 AS cor0
----
-1278
-1660
-3054

query I rowsort
SELECT + 94 + col2 FROM tab0 AS cor0
----
127
176
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col1 * col0 col0 FROM tab0 AS cor0
----
2150
3492
8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-2376
SELECT - 64 + - col2 DIV - cor0.col1 AS col2 FROM tab0 AS cor0
----
-64
-64
-64

skipif mysql # not compatible
query I rowsort label-2376
SELECT - 64 + - col2 / - cor0.col1 AS col2 FROM tab0 AS cor0
----
-64
-64
-64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 91 * col1 + + col0 col1 FROM tab2 AS cor0
----
-1468
-2814
-5291

query I rowsort
SELECT ALL tab1.col1 AS col0 FROM tab1, tab2 cor0, tab2 cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT 79 * 45 + col0 FROM tab0
----
3579
3590
3644

query I rowsort
SELECT ALL col0 * col2 * tab1.col2 AS col2 FROM tab1
----
207936
737280
8748

query I rowsort
SELECT col2 + - ( - col2 ) FROM tab0
----
164
2
66

query I rowsort
SELECT 3 + cor0.col0 FROM tab2 AS cor0
----
10
81
82

query I rowsort
SELECT ALL - ( ( - cor0.col0 ) ) FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT ALL - col1 * - 86 AS col2 FROM tab0 AS cor0
----
7396
7826
8342

query I rowsort
SELECT - ( - 44 ) + - col2 * col1 AS col1 FROM tab2 cor0
----
-1490
-602
-793

query I rowsort
SELECT DISTINCT ( col0 + - col1 ) * col1 AS col0 FROM tab0
----
-182
-5332
-6014

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab2, tab0, tab0 cor0, tab1
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-2388
SELECT + ( col2 ) DIV col0 + + col0 * - 48 AS col1 FROM tab2
----
-333
-3744
-3792

skipif mysql # not compatible
query I rowsort label-2388
SELECT + ( col2 ) / col0 + + col0 * - 48 AS col1 FROM tab2
----
-333
-3744
-3792

onlyif mysql # use DIV operator for integer division
query I rowsort label-2389
SELECT DISTINCT col0 DIV - tab2.col1 AS col0 FROM tab2
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-2389
SELECT DISTINCT col0 / - tab2.col1 AS col0 FROM tab2
----
-1
-4
0

query I rowsort
SELECT ALL - col2 + + cor0.col0 * + col1 AS col2 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT DISTINCT + - col0 + cor0.col0 * - col2 FROM tab1 AS cor0
----
-165
-3712
-7760

query I rowsort
SELECT ALL + col2 * + tab2.col1 FROM tab2
----
1534
646
837

query I rowsort
SELECT - col0 + cor0.col2 + + col1 FROM tab1 AS cor0
----
29
3
77

query I rowsort
SELECT ALL col2 * - col1 - - col2 AS col0 FROM tab1
----
-1152
-1350
-513

query I rowsort
SELECT ALL + 6 * - col2 * + col1 FROM tab2
----
-3876
-5022
-9204

query I rowsort
SELECT DISTINCT - + cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
-86
-91
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2397
SELECT + col1 + CAST( + 7 AS SIGNED ) + - col1 * 74 AS col1 FROM tab2 AS cor0
----
-1234
-2256
-4300

skipif mysql # not compatible
query I rowsort label-2397
SELECT + col1 + CAST ( + 7 AS INTEGER ) + - col1 * 74 AS col1 FROM tab2 AS cor0
----
-1234
-2256
-4300

query I rowsort
SELECT + col0 + ( 6 ) + + col2 AS col2 FROM tab0
----
177
42
63

query I rowsort
SELECT ALL - col0 + - 81 * - col1 FROM tab1
----
2103
746
973

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2, tab1 cor0, tab1 AS cor1
----
972 values hashing to cee640567b2a4ba7d97109d5025bf4d9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2401
SELECT col2 * + CAST( NULL AS SIGNED ) AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2401
SELECT col2 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + col2 + - 0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT col1 * col1 * 16 FROM tab2
----
15376
4624
55696

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 ALL - 32 * 59 FROM tab0 cor0
----
-1888
-1888
-1888

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * - col0 + col2 col2 FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT ALL 61 * col1 AS col2 FROM tab2 AS cor0
----
1037
1891
3599

query I rowsort
SELECT ALL + col0 * 19 AS col0 FROM tab0 AS cor0
----
1691
456
665

onlyif mysql # use DIV operator for integer division
query I rowsort label-2409
SELECT + 15 + col2 DIV + col0 AS col2 FROM tab2 AS cor0
----
15
15
18

skipif mysql # not compatible
query I rowsort label-2409
SELECT + 15 + col2 / + col0 AS col2 FROM tab2 AS cor0
----
15
15
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( col1 ) * - cor0.col1 col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT DISTINCT - 34 * col2 + - col2 FROM tab1 cor0
----
-1890
-1995
-3360

query I rowsort
SELECT ALL - - 52 + + col1 FROM tab0 AS cor0
----
138
143
149

query I rowsort
SELECT ALL col1 * + 63 * col2 FROM tab1 AS cor0
----
35910
78624
88452

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2414
SELECT ALL - + CAST( + col0 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-2414
SELECT ALL - + CAST ( + col0 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL - 88 + col0 * - col2 FROM tab1 AS cor0
----
-250
-3736
-7768

query I rowsort
SELECT - - col2 * + col2 + - cor0.col1 FROM tab0 cor0
----
-96
1003
6633

query I rowsort
SELECT ALL + + col1 * + col2 * col1 AS col1 FROM tab0 AS cor0
----
244068
679042
9409

query I rowsort
SELECT 24 + col1 FROM tab1 AS cor0
----
34
37
50

onlyif mysql # use DIV operator for integer division
query I rowsort label-2419
SELECT ALL 77 DIV - col0 FROM tab1 AS cor0
----
-1
-25
0

skipif mysql # not compatible
query I rowsort label-2419
SELECT ALL 77 / - col0 FROM tab1 AS cor0
----
-1
-25
0

skipif mysql # not compatible
query I rowsort
SELECT 77 + col0 * CAST ( + 24 AS REAL ) AS col2 FROM tab2 AS cor0
----
1949
1973
245

query I rowsort
SELECT + col2 + + col0 + - col1 AS col0 FROM tab2
----
100
3
45

query I rowsort
SELECT ALL 93 * col2 * + 98 FROM tab2 AS cor0
----
236964
246078
346332

skipif mysql # not compatible
query I rowsort
SELECT + - ( col2 ) + - CAST ( col1 AS REAL ) AS col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT ALL - + cor0.col1 + col2 AS col1 FROM tab1 cor0
----
28
47
83

query I rowsort
SELECT + col0 * + cor0.col0 - col2 * col0 FROM tab0 AS cor0
----
-216
1190
623

query I rowsort
SELECT + cor0.col2 * col1 - - cor0.col2 FROM tab0 AS cor0
----
2871
7544
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-2427
SELECT + - 98 + - col1 DIV + 87 FROM tab1 AS cor0
----
-98
-98
-98

skipif mysql # not compatible
query I rowsort label-2427
SELECT + - 98 + - col1 / + 87 FROM tab1 AS cor0
----
-98
-98
-98

query I rowsort
SELECT ALL - + 33 FROM tab2 AS cor0
----
-33
-33
-33

onlyif mysql # use DIV operator for integer division
query I rowsort label-2429
SELECT - col2 DIV - 35 + col2 * col0 * cor0.col1 FROM tab2 cor0
----
119652
51035
5859

skipif mysql # not compatible
query I rowsort label-2429
SELECT - col2 / - 35 + col2 * col0 * cor0.col1 FROM tab2 cor0
----
119652
51035
5859

query I rowsort
SELECT DISTINCT col2 * 67 * col2 + col0 FROM tab1 cor0
----
195375
217747
617552

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2431
SELECT - + col2 + - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2431
SELECT - + col2 + - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + col0 * - col1 col1 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT ALL col1 * 80 + - col2 * col1 + + col1 AS col2 FROM tab0 AS cor0
----
-91
4128
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-2434
SELECT DISTINCT + ( col1 ) - - col2 DIV col0 FROM tab1
----
10
14
44

skipif mysql # not compatible
query I rowsort label-2434
SELECT DISTINCT + ( col1 ) - - col2 / col0 FROM tab1
----
10
14
44

query I rowsort
SELECT ALL - 79 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 1b7b0b34fe3431fb409719624d12791f

query I rowsort
SELECT ALL + + 97 AS col1 FROM tab1 AS cor0
----
97
97
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2437
SELECT - col1 + 93 DIV col2 FROM tab0 AS cor0
----
-4
-84
-90

skipif mysql # not compatible
query I rowsort label-2437
SELECT - col1 + 93 / col2 FROM tab0 AS cor0
----
-4
-84
-90

query I rowsort
SELECT ( + 82 ) AS col1 FROM tab1
----
82
82
82

query I rowsort
SELECT ALL + 51 - cor0.col1 FROM tab0, tab1 AS cor0
----
9 values hashing to eb68870e25d535acd93140a717b0505d

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2440
SELECT ALL CAST( NULL AS SIGNED ) + - cor0.col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2440
SELECT ALL CAST ( NULL AS INTEGER ) + - cor0.col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 * + 55 * - cor0.col1 FROM tab0 AS cor0
----
-406780
-455455
-517495

query I rowsort
SELECT - + cor0.col0 * - col2 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-2443
SELECT col1 DIV cor0.col2 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2443
SELECT col1 / cor0.col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT 36 + cor0.col0 FROM tab1 AS cor0
----
100
116
39

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2445
SELECT + - 54 + col1 * - CAST( - col1 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
115
46
622

skipif mysql # not compatible
query I rowsort label-2445
SELECT + - 54 + col1 * - CAST ( - col1 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
115
46
622

onlyif mysql # use DIV operator for integer division
query I rowsort label-2446
SELECT 96 DIV cor0.col2 AS col0 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2446
SELECT 96 / cor0.col2 AS col0 FROM tab1 cor0
----
1
1
1

query I rowsort
SELECT DISTINCT + - col2 + col0 * 45 FROM tab0 AS cor0
----
1047
1574
3923

query I rowsort
SELECT ALL - + col2 + col2 * 60 FROM tab0 cor0
----
1947
4838
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2449
SELECT DISTINCT + + col0 * + CAST( - col2 AS SIGNED ) + col1 AS col1 FROM tab1 AS cor0
----
-136
-3638
-7667

skipif mysql # not compatible
query I rowsort label-2449
SELECT DISTINCT + + col0 * + CAST ( - col2 AS INTEGER ) + col1 AS col1 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT + col0 * col2 + cor0.col2 FROM tab0 AS cor0
----
36
7380
825

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2451
SELECT ALL - col2 * CAST( + col1 AS SIGNED ) col0 FROM tab2 AS cor0
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2451
SELECT ALL - col2 * CAST ( + col1 AS INTEGER ) col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + + col0 + - 37 AS col2 FROM tab0 AS cor0
----
-13
-2
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-2453
SELECT + + col2 DIV - 67 + col1 DIV + col0 FROM tab2 AS cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-2453
SELECT + + col2 / - 67 + col1 / + col0 FROM tab2 AS cor0
----
0
0
4

query I rowsort
SELECT DISTINCT + + cor0.col0 * - 44 + col1 * + col2 * 84 AS col2 FROM tab0 AS cor0
----
237336
622892
6608

query I rowsort
SELECT ALL - col1 * + ( ( col2 ) ) + cor0.col1 * col2 * - col0 AS col0 FROM tab2 AS cor0
----
-121186
-51680
-6696

onlyif mysql # use DIV operator for integer division
query I rowsort label-2456
SELECT ALL - - col2 + - 39 DIV col2 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-2456
SELECT ALL - - col2 + - 39 / col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT cor0.col2 + + ( ( col0 ) ) FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT + col1 + cor0.col0 * col0 FROM tab1 cor0
----
35
4106
6413

query I rowsort
SELECT DISTINCT tab0.col0 + tab0.col1 FROM tab0
----
110
132
180

query I rowsort
SELECT ALL col0 - - 1 FROM tab2 AS cor0
----
79
8
80

query I rowsort
SELECT ALL + + col0 + - col2 * col0 AS col2 FROM tab2 AS cor0
----
-182
-1950
-2923

onlyif mysql # use DIV operator for integer division
query I rowsort label-2462
SELECT + cor0.col2 + + col0 * 13 DIV - col1 FROM tab2 cor0
----
-22
25
9

skipif mysql # not compatible
query I rowsort label-2462
SELECT + cor0.col2 + + col0 * 13 / - col1 FROM tab2 cor0
----
-22
25
9

query I rowsort
SELECT + + ( 40 ) * col0 FROM tab1 AS cor0
----
120
2560
3200

query I rowsort
SELECT ALL - col2 * col2 * + 20 FROM tab1
----
-184320
-58320
-64980

query I rowsort
SELECT DISTINCT + - 60 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
-60

query I rowsort
SELECT + cor0.col0 AS col2 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT + col1 + + ( - col0 ) AS col2 FROM tab2 AS cor0
----
-19
-62
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-2468
SELECT - 42 DIV cor0.col1 + col2 FROM tab2 cor0
----
26
26
36

skipif mysql # not compatible
query I rowsort label-2468
SELECT - 42 / cor0.col1 + col2 FROM tab2 cor0
----
26
26
36

query I rowsort
SELECT - tab2.col2 * col0 * - tab2.col2 FROM tab2
----
114076
5103
52728

query I rowsort
SELECT - 11 + - col0 AS col2 FROM tab1 AS cor0
----
-14
-75
-91

query I rowsort
SELECT tab1.col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT DISTINCT - 7 AS col1 FROM tab2, tab1 AS cor0
----
-7

query I rowsort
SELECT ALL + - 78 + + col0 FROM tab2 AS cor0
----
-71
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor1.col0 col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT + col0 * + 50 FROM tab2 AS cor0
----
350
3900
3950

query I rowsort
SELECT + col2 + - ( 8 + col0 ) AS col1 FROM tab1 AS cor0
----
-15
43
8

query I rowsort
SELECT col0 * 49 AS col2 FROM tab2
----
343
3822
3871

query I rowsort
SELECT 63 FROM tab1, tab2 AS cor0
----
9 values hashing to c3eea92c46f2c49716f386a58b575025

query I rowsort
SELECT - col2 * cor0.col2 + col2 FROM tab1 AS cor0
----
-2862
-3192
-9120

query I rowsort
SELECT ( col1 ) * col2 * col0 + + col2 FROM tab1 AS cor0
----
36537
4266
99936

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 col0 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + 49 * - col0 FROM tab2 AS cor0
----
-343
-3822
-3871

query I rowsort
SELECT ALL + + col2 + - col2 * + col2 + + col0 FROM tab0 AS cor0
----
-1032
-6553
35

query I rowsort
SELECT DISTINCT - cor0.col1 + - ( col1 ) AS col2 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT DISTINCT 34 + col0 AS col2 FROM tab0
----
123
58
69

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0, tab0 cor1, tab0, tab2 AS cor2
----
3645 values hashing to 71180f9f3efadf0ee3a7fec9678208ad

query I rowsort
SELECT ALL cor0.col0 * + col2 + col2 * - col2 AS col0 FROM tab0 AS cor0
----
-297
34
574

query I rowsort
SELECT - col1 - 63 FROM tab2 AS cor0
----
-122
-80
-94

query I rowsort
SELECT - - ( - col1 ) * + cor0.col0 * col1 - + 98 FROM tab0 AS cor0
----
-177602
-329413
-737107

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - ( col1 ) * cor0.col1 + col1 col0 FROM tab2 cor0
----
-272
-3422
-930

query I rowsort
SELECT col0 + 32 AS col2 FROM tab0 cor0
----
121
56
67

query I rowsort
SELECT - ( + col0 ) + col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT - ( 21 ) + + col1 * ( 34 ) AS col1 FROM tab1 AS cor0
----
319
421
863

query I rowsort
SELECT DISTINCT + col1 * - ( + col2 ) * 92 FROM tab0 AS cor0
----
-261096
-686504
-8924

query I rowsort
SELECT + - col0 + + col0 * - col0 AS col1 FROM tab0 AS cor0
----
-1260
-600
-8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 36 + + cor0.col2 * - col1 col2 FROM tab0 AS cor0
----
-133
-2874
-7498

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + cor0.col0 col1 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT ALL col0 + + col1 - tab0.col2 AS col0 FROM tab0
----
131
77
98

query I rowsort
SELECT ALL - 8 - - 33 * - col0 AS col1 FROM tab1
----
-107
-2120
-2648

query I rowsort
SELECT ALL - 81 - + col0 FROM tab2
----
-159
-160
-88

query I rowsort
SELECT + col1 * col2 + col0 * + col1 AS col0 FROM tab2 AS cor0
----
1054
1989
6136

query I rowsort
SELECT ALL - 39 + + col0 FROM tab1 AS cor0
----
-36
25
41

query I rowsort
SELECT DISTINCT cor0.col2 * cor0.col1 + col0 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT + cor0.col2 + col1 * + col1 FROM tab1 AS cor0
----
157
265
730

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2505
SELECT DISTINCT - CAST( NULL AS SIGNED ) col1 FROM tab0, tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2505
SELECT DISTINCT - CAST ( NULL AS INTEGER ) col1 FROM tab0, tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2506
SELECT DISTINCT + col0 DIV col1 AS col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-2506
SELECT DISTINCT + col0 / col1 AS col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT 1 * - col1 + col0 + 97 FROM tab2
----
116
159
73

query I rowsort
SELECT - col0 + col0 - col2 * ( 61 ) FROM tab0
----
-2013
-5002
-61

query I rowsort
SELECT DISTINCT + 76 * - col0 - + tab0.col1 * 57 FROM tab0
----
-11951
-6726
-8189

query I rowsort
SELECT ALL - 18 * col0 FROM tab2 AS cor0
----
-126
-1404
-1422

query I rowsort
SELECT ALL + + 93 FROM tab2 AS cor0
----
93
93
93

query I rowsort
SELECT DISTINCT + + col0 + col2 * + 1 FROM tab0 cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-2513
SELECT ALL - col1 + + col1 DIV + col1 AS col1 FROM tab2 AS cor0
----
-16
-30
-58

skipif mysql # not compatible
query I rowsort label-2513
SELECT ALL - col1 + + col1 / + col1 AS col1 FROM tab2 AS cor0
----
-16
-30
-58

query I rowsort
SELECT ALL - 83 AS col0 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 77a48ad722db122f51d5ef36604ad843

query I rowsort
SELECT DISTINCT + - col0 + col2 * - 84 + + col2 AS col1 FROM tab1 AS cor0
----
-4485
-4795
-8048

query I rowsort
SELECT - col2 + ( col2 ) FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2517
SELECT DISTINCT - col1 DIV - col0 AS col2 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-2517
SELECT DISTINCT - col1 / - col0 AS col2 FROM tab0
----
1
2
3

query I rowsort
SELECT - col1 - ( col2 ) FROM tab2
----
-55
-58
-85

query I rowsort
SELECT - col1 * + 19 + + col0 FROM tab1
----
-126
-167
-491

query I rowsort
SELECT ( - cor0.col1 ) AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query I rowsort
SELECT tab1.col0 - + tab1.col2 AS col1 FROM tab1
----
-16
-51
7

query I rowsort
SELECT col2 * - 64 + tab2.col2 FROM tab2
----
-1638
-1701
-2394

query I rowsort
SELECT ALL cor0.col2 * + cor0.col1 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT tab2.col1 + - col0 FROM tab2
----
-19
-62
24

query I rowsort
SELECT - ( + col0 ) * cor0.col2 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT - col2 * - ( - col0 ) FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT 38 * + col0 * - col0 AS col1 FROM tab2 cor0
----
-1862
-231192
-237158

query I rowsort
SELECT ALL 4 * col2 FROM tab0 AS cor0
----
132
328
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2529
SELECT DISTINCT - + CAST( NULL AS DECIMAL ) + col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2529
SELECT DISTINCT - + CAST ( NULL AS REAL ) + col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + + ( + col1 ) * + col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - ( + 37 ) + + cor0.col2 * cor0.col0 + - 83 AS col2 FROM tab2 AS cor0
----
1908
2882
69

query I rowsort
SELECT + - 98 FROM tab1 AS cor0
----
-98
-98
-98

query I rowsort
SELECT ALL + 95 + - col0 * - col2 FROM tab1 AS cor0
----
257
3743
7775

query I rowsort
SELECT DISTINCT ( + col0 ) * col2 + - col2 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT DISTINCT - 2 FROM tab1 AS cor0
----
-2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2536
SELECT + CAST( - col1 AS SIGNED ) FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-2536
SELECT + CAST ( - col1 AS INTEGER ) FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT + - col1 * + ( + col0 ) FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2538
SELECT DISTINCT + + CAST( + col0 AS SIGNED ) FROM tab1 cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-2538
SELECT DISTINCT + + CAST ( + col0 AS INTEGER ) FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT ALL + ( col1 ) + + col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT + 50 * - col1 - col1 FROM tab2 AS cor0
----
-1581
-3009
-867

onlyif mysql # use DIV operator for integer division
query I rowsort label-2541
SELECT + tab1.col2 DIV - col1 + + col1 FROM tab1
----
24
5
6

skipif mysql # not compatible
query I rowsort label-2541
SELECT + tab1.col2 / - col1 + + col1 FROM tab1
----
24
5
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 51 col0 FROM tab0
----
-51
-51
-51

query I rowsort
SELECT col0 * - 59 + - 3 * col0 FROM tab0 AS cor0
----
-1488
-2170
-5518

query I rowsort
SELECT ALL + - ( - col1 ) AS col2 FROM tab1 cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col0 col1 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT + - cor0.col1 + - 12 * col0 FROM tab1 AS cor0
----
-62
-778
-973

query I rowsort
SELECT ALL tab1.col0 * - tab1.col1 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT cor0.col1 * ( col1 ) AS col0 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT DISTINCT + col0 * + 88 AS col1 FROM tab0 cor0
----
2112
3080
7832

query I rowsort
SELECT DISTINCT - - col2 - col0 AS col1 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT ALL + + col0 + cor0.col1 + + col2 FROM tab2 AS cor0
----
134
163
65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + col0 + col1 col0 FROM tab1
----
131
189
83

query I rowsort
SELECT DISTINCT col2 * - 98 FROM tab0 AS cor0
----
-3234
-8036
-98

query I rowsort
SELECT - col1 * col2 * + col1 AS col2 FROM tab2 AS cor0
----
-10982
-25947
-90506

query I rowsort
SELECT ALL + 88 * - col2 + - col1 FROM tab0 AS cor0
----
-185
-2990
-7307

query I rowsort
SELECT DISTINCT + col1 + - 79 * + col1 * - 72 AS col0 FROM tab2 AS cor0
----
176359
335651
96713

query I rowsort
SELECT col0 - 61 FROM tab0 AS cor0
----
-26
-37
28

query I rowsort
SELECT ALL - - ( - 63 ) + col1 AS col1 FROM tab0 AS cor0
----
23
28
34

query I rowsort
SELECT DISTINCT - - cor0.col0 * ( - col0 ) FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL - ( - col0 ) * col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT col1 + 30 * col1 + 10 FROM tab0 cor0
----
2676
2831
3017

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - 98 ) col1 FROM tab2 AS cor0
----
98
98
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2563
SELECT - CAST( - 62 AS SIGNED ) * col0 + col2 + ( col0 ) FROM tab2 cor0
----
468
4940
5015

skipif mysql # not compatible
query I rowsort label-2563
SELECT - CAST ( - 62 AS INTEGER ) * col0 + col2 + ( col0 ) FROM tab2 cor0
----
468
4940
5015

query I rowsort
SELECT ( col0 ) * - cor0.col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT 6 + - ( col0 ) + - col1 AS col1 FROM tab0 AS cor0
----
-104
-126
-174

query I rowsort
SELECT DISTINCT cor0.col0 * col0 + 89 + col1 * - col0 FROM tab1 AS cor0
----
20
3545
5449

query I rowsort
SELECT DISTINCT - - col0 * col1 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - 6 * col1 FROM tab1 AS cor0
----
-156
-60
-78

query I rowsort
SELECT + col1 * col1 * + col1 + cor0.col1 FROM tab1 AS cor0
----
1010
17602
2210

query I rowsort
SELECT DISTINCT 60 * col1 FROM tab2 AS cor0
----
1020
1860
3540

query I rowsort
SELECT - col2 + col1 + - ( ( col2 ) ) FROM tab1 AS cor0
----
-104
-179
-82

query I rowsort
SELECT DISTINCT col1 + 23 AS col0 FROM tab1
----
33
36
49

query I rowsort
SELECT DISTINCT - col1 * col1 + col0 + 47 AS col1 FROM tab2
----
-163
-3356
-907

query I rowsort
SELECT + col2 * + cor0.col1 + col2 FROM tab0 cor0
----
2871
7544
98

query I rowsort
SELECT col0 + col0 * + col1 AS col1 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT - - col1 * + cor0.col0 + + col1 AS col2 FROM tab1 AS cor0
----
104
1053
650

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col1 + + col0 col0 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT - col1 * + col1 * col2 - col0 FROM tab0 AS cor0
----
-244092
-679131
-9444

onlyif mysql # use DIV operator for integer division
query I rowsort label-2579
SELECT - + col2 DIV + col1 + col1 - - col2 * col1 FROM tab1 AS cor0
----
1254
1428
575

skipif mysql # not compatible
query I rowsort label-2579
SELECT - + col2 / + col1 + col1 - - col2 * col1 FROM tab1 AS cor0
----
1254
1428
575

query I rowsort
SELECT - 90 + col0 + - col2 FROM tab2 AS cor0
----
-110
-38
-49

query I rowsort
SELECT - cor0.col1 + - col2 * col0 AS col2 FROM tab0 AS cor0
----
-132
-7389
-878

query I rowsort
SELECT col2 * cor0.col0 + col0 AS col2 FROM tab1 cor0
----
165
3712
7760

query I rowsort
SELECT - col1 * col1 + col0 * col1 FROM tab1 AS cor0
----
-598
540
871

query I rowsort
SELECT DISTINCT + col0 * - col2 + - col2 AS col0 FROM tab0 AS cor0
----
-36
-7380
-825

query I rowsort
SELECT ALL cor0.col2 + - cor0.col0 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 5b9ded363f55d1d4bbc85491d2b84046

onlyif mysql # use DIV operator for integer division
query I rowsort label-2586
SELECT DISTINCT 4 DIV col1 AS col0 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-2586
SELECT DISTINCT 4 / col1 AS col0 FROM tab1
----
0

query I rowsort
SELECT + col2 * - cor0.col2 AS col0 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT col0 + 75 AS col1 FROM tab0
----
110
164
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-2589
SELECT col1 * col0 DIV + col2 AS col0 FROM tab1
----
1
10
11

skipif mysql # not compatible
query I rowsort label-2589
SELECT col1 * col0 / + col2 AS col0 FROM tab1
----
1
10
11

query I rowsort
SELECT DISTINCT col0 + ( col1 ) FROM tab1
----
29
74
93

query I rowsort
SELECT - ( tab1.col1 ) AS col0 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT col0 * + 65 * col0 AS col1 FROM tab2
----
3185
395460
405665

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2593
SELECT DISTINCT CAST( ( + col1 ) AS SIGNED ) AS col0 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-2593
SELECT DISTINCT CAST ( ( + col1 ) AS INTEGER ) AS col0 FROM tab1
----
10
13
26

query I rowsort
SELECT - ( col1 + tab0.col1 ) * tab0.col2 FROM tab0
----
-14924
-194
-5676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + col1 col0 FROM tab0
----
0

query I rowsort
SELECT ALL + cor0.col0 * + 46 - col0 AS col1 FROM tab1 AS cor0
----
135
2880
3600

query I rowsort
SELECT cor0.col0 * + 7 FROM tab2 cor0
----
49
546
553

query I rowsort
SELECT ALL ( + col0 ) * - col2 AS col2 FROM tab2
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-2599
SELECT + 52 DIV - col1 AS col0 FROM tab2
----
-1
-3
0

skipif mysql # not compatible
query I rowsort label-2599
SELECT + 52 / - col1 AS col0 FROM tab2
----
-1
-3
0

query I rowsort
SELECT tab1.col0 * + tab1.col0 AS col2 FROM tab1
----
4096
6400
9

query I rowsort
SELECT col1 * - 47 FROM tab2
----
-1457
-2773
-799

query I rowsort
SELECT 61 * tab1.col0 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 549898816cae2e868cfcf2407ea21c95

query I rowsort
SELECT col1 + + col2 * col0 - col2 AS col0 FROM tab0
----
131
7307
845

query I rowsort
SELECT - + col1 - 21 FROM tab1 AS cor0
----
-31
-34
-47

query I rowsort
SELECT col0 * 73 FROM tab1 cor0
----
219
4672
5840

query I rowsort
SELECT + col0 * cor0.col0 - col0 FROM tab0 AS cor0
----
1190
552
7832

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2607
SELECT DISTINCT - col1 * - CAST( NULL AS SIGNED ) - + 61 * + col2 AS col2 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-2607
SELECT DISTINCT - col1 * - CAST ( NULL AS INTEGER ) - + 61 * + col2 AS col2 FROM tab0
----
NULL

query I rowsort
SELECT DISTINCT + col1 * 72 + ( + tab2.col0 * + col1 ) + col2 * + col2 * + col0 FROM tab2
----
116643
61578
7552

query I rowsort
SELECT - + 54 FROM tab1 AS cor0
----
-54
-54
-54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + tab0.col0 ) col1 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT col1 * 47 * + col1 FROM tab1
----
31772
4700
7943

onlyif mysql # use DIV operator for integer division
query I rowsort label-2612
SELECT 44 + col2 DIV + col0 FROM tab2
----
44
44
47

skipif mysql # not compatible
query I rowsort label-2612
SELECT 44 + col2 / + col0 FROM tab2
----
44
44
47

query I rowsort
SELECT - cor0.col1 * + cor0.col1 AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

onlyif mysql # use DIV operator for integer division
query I rowsort label-2614
SELECT ALL - cor0.col0 DIV col2 col1 FROM tab0 AS cor0
----
-1
-35
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2614
SELECT ALL - cor0.col0 / col2 col1 FROM tab0 AS cor0
----
-1
-35
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2615
SELECT - ( + col1 ) + - col2 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2615
SELECT - ( + col1 ) + - col2 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor2.col2 FROM tab1, tab1 cor0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to e938777ebffc2e3e9c0cdfaa4f732c05

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2617
SELECT DISTINCT + CAST( NULL AS DECIMAL ) + cor0.col1 + - col0 * - ( cor0.col0 ) col1 FROM tab1 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2617
SELECT DISTINCT + CAST ( NULL AS REAL ) + cor0.col1 + - col0 * - ( cor0.col0 ) col1 FROM tab1 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col1 * + col2 + - col2 - + ( cor0.col0 * col0 ) col1 FROM tab1 AS cor0
----
-3583
-5248
1341

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 cor0, tab0 AS cor1, tab1 cor2
----
972 values hashing to 0210050fb1701e2797a9b17e1ebac91e

query I rowsort
SELECT ALL 61 AS col2 FROM tab0 AS cor0
----
61
61
61

query I rowsort
SELECT DISTINCT - col0 + col1 + ( - col2 ) AS col0 FROM tab0 AS cor0
----
-80
29
61

query I rowsort
SELECT ALL col0 * + cor0.col0 + + col0 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT DISTINCT + col1 + + ( col0 ) * col0 AS col2 FROM tab0 AS cor0
----
1322
662
8012

onlyif mysql # use DIV operator for integer division
query I rowsort label-2624
SELECT DISTINCT - col1 DIV + CAST( col1 * + cor0.col0 + 3 AS SIGNED ) FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-2624
SELECT DISTINCT - col1 / + CAST ( col1 * + cor0.col0 + 3 AS INTEGER ) FROM tab0 AS cor0
----
0

query I rowsort
SELECT col1 * - 12 AS col2 FROM tab2 AS cor0
----
-204
-372
-708

query I rowsort
SELECT - - col0 - 98 FROM tab0 AS cor0
----
-63
-74
-9

query I rowsort
SELECT col0 * ( + col1 ) + + col2 FROM tab1 AS cor0
----
1136
132
697

onlyif mysql # use DIV operator for integer division
query I rowsort label-2628
SELECT - col2 DIV + 35 + + col2 + + col0 * + ( - col1 ) FROM tab0 AS cor0
----
-2031
-3394
-8019

skipif mysql # not compatible
query I rowsort label-2628
SELECT - col2 / + 35 + + col2 + + col0 * + ( - col1 ) FROM tab0 AS cor0
----
-2031
-3394
-8019

query I rowsort
SELECT + col2 - 86 AS col0 FROM tab0 AS cor0
----
-4
-53
-85

query I rowsort
SELECT ALL col0 * 73 + + 31 AS col0 FROM tab0 AS cor0
----
1783
2586
6528

query I rowsort
SELECT col2 * col1 + - 62 AS col0 FROM tab1 cor0
----
1186
1342
508

query I rowsort
SELECT ALL - col2 - - ( 19 ) AS col2 FROM tab1 AS cor0
----
-35
-38
-77

onlyif mysql # use DIV operator for integer division
query I rowsort label-2633
SELECT DISTINCT col0 + + 81 DIV 97 FROM tab0 cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-2633
SELECT DISTINCT col0 + + 81 / 97 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT ALL - cor0.col0 * col1 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - + col2 + cor0.col0 * col0 FROM tab2 AS cor0
----
22
6058
6203

query I rowsort
SELECT DISTINCT cor0.col0 + ( + 91 ) FROM tab2, tab1 AS cor0
----
155
171
94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2637
SELECT DISTINCT col2 * CAST( NULL AS SIGNED ) + col0 * - col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2637
SELECT DISTINCT col2 * CAST ( NULL AS INTEGER ) + col0 * - col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL col1 * col1 FROM tab1 cor0
----
100
169
676

query I rowsort
SELECT ALL + + col0 * - 43 FROM tab1 cor0
----
-129
-2752
-3440

query I rowsort
SELECT ALL col2 * ( tab0.col1 * col0 ) - 71 FROM tab0
----
3324
664047
68041

query I rowsort
SELECT ALL col0 - col0 AS col1 FROM tab0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2642
SELECT DISTINCT CAST( NULL AS DECIMAL ) AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2642
SELECT DISTINCT CAST ( NULL AS REAL ) AS col0 FROM tab1 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2643
SELECT DISTINCT CAST( + col1 AS SIGNED ) FROM tab0 cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-2643
SELECT DISTINCT CAST ( + col1 AS INTEGER ) FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT ALL - col2 + 8 AS col1 FROM tab2 AS cor0
----
-18
-19
-30

query I rowsort
SELECT DISTINCT - ( col0 ) + + col2 * col2 FROM tab2 AS cor0
----
1365
598
722

query I rowsort
SELECT - - col1 - + col0 * + col0 FROM tab2 cor0
----
-18
-6025
-6224

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col0 ) + col0 col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT ALL - col2 - - 0 AS col2 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT ALL - col2 - - ( col0 ) * - col0 FROM tab2
----
-6110
-6279
-76

query I rowsort
SELECT ALL col1 * - 50 * + col2 AS col1 FROM tab0
----
-141900
-373100
-4850

query I rowsort
SELECT DISTINCT 13 FROM tab0 cor0
----
13

query I rowsort
SELECT ALL col0 * 87 * col1 FROM tab2
----
116841
18879
400374

query I rowsort
SELECT 43 + - 55 AS col1 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 3983bffe2adf88cb2efc3be93ee620c0

query I rowsort
SELECT ALL - col1 + cor0.col0 AS col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT - col1 * cor0.col1 - ( col1 ) FROM tab1 AS cor0
----
-110
-182
-702

query I rowsort
SELECT + 98 + + col1 FROM tab0 AS cor0
----
184
189
195

query I rowsort
SELECT ALL - ( col1 ) * 29 AS col0 FROM tab2 AS cor0
----
-1711
-493
-899

query I rowsort
SELECT - + col2 + - col0 * + 67 FROM tab1 AS cor0
----
-255
-4345
-5456

query I rowsort
SELECT DISTINCT col1 * + col2 * - col1 FROM tab1 AS cor0
----
-16224
-36504
-5700

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2660
SELECT - col1 + ( + col0 * - CAST( NULL AS SIGNED ) ) AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2660
SELECT - col1 + ( + col0 * - CAST ( NULL AS INTEGER ) ) AS col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT tab1.col2 + ( col2 ) AS col0 FROM tab1
----
108
114
192

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2662
SELECT DISTINCT + 22 + + col2 * + col1 + CAST( - col0 + - col0 AS SIGNED ) AS col1 FROM tab2
----
1400
510
845

skipif mysql # not compatible
query I rowsort label-2662
SELECT DISTINCT + 22 + + col2 * + col1 + CAST ( - col0 + - col0 AS INTEGER ) AS col1 FROM tab2
----
1400
510
845

query I rowsort
SELECT DISTINCT + 97 + + col2 * + col2 * ( col0 ) FROM tab1
----
208033
737377
8845

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2664
SELECT ALL CAST( col1 AS SIGNED ) FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-2664
SELECT ALL CAST ( col1 AS INTEGER ) FROM tab1
----
10
13
26

query I rowsort
SELECT + ( col1 ) + - ( col2 + + col2 ) FROM tab2
----
-23
-59
7

query I rowsort
SELECT col2 + - cor0.col2 * col0 FROM tab1 AS cor0
----
-108
-3591
-7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-2667
SELECT ALL - 18 + + col0 DIV - 78 FROM tab0 cor0
----
-18
-18
-19

skipif mysql # not compatible
query I rowsort label-2667
SELECT ALL - 18 + + col0 / - 78 FROM tab0 cor0
----
-18
-18
-19

query I rowsort
SELECT ALL - col1 + - cor0.col2 * - 33 FROM tab1 cor0
----
1756
1871
3155

query I rowsort
SELECT DISTINCT - - 56 * col0 + + col1 * col1 * - col1 AS col1 FROM tab1 AS cor0
----
-17408
2283
2584

query I rowsort
SELECT ALL 16 + col2 FROM tab1 AS cor0
----
112
70
73

query IIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0 WHERE NOT NULL NOT BETWEEN NULL AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col0 ) * col1 col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT + 66 + col1 + + col0 AS col0 FROM tab1
----
140
159
95

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2674
SELECT + 93 + + col1 / + CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2674
SELECT + 93 + + col1 / + CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2675
SELECT - col0 * - 57 DIV 3 AS col1 FROM tab1 AS cor0
----
1216
1520
57

skipif mysql # not compatible
query I rowsort label-2675
SELECT - col0 * - 57 / 3 AS col1 FROM tab1 AS cor0
----
1216
1520
57

query I rowsort
SELECT tab0.col0 + + col1 * tab0.col1 AS col2 FROM tab0
----
7420
8370
9444

query I rowsort
SELECT ALL + 62 AS col1 FROM tab2, tab2 cor0, tab2 AS cor1
----
27 values hashing to 4911b1417a3797d23dd8f38b6ed05c1b

query I rowsort
SELECT ALL - col2 * 19 AS col1 FROM tab2
----
-494
-513
-722

query I rowsort
SELECT ALL 80 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 878f012d707aab113cedaf56e6c52e94

query I rowsort
SELECT ALL + 17 FROM tab0, tab0 cor0, tab2 AS cor1
----
27 values hashing to e0dd9155e4d67132637a04c18ef46b2a

query I rowsort
SELECT - 9 * - col1 FROM tab0 cor0
----
774
819
873

query I rowsort
SELECT col0 * + col0 + col2 FROM tab2
----
6110
6279
76

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab0 AS cor2
----
3645 values hashing to ced36882687f040e969c817b62d2e456

query I rowsort
SELECT ALL + col0 * + cor0.col1 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 30 col2 FROM tab1
----
30
30
30

onlyif mysql # use DIV operator for integer division
query I rowsort label-2686
SELECT + - ( - col2 ) - + col2 DIV - col0 FROM tab2 AS cor0
----
26
30
38

skipif mysql # not compatible
query I rowsort label-2686
SELECT + - ( - col2 ) - + col2 / - col0 FROM tab2 AS cor0
----
26
30
38

query I rowsort
SELECT DISTINCT - + ( col0 ) + - col0 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT DISTINCT + col2 * + ( col0 * col1 ) + + col0 + cor0.col1 * 41 AS col0 FROM tab0 cor0
----
667938
71662
7407

query I rowsort
SELECT - + ( - 74 ) + col1 AS col2 FROM tab0 AS cor0
----
160
165
171

query I rowsort
SELECT 48 * col1 + col2 FROM tab2 AS cor0
----
1515
2858
854

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 51 + + col1 * col0 col1 FROM tab2 AS cor0
----
1292
166
4551

query I rowsort
SELECT DISTINCT col2 + col1 * cor0.col1 AS col0 FROM tab2 AS cor0
----
327
3507
988

onlyif mysql # use DIV operator for integer division
query I rowsort label-2693
SELECT ALL - col0 DIV col0 AS col1 FROM tab2 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2693
SELECT ALL - col0 / col0 AS col1 FROM tab2 cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2694
SELECT - 22 DIV col0 AS col2 FROM tab2
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-2694
SELECT - 22 / col0 AS col2 FROM tab2
----
-3
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2695
SELECT ALL - col1 * tab0.col0 DIV + col1 AS col2 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-2695
SELECT ALL - col1 * tab0.col0 / + col1 AS col2 FROM tab0
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-2696
SELECT - 82 DIV 9 FROM tab1
----
-9
-9
-9

skipif mysql # not compatible
query I rowsort label-2696
SELECT - 82 / 9 FROM tab1
----
-9
-9
-9

query I rowsort
SELECT DISTINCT + col0 * + col1 AS col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT - + 13 * - 87 AS col0 FROM tab1 AS cor0
----
1131
1131
1131

query I rowsort
SELECT + 94 * 56 FROM tab2 AS cor0
----
5264
5264
5264

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2700
SELECT - 35 * - col2 * - CAST( col2 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-23660
-25515
-50540

skipif mysql # not compatible
query I rowsort label-2700
SELECT - 35 * - col2 * - CAST ( col2 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-23660
-25515
-50540

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col1 * 10 col1 FROM tab0 AS cor0
----
1005
884
999

query I rowsort
SELECT DISTINCT - cor0.col1 + + col0 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT ALL + cor0.col1 + + cor0.col2 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2704
SELECT - col0 / col1 + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2704
SELECT - col0 / col1 + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 82 - + cor0.col1 FROM tab1 AS cor0
----
-108
-92
-95

query I rowsort
SELECT - - cor0.col2 * cor0.col1 - - 25 FROM tab0 AS cor0
----
122
2863
7487

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col2 - + 3 col1 FROM tab2 AS cor0
----
1531
643
834

query I rowsort
SELECT ALL - - 25 - cor0.col0 AS col2 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 11ceb51842b156c6eb9089bbd2e1386c

query I rowsort
SELECT - cor0.col0 * + col1 + col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT 78 + + ( - col2 ) FROM tab1 cor0
----
-18
21
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( 88 ) col0 FROM tab0 AS cor0
----
88
88
88

query I rowsort
SELECT + 22 FROM tab0, tab2 AS cor0
----
9 values hashing to c55ee7433d8d39a59b1de2aadd9538c9

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab1, tab0 AS cor2
----
3645 values hashing to adb876f0e99f8d4fbf7b7fcf19919a21

onlyif mysql # use DIV operator for integer division
query I rowsort label-2714
SELECT DISTINCT + col1 DIV 95 + + col1 AS col0 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-2714
SELECT DISTINCT + col1 / 95 + + col1 AS col0 FROM tab2 AS cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * col1 + + col2 col1 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT - col2 + ( col1 ) AS col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT ALL + col2 - - 30 * col2 FROM tab1 AS cor0
----
1674
1767
2976

query I rowsort
SELECT DISTINCT + cor0.col1 * col0 + + 7 * col0 AS col0 FROM tab0 cor0
----
2232
3640
8722

query I rowsort
SELECT - + cor0.col2 + 55 AS col1 FROM tab0 AS cor0
----
-27
22
54

query I rowsort
SELECT col0 * + col0 * + 83 + - 5 AS col0 FROM tab1
----
339963
531195
742

query I rowsort
SELECT ALL col2 - - col1 AS col0 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT col2 + 5 AS col2 FROM tab0 AS cor0
----
38
6
87

query I rowsort
SELECT + + 45 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 14cec871edc37b5056cda01c8331fdca

query I rowsort
SELECT DISTINCT - 77 AS col0 FROM tab1
----
-77

query I rowsort
SELECT DISTINCT col2 - 84 FROM tab1
----
-27
-30
12

onlyif mysql # use DIV operator for integer division
query I rowsort label-2726
SELECT col2 + - tab0.col1 - + 97 DIV - col0 AS col2 FROM tab0
----
-49
-8
-94

skipif mysql # not compatible
query I rowsort label-2726
SELECT col2 + - tab0.col1 - + 97 / - col0 AS col2 FROM tab0
----
-49
-8
-94

query I rowsort
SELECT col1 * col2 + col1 + + col0 FROM tab1 AS cor0
----
1341
1433
644

onlyif mysql # use DIV operator for integer division
query I rowsort label-2728
SELECT + col2 + - 70 * col2 DIV + col2 AS col2 FROM tab0 AS cor0
----
-37
-69
12

skipif mysql # not compatible
query I rowsort label-2728
SELECT + col2 + - 70 * col2 / + col2 AS col2 FROM tab0 AS cor0
----
-37
-69
12

onlyif mysql # use DIV operator for integer division
query I rowsort label-2729
SELECT - col2 DIV tab0.col0 AS col1 FROM tab0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-2729
SELECT - col2 / tab0.col0 AS col1 FROM tab0
----
-1
0
0

query I rowsort
SELECT + 87 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to fa0cdd86483844cda3bb806e032d5c64

query I rowsort
SELECT DISTINCT + - 29 - col2 * cor0.col0 AS col2 FROM tab2 AS cor0
----
-2057
-218
-3031

query I rowsort
SELECT DISTINCT + + col0 * - col2 * ( col2 * cor0.col1 ) AS col1 FROM tab2 AS cor0
----
-158193
-1939292
-3110952

query I rowsort
SELECT DISTINCT col1 + col0 * + col2 - - col0 FROM tab1 AS cor0
----
191
3722
7773

query I rowsort
SELECT col0 + col0 * - col0 AS col0 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT + 12 + tab0.col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 2262c2f3e3d5cc56cd9d52c97ca1ab4a

query I rowsort
SELECT ALL - - 0 * - cor0.col2 + + ( cor0.col2 ) - col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + + col0 * - col2 + - 57 AS col2 FROM tab0 AS cor0
----
-7355
-849
-92

query I rowsort
SELECT DISTINCT + - 12 + col0 * col0 AS col2 FROM tab0 AS cor0
----
1213
564
7909

query I rowsort
SELECT 83 FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 18f405c31a0fb47ce3cc9f7effa8855c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2740
SELECT ALL - CAST( NULL AS SIGNED ) FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2740
SELECT ALL - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT + 73 FROM tab2 AS cor0
----
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-2742
SELECT DISTINCT - + 88 + col1 DIV col0 FROM tab1 AS cor0
----
-80
-88

skipif mysql # not compatible
query I rowsort label-2742
SELECT DISTINCT - + 88 + col1 / col0 FROM tab1 AS cor0
----
-80
-88

query I rowsort
SELECT ALL - + 81 * col0 AS col0 FROM tab1 AS cor0
----
-243
-5184
-6480

query I rowsort
SELECT DISTINCT 78 * + col2 FROM tab2
----
2028
2106
2964

query I rowsort
SELECT tab0.col0 * 20 FROM tab0, tab1 cor0
----
9 values hashing to 7c9c3e0d5466b072c8b1e09f0514ac02

query I rowsort
SELECT ALL 69 * col2 + cor0.col0 AS col2 FROM tab2 AS cor0
----
1870
1872
2701

query I rowsort
SELECT - 37 FROM tab1 cor0
----
-37
-37
-37

query I rowsort
SELECT ALL - - cor0.col2 + - col0 * col2 FROM tab2 AS cor0
----
-162
-2002
-2964

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 * col1 col2 FROM tab2 cor0
----
-289
-3481
-961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2750
SELECT - - col1 + CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2750
SELECT - - col1 + CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 37 AS col1 FROM tab1, tab1 AS cor0, tab2 cor1
----
37

query I rowsort
SELECT ALL - + col0 * - 27 FROM tab2 AS cor0
----
189
2106
2133

query I rowsort
SELECT DISTINCT + + col1 + + col2 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT col2 * - col2 * 3 AS col2 FROM tab2 AS cor0
----
-2028
-2187
-4332

query I rowsort
SELECT - col2 * ( - 47 ) AS col0 FROM tab2 AS cor0
----
1222
1269
1786

query I rowsort
SELECT DISTINCT 59 * + 62 AS col1 FROM tab0 AS cor0
----
3658

query I rowsort
SELECT + col0 * 99 + - col1 AS col2 FROM tab0 AS cor0
----
2290
3368
8720

query I rowsort
SELECT ALL col0 + - ( col2 ) AS col2 FROM tab1
----
-16
-51
7

query I rowsort
SELECT - col1 * + col0 + + col0 FROM tab1
----
-576
-75
-960

query I rowsort
SELECT DISTINCT - col1 * - tab0.col1 + col1 + col0 FROM tab0
----
7506
8461
9541

onlyif mysql # use DIV operator for integer division
query I rowsort label-2761
SELECT ALL col1 DIV - col1 + - col2 AS col1 FROM tab0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-2761
SELECT ALL col1 / - col1 + - col2 AS col1 FROM tab0
----
-2
-34
-83

query I rowsort
SELECT ALL + - ( 13 ) FROM tab0 cor0
----
-13
-13
-13

query I rowsort
SELECT - col1 + - col2 * + col2 FROM tab0 AS cor0
----
-1175
-6815
-98

query I rowsort
SELECT DISTINCT + - col1 * 39 AS col2 FROM tab1 AS cor0
----
-1014
-390
-507

onlyif mysql # use DIV operator for integer division
query I rowsort label-2765
SELECT - 47 DIV col0 + col0 AS col1 FROM tab1 cor0
----
-12
64
80

skipif mysql # not compatible
query I rowsort label-2765
SELECT - 47 / col0 + col0 AS col1 FROM tab1 cor0
----
-12
64
80

query I rowsort
SELECT ALL - + col0 + col0 * col1 AS col1 FROM tab1 cor0
----
576
75
960

query I rowsort
SELECT col0 * + cor0.col0 + - ( - 96 * col1 ) + - col1 FROM tab0 AS cor0
----
10440
16566
8746

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2768
SELECT ALL - CAST( 34 AS SIGNED ) * + col0 + 43 FROM tab1
----
-2133
-2677
-59

skipif mysql # not compatible
query I rowsort label-2768
SELECT ALL - CAST ( 34 AS INTEGER ) * + col0 + 43 FROM tab1
----
-2133
-2677
-59

query I rowsort
SELECT DISTINCT + + cor0.col1 + - col0 * ( 79 * col0 ) AS col2 FROM tab1 AS cor0
----
-323574
-505587
-685

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 98 * col0 + col1 col1 FROM tab0 cor0
----
-2266
-3333
-8631

query I rowsort
SELECT - + 9 * col2 FROM tab1 AS cor0
----
-486
-513
-864

query I rowsort
SELECT DISTINCT - 60 * col1 AS col1 FROM tab2 AS cor0
----
-1020
-1860
-3540

query I rowsort
SELECT - - col2 + + col2 + - 72 FROM tab0 AS cor0
----
-6
-70
92

query I rowsort
SELECT DISTINCT 21 + 61 AS col0 FROM tab2
----
82

query I rowsort
SELECT DISTINCT - 6 * - col1 + - tab0.col0 * col1 AS col0 FROM tab0
----
-1548
-2813
-7553

query I rowsort
SELECT + ( - 93 ) + tab1.col1 AS col2 FROM tab1
----
-67
-80
-83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2777
SELECT CAST( + col1 AS SIGNED ) + col1 * CAST( 45 AS SIGNED ) * col1 + - CAST( + col0 + col1 AS SIGNED ) FROM tab0
----
332796
372556
423370

skipif mysql # not compatible
query I rowsort label-2777
SELECT CAST ( + col1 AS INTEGER ) + col1 * CAST ( 45 AS INTEGER ) * col1 + - CAST ( + col0 + col1 AS INTEGER ) FROM tab0
----
332796
372556
423370

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2778
SELECT + CAST( col2 + + col2 AS SIGNED ) * + 25 AS col0 FROM tab1
----
2700
2850
4800

skipif mysql # not compatible
query I rowsort label-2778
SELECT + CAST ( col2 + + col2 AS INTEGER ) * + 25 AS col0 FROM tab1
----
2700
2850
4800

query I rowsort
SELECT ALL tab2.col0 + tab2.col0 FROM tab2
----
14
156
158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + + tab0.col1 col2 FROM tab0
----
119
173
98

query I rowsort
SELECT tab1.col1 + + 47 AS col2 FROM tab1
----
57
60
73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2782
SELECT ALL - col0 * - CAST( NULL AS SIGNED ) + + 86 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2782
SELECT ALL - col0 * - CAST ( NULL AS INTEGER ) + + 86 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 * col1 * col1 AS col0 FROM tab0 AS cor0
----
-244068
-679042
-9409

query I rowsort
SELECT col0 - + 56 AS col1 FROM tab0 AS cor0
----
-21
-32
33

query I rowsort
SELECT + 48 AS col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 0ef571a8722ab7270aa7272c1174b88e

query I rowsort
SELECT ( - 99 ) + cor0.col2 + + 69 * + cor0.col0 AS col0 FROM tab2 AS cor0
----
411
5309
5390

query I rowsort
SELECT - - 91 AS col0 FROM tab1 AS cor0
----
91
91
91

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2788
SELECT - 48 * + col2 + col0 / + CAST( NULL AS SIGNED ) + + 27 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2788
SELECT - 48 * + col2 + col0 / + CAST ( NULL AS INTEGER ) + + 27 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2789
SELECT DISTINCT tab2.col1 * - CAST( col0 AS SIGNED ) + col2 AS col2 FROM tab2
----
-1305
-190
-4576

skipif mysql # not compatible
query I rowsort label-2789
SELECT DISTINCT tab2.col1 * - CAST ( col0 AS INTEGER ) + col2 AS col2 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT - col1 * ( + col2 ) * + col1 FROM tab1
----
-16224
-36504
-5700

query I rowsort
SELECT ALL col2 * col2 + - col1 * + col1 AS col2 FROM tab0
----
-1557
-6307
-9408

query I rowsort
SELECT - - ( col2 ) * - col2 AS col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT - col0 - cor0.col0 FROM tab0 cor0
----
-178
-48
-70

query I rowsort
SELECT - + cor0.col1 * - cor0.col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT - col2 * col0 + ( + col0 ) * + cor0.col1 FROM tab0 AS cor0
----
1272
3360
801

query I rowsort
SELECT DISTINCT - cor0.col2 * col0 + + ( col0 ) * col2 AS col0 FROM tab2 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2797
SELECT ALL - ( col0 ) DIV 48 AS col0 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-2797
SELECT ALL - ( col0 ) / 48 AS col0 FROM tab0 AS cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT - col2 * + col2 + col0 AS col2 FROM tab0 AS cor0
----
-1065
-6635
34

query I rowsort
SELECT + ( col0 ) + - col0 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT 96 + col0 * - col1 FROM tab1 AS cor0
----
-544
-944
18

query I rowsort
SELECT DISTINCT + 56 * + 9 FROM tab0
----
504

query I rowsort
SELECT - ( col1 ) * - col1 + col0 * - 30 FROM tab2
----
-2081
1141
751

query I rowsort
SELECT + tab0.col2 + - col2 * - tab0.col1 AS col2 FROM tab0
----
2871
7544
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2804
SELECT CAST( NULL AS SIGNED ) + 52 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2804
SELECT CAST ( NULL AS INTEGER ) + 52 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT 5 + col2 * - col1 AS col0 FROM tab1
----
-1243
-1399
-565

query I rowsort
SELECT DISTINCT - ( - cor0.col1 ) FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 + - col2 * col0 col2 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT DISTINCT - col2 + col0 * + col1 AS col2 FROM tab0 cor0
----
2031
3394
8017

query I rowsort
SELECT ALL + 25 * + col1 FROM tab2 AS cor0
----
1475
425
775

query I rowsort
SELECT DISTINCT - 64 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 cor1
----
-64

query I rowsort
SELECT ALL + - col2 * - col0 AS col2 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * cor0.col0 + + col0 col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT - - cor0.col1 * - ( col1 ) + - col2 AS col1 FROM tab0 AS cor0
----
-7429
-8363
-9410

query I rowsort
SELECT ALL 50 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 314aace40e704c20a6be06204a329f80

query I rowsort
SELECT DISTINCT cor0.col2 AS col2 FROM tab0, tab1, tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT - 91 FROM tab1, tab0, tab0 AS cor0
----
-91

query I rowsort
SELECT DISTINCT 40 FROM tab2 AS cor0 CROSS JOIN tab1, tab0 cor1, tab1 cor2
----
40

query I rowsort
SELECT DISTINCT - col2 * 51 AS col0 FROM tab0
----
-1683
-4182
-51

query I rowsort
SELECT - col1 * ( 15 ) FROM tab2 cor0
----
-255
-465
-885

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2820
SELECT - - col2 + + CAST( col1 AS SIGNED ) FROM tab2 AS cor0
----
55
58
85

skipif mysql # not compatible
query I rowsort label-2820
SELECT - - col2 + + CAST ( col1 AS INTEGER ) FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT + 97 FROM tab2, tab1 cor0
----
9 values hashing to 5e0d31ac41981bcdf6a665538a71a09c

query I rowsort
SELECT ALL - 61 * col1 FROM tab2 AS cor0
----
-1037
-1891
-3599

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 18 * col1 col1 FROM tab1 AS cor0
----
-180
-234
-468

query I rowsort
SELECT DISTINCT - 82 AS col2 FROM tab2, tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
-82

query I rowsort
SELECT ALL cor1.col0 AS col1 FROM tab0 cor0 CROSS JOIN tab0 cor1
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 col2 FROM tab0, tab1 AS cor0
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query I rowsort
SELECT ( + col2 ) + col2 AS col1 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT ALL + 58 * 91 FROM tab1 AS cor0
----
5278
5278
5278

query I rowsort
SELECT 31 * col2 FROM tab1 cor0
----
1674
1767
2976

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col2 ) * + col0 col0 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT ALL tab2.col0 AS col0 FROM tab1, tab2 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab0 AS cor2
----
243 values hashing to 455e4df3bf7b0fa681c56e89df1a761f

query I rowsort
SELECT - ( 14 ) + - cor0.col0 FROM tab2 AS cor0
----
-21
-92
-93

query I rowsort
SELECT DISTINCT - + col1 + cor0.col1 + - col2 * + col2 FROM tab2 AS cor0
----
-1444
-676
-729

onlyif mysql # use DIV operator for integer division
query I rowsort label-2834
SELECT ALL - 60 DIV ( - col1 ) + - 20 AS col0 FROM tab1 AS cor0
----
-14
-16
-18

skipif mysql # not compatible
query I rowsort label-2834
SELECT ALL - 60 / ( - col1 ) + - 20 AS col0 FROM tab1 AS cor0
----
-14
-16
-18

query I rowsort
SELECT ALL cor0.col2 * 63 FROM tab0 AS cor0
----
2079
5166
63

query I rowsort
SELECT ALL - col2 * - 89 + col0 FROM tab0 AS cor0
----
124
2961
7387

query I rowsort
SELECT DISTINCT ( + 76 ) + + col1 FROM tab0 AS cor0
----
162
167
173

query I rowsort
SELECT + - ( - cor0.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-2839
SELECT ALL + CAST( NULL AS SIGNED ) * - cor0.col0 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2839
SELECT ALL + CAST ( NULL AS INTEGER ) * - cor0.col0 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2840
SELECT ALL col0 * col1 DIV - cor0.col2 FROM tab1 AS cor0
----
-1
-10
-11

skipif mysql # not compatible
query I rowsort label-2840
SELECT ALL col0 * col1 / - cor0.col2 FROM tab1 AS cor0
----
-1
-10
-11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + + col0 col2 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT + cor0.col1 + 27 AS col2 FROM tab0 AS cor0
----
113
118
124

query I rowsort
SELECT DISTINCT - ( 3 ) * - col1 + col0 - 24 FROM tab0 AS cor0
----
258
302
338

query I rowsort
SELECT ALL ( - col2 ) + - col0 AS col2 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT cor0.col0 * col2 + col1 * col0 FROM tab1 AS cor0
----
240
4288
8720

onlyif mysql # use DIV operator for integer division
query I rowsort label-2846
SELECT DISTINCT + + col1 + + col2 DIV + col2 AS col2 FROM tab0 cor0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-2846
SELECT DISTINCT + + col1 + + col2 / + col2 AS col2 FROM tab0 cor0
----
87
92
98

query I rowsort
SELECT + col0 + + cor0.col0 AS col0 FROM tab1 cor0
----
128
160
6

query I rowsort
SELECT DISTINCT - col1 * ( tab2.col1 + + 7 ) FROM tab2
----
-1178
-3894
-408

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * 21 + tab0.col1 * - 54 col1 FROM tab0
----
-3045
-4140
-4503

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col2 col0 FROM tab0, tab0 AS cor0 CROSS JOIN tab2
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT ALL - cor0.col0 * - 29 - ( - col1 ) FROM tab2 AS cor0
----
2308
2321
234

query I rowsort
SELECT + col2 * 69 AS col1 FROM tab0 AS cor0
----
2277
5658
69

query I rowsort
SELECT cor0.col2 * + cor0.col2 FROM tab1, tab1 cor0
----
9 values hashing to aeb56f097f17f262600266df7fcf8652

query I rowsort
SELECT ALL col2 * 53 + col2 AS col0 FROM tab0 AS cor0
----
1782
4428
54

query I rowsort
SELECT DISTINCT - - col0 * col2 + col0 FROM tab1 AS cor0
----
165
3712
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-2856
SELECT DISTINCT + - col0 DIV 81 + + col1 + - col1 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-2856
SELECT DISTINCT + - col0 / 81 + + col1 + - col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT col0 - 89 * + col0 FROM tab0
----
-2112
-3080
-7832

query I rowsort
SELECT + tab0.col2 * col1 * col1 AS col0 FROM tab0
----
244068
679042
9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + col1 col2 FROM tab0
----
119
173
98

query I rowsort
SELECT ALL + col0 + - ( + col2 ) FROM tab2
----
-20
41
52

query I rowsort
SELECT DISTINCT - 93 + cor0.col2 AS col1 FROM tab1, tab1 AS cor0
----
-36
-39
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-2862
SELECT + col1 + 8 * cor0.col1 DIV + col2 AS col0 FROM tab0 AS cor0
----
106
873
99

skipif mysql # not compatible
query I rowsort label-2862
SELECT + col1 + 8 * cor0.col1 / + col2 AS col0 FROM tab0 AS cor0
----
106
873
99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2863
SELECT DISTINCT col2 + CAST( NULL AS SIGNED ) * col0 col0 FROM tab1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2863
SELECT DISTINCT col2 + CAST ( NULL AS INTEGER ) * col0 col0 FROM tab1
----
NULL

query I rowsort
SELECT + - col1 * + 0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col2 + col1 * 2 + - tab2.col2 * + col0 AS col0 FROM tab2
----
-154
-1936
-3006

query I rowsort
SELECT + 4 * ( col2 ) + - col2 FROM tab0 AS cor0
----
246
3
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-2867
SELECT DISTINCT - col2 DIV - 26 + - 83 AS col0 FROM tab0
----
-80
-82
-83

skipif mysql # not compatible
query I rowsort label-2867
SELECT DISTINCT - col2 / - 26 + - 83 AS col0 FROM tab0
----
-80
-82
-83

query I rowsort
SELECT ALL tab2.col0 + tab2.col1 AS col2 FROM tab2
----
137
38
96

query I rowsort
SELECT DISTINCT + col1 * col2 + col0 AS col0 FROM tab2
----
1612
725
844

query I rowsort
SELECT tab0.col2 * 68 - col2 AS col0 FROM tab0
----
2211
5494
67

query I rowsort
SELECT DISTINCT + col2 + - col2 * col1 AS col2 FROM tab0
----
-2805
-7380
-96

query I rowsort
SELECT - 91 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 6ec4feac5c635ab8e5da71006896acab

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 27 * - col2 col2 FROM tab2 AS cor0
----
1026
702
729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2874
SELECT CAST( + cor0.col0 AS SIGNED ) + col0 FROM tab0 cor0
----
178
48
70

skipif mysql # not compatible
query I rowsort label-2874
SELECT CAST ( + cor0.col0 AS INTEGER ) + col0 FROM tab0 cor0
----
178
48
70

query I rowsort
SELECT ALL 59 + - cor0.col2 + + cor0.col1 FROM tab1 cor0
----
-24
12
31

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2876
SELECT ALL CAST( - col0 AS SIGNED ) * col2 + - ( col0 * + col1 ) AS col2 FROM tab2 AS cor0
----
-406
-4345
-6630

skipif mysql # not compatible
query I rowsort label-2876
SELECT ALL CAST ( - col0 AS INTEGER ) * col2 + - ( col0 * + col1 ) AS col2 FROM tab2 AS cor0
----
-406
-4345
-6630

query I rowsort
SELECT DISTINCT - col0 - 28 AS col1 FROM tab2 cor0
----
-106
-107
-35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2878
SELECT ALL - - CAST( NULL AS SIGNED ) + - col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2878
SELECT ALL - - CAST ( NULL AS INTEGER ) + - col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + col2 + - col0 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT DISTINCT - 22 * + 66 * - col2 FROM tab2 AS cor0
----
37752
39204
55176

query I rowsort
SELECT 60 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 1d2ab302ae60f95b15e68cf89083b162

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2882
SELECT ALL - 12 + col2 + CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2882
SELECT ALL - 12 + col2 + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 17 AS col0 FROM tab1, tab2, tab2 AS cor0
----
17

onlyif mysql # use DIV operator for integer division
query I rowsort label-2884
SELECT ALL col1 DIV - col2 - - ( + col2 ) * - tab0.col1 * 98 AS col0 FROM tab0
----
-278126
-731277
-9603

skipif mysql # not compatible
query I rowsort label-2884
SELECT ALL col1 / - col2 - - ( + col2 ) * - tab0.col1 * 98 AS col0 FROM tab0
----
-278126
-731277
-9603

query I rowsort
SELECT + - ( - col2 ) * ( - cor0.col1 ) * col0 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT - 80 + col1 * - ( + 89 ) AS col2 FROM tab0 cor0
----
-7734
-8179
-8713

onlyif mysql # use DIV operator for integer division
query I rowsort label-2887
SELECT + 92 DIV col2 AS col0 FROM tab0 AS cor0
----
1
2
92

skipif mysql # not compatible
query I rowsort label-2887
SELECT + 92 / col2 AS col0 FROM tab0 AS cor0
----
1
2
92

query I rowsort
SELECT DISTINCT - col2 * + col2 + - col1 FROM tab2 AS cor0
----
-1461
-735
-760

onlyif mysql # use DIV operator for integer division
query I rowsort label-2889
SELECT DISTINCT - col1 DIV 89 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-2889
SELECT DISTINCT - col1 / 89 FROM tab1 AS cor0
----
0

query I rowsort
SELECT col2 + 76 + col1 AS col1 FROM tab1 AS cor0
----
143
156
185

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2891
SELECT DISTINCT + col1 + + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2891
SELECT DISTINCT + col1 + + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL + + cor0.col1 + + cor0.col2 AS col0 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT + - col2 + ( - col1 ) * - col2 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT col1 - + 90 FROM tab2 AS cor0
----
-31
-59
-73

query I rowsort
SELECT ALL col2 * 0 FROM tab2 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT col1 + CAST ( + col0 * col0 AS REAL ) col1 FROM tab2 AS cor0
----
6143
6258
80

query I rowsort
SELECT col2 + - col1 + - col1 AS col1 FROM tab2 AS cor0
----
-35
-92
4

query I rowsort
SELECT ALL cor0.col1 + col0 AS col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT - col2 * - ( col1 * + col2 ) + + cor0.col0 + - col1 FROM tab1 AS cor0
----
119875
32544
75793

query I rowsort
SELECT DISTINCT - col0 + + 40 * col1 AS col0 FROM tab2 cor0
----
1233
2282
601

onlyif mysql # use DIV operator for integer division
query I rowsort label-2901
SELECT ALL 54 DIV - col2 - tab1.col0 * + col1 FROM tab1
----
-1040
-640
-79

skipif mysql # not compatible
query I rowsort label-2901
SELECT ALL 54 / - col2 - tab1.col0 * + col1 FROM tab1
----
-1040
-640
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-2902
SELECT ALL - col1 DIV + ( col1 + - col2 ) AS col1 FROM tab2 AS cor0
----
-1
-7
0

skipif mysql # not compatible
query I rowsort label-2902
SELECT ALL - col1 / + ( col1 + - col2 ) AS col1 FROM tab2 AS cor0
----
-1
-7
0

query I rowsort
SELECT DISTINCT col2 + cor0.col2 AS col0 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT DISTINCT - - col0 * - cor0.col1 + 21 AS col1 FROM tab1 AS cor0
----
-1019
-57
-619

query I rowsort
SELECT cor0.col1 * + col0 + ( col0 ) AS col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT - - col0 * + 75 AS col2 FROM tab2 AS cor0
----
525
5850
5925

query I rowsort
SELECT DISTINCT ( tab1.col0 ) AS col1 FROM tab1, tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT 99 AS col0 FROM tab1, tab0 AS cor0
----
99

query I rowsort
SELECT DISTINCT col2 + - col1 AS col0 FROM tab2 cor0
----
-33
-4
21

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2910
SELECT ALL + CAST( - cor0.col0 AS SIGNED ) - - col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2910
SELECT ALL + CAST ( - cor0.col0 AS INTEGER ) - - col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - ( 76 ) * col2 * - ( 70 + - col1 ) FROM tab0 AS cor0
----
-130872
-2052
-40128

query I rowsort
SELECT DISTINCT + 61 * - col1 FROM tab1
----
-1586
-610
-793

query I rowsort
SELECT ALL - 45 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 71160abf09589695379a70558726f0ba

query I rowsort
SELECT ALL col0 * 48 AS col1 FROM tab0
----
1152
1680
4272

query I rowsort
SELECT DISTINCT 70 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2916
SELECT ALL col2 * CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2916
SELECT ALL col2 * CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 + + 30 FROM tab0 AS cor0
----
116
121
127

query I rowsort
SELECT + col2 * 6 + + cor0.col2 FROM tab2 AS cor0
----
182
189
266

query I rowsort
SELECT DISTINCT + col2 * + 76 FROM tab1 cor0
----
4104
4332
7296

onlyif mysql # use DIV operator for integer division
query I rowsort label-2920
SELECT + + cor0.col2 * col2 DIV col0 AS col0 FROM tab0 AS cor0
----
0
45
75

skipif mysql # not compatible
query I rowsort label-2920
SELECT + + cor0.col2 * col2 / col0 AS col0 FROM tab0 AS cor0
----
0
45
75

query I rowsort
SELECT - col2 + col0 * col2 AS col0 FROM tab0 cor0
----
34
7216
759

query I rowsort
SELECT - - ( 94 ) * col0 FROM tab2 AS cor0
----
658
7332
7426

query I rowsort
SELECT DISTINCT + col1 * - 95 AS col2 FROM tab0
----
-8170
-8645
-9215

onlyif mysql # use DIV operator for integer division
query I rowsort label-2924
SELECT - + col1 DIV cor0.col1 AS col2 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2924
SELECT - + col1 / cor0.col1 AS col2 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT col2 + - ( + col1 ) AS col1 FROM tab0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2926
SELECT DISTINCT - 99 DIV 10 + + col1 DIV + col0 + col0 DIV col0 FROM tab0
----
-5
-6
-7

skipif mysql # not compatible
query I rowsort label-2926
SELECT DISTINCT - 99 / 10 + + col1 / + col0 + col0 / col0 FROM tab0
----
-5
-6
-7

query I rowsort
SELECT 8 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to ffc5b4c98b57ae546521175995c49c57

onlyif mysql # use DIV operator for integer division
query I rowsort label-2928
SELECT + cor0.col0 DIV col1 + cor0.col2 AS col0 FROM tab1 AS cor0
----
102
54
63

skipif mysql # not compatible
query I rowsort label-2928
SELECT + cor0.col0 / col1 + cor0.col2 AS col0 FROM tab1 AS cor0
----
102
54
63

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1, tab1 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT - col1 + cor0.col1 * col0 AS col2 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT ALL 51 + + col1 * - col0 FROM tab0 AS cor0
----
-2013
-3344
-8048

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 75 + col2 * col0 col1 FROM tab1 AS cor0
----
237
3723
7755

onlyif mysql # use DIV operator for integer division
query I rowsort label-2933
SELECT ALL - col2 DIV - 12 AS col1 FROM tab2
----
2
2
3

skipif mysql # not compatible
query I rowsort label-2933
SELECT ALL - col2 / - 12 AS col1 FROM tab2
----
2
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * col1 col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL - + 68 * col1 FROM tab1 AS cor0
----
-1768
-680
-884

query I rowsort
SELECT + col1 * col1 * col1 AS col2 FROM tab1 cor0
----
1000
17576
2197

query I rowsort
SELECT DISTINCT 73 * col0 FROM tab0
----
1752
2555
6497

query I rowsort
SELECT ALL - 56 + + ( col1 ) + tab0.col2 AS col2 FROM tab0
----
117
42
63

query I rowsort
SELECT DISTINCT - tab2.col2 * col2 * col2 + col1 AS col2 FROM tab2
----
-17517
-19652
-54855

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 29 col0 FROM tab1
----
29
29
29

query I rowsort
SELECT col1 + col0 * - col2 FROM tab2 AS cor0
----
-158
-1969
-2985

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 - - 64 * + col0 col0 FROM tab2 AS cor0
----
421
4966
5018

query I rowsort
SELECT - col2 * col2 + + ( col0 ) AS col2 FROM tab2 AS cor0
----
-1365
-598
-722

onlyif mysql # use DIV operator for integer division
query I rowsort label-2944
SELECT - col0 - + col2 DIV - col1 AS col2 FROM tab2 AS cor0
----
-7
-77
-78

skipif mysql # not compatible
query I rowsort label-2944
SELECT - col0 - + col2 / - col1 AS col2 FROM tab2 AS cor0
----
-7
-77
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 98 col2 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to c758e8afbdfa6aae279045b0e9cbacc2

query I rowsort
SELECT 38 * col2 FROM tab0
----
1254
3116
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-2947
SELECT ALL col0 DIV col0 + 64 AS col1 FROM tab0
----
65
65
65

skipif mysql # not compatible
query I rowsort label-2947
SELECT ALL col0 / col0 + 64 AS col1 FROM tab0
----
65
65
65

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2948
SELECT ALL + CAST( - 20 AS SIGNED ) FROM tab0, tab1 cor0, tab1 AS cor1
----
27 values hashing to eb3a66728062963cccbd15bd2f5c9eee

skipif mysql # not compatible
query I rowsort label-2948
SELECT ALL + CAST ( - 20 AS INTEGER ) FROM tab0, tab1 cor0, tab1 AS cor1
----
27 values hashing to eb3a66728062963cccbd15bd2f5c9eee

query I rowsort
SELECT DISTINCT + 99 AS col2 FROM tab2, tab1, tab0 AS cor0
----
99

query I rowsort
SELECT - 88 AS col1 FROM tab2, tab1, tab1 cor0
----
27 values hashing to eb8cbefa7d831e1a0183e919e2caef32

query I rowsort
SELECT cor0.col0 + + ( cor0.col2 ) * cor0.col0 FROM tab0 cor0
----
70
7387
816

query I rowsort
SELECT col2 - + 37 FROM tab1
----
17
20
59

query I rowsort
SELECT - 0 * + col0 * + 28 - col2 AS col0 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT + 99 * tab0.col0 AS col0 FROM tab0
----
2376
3465
8811

query I rowsort
SELECT DISTINCT col0 + col1 + - 14 FROM tab1
----
15
60
79

query I rowsort
SELECT tab0.col2 * col0 + ( - col0 ) FROM tab0
----
0
7209
768

query I rowsort
SELECT ALL - col2 + col0 * - 5 * col2 AS col1 FROM tab2 cor0
----
-10166
-15048
-972

query I rowsort
SELECT DISTINCT + 92 FROM tab2, tab1, tab0 AS cor0
----
92

query I rowsort
SELECT - 85 * + col0 * 93 + 45 FROM tab2
----
-55290
-616545
-624450

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col0 * - col2 col0 FROM tab0
----
1225
19008
649522

query I rowsort
SELECT DISTINCT - 81 * + col2 + - 29 + col1 * - col1 * + col2 AS col2 FROM tab1
----
-10346
-24029
-40907

query I rowsort
SELECT DISTINCT col2 * col0 - col0 AS col2 FROM tab1 AS cor0
----
159
3584
7600

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2963
SELECT - col2 * + CAST( col2 AS SIGNED ) FROM tab0 cor0
----
-1
-1089
-6724

skipif mysql # not compatible
query I rowsort label-2963
SELECT - col2 * + CAST ( col2 AS INTEGER ) FROM tab0 cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT + col0 * col1 * + col1 + - col2 FROM tab1 AS cor0
----
13424
1974
6343

query I rowsort
SELECT DISTINCT + + col2 * - ( cor0.col2 ) AS col2 FROM tab0 AS cor0
----
-1
-1089
-6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-2966
SELECT ALL cor0.col2 DIV + 43 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2966
SELECT ALL cor0.col2 / + 43 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + cor0.col1 + 77 * col2 FROM tab1 AS cor0
----
4184
4399
7405

query I rowsort
SELECT DISTINCT - - col2 - col1 AS col0 FROM tab1 cor0
----
28
47
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-2969
SELECT + cor0.col2 * + 43 + col1 DIV col2 FROM tab1 AS cor0
----
2322
2451
4128

skipif mysql # not compatible
query I rowsort label-2969
SELECT + cor0.col2 * + 43 + col1 / col2 FROM tab1 AS cor0
----
2322
2451
4128

query I rowsort
SELECT ALL + + cor0.col2 * - col1 + + col2 - col1 FROM tab0 AS cor0
----
-193
-2891
-7471

query I rowsort
SELECT col1 * 24 AS col2 FROM tab0 AS cor0
----
2064
2184
2328

query I rowsort
SELECT DISTINCT + col2 * + ( col2 ) + col2 AS col1 FROM tab0 AS cor0
----
1122
2
6806

onlyif mysql # use DIV operator for integer division
query I rowsort label-2973
SELECT ALL + col2 + col0 DIV + col2 FROM tab1 AS cor0
----
54
58
96

skipif mysql # not compatible
query I rowsort label-2973
SELECT ALL + col2 + col0 / + col2 FROM tab1 AS cor0
----
54
58
96

query I rowsort
SELECT - col2 + ( - cor0.col0 ) * + col1 FROM tab0 AS cor0
----
-2097
-3396
-8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-2975
SELECT + col0 DIV 34 FROM tab0 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-2975
SELECT + col0 / 34 FROM tab0 AS cor0
----
0
1
2

query I rowsort
SELECT DISTINCT - + col2 * + 51 FROM tab2 AS cor0
----
-1326
-1377
-1938

query I rowsort
SELECT - - col2 * col0 + + ( col2 ) + - cor0.col2 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT + - ( cor0.col2 ) + cor0.col2 + col1 AS col0 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT + col0 + cor0.col0 * - col2 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT + cor0.col2 * col1 AS col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + 64 + - col2 * + col1 + 24 AS col2 FROM tab0
----
-2750
-7374
-9

query I rowsort
SELECT ALL ( - col2 ) * cor0.col1 AS col0 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT - 97 - 52 AS col1 FROM tab2 AS cor0
----
-149
-149
-149

onlyif mysql # use DIV operator for integer division
query I rowsort label-2984
SELECT DISTINCT - 61 DIV col2 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-2984
SELECT DISTINCT - 61 / col2 FROM tab1 AS cor0
----
-1
0

query I rowsort
SELECT ( + cor0.col2 ) * cor0.col0 AS col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT + - 7 * col0 + col2 FROM tab1 AS cor0
----
-391
-464
33

query I rowsort
SELECT ALL - + col2 * + col1 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT 68 * col0 FROM tab2 cor0
----
476
5304
5372

query I rowsort
SELECT DISTINCT - col0 * - cor0.col1 AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - ( + 51 ) AS col0 FROM tab2 AS cor0
----
-51
-51
-51

query I rowsort
SELECT DISTINCT - + 20 + col2 AS col2 FROM tab1 AS cor0
----
34
37
76

query I rowsort
SELECT ALL + + cor0.col2 + col1 * - col0 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT DISTINCT col0 + 54 * - col0 FROM tab2 AS cor0
----
-371
-4134
-4187

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2994
SELECT DISTINCT - ( 71 ) + col1 * + CAST( NULL AS DECIMAL ) AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2994
SELECT DISTINCT - ( 71 ) + col1 * + CAST ( NULL AS REAL ) AS col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + 80 + + col0 * + col1 FROM tab1 AS cor0
----
1120
158
720

query I rowsort
SELECT col1 + + col0 + + col2 AS col2 FROM tab0 AS cor0
----
133
143
262

query I rowsort
SELECT - - col2 * cor0.col1 + col0 * + col2 FROM tab2 AS cor0
----
1026
3562
3648

query I rowsort
SELECT + col0 + col1 * + col1 FROM tab0
----
7420
8370
9444

query I rowsort
SELECT ALL + - col0 + - col2 * cor0.col1 AS col2 FROM tab2 AS cor0
----
-1612
-725
-844

onlyif mysql # use DIV operator for integer division
query I rowsort label-3000
SELECT DISTINCT + col0 DIV col1 + 83 + col0 * col0 * - col0 AS col2 FROM tab0 AS cor0
----
-13741
-42792
-704886

skipif mysql # not compatible
query I rowsort label-3000
SELECT DISTINCT + col0 / col1 + 83 + col0 * col0 * - col0 AS col2 FROM tab0 AS cor0
----
-13741
-42792
-704886

query I rowsort
SELECT ALL 69 + - cor0.col0 FROM tab1 AS cor0
----
-11
5
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-3002
SELECT + - ( + col1 ) DIV - col0 + + 61 DIV + cor0.col0 AS col1 FROM tab1 AS cor0
----
0
0
28

skipif mysql # not compatible
query I rowsort label-3002
SELECT + - ( + col1 ) / - col0 + + 61 / + cor0.col0 AS col1 FROM tab1 AS cor0
----
0
0
28

query I rowsort
SELECT DISTINCT - - col0 + - col1 * 51 AS col2 FROM tab0 AS cor0
----
-4362
-4552
-4912

query I rowsort
SELECT + col2 * col1 - col2 * + col2 AS col0 FROM tab2 AS cor0
----
-798
108
858

query I rowsort
SELECT + 13 + + col0 AS col1 FROM tab2 AS cor0
----
20
91
92

query I rowsort
SELECT + 78 * col0 - + 87 * - 49 AS col0 FROM tab0 AS cor0
----
11205
6135
6993

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3007
SELECT DISTINCT - CAST( 99 AS SIGNED ) + - col0 - - CAST( NULL AS SIGNED ) AS col1 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-3007
SELECT DISTINCT - CAST ( 99 AS INTEGER ) + - col0 - - CAST ( NULL AS INTEGER ) AS col1 FROM tab0
----
NULL

query I rowsort
SELECT - - 28 AS col1 FROM tab1 AS cor0
----
28
28
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-3009
SELECT col2 * col2 DIV + col1 FROM tab0
----
0
12
73

skipif mysql # not compatible
query I rowsort label-3009
SELECT col2 * col2 / + col1 FROM tab0
----
0
12
73

query I rowsort
SELECT ALL tab2.col0 * + col1 * - col2 + tab2.col2 AS col1 FROM tab2
----
-119626
-50996
-5832

query I rowsort
SELECT - cor0.col2 + - col0 + - 53 FROM tab2 AS cor0
----
-157
-170
-87

query I rowsort
SELECT + + col1 + col2 + cor0.col1 AS col0 FROM tab1 AS cor0
----
106
122
77

query I rowsort
SELECT DISTINCT + 25 AS col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
25

query I rowsort
SELECT DISTINCT 27 + - col1 AS col1 FROM tab0 AS cor0
----
-59
-64
-70

query I rowsort
SELECT DISTINCT + 40 AS col0 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
40

query I rowsort
SELECT ALL + 7 * cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1
----
27 values hashing to 78842a90a157a59490ffd43288254f32

onlyif mysql # use DIV operator for integer division
query I rowsort label-3017
SELECT DISTINCT + + col1 DIV - col1 AS col1 FROM tab2 cor0
----
-1

skipif mysql # not compatible
query I rowsort label-3017
SELECT DISTINCT + + col1 / - col1 AS col1 FROM tab2 cor0
----
-1

query I rowsort
SELECT DISTINCT + 12 AS col1 FROM tab0 AS cor0
----
12

query I rowsort
SELECT - col2 + col1 * + col2 FROM tab0
----
2805
7380
96

skipif mysql # not compatible
query I rowsort
SELECT col2 + + CAST ( col1 + col2 AS REAL ) FROM tab0
----
152
255
99

query I rowsort
SELECT 22 * - tab1.col1 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to c50acf657e6b2f398a8bde470b1ce1aa

query I rowsort
SELECT + 2 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

query I rowsort
SELECT DISTINCT + ( - col0 ) AS col0 FROM tab2
----
-7
-78
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-3024
SELECT ( + tab2.col1 ) + + col1 DIV - col0 + + col0 FROM tab2
----
137
34
96

skipif mysql # not compatible
query I rowsort label-3024
SELECT ( + tab2.col1 ) + + col1 / - col0 + + col0 FROM tab2
----
137
34
96

query I rowsort
SELECT ALL 16 - 2 * col0 * + col2 FROM tab2
----
-362
-4040
-5988

query I rowsort
SELECT cor0.col1 * cor0.col1 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 66d12b13327233058113a26801f3f4bd

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 24 * + 14 col1 FROM tab0 AS cor0
----
336

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + col1 col0 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL + ( - col2 ) + col2 AS col0 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col2 * + ( col0 ) - 22 AS col0 FROM tab0 AS cor0
----
13
7276
770

query I rowsort
SELECT + ( + 50 ) + + col1 FROM tab0 AS cor0
----
136
141
147

query I rowsort
SELECT - cor1.col0 + + 58 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 20af9a53b5f3e498fea8464f05ae5576

query I rowsort
SELECT 63 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to c3eea92c46f2c49716f386a58b575025

query I rowsort
SELECT - col1 + + 14 AS col2 FROM tab2 AS cor0
----
-17
-3
-45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3035
SELECT DISTINCT + CAST( NULL AS SIGNED ) + col2 * - col1 AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3035
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + col2 * - col1 AS col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

onlyif mysql # use DIV operator for integer division
query I rowsort label-3037
SELECT ALL col2 + - tab2.col2 DIV - 60 AS col0 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-3037
SELECT ALL col2 + - tab2.col2 / - 60 AS col0 FROM tab2
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-3038
SELECT 43 DIV col1 col2 FROM tab1
----
1
3
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3038
SELECT 43 / col1 col2 FROM tab1
----
1
3
4

query I rowsort
SELECT cor0.col0 - col2 * col1 * - col0 AS col1 FROM tab2 AS cor0
----
119730
51113
5866

query I rowsort
SELECT DISTINCT + + 90 AS col0 FROM tab1 AS cor0
----
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 - col1 * 94 * - col0 col0 FROM tab2 cor0
----
126259
20429
432647

query I rowsort
SELECT 76 AS col2 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 7b2b08dd3f1adef028d3f40ef7c716da

query I rowsort
SELECT ALL + col0 * - 9 AS col0 FROM tab2 cor0
----
-63
-702
-711

query I rowsort
SELECT DISTINCT - - col1 + 59 FROM tab0 AS cor0
----
145
150
156

query I rowsort
SELECT DISTINCT col1 + - ( + 80 ) - col0 * ( - 59 ) * col2 FROM tab2 cor0
----
11102
119631
177055

query I rowsort
SELECT + col1 * col0 + ( + cor0.col0 ) AS col1 FROM tab2 cor0
----
1422
224
4680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3047
SELECT ALL col1 * - col2 + - CAST( NULL AS SIGNED ) AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3047
SELECT ALL col1 * - col2 + - CAST ( NULL AS INTEGER ) AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 * + col1 + 68 FROM tab0 AS cor0
----
2132
3463
8167

query I rowsort
SELECT + - col2 * + cor0.col2 * + cor0.col1 + col1 * cor0.col2 FROM tab2 AS cor0
----
-21762
-23902
-38350

query I rowsort
SELECT ALL + col0 + col2 - tab1.col2 FROM tab1
----
3
64
80

query I rowsort
SELECT ALL col2 * ( col0 ) * col0 FROM tab2
----
1323
158184
237158

query I rowsort
SELECT - - cor0.col0 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT cor0.col0 + - ( col0 ) * col1 FROM tab2 AS cor0
----
-1264
-210
-4524

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 56 + 70 col0 FROM tab1 AS cor0
----
126
126
126

query I rowsort
SELECT DISTINCT ( cor0.col2 ) * - col2 FROM tab0 AS cor0
----
-1
-1089
-6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 60 col0 FROM tab1 AS cor0
----
60
60
60

query I rowsort
SELECT ALL + ( col2 ) + - cor0.col0 * - ( col0 ) AS col2 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT + col2 + + cor0.col2 * + col0 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT - col1 * ( - col1 * - col0 ) FROM tab2 AS cor0
----
-22831
-271518
-6727

query I rowsort
SELECT col1 + - col0 + col1 FROM tab2 AS cor0
----
-45
40
55

query I rowsort
SELECT col2 * 92 FROM tab1
----
4968
5244
8832

query I rowsort
SELECT + col0 * 53 FROM tab2
----
371
4134
4187

query I rowsort
SELECT col2 * + ( + 42 ) FROM tab0
----
1386
3444
42

query I rowsort
SELECT DISTINCT cor0.col1 + - 53 FROM tab0 AS cor0
----
33
38
44

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3065
SELECT + 28 + col1 + + cor0.col2 * CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3065
SELECT + 28 + col1 + + cor0.col2 * CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 * + 78 * + col2 FROM tab1 AS cor0
----
227448
253422
718848

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3067
SELECT + CAST( - col2 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-3067
SELECT + CAST ( - col2 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-26
-27
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 93 + 52 col2 FROM tab1 AS cor0
----
-41

query I rowsort
SELECT 72 AS col2 FROM tab1 cor0
----
72
72
72

query I rowsort
SELECT - 93 * + col2 FROM tab1 AS cor0
----
-5022
-5301
-8928

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 13 col1 FROM tab0, tab2 AS cor0
----
13

query I rowsort
SELECT 7 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 3362c0cb2b2c663037159d0699d46b76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 31 col2 FROM tab1, tab2 AS cor0
----
9 values hashing to f4b05206ee2fc0cf8007d9c3514885fa

query I rowsort
SELECT ( + cor0.col1 ) * - 96 AS col2 FROM tab0 cor0
----
-8256
-8736
-9312

query I rowsort
SELECT ALL - col1 + col1 * - ( + col0 ) FROM tab0
----
-2150
-3492
-8190

query I rowsort
SELECT - 90 * - tab2.col1 AS col1 FROM tab2
----
1530
2790
5310

query I rowsort
SELECT cor0.col0 + - col0 + + 69 FROM tab1 cor0
----
69
69
69

query I rowsort
SELECT - col1 * col1 + col1 + + cor0.col2 * + 49 * col1 AS col2 FROM tab1 cor0
----
27840
60996
68146

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * col2 - col2 col2 FROM tab1
----
108
3591
7584

query I rowsort
SELECT - col1 - + col0 * col1 * - col2 AS col1 FROM tab1
----
36470
4186
99827

query I rowsort
SELECT ALL + tab2.col1 * + col1 - col1 AS col1 FROM tab2
----
272
3422
930

query I rowsort
SELECT - col1 * tab0.col0 - - col0 * col1 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT - + cor0.col2 * - col2 + + col0 FROM tab2 cor0
----
1523
736
754

query I rowsort
SELECT ALL + col0 + col0 * + col2 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT ALL + col0 * + cor0.col0 - + col1 * col2 * col0 FROM tab0 AS cor0
----
-2170
-656197
-67536

query I rowsort
SELECT DISTINCT + col2 * - col0 + - cor0.col2 AS col2 FROM tab1 cor0
----
-216
-3705
-7776

query I rowsort
SELECT - tab0.col0 * + tab0.col0 FROM tab0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-3088
SELECT ALL col0 - + col1 DIV - tab1.col1 AS col1 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-3088
SELECT ALL col0 - + col1 / - tab1.col1 AS col1 FROM tab1
----
4
65
81

query I rowsort
SELECT tab1.col0 + tab1.col0 + + col2 AS col1 FROM tab1
----
185
256
60

query I rowsort
SELECT ALL col0 + - col0 * - col2 AS col0 FROM tab0
----
70
7387
816

query I rowsort
SELECT ALL - col2 * tab0.col1 - + col2 FROM tab0
----
-2871
-7544
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3092
SELECT + + col1 DIV col1 + - col2 AS col0 FROM tab2 AS cor0
----
-25
-26
-37

skipif mysql # not compatible
query I rowsort label-3092
SELECT + + col1 / col1 + - col2 AS col0 FROM tab2 AS cor0
----
-25
-26
-37

onlyif mysql # use DIV operator for integer division
query I rowsort label-3093
SELECT ALL + col1 + + col2 DIV - col0 FROM tab0
----
85
91
97

skipif mysql # not compatible
query I rowsort label-3093
SELECT ALL + col1 + + col2 / - col0 FROM tab0
----
85
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col0 - + col1 col0 FROM tab0 AS cor0
----
1978
3298
8008

query I rowsort
SELECT DISTINCT col0 + col1 * col2 * col2 FROM tab2 cor0
----
22606
24627
39962

query I rowsort
SELECT DISTINCT - col1 * + col2 + col2 AS col2 FROM tab0 AS cor0
----
-2805
-7380
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + col0 col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT - cor0.col0 - + col2 FROM tab0 cor0
----
-171
-36
-57

query I rowsort
SELECT - col2 + - cor0.col1 FROM tab0 cor0
----
-119
-173
-98

query I rowsort
SELECT ALL + - col1 * cor0.col0 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - col1 * + col2 + col2 AS col2 FROM tab2 AS cor0
----
-1508
-608
-810

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * col1 col0 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + col1 * col1 col0 FROM tab0 AS cor0
----
7363
8199
9408

onlyif mysql # use DIV operator for integer division
query I rowsort label-3104
SELECT + col1 DIV col1 + + col0 col1 FROM tab0 cor0
----
25
36
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3104
SELECT + col1 / col1 + + col0 col1 FROM tab0 cor0
----
25
36
90

query I rowsort
SELECT DISTINCT + - col0 * cor0.col2 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL + tab0.col1 * - col0 * + tab0.col2 AS col2 FROM tab0
----
-3395
-664118
-68112

query I rowsort
SELECT - col1 - col0 * - col2 AS col1 FROM tab2 AS cor0
----
158
1969
2985

onlyif mysql # use DIV operator for integer division
query I rowsort label-3108
SELECT - col2 - col2 DIV + tab0.col2 AS col2 FROM tab0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-3108
SELECT - col2 - col2 / + tab0.col2 AS col2 FROM tab0
----
-2
-34
-83

query I rowsort
SELECT ALL col2 * col1 - - tab0.col1 AS col2 FROM tab0
----
194
2924
7553

onlyif mysql # use DIV operator for integer division
query I rowsort label-3110
SELECT tab1.col1 + + col1 DIV + col1 AS col0 FROM tab1
----
11
14
27

skipif mysql # not compatible
query I rowsort label-3110
SELECT tab1.col1 + + col1 / + col1 AS col0 FROM tab1
----
11
14
27

query III rowsort
SELECT * FROM tab0 WHERE NOT + col2 * col1 * - col1 < ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 col0 FROM tab1 WHERE NOT ( NULL ) NOT IN ( + col0 * + col0 )
----

query I rowsort
SELECT DISTINCT + col2 FROM tab0 WHERE NOT ( col1 ) BETWEEN - col0 * col0 AND ( col0 )
----
1
33
82

query III rowsort
SELECT * FROM tab2 WHERE ( NULL ) IN ( col1 )
----

query I rowsort
SELECT - col1 + + col2 + col2 AS col1 FROM tab2
----
-7
23
59

query I rowsort
SELECT - tab1.col0 - - col0 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT + - col2 + cor0.col2 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - 59 * - col2 FROM tab1 AS cor0
----
3186
3363
5664

onlyif mysql # use DIV operator for integer division
query I rowsort label-3119
SELECT ALL col1 DIV col0 col0 FROM tab2 cor0
----
0
0
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3119
SELECT ALL col1 / col0 col0 FROM tab2 cor0
----
0
0
4

query I rowsort
SELECT ALL tab2.col2 * col2 AS col1 FROM tab2 WHERE col2 * col2 IN ( - col1 + col2 * col2 )
----

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT ( col1 * col2 ) >= NULL
----

query I rowsort
SELECT col0 * + col0 AS col0 FROM tab2 WHERE NULL BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT + col2 * + col2 + - col1 + tab1.col0 FROM tab1
----
2893
3303
9283

query I rowsort
SELECT col0 + - col1 * + col0 FROM tab2
----
-1264
-210
-4524

query I rowsort
SELECT DISTINCT tab2.col1 * col0 + col1 AS col0 FROM tab2
----
1360
248
4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-3126
SELECT + col1 - tab1.col1 DIV col0 AS col2 FROM tab1
----
10
13
18

skipif mysql # not compatible
query I rowsort label-3126
SELECT + col1 - tab1.col1 / col0 AS col2 FROM tab1
----
10
13
18

query I rowsort
SELECT + col0 * col0 FROM tab2 cor0 WHERE NULL NOT IN ( col0 )
----

query I rowsort
SELECT DISTINCT - col2 - col2 * col1 AS col1 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT ALL col0 + + col0 + - col1 * - col1 FROM tab1 AS cor0
----
228
329
682

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 + - col0 col0 FROM tab1 AS cor0
----
-54
-67
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-3131
SELECT ALL + col2 + + cor0.col1 + col1 DIV - col1 FROM tab2 AS cor0
----
54
57
84

skipif mysql # not compatible
query I rowsort label-3131
SELECT ALL + col2 + + cor0.col1 + col1 / - col1 FROM tab2 AS cor0
----
54
57
84

query I rowsort
SELECT tab0.col2 + + tab0.col0 + - col0 AS col1 FROM tab0
----
1
33
82

query I rowsort
SELECT DISTINCT + col2 * col1 - col2 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT tab1.col1 + + tab1.col1 - + col0 AS col1 FROM tab1
----
-44
-54
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - tab1.col1 col0 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL col0 * col1 - + col1 FROM tab0
----
1978
3298
8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-3137
SELECT - col2 + + col1 DIV - tab1.col0 FROM tab1
----
-57
-62
-96

skipif mysql # not compatible
query I rowsort label-3137
SELECT - col2 + + col1 / - tab1.col0 FROM tab1
----
-57
-62
-96

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT ( NULL ) <= NULL
----

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT ( + col2 * col2 ) = NULL
----

query I rowsort
SELECT DISTINCT col0 AS col1 FROM tab1 WHERE NOT - col2 * - col2 <= ( - col1 + col1 * - col0 - col2 )
----
3
64
80

query I rowsort
SELECT + col0 - col2 * col1 * col1 AS col1 FROM tab0
----
-244044
-678953
-9374

query I rowsort
SELECT ALL col0 + - col0 / + col1 FROM tab1 WHERE NOT NULL = NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3143
SELECT col2 + - cor0.col0 * 99 + col0 DIV - col0 AS col1 FROM tab0 cor0
----
-2344
-3465
-8730

skipif mysql # not compatible
query I rowsort label-3143
SELECT col2 + - cor0.col0 * 99 + col0 / - col0 AS col1 FROM tab0 cor0
----
-2344
-3465
-8730

query I rowsort
SELECT 86 + + col1 + - 18 * - col0 * col2 FROM tab0 AS cor0
----
131541
14428
813

query I rowsort
SELECT + col1 * - col2 + ( - col0 ) + cor0.col0 * - col0 FROM tab2 AS cor0
----
-6966
-7696
-893

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3146
SELECT + ( col0 ) * ( + col1 ) + col2 * CAST( NULL AS SIGNED ) col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3146
SELECT + ( col0 ) * ( + col1 ) + col2 * CAST ( NULL AS INTEGER ) col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 47 * - col0 AS col1 FROM tab1 AS cor0
----
-141
-3008
-3760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 - col1 col0 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT ALL - + col1 + cor0.col2 FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3150
SELECT - col1 * - 90 + col1 DIV - col0 AS col2 FROM tab0 AS cor0
----
7737
8189
8728

skipif mysql # not compatible
query I rowsort label-3150
SELECT - col1 * - 90 + col1 / - col0 AS col2 FROM tab0 AS cor0
----
7737
8189
8728

query I rowsort
SELECT 97 * - cor0.col0 FROM tab2, tab2 AS cor0
----
9 values hashing to e2d40d1df54277e0a90f31ff114ea633

query I rowsort
SELECT + 76 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 30b8941a700cffd5b983116383bd42d5

query I rowsort
SELECT ALL 62 * 9 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 77092fd77947efbdb55e5ea7a676a56a

onlyif mysql # use DIV operator for integer division
query I rowsort label-3154
SELECT ALL 70 DIV + 26 AS col2 FROM tab0
----
2
2
2

skipif mysql # not compatible
query I rowsort label-3154
SELECT ALL 70 / + 26 AS col2 FROM tab0
----
2
2
2

query I rowsort
SELECT 89 + tab2.col2 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to df7429add5f154e4c0c403a7ef49c4bc

query I rowsort
SELECT ( + col0 ) * col0 * + ( - tab1.col0 ) FROM tab1
----
-262144
-27
-512000

query I rowsort
SELECT DISTINCT - col2 + + col1 * + col1 + ( col1 ) AS col0 FROM tab2
----
268
3514
965

query I rowsort
SELECT ALL + col0 + + 8 FROM tab2
----
15
86
87

query I rowsort
SELECT DISTINCT col2 * + tab0.col0 AS col0 FROM tab0
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3160
SELECT + - CAST( col1 AS SIGNED ) * col1 - col0 * - col0 FROM tab0 AS cor0
----
-360
-6820
-8184

skipif mysql # not compatible
query I rowsort label-3160
SELECT + - CAST ( col1 AS INTEGER ) * col1 - col0 * - col0 FROM tab0 AS cor0
----
-360
-6820
-8184

query I rowsort
SELECT DISTINCT - ( 36 ) * + col0 AS col2 FROM tab2 AS cor0
----
-252
-2808
-2844

query I rowsort
SELECT + 37 * cor0.col2 - col1 FROM tab2 AS cor0
----
1389
903
968

query I rowsort
SELECT + - col0 * + col1 - - cor0.col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT - ( ( col1 ) ) * 50 FROM tab2
----
-1550
-2950
-850

query I rowsort
SELECT - col1 * 28 * col2 AS col0 FROM tab2
----
-18088
-23436
-42952

query I rowsort
SELECT ( + 10 ) FROM tab1
----
10
10
10

query I rowsort
SELECT - - 28 * - col1 FROM tab1 AS cor0
----
-280
-364
-728

query I rowsort
SELECT DISTINCT + + 55 AS col2 FROM tab2 AS cor0
----
55

query I rowsort
SELECT ALL + ( - col2 ) + + col2 * col2 FROM tab0 AS cor0
----
0
1056
6642

query I rowsort
SELECT DISTINCT + 51 * + col1 AS col2 FROM tab1
----
1326
510
663

query I rowsort
SELECT - tab1.col2 + col2 * col2 FROM tab1
----
2862
3192
9120

query I rowsort
SELECT ALL + col2 - + col1 FROM tab1
----
28
47
83

query I rowsort
SELECT ALL col2 + col1 * - col2 FROM tab2
----
-1508
-608
-810

query I rowsort
SELECT ALL - 70 - - col0 AS col1 FROM tab1
----
-6
-67
10

query I rowsort
SELECT - 10 + col2 AS col1 FROM tab2 AS cor0
----
16
17
28

query I rowsort
SELECT DISTINCT col0 + col2 + tab1.col1 FROM tab1
----
131
189
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + col2 * col1 col0 FROM tab0
----
194
2924
7553

query I rowsort
SELECT cor0.col2 + - ( col1 ) * cor0.col1 * + ( 75 ) AS col0 FROM tab2 cor0
----
-21637
-261049
-72048

query I rowsort
SELECT DISTINCT - col0 + tab2.col1 AS col0 FROM tab2
----
-19
-62
24

query I rowsort
SELECT - + ( 88 ) AS col0 FROM tab1 AS cor0
----
-88
-88
-88

query I rowsort
SELECT + ( col2 ) + + cor0.col0 AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - - cor0.col0 + + ( - col1 ) FROM tab2 AS cor0
----
-24
19
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col1 ) * col0 col2 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3184
SELECT DISTINCT - + CAST( NULL AS SIGNED ) * + 5 col2 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3184
SELECT DISTINCT - + CAST ( NULL AS INTEGER ) * + 5 col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL - tab1.col1 * - col1 AS col1 FROM tab1
----
100
169
676

query I rowsort
SELECT ALL + cor0.col0 * - ( col1 ) AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + 10 * 13 FROM tab1 AS cor0
----
130
130
130

query I rowsort
SELECT + 61 * 4 AS col0 FROM tab0 AS cor0
----
244
244
244

query I rowsort
SELECT DISTINCT + cor0.col0 * col0 AS col2 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT ALL + col0 + - 18 FROM tab2 AS cor0
----
-11
60
61

query I rowsort
SELECT DISTINCT - col2 * - col0 + 26 * col2 AS col0 FROM tab2 AS cor0
----
2704
3990
891

query I rowsort
SELECT DISTINCT - + cor0.col2 * ( - col0 ) AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT col0 + - col1 + + ( + col2 ) * + 15 AS col1 FROM tab2 AS cor0
----
381
409
632

onlyif mysql # use DIV operator for integer division
query I rowsort label-3194
SELECT ALL col0 DIV col0 col2 FROM tab2 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3194
SELECT ALL col0 / col0 col2 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT - col1 + cor0.col1 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + col2 + + 57 FROM tab1 cor0
----
111
114
153

onlyif mysql # use DIV operator for integer division
query I rowsort label-3197
SELECT col0 DIV 6 - 27 FROM tab1
----
-14
-17
-27

skipif mysql # not compatible
query I rowsort label-3197
SELECT col0 / 6 - 27 FROM tab1
----
-14
-17
-27

query I rowsort
SELECT ALL col0 + 74 - tab0.col1 FROM tab0
----
12
12
72

query I rowsort
SELECT + col1 - + col0 * - cor0.col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT ALL ( + col0 ) * + cor0.col0 FROM tab0 AS cor0
----
1225
576
7921

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3201
SELECT + CAST( + col1 AS SIGNED ) * + col1 + 76 + + 3 AS col0 FROM tab0 AS cor0
----
7475
8360
9488

skipif mysql # not compatible
query I rowsort label-3201
SELECT + CAST ( + col1 AS INTEGER ) * + col1 + 76 + + 3 AS col0 FROM tab0 AS cor0
----
7475
8360
9488

query I rowsort
SELECT + + 89 + - 9 * col2 * col1 AS col2 FROM tab2 cor0
----
-13717
-5725
-7444

query I rowsort
SELECT - ( + col1 ) * col0 + cor0.col1 AS col2 FROM tab1 AS cor0
----
-1027
-52
-630

onlyif mysql # use DIV operator for integer division
query I rowsort label-3204
SELECT ALL + col1 DIV col0 + col1 AS col0 FROM tab0
----
89
92
99

skipif mysql # not compatible
query I rowsort label-3204
SELECT ALL + col1 / col0 + col1 AS col0 FROM tab0
----
89
92
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-3205
SELECT + col2 DIV 90 + - col2 * col2 * col0 AS col2 FROM tab1
----
-207936
-737279
-8748

skipif mysql # not compatible
query I rowsort label-3205
SELECT + col2 / 90 + - col2 * col2 * col0 AS col2 FROM tab1
----
-207936
-737279
-8748

onlyif mysql # use DIV operator for integer division
query I rowsort label-3206
SELECT DISTINCT col1 DIV + ( - ( col2 ) ) - + 39 FROM tab1
----
-39

skipif mysql # not compatible
query I rowsort label-3206
SELECT DISTINCT col1 / + ( - ( col2 ) ) - + 39 FROM tab1
----
-39

query I rowsort
SELECT ALL + col1 + - ( - 11 ) * col0 - col1 FROM tab2
----
77
858
869

query I rowsort
SELECT col1 * + tab1.col0 + ( - tab1.col0 ) + col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT ALL - col1 + - cor0.col0 * 60 FROM tab1 AS cor0
----
-206
-3850
-4813

query I rowsort
SELECT ALL + - 56 + + cor0.col2 * ( cor0.col1 ) * col2 AS col1 FROM tab2 AS cor0
----
22543
24492
39828

query I rowsort
SELECT DISTINCT - - ( - col0 ) - + 43 * col1 AS col2 FROM tab0 AS cor0
----
-3722
-4002
-4206

query I rowsort
SELECT DISTINCT + col1 * + col2 + col0 * + 17 * + col0 AS col1 FROM tab2 AS cor0
----
104962
106743
1670

query I rowsort
SELECT - + 29 * col0 FROM tab1 AS cor0
----
-1856
-2320
-87

query I rowsort
SELECT DISTINCT - col2 * col0 + + col0 AS col1 FROM tab1 cor0
----
-159
-3584
-7600

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( col1 ) + + col0 + cor0.col1 col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT + col2 + 57 AS col2 FROM tab2
----
83
84
95

query I rowsort
SELECT DISTINCT 21 + col0 AS col2 FROM tab1 AS cor0
----
101
24
85

query I rowsort
SELECT ALL col1 + - col2 - 67 * - 31 AS col2 FROM tab0 cor0
----
2086
2130
2173

onlyif mysql # use DIV operator for integer division
query I rowsort label-3219
SELECT + col1 * + cor0.col1 DIV - col1 col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3219
SELECT + col1 * + cor0.col1 / - col1 col1 FROM tab0 AS cor0
----
-86
-91
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3220
SELECT tab2.col2 * + col2 + CAST( - 29 AS SIGNED ) col1 FROM tab2
----
1415
647
700

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3220
SELECT tab2.col2 * + col2 + CAST ( - 29 AS INTEGER ) col1 FROM tab2
----
1415
647
700

query I rowsort
SELECT ALL + - 10 FROM tab2 AS cor0
----
-10
-10
-10

query I rowsort
SELECT + - col2 * 24 AS col1 FROM tab0 AS cor0
----
-1968
-24
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col2 col2 FROM tab2, tab0 cor0
----
26
27
38

query I rowsort
SELECT ALL 5 AS col0 FROM tab0 AS cor0
----
5
5
5

query I rowsort
SELECT 39 * - col0 AS col2 FROM tab2
----
-273
-3042
-3081

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * + col1 * col1 col0 FROM tab1
----
16224
36504
5700

query I rowsort
SELECT ALL - cor0.col2 + 35 FROM tab1 AS cor0
----
-19
-22
-61

query I rowsort
SELECT ALL + - col2 + col2 * col2 FROM tab2 AS cor0
----
1406
650
702

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab1, tab0 cor0, tab1 AS cor1
----
3
64
80

query I rowsort
SELECT DISTINCT cor1.col2 FROM tab2, tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
1
33
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3231
SELECT ALL + CAST( 53 AS SIGNED ) FROM tab0 AS cor0
----
53
53
53

skipif mysql # not compatible
query I rowsort label-3231
SELECT ALL + CAST ( 53 AS INTEGER ) FROM tab0 AS cor0
----
53
53
53

query I rowsort
SELECT col1 * col1 - col1 AS col2 FROM tab2 cor0
----
272
3422
930

query I rowsort
SELECT DISTINCT + col1 + col1 AS col2 FROM tab0 cor0
----
172
182
194

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3234
SELECT - cor0.col2 * - col1 + + col2 + + CAST( col0 AS SIGNED ) FROM tab2 AS cor0
----
1638
763
871

skipif mysql # not compatible
query I rowsort label-3234
SELECT - cor0.col2 * - col1 + + col2 + + CAST ( col0 AS INTEGER ) FROM tab2 AS cor0
----
1638
763
871

query I rowsort
SELECT DISTINCT + ( ( col1 ) ) * + 3 FROM tab1 AS cor0
----
30
39
78

query I rowsort
SELECT - cor0.col0 * col1 + - col0 + col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + ( col2 ) * col2 + ( col0 ) * col0 FROM tab0 cor0
----
1226
14645
1665

query I rowsort
SELECT DISTINCT - + 53 AS col2 FROM tab2 AS cor0
----
-53

query I rowsort
SELECT col0 * - 67 + - col1 FROM tab0 AS cor0
----
-1694
-2442
-6054

query I rowsort
SELECT DISTINCT - col2 + - cor0.col0 * col1 FROM tab0 cor0
----
-2097
-3396
-8181

query I rowsort
SELECT - 99 - - col0 AS col2 FROM tab2 cor0
----
-20
-21
-92

query I rowsort
SELECT ( - cor0.col2 ) + - col0 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT ALL + cor0.col0 * 12 AS col1 FROM tab2 AS cor0
----
84
936
948

query I rowsort
SELECT ALL - col2 * - col0 - - 2 AS col1 FROM tab0 AS cor0
----
37
7300
794

query I rowsort
SELECT + 21 AS col1 FROM tab2, tab1 AS cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to 4eecc28c48bfdf162a585f11d1dd0b6c

query I rowsort
SELECT + - col0 * col2 + - col2 * col1 FROM tab0 cor0
----
-132
-14760
-3630

query I rowsort
SELECT DISTINCT + col2 + + col1 * + ( + col1 ) AS col0 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT - col2 + cor0.col0 * 22 + col2 AS col0 FROM tab2 AS cor0
----
154
1716
1738

query I rowsort
SELECT - - col1 + ( ( col0 ) ) AS col2 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT + + 23 * col2 FROM tab2 AS cor0
----
598
621
874

query I rowsort
SELECT DISTINCT - col1 + + col0 * + col1 + - col2 AS col0 FROM tab1
----
-2
573
931

query I rowsort
SELECT + 64 AS col1 FROM tab0, tab0 cor0
----
9 values hashing to 60ab040e931c5c85db7ba19364eacc8e

query I rowsort
SELECT - 86 * + cor0.col1 AS col1 FROM tab0, tab1 AS cor0, tab1, tab2 cor1
----
81 values hashing to d73f2cdcf7b5e3447a8d46dddc1d99b9

query I rowsort
SELECT + 10 + - col0 AS col1 FROM tab1 AS cor0
----
-54
-70
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-3255
SELECT + 70 DIV col0 FROM tab2 cor0
----
0
0
10

skipif mysql # not compatible
query I rowsort label-3255
SELECT + 70 / col0 FROM tab2 cor0
----
0
0
10

query I rowsort
SELECT ALL + 29 * col1 AS col1 FROM tab2 AS cor0
----
1711
493
899

query I rowsort
SELECT ALL + cor0.col0 * 77 FROM tab1, tab0 cor0
----
9 values hashing to 780f5ba541769c8f3ef3c8c584a78ef8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + ( col2 ) col0 FROM tab2 cor0
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-3259
SELECT ALL + col2 + col1 DIV - CAST( col1 AS SIGNED ) + col2 FROM tab1 AS cor0
----
107
113
191

skipif mysql # not compatible
query I rowsort label-3259
SELECT ALL + col2 + col1 / - CAST ( col1 AS INTEGER ) + col2 FROM tab1 AS cor0
----
107
113
191

query I rowsort
SELECT ALL - col2 + 62 * ( cor0.col2 ) * - col1 FROM tab0 AS cor0
----
-175989
-462726
-6015

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col1 + + 58 - - col2 col2 FROM tab2 AS cor0
----
113
116
143

query I rowsort
SELECT + cor0.col2 * 96 * col2 FROM tab2 AS cor0
----
138624
64896
69984

query I rowsort
SELECT - col0 + ( - cor0.col0 ) AS col2 FROM tab0 cor0
----
-178
-48
-70

query I rowsort
SELECT DISTINCT col1 * 21 FROM tab0
----
1806
1911
2037

onlyif mysql # use DIV operator for integer division
query I rowsort label-3265
SELECT col2 - col0 DIV col0 FROM tab2
----
25
26
37

skipif mysql # not compatible
query I rowsort label-3265
SELECT col2 - col0 / col0 FROM tab2
----
25
26
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 34 col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 1146d159f0b9b4378a8b738b963f7039

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab2, tab0, tab2 AS cor0
----
7
78
79

query I rowsort
SELECT col1 * - 76 * col1 AS col1 FROM tab1 cor0
----
-12844
-51376
-7600

query I rowsort
SELECT - col2 * - 37 + - col0 AS col0 FROM tab2
----
1327
884
992

query I rowsort
SELECT DISTINCT 19 * - 45 FROM tab0
----
-855

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3271
SELECT DISTINCT + + ( - cor0.col1 ) * CAST( NULL AS SIGNED ) + col0 + cor0.col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3271
SELECT DISTINCT + + ( - cor0.col1 ) * CAST ( NULL AS INTEGER ) + col0 + cor0.col0 FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3272
SELECT DISTINCT + col2 * - col1 DIV + col1 + - ( col1 ) FROM tab1 AS cor0
----
-109
-67
-80

skipif mysql # not compatible
query I rowsort label-3272
SELECT DISTINCT + col2 * - col1 / + col1 + - ( col1 ) FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT ALL - 40 * + col0 - - col0 * + col2 FROM tab1 AS cor0
----
1088
42
4480

query I rowsort
SELECT - + 6 AS col0 FROM tab0 AS cor0
----
-6
-6
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-3275
SELECT ALL col1 - col0 DIV + col2 AS col1 FROM tab0
----
62
86
90

skipif mysql # not compatible
query I rowsort label-3275
SELECT ALL col1 - col0 / + col2 AS col1 FROM tab0
----
62
86
90

query I rowsort
SELECT - 13 * + cor0.col2 AS col0 FROM tab1 AS cor0
----
-1248
-702
-741

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 69 + col1 col0 FROM tab0 AS cor0
----
155
160
166

query I rowsort
SELECT - 32 + + col0 FROM tab0 cor0
----
-8
3
57

query I rowsort
SELECT col0 * - col1 + + cor0.col1 * - col0 FROM tab0 cor0
----
-16198
-4128
-6790

query I rowsort
SELECT DISTINCT 26 * col2 FROM tab2
----
676
702
988

query I rowsort
SELECT ALL - + 37 * 54 AS col2 FROM tab0 AS cor0
----
-1998
-1998
-1998

query I rowsort
SELECT DISTINCT - - 98 + col2 AS col2 FROM tab0 cor0
----
131
180
99

query I rowsort
SELECT ALL col2 * 87 * + col2 FROM tab2
----
125628
58812
63423

query I rowsort
SELECT ALL + col2 * + cor0.col1 + + col2 * + col0 AS col1 FROM tab1 AS cor0
----
1566
4218
8928

query I rowsort
SELECT ALL + - 29 FROM tab2 AS cor0
----
-29
-29
-29

onlyif mysql # use DIV operator for integer division
query I rowsort label-3286
SELECT DISTINCT col0 DIV + 39 AS col2 FROM tab2 AS cor0
----
0
2

skipif mysql # not compatible
query I rowsort label-3286
SELECT DISTINCT col0 / + 39 AS col2 FROM tab2 AS cor0
----
0
2

query I rowsort
SELECT ALL col2 * + col2 + col1 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT - col0 + + col2 * 39 * 91 AS col0 FROM tab0 AS cor0
----
117093
290929
3514

query I rowsort
SELECT DISTINCT + + 47 * col1 AS col0 FROM tab0 cor0
----
4042
4277
4559

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 69 * - col2 col0 FROM tab1 AS cor0
----
-3726
-3933
-6624

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3291
SELECT DISTINCT + 14 * - col0 + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3291
SELECT DISTINCT + 14 * - col0 + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 + - col2 col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ALL - - 10 * - col0 FROM tab2 AS cor0
----
-70
-780
-790

onlyif mysql # use DIV operator for integer division
query I rowsort label-3294
SELECT DISTINCT + col1 * col0 DIV col0 AS col2 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-3294
SELECT DISTINCT + col1 * col0 / col0 AS col2 FROM tab2
----
17
31
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3295
SELECT - CAST( NULL AS SIGNED ) + col0 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3295
SELECT - CAST ( NULL AS INTEGER ) + col0 AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 + ( tab2.col2 + ( - col0 ) ) FROM tab2
----
-26
-3
47

onlyif mysql # use DIV operator for integer division
query I rowsort label-3297
SELECT - CAST( - col1 AS SIGNED ) - col2 DIV + 45 col2 FROM tab2
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3297
SELECT - CAST ( - col1 AS INTEGER ) - col2 / + 45 col2 FROM tab2
----
17
31
59

query I rowsort
SELECT ALL - ( col1 ) * - col0 AS col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT ALL - + col1 * ( + col1 ) FROM tab2 AS cor0
----
-289
-3481
-961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col0 + - col0 * col2 col1 FROM tab1 AS cor0
----
-1280
-153
448

query I rowsort
SELECT DISTINCT - - col2 + - 49 + col2 FROM tab1 cor0
----
143
59
65

query I rowsort
SELECT col2 + 41 AS col2 FROM tab2 AS cor0
----
67
68
79

query I rowsort
SELECT - - col0 * + col1 + - col1 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT col0 + ( col0 ) * cor0.col2 + + 35 FROM tab1 AS cor0
----
200
3747
7795

query I rowsort
SELECT ALL - col0 * ( col1 ) FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT col2 + + 42 FROM tab2 AS cor0
----
68
69
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-3307
SELECT ALL - - col1 + 55 + col1 DIV + col1 AS col1 FROM tab2 AS cor0
----
115
73
87

skipif mysql # not compatible
query I rowsort label-3307
SELECT ALL - - col1 + 55 + col1 / + col1 AS col1 FROM tab2 AS cor0
----
115
73
87

query I rowsort
SELECT - col1 * col1 + col0 AS col0 FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT ALL - col0 * - col2 + - 48 * + col2 AS col1 FROM tab1 cor0
----
-2430
3072
912

query I rowsort
SELECT - cor0.col1 + ( - cor0.col2 ) FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT + 14 * - 20 AS col1 FROM tab2 AS cor0
----
-280
-280
-280

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3312
SELECT DISTINCT + CAST( 85 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
85

skipif mysql # not compatible
query I rowsort label-3312
SELECT DISTINCT + CAST ( 85 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3313
SELECT - 4 * + cor0.col0 + + CAST( NULL AS SIGNED ) AS col0 FROM tab0, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3313
SELECT - 4 * + cor0.col0 + + CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT 15 AS col0 FROM tab1, tab1 AS cor0, tab2, tab0 AS cor1
----
15

onlyif mysql # use DIV operator for integer division
query I rowsort label-3315
SELECT - col0 * - ( + cor0.col1 ) DIV col1 AS col0 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-3315
SELECT - col0 * - ( + cor0.col1 ) / col1 AS col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT + col1 * 39 - - col2 FROM tab0
----
3387
3631
3784

query I rowsort
SELECT + - 55 + + col1 AS col2 FROM tab1 AS cor0
----
-29
-42
-45

onlyif mysql # use DIV operator for integer division
query I rowsort label-3318
SELECT tab1.col2 DIV 97 AS col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3318
SELECT tab1.col2 / 97 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT col1 + - ( col1 * col2 ) FROM tab1
----
-1235
-1378
-560

query I rowsort
SELECT DISTINCT - col2 * col0 * + 1 + col2 AS col1 FROM tab2
----
-162
-2002
-2964

query I rowsort
SELECT DISTINCT - col1 + 12 * + col1 FROM tab0
----
1001
1067
946

onlyif mysql # use DIV operator for integer division
query I rowsort label-3322
SELECT col0 + - col1 DIV + 46 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-3322
SELECT col0 + - col1 / + 46 FROM tab1
----
3
64
80

query I rowsort
SELECT col0 + - col0 * tab1.col0 + col0 AS col2 FROM tab1
----
-3
-3968
-6240

query I rowsort
SELECT DISTINCT col1 + + ( - col2 ) AS col0 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT ALL + - 29 * col1 + + col1 AS col0 FROM tab2 AS cor0
----
-1652
-476
-868

onlyif mysql # use DIV operator for integer division
query I rowsort label-3326
SELECT + col0 + col2 DIV + col1 AS col2 FROM tab1 AS cor0
----
5
69
87

skipif mysql # not compatible
query I rowsort label-3326
SELECT + col0 + col2 / + col1 AS col2 FROM tab1 AS cor0
----
5
69
87

query I rowsort
SELECT ALL - + 30 * col0 * + col2 AS col1 FROM tab2 AS cor0
----
-5670
-60840
-90060

query I rowsort
SELECT - 60 + - cor0.col1 FROM tab1 AS cor0
----
-70
-73
-86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3329
SELECT ALL + - CAST( + col1 AS SIGNED ) * col2 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort label-3329
SELECT ALL + - CAST ( + col1 AS INTEGER ) * col2 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL + - ( 94 ) + - col0 AS col1 FROM tab1 AS cor0
----
-158
-174
-97

query I rowsort
SELECT col1 * + col1 * - col1 + col2 * + 44 FROM tab2 AS cor0
----
-204235
-28603
-3241

query I rowsort
SELECT + - 80 + - col0 * col0 AS col2 FROM tab0 AS cor0
----
-1305
-656
-8001

query I rowsort
SELECT DISTINCT + + col1 * col0 AS col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - 95 + col0 + col0 AS col2 FROM tab1 AS cor0
----
-89
33
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-3335
SELECT ALL col1 DIV - 11 - - cor0.col0 AS col0 FROM tab1 AS cor0
----
1
64
79

skipif mysql # not compatible
query I rowsort label-3335
SELECT ALL col1 / - 11 - - cor0.col0 AS col0 FROM tab1 AS cor0
----
1
64
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor1.col0 col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

onlyif mysql # use DIV operator for integer division
query I rowsort label-3337
SELECT ALL col2 DIV - col2 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3337
SELECT ALL col2 / - col2 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + 4 FROM tab0 cor0
----
4

query I rowsort
SELECT ALL + col1 - + col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 29 * - col2 * - 90 + ( col1 ) FROM tab0 AS cor0
----
214111
2707
86216

onlyif mysql # use DIV operator for integer division
query I rowsort label-3341
SELECT ALL + col0 DIV + col0 AS col2 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3341
SELECT ALL + col0 / + col0 AS col2 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT + col1 * + 85 AS col2 FROM tab0
----
7310
7735
8245

query I rowsort
SELECT - col0 * - col2 + col0 FROM tab0 cor0
----
70
7387
816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 29 col0 FROM tab1, tab1 cor0, tab1 AS cor1
----
27 values hashing to 4c56285992bcb76e1aac22e6d23d1318

onlyif mysql # use DIV operator for integer division
query I rowsort label-3345
SELECT + - col1 + col1 DIV ( + col0 * + ( - col2 ) ) FROM tab0 AS cor0
----
-86
-91
-99

skipif mysql # not compatible
query I rowsort label-3345
SELECT + - col1 + col1 / ( + col0 * + ( - col2 ) ) FROM tab0 AS cor0
----
-86
-91
-99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3346
SELECT ALL - - col2 / + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3346
SELECT ALL - - col2 / + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 + - 72 FROM tab1 AS cor0
----
-126
-129
-168

query I rowsort
SELECT ALL col0 * col0 + 56 * col1 FROM tab2 AS cor0
----
1785
7193
9388

query I rowsort
SELECT DISTINCT - col2 * col1 + - col1 FROM tab2 AS cor0
----
-1593
-663
-868

query I rowsort
SELECT ALL + cor0.col0 * - col2 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT + cor1.col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
24
35
89

query I rowsort
SELECT DISTINCT 19 * - col0 FROM tab2
----
-133
-1482
-1501

query I rowsort
SELECT DISTINCT - + 59 FROM tab0 cor0 CROSS JOIN tab2 AS cor1
----
-59

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT + col0 IN ( - col2 + + col2 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT tab0.col2 * + tab0.col2 + - col1 FROM tab0 WHERE NOT col1 BETWEEN NULL AND ( col0 )
----
-96
1003
6633

query III rowsort
SELECT ALL * FROM tab0 WHERE NULL BETWEEN + col2 AND NULL
----

query I rowsort
SELECT DISTINCT tab1.col1 + + col2 + col2 FROM tab1 WHERE - col0 > + col1 + - col1
----

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE ( col1 ) <= NULL
----

query I rowsort
SELECT tab2.col1 AS col2 FROM tab2 WHERE NOT NULL NOT IN ( + col1 * col2 - col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * + tab2.col0 col1 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT col2 + - col1 - col1 FROM tab0
----
-100
-139
-193

query I rowsort
SELECT col2 + + col2 * col2 FROM tab2
----
1482
702
756

query I rowsort
SELECT DISTINCT col2 FROM tab2 WHERE NOT ( - col2 ) NOT BETWEEN ( NULL ) AND col0 * + col0
----

query I rowsort
SELECT DISTINCT - col1 - + tab1.col2 AS col0 FROM tab1
----
-109
-67
-80

query I rowsort
SELECT - col1 * - cor0.col2 * 57 + - col2 * + col2 * - col1 AS col2 FROM tab2 AS cor0
----
127322
61370
70308

query I rowsort
SELECT - + col1 + - cor0.col1 FROM tab1 cor0
----
-20
-26
-52

query I rowsort
SELECT ALL col2 + col1 * col1 AS col1 FROM tab0
----
7429
8363
9410

query I rowsort
SELECT - col0 + + tab1.col0 AS col0 FROM tab1
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3369
SELECT - col2 * + col1 * ( 52 ) + col0 + CAST( + ( - col1 ) AS SIGNED ) col2 FROM tab0 AS cor0
----
-147638
-388026
-5106

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3369
SELECT - col2 * + col1 * ( 52 ) + col0 + CAST ( + ( - col1 ) AS INTEGER ) col2 FROM tab0 AS cor0
----
-147638
-388026
-5106

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3370
SELECT DISTINCT - + col2 + col0 * 26 / col0 + + col2 * + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3370
SELECT DISTINCT - + col2 + col0 * 26 / col0 + + col2 * + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + col1 * - col0 AS col2 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + ( cor0.col2 ) AS col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT col2 + + col1 + - col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ( - col1 ) * col0 + - col0 + + col2 * col1 FROM tab0 AS cor0
----
-3333
-726
750

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * + 60 + col2 - - col2 * cor0.col2 * ( - col2 ) col2 FROM tab0 AS cor0
----
-34464
-545946
2100

onlyif mysql # use DIV operator for integer division
query I rowsort label-3376
SELECT DISTINCT + col1 DIV + col1 - col1 AS col1 FROM tab1 AS cor0
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-3376
SELECT DISTINCT + col1 / + col1 - col1 AS col1 FROM tab1 AS cor0
----
-12
-25
-9

query I rowsort
SELECT ALL + - col1 * + ( - col0 ) AS col2 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3378
SELECT DISTINCT col2 / - CAST( NULL AS SIGNED ) + + 73 * col2 / + 64 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3378
SELECT DISTINCT col2 / - CAST ( NULL AS INTEGER ) + + 73 * col2 / + 64 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT col2 * + 87 FROM tab2 cor0
----
2262
2349
3306

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3380
SELECT DISTINCT - + col2 + - CAST( NULL AS SIGNED ) * 83 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3380
SELECT DISTINCT - + col2 + - CAST ( NULL AS INTEGER ) * 83 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL - + col0 * 10 FROM tab1 AS cor0
----
-30
-640
-800

query I rowsort
SELECT + cor0.col1 + col1 * - 36 * col1 FROM tab1 AS cor0
----
-24310
-3590
-6071

query I rowsort
SELECT DISTINCT + col0 + col1 * cor0.col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT + 12 + + col2 * cor0.col1 + col2 FROM tab2 AS cor0
----
1572
696
876

query I rowsort
SELECT - col1 * col2 * - col1 AS col0 FROM tab0 AS cor0
----
244068
679042
9409

query I rowsort
SELECT ( col1 ) * - col1 * - ( + ( col2 ) ) FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT + 37 + col2 * + col0 * + col1 FROM tab1 cor0
----
36517
4249
99877

onlyif mysql # use DIV operator for integer division
query I rowsort label-3388
SELECT + tab0.col2 DIV - col1 col1 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3388
SELECT + tab0.col2 / - col1 col1 FROM tab0
----
0
0
0

query I rowsort
SELECT + col2 * - col2 * col2 AS col0 FROM tab2
----
-17576
-19683
-54872

query I rowsort
SELECT ALL 81 * col0 FROM tab1 AS cor0
----
243
5184
6480

query I rowsort
SELECT ALL 57 AS col1 FROM tab1 AS cor0
----
57
57
57

query I rowsort
SELECT + - 86 FROM tab2 AS cor0
----
-86
-86
-86

query I rowsort
SELECT ALL - 90 FROM tab1 AS cor0
----
-90
-90
-90

query I rowsort
SELECT - 86 + - col2 * col2 AS col2 FROM tab0 AS cor0
----
-1175
-6810
-87

query I rowsort
SELECT DISTINCT - 11 * + cor0.col0 FROM tab1 AS cor0
----
-33
-704
-880

query I rowsort
SELECT DISTINCT 71 * col2 FROM tab0 AS cor0
----
2343
5822
71

query I rowsort
SELECT ALL - - cor0.col0 * cor0.col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT 84 * tab2.col0 AS col2 FROM tab2
----
588
6552
6636

query I rowsort
SELECT ALL + col1 * 30 - + col0 * - tab0.col2 AS col1 FROM tab0
----
10028
2945
3372

query I rowsort
SELECT ALL col2 + 89 AS col2 FROM tab1
----
143
146
185

query I rowsort
SELECT ALL + col1 * - ( - col0 + ( 9 ) ) * col2 FROM tab2
----
-1674
105846
45220

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 + col0 + col2 col0 FROM tab0
----
260
71
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-3403
SELECT + - 82 DIV + 28 AS col0 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 20c9213316527d507e26425041e08387

skipif mysql # not compatible
query I rowsort label-3403
SELECT + - 82 / + 28 AS col0 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 20c9213316527d507e26425041e08387

query I rowsort
SELECT col2 + col1 * - tab1.col1 AS col0 FROM tab1
----
-43
-622
-73

onlyif mysql # use DIV operator for integer division
query I rowsort label-3405
SELECT + + col0 * + cor0.col2 + - col2 DIV col1 FROM tab0 cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-3405
SELECT + + col0 * + cor0.col2 + - col2 / col1 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT ALL - col1 + - col1 + col2 AS col0 FROM tab2 AS cor0
----
-35
-92
4

query I rowsort
SELECT ALL col2 - col1 AS col0 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT DISTINCT - + col0 + - col1 * - col2 + col1 AS col0 FROM tab0 AS cor0
----
159
2900
7464

query I rowsort
SELECT + col0 * - col1 + - col0 AS col1 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT DISTINCT + cor0.col0 + + cor0.col2 AS col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL ( - 98 ) + - col0 AS col1 FROM tab1
----
-101
-162
-178

query I rowsort
SELECT DISTINCT col2 * ( col1 * + col0 ) + col2 FROM tab2
----
119678
51072
5886

query I rowsort
SELECT ALL - 85 FROM tab1, tab2 AS cor0
----
9 values hashing to 8ebc8ffafb1517ea04e3a6fc4059d88a

query I rowsort
SELECT ALL tab1.col0 - - col1 AS col0 FROM tab1
----
29
74
93

query I rowsort
SELECT DISTINCT - 53 * col1 AS col2 FROM tab1 AS cor0
----
-1378
-530
-689

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3416
SELECT - CAST( NULL AS SIGNED ) / - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3416
SELECT - CAST ( NULL AS INTEGER ) / - col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 26 * - cor0.col1 AS col2 FROM tab0 AS cor0
----
-2236
-2366
-2522

onlyif mysql # use DIV operator for integer division
query I rowsort label-3418
SELECT + col0 + cor0.col0 DIV col0 FROM tab2 AS cor0
----
79
8
80

skipif mysql # not compatible
query I rowsort label-3418
SELECT + col0 + cor0.col0 / col0 FROM tab2 AS cor0
----
79
8
80

query I rowsort
SELECT col1 * col1 - + col1 AS col0 FROM tab1 cor0
----
156
650
90

query I rowsort
SELECT DISTINCT + 74 FROM tab2, tab0 AS cor0
----
74

query I rowsort
SELECT ALL - ( 6 ) FROM tab0 AS cor0
----
-6
-6
-6

query I rowsort
SELECT DISTINCT - 87 AS col0 FROM tab1 AS cor0
----
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 31 * + col1 + - col1 col2 FROM tab1 AS cor0
----
300
390
780

query I rowsort
SELECT DISTINCT + 53 + + col1 * - cor0.col1 AS col2 FROM tab2 cor0
----
-236
-3428
-908

query I rowsort
SELECT + col0 - - col1 AS col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT - col0 - col0 * col1 FROM tab2 AS cor0
----
-1422
-224
-4680

query I rowsort
SELECT ALL + 55 + - col2 FROM tab0 AS cor0
----
-27
22
54

query I rowsort
SELECT DISTINCT 83 * + col2 - - cor0.col1 FROM tab1 AS cor0
----
4508
4741
7981

query I rowsort
SELECT ALL - - cor0.col0 * col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT col2 + col0 * - col2 AS col1 FROM tab2 AS cor0
----
-162
-2002
-2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-3431
SELECT DISTINCT col2 * col0 + + col1 DIV + cor0.col1 FROM tab1 AS cor0
----
163
3649
7681

skipif mysql # not compatible
query I rowsort label-3431
SELECT DISTINCT col2 * col0 + + col1 / + cor0.col1 FROM tab1 AS cor0
----
163
3649
7681

query I rowsort
SELECT ALL + ( cor0.col1 ) + + col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT DISTINCT - 10 + + col0 - col2 * col0 AS col0 FROM tab1
----
-169
-3594
-7610

query I rowsort
SELECT col0 * - cor0.col1 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + col2 + + col2 * col1 FROM tab2
----
1560
684
864

onlyif mysql # use DIV operator for integer division
query I rowsort label-3436
SELECT col1 * - col2 + col0 * col1 DIV + col1 FROM tab2 AS cor0
----
-1456
-567
-830

skipif mysql # not compatible
query I rowsort label-3436
SELECT col1 * - col2 + col0 * col1 / + col1 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT + col2 - col0 AS col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT + cor0.col2 * col2 + - col1 FROM tab1 AS cor0
----
2890
3239
9203

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 + + col0 col1 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT ALL + col2 + + col1 * col1 AS col0 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT DISTINCT + col1 * col0 * - col0 FROM tab1 AS cor0
----
-234
-40960
-83200

query I rowsort
SELECT - col0 AS col1 FROM tab2 WHERE col1 * col1 NOT IN ( - col2 * col2 + col2 + col2 )
----
-7
-78
-79

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL >= + col1 * col1 - col0
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3444
SELECT col2 DIV col0 AS col0 FROM tab1
----
0
1
18

skipif mysql # not compatible
query I rowsort label-3444
SELECT col2 / col0 AS col0 FROM tab1
----
0
1
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 - col1 * col1 col1 FROM tab0
----
-7363
-8199
-9408

onlyif mysql # use DIV operator for integer division
query I rowsort label-3446
SELECT + col0 DIV col1 + col0 + + col2 AS col2 FROM tab0
----
171
36
57

skipif mysql # not compatible
query I rowsort label-3446
SELECT + col0 / col1 + col0 + + col2 AS col2 FROM tab0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col1 * + col0 + - col1 col0 FROM tab0
----
3298
664027
68026

query I rowsort
SELECT + col2 * + col2 * col1 FROM tab1
----
119808
32490
75816

query I rowsort
SELECT col1 * col1 + + tab2.col2 AS col0 FROM tab2
----
327
3507
988

query I rowsort
SELECT col1 AS col0 FROM tab0 WHERE + col2 / - col2 + col0 NOT IN ( + tab0.col1 - - col0 )
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3451
SELECT ALL + col2 DIV cor0.col1 + col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-3451
SELECT ALL + col2 / cor0.col1 + col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT - col2 * col2 + col1 FROM tab0
----
-1003
-6633
96

query I rowsort
SELECT + col0 + - tab2.col2 * col2 * col0 AS col2 FROM tab2
----
-113997
-5096
-52650

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL = ( tab2.col2 - col2 )
----

query I rowsort
SELECT ALL col2 * + col2 + + col1 AS col0 FROM tab0 AS cor0
----
1175
6815
98

query I rowsort
SELECT ALL + col0 + - col1 * + col2 - col0 AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab2 WHERE NOT ( NULL ) = ( NULL )
----

query I rowsort
SELECT - - 52 * 69 * col2 + col1 AS col1 FROM tab0 AS cor0
----
118490
294307
3685

query I rowsort
SELECT - + ( + col1 ) * col0 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-3460
SELECT - ( col2 ) DIV + col1 + 9 AS col2 FROM tab2 AS cor0
----
7
9
9

skipif mysql # not compatible
query I rowsort label-3460
SELECT - ( col2 ) / + col1 + 9 AS col2 FROM tab2 AS cor0
----
7
9
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-3461
SELECT col0 + col0 DIV + col1 AS col0 FROM tab2 AS cor0
----
7
79
83

skipif mysql # not compatible
query I rowsort label-3461
SELECT col0 + col0 / + col1 AS col0 FROM tab2 AS cor0
----
7
79
83

query I rowsort
SELECT - - col1 * + 28 AS col1 FROM tab2 cor0
----
1652
476
868

onlyif mysql # use DIV operator for integer division
query I rowsort label-3463
SELECT + + 87 DIV - 69 + + col2 * col2 FROM tab1 AS cor0
----
2915
3248
9215

skipif mysql # not compatible
query I rowsort label-3463
SELECT + + 87 / - 69 + + col2 * col2 FROM tab1 AS cor0
----
2915
3248
9215

query I rowsort
SELECT col0 * + col0 * - col0 AS col2 FROM tab1 AS cor0
----
-262144
-27
-512000

query I rowsort
SELECT + col2 * 81 FROM tab1
----
4374
4617
7776

query I rowsort
SELECT - tab0.col2 * + tab0.col2 + 88 * col0 FROM tab0
----
1023
1108
3079

query I rowsort
SELECT ALL - - cor0.col2 + col2 * col2 AS col2 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT - tab1.col2 AS col1 FROM tab1, tab1 cor0, tab0 AS cor1
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query I rowsort
SELECT - - col1 * cor0.col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT 63 AS col2 FROM tab1, tab1 cor0
----
9 values hashing to c3eea92c46f2c49716f386a58b575025

query I rowsort
SELECT + cor0.col0 + cor0.col2 * col2 * - col2 FROM tab2 AS cor0
----
-17498
-19676
-54793

query I rowsort
SELECT + cor0.col2 * cor0.col1 * + col1 FROM tab2 cor0
----
10982
25947
90506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 17 col0 FROM tab2, tab2 AS cor0
----
17

query I rowsort
SELECT 38 + - tab0.col0 AS col0 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to a6105ea627cf03b06323718346768c2e

query I rowsort
SELECT col0 + 5 * + 86 FROM tab2 AS cor0
----
437
508
509

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3476
SELECT col0 * CAST( - col0 AS SIGNED ) AS col1 FROM tab0
----
-1225
-576
-7921

skipif mysql # not compatible
query I rowsort label-3476
SELECT col0 * CAST ( - col0 AS INTEGER ) AS col1 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT ALL + 13 - 21 FROM tab0, tab1 AS cor0
----
9 values hashing to 47f43f23dcd23959d97d8e3b0aab692e

query I rowsort
SELECT col1 * ( col0 ) AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + col0 * 9 * + cor0.col1 + + col1 AS col2 FROM tab2 AS cor0
----
12104
1984
41477

query I rowsort
SELECT DISTINCT - 78 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
-78

query I rowsort
SELECT col1 + col1 - + col2 FROM tab1
----
-2
-37
-70

query I rowsort
SELECT + + col2 + 80 * - cor0.col1 FROM tab0 AS cor0
----
-6847
-7198
-7759

onlyif mysql # use DIV operator for integer division
query I rowsort label-3483
SELECT DISTINCT - col2 + ( + tab0.col1 + + col2 ) DIV - ( 61 + col0 ) FROM tab0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-3483
SELECT DISTINCT - col2 + ( + tab0.col1 + + col2 ) / - ( 61 + col0 ) FROM tab0
----
-2
-34
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 col2 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
17
31
59

query I rowsort
SELECT + col1 + - cor0.col0 AS col2 FROM tab1 AS cor0
----
-54
-67
23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3486
SELECT ALL + - CAST( - col0 AS SIGNED ) + cor0.col1 FROM tab2 AS cor0
----
137
38
96

skipif mysql # not compatible
query I rowsort label-3486
SELECT ALL + - CAST ( - col0 AS INTEGER ) + cor0.col1 FROM tab2 AS cor0
----
137
38
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + - col1 col0 FROM tab0
----
-2
-62

query I rowsort
SELECT - 30 * tab2.col0 AS col0 FROM tab2
----
-210
-2340
-2370

query I rowsort
SELECT + col0 * + col2 + col1 + - col0 AS col2 FROM tab0 AS cor0
----
7300
854
97

query I rowsort
SELECT DISTINCT + 82 AS col0 FROM tab1 AS cor0
----
82

query I rowsort
SELECT - ( 7 ) + col2 AS col2 FROM tab1 AS cor0
----
47
50
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - ( 27 ) * col0 + col1 col0 FROM tab1 AS cor0
----
-1718
-2147
-55

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3493
SELECT ALL CAST( NULL AS DECIMAL ) * col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3493
SELECT ALL CAST ( NULL AS REAL ) * col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3494
SELECT DISTINCT + - ( col2 ) - - col0 DIV + ( - ( col2 ) ) AS col2 FROM tab1 AS cor0
----
-54
-58
-96

skipif mysql # not compatible
query I rowsort label-3494
SELECT DISTINCT + - ( col2 ) - - col0 / + ( - ( col2 ) ) AS col2 FROM tab1 AS cor0
----
-54
-58
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3495
SELECT DISTINCT - col1 DIV 15 AS col0 FROM tab2 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-3495
SELECT DISTINCT - col1 / 15 AS col0 FROM tab2 AS cor0
----
-1
-2
-3

query I rowsort
SELECT + - 85 * col2 FROM tab2 AS cor0
----
-2210
-2295
-3230

query I rowsort
SELECT ALL - - col1 + - ( - 3 ) AS col1 FROM tab1 cor0
----
13
16
29

query I rowsort
SELECT DISTINCT + col0 * - ( cor0.col2 * col0 ) AS col0 FROM tab0 AS cor0
----
-1225
-19008
-649522

onlyif mysql # use DIV operator for integer division
query I rowsort label-3499
SELECT - cor0.col0 DIV col0 - + col1 FROM tab2 cor0
----
-18
-32
-60

skipif mysql # not compatible
query I rowsort label-3499
SELECT - cor0.col0 / col0 - + col1 FROM tab2 cor0
----
-18
-32
-60

query I rowsort
SELECT cor0.col1 * + col2 + - col0 AS col2 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT DISTINCT + + col2 * 59 FROM tab1 AS cor0
----
3186
3363
5664

query I rowsort
SELECT DISTINCT + - col2 + 52 FROM tab2 AS cor0
----
14
25
26

query I rowsort
SELECT ALL - col0 * + 0 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 6 col1 FROM tab0
----
-6
-6
-6

query I rowsort
SELECT ALL - 43 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 2f72bd9cab68c8d8c38874510a290a3c

query I rowsort
SELECT - - col0 + - cor0.col0 * col0 FROM tab2 AS cor0
----
-42
-6006
-6162

query I rowsort
SELECT DISTINCT - 73 * col1 + + col1 FROM tab2 AS cor0
----
-1224
-2232
-4248

query I rowsort
SELECT ( col0 ) * - cor0.col2 + + cor0.col1 AS col0 FROM tab2 AS cor0
----
-158
-1969
-2985

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 ( + col2 ) + col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL - + 34 * + col1 AS col0 FROM tab2 AS cor0
----
-1054
-2006
-578

query I rowsort
SELECT DISTINCT - 38 - col0 AS col0 FROM tab0
----
-127
-62
-73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 49 col0 FROM tab2, tab2 AS cor0
----
9 values hashing to cb40783c0fff72e8802cdf0682e7cb55

query I rowsort
SELECT ALL 30 * - col1 - col1 * 49 AS col0 FROM tab0
----
-6794
-7189
-7663

query I rowsort
SELECT DISTINCT col0 * + tab1.col2 + col1 AS col1 FROM tab1
----
188
3658
7693

query I rowsort
SELECT - 97 AS col0 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 12bd12d33f03250bee508c5641e140d5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 24 col2 FROM tab2, tab1, tab2 cor0
----
27 values hashing to aeeac431d22528188e8a5a2a60d2d080

query I rowsort
SELECT DISTINCT 12 * col1 + 58 AS col2 FROM tab0
----
1090
1150
1222

onlyif mysql # use DIV operator for integer division
query I rowsort label-3519
SELECT ALL - col1 + + tab0.col0 DIV - tab0.col0 + + col1 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3519
SELECT ALL - col1 + + tab0.col0 / - tab0.col0 + + col1 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT + 70 * + cor0.col1 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 35e585149934f8ab488f57c2570876b6

query I rowsort
SELECT ALL + col2 + col0 * + 34 AS col1 FROM tab2 AS cor0
----
265
2678
2724

query I rowsort
SELECT ALL col1 * col2 + + 87 * - 27 FROM tab0
----
-2252
489
5113

query I rowsort
SELECT DISTINCT + 44 AS col1 FROM tab1
----
44

query I rowsort
SELECT DISTINCT + - ( + 5 ) + col0 FROM tab1 AS cor0
----
-2
59
75

query I rowsort
SELECT DISTINCT + col0 * - col2 * col0 FROM tab1 cor0
----
-233472
-486
-614400

query I rowsort
SELECT ALL + col2 * + col0 + col2 * + ( - col0 ) + col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - col0 * col2 + + col2 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT - col2 + - ( ( - col2 ) ) AS col0 FROM tab2
----
0
0
0

query I rowsort
SELECT col1 + 21 FROM tab2
----
38
52
80

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT col2 * CAST ( col2 AS REAL ) AS col1 FROM tab2
----
1444
676
729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3531
SELECT CAST( NULL AS SIGNED ) - col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3531
SELECT CAST ( NULL AS INTEGER ) - col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + ( + col1 ) * - col2 * 40 FROM tab2 AS cor0
----
-25840
-33480
-61360

query I rowsort
SELECT DISTINCT ( + col0 ) + col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + 79 + - col1 FROM tab0 cor0
----
-12
-18
-7

query I rowsort
SELECT ALL + 82 - col2 FROM tab2 AS cor0
----
44
55
56

query I rowsort
SELECT + ( + 69 ) + - col0 FROM tab1 AS cor0
----
-11
5
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-3537
SELECT + col0 DIV + 62 FROM tab2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-3537
SELECT + col0 / + 62 FROM tab2
----
0
1
1

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( col2 AS REAL ) + - col1 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT ALL col0 + - 19 AS col0 FROM tab1 AS cor0
----
-16
45
61

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3540
SELECT DISTINCT + - CAST( + col2 AS SIGNED ) FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-3540
SELECT DISTINCT + - CAST ( + col2 AS INTEGER ) FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - CAST ( + cor0.col1 AS REAL ) * col0 + 15 AS col0 FROM tab2 AS cor0
----
-1328
-202
-4587

query I rowsort
SELECT ALL + ( 24 ) AS col1 FROM tab1 AS cor0
----
24
24
24

query I rowsort
SELECT ALL + cor0.col1 + col0 AS col1 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT DISTINCT col0 * col0 * col1 FROM tab2
----
106097
1519
358956

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 38 col1 FROM tab0 AS cor0
----
38
38
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 42 * + cor0.col0 col2 FROM tab1 AS cor0
----
126
2688
3360

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 66 col2 FROM tab2 AS cor0
----
66

query I rowsort
SELECT ( + col2 ) + col2 FROM tab1 AS cor0
----
108
114
192

onlyif mysql # use DIV operator for integer division
query I rowsort label-3549
SELECT DISTINCT + col0 DIV + 32 + col2 AS col1 FROM tab2 AS cor0
----
27
28
40

skipif mysql # not compatible
query I rowsort label-3549
SELECT DISTINCT + col0 / + 32 + col2 AS col1 FROM tab2 AS cor0
----
27
28
40

query I rowsort
SELECT + ( + col0 ) * col2 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT - 65 * tab2.col1 * 88 FROM tab2, tab0 cor0
----
9 values hashing to 7da575c1a5d99c6355e2672956bda254

query I rowsort
SELECT DISTINCT - + 6 * + 27 FROM tab0 AS cor0
----
-162

query I rowsort
SELECT - + cor0.col0 * - 82 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 669f1d4f8fa3ee4e77110d388fdff94d

query I rowsort
SELECT ALL - col0 * + 65 AS col2 FROM tab1 AS cor0
----
-195
-4160
-5200

query I rowsort
SELECT + ( - col0 ) * - ( + cor0.col0 ) AS col1 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT - - col1 - - col2 * + col2 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT col2 * + col1 + ( + col1 ) FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT + cor0.col1 * - cor0.col2 - - col1 * - col0 FROM tab1 AS cor0
----
-1210
-1482
-2288

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3559
SELECT + col1 * + col2 + + CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3559
SELECT + col1 * + col2 + + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col1 * cor0.col2 * 49 + ( col0 * + col0 ) FROM tab1 cor0
----
32026
67552
68805

query I rowsort
SELECT DISTINCT - col0 + + col1 - - col0 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL - col0 + - cor0.col2 FROM tab1 AS cor0
----
-121
-176
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3563
SELECT ALL - CAST( NULL AS SIGNED ) * col1 col1 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3563
SELECT ALL - CAST ( NULL AS INTEGER ) * col1 col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col1 - col1 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col0 * + ( ( cor0.col2 ) ) * 83 AS col1 FROM tab1 AS cor0
----
13446
302784
637440

query I rowsort
SELECT + col1 * 90 + cor0.col0 FROM tab2 cor0
----
1609
2797
5388

query I rowsort
SELECT ALL col1 + + 0 * 28 FROM tab2 AS cor0
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-3568
SELECT - - cor0.col1 + + col0 DIV 66 FROM tab2 cor0
----
18
31
60

skipif mysql # not compatible
query I rowsort label-3568
SELECT - - cor0.col1 + + col0 / 66 FROM tab2 cor0
----
18
31
60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3569
SELECT ALL tab0.col0 * + col1 / CAST( NULL AS SIGNED ) + col2 AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3569
SELECT ALL tab0.col0 * + col1 / CAST ( NULL AS INTEGER ) + col2 AS col2 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3570
SELECT ALL col0 * col1 DIV col1 + cor0.col1 FROM tab0 AS cor0
----
110
132
180

skipif mysql # not compatible
query I rowsort label-3570
SELECT ALL col0 * col1 / col1 + cor0.col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL - col1 * ( col2 ) + col1 AS col0 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT + + col0 * ( - col0 ) + col1 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT cor0.col2 * col0 + - col2 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT + + col2 * + ( + col1 ) FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT tab0.col1 AS col1 FROM tab0, tab2 AS cor0, tab2, tab2 AS cor1
----
81 values hashing to 8c9db501a604ea66e3b5e5598f3f2a91

query I rowsort
SELECT ( - tab0.col1 ) + - 86 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 2435a87ad22d35133d50493d6540facc

query I rowsort
SELECT + cor0.col2 * + 16 FROM tab0, tab1 AS cor0
----
9 values hashing to 541fe66bdccd5b0e268906a8a4a1d9b3

query I rowsort
SELECT + - col2 * + col0 + 97 * + cor0.col2 + + col0 FROM tab2 AS cor0
----
2437
572
763

query I rowsort
SELECT - + 85 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 8ebc8ffafb1517ea04e3a6fc4059d88a

query I rowsort
SELECT ALL + - col0 + + 37 FROM tab2 AS cor0
----
-41
-42
30

query I rowsort
SELECT ALL - col2 + - col2 + col2 * col1 FROM tab1 AS cor0
----
1056
1296
456

query I rowsort
SELECT ALL col1 + - col0 - + 84 * col0 * - ( - col0 ) AS col1 FROM tab1 AS cor0
----
-344118
-537667
-733

query I rowsort
SELECT + col0 * - 3 FROM tab1 cor0
----
-192
-240
-9

query I rowsort
SELECT DISTINCT 3 * - col1 FROM tab1
----
-30
-39
-78

query I rowsort
SELECT DISTINCT col0 * - col1 * - ( + col0 ) FROM tab0
----
118825
49536
720811

query I rowsort
SELECT - col0 * cor0.col0 + - col1 FROM tab1 AS cor0
----
-35
-4106
-6413

query I rowsort
SELECT ALL col1 + + 81 AS col2 FROM tab2 AS cor0
----
112
140
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3588
SELECT DISTINCT col1 DIV col0 - 10 FROM tab2 cor0
----
-10
-6

skipif mysql # not compatible
query I rowsort label-3588
SELECT DISTINCT col1 / col0 - 10 FROM tab2 cor0
----
-10
-6

query I rowsort
SELECT DISTINCT - - col0 * col2 AS col1 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT col2 * 84 + col1 AS col0 FROM tab2 AS cor0
----
2243
2299
3209

query I rowsort
SELECT ALL + - col0 + + 73 AS col0 FROM tab1 AS cor0
----
-7
70
9

query I rowsort
SELECT DISTINCT - - col2 * 67 - col2 * - col1 FROM tab1 AS cor0
----
4389
5022
7680

query I rowsort
SELECT + col2 * + 20 FROM tab2 AS cor0
----
520
540
760

onlyif mysql # use DIV operator for integer division
query I rowsort label-3594
SELECT 48 + - cor0.col0 DIV - col2 AS col0 FROM tab1 AS cor0
----
48
48
49

skipif mysql # not compatible
query I rowsort label-3594
SELECT 48 + - cor0.col0 / - col2 AS col0 FROM tab1 AS cor0
----
48
48
49

query I rowsort
SELECT col1 * - 31 FROM tab2 AS cor0
----
-1829
-527
-961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3596
SELECT - CAST( 72 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
-72
-72
-72

skipif mysql # not compatible
query I rowsort label-3596
SELECT - CAST ( 72 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-72
-72
-72

query I rowsort
SELECT ( col1 ) * - col0 AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + - 17 * + 90 * - col1 AS col0 FROM tab2 AS cor0
----
26010
47430
90270

query I rowsort
SELECT + - 3 AS col1 FROM tab0 AS cor0
----
-3
-3
-3

onlyif mysql # use DIV operator for integer division
query I rowsort label-3600
SELECT + 82 DIV + col1 FROM tab1 AS cor0
----
3
6
8

skipif mysql # not compatible
query I rowsort label-3600
SELECT + 82 / + col1 FROM tab1 AS cor0
----
3
6
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 37 + col1 * cor0.col2 col2 FROM tab1 cor0
----
1211
1367
533

query I rowsort
SELECT - + col1 + col2 * col2 AS col0 FROM tab1 AS cor0
----
2890
3239
9203

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col0 * + col1 + ( - col2 ) col2 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT ALL + ( + col0 ) + col0 * - 77 FROM tab1 AS cor0
----
-228
-4864
-6080

onlyif mysql # use DIV operator for integer division
query I rowsort label-3605
SELECT cor0.col1 DIV - col0 FROM tab1 AS cor0
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-3605
SELECT cor0.col1 / - col0 FROM tab1 AS cor0
----
-8
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3606
SELECT ALL 92 DIV col1 + 81 col1 FROM tab0 cor0
----
81
82
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3606
SELECT ALL 92 / col1 + 81 col1 FROM tab0 cor0
----
81
82
82

query I rowsort
SELECT ALL - cor0.col0 + - col2 * 51 * - col1 AS col0 FROM tab1 AS cor0
----
29006
63568
71601

query I rowsort
SELECT ALL cor0.col2 * cor0.col1 + + col2 * 38 FROM tab1 AS cor0
----
2736
3456
4896

onlyif mysql # use DIV operator for integer division
query I rowsort label-3609
SELECT + - col1 * + cor0.col2 + + ( - col1 ) * col0 DIV 4 AS col1 FROM tab0 AS cor0
----
-3354
-945
-9486

skipif mysql # not compatible
query I rowsort label-3609
SELECT + - col1 * + cor0.col2 + + ( - col1 ) * col0 / 4 AS col1 FROM tab0 AS cor0
----
-3354
-945
-9486

query I rowsort
SELECT DISTINCT + + col0 + + col2 AS col2 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT DISTINCT - + 55 * col2 AS col2 FROM tab1 AS cor0
----
-2970
-3135
-5280

query I rowsort
SELECT col2 * col1 + - 48 FROM tab0 AS cor0
----
2790
49
7414

onlyif mysql # use DIV operator for integer division
query I rowsort label-3613
SELECT ALL 16 * cor0.col1 DIV - col1 AS col1 FROM tab1 AS cor0
----
-16
-16
-16

skipif mysql # not compatible
query I rowsort label-3613
SELECT ALL 16 * cor0.col1 / - col1 AS col1 FROM tab1 AS cor0
----
-16
-16
-16

query I rowsort
SELECT - col0 + - col0 * 7 * + col2 + + col2 AS col1 FROM tab1 cor0
----
-1083
-25543
-53744

query I rowsort
SELECT DISTINCT + 32 AS col0 FROM tab2
----
32

query I rowsort
SELECT + - 68 - + 13 AS col0 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to d0bfe8494f52235d9fcafb5ac5de3f81

query I rowsort
SELECT ( - col2 ) + + col1 FROM tab0
----
53
9
96

query I rowsort
SELECT ALL + - ( cor0.col1 ) + - col0 AS col0 FROM tab0 AS cor0
----
-110
-132
-180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 31 col2 FROM tab0
----
-31
-31
-31

query I rowsort
SELECT DISTINCT + cor0.col0 + col0 * col1 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT + - 64 - col2 AS col2 FROM tab0 cor0
----
-146
-65
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3622
SELECT ALL col0 DIV - col1 + cor0.col1 AS col2 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-3622
SELECT ALL col0 / - col1 + cor0.col1 AS col2 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT tab1.col2 + col2 - 12 FROM tab1
----
102
180
96

query I rowsort
SELECT DISTINCT + 56 FROM tab0 AS cor0
----
56

query I rowsort
SELECT ALL ( + 13 ) + col1 * + ( col1 ) FROM tab0 AS cor0
----
7409
8294
9422

query I rowsort
SELECT DISTINCT + + 40 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
40

query I rowsort
SELECT cor0.col2 AS col2 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

onlyif mysql # use DIV operator for integer division
query I rowsort label-3628
SELECT DISTINCT col0 + col1 DIV col1 AS col1 FROM tab2
----
79
8
80

skipif mysql # not compatible
query I rowsort label-3628
SELECT DISTINCT col0 + col1 / col1 AS col1 FROM tab2
----
79
8
80

query I rowsort
SELECT col0 + - 16 AS col1 FROM tab0
----
19
73
8

query I rowsort
SELECT + ( 51 ) AS col2 FROM tab0
----
51
51
51

query I rowsort
SELECT + cor1.col2 AS col2 FROM tab2, tab2 cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT - 4 - 77 * + col1 * ( + col0 * - tab0.col2 ) FROM tab0
----
261411
51137082
5244620

query I rowsort
SELECT + 79 + col1 FROM tab1
----
105
89
92

query I rowsort
SELECT - ( 75 ) AS col1 FROM tab1
----
-75
-75
-75

onlyif mysql # use DIV operator for integer division
query I rowsort label-3635
SELECT ALL cor0.col0 DIV + 68 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3635
SELECT ALL cor0.col0 / + 68 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT ALL - 89 + - col2 * cor0.col2 AS col0 FROM tab2 cor0
----
-1533
-765
-818

query I rowsort
SELECT DISTINCT + col2 * - col1 * - col1 + ( + cor0.col2 ) * col2 AS col2 FROM tab0 AS cor0
----
245157
685766
9410

query I rowsort
SELECT ALL - col1 + 35 FROM tab0 AS cor0
----
-51
-56
-62

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col1 * - col2 AS col2 FROM tab1 AS cor0
----
16224
36504
5700

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col2 * + 70 col0 FROM tab2 AS cor0
----
1820
1890
2660

query I rowsort
SELECT cor0.col0 * + 40 AS col2 FROM tab2 AS cor0
----
280
3120
3160

query I rowsort
SELECT - - cor0.col2 * ( col1 + + col0 ) FROM tab1 AS cor0
----
1566
4218
8928

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3643
SELECT DISTINCT + col0 * - CAST( NULL AS SIGNED ) * - col1 AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3643
SELECT DISTINCT + col0 * - CAST ( NULL AS INTEGER ) * - col1 AS col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + col2 * ( + ( col2 ) ) AS col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ( + col1 ) * + col1 AS col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT cor0.col0 AS col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

onlyif mysql # use DIV operator for integer division
query I rowsort label-3647
SELECT ALL - + col1 DIV - 89 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3647
SELECT ALL - + col1 / - 89 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - 83 AS col1 FROM tab1 AS cor0
----
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-3649
SELECT + + col0 DIV col1 + 98 FROM tab2 AS cor0
----
102
98
99

skipif mysql # not compatible
query I rowsort label-3649
SELECT + + col0 / col1 + 98 FROM tab2 AS cor0
----
102
98
99

query I rowsort
SELECT ALL + 90 + col2 FROM tab0 AS cor0
----
123
172
91

query I rowsort
SELECT DISTINCT 96 FROM tab1, tab0 AS cor0
----
96

query I rowsort
SELECT + col0 + col1 * - col1 FROM tab1
----
-36
-673
-89

query I rowsort
SELECT DISTINCT 94 * - col2 FROM tab1
----
-5076
-5358
-9024

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3654
SELECT ALL + col2 + col2 / - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3654
SELECT ALL + col2 + col2 / - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ( - tab2.col0 ) + - col0 AS col1 FROM tab2
----
-14
-156
-158

onlyif mysql # use DIV operator for integer division
query I rowsort label-3656
SELECT DISTINCT - col0 DIV col2 AS col1 FROM tab0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-3656
SELECT DISTINCT - col0 / col2 AS col1 FROM tab0
----
-1
-35
0

query I rowsort
SELECT DISTINCT + 12 FROM tab1 cor0 CROSS JOIN tab1 AS cor1
----
12

query I rowsort
SELECT ALL + 71 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to c1aace5d5fe27721cc925552513c85c0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 51 col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 08d3853e39924d3c636260a6dd856837

query I rowsort
SELECT ALL cor0.col0 * 19 FROM tab1, tab2 AS cor0
----
9 values hashing to 699296a3061c930701cf2dc6d47c8cae

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3661
SELECT ALL - CAST( NULL AS DECIMAL ) AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3661
SELECT ALL - CAST ( NULL AS REAL ) AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3662
SELECT ALL CAST( NULL AS DECIMAL ) FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3662
SELECT ALL CAST ( NULL AS REAL ) FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + 51 col0 FROM tab0 AS cor0
----
140
75
86

query I rowsort
SELECT + ( 50 ) AS col0 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 314aace40e704c20a6be06204a329f80

query I rowsort
SELECT - ( tab2.col1 ) + col0 AS col2 FROM tab2
----
-24
19
62

query I rowsort
SELECT ALL + 33 + + col0 FROM tab2
----
111
112
40

query I rowsort
SELECT DISTINCT col0 * col1 + tab0.col1 AS col2 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT ALL - + ( col2 ) * cor0.col0 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - 61 * 14 AS col1 FROM tab1 AS cor0
----
-854

query I rowsort
SELECT - ( 41 ) * - col2 AS col0 FROM tab2 AS cor0
----
1066
1107
1558

query I rowsort
SELECT - 62 * col1 FROM tab2
----
-1054
-1922
-3658

query I rowsort
SELECT DISTINCT - col0 * 3 FROM tab0
----
-105
-267
-72

onlyif mysql # use DIV operator for integer division
query I rowsort label-3673
SELECT ALL col0 * cor0.col1 DIV + 92 AS col2 FROM tab0 AS cor0
----
22
36
88

skipif mysql # not compatible
query I rowsort label-3673
SELECT ALL col0 * cor0.col1 / + 92 AS col2 FROM tab0 AS cor0
----
22
36
88

query I rowsort
SELECT DISTINCT + - col2 + - cor0.col1 FROM tab2 AS cor0
----
-55
-58
-85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 98 * - col1 + - col2 col1 FROM tab2 AS cor0
----
-1704
-3065
-5808

onlyif mysql # use DIV operator for integer division
query I rowsort label-3676
SELECT + cor0.col1 DIV + col0 + + 71 * - col1 AS col0 FROM tab0 AS cor0
----
-6103
-6460
-6885

skipif mysql # not compatible
query I rowsort label-3676
SELECT + cor0.col1 / + col0 + + 71 * - col1 AS col0 FROM tab0 AS cor0
----
-6103
-6460
-6885

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 61 col0 FROM tab0 cor0
----
61
61
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col2 + + col0 col1 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT + col0 * col1 + + col0 AS col2 FROM tab0 cor0
----
2088
3430
8188

query I rowsort
SELECT - + col1 * - col2 AS col1 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT ALL - 45 AS col2 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 63e2b488a204f83ec8c063dafdfd4371

query I rowsort
SELECT ALL col1 * - col1 * + tab2.col0 AS col0 FROM tab2
----
-22831
-271518
-6727

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab2, tab0, tab0 AS cor0
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-3684
SELECT tab1.col1 DIV tab1.col0 FROM tab1
----
0
0
8

skipif mysql # not compatible
query I rowsort label-3684
SELECT tab1.col1 / tab1.col0 FROM tab1
----
0
0
8

query I rowsort
SELECT - col1 * + 63 FROM tab2 AS cor0
----
-1071
-1953
-3717

query I rowsort
SELECT DISTINCT + col2 * col0 * 42 AS col2 FROM tab0
----
1470
306516
33264

onlyif mysql # use DIV operator for integer division
query I rowsort label-3687
SELECT - col0 DIV - col0 - + col1 * col2 FROM tab0 AS cor0
----
-2837
-7461
-96

skipif mysql # not compatible
query I rowsort label-3687
SELECT - col0 / - col0 - + col1 * col2 FROM tab0 AS cor0
----
-2837
-7461
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 7 + col2 col0 FROM tab2 cor0
----
33
34
45

query I rowsort
SELECT + col1 * + col0 + + col0 * cor0.col2 * cor0.col2 FROM tab0 AS cor0
----
28200
3430
606535

query I rowsort
SELECT - - col1 * col2 + + col1 AS col1 FROM tab1 AS cor0
----
1261
1430
580

onlyif mysql # use DIV operator for integer division
query I rowsort label-3691
SELECT - col0 DIV 6 + - tab0.col1 * - 61 FROM tab0
----
5242
5537
5912

skipif mysql # not compatible
query I rowsort label-3691
SELECT - col0 / 6 + - tab0.col1 * - 61 FROM tab0
----
5242
5537
5912

query I rowsort
SELECT col1 * col1 + + col1 * + col2 FROM tab1
----
1417
2080
670

query I rowsort
SELECT DISTINCT + 84 * - 77 FROM tab0 AS cor0
----
-6468

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3694
SELECT + - CAST( NULL AS SIGNED ) + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3694
SELECT + - CAST ( NULL AS INTEGER ) + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + col1 + + col2 * col2 AS col0 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT - + 75 * col0 FROM tab0 AS cor0
----
-1800
-2625
-6675

query I rowsort
SELECT + ( col2 ) + + 96 * col1 AS col1 FROM tab1 cor0
----
1017
1344
2550

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * - col1 col2 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT + col1 + col0 * 61 FROM tab0 cor0
----
1550
2232
5520

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3700
SELECT - - 66 * + col0 + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3700
SELECT - - 66 * + col0 + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 30 * + cor0.col2 FROM tab1 AS cor0
----
-1620
-1710
-2880

onlyif mysql # use DIV operator for integer division
query I rowsort label-3702
SELECT col1 DIV 32 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3702
SELECT col1 / 32 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT ALL + col0 * + 79 FROM tab0 AS cor0
----
1896
2765
7031

query I rowsort
SELECT ALL - col0 * - 20 AS col1 FROM tab1 AS cor0
----
1280
1600
60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3705
SELECT ALL - + col2 * CAST( col1 AS SIGNED ) AS col2 FROM tab0 cor0
----
-2838
-7462
-97

skipif mysql # not compatible
query I rowsort label-3705
SELECT ALL - + col2 * CAST ( col1 AS INTEGER ) AS col2 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT + col0 * - 78 FROM tab0 AS cor0
----
-1872
-2730
-6942

onlyif mysql # use DIV operator for integer division
query I rowsort label-3707
SELECT cor0.col2 DIV 41 FROM tab1 cor0
----
1
1
2

skipif mysql # not compatible
query I rowsort label-3707
SELECT cor0.col2 / 41 FROM tab1 cor0
----
1
1
2

query I rowsort
SELECT ALL - - col2 * - 93 + col0 FROM tab0 AS cor0
----
-3045
-58
-7537

query I rowsort
SELECT DISTINCT col1 * ( - col0 ) AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * ( - cor0.col0 + cor0.col1 ) col0 FROM tab0 AS cor0
----
164
2046
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-3711
SELECT DISTINCT col2 DIV CAST( + col1 AS SIGNED ) FROM tab2 AS cor0
----
0
2

skipif mysql # not compatible
query I rowsort label-3711
SELECT DISTINCT col2 / CAST ( + col1 AS INTEGER ) FROM tab2 AS cor0
----
0
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-3712
SELECT ALL + - col1 * + cor0.col2 + - col2 DIV - col0 AS col1 FROM tab0 AS cor0
----
-2837
-7462
-97

skipif mysql # not compatible
query I rowsort label-3712
SELECT ALL + - col1 * + cor0.col2 + - col2 / - col0 AS col1 FROM tab0 AS cor0
----
-2837
-7462
-97

query I rowsort
SELECT ALL - col1 * - col0 AS col2 FROM tab0 cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col0 + ( col0 ) * - col0 col0 FROM tab1 AS cor0
----
-12
-4160
-6480

query I rowsort
SELECT + 23 - + 49 FROM tab1, tab0 AS cor0
----
9 values hashing to 47d0574274146de273829785364ada39

onlyif mysql # use DIV operator for integer division
query I rowsort label-3716
SELECT ALL - + col0 DIV ( + col2 * - col0 ) FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3716
SELECT ALL - + col0 / ( + col2 * - col0 ) FROM tab1 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 37 col1 FROM tab1 cor0
----
37
37
37

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col0 + + col0 * col1 col1 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT DISTINCT ( - 82 ) + col2 * cor0.col1 FROM tab1 AS cor0
----
1166
1322
488

query I rowsort
SELECT + col0 + ( - 87 + col1 ) AS col1 FROM tab0
----
23
45
93

query I rowsort
SELECT ALL tab1.col2 * - tab1.col1 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT ALL + 85 AS col1 FROM tab2 AS cor0
----
85
85
85

query I rowsort
SELECT DISTINCT - 82 + col1 FROM tab0 AS cor0
----
15
4
9

query I rowsort
SELECT + 54 + + col1 FROM tab2 AS cor0
----
113
71
85

query I rowsort
SELECT - 94 + col0 AS col1 FROM tab2 AS cor0
----
-15
-16
-87

query I rowsort
SELECT DISTINCT col2 * - col1 - 9 AS col1 FROM tab1 cor0
----
-1257
-1413
-579

query I rowsort
SELECT DISTINCT - col2 * tab0.col1 * col0 + 7 FROM tab0
----
-3388
-664111
-68105

query I rowsort
SELECT + col0 * + tab2.col0 - - col0 AS col2 FROM tab2
----
56
6162
6320

query I rowsort
SELECT ALL col1 * col2 + + 93 FROM tab1
----
1341
1497
663

query I rowsort
SELECT ALL col2 + tab0.col2 + col2 AS col1 FROM tab0
----
246
3
99

query I rowsort
SELECT DISTINCT 72 + + col1 * - ( tab1.col0 ) * - col0 FROM tab1
----
306
41032
83272

query I rowsort
SELECT DISTINCT + tab1.col1 * col1 * + ( col1 ) + col0 FROM tab1
----
1064
17579
2277

query I rowsort
SELECT ALL + + 64 * cor0.col2 AS col1 FROM tab0 AS cor0
----
2112
5248
64

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3734
SELECT DISTINCT + ( + cor0.col2 ) + 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-3734
SELECT DISTINCT + ( + cor0.col2 ) + col1 * + CAST ( NULL AS INTEGER ) col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + col1 * col0 + - col2 + 3 FROM tab1 AS cor0
----
27
586
947

query I rowsort
SELECT DISTINCT + 57 * + cor0.col0 AS col1 FROM tab2 AS cor0
----
399
4446
4503

query I rowsort
SELECT DISTINCT + + 38 AS col1 FROM tab1 AS cor0
----
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3738
SELECT - CAST( 14 AS SIGNED ) * col2 AS col1 FROM tab1 AS cor0
----
-1344
-756
-798

skipif mysql # not compatible
query I rowsort label-3738
SELECT - CAST ( 14 AS INTEGER ) * col2 AS col1 FROM tab1 AS cor0
----
-1344
-756
-798

query I rowsort
SELECT DISTINCT + 51 + col0 * col0 FROM tab1 AS cor0
----
4147
60
6451

query I rowsort
SELECT ALL - + 27 - - cor0.col2 FROM tab2 cor0
----
-1
0
11

query I rowsort
SELECT + col0 + col1 * col0 AS col1 FROM tab2 AS cor0
----
1422
224
4680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3742
SELECT col1 * CAST( NULL AS SIGNED ) AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3742
SELECT col1 * CAST ( NULL AS INTEGER ) AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col0 * 20 * cor0.col0 AS col2 FROM tab1 AS cor0
----
-128000
-180
-81920

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + col2 + 84 * cor0.col2 * - 15 col1 FROM tab1 AS cor0
----
-120851
-67960
-71753

query I rowsort
SELECT DISTINCT - col0 + + col1 * 14 AS col1 FROM tab1 AS cor0
----
102
361
76

query I rowsort
SELECT DISTINCT + cor0.col2 + col0 + + col2 * - col1 FROM tab0 AS cor0
----
-2781
-61
-7291

query I rowsort
SELECT ALL 40 AS col0 FROM tab1, tab1 cor0
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

query I rowsort
SELECT + - col2 * 20 + 49 + + col1 AS col2 FROM tab0 AS cor0
----
-1500
-525
126

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 - + cor0.col1 + + col0 col2 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT ALL col1 * 44 + + col0 AS col1 FROM tab1 AS cor0
----
1147
504
652

query I rowsort
SELECT + - 73 * + 62 AS col0 FROM tab1 AS cor0
----
-4526
-4526
-4526

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3753
SELECT DISTINCT - CAST( - col1 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-3753
SELECT DISTINCT - CAST ( - col1 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
17
31
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3754
SELECT ALL + CAST( NULL AS SIGNED ) + - ( cor0.col0 ) 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-3754
SELECT ALL + CAST ( NULL AS INTEGER ) + - ( cor0.col0 ) col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col0 * + ( col1 ) - + col0 * + col0 AS col1 FROM tab2 AS cor0
----
-10686
-266
-7584

query I rowsort
SELECT DISTINCT + ( col0 ) + cor0.col1 FROM tab1 cor0
----
29
74
93

query I rowsort
SELECT + col0 + col2 + - col0 * col0 FROM tab1
----
-3975
-6224
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + col1 * col0 * - col2 + col0 * - col0 * - tab1.col2 col1 FROM tab1
----
-3672
197049
514656

query I rowsort
SELECT ALL + col0 + + 9 * - col0 AS col2 FROM tab1
----
-24
-512
-640

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + col2 col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT 94 AS col2 FROM tab0 cor0 CROSS JOIN tab0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to d876bb0ae813b06a5ee497ecacf37ee6

query I rowsort
SELECT + tab1.col0 * tab1.col2 + col1 * - col1 AS col0 FROM tab1
----
-514
3548
7511

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3763
SELECT ALL - col1 * CAST( NULL AS SIGNED ) + - col0 * + col1 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3763
SELECT ALL - col1 * CAST ( NULL AS INTEGER ) + - col0 * + col1 AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 + - 69 * - 98 + + tab0.col1 AS col1 FROM tab0
----
6762
6762
6762

query I rowsort
SELECT DISTINCT - + cor0.col0 AS col2 FROM tab0, tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT 55 * + col2 AS col1 FROM tab1
----
2970
3135
5280

query I rowsort
SELECT col0 * ( col2 ) FROM tab2
----
189
2028
3002

query I rowsort
SELECT + - 98 + + col1 AS col0 FROM tab1 AS cor0
----
-72
-85
-88

query I rowsort
SELECT - ( + col1 * - col1 ) + 45 * 57 FROM tab2
----
2854
3526
6046

query I rowsort
SELECT ALL + col1 * - tab1.col2 AS col0 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT - 93 + - 59 AS col0 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 275a6c1b20c0fc55111ae949ef2a3e3d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * 58 col2 FROM tab1
----
-1508
-580
-754

query I rowsort
SELECT + + col0 - - ( + col2 ) FROM tab0 AS cor0
----
171
36
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3774
SELECT tab0.col2 + - col2 * + CAST( + col0 AS SIGNED ) FROM tab0
----
-34
-7216
-759

skipif mysql # not compatible
query I rowsort label-3774
SELECT tab0.col2 + - col2 * + CAST ( + col0 AS INTEGER ) FROM tab0
----
-34
-7216
-759

query I rowsort
SELECT DISTINCT 25 + col0 FROM tab2
----
103
104
32

query I rowsort
SELECT + cor0.col2 + - col1 AS col1 FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT - col1 + ( - ( + col0 ) * ( col1 ) ) AS col2 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT 84 FROM tab2, tab0 AS cor0, tab0, tab1 cor1
----
81 values hashing to 3c092ed1a99ddb5afc7049fd2b9427f9

query I rowsort
SELECT + 92 AS col2 FROM tab2, tab0 cor0
----
9 values hashing to 516fa45c8b06f9f67d6e500bfd435c1a

onlyif mysql # use DIV operator for integer division
query I rowsort label-3780
SELECT ALL - col1 * col0 DIV - col0 AS col1 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-3780
SELECT ALL - col1 * col0 / - col0 AS col1 FROM tab2
----
17
31
59

query I rowsort
SELECT ALL col1 + col0 + - cor0.col0 FROM tab1 AS cor0
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-3782
SELECT + col1 DIV - 57 - + col1 * - cor0.col1 col0 FROM tab2 AS cor0
----
289
3480
961

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3782
SELECT + col1 / - 57 - + col1 * - cor0.col1 col0 FROM tab2 AS cor0
----
289
3480
961

skipif mysql # not compatible
query I rowsort
SELECT col1 + CAST ( + ( - col2 ) AS REAL ) FROM tab1 AS cor0
----
-28
-47
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-3784
SELECT ALL cor0.col1 DIV 90 + + col2 * col0 AS col0 FROM tab2 AS cor0
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-3784
SELECT ALL cor0.col1 / 90 + + col2 * col0 AS col0 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3785
SELECT DISTINCT + + col0 - CAST( NULL AS SIGNED ) * - 36 * col2 AS col2 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3785
SELECT DISTINCT + + col0 - CAST ( NULL AS INTEGER ) * - 36 * col2 AS col2 FROM tab0 cor0
----
NULL

query I rowsort
SELECT ALL cor1.col2 AS col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 * + ( col2 ) + col0 col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT DISTINCT - ( 20 ) AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
-20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + col2 * col1 col2 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT + 5 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 6797d40099023779b89feb627d94a3e7

query I rowsort
SELECT DISTINCT + col0 * - col2 * 76 AS col0 FROM tab2
----
-14364
-154128
-228152

query I rowsort
SELECT col1 - 53 * col0 FROM tab1
----
-133
-3382
-4227

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col0 * - 78 col2 FROM tab2
----
-546
-6084
-6162

query I rowsort
SELECT - tab1.col1 + 21 AS col0 FROM tab1
----
-5
11
8

query I rowsort
SELECT col1 - ( col1 + - tab2.col2 ) FROM tab2
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-3796
SELECT - tab1.col0 DIV tab1.col1 + col0 FROM tab1
----
3
58
74

skipif mysql # not compatible
query I rowsort label-3796
SELECT - tab1.col0 / tab1.col1 + col0 FROM tab1
----
3
58
74

query I rowsort
SELECT col0 + + 98 FROM tab2
----
105
176
177

query I rowsort
SELECT + ( + tab1.col2 ) FROM tab1, tab2 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT 61 * - 18 AS col2 FROM tab1
----
-1098
-1098
-1098

query I rowsort
SELECT ALL - ( - col2 ) + + col1 + col0 * col1 AS col2 FROM tab0 AS cor0
----
2183
3493
8272

onlyif mysql # use DIV operator for integer division
query I rowsort label-3801
SELECT DISTINCT col0 DIV + col2 - col2 * col1 * - col0 FROM tab1 AS cor0
----
36481
4212
99840

skipif mysql # not compatible
query I rowsort label-3801
SELECT DISTINCT col0 / + col2 - col2 * col1 * - col0 FROM tab1 AS cor0
----
36481
4212
99840

query I rowsort
SELECT DISTINCT + col1 * - cor0.col2 - col1 FROM tab0 AS cor0
----
-194
-2924
-7553

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col0 ) * col0 col0 FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT + col0 * - ( - col0 ) AS col0 FROM tab1
----
4096
6400
9

query I rowsort
SELECT + 11 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 69116737f3f57e2e3273f6dbb04d036c

query I rowsort
SELECT ALL + ( tab0.col1 ) * col0 + - col0 AS col2 FROM tab0
----
2040
3360
8010

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3807
SELECT - CAST( + col0 * tab1.col2 AS SIGNED ) FROM tab1
----
-162
-3648
-7680

skipif mysql # not compatible
query I rowsort label-3807
SELECT - CAST ( + col0 * tab1.col2 AS INTEGER ) FROM tab1
----
-162
-3648
-7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3808
SELECT col0 * - col0 - + ( col0 ) * - tab1.col0 * + CAST( NULL AS DECIMAL ) AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3808
SELECT col0 * - col0 - + ( col0 ) * - tab1.col0 * + CAST ( NULL AS REAL ) AS col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col2 * col1 * - 1 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT - ( col1 + + tab2.col2 ) AS col1 FROM tab2
----
-55
-58
-85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 + + col0 col0 FROM tab0 AS cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-3812
SELECT + col2 DIV col2 AS col1 FROM tab0 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3812
SELECT + col2 / col2 AS col1 FROM tab0 cor0
----
1
1
1

query I rowsort
SELECT DISTINCT col0 * - tab1.col2 + 19 AS col1 FROM tab1
----
-143
-3629
-7661

query I rowsort
SELECT + 73 * + col2 FROM tab2
----
1898
1971
2774

query I rowsort
SELECT ALL + tab1.col1 + col1 * - col0 * 78 AS col0 FROM tab1
----
-49910
-6058
-81107

query I rowsort
SELECT col1 + tab0.col2 AS col1 FROM tab0
----
119
173
98

query I rowsort
SELECT DISTINCT + 63 * col2 + ( ( tab0.col1 ) ) AS col0 FROM tab0
----
160
2165
5257

query I rowsort
SELECT DISTINCT - 13 * tab0.col1 AS col2 FROM tab0, tab2, tab1 AS cor0
----
-1118
-1183
-1261

query I rowsort
SELECT ALL 7 + + col2 FROM tab1
----
103
61
64

query I rowsort
SELECT ALL - col1 * cor0.col2 AS col2 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT - ( col2 ) * ( - col1 ) FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT 69 * cor0.col2 FROM tab0 AS cor0
----
2277
5658
69

query I rowsort
SELECT + + 19 * col2 + 19 * 80 AS col2 FROM tab1 AS cor0
----
2546
2603
3344

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 48 col2 FROM tab0
----
48
48
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * + 8 * cor1.col1 - - 54 col0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 9863c443476f918f01f99b20cb171ee3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * col1 + col2 col1 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT ALL col2 + ( ( + col0 ) ) * - 11 * - 21 FROM tab0 AS cor0
----
20641
5577
8086

query I rowsort
SELECT ALL col0 * + 92 + + 98 * col0 + - cor0.col2 AS col0 FROM tab2 cor0
----
1303
14794
14972

query I rowsort
SELECT - cor0.col1 + + 32 FROM tab0 AS cor0
----
-54
-59
-65

query I rowsort
SELECT DISTINCT - - col0 * col1 + + col1 AS col2 FROM tab0 AS cor0
----
2150
3492
8190

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3831
SELECT + - col1 * CAST( 97 + - col0 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
-1121
-2790
-306

skipif mysql # not compatible
query I rowsort label-3831
SELECT + - col1 * CAST ( 97 + - col0 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-1121
-2790
-306

query I rowsort
SELECT - cor0.col1 * cor0.col2 * + 0 AS col0 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3833
SELECT DISTINCT - col2 * col2 * + cor0.col0 + col0 DIV col1 AS col1 FROM tab2 AS cor0
----
-114072
-5103
-52727

skipif mysql # not compatible
query I rowsort label-3833
SELECT DISTINCT - col2 * col2 * + cor0.col0 + col0 / col1 AS col1 FROM tab2 AS cor0
----
-114072
-5103
-52727

query I rowsort
SELECT ALL - col0 * col0 + col2 * col1 * 33 FROM tab2 cor0
----
15077
27572
44538

query I rowsort
SELECT ALL - + col2 + - col0 * - col0 AS col2 FROM tab0 AS cor0
----
1224
543
7839

onlyif mysql # use DIV operator for integer division
query I rowsort label-3836
SELECT DISTINCT - cor0.col0 DIV - cor0.col2 + col1 + cor0.col1 AS col2 FROM tab0 AS cor0
----
172
183
229

skipif mysql # not compatible
query I rowsort label-3836
SELECT DISTINCT - cor0.col0 / - cor0.col2 + col1 + cor0.col1 AS col2 FROM tab0 AS cor0
----
172
183
229

query I rowsort
SELECT DISTINCT + col1 + + col2 AS col2 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT DISTINCT - col1 - - col0 * col0 FROM tab2 AS cor0
----
18
6025
6224

query I rowsort
SELECT - 79 * cor0.col1 FROM tab2 AS cor0
----
-1343
-2449
-4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-3840
SELECT - col2 * col1 - - col0 DIV + col2 AS col2 FROM tab0 AS cor0
----
-2838
-62
-7461

skipif mysql # not compatible
query I rowsort label-3840
SELECT - col2 * col1 - - col0 / + col2 AS col2 FROM tab0 AS cor0
----
-2838
-62
-7461

query I rowsort
SELECT + + ( - cor0.col0 ) * - col2 AS col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT - col2 + 8 FROM tab1
----
-46
-49
-88

query I rowsort
SELECT - 81 AS col1 FROM tab0, tab2 AS cor0 CROSS JOIN tab1
----
27 values hashing to d0bfe8494f52235d9fcafb5ac5de3f81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - 44 col0 FROM tab0
----
-20
-9
45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3845
SELECT - - CAST( + cor0.col2 AS SIGNED ) - col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3845
SELECT - - CAST ( + cor0.col2 AS INTEGER ) - col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - 71 * - col2 + col1 * col1 AS col0 FROM tab2 cor0
----
2878
2987
5327

query I rowsort
SELECT ALL - - 16 FROM tab2 AS cor0
----
16
16
16

onlyif mysql # use DIV operator for integer division
query I rowsort label-3848
SELECT + cor0.col2 DIV 45 AS col0 FROM tab1 AS cor0
----
1
1
2

skipif mysql # not compatible
query I rowsort label-3848
SELECT + cor0.col2 / 45 AS col0 FROM tab1 AS cor0
----
1
1
2

query I rowsort
SELECT ALL + 10 * - col2 AS col0 FROM tab1 AS cor0
----
-540
-570
-960

query I rowsort
SELECT + - col2 * cor0.col0 + cor0.col1 * 35 * - col0 AS col1 FROM tab2 AS cor0
----
-163098
-50007
-7784

onlyif mysql # use DIV operator for integer division
query I rowsort label-3851
SELECT + - ( 11 ) * + col0 - CAST( + ( - col1 ) AS SIGNED ) DIV 32 AS col0 FROM tab2 AS cor0
----
-77
-857
-869

skipif mysql # not compatible
query I rowsort label-3851
SELECT + - ( 11 ) * + col0 - CAST ( + ( - col1 ) AS INTEGER ) / 32 AS col0 FROM tab2 AS cor0
----
-77
-857
-869

query I rowsort
SELECT ALL + - col1 + cor0.col1 * + ( 61 + col2 ) AS col0 FROM tab2 cor0
----
1666
2697
5074

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + col1 * ( + col1 * + cor0.col0 ) col0 FROM tab0 AS cor0
----
177480
329280
736920

query I rowsort
SELECT + col2 + col2 * ( cor0.col1 ) * col0 FROM tab0 AS cor0
----
3396
664200
68145

onlyif mysql # use DIV operator for integer division
query I rowsort label-3855
SELECT ALL col0 * + cor0.col2 + + 73 DIV col1 + col2 FROM tab2 cor0
----
2055
218
3044

skipif mysql # not compatible
query I rowsort label-3855
SELECT ALL col0 * + cor0.col2 + + 73 / col1 + col2 FROM tab2 cor0
----
2055
218
3044

query I rowsort
SELECT ALL - 54 * cor0.col1 AS col2 FROM tab0 AS cor0
----
-4644
-4914
-5238

onlyif mysql # use DIV operator for integer division
query I rowsort label-3857
SELECT + ( - col0 ) DIV + col0 AS col2 FROM tab2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3857
SELECT + ( - col0 ) / + col0 AS col2 FROM tab2
----
-1
-1
-1

query I rowsort
SELECT ALL - tab2.col0 - col2 FROM tab2
----
-104
-117
-34

query I rowsort
SELECT - 14 * + col0 + col1 + 41 FROM tab1 AS cor0
----
-1066
-845
25

query I rowsort
SELECT - 16 + + col0 AS col2 FROM tab1 AS cor0
----
-13
48
64

query I rowsort
SELECT + col1 + 96 * - col2 AS col1 FROM tab1 AS cor0
----
-5158
-5462
-9203

query I rowsort
SELECT + 48 * + col0 + + col0 * + ( col1 + - col0 ) * - ( col2 ) AS col2 FROM tab2 AS cor0
----
-4200
189916
42276

query I rowsort
SELECT col2 + 58 FROM tab0
----
140
59
91

query I rowsort
SELECT ALL tab0.col0 + col0 * - 18 + col2 * col1 * col0 AS col2 FROM tab0
----
2800
662605
67704

query I rowsort
SELECT ALL col1 + - col2 + + tab1.col1 * tab1.col0 AS col1 FROM tab1
----
50
593
957

query I rowsort
SELECT DISTINCT 24 AS col2 FROM tab2, tab2 AS cor0
----
24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3867
SELECT + - CAST( NULL AS SIGNED ) * + 40 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3867
SELECT + - CAST ( NULL AS INTEGER ) * + 40 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - ( ( col2 ) ) * 35 FROM tab1 cor0
----
1890
1995
3360

query I rowsort
SELECT ALL 3 * col1 + - col2 AS col1 FROM tab2 AS cor0
----
13
151
66

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( col2 AS REAL ) * - cor0.col0 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + 49 AS col1 FROM tab1 cor0
----
49
49
49

onlyif mysql # use DIV operator for integer division
query I rowsort label-3872
SELECT DISTINCT col2 + ( col0 + + col0 ) DIV col1 col2 FROM tab1 AS cor0
----
108
54
69

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3872
SELECT DISTINCT col2 + ( col0 + + col0 ) / col1 col2 FROM tab1 AS cor0
----
108
54
69

query I rowsort
SELECT col2 + col2 + ( tab2.col2 ) FROM tab2
----
114
78
81

query I rowsort
SELECT DISTINCT 21 * ( cor0.col0 ) AS col2 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
1869
504
735

onlyif mysql # use DIV operator for integer division
query I rowsort label-3875
SELECT + col1 DIV col2 AS col0 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3875
SELECT + col1 / col2 AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL - - cor0.col0 + + cor0.col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT DISTINCT 20 * cor0.col2 AS col0 FROM tab2 AS cor0
----
520
540
760

query I rowsort
SELECT - ( - col1 ) * col0 + + cor0.col2 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT col0 - - col0 * col2 AS col2 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT 41 * col2 AS col1 FROM tab2 AS cor0
----
1066
1107
1558

query I rowsort
SELECT ALL 9 AS col2 FROM tab0 AS cor0
----
9
9
9

query I rowsort
SELECT ALL - col0 * - col1 + ( - col2 + col1 * - col2 ) FROM tab0 AS cor0
----
-807
3297
555

onlyif mysql # use DIV operator for integer division
query I rowsort label-3883
SELECT DISTINCT - + 41 * col2 DIV col2 + - ( col0 ) - ( col2 ) FROM tab1 AS cor0
----
-162
-217
-98

skipif mysql # not compatible
query I rowsort label-3883
SELECT DISTINCT - + 41 * col2 / col2 + - ( col0 ) - ( col2 ) FROM tab1 AS cor0
----
-162
-217
-98

query I rowsort
SELECT - ( + cor1.col0 ) FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3885
SELECT - col0 DIV - 85 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3885
SELECT - col0 / - 85 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + - cor0.col2 + 27 AS col1 FROM tab1 AS cor0
----
-27
-30
-69

query I rowsort
SELECT tab1.col1 * - ( 49 ) * col2 FROM tab1
----
-27930
-61152
-68796

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3888
SELECT - cor1.col0 + cor0.col0 / CAST( NULL AS DECIMAL ) FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-3888
SELECT - cor1.col0 + cor0.col0 / CAST ( NULL AS REAL ) FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # use DIV operator for integer division
query I rowsort label-3889
SELECT col2 DIV + 14 FROM tab1
----
3
4
6

skipif mysql # not compatible
query I rowsort label-3889
SELECT col2 / + 14 FROM tab1
----
3
4
6

query I rowsort
SELECT col0 * col0 + col1 FROM tab1 AS cor0
----
35
4106
6413

query I rowsort
SELECT DISTINCT + 25 + - 58 AS col2 FROM tab1, tab2 cor0
----
-33

query I rowsort
SELECT - + cor0.col0 * + 13 AS col0 FROM tab1 AS cor0
----
-1040
-39
-832

query I rowsort
SELECT cor0.col0 - col0 * - col2 AS col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT + - col2 + - ( 27 ) AS col1 FROM tab1 AS cor0
----
-123
-81
-84

onlyif mysql # use DIV operator for integer division
query I rowsort label-3895
SELECT col0 * col2 + col2 * + col1 DIV cor0.col1 AS col0 FROM tab1 cor0
----
216
3705
7776

skipif mysql # not compatible
query I rowsort label-3895
SELECT col0 * col2 + col2 * + col1 / cor0.col1 AS col0 FROM tab1 cor0
----
216
3705
7776

query I rowsort
SELECT - + col0 + 51 FROM tab2 AS cor0
----
-27
-28
44

query I rowsort
SELECT col2 * + col0 AS col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT - - col2 + col2 * - col2 AS col0 FROM tab0 AS cor0
----
-1056
-6642
0

query I rowsort
SELECT ALL - col1 - + 77 FROM tab0 AS cor0
----
-163
-168
-174

query I rowsort
SELECT - cor0.col2 * col2 + + col2 FROM tab1 AS cor0
----
-2862
-3192
-9120

query I rowsort
SELECT DISTINCT - + col1 + 27 * col2 * col0 FROM tab0 AS cor0
----
196955
21298
848

query I rowsort
SELECT + col1 + col0 * 44 * + col0 FROM tab1 AS cor0
----
180234
281613
422

query I rowsort
SELECT - 53 + - col2 AS col1 FROM tab0
----
-135
-54
-86

query I rowsort
SELECT - ( - col2 ) * - ( col0 * col0 ) FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT - cor0.col2 * cor0.col0 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT + cor0.col0 * - 55 AS col0 FROM tab2 AS cor0
----
-385
-4290
-4345

query I rowsort
SELECT col1 * + 6 AS col0 FROM tab1 AS cor0
----
156
60
78

query I rowsort
SELECT - - col0 + 11 FROM tab2 AS cor0
----
18
89
90

query I rowsort
SELECT DISTINCT - 58 FROM tab2, tab0, tab2 AS cor0, tab1
----
-58

query I rowsort
SELECT ALL + tab2.col1 + ( col2 + col2 ) AS col0 FROM tab2
----
111
85
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 11 + col1 + - col0 col1 FROM tab0
----
-9
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 2 + - col2 + col0 col1 FROM tab2 AS cor0
----
-18
43
54

query I rowsort
SELECT DISTINCT + col0 + 37 AS col1 FROM tab1 AS cor0
----
101
117
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * - 51 + - cor0.col1 col2 FROM tab2 AS cor0
----
-1385
-1408
-1955

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 AS cor0, tab1 cor1, tab0 AS cor2
----
972 values hashing to 5342fb4caf4767cb98bd21989bad099f

query I rowsort
SELECT - + 55 * 90 FROM tab1 AS cor0
----
-4950
-4950
-4950

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col2 * col2 + + 14 col0 FROM tab2 cor0
----
-1430
-662
-715

onlyif mysql # use DIV operator for integer division
query I rowsort label-3918
SELECT DISTINCT - col1 DIV + col1 - - 8 AS col0 FROM tab2 cor0
----
7

skipif mysql # not compatible
query I rowsort label-3918
SELECT DISTINCT - col1 / + col1 - - 8 AS col0 FROM tab2 cor0
----
7

query I rowsort
SELECT ALL + - col2 * + col1 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL col2 * + col1 + ( ( - col2 ) * 62 ) FROM tab1 AS cor0
----
-1944
-2964
-4704

query I rowsort
SELECT ALL - 50 + + col0 FROM tab2 AS cor0
----
-43
28
29

query I rowsort
SELECT DISTINCT - 49 * - col0 AS col2 FROM tab2 AS cor0
----
343
3822
3871

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 68 col1 FROM tab0 AS cor0
----
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * - col2 col0 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT - - cor0.col0 + + col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL - col1 + col2 * + 31 * - cor0.col1 + - col2 AS col2 FROM tab1 AS cor0
----
-17737
-38797
-43604

query I rowsort
SELECT ALL + tab0.col0 + + tab0.col1 FROM tab0
----
110
132
180

query I rowsort
SELECT ALL + ( - col2 ) * - col1 + + ( col0 ) AS col1 FROM tab2
----
1612
725
844

query I rowsort
SELECT + cor1.col1 * 48 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 06c49cfe438ebf5a9e962e5338b69098

onlyif mysql # use DIV operator for integer division
query I rowsort label-3930
SELECT + + col1 + ( - cor0.col0 ) DIV col0 FROM tab1 AS cor0
----
12
25
9

skipif mysql # not compatible
query I rowsort label-3930
SELECT + + col1 + ( - cor0.col0 ) / col0 FROM tab1 AS cor0
----
12
25
9

query I rowsort
SELECT ALL + + cor0.col1 * col2 AS col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + + col0 * + 67 + col2 AS col2 FROM tab1 AS cor0
----
255
4345
5456

query I rowsort
SELECT - col0 + - col0 * ( + cor0.col2 + - cor0.col0 ) * 10 FROM tab0 AS cor0
----
-2184
11865
6141

query I rowsort
SELECT + cor0.col2 + + 54 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 0245262ed0594744c28c33742d45f5c4

query I rowsort
SELECT - + col1 * col0 * col0 + + col1 AS col1 FROM tab0 cor0
----
-118728
-49450
-720720

query I rowsort
SELECT - col1 - ( - col1 ) * col2 AS col1 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT + col2 + - 87 FROM tab1 AS cor0
----
-30
-33
9

query I rowsort
SELECT col1 + 89 AS col0 FROM tab0 AS cor0
----
175
180
186

query I rowsort
SELECT - - col0 * - ( + col0 ) AS col1 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT - col0 * col1 - col0 * - col0 * 10 FROM tab2
----
273
56238
61067

query I rowsort
SELECT col2 - ( + 96 ) AS col1 FROM tab1
----
-39
-42
0

query I rowsort
SELECT - col0 + 66 FROM tab1 AS cor0
----
-14
2
63

query I rowsort
SELECT DISTINCT - 93 + + 20 FROM tab0 AS cor0
----
-73

onlyif mysql # use DIV operator for integer division
query I rowsort label-3944
SELECT ALL ( col0 ) DIV + col2 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-3944
SELECT ALL ( col0 ) / + col2 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT + 27 + 66 AS col2 FROM tab0 cor0
----
93
93
93

query I rowsort
SELECT DISTINCT - col1 * - 5 + + col1 AS col2 FROM tab2 AS cor0
----
102
186
354

onlyif mysql # use DIV operator for integer division
query I rowsort label-3947
SELECT DISTINCT + - col2 DIV + 22 AS col0 FROM tab2 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-3947
SELECT DISTINCT + - col2 / + 22 AS col0 FROM tab2 AS cor0
----
-1

query I rowsort
SELECT - ( 14 ) * col0 + cor0.col0 * cor0.col1 + col2 FROM tab0 AS cor0
----
1761
2906
6935

onlyif mysql # use DIV operator for integer division
query I rowsort label-3949
SELECT + col1 DIV 34 FROM tab0 AS cor0
----
2
2
2

skipif mysql # not compatible
query I rowsort label-3949
SELECT + col1 / 34 FROM tab0 AS cor0
----
2
2
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 76 + - col2 + - col2 col1 FROM tab1 AS cor0
----
-184
-190
-268

query I rowsort
SELECT DISTINCT col1 * - col0 - 57 * - col0 FROM tab0
----
-1400
-3026
-696

query I rowsort
SELECT ALL tab2.col0 + - col1 AS col2 FROM tab2
----
-24
19
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + col0 col1 FROM tab2
----
-20
41
52

query I rowsort
SELECT ALL 36 FROM tab0, tab1 cor0 CROSS JOIN tab1, tab2 AS cor1
----
81 values hashing to e09b197365a04fabbaaf0718d2ae88c5

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab2 AS cor2
----
3645 values hashing to 61c64d7c972af4105004f57e1913df08

query I rowsort
SELECT ( - 34 ) + - col2 FROM tab0 AS cor0
----
-116
-35
-67

query I rowsort
SELECT DISTINCT - + ( col2 ) + cor0.col1 - + col1 AS col2 FROM tab2 cor0
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-3958
SELECT DISTINCT - col0 DIV + col0 col2 FROM tab1 cor0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3958
SELECT DISTINCT - col0 / + col0 col2 FROM tab1 cor0
----
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3959
SELECT ALL col2 DIV - col1 + cor0.col1 * col1 FROM tab0 AS cor0
----
7396
8281
9409

skipif mysql # not compatible
query I rowsort label-3959
SELECT ALL col2 / - col1 + cor0.col1 * col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT ( - 95 ) * col0 FROM tab0 AS cor0
----
-2280
-3325
-8455

query I rowsort
SELECT + + 39 + - col1 FROM tab0 cor0
----
-47
-52
-58

query I rowsort
SELECT ALL - - col2 * + col1 * col1 + - col1 AS col1 FROM tab1 AS cor0
----
16211
36478
5690

query I rowsort
SELECT DISTINCT + col1 + col2 * + col2 FROM tab0 AS cor0
----
1175
6815
98

query I rowsort
SELECT + + col1 * - col2 AS col1 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL + + 76 * col1 + - col1 AS col0 FROM tab0 AS cor0
----
6450
6825
7275

query I rowsort
SELECT DISTINCT + col1 * + 47 AS col2 FROM tab0 AS cor0
----
4042
4277
4559

onlyif mysql # use DIV operator for integer division
query I rowsort label-3967
SELECT + col2 DIV col1 + 69 * col0 * col1 AS col1 FROM tab1
----
44165
5384
71767

skipif mysql # not compatible
query I rowsort label-3967
SELECT + col2 / col1 + 69 * col0 * col1 AS col1 FROM tab1
----
44165
5384
71767

query I rowsort
SELECT 93 AS col2 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

query I rowsort
SELECT 58 + - 0 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to ef6e63aeed2581a168f07646d258f666

query I rowsort
SELECT - 88 * - col0 * col1 FROM tab2 AS cor0
----
118184
19096
404976

query I rowsort
SELECT DISTINCT cor0.col1 * col2 + col1 * + col2 FROM tab0 AS cor0
----
14924
194
5676

query I rowsort
SELECT ALL col1 * col2 * + 51 FROM tab2 AS cor0
----
32946
42687
78234

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 95 col1 FROM tab2, tab1 AS cor0
----
9 values hashing to e57d8ed879dfd04d04aae87725c970d3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3974
SELECT + col0 - - CAST( NULL AS DECIMAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3974
SELECT + col0 - - CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - col1 * + col2 + - cor0.col0 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT ALL + col2 + 17 FROM tab0 AS cor0
----
18
50
99

query I rowsort
SELECT cor0.col0 * col2 + - col0 * cor0.col2 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col0 + + col2 + col2 FROM tab1 AS cor0
----
111
178
272

query I rowsort
SELECT DISTINCT 42 * - col1 FROM tab1 AS cor0
----
-1092
-420
-546

onlyif mysql # use DIV operator for integer division
query I rowsort label-3980
SELECT - ( + col2 ) DIV col1 + + 56 + col1 FROM tab2 AS cor0
----
115
71
87

skipif mysql # not compatible
query I rowsort label-3980
SELECT - ( + col2 ) / col1 + + 56 + col1 FROM tab2 AS cor0
----
115
71
87

query I rowsort
SELECT - 27 * col2 AS col0 FROM tab1 AS cor0
----
-1458
-1539
-2592

query I rowsort
SELECT - ( + col0 ) * col0 AS col2 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT col1 + + cor0.col0 + + ( 64 ) AS col1 FROM tab2 AS cor0
----
102
160
201

query I rowsort
SELECT DISTINCT - 22 * + col0 FROM tab1 AS cor0
----
-1408
-1760
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + + col1 * - col1 col0 FROM tab1 AS cor0
----
-43
-622
-73

query I rowsort
SELECT + cor0.col1 * col0 - + 28 FROM tab1 cor0
----
1012
50
612

query I rowsort
SELECT + ( + col2 ) * - tab2.col2 + 10 * + col1 AS col2 FROM tab2
----
-1274
-419
-86

query I rowsort
SELECT ( - col0 ) + - tab1.col1 + + 19 * col1 FROM tab1
----
116
154
465

query I rowsort
SELECT col0 * - col2 - + ( cor0.col2 + - col0 ) FROM tab1 AS cor0
----
-213
-3641
-7696

query I rowsort
SELECT + + 40 * + col2 AS col0 FROM tab1 cor0
----
2160
2280
3840

query I rowsort
SELECT - 57 * + col2 * - col2 AS col0 FROM tab0 AS cor0
----
383268
57
62073

query I rowsort
SELECT 47 * + col2 - + cor0.col1 FROM tab1 AS cor0
----
2512
2669
4499

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 23 + + col2 col0 FROM tab2
----
15
3
4

query I rowsort
SELECT - col0 + - col1 + + cor0.col0 FROM tab2 AS cor0
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-3995
SELECT ALL 73 DIV tab0.col0 AS col1 FROM tab0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-3995
SELECT ALL 73 / tab0.col0 AS col1 FROM tab0
----
0
2
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-3996
SELECT DISTINCT + 94 DIV + 69 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-3996
SELECT DISTINCT + 94 / + 69 FROM tab0 AS cor0
----
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3997
SELECT ALL - 26 + + 60 - col2 * col2 DIV col2 FROM tab0 AS cor0
----
-48
1
33

skipif mysql # not compatible
query I rowsort label-3997
SELECT ALL - 26 + + 60 - col2 * col2 / col2 FROM tab0 AS cor0
----
-48
1
33

query I rowsort
SELECT DISTINCT - + 90 * + col0 FROM tab1 AS cor0
----
-270
-5760
-7200

query I rowsort
SELECT ALL - 2 + - col2 AS col2 FROM tab0
----
-3
-35
-84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4000
SELECT DISTINCT CAST( NULL AS SIGNED ) * col0 + + col1 * col1 * 8 AS col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-4000
SELECT DISTINCT CAST ( NULL AS INTEGER ) * col0 + + col1 * col1 * 8 AS col0 FROM tab0
----
NULL

query I rowsort
SELECT ALL + col0 + col0 * - col1 + + ( - tab2.col2 + + col1 ) FROM tab2
----
-1285
-206
-4491

query I rowsort
SELECT ALL + col2 * col1 + col2 + col0 AS col2 FROM tab1 cor0
----
1424
1461
691

query I rowsort
SELECT ALL - col1 * - cor0.col2 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL - 17 * + col0 AS col0 FROM tab1
----
-1088
-1360
-51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 18 col1 FROM tab1
----
18
18
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-4006
SELECT + ( col0 ) DIV + col0 FROM tab0 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4006
SELECT + ( col0 ) / + col0 FROM tab0 cor0
----
1
1
1

query I rowsort
SELECT + ( + 79 ) FROM tab1 AS cor0
----
79
79
79

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - 33 AS REAL ) AS col0 FROM tab0
----
-33
-33
-33

query I rowsort
SELECT 3 + + tab0.col0 FROM tab0, tab2 AS cor0
----
9 values hashing to e4a81ef5dcdfa05aa414597d9772de62

query I rowsort
SELECT DISTINCT - 59 - col1 FROM tab2 cor0
----
-118
-76
-90

query I rowsort
SELECT DISTINCT ( col2 ) * - col1 * 64 FROM tab2
----
-41344
-53568
-98176

query I rowsort
SELECT + 65 + + col0 AS col2 FROM tab0 AS cor0
----
100
154
89

query I rowsort
SELECT - - col0 * - cor0.col2 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * + col2 col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL - 9 AS col0 FROM tab0, tab2 cor0
----
9 values hashing to caf28657beb43049740febe1fa9ded5a

query I rowsort
SELECT DISTINCT - col2 * col0 * + 97 FROM tab2
----
-18333
-196716
-291194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col2 * 75 + cor0.col2 col1 FROM tab1 AS cor0
----
4104
4332
7296

query I rowsort
SELECT + col0 + - ( + col0 * cor0.col1 ) + col2 FROM tab2 AS cor0
----
-1226
-183
-4498

query I rowsort
SELECT ALL - col2 + + 18 * col1 AS col1 FROM tab0 AS cor0
----
1515
1556
1745

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( 10 AS REAL ) FROM tab2 AS cor0
----
-10
-10
-10

query I rowsort
SELECT - tab2.col0 + + ( + tab2.col0 ) AS col0 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4022
SELECT - tab2.col1 DIV 8 + 81 FROM tab2
----
74
78
79

skipif mysql # not compatible
query I rowsort label-4022
SELECT - tab2.col1 / 8 + 81 FROM tab2
----
74
78
79

query I rowsort
SELECT - tab0.col1 + tab0.col1 * col2 AS col0 FROM tab0
----
0
2752
7371

query I rowsort
SELECT DISTINCT tab2.col2 * ( - 98 ) AS col1 FROM tab2, tab2 AS cor0
----
-2548
-2646
-3724

query I rowsort
SELECT tab1.col1 - col2 AS col2 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT - col2 * col1 * - 28 + col1 FROM tab1 cor0
----
15970
34957
39338

query I rowsort
SELECT ALL ( cor1.col0 * ( 2 ) ) FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 7ce85f3c0cc2feeac41619efbad0a8a1

query I rowsort
SELECT DISTINCT - col1 + col2 * col1 FROM tab0
----
0
2752
7371

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( 10 ) col1 FROM tab2, tab2 AS cor0
----
9 values hashing to a47194429f3e0358a3aebffd5f050113

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4030
SELECT ALL - col2 * - CAST( col0 AS SIGNED ) + col1 FROM tab0 AS cor0
----
132
7389
878

skipif mysql # not compatible
query I rowsort label-4030
SELECT ALL - col2 * - CAST ( col0 AS INTEGER ) + col1 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT col2 + + 79 * col2 FROM tab1 AS cor0
----
4320
4560
7680

query I rowsort
SELECT DISTINCT col2 * col2 + col1 AS col2 FROM tab0 AS cor0
----
1175
6815
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 15 col0 FROM tab0, tab0 AS cor0
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

query I rowsort
SELECT - col1 * - col1 + - col2 * col1 * + col2 AS col1 FROM tab2 AS cor0
----
-21638
-24259
-36403

onlyif mysql # use DIV operator for integer division
query I rowsort label-4035
SELECT DISTINCT + col0 + - ( - col1 ) DIV + col0 AS col1 FROM tab1 AS cor0
----
11
64
80

skipif mysql # not compatible
query I rowsort label-4035
SELECT DISTINCT + col0 + - ( - col1 ) / + col0 AS col1 FROM tab1 AS cor0
----
11
64
80

query I rowsort
SELECT + col0 - 35 AS col1 FROM tab1
----
-32
29
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-4037
SELECT col2 + col1 DIV tab0.col1 AS col1 FROM tab0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-4037
SELECT col2 + col1 / tab0.col1 AS col1 FROM tab0
----
2
34
83

query I rowsort
SELECT - 12 + cor0.col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 2e42683502b060b08d89265a330d6897

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col0 col2 FROM tab2, tab1 cor0
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

query I rowsort
SELECT DISTINCT 28 * + col1 * + col1 AS col2 FROM tab1
----
18928
2800
4732

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( ( col1 ) ) * + tab2.col1 col1 FROM tab2
----
289
3481
961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + - cor0.col2 col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab2, tab2 AS cor0, tab0 cor1, tab1 AS cor2
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 81 * 67 col2 FROM tab0 AS cor0
----
-5427
-5427
-5427

query I rowsort
SELECT - + ( - col0 ) + - col1 AS col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT - col1 * col2 - - 22 AS col2 FROM tab0 AS cor0
----
-2816
-7440
-75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 10 col1 FROM tab0 cor0
----
10
10
10

query I rowsort
SELECT ALL - 4 * col1 AS col0 FROM tab2 cor0
----
-124
-236
-68

query I rowsort
SELECT DISTINCT + cor0.col0 * - cor0.col1 + cor0.col1 + 14 FROM tab0 AS cor0
----
-1964
-3284
-7994

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4050
SELECT DISTINCT - - col0 + - col0 * CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4050
SELECT DISTINCT - - col0 + - col0 * CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - 66 + + col0 * col0 * cor0.col1 FROM tab1 cor0
----
168
40894
83134

query I rowsort
SELECT - 78 * 1 + col0 * 88 FROM tab1
----
186
5554
6962

query I rowsort
SELECT col2 * - ( col2 ) AS col0 FROM tab2
----
-1444
-676
-729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 99 * cor0.col1 col2 FROM tab2 AS cor0
----
-1683
-3069
-5841

query I rowsort
SELECT DISTINCT + cor0.col1 * - col1 AS col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-4056
SELECT DISTINCT - - 43 DIV col1 AS col0 FROM tab2 cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-4056
SELECT DISTINCT - - 43 / col1 AS col0 FROM tab2 cor0
----
0
1
2

query I rowsort
SELECT 91 * col2 FROM tab1
----
4914
5187
8736

query I rowsort
SELECT col0 + col0 * col2 FROM tab2 AS cor0
----
196
2106
3081

onlyif mysql # use DIV operator for integer division
query I rowsort label-4059
SELECT - 93 DIV - col1 AS col1 FROM tab2 AS cor0
----
1
3
5

skipif mysql # not compatible
query I rowsort label-4059
SELECT - 93 / - col1 AS col1 FROM tab2 AS cor0
----
1
3
5

query I rowsort
SELECT DISTINCT + 91 AS col1 FROM tab0 AS cor0
----
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-4061
SELECT DISTINCT + cor0.col0 * + cor0.col2 + - col1 DIV - col0 AS col0 FROM tab2 AS cor0
----
193
2028
3002

skipif mysql # not compatible
query I rowsort label-4061
SELECT DISTINCT + cor0.col0 * + cor0.col2 + - col1 / - col0 AS col0 FROM tab2 AS cor0
----
193
2028
3002

query I rowsort
SELECT ( + cor0.col1 ) * - 14 FROM tab0 AS cor0
----
-1204
-1274
-1358

query I rowsort
SELECT - 84 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 02f1688b8610806ca28739b1735f6ae4

query I rowsort
SELECT ALL - col2 + col0 * - 20 AS col2 FROM tab2 AS cor0
----
-1586
-1618
-167

query I rowsort
SELECT - 30 * cor0.col1 FROM tab2 AS cor0
----
-1770
-510
-930

query I rowsort
SELECT - col0 - - 83 AS col0 FROM tab0 AS cor0
----
-6
48
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + ( + 50 ) * col0 col1 FROM tab0 AS cor0
----
1224
1785
4539

query I rowsort
SELECT - + cor0.col0 - 72 FROM tab1 cor0
----
-136
-152
-75

query I rowsort
SELECT + + col0 * - cor0.col1 + col1 AS col1 FROM tab2 cor0
----
-1326
-186
-4543

query I rowsort
SELECT + col2 * col1 + - col1 AS col0 FROM tab1
----
1235
1378
560

query I rowsort
SELECT 82 + + tab0.col1 + - col2 AS col2 FROM tab0
----
135
178
91

query I rowsort
SELECT ALL ( - col1 ) * tab1.col1 + 14 * col1 + col1 AS col0 FROM tab1
----
-286
26
50

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4073
SELECT DISTINCT + - CAST( col2 AS SIGNED ) FROM tab1 cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-4073
SELECT DISTINCT + - CAST ( col2 AS INTEGER ) FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT 73 + col0 * col1 FROM tab2 AS cor0
----
1416
290
4675

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + - col2 * col0 * - col2 col0 FROM tab1 AS cor0
----
207946
737293
8774

query I rowsort
SELECT ( 68 ) * + col0 FROM tab2 AS cor0
----
476
5304
5372

query I rowsort
SELECT ALL + - 45 * cor0.col1 AS col2 FROM tab2 AS cor0
----
-1395
-2655
-765

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4078
SELECT + - CAST( NULL AS SIGNED ) * col2 + col0 * + cor0.col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4078
SELECT + - CAST ( NULL AS INTEGER ) * col2 + col0 * + cor0.col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 50 * + cor0.col0 FROM tab1, tab1 AS cor0
----
9 values hashing to f5d32e025ea323d94f3c5110d24967f9

query I rowsort
SELECT ALL - + 85 AS col0 FROM tab1 AS cor0
----
-85
-85
-85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4081
SELECT DISTINCT + CAST( + 7 AS SIGNED ) * - col2 + - cor0.col1 * + col2 FROM tab2 AS cor0
----
-1026
-1716
-912

skipif mysql # not compatible
query I rowsort label-4081
SELECT DISTINCT + CAST ( + 7 AS INTEGER ) * - col2 + - cor0.col1 * + col2 FROM tab2 AS cor0
----
-1026
-1716
-912

query I rowsort
SELECT DISTINCT + col2 + + 69 AS col2 FROM tab2 AS cor0
----
107
95
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 8 * 70 + col0 col0 FROM tab1 AS cor0
----
563
624
640

onlyif mysql # use DIV operator for integer division
query I rowsort label-4084
SELECT DISTINCT - col0 DIV + col0 + + 79 AS col1 FROM tab0
----
78

skipif mysql # not compatible
query I rowsort label-4084
SELECT DISTINCT - col0 / + col0 + + 79 AS col1 FROM tab0
----
78

query I rowsort
SELECT ALL - tab2.col1 + + col1 + col0 AS col0 FROM tab2
----
7
78
79

query I rowsort
SELECT ALL - 24 * - cor0.col1 + - col0 * - cor0.col1 FROM tab2 AS cor0
----
1751
6018
961

query I rowsort
SELECT ALL - col2 * ( col2 ) AS col1 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT 28 + + col1 * - cor0.col2 FROM tab2 cor0
----
-1506
-618
-809

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * col1 + - col0 col2 FROM tab1 AS cor0
----
-1120
-704
-81

query I rowsort
SELECT DISTINCT + ( col2 ) * + col0 * col2 FROM tab1 cor0
----
207936
737280
8748

query I rowsort
SELECT ALL + + 29 * col2 AS col0 FROM tab2 AS cor0
----
1102
754
783

query I rowsort
SELECT ALL - col0 * + col1 + - col1 * + col0 + col0 FROM tab2 AS cor0
----
-2607
-427
-9126

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + + col0 * tab1.col1 col2 FROM tab1
----
1136
132
697

query I rowsort
SELECT DISTINCT - - col0 * 46 FROM tab1 cor0
----
138
2944
3680

query I rowsort
SELECT 23 * col0 + col2 FROM tab0 AS cor0
----
2129
585
806

onlyif mysql # use DIV operator for integer division
query I rowsort label-4096
SELECT ALL - + ( col2 ) DIV - cor0.col2 AS col2 FROM tab0 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4096
SELECT ALL - + ( col2 ) / - cor0.col2 AS col2 FROM tab0 cor0
----
1
1
1

query I rowsort
SELECT ALL + 72 * cor0.col1 FROM tab1 AS cor0
----
1872
720
936

query I rowsort
SELECT ALL 1 AS col2 FROM tab1, tab0 cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT DISTINCT col1 * ( col1 ) - col1 * col0 FROM tab2 AS cor0
----
-1054
-1121
744

query I rowsort
SELECT - col0 * - ( 10 ) FROM tab0 AS cor0
----
240
350
890

query I rowsort
SELECT ALL + col1 + + 7 FROM tab0 AS cor0
----
104
93
98

query I rowsort
SELECT 66 * + col1 - col0 FROM tab1 AS cor0
----
1713
596
778

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4103
SELECT - CAST( - col2 AS SIGNED ) * + col1 + - ( col2 ) AS col2 FROM tab2 cor0
----
1508
608
810

skipif mysql # not compatible
query I rowsort label-4103
SELECT - CAST ( - col2 AS INTEGER ) * + col1 + - ( col2 ) AS col2 FROM tab2 cor0
----
1508
608
810

query I rowsort
SELECT ALL + 68 * - col0 - col0 * ( col1 ) * col2 FROM tab2 AS cor0
----
-124956
-56406
-6335

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4105
SELECT - 78 * - col1 * - col2 + CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4105
SELECT - 78 * - col1 * - col2 + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + 13 AS col2 FROM tab1 AS cor0
----
-13
-13
-13

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4107
SELECT - - CAST( NULL AS SIGNED ) + col1 * - col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4107
SELECT - - CAST ( NULL AS INTEGER ) + col1 * - col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT ( - col0 ) + + col2 * col2 * + 96 FROM tab1 AS cor0
----
279933
311840
884656

query I rowsort
SELECT tab1.col2 AS col2 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT col2 + - col2 * col0 AS col2 FROM tab2 cor0
----
-162
-2002
-2964

query I rowsort
SELECT - 74 * col1 - col1 AS col1 FROM tab1 AS cor0
----
-1950
-750
-975

query I rowsort
SELECT - + ( 76 ) FROM tab1 AS cor0
----
-76
-76
-76

query I rowsort
SELECT DISTINCT + - col1 * + col2 * col0 FROM tab0 AS cor0
----
-3395
-664118
-68112

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 + col1 * col2 + cor0.col1 * col0 * - col0 col2 FROM tab2 AS cor0
----
-105434
-357363
-651

query I rowsort
SELECT ALL + col0 * - cor0.col0 AS col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT ALL - 77 * + col1 FROM tab0 cor0
----
-6622
-7007
-7469

onlyif mysql # use DIV operator for integer division
query I rowsort label-4117
SELECT DISTINCT - 45 DIV + col2 + - col2 DIV - col0 AS col2 FROM tab0 AS cor0
----
-45
0

skipif mysql # not compatible
query I rowsort label-4117
SELECT DISTINCT - 45 / + col2 + - col2 / - col0 AS col2 FROM tab0 AS cor0
----
-45
0

query I rowsort
SELECT DISTINCT col2 * + col2 + 5 FROM tab0 AS cor0
----
1094
6
6729

onlyif mysql # use DIV operator for integer division
query I rowsort label-4119
SELECT DISTINCT + + col0 * + col0 + + col2 DIV + col0 FROM tab1 AS cor0
----
27
4096
6401

skipif mysql # not compatible
query I rowsort label-4119
SELECT DISTINCT + + col0 * + col0 + + col2 / + col0 FROM tab1 AS cor0
----
27
4096
6401

query I rowsort
SELECT 29 + + col2 * 79 FROM tab0 AS cor0
----
108
2636
6507

query I rowsort
SELECT ALL col2 * + col2 - col2 * ( - cor0.col0 ) FROM tab2 cor0
----
2704
4446
918

query I rowsort
SELECT + col2 * col1 + ( - col2 ) * + col0 FROM tab0 AS cor0
----
164
2046
62

query I rowsort
SELECT col0 * + cor0.col2 + col0 FROM tab1 cor0
----
165
3712
7760

query I rowsort
SELECT ALL - col1 + 76 + tab0.col1 FROM tab0
----
76
76
76

query I rowsort
SELECT ALL - + 97 * col1 AS col0 FROM tab0 AS cor0
----
-8342
-8827
-9409

query I rowsort
SELECT - - col2 * + col0 + - 55 FROM tab2 AS cor0
----
134
1973
2947

query I rowsort
SELECT + col2 * 74 FROM tab0 AS cor0
----
2442
6068
74

query I rowsort
SELECT + col0 * - 73 + - col1 * col2 AS col2 FROM tab2 AS cor0
----
-1348
-6413
-7228

query I rowsort
SELECT + tab2.col0 * - tab2.col0 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT ALL - tab1.col1 FROM tab1, tab2 cor0, tab1 AS cor1
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT DISTINCT + tab0.col1 * - col2 AS col1 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT - 22 AS col2 FROM tab1
----
-22
-22
-22

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

onlyif mysql # use DIV operator for integer division
query I rowsort label-4134
SELECT - col2 + cor0.col2 * col0 DIV + col2 AS col0 FROM tab0 AS cor0
----
-9
34
7

skipif mysql # not compatible
query I rowsort label-4134
SELECT - col2 + cor0.col2 * col0 / + col2 AS col0 FROM tab0 AS cor0
----
-9
34
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 44 col1 FROM tab1
----
44
44
44

query I rowsort
SELECT ALL ( 3 ) + tab1.col1 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 111c4bc737187d30870051a5d6238880

query I rowsort
SELECT ALL - col2 + 64 AS col2 FROM tab1 AS cor0
----
-32
10
7

query I rowsort
SELECT - + 63 + + col2 AS col2 FROM tab0 AS cor0
----
-30
-62
19

query I rowsort
SELECT DISTINCT - 14 + + col0 FROM tab2 AS cor0
----
-7
64
65

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
86
91
97

query I rowsort
SELECT - cor1.col1 + 49 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 0b0a707f0cd5ea50d9831dfc6af84138

onlyif mysql # use DIV operator for integer division
query I rowsort label-4142
SELECT - col0 DIV + col2 AS col2 FROM tab0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-4142
SELECT - col0 / + col2 AS col2 FROM tab0
----
-1
-35
0

query I rowsort
SELECT 20 * cor0.col1 + - col0 FROM tab2 AS cor0
----
1102
261
613

query I rowsort
SELECT + + col2 + + cor0.col1 AS col2 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT - col1 * col1 + + ( - cor0.col0 ) AS col1 FROM tab2 AS cor0
----
-3559
-368
-968

query I rowsort
SELECT 17 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 43298e43365fccb5146ea32003753c92

query I rowsort
SELECT ( - col2 ) * col2 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT + tab1.col2 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT + 21 FROM tab0, tab1 AS cor0
----
9 values hashing to c5272facdaaa11f884c8cc0d9d4f41c7

query I rowsort
SELECT 17 * col1 + 28 AS col1 FROM tab1 AS cor0
----
198
249
470

query I rowsort
SELECT ALL 22 AS col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 7dda382e7c08428abac8600fd696eb3e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col2 * + ( col1 ) + - col0 col0 FROM tab1 AS cor0
----
-36544
-4215
-99920

query I rowsort
SELECT ALL + col2 + - col0 * col0 FROM tab2
----
-22
-6058
-6203

query I rowsort
SELECT - col1 * col1 + - col2 AS col0 FROM tab0
----
-7429
-8363
-9410

query I rowsort
SELECT ALL - + 24 AS col2 FROM tab1 AS cor0
----
-24
-24
-24

query I rowsort
SELECT DISTINCT + cor0.col0 + + col2 * - ( col2 ) AS col2 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT - + 37 + col1 * col0 FROM tab1 cor0
----
1003
41
603

query I rowsort
SELECT DISTINCT + 52 + + col1 + ( col0 ) FROM tab1 AS cor0
----
126
145
81

query I rowsort
SELECT + col1 + col1 * col1 FROM tab2
----
306
3540
992

query I rowsort
SELECT DISTINCT col1 * + col2 * col0 - col0 AS col1 FROM tab2
----
119574
50955
5852

query I rowsort
SELECT - col1 + col1 AS col2 FROM tab0 WHERE NOT - col1 > - col0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4162
SELECT col1 DIV - col0 AS col0 FROM tab2
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-4162
SELECT col1 / - col0 AS col0 FROM tab2
----
-4
0
0

query I rowsort
SELECT ALL col2 * col1 + - col2 FROM tab0
----
2805
7380
96

query III rowsort
SELECT * FROM tab1 WHERE NULL >= col0
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4165
SELECT + col0 + col1 DIV col2 FROM tab1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-4165
SELECT + col0 + col1 / col2 FROM tab1
----
3
64
80

query I rowsort
SELECT ALL + 44 + col0 FROM tab1
----
108
124
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 15 col0 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 91b10a00c89b36b5bf0bed723e656ccc

query I rowsort
SELECT - ( col2 * ( col1 ) ) + col1 FROM tab0
----
-2752
-7371
0

query I rowsort
SELECT DISTINCT tab1.col0 * + col2 * col1 + col1 FROM tab1
----
36490
4238
99853

query I rowsort
SELECT ALL - + 53 AS col1 FROM tab1 AS cor0
----
-53
-53
-53

query I rowsort
SELECT - + 15 * col2 FROM tab2 cor0
----
-390
-405
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col1 * - col2 col2 FROM tab0 WHERE NOT col0 NOT IN ( - col1 )
----

query I rowsort
SELECT ALL col2 * + col0 + - col1 FROM tab0
----
-62
706
7207

query I rowsort
SELECT - col0 + col2 * col0 * col1 AS col1 FROM tab0
----
3360
664029
68088

query I rowsort
SELECT - col0 + tab1.col1 FROM tab1 WHERE NOT ( NULL ) NOT BETWEEN - col0 AND ( + col2 * col0 )
----

query I rowsort
SELECT DISTINCT - col2 - col2 * + col0 FROM tab2
----
-2054
-216
-3040

query I rowsort
SELECT col2 FROM tab0 WHERE NOT NULL >= NULL
----

query I rowsort
SELECT DISTINCT tab1.col1 * col1 - + col1 * + tab1.col0 * - col0 FROM tab1
----
41060
83369
910

query I rowsort
SELECT tab0.col1 / - col0 FROM tab0 WHERE - col0 <= ( col1 * - col0 + - col2 )
----

query I rowsort
SELECT DISTINCT col2 * col1 - - tab1.col0 FROM tab1
----
1328
1407
634

query III rowsort
SELECT ALL * FROM tab0 WHERE - col1 IN ( - col0 + - col2 )
----

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4182
SELECT DISTINCT + - col2 * - col1 * col0 + - CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4182
SELECT DISTINCT + - col2 * - col1 * col0 + - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL - tab1.col0 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query I rowsort
SELECT DISTINCT ( ( col0 ) ) AS col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ( col2 ) + col1 AS col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL - 6 - col0 AS col0 FROM tab1 AS cor0
----
-70
-86
-9

query I rowsort
SELECT ALL + 12 + col0 FROM tab1 cor0
----
15
76
92

query I rowsort
SELECT ALL - col2 * + ( col2 * - col0 ) FROM tab0 AS cor0
----
26136
35
598436

query I rowsort
SELECT - + ( + cor0.col1 ) FROM tab0 cor0
----
-86
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + + cor0.col1 col2 FROM tab0 AS cor0
----
2
62

query I rowsort
SELECT ALL + col1 + col1 * 71 FROM tab1 cor0
----
1872
720
936

query I rowsort
SELECT - 15 * cor0.col2 FROM tab0 AS cor0
----
-1230
-15
-495

query I rowsort
SELECT - + 21 FROM tab0 AS cor0
----
-21
-21
-21

query I rowsort
SELECT - - col2 + - cor0.col1 * ( + col1 ) AS col0 FROM tab0 AS cor0
----
-7363
-8199
-9408

query I rowsort
SELECT DISTINCT - ( - col0 + - col0 ) * col2 FROM tab1
----
15360
324
7296

onlyif mysql # use DIV operator for integer division
query I rowsort label-4196
SELECT col0 * tab0.col2 + - col2 DIV + tab0.col2 FROM tab0
----
34
7297
791

skipif mysql # not compatible
query I rowsort label-4196
SELECT col0 * tab0.col2 + - col2 / + tab0.col2 FROM tab0
----
34
7297
791

query I rowsort
SELECT col0 * ( + col2 ) + + col1 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT + col0 * 71 * col1 + col2 AS col1 FROM tab1 AS cor0
----
45497
5592
73936

query I rowsort
SELECT ALL + cor0.col1 + cor0.col0 * col2 * - col2 FROM tab1 AS cor0
----
-207926
-737267
-8722

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * 3 + col2 col0 FROM tab0 cor0
----
-164
-2
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + 15 col1 FROM tab2 AS cor0
----
390
405
570

query I rowsort
SELECT ALL - - col2 + col1 * - col0 + + col0 FROM tab1 cor0
----
-21
-519
-864

onlyif mysql # use DIV operator for integer division
query I rowsort label-4203
SELECT ALL - col1 DIV col2 FROM tab0 cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-4203
SELECT ALL - col1 / col2 FROM tab0 cor0
----
-1
-2
-97

query I rowsort
SELECT DISTINCT - col1 * 28 + col0 * + col2 AS col1 FROM tab2 AS cor0
----
-679
2526
376

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 45 * col2 col2 FROM tab1
----
2430
2565
4320

query I rowsort
SELECT - 82 * tab1.col1 * + 47 FROM tab1
----
-100204
-38540
-50102

onlyif mysql # use DIV operator for integer division
query I rowsort label-4207
SELECT DISTINCT - 2 * col1 DIV col1 AS col0 FROM tab1
----
-2

skipif mysql # not compatible
query I rowsort label-4207
SELECT DISTINCT - 2 * col1 / col1 AS col0 FROM tab1
----
-2

query I rowsort
SELECT ALL - col2 * - cor0.col0 FROM tab2 AS cor0
----
189
2028
3002

skipif mysql # not compatible
query I rowsort
SELECT col0 * - CAST ( col1 AS REAL ) FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL col1 * 38 AS col1 FROM tab1 cor0
----
380
494
988

onlyif mysql # use DIV operator for integer division
query I rowsort label-4211
SELECT - cor0.col1 + col1 + + cor0.col1 * col0 DIV - col0 AS col1 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-4211
SELECT - cor0.col1 + col1 + + cor0.col1 * col0 / - col0 AS col1 FROM tab1 AS cor0
----
-10
-13
-26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4212
SELECT col1 - CAST( NULL AS SIGNED ) AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4212
SELECT col1 - CAST ( NULL AS INTEGER ) AS col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 * - 85 + - col0 * + col1 AS col2 FROM tab1
----
-4668
-5485
-9200

query I rowsort
SELECT ALL + + 99 * col0 AS col1 FROM tab0 AS cor0
----
2376
3465
8811

query I rowsort
SELECT ALL + + 65 * - 44 AS col0 FROM tab2 AS cor0
----
-2860
-2860
-2860

query I rowsort
SELECT + 57 FROM tab1 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 61da70c624ad60604a668f7f8f29392a

query I rowsort
SELECT DISTINCT + col2 * - 56 FROM tab1
----
-3024
-3192
-5376

query I rowsort
SELECT - col1 + cor0.col0 + col1 AS col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - col0 * + col1 + col1 FROM tab1
----
-1027
-52
-630

query I rowsort
SELECT ( col2 * - col1 ) + col2 * col1 FROM tab0
----
0
0
0

query I rowsort
SELECT + 61 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 07149905a72bd87553381f34d19ed290

query I rowsort
SELECT + 48 + cor0.col1 AS col1 FROM tab0 AS cor0
----
134
139
145

query I rowsort
SELECT DISTINCT + 98 FROM tab2
----
98

query I rowsort
SELECT + ( - tab0.col1 ) + col1 AS col1 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - tab2.col1 col2 FROM tab2
----
289
3481
961

query I rowsort
SELECT DISTINCT - col1 + col1 * cor0.col0 AS col0 FROM tab1 cor0
----
1027
52
630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * ( col2 ) col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL - ( - col1 ) AS col2 FROM tab1
----
10
13
26

query I rowsort
SELECT col2 * col2 * - col1 FROM tab1 AS cor0
----
-119808
-32490
-75816

query I rowsort
SELECT DISTINCT + 46 + col2 FROM tab2 cor0
----
72
73
84

query I rowsort
SELECT + tab1.col2 * + 90 AS col0 FROM tab1
----
4860
5130
8640

query I rowsort
SELECT ALL + col0 * 42 FROM tab2 AS cor0
----
294
3276
3318

query I rowsort
SELECT DISTINCT col2 + col1 * col1 * - col1 FROM tab0 cor0
----
-636023
-753489
-912672

query I rowsort
SELECT - + col1 + cor0.col2 * col0 FROM tab1 cor0
----
136
3638
7667

query I rowsort
SELECT ALL - - cor0.col0 * ( ( col0 ) ) + - col1 AS col2 FROM tab1 cor0
----
-17
4086
6387

query I rowsort
SELECT DISTINCT col0 * 32 - + col0 * - col2 * col0 FROM tab1 AS cor0
----
235520
582
616960

query I rowsort
SELECT + col2 + + 42 AS col1 FROM tab0 AS cor0
----
124
43
75

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4238
SELECT ALL col1 * + CAST( - col2 AS SIGNED ) * - col0 + + col1 FROM tab0 cor0
----
3492
664209
68198

skipif mysql # not compatible
query I rowsort label-4238
SELECT ALL col1 * + CAST ( - col2 AS INTEGER ) * - col0 + + col1 FROM tab0 cor0
----
3492
664209
68198

query I rowsort
SELECT DISTINCT + + col0 + col0 * col0 FROM tab0 AS cor0
----
1260
600
8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-4240
SELECT DISTINCT col2 DIV - col0 + - col0 * - col2 AS col1 FROM tab1 AS cor0
----
144
3648
7679

skipif mysql # not compatible
query I rowsort label-4240
SELECT DISTINCT col2 / - col0 + - col0 * - col2 AS col1 FROM tab1 AS cor0
----
144
3648
7679

query I rowsort
SELECT - cor0.col1 + ( + col0 ) AS col0 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT ALL + + cor0.col2 + 89 * - col0 FROM tab0 cor0
----
-2103
-3114
-7839

onlyif mysql # use DIV operator for integer division
query I rowsort label-4243
SELECT DISTINCT - 63 DIV - ( + col1 ) AS col2 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4243
SELECT DISTINCT - 63 / - ( + col1 ) AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT 45 + + col1 * col1 FROM tab2 cor0
----
1006
334
3526

query I rowsort
SELECT ALL - 12 * - 52 + - col0 AS col0 FROM tab0 cor0
----
535
589
600

query I rowsort
SELECT ALL 58 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to ef6e63aeed2581a168f07646d258f666

query I rowsort
SELECT + 97 + ( + col0 + + cor0.col2 ) AS col0 FROM tab1 AS cor0
----
154
218
273

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + 96 * ( col0 + + col1 ) col2 FROM tab1
----
2787
7168
9008

query I rowsort
SELECT DISTINCT - col1 + + tab2.col2 * + col1 AS col2 FROM tab2
----
1475
629
806

query I rowsort
SELECT + - col2 * ( + col1 ) + cor0.col0 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT DISTINCT tab2.col1 + + 13 FROM tab2
----
30
44
72

query I rowsort
SELECT + col2 + col1 * - col1 FROM tab1 WHERE NOT ( col0 * col1 ) > NULL
----

query I rowsort
SELECT - - col0 + col1 + + col1 FROM tab2 cor0
----
113
196
69

query I rowsort
SELECT col0 * col1 * col0 + col2 AS col0 FROM tab0 AS cor0
----
118826
49569
720893

query I rowsort
SELECT + + col2 * col1 + - col0 + cor0.col2 FROM tab2 cor0
----
1482
605
857

query I rowsort
SELECT col0 * col0 + + col0 + + col0 * col2 FROM tab2 AS cor0
----
245
8190
9322

query I rowsort
SELECT - col2 + - cor0.col0 AS col2 FROM tab0 AS cor0
----
-171
-36
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 - col1 col0 FROM tab0 AS cor0
----
-2
-62
-62

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 WHERE NOT NULL <> ( + col1 )
----

query I rowsort
SELECT ALL + cor0.col0 * col0 AS col1 FROM tab1 AS cor0
----
4096
6400
9

query III rowsort
SELECT * FROM tab2 WHERE NULL > + col2 * - col2
----

query I rowsort
SELECT ALL col0 * + col0 * col2 AS col2 FROM tab0
----
1225
19008
649522

query I rowsort
SELECT ALL col1 + col0 / col1 AS col0 FROM tab2 WHERE NOT + col2 > - col2
----

query I rowsort
SELECT + col0 * col2 * + cor0.col0 FROM tab1 AS cor0
----
233472
486
614400

query I rowsort
SELECT col0 + col0 + col2 AS col2 FROM tab0 AS cor0
----
260
71
81

query I rowsort
SELECT cor0.col1 + cor0.col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 71bdffb602517a95c6721e05f7b4b3dd

onlyif mysql # use DIV operator for integer division
query I rowsort label-4267
SELECT + col2 DIV - tab2.col0 AS col1 FROM tab2
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-4267
SELECT + col2 / - tab2.col0 AS col1 FROM tab2
----
-3
0
0

query I rowsort
SELECT tab2.col1 * + tab2.col1 AS col0 FROM tab2
----
289
3481
961

onlyif mysql # use DIV operator for integer division
query I rowsort label-4269
SELECT - col2 DIV + col0 AS col2 FROM tab1
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-4269
SELECT - col2 / + col0 AS col2 FROM tab1
----
-1
-18
0

query I rowsort
SELECT DISTINCT col1 FROM tab0 WHERE NULL NOT IN ( col1 ) AND NULL BETWEEN col2 AND NULL
----

query I rowsort
SELECT DISTINCT col1 * - tab1.col2 FROM tab1 WHERE ( - col0 ) <> col0 * + col2 + - col0 * - col2 * - col0 AND NOT ( NULL ) BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT ALL + cor0.col2 * - cor0.col1 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT + tab2.col2 * + tab2.col2 AS col0 FROM tab2
----
1444
676
729

query I rowsort
SELECT ALL col2 + ( col2 ) AS col2 FROM tab0 AS cor0
----
164
2
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-4275
SELECT ALL col2 + - col0 DIV - cor0.col1 FROM tab1 AS cor0
----
102
54
63

skipif mysql # not compatible
query I rowsort label-4275
SELECT ALL col2 + - col0 / - cor0.col1 FROM tab1 AS cor0
----
102
54
63

onlyif mysql # use DIV operator for integer division
query I rowsort label-4276
SELECT DISTINCT col1 DIV col0 + col2 * + col1 AS col1 FROM tab2 AS cor0
----
1534
646
841

skipif mysql # not compatible
query I rowsort label-4276
SELECT DISTINCT col1 / col0 + col2 * + col1 AS col1 FROM tab2 AS cor0
----
1534
646
841

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4277
SELECT ALL + cor0.col1 + - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4277
SELECT ALL + cor0.col1 + - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col2 * - col0 + cor0.col2 AS col2 FROM tab0 AS cor0
----
-34
-7216
-759

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4279
SELECT DISTINCT - col0 - CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4279
SELECT DISTINCT - col0 - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL cor0.col0 * col1 - col2 FROM tab1 AS cor0
----
24
583
944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + col0 col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT col0 + + 54 AS col0 FROM tab2 AS cor0
----
132
133
61

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4283
SELECT ALL col1 + - CAST( NULL AS SIGNED ) AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4283
SELECT ALL col1 + - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col0 * + 39 FROM tab2 cor0
----
273
3042
3081

query I rowsort
SELECT col2 * - 99 AS col2 FROM tab1 cor0
----
-5346
-5643
-9504

query I rowsort
SELECT ALL - - col1 + - 3 AS col0 FROM tab1 AS cor0
----
10
23
7

query I rowsort
SELECT ( - 64 ) AS col1 FROM tab1 cor0
----
-64
-64
-64

query I rowsort
SELECT col2 * + ( col0 * + tab2.col1 ) + + 33 AS col0 FROM tab2
----
119685
51067
5892

query I rowsort
SELECT ALL - + col2 * + col2 + col2 * + col2 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + + 59 * col1 + 40 FROM tab0 AS cor0
----
5114
5409
5763

onlyif mysql # use DIV operator for integer division
query I rowsort label-4291
SELECT cor0.col1 DIV - col1 + 84 AS col0 FROM tab2 cor0
----
83
83
83

skipif mysql # not compatible
query I rowsort label-4291
SELECT cor0.col1 / - col1 + 84 AS col0 FROM tab2 cor0
----
83
83
83

query I rowsort
SELECT DISTINCT 75 AS col1 FROM tab0 cor0
----
75

query I rowsort
SELECT + + cor0.col1 * col1 + 25 AS col2 FROM tab2 AS cor0
----
314
3506
986

query I rowsort
SELECT + - col0 + col0 * col2 AS col1 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT ALL - + 21 + cor0.col0 AS col0 FROM tab2 AS cor0
----
-14
57
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + col2 * - cor0.col2 * - col1 col1 FROM tab2 AS cor0
----
22606
24627
39962

query I rowsort
SELECT + tab2.col1 * + 2 FROM tab2, tab1 AS cor0, tab2 cor1
----
27 values hashing to 956d8870bc331b7793c38009f5a02194

query I rowsort
SELECT 58 + col0 * col1 FROM tab0
----
2122
3453
8157

query I rowsort
SELECT ALL - + tab1.col0 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 729c1edda9332398299f39cd174ed840

onlyif mysql # use DIV operator for integer division
query I rowsort label-4300
SELECT ALL 31 DIV + tab2.col0 AS col1 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 1fc9d366516f04208797907945465f57

skipif mysql # not compatible
query I rowsort label-4300
SELECT ALL 31 / + tab2.col0 AS col1 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 1fc9d366516f04208797907945465f57

query I rowsort
SELECT + - col1 + col0 * - col1 AS col1 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT DISTINCT - 71 * - col0 FROM tab0 AS cor0
----
1704
2485
6319

query I rowsort
SELECT + ( + tab0.col1 ) + + 67 * col1 FROM tab0
----
5848
6188
6596

query I rowsort
SELECT ALL - ( 17 ) FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 28cd5b4c959cb41fbc56389ab43d167e

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0, tab0 cor1, tab2 AS cor2
----
972 values hashing to 6dfb18fb846f922ba9ea60ce42b86fb0

query I rowsort
SELECT + - cor0.col1 * col0 + - col0 FROM tab1 AS cor0
----
-1120
-704
-81

query I rowsort
SELECT cor0.col0 + cor0.col1 AS col2 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT 60 * - tab1.col2 + tab1.col2 FROM tab1
----
-3186
-3363
-5664

query I rowsort
SELECT - 69 * + col0 + + ( + col2 * + col1 + tab2.col0 ) AS col2 FROM tab2
----
-3770
-4726
361

query I rowsort
SELECT ( 62 ) AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4311
SELECT ALL + col2 * ( cor0.col2 ) DIV col0 + + col1 FROM tab2 cor0
----
135
35
67

skipif mysql # not compatible
query I rowsort label-4311
SELECT ALL + col2 * ( cor0.col2 ) / col0 + + col1 FROM tab2 cor0
----
135
35
67

query I rowsort
SELECT DISTINCT col1 * ( ( col2 ) ) FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4313
SELECT - cor0.col1 * CAST( NULL AS DECIMAL ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4313
SELECT - cor0.col1 * CAST ( NULL AS REAL ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 * + ( col2 ) + - col1 FROM tab2 cor0
----
1427
617
698

query I rowsort
SELECT DISTINCT - + 12 FROM tab0, tab1, tab2 AS cor0
----
-12

query I rowsort
SELECT ALL col2 + 15 * col2 AS col1 FROM tab1
----
1536
864
912

query I rowsort
SELECT DISTINCT - 44 * + ( - col0 ) + + col2 AS col0 FROM tab1
----
186
2873
3616

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4318
SELECT ALL + CAST( NULL AS SIGNED ) + + 86 AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4318
SELECT ALL + CAST ( NULL AS INTEGER ) + + 86 AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT col0 + tab2.col0 + + col2 FROM tab2
----
182
196
41

query I rowsort
SELECT DISTINCT - 99 AS col1 FROM tab0 cor0
----
-99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4321
SELECT CAST( NULL AS DECIMAL ) - 22 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4321
SELECT CAST ( NULL AS REAL ) - 22 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor0.col0 * + col1 col0 FROM tab1 AS cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + 19 - - col2 col1 FROM tab0 cor0
----
1640
20
660

query I rowsort
SELECT DISTINCT - col2 + col0 AS col0 FROM tab0 cor0
----
-9
34
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-4325
SELECT ALL 44 DIV - col0 col1 FROM tab0 AS cor0
----
-1
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4325
SELECT ALL 44 / - col0 col1 FROM tab0 AS cor0
----
-1
-1
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4326
SELECT ALL + ( + col2 ) - - CAST( NULL AS DECIMAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4326
SELECT ALL + ( + col2 ) - - CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 29 + + col2 AS col0 FROM tab1 AS cor0
----
125
83
86

query I rowsort
SELECT ALL 0 + col1 AS col1 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4329
SELECT + + 47 * col2 + - col0 DIV + col2 - col2 AS col2 FROM tab0 AS cor0
----
11
1518
3771

skipif mysql # not compatible
query I rowsort label-4329
SELECT + + 47 * col2 + - col0 / + col2 - col2 AS col2 FROM tab0 AS cor0
----
11
1518
3771

query I rowsort
SELECT DISTINCT - - col1 * - col2 + 78 AS col0 FROM tab2 AS cor0
----
-1456
-568
-759

query I rowsort
SELECT - ( col0 ) * + col2 + col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT ALL - - 63 FROM tab2 cor0
----
63
63
63

query I rowsort
SELECT 96 * + col1 + + col2 AS col0 FROM tab2 AS cor0
----
1670
3003
5690

query I rowsort
SELECT ( - col2 ) + - ( col1 ) FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT DISTINCT 73 - - col1 FROM tab1 AS cor0
----
83
86
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-4336
SELECT ALL 5 + col0 * cor0.col2 DIV 89 FROM tab2 cor0
----
27
38
7

skipif mysql # not compatible
query I rowsort label-4336
SELECT ALL 5 + col0 * cor0.col2 / 89 FROM tab2 cor0
----
27
38
7

query I rowsort
SELECT DISTINCT col1 - - 61 AS col1 FROM tab1
----
71
74
87

query I rowsort
SELECT ALL ( col2 ) - - tab0.col1 AS col2 FROM tab0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-4339
SELECT + col0 DIV + ( col0 ) FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4339
SELECT + col0 / + ( col0 ) FROM tab1
----
1
1
1

query I rowsort
SELECT 44 * + col0 AS col0 FROM tab2
----
308
3432
3476

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * - col1 col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL - - col0 + - col2 AS col1 FROM tab2 AS cor0
----
-20
41
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + cor0.col1 * col0 col1 FROM tab1 AS cor0
----
104
1053
650

onlyif mysql # use DIV operator for integer division
query I rowsort label-4344
SELECT ALL + col0 DIV col2 col1 FROM tab0 AS cor0
----
0
1
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4344
SELECT ALL + col0 / col2 col1 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT - - 9 FROM tab2 cor0
----
9
9
9

query I rowsort
SELECT - 55 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to ac76841ceecd2311e80c621d15bacdd3

query I rowsort
SELECT 2 * - col1 * col2 FROM tab0
----
-14924
-194
-5676

query I rowsort
SELECT cor0.col1 * - cor0.col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL 24 * - col0 FROM tab0
----
-2136
-576
-840

query I rowsort
SELECT tab0.col2 * + col0 * tab0.col2 AS col0 FROM tab0
----
26136
35
598436

query I rowsort
SELECT tab1.col1 * col2 * col1 AS col1 FROM tab1
----
16224
36504
5700

query I rowsort
SELECT DISTINCT ( - col1 ) * + col0 AS col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT 89 + + col0 FROM tab2
----
167
168
96

query I rowsort
SELECT + col2 + col0 + + col2 FROM tab0 AS cor0
----
253
37
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-4355
SELECT - - cor0.col1 DIV - 58 + + col2 DIV + col0 AS col0 FROM tab2 AS cor0
----
-1
0
3

skipif mysql # not compatible
query I rowsort label-4355
SELECT - - cor0.col1 / - 58 + + col2 / + col0 AS col0 FROM tab2 AS cor0
----
-1
0
3

query I rowsort
SELECT col0 + + 90 AS col1 FROM tab0 cor0
----
114
125
179

query I rowsort
SELECT ( col2 ) + col2 FROM tab0
----
164
2
66

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab0 AS cor2, tab0 AS cor3
----
3645 values hashing to 4037d65571c1bbf6e0e7d759f858120e

query I rowsort
SELECT + col2 * + col0 + - cor0.col1 * - col2 FROM tab2 AS cor0
----
1026
3562
3648

onlyif mysql # use DIV operator for integer division
query I rowsort label-4360
SELECT cor0.col0 * - ( + 56 ) + - col0 * col2 + col1 DIV col1 AS col2 FROM tab0 AS cor0
----
-12281
-1994
-2135

skipif mysql # not compatible
query I rowsort label-4360
SELECT cor0.col0 * - ( + 56 ) + - col0 * col2 + col1 / col1 AS col2 FROM tab0 AS cor0
----
-12281
-1994
-2135

query I rowsort
SELECT - col2 - - cor0.col1 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT - col2 + col2 + 63 * cor0.col0 FROM tab2 AS cor0
----
441
4914
4977

query I rowsort
SELECT + + col2 - + cor0.col2 * col1 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT ALL col2 * + 36 AS col1 FROM tab2 AS cor0
----
1368
936
972

onlyif mysql # use DIV operator for integer division
query I rowsort label-4365
SELECT DISTINCT + col1 DIV + 82 + col0 DIV + ( 80 ) + cor0.col0 * + col2 FROM tab2 AS cor0
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-4365
SELECT DISTINCT + col1 / + 82 + col0 / + ( 80 ) + cor0.col0 * + col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - 53 * col0 - col1 AS col1 FROM tab1 cor0
----
-185
-3402
-4253

query I rowsort
SELECT DISTINCT ( + ( - col2 ) ) * + 15 * col2 FROM tab2 cor0
----
-10140
-10935
-21660

query I rowsort
SELECT - 96 * - 75 FROM tab2, tab1 AS cor0
----
9 values hashing to 5e054b4fb0b03f0af8dafe296cf27a54

query I rowsort
SELECT ALL + - tab1.col2 AS col0 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query I rowsort
SELECT DISTINCT + col0 * col2 - ( col0 ) AS col0 FROM tab0
----
0
7209
768

onlyif mysql # use DIV operator for integer division
query I rowsort label-4371
SELECT - 18 DIV + 36 FROM tab1, tab0, tab1 cor0, tab2
----
81 values hashing to 1f117f467f45d8c6b7553e2e3c842942

skipif mysql # not compatible
query I rowsort label-4371
SELECT - 18 / + 36 FROM tab1, tab0, tab1 cor0, tab2
----
81 values hashing to 1f117f467f45d8c6b7553e2e3c842942

query I rowsort
SELECT DISTINCT - tab2.col1 - col2 * col0 AS col0 FROM tab2
----
-2087
-220
-3019

query I rowsort
SELECT DISTINCT col2 - 70 AS col1 FROM tab0
----
-37
-69
12

query I rowsort
SELECT ( + ( col2 ) ) FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT - 76 FROM tab0, tab0 cor0 CROSS JOIN tab2, tab1, tab0 AS cor1
----
-76

onlyif mysql # use DIV operator for integer division
query I rowsort label-4376
SELECT DISTINCT col0 * + col1 + - col0 * - col2 + cor0.col1 DIV col0 AS col1 FROM tab1 AS cor0
----
248
4288
8720

skipif mysql # not compatible
query I rowsort label-4376
SELECT DISTINCT col0 * + col1 + - col0 * - col2 + cor0.col1 / col0 AS col1 FROM tab1 AS cor0
----
248
4288
8720

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4377
SELECT - - CAST( - 6 AS SIGNED ) - col2 FROM tab1 AS cor0
----
-102
-60
-63

skipif mysql # not compatible
query I rowsort label-4377
SELECT - - CAST ( - 6 AS INTEGER ) - col2 FROM tab1 AS cor0
----
-102
-60
-63

query I rowsort
SELECT ALL - - 13 * col2 AS col1 FROM tab2 AS cor0
----
338
351
494

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4379
SELECT DISTINCT - CAST( NULL AS SIGNED ) + + cor0.col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4379
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + + cor0.col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + col2 + - 49 FROM tab2 AS cor0
----
-11
-22
-23

query I rowsort
SELECT + col2 * + col2 + col2 * col2 + - col1 * cor0.col1 AS col1 FROM tab2 AS cor0
----
-2129
2599
497

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4382
SELECT - + CAST( NULL AS SIGNED ) * col2 + col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4382
SELECT - + CAST ( NULL AS INTEGER ) * col2 + col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - 65 + + 95 * cor0.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 5d63bf7ed971fe42962f9a01178e2a95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col2 ) col0 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT + ( col1 ) * + 27 AS col2 FROM tab0 AS cor0
----
2322
2457
2619

query I rowsort
SELECT + - 49 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 01b1fa22fee872a7ba64f90d6046ffae

query I rowsort
SELECT DISTINCT 28 AS col0 FROM tab2, tab2 AS cor0, tab2 cor1
----
28

query I rowsort
SELECT - col0 * + ( cor0.col2 ) AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + col0 * + 73 AS col1 FROM tab1 AS cor0
----
219
4672
5840

query I rowsort
SELECT DISTINCT + ( 83 ) + - col1 * + 26 AS col0 FROM tab2
----
-1451
-359
-723

query I rowsort
SELECT ALL col2 + - col1 * col0 FROM tab0 cor0
----
-2031
-3394
-8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-4392
SELECT DISTINCT + - 80 DIV + col0 - col1 AS col1 FROM tab0 AS cor0
----
-89
-91
-99

skipif mysql # not compatible
query I rowsort label-4392
SELECT DISTINCT + - 80 / + col0 - col1 AS col1 FROM tab0 AS cor0
----
-89
-91
-99

query I rowsort
SELECT DISTINCT - col2 + col2 - col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT col2 * col0 * col2 FROM tab2 AS cor0
----
114076
5103
52728

query I rowsort
SELECT DISTINCT - 12 * 98 AS col1 FROM tab0 AS cor0
----
-1176

query I rowsort
SELECT ALL 61 AS col2 FROM tab0 cor0
----
61
61
61

query I rowsort
SELECT + 33 + + 44 * + cor0.col0 FROM tab1 AS cor0
----
165
2849
3553

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4398
SELECT - CAST( col2 AS SIGNED ) * + col0 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort label-4398
SELECT - CAST ( col2 AS INTEGER ) * + col0 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-4399
SELECT ALL col0 DIV - col0 - col1 * + col1 FROM tab1 AS cor0
----
-101
-170
-677

skipif mysql # not compatible
query I rowsort label-4399
SELECT ALL col0 / - col0 - col1 * + col1 FROM tab1 AS cor0
----
-101
-170
-677

query I rowsort
SELECT ALL - col2 * col2 AS col2 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT ALL 18 + col1 AS col1 FROM tab1 cor0
----
28
31
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + + col1 * - col0 + + ( col1 * + 15 ) col2 FROM tab2 AS cor0
----
-1009
-3639
255

query I rowsort
SELECT cor0.col2 AS col1 FROM tab1, tab0 AS cor0, tab0 cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT ALL - 98 * + cor0.col2 + cor0.col0 AS col0 FROM tab2 AS cor0
----
-2470
-2639
-3645

onlyif mysql # use DIV operator for integer division
query I rowsort label-4405
SELECT ALL - col1 * + cor0.col2 - - cor0.col1 DIV col2 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort label-4405
SELECT ALL - col1 * + cor0.col2 - - cor0.col1 / col2 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ( - ( col0 ) * ( col0 ) ) + + col0 AS col2 FROM tab2
----
-42
-6006
-6162

query I rowsort
SELECT 5 * + tab0.col2 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to d3efe88b9cd67e22adf6ce36b40e5117

query I rowsort
SELECT DISTINCT - - col0 * col0 + col2 * + col0 FROM tab1 AS cor0
----
14080
171
7744

query I rowsort
SELECT DISTINCT + 14 * - col1 FROM tab2 AS cor0
----
-238
-434
-826

query I rowsort
SELECT - 64 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 601ec439a72fb4786a9cb7a6547ace5e

query I rowsort
SELECT DISTINCT col2 * + ( col0 ) * col2 AS col2 FROM tab1 AS cor0
----
207936
737280
8748

query I rowsort
SELECT + col2 * - 81 AS col0 FROM tab0 AS cor0
----
-2673
-6642
-81

query I rowsort
SELECT + - col0 * - ( cor0.col2 * col1 ) AS col0 FROM tab0 AS cor0
----
3395
664118
68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-4414
SELECT ALL cor0.col2 DIV 73 AS col0 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4414
SELECT ALL cor0.col2 / 73 AS col0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4415
SELECT + ( - col0 ) DIV - 72 FROM tab2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-4415
SELECT + ( - col0 ) / - 72 FROM tab2
----
0
1
1

query I rowsort
SELECT 55 * col0 AS col0 FROM tab0
----
1320
1925
4895

onlyif mysql # use DIV operator for integer division
query I rowsort label-4417
SELECT ALL - col0 + cor0.col1 * col0 DIV col2 FROM tab0 AS cor0
----
3360
38
9

skipif mysql # not compatible
query I rowsort label-4417
SELECT ALL - col0 + cor0.col1 * col0 / col2 FROM tab0 AS cor0
----
3360
38
9

query I rowsort
SELECT DISTINCT - cor0.col0 * 26 AS col2 FROM tab0 AS cor0
----
-2314
-624
-910

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4419
SELECT DISTINCT col0 * + CAST( NULL AS SIGNED ) * + col2 AS col0 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-4419
SELECT DISTINCT col0 * + CAST ( NULL AS INTEGER ) * + col2 AS col0 FROM tab1
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4420
SELECT - tab1.col0 * + CAST( NULL AS DECIMAL ) col1 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4420
SELECT - tab1.col0 * + CAST ( NULL AS REAL ) col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 * - cor0.col2 AS col0 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT col0 * - 99 + cor0.col1 FROM tab0 AS cor0
----
-2290
-3368
-8720

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( - col2 AS REAL ) AS col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL + col0 + + 16 AS col2 FROM tab1
----
19
80
96

query I rowsort
SELECT DISTINCT col2 * 93 FROM tab1
----
5022
5301
8928

query I rowsort
SELECT col0 + - tab1.col1 AS col0 FROM tab1
----
-23
54
67

query I rowsort
SELECT DISTINCT + 81 FROM tab0, tab1 AS cor0
----
81

query I rowsort
SELECT DISTINCT - ( col0 ) * col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL + ( cor0.col2 ) * col1 + - cor0.col2 AS col1 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT + col0 * + col0 * - col0 AS col2 FROM tab2 AS cor0
----
-343
-474552
-493039

query I rowsort
SELECT DISTINCT ( cor0.col1 ) AS col2 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL + - cor0.col1 * - cor0.col0 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4433
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab0, tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4433
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab0, tab0 cor0
----
NULL

query I rowsort
SELECT 78 * - 88 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to ac5aace8674ee53c112d261bc05f458e

query I rowsort
SELECT + 64 * - col2 FROM tab0
----
-2112
-5248
-64

onlyif mysql # use DIV operator for integer division
query I rowsort label-4436
SELECT DISTINCT + col0 + + 98 DIV - col0 FROM tab1
----
-29
63
79

skipif mysql # not compatible
query I rowsort label-4436
SELECT DISTINCT + col0 + + 98 / - col0 FROM tab1
----
-29
63
79

query I rowsort
SELECT ALL 84 + tab0.col2 * col0 + + col1 AS col1 FROM tab0
----
216
7473
962

query I rowsort
SELECT + 39 * 93 + + col1 + + col0 FROM tab1 AS cor0
----
3656
3701
3720

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4439
SELECT DISTINCT CAST( NULL AS SIGNED ) + - col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4439
SELECT DISTINCT CAST ( NULL AS INTEGER ) + - col2 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + ( + col0 ) * - col2 AS col1 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT 71 * - tab0.col2 AS col0 FROM tab0
----
-2343
-5822
-71

query I rowsort
SELECT tab0.col0 * - col0 + 5 FROM tab0
----
-1220
-571
-7916

query I rowsort
SELECT DISTINCT + col1 + 61 FROM tab2 AS cor0
----
120
78
92

query I rowsort
SELECT ALL - cor0.col2 - 55 FROM tab2 AS cor0
----
-81
-82
-93

query I rowsort
SELECT col0 + - tab2.col2 FROM tab2
----
-20
41
52

query I rowsort
SELECT - 8 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 852581644118629bf652b1aa4b8f4363

query I rowsort
SELECT DISTINCT - cor0.col2 * - 69 FROM tab1, tab0 AS cor0
----
2277
5658
69

query I rowsort
SELECT col2 + - tab1.col2 AS col2 FROM tab1
----
0
0
0

query I rowsort
SELECT 88 + - col0 FROM tab0
----
-1
53
64

query I rowsort
SELECT + 89 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 860d55eb6785972467218a9c3badb5ad

query I rowsort
SELECT col0 * col2 * col0 + - cor0.col2 + + 12 FROM tab1 AS cor0
----
233427
444
614316

query I rowsort
SELECT cor0.col0 * cor0.col2 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT col0 * 97 FROM tab1 cor0
----
291
6208
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-4454
SELECT + col1 + col2 DIV 3 FROM tab2
----
29
40
67

skipif mysql # not compatible
query I rowsort label-4454
SELECT + col1 + col2 / 3 FROM tab2
----
29
40
67

query I rowsort
SELECT + col2 + col1 * 83 + col0 FROM tab0
----
7195
7724
8087

query I rowsort
SELECT DISTINCT + + col2 + - col1 * - col1 AS col0 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT DISTINCT - col2 + + 4 FROM tab2 AS cor0
----
-22
-23
-34

query I rowsort
SELECT ALL col2 * - col1 + ( col0 ) AS col1 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT ALL - col0 + + 47 * col0 AS col2 FROM tab1 AS cor0
----
138
2944
3680

onlyif mysql # use DIV operator for integer division
query I rowsort label-4460
SELECT + col2 DIV col0 + - col1 + col2 col0 FROM tab1 AS cor0
----
46
47
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4460
SELECT + col2 / col0 + - col1 + col2 col0 FROM tab1 AS cor0
----
46
47
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-4461
SELECT DISTINCT + col1 DIV - col1 col2 FROM tab2 AS cor0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4461
SELECT DISTINCT + col1 / - col1 col2 FROM tab2 AS cor0
----
-1

query I rowsort
SELECT ALL - - col1 + + col2 AS col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT + col1 * - cor0.col1 * + col1 FROM tab2 cor0
----
-205379
-29791
-4913

query I rowsort
SELECT ALL - col1 * - 59 FROM tab2 AS cor0
----
1003
1829
3481

query I rowsort
SELECT + cor0.col2 + 49 * - col1 AS col2 FROM tab1 AS cor0
----
-1220
-433
-541

query I rowsort
SELECT ALL + col2 * + 53 * col0 AS col0 FROM tab2 AS cor0
----
10017
107484
159106

query I rowsort
SELECT ALL - 21 AS col1 FROM tab0 AS cor0
----
-21
-21
-21

query I rowsort
SELECT 86 + col0 * + col0 * - cor0.col1 AS col2 FROM tab1 cor0
----
-148
-40874
-83114

query I rowsort
SELECT ALL + - 13 - cor0.col0 FROM tab0, tab2 AS cor0
----
9 values hashing to c3c3042edcbfae8651bdc9e12b02095e

query I rowsort
SELECT - col0 + - col2 * + col0 * col2 FROM tab0 AS cor0
----
-26160
-598525
-70

query I rowsort
SELECT + cor0.col0 + - 64 * - 40 * + col2 FROM tab1 AS cor0
----
138243
145984
245840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col0 * - 76 col2 FROM tab2, tab1, tab0 AS cor0, tab0
----
81 values hashing to 75ac23948e3945814799baf02025af7d

query I rowsort
SELECT ALL + col1 * - col2 + + 35 * tab1.col0 AS col1 FROM tab1
----
-1299
1552
1670

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 15 col2 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 91b10a00c89b36b5bf0bed723e656ccc

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4475
SELECT CAST( NULL AS SIGNED ) * col0 / + col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4475
SELECT CAST ( NULL AS INTEGER ) * col0 / + col0 FROM tab0 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4476
SELECT ( col0 ) DIV col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4476
SELECT ( col0 ) / col1 AS col0 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4477
SELECT + col1 + + col2 DIV + col1 FROM tab2 AS cor0
----
19
31
59

skipif mysql # not compatible
query I rowsort label-4477
SELECT + col1 + + col2 / + col1 FROM tab2 AS cor0
----
19
31
59

query I rowsort
SELECT col1 + - col2 * + col0 FROM tab2
----
-158
-1969
-2985

onlyif mysql # use DIV operator for integer division
query I rowsort label-4479
SELECT DISTINCT col1 DIV - ( - 25 ) FROM tab0
----
3

skipif mysql # not compatible
query I rowsort label-4479
SELECT DISTINCT col1 / - ( - 25 ) FROM tab0
----
3

query I rowsort
SELECT 86 + + col0 AS col0 FROM tab0
----
110
121
175

query I rowsort
SELECT + ( col2 + + col0 ) FROM tab2
----
104
117
34

query I rowsort
SELECT ALL 78 * 96 + + col0 AS col2 FROM tab1
----
7491
7552
7568

query I rowsort
SELECT ( - tab0.col2 + col1 ) FROM tab0
----
53
9
96

query I rowsort
SELECT DISTINCT + 71 AS col0 FROM tab0 cor0
----
71

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4485
SELECT ALL CAST( NULL AS SIGNED ) * + col2 * col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4485
SELECT ALL CAST ( NULL AS INTEGER ) * + col2 * col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 + col2 col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT DISTINCT + 84 + col0 FROM tab2 AS cor0
----
162
163
91

query I rowsort
SELECT DISTINCT + ( - col0 ) * - col0 AS col0 FROM tab1
----
4096
6400
9

query I rowsort
SELECT ALL - - ( - cor0.col0 ) * ( - cor0.col2 ) AS col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - ( 49 ) FROM tab2
----
-49
-49
-49

onlyif mysql # use DIV operator for integer division
query I rowsort label-4491
SELECT - - 21 DIV - col0 AS col0 FROM tab2 AS cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-4491
SELECT - - 21 / - col0 AS col0 FROM tab2 AS cor0
----
-3
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4492
SELECT ALL - ( + col0 ) * CAST( + col2 AS SIGNED ) + + col2 AS col0 FROM tab1 AS cor0
----
-108
-3591
-7584

skipif mysql # not compatible
query I rowsort label-4492
SELECT ALL - ( + col0 ) * CAST ( + col2 AS INTEGER ) + + col2 AS col0 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT ALL ( + ( + col0 ) ) AS col1 FROM tab1
----
3
64
80

query I rowsort
SELECT ALL 4 - col2 AS col2 FROM tab0
----
-29
-78
3

query I rowsort
SELECT col1 * col0 + 94 AS col2 FROM tab1 AS cor0
----
1134
172
734

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor1.col0 col0 FROM tab0, tab1 cor0, tab0 AS cor1
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-4497
SELECT + + 74 DIV + col0 FROM tab1 AS cor0
----
0
1
24

skipif mysql # not compatible
query I rowsort label-4497
SELECT + + 74 / + col0 FROM tab1 AS cor0
----
0
1
24

query I rowsort
SELECT + - col0 * 53 + + col0 FROM tab0 AS cor0
----
-1248
-1820
-4628

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4499
SELECT - CAST( 70 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-70
-70
-70

skipif mysql # not compatible
query I rowsort label-4499
SELECT - CAST ( 70 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-70
-70
-70

query I rowsort
SELECT col0 * col0 + tab1.col1 FROM tab1
----
35
4106
6413

onlyif mysql # use DIV operator for integer division
query I rowsort label-4501
SELECT DISTINCT - col0 DIV tab0.col1 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-4501
SELECT DISTINCT - col0 / tab0.col1 FROM tab0
----
0

query I rowsort
SELECT ALL - tab1.col0 + col1 / tab1.col1 FROM tab1 WHERE ( NULL ) NOT IN ( - col1 * - col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col0 + + col2 col1 FROM tab2
----
6110
6279
76

query III rowsort
SELECT * FROM tab0 WHERE NULL NOT BETWEEN col0 AND col2
----

query I rowsort
SELECT col0 * + col0 * + tab2.col0 FROM tab2
----
343
474552
493039

query I rowsort
SELECT DISTINCT + col2 + col0 * - tab1.col1 + - col0 * + col1 AS col1 FROM tab1
----
-102
-1223
-1984

query I rowsort
SELECT ALL col2 FROM tab0 WHERE + col0 + - col0 + col0 = - col1 + col2 + col0
----

query I rowsort
SELECT DISTINCT - col1 * + col2 * col2 AS col1 FROM tab1
----
-119808
-32490
-75816

query I rowsort
SELECT + col2 + + tab2.col0 + + col0 FROM tab2
----
182
196
41

query I rowsort
SELECT col2 * col1 * - col2 FROM tab1
----
-119808
-32490
-75816

query I rowsort
SELECT DISTINCT + tab0.col1 - tab0.col2 * col1 AS col2 FROM tab0
----
-2752
-7371
0

query I rowsort
SELECT - tab0.col0 * + col0 - - col2 AS col0 FROM tab0
----
-1224
-543
-7839

query I rowsort
SELECT DISTINCT tab2.col2 + - tab2.col1 AS col1 FROM tab2
----
-33
-4
21

query I rowsort
SELECT + col2 * + col2 + + col0 FROM tab0 WHERE ( col2 + col1 ) <> - col2
----
1113
36
6813

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * col2 col2 FROM tab0
----
-1
-1089
-6724

query III rowsort
SELECT * FROM tab2 WHERE NULL < ( col0 )
----

query III rowsort
SELECT * FROM tab2 WHERE NULL BETWEEN col1 AND + col2 - col0
----

query III rowsort
SELECT * FROM tab2 WHERE NOT + col1 IN ( - col1 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT DISTINCT - col1 AS col0 FROM tab0 WHERE NOT - col1 <> ( NULL )
----

query I rowsort
SELECT col1 + col1 * + tab2.col0 * col2 AS col1 FROM tab2
----
119711
51051
5890

query I rowsort
SELECT - col0 * + col2 - + col1 * - tab0.col0 FROM tab0
----
1272
3360
801

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + - col0 * - col1 col2 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT DISTINCT col2 + + col0 AS col2 FROM tab2 cor0
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-4524
SELECT DISTINCT - - cor0.col0 + col0 DIV col2 FROM tab0 AS cor0
----
24
70
90

skipif mysql # not compatible
query I rowsort label-4524
SELECT DISTINCT - - cor0.col0 + col0 / col2 FROM tab0 AS cor0
----
24
70
90

query I rowsort
SELECT ALL - col0 - - col1 AS col1 FROM tab1 AS cor0
----
-54
-67
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * + col0 * col1 col1 FROM tab0 AS cor0 WHERE NOT ( NULL ) <> ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4527
SELECT ALL - col1 * col2 + col2 * col0 DIV + col2 AS col0 FROM tab0 AS cor0
----
-2814
-62
-7373

skipif mysql # not compatible
query I rowsort label-4527
SELECT ALL - col1 * col2 + col2 * col0 / + col2 AS col0 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT ALL cor0.col2 * cor0.col2 AS col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT + col2 AS col2 FROM tab1 AS cor0 WHERE ( - col1 * col2 ) >= col2
----

query I rowsort
SELECT col0 * - cor0.col1 * col0 FROM tab0 cor0
----
-118825
-49536
-720811

query I rowsort
SELECT ALL col2 * + col1 FROM tab2 WHERE col0 * col1 >= NULL
----

query I rowsort
SELECT col0 + + col0 + col0 AS col2 FROM tab0 AS cor0
----
105
267
72

query IIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0 WHERE NULL NOT IN ( + cor0.col0 )
----

query III rowsort
SELECT * FROM tab2 AS cor0 WHERE NOT + col1 / cor0.col0 + col2 * col2 * cor0.col1 <= NULL
----

query IIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 cor0 WHERE NOT NULL >= NULL
----

query I rowsort
SELECT - 68 AS col0 FROM tab0, tab2 cor0
----
9 values hashing to 5febf382d36d6e0191889c41b928786f

query I rowsort
SELECT ALL col0 + col2 * col1 AS col2 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT - col1 + + col2 * col2 AS col2 FROM tab2 AS cor0
----
1427
617
698

query I rowsort
SELECT DISTINCT + cor0.col0 * + 85 FROM tab1 AS cor0
----
255
5440
6800

query I rowsort
SELECT ALL + col2 * col1 * 72 + - col0 + - col2 FROM tab1 AS cor0
----
101031
40919
89680

query I rowsort
SELECT ALL cor0.col0 - + ( 59 + col2 ) FROM tab1 AS cor0
----
-110
-52
-75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col2 ) + + col2 col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - + cor0.col0 * col0 + col2 AS col1 FROM tab2 AS cor0
----
-22
-6058
-6203

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4544
SELECT ALL 53 * col1 * + cor0.col1 + CAST( 12 AS SIGNED ) * + col0 AS col2 FROM tab0 AS cor0
----
392276
439961
499097

skipif mysql # not compatible
query I rowsort label-4544
SELECT ALL 53 * col1 * + cor0.col1 + CAST ( 12 AS INTEGER ) * + col0 AS col2 FROM tab0 AS cor0
----
392276
439961
499097

onlyif mysql # use DIV operator for integer division
query I rowsort label-4545
SELECT + col0 - cor0.col1 DIV - cor0.col0 AS col0 FROM tab1 cor0
----
11
64
80

skipif mysql # not compatible
query I rowsort label-4545
SELECT + col0 - cor0.col1 / - cor0.col0 AS col0 FROM tab1 cor0
----
11
64
80

query I rowsort
SELECT DISTINCT - - ( col0 ) * + 62 FROM tab1 cor0
----
186
3968
4960

query I rowsort
SELECT ALL - 86 + col2 FROM tab2 AS cor0
----
-48
-59
-60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4548
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab1, tab1 AS cor0, tab0 cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-4548
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab1, tab1 AS cor0, tab0 cor1
----
NULL

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT ( NULL ) > ( col1 )
----

query I rowsort
SELECT DISTINCT col1 + col1 * col1 FROM tab0
----
7482
8372
9506

query I rowsort
SELECT + tab1.col2 FROM tab1 WHERE NOT + col2 + col2 * col1 IN ( col2 * col2 )
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 * col2 - + col1 col1 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT DISTINCT + 4 * - tab0.col2 FROM tab0
----
-132
-328
-4

query I rowsort
SELECT - col1 * + col1 + - 92 FROM tab1
----
-192
-261
-768

query I rowsort
SELECT col2 - + col0 AS col1 FROM tab0
----
-34
-7
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col2 col2 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT ALL 94 * tab0.col1 FROM tab0
----
8084
8554
9118

query I rowsort
SELECT DISTINCT + 57 FROM tab2 AS cor0
----
57

query I rowsort
SELECT - 53 + col0 AS col1 FROM tab1
----
-50
11
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-4560
SELECT - 10 DIV - col1 col0 FROM tab1 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4560
SELECT - 10 / - col1 col0 FROM tab1 AS cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4561
SELECT - - cor0.col1 DIV + 51 FROM tab2 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4561
SELECT - - cor0.col1 / + 51 FROM tab2 AS cor0
----
0
0
1

query I rowsort
SELECT - cor2.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to 26e45cd9fe71a2b90a8bdef20c88e70d

query I rowsort
SELECT DISTINCT - ( + col0 ) - col2 * + col0 FROM tab2
----
-196
-2106
-3081

query I rowsort
SELECT - - col0 - 11 AS col1 FROM tab0 AS cor0
----
13
24
78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4565
SELECT CAST( - 7 AS SIGNED ) FROM tab0
----
-7
-7
-7

skipif mysql # not compatible
query I rowsort label-4565
SELECT CAST ( - 7 AS INTEGER ) FROM tab0
----
-7
-7
-7

query I rowsort
SELECT + 24 * - 92 * col0 FROM tab0
----
-196512
-52992
-77280

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 59 col2 FROM tab1
----
59
59
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4568
SELECT - + CAST( NULL AS SIGNED ) * cor0.col0 - + cor0.col0 / col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4568
SELECT - + CAST ( NULL AS INTEGER ) * cor0.col0 - + cor0.col0 / col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor0.col2 + cor0.col1 AS col0 FROM tab1, tab0 cor0
----
9 values hashing to 5484e660e65aa37f29a1eca3fc30f5cc

query I rowsort
SELECT DISTINCT + col0 * - col1 AS col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col2 FROM tab0, tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT 24 + col0 AS col2 FROM tab1 cor0
----
104
27
88

query I rowsort
SELECT + cor0.col2 + 76 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 7a01fd694603c3de31c58584b208fd18

query I rowsort
SELECT ALL 21 + cor0.col0 * - col2 FROM tab0 AS cor0
----
-14
-7277
-771

query I rowsort
SELECT ALL + + col0 * - col1 + - ( col1 ) * - col2 + col0 FROM tab0 AS cor0
----
-3263
-548
798

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col0 + + col0 col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + col0 * + col0 * col2 AS col1 FROM tab2
----
1323
158184
237158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + tab2.col2 col0 FROM tab2
----
52
54
76

query I rowsort
SELECT + cor0.col1 * - col1 FROM tab0 cor0
----
-7396
-8281
-9409

query I rowsort
SELECT + col2 - col2 AS col0 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + col0 col2 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL - col1 * col2 * col1 AS col1 FROM tab2 AS cor0
----
-10982
-25947
-90506

query I rowsort
SELECT col1 * - col0 + + col0 AS col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT DISTINCT col0 * + col0 * - col0 + - col2 - col0 FROM tab1 AS cor0
----
-262265
-512176
-84

query I rowsort
SELECT ALL + col1 + - col0 * + col2 FROM tab0 cor0
----
-706
-7207
62

query I rowsort
SELECT DISTINCT - + col2 * cor0.col2 - col1 AS col2 FROM tab2 AS cor0
----
-1461
-735
-760

query I rowsort
SELECT + col1 + - col1 * col2 AS col2 FROM tab1 AS cor0
----
-1235
-1378
-560

onlyif mysql # use DIV operator for integer division
query I rowsort label-4588
SELECT DISTINCT - col2 DIV + col1 - + col2 FROM tab1 AS cor0
----
-103
-56
-62

skipif mysql # not compatible
query I rowsort label-4588
SELECT DISTINCT - col2 / + col1 - + col2 FROM tab1 AS cor0
----
-103
-56
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-4589
SELECT + - col2 * col0 + - col0 DIV col0 AS col2 FROM tab0 AS cor0
----
-36
-7299
-793

skipif mysql # not compatible
query I rowsort label-4589
SELECT + - col2 * col0 + - col0 / col0 AS col2 FROM tab0 AS cor0
----
-36
-7299
-793

query I rowsort
SELECT ALL + - col0 - col0 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT DISTINCT + - col1 * col1 FROM tab1 cor0
----
-100
-169
-676

query I rowsort
SELECT DISTINCT - col1 + - col2 + + col2 * - col0 FROM tab0 AS cor0
----
-133
-7471
-911

query I rowsort
SELECT DISTINCT col2 * col2 * - col1 + - col1 AS col1 FROM tab2 AS cor0
----
-22630
-24565
-39943

query I rowsort
SELECT ALL col0 * + cor0.col1 - col2 AS col1 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT DISTINCT - - col2 * - col2 AS col1 FROM tab2 cor0
----
-1444
-676
-729

query I rowsort
SELECT ALL + + col0 + - cor0.col2 AS col1 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT - 75 + - col2 AS col2 FROM tab1 AS cor0
----
-129
-132
-171

query I rowsort
SELECT ALL + col1 + + cor0.col2 * col0 * + cor0.col2 AS col2 FROM tab1 cor0
----
207946
737293
8774

query I rowsort
SELECT + - 27 - col0 * col1 * - col2 FROM tab1 AS cor0
----
36453
4185
99813

query I rowsort
SELECT 12 + - col2 * cor0.col2 FROM tab0 AS cor0
----
-1077
-6712
11

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4601
SELECT + CAST( NULL AS SIGNED ) * 62 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4601
SELECT + CAST ( NULL AS INTEGER ) * 62 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT + - cor0.col0 AS col2 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT ALL col0 * + ( - col2 ) * col2 AS col0 FROM tab1
----
-207936
-737280
-8748

query I rowsort
SELECT ALL 29 * col0 FROM tab0
----
1015
2581
696

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 39 col2 FROM tab1
----
39
39
39

query I rowsort
SELECT DISTINCT cor1.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
1
33
82

query I rowsort
SELECT + + cor0.col2 + - col1 * - col1 + - col0 FROM tab1 AS cor0
----
185
727
93

query I rowsort
SELECT + + 9 * - col1 AS col0 FROM tab1 AS cor0
----
-117
-234
-90

query I rowsort
SELECT - col2 + + col1 + cor0.col0 AS col2 FROM tab1 AS cor0
----
-25
-3
17

query I rowsort
SELECT DISTINCT + cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
7
78
79

query I rowsort
SELECT + col1 * + col2 + col0 FROM tab0
----
132
2862
7551

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4612
SELECT + col1 * - col0 - CAST( - 60 AS SIGNED ) col0 FROM tab0 AS cor0
----
-2004
-3335
-8039

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4612
SELECT + col1 * - col0 - CAST ( - 60 AS INTEGER ) col0 FROM tab0 AS cor0
----
-2004
-3335
-8039

query I rowsort
SELECT cor0.col0 * - col1 + - ( + col0 * - col2 ) - - ( - col0 ) AS col2 FROM tab1 AS cor0
----
2944
6560
81

query I rowsort
SELECT ALL - cor0.col1 + + col2 * ( - col1 ) * - col2 FROM tab0 AS cor0
----
0
611793
93568

query I rowsort
SELECT ALL - 47 * cor0.col1 * - cor0.col0 FROM tab1 AS cor0
----
30080
3666
48880

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - col2 + cor0.col2 * cor0.col2 col1 FROM tab0 cor0
----
0
0
0

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 * + cor0.col0 AS col2 FROM tab0 AS cor0
----
1225
576
7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-4619
SELECT - ( + col2 ) DIV CAST( 37 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-4619
SELECT - ( + col2 ) / CAST ( 37 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-2
0
0

query I rowsort
SELECT DISTINCT col0 * + col1 AS col0 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT + + col1 * col0 * - col1 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT + col1 - cor0.col0 * + 41 FROM tab0 AS cor0
----
-1338
-3558
-898

onlyif mysql # use DIV operator for integer division
query I rowsort label-4623
SELECT ALL - + 74 DIV + col0 FROM tab0 AS cor0
----
-2
-3
0

skipif mysql # not compatible
query I rowsort label-4623
SELECT ALL - + 74 / + col0 FROM tab0 AS cor0
----
-2
-3
0

query I rowsort
SELECT DISTINCT + + 35 * + col0 FROM tab0 AS cor0
----
1225
3115
840

query I rowsort
SELECT DISTINCT 4 * cor0.col1 FROM tab2 AS cor0
----
124
236
68

query I rowsort
SELECT - cor0.col1 + - col1 * col2 AS col1 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT 98 + + 35 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 8f0ca4cf97de794a4b9271d695e9d991

onlyif mysql # use DIV operator for integer division
query I rowsort label-4628
SELECT DISTINCT + col1 * - col2 + - tab2.col1 DIV col1 + col2 * + col2 FROM tab2
----
-109
-859
797

skipif mysql # not compatible
query I rowsort label-4628
SELECT DISTINCT + col1 * - col2 + - tab2.col1 / col1 + col2 * + col2 FROM tab2
----
-109
-859
797

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + - col0 + ( col0 ) col1 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT ALL col1 + col0 - ( + 55 ) FROM tab0
----
125
55
77

query I rowsort
SELECT ( + col1 ) * + 4 AS col1 FROM tab1 AS cor0
----
104
40
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col2 col2 FROM tab0 cor0
----
1
1089
6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col1 + - cor0.col2 col1 FROM tab0 AS cor0
----
2031
3394
8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-4634
SELECT DISTINCT + - col1 DIV + col0 col2 FROM tab1 AS cor0
----
-8
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4634
SELECT DISTINCT + - col1 / + col0 col2 FROM tab1 AS cor0
----
-8
0

query I rowsort
SELECT - col2 * - col1 + col0 FROM tab1
----
1328
1407
634

query I rowsort
SELECT col2 - col0 AS col2 FROM tab0
----
-34
-7
9

query I rowsort
SELECT DISTINCT 25 * col1 FROM tab2 AS cor0
----
1475
425
775

query I rowsort
SELECT DISTINCT 75 + - 33 AS col0 FROM tab0 AS cor0
----
42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + + 68 col2 FROM tab0 cor0
----
101
150
69

query I rowsort
SELECT ALL 14 AS col2 FROM tab0, tab2 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to 742ac5d81e64168a26fbd2bc8c808eff

onlyif mysql # use DIV operator for integer division
query I rowsort label-4641
SELECT ALL 1 DIV - col1 + cor0.col2 * - col2 FROM tab2 AS cor0
----
-1444
-676
-729

skipif mysql # not compatible
query I rowsort label-4641
SELECT ALL 1 / - col1 + cor0.col2 * - col2 FROM tab2 AS cor0
----
-1444
-676
-729

onlyif mysql # use DIV operator for integer division
query I rowsort label-4642
SELECT - 48 DIV + col0 col2 FROM tab2 AS cor0
----
-6
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4642
SELECT - 48 / + col0 col2 FROM tab2 AS cor0
----
-6
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4643
SELECT CAST( NULL AS SIGNED ) + + col0 * + cor0.col1 * - 48 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4643
SELECT CAST ( NULL AS INTEGER ) + + col0 * + cor0.col1 * - 48 AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col1 ) * col0 col2 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4645
SELECT DISTINCT CAST( - col0 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-4645
SELECT DISTINCT CAST ( - col0 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT ALL - - 35 * col2 AS col2 FROM tab0 AS cor0
----
1155
2870
35

query I rowsort
SELECT DISTINCT + - 36 * - col2 + - col1 * + 51 + + col0 FROM tab0 cor0
----
-1600
-3174
-4876

onlyif mysql # use DIV operator for integer division
query I rowsort label-4648
SELECT DISTINCT col2 * col0 + col1 DIV 43 AS col1 FROM tab2 AS cor0
----
189
2029
3002

skipif mysql # not compatible
query I rowsort label-4648
SELECT DISTINCT col2 * col0 + col1 / 43 AS col1 FROM tab2 AS cor0
----
189
2029
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-4649
SELECT DISTINCT col2 * + 25 + col0 DIV + 99 FROM tab1 AS cor0
----
1350
1425
2400

skipif mysql # not compatible
query I rowsort label-4649
SELECT DISTINCT col2 * + 25 + col0 / + 99 FROM tab1 AS cor0
----
1350
1425
2400

query I rowsort
SELECT ALL 91 AS col0 FROM tab2 cor0
----
91
91
91

query I rowsort
SELECT DISTINCT - + ( 20 ) AS col2 FROM tab2 AS cor0
----
-20

query I rowsort
SELECT ALL - - col2 + + col2 * + col0 AS col0 FROM tab0 cor0
----
36
7380
825

query I rowsort
SELECT DISTINCT + cor0.col0 * col1 + + col1 * - col2 FROM tab1 AS cor0
----
-1326
-208
70

query I rowsort
SELECT + + 31 AS col1 FROM tab2 AS cor0
----
31
31
31

query I rowsort
SELECT ALL - col1 + + cor0.col1 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + col1 + + col2 * - 54 * + cor0.col2 FROM tab2 AS cor0
----
-36445
-39335
-77959

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 * + col1 col0 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT ALL 58 AS col0 FROM tab0, tab1 cor0, tab1 AS cor1
----
27 values hashing to 9ee363c6ac19cfdb8a50c7dfd5cc2b8a

onlyif mysql # use DIV operator for integer division
query I rowsort label-4659
SELECT - 96 DIV - col0 FROM tab1 AS cor0
----
1
1
32

skipif mysql # not compatible
query I rowsort label-4659
SELECT - 96 / - col0 FROM tab1 AS cor0
----
1
1
32

query I rowsort
SELECT col1 + - 59 + + 35 AS col1 FROM tab2 AS cor0
----
-7
35
7

query I rowsort
SELECT + 41 FROM tab0, tab0 AS cor0
----
9 values hashing to 5b18986bb294412b3d9f07b7e6fc821e

query I rowsort
SELECT + col1 * ( 32 ) FROM tab1
----
320
416
832

query I rowsort
SELECT DISTINCT - col1 * + ( col0 ) FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - - col0 - + cor0.col0 AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT - - col0 * + col0 + col2 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT col0 + - col1 * - col0 FROM tab2 AS cor0
----
1422
224
4680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * col2 + + 53 * + col2 col0 FROM tab1 AS cor0
----
12768
3024
6669

query I rowsort
SELECT DISTINCT cor0.col2 * ( + cor0.col0 * col0 ) AS col2 FROM tab0 AS cor0
----
1225
19008
649522

query I rowsort
SELECT - col0 * - 52 + + 40 * + cor0.col2 + + 54 AS col1 FROM tab2 AS cor0
----
1498
5150
5682

skipif mysql # not compatible
query I rowsort
SELECT ALL - - col0 + - CAST ( - col0 AS REAL ) FROM tab2 AS cor0
----
14
156
158

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4671
SELECT ALL - + col2 + + CAST( NULL AS SIGNED ) / col1 + - col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4671
SELECT ALL - + col2 + + CAST ( NULL AS INTEGER ) / col1 + - col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col1 * 57 + 82 + + cor0.col0 AS col0 FROM tab0 cor0
----
-4796
-5016
-5412

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4673
SELECT + CAST( NULL AS SIGNED ) + + col2 * col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4673
SELECT + CAST ( NULL AS INTEGER ) + + col2 * col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 + 21 * - col0 * + ( - 0 ) FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT DISTINCT col1 + + 36 FROM tab1 AS cor0
----
46
49
62

query I rowsort
SELECT ALL + col0 + ( cor0.col0 ) * + ( - col2 ) - col0 * col1 AS col1 FROM tab1 AS cor0
----
-237
-4224
-8640

query I rowsort
SELECT DISTINCT + 16 + col0 * col1 AS col1 FROM tab1 AS cor0
----
1056
656
94

query I rowsort
SELECT ALL - - col2 * col1 * col1 + + 99 - col0 FROM tab2 AS cor0
----
11002
26039
90527

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4679
SELECT - CAST( NULL AS SIGNED ) * + cor0.col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4679
SELECT - CAST ( NULL AS INTEGER ) * + cor0.col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - cor0.col1 * ( + col0 ) + col2 AS col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT DISTINCT - 22 - + col1 FROM tab1 AS cor0
----
-32
-35
-48

query I rowsort
SELECT ALL + col2 * - col0 + 79 * col2 FROM tab2
----
0
1944
26

query I rowsort
SELECT DISTINCT + col2 * col2 * - ( - col1 ) + col0 FROM tab1
----
119888
32554
75819

query I rowsort
SELECT ALL col1 + 42 AS col0 FROM tab1
----
52
55
68

onlyif mysql # use DIV operator for integer division
query I rowsort label-4685
SELECT + tab0.col2 DIV - col1 + 7 * col0 + col2 * col0 FROM tab0
----
280
7921
960

skipif mysql # not compatible
query I rowsort label-4685
SELECT + tab0.col2 / - col1 + 7 * col0 + col2 * col0 FROM tab0
----
280
7921
960

onlyif mysql # use DIV operator for integer division
query I rowsort label-4686
SELECT + col2 * col1 DIV - cor0.col2 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-4686
SELECT + col2 * col1 / - cor0.col2 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT - col1 + 61 FROM tab0 cor0
----
-25
-30
-36

query I rowsort
SELECT 46 AS col2 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 2f97924b57b73102233df7c9ce8ad602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4689
SELECT CAST( NULL AS SIGNED ) FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-4689
SELECT CAST ( NULL AS INTEGER ) FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4690
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab0, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4690
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-4691
SELECT ALL - cor0.col2 DIV + cor0.col2 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 60fdd6924bb763d6aca00ba74935ef4b

skipif mysql # not compatible
query I rowsort label-4691
SELECT ALL - cor0.col2 / + cor0.col2 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 60fdd6924bb763d6aca00ba74935ef4b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4692
SELECT ALL + CAST( + ( tab2.col1 ) + + col0 AS SIGNED ) AS col1 FROM tab2
----
137
38
96

skipif mysql # not compatible
query I rowsort label-4692
SELECT ALL + CAST ( + ( tab2.col1 ) + + col0 AS INTEGER ) AS col1 FROM tab2
----
137
38
96

query I rowsort
SELECT ALL + col1 + + col1 * col2 AS col0 FROM tab2
----
1593
663
868

query I rowsort
SELECT + + 36 * + cor0.col2 + col0 AS col2 FROM tab2 AS cor0
----
1014
1447
979

onlyif mysql # use DIV operator for integer division
query I rowsort label-4695
SELECT col0 DIV 91 AS col0 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4695
SELECT col0 / 91 AS col0 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4696
SELECT ALL + + col0 * + col0 * CAST( + 59 AS SIGNED ) + col2 DIV + 9 FROM tab0 AS cor0
----
33987
467348
72275

skipif mysql # not compatible
query I rowsort label-4696
SELECT ALL + + col0 * + col0 * CAST ( + 59 AS INTEGER ) + col2 / + 9 FROM tab0 AS cor0
----
33987
467348
72275

query I rowsort
SELECT - 51 + col0 AS col0 FROM tab0 cor0
----
-16
-27
38

query I rowsort
SELECT - 5 FROM tab0 cor0
----
-5
-5
-5

query I rowsort
SELECT - - 73 * cor0.col2 FROM tab0 AS cor0
----
2409
5986
73

query I rowsort
SELECT + col0 + cor0.col0 * 81 FROM tab2 AS cor0
----
574
6396
6478

query I rowsort
SELECT DISTINCT - 31 * + tab1.col0 + - ( 96 ) FROM tab1, tab0, tab1 AS cor0
----
-189
-2080
-2576

query I rowsort
SELECT - 3 - col2 AS col0 FROM tab0
----
-36
-4
-85

query I rowsort
SELECT ( col2 ) + - 10 + col0 AS col0 FROM tab2
----
107
24
94

query I rowsort
SELECT ALL 52 + + col2 FROM tab0
----
134
53
85

query I rowsort
SELECT DISTINCT + tab0.col0 + - tab0.col0 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
0

query I rowsort
SELECT - - 43 * col1 AS col0 FROM tab1 AS cor0
----
1118
430
559

onlyif mysql # use DIV operator for integer division
query I rowsort label-4707
SELECT - - col1 DIV cor0.col1 + col2 AS col0 FROM tab1 cor0
----
55
58
97

skipif mysql # not compatible
query I rowsort label-4707
SELECT - - col1 / cor0.col1 + col2 AS col0 FROM tab1 cor0
----
55
58
97

query I rowsort
SELECT DISTINCT - + col1 - col2 AS col2 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT col2 * - ( ( + col0 ) ) AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-4710
SELECT DISTINCT - col0 DIV - col2 + 57 AS col2 FROM tab0 AS cor0
----
57
58
92

skipif mysql # not compatible
query I rowsort label-4710
SELECT DISTINCT - col0 / - col2 + 57 AS col2 FROM tab0 AS cor0
----
57
58
92

query I rowsort
SELECT + col2 * col1 + ( + cor0.col2 ) AS col2 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT 93 * - col1 FROM tab2
----
-1581
-2883
-5487

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4713
SELECT - - col0 + + 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-4713
SELECT - - col0 + + CAST ( NULL AS INTEGER ) col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col2 * + 25 AS col1 FROM tab1 AS cor0
----
1350
1425
2400

query I rowsort
SELECT col1 + 77 * col1 * col0 FROM tab1 AS cor0
----
49290
6032
80093

query I rowsort
SELECT DISTINCT - - col1 + col1 + + ( col0 * 95 ) FROM tab2 cor0
----
727
7528
7539

query I rowsort
SELECT ALL + col0 * - 66 FROM tab2 AS cor0
----
-462
-5148
-5214

query I rowsort
SELECT - col2 + col1 * - col1 AS col0 FROM tab2 AS cor0
----
-327
-3507
-988

query I rowsort
SELECT - ( - 42 ) * - cor0.col2 FROM tab0 AS cor0
----
-1386
-3444
-42

query I rowsort
SELECT + - ( + 75 ) AS col0 FROM tab1 cor0
----
-75
-75
-75

query I rowsort
SELECT ALL - col1 * 83 FROM tab1
----
-1079
-2158
-830

query I rowsort
SELECT 34 * - col1 AS col0 FROM tab1 cor0
----
-340
-442
-884

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - col2 col1 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT ALL 11 * col2 + + col0 + col2 * - col0 FROM tab2 AS cor0
----
-1664
-2505
115

query I rowsort
SELECT - cor0.col2 * + col1 + col1 AS col2 FROM tab1 AS cor0
----
-1235
-1378
-560

onlyif mysql # use DIV operator for integer division
query I rowsort label-4726
SELECT ( col0 ) DIV tab1.col1 FROM tab1
----
0
6
6

skipif mysql # not compatible
query I rowsort label-4726
SELECT ( col0 ) / tab1.col1 FROM tab1
----
0
6
6

query I rowsort
SELECT DISTINCT - tab2.col2 * - cor0.col2 FROM tab2, tab1 AS cor0
----
9 values hashing to bbf44891fdcfbe372162a2e549d3eeed

query I rowsort
SELECT tab0.col1 * col1 + - 22 * + col2 FROM tab0
----
6477
6670
9387

query I rowsort
SELECT DISTINCT + + col1 - 4 AS col0 FROM tab0 AS cor0
----
82
87
93

query I rowsort
SELECT + tab0.col1 + col1 * + col0 AS col1 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT DISTINCT - col2 * col2 + 41 FROM tab2 cor0
----
-1403
-635
-688

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0, tab2 cor1, tab2, tab1 cor2
----
3645 values hashing to a8d2ba8b8eb568b0a9a1771ccb0a8f23

query I rowsort
SELECT DISTINCT - col1 + cor0.col2 - - 30 FROM tab0 AS cor0
----
-23
-66
21

query I rowsort
SELECT ALL cor0.col2 * - 79 AS col1 FROM tab2 AS cor0
----
-2054
-2133
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * ( + 58 ) + col0 col1 FROM tab2 AS cor0
----
1573
1586
2283

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4736
SELECT ALL - CAST( NULL AS SIGNED ) + col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4736
SELECT ALL - CAST ( NULL AS INTEGER ) + col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4737
SELECT - CAST( 67 AS SIGNED ) col1 FROM tab1 AS cor0
----
-67
-67
-67

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4737
SELECT - CAST ( 67 AS INTEGER ) col1 FROM tab1 AS cor0
----
-67
-67
-67

query I rowsort
SELECT DISTINCT + col0 * 74 - - col0 AS col2 FROM tab2 AS cor0
----
525
5850
5925

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 67 col1 FROM tab0 AS cor0
----
67
67
67

query I rowsort
SELECT + ( col0 ) * + col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT col0 + 68 * col0 FROM tab1 AS cor0
----
207
4416
5520

query I rowsort
SELECT ALL - col2 + + 81 FROM tab1 AS cor0
----
-15
24
27

query I rowsort
SELECT ALL col0 * col1 + + col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT ALL - col2 * col0 + col1 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT 92 + col2 * col0 AS col2 FROM tab0 AS cor0
----
127
7390
884

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4746
SELECT DISTINCT + CAST( NULL AS SIGNED ) * - col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4746
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * - col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + + 77 * + col0 AS col2 FROM tab0 AS cor0
----
1848
2695
6853

query I rowsort
SELECT - col2 * - 21 + 97 FROM tab0
----
118
1819
790

query I rowsort
SELECT - - col2 + + col0 + col0 AS col2 FROM tab1 AS cor0
----
185
256
60

query I rowsort
SELECT DISTINCT + cor0.col2 * - cor0.col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT ALL 91 * + col2 AS col1 FROM tab0 AS cor0
----
3003
7462
91

query I rowsort
SELECT + - col1 * + col0 + + cor0.col2 * col2 FROM tab2 cor0
----
-3926
101
512

query I rowsort
SELECT + + col0 + col1 * - col0 * - col0 + - col1 * - col2 FROM tab1 AS cor0
----
1641
41594
84528

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 65 + col0 col2 FROM tab1 cor0
----
129
145
68

query I rowsort
SELECT + 66 * + col1 AS col0 FROM tab2
----
1122
2046
3894

query I rowsort
SELECT col2 * - 53 FROM tab2
----
-1378
-1431
-2014

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + + col1 + col0 col2 FROM tab2
----
113
196
69

query I rowsort
SELECT DISTINCT - 36 * col0 AS col0 FROM tab1 AS cor0
----
-108
-2304
-2880

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 47 * col1 col0 FROM tab2 AS cor0
----
1457
2773
799

query I rowsort
SELECT DISTINCT - - 31 + col0 + 23 * cor0.col0 FROM tab2 AS cor0
----
1903
1927
199

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 + col2 col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT 53 + col2 * col1 * + col0 AS col0 FROM tab1
----
36533
4265
99893

query I rowsort
SELECT ( + col2 ) + 93 * - col1 FROM tab1
----
-1113
-2364
-873

query I rowsort
SELECT ALL - col2 * + cor0.col2 + - cor0.col1 AS col0 FROM tab0 AS cor0
----
-1175
-6815
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-4765
SELECT - col2 + col0 DIV col1 FROM tab2
----
-25
-27
-34

skipif mysql # not compatible
query I rowsort label-4765
SELECT - col2 + col0 / col1 FROM tab2
----
-25
-27
-34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4766
SELECT - - CAST( NULL AS DECIMAL ) FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4766
SELECT - - CAST ( NULL AS REAL ) FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-4767
SELECT col0 DIV 35 AS col1 FROM tab0 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-4767
SELECT col0 / 35 AS col1 FROM tab0 AS cor0
----
0
1
2

query I rowsort
SELECT col2 * - cor0.col2 + - col2 + col2 AS col1 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT col0 * + 2 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT - col0 + 99 FROM tab1 AS cor0
----
19
35
96

query I rowsort
SELECT ALL tab1.col2 - - 98 FROM tab1, tab2 cor0
----
9 values hashing to e4266e6eb5c035a092437805cb72d420

query I rowsort
SELECT ALL + col0 + - col0 * col0 AS col0 FROM tab0
----
-1190
-552
-7832

query I rowsort
SELECT DISTINCT cor0.col1 - - 8 AS col2 FROM tab0, tab0 cor0
----
105
94
99

query I rowsort
SELECT - cor0.col0 * 83 AS col0 FROM tab2 AS cor0
----
-581
-6474
-6557

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * 3 col1 FROM tab0 AS cor0
----
-258
-273
-291

query I rowsort
SELECT - col1 + + col1 AS col1 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
54
57
96

query I rowsort
SELECT ALL - col1 * col1 + + col0 AS col1 FROM tab2 AS cor0
----
-210
-3403
-954

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 + - col2 + + col2 col2 FROM tab2 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4781
SELECT ALL + col2 + + col2 DIV col1 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-4781
SELECT ALL + col2 + + col2 / col1 FROM tab0
----
1
33
82

query I rowsort
SELECT DISTINCT - col2 * - 70 AS col2 FROM tab1 cor0
----
3780
3990
6720

query I rowsort
SELECT DISTINCT + 2 + col1 FROM tab1 AS cor0
----
12
15
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-4784
SELECT - col0 + col1 DIV col0 + - col0 FROM tab0 AS cor0
----
-177
-45
-68

skipif mysql # not compatible
query I rowsort label-4784
SELECT - col0 + col1 / col0 + - col0 FROM tab0 AS cor0
----
-177
-45
-68

query I rowsort
SELECT ALL + 2 * - col2 FROM tab2 cor0
----
-52
-54
-76

query I rowsort
SELECT ALL + 5 * + col0 FROM tab0 AS cor0
----
120
175
445

query I rowsort
SELECT + cor0.col0 + + ( - col2 ) AS col1 FROM tab2 AS cor0
----
-20
41
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + col1 * col2 col0 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT tab1.col1 + - cor0.col0 * - cor0.col1 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 76333e4a420b02701cebd58ffc952c36

query I rowsort
SELECT DISTINCT + - 49 * + col1 + cor0.col2 FROM tab2 AS cor0
----
-1492
-2865
-795

query I rowsort
SELECT - - 99 * col0 AS col2 FROM tab1 AS cor0
----
297
6336
7920

query I rowsort
SELECT - + 83 + - cor0.col0 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 8128973297eb1a809dd11a4f30d264fc

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4793
SELECT ALL - 3 * tab1.col1 * CAST( 92 AS SIGNED ) FROM tab1
----
-2760
-3588
-7176

skipif mysql # not compatible
query I rowsort label-4793
SELECT ALL - 3 * tab1.col1 * CAST ( 92 AS INTEGER ) FROM tab1
----
-2760
-3588
-7176

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4794
SELECT 22 / + col2 + - CAST( NULL AS SIGNED ) + - col0 AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4794
SELECT 22 / + col2 + - CAST ( NULL AS INTEGER ) + - col0 AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4795
SELECT + CAST( col1 AS SIGNED ) + cor0.col2 AS col1 FROM tab0 AS cor0
----
119
173
98

skipif mysql # not compatible
query I rowsort label-4795
SELECT + CAST ( col1 AS INTEGER ) + cor0.col2 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT cor0.col0 + cor0.col2 * col2 FROM tab2 cor0
----
1523
736
754

query I rowsort
SELECT + + col0 + col1 * + col2 * + 80 AS col2 FROM tab2 cor0
----
122798
51759
66967

query I rowsort
SELECT - col2 * 42 FROM tab2 AS cor0
----
-1092
-1134
-1596

query I rowsort
SELECT ( + 15 ) + cor0.col1 FROM tab0 AS cor0
----
101
106
112

query I rowsort
SELECT 52 * - 90 FROM tab0 AS cor0
----
-4680
-4680
-4680

query I rowsort
SELECT - ( - ( + col0 ) ) * + col2 AS col1 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT + col2 + + 77 FROM tab2 AS cor0
----
103
104
115

query I rowsort
SELECT ( - tab2.col1 ) * 60 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 5900c622a1ecf9bdd3ecf07bdd8feceb

query I rowsort
SELECT DISTINCT - - 17 * col1 * + col1 - - col0 AS col1 FROM tab0 cor0
----
125756
140866
159988

query I rowsort
SELECT 62 FROM tab0, tab1 AS cor0
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4806
SELECT + + col2 * + 15 + col0 * col1 / + CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4806
SELECT + + col2 * + 15 + col0 * col1 / + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 * - 89 AS col2 FROM tab0 AS cor0
----
2136
3115
7921

query I rowsort
SELECT col0 * ( - col2 ) AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL + 37 AS col1 FROM tab1, tab1 cor0, tab1 cor1
----
27 values hashing to c023509f63faa044d654943e6df55ca2

query I rowsort
SELECT - col2 * + ( - col0 ) FROM tab2
----
189
2028
3002

query I rowsort
SELECT ALL + - 34 + col2 AS col1 FROM tab0 AS cor0
----
-1
-33
48

query I rowsort
SELECT + + 45 AS col2 FROM tab2 AS cor0
----
45
45
45

query I rowsort
SELECT ALL + ( col2 ) - col0 * - 63 FROM tab0 AS cor0
----
1545
2206
5689

onlyif mysql # use DIV operator for integer division
query I rowsort label-4814
SELECT + tab2.col2 DIV 63 AS col0 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4814
SELECT + tab2.col2 / 63 AS col0 FROM tab2
----
0
0
0

query I rowsort
SELECT - col1 * 40 * - tab2.col1 AS col0 FROM tab2
----
11560
139240
38440

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4816
SELECT - + CAST( NULL AS SIGNED ) + - 62 * + col1 * col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4816
SELECT - + CAST ( NULL AS INTEGER ) + - 62 * + col1 * col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - 18 FROM tab1 AS cor0
----
-18
-18
-18

query I rowsort
SELECT - cor0.col1 * - 47 FROM tab0 AS cor0
----
4042
4277
4559

onlyif mysql # use DIV operator for integer division
query I rowsort label-4819
SELECT ALL + - cor0.col1 * cor0.col0 DIV + col1 AS col1 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-4819
SELECT ALL + - cor0.col1 * cor0.col0 / + col1 AS col1 FROM tab0 AS cor0
----
-24
-35
-89

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab1, tab1 cor1, tab0 AS cor2
----
972 values hashing to 909b7ebab62aff8f69dc42ccbb5c2eae

query I rowsort
SELECT tab2.col2 * + col0 + col2 FROM tab2
----
2054
216
3040

query I rowsort
SELECT ALL 86 + - col1 + + col2 AS col1 FROM tab2
----
107
53
82

query I rowsort
SELECT DISTINCT + col1 * 80 + + col2 + + col1 FROM tab2
----
1415
2538
4805

query I rowsort
SELECT ( + col2 ) * col1 AS col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - 26 + col2 * col0 AS col1 FROM tab0
----
7272
766
9

query I rowsort
SELECT - ( 7 ) * + col1 AS col2 FROM tab1 AS cor0
----
-182
-70
-91

onlyif mysql # use DIV operator for integer division
query I rowsort label-4827
SELECT DISTINCT - - cor0.col2 + ( col0 ) DIV - col2 FROM tab1 AS cor0
----
54
56
96

skipif mysql # not compatible
query I rowsort label-4827
SELECT DISTINCT - - cor0.col2 + ( col0 ) / - col2 FROM tab1 AS cor0
----
54
56
96

query I rowsort
SELECT 56 * 12 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to c539a498b183fb82a44eba52e3b98a13

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4829
SELECT DISTINCT ( - tab1.col0 + CAST( + 30 AS SIGNED ) * + col0 ) AS col0 FROM tab1
----
1856
2320
87

skipif mysql # not compatible
query I rowsort label-4829
SELECT DISTINCT ( - tab1.col0 + CAST ( + 30 AS INTEGER ) * + col0 ) AS col0 FROM tab1
----
1856
2320
87

query I rowsort
SELECT col1 * + col1 + col0 AS col0 FROM tab0
----
7420
8370
9444

onlyif mysql # use DIV operator for integer division
query I rowsort label-4831
SELECT col0 + 88 DIV ( col2 + - cor0.col0 ) AS col1 FROM tab1 AS cor0
----
4
52
85

skipif mysql # not compatible
query I rowsort label-4831
SELECT col0 + 88 / ( col2 + - cor0.col0 ) AS col1 FROM tab1 AS cor0
----
4
52
85

query I rowsort
SELECT col2 + cor0.col1 * cor0.col0 AS col2 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT + cor0.col1 * 20 * + 65 AS col1 FROM tab0 cor0
----
111800
118300
126100

query I rowsort
SELECT DISTINCT col0 * + col1 + - col0 AS col1 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT + + col0 + col0 * + col2 AS col2 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT ALL + + col2 - - 89 FROM tab1 cor0
----
143
146
185

query I rowsort
SELECT ALL cor0.col1 * 28 FROM tab2 cor0
----
1652
476
868

onlyif mysql # use DIV operator for integer division
query I rowsort label-4838
SELECT ALL + col1 * - 25 + col1 DIV 97 AS col2 FROM tab2
----
-1475
-425
-775

skipif mysql # not compatible
query I rowsort label-4838
SELECT ALL + col1 * - 25 + col1 / 97 AS col2 FROM tab2
----
-1475
-425
-775

query I rowsort
SELECT 68 * + 2 - + tab0.col1 AS col2 FROM tab0
----
39
45
50

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
3
64
80

query I rowsort
SELECT DISTINCT col1 + + ( col2 ) AS col1 FROM tab2
----
55
58
85

query I rowsort
SELECT ALL col1 + + 7 AS col2 FROM tab2
----
24
38
66

query I rowsort
SELECT ALL - col0 * col2 + - tab0.col0 FROM tab0
----
-70
-7387
-816

query I rowsort
SELECT DISTINCT 78 AS col1 FROM tab2 AS cor0
----
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 + - col0 col2 FROM tab2 cor0
----
-14
-156
-158

onlyif mysql # use DIV operator for integer division
query I rowsort label-4846
SELECT ALL - col1 DIV ( col1 ) + + 20 FROM tab1 AS cor0
----
19
19
19

skipif mysql # not compatible
query I rowsort label-4846
SELECT ALL - col1 / ( col1 ) + + 20 FROM tab1 AS cor0
----
19
19
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - col0 + col2 col2 FROM tab0
----
1226
609
8003

onlyif mysql # use DIV operator for integer division
query I rowsort label-4848
SELECT - 35 + 41 DIV + col0 FROM tab2
----
-30
-35
-35

skipif mysql # not compatible
query I rowsort label-4848
SELECT - 35 + 41 / + col0 FROM tab2
----
-30
-35
-35

query I rowsort
SELECT + col1 * - 86 + + col0 FROM tab0
----
-7372
-7737
-8307

query I rowsort
SELECT ( + col0 ) * + tab0.col0 AS col2 FROM tab0
----
1225
576
7921

query I rowsort
SELECT ALL - 48 * col1 FROM tab0 AS cor0
----
-4128
-4368
-4656

query I rowsort
SELECT ALL col2 * - col1 + - cor0.col1 * col0 * col1 + - cor0.col2 AS col2 FROM tab0 AS cor0
----
-180375
-329413
-744553

query I rowsort
SELECT ALL - col1 * - col2 - + cor0.col2 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT DISTINCT - col1 * - cor0.col2 AS col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT col2 + - col0 * col0 AS col0 FROM tab0 AS cor0
----
-1224
-543
-7839

query I rowsort
SELECT - 80 * cor0.col2 * ( - 3 + col2 ) FROM tab0 AS cor0
----
-518240
-79200
160

query I rowsort
SELECT DISTINCT - col0 * 63 + col1 FROM tab1
----
-163
-4022
-5027

query I rowsort
SELECT - - col1 * - col0 + + 55 AS col1 FROM tab1 AS cor0
----
-23
-585
-985

query I rowsort
SELECT DISTINCT - 51 + + col0 * col1 AS col0 FROM tab2 AS cor0
----
1292
166
4551

query I rowsort
SELECT 26 * + col0 FROM tab0 AS cor0
----
2314
624
910

query I rowsort
SELECT ALL - 4 * - col2 AS col1 FROM tab2 AS cor0
----
104
108
152

query I rowsort
SELECT DISTINCT - col0 * + cor0.col0 AS col2 FROM tab1 AS cor0
----
-4096
-6400
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-4863
SELECT col1 DIV 12 + + col2 FROM tab0 AS cor0
----
40
89
9

skipif mysql # not compatible
query I rowsort label-4863
SELECT col1 / 12 + + col2 FROM tab0 AS cor0
----
40
89
9

query I rowsort
SELECT ALL - 92 + + cor1.col2 * - cor1.col2 FROM tab2, tab0 AS cor0, tab1 cor1
----
27 values hashing to a1f0b609840a44e87b539affb111807a

query I rowsort
SELECT - + col0 + 86 AS col0 FROM tab1 AS cor0
----
22
6
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-4866
SELECT ALL - - col2 DIV col0 + - col2 - cor0.col0 FROM tab1 AS cor0
----
-121
-175
-39

skipif mysql # not compatible
query I rowsort label-4866
SELECT ALL - - col2 / col0 + - col2 - cor0.col0 FROM tab1 AS cor0
----
-121
-175
-39

query I rowsort
SELECT ALL col1 * - 49 + + col2 FROM tab1 AS cor0
----
-1220
-433
-541

query I rowsort
SELECT + col1 * + col2 - + col2 AS col2 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT ALL + cor0.col2 + - col0 AS col1 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT cor0.col1 * + 53 FROM tab1 AS cor0
----
1378
530
689

query I rowsort
SELECT DISTINCT + cor0.col1 * - col1 * - cor0.col0 + + col1 AS col0 FROM tab2 cor0
----
22848
271577
6758

query I rowsort
SELECT ALL col1 + 18 + - 64 * col1 FROM tab2 AS cor0
----
-1053
-1935
-3699

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4873
SELECT - col2 + CAST( NULL AS SIGNED ) * col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4873
SELECT - col2 + CAST ( NULL AS INTEGER ) * col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + col2 * 81 + + col2 AS col1 FROM tab1 AS cor0
----
4428
4674
7872

onlyif mysql # use DIV operator for integer division
query I rowsort label-4875
SELECT DISTINCT col0 + col1 DIV - col0 AS col0 FROM tab0 AS cor0
----
21
33
88

skipif mysql # not compatible
query I rowsort label-4875
SELECT DISTINCT col0 + col1 / - col0 AS col0 FROM tab0 AS cor0
----
21
33
88

query I rowsort
SELECT DISTINCT ( - col2 ) + col2 * col0 AS col1 FROM tab2 AS cor0
----
162
2002
2964

query I rowsort
SELECT ALL - col1 - + col0 AS col2 FROM tab2 cor0
----
-137
-38
-96

query I rowsort
SELECT - + ( col1 ) + col2 AS col0 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL - - 40 - + cor0.col2 FROM tab0 cor0
----
-42
39
7

query I rowsort
SELECT ALL - 6 AS col0 FROM tab2 AS cor0
----
-6
-6
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + + col1 col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT DISTINCT col2 * ( - tab0.col2 ) + col1 AS col2 FROM tab0
----
-1003
-6633
96

query I rowsort
SELECT DISTINCT + 75 FROM tab2, tab2 AS cor0
----
75

query I rowsort
SELECT ALL 79 FROM tab0 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to da0116d31b8af0da9f685c090d378baf

query I rowsort
SELECT DISTINCT + + 90 AS col2 FROM tab1 AS cor0
----
90

query I rowsort
SELECT + 69 * ( cor0.col2 ) + col0 FROM tab0 AS cor0
----
104
2301
5747

query I rowsort
SELECT + ( - col2 ) + - col1 AS col1 FROM tab1 AS cor0
----
-109
-67
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-4888
SELECT ALL - - cor0.col1 DIV - 43 FROM tab2 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4888
SELECT ALL - - cor0.col1 / - 43 FROM tab2 AS cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT - + 43 + + col1 * col2 AS col2 FROM tab2 AS cor0
----
1491
603
794

query I rowsort
SELECT - 94 * cor0.col1 + col1 + + col0 FROM tab0 AS cor0
----
-7974
-8374
-8986

query I rowsort
SELECT DISTINCT + - 33 * ( + col2 ) AS col2 FROM tab0 AS cor0
----
-1089
-2706
-33

query I rowsort
SELECT + 15 + col0 FROM tab1 AS cor0
----
18
79
95

query I rowsort
SELECT - col1 - + ( - cor0.col2 ) * col0 AS col0 FROM tab2 AS cor0
----
158
1969
2985

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 51 col2 FROM tab1 AS cor0
----
51
51
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - col1 + col1 col0 FROM tab1 cor0
----
-1235
-1378
-560

query I rowsort
SELECT DISTINCT + col0 + 34 * col0 FROM tab0
----
1225
3115
840

query I rowsort
SELECT DISTINCT col2 + - 26 * - col0 FROM tab2
----
2054
209
2092

query I rowsort
SELECT - col1 * 28 FROM tab1 AS cor0
----
-280
-364
-728

onlyif mysql # use DIV operator for integer division
query I rowsort label-4899
SELECT cor0.col2 DIV + col0 + - col2 FROM tab1 cor0
----
-36
-57
-95

skipif mysql # not compatible
query I rowsort label-4899
SELECT cor0.col2 / + col0 + - col2 FROM tab1 cor0
----
-36
-57
-95

query I rowsort
SELECT col1 * - col1 + col2 FROM tab0 AS cor0
----
-7363
-8199
-9408

query I rowsort
SELECT DISTINCT col2 + + tab1.col1 + col2 AS col0 FROM tab1
----
124
134
205

query I rowsort
SELECT DISTINCT - col0 + ( col2 ) FROM tab1 cor0
----
-7
16
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4903
SELECT - col1 * CAST( NULL AS SIGNED ) * + ( cor0.col2 ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4903
SELECT - col1 * CAST ( NULL AS INTEGER ) * + ( cor0.col2 ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - col1 * 8 FROM tab0 AS cor0
----
688
728
776

onlyif mysql # use DIV operator for integer division
query I rowsort label-4905
SELECT + col2 * 38 DIV col2 AS col1 FROM tab1 AS cor0
----
38
38
38

skipif mysql # not compatible
query I rowsort label-4905
SELECT + col2 * 38 / col2 AS col1 FROM tab1 AS cor0
----
38
38
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + - 58 * - col0 col2 FROM tab0 AS cor0
----
1416
2065
5251

query I rowsort
SELECT + col0 * + ( + col1 ) AS col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT ALL col0 * - ( col1 ) * - col1 + - tab1.col0 * - col0 FROM tab1
----
10496
19920
2037

query I rowsort
SELECT ALL tab1.col0 + tab1.col2 AS col1 FROM tab1
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-4910
SELECT tab1.col0 DIV - ( tab1.col0 ) FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4910
SELECT tab1.col0 / - ( tab1.col0 ) FROM tab1
----
-1
-1
-1

query I rowsort
SELECT col1 * + 29 AS col1 FROM tab2
----
1711
493
899

query I rowsort
SELECT ALL col1 + - col2 + + 6 AS col1 FROM tab0
----
102
15
59

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - CAST ( 44 AS REAL ) + - cor0.col0 * 11 AS col2 FROM tab2, tab1 AS cor0
----
-748
-77
-924

onlyif mysql # use DIV operator for integer division
query I rowsort label-4914
SELECT DISTINCT col0 DIV - 52 FROM tab0 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-4914
SELECT DISTINCT col0 / - 52 FROM tab0 AS cor0
----
-1
0

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 cor0, tab1 AS cor1, tab2, tab1 AS cor2
----
3645 values hashing to 731e4a6549b312ba21c2e61ca9bede27

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4916
SELECT col2 * CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4916
SELECT col2 * CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 * - ( 50 ) + - col1 AS col0 FROM tab0 AS cor0
----
-1286
-1847
-4541

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 - col0 col0 FROM tab2 AS cor0
----
-14
-156
-158

query I rowsort
SELECT col0 * cor0.col1 + + cor0.col2 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT - col2 * + 82 + col0 AS col2 FROM tab0 cor0
----
-2682
-47
-6635

query I rowsort
SELECT ALL + cor0.col2 + 40 FROM tab0 AS cor0
----
122
41
73

query I rowsort
SELECT + + cor0.col2 * + col0 + cor0.col0 AS col2 FROM tab1 AS cor0
----
165
3712
7760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4923
SELECT - CAST( - cor0.col0 AS SIGNED ) FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-4923
SELECT - CAST ( - cor0.col0 AS INTEGER ) FROM tab1 AS cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-4924
SELECT DISTINCT + - 22 + 60 DIV col0 AS col0 FROM tab2 AS cor0
----
-14
-22

skipif mysql # not compatible
query I rowsort label-4924
SELECT DISTINCT + - 22 + 60 / col0 AS col0 FROM tab2 AS cor0
----
-14
-22

query I rowsort
SELECT ALL cor1.col1 * - 99 AS col0 FROM tab0, tab0 AS cor0, tab2 cor1
----
27 values hashing to 061cf7a4b9d04456c4b643bde0d131df

query IIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab2 cor2
----
972 values hashing to 2507aa9f48c3db94de9fec065edf3731

query I rowsort
SELECT ( + 14 ) AS col1 FROM tab1 AS cor0
----
14
14
14

query I rowsort
SELECT ALL tab1.col2 AS col0 FROM tab1, tab2 cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT 96 - - cor0.col2 FROM tab0 AS cor0
----
129
178
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4930
SELECT - 74 * col2 + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4930
SELECT - 74 * col2 + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 48 + - col2 AS col1 FROM tab0 AS cor0
----
-130
-49
-81

query I rowsort
SELECT ALL ( - col2 * col2 ) FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT + ( + col2 + + tab2.col0 ) AS col2 FROM tab2
----
104
117
34

query I rowsort
SELECT + - ( - col2 ) * - col2 FROM tab0 cor0
----
-1
-1089
-6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 15 + col0 col0 FROM tab1 AS cor0
----
18
79
95

query I rowsort
SELECT - 65 * col2 AS col2 FROM tab1 AS cor0
----
-3510
-3705
-6240

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 34 col1 FROM tab2 AS cor0
----
34

query I rowsort
SELECT + + 13 * col1 AS col1 FROM tab2 AS cor0
----
221
403
767

query I rowsort
SELECT ( col0 + - col0 ) FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col2 * + col1 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT col2 * col2 - - col0 * 29 FROM tab1
----
11536
3003
5105

query I rowsort
SELECT DISTINCT + + col1 * + col2 AS col1 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4943
SELECT col2 DIV - col1 - + col2 AS col0 FROM tab2 AS cor0
----
-26
-27
-40

skipif mysql # not compatible
query I rowsort label-4943
SELECT col2 / - col1 - + col2 AS col0 FROM tab2 AS cor0
----
-26
-27
-40

query I rowsort
SELECT DISTINCT - col1 + col1 * - col0 AS col1 FROM tab0 AS cor0
----
-2150
-3492
-8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-4945
SELECT + col0 * - col1 + col1 DIV 24 AS col1 FROM tab1
----
-1040
-640
-77

skipif mysql # not compatible
query I rowsort label-4945
SELECT + col0 * - col1 + col1 / 24 AS col1 FROM tab1
----
-1040
-640
-77

onlyif mysql # use DIV operator for integer division
query I rowsort label-4946
SELECT - col0 DIV - col2 + - 52 AS col1 FROM tab1
----
-51
-52
-52

skipif mysql # not compatible
query I rowsort label-4946
SELECT - col0 / - col2 + - 52 AS col1 FROM tab1
----
-51
-52
-52

query I rowsort
SELECT - col0 * + 48 AS col1 FROM tab1
----
-144
-3072
-3840

query I rowsort
SELECT ALL - 35 * - col2 FROM tab2 AS cor0
----
1330
910
945

query I rowsort
SELECT + col1 * + col0 * - cor0.col1 + cor0.col1 FROM tab2 AS cor0
----
-22814
-271459
-6696

query I rowsort
SELECT + col2 * + col2 + col0 * + col0 * + 57 AS col2 FROM tab2 AS cor0
----
347464
3522
357181

query I rowsort
SELECT ALL + col0 * + 39 AS col0 FROM tab2 AS cor0
----
273
3042
3081

query I rowsort
SELECT DISTINCT - col0 + - ( col0 ) * 36 FROM tab0 AS cor0
----
-1295
-3293
-888

query I rowsort
SELECT DISTINCT tab2.col2 * + 59 AS col2 FROM tab2
----
1534
1593
2242

query I rowsort
SELECT + ( 57 ) + col0 FROM tab0
----
146
81
92

query I rowsort
SELECT cor0.col0 + + tab2.col1 + 4 AS col1 FROM tab2, tab0 cor0
----
9 values hashing to 845b15c1bcfd80c43a2128765406c230

onlyif mysql # use DIV operator for integer division
query I rowsort label-4956
SELECT - - 14 DIV col0 AS col2 FROM tab1 AS cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-4956
SELECT - - 14 / col0 AS col2 FROM tab1 AS cor0
----
0
0
4

query I rowsort
SELECT + col1 + + 85 * - col1 AS col1 FROM tab0 AS cor0
----
-7224
-7644
-8148

query I rowsort
SELECT - 80 * - col1 FROM tab1 AS cor0
----
1040
2080
800

query I rowsort
SELECT ALL - col2 * - cor0.col1 AS col0 FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4960
SELECT + col1 + + col0 + col0 * CAST( 39 AS SIGNED ) * col2 AS col2 FROM tab0 AS cor0
----
1497
284802
30998

skipif mysql # not compatible
query I rowsort label-4960
SELECT + col1 + + col0 + col0 * CAST ( 39 AS INTEGER ) * col2 AS col2 FROM tab0 AS cor0
----
1497
284802
30998

query I rowsort
SELECT - + ( - col2 ) + - col0 AS col1 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT ALL + ( 0 ) + col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT col1 * - 60 * col1 AS col1 FROM tab0 cor0
----
-443760
-496860
-564540

query I rowsort
SELECT + 77 FROM tab0, tab2 AS cor0
----
9 values hashing to 051bf10c50e061d74ad0a4d205a1c622

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4965
SELECT CAST( NULL AS SIGNED ) + + col0 + cor0.col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4965
SELECT CAST ( NULL AS INTEGER ) + + col0 + cor0.col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor1.col2 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab1 AS cor2
----
-1
-33
-82

query I rowsort
SELECT ALL cor1.col2 FROM tab1, tab1 AS cor0, tab0 cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT - 98 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to f17b7008a7deae1eb5a2e707ec237638

query I rowsort
SELECT 24 * + col1 AS col0 FROM tab0
----
2064
2184
2328

query I rowsort
SELECT ALL - 43 + - col0 AS col1 FROM tab2
----
-121
-122
-50

query I rowsort
SELECT ALL - col2 * col0 + col1 * + ( col0 ) AS col2 FROM tab0
----
1272
3360
801

onlyif mysql # use DIV operator for integer division
query I rowsort label-4972
SELECT ALL - col2 + 73 * col0 DIV + col2 FROM tab0
----
-3
20
2554

skipif mysql # not compatible
query I rowsort label-4972
SELECT ALL - col2 + 73 * col0 / + col2 FROM tab0
----
-3
20
2554

skipif mysql # not compatible
query I rowsort
SELECT CAST ( + ( col0 ) AS REAL ) * col0 FROM tab2
----
49
6084
6241

query I rowsort
SELECT DISTINCT - 77 + + col1 * col0 + ( + ( + col2 ) ) FROM tab2 AS cor0
----
1304
167
4551

query I rowsort
SELECT DISTINCT + - col0 * col1 + col1 AS col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT + 28 + - tab2.col2 * col2 AS col0 FROM tab2
----
-1416
-648
-701

onlyif mysql # use DIV operator for integer division
query I rowsort label-4977
SELECT ALL 14 DIV col0 AS col1 FROM tab1
----
0
0
4

skipif mysql # not compatible
query I rowsort label-4977
SELECT ALL 14 / col0 AS col1 FROM tab1
----
0
0
4

query I rowsort
SELECT col1 + col1 * - ( col1 * col0 ) AS col0 FROM tab0
----
-177418
-329218
-736918

query I rowsort
SELECT + ( tab2.col0 * col1 ) FROM tab2
----
1343
217
4602

query I rowsort
SELECT col1 - - tab0.col1 AS col1 FROM tab0
----
172
182
194

onlyif mysql # use DIV operator for integer division
query I rowsort label-4981
SELECT ( col1 ) * tab2.col0 DIV - col0 + - col1 * col2 * 63 FROM tab2
----
-40715
-52762
-96701

skipif mysql # not compatible
query I rowsort label-4981
SELECT ( col1 ) * tab2.col0 / - col0 + - col1 * col2 * 63 FROM tab2
----
-40715
-52762
-96701

query I rowsort
SELECT ALL - cor0.col1 + col0 AS col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT ( - col1 ) + - 88 FROM tab2
----
-105
-119
-147

query I rowsort
SELECT DISTINCT 86 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
86

query I rowsort
SELECT - tab1.col1 + + col0 * + tab1.col1 FROM tab1
----
1027
52
630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 88 + 33 col1 FROM tab0, tab2 AS cor0, tab1, tab2 AS cor1
----
81 values hashing to 63513e303343acb23c8561e75f7af3d4

query I rowsort
SELECT + col2 * ( col1 ) - col0 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT DISTINCT - col0 + cor0.col0 AS col1 FROM tab1 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4989
SELECT - col2 * - CAST( col0 AS SIGNED ) + - col0 FROM tab2 AS cor0
----
182
1950
2923

skipif mysql # not compatible
query I rowsort label-4989
SELECT - col2 * - CAST ( col0 AS INTEGER ) + - col0 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT ALL col0 + + ( col1 ) FROM tab2 AS cor0
----
137
38
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4991
SELECT DISTINCT + + col0 + + CAST( 3 * col1 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
119
81
94

skipif mysql # not compatible
query I rowsort label-4991
SELECT DISTINCT + + col0 + + CAST ( 3 * col1 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
119
81
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-4992
SELECT DISTINCT - col0 + + col1 + tab1.col1 DIV + col0 AS col1 FROM tab1
----
-54
-67
31

skipif mysql # not compatible
query I rowsort label-4992
SELECT DISTINCT - col0 + + col1 + tab1.col1 / + col0 AS col1 FROM tab1
----
-54
-67
31

onlyif mysql # use DIV operator for integer division
query I rowsort label-4993
SELECT + col0 * 32 + cor0.col0 DIV - col1 AS col1 FROM tab1 AS cor0
----
2042
2554
96

skipif mysql # not compatible
query I rowsort label-4993
SELECT + col0 * 32 + cor0.col0 / - col1 AS col1 FROM tab1 AS cor0
----
2042
2554
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4994
SELECT + + col0 - col0 DIV 38 FROM tab0 AS cor0
----
24
35
87

skipif mysql # not compatible
query I rowsort label-4994
SELECT + + col0 - col0 / 38 FROM tab0 AS cor0
----
24
35
87

query I rowsort
SELECT DISTINCT col1 + 19 AS col2 FROM tab1 AS cor0
----
29
32
45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4996
SELECT DISTINCT - col1 * CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4996
SELECT DISTINCT - col1 * CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4997
SELECT - cor0.col0 DIV col0 AS col0 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4997
SELECT - cor0.col0 / col0 AS col0 FROM tab1 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4998
SELECT DISTINCT + + col0 DIV + col0 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-4998
SELECT DISTINCT + + col0 / + col0 FROM tab1 AS cor0
----
1

query I rowsort
SELECT ALL + + col2 * + 96 FROM tab0 AS cor0
----
3168
7872
96

query I rowsort
SELECT + col2 * + col0 + + col0 FROM tab0 AS cor0
----
70
7387
816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 58 * 73 col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 358dec3d5a2758c72e11ef0dc7f1d572

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col1 * + col2 col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT DISTINCT col2 + ( 19 ) FROM tab1 AS cor0
----
115
73
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-5004
SELECT ALL - col1 * 48 DIV + col0 - col1 FROM tab1 AS cor0
----
-17
-20
-442

skipif mysql # not compatible
query I rowsort label-5004
SELECT ALL - col1 * 48 / + col0 - col1 FROM tab1 AS cor0
----
-17
-20
-442

query I rowsort
SELECT + ( + col1 ) * + col1 - ( 24 ) FROM tab1 AS cor0
----
145
652
76

query I rowsort
SELECT + cor0.col1 + - 98 AS col2 FROM tab1 AS cor0
----
-72
-85
-88

query I rowsort
SELECT ALL + - col2 * col0 * + col2 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT 75 * 2 FROM tab1 AS cor0
----
150
150
150

query I rowsort
SELECT - col1 * + cor0.col0 - + col1 FROM tab0 cor0
----
-2150
-3492
-8190

query I rowsort
SELECT ALL col2 + ( - col0 ) + col1 FROM tab1
----
29
3
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-5011
SELECT col2 DIV 96 AS col0 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5011
SELECT col2 / 96 AS col0 FROM tab2
----
0
0
0

query I rowsort
SELECT - + 83 + 55 * - col2 FROM tab1 AS cor0
----
-3053
-3218
-5363

query I rowsort
SELECT + + 35 - col0 FROM tab1 AS cor0
----
-29
-45
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 + col0 col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL - col0 * + col0 + + col2 AS col0 FROM tab2 AS cor0
----
-22
-6058
-6203

query I rowsort
SELECT DISTINCT - col1 * cor0.col2 + - col0 - + col0 AS col1 FROM tab1 AS cor0
----
-1408
-1410
-698

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 47 col1 FROM tab0 AS cor0
----
47

query I rowsort
SELECT ALL - + 24 * - col2 + + col0 * + 12 AS col2 FROM tab0 AS cor0
----
1080
3036
444

onlyif mysql # use DIV operator for integer division
query I rowsort label-5019
SELECT ALL + col2 DIV col0 + col1 DIV + ( + col2 ) FROM tab0 cor0
----
1
3
97

skipif mysql # not compatible
query I rowsort label-5019
SELECT ALL + col2 / col0 + col1 / + ( + col2 ) FROM tab0 cor0
----
1
3
97

query I rowsort
SELECT DISTINCT - ( col0 ) * cor0.col0 - cor0.col1 AS col1 FROM tab1 AS cor0
----
-35
-4106
-6413

query I rowsort
SELECT col1 * col1 * col1 AS col2 FROM tab2 AS cor0
----
205379
29791
4913

query I rowsort
SELECT + cor0.col1 * - col0 + + col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-5023
SELECT ALL 6 DIV col1 + - col1 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-5023
SELECT ALL 6 / col1 + - col1 FROM tab2 AS cor0
----
-17
-31
-59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5024
SELECT + + 95 + col1 * CAST( - 87 AS SIGNED ) FROM tab2 AS cor0
----
-1384
-2602
-5038

skipif mysql # not compatible
query I rowsort label-5024
SELECT + + 95 + col1 * CAST ( - 87 AS INTEGER ) FROM tab2 AS cor0
----
-1384
-2602
-5038

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5025
SELECT ALL - col2 * col0 + - CAST( NULL AS DECIMAL ) * - col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5025
SELECT ALL - col2 * col0 + - CAST ( NULL AS REAL ) * - col2 FROM tab0 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5026
SELECT DISTINCT + + col1 + + col0 DIV ( + cor0.col1 ) FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-5026
SELECT DISTINCT + + col1 + + col0 / ( + cor0.col1 ) FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT - + 38 * - col1 FROM tab0 AS cor0
----
3268
3458
3686

query I rowsort
SELECT DISTINCT - 27 AS col0 FROM tab0, tab0 AS cor0
----
-27

query I rowsort
SELECT + + 75 * + col0 + - col2 FROM tab0 AS cor0
----
1767
2624
6593

query I rowsort
SELECT - ( col2 ) + - col0 * + col1 FROM tab1 AS cor0
----
-1136
-132
-697

query I rowsort
SELECT DISTINCT + 40 FROM tab1, tab1 AS cor0
----
40

query I rowsort
SELECT - + ( - col2 ) * + col1 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT + cor0.col0 * + cor0.col2 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + col1 + col0 * + col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT ALL + 67 FROM tab2, tab2 AS cor0
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( + cor0.col2 ) col1 FROM tab0 AS cor0
----
-1
-33
-82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5037
SELECT + col0 + col1 * + CAST( NULL AS DECIMAL ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5037
SELECT + col0 + col1 * + CAST ( NULL AS REAL ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5038
SELECT - col1 + + col2 DIV ( col1 ) FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-5038
SELECT - col1 + + col2 / ( col1 ) FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT col0 * + ( - col0 ) AS col1 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT + cor0.col0 * 98 * - cor0.col2 FROM tab1 AS cor0
----
-15876
-357504
-752640

query I rowsort
SELECT col0 * 3 AS col1 FROM tab2 cor0
----
21
234
237

query I rowsort
SELECT ALL ( + 43 ) + - cor0.col1 AS col0 FROM tab0, tab2 AS cor0, tab1 cor1, tab2 AS cor2
----
81 values hashing to 7f60a708bc5e27a91b21e0de6a5814ea

query I rowsort
SELECT - ( cor0.col1 ) + - col2 * 7 FROM tab0 AS cor0
----
-104
-317
-665

onlyif mysql # use DIV operator for integer division
query I rowsort label-5044
SELECT - col2 DIV - 49 AS col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5044
SELECT - col2 / - 49 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 38 * + 80 AS col0 FROM tab2
----
3040
3040
3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-5046
SELECT + ( - col1 ) DIV col1 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5046
SELECT + ( - col1 ) / col1 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT - + col1 * - col0 + - col1 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT cor1.col2 * + cor1.col1 AS col1 FROM tab2, tab0 AS cor0, tab2 cor1
----
27 values hashing to 00f153c5d80e692faff5018d8701b92d

query I rowsort
SELECT ( col2 ) * col1 + col1 * - ( - cor0.col0 ) FROM tab1 AS cor0
----
1210
1482
2288

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5050
SELECT - CAST( NULL AS DECIMAL ) + col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5050
SELECT - CAST ( NULL AS REAL ) + col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + col2 ) col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT tab0.col2 - col0 AS col2 FROM tab0
----
-34
-7
9

query I rowsort
SELECT ALL - col0 * + 34 FROM tab0 AS cor0
----
-1190
-3026
-816

query I rowsort
SELECT ALL - + col2 + + col1 * + col0 FROM tab1 AS cor0
----
24
583
944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + ( col2 ) + - col0 * + col0 + - col1 col1 FROM tab0 AS cor0
----
-1321
-629
-7930

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + ( 8 ) + - col2 col2 FROM tab2 AS cor0
----
-34
-35
-46

query I rowsort
SELECT col1 + col2 * + cor0.col0 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT ALL - - col0 - + ( - col1 ) AS col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL ( 85 ) * col2 + col2 + - col0 * col1 FROM tab1 AS cor0
----
4262
4566
7216

query I rowsort
SELECT DISTINCT ( - col2 ) + + col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL - ( - cor0.col0 ) FROM tab1 AS cor0
----
3
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5062
SELECT DISTINCT + cor0.col2 * - col1 + - CAST( - cor0.col2 AS SIGNED ) FROM tab0 AS cor0
----
-2805
-7380
-96

skipif mysql # not compatible
query I rowsort label-5062
SELECT DISTINCT + cor0.col2 * - col1 + - CAST ( - cor0.col2 AS INTEGER ) FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT ALL 96 + - col0 FROM tab2 AS cor0
----
17
18
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5064
SELECT ALL + CAST( NULL AS DECIMAL ) * + 55 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-5064
SELECT ALL + CAST ( NULL AS REAL ) * + 55 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT 56 * col2 + ( col0 ) + + col2 * - 22 AS col2 FROM tab1 AS cor0
----
1839
2002
3344

onlyif mysql # use DIV operator for integer division
query I rowsort label-5066
SELECT + 4 + col2 DIV col1 FROM tab2 AS cor0
----
4
4
6

skipif mysql # not compatible
query I rowsort label-5066
SELECT + 4 + col2 / col1 FROM tab2 AS cor0
----
4
4
6

query I rowsort
SELECT ALL + cor1.col2 + 91 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 28e733cb7dd7a74497855ec2360039b4

onlyif mysql # use DIV operator for integer division
query I rowsort label-5068
SELECT ALL - col0 - + cor0.col1 DIV ( col1 ) AS col0 FROM tab1 AS cor0
----
-4
-65
-81

skipif mysql # not compatible
query I rowsort label-5068
SELECT ALL - col0 - + cor0.col1 / ( col1 ) AS col0 FROM tab1 AS cor0
----
-4
-65
-81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5069
SELECT - col0 + CAST( + col0 AS SIGNED ) * + col1 FROM tab0 AS cor0
----
2040
3360
8010

skipif mysql # not compatible
query I rowsort label-5069
SELECT - col0 + CAST ( + col0 AS INTEGER ) * + col1 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT - col0 * 83 AS col1 FROM tab2 AS cor0
----
-581
-6474
-6557

onlyif mysql # use DIV operator for integer division
query I rowsort label-5071
SELECT DISTINCT + col2 * col2 + col2 DIV col2 AS col2 FROM tab0 AS cor0
----
1090
2
6725

skipif mysql # not compatible
query I rowsort label-5071
SELECT DISTINCT + col2 * col2 + col2 / col2 AS col2 FROM tab0 AS cor0
----
1090
2
6725

query I rowsort
SELECT + col1 * ( col1 ) AS col1 FROM tab2 cor0
----
289
3481
961

query I rowsort
SELECT - col0 * col0 + + cor0.col1 * + col1 * + col0 FROM tab0 AS cor0
----
176928
328090
729088

query I rowsort
SELECT DISTINCT 14 * 49 FROM tab2 AS cor0 CROSS JOIN tab0 cor1
----
686

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5075
SELECT DISTINCT + col1 + - CAST( NULL AS DECIMAL ) / col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5075
SELECT DISTINCT + col1 + - CAST ( NULL AS REAL ) / col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT col0 + - col1 * ( - col1 ) FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT + + col2 * + 57 + col2 AS col1 FROM tab2 AS cor0
----
1508
1566
2204

query I rowsort
SELECT ALL cor0.col1 + - cor0.col0 FROM tab2 AS cor0
----
-19
-62
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-5079
SELECT DISTINCT col0 DIV col2 + - col0 FROM tab0 AS cor0
----
-24
-88
0

skipif mysql # not compatible
query I rowsort label-5079
SELECT DISTINCT col0 / col2 + - col0 FROM tab0 AS cor0
----
-24
-88
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5080
SELECT ALL - + CAST( col0 AS SIGNED ) FROM tab0 cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-5080
SELECT ALL - + CAST ( col0 AS INTEGER ) FROM tab0 cor0
----
-24
-35
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5081
SELECT ALL + col2 + CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5081
SELECT ALL + col2 + CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col2 * col1 + + col1 * + col1 AS col2 FROM tab0
----
10234
15743
9506

onlyif mysql # use DIV operator for integer division
query I rowsort label-5083
SELECT ALL ( col0 ) DIV 96 AS col0 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5083
SELECT ALL ( col0 ) / 96 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL 42 + col2 AS col0 FROM tab2 AS cor0
----
68
69
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * - col2 col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT + 17 + - cor0.col2 FROM tab2 AS cor0
----
-10
-21
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 * col0 * 79 col0 FROM tab0 cor0
----
-45504
-625759
-96775

query I rowsort
SELECT + - 93 + col2 FROM tab2 AS cor0
----
-55
-66
-67

query I rowsort
SELECT DISTINCT 24 FROM tab0, tab0 cor0, tab2 AS cor1
----
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-5090
SELECT DISTINCT - col2 DIV col0 + - col1 AS col2 FROM tab2 AS cor0
----
-17
-34
-59

skipif mysql # not compatible
query I rowsort label-5090
SELECT DISTINCT - col2 / col0 + - col1 AS col2 FROM tab2 AS cor0
----
-17
-34
-59

query I rowsort
SELECT tab2.col1 * col2 + - 8 * 29 + col0 FROM tab2
----
1380
493
612

query I rowsort
SELECT 93 * + tab2.col1 * - tab2.col2 + col0 + + col2 AS col2 FROM tab2
----
-142558
-59961
-77807

query I rowsort
SELECT ALL 96 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to f1d978c2d5bfc6f26e0907ac777be83e

query I rowsort
SELECT DISTINCT col0 * + tab2.col1 + 37 AS col2 FROM tab2
----
1380
254
4639

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5095
SELECT + + col2 - - CAST( NULL AS SIGNED ) * cor0.col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5095
SELECT + + col2 - - CAST ( NULL AS INTEGER ) * cor0.col0 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5096
SELECT + col2 + - CAST( 1 AS SIGNED ) * col0 AS col0 FROM tab1 AS cor0
----
-7
16
51

skipif mysql # not compatible
query I rowsort label-5096
SELECT + col2 + - CAST ( 1 AS INTEGER ) * col0 AS col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT DISTINCT col0 * - col0 + col1 AS col2 FROM tab1
----
-4086
-6387
17

query I rowsort
SELECT ALL col1 * col1 + + col0 FROM tab2
----
3559
368
968

query I rowsort
SELECT ALL - tab2.col2 + col1 * col1 FROM tab2
----
251
3455
934

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 91 + col1 col0 FROM tab0
----
-5
0
6

query I rowsort
SELECT DISTINCT + ( - col2 ) + 15 FROM tab2
----
-11
-12
-23

query I rowsort
SELECT ALL - col0 + 65 AS col2 FROM tab2 AS cor0
----
-13
-14
58

query I rowsort
SELECT 10 * - col1 AS col0 FROM tab1 AS cor0
----
-100
-130
-260

query I rowsort
SELECT ALL + - 68 FROM tab2 AS cor0
----
-68
-68
-68

onlyif mysql # use DIV operator for integer division
query I rowsort label-5105
SELECT DISTINCT - 40 DIV - 64 FROM tab0 cor0
----
0

skipif mysql # not compatible
query I rowsort label-5105
SELECT DISTINCT - 40 / - 64 FROM tab0 cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5106
SELECT DISTINCT + + col1 DIV ( col0 ) FROM tab2 AS cor0
----
0
4

skipif mysql # not compatible
query I rowsort label-5106
SELECT DISTINCT + + col1 / ( col0 ) FROM tab2 AS cor0
----
0
4

query I rowsort
SELECT ALL + 42 * + col1 AS col2 FROM tab1 AS cor0
----
1092
420
546

query I rowsort
SELECT - 64 + 2 AS col2 FROM tab1 AS cor0
----
-62
-62
-62

query I rowsort
SELECT DISTINCT - 44 + + 87 AS col2 FROM tab2 AS cor0
----
43

query I rowsort
SELECT + + 94 * - col1 AS col2 FROM tab1 AS cor0
----
-1222
-2444
-940

query I rowsort
SELECT ALL - col2 + col2 * col2 FROM tab2
----
1406
650
702

query I rowsort
SELECT ALL - col2 + ( - tab2.col1 * col0 + col2 * - col1 ) FROM tab2
----
-1081
-2027
-6162

onlyif mysql # use DIV operator for integer division
query I rowsort label-5113
SELECT ALL tab2.col2 DIV + 63 + - 72 AS col0 FROM tab2
----
-72
-72
-72

skipif mysql # not compatible
query I rowsort label-5113
SELECT ALL tab2.col2 / + 63 + - 72 AS col0 FROM tab2
----
-72
-72
-72

query I rowsort
SELECT - + ( - ( + col0 ) ) * 33 AS col0 FROM tab2 AS cor0
----
231
2574
2607

query I rowsort
SELECT DISTINCT 58 + col1 AS col0 FROM tab1 AS cor0
----
68
71
84

query I rowsort
SELECT DISTINCT - ( col2 ) + - cor0.col2 AS col0 FROM tab1 cor0
----
-108
-114
-192

query I rowsort
SELECT + + ( - col1 ) + - col0 AS col0 FROM tab2 cor0
----
-137
-38
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col1 ) * col2 col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL ( col2 ) + - col1 AS col1 FROM tab0 AS cor0
----
-53
-9
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 13 col1 FROM tab2, tab1, tab0 AS cor0
----
13

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5121
SELECT ALL CAST( - col0 AS SIGNED ) * + tab1.col2 FROM tab1
----
-162
-3648
-7680

skipif mysql # not compatible
query I rowsort label-5121
SELECT ALL CAST ( - col0 AS INTEGER ) * + tab1.col2 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT + 20 AS col0 FROM tab2
----
20

query I rowsort
SELECT ( + 79 ) + tab1.col1 FROM tab1
----
105
89
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-5124
SELECT ALL - col2 * ( - col0 ) DIV 11 FROM tab0 AS cor0
----
3
663
72

skipif mysql # not compatible
query I rowsort label-5124
SELECT ALL - col2 * ( - col0 ) / 11 FROM tab0 AS cor0
----
3
663
72

query I rowsort
SELECT ( col2 ) + - col1 AS col2 FROM tab1
----
28
47
83

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab2, tab1, tab0 cor0
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT 49 AS col0 FROM tab1, tab0 AS cor0, tab2 cor1
----
27 values hashing to a40d8754a5be3ce2309c61bfd3e00197

query I rowsort
SELECT ALL 79 + + col1 AS col1 FROM tab1 AS cor0
----
105
89
92

query I rowsort
SELECT ALL + 9 FROM tab1 cor0
----
9
9
9

skipif mysql # not compatible
query I rowsort
SELECT + - CAST ( 78 AS REAL ) FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to b6e4cc21599216686f0cf45b85668b2c

query I rowsort
SELECT + 11 + col2 AS col1 FROM tab1 AS cor0
----
107
65
68

query I rowsort
SELECT + + ( col2 ) AS col1 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT - - 9 + + col2 AS col0 FROM tab2 AS cor0
----
35
36
47

query I rowsort
SELECT - 46 AS col0 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 5a5d45989dcc6a06d9ee5a08945518f9

query I rowsort
SELECT + col2 + 11 * col2 FROM tab0
----
12
396
984

query I rowsort
SELECT ALL + + cor0.col0 * - 0 + - col2 * col1 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5137
SELECT DISTINCT + col2 * + CAST( NULL AS SIGNED ) + col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5137
SELECT DISTINCT + col2 * + CAST ( NULL AS INTEGER ) + col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - cor0.col0 * - col1 * cor0.col1 AS col0 FROM tab2 AS cor0
----
22831
271518
6727

onlyif mysql # use DIV operator for integer division
query I rowsort label-5139
SELECT ALL col2 * 22 DIV - 95 + col0 FROM tab2 AS cor0
----
1
71
72

skipif mysql # not compatible
query I rowsort label-5139
SELECT ALL col2 * 22 / - 95 + col0 FROM tab2 AS cor0
----
1
71
72

query I rowsort
SELECT - + col2 + cor0.col0 * + col2 * + col1 FROM tab0 AS cor0
----
3394
664036
68079

query I rowsort
SELECT + + col0 + col1 * 99 FROM tab1 AS cor0
----
1054
1367
2577

query I rowsort
SELECT DISTINCT - col1 - - 50 * - col2 FROM tab0 cor0
----
-147
-1736
-4191

query I rowsort
SELECT ALL col2 * col1 * + col0 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT - 76 * - 62 + col0 AS col1 FROM tab1 AS cor0
----
4715
4776
4792

query I rowsort
SELECT - ( col0 ) * col1 + col0 AS col2 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT ( col1 ) + + col0 AS col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT + 45 FROM tab1, tab0 cor0
----
9 values hashing to 60b9f935ee8e404d155a2f5e9515c050

query I rowsort
SELECT DISTINCT - col1 + col2 * + col1 AS col2 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT DISTINCT 73 AS col0 FROM tab1, tab1 AS cor0
----
73

query IIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab0, tab1 cor1 WHERE NOT ( NULL ) <= NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 86 col2 FROM tab2, tab2 AS cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to e219687f6f4ab6f7ee442792edcebca9

query I rowsort
SELECT col0 * + ( + col2 * col0 ) AS col1 FROM tab2 cor0
----
1323
158184
237158

query I rowsort
SELECT - + col1 * + col2 + col2 * col2 AS col0 FROM tab0 AS cor0
----
-1749
-738
-96

query I rowsort
SELECT DISTINCT + + col1 + col0 * + 93 FROM tab2 AS cor0
----
682
7313
7364

query I rowsort
SELECT ALL - cor0.col1 + 13 * cor0.col1 * + col0 AS col1 FROM tab2 AS cor0
----
17442
2790
59767

query I rowsort
SELECT DISTINCT - + 49 * + col0 AS col1 FROM tab2 cor0
----
-343
-3822
-3871

query I rowsort
SELECT ALL col2 * 45 FROM tab1 AS cor0
----
2430
2565
4320

query I rowsort
SELECT DISTINCT + col1 * 89 FROM tab1
----
1157
2314
890

query I rowsort
SELECT ( - cor0.col1 ) * col0 * 52 AS col1 FROM tab2 AS cor0
----
-11284
-239304
-69836

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5160
SELECT 79 * + cor0.col0 + - CAST( 62 AS SIGNED ) * + cor0.col2 AS col1 FROM tab1 AS cor0
----
-3111
1522
368

skipif mysql # not compatible
query I rowsort label-5160
SELECT 79 * + cor0.col0 + - CAST ( 62 AS INTEGER ) * + cor0.col2 AS col1 FROM tab1 AS cor0
----
-3111
1522
368

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * + 0 col0 FROM tab1
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5162
SELECT + tab2.col0 * - col0 + - CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5162
SELECT + tab2.col0 * - col0 + - CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 31 * tab1.col2 FROM tab1
----
1674
1767
2976

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 66 * + tab0.col0 col1 FROM tab0
----
1584
2310
5874

query I rowsort
SELECT DISTINCT - col0 * tab1.col1 AS col2 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT col1 * - cor0.col1 + + col2 * col1 * col0 FROM tab2 AS cor0
----
116171
4898
50745

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5167
SELECT ( - col0 ) + - CAST( 36 AS SIGNED ) * col1 FROM tab2 AS cor0
----
-1123
-2202
-691

skipif mysql # not compatible
query I rowsort label-5167
SELECT ( - col0 ) + - CAST ( 36 AS INTEGER ) * col1 FROM tab2 AS cor0
----
-1123
-2202
-691

query I rowsort
SELECT ALL + 66 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 29794915b585eea848ad670075452c88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5169
SELECT DISTINCT - 91 * + tab2.col1 * + 99 + + col1 * + tab2.col2 * - CAST( NULL AS SIGNED ) AS col1 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-5169
SELECT DISTINCT - 91 * + tab2.col1 * + 99 + + col1 * + tab2.col2 * - CAST ( NULL AS INTEGER ) AS col1 FROM tab2
----
NULL

query I rowsort
SELECT ALL - - ( + cor0.col2 ) FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT + 76 + - 9 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

query I rowsort
SELECT + - col2 * + cor0.col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT - col2 * - col1 + col0 * col1 - col2 AS col2 FROM tab1 AS cor0
----
1153
1428
2192

query I rowsort
SELECT + col1 + col2 * - col1 + - cor0.col2 FROM tab0 AS cor0
----
-1
-2785
-7453

query I rowsort
SELECT + ( col2 ) + + 97 FROM tab0
----
130
179
98

query I rowsort
SELECT + cor0.col1 * + cor0.col0 FROM tab1 AS cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 14 col1 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
14

query I rowsort
SELECT + col1 * + ( col1 ) + - col0 AS col2 FROM tab1
----
36
673
89

query I rowsort
SELECT ALL + - col2 + cor0.col0 * col0 FROM tab2 AS cor0
----
22
6058
6203

query I rowsort
SELECT - 11 AS col0 FROM tab1, tab0 AS cor0, tab0 cor1, tab0, tab2 AS cor2
----
243 values hashing to c113ef2deec7389fcd95fe64a5efe432

query I rowsort
SELECT - col0 * - col0 + col0 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT DISTINCT - cor0.col2 * 81 + - col1 FROM tab1 cor0
----
-4400
-4627
-7789

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5183
SELECT DISTINCT + CAST( col0 + + col1 AS SIGNED ) FROM tab2
----
137
38
96

skipif mysql # not compatible
query I rowsort label-5183
SELECT DISTINCT + CAST ( col0 + + col1 AS INTEGER ) FROM tab2
----
137
38
96

query I rowsort
SELECT ALL col1 * col0 - col1 FROM tab1
----
1027
52
630

query I rowsort
SELECT DISTINCT + ( col2 * + col2 ) - - ( col0 * col2 ) AS col2 FROM tab0
----
14022
1881
36

query I rowsort
SELECT - ( + 94 ) + col0 FROM tab2
----
-15
-16
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col1 FROM tab1, tab0, tab2 cor0
----
17
31
59

query I rowsort
SELECT ALL + cor1.col0 AS col1 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5189
SELECT - CAST( NULL AS SIGNED ) * + col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5189
SELECT - CAST ( NULL AS INTEGER ) * + col0 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + col1 * - col2 + cor0.col2 + col0 * col1 FROM tab0 AS cor0
----
15643
3493
4935

query I rowsort
SELECT 53 * - col2 + 87 FROM tab1 AS cor0
----
-2775
-2934
-5001

query I rowsort
SELECT DISTINCT - + 25 FROM tab0 AS cor0
----
-25

query I rowsort
SELECT ALL col1 + col2 AS col1 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT ALL - col2 * col2 + cor0.col0 FROM tab0 AS cor0
----
-1065
-6635
34

query I rowsort
SELECT ALL - col2 + + col0 * 15 AS col0 FROM tab0 cor0
----
1253
327
524

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col0 + - col1 * - cor0.col0 - + cor0.col0 * + col0 col0 FROM tab0 cor0
----
2205
2280
7476

query I rowsort
SELECT DISTINCT + + 95 AS col1 FROM tab0 AS cor0
----
95

query I rowsort
SELECT ALL + + 81 * col1 AS col1 FROM tab0 AS cor0
----
6966
7371
7857

query I rowsort
SELECT - col1 * col2 + - col2 * - col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + + col1 * col0 + col2 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT + cor0.col1 + col0 * - 24 FROM tab2 AS cor0
----
-137
-1813
-1879

query I rowsort
SELECT ALL col0 * 22 * + col0 FROM tab0
----
12672
174262
26950

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5203
SELECT ALL - CAST( - col0 * + col2 AS SIGNED ) AS col1 FROM tab1
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-5203
SELECT ALL - CAST ( - col0 * + col2 AS INTEGER ) AS col1 FROM tab1
----
162
3648
7680

query I rowsort
SELECT DISTINCT - col2 + - col0 - + col0 FROM tab1 AS cor0
----
-185
-256
-60

query I rowsort
SELECT DISTINCT col1 * - ( col2 ) AS col2 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT + col0 * 20 * - col2 FROM tab2
----
-3780
-40560
-60040

query I rowsort
SELECT ALL - col2 * col0 + + col1 AS col1 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT ALL + + col0 * + cor0.col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL + col2 + + ( col0 ) * col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT ALL col1 + 53 AS col0 FROM tab2 AS cor0
----
112
70
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + col2 * cor0.col1 col2 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT + + cor0.col2 * + col1 * - col2 FROM tab1 AS cor0
----
-119808
-32490
-75816

query I rowsort
SELECT DISTINCT col0 * 78 AS col0 FROM tab0 AS cor0
----
1872
2730
6942

query I rowsort
SELECT ALL - col2 + 35 * - col1 AS col1 FROM tab2 cor0
----
-1112
-2091
-633

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5215
SELECT CAST( - col2 AS SIGNED ) * col2 FROM tab2 AS cor0
----
-1444
-676
-729

skipif mysql # not compatible
query I rowsort label-5215
SELECT CAST ( - col2 AS INTEGER ) * col2 FROM tab2 AS cor0
----
-1444
-676
-729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( - col1 ) + + col1 * ( col2 ) col0 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT + col0 * + 61 FROM tab0 AS cor0
----
1464
2135
5429

onlyif mysql # use DIV operator for integer division
query I rowsort label-5218
SELECT - cor0.col2 DIV - 54 AS col2 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5218
SELECT - cor0.col2 / - 54 AS col2 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT + - cor0.col2 + col1 * col1 AS col1 FROM tab2 AS cor0
----
251
3455
934

query I rowsort
SELECT DISTINCT 48 AS col0 FROM tab1, tab1 AS cor0, tab2 cor1, tab2 AS cor2
----
48

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5221
SELECT col2 / col2 + CAST( NULL AS DECIMAL ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5221
SELECT col2 / col2 + CAST ( NULL AS REAL ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + col1 + + col2 * - 70 AS col1 FROM tab0 AS cor0
----
-2224
-5649
27

query I rowsort
SELECT DISTINCT cor0.col2 * - col1 + + col1 * 8 * col2 FROM tab0 AS cor0
----
19866
52234
679

query I rowsort
SELECT DISTINCT - 73 + - cor0.col1 AS col0 FROM tab0 AS cor0
----
-159
-164
-170

query I rowsort
SELECT ALL 30 * 42 AS col0 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 9a717c1c8ece314e3a4b2bbdea802980

query I rowsort
SELECT + col2 * + col1 * col2 FROM tab1
----
119808
32490
75816

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5227
SELECT ALL CAST( NULL AS DECIMAL ) FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-5227
SELECT ALL CAST ( NULL AS REAL ) FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT + - col2 + col1 * ( - col0 + col1 ) * ( col0 ) FROM tab0 AS cor0
----
127935
16116
210489

query I rowsort
SELECT ALL + col1 + - col2 * - col0 FROM tab0 cor0
----
132
7389
878

query I rowsort
SELECT DISTINCT + + cor0.col0 + + cor0.col2 FROM tab1, tab2 cor0
----
104
117
34

query I rowsort
SELECT 64 * - 98 AS col1 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to f01ce8a54c1c0a9dfb3dd0470dc9814d

query I rowsort
SELECT ALL - 78 + col2 AS col1 FROM tab2 AS cor0
----
-40
-51
-52

query I rowsort
SELECT ALL + + col1 - cor0.col2 * + 53 FROM tab1 AS cor0
----
-2836
-3011
-5075

onlyif mysql # use DIV operator for integer division
query I rowsort label-5234
SELECT col1 DIV col1 + col2 col2 FROM tab1 AS cor0
----
55
58
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5234
SELECT col1 / col1 + col2 col2 FROM tab1 AS cor0
----
55
58
97

query I rowsort
SELECT - col1 + - 66 FROM tab1 cor0
----
-76
-79
-92

query I rowsort
SELECT + col1 + cor0.col2 * - col1 AS col2 FROM tab2 AS cor0
----
-1475
-629
-806

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5237
SELECT DISTINCT - col1 * CAST( + 63 * + col0 AS SIGNED ) col2 FROM tab2 AS cor0
----
-13671
-289926
-84609

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5237
SELECT DISTINCT - col1 * CAST ( + 63 * + col0 AS INTEGER ) col2 FROM tab2 AS cor0
----
-13671
-289926
-84609

query I rowsort
SELECT ALL + + col2 + col0 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT ALL cor0.col1 AS col2 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT ALL 83 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 18f405c31a0fb47ce3cc9f7effa8855c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col2 + ( + col0 + + col0 ) col2 FROM tab1 AS cor0
----
-156
-3520
-7520

query I rowsort
SELECT ALL + col2 + - 68 + col1 FROM tab1 AS cor0
----
-1
12
41

query I rowsort
SELECT DISTINCT 90 + - col0 AS col0 FROM tab0
----
1
55
66

query I rowsort
SELECT - col0 + - cor0.col1 * + cor0.col0 * - col2 FROM tab0 AS cor0
----
3360
664029
68088

query I rowsort
SELECT - + 45 FROM tab1 cor0
----
-45
-45
-45

query I rowsort
SELECT DISTINCT + - ( col2 ) AS col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT + col2 * 18 AS col2 FROM tab1
----
1026
1728
972

query I rowsort
SELECT 52 + tab1.col2 + 27 AS col2 FROM tab1, tab2 cor0, tab1 AS cor1
----
27 values hashing to e845c78693f7efc8722f731709a66b35

onlyif mysql # use DIV operator for integer division
query I rowsort label-5249
SELECT + 79 DIV - 97 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-5249
SELECT + 79 / - 97 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5250
SELECT - col0 * + CAST( NULL AS SIGNED ) AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5250
SELECT - col0 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5251
SELECT + 78 DIV col0 + ( + 72 ) AS col0 FROM tab1 AS cor0
----
72
73
98

skipif mysql # not compatible
query I rowsort label-5251
SELECT + 78 / col0 + ( + 72 ) AS col0 FROM tab1 AS cor0
----
72
73
98

query I rowsort
SELECT + 16 * col1 * - cor0.col1 - - 48 AS col2 FROM tab0 AS cor0
----
-118288
-132448
-150496

onlyif mysql # use DIV operator for integer division
query I rowsort label-5253
SELECT DISTINCT col2 + + tab2.col0 DIV + col1 FROM tab2
----
27
42

skipif mysql # not compatible
query I rowsort label-5253
SELECT DISTINCT col2 + + tab2.col0 / + col1 FROM tab2
----
27
42

query I rowsort
SELECT ALL + col1 + 2 * col2 * - col0 AS col2 FROM tab1
----
-15347
-298
-7286

onlyif mysql # use DIV operator for integer division
query I rowsort label-5255
SELECT 67 * + col2 + tab0.col1 DIV col0 FROM tab0
----
2214
5495
69

skipif mysql # not compatible
query I rowsort label-5255
SELECT 67 * + col2 + tab0.col1 / col0 FROM tab0
----
2214
5495
69

query I rowsort
SELECT + ( + cor0.col2 ) * - ( col1 * + col1 ) AS col0 FROM tab2 AS cor0
----
-10982
-25947
-90506

query I rowsort
SELECT 82 * + tab0.col2 FROM tab0
----
2706
6724
82

query I rowsort
SELECT DISTINCT + col1 + col1 * col1 * - 9 + + tab1.col1 FROM tab1
----
-1495
-6032
-880

query I rowsort
SELECT ALL + col0 + ( col1 ) FROM tab2
----
137
38
96

query I rowsort
SELECT col2 + col1 + 82 AS col0 FROM tab0 AS cor0
----
180
201
255

query I rowsort
SELECT DISTINCT 82 + col0 * ( - col0 ) FROM tab0 AS cor0
----
-1143
-494
-7839

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5262
SELECT CAST( NULL AS SIGNED ) + tab0.col2 - + tab0.col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5262
SELECT CAST ( NULL AS INTEGER ) + tab0.col2 - + tab0.col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 * col2 * - col2 + + col1 FROM tab2
----
-17517
-19652
-54855

query I rowsort
SELECT DISTINCT + col0 * - ( col1 ) AS col2 FROM tab1
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-5265
SELECT ALL col2 DIV - 1 FROM tab0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-5265
SELECT ALL col2 / - 1 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT + col2 * - 2 * tab2.col0 - - 20 AS col0 FROM tab2
----
-358
-4036
-5984

onlyif mysql # use DIV operator for integer division
query I rowsort label-5267
SELECT DISTINCT - 45 * - 27 + + col1 DIV + col1 FROM tab1
----
1216

skipif mysql # not compatible
query I rowsort label-5267
SELECT DISTINCT - 45 * - 27 + + col1 / + col1 FROM tab1
----
1216

onlyif mysql # use DIV operator for integer division
query I rowsort label-5268
SELECT col2 DIV 37 + + col2 AS col1 FROM tab2 AS cor0
----
26
27
39

skipif mysql # not compatible
query I rowsort label-5268
SELECT col2 / 37 + + col2 AS col1 FROM tab2 AS cor0
----
26
27
39

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab2, tab1 cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT ALL col0 + col1 * + col1 FROM tab1
----
164
249
679

query I rowsort
SELECT ALL - 89 FROM tab0 cor0
----
-89
-89
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-5272
SELECT 95 DIV - col0 FROM tab1 cor0
----
-1
-1
-31

skipif mysql # not compatible
query I rowsort label-5272
SELECT 95 / - col0 FROM tab1 cor0
----
-1
-1
-31

query I rowsort
SELECT ALL - 2 + + col2 * col2 FROM tab1 AS cor0
----
2914
3247
9214

query I rowsort
SELECT - col2 * cor0.col2 * + 18 AS col2 FROM tab2 AS cor0
----
-12168
-13122
-25992

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5275
SELECT 35 * + col1 + - CAST( + col0 + col1 AS SIGNED ) FROM tab0 AS cor0
----
2900
3005
3263

skipif mysql # not compatible
query I rowsort label-5275
SELECT 35 * + col1 + - CAST ( + col0 + col1 AS INTEGER ) FROM tab0 AS cor0
----
2900
3005
3263

query I rowsort
SELECT + col1 + - col2 * 23 AS col0 FROM tab0 AS cor0
----
-1795
-673
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-5277
SELECT + 53 DIV col2 AS col0 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5277
SELECT + 53 / col2 AS col0 FROM tab1 cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5278
SELECT + CAST( - col0 AS SIGNED ) * + col2 FROM tab2
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-5278
SELECT + CAST ( - col0 AS INTEGER ) * + col2 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT + ( - cor0.col2 ) AS col1 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT cor0.col1 + + cor0.col2 AS col0 FROM tab0 cor0
----
119
173
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5281
SELECT DISTINCT + col2 * - col1 + + ( 68 + col2 ) * CAST( - col0 AS SIGNED ) FROM tab2 cor0
----
-1502
-8866
-9020

skipif mysql # not compatible
query I rowsort label-5281
SELECT DISTINCT + col2 * - col1 + + ( 68 + col2 ) * CAST ( - col0 AS INTEGER ) FROM tab2 cor0
----
-1502
-8866
-9020

query I rowsort
SELECT ALL col0 * col2 + - 66 * + col2 AS col1 FROM tab1 AS cor0
----
-114
-3402
1344

query I rowsort
SELECT DISTINCT + 10 * - col2 AS col2 FROM tab2 AS cor0
----
-260
-270
-380

query I rowsort
SELECT - - col2 + + col0 AS col0 FROM tab0 cor0
----
171
36
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5285
SELECT - col2 * - CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5285
SELECT - col2 * - CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5286
SELECT DISTINCT + cor0.col2 DIV + 83 AS col2 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5286
SELECT DISTINCT + cor0.col2 / + 83 AS col2 FROM tab2 AS cor0
----
0

query I rowsort
SELECT - - col0 * 75 FROM tab1 AS cor0
----
225
4800
6000

query I rowsort
SELECT - col2 + - col0 * - col2 AS col0 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT DISTINCT + - 41 * - 26 * col1 + + cor0.col0 FROM tab2 AS cor0
----
18201
33053
62972

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5290
SELECT + - CAST( NULL AS SIGNED ) + - col0 * + col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5290
SELECT + - CAST ( NULL AS INTEGER ) + - col0 * + col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 * - cor0.col2 + col2 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT ALL 34 + col2 AS col2 FROM tab1 AS cor0
----
130
88
91

query I rowsort
SELECT 11 * - col2 + col1 FROM tab1 AS cor0
----
-1043
-568
-617

query I rowsort
SELECT DISTINCT - 64 + 96 * col0 FROM tab1 AS cor0
----
224
6080
7616

query I rowsort
SELECT - + col1 + 50 * + col0 FROM tab2 AS cor0
----
319
3841
3933

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5296
SELECT CAST( 82 AS SIGNED ) FROM tab2, tab1 AS cor0
----
9 values hashing to f318fd9dac2de7af4b82cc7574bbca2c

skipif mysql # not compatible
query I rowsort label-5296
SELECT CAST ( 82 AS INTEGER ) FROM tab2, tab1 AS cor0
----
9 values hashing to f318fd9dac2de7af4b82cc7574bbca2c

query I rowsort
SELECT ALL + ( + 35 ) FROM tab1 AS cor0
----
35
35
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-5298
SELECT DISTINCT + 99 DIV col0 + col0 FROM tab2 AS cor0
----
21
79
80

skipif mysql # not compatible
query I rowsort label-5298
SELECT DISTINCT + 99 / col0 + col0 FROM tab2 AS cor0
----
21
79
80

query I rowsort
SELECT DISTINCT + ( + ( col2 ) ) + cor0.col0 * + ( cor0.col0 ) FROM tab0 AS cor0
----
1226
609
8003

onlyif mysql # use DIV operator for integer division
query I rowsort label-5300
SELECT + + CAST( + 62 AS SIGNED ) * col2 + 86 DIV 24 col2 FROM tab1 AS cor0
----
3351
3537
5955

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5300
SELECT + + CAST ( + 62 AS INTEGER ) * col2 + 86 / 24 col2 FROM tab1 AS cor0
----
3351
3537
5955

query I rowsort
SELECT + 70 * + col1 + col1 FROM tab0 AS cor0
----
6106
6461
6887

onlyif mysql # use DIV operator for integer division
query I rowsort label-5302
SELECT DISTINCT 51 DIV 84 AS col2 FROM tab0 cor0
----
0

skipif mysql # not compatible
query I rowsort label-5302
SELECT DISTINCT 51 / 84 AS col2 FROM tab0 cor0
----
0

query I rowsort
SELECT - col0 - + 63 AS col1 FROM tab1 AS cor0
----
-127
-143
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + cor0.col0 - col2 col2 FROM tab0 AS cor0
----
-63
-84
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col1 ) + + col0 col2 FROM tab0 AS cor0
----
-2
-62
-62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5306
SELECT - 47 - col1 * + col1 / + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5306
SELECT - 47 - col1 * + col1 / + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 + ( cor0.col1 * + col0 ) FROM tab0 AS cor0
----
1978
3298
8008

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5308
SELECT ALL + CAST( NULL AS SIGNED ) * - cor0.col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5308
SELECT ALL + CAST ( NULL AS INTEGER ) * - cor0.col0 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col0 + 55 * cor0.col1 FROM tab0 AS cor0
----
4754
5094
5370

query I rowsort
SELECT ALL - ( - col2 ) * + col1 AS col0 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT ALL + col0 * col2 + + col2 * col0 AS col0 FROM tab1
----
15360
324
7296

query I rowsort
SELECT - - 73 + - col1 FROM tab1 AS cor0
----
47
60
63

query I rowsort
SELECT ALL + 23 + col1 AS col2 FROM tab0 cor0
----
109
114
120

query I rowsort
SELECT 47 * + col0 FROM tab0 AS cor0
----
1128
1645
4183

query I rowsort
SELECT ALL + 27 - 81 AS col2 FROM tab2 AS cor0
----
-54
-54
-54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col0 * - col2 * - col1 col0 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT ALL - col1 + - col1 * col1 FROM tab1 AS cor0
----
-110
-182
-702

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 31 + + col1 col2 FROM tab0
----
55
60
66

query I rowsort
SELECT ALL + col1 * ( + col2 ) * col2 + - col0 AS col2 FROM tab2
----
22592
24469
39806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col1 * + 65 col2 FROM tab0, tab0 AS cor0
----
9 values hashing to edfae966106cfaf85979f53f0918df72

query I rowsort
SELECT ALL - tab2.col0 * col2 * col1 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT - tab1.col1 * col0 * 38 FROM tab1
----
-24320
-2964
-39520

onlyif mysql # use DIV operator for integer division
query I rowsort label-5323
SELECT + col1 DIV + tab2.col0 + col2 AS col1 FROM tab2
----
26
31
38

skipif mysql # not compatible
query I rowsort label-5323
SELECT + col1 / + tab2.col0 + col2 AS col1 FROM tab2
----
26
31
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-5324
SELECT DISTINCT + col2 DIV - ( + col2 ) + + col1 AS col1 FROM tab1 AS cor0
----
12
25
9

skipif mysql # not compatible
query I rowsort label-5324
SELECT DISTINCT + col2 / - ( + col2 ) + + col1 AS col1 FROM tab1 AS cor0
----
12
25
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-5325
SELECT - cor0.col2 DIV col0 FROM tab2 AS cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-5325
SELECT - cor0.col2 / col0 FROM tab2 AS cor0
----
-3
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5326
SELECT + col0 * + col1 + - col2 DIV + col0 FROM tab1
----
1039
60
640

skipif mysql # not compatible
query I rowsort label-5326
SELECT + col0 * + col1 + - col2 / + col0 FROM tab1
----
1039
60
640

query I rowsort
SELECT + col0 * col2 + col2 FROM tab2 cor0
----
2054
216
3040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + col1 col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2
----
26
27
38

query I rowsort
SELECT col0 + col2 AS col2 FROM tab1 WHERE NULL NOT BETWEEN col1 AND ( col0 )
----

query I rowsort
SELECT DISTINCT cor0.col0 AS col1 FROM tab1, tab2 AS cor0 CROSS JOIN tab0
----
7
78
79

query III rowsort
SELECT * FROM tab0 WHERE ( NULL ) IN ( - col1 * col1 )
----

query I rowsort
SELECT col1 / col0 AS col1 FROM tab0 WHERE NULL <> col1
----

query III rowsort
SELECT * FROM tab2 WHERE NOT - col0 * + col2 BETWEEN NULL AND NULL
----

query I rowsort
SELECT tab0.col1 + col1 * + col1 AS col2 FROM tab0
----
7482
8372
9506

query III rowsort
SELECT ALL * FROM tab1 AS cor0 WHERE NULL BETWEEN - col1 AND col1
----

query I rowsort
SELECT DISTINCT + cor0.col1 * + cor0.col0 + col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT DISTINCT tab0.col1 + col1 * - col2 AS col1 FROM tab0
----
-2752
-7371
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5339
SELECT ALL col1 * col0 DIV col0 + col0 FROM tab2
----
137
38
96

skipif mysql # not compatible
query I rowsort label-5339
SELECT ALL col1 * col0 / col0 + col0 FROM tab2
----
137
38
96

query I rowsort
SELECT DISTINCT - col0 + col1 * + col0 AS col1 FROM tab0
----
2040
3360
8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-5341
SELECT DISTINCT - col2 * col0 DIV + col1 + tab2.col1 + col0 AS col2 FROM tab2
----
-80
103
32

skipif mysql # not compatible
query I rowsort label-5341
SELECT DISTINCT - col2 * col0 / + col1 + tab2.col1 + col0 AS col2 FROM tab2
----
-80
103
32

query I rowsort
SELECT + col1 + - col1 + + col2 AS col2 FROM tab1
----
54
57
96

query I rowsort
SELECT ALL + col1 * + cor0.col1 FROM tab2 AS cor0
----
289
3481
961

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE ( NULL ) NOT BETWEEN col0 AND NULL AND ( col0 * col0 ) NOT BETWEEN col1 * - col2 AND - col2
----

query I rowsort
SELECT ALL col2 * col0 * - col2 FROM tab1 AS cor0
----
-207936
-737280
-8748

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * - col2 col1 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-5347
SELECT ALL - - col0 * + col2 + - col0 DIV - cor0.col2 AS col2 FROM tab0 AS cor0
----
70
7299
792

skipif mysql # not compatible
query I rowsort label-5347
SELECT ALL - - col0 * + col2 + - col0 / - cor0.col2 AS col2 FROM tab0 AS cor0
----
70
7299
792

query I rowsort
SELECT ALL + + col1 * col2 + + col0 + + col0 * cor0.col1 * - col0 FROM tab2 AS cor0
----
-105372
-357344
-675

query I rowsort
SELECT - col1 + col1 * col1 AS col1 FROM tab1 AS cor0
----
156
650
90

query I rowsort
SELECT ALL - col0 * - col1 * col0 FROM tab0 AS cor0
----
118825
49536
720811

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col1 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT DISTINCT - col0 * col0 - + col1 FROM tab0
----
-1322
-662
-8012

query I rowsort
SELECT col0 + col1 * + col0 FROM tab1
----
1120
704
81

query I rowsort
SELECT + col0 + - col2 * col1 AS col2 FROM tab1
----
-1168
-1401
-506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col0 * - col1 col2 FROM tab2
----
-106097
-1519
-358956

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 - col1 col0 FROM tab2
----
-33
-4
21

query I rowsort
SELECT DISTINCT + col2 * + col2 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT - cor0.col1 + + col1 * col1 * col2 FROM tab1 AS cor0
----
16211
36478
5690

query I rowsort
SELECT + cor0.col1 * - col0 + col1 AS col2 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT ALL - ( col1 ) * cor0.col1 * + ( - col1 ) FROM tab0 AS cor0
----
636056
753571
912673

onlyif mysql # use DIV operator for integer division
query I rowsort label-5361
SELECT - cor0.col1 * 58 DIV col2 + cor0.col2 AS col1 FROM tab1 AS cor0
----
27
47
89

skipif mysql # not compatible
query I rowsort label-5361
SELECT - cor0.col1 * 58 / col2 + cor0.col2 AS col1 FROM tab1 AS cor0
----
27
47
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5362
SELECT + col1 * CAST( NULL AS SIGNED ) + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5362
SELECT + col1 * CAST ( NULL AS INTEGER ) + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 + 91 AS col1 FROM tab2 AS cor0
----
169
170
98

query I rowsort
SELECT + ( tab1.col0 + - col0 ) FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col1 * 2 AS col0 FROM tab2, tab1 AS cor0
----
20
26
52

query I rowsort
SELECT + col0 FROM tab2 WHERE NOT NULL BETWEEN - col1 + col0 AND col0 / + col1
----

query I rowsort
SELECT ALL col0 - + tab1.col2 * - col2 FROM tab1
----
2919
3313
9296

query III rowsort
SELECT * FROM tab0 WHERE - col2 <= NULL
----

query I rowsort
SELECT ALL - col0 * + col2 + - col0 AS col2 FROM tab1
----
-165
-3712
-7760

query I rowsort
SELECT - col2 + + col1 AS col0 FROM tab2
----
-21
33
4

query I rowsort
SELECT col1 * col0 AS col2 FROM tab0 WHERE NOT col2 >= ( NULL )
----

query I rowsort
SELECT col2 - col1 * - tab0.col2 * - tab0.col0 FROM tab0
----
-3394
-664036
-68079

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 col1 FROM tab1 WHERE NOT ( NULL ) NOT IN ( + tab1.col0 * + col1 - + col2 * tab1.col0 )
----

query I rowsort
SELECT col1 FROM tab1 WHERE NULL IN ( col2 * - col1 - - tab1.col2 )
----

query I rowsort
SELECT DISTINCT col2 - - tab0.col0 FROM tab0
----
171
36
57

query I rowsort
SELECT DISTINCT col0 - col1 AS col0 FROM tab1
----
-23
54
67

query I rowsort
SELECT + col2 AS col2 FROM tab2 WHERE NOT NULL NOT IN ( col1 )
----

query I rowsort
SELECT DISTINCT + tab2.col0 * + col1 * col0 AS col1 FROM tab2
----
106097
1519
358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-5379
SELECT + col2 * col2 DIV + col1 - col2 FROM tab2
----
-15
-4
46

skipif mysql # not compatible
query I rowsort label-5379
SELECT + col2 * col2 / + col1 - col2 FROM tab2
----
-15
-4
46

query I rowsort
SELECT - col0 + tab2.col2 AS col1 FROM tab2
----
-41
-52
20

query I rowsort
SELECT ALL + col2 + - tab1.col2 + - col0 AS col2 FROM tab1
----
-3
-64
-80

query III rowsort
SELECT ALL * FROM tab0 WHERE NULL BETWEEN NULL AND ( col0 * - col2 - col1 )
----

query I rowsort
SELECT ALL col0 - col2 * + col2 AS col1 FROM tab0
----
-1065
-6635
34

query I rowsort
SELECT ALL + col0 - - col0 AS col1 FROM tab2
----
14
156
158

query I rowsort
SELECT DISTINCT col2 - col2 AS col0 FROM tab0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5386
SELECT col2 + col1 DIV col2 AS col2 FROM tab0
----
35
83
98

skipif mysql # not compatible
query I rowsort label-5386
SELECT col2 + col1 / col2 AS col2 FROM tab0
----
35
83
98

query I rowsort
SELECT - 64 * col1 AS col1 FROM tab2
----
-1088
-1984
-3776

query I rowsort
SELECT ALL col1 * + col1 * + ( col2 ) AS col1 FROM tab2
----
10982
25947
90506

query I rowsort
SELECT + col1 + - ( - 49 ) + col2 AS col0 FROM tab0 AS cor0
----
147
168
222

query I rowsort
SELECT ALL + col2 - tab0.col1 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT col1 + - col0 + col2 * 96 * col2 FROM tab2
----
138562
64877
70008

query I rowsort
SELECT col2 * 15 + + col2 + col1 * col2 FROM tab2 AS cor0
----
1254
1269
1950

query I rowsort
SELECT + + col2 + - col1 * + col0 * - col1 + + col0 FROM tab1 cor0
----
13696
2085
6521

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5394
SELECT + col1 * CAST( NULL AS DECIMAL ) - + cor0.col0 * col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5394
SELECT + col1 * CAST ( NULL AS REAL ) - + cor0.col0 * col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - col2 + + 3 + - col2 * col2 FROM tab0 AS cor0
----
-1053
-6639
3

query I rowsort
SELECT DISTINCT cor0.col0 * - ( cor0.col2 ) AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-5397
SELECT DISTINCT - + col0 DIV + 16 AS col1 FROM tab0 AS cor0
----
-1
-2
-5

skipif mysql # not compatible
query I rowsort label-5397
SELECT DISTINCT - + col0 / + 16 AS col1 FROM tab0 AS cor0
----
-1
-2
-5

onlyif mysql # use DIV operator for integer division
query I rowsort label-5398
SELECT + + col2 DIV col0 + col0 * + col2 + col2 AS col0 FROM tab2 AS cor0
----
2054
219
3040

skipif mysql # not compatible
query I rowsort label-5398
SELECT + + col2 / col0 + col0 * + col2 + col2 AS col0 FROM tab2 AS cor0
----
2054
219
3040

query I rowsort
SELECT ALL col1 * + 41 + + 56 * col0 * + col0 AS col0 FROM tab0 AS cor0
----
35782
447307
72577

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5400
SELECT DISTINCT col1 + CAST( col2 AS SIGNED ) FROM tab0 AS cor0
----
119
173
98

skipif mysql # not compatible
query I rowsort label-5400
SELECT DISTINCT col1 + CAST ( col2 AS INTEGER ) FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ( + col1 ) * col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + 82 * col1 FROM tab1 AS cor0
----
1066
2132
820

onlyif mysql # use DIV operator for integer division
query I rowsort label-5403
SELECT - col1 + - cor0.col0 DIV - col0 FROM tab2 AS cor0
----
-16
-30
-58

skipif mysql # not compatible
query I rowsort label-5403
SELECT - col1 + - cor0.col0 / - col0 FROM tab2 AS cor0
----
-16
-30
-58

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab2, tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT - - 60 AS col2 FROM tab1 AS cor0
----
60
60
60

query I rowsort
SELECT ALL - ( - col2 ) + - col0 AS col2 FROM tab0 cor0
----
-34
-7
9

query I rowsort
SELECT ALL + col1 * col0 + col2 * col2 FROM tab1 AS cor0
----
10256
2994
3889

query I rowsort
SELECT ALL + col2 + col1 + col1 AS col2 FROM tab0 cor0
----
195
205
264

query I rowsort
SELECT DISTINCT - 27 * col0 * col1 - - col1 * - col1 FROM tab0 AS cor0
----
-101074
-226954
-63124

query I rowsort
SELECT - 81 AS col2 FROM tab0
----
-81
-81
-81

query I rowsort
SELECT col1 + + col0 * + col1 AS col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT ALL 72 + col1 * cor0.col1 * - col0 FROM tab2 AS cor0
----
-22759
-271446
-6655

query I rowsort
SELECT DISTINCT col1 * col2 + + cor0.col1 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT DISTINCT + ( + col1 ) + + col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT - cor0.col1 * col2 - + col2 AS col2 FROM tab0 cor0
----
-2871
-7544
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 33 col0 FROM tab0 AS cor0
----
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 + + col2 * col2 col0 FROM tab1 AS cor0
----
2862
3192
9120

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 37 * - col0 col2 FROM tab0 AS cor0
----
-1295
-3293
-888

onlyif mysql # use DIV operator for integer division
query I rowsort label-5419
SELECT DISTINCT + cor0.col1 DIV + col1 col2 FROM tab1 AS cor0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5419
SELECT DISTINCT + cor0.col1 / + col1 col2 FROM tab1 AS cor0
----
1

query I rowsort
SELECT DISTINCT - + col0 + + col1 AS col1 FROM tab0 AS cor0
----
2
62

query I rowsort
SELECT 94 + + col1 AS col2 FROM tab1
----
104
107
120

query I rowsort
SELECT ( 28 ) + col2 + col1 FROM tab1 cor0
----
108
137
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-5423
SELECT - + 93 DIV - ( col1 * - col2 ) col0 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5423
SELECT - + 93 / - ( col1 * - col2 ) col0 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5424
SELECT DISTINCT - cor0.col0 DIV - cor0.col2 + + cor0.col2 FROM tab0 cor0
----
33
36
83

skipif mysql # not compatible
query I rowsort label-5424
SELECT DISTINCT - cor0.col0 / - cor0.col2 + + cor0.col2 FROM tab0 cor0
----
33
36
83

query I rowsort
SELECT DISTINCT - col0 * + 83 AS col1 FROM tab1 AS cor0
----
-249
-5312
-6640

query I rowsort
SELECT DISTINCT - col2 + tab1.col1 AS col0 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT ALL 96 * + tab1.col2 AS col1 FROM tab1
----
5184
5472
9216

query I rowsort
SELECT col2 + 86 AS col1 FROM tab1
----
140
143
182

query I rowsort
SELECT + ( cor0.col1 ) * - cor0.col2 + col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT DISTINCT 70 - + cor0.col2 AS col2 FROM tab1 AS cor0
----
-26
13
16

query I rowsort
SELECT + ( - ( - col1 ) * col1 ) + - tab0.col0 AS col2 FROM tab0
----
7372
8192
9374

query I rowsort
SELECT ALL 55 * + col2 FROM tab1
----
2970
3135
5280

onlyif mysql # use DIV operator for integer division
query I rowsort label-5433
SELECT ( + tab0.col1 ) * + col2 + + col2 DIV col2 AS col2 FROM tab0
----
2839
7463
98

skipif mysql # not compatible
query I rowsort label-5433
SELECT ( + tab0.col1 ) * + col2 + + col2 / col2 AS col2 FROM tab0
----
2839
7463
98

query I rowsort
SELECT - 29 + ( cor0.col2 ) FROM tab2 AS cor0
----
-2
-3
9

query I rowsort
SELECT DISTINCT - col2 * 44 + col1 * col2 * + col0 FROM tab1 AS cor0
----
1836
33972
95616

onlyif mysql # use DIV operator for integer division
query I rowsort label-5436
SELECT col1 * 8 DIV col2 + 98 AS col2 FROM tab1 AS cor0
----
101
99
99

skipif mysql # not compatible
query I rowsort label-5436
SELECT col1 * 8 / col2 + 98 AS col2 FROM tab1 AS cor0
----
101
99
99

query I rowsort
SELECT + cor0.col2 + col0 * col0 AS col2 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT DISTINCT + - 23 + col0 AS col0 FROM tab0 AS cor0
----
1
12
66

query I rowsort
SELECT ALL + + col2 * - col2 AS col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT - col2 - + col1 FROM tab0 cor0
----
-119
-173
-98

query I rowsort
SELECT - 0 * col0 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 4 + col1 * - col0 col0 FROM tab0 cor0
----
-2060
-3391
-8095

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 3 + + 39 * + col1 col0 FROM tab2 AS cor0
----
1212
2304
666

query I rowsort
SELECT - + col1 - + col1 FROM tab1 AS cor0
----
-20
-26
-52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 3 * + col2 + + col0 col1 FROM tab1 cor0
----
165
235
368

query I rowsort
SELECT DISTINCT col2 * 78 * col0 AS col2 FROM tab1 AS cor0
----
12636
284544
599040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 56 col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 9c4523312174730bbc525b9977aa99fa

query I rowsort
SELECT col2 * col0 + col1 * tab1.col0 + - 52 * + col1 AS col1 FROM tab1
----
-1112
3768
8044

onlyif mysql # use DIV operator for integer division
query I rowsort label-5449
SELECT col0 DIV + ( col2 ) FROM tab0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-5449
SELECT col0 / + ( col2 ) FROM tab0
----
0
1
35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5450
SELECT - col1 + CAST( col1 AS SIGNED ) AS col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5450
SELECT - col1 + CAST ( col1 AS INTEGER ) AS col2 FROM tab1
----
0
0
0

query I rowsort
SELECT + tab1.col0 * - ( col0 ) AS col1 FROM tab1
----
-4096
-6400
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col2 col1 FROM tab0, tab2 cor0, tab0 cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT DISTINCT - col2 * col0 * - col0 AS col2 FROM tab1 cor0
----
233472
486
614400

query I rowsort
SELECT ALL + col1 * ( + col2 ) AS col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - 85 * col2 FROM tab2
----
-2210
-2295
-3230

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * cor0.col2 col0 FROM tab0 AS cor0
----
1
1089
6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-5457
SELECT - - col2 DIV + 17 FROM tab1 AS cor0
----
3
3
5

skipif mysql # not compatible
query I rowsort label-5457
SELECT - - col2 / + 17 FROM tab1 AS cor0
----
3
3
5

query I rowsort
SELECT + + 78 * col1 AS col2 FROM tab0 cor0
----
6708
7098
7566

query I rowsort
SELECT DISTINCT + 78 * - col1 AS col1 FROM tab1 AS cor0
----
-1014
-2028
-780

query I rowsort
SELECT ALL + 34 * col1 + 78 + - col1 * + col1 FROM tab2 cor0
----
-1397
171
367

query I rowsort
SELECT - + 32 * - col0 + ( - col1 ) * col1 FROM tab2 AS cor0
----
-737
-985
2239

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - 98 col0 FROM tab0 AS cor0
----
-3234
-8036
-98

query I rowsort
SELECT + - col0 * col1 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT col1 + + col2 * col2 * col2 FROM tab0 AS cor0
----
36023
551459
98

query I rowsort
SELECT - col2 + ( - col2 ) AS col0 FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT col1 * ( 64 ) * + col2 AS col2 FROM tab2 AS cor0
----
41344
53568
98176

query I rowsort
SELECT 9 AS col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to ebef7303942834ca1e6ca8604ec18a07

query I rowsort
SELECT DISTINCT + 29 + col2 * - 25 FROM tab2 AS cor0
----
-621
-646
-921

query I rowsort
SELECT DISTINCT + col0 - + col2 AS col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT cor0.col0 + 0 * 63 AS col1 FROM tab1, tab1 cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT ALL - col2 - cor0.col0 AS col2 FROM tab2 cor0
----
-104
-117
-34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5472
SELECT ALL - CAST( - 55 AS SIGNED ) FROM tab2
----
55
55
55

skipif mysql # not compatible
query I rowsort label-5472
SELECT ALL - CAST ( - 55 AS INTEGER ) FROM tab2
----
55
55
55

query I rowsort
SELECT DISTINCT - + col1 * + col0 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL + 25 * + cor0.col2 + - col2 + - col0 FROM tab0 AS cor0
----
-11
1879
768

onlyif mysql # use DIV operator for integer division
query I rowsort label-5475
SELECT + 24 DIV col1 + - col0 + + col0 * col2 FROM tab2
----
182
1950
2924

skipif mysql # not compatible
query I rowsort label-5475
SELECT + 24 / col1 + - col0 + + col0 * col2 FROM tab2
----
182
1950
2924

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5476
SELECT col2 + - CAST( - col1 * col1 + cor0.col0 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
185
727
93

skipif mysql # not compatible
query I rowsort label-5476
SELECT col2 + - CAST ( - col1 * col1 + cor0.col0 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
185
727
93

query I rowsort
SELECT - 43 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 2f72bd9cab68c8d8c38874510a290a3c

onlyif mysql # use DIV operator for integer division
query I rowsort label-5478
SELECT col1 DIV tab0.col2 + 68 AS col0 FROM tab0
----
165
69
70

skipif mysql # not compatible
query I rowsort label-5478
SELECT col1 / tab0.col2 + 68 AS col0 FROM tab0
----
165
69
70

query I rowsort
SELECT - 46 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 5a5d45989dcc6a06d9ee5a08945518f9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 - - col2 col1 FROM tab0
----
119
173
98

query I rowsort
SELECT col2 + col0 + tab2.col0 FROM tab2
----
182
196
41

query I rowsort
SELECT - 95 - - col1 FROM tab0
----
-4
-9
2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5483
SELECT col2 * + CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5483
SELECT col2 * + CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 * + ( + col1 ) FROM tab0
----
2838
7462
97

query I rowsort
SELECT 90 AS col2 FROM tab2, tab0, tab1 AS cor0, tab1
----
81 values hashing to 3b4644ef0734ed220952cae7e0648c4b

query I rowsort
SELECT 29 AS col1 FROM tab0, tab1 cor0
----
9 values hashing to 1e7120ba8e9191084172ddced17e5eb2

query I rowsort
SELECT + + col1 + - cor0.col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - cor0.col0 + col2 AS col2 FROM tab2 AS cor0
----
-41
-52
20

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5489
SELECT ALL CAST( col0 AS SIGNED ) - - col1 AS col2 FROM tab0 AS cor0
----
110
132
180

skipif mysql # not compatible
query I rowsort label-5489
SELECT ALL CAST ( col0 AS INTEGER ) - - col1 AS col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL col1 * + ( cor0.col2 + cor0.col1 * col2 ) AS col1 FROM tab2 AS cor0
----
11628
26784
92040

query I rowsort
SELECT DISTINCT - col0 + - col2 AS col1 FROM tab0 cor0
----
-171
-36
-57

query I rowsort
SELECT DISTINCT col2 + + col0 * - cor0.col2 AS col1 FROM tab1 cor0
----
-108
-3591
-7584

query I rowsort
SELECT + 85 * col0 AS col0 FROM tab0 AS cor0
----
2040
2975
7565

query I rowsort
SELECT - col1 * ( + col2 ) AS col2 FROM tab1
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-5495
SELECT col2 - col0 DIV col0 AS col2 FROM tab0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-5495
SELECT col2 - col0 / col0 AS col2 FROM tab0
----
0
32
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * + 84 + - col1 col0 FROM tab1
----
226
5366
6707

query I rowsort
SELECT tab1.col0 * tab1.col1 AS col0 FROM tab1
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-5498
SELECT DISTINCT + tab2.col1 DIV + ( + ( col0 ) ) FROM tab2
----
0
4

skipif mysql # not compatible
query I rowsort label-5498
SELECT DISTINCT + tab2.col1 / + ( + ( col0 ) ) FROM tab2
----
0
4

query I rowsort
SELECT ( 95 ) FROM tab1 AS cor0
----
95
95
95

query I rowsort
SELECT ( ( + col0 ) ) + col2 * 46 FROM tab1 AS cor0
----
2487
2686
4496

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col1 + + tab2.col1 ) col2 FROM tab2
----
118
34
62

query I rowsort
SELECT ALL + col2 + - 92 AS col1 FROM tab1 AS cor0
----
-35
-38
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-5503
SELECT + 79 DIV + col1 FROM tab2 AS cor0
----
1
2
4

skipif mysql # not compatible
query I rowsort label-5503
SELECT + 79 / + col1 FROM tab2 AS cor0
----
1
2
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * + ( col0 ) col0 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-5505
SELECT DISTINCT + col2 + col1 DIV col0 FROM tab1
----
57
62
96

skipif mysql # not compatible
query I rowsort label-5505
SELECT DISTINCT + col2 + col1 / col0 FROM tab1
----
57
62
96

query I rowsort
SELECT 66 + - ( - col1 ) * - tab1.col2 AS col0 FROM tab1
----
-1182
-1338
-504

query I rowsort
SELECT DISTINCT + ( ( + col1 ) ) FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT 21 + - 45 AS col2 FROM tab0 AS cor0
----
-24

onlyif mysql # use DIV operator for integer division
query I rowsort label-5509
SELECT ALL - ( col0 ) DIV - col0 AS col0 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5509
SELECT ALL - ( col0 ) / - col0 AS col0 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT + ( + tab2.col2 ) + col2 * - col1 FROM tab2
----
-1508
-608
-810

query I rowsort
SELECT - tab0.col0 + 75 FROM tab0
----
-14
40
51

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 6e0b7d583bc2c53842166d3e6ba2d6d2

query I rowsort
SELECT + 15 * + cor0.col2 AS col2 FROM tab0 AS cor0
----
1230
15
495

query I rowsort
SELECT ALL 43 * + col0 FROM tab0
----
1032
1505
3827

query I rowsort
SELECT + + 45 * col0 AS col0 FROM tab0 AS cor0
----
1080
1575
4005

query I rowsort
SELECT ALL - 16 * - col1 FROM tab0 AS cor0
----
1376
1456
1552

onlyif mysql # use DIV operator for integer division
query I rowsort label-5517
SELECT - + 65 DIV + col2 AS col2 FROM tab1 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-5517
SELECT - + 65 / + col2 AS col2 FROM tab1 AS cor0
----
-1
-1
0

query I rowsort
SELECT ALL col0 * cor0.col2 AS col2 FROM tab1 cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-5519
SELECT ALL + col1 * col0 DIV col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-5519
SELECT ALL + col1 * col0 / col1 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + 11 * col2 AS col2 FROM tab0 AS cor0
----
11
363
902

query I rowsort
SELECT + col2 * + col2 + - col2 FROM tab0 AS cor0
----
0
1056
6642

query I rowsort
SELECT ALL - - cor0.col0 + + cor0.col2 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5523
SELECT DISTINCT cor1.col0 + + CAST( NULL AS SIGNED ) AS col2 FROM tab1 cor0 CROSS JOIN tab1, tab2 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-5523
SELECT DISTINCT cor1.col0 + + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 cor0 CROSS JOIN tab1, tab2 AS cor1
----
NULL

query I rowsort
SELECT DISTINCT - col0 + - 34 * col0 AS col0 FROM tab2 AS cor0
----
-245
-2730
-2765

query I rowsort
SELECT ALL cor0.col0 * + col0 - ( col1 + - 47 ) * col1 AS col1 FROM tab1 cor0
----
4466
555
6842

query I rowsort
SELECT ALL - col2 * 11 FROM tab1 AS cor0
----
-1056
-594
-627

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5527
SELECT DISTINCT + col2 / + CAST( NULL AS DECIMAL ) + cor0.col1 AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5527
SELECT DISTINCT + col2 / + CAST ( NULL AS REAL ) + cor0.col1 AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + + cor0.col1 * col1 + ( col0 * - 9 + cor0.col0 ) AS col2 FROM tab2 AS cor0
----
-343
2857
905

query I rowsort
SELECT + col2 * - col0 + 88 - col0 FROM tab2 AS cor0
----
-108
-2018
-2993

query I rowsort
SELECT - col1 - col1 AS col0 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT DISTINCT - col0 * ( col0 ) + col0 FROM tab2 cor0
----
-42
-6006
-6162

query I rowsort
SELECT DISTINCT - + cor0.col2 * ( col0 ) + col1 * 68 FROM tab0 AS cor0
----
-1110
5056
6561

query I rowsort
SELECT DISTINCT - col0 * col2 + col2 - col2 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-5534
SELECT col1 * ( col0 ) + + col1 DIV - 59 AS col2 FROM tab2 AS cor0
----
1343
217
4601

skipif mysql # not compatible
query I rowsort label-5534
SELECT col1 * ( col0 ) + + col1 / - 59 AS col2 FROM tab2 AS cor0
----
1343
217
4601

query I rowsort
SELECT ALL + cor0.col0 + - col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5536
SELECT col0 * + 84 * cor0.col0 + - col0 DIV 75 AS col2 FROM tab0 AS cor0
----
102900
48384
665363

skipif mysql # not compatible
query I rowsort label-5536
SELECT col0 * + 84 * cor0.col0 + - col0 / 75 AS col2 FROM tab0 AS cor0
----
102900
48384
665363

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5537
SELECT DISTINCT - CAST( NULL AS SIGNED ) * cor0.col1 + cor0.col1 * 77 AS col1 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5537
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * cor0.col1 + cor0.col1 * 77 AS col1 FROM tab2 cor0
----
NULL

query I rowsort
SELECT ALL 98 + col1 * - col1 FROM tab0 AS cor0
----
-7298
-8183
-9311

query I rowsort
SELECT 69 FROM tab0, tab0 AS cor0, tab1 cor1, tab1 AS cor2
----
81 values hashing to dfada1ee7a4e3e5c74a063a1282769f9

query I rowsort
SELECT ALL 7 AS col0 FROM tab0, tab2 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to bd991c690468eea3ef45a96817ca3617

query I rowsort
SELECT ALL - + col1 * col0 + - cor0.col2 AS col2 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT DISTINCT 6 + col2 FROM tab0 cor0
----
39
7
88

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-5544
SELECT - col1 * col1 + - col1 DIV - cor0.col1 FROM tab0 cor0
----
-7395
-8280
-9408

skipif mysql # not compatible
query I rowsort label-5544
SELECT - col1 * col1 + - col1 / - cor0.col1 FROM tab0 cor0
----
-7395
-8280
-9408

query I rowsort
SELECT DISTINCT - 64 + + col1 FROM tab2 cor0
----
-33
-47
-5

query I rowsort
SELECT - - col1 * col0 + + col2 FROM tab2 AS cor0
----
1381
244
4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-5547
SELECT DISTINCT + col1 * tab2.col1 + col1 DIV + col1 FROM tab2
----
290
3482
962

skipif mysql # not compatible
query I rowsort label-5547
SELECT DISTINCT + col1 * tab2.col1 + col1 / + col1 FROM tab2
----
290
3482
962

query I rowsort
SELECT ALL + 51 * - cor0.col2 + col0 AS col0 FROM tab1 AS cor0
----
-2751
-2843
-4816

query I rowsort
SELECT DISTINCT cor0.col2 + + col1 * col2 * - col2 AS col1 FROM tab2 AS cor0
----
-22572
-24510
-39858

query I rowsort
SELECT + 81 + col2 FROM tab1 AS cor0
----
135
138
177

query I rowsort
SELECT ALL + + col0 * col0 * col2 + col0 * + col2 FROM tab2 AS cor0
----
1512
160212
240160

query I rowsort
SELECT + - 49 * col2 * ( - 74 ) AS col0 FROM tab0 cor0
----
119658
297332
3626

query I rowsort
SELECT ALL - - ( + col0 ) + col1 AS col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + + 8 - col1 * 48 AS col2 FROM tab1 AS cor0
----
-1240
-472
-616

query I rowsort
SELECT ALL ( col0 ) * - col1 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL + 42 * col1 * - col0 AS col2 FROM tab2 AS cor0
----
-193284
-56406
-9114

query I rowsort
SELECT DISTINCT + col2 + col2 AS col1 FROM tab2 cor0
----
52
54
76

query I rowsort
SELECT DISTINCT + + col1 * + col1 + col1 FROM tab1 AS cor0
----
110
182
702

query I rowsort
SELECT ALL + + cor0.col2 * col1 + 8 AS col1 FROM tab0 AS cor0
----
105
2846
7470

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col0 + col0 col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + 44 + 45 FROM tab0 AS cor0
----
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5562
SELECT DISTINCT + 24 * ( + col2 * 28 ) - col0 * + col0 * ( + col1 + + col2 * + CAST( NULL AS SIGNED ) ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5562
SELECT DISTINCT + 24 * ( + col2 * 28 ) - col0 * + col0 * ( + col1 + + col2 * + CAST ( NULL AS INTEGER ) ) FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL - ( - ( + cor0.col1 ) ) * col2 AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL 42 + + col2 * + col2 - 92 AS col2 FROM tab0 cor0
----
-49
1039
6674

query I rowsort
SELECT - ( col0 ) + col2 * + 48 AS col1 FROM tab1 AS cor0
----
2589
2672
4528

query I rowsort
SELECT DISTINCT 52 + 15 FROM tab2 AS cor0
----
67

query I rowsort
SELECT ALL + cor0.col0 * ( - col0 ) + col2 AS col0 FROM tab1 AS cor0
----
-4039
-6304
45

query I rowsort
SELECT ALL + col0 - 36 AS col2 FROM tab0 cor0
----
-1
-12
53

query I rowsort
SELECT - cor2.col0 FROM tab1 AS cor0 CROSS JOIN tab2, tab0 cor1, tab2 AS cor2
----
81 values hashing to adaea38eae032c1639715f21831dd376

onlyif mysql # use DIV operator for integer division
query I rowsort label-5570
SELECT DISTINCT - col0 + tab1.col1 DIV ( col2 ) AS col2 FROM tab1
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-5570
SELECT DISTINCT - col0 + tab1.col1 / ( col2 ) AS col2 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT cor1.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT DISTINCT col0 + tab0.col1 AS col1 FROM tab0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-5573
SELECT + - col2 + + cor0.col0 DIV col2 FROM tab1 AS cor0
----
-54
-56
-96

skipif mysql # not compatible
query I rowsort label-5573
SELECT + - col2 + + cor0.col0 / col2 FROM tab1 AS cor0
----
-54
-56
-96

query I rowsort
SELECT ALL + 49 AS col1 FROM tab1, tab1 cor0
----
9 values hashing to cb40783c0fff72e8802cdf0682e7cb55

query I rowsort
SELECT DISTINCT - cor0.col0 * - cor0.col0 FROM tab0, tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT + + cor0.col0 * - 4 * 38 FROM tab2, tab2 AS cor0
----
9 values hashing to 073238a46b444c19a89919a6d3c14ded

query I rowsort
SELECT col1 + + tab0.col1 * + col1 FROM tab0
----
7482
8372
9506

query I rowsort
SELECT - 76 + + tab1.col1 * - col2 FROM tab1
----
-1324
-1480
-646

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5579
SELECT DISTINCT CAST( - col2 AS SIGNED ) FROM tab2
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-5579
SELECT DISTINCT CAST ( - col2 AS INTEGER ) FROM tab2
----
-26
-27
-38

query I rowsort
SELECT ALL + ( ( col2 ) ) AS col1 FROM tab1
----
54
57
96

query I rowsort
SELECT DISTINCT - - cor0.col0 + 28 FROM tab1 AS cor0
----
108
31
92

query I rowsort
SELECT col2 * 72 FROM tab0 AS cor0
----
2376
5904
72

query I rowsort
SELECT ALL cor0.col0 * cor0.col0 * + tab2.col1 FROM tab2, tab0 cor0
----
9 values hashing to ee4d5e40ce2b6b9170b64452c2d40556

query I rowsort
SELECT - 15 * + col2 FROM tab1 cor0
----
-1440
-810
-855

query I rowsort
SELECT + 50 AS col0 FROM tab2
----
50
50
50

query I rowsort
SELECT - - ( cor0.col1 ) * col1 AS col2 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT ALL - tab0.col0 * col1 AS col2 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT col0 * ( - col2 * tab2.col2 ) FROM tab2
----
-114076
-5103
-52728

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5589
SELECT ALL + col0 * CAST( NULL AS SIGNED ) AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5589
SELECT ALL + col0 * CAST ( NULL AS INTEGER ) AS col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT + + 77 * - col2 + col1 FROM tab0 AS cor0
----
-2455
-6223
20

query I rowsort
SELECT ALL tab2.col0 + col0 * + tab2.col1 + col1 AS col1 FROM tab2
----
1439
255
4739

onlyif mysql # use DIV operator for integer division
query I rowsort label-5592
SELECT ALL col0 DIV 40 + - col2 FROM tab2
----
-25
-27
-37

skipif mysql # not compatible
query I rowsort label-5592
SELECT ALL col0 / 40 + - col2 FROM tab2
----
-25
-27
-37

query I rowsort
SELECT col1 * 70 FROM tab0
----
6020
6370
6790

onlyif mysql # use DIV operator for integer division
query I rowsort label-5594
SELECT ALL + col1 DIV ( + col0 * col1 ) AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5594
SELECT ALL + col1 / ( + col0 * col1 ) AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT + col0 * + 10 + col2 * - col0 AS col0 FROM tab1 AS cor0
----
-132
-3008
-6880

query I rowsort
SELECT ALL - + col2 * + 61 AS col0 FROM tab0 AS cor0
----
-2013
-5002
-61

query I rowsort
SELECT - - col0 * 1 + - col2 * + col2 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT + - cor0.col2 * - col2 AS col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT col1 * - ( cor0.col1 ) FROM tab0 cor0
----
-7396
-8281
-9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5600
SELECT DISTINCT - CAST( NULL AS DECIMAL ) * - 80 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5600
SELECT DISTINCT - CAST ( NULL AS REAL ) * - 80 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + col2 + - col0 * col2 * - ( + col0 * cor0.col0 ) AS col2 FROM tab2 AS cor0
----
12338378
18735520
9288

onlyif mysql # use DIV operator for integer division
query I rowsort label-5602
SELECT ( + cor0.col0 ) DIV - col1 col0 FROM tab2 AS cor0
----
-1
-4
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5602
SELECT ( + cor0.col0 ) / - col1 col0 FROM tab2 AS cor0
----
-1
-4
0

query I rowsort
SELECT - - ( col2 ) + cor0.col1 + col2 * col0 AS col1 FROM tab0 AS cor0
----
133
7471
911

query I rowsort
SELECT + ( 13 ) * col0 + ( + col2 ) * col0 AS col1 FROM tab2 AS cor0
----
280
3042
4029

query I rowsort
SELECT - col2 * 49 FROM tab0 AS cor0
----
-1617
-4018
-49

query I rowsort
SELECT + - col1 + - 91 * - 56 AS col2 FROM tab1 AS cor0
----
5070
5083
5086

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5607
SELECT col0 - + CAST( - col1 * - col1 + ( - col1 ) AS SIGNED ) AS col0 FROM tab1
----
-26
-647
-76

skipif mysql # not compatible
query I rowsort label-5607
SELECT col0 - + CAST ( - col1 * - col1 + ( - col1 ) AS INTEGER ) AS col0 FROM tab1
----
-26
-647
-76

query I rowsort
SELECT ALL - cor0.col0 - - col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT - col0 * - 38 FROM tab0 AS cor0
----
1330
3382
912

query I rowsort
SELECT ALL - + col0 + 78 AS col1 FROM tab1 AS cor0
----
-2
14
75

query I rowsort
SELECT ALL - + col2 + ( + ( + col0 ) ) FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ALL 33 AS col0 FROM tab2 AS cor0
----
33
33
33

query I rowsort
SELECT ALL + - ( col2 ) * + cor0.col2 * col2 + - col2 AS col0 FROM tab2 cor0
----
-17602
-19710
-54910

query I rowsort
SELECT ALL + - ( 40 ) FROM tab1 AS cor0
----
-40
-40
-40

query I rowsort
SELECT DISTINCT + ( 99 ) AS col0 FROM tab2 AS cor0
----
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-5616
SELECT + + 12 DIV + col0 AS col1 FROM tab1 cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-5616
SELECT + + 12 / + col0 AS col1 FROM tab1 cor0
----
0
0
4

query I rowsort
SELECT ALL - cor0.col1 + - col0 * + col2 AS col2 FROM tab2 cor0
----
-2087
-220
-3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-5618
SELECT DISTINCT CAST( 11 AS SIGNED ) DIV col2 + col1 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-5618
SELECT DISTINCT CAST ( 11 AS INTEGER ) / col2 + col1 FROM tab1 AS cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 37 + col1 * - col2 col2 FROM tab0 AS cor0
----
-134
-2875
-7499

onlyif mysql # use DIV operator for integer division
query I rowsort label-5620
SELECT + 31 DIV col1 FROM tab2 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-5620
SELECT + 31 / col1 FROM tab2 AS cor0
----
0
1
1

query I rowsort
SELECT DISTINCT + - col1 * - col0 - - cor0.col0 FROM tab0 cor0
----
2088
3430
8188

query I rowsort
SELECT col2 * + col1 * col1 + - col2 * - col0 FROM tab1 AS cor0
----
23904
36666
9348

query I rowsort
SELECT ALL - col2 + col1 + + cor0.col2 FROM tab2 AS cor0
----
17
31
59

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 + 44 * col0 AS col1 FROM tab0
----
1056
1540
3916

query I rowsort
SELECT ALL + ( tab1.col0 ) AS col0 FROM tab1
----
3
64
80

query I rowsort
SELECT ALL + - 18 + + 13 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 74665fbb47d5b17da011bca567195b21

query I rowsort
SELECT col2 + + col1 * - tab1.col1 AS col1 FROM tab1
----
-43
-622
-73

query I rowsort
SELECT DISTINCT col0 * + col2 + ( tab1.col0 ) AS col2 FROM tab1
----
165
3712
7760

query I rowsort
SELECT + col0 * - col1 - ( - 57 ) * + tab1.col0 AS col1 FROM tab1
----
3008
3520
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + + col0 + col0 col2 FROM tab0
----
-27
-38
87

query I rowsort
SELECT ALL + col1 - 18 * - 48 FROM tab1 AS cor0
----
874
877
890

query I rowsort
SELECT - col1 * - 86 + + col2 FROM tab0 AS cor0
----
7429
7908
8343

query I rowsort
SELECT DISTINCT - col0 + ( + col0 ) * col2 AS col2 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT DISTINCT + col1 * + ( cor0.col2 ) AS col0 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT ALL - col2 + + col1 + col2 FROM tab0
----
86
91
97

query I rowsort
SELECT DISTINCT + col1 * - col1 + col1 + - col0 FROM tab0
----
-7334
-8279
-9347

query I rowsort
SELECT ( + col0 ) * + col2 * + col2 AS col0 FROM tab2
----
114076
5103
52728

query I rowsort
SELECT DISTINCT col1 + + col2 * col1 AS col1 FROM tab2
----
1593
663
868

query I rowsort
SELECT ALL + + col1 * + col1 AS col2 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT DISTINCT col1 * - col1 * + col0 + + col0 - 67 FROM tab2 AS cor0
----
-22819
-271507
-6787

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5642
SELECT DISTINCT + col2 + - CAST( NULL AS SIGNED ) * + col0 AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5642
SELECT DISTINCT + col2 + - CAST ( NULL AS INTEGER ) * + col0 AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL - col0 + ( cor0.col2 ) AS col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT - cor0.col2 * - 30 + - 15 FROM tab2 AS cor0
----
1125
765
795

onlyif mysql # use DIV operator for integer division
query I rowsort label-5645
SELECT col0 DIV - col0 + - col0 + - col1 * - col1 FROM tab1 AS cor0
----
35
672
88

skipif mysql # not compatible
query I rowsort label-5645
SELECT col0 / - col0 + - col0 + - col1 * - col1 FROM tab1 AS cor0
----
35
672
88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5646
SELECT DISTINCT - - col0 * - CAST( col1 AS SIGNED ) FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort label-5646
SELECT DISTINCT - - col0 * - CAST ( col1 AS INTEGER ) FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + + col2 * - col2 + - ( + col2 ) + + ( col0 ) FROM tab0 AS cor0
----
-1098
-6717
33

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5648
SELECT DISTINCT + col2 * CAST( NULL AS DECIMAL ) AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5648
SELECT DISTINCT + col2 * CAST ( NULL AS REAL ) AS col0 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * + col0 + + col0 col1 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT ALL + col0 * ( col1 + 97 ) AS col1 FROM tab2 AS cor0
----
12168
896
9006

onlyif mysql # use DIV operator for integer division
query I rowsort label-5651
SELECT col0 DIV - 98 AS col1 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5651
SELECT col0 / - 98 AS col1 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT ALL + col1 * cor0.col1 * col1 FROM tab2 cor0
----
205379
29791
4913

query I rowsort
SELECT ALL ( + col0 ) + - col0 * 88 FROM tab0 AS cor0
----
-2088
-3045
-7743

query I rowsort
SELECT DISTINCT + col2 * col2 AS col0 FROM tab2
----
1444
676
729

query I rowsort
SELECT - - col0 * col0 + - col0 + + 29 AS col0 FROM tab2 AS cor0
----
6035
6191
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-5656
SELECT DISTINCT + 9 DIV col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5656
SELECT DISTINCT + 9 / col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - 33 FROM tab2, tab1 AS cor0, tab0 cor1
----
27 values hashing to bbc05afe7eb6fed16e9d75f7f74d1948

query I rowsort
SELECT + cor0.col2 * + col1 + + cor0.col1 FROM tab0 cor0
----
194
2924
7553

query I rowsort
SELECT - col0 FROM tab1 WHERE NULL IN ( col1 - col0 / col0 ) AND NOT - col1 < NULL
----

query I rowsort
SELECT + - col1 * + col2 * col1 AS col1 FROM tab1 AS cor0
----
-16224
-36504
-5700

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col2 + + col2 col0 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5662
SELECT ALL - col0 + - col2 DIV col0 FROM tab2 AS cor0
----
-10
-78
-79

skipif mysql # not compatible
query I rowsort label-5662
SELECT ALL - col0 + - col2 / col0 FROM tab2 AS cor0
----
-10
-78
-79

query I rowsort
SELECT ALL + - col1 * + col2 + + col1 AS col1 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT cor0.col0 * + cor0.col2 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT - col1 + col2 * col2 AS col1 FROM tab0 AS cor0
----
-96
1003
6633

query I rowsort
SELECT + 32 * + col0 + tab0.col0 * col1 FROM tab0
----
10947
2832
4515

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + cor0.col1 col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 20 + col0 * col2 * col0 FROM tab0 AS cor0
----
1245
19028
649542

onlyif mysql # use DIV operator for integer division
query I rowsort label-5669
SELECT ALL - + cor0.col2 + cor0.col0 + col0 DIV - col2 AS col0 FROM tab0 AS cor0
----
-1
-9
6

skipif mysql # not compatible
query I rowsort label-5669
SELECT ALL - + cor0.col2 + cor0.col0 + col0 / - col2 AS col0 FROM tab0 AS cor0
----
-1
-9
6

query I rowsort
SELECT DISTINCT - 82 * col2 AS col2 FROM tab2 AS cor0
----
-2132
-2214
-3116

query I rowsort
SELECT col2 * col0 + - col1 + col0 AS col0 FROM tab0 AS cor0
----
-27
7296
730

query I rowsort
SELECT ALL - - 44 * cor0.col0 FROM tab2 cor0
----
308
3432
3476

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * + col1 + cor0.col0 col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT DISTINCT + cor0.col2 + col0 AS col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT + col1 + - col0 * col2 * - col1 AS col2 FROM tab0 AS cor0
----
3492
664209
68198

onlyif mysql # use DIV operator for integer division
query I rowsort label-5676
SELECT - cor0.col0 DIV - col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5676
SELECT - cor0.col0 / - col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - cor0.col2 + + cor0.col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT + + col0 * col0 * + col0 FROM tab1 AS cor0
----
262144
27
512000

query I rowsort
SELECT + - col0 + - col2 * + col0 AS col1 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT col2 FROM tab0 WHERE ( NULL ) IN ( col0 )
----

query I rowsort
SELECT - col0 * col1 + - col2 AS col2 FROM tab1
----
-1136
-132
-697

query I rowsort
SELECT col0 * col0 * - col0 AS col1 FROM tab1
----
-262144
-27
-512000

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + + col2 + col1 col0 FROM tab0
----
86
91
97

query I rowsort
SELECT ALL + col2 AS col2 FROM tab1 WHERE ( NULL ) IN ( col2 )
----

query I rowsort
SELECT ALL tab2.col2 + col0 + - col1 FROM tab2
----
100
3
45

query I rowsort
SELECT ALL - col0 AS col2 FROM tab2 WHERE NOT NULL NOT IN ( - col2 )
----

query I rowsort
SELECT col1 * col0 + - col0 AS col1 FROM tab0
----
2040
3360
8010

query I rowsort
SELECT col1 FROM tab2 WHERE NULL IN ( tab2.col0 )
----

query I rowsort
SELECT ALL col2 AS col2 FROM tab0 WHERE NOT NULL NOT IN ( - col2 )
----

query I rowsort
SELECT DISTINCT + col0 * col0 - + col0 AS col1 FROM tab1
----
4032
6
6320

query I rowsort
SELECT + col0 - - col2 * col2 FROM tab2
----
1523
736
754

query I rowsort
SELECT col0 FROM tab2 WHERE NULL <> NULL
----

query I rowsort
SELECT + col0 * col0 * - col2 FROM tab2
----
-1323
-158184
-237158

onlyif mysql # use DIV operator for integer division
query I rowsort label-5694
SELECT + col2 - + col1 DIV tab1.col0 FROM tab1
----
46
57
96

skipif mysql # not compatible
query I rowsort label-5694
SELECT + col2 - + col1 / tab1.col0 FROM tab1
----
46
57
96

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL NOT IN ( - col2 * + col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5696
SELECT DISTINCT - col0 * + col0 - + col2 DIV col2 FROM tab1
----
-10
-4097
-6401

skipif mysql # not compatible
query I rowsort label-5696
SELECT DISTINCT - col0 * + col0 - + col2 / col2 FROM tab1
----
-10
-4097
-6401

query I rowsort
SELECT DISTINCT col0 * - cor0.col0 AS col1 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT - 25 AS col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 2e7a33467ee3a4d9570560d60302b35a

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5699
SELECT ALL - + col0 * col1 + + CAST( NULL AS DECIMAL ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5699
SELECT ALL - + col0 * col1 + + CAST ( NULL AS REAL ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 65 * col1 AS col0 FROM tab0 AS cor0
----
-5590
-5915
-6305

query I rowsort
SELECT + + 9 AS col1 FROM tab0 cor0
----
9
9
9

query I rowsort
SELECT - 12 * col1 AS col0 FROM tab0 AS cor0
----
-1032
-1092
-1164

query I rowsort
SELECT DISTINCT - col1 * - tab2.col0 - col1 AS col2 FROM tab2
----
1326
186
4543

query I rowsort
SELECT tab2.col1 + + col0 FROM tab2
----
137
38
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + tab0.col0 col0 FROM tab0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-5706
SELECT ALL - col0 DIV col1 + col0 FROM tab1
----
3
58
74

skipif mysql # not compatible
query I rowsort label-5706
SELECT ALL - col0 / col1 + col0 FROM tab1
----
3
58
74

query I rowsort
SELECT ALL + col1 * col1 - col2 FROM tab2
----
251
3455
934

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - tab1.col1 col2 FROM tab1
----
-23
54
67

query III rowsort
SELECT * FROM tab1 WHERE NOT + col0 NOT BETWEEN col0 AND NULL
----

query I rowsort
SELECT + col1 + + cor0.col2 AS col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT - cor0.col2 / - col1 FROM tab0 cor0 WHERE NOT ( NULL ) < ( - col1 + col2 )
----

query III rowsort
SELECT ALL * FROM tab2 WHERE NULL IN ( tab2.col0 + + tab2.col1 )
----

query I rowsort
SELECT + col2 + + cor0.col1 FROM tab2 cor0
----
55
58
85

query III rowsort
SELECT ALL * FROM tab0 WHERE - col0 NOT IN ( + col0 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT + col2 * - col0 + - col0 AS col0 FROM tab0
----
-70
-7387
-816

query I rowsort
SELECT - tab1.col2 + - col0 * - col0 AS col2 FROM tab1
----
-45
4039
6304

query I rowsort
SELECT - col2 * tab1.col2 + + col0 FROM tab1
----
-2913
-3185
-9136

query I rowsort
SELECT ALL col0 FROM tab0 WHERE + col2 IN ( col1 * tab0.col2 * col2 )
----

query I rowsort
SELECT - tab2.col0 + col2 * col2 FROM tab2
----
1365
598
722

query I rowsort
SELECT DISTINCT col1 AS col2 FROM tab1 WHERE NOT ( - col1 ) <= NULL
----

query I rowsort
SELECT 80 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 6dd5038be71dffa82f5ceba787caab91

query I rowsort
SELECT ALL - 13 + - col2 AS col0 FROM tab1 AS cor0
----
-109
-67
-70

query I rowsort
SELECT + + 47 - + col0 FROM tab0 AS cor0
----
-42
12
23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5724
SELECT ALL - CAST( NULL AS SIGNED ) + col1 * + col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5724
SELECT ALL - CAST ( NULL AS INTEGER ) + col1 * + col2 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5725
SELECT DISTINCT - CAST( col2 * col2 AS SIGNED ) + - ( + col1 ) * col1 AS col0 FROM tab0
----
-15005
-8485
-9410

skipif mysql # not compatible
query I rowsort label-5725
SELECT DISTINCT - CAST ( col2 * col2 AS INTEGER ) + - ( + col1 ) * col1 AS col0 FROM tab0
----
-15005
-8485
-9410

query I rowsort
SELECT ALL - 98 AS col2 FROM tab2 AS cor0
----
-98
-98
-98

query I rowsort
SELECT DISTINCT + col2 + + cor0.col1 * - 29 AS col1 FROM tab1 AS cor0
----
-233
-281
-700

onlyif mysql # use DIV operator for integer division
query I rowsort label-5728
SELECT - - col0 * - col1 DIV - col1 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-5728
SELECT - - col0 * - col1 / - col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL - + col1 * - col2 AS col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - - col1 + + col0 * col1 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT cor0.col2 * - 50 FROM tab0, tab0 AS cor0, tab2 cor1
----
27 values hashing to 073db421c872cacb837ad6a29884722b

query I rowsort
SELECT col2 + + 48 * + col2 + - col1 FROM tab2
----
1215
1292
1845

query I rowsort
SELECT ALL tab1.col2 - col2 * + 39 AS col1 FROM tab1
----
-2052
-2166
-3648

query I rowsort
SELECT DISTINCT + col1 + 14 * + col1 * + tab2.col2 - + col1 * + col2 AS col1 FROM tab2
----
10912
20001
8415

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5735
SELECT DISTINCT tab2.col1 * + 72 - - col1 * + col1 * CAST( col1 AS SIGNED ) AS col1 FROM tab2
----
209627
32023
6137

skipif mysql # not compatible
query I rowsort label-5735
SELECT DISTINCT tab2.col1 * + 72 - - col1 * + col1 * CAST ( col1 AS INTEGER ) AS col1 FROM tab2
----
209627
32023
6137

query I rowsort
SELECT DISTINCT col0 * - col1 - - col2 AS col2 FROM tab1
----
-24
-583
-944

query I rowsort
SELECT + col1 + 92 AS col0 FROM tab0
----
178
183
189

query I rowsort
SELECT + 42 * cor0.col2 AS col1 FROM tab2, tab1 cor0
----
9 values hashing to 75f9e61ff973806e32e45e6335de6153

query I rowsort
SELECT ALL - 91 FROM tab0, tab2 AS cor0, tab0 cor1
----
27 values hashing to 6ec4feac5c635ab8e5da71006896acab

query I rowsort
SELECT DISTINCT - cor0.col1 * + col2 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT + col2 * - col2 * col0 FROM tab1 AS cor0
----
-207936
-737280
-8748

onlyif mysql # use DIV operator for integer division
query I rowsort label-5742
SELECT DISTINCT col2 * - cor0.col2 DIV + col2 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-5742
SELECT DISTINCT col2 * - cor0.col2 / + col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT cor0.col1 + - col1 * + col0 AS col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT ALL - - cor0.col0 * + 52 * col1 AS col2 FROM tab0 AS cor0
----
107328
176540
421148

query I rowsort
SELECT + ( 84 ) + col1 FROM tab0 cor0
----
170
175
181

query I rowsort
SELECT DISTINCT 92 + - ( col1 ) * col1 FROM tab0 AS cor0
----
-7304
-8189
-9317

query I rowsort
SELECT col1 * + col2 + - col2 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT DISTINCT ( 29 ) + col1 AS col1 FROM tab1 cor0
----
39
42
55

query I rowsort
SELECT + - 62 FROM tab0 cor0
----
-62
-62
-62

query I rowsort
SELECT ALL + col2 + 32 AS col1 FROM tab0 AS cor0
----
114
33
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-5751
SELECT - col0 * + col2 - - col2 DIV - col1 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3004

skipif mysql # not compatible
query I rowsort label-5751
SELECT - col0 * + col2 - - col2 / - col1 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3004

query I rowsort
SELECT DISTINCT - ( cor0.col0 ) + - col1 * + 73 AS col0 FROM tab1 AS cor0
----
-1029
-1901
-794

query I rowsort
SELECT ALL ( col0 ) * col0 + - col1 FROM tab1 AS cor0
----
-17
4086
6387

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 28 * - ( - cor0.col1 ) + + col2 col0 FROM tab1 AS cor0
----
337
460
782

query I rowsort
SELECT DISTINCT + - 81 * - col1 AS col0 FROM tab0 AS cor0
----
6966
7371
7857

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5756
SELECT DISTINCT + + CAST( 71 AS SIGNED ) col1 FROM tab0 AS cor0
----
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5756
SELECT DISTINCT + + CAST ( 71 AS INTEGER ) col1 FROM tab0 AS cor0
----
71

query I rowsort
SELECT - cor0.col1 * 29 AS col1 FROM tab2 AS cor0
----
-1711
-493
-899

query I rowsort
SELECT col1 * col0 - tab2.col1 FROM tab2
----
1326
186
4543

query I rowsort
SELECT + + ( - 48 ) FROM tab1 AS cor0
----
-48
-48
-48

skipif mysql # not compatible
query I rowsort
SELECT CAST ( + col0 AS REAL ) + col0 AS col1 FROM tab2
----
14
156
158

query I rowsort
SELECT col0 + - col0 * - col0 AS col1 FROM tab2
----
56
6162
6320

query I rowsort
SELECT ( - col0 ) + col0 + + col2 * + col2 FROM tab2
----
1444
676
729

query I rowsort
SELECT + 57 + + col0 + col2 FROM tab2 AS cor0
----
161
174
91

query I rowsort
SELECT DISTINCT + ( col2 ) + col0 * + col2 * + col2 AS col0 FROM tab1
----
207993
737376
8802

query I rowsort
SELECT ALL 91 + 28 FROM tab0
----
119
119
119

query I rowsort
SELECT + 65 + tab1.col2 FROM tab1
----
119
122
161

onlyif mysql # use DIV operator for integer division
query I rowsort label-5767
SELECT - ( 6 ) DIV col0 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5767
SELECT - ( 6 ) / col0 FROM tab2
----
0
0
0

query I rowsort
SELECT + col2 * + col1 + col0 + + col2 * col0 * tab1.col1 AS col2 FROM tab1
----
101168
37114
5619

query I rowsort
SELECT - col1 + - ( - 22 ) FROM tab1 AS cor0
----
-4
12
9

query I rowsort
SELECT ALL - col0 * + cor0.col0 - + col1 * + col0 AS col1 FROM tab2 AS cor0
----
-10686
-266
-7584

query I rowsort
SELECT ALL - col2 + + 22 FROM tab1 AS cor0
----
-32
-35
-74

query I rowsort
SELECT ALL col0 * 84 * 29 + - col1 * col1 FROM tab2 AS cor0
----
16091
186527
192155

query I rowsort
SELECT ALL col0 * col2 + col1 AS col0 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT col2 * col2 + - col1 AS col0 FROM tab0
----
-96
1003
6633

query I rowsort
SELECT ALL col2 * 59 FROM tab2 cor0
----
1534
1593
2242

query I rowsort
SELECT DISTINCT + cor0.col1 * - col1 + col1 FROM tab2 AS cor0
----
-272
-3422
-930

query I rowsort
SELECT ALL - col0 * col2 - col0 FROM tab2 AS cor0
----
-196
-2106
-3081

onlyif mysql # use DIV operator for integer division
query I rowsort label-5778
SELECT ALL col2 * + 58 + cor0.col0 DIV + col2 FROM tab1 AS cor0
----
3132
3307
5568

skipif mysql # not compatible
query I rowsort label-5778
SELECT ALL col2 * + 58 + cor0.col0 / + col2 FROM tab1 AS cor0
----
3132
3307
5568

onlyif mysql # use DIV operator for integer division
query I rowsort label-5779
SELECT DISTINCT + col0 + col2 DIV + col0 col1 FROM tab2 AS cor0
----
10
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5779
SELECT DISTINCT + col0 + col2 / + col0 col1 FROM tab2 AS cor0
----
10
78
79

query I rowsort
SELECT + 57 + col1 FROM tab2
----
116
74
88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5781
SELECT ALL + col1 * - CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5781
SELECT ALL + col1 * - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + + col1 * - col1 col0 FROM tab0 AS cor0
----
-7310
-8190
-9312

query I rowsort
SELECT DISTINCT col2 * cor0.col0 + col0 FROM tab1 cor0
----
165
3712
7760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5784
SELECT + cor0.col2 * - CAST( NULL AS SIGNED ) col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5784
SELECT + cor0.col2 * - CAST ( NULL AS INTEGER ) col1 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 * + ( - ( col1 ) ) + + ( ( col2 ) ) * 98 FROM tab2 cor0
----
3483
4082
4370

query I rowsort
SELECT - cor0.col1 * - col0 + 4 AS col2 FROM tab1 AS cor0
----
1044
644
82

query I rowsort
SELECT col1 * 14 FROM tab2 AS cor0
----
238
434
826

query I rowsort
SELECT DISTINCT - 53 + col0 FROM tab0
----
-18
-29
36

query I rowsort
SELECT ALL + col1 * + col2 + - col2 FROM tab1 AS cor0
----
1152
1350
513

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * + 86 col0 FROM tab2 AS cor0
----
-2236
-2322
-3268

query I rowsort
SELECT + + col2 + 89 * col0 + col2 FROM tab2 AS cor0
----
677
6994
7107

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + col2 + - col0 + col1 col1 FROM tab0
----
1151
63
6726

query I rowsort
SELECT DISTINCT + 64 FROM tab0
----
64

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5794
SELECT ALL + CAST( NULL AS DECIMAL ) + - 33 * col0 AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5794
SELECT ALL + CAST ( NULL AS REAL ) + - 33 * col0 AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 * col0 + tab2.col1 AS col2 FROM tab2
----
2087
220
3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-5796
SELECT - - 79 DIV + col0 + - col2 * + cor0.col0 + col2 FROM tab1 AS cor0
----
-3590
-7584
-82

skipif mysql # not compatible
query I rowsort label-5796
SELECT - - 79 / + col0 + - col2 * + cor0.col0 + col2 FROM tab1 AS cor0
----
-3590
-7584
-82

query I rowsort
SELECT cor0.col2 + - col1 * col0 * col0 AS col2 FROM tab2 cor0
----
-106059
-1492
-358930

query I rowsort
SELECT + - col2 * col0 + - col1 + - col2 AS col0 FROM tab0 AS cor0
----
-133
-7471
-911

query I rowsort
SELECT + + 38 + col2 FROM tab0 AS cor0
----
120
39
71

query I rowsort
SELECT - - cor0.col0 * - col0 + - col0 * - col2 AS col2 FROM tab2 AS cor0
----
-3239
-4056
140

onlyif mysql # use DIV operator for integer division
query I rowsort label-5801
SELECT ( cor0.col2 ) DIV ( col1 ) + col1 * - col0 + + col2 * col2 AS col2 FROM tab2 AS cor0
----
-3926
103
512

skipif mysql # not compatible
query I rowsort label-5801
SELECT ( cor0.col2 ) / ( col1 ) + col1 * - col0 + + col2 * col2 AS col2 FROM tab2 AS cor0
----
-3926
103
512

query I rowsort
SELECT col2 - - cor0.col0 * - ( ( col0 ) * 1 ) FROM tab2 AS cor0
----
-22
-6058
-6203

query I rowsort
SELECT - col2 * + col2 + col2 FROM tab2 cor0
----
-1406
-650
-702

query I rowsort
SELECT col1 + 64 FROM tab2 AS cor0
----
123
81
95

query I rowsort
SELECT ALL + col2 + col0 * - col0 AS col1 FROM tab0 AS cor0
----
-1224
-543
-7839

onlyif mysql # use DIV operator for integer division
query I rowsort label-5806
SELECT + + col1 DIV col1 + + 26 AS col1 FROM tab2 cor0
----
27
27
27

skipif mysql # not compatible
query I rowsort label-5806
SELECT + + col1 / col1 + + 26 AS col1 FROM tab2 cor0
----
27
27
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-5807
SELECT DISTINCT - cor0.col1 DIV CAST( - cor0.col0 AS SIGNED ) FROM tab2 AS cor0
----
0
4

skipif mysql # not compatible
query I rowsort label-5807
SELECT DISTINCT - cor0.col1 / CAST ( - cor0.col0 AS INTEGER ) FROM tab2 AS cor0
----
0
4

query I rowsort
SELECT col1 + - cor0.col2 + col1 FROM tab0 cor0
----
100
139
193

query I rowsort
SELECT - - col0 + + cor0.col2 * + ( + col1 ) + + col0 FROM tab1 AS cor0
----
1408
1410
698

query I rowsort
SELECT + 43 FROM tab1, tab0, tab0 cor0
----
27 values hashing to ee5108f6248be48c54e069545f81c5d9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * col0 + + col2 col1 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT - col1 * - 33 FROM tab2 AS cor0
----
1023
1947
561

query I rowsort
SELECT 82 AS col0 FROM tab1 AS cor0
----
82
82
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + + col1 * + cor0.col0 * - col2 col0 FROM tab0 AS cor0
----
-3394
-664036
-68079

query I rowsort
SELECT DISTINCT - 74 AS col1 FROM tab1, tab2 cor0
----
-74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( cor0.col1 ) * 65 col2 FROM tab1 AS cor0
----
1690
650
845

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5817
SELECT + + ( col1 ) * + CAST( NULL AS SIGNED ) + - ( + col2 ) + CAST( col2 AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5817
SELECT + + ( col1 ) * + CAST ( NULL AS INTEGER ) + - ( + col2 ) + CAST ( col2 AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 + col1 + + col1 FROM tab2 AS cor0
----
144
72
89

query I rowsort
SELECT + - 4 * - col1 AS col0 FROM tab0 AS cor0
----
344
364
388

onlyif mysql # use DIV operator for integer division
query I rowsort label-5820
SELECT ALL - 0 + + col1 DIV col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5820
SELECT ALL - 0 + + col1 / col1 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT - 17 + - col1 * - cor0.col0 * - col1 FROM tab2 AS cor0
----
-22848
-271535
-6744

query I rowsort
SELECT ALL + col0 * col2 * - cor0.col2 + col2 FROM tab1 AS cor0
----
-207879
-737184
-8694

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5823
SELECT ALL - col1 * 33 + - cor0.col0 * - CAST( col0 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-1976
-2262
4918

skipif mysql # not compatible
query I rowsort label-5823
SELECT ALL - col1 * 33 + - cor0.col0 * - CAST ( col0 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-1976
-2262
4918

query I rowsort
SELECT DISTINCT ( 62 ) * col2 FROM tab2 cor0
----
1612
1674
2356

query I rowsort
SELECT ALL + ( - col2 ) + col0 FROM tab1 cor0
----
-16
-51
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 21 + + ( col0 ) * col0 col1 FROM tab2
----
6105
6262
70

query I rowsort
SELECT col0 + col1 + col0 * col0 AS col2 FROM tab1
----
38
4170
6493

query I rowsort
SELECT ALL - ( - ( - col1 ) ) * + col2 + col1 FROM tab0
----
-2752
-7371
0

query I rowsort
SELECT 43 - - col2 * - col0 AS col2 FROM tab1
----
-119
-3605
-7637

query I rowsort
SELECT 77 * - col0 + + col0 FROM tab2
----
-532
-5928
-6004

query I rowsort
SELECT DISTINCT col0 * col2 + - col0 AS col2 FROM tab0
----
0
7209
768

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 cor0, tab1 cor1, tab1 AS cor2
----
972 values hashing to 0be13143d898cc667fe1a2dd93b34703

query I rowsort
SELECT + + cor0.col1 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT DISTINCT + 59 AS col0 FROM tab1, tab0 AS cor0
----
59

query I rowsort
SELECT 95 + - col0 AS col1 FROM tab1 AS cor0
----
15
31
92

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( - 85 AS REAL ) + - col2 * - col0 FROM tab2 AS cor0
----
104
1943
2917

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 14 col1 FROM tab0
----
14
14
14

query I rowsort
SELECT + col2 * - ( + 85 ) AS col0 FROM tab1 AS cor0
----
-4590
-4845
-8160

query I rowsort
SELECT - col2 * - cor0.col2 AS col0 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT - col1 * 49 FROM tab1 AS cor0
----
-1274
-490
-637

query I rowsort
SELECT + col0 * - 74 FROM tab0 cor0
----
-1776
-2590
-6586

query I rowsort
SELECT DISTINCT + col1 * ( col2 ) FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5843
SELECT - col1 * ( col2 ) DIV - col1 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-5843
SELECT - col1 * ( col2 ) / - col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL - + col1 + - 54 AS col1 FROM tab1 AS cor0
----
-64
-67
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5845
SELECT + - col1 DIV + col2 col2 FROM tab0 AS cor0
----
-1
-2
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5845
SELECT + - col1 / + col2 col2 FROM tab0 AS cor0
----
-1
-2
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * col2 * col0 col2 FROM tab1 AS cor0
----
-207936
-737280
-8748

query I rowsort
SELECT DISTINCT col1 + cor0.col2 + ( - col1 ) FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL + + col0 * 88 AS col2 FROM tab0 AS cor0
----
2112
3080
7832

query I rowsort
SELECT ALL + - col2 * col1 + col0 AS col2 FROM tab1 AS cor0
----
-1168
-1401
-506

onlyif mysql # use DIV operator for integer division
query I rowsort label-5850
SELECT + cor0.col2 * col2 DIV + col2 AS col1 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-5850
SELECT + cor0.col2 * col2 / + col2 AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT - col1 + ( + 5 ) AS col2 FROM tab0 cor0
----
-81
-86
-92

query I rowsort
SELECT + col1 * - ( - cor0.col2 ) AS col0 FROM tab1 AS cor0
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - tab0.col1 col0 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT ALL + cor0.col0 FROM tab2, tab1, tab0 cor0, tab0
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

query I rowsort
SELECT DISTINCT - - col2 * - cor0.col1 + 54 - + col0 AS col2 FROM tab1 AS cor0
----
-1274
-1353
-580

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 38 col2 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to a7827a79248ee7bf2cee915a631d02cb

onlyif mysql # use DIV operator for integer division
query I rowsort label-5857
SELECT DISTINCT col0 DIV + ( col1 ) + - col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-5857
SELECT DISTINCT col0 / + ( col1 ) + - col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT col2 + 22 AS col2 FROM tab2 cor0
----
48
49
60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5859
SELECT DISTINCT CAST( - col0 AS SIGNED ) FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-5859
SELECT DISTINCT CAST ( - col0 AS INTEGER ) FROM tab2 AS cor0
----
-7
-78
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5860
SELECT - CAST( col2 AS SIGNED ) + col0 * col2 * col1 AS col1 FROM tab0 AS cor0
----
3394
664036
68079

skipif mysql # not compatible
query I rowsort label-5860
SELECT - CAST ( col2 AS INTEGER ) + col0 * col2 * col1 AS col1 FROM tab0 AS cor0
----
3394
664036
68079

query I rowsort
SELECT + + 23 * - col2 AS col1 FROM tab1 AS cor0
----
-1242
-1311
-2208

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5862
SELECT ALL - + CAST( NULL AS SIGNED ) 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-5862
SELECT ALL - + CAST ( NULL AS INTEGER ) col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + - ( col0 ) * col2 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( - cor0.col0 ) * - col0 col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT + + ( + cor0.col2 ) * - col1 FROM tab1 AS cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-5866
SELECT DISTINCT - 67 DIV + col0 AS col1 FROM tab0 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-5866
SELECT DISTINCT - 67 / + col0 AS col1 FROM tab0 AS cor0
----
-1
-2
0

query I rowsort
SELECT - 63 * 63 FROM tab2 AS cor0
----
-3969
-3969
-3969

query I rowsort
SELECT DISTINCT 40 + + 11 AS col2 FROM tab0, tab0 AS cor0
----
51

query I rowsort
SELECT + 15 FROM tab1, tab0 AS cor0
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

query I rowsort
SELECT 21 + - col1 AS col2 FROM tab2 AS cor0
----
-10
-38
4

query I rowsort
SELECT - - 80 * - cor0.col1 AS col0 FROM tab1 AS cor0
----
-1040
-2080
-800

query I rowsort
SELECT DISTINCT col1 * - col0 * 24 + col0 * + col1 AS col2 FROM tab2 cor0
----
-105846
-30889
-4991

query I rowsort
SELECT DISTINCT + col0 * col0 + ( - col0 ) FROM tab0 AS cor0
----
1190
552
7832

query I rowsort
SELECT + 50 + + col2 AS col1 FROM tab2 cor0
----
76
77
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 + + col2 * - col2 col2 FROM tab1 AS cor0
----
-2890
-3239
-9203

query I rowsort
SELECT ALL + col2 + col0 AS col0 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT ALL - - col1 - col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT col0 * + 3 + + col2 AS col0 FROM tab0
----
105
106
349

query I rowsort
SELECT ALL + + cor0.col1 - - cor0.col2 * col2 AS col1 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT cor0.col1 * col2 + - 77 * col0 AS col0 FROM tab2 AS cor0
----
-4472
-5437
298

query I rowsort
SELECT DISTINCT + - 46 FROM tab1 cor0
----
-46

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5882
SELECT DISTINCT - - col2 * col1 + CAST( col1 AS SIGNED ) * + col0 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5882
SELECT DISTINCT - - col2 * col1 + CAST ( col1 AS INTEGER ) * + col0 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT col2 - col0 * tab2.col0 FROM tab2
----
-22
-6058
-6203

query I rowsort
SELECT ALL + col0 + ( col0 ) FROM tab0 AS cor0
----
178
48
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-5885
SELECT - col2 + col0 DIV cor0.col2 AS col1 FROM tab0 cor0
----
-33
-81
34

skipif mysql # not compatible
query I rowsort label-5885
SELECT - col2 + col0 / cor0.col2 AS col1 FROM tab0 cor0
----
-33
-81
34

query I rowsort
SELECT DISTINCT - + col0 * - 73 FROM tab1 AS cor0
----
219
4672
5840

query I rowsort
SELECT - col1 + col1 * col1 AS col1 FROM tab2
----
272
3422
930

query I rowsort
SELECT + ( - cor0.col2 ) FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 71 col1 FROM tab0, tab1 AS cor0
----
-71

query I rowsort
SELECT - 14 + - cor0.col0 AS col0 FROM tab1 cor0
----
-17
-78
-94

query I rowsort
SELECT + ( + col2 ) * 17 FROM tab1 AS cor0
----
1632
918
969

query I rowsort
SELECT + + 60 AS col1 FROM tab0 AS cor0
----
60
60
60

query I rowsort
SELECT ALL + 8 * - tab0.col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 988d0f685113fba08466f27f2900b7c2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5894
SELECT - col0 * col1 + CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5894
SELECT - col0 * col1 + CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5895
SELECT ( - 1 ) + col2 + CAST( NULL AS SIGNED ) * ( + tab2.col1 ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5895
SELECT ( - 1 ) + col2 + CAST ( NULL AS INTEGER ) * ( + tab2.col1 ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( + col0 ) * + col1 FROM tab1
----
1040
640
78

query I rowsort
SELECT ALL - col1 + - 87 AS col2 FROM tab0 AS cor0
----
-173
-178
-184

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5898
SELECT ALL + + col2 * CAST( NULL AS SIGNED ) / - 53 - + cor0.col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5898
SELECT ALL + + col2 * CAST ( NULL AS INTEGER ) / - 53 - + cor0.col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5899
SELECT col1 DIV - col1 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-5899
SELECT col1 / - col1 col2 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT col2 + + col2 + + col1 * col1 * col2 FROM tab1
----
16416
36612
5814

query I rowsort
SELECT ALL col0 * col1 - col0 FROM tab0 cor0
----
2040
3360
8010

query I rowsort
SELECT DISTINCT + col0 + + 12 AS col0 FROM tab1 AS cor0
----
15
76
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 + 24 col2 FROM tab2 AS cor0
----
-54
-55
17

onlyif mysql # use DIV operator for integer division
query I rowsort label-5904
SELECT - col0 DIV - ( col2 * tab0.col1 ) AS col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5904
SELECT - col0 / - ( col2 * tab0.col1 ) AS col0 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5905
SELECT + col1 DIV - CAST( col0 AS SIGNED ) FROM tab0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-5905
SELECT + col1 / - CAST ( col0 AS INTEGER ) FROM tab0
----
-1
-2
-3

query I rowsort
SELECT ALL ( col1 ) * col1 FROM tab0 cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT - col1 * - col1 + - col0 + - col2 FROM tab0 AS cor0
----
7339
8110
9373

query I rowsort
SELECT ALL ( col0 ) + - col0 - col2 FROM tab2 AS cor0
----
-26
-27
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( col1 ) * col2 + col1 col2 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT DISTINCT 4 * + col1 + + col1 AS col0 FROM tab2 AS cor0
----
155
295
85

query I rowsort
SELECT 96 * col1 AS col1 FROM tab2 AS cor0
----
1632
2976
5664

query I rowsort
SELECT DISTINCT - - col2 * - col0 + + col2 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT - - 34 * 75 AS col2 FROM tab2 cor0
----
2550
2550
2550

onlyif mysql # use DIV operator for integer division
query I rowsort label-5914
SELECT DISTINCT col1 DIV col0 + + col0 col2 FROM tab1 AS cor0
----
11
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5914
SELECT DISTINCT col1 / col0 + + col0 col2 FROM tab1 AS cor0
----
11
64
80

query I rowsort
SELECT ALL - 86 * col2 FROM tab2 AS cor0
----
-2236
-2322
-3268

query I rowsort
SELECT - + col0 + + cor0.col0 AS col0 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5917
SELECT DISTINCT CAST( NULL AS SIGNED ) col2 FROM tab1, tab0 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5917
SELECT DISTINCT CAST ( NULL AS INTEGER ) col2 FROM tab1, tab0 cor0
----
NULL

query I rowsort
SELECT - ( - 68 ) FROM tab1, tab2 AS cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

query I rowsort
SELECT ALL + 45 - - col1 FROM tab2
----
104
62
76

query I rowsort
SELECT - 68 * - col2 AS col2 FROM tab1
----
3672
3876
6528

query I rowsort
SELECT DISTINCT tab2.col0 * + col2 FROM tab2
----
189
2028
3002

query I rowsort
SELECT - 8 * - ( - col0 ) - + ( - 62 ) AS col2 FROM tab2 AS cor0
----
-562
-570
6

query I rowsort
SELECT ALL tab0.col2 - + 96 * tab0.col2 AS col1 FROM tab0
----
-3135
-7790
-95

query I rowsort
SELECT col2 - 19 * + col0 FROM tab2 AS cor0
----
-106
-1456
-1463

query I rowsort
SELECT ALL cor0.col0 + cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to bd4afbebf32cf7139d4a26f0c77f8156

query I rowsort
SELECT ALL ( tab2.col0 ) AS col0 FROM tab2
----
7
78
79

query I rowsort
SELECT + ( + col2 * 33 ) - col0 FROM tab1
----
1779
1817
3088

query I rowsort
SELECT col2 * - 69 * + 49 FROM tab2 AS cor0
----
-128478
-87906
-91287

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 + - cor0.col1 * cor0.col2 col1 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT - 3 AS col0 FROM tab0, tab1 AS cor0, tab0 cor1
----
27 values hashing to 65b7e16aaa7821ace3a45a9846ffa166

query I rowsort
SELECT DISTINCT col0 * col2 + 63 AS col2 FROM tab2 AS cor0
----
2091
252
3065

query I rowsort
SELECT DISTINCT 37 + + cor0.col1 FROM tab1 cor0
----
47
50
63

query I rowsort
SELECT ALL - col0 + col1 * 79 FROM tab0 AS cor0
----
6770
7100
7628

query I rowsort
SELECT ALL - - 47 FROM tab0 AS cor0
----
47
47
47

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5935
SELECT DISTINCT col1 * + col1 * + CAST( - col0 AS SIGNED ) + - col1 FROM tab2 AS cor0
----
-22848
-271577
-6758

skipif mysql # not compatible
query I rowsort label-5935
SELECT DISTINCT col1 * + col1 * + CAST ( - col0 AS INTEGER ) + - col1 FROM tab2 AS cor0
----
-22848
-271577
-6758

query I rowsort
SELECT ALL col2 * - col1 + + col0 * col2 AS col1 FROM tab0 AS cor0
----
-164
-2046
-62

query I rowsort
SELECT ALL cor0.col1 * + col1 + 73 * + col2 FROM tab0 AS cor0
----
14267
9482
9805

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col2 * cor0.col1 col1 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL + col0 + cor0.col2 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT ALL - 30 + + col1 FROM tab1 AS cor0
----
-17
-20
-4

query I rowsort
SELECT ALL cor0.col0 + - col1 * ( col2 ) AS col2 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT ALL + 34 * col1 FROM tab0 AS cor0
----
2924
3094
3298

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5943
SELECT - CAST( NULL AS SIGNED ) col0 FROM tab1, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5943
SELECT - CAST ( NULL AS INTEGER ) col0 FROM tab1, tab1 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT col0 - tab2.col2 * 97 AS col1 FROM tab2
----
-2444
-2612
-3607

query I rowsort
SELECT + - cor0.col1 * - cor0.col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - col0 * 20 AS col1 FROM tab0 AS cor0
----
-1780
-480
-700

query I rowsort
SELECT + cor0.col0 * + 57 FROM tab1 AS cor0
----
171
3648
4560

query I rowsort
SELECT DISTINCT - 67 + 69 + col2 * + col1 FROM tab0 cor0
----
2840
7464
99

query I rowsort
SELECT - col1 + cor0.col0 AS col0 FROM tab1 cor0
----
-23
54
67

query I rowsort
SELECT ALL + 65 FROM tab0, tab1 AS cor0, tab1 cor1, tab1 AS cor2
----
81 values hashing to 1654646feeae82f39d2f564fe4ea26c2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5951
SELECT DISTINCT - CAST( + col2 AS SIGNED ) + - cor0.col2 FROM tab0 AS cor0
----
-164
-2
-66

skipif mysql # not compatible
query I rowsort label-5951
SELECT DISTINCT - CAST ( + col2 AS INTEGER ) + - cor0.col2 FROM tab0 AS cor0
----
-164
-2
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 19 + - 2 col1 FROM tab0 AS cor0
----
-21
-21
-21

query I rowsort
SELECT - 89 * - col0 + - col1 FROM tab2 cor0
----
592
6883
7014

query I rowsort
SELECT + cor0.col0 + + col1 + - col1 AS col1 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT DISTINCT - - ( + cor0.col2 ) * cor0.col0 * ( 28 ) AS col1 FROM tab2 AS cor0
----
5292
56784
84056

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - ( col1 ) + + col1 col1 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5957
SELECT + 27 DIV - col0 + - col0 * col2 AS col2 FROM tab0
----
-35
-7298
-793

skipif mysql # not compatible
query I rowsort label-5957
SELECT + 27 / - col0 + - col0 * col2 AS col2 FROM tab0
----
-35
-7298
-793

query I rowsort
SELECT DISTINCT ( + col1 * - col2 ) FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT col1 * col0 - - col2 AS col0 FROM tab2 AS cor0
----
1381
244
4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-5960
SELECT ( 54 ) DIV col2 + col2 FROM tab1
----
55
57
96

skipif mysql # not compatible
query I rowsort label-5960
SELECT ( 54 ) / col2 + col2 FROM tab1
----
55
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 49 col0 FROM tab1, tab2 cor0
----
9 values hashing to cb40783c0fff72e8802cdf0682e7cb55

query I rowsort
SELECT 81 + 82 AS col1 FROM tab0
----
163
163
163

query I rowsort
SELECT 88 FROM tab0, tab1 AS cor0 CROSS JOIN tab2
----
27 values hashing to c46e7cf9bf516fdfde88534336a28177

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab1 AS cor2
----
3645 values hashing to 974a92f740f5f08d18564d29c05f7692

query I rowsort
SELECT DISTINCT + col1 * - col0 AS col1 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT tab1.col1 * - col1 + - col2 * 43 AS col0 FROM tab1
----
-2551
-2998
-4297

query I rowsort
SELECT DISTINCT + 98 AS col2 FROM tab1
----
98

query I rowsort
SELECT - + col0 + + col2 AS col0 FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT - col1 * - col1 - - col0 AS col0 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT DISTINCT + 2 + col0 FROM tab0 AS cor0
----
26
37
91

query I rowsort
SELECT DISTINCT - col0 - + col1 FROM tab0 cor0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT + col2 * + col2 + col1 FROM tab2 AS cor0
----
1461
735
760

onlyif mysql # use DIV operator for integer division
query I rowsort label-5973
SELECT DISTINCT + tab2.col1 + col2 DIV 44 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-5973
SELECT DISTINCT + tab2.col1 + col2 / 44 FROM tab2
----
17
31
59

query I rowsort
SELECT DISTINCT tab2.col2 + ( tab2.col0 ) * col1 + col2 AS col2 FROM tab2
----
1419
271
4654

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + 83 - ( + col1 ) col1 FROM tab2
----
104
50
79

query I rowsort
SELECT tab2.col0 + + ( + col1 ) + col2 FROM tab2
----
134
163
65

query I rowsort
SELECT DISTINCT col1 * - 3 FROM tab0 cor0
----
-258
-273
-291

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5978
SELECT ALL - + CAST( + col0 AS SIGNED ) + + col2 - cor0.col0 * + col2 * - col0 FROM tab2 AS cor0
----
1343
158132
237117

skipif mysql # not compatible
query I rowsort label-5978
SELECT ALL - + CAST ( + col0 AS INTEGER ) + + col2 - cor0.col0 * + col2 * - col0 FROM tab2 AS cor0
----
1343
158132
237117

query I rowsort
SELECT DISTINCT - + ( - cor0.col2 ) * + col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT - col0 * cor0.col0 + - col2 AS col0 FROM tab2 AS cor0
----
-6110
-6279
-76

onlyif mysql # use DIV operator for integer division
query I rowsort label-5981
SELECT + col0 DIV + col1 + - col1 AS col2 FROM tab1 AS cor0
----
-26
-4
-7

skipif mysql # not compatible
query I rowsort label-5981
SELECT + col0 / + col1 + - col1 AS col2 FROM tab1 AS cor0
----
-26
-4
-7

query I rowsort
SELECT ALL 92 + + cor0.col0 FROM tab2 AS cor0
----
170
171
99

query I rowsort
SELECT DISTINCT + + col2 + + col1 * col1 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT ALL - 45 AS col1 FROM tab0 AS cor0
----
-45
-45
-45

query I rowsort
SELECT + col2 + 34 + col1 * col0 AS col0 FROM tab2 AS cor0
----
1415
278
4662

query I rowsort
SELECT DISTINCT - col1 + - cor0.col0 * + col1 + - col0 AS col1 FROM tab1 AS cor0
----
-107
-1133
-714

query I rowsort
SELECT DISTINCT - - ( col0 ) + col2 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-5988
SELECT DISTINCT - 93 DIV col2 + + col2 FROM tab1 AS cor0
----
53
56
96

skipif mysql # not compatible
query I rowsort label-5988
SELECT DISTINCT - 93 / col2 + + col2 FROM tab1 AS cor0
----
53
56
96

query I rowsort
SELECT ALL - col2 * - 35 FROM tab1 cor0
----
1890
1995
3360

query I rowsort
SELECT DISTINCT + col2 + - 56 AS col1 FROM tab2
----
-18
-29
-30

query I rowsort
SELECT col1 + col0 * + col0 + col0 FROM tab0
----
1357
686
8101

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 + 36 * col1 + + cor0.col0 col2 FROM tab2 AS cor0
----
1154
2261
708

query I rowsort
SELECT ALL - - 36 * - col0 FROM tab1 AS cor0
----
-108
-2304
-2880

query I rowsort
SELECT - col0 * 19 + col1 * + 63 AS col1 FROM tab1 AS cor0
----
-586
-701
1581

query I rowsort
SELECT + ( col2 ) * col1 + 79 * col1 + col1 FROM tab2 AS cor0
----
2006
3317
6254

onlyif mysql # use DIV operator for integer division
query I rowsort label-5996
SELECT ALL tab1.col2 DIV col1 AS col0 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-5996
SELECT ALL tab1.col2 / col1 AS col0 FROM tab1
----
2
5
7

query I rowsort
SELECT DISTINCT tab0.col0 * col1 + 88 FROM tab0
----
2152
3483
8187

query I rowsort
SELECT ALL + col1 + + col2 * - 78 * col1 AS col1 FROM tab1
----
-109486
-44450
-97331

query I rowsort
SELECT ALL - + col0 + - col1 AS col1 FROM tab1 AS cor0
----
-29
-74
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 58 col0 FROM tab0 AS cor0
----
-58
-58
-58

query I rowsort
SELECT DISTINCT cor0.col1 * cor0.col0 AS col0 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT ALL 38 FROM tab2, tab0 cor0
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

query I rowsort
SELECT - - col2 * cor0.col0 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT + col1 - 74 * cor0.col2 FROM tab2 cor0
----
-1865
-1967
-2795

query I rowsort
SELECT + col2 - 76 * + col1 FROM tab1 AS cor0
----
-1922
-703
-892

query I rowsort
SELECT + 7 * col1 AS col1 FROM tab0
----
602
637
679

query I rowsort
SELECT + cor0.col2 * cor0.col2 FROM tab1, tab1 AS cor0
----
9 values hashing to aeb56f097f17f262600266df7fcf8652

query I rowsort
SELECT - ( + tab2.col0 ) * - col0 AS col2 FROM tab2
----
49
6084
6241

query I rowsort
SELECT col1 + - col2 * 0 + + cor0.col0 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-6010
SELECT cor0.col2 * col2 DIV - cor0.col1 AS col2 FROM tab2 AS cor0
----
-11
-23
-84

skipif mysql # not compatible
query I rowsort label-6010
SELECT cor0.col2 * col2 / - cor0.col1 AS col2 FROM tab2 AS cor0
----
-11
-23
-84

onlyif mysql # use DIV operator for integer division
query I rowsort label-6011
SELECT - 2 DIV + 87 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6011
SELECT - 2 / + 87 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 col0 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT + ( 59 ) AS col0 FROM tab2 AS cor0
----
59
59
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 39 + - 47 col1 FROM tab2 AS cor0
----
-8
-8
-8

query I rowsort
SELECT cor0.col1 AS col2 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT ALL - + 59 * + 79 FROM tab0 AS cor0
----
-4661
-4661
-4661

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6017
SELECT - CAST( + 32 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
-32
-32
-32

skipif mysql # not compatible
query I rowsort label-6017
SELECT - CAST ( + 32 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
-32
-32
-32

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6018
SELECT CAST( + ( col2 ) AS SIGNED ) FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-6018
SELECT CAST ( + ( col2 ) AS INTEGER ) FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT col1 * - col1 + col1 * col0 * col1 FROM tab2 AS cor0
----
22542
268037
5766

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 96 * + col2 col0 FROM tab2 AS cor0
----
2496
2592
3648

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - cor0.col1 col1 FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6022
SELECT 6 + col1 * - CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6022
SELECT 6 + col1 * - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 69 + + col2 AS col0 FROM tab1 AS cor0
----
-12
-15
27

query I rowsort
SELECT + 15 AS col2 FROM tab2 AS cor0
----
15
15
15

query I rowsort
SELECT ALL col1 + col1 * col0 FROM tab1 cor0
----
104
1053
650

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 * + col1 - - col2 col0 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT DISTINCT - col2 * col1 + 85 FROM tab2 AS cor0
----
-1449
-561
-752

onlyif mysql # use DIV operator for integer division
query I rowsort label-6028
SELECT ALL - col0 * - col0 - + col0 DIV col2 AS col2 FROM tab0 cor0
----
1190
576
7920

skipif mysql # not compatible
query I rowsort label-6028
SELECT ALL - col0 * - col0 - + col0 / col2 AS col2 FROM tab0 cor0
----
1190
576
7920

query I rowsort
SELECT tab0.col1 - 90 FROM tab0, tab2 AS cor0
----
9 values hashing to 7874aafe85d292be6e83bda348ad18a8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 46 col1 FROM tab1
----
46
46
46

onlyif mysql # use DIV operator for integer division
query I rowsort label-6031
SELECT DISTINCT - col2 + - col0 DIV 47 AS col0 FROM tab0 AS cor0
----
-1
-33
-83

skipif mysql # not compatible
query I rowsort label-6031
SELECT DISTINCT - col2 + - col0 / 47 AS col0 FROM tab0 AS cor0
----
-1
-33
-83

query I rowsort
SELECT + cor0.col0 * - ( 95 + - col2 ) AS col0 FROM tab0 AS cor0
----
-1157
-1488
-3290

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6033
SELECT - col0 / - CAST( col0 + col2 * + CAST( NULL AS SIGNED ) AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6033
SELECT - col0 / - CAST ( col0 + col2 * + CAST ( NULL AS INTEGER ) AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 90 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

query I rowsort
SELECT + 77 FROM tab0, tab1 AS cor0
----
9 values hashing to 051bf10c50e061d74ad0a4d205a1c622

query I rowsort
SELECT DISTINCT + - ( col0 ) - - col2 AS col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT DISTINCT tab2.col1 AS col2 FROM tab2, tab1, tab0 AS cor0
----
17
31
59

query I rowsort
SELECT + 74 * col2 FROM tab2
----
1924
1998
2812

query I rowsort
SELECT - col0 + + tab2.col1 AS col0 FROM tab2
----
-19
-62
24

query I rowsort
SELECT tab0.col2 + + col0 * + col1 AS col0 FROM tab0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT col0 * - 95 + col1 AS col1 FROM tab1
----
-259
-6070
-7587

query I rowsort
SELECT - 89 AS col0 FROM tab0
----
-89
-89
-89

query I rowsort
SELECT + 51 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to d8bf0a05c9c4d2a93812d106baae4752

query I rowsort
SELECT 99 * + cor0.col2 FROM tab2 AS cor0
----
2574
2673
3762

query I rowsort
SELECT ALL + col0 * - 96 FROM tab1
----
-288
-6144
-7680

query I rowsort
SELECT ALL col0 * 99 * - tab0.col1 FROM tab0
----
-204336
-336105
-801801

onlyif mysql # use DIV operator for integer division
query I rowsort label-6047
SELECT - col0 * col0 + + col1 DIV - col1 FROM tab0 AS cor0
----
-1226
-577
-7922

skipif mysql # not compatible
query I rowsort label-6047
SELECT - col0 * col0 + + col1 / - col1 FROM tab0 AS cor0
----
-1226
-577
-7922

onlyif mysql # use DIV operator for integer division
query I rowsort label-6048
SELECT DISTINCT + col2 DIV col2 + 37 + col0 * cor0.col0 FROM tab1 AS cor0
----
4134
47
6438

skipif mysql # not compatible
query I rowsort label-6048
SELECT DISTINCT + col2 / col2 + 37 + col0 * cor0.col0 FROM tab1 AS cor0
----
4134
47
6438

onlyif mysql # use DIV operator for integer division
query I rowsort label-6049
SELECT - - col2 DIV 19 AS col1 FROM tab0 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-6049
SELECT - - col2 / 19 AS col1 FROM tab0 AS cor0
----
0
1
4

query I rowsort
SELECT col0 * - 15 FROM tab1 cor0
----
-1200
-45
-960

query I rowsort
SELECT DISTINCT col0 + + col0 * col2 AS col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT ALL + + col0 * + col0 AS col0 FROM tab1 AS cor0
----
4096
6400
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-6053
SELECT ALL col1 * + col0 + col1 DIV cor0.col0 FROM tab1 AS cor0
----
1040
640
86

skipif mysql # not compatible
query I rowsort label-6053
SELECT ALL col1 * + col0 + col1 / cor0.col0 FROM tab1 AS cor0
----
1040
640
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 10 col2 FROM tab1 AS cor0
----
-10
-10
-10

query I rowsort
SELECT DISTINCT - 53 AS col0 FROM tab2 AS cor0
----
-53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor1.col2 col0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-6057
SELECT + + 52 DIV 48 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6057
SELECT + + 52 / 48 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT - 1 + + col0 AS col1 FROM tab2 AS cor0
----
6
77
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 4 * - col2 col1 FROM tab1 AS cor0
----
216
228
384

query I rowsort
SELECT + 66 * col1 AS col2 FROM tab0 AS cor0
----
5676
6006
6402

query I rowsort
SELECT + ( - 50 ) AS col0 FROM tab1 AS cor0
----
-50
-50
-50

query I rowsort
SELECT DISTINCT - col2 * + col2 * + col0 AS col1 FROM tab0 cor0
----
-26136
-35
-598436

query I rowsort
SELECT ALL ( - col1 ) + tab0.col1 * - col2 * - col2 AS col0 FROM tab0
----
0
611793
93568

onlyif mysql # use DIV operator for integer division
query I rowsort label-6064
SELECT - 63 + + cor0.col0 * col0 DIV 11 FROM tab0 AS cor0
----
-11
48
657

skipif mysql # not compatible
query I rowsort label-6064
SELECT - 63 + + cor0.col0 * col0 / 11 FROM tab0 AS cor0
----
-11
48
657

query I rowsort
SELECT DISTINCT - 36 + col2 * 13 * 14 AS col0 FROM tab2 AS cor0
----
4696
4878
6880

query I rowsort
SELECT ALL + 33 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

query I rowsort
SELECT ALL cor0.col1 - 87 * 37 AS col2 FROM tab0, tab2 cor0
----
9 values hashing to 58ae65b68463e2c386ec4eda9d2a52e6

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 cor0, tab2 AS cor1, tab0, tab0 AS cor2
----
3645 values hashing to b223aa53e3aafe0f3f3f59048cc7a0d2

query I rowsort
SELECT + cor0.col0 + + col0 FROM tab2 cor0
----
14
156
158

query I rowsort
SELECT ALL + + col2 + + col1 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL col0 + - ( 71 ) * + col1 AS col1 FROM tab2 AS cor0
----
-1128
-2194
-4111

query I rowsort
SELECT DISTINCT + col0 * cor0.col0 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT - + cor0.col1 + - col0 * col2 FROM tab2 AS cor0
----
-2087
-220
-3019

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6074
SELECT - cor0.col2 + CAST( NULL AS DECIMAL ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6074
SELECT - cor0.col2 + CAST ( NULL AS REAL ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + tab0.col2 + - col2 AS col0 FROM tab0
----
0

query I rowsort
SELECT ALL col2 * col2 + - tab2.col2 * + col2 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6077
SELECT DISTINCT - tab1.col2 * col0 + 12 DIV col1 AS col0 FROM tab1
----
-162
-3647
-7680

skipif mysql # not compatible
query I rowsort label-6077
SELECT DISTINCT - tab1.col2 * col0 + 12 / col1 AS col0 FROM tab1
----
-162
-3647
-7680

query I rowsort
SELECT DISTINCT - 66 + + tab0.col2 AS col1 FROM tab0
----
-33
-65
16

query I rowsort
SELECT 4 * - col2 FROM tab1
----
-216
-228
-384

query I rowsort
SELECT DISTINCT - ( cor0.col0 ) FROM tab1, tab2 cor0
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col1 + col1 * col0 col1 FROM tab2 cor0
----
2686
434
9204

query I rowsort
SELECT ALL col0 + - 0 AS col2 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL - - col0 + ( col1 ) FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT - col0 * + col2 + + ( cor0.col0 * - ( + col0 ) ) FROM tab2 AS cor0
----
-238
-8112
-9243

query I rowsort
SELECT ALL - cor0.col0 * 26 FROM tab1 AS cor0
----
-1664
-2080
-78

query I rowsort
SELECT ALL + 20 + - tab1.col1 FROM tab1
----
-6
10
7

query I rowsort
SELECT ALL col1 * + col1 * col0 + col0 AS col0 FROM tab0
----
177528
329350
737098

query I rowsort
SELECT + - col1 + + 96 FROM tab2 cor0
----
37
65
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-6089
SELECT + + ( 17 ) + - col0 DIV - 95 FROM tab0 AS cor0
----
17
17
17

skipif mysql # not compatible
query I rowsort label-6089
SELECT + + ( 17 ) + - col0 / - 95 FROM tab0 AS cor0
----
17
17
17

query I rowsort
SELECT ALL - col0 + cor0.col1 AS col2 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT ALL - - col2 + + 39 + col1 AS col2 FROM tab0 AS cor0
----
137
158
212

query I rowsort
SELECT cor0.col0 + - col1 + + 49 AS col2 FROM tab1 AS cor0
----
103
116
26

query I rowsort
SELECT DISTINCT + 42 AS col2 FROM tab2, tab0 AS cor0
----
42

query I rowsort
SELECT - col0 - 24 AS col2 FROM tab2
----
-102
-103
-31

query I rowsort
SELECT ALL - 87 * - col0 AS col1 FROM tab1
----
261
5568
6960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6096
SELECT - CAST( NULL AS SIGNED ) + + col1 * + col2 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6096
SELECT - CAST ( NULL AS INTEGER ) + + col1 * + col2 AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT + ( col2 ) * + col2 AS col1 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT + - tab2.col0 AS col2 FROM tab2, tab1, tab1 AS cor0, tab0
----
81 values hashing to adaea38eae032c1639715f21831dd376

onlyif mysql # use DIV operator for integer division
query I rowsort label-6099
SELECT ALL - 9 * - ( col0 ) + - 7 DIV - cor0.col1 + + col0 FROM tab1 AS cor0
----
30
640
800

skipif mysql # not compatible
query I rowsort label-6099
SELECT ALL - 9 * - ( col0 ) + - 7 / - cor0.col1 + + col0 FROM tab1 AS cor0
----
30
640
800

query I rowsort
SELECT col1 * ( - cor0.col2 ) AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT col2 + - 75 * - tab2.col0 AS col1 FROM tab2
----
552
5876
5963

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6102
SELECT DISTINCT CAST( NULL AS DECIMAL ) / - col2 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-6102
SELECT DISTINCT CAST ( NULL AS REAL ) / - col2 FROM tab0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + cor1.col0 col0 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 85c64c757f85a1bb1f5a5e43fb2bbe57

query I rowsort
SELECT DISTINCT - col0 - cor0.col2 AS col1 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT + + ( + col0 ) + + col0 FROM tab0 AS cor0
----
178
48
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6106
SELECT DISTINCT - col0 * col2 * - CAST( + 70 AS SIGNED ) + cor0.col2 AS col2 FROM tab2 AS cor0
----
13257
141986
210178

skipif mysql # not compatible
query I rowsort label-6106
SELECT DISTINCT - col0 * col2 * - CAST ( + 70 AS INTEGER ) + cor0.col2 AS col2 FROM tab2 AS cor0
----
13257
141986
210178

onlyif mysql # use DIV operator for integer division
query I rowsort label-6107
SELECT DISTINCT col1 DIV - cor0.col2 col1 FROM tab1 cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6107
SELECT DISTINCT col1 / - cor0.col2 col1 FROM tab1 cor0
----
0

query I rowsort
SELECT DISTINCT + + ( + col0 ) + - ( - col1 ) AS col1 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-6109
SELECT ALL 13 - + col0 DIV - 56 AS col0 FROM tab0 AS cor0
----
13
13
14

skipif mysql # not compatible
query I rowsort label-6109
SELECT ALL 13 - + col0 / - 56 AS col0 FROM tab0 AS cor0
----
13
13
14

query I rowsort
SELECT + col1 * col0 * - col2 - col0 FROM tab2 cor0
----
-119730
-51113
-5866

query I rowsort
SELECT ALL col1 * col0 * col0 AS col1 FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT DISTINCT - - col2 * col2 * + col0 FROM tab1 AS cor0
----
207936
737280
8748

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - col0 ) * 19 col0 FROM tab2 AS cor0
----
-133
-1482
-1501

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6114
SELECT - - col1 - + col1 * - CAST( col2 + - col2 * + col2 AS SIGNED ) FROM tab1 AS cor0
----
-118547
-31910
-74386

skipif mysql # not compatible
query I rowsort label-6114
SELECT - - col1 - + col1 * - CAST ( col2 + - col2 * + col2 AS INTEGER ) FROM tab1 AS cor0
----
-118547
-31910
-74386

query I rowsort
SELECT - 62 AS col1 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to d2579f9395350eda865ff3a2d38a74f6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 24 col1 FROM tab1
----
24
24
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 - cor1.col2 col1 FROM tab2, tab2 AS cor0, tab1 cor1
----
27 values hashing to b11e55d4642e48fe8aebd959c35c60ae

query I rowsort
SELECT + col0 + col2 * + 30 FROM tab0 AS cor0
----
1014
2549
65

query I rowsort
SELECT - col0 * - col1 * + col1 AS col1 FROM tab1
----
13520
2028
6400

query I rowsort
SELECT DISTINCT + 92 AS col0 FROM tab0, tab1 cor0, tab0 AS cor1
----
92

query I rowsort
SELECT cor0.col0 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT DISTINCT - + col1 * - col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL + - col2 * 32 FROM tab2 cor0
----
-1216
-832
-864

query I rowsort
SELECT ( + 51 ) FROM tab1, tab1 AS cor0
----
9 values hashing to d8bf0a05c9c4d2a93812d106baae4752

query I rowsort
SELECT ALL tab0.col2 * col1 * - 95 FROM tab0
----
-269610
-708890
-9215

query I rowsort
SELECT DISTINCT + 33 AS col0 FROM tab0, tab2 AS cor0
----
33

query I rowsort
SELECT + col1 * col1 * col1 AS col0 FROM tab2
----
205379
29791
4913

query I rowsort
SELECT ALL 64 * - 31 FROM tab2, tab0 AS cor0 CROSS JOIN tab1, tab0, tab1 AS cor1
----
243 values hashing to de222192f8df2c7db0add720a9a2971a

query I rowsort
SELECT - + 38 AS col0 FROM tab0 AS cor0
----
-38
-38
-38

query I rowsort
SELECT + + ( - col1 ) * + col0 * col1 + 71 + col0 FROM tab0 AS cor0
----
-177409
-329209
-736849

query I rowsort
SELECT - - ( 90 ) FROM tab0 AS cor0
----
90
90
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 33 * col0 col1 FROM tab2 AS cor0
----
231
2574
2607

query I rowsort
SELECT ALL + 90 FROM tab2, tab0 AS cor0
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

query I rowsort
SELECT + + 7 AS col0 FROM tab0 AS cor0
----
7
7
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6135
SELECT + col1 * col0 + col0 * + CAST( NULL AS SIGNED ) / col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6135
SELECT + col1 * col0 + col0 * + CAST ( NULL AS INTEGER ) / col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 42 AS col1 FROM tab2, tab1 cor0
----
9 values hashing to 64c29db9f1cd7ed4ddeb1735e3e0d442

query I rowsort
SELECT + 39 + - 51 FROM tab2
----
-12
-12
-12

query I rowsort
SELECT ( + col2 ) + - col0 * 15 FROM tab0 AS cor0
----
-1253
-327
-524

query I rowsort
SELECT DISTINCT col1 * - col2 * col0 + - col0 AS col2 FROM tab2 AS cor0
----
-119730
-51113
-5866

query I rowsort
SELECT DISTINCT + col0 + + col2 + col0 FROM tab0 AS cor0
----
260
71
81

query I rowsort
SELECT ALL + + col0 + cor0.col0 * col2 AS col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT + - col1 + + cor0.col1 * - ( - col0 ) FROM tab0 cor0
----
1978
3298
8008

query I rowsort
SELECT DISTINCT + - col1 + col0 * - 12 AS col2 FROM tab2 AS cor0
----
-115
-965
-995

query I rowsort
SELECT ALL + col0 * col1 * - 47 AS col1 FROM tab2 cor0
----
-10199
-216294
-63121

query I rowsort
SELECT + 83 * + 50 FROM tab1
----
4150
4150
4150

query I rowsort
SELECT DISTINCT + - 31 * + cor0.col1 FROM tab1 AS cor0
----
-310
-403
-806

query I rowsort
SELECT DISTINCT + col0 * + col0 * - col1 AS col0 FROM tab0 AS cor0
----
-118825
-49536
-720811

query I rowsort
SELECT 36 + col1 FROM tab2 AS cor0
----
53
67
95

query I rowsort
SELECT DISTINCT + col1 * col0 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + + col0 * col2 + cor0.col0 + col0 AS col2 FROM tab1 AS cor0
----
168
3776
7840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col0 * - col2 col1 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 - 48 col0 FROM tab2
----
-74
-75
-86

query I rowsort
SELECT - - col1 * 2 - 31 FROM tab2 AS cor0
----
3
31
87

query I rowsort
SELECT ALL - col0 * col1 + + col2 AS col0 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT ALL - col2 + + 93 AS col1 FROM tab0 AS cor0
----
11
60
92

query I rowsort
SELECT - col2 + 27 FROM tab1 cor0
----
-27
-30
-69

query I rowsort
SELECT + - col1 * - col0 - - col1 AS col2 FROM tab1 cor0
----
104
1053
650

query I rowsort
SELECT DISTINCT - - col0 * - cor0.col1 * 70 + col2 FROM tab1 AS cor0
----
-44743
-5406
-72704

query I rowsort
SELECT DISTINCT + ( 59 ) * col2 FROM tab1 AS cor0
----
3186
3363
5664

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6160
SELECT DISTINCT col0 / - CAST( NULL AS SIGNED ) FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-6160
SELECT DISTINCT col0 / - CAST ( NULL AS INTEGER ) FROM tab0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6161
SELECT ALL 60 + + cor0.col0 DIV col2 + col2 FROM tab0 AS cor0
----
143
93
96

skipif mysql # not compatible
query I rowsort label-6161
SELECT ALL 60 + + cor0.col0 / col2 + col2 FROM tab0 AS cor0
----
143
93
96

query I rowsort
SELECT - col2 * ( + col1 ) + col2 * 35 AS col2 FROM tab2 AS cor0
----
-624
108
684

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6163
SELECT tab0.col1 / - CAST( NULL AS SIGNED ) AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6163
SELECT tab0.col1 / - CAST ( NULL AS INTEGER ) AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT 31 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

query I rowsort
SELECT + col1 + - 44 AS col2 FROM tab0 AS cor0
----
42
47
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + 94 col2 FROM tab0 AS cor0
----
118
129
183

query I rowsort
SELECT col1 * - col0 + 65 AS col1 FROM tab1 AS cor0
----
-13
-575
-975

query I rowsort
SELECT col2 * col0 + col0 * - 72 + + col0 * ( - col0 ) FROM tab0
----
-1512
-3710
-7031

query I rowsort
SELECT DISTINCT + col2 + + tab2.col1 FROM tab2
----
55
58
85

query I rowsort
SELECT - col1 + col1 * ( - col2 ) FROM tab2
----
-1593
-663
-868

query I rowsort
SELECT - col2 + 94 * - tab1.col0 AS col2 FROM tab1
----
-336
-6073
-7616

query I rowsort
SELECT ALL cor0.col1 + col1 * - cor0.col2 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT ALL + cor0.col0 - ( ( col2 ) ) * + col1 AS col2 FROM tab0 AS cor0
----
-2814
-62
-7373

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * + 26 + - 96 col0 FROM tab1 AS cor0
----
-356
-434
-772

query I rowsort
SELECT ALL col0 + 14 * col1 FROM tab1 AS cor0
----
204
262
367

query I rowsort
SELECT + col2 + - 79 * col1 AS col2 FROM tab1 AS cor0
----
-2000
-733
-931

onlyif mysql # use DIV operator for integer division
query I rowsort label-6177
SELECT DISTINCT - + col2 * col1 * + 42 + + col2 DIV 36 + - ( cor0.col2 ) FROM tab1 AS cor0
----
-23996
-52510
-59021

skipif mysql # not compatible
query I rowsort label-6177
SELECT DISTINCT - + col2 * col1 * + 42 + + col2 / 36 + - ( cor0.col2 ) FROM tab1 AS cor0
----
-23996
-52510
-59021

query I rowsort
SELECT DISTINCT + cor0.col0 + ( col0 ) AS col0 FROM tab2 AS cor0
----
14
156
158

onlyif mysql # use DIV operator for integer division
query I rowsort label-6179
SELECT DISTINCT col0 DIV + col1 AS col1 FROM tab2
----
0
1
4

skipif mysql # not compatible
query I rowsort label-6179
SELECT DISTINCT col0 / + col1 AS col1 FROM tab2
----
0
1
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-6180
SELECT col1 DIV + col2 - + col2 * + tab1.col1 FROM tab1
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort label-6180
SELECT col1 / + col2 - + col2 * + tab1.col1 FROM tab1
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-6181
SELECT DISTINCT - col0 DIV + tab1.col0 AS col0 FROM tab1
----
-1

skipif mysql # not compatible
query I rowsort label-6181
SELECT DISTINCT - col0 / + tab1.col0 AS col0 FROM tab1
----
-1

query III rowsort
SELECT * FROM tab1 WHERE - col2 IN ( col1 * col0 )
----

query I rowsort
SELECT DISTINCT col0 FROM tab0 WHERE NOT NULL NOT IN ( - col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6184
SELECT DISTINCT + col1 * col1 DIV col1 AS col1 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-6184
SELECT DISTINCT + col1 * col1 / col1 AS col1 FROM tab1
----
10
13
26

query I rowsort
SELECT DISTINCT - col0 + col1 - + col0 * tab0.col0 AS col2 FROM tab0
----
-1163
-514
-7919

query I rowsort
SELECT tab1.col2 + - tab1.col0 FROM tab1
----
-7
16
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-6187
SELECT tab0.col2 * col0 DIV col2 AS col2 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-6187
SELECT tab0.col2 * col0 / col2 AS col2 FROM tab0
----
24
35
89

query I rowsort
SELECT col2 AS col1 FROM tab0 WHERE NOT NULL NOT IN ( - col2 * col1 )
----

query I rowsort
SELECT DISTINCT + tab0.col2 + col1 * + col2 - - col0 FROM tab0
----
133
2895
7633

query I rowsort
SELECT - tab2.col1 * + col0 AS col1 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT col2 + + col1 AS col1 FROM tab0
----
119
173
98

query I rowsort
SELECT DISTINCT - col0 + col0 * col1 FROM tab0
----
2040
3360
8010

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT col0 * - col0 NOT IN ( col0 * + col1 - tab2.col0 )
----

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6194
SELECT ALL col1 * col0 + - CAST( - cor0.col1 AS SIGNED ) AS col0 FROM tab0 cor0
----
2150
3492
8190

skipif mysql # not compatible
query I rowsort label-6194
SELECT ALL col1 * col0 + - CAST ( - cor0.col1 AS INTEGER ) AS col0 FROM tab0 cor0
----
2150
3492
8190

query I rowsort
SELECT ALL + - 3 AS col0 FROM tab0 AS cor0
----
-3
-3
-3

query I rowsort
SELECT ALL + + ( cor0.col1 ) * 64 AS col1 FROM tab1 AS cor0
----
1664
640
832

query I rowsort
SELECT DISTINCT - 99 * - cor0.col1 FROM tab0 AS cor0
----
8514
9009
9603

query I rowsort
SELECT col2 * + col2 + col0 AS col0 FROM tab1
----
2919
3313
9296

query I rowsort
SELECT DISTINCT + - 19 * cor0.col0 AS col2 FROM tab0 AS cor0
----
-1691
-456
-665

query I rowsort
SELECT DISTINCT - + col0 + - col2 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT + 35 * + col1 - - col2 AS col1 FROM tab2 AS cor0
----
1112
2091
633

query I rowsort
SELECT - 15 + + cor0.col1 FROM tab0 AS cor0
----
71
76
82

query I rowsort
SELECT ALL col2 * - col2 * col2 FROM tab2 AS cor0
----
-17576
-19683
-54872

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col1 - - 15 col1 FROM tab1 AS cor0
----
1055
655
93

query I rowsort
SELECT DISTINCT + col2 + cor0.col1 AS col1 FROM tab2 cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-6206
SELECT DISTINCT - col2 DIV + cor0.col2 AS col0 FROM tab1 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-6206
SELECT DISTINCT - col2 / + cor0.col2 AS col0 FROM tab1 AS cor0
----
-1

query I rowsort
SELECT ALL - col1 + + col2 * col1 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT cor0.col1 + + col1 + + col2 * col0 * ( - col0 ) AS col1 FROM tab2 cor0
----
-1261
-158066
-237124

onlyif mysql # use DIV operator for integer division
query I rowsort label-6209
SELECT + col1 + - 51 * + cor0.col1 DIV - col1 + col0 col0 FROM tab1 AS cor0
----
125
144
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6209
SELECT + col1 + - 51 * + cor0.col1 / - col1 + col0 col0 FROM tab1 AS cor0
----
125
144
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-6210
SELECT + col1 * 44 - - ( - col0 + col0 ) DIV col1 FROM tab1 cor0
----
1144
440
572

skipif mysql # not compatible
query I rowsort label-6210
SELECT + col1 * 44 - - ( - col0 + col0 ) / col1 FROM tab1 cor0
----
1144
440
572

query I rowsort
SELECT ALL + tab2.col0 + col1 + + tab2.col2 * + col2 FROM tab2
----
1540
767
813

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( + col1 AS REAL ) * - col2 + + CAST ( - col0 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-132
-2862
-7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-6213
SELECT - 37 * - col1 DIV col1 AS col0 FROM tab2 AS cor0
----
37
37
37

skipif mysql # not compatible
query I rowsort label-6213
SELECT - 37 * - col1 / col1 AS col0 FROM tab2 AS cor0
----
37
37
37

query I rowsort
SELECT + 22 * col2 FROM tab0 AS cor0
----
1804
22
726

query I rowsort
SELECT DISTINCT - 95 * - col2 + + col0 * cor0.col1 + + col0 FROM tab0 AS cor0
----
15978
3525
5223

query I rowsort
SELECT 94 + 43 * col0 FROM tab1 AS cor0
----
223
2846
3534

onlyif mysql # use DIV operator for integer division
query I rowsort label-6217
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-6217
SELECT DISTINCT ( + col2 ) / col0 col2 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT DISTINCT - 83 FROM tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab0 AS cor2
----
-83

query I rowsort
SELECT 29 + + tab1.col2 AS col0 FROM tab1
----
125
83
86

query I rowsort
SELECT ALL 25 * - 30 FROM tab1
----
-750
-750
-750

query I rowsort
SELECT ALL + 84 AS col2 FROM tab1
----
84
84
84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6222
SELECT DISTINCT - CAST( NULL AS SIGNED ) + - col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6222
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + - col1 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * + 67 col0 FROM tab2
----
-1139
-2077
-3953

onlyif mysql # use DIV operator for integer division
query I rowsort label-6224
SELECT - col1 + - col2 DIV - col1 FROM tab1
----
-24
-5
-6

skipif mysql # not compatible
query I rowsort label-6224
SELECT - col1 + - col2 / - col1 FROM tab1
----
-24
-5
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-6225
SELECT + + col1 DIV CAST( ( - col2 ) AS SIGNED ) + + 8 FROM tab1 AS cor0
----
8
8
8

skipif mysql # not compatible
query I rowsort label-6225
SELECT + + col1 / CAST ( ( - col2 ) AS INTEGER ) + + 8 FROM tab1 AS cor0
----
8
8
8

query IIIIII rowsort
SELECT * FROM tab1, tab2 cor0 WHERE NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT col2 + cor0.col0 AS col1 FROM tab1 cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-6228
SELECT + col2 DIV + col0 AS col2 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6228
SELECT + col2 / + col0 AS col2 FROM tab0 AS cor0
----
0
0
1

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0, tab1 cor1, tab2 cor2
----
972 values hashing to e610acd60f342127e6cdba18673d9f0e

query I rowsort
SELECT - 67 + + col2 AS col2 FROM tab1 cor0
----
-10
-13
29

query I rowsort
SELECT - - ( - col2 ) * col0 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT col1 * ( - 27 ) * col0 FROM tab1
----
-17280
-2106
-28080

query I rowsort
SELECT + + 29 + - col1 FROM tab1 AS cor0
----
16
19
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 90 * + 49 + - col2 col2 FROM tab1
----
4314
4353
4356

query I rowsort
SELECT DISTINCT + 53 + + col0 * tab1.col0 FROM tab1
----
4149
62
6453

query I rowsort
SELECT DISTINCT + 10 * - col2 + + col0 AS col2 FROM tab2
----
-182
-263
-301

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * col1 * - ( col1 ) + + col2 col2 FROM tab0 AS cor0
----
244101
679124
9410

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - col0 col1 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT - + 25 - - cor0.col0 FROM tab2 cor0
----
-18
53
54

query I rowsort
SELECT ALL 22 * + col2 * tab2.col1 + tab2.col1 * 51 AS col2 FROM tab2
----
15079
19995
36757

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-6242
SELECT - 45 + - 71 DIV col2 + ( col1 ) AS col1 FROM tab0
----
-19
39
46

skipif mysql # not compatible
query I rowsort label-6242
SELECT - 45 + - 71 / col2 + ( col1 ) AS col1 FROM tab0
----
-19
39
46

query I rowsort
SELECT 14 * + col1 AS col0 FROM tab2
----
238
434
826

query I rowsort
SELECT DISTINCT 21 * tab0.col1 AS col0 FROM tab0
----
1806
1911
2037

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 + col2 * + 32 col0 FROM tab2 AS cor0
----
1295
871
910

query I rowsort
SELECT 63 + cor0.col0 AS col2 FROM tab2 AS cor0
----
141
142
70

query I rowsort
SELECT ALL + - col2 * cor0.col2 - + 25 * 45 AS col0 FROM tab0 cor0
----
-1126
-2214
-7849

query I rowsort
SELECT DISTINCT - - cor0.col2 * + cor0.col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - + 57 * + col2 FROM tab0 AS cor0
----
-1881
-4674
-57

query I rowsort
SELECT + 91 + col1 FROM tab0 AS cor0
----
177
182
188

query I rowsort
SELECT ALL - - col2 * - cor0.col0 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + cor0.col1 * + ( col1 ) + + col2 AS col2 FROM tab0 cor0
----
7429
8363
9410

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 44 col2 FROM tab2
----
44
44
44

onlyif mysql # use DIV operator for integer division
query I rowsort label-6254
SELECT DISTINCT col0 * col0 - CAST( - col2 + col2 AS SIGNED ) DIV + ( + tab0.col1 * + col1 ) FROM tab0
----
1225
576
7921

skipif mysql # not compatible
query I rowsort label-6254
SELECT DISTINCT col0 * col0 - CAST ( - col2 + col2 AS INTEGER ) / + ( + tab0.col1 * + col1 ) FROM tab0
----
1225
576
7921

query I rowsort
SELECT ALL - cor1.col1 AS col0 FROM tab1, tab1 cor0, tab0 AS cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT + 29 * col2 AS col2 FROM tab2 AS cor0
----
1102
754
783

query I rowsort
SELECT + - ( col1 ) - col1 * - col2 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT + 85 + tab1.col2 AS col1 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to f2c49ebb8582503783685d9f8c7395c9

query I rowsort
SELECT col0 * col0 + 46 AS col0 FROM tab1
----
4142
55
6446

query I rowsort
SELECT ALL + 93 * + col2 + 43 * col2 - col0 FROM tab2
----
3458
3665
5089

query I rowsort
SELECT DISTINCT col2 - col0 * + 19 AS col0 FROM tab1
----
-1159
-1424
-3

query I rowsort
SELECT DISTINCT + tab2.col0 - tab2.col2 FROM tab2
----
-20
41
52

query IIIIIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 cor0 CROSS JOIN tab0, tab1 cor1, tab1, tab1 AS cor2, tab2 AS cor3
----
13122 values hashing to 2a23a2efbd7482492eade70ce0528c27

query I rowsort
SELECT + col1 * + ( col0 ) + + col0 * col1 AS col0 FROM tab0 AS cor0
----
16198
4128
6790

query I rowsort
SELECT DISTINCT + + col1 * + 13 AS col0 FROM tab0 AS cor0
----
1118
1183
1261

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6266
SELECT col1 * CAST( + cor0.col1 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
289
3481
961

skipif mysql # not compatible
query I rowsort label-6266
SELECT col1 * CAST ( + cor0.col1 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT DISTINCT + cor0.col2 * - 64 FROM tab2 AS cor0
----
-1664
-1728
-2432

query I rowsort
SELECT + col2 * 81 - col2 AS col1 FROM tab0 AS cor0
----
2640
6560
80

query I rowsort
SELECT ALL + cor0.col2 + + col1 * - col2 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT - col2 * ( - 16 ) AS col2 FROM tab1 AS cor0
----
1536
864
912

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6271
SELECT DISTINCT col0 + CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6271
SELECT DISTINCT col0 + CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL

query I rowsort
SELECT ALL + cor0.col0 + cor0.col2 * - col0 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT - - col0 * + ( 74 ) AS col2 FROM tab2 AS cor0
----
518
5772
5846

query I rowsort
SELECT DISTINCT - col2 * - 37 AS col2 FROM tab2 AS cor0
----
1406
962
999

query I rowsort
SELECT - col0 * + 94 AS col2 FROM tab1 AS cor0
----
-282
-6016
-7520

query I rowsort
SELECT - + ( - col0 ) * - cor0.col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT - ( tab2.col1 + col2 ) FROM tab2
----
-55
-58
-85

query I rowsort
SELECT - ( - 11 ) AS col0 FROM tab2 AS cor0
----
11
11
11

query I rowsort
SELECT + col1 * + col1 + - cor0.col1 FROM tab2 AS cor0
----
272
3422
930

query I rowsort
SELECT 20 * + cor0.col1 FROM tab0 AS cor0
----
1720
1820
1940

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6281
SELECT + + CAST( col1 AS SIGNED ) col2 FROM tab1 cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6281
SELECT + + CAST ( col1 AS INTEGER ) col2 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT ALL - + col1 + + col2 AS col0 FROM tab2 AS cor0
----
-33
-4
21

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6283
SELECT ALL - ( col0 ) + col0 * CAST( col0 AS SIGNED ) + - col1 * col0 FROM tab0 AS cor0
----
-1512
-2205
-267

skipif mysql # not compatible
query I rowsort label-6283
SELECT ALL - ( col0 ) + col0 * CAST ( col0 AS INTEGER ) + - col1 * col0 FROM tab0 AS cor0
----
-1512
-2205
-267

query I rowsort
SELECT - + 41 + + col0 * + cor0.col1 FROM tab1 cor0
----
37
599
999

query I rowsort
SELECT ALL - 92 * col1 FROM tab0 AS cor0
----
-7912
-8372
-8924

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 26 col1 FROM tab1 AS cor0
----
-26

query I rowsort
SELECT ALL 46 + - ( cor0.col1 + col0 ) FROM tab0 AS cor0
----
-134
-64
-86

query I rowsort
SELECT ALL cor0.col2 + + col1 * + col1 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT 73 + - col1 FROM tab1 cor0
----
47
60
63

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6290
SELECT DISTINCT + - CAST( col2 AS SIGNED ) * col2 FROM tab0 AS cor0
----
-1
-1089
-6724

skipif mysql # not compatible
query I rowsort label-6290
SELECT DISTINCT + - CAST ( col2 AS INTEGER ) * col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT - ( - col1 ) + + col1 FROM tab0 AS cor0
----
172
182
194

onlyif mysql # use DIV operator for integer division
query I rowsort label-6292
SELECT ALL + col1 DIV col0 - col0 * + col0 FROM tab0 AS cor0
----
-1223
-573
-7920

skipif mysql # not compatible
query I rowsort label-6292
SELECT ALL + col1 / col0 - col0 * + col0 FROM tab0 AS cor0
----
-1223
-573
-7920

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( - 22 AS REAL ) + col2 FROM tab2 AS cor0
----
48
49
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * + col0 + - col2 col2 FROM tab1 AS cor0
----
-45
4039
6304

query I rowsort
SELECT + + ( + 71 ) + - col0 * - 59 FROM tab1 AS cor0
----
248
3847
4791

query I rowsort
SELECT ALL + 39 - 97 FROM tab0 AS cor0
----
-58
-58
-58

query I rowsort
SELECT ALL - col0 * ( col2 * + tab0.col0 ) - col1 FROM tab0
----
-1322
-19094
-649613

query I rowsort
SELECT ALL + col0 * + 49 + - col1 * 22 * col2 FROM tab2 AS cor0
----
-10341
-18071
-29926

query I rowsort
SELECT - ( - 94 ) AS col2 FROM tab0 AS cor0
----
94
94
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + - col2 + col1 col2 FROM tab1 AS cor0
----
-25
-3
17

query I rowsort
SELECT + 53 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to fede6033dee346dbd272085c05724fda

query I rowsort
SELECT ALL col2 * col0 + - col1 FROM tab2
----
158
1969
2985

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6303
SELECT DISTINCT - CAST( + col2 AS SIGNED ) * col2 * - CAST( NULL AS SIGNED ) + - 22 * - col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-6303
SELECT DISTINCT - CAST ( + col2 AS INTEGER ) * col2 * - CAST ( NULL AS INTEGER ) + - 22 * - col1 FROM tab1
----
NULL

query I rowsort
SELECT ALL + col0 + col2 * col2 FROM tab2
----
1523
736
754

query I rowsort
SELECT DISTINCT ( col2 ) + + tab0.col2 * 37 FROM tab0
----
1254
3116
38

query I rowsort
SELECT - + cor0.col1 + 84 FROM tab2 AS cor0
----
25
53
67

query I rowsort
SELECT DISTINCT - - col2 * cor0.col1 * - col2 + 7 AS col2 FROM tab1 AS cor0
----
-119801
-32483
-75809

onlyif mysql # use DIV operator for integer division
query I rowsort label-6308
SELECT - + 46 * - col0 * + col1 + col2 DIV col1 FROM tab0 AS cor0
----
156170
372554
94944

skipif mysql # not compatible
query I rowsort label-6308
SELECT - + 46 * - col0 * + col1 + col2 / col1 FROM tab0 AS cor0
----
156170
372554
94944

query I rowsort
SELECT ALL - col0 * ( + col2 ) + col1 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT 85 * + col0 + tab1.col1 AS col0 FROM tab1
----
281
5450
6813

onlyif mysql # use DIV operator for integer division
query I rowsort label-6311
SELECT - tab2.col2 DIV col0 + tab2.col0 AS col0 FROM tab2
----
4
78
79

skipif mysql # not compatible
query I rowsort label-6311
SELECT - tab2.col2 / col0 + tab2.col0 AS col0 FROM tab2
----
4
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 10 col2 FROM tab0, tab1 AS cor0
----
9 values hashing to f68f33032846e21ee6b2c668fc10355e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6313
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-6313
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6314
SELECT + col0 + + CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6314
SELECT + col0 + + CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col2 * - cor0.col2 - - col2 AS col0 FROM tab0 AS cor0
----
-1056
-6642
0

query I rowsort
SELECT ALL col1 * ( - col0 ) FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - - col1 * + 62 AS col1 FROM tab0 AS cor0
----
5332
5642
6014

query I rowsort
SELECT - + col0 + - cor0.col2 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT DISTINCT - + col1 + - col0 * col1 - col0 AS col2 FROM tab1 AS cor0
----
-107
-1133
-714

query I rowsort
SELECT ALL 52 + + 67 FROM tab1, tab0 AS cor0
----
9 values hashing to d2a0ef1182e6bf2495fa932b2816ad80

query I rowsort
SELECT - tab1.col1 + 37 FROM tab1
----
11
24
27

query I rowsort
SELECT ALL - 96 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to c89b545346f99713888a7934e4caa539

query I rowsort
SELECT ALL - 66 * 69 AS col1 FROM tab0 cor0 CROSS JOIN tab2, tab2 AS cor1
----
27 values hashing to 56c96f1ffe7162fc8030b63da8c05962

onlyif mysql # use DIV operator for integer division
query I rowsort label-6324
SELECT ALL col1 + + cor0.col0 DIV 85 AS col2 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-6324
SELECT ALL col1 + + cor0.col0 / 85 AS col2 FROM tab2 AS cor0
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-6325
SELECT col0 DIV cor0.col1 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-6325
SELECT col0 / cor0.col1 FROM tab2 AS cor0
----
0
1
4

query I rowsort
SELECT ALL col2 + + 88 FROM tab1 AS cor0
----
142
145
184

query I rowsort
SELECT + col1 + - 31 * col0 FROM tab1 cor0
----
-1974
-2467
-67

query I rowsort
SELECT DISTINCT + col1 * ( 25 + + col0 ) * + col1 FROM tab2 AS cor0
----
30056
30752
358543

query I rowsort
SELECT DISTINCT + ( col1 ) + - col2 * - col1 * + col1 - + col2 FROM tab2 AS cor0
----
10961
25951
90539

query I rowsort
SELECT ALL 42 * - ( - col2 ) FROM tab0 AS cor0
----
1386
3444
42

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6331
SELECT ALL - 42 * 5 - col1 * CAST( + 34 AS SIGNED ) FROM tab1 AS cor0
----
-1094
-550
-652

skipif mysql # not compatible
query I rowsort label-6331
SELECT ALL - 42 * 5 - col1 * CAST ( + 34 AS INTEGER ) FROM tab1 AS cor0
----
-1094
-550
-652

query I rowsort
SELECT ALL + col0 * col2 * col0 AS col2 FROM tab0
----
1225
19008
649522

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6333
SELECT ALL CAST( NULL AS SIGNED ) * col1 AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6333
SELECT ALL CAST ( NULL AS INTEGER ) * col1 AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 61 * + col0 FROM tab1 AS cor0
----
183
3904
4880

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6335
SELECT + CAST( + col2 AS SIGNED ) * - col2 FROM tab2 AS cor0
----
-1444
-676
-729

skipif mysql # not compatible
query I rowsort label-6335
SELECT + CAST ( + col2 AS INTEGER ) * - col2 FROM tab2 AS cor0
----
-1444
-676
-729

onlyif mysql # use DIV operator for integer division
query I rowsort label-6336
SELECT + + col2 + - col2 DIV col2 FROM tab1 AS cor0
----
53
56
95

skipif mysql # not compatible
query I rowsort label-6336
SELECT + + col2 + - col2 / col2 FROM tab1 AS cor0
----
53
56
95

query I rowsort
SELECT ALL + 0 AS col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6338
SELECT + col1 DIV col2 AS col1 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-6338
SELECT + col1 / col2 AS col1 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT 53 AS col0 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 866ae1b4ab9e5b4043ac1bcfd413aaa6

query I rowsort
SELECT ALL 87 AS col0 FROM tab1
----
87
87
87

query I rowsort
SELECT DISTINCT - 39 + - col0 AS col1 FROM tab1 AS cor0
----
-103
-119
-42

query I rowsort
SELECT ALL - 38 * + cor0.col0 FROM tab1 AS cor0
----
-114
-2432
-3040

query I rowsort
SELECT - cor0.col1 + cor0.col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT + 41 + + col2 AS col0 FROM tab2 AS cor0
----
67
68
79

query I rowsort
SELECT ALL 70 + col0 * + 77 FROM tab0 AS cor0
----
1918
2765
6923

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + col1 + - col1 col2 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT col0 + col1 * + col2 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT - col2 * 94 AS col0 FROM tab1 AS cor0
----
-5076
-5358
-9024

query I rowsort
SELECT + cor0.col2 * 81 * - cor0.col2 AS col0 FROM tab2 AS cor0
----
-116964
-54756
-59049

onlyif mysql # use DIV operator for integer division
query I rowsort label-6350
SELECT DISTINCT + cor0.col1 DIV - col0 AS col2 FROM tab1 AS cor0
----
-8
0

skipif mysql # not compatible
query I rowsort label-6350
SELECT DISTINCT + cor0.col1 / - col0 AS col2 FROM tab1 AS cor0
----
-8
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6351
SELECT ALL + cor0.col0 * 38 + - col2 DIV cor0.col1 FROM tab1 AS cor0
----
112
2427
3033

skipif mysql # not compatible
query I rowsort label-6351
SELECT ALL + cor0.col0 * 38 + - col2 / cor0.col1 FROM tab1 AS cor0
----
112
2427
3033

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col2 col2 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL - + col1 + 1 FROM tab2 AS cor0
----
-16
-30
-58

query I rowsort
SELECT + col2 + - col1 * + col2 AS col0 FROM tab1 cor0
----
-1152
-1350
-513

query I rowsort
SELECT + cor0.col1 * - 10 FROM tab1 AS cor0
----
-100
-130
-260

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * col2 * + 95 col2 FROM tab0
----
-3325
-693310
-75240

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 85 col0 FROM tab1, tab2 cor0
----
9 values hashing to aafa8e5cfb9e02cea8717833e7581f7b

query I rowsort
SELECT - 18 * - col0 AS col2 FROM tab2 AS cor0
----
126
1404
1422

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6359
SELECT CAST( col1 AS SIGNED ) + col0 * - ( - 90 ) AS col0 FROM tab0 AS cor0
----
2246
3247
8101

skipif mysql # not compatible
query I rowsort label-6359
SELECT CAST ( col1 AS INTEGER ) + col0 * - ( - 90 ) AS col0 FROM tab0 AS cor0
----
2246
3247
8101

query I rowsort
SELECT 26 - col2 FROM tab2 AS cor0
----
-1
-12
0

query I rowsort
SELECT ( col2 ) * + col2 AS col0 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL - ( 4 ) - + col2 AS col2 FROM tab2
----
-30
-31
-42

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6363
SELECT - CAST( NULL AS DECIMAL ) + + col2 + col0 / - 48 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6363
SELECT - CAST ( NULL AS REAL ) + + col2 + col0 / - 48 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - col1 + + col1 * + ( + ( col1 ) * - col0 ) AS col1 FROM tab0 AS cor0
----
-177418
-329218
-736918

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6365
SELECT + ( col0 ) * CAST( col2 * col0 AS SIGNED ) + - cor0.col2 * ( + col0 ) FROM tab1 AS cor0
----
229824
324
606720

skipif mysql # not compatible
query I rowsort label-6365
SELECT + ( col0 ) * CAST ( col2 * col0 AS INTEGER ) + - cor0.col2 * ( + col0 ) FROM tab1 AS cor0
----
229824
324
606720

query I rowsort
SELECT ALL 8 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 33069adc3c1142d31511ec88fcfa40af

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6367
SELECT DISTINCT CAST( col1 + col2 AS SIGNED ) AS col2 FROM tab1
----
109
67
80

skipif mysql # not compatible
query I rowsort label-6367
SELECT DISTINCT CAST ( col1 + col2 AS INTEGER ) AS col2 FROM tab1
----
109
67
80

query I rowsort
SELECT cor0.col2 + col2 * ( cor0.col2 ) FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT 42 AS col0 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 325aada2239b6fe1fe2d843515ae8c5e

onlyif mysql # use DIV operator for integer division
query I rowsort label-6370
SELECT DISTINCT + 32 + 14 DIV + cor1.col2 AS col2 FROM tab2, tab2 AS cor0, tab0 AS cor1, tab0, tab0 AS cor2
----
32
46

skipif mysql # not compatible
query I rowsort label-6370
SELECT DISTINCT + 32 + 14 / + cor1.col2 AS col2 FROM tab2, tab2 AS cor0, tab0 AS cor1, tab0, tab0 AS cor2
----
32
46

query I rowsort
SELECT - col2 * + ( 17 + col1 ) FROM tab2 AS cor0
----
-1292
-1296
-1976

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 57 col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 61da70c624ad60604a668f7f8f29392a

query I rowsort
SELECT ALL ( 18 ) FROM tab0, tab1 cor0
----
9 values hashing to b95bafa733666df39c5d3f94760d010f

onlyif mysql # use DIV operator for integer division
query I rowsort label-6374
SELECT col1 + ( col1 ) DIV col0 FROM tab2 AS cor0
----
17
35
59

skipif mysql # not compatible
query I rowsort label-6374
SELECT col1 + ( col1 ) / col0 FROM tab2 AS cor0
----
17
35
59

query I rowsort
SELECT + - col1 + - col2 AS col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT DISTINCT - 12 AS col1 FROM tab1 AS cor0
----
-12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 - - col1 col2 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6378
SELECT DISTINCT - CAST( NULL AS SIGNED ) * 45 AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6378
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * 45 AS col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + col2 * + ( + col0 ) + - col2 AS col1 FROM tab0
----
34
7216
759

query I rowsort
SELECT + + 1 - col1 AS col0 FROM tab0 AS cor0
----
-85
-90
-96

query I rowsort
SELECT + - col1 * - col2 + + cor0.col1 * + col0 * cor0.col0 FROM tab2 AS cor0
----
106743
2356
360490

onlyif mysql # use DIV operator for integer division
query I rowsort label-6382
SELECT - col0 + + col2 DIV - cor0.col2 + + ( + col2 ) AS col0 FROM tab0 AS cor0
----
-35
-8
8

skipif mysql # not compatible
query I rowsort label-6382
SELECT - col0 + + col2 / - cor0.col2 + + ( + col2 ) AS col0 FROM tab0 AS cor0
----
-35
-8
8

query I rowsort
SELECT + col0 * 84 - cor0.col2 * 23 FROM tab0 AS cor0
----
1257
2917
5590

onlyif mysql # use DIV operator for integer division
query I rowsort label-6384
SELECT DISTINCT + tab1.col1 DIV + 14 FROM tab1
----
0
1

skipif mysql # not compatible
query I rowsort label-6384
SELECT DISTINCT + tab1.col1 / + 14 FROM tab1
----
0
1

query I rowsort
SELECT + 74 FROM tab2, tab2 AS cor0
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

onlyif mysql # use DIV operator for integer division
query I rowsort label-6386
SELECT ALL col2 DIV + 17 col1 FROM tab2
----
1
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6386
SELECT ALL col2 / + 17 col1 FROM tab2
----
1
1
2

query I rowsort
SELECT DISTINCT col0 + + 94 * - col1 FROM tab1
----
-1142
-2441
-876

query I rowsort
SELECT ALL col2 + + col2 * - 92 FROM tab2
----
-2366
-2457
-3458

query I rowsort
SELECT DISTINCT 25 + 85 FROM tab0, tab0 AS cor0
----
110

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - col2 * + col2 col0 FROM tab1 cor0
----
-2890
-3239
-9203

query I rowsort
SELECT DISTINCT cor0.col0 * + 49 FROM tab1 AS cor0
----
147
3136
3920

onlyif mysql # use DIV operator for integer division
query I rowsort label-6392
SELECT ALL col2 + 7 DIV - col2 AS col2 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-6392
SELECT ALL col2 + 7 / - col2 AS col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT - + ( - col1 ) * col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL + ( - 70 ) + - col0 FROM tab2 AS cor0
----
-148
-149
-77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor1.col0 col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT ALL 52 - 94 * tab2.col1 FROM tab2
----
-1546
-2862
-5494

query I rowsort
SELECT ALL ( 99 ) * - col0 * - 27 - 75 AS col1 FROM tab2
----
18636
208419
211092

query I rowsort
SELECT DISTINCT - col2 + - tab0.col2 - col1 AS col1 FROM tab0
----
-152
-255
-99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col2 + col2 * col1 col2 FROM tab2
----
1560
684
864

query I rowsort
SELECT + + ( col2 ) + ( - ( cor0.col0 ) ) AS col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL + ( - col2 ) * - cor0.col2 AS col2 FROM tab0 AS cor0
----
1
1089
6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col0 ) col0 FROM tab2 AS cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-6403
SELECT + 34 DIV col1 FROM tab2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-6403
SELECT + 34 / col1 FROM tab2
----
0
1
2

query I rowsort
SELECT ALL - ( tab1.col2 ) AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 72 + col0 + col0 col1 FROM tab2
----
228
230
86

query I rowsort
SELECT ALL - col0 + 87 FROM tab0 AS cor0
----
-2
52
63

query I rowsort
SELECT DISTINCT - 43 FROM tab1, tab1 AS cor0, tab1 cor1
----
-43

query I rowsort
SELECT DISTINCT + - col0 - + col0 * - cor0.col2 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT DISTINCT - + col2 * 68 + col0 FROM tab0 AS cor0
----
-2220
-33
-5487

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6410
SELECT - cor0.col1 * CAST( + 74 AS SIGNED ) + + col2 FROM tab1 AS cor0
----
-1870
-683
-866

skipif mysql # not compatible
query I rowsort label-6410
SELECT - cor0.col1 * CAST ( + 74 AS INTEGER ) + + col2 FROM tab1 AS cor0
----
-1870
-683
-866

query I rowsort
SELECT DISTINCT col0 * col0 * + col0 AS col0 FROM tab1 cor0
----
262144
27
512000

query I rowsort
SELECT cor0.col0 * - ( - ( col1 ) + - 25 ) FROM tab1 AS cor0
----
153
2240
3040

query I rowsort
SELECT + col2 * - col1 + - col0 FROM tab0
----
-132
-2862
-7551

query I rowsort
SELECT col2 * - col1 - 79 AS col2 FROM tab1
----
-1327
-1483
-649

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 - - col1 col2 FROM tab0
----
172
182
194

onlyif mysql # use DIV operator for integer division
query I rowsort label-6416
SELECT DISTINCT 7 + + col0 DIV 68 AS col0 FROM tab2
----
7
8

skipif mysql # not compatible
query I rowsort label-6416
SELECT DISTINCT 7 + + col0 / 68 AS col0 FROM tab2
----
7
8

query I rowsort
SELECT DISTINCT col1 * col1 + col2 AS col0 FROM tab1
----
157
265
730

query I rowsort
SELECT 7 * col1 * - col2 AS col2 FROM tab0
----
-19866
-52234
-679

onlyif mysql # use DIV operator for integer division
query I rowsort label-6419
SELECT DISTINCT col1 DIV col1 + - 95 AS col0 FROM tab2
----
-94

skipif mysql # not compatible
query I rowsort label-6419
SELECT DISTINCT col1 / col1 + - 95 AS col0 FROM tab2
----
-94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6420
SELECT col0 + + CAST( + col1 AS SIGNED ) FROM tab0
----
110
132
180

skipif mysql # not compatible
query I rowsort label-6420
SELECT col0 + + CAST ( + col1 AS INTEGER ) FROM tab0
----
110
132
180

query I rowsort
SELECT + col1 * - 62 FROM tab0 cor0
----
-5332
-5642
-6014

query I rowsort
SELECT ALL cor0.col0 + + 5 AS col0 FROM tab2 AS cor0
----
12
83
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-6423
SELECT ALL + cor0.col0 - ( - col2 ) DIV + col1 AS col2 FROM tab1 AS cor0
----
5
69
87

skipif mysql # not compatible
query I rowsort label-6423
SELECT ALL + cor0.col0 - ( - col2 ) / + col1 AS col2 FROM tab1 AS cor0
----
5
69
87

query I rowsort
SELECT DISTINCT - col2 * + col2 * - 75 FROM tab2
----
108300
50700
54675

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + col2 + + 8 ) col1 FROM tab0
----
41
9
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-6426
SELECT DISTINCT - col1 DIV col1 col1 FROM tab0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6426
SELECT DISTINCT - col1 / col1 col1 FROM tab0
----
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-6427
SELECT - 68 DIV + col0 AS col2 FROM tab0 cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-6427
SELECT - 68 / + col0 AS col2 FROM tab0 cor0
----
-1
-2
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 53 + - col2 col2 FROM tab0 AS cor0
----
-29
20
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-6429
SELECT ALL + 21 DIV col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6429
SELECT ALL + 21 / col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6430
SELECT col2 * cor0.col1 DIV + cor0.col2 FROM tab0 cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-6430
SELECT col2 * cor0.col1 / + cor0.col2 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT DISTINCT - + col0 * - ( col1 ) FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - cor0.col2 * - ( + cor0.col0 ) + + col0 * cor0.col1 AS col1 FROM tab1 AS cor0
----
240
4288
8720

query I rowsort
SELECT col0 * - col0 * - 84 + col2 * + col0 AS col0 FROM tab0 AS cor0
----
102935
49176
672662

query I rowsort
SELECT + col0 * 73 - col2 AS col0 FROM tab0 cor0
----
1719
2554
6415

query I rowsort
SELECT ALL + + cor0.col0 * ( - col0 * col0 ) FROM tab0 AS cor0
----
-13824
-42875
-704969

query I rowsort
SELECT ALL - cor0.col2 * + col0 FROM tab1 cor0
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + col2 * + col0 col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT ALL ( + col0 ) * tab2.col1 AS col1 FROM tab2
----
1343
217
4602

query I rowsort
SELECT DISTINCT col1 * - tab1.col1 AS col0 FROM tab1
----
-100
-169
-676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6440
SELECT ALL - cor0.col1 * + 23 * - col2 + + CAST( col1 * + col2 + ( + 38 ) AS SIGNED ) AS col2 FROM tab2 AS cor0
----
15542
20126
36854

skipif mysql # not compatible
query I rowsort label-6440
SELECT ALL - cor0.col1 * + 23 * - col2 + + CAST ( col1 * + col2 + ( + 38 ) AS INTEGER ) AS col2 FROM tab2 AS cor0
----
15542
20126
36854

query I rowsort
SELECT ALL + ( - col1 ) + + cor0.col1 * col2 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT ALL col2 + + col1 + - col2 * - col2 FROM tab2 AS cor0
----
1499
761
787

query I rowsort
SELECT DISTINCT - 66 AS col1 FROM tab0 AS cor0
----
-66

query I rowsort
SELECT ALL col2 + - ( - col2 ) * - ( 3 ) FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT DISTINCT - cor0.col2 + + 97 + col1 * col0 * ( col1 ) FROM tab1 cor0
----
13521
2071
6440

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 76 + 47 col2 FROM tab2 AS cor0
----
123
123
123

query I rowsort
SELECT ALL - - col1 + 42 FROM tab2 AS cor0
----
101
59
73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6448
SELECT - - CAST( NULL AS SIGNED ) * - col2 + + col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6448
SELECT - - CAST ( NULL AS INTEGER ) * - col2 + + col1 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6449
SELECT ALL col0 * + col0 * col0 + - CAST( col2 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
316
474526
493001

skipif mysql # not compatible
query I rowsort label-6449
SELECT ALL col0 * + col0 * col0 + - CAST ( col2 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
316
474526
493001

query I rowsort
SELECT ALL + cor0.col1 AS col1 FROM tab1, tab2, tab2 cor0
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT + col2 - + 54 AS col1 FROM tab2
----
-16
-27
-28

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6452
SELECT + col2 - - CAST( NULL AS SIGNED ) * col0 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6452
SELECT + col2 - - CAST ( NULL AS INTEGER ) * col0 AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL tab0.col0 + 98 AS col2 FROM tab0
----
122
133
187

onlyif mysql # use DIV operator for integer division
query I rowsort label-6454
SELECT DISTINCT col0 + ( tab1.col2 ) * col0 DIV + col0 FROM tab1
----
121
176
57

skipif mysql # not compatible
query I rowsort label-6454
SELECT DISTINCT col0 + ( tab1.col2 ) * col0 / + col0 FROM tab1
----
121
176
57

query I rowsort
SELECT ALL cor0.col1 + - col2 * - col0 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT DISTINCT + + col1 * cor0.col2 + + col1 * col1 FROM tab1 AS cor0
----
1417
2080
670

query I rowsort
SELECT DISTINCT - - col2 * + ( + col2 ) FROM tab0 AS cor0
----
1
1089
6724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6458
SELECT ALL ( 0 ) + col1 * - CAST( + col0 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-6458
SELECT ALL ( 0 ) + col1 * - CAST ( + col0 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-6459
SELECT ALL - col2 DIV + col0 + - col1 FROM tab2 AS cor0
----
-17
-34
-59

skipif mysql # not compatible
query I rowsort label-6459
SELECT ALL - col2 / + col0 + - col1 FROM tab2 AS cor0
----
-17
-34
-59

query I rowsort
SELECT - 99 * + col0 AS col1 FROM tab0 AS cor0
----
-2376
-3465
-8811

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 37 * col1 col2 FROM tab2
----
1147
2183
629

query I rowsort
SELECT + col0 + col2 * - 63 + + col1 AS col0 FROM tab1 AS cor0
----
-3373
-3517
-5955

query I rowsort
SELECT - - col1 + col2 AS col2 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6464
SELECT DISTINCT CAST( + col0 AS SIGNED ) col2 FROM tab0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6464
SELECT DISTINCT CAST ( + col0 AS INTEGER ) col2 FROM tab0
----
24
35
89

query I rowsort
SELECT DISTINCT ( - cor0.col0 ) FROM tab1 cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-6466
SELECT ALL cor0.col1 DIV - col2 + - 66 * - 57 + col2 * + col2 * + col0 FROM tab1 AS cor0
----
12510
211698
741042

skipif mysql # not compatible
query I rowsort label-6466
SELECT ALL cor0.col1 / - col2 + - 66 * - 57 + col2 * + col2 * + col0 FROM tab1 AS cor0
----
12510
211698
741042

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( 65 AS REAL ) + + col0 AS col1 FROM tab1 AS cor0
----
129
145
68

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6468
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab2, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-6468
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab2, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col0 + col2 + ( tab2.col2 ) * - col2 col1 FROM tab2
----
-1327
-572
-695

onlyif mysql # use DIV operator for integer division
query I rowsort label-6470
SELECT ALL + + col2 DIV ( + 86 ) AS col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6470
SELECT ALL + + col2 / ( + 86 ) AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT col0 - 26 * + col2 * cor0.col1 FROM tab2 AS cor0
----
-16717
-21755
-39806

query I rowsort
SELECT DISTINCT cor0.col1 + + col1 * + cor0.col2 AS col1 FROM tab0 AS cor0
----
194
2924
7553

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6473
SELECT ALL + CAST( + tab2.col1 AS SIGNED ) FROM tab2, tab0 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

skipif mysql # not compatible
query I rowsort label-6473
SELECT ALL + CAST ( + tab2.col1 AS INTEGER ) FROM tab2, tab0 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT DISTINCT - ( 75 ) AS col2 FROM tab2
----
-75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 33 col0 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to bbc05afe7eb6fed16e9d75f7f74d1948

query I rowsort
SELECT cor0.col2 + col0 * + col1 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT ALL + col2 + + cor0.col0 * + col1 * cor0.col1 FROM tab1 AS cor0
----
13616
2082
6457

query I rowsort
SELECT DISTINCT - 37 + 76 * + col2 + + col0 FROM tab1 AS cor0
----
4070
4359
7339

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - cor0.col0 ) col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query I rowsort
SELECT col2 * 84 FROM tab1
----
4536
4788
8064

query I rowsort
SELECT DISTINCT - 65 + + 93 AS col0 FROM tab1 AS cor0
----
28

query I rowsort
SELECT + col0 * + cor0.col0 + - col1 FROM tab0 AS cor0
----
1128
490
7830

query I rowsort
SELECT + 70 * col1 FROM tab0 AS cor0
----
6020
6370
6790

query I rowsort
SELECT DISTINCT - col0 - - tab1.col1 * col1 AS col2 FROM tab1
----
36
673
89

query I rowsort
SELECT DISTINCT col0 * + col2 - - col0 FROM tab1
----
165
3712
7760

query I rowsort
SELECT - col0 + + col1 - - col1 AS col0 FROM tab0
----
148
159
93

query I rowsort
SELECT - col1 * col0 + col1 AS col1 FROM tab0
----
-1978
-3298
-8008

query I rowsort
SELECT + - cor0.col0 * - col2 + - cor0.col2 AS col1 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT - col0 + + col0 * + col0 FROM tab0 cor0
----
1190
552
7832

query I rowsort
SELECT 19 AS col0 FROM tab2
----
19
19
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col0 ) col2 FROM tab2
----
7
78
79

query I rowsort
SELECT + ( + 80 ) FROM tab2
----
80
80
80

query I rowsort
SELECT DISTINCT + 97 * col2 FROM tab1
----
5238
5529
9312

query I rowsort
SELECT - 82 * - cor0.col1 + - col1 FROM tab1 AS cor0
----
1053
2106
810

query I rowsort
SELECT 36 AS col1 FROM tab0
----
36
36
36

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NOT NULL NOT IN ( + col2 + + col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6498
SELECT + cor0.col0 DIV col0 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6498
SELECT + cor0.col0 / col0 FROM tab1 cor0
----
1
1
1

query I rowsort
SELECT ALL - col2 * col2 * col1 + - col2 FROM tab1 AS cor0
----
-119904
-32547
-75870

onlyif mysql # use DIV operator for integer division
query I rowsort label-6500
SELECT col1 + - col0 DIV col2 AS col2 FROM tab0 AS cor0
----
62
86
90

skipif mysql # not compatible
query I rowsort label-6500
SELECT col1 + - col0 / col2 AS col2 FROM tab0 AS cor0
----
62
86
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-6501
SELECT DISTINCT col0 * cor0.col1 * + col2 + - cor0.col0 DIV cor0.col1 FROM tab1 AS cor0
----
36474
4212
99834

skipif mysql # not compatible
query I rowsort label-6501
SELECT DISTINCT col0 * cor0.col1 * + col2 + - cor0.col0 / cor0.col1 FROM tab1 AS cor0
----
36474
4212
99834

query I rowsort
SELECT ALL - cor0.col1 + - col0 FROM tab2 cor0
----
-137
-38
-96

query I rowsort
SELECT ALL tab1.col2 + + col2 FROM tab1 WHERE ( NULL ) = - col0 / col2
----

query I rowsort
SELECT col2 + + col2 * - tab2.col1 FROM tab2
----
-1508
-608
-810

query III rowsort
SELECT * FROM tab0 WHERE NOT ( - col2 * + col0 ) <> col2
----

query I rowsort
SELECT + col2 + col0 * col1 * + col0 AS col0 FROM tab2
----
106135
1546
358982

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + col2 * col2 col2 FROM tab0
----
1113
36
6813

query III rowsort
SELECT * FROM tab0 WHERE ( NULL ) < + col0 * - col1 / col2
----

query I rowsort
SELECT + col1 - tab1.col1 FROM tab1
----
0
0
0

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT + col0 * + col0 / col2 < NULL
----

query I rowsort
SELECT - col1 * + col1 + - col2 + + col1 FROM tab1
----
-147
-252
-704

onlyif mysql # use DIV operator for integer division
query I rowsort label-6512
SELECT + col0 * col0 * col0 + - col0 DIV col2 - - col0 * tab1.col0 * - col1 AS col1 FROM tab1
----
-207
221183
428800

skipif mysql # not compatible
query I rowsort label-6512
SELECT + col0 * col0 * col0 + - col0 / col2 - - col0 * tab1.col0 * - col1 AS col1 FROM tab1
----
-207
221183
428800

query I rowsort
SELECT ALL + col2 AS col1 FROM tab2 WHERE NOT NULL > NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6514
SELECT col0 + - col0 DIV cor0.col1 AS col1 FROM tab2 AS cor0
----
7
75
77

skipif mysql # not compatible
query I rowsort label-6514
SELECT col0 + - col0 / cor0.col1 AS col1 FROM tab2 AS cor0
----
7
75
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-6515
SELECT DISTINCT col2 + - col0 DIV col0 AS col1 FROM tab1 AS cor0
----
53
56
95

skipif mysql # not compatible
query I rowsort label-6515
SELECT DISTINCT col2 + - col0 / col0 AS col1 FROM tab1 AS cor0
----
53
56
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-6516
SELECT ALL + col0 + + col0 DIV col0 AS col0 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-6516
SELECT ALL + col0 + + col0 / col0 AS col0 FROM tab0 AS cor0
----
25
36
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col1 * + col2 col1 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT DISTINCT + col0 + - col2 * col2 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT + col1 * + col0 + + col2 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT DISTINCT - cor0.col1 + col2 AS col2 FROM tab2 cor0
----
-33
-4
21

query I rowsort
SELECT + cor0.col2 + + col2 * col2 AS col2 FROM tab2 AS cor0
----
1482
702
756

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * + cor0.col2 * col2 + + col2 col1 FROM tab0 AS cor0
----
611966
93687
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-6523
SELECT col0 DIV - col1 + + col1 AS col2 FROM tab1 cor0
----
26
4
7

skipif mysql # not compatible
query I rowsort label-6523
SELECT col0 / - col1 + + col1 AS col2 FROM tab1 cor0
----
26
4
7

query I rowsort
SELECT col2 - + 22 * tab1.col0 AS col2 FROM tab1
----
-12
-1351
-1664

query I rowsort
SELECT col2 + + 85 AS col2 FROM tab0
----
118
167
86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6526
SELECT - col2 * - CAST( NULL AS DECIMAL ) 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-6526
SELECT - col2 * - CAST ( NULL AS REAL ) col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6527
SELECT ALL - col1 * - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6527
SELECT ALL - col1 * - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 73 FROM tab2, tab0 cor0
----
9 values hashing to 84ab9db5468b4a1781bd8d5c8e0e77fc

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6529
SELECT + - CAST( + col0 AS SIGNED ) + + col1 AS col1 FROM tab2 AS cor0
----
-19
-62
24

skipif mysql # not compatible
query I rowsort label-6529
SELECT + - CAST ( + col0 AS INTEGER ) + + col1 AS col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT ALL col1 + - 68 AS col2 FROM tab0 AS cor0
----
18
23
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col0 ) + + col0 col1 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT ALL + col1 - col0 * - col0 FROM tab2 AS cor0
----
6143
6258
80

query I rowsort
SELECT DISTINCT + ( + col2 ) + + col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT - 54 + - 86 * + col1 AS col1 FROM tab0 AS cor0
----
-7450
-7880
-8396

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6535
SELECT DISTINCT cor1.col2 * CAST( NULL AS DECIMAL ) FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-6535
SELECT DISTINCT cor1.col2 * CAST ( NULL AS REAL ) FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6536
SELECT DISTINCT ( col2 ) DIV col1 + + col0 AS col2 FROM tab2 cor0
----
7
78
81

skipif mysql # not compatible
query I rowsort label-6536
SELECT DISTINCT ( col2 ) / col1 + + col0 AS col2 FROM tab2 cor0
----
7
78
81

query I rowsort
SELECT + col0 + col1 * - col1 AS col0 FROM tab0 cor0
----
-7372
-8192
-9374

query I rowsort
SELECT + + ( + col2 ) * - cor0.col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL + + col2 * + ( col0 ) + col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT DISTINCT + col1 + col0 * col2 * - col2 FROM tab0 AS cor0
----
-26050
-598345
62

query I rowsort
SELECT DISTINCT - ( col0 ) * col1 - - 85 FROM tab2 AS cor0
----
-1258
-132
-4517

query I rowsort
SELECT ALL + col0 + + cor0.col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT - - col1 * - col2 + col2 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT DISTINCT + 27 * col2 + col1 + col0 * + col2 FROM tab0 AS cor0
----
159
1769
9603

query I rowsort
SELECT DISTINCT + col2 - col1 * - col1 * col2 FROM tab0 AS cor0
----
244101
679124
9410

query I rowsort
SELECT + col1 + + col0 + + col2 * - col0 FROM tab1 AS cor0
----
-133
-3574
-7587

query I rowsort
SELECT ALL col0 * + col2 + col0 AS col2 FROM tab2 cor0
----
196
2106
3081

query I rowsort
SELECT ( + col0 ) * col0 + 16 + - cor0.col1 * - col2 FROM tab2 AS cor0
----
6903
7634
902

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * col0 + + 85 + col0 col1 FROM tab2 AS cor0
----
1507
309
4765

query I rowsort
SELECT + 98 + + col0 * + col0 * col1 + - col0 * + 96 FROM tab1 AS cor0
----
34914
44
75618

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 * - col1 + - col2 col0 FROM tab1 AS cor0
----
-157
-265
-730

query I rowsort
SELECT ALL 61 * col0 FROM tab0 AS cor0
----
1464
2135
5429

onlyif mysql # use DIV operator for integer division
query I rowsort label-6553
SELECT DISTINCT + + col0 DIV col1 AS col2 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6553
SELECT DISTINCT + + col0 / col1 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - - col2 + col2 * + col0 + 46 FROM tab1 AS cor0
----
262
3751
7822

query I rowsort
SELECT + 5 + col0 - - cor0.col1 * 20 FROM tab0 AS cor0
----
1749
1914
1980

query I rowsort
SELECT DISTINCT - - 71 FROM tab2 AS cor0
----
71

query I rowsort
SELECT - 32 * cor0.col0 * + col1 FROM tab2 AS cor0
----
-147264
-42976
-6944

onlyif mysql # use DIV operator for integer division
query I rowsort label-6558
SELECT 31 DIV + 67 FROM tab0, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-6558
SELECT 31 / + 67 FROM tab0, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6559
SELECT - - col1 / CAST( NULL AS SIGNED ) + 4 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6559
SELECT - - col1 / CAST ( NULL AS INTEGER ) + 4 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort
SELECT - - cor0.col0 * CAST ( 47 AS REAL ) + col1 AS col2 FROM tab0 AS cor0
----
1214
1742
4274

query I rowsort
SELECT ALL - 39 + col2 + - col1 FROM tab2
----
-18
-43
-72

query I rowsort
SELECT ALL col2 + - col0 AS col0 FROM tab2
----
-41
-52
20

query I rowsort
SELECT DISTINCT col2 * + col2 + col2 - - col2 AS col1 FROM tab1 cor0
----
3024
3363
9408

query I rowsort
SELECT col1 + 71 * col1 FROM tab1 AS cor0
----
1872
720
936

onlyif mysql # use DIV operator for integer division
query I rowsort label-6565
SELECT - - col1 * + ( - col2 ) DIV cor0.col2 AS col1 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-6565
SELECT - - col1 * + ( - col2 ) / cor0.col2 AS col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL - - col1 * ( + col2 ) + + col1 AS col2 FROM tab1 AS cor0
----
1261
1430
580

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 + ( 98 ) col0 FROM tab1 AS cor0
----
101
162
178

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + 19 col1 FROM tab2 AS cor0
----
45
46
57

query I rowsort
SELECT - col2 + + 85 FROM tab1 AS cor0
----
-11
28
31

onlyif mysql # use DIV operator for integer division
query I rowsort label-6570
SELECT + + col2 DIV - ( 12 ) - cor0.col0 FROM tab1 AS cor0
----
-68
-7
-88

skipif mysql # not compatible
query I rowsort label-6570
SELECT + + col2 / - ( 12 ) - cor0.col0 FROM tab1 AS cor0
----
-68
-7
-88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 80 + col2 col1 FROM tab2
----
106
107
118

onlyif mysql # use DIV operator for integer division
query I rowsort label-6572
SELECT ( + col2 ) * col0 DIV - col0 FROM tab1
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-6572
SELECT ( + col2 ) * col0 / - col0 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT - col1 + - col0 - 95 FROM tab0 AS cor0
----
-205
-227
-275

onlyif mysql # use DIV operator for integer division
query I rowsort label-6574
SELECT - - col2 DIV + 70 AS col1 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6574
SELECT - - col2 / + 70 AS col1 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT DISTINCT - col1 * 34 AS col2 FROM tab2
----
-1054
-2006
-578

onlyif mysql # use DIV operator for integer division
query I rowsort label-6576
SELECT col0 DIV + 72 + col2 AS col1 FROM tab0
----
1
33
83

skipif mysql # not compatible
query I rowsort label-6576
SELECT col0 / + 72 + col2 AS col1 FROM tab0
----
1
33
83

query I rowsort
SELECT - - col0 * cor0.col2 + + col0 FROM tab1 cor0
----
165
3712
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-6578
SELECT DISTINCT 16 + - col0 DIV col2 AS col2 FROM tab0
----
-19
15
16

skipif mysql # not compatible
query I rowsort label-6578
SELECT DISTINCT 16 + - col0 / col2 AS col2 FROM tab0
----
-19
15
16

query I rowsort
SELECT ALL + 71 + + col1 + col2 FROM tab1
----
138
151
180

query I rowsort
SELECT DISTINCT ( + col0 ) + + tab2.col0 * - 71 FROM tab2
----
-490
-5460
-5530

query I rowsort
SELECT + col0 * + tab0.col2 + col2 + 79 * col2 * - col0 FROM tab0
----
-2729
-569162
-61743

onlyif mysql # use DIV operator for integer division
query I rowsort label-6582
SELECT tab2.col2 + - col2 + 27 DIV + tab2.col0 FROM tab2
----
0
0
3

skipif mysql # not compatible
query I rowsort label-6582
SELECT tab2.col2 + - col2 + 27 / + tab2.col0 FROM tab2
----
0
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 51 col0 FROM tab1, tab2, tab1 AS cor0
----
-51

query I rowsort
SELECT - 40 * + col0 - col2 AS col0 FROM tab0 AS cor0
----
-1401
-3642
-993

query I rowsort
SELECT DISTINCT ( - col1 ) + + 74 + + col1 AS col1 FROM tab1 AS cor0
----
74

query I rowsort
SELECT DISTINCT cor0.col0 - - col1 AS col2 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT 16 + + 80 * cor0.col2 FROM tab0, tab0 AS cor0
----
9 values hashing to f8041b40ed8fe5e4f3b84a6a528ac5dc

query I rowsort
SELECT - + 73 + col1 AS col2 FROM tab2 AS cor0
----
-14
-42
-56

query I rowsort
SELECT DISTINCT - 37 AS col2 FROM tab2 cor0
----
-37

query I rowsort
SELECT + - ( cor0.col2 ) + + 37 FROM tab1 AS cor0
----
-17
-20
-59

query I rowsort
SELECT ALL - + col1 * col0 + + 31 FROM tab0 AS cor0
----
-2033
-3364
-8068

query I rowsort
SELECT DISTINCT - ( + col0 ) + - col2 * col2 AS col1 FROM tab2 cor0
----
-1523
-736
-754

query I rowsort
SELECT ALL - 89 + + col1 + + col0 AS col2 FROM tab2 AS cor0
----
-51
48
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * col0 col0 FROM tab0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( - col2 AS REAL ) * + cor0.col0 + - 30 FROM tab1 cor0
----
132
3618
7650

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6596
SELECT col0 + CAST( NULL AS DECIMAL ) + + 42 AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6596
SELECT col0 + CAST ( NULL AS REAL ) + + 42 AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT - 65 + 98 AS col0 FROM tab2 AS cor0
----
33
33
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 15 + ( - col0 * col1 ) col2 FROM tab1 AS cor0
----
-1025
-625
-63

query I rowsort
SELECT + tab0.col0 + - 25 FROM tab0
----
-1
10
64

query I rowsort
SELECT col1 * 68 + + tab2.col1 * col0 FROM tab2
----
2325
2499
8614

query I rowsort
SELECT DISTINCT + ( + col1 ) AS col0 FROM tab0
----
86
91
97

query I rowsort
SELECT ALL + cor1.col1 AS col1 FROM tab1, tab1 AS cor0, tab0 cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT - - 26 + - ( col1 ) * col0 FROM tab1 AS cor0
----
-1014
-52
-614

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - tab1.col1 + col0 col1 FROM tab1
----
-1168
-1401
-506

query I rowsort
SELECT col0 * + col2 AS col1 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT + - 22 + col1 FROM tab2 cor0
----
-5
37
9

query I rowsort
SELECT ALL + col2 * - col2 AS col2 FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT + ( + col0 ) AS col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL - cor0.col1 * + col2 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-6611
SELECT DISTINCT + + 19 * + col2 + - 45 + - col1 DIV col2 FROM tab0 AS cor0
----
-123
1512
580

skipif mysql # not compatible
query I rowsort label-6611
SELECT DISTINCT + + 19 * + col2 + - 45 + - col1 / col2 FROM tab0 AS cor0
----
-123
1512
580

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6612
SELECT ALL + 7 * + col1 + - CAST( + col2 AS SIGNED ) FROM tab0 AS cor0
----
555
569
678

skipif mysql # not compatible
query I rowsort label-6612
SELECT ALL + 7 * + col1 + - CAST ( + col2 AS INTEGER ) FROM tab0 AS cor0
----
555
569
678

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * - col1 + 53 - col0 col1 FROM tab0 AS cor0
----
2093
3413
8063

onlyif mysql # use DIV operator for integer division
query I rowsort label-6614
SELECT DISTINCT col1 + - col1 DIV - col1 AS col2 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-6614
SELECT DISTINCT col1 + - col1 / - col1 AS col2 FROM tab1 AS cor0
----
11
14
27

query I rowsort
SELECT DISTINCT col2 * + col1 + + ( + 0 ) FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL cor0.col1 + - col2 * col0 - col0 FROM tab1 AS cor0
----
-139
-3702
-7747

query I rowsort
SELECT + col1 + - 39 * + col1 + - col2 FROM tab0
----
-3301
-3540
-3687

query I rowsort
SELECT DISTINCT col2 * - ( - tab2.col0 ) * col2 + col2 - 1 FROM tab2
----
114113
5129
52753

query I rowsort
SELECT + col2 * + ( - col0 * col0 ) + - col0 + - col2 AS col2 FROM tab2
----
-1357
-158288
-237275

query I rowsort
SELECT col1 + - col2 + 60 * - col0 AS col1 FROM tab1
----
-208
-3887
-4883

query I rowsort
SELECT DISTINCT - col1 * + col0 - + 34 AS col0 FROM tab1
----
-1074
-112
-674

query I rowsort
SELECT DISTINCT + - cor0.col1 + 83 * ( - col1 ) AS col0 FROM tab2 AS cor0
----
-1428
-2604
-4956

query I rowsort
SELECT - + cor0.col1 * + 24 AS col0 FROM tab1 AS cor0
----
-240
-312
-624

query I rowsort
SELECT - - col0 * col0 * - col1 FROM tab1 AS cor0
----
-234
-40960
-83200

query I rowsort
SELECT 14 * col0 * - cor0.col0 AS col2 FROM tab2 AS cor0
----
-686
-85176
-87374

onlyif mysql # use DIV operator for integer division
query I rowsort label-6626
SELECT + col2 DIV - col1 + - col0 + col1 col0 FROM tab1 AS cor0
----
-59
-74
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6626
SELECT + col2 / - col1 + - col0 + col1 col0 FROM tab1 AS cor0
----
-59
-74
21

query I rowsort
SELECT + col0 * - 0 * - col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 21 + - col1 * cor0.col1 FROM tab1 AS cor0
----
-148
-655
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-6629
SELECT + + cor0.col2 * + col2 * - col1 + - col0 DIV col1 AS col2 FROM tab2 AS cor0
----
-22599
-24552
-39885

skipif mysql # not compatible
query I rowsort label-6629
SELECT + + cor0.col2 * + col2 * - col1 + - col0 / col1 AS col2 FROM tab2 AS cor0
----
-22599
-24552
-39885

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + col0 col1 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT ALL + ( - 18 ) * col1 AS col0 FROM tab1 AS cor0
----
-180
-234
-468

query I rowsort
SELECT - - col0 + col1 AS col1 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT + + col0 * col2 + + col0 AS col0 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT ALL - ( - col1 ) * + col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL + 23 FROM tab2 AS cor0
----
23
23
23

query I rowsort
SELECT - - col1 + - 45 * - col0 * - 83 + - ( + col1 + + col1 * - col1 ) FROM tab2 AS cor0
----
-25184
-287849
-294776

onlyif mysql # use DIV operator for integer division
query I rowsort label-6637
SELECT 10 * col0 + + col0 * ( 0 ) DIV - cor0.col1 AS col1 FROM tab0 AS cor0
----
240
350
890

skipif mysql # not compatible
query I rowsort label-6637
SELECT 10 * col0 + + col0 * ( 0 ) / - cor0.col1 AS col1 FROM tab0 AS cor0
----
240
350
890

onlyif mysql # use DIV operator for integer division
query I rowsort label-6638
SELECT DISTINCT + 60 DIV - cor0.col2 AS col0 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-6638
SELECT DISTINCT + 60 / - cor0.col2 AS col0 FROM tab1 AS cor0
----
-1
0

query I rowsort
SELECT ALL col1 * + 69 AS col0 FROM tab0
----
5934
6279
6693

query I rowsort
SELECT ALL col0 - + tab1.col2 AS col0 FROM tab1
----
-16
-51
7

query I rowsort
SELECT ALL col0 - + ( - col1 ) FROM tab1
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-6642
SELECT col1 DIV tab0.col2 + 65 FROM tab0
----
162
66
67

skipif mysql # not compatible
query I rowsort label-6642
SELECT col1 / tab0.col2 + 65 FROM tab0
----
162
66
67

query I rowsort
SELECT DISTINCT + - col2 * col1 + col2 * + 96 + + col2 FROM tab0 AS cor0
----
0
363
492

query I rowsort
SELECT ALL - - col1 - ( + col1 ) AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + col1 + 42 AS col1 FROM tab2 AS cor0
----
101
59
73

query I rowsort
SELECT DISTINCT + - 18 + col1 + + col2 AS col0 FROM tab1 cor0
----
49
62
91

query I rowsort
SELECT cor0.col1 + 30 FROM tab0 AS cor0
----
116
121
127

query I rowsort
SELECT DISTINCT - col1 * ( col1 ) FROM tab0 cor0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL col0 + col0 * col1 * - col0 AS col1 FROM tab0 AS cor0
----
-118790
-49512
-720722

query I rowsort
SELECT + col1 * 19 AS col1 FROM tab2 cor0
----
1121
323
589

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6651
SELECT ALL - col0 + - CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6651
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-6652
SELECT ALL - col2 + CAST( - col1 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-55
-58
-85

skipif mysql # not compatible
query I rowsort label-6652
SELECT ALL - col2 + CAST ( - col1 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT ALL 66 + - col1 AS col2 FROM tab2
----
35
49
7

query I rowsort
SELECT + + cor0.col1 + + 37 * - col2 - - col0 FROM tab2 cor0
----
-1310
-825
-961

onlyif mysql # use DIV operator for integer division
query I rowsort label-6655
SELECT - ( + 5 ) DIV cor0.col1 AS col1 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6655
SELECT - ( + 5 ) / cor0.col1 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + col0 * + tab2.col2 + - col0 * col0 AS col0 FROM tab2
----
-3239
-4056
140

query I rowsort
SELECT ALL ( ( - col1 ) ) FROM tab2
----
-17
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col0 * col2 col1 FROM tab0
----
35
7298
792

query I rowsort
SELECT - 14 + + col2 AS col1 FROM tab1 AS cor0
----
40
43
82

query I rowsort
SELECT tab0.col0 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT + col2 * + 57 + - col2 * col2 AS col0 FROM tab1
----
-3744
0
162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 6 - + col1 col0 FROM tab1 cor0
----
-20
-4
-7

query I rowsort
SELECT + 74 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

query I rowsort
SELECT - ( 39 ) + tab2.col0 FROM tab2
----
-32
39
40

onlyif mysql # use DIV operator for integer division
query I rowsort label-6665
SELECT + cor0.col0 * cor0.col2 DIV 89 - col0 AS col0 FROM tab2 AS cor0
----
-46
-5
-56

skipif mysql # not compatible
query I rowsort label-6665
SELECT + cor0.col0 * cor0.col2 / 89 - col0 AS col0 FROM tab2 AS cor0
----
-46
-5
-56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + - cor0.col2 * col2 * + col0 col2 FROM tab1 AS cor0
----
-207946
-737293
-8774

query I rowsort
SELECT DISTINCT + cor0.col2 - - col1 * - ( cor0.col1 ) * col0 FROM tab1 AS cor0
----
-13424
-1974
-6343

query I rowsort
SELECT + 5 AS col2 FROM tab2
----
5
5
5

query I rowsort
SELECT ALL col0 * col1 + + col2 FROM tab2
----
1381
244
4628

query I rowsort
SELECT + ( col2 ) + 23 FROM tab1 AS cor0
----
119
77
80

query I rowsort
SELECT DISTINCT + - cor0.col0 + - cor0.col0 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT col2 * col0 - 67 FROM tab2 AS cor0
----
122
1961
2935

onlyif mysql # use DIV operator for integer division
query I rowsort label-6673
SELECT DISTINCT 89 DIV col0 + col0 FROM tab2 AS cor0
----
19
79
80

skipif mysql # not compatible
query I rowsort label-6673
SELECT DISTINCT 89 / col0 + col0 FROM tab2 AS cor0
----
19
79
80

query I rowsort
SELECT ALL col2 + - col0 - 75 FROM tab2 AS cor0
----
-116
-127
-55

query I rowsort
SELECT ALL + cor0.col2 * col1 + + col0 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT DISTINCT + cor0.col2 * col0 + col1 + - col2 * - col1 FROM tab1 AS cor0
----
1592
4228
8941

query I rowsort
SELECT DISTINCT - tab2.col2 + - col1 AS col1 FROM tab2
----
-55
-58
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-6678
SELECT DISTINCT col0 - - col0 DIV + col1 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-6678
SELECT DISTINCT col0 - - col0 / + col1 FROM tab0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6679
SELECT + col2 * + CAST( col1 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-6679
SELECT + col2 * + CAST ( col1 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + col1 * col1 * - 1 + col0 FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT col2 * col0 * - ( + col1 ) - - col0 * + col2 * + col2 AS col0 FROM tab0 AS cor0
----
-3360
-41976
-65682

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6682
SELECT + - cor0.col2 + + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6682
SELECT + - cor0.col2 + + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6683
SELECT + col0 * CAST( NULL AS SIGNED ) + + col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6683
SELECT + col0 * CAST ( NULL AS INTEGER ) + + col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6684
SELECT - col0 DIV - ( - col1 ) - col1 AS col1 FROM tab0 cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-6684
SELECT - col0 / - ( - col1 ) - col1 AS col1 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT ALL 78 * col2 + col1 * + 32 * 40 FROM tab2 AS cor0
----
24724
41786
77548

query I rowsort
SELECT ALL - 69 * - cor0.col0 + cor0.col0 AS col0 FROM tab1 AS cor0
----
210
4480
5600

query I rowsort
SELECT DISTINCT - col0 * - 21 FROM tab0 AS cor0
----
1869
504
735

query I rowsort
SELECT - 63 AS col0 FROM tab2 AS cor0
----
-63
-63
-63

query I rowsort
SELECT ALL 44 + - col2 + + col1 FROM tab0 AS cor0
----
140
53
97

query I rowsort
SELECT + 16 * 3 FROM tab2 AS cor0
----
48
48
48

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6691
SELECT DISTINCT + CAST( col0 AS SIGNED ) + col0 FROM tab0 AS cor0
----
178
48
70

skipif mysql # not compatible
query I rowsort label-6691
SELECT DISTINCT + CAST ( col0 AS INTEGER ) + col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT + - 54 + - col2 FROM tab1 AS cor0
----
-108
-111
-150

onlyif mysql # use DIV operator for integer division
query I rowsort label-6693
SELECT - + col0 DIV + cor0.col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6693
SELECT - + col0 / + cor0.col1 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 47 * col2 col1 FROM tab2 AS cor0
----
1222
1269
1786

query I rowsort
SELECT 83 * - col0 + col2 FROM tab0
----
-1959
-2904
-7305

query I rowsort
SELECT + - col0 * + col0 + + cor0.col1 * cor0.col1 FROM tab2 AS cor0
----
-2603
-5952
912

query I rowsort
SELECT - col2 * - ( col2 ) + col0 AS col0 FROM tab1 AS cor0
----
2919
3313
9296

onlyif mysql # use DIV operator for integer division
query I rowsort label-6698
SELECT - col1 * col2 + + cor0.col1 * col1 DIV 76 FROM tab0 AS cor0
----
-2741
-7354
26

skipif mysql # not compatible
query I rowsort label-6698
SELECT - col1 * col2 + + cor0.col1 * col1 / 76 FROM tab0 AS cor0
----
-2741
-7354
26

query I rowsort
SELECT col2 * ( - col0 ) FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT col2 + + 16 AS col1 FROM tab2 AS cor0
----
42
43
54

query I rowsort
SELECT ALL + - cor0.col2 + cor0.col0 FROM tab2 cor0
----
-20
41
52

query I rowsort
SELECT col1 * + 99 AS col2 FROM tab2 AS cor0
----
1683
3069
5841

query I rowsort
SELECT - - cor0.col0 * + ( col1 ) + col2 AS col0 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT col2 * col2 * col2 + col2 AS col0 FROM tab2 AS cor0
----
17602
19710
54910

query I rowsort
SELECT ( + cor0.col0 ) AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT DISTINCT + col0 + col0 FROM tab0 cor0
----
178
48
70

query I rowsort
SELECT + 81 * col2 FROM tab1 AS cor0
----
4374
4617
7776

query I rowsort
SELECT DISTINCT 42 + col2 AS col1 FROM tab1 AS cor0
----
138
96
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-6709
SELECT 9 DIV col2 FROM tab0 AS cor0
----
0
0
9

skipif mysql # not compatible
query I rowsort label-6709
SELECT 9 / col2 FROM tab0 AS cor0
----
0
0
9

query I rowsort
SELECT - + 8 * - col1 FROM tab0 AS cor0
----
688
728
776

query I rowsort
SELECT DISTINCT - 86 + + col0 * col1 AS col0 FROM tab2 AS cor0
----
1257
131
4516

query I rowsort
SELECT ALL 81 FROM tab1, tab0 cor0
----
9 values hashing to 7a8ea30c6803aeddc5fca5b5821d8267

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6713
SELECT DISTINCT + + CAST( NULL AS SIGNED ) FROM tab1, tab1 AS cor0, tab2, tab1 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-6713
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) FROM tab1, tab1 AS cor0, tab2, tab1 AS cor1
----
NULL

query I rowsort
SELECT + cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT ( + col1 ) + + col2 FROM tab0 AS cor0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + col2 ) col1 FROM tab2 AS cor0
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-6717
SELECT ALL col1 DIV - 4 + col2 AS col2 FROM tab1
----
48
55
93

skipif mysql # not compatible
query I rowsort label-6717
SELECT ALL col1 / - 4 + col2 AS col2 FROM tab1
----
48
55
93

query I rowsort
SELECT - + col0 * col2 - - col0 AS col1 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT - 71 * col0 FROM tab1
----
-213
-4544
-5680

onlyif mysql # use DIV operator for integer division
query I rowsort label-6720
SELECT ALL col1 DIV col2 + col1 * col0 * + col2 col2 FROM tab0 AS cor0
----
3492
664119
68114

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6720
SELECT ALL col1 / col2 + col1 * col0 * + col2 col2 FROM tab0 AS cor0
----
3492
664119
68114

query I rowsort
SELECT - 53 * - col1 FROM tab2
----
1643
3127
901

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6722
SELECT - col0 * + CAST( NULL AS SIGNED ) - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6722
SELECT - col0 * + CAST ( NULL AS INTEGER ) - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 2 * + tab1.col2 AS col0 FROM tab1
----
108
114
192

query I rowsort
SELECT + 52 * - tab2.col1 AS col0 FROM tab2
----
-1612
-3068
-884

query I rowsort
SELECT + 6 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 5d1cb90ed58fa7573895d2f95b211821

query I rowsort
SELECT ALL cor0.col1 + - cor0.col2 AS col2 FROM tab1 cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT + col1 + 60 FROM tab2 AS cor0
----
119
77
91

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6728
SELECT ALL - col2 - CAST( 29 + col1 * 20 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-1782
-1931
-1970

skipif mysql # not compatible
query I rowsort label-6728
SELECT ALL - col2 - CAST ( 29 + col1 * 20 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-1782
-1931
-1970

query I rowsort
SELECT DISTINCT - 28 - - col1 AS col2 FROM tab0
----
58
63
69

query I rowsort
SELECT DISTINCT - col2 - tab2.col1 FROM tab2
----
-55
-58
-85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6731
SELECT col0 + - col0 * - CAST( NULL AS SIGNED ) - col1 AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6731
SELECT col0 + - col0 * - CAST ( NULL AS INTEGER ) - col1 AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab1, tab0 AS cor0, tab2 cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT col2 + - col0 + ( tab2.col1 ) FROM tab2
----
-24
51
7

query I rowsort
SELECT + tab1.col2 * + tab1.col0 FROM tab1, tab1 AS cor0
----
9 values hashing to cf1383d310e5e3e19470e0b8dc064d0c

onlyif mysql # use DIV operator for integer division
query I rowsort label-6735
SELECT DISTINCT + col2 DIV + 26 + + col2 FROM tab1
----
56
59
99

skipif mysql # not compatible
query I rowsort label-6735
SELECT DISTINCT + col2 / + 26 + + col2 FROM tab1
----
56
59
99

query I rowsort
SELECT + 70 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 9758da65ae4711e3e8c8def2fe026911

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6737
SELECT - col2 + CAST( NULL AS SIGNED ) + col1 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6737
SELECT - col2 + CAST ( NULL AS INTEGER ) + col1 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - col1 + CAST ( 29 * - col2 AS REAL ) FROM tab0
----
-1043
-126
-2469

query I rowsort
SELECT + col1 * + col2 + - col1 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT - - col0 + col1 * col1 * - col0 AS col2 FROM tab0 AS cor0
----
-177480
-329280
-736920

onlyif mysql # use DIV operator for integer division
query I rowsort label-6741
SELECT DISTINCT col0 DIV + 97 + - cor0.col1 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-6741
SELECT DISTINCT col0 / + 97 + - cor0.col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT + col1 * - 72 AS col0 FROM tab1 cor0
----
-1872
-720
-936

query I rowsort
SELECT 37 FROM tab0, tab2 cor0
----
9 values hashing to a10b03e72860b949bdff53827700a9a8

onlyif mysql # use DIV operator for integer division
query I rowsort label-6744
SELECT DISTINCT col2 DIV ( col1 ) FROM tab2
----
0
2

skipif mysql # not compatible
query I rowsort label-6744
SELECT DISTINCT col2 / ( col1 ) FROM tab2
----
0
2

query I rowsort
SELECT ALL - 49 AS col1 FROM tab1
----
-49
-49
-49

query I rowsort
SELECT DISTINCT ( - 92 ) FROM tab1
----
-92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6747
SELECT DISTINCT + CAST( tab2.col0 AS SIGNED ) FROM tab1, tab2, tab1 cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-6747
SELECT DISTINCT + CAST ( tab2.col0 AS INTEGER ) FROM tab1, tab2, tab1 cor0
----
7
78
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6748
SELECT - - CAST( + 94 AS SIGNED ) col0 FROM tab0 AS cor0
----
94
94
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6748
SELECT - - CAST ( + 94 AS INTEGER ) col0 FROM tab0 AS cor0
----
94
94
94

query I rowsort
SELECT - ( col2 ) * - cor0.col0 AS col0 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6750
SELECT ALL + 35 * col0 + - CAST( col0 * + col0 AS SIGNED ) + - 38 * col2 FROM tab0 AS cor0
----
-38
-7922
-990

skipif mysql # not compatible
query I rowsort label-6750
SELECT ALL + 35 * col0 + - CAST ( col0 * + col0 AS INTEGER ) + - 38 * col2 FROM tab0 AS cor0
----
-38
-7922
-990

onlyif mysql # use DIV operator for integer division
query I rowsort label-6751
SELECT ALL col2 DIV - col1 - + 75 AS col0 FROM tab1
----
-77
-80
-82

skipif mysql # not compatible
query I rowsort label-6751
SELECT ALL col2 / - col1 - + 75 AS col0 FROM tab1
----
-77
-80
-82

query I rowsort
SELECT - col1 + + cor0.col1 * + 63 FROM tab1 AS cor0
----
1612
620
806

query I rowsort
SELECT ALL - 2 + + col1 * - cor0.col2 + - 52 AS col0 FROM tab2 AS cor0
----
-1588
-700
-891

query I rowsort
SELECT DISTINCT - + col0 + col1 - 17 FROM tab0 AS cor0
----
-15
45

query I rowsort
SELECT + + col1 * col2 AS col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT ( + 19 ) AS col2 FROM tab0
----
19
19
19

query I rowsort
SELECT DISTINCT + ( - cor0.col2 ) FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT ALL - col2 + - cor0.col0 * + cor0.col2 * - col0 + col1 * ( - col0 ) FROM tab1 AS cor0
----
232775
354
613264

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 22 col2 FROM tab0 AS cor0
----
22
22
22

onlyif mysql # use DIV operator for integer division
query I rowsort label-6760
SELECT ALL col0 + cor0.col2 DIV + 89 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-6760
SELECT ALL col0 + cor0.col2 / + 89 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT + - 6 * + col0 AS col1 FROM tab0 cor0
----
-144
-210
-534

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 80 + - col0 - - col0 * col0 col2 FROM tab1 cor0
----
4112
6400
86

onlyif mysql # use DIV operator for integer division
query I rowsort label-6763
SELECT + CAST( col1 AS SIGNED ) DIV col1 + col1 * 97 DIV + col0 AS col0 FROM tab2 AS cor0
----
21
430
74

skipif mysql # not compatible
query I rowsort label-6763
SELECT + CAST ( col1 AS INTEGER ) / col1 + col1 * 97 / + col0 AS col0 FROM tab2 AS cor0
----
21
430
74

query I rowsort
SELECT ALL - col2 * 15 AS col1 FROM tab1 AS cor0
----
-1440
-810
-855

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1, tab2 cor0, tab1 AS cor1
----
972 values hashing to dd771e0c15d524f62127686e9bd43f9a

query I rowsort
SELECT 43 * + col1 + + col2 + + col2 AS col1 FROM tab2 AS cor0
----
1387
2589
807

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6767
SELECT CAST( NULL AS DECIMAL ) * 99 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6767
SELECT CAST ( NULL AS REAL ) * 99 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - ( - col2 ) * - col2 FROM tab0 AS cor0
----
-1
-1089
-6724

onlyif mysql # use DIV operator for integer division
query I rowsort label-6769
SELECT + + 96 + ( - col0 ) DIV col1 + col0 AS col1 FROM tab0 AS cor0
----
120
131
185

skipif mysql # not compatible
query I rowsort label-6769
SELECT + + 96 + ( - col0 ) / col1 + col0 AS col1 FROM tab0 AS cor0
----
120
131
185

query I rowsort
SELECT - col0 + - col2 * 44 FROM tab0 AS cor0
----
-1476
-3697
-79

query I rowsort
SELECT + 85 * - col2 + col0 FROM tab0
----
-2781
-50
-6881

onlyif mysql # use DIV operator for integer division
query I rowsort label-6772
SELECT col0 DIV + 89 FROM tab0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6772
SELECT col0 / + 89 FROM tab0
----
0
0
1

query I rowsort
SELECT - 50 + - col2 + 1 FROM tab1 AS cor0
----
-103
-106
-145

query I rowsort
SELECT + ( - col2 ) + - 46 + col2 AS col2 FROM tab0 AS cor0
----
-46
-46
-46

query I rowsort
SELECT col1 * + col2 + 19 - col2 AS col2 FROM tab0 AS cor0
----
115
2824
7399

query I rowsort
SELECT ( ( + tab1.col2 ) ) * col0 AS col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT ALL - 61 * + 15 + - col2 * col1 + col2 FROM tab2
----
-1523
-1725
-2423

query I rowsort
SELECT DISTINCT - col2 + + 25 AS col1 FROM tab1
----
-29
-32
-71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + col0 + col0 * + col1 col1 FROM tab0
----
15397
2856
3430

query I rowsort
SELECT ALL + col1 - ( + col0 ) AS col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL + col2 * - cor0.col0 AS col2 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT col0 * + col1 + col1 * col0 * cor0.col1 AS col1 FROM tab2 AS cor0
----
24174
276120
6944

query I rowsort
SELECT ALL + col0 * 8 FROM tab2 AS cor0
----
56
624
632

query I rowsort
SELECT + - col0 * cor0.col2 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT - cor0.col0 - - col1 AS col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT ALL + + col1 * 47 FROM tab2 AS cor0
----
1457
2773
799

query I rowsort
SELECT ALL col0 + - 17 AS col0 FROM tab2 AS cor0
----
-10
61
62

query I rowsort
SELECT DISTINCT cor0.col2 * - col0 + + ( col1 ) FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT DISTINCT + + col0 + col1 AS col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ( + 19 ) FROM tab0, tab1 AS cor0
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

query I rowsort
SELECT ALL - 76 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to f8b6589bc7503fc720ca5430e3569317

onlyif mysql # use DIV operator for integer division
query I rowsort label-6792
SELECT ALL + col0 DIV 83 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6792
SELECT ALL + col0 / 83 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT - - col0 * - col2 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL + - cor0.col2 + col1 AS col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT ALL + + col0 + ( col1 + col2 ) AS col0 FROM tab0 AS cor0
----
133
143
262

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * - col0 + - col2 col2 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT col0 * + 44 + + col0 * - col0 FROM tab1
----
-1280
-2880
123

query I rowsort
SELECT col2 + - col0 * - col0 AS col2 FROM tab0
----
1226
609
8003

query I rowsort
SELECT DISTINCT - 81 FROM tab2, tab2 AS cor0
----
-81

query I rowsort
SELECT ALL ( 88 ) + col2 FROM tab2 AS cor0
----
114
115
126

query I rowsort
SELECT DISTINCT - cor0.col1 AS col0 FROM tab2, tab0 AS cor0 CROSS JOIN tab0
----
-86
-91
-97

query I rowsort
SELECT - ( ( - col1 ) ) FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - 61 AS col0 FROM tab2 AS cor0
----
-61
-61
-61

query I rowsort
SELECT - ( 33 ) + col0 AS col0 FROM tab1 AS cor0
----
-30
31
47

query I rowsort
SELECT - 12 * 33 AS col2 FROM tab2 AS cor0
----
-396
-396
-396

query I rowsort
SELECT DISTINCT - col1 * col2 * - col0 AS col0 FROM tab1 cor0
----
36480
4212
99840

query I rowsort
SELECT DISTINCT + ( - col1 ) AS col0 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT ALL 14 * col1 FROM tab0 AS cor0
----
1204
1274
1358

query I rowsort
SELECT ( cor0.col2 ) * + 21 + 18 AS col2 FROM tab0 AS cor0
----
1740
39
711

query I rowsort
SELECT - 8 * - col0 FROM tab0 cor0
----
192
280
712

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 24 * + col2 col1 FROM tab1 AS cor0
----
-1296
-1368
-2304

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6812
SELECT + + 48 * col2 + - CAST( NULL AS SIGNED ) AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6812
SELECT + + 48 * col2 + - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - cor0.col2 + + col0 AS col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT 29 + - col2 FROM tab1 AS cor0
----
-25
-28
-67

query I rowsort
SELECT DISTINCT + - 10 * + col2 * cor0.col2 + - col2 * + col1 FROM tab2 AS cor0
----
-15086
-8127
-8294

query I rowsort
SELECT col2 * + col2 * + col0 + cor0.col1 * - cor0.col1 FROM tab0 AS cor0
----
-9374
18740
590155

onlyif mysql # use DIV operator for integer division
query I rowsort label-6817
SELECT - col1 DIV 21 FROM tab0
----
-4
-4
-4

skipif mysql # not compatible
query I rowsort label-6817
SELECT - col1 / 21 FROM tab0
----
-4
-4
-4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6818
SELECT CAST( NULL AS SIGNED ) - col0 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6818
SELECT CAST ( NULL AS INTEGER ) - col0 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + + 79 * ( - col0 ) - col2 FROM tab2 AS cor0
----
-580
-6188
-6279

query I rowsort
SELECT ( col1 * - col2 ) - + tab2.col0 * - col0 * + col0 AS col1 FROM tab2
----
-494
473018
492393

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6821
SELECT DISTINCT CAST( + 70 AS SIGNED ) * + col1 - + col1 AS col2 FROM tab1
----
1794
690
897

skipif mysql # not compatible
query I rowsort label-6821
SELECT DISTINCT CAST ( + 70 AS INTEGER ) * + col1 - + col1 AS col2 FROM tab1
----
1794
690
897

query I rowsort
SELECT ALL 76 * - col2 - - col0 FROM tab1
----
-4101
-4268
-7216

query I rowsort
SELECT - col0 * tab2.col0 + + col2 AS col1 FROM tab2
----
-22
-6058
-6203

query I rowsort
SELECT + 33 + - col1 AS col0 FROM tab2 AS cor0
----
-26
16
2

query I rowsort
SELECT DISTINCT - col2 + + col0 AS col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT - - 19 AS col0 FROM tab2 AS cor0
----
19

query I rowsort
SELECT ALL + 44 + col2 * - col1 FROM tab1 AS cor0
----
-1204
-1360
-526

query I rowsort
SELECT - ( col1 ) + + col1 AS col0 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - 44 * col1 FROM tab0 cor0
----
-3784
-4004
-4268

query I rowsort
SELECT DISTINCT + tab0.col1 * col1 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT + - col0 + col0 * 20 FROM tab2 AS cor0
----
133
1482
1501

query I rowsort
SELECT - + col2 + ( col1 ) AS col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT + cor0.col2 * + col2 AS col0 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT - ( col1 ) * - cor0.col0 + - cor0.col1 AS col2 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT - - 96 + cor0.col0 AS col0 FROM tab2 AS cor0
----
103
174
175

query I rowsort
SELECT + 4 * cor0.col1 AS col0 FROM tab1 AS cor0
----
104
40
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-6837
SELECT cor0.col1 DIV - cor0.col0 col0 FROM tab0, tab2 AS cor0
----
9 values hashing to ab2a707b9c937c7ffb5bac28e19acedb

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6837
SELECT cor0.col1 / - cor0.col0 col0 FROM tab0, tab2 AS cor0
----
9 values hashing to ab2a707b9c937c7ffb5bac28e19acedb

query I rowsort
SELECT ALL - col0 * col2 + + col2 * - col1 * col2 FROM tab1 AS cor0
----
-127488
-36138
-75978

query I rowsort
SELECT ALL - col2 + - 35 * - cor0.col1 AS col1 FROM tab2 AS cor0
----
1058
2039
557

query I rowsort
SELECT DISTINCT + 15 + + col1 AS col1 FROM tab2 AS cor0
----
32
46
74

query I rowsort
SELECT ALL + - col0 * + col2 + - cor0.col2 * - col0 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col1 + col0 * col0 AS col0 FROM tab2 AS cor0
----
18
6025
6224

query I rowsort
SELECT ALL + col0 * col0 + + cor0.col1 FROM tab1 AS cor0
----
35
4106
6413

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col2 FROM tab2 cor0 WHERE NOT col0 BETWEEN NULL AND NULL OR NULL <> cor0.col2 / + col2
----

query I rowsort
SELECT DISTINCT - - col0 * col0 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT ALL col0 * cor0.col0 + col1 AS col0 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT + col1 * cor0.col1 AS col2 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT + col1 + col0 * col1 + - col0 FROM tab0 AS cor0
----
2126
3457
8101

onlyif mysql # use DIV operator for integer division
query I rowsort label-6849
SELECT DISTINCT col1 DIV col0 col0 FROM tab1 AS cor0
----
0
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6849
SELECT DISTINCT col1 / col0 col0 FROM tab1 AS cor0
----
0
8

query I rowsort
SELECT cor0.col2 * col0 + + col2 AS col1 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT - col0 * col0 + col0 AS col1 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT ALL + col0 * + cor0.col2 AS col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT col0 AS col0 FROM tab2 AS cor0 WHERE NOT NULL NOT IN ( + cor0.col1 - + cor0.col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6854
SELECT + col1 DIV - col2 AS col0 FROM tab0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-6854
SELECT + col1 / - col2 AS col0 FROM tab0
----
-1
-2
-97

query I rowsort
SELECT + col0 + + col2 * - col2 * + col0 + col1 AS col1 FROM tab2
----
-113980
-5065
-52591

query I rowsort
SELECT ALL - col0 + - col2 * + tab0.col1 - + col2 FROM tab0
----
-133
-2895
-7633

query I rowsort
SELECT DISTINCT col1 + + col0 * col0 AS col2 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT ALL - + col2 + col2 * + col2 FROM tab2 AS cor0
----
1406
650
702

query I rowsort
SELECT DISTINCT - - col1 + col2 * + col0 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT ALL + col0 * - col0 + + col1 AS col2 FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT + - col0 * - col0 + - col0 FROM tab0 cor0
----
1190
552
7832

onlyif mysql # use DIV operator for integer division
query I rowsort label-6862
SELECT + col0 + - col2 DIV tab1.col0 FROM tab1
----
-15
64
79

skipif mysql # not compatible
query I rowsort label-6862
SELECT + col0 + - col2 / tab1.col0 FROM tab1
----
-15
64
79

query I rowsort
SELECT + col2 * col2 + col0 FROM tab1
----
2919
3313
9296

query I rowsort
SELECT col1 - - col0 * + tab1.col2 FROM tab1
----
188
3658
7693

onlyif mysql # use DIV operator for integer division
query I rowsort label-6865
SELECT col1 * + col0 DIV - col0 FROM tab2 cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-6865
SELECT col1 * + col0 / - col0 FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT ALL col1 * - col1 * - col2 FROM tab0
----
244068
679042
9409

query I rowsort
SELECT ALL - 90 * - col0 AS col0 FROM tab2
----
630
7020
7110

onlyif mysql # use DIV operator for integer division
query I rowsort label-6868
SELECT 69 * col1 + - col2 DIV + col1 AS col1 FROM tab1
----
1792
685
890

skipif mysql # not compatible
query I rowsort label-6868
SELECT 69 * col1 + - col2 / + col1 AS col1 FROM tab1
----
1792
685
890

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + col1 + col0 col2 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT DISTINCT - cor0.col0 + + cor0.col0 + 22 AS col2 FROM tab1 AS cor0
----
22

query I rowsort
SELECT - - 32 + - col1 * ( ( cor0.col0 ) ) FROM tab0 AS cor0
----
-2032
-3363
-8067

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6872
SELECT CAST( NULL AS SIGNED ) * + cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-6872
SELECT CAST ( NULL AS INTEGER ) * + cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT - tab2.col0 AS col0 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
-7
-78
-79

query I rowsort
SELECT + + col2 - + col2 * col2 AS col1 FROM tab2 AS cor0
----
-1406
-650
-702

onlyif mysql # use DIV operator for integer division
query I rowsort label-6875
SELECT DISTINCT col0 + - col0 - - 77 DIV col0 AS col1 FROM tab0 cor0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-6875
SELECT DISTINCT col0 + - col0 - - 77 / col0 AS col1 FROM tab0 cor0
----
0
2
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6876
SELECT DISTINCT CAST( NULL AS SIGNED ) * 90 AS col2 FROM tab1, tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6876
SELECT DISTINCT CAST ( NULL AS INTEGER ) * 90 AS col2 FROM tab1, tab1 AS cor0
----
NULL

query I rowsort
SELECT + col0 * 7 + - col2 FROM tab0 AS cor0
----
135
244
541

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * cor0.col1 col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT 91 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6880
SELECT DISTINCT - - CAST( NULL AS SIGNED ) * + ( cor0.col2 ) * + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6880
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) * + ( cor0.col2 ) * + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT cor0.col0 + + cor0.col2 FROM tab2 AS cor0
----
104
117
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6882
SELECT DISTINCT CAST( NULL AS SIGNED ) + col0 * + col2 AS col0 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6882
SELECT DISTINCT CAST ( NULL AS INTEGER ) + col0 * + col2 AS col0 FROM tab0 cor0
----
NULL

query I rowsort
SELECT ALL + + 54 AS col1 FROM tab1 AS cor0
----
54
54
54

query I rowsort
SELECT col1 * + 13 + + cor0.col0 FROM tab0 AS cor0
----
1142
1272
1296

query I rowsort
SELECT col1 * col0 + - col2 FROM tab1 AS cor0
----
24
583
944

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 89 * col2 col0 FROM tab0 AS cor0
----
-2937
-7298
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 18 col0 FROM tab1 cor0
----
18
18
18

query I rowsort
SELECT ALL - 26 FROM tab0 cor0
----
-26
-26
-26

query I rowsort
SELECT ALL + col1 * col2 * - col2 AS col1 FROM tab1 AS cor0
----
-119808
-32490
-75816

query I rowsort
SELECT - + 83 * - cor0.col1 FROM tab0 AS cor0
----
7138
7553
8051

query I rowsort
SELECT DISTINCT + 12 * col2 AS col1 FROM tab1
----
1152
648
684

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6892
SELECT - CAST( - col2 AS SIGNED ) FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-6892
SELECT - CAST ( - col2 AS INTEGER ) FROM tab1
----
54
57
96

query I rowsort
SELECT DISTINCT + 7 * col1 * col0 FROM tab1
----
4480
546
7280

query I rowsort
SELECT + 11 * - ( + col1 ) FROM tab2
----
-187
-341
-649

onlyif mysql # use DIV operator for integer division
query I rowsort label-6895
SELECT cor0.col1 DIV col0 + - col0 * 69 * - col0 FROM tab0 AS cor0
----
39747
546550
84527

skipif mysql # not compatible
query I rowsort label-6895
SELECT cor0.col1 / col0 + - col0 * 69 * - col0 FROM tab0 AS cor0
----
39747
546550
84527

query I rowsort
SELECT ALL + col1 * col1 + + ( + col0 ) FROM tab0
----
7420
8370
9444

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col1 + + col1 * ( + 23 ) col1 FROM tab1 AS cor0
----
220
286
572

query I rowsort
SELECT + + 9 * col0 + + col2 FROM tab0 AS cor0
----
249
316
883

query I rowsort
SELECT - + col1 + col2 * - 18 FROM tab0 AS cor0
----
-115
-1567
-680

query I rowsort
SELECT - ( + col0 ) + 36 FROM tab2 AS cor0
----
-42
-43
29

query I rowsort
SELECT ALL col1 * + tab1.col1 AS col2 FROM tab1
----
100
169
676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 16 col0 FROM tab0
----
16
16
16

query I rowsort
SELECT + col0 * + 38 * + col1 AS col2 FROM tab1 AS cor0
----
24320
2964
39520

query I rowsort
SELECT ALL + col2 * 68 AS col2 FROM tab1 AS cor0
----
3672
3876
6528

query I rowsort
SELECT DISTINCT ( - col0 ) * + col1 * col0 FROM tab2
----
-106097
-1519
-358956

query I rowsort
SELECT DISTINCT 83 * - col0 FROM tab1
----
-249
-5312
-6640

query I rowsort
SELECT DISTINCT + 35 AS col1 FROM tab0, tab2, tab1 AS cor0
----
35

query I rowsort
SELECT DISTINCT + col0 * + 86 + 12 FROM tab1
----
270
5516
6892

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-6910
SELECT + col2 * 50 DIV + col0 col1 FROM tab0
----
1
46
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6910
SELECT + col2 * 50 / + col0 col1 FROM tab0
----
1
46
68

onlyif mysql # use DIV operator for integer division
query I rowsort label-6911
SELECT + col1 + ( + col1 ) DIV col1 + + col1 FROM tab2
----
119
35
63

skipif mysql # not compatible
query I rowsort label-6911
SELECT + col1 + ( + col1 ) / col1 + + col1 FROM tab2
----
119
35
63

query I rowsort
SELECT 78 * 71 FROM tab0, tab2 AS cor0
----
9 values hashing to 8d44b1404b3f5530432adbfdafa1ae3e

onlyif mysql # use DIV operator for integer division
query I rowsort label-6913
SELECT - tab1.col2 + + ( col2 ) DIV col2 FROM tab1
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-6913
SELECT - tab1.col2 + + ( col2 ) / col2 FROM tab1
----
-53
-56
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 85 + - col2 col0 FROM tab0 AS cor0
----
3
52
84

query I rowsort
SELECT ( - col0 ) + + col2 AS col1 FROM tab2 AS cor0
----
-41
-52
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-6916
SELECT - cor0.col1 * - ( - col1 * - col1 ) + + 4 DIV - cor0.col0 FROM tab0 AS cor0
----
636056
753571
912673

skipif mysql # not compatible
query I rowsort label-6916
SELECT - cor0.col1 * - ( - col1 * - col1 ) + + 4 / - cor0.col0 FROM tab0 AS cor0
----
636056
753571
912673

query I rowsort
SELECT - col0 * 48 * col0 FROM tab2 cor0
----
-2352
-292032
-299568

query I rowsort
SELECT ALL + col2 + col0 * + col1 AS col0 FROM tab0 cor0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT col2 + + col1 + + col2 FROM tab2 AS cor0
----
111
85
93

query I rowsort
SELECT DISTINCT + 96 - + cor0.col1 AS col0 FROM tab2 AS cor0
----
37
65
79

query I rowsort
SELECT - ( + col2 ) + col2 * + ( - col1 ) FROM tab2 AS cor0
----
-1560
-684
-864

query I rowsort
SELECT ALL cor0.col1 + col0 * col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT ALL - ( col0 ) + col1 + col0 * col1 FROM tab0 cor0
----
2126
3457
8101

query I rowsort
SELECT col0 + - col0 + - col2 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT - col0 + col0 * + col0 + 82 * + col1 AS col2 FROM tab0
----
15294
7604
9144

query I rowsort
SELECT + - cor0.col1 * ( - col1 ) + - col2 AS col1 FROM tab2 AS cor0
----
251
3455
934

query I rowsort
SELECT + ( ( - col2 ) ) * 41 * + col2 + - col0 * 72 AS col0 FROM tab2 AS cor0
----
-30393
-33332
-64892

query I rowsort
SELECT col2 * cor0.col2 + col1 + 52 AS col0 FROM tab2 AS cor0
----
1513
787
812

query I rowsort
SELECT col0 * - ( cor0.col0 ) + 89 * + col2 - cor0.col2 AS col0 FROM tab2 AS cor0
----
-2897
-3796
2327

query I rowsort
SELECT ALL 67 * + 55 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to f8bc1221938c5953a7c5914951e631c4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6931
SELECT DISTINCT + CAST( NULL AS SIGNED ) * 95 AS col1 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-6931
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * 95 AS col1 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
NULL

query I rowsort
SELECT ALL + 63 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to c3eea92c46f2c49716f386a58b575025

query I rowsort
SELECT + + 11 FROM tab0 AS cor0
----
11
11
11

query I rowsort
SELECT ALL col2 * + col2 * - col1 - cor0.col2 * - col0 AS col1 FROM tab1 AS cor0
----
-112128
-28842
-75654

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6935
SELECT ALL + col2 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6935
SELECT ALL + col2 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col0 + col0 + - col1 FROM tab0 cor0
----
-27
-38
87

query I rowsort
SELECT ALL + 99 AS col0 FROM tab2, tab1 AS cor0, tab2 cor1
----
27 values hashing to 05ea182fd6036c7f5e0ea08fc061cc67

query I rowsort
SELECT + 20 FROM tab2 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to 8550664862df5be7a3d3f6037537d2d8

onlyif mysql # use DIV operator for integer division
query I rowsort label-6939
SELECT + 58 DIV 75 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-6939
SELECT + 58 / 75 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-6941
SELECT ALL + col1 DIV - 35 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6941
SELECT ALL + col1 / - 35 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 + + col0 col1 FROM tab2 AS cor0
----
-24
19
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6943
SELECT + + col2 + - CAST( NULL AS SIGNED ) * - col0 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6943
SELECT + + col2 + - CAST ( NULL AS INTEGER ) * - col0 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6944
SELECT col1 * + CAST( - 19 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-1634
-1729
-1843

skipif mysql # not compatible
query I rowsort label-6944
SELECT col1 * + CAST ( - 19 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-1634
-1729
-1843

query I rowsort
SELECT cor0.col1 * col0 + + col1 FROM tab0 cor0
----
2150
3492
8190

query I rowsort
SELECT + - col2 + 70 AS col2 FROM tab1 AS cor0
----
-26
13
16

query I rowsort
SELECT DISTINCT + col1 * + 94 AS col0 FROM tab0 AS cor0
----
8084
8554
9118

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6948
SELECT DISTINCT - col2 + - CAST( - col1 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-21
33
4

skipif mysql # not compatible
query I rowsort label-6948
SELECT DISTINCT - col2 + - CAST ( - col1 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT ALL - col0 * 34 * - col2 AS col0 FROM tab1 AS cor0
----
124032
261120
5508

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col1 + 74 col2 FROM tab0 AS cor0
----
160
165
171

query I rowsort
SELECT DISTINCT + 77 * cor2.col0 FROM tab0, tab2 AS cor0, tab1 AS cor1, tab1 AS cor2
----
231
4928
6160

query I rowsort
SELECT DISTINCT - 17 FROM tab1, tab0 AS cor0, tab1 AS cor1, tab0 cor2
----
-17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 3 col1 FROM tab0, tab0 AS cor0, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to c7bd37716aa9c76e684a54f53d1ee343

query I rowsort
SELECT DISTINCT + + ( + col1 ) + col1 AS col0 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT ALL - - 72 * - col2 FROM tab2 AS cor0
----
-1872
-1944
-2736

query I rowsort
SELECT ALL 61 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 07149905a72bd87553381f34d19ed290

query I rowsort
SELECT ( cor0.col1 + 10 ) FROM tab1, tab0 AS cor0
----
9 values hashing to 24c26605033a0df541155182699cad42

query I rowsort
SELECT ALL col2 + - 12 AS col0 FROM tab1 AS cor0
----
42
45
84

query I rowsort
SELECT - 50 + col2 * col0 FROM tab0 AS cor0
----
-15
7248
742

query I rowsort
SELECT DISTINCT - 28 + col1 FROM tab2 AS cor0
----
-11
3
31

query I rowsort
SELECT - col0 + col0 + - col2 FROM tab1 AS cor0
----
-54
-57
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6962
SELECT DISTINCT - CAST( NULL AS SIGNED ) / + col1 AS col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-6962
SELECT DISTINCT - CAST ( NULL AS INTEGER ) / + col1 AS col1 FROM tab1
----
NULL

query I rowsort
SELECT - col2 * col0 + col0 + - col1 AS col2 FROM tab1 AS cor0
----
-185
-3594
-7613

query I rowsort
SELECT DISTINCT - - 1 * - col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL + 40 FROM tab0
----
40
40
40

query I rowsort
SELECT - 85 + col2 FROM tab0
----
-3
-52
-84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * - 97 * - col0 col1 FROM tab0 AS cor0
----
3395
707906
76824

query I rowsort
SELECT + col0 * + col1 * ( + col0 ) FROM tab0 AS cor0
----
118825
49536
720811

query I rowsort
SELECT DISTINCT - col1 * - 66 FROM tab0 cor0
----
5676
6006
6402

query I rowsort
SELECT DISTINCT - 19 * - col1 + 0 AS col2 FROM tab1
----
190
247
494

query I rowsort
SELECT ALL - 3 + col1 FROM tab0
----
83
88
94

query I rowsort
SELECT col1 + - col0 * - 87 FROM tab1
----
287
5578
6973

onlyif mysql # use DIV operator for integer division
query I rowsort label-6973
SELECT DISTINCT col2 * - col1 + - col1 DIV 83 AS col0 FROM tab1
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort label-6973
SELECT DISTINCT col2 * - col1 + - col1 / 83 AS col0 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT + 8 - - col0 * col2 FROM tab0
----
43
7306
800

query I rowsort
SELECT tab2.col1 + - col1 * - ( + col0 ) AS col2 FROM tab2
----
1360
248
4661

query I rowsort
SELECT - 14 * col1 - + col2 * ( + col1 + - col1 ) FROM tab0
----
-1204
-1274
-1358

query III rowsort
SELECT * FROM tab0 WHERE NULL IN ( tab0.col0 * col2 )
----

query I rowsort
SELECT + col0 - col2 AS col1 FROM tab0
----
-9
34
7

query I rowsort
SELECT ALL - col2 * + col2 - - col1 FROM tab1
----
-2890
-3239
-9203

onlyif mysql # use DIV operator for integer division
query I rowsort label-6980
SELECT + col2 * + col1 + tab2.col1 DIV col0 FROM tab2
----
1534
646
841

skipif mysql # not compatible
query I rowsort label-6980
SELECT + col2 * + col1 + tab2.col1 / col0 FROM tab2
----
1534
646
841

query I rowsort
SELECT ALL + cor1.col2 AS col0 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT 99 + col2 AS col0 FROM tab2 AS cor0
----
125
126
137

query III rowsort
SELECT ALL * FROM tab1 WHERE ( col2 ) <> ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * tab2.col0 col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT - col0 + col2 * + tab1.col0 AS col2 FROM tab1
----
159
3584
7600

query I rowsort
SELECT - col1 + - col1 * col2 * col0 AS col0 FROM tab1
----
-36490
-4238
-99853

query I rowsort
SELECT col2 FROM tab2 WHERE NOT NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL + col1 * cor0.col1 + - 78 FROM tab2 AS cor0
----
211
3403
883

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6989
SELECT ALL col0 + + col1 * CAST( col0 + col0 AS SIGNED ) FROM tab2 AS cor0
----
2765
441
9282

skipif mysql # not compatible
query I rowsort label-6989
SELECT ALL col0 + + col1 * CAST ( col0 + col0 AS INTEGER ) FROM tab2 AS cor0
----
2765
441
9282

query I rowsort
SELECT 14 * col1 FROM tab2 cor0
----
238
434
826

query I rowsort
SELECT DISTINCT 93 AS col2 FROM tab0 cor0
----
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 + col2 col1 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT + cor0.col1 + col2 * - col1 FROM tab0 AS cor0
----
-2752
-7371
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6994
SELECT ALL + col2 * col2 DIV + ( 38 ) + + col1 * + col0 col2 FROM tab1 AS cor0
----
1282
154
725

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6994
SELECT ALL + col2 * col2 / + ( 38 ) + + col1 * + col0 col2 FROM tab1 AS cor0
----
1282
154
725

query I rowsort
SELECT ALL col2 * col0 * - col1 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT tab2.col0 * tab2.col2 + col2 AS col0 FROM tab2
----
2054
216
3040

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT NULL IN ( + tab0.col0 * col2 )
----

query I rowsort
SELECT DISTINCT col2 - + col0 * + tab1.col1 * - col2 AS col1 FROM tab1
----
36537
4266
99936

query I rowsort
SELECT ALL tab2.col0 * + col0 * - col2 FROM tab2
----
-1323
-158184
-237158

query I rowsort
SELECT col2 + col1 + col2 AS col2 FROM tab0
----
152
255
99

query I rowsort
SELECT col0 + - cor0.col0 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL col0 + col0 + cor0.col0 / - col2 AS col0 FROM tab1 AS cor0 WHERE NULL IN ( + col1 )
----

query I rowsort
SELECT ALL + col0 FROM tab2 WHERE - col1 + - col2 / col0 < col2 * + col2 * col0
----
7
78
79

query I rowsort
SELECT DISTINCT - col1 + col1 + + cor0.col0 AS col1 FROM tab0 AS cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-7005
SELECT DISTINCT col1 + col2 + col2 DIV + col1 AS col1 FROM tab1 cor0
----
116
72
82

skipif mysql # not compatible
query I rowsort label-7005
SELECT DISTINCT col1 + col2 + col2 / + col1 AS col1 FROM tab1 cor0
----
116
72
82

query I rowsort
SELECT ALL + col1 - + tab0.col2 FROM tab0
----
53
9
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col0 - col2 col2 FROM tab1
----
-16
-51
7

query I rowsort
SELECT tab0.col1 * - col0 + - col1 * col2 FROM tab0
----
-15561
-3492
-4902

query I rowsort
SELECT DISTINCT - tab0.col1 * + tab0.col1 AS col0 FROM tab0
----
-7396
-8281
-9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col1 * + col0 col2 FROM tab1
----
-13520
-2028
-6400

query I rowsort
SELECT ALL + col1 * + col1 * col2 AS col0 FROM tab1
----
16224
36504
5700

query I rowsort
SELECT - tab0.col2 * col2 + col1 * - col1 + + col0 FROM tab0
----
-14916
-8461
-9375

query I rowsort
SELECT ALL - col0 * - col2 * - col0 FROM tab2
----
-1323
-158184
-237158

query I rowsort
SELECT DISTINCT + col2 * - col2 * + col2 FROM tab0
----
-1
-35937
-551368

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT - col1 + col1 > NULL
----

query I rowsort
SELECT + - ( + col0 ) * + col0 + + ( 22 ) + col2 AS col2 FROM tab1 cor0
----
-4017
-6282
67

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7017
SELECT + + CAST( NULL AS SIGNED ) + - col0 + cor0.col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7017
SELECT + + CAST ( NULL AS INTEGER ) + - col0 + cor0.col1 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7018
SELECT DISTINCT CAST( NULL AS SIGNED ) * 85 * col0 AS col2 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-7018
SELECT DISTINCT CAST ( NULL AS INTEGER ) * 85 * col0 AS col2 FROM tab2
----
NULL

query I rowsort
SELECT + + ( col1 ) + - col1 + - ( col2 ) * - col0 * ( col2 * col1 ) AS col2 FROM tab1 AS cor0
----
2079360
227448
9584640

query I rowsort
SELECT 58 + + 54 * col2 AS col2 FROM tab0 AS cor0
----
112
1840
4486

query I rowsort
SELECT DISTINCT + cor0.col2 * + 14 AS col1 FROM tab0, tab1 cor0
----
1344
756
798

query I rowsort
SELECT - ( + col0 ) * col0 + + ( - col1 ) * col1 * ( + col0 ) AS col2 FROM tab0 AS cor0
----
-178080
-330540
-744930

query I rowsort
SELECT + + col0 + col1 + ( 16 ) AS col1 FROM tab2 AS cor0
----
112
153
54

query I rowsort
SELECT - col2 * - col0 + - col2 AS col1 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT DISTINCT 65 FROM tab2, tab1 AS cor0
----
65

query I rowsort
SELECT + 74 AS col2 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to dc22979e6d261795bd3ce2990fdbbf82

query I rowsort
SELECT DISTINCT - col0 + - col0 - col2 * col1 FROM tab1 AS cor0
----
-1408
-1410
-698

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7028
SELECT + CAST( NULL AS SIGNED ) FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-7028
SELECT + CAST ( NULL AS INTEGER ) FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT - cor0.col1 + + ( col1 ) AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + col0 * - ( ( col2 ) ) FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + col2 * 90 FROM tab2 AS cor0
----
2340
2430
3420

onlyif mysql # use DIV operator for integer division
query I rowsort label-7032
SELECT ALL - col0 DIV ( col1 ) FROM tab2 AS cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-7032
SELECT ALL - col0 / ( col1 ) FROM tab2 AS cor0
----
-1
-4
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7033
SELECT + col0 * + CAST( + 15 * + col2 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
109470
11880
525

skipif mysql # not compatible
query I rowsort label-7033
SELECT + col0 * + CAST ( + 15 * + col2 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
109470
11880
525

query I rowsort
SELECT DISTINCT + col2 * ( col2 ) AS col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ALL + col1 + + tab1.col0 + + col2 AS col1 FROM tab1
----
131
189
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 9 col2 FROM tab2, tab1 AS cor0
----
9

query I rowsort
SELECT DISTINCT + + col1 * - 54 * + col0 FROM tab0 cor0
----
-111456
-183330
-437346

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - ( + col0 ) col0 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-7039
SELECT col0 DIV ( 39 ) AS col0 FROM tab0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-7039
SELECT col0 / ( 39 ) AS col0 FROM tab0
----
0
0
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-7040
SELECT 72 DIV cor0.col1 AS col2 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-7040
SELECT 72 / cor0.col1 AS col2 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT DISTINCT - 81 + - col1 AS col1 FROM tab1 AS cor0
----
-107
-91
-94

query I rowsort
SELECT DISTINCT + ( + col0 ) AS col0 FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT ALL + - 34 AS col2 FROM tab2 AS cor0
----
-34
-34
-34

query I rowsort
SELECT + 99 * + cor0.col0 + col2 FROM tab1 AS cor0
----
351
6393
8016

query I rowsort
SELECT ALL ( - col2 ) + col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - - 28 + + col2 AS col2 FROM tab1 cor0
----
124
82
85

query I rowsort
SELECT + col0 * - col0 * + col1 AS col0 FROM tab2 AS cor0
----
-106097
-1519
-358956

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7048
SELECT DISTINCT - + col1 * CAST( col0 AS SIGNED ) FROM tab1 AS cor0
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-7048
SELECT DISTINCT - + col1 * CAST ( col0 AS INTEGER ) FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT col0 + - 21 FROM tab0 AS cor0
----
14
3
68

query I rowsort
SELECT ALL - - col0 * - col0 AS col2 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT + col0 + 56 FROM tab2 AS cor0
----
134
135
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 - - col2 * + ( col2 ) col0 FROM tab1
----
2970
3306
9312

query I rowsort
SELECT + ( - tab0.col1 ) FROM tab0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT - 84 * col1 FROM tab1 AS cor0
----
-1092
-2184
-840

query I rowsort
SELECT - + 35 + col0 AS col1 FROM tab0 AS cor0
----
-11
0
54

query I rowsort
SELECT ALL 44 + col1 * + col0 FROM tab1 AS cor0
----
1084
122
684

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - cor0.col1 col2 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT - cor0.col2 * - col0 * cor0.col0 + 46 * col1 AS col0 FROM tab0 AS cor0
----
22964
5687
653708

onlyif mysql # use DIV operator for integer division
query I rowsort label-7059
SELECT + col2 DIV + col0 + col1 AS col0 FROM tab2 AS cor0
----
17
34
59

skipif mysql # not compatible
query I rowsort label-7059
SELECT + col2 / + col0 + col1 AS col0 FROM tab2 AS cor0
----
17
34
59

query I rowsort
SELECT ALL 55 + cor0.col1 * + col0 AS col1 FROM tab0 AS cor0
----
2119
3450
8154

onlyif mysql # use DIV operator for integer division
query I rowsort label-7061
SELECT - - col2 DIV col2 + + col0 * col1 FROM tab1 AS cor0
----
1041
641
79

skipif mysql # not compatible
query I rowsort label-7061
SELECT - - col2 / col2 + + col0 * col1 FROM tab1 AS cor0
----
1041
641
79

query I rowsort
SELECT DISTINCT - cor0.col0 + 98 * col0 FROM tab1 cor0
----
291
6208
7760

query I rowsort
SELECT 12 + col1 AS col2 FROM tab0 cor0
----
103
109
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-7064
SELECT ( + cor0.col1 ) * col2 DIV + col0 AS col0 FROM tab2 AS cor0
----
119
19
8

skipif mysql # not compatible
query I rowsort label-7064
SELECT ( + cor0.col1 ) * col2 / + col0 AS col0 FROM tab2 AS cor0
----
119
19
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-7065
SELECT + col2 * 25 DIV + col1 FROM tab1 AS cor0
----
142
184
51

skipif mysql # not compatible
query I rowsort label-7065
SELECT + col2 * 25 / + col1 FROM tab1 AS cor0
----
142
184
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-7066
SELECT ALL + col0 DIV + 10 AS col1 FROM tab1
----
0
6
8

skipif mysql # not compatible
query I rowsort label-7066
SELECT ALL + col0 / + 10 AS col1 FROM tab1
----
0
6
8

query I rowsort
SELECT DISTINCT + col1 + 6 FROM tab0 AS cor0
----
103
92
97

skipif mysql # not compatible
query I rowsort
SELECT ALL + CAST ( + 64 AS REAL ) + - col1 * 73 FROM tab0 AS cor0
----
-6214
-6579
-7017

query I rowsort
SELECT DISTINCT - 16 AS col1 FROM tab0, tab0 AS cor0
----
-16

query I rowsort
SELECT 40 + cor0.col0 FROM tab0, tab0 AS cor0, tab2, tab2 AS cor1
----
81 values hashing to 1ce0a95e350360633de416a0f49c3eef

query I rowsort
SELECT ALL - 84 + + col2 AS col1 FROM tab2
----
-46
-57
-58

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0 CROSS JOIN tab1, tab2, tab0 AS cor1
----
3645 values hashing to 5acb69cde71208fe580e10b8b669428e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + col2 * col2 col2 FROM tab0
----
1175
6815
98

query I rowsort
SELECT tab1.col1 AS col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT DISTINCT - col1 + col2 * cor0.col0 AS col0 FROM tab0 AS cor0
----
-62
706
7207

query I rowsort
SELECT ALL - col0 * col0 * + ( 70 ) AS col2 FROM tab1 AS cor0
----
-286720
-448000
-630

onlyif mysql # use DIV operator for integer division
query I rowsort label-7077
SELECT DISTINCT col1 * col1 + - 58 DIV + col1 AS col2 FROM tab2 AS cor0
----
286
3481
960

skipif mysql # not compatible
query I rowsort label-7077
SELECT DISTINCT col1 * col1 + - 58 / + col1 AS col2 FROM tab2 AS cor0
----
286
3481
960

query I rowsort
SELECT + 72 * 66 FROM tab0
----
4752
4752
4752

query I rowsort
SELECT + ( + 7 ) * - col0 FROM tab1
----
-21
-448
-560

query I rowsort
SELECT 57 + + col0 AS col0 FROM tab0
----
146
81
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + + 24 + col0 col0 FROM tab0
----
134
156
204

query I rowsort
SELECT DISTINCT - col1 * - col2 + col2 * + col0 AS col1 FROM tab2
----
1026
3562
3648

query I rowsort
SELECT col0 + col2 * col0 * col2 FROM tab1
----
208000
737360
8751

query I rowsort
SELECT ALL ( col1 ) * - col2 FROM tab0
----
-2838
-7462
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col0 * col1 col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT 51 * - cor0.col1 AS col0 FROM tab1 AS cor0
----
-1326
-510
-663

query I rowsort
SELECT ALL - - 81 * - col1 FROM tab1 AS cor0
----
-1053
-2106
-810

query I rowsort
SELECT col0 + col0 * + 85 * ( + col1 ) FROM tab0 AS cor0
----
175464
288610
688504

query I rowsort
SELECT DISTINCT 80 + - col1 * - col1 AS col0 FROM tab2 AS cor0
----
1041
3561
369

query I rowsort
SELECT + ( - col1 ) * - 70 + col1 FROM tab0 AS cor0
----
6106
6461
6887

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 - + ( + col1 ) col2 FROM tab2
----
-33
-4
21

query I rowsort
SELECT col0 + - col1 * - 35 FROM tab0
----
3034
3274
3430

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7093
SELECT DISTINCT col1 - + CAST( NULL AS SIGNED ) FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-7093
SELECT DISTINCT col1 - + CAST ( NULL AS INTEGER ) FROM tab2
----
NULL

query I rowsort
SELECT DISTINCT - col1 * - cor0.col0 * + cor0.col0 - + col2 AS col0 FROM tab0 AS cor0
----
118824
49503
720729

query I rowsort
SELECT ALL - col1 + ( 30 ) - - col2 FROM tab2 cor0
----
-3
26
51

query I rowsort
SELECT ALL - col1 + ( ( col2 ) ) + ( - 87 ) AS col0 FROM tab2
----
-120
-66
-91

query I rowsort
SELECT ALL ( 27 ) FROM tab1, tab2 cor0
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

query I rowsort
SELECT DISTINCT - 16 * - col1 + + col0 * + col0 FROM tab0 AS cor0
----
1952
2777
9377

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0, tab0 AS cor1, tab2, tab2 cor2
----
3645 values hashing to c9ee6ec1bc8c6eb5f95042f98a50bd57

query I rowsort
SELECT ( - col1 ) * - col1 AS col2 FROM tab2 AS cor0
----
289
3481
961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7101
SELECT ALL CAST( NULL AS SIGNED ) + col0 * + cor0.col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7101
SELECT ALL CAST ( NULL AS INTEGER ) + col0 * + cor0.col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 19 * - cor0.col2 FROM tab0, tab2 AS cor0
----
9 values hashing to ec1a2d8563bff1310cbfaf07a47ab7db

query I rowsort
SELECT + ( - col1 ) * col0 + - ( - col1 ) AS col1 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT + 62 * col0 * col0 + ( - col2 ) AS col2 FROM tab1 AS cor0
----
253895
396704
504

query I rowsort
SELECT DISTINCT - + ( - col1 ) AS col1 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT + col1 * + 45 + + col2 + - col1 * col0 FROM tab1 AS cor0
----
-133
-359
1146

query I rowsort
SELECT DISTINCT col2 * 37 FROM tab1 AS cor0
----
1998
2109
3552

query I rowsort
SELECT ALL - col1 * + col0 AS col1 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT + cor0.col0 + + col1 + cor0.col2 FROM tab1 AS cor0
----
131
189
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-7110
SELECT - - col1 DIV - 41 + ( col1 ) AS col1 FROM tab2 AS cor0
----
17
31
58

skipif mysql # not compatible
query I rowsort label-7110
SELECT - - col1 / - 41 + ( col1 ) AS col1 FROM tab2 AS cor0
----
17
31
58

query I rowsort
SELECT - col1 + ( - col2 ) FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT + col0 * col2 + + 67 AS col1 FROM tab1 AS cor0
----
229
3715
7747

onlyif mysql # use DIV operator for integer division
query I rowsort label-7113
SELECT col1 * col1 + col1 DIV - 72 AS col2 FROM tab0 cor0
----
7395
8280
9408

skipif mysql # not compatible
query I rowsort label-7113
SELECT col1 * col1 + col1 / - 72 AS col2 FROM tab0 cor0
----
7395
8280
9408

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor1.col0 col1 FROM tab1, tab1 AS cor0, tab1 cor1
----
-3
-64
-80

query I rowsort
SELECT 73 AS col2 FROM tab1, tab2 cor0
----
9 values hashing to e5fbf5d129b181bacd6113bbc8732496

query I rowsort
SELECT col2 * col2 + - col2 FROM tab2
----
1406
650
702

query I rowsort
SELECT ALL + cor1.col2 AS col0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT - col1 * + col2 + + col0 FROM tab0 AS cor0
----
-2814
-62
-7373

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 6 col1 FROM tab0
----
6
6
6

query I rowsort
SELECT DISTINCT col2 + - col0 + 39 AS col0 FROM tab0
----
32
48
5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7121
SELECT DISTINCT CAST( 0 AS SIGNED ) FROM tab1, tab1 AS cor0, tab2 AS cor1
----
0

skipif mysql # not compatible
query I rowsort label-7121
SELECT DISTINCT CAST ( 0 AS INTEGER ) FROM tab1, tab1 AS cor0, tab2 AS cor1
----
0

query I rowsort
SELECT DISTINCT + - 96 * - tab2.col0 * + cor0.col2 AS col1 FROM tab2, tab0, tab2 AS cor0
----
9 values hashing to 46e7f6c7e1ad54c9b3c76bc069e12d7f

query I rowsort
SELECT DISTINCT - tab0.col2 * tab0.col0 AS col1 FROM tab0, tab1, tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT col0 * col1 + - 27 * col0 FROM tab2
----
-790
2496
28

query I rowsort
SELECT + 67 + - col1 AS col0 FROM tab1 AS cor0
----
41
54
57

query I rowsort
SELECT DISTINCT col0 + + cor0.col0 AS col1 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT col0 * col1 * 8 AS col1 FROM tab1 AS cor0
----
5120
624
8320

query I rowsort
SELECT ( cor0.col1 ) AS col2 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT 45 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 60b9f935ee8e404d155a2f5e9515c050

query I rowsort
SELECT + col1 * col1 + col2 * - col0 AS col2 FROM tab0 AS cor0
----
6604
9374
983

query I rowsort
SELECT DISTINCT + col2 * + col0 * + 10 FROM tab1
----
1620
36480
76800

query I rowsort
SELECT DISTINCT + col1 * tab1.col1 - + col1 * tab1.col1 FROM tab1
----
0

query I rowsort
SELECT col0 + col1 + + 13 AS col2 FROM tab1
----
106
42
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 - col0 * col0 col0 FROM tab0
----
-1224
-543
-7839

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7135
SELECT col2 + CAST( NULL AS SIGNED ) * - 10 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7135
SELECT col2 + CAST ( NULL AS INTEGER ) * - 10 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col1 * cor0.col1 + col2 FROM tab1 AS cor0
----
-43
-622
-73

query I rowsort
SELECT DISTINCT + ( - col0 ) * tab0.col0 AS col1 FROM tab0
----
-1225
-576
-7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col1 col2 FROM tab1, tab2 cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT ALL cor0.col1 AS col0 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT DISTINCT col0 * - tab1.col2 AS col2 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT ( + col2 ) FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT - + 48 + - ( col0 ) FROM tab2 AS cor0
----
-126
-127
-55

query I rowsort
SELECT - 4 + col1 FROM tab0 AS cor0
----
82
87
93

query I rowsort
SELECT + ( + col2 ) + - 38 AS col2 FROM tab2 AS cor0
----
-11
-12
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - 42 col0 FROM tab0
----
-124
-43
-75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + + tab0.col2 col1 FROM tab0
----
164
2
66

query I rowsort
SELECT ALL - tab2.col2 * col2 + col0 * col0 FROM tab2
----
-680
4797
5408

onlyif mysql # use DIV operator for integer division
query I rowsort label-7148
SELECT DISTINCT + col2 DIV - CAST( - col1 AS SIGNED ) + tab0.col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-7148
SELECT DISTINCT + col2 / - CAST ( - col1 AS INTEGER ) + tab0.col1 FROM tab0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col0 FROM tab1, tab0 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT ALL + tab2.col1 + + col0 * col2 * + col1 FROM tab2
----
119711
51051
5890

query I rowsort
SELECT DISTINCT + col0 * col1 + col0 FROM tab0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT - col0 + - ( - 42 ) + col2 * + 21 AS col1 FROM tab0
----
1675
28
711

query I rowsort
SELECT DISTINCT col1 + + ( 36 ) AS col0 FROM tab1
----
46
49
62

query I rowsort
SELECT - - col2 * - 19 AS col1 FROM tab0 AS cor0
----
-1558
-19
-627

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - cor0.col0 col0 FROM tab1, tab2 cor0
----
-7
-78
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7156
SELECT ALL - col2 * CAST( NULL AS DECIMAL ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7156
SELECT ALL - col2 * CAST ( NULL AS REAL ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7157
SELECT ALL col1 + + CAST( NULL AS SIGNED ) + col0 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7157
SELECT ALL col1 + + CAST ( NULL AS INTEGER ) + col0 AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 71 FROM tab0, tab2 AS cor0
----
9 values hashing to c1aace5d5fe27721cc925552513c85c0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7159
SELECT - + col2 + - col2 DIV col1 col1 FROM tab2 cor0
----
-26
-27
-40

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7159
SELECT - + col2 + - col2 / col1 col1 FROM tab2 cor0
----
-26
-27
-40

query I rowsort
SELECT DISTINCT + ( + 19 ) * - col2 - + col0 * col0 AS col2 FROM tab0 AS cor0
----
-1203
-1244
-9479

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7161
SELECT DISTINCT - CAST( - col2 AS SIGNED ) * col0 AS col2 FROM tab2 AS cor0
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-7161
SELECT DISTINCT - CAST ( - col2 AS INTEGER ) * col0 AS col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ( + col1 ) + - cor0.col1 * col2 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT DISTINCT + ( ( - col2 ) ) + + col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ALL - 22 AS col1 FROM tab2 cor0
----
-22
-22
-22

query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col2 * cor0.col2 - col0 FROM tab2 AS cor0
----
22592
24469
39806

query I rowsort
SELECT DISTINCT + col1 * ( - col2 ) + 5 AS col1 FROM tab1 AS cor0
----
-1243
-1399
-565

onlyif mysql # use DIV operator for integer division
query I rowsort label-7167
SELECT ALL - - 77 + col0 DIV col0 FROM tab0 AS cor0
----
78
78
78

skipif mysql # not compatible
query I rowsort label-7167
SELECT ALL - - 77 + col0 / col0 FROM tab0 AS cor0
----
78
78
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-7168
SELECT 75 DIV col0 + col2 + - col2 FROM tab1 AS cor0
----
0
1
25

skipif mysql # not compatible
query I rowsort label-7168
SELECT 75 / col0 + col2 + - col2 FROM tab1 AS cor0
----
0
1
25

query I rowsort
SELECT - col1 - - col2 AS col0 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT + 46 + col1 + - col1 AS col1 FROM tab2 AS cor0
----
46
46
46

query I rowsort
SELECT col1 + - col1 * col1 AS col2 FROM tab1 cor0
----
-156
-650
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 53 + col2 + col1 * - 51 col0 FROM tab2 AS cor0
----
-1501
-2930
-776

query I rowsort
SELECT DISTINCT 58 + + col1 * ( + col0 ) FROM tab2 cor0
----
1401
275
4660

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 33 * - col1 col1 FROM tab1 AS cor0
----
-330
-429
-858

query I rowsort
SELECT ALL - - ( cor0.col0 ) AS col1 FROM tab0 cor0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 32 col1 FROM tab0 AS cor0
----
32
32
32

query I rowsort
SELECT - col1 - cor0.col1 * 97 AS col0 FROM tab2 AS cor0
----
-1666
-3038
-5782

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 24 + - col2 + - ( - col0 ) col1 FROM tab0 AS cor0
----
15
31
58

query I rowsort
SELECT col0 * - col1 AS col1 FROM tab1 cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-7180
SELECT - 38 DIV col0 + col1 + col2 AS col0 FROM tab1 AS cor0
----
109
67
68

skipif mysql # not compatible
query I rowsort label-7180
SELECT - 38 / col0 + col1 + col2 AS col0 FROM tab1 AS cor0
----
109
67
68

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7181
SELECT DISTINCT cor0.col2 + + col0 * CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7181
SELECT DISTINCT cor0.col2 + + col0 * CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL - col2 * ( 16 ) AS col1 FROM tab2 AS cor0
----
-416
-432
-608

query I rowsort
SELECT DISTINCT col2 * tab2.col2 * 31 AS col0 FROM tab2
----
20956
22599
44764

onlyif mysql # use DIV operator for integer division
query I rowsort label-7184
SELECT col1 DIV col1 + + cor0.col0 * col2 + + col1 col0 FROM tab1 cor0
----
189
3659
7694

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7184
SELECT col1 / col1 + + cor0.col0 * col2 + + col1 col0 FROM tab1 cor0
----
189
3659
7694

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 89 col0 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-7186
SELECT 80 DIV + col1 AS col0 FROM tab1
----
3
6
8

skipif mysql # not compatible
query I rowsort label-7186
SELECT 80 / + col1 AS col0 FROM tab1
----
3
6
8

query I rowsort
SELECT - col1 + - cor0.col2 * col1 AS col2 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT DISTINCT + col0 * cor0.col0 + + cor0.col1 * + col0 + 88 * col0 FROM tab0 cor0
----
23852
4752
7700

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 + + 98 col0 FROM tab2 cor0
----
19
20
91

query I rowsort
SELECT + col2 * col0 - + col1 AS col2 FROM tab0 AS cor0
----
-62
706
7207

query I rowsort
SELECT DISTINCT col1 + - col2 * col1 * + col1 FROM tab1 AS cor0
----
-16211
-36478
-5690

query I rowsort
SELECT DISTINCT + - col1 * col1 * col2 + + col2 * col0 * col2 AS col2 FROM tab0 AS cor0
----
-217932
-80606
-9374

onlyif mysql # use DIV operator for integer division
query I rowsort label-7193
SELECT - col1 DIV + col2 + + col1 AS col0 FROM tab1 cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-7193
SELECT - col1 / + col2 + + col1 AS col0 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT + cor0.col1 + + cor0.col0 * col1 - + col0 FROM tab1 AS cor0
----
101
586
973

query I rowsort
SELECT DISTINCT - - col2 + + cor0.col1 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7196
SELECT ALL - cor0.col1 * + CAST( 78 AS SIGNED ) + col0 AS col1 FROM tab1 AS cor0
----
-2025
-716
-934

skipif mysql # not compatible
query I rowsort label-7196
SELECT ALL - cor0.col1 * + CAST ( 78 AS INTEGER ) + col0 AS col1 FROM tab1 AS cor0
----
-2025
-716
-934

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7197
SELECT ALL + col1 + - CAST( col1 AS SIGNED ) FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7197
SELECT ALL + col1 + - CAST ( col1 AS INTEGER ) FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7198
SELECT + col1 - - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7198
SELECT + col1 - - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + col2 * ( - col2 ) AS col0 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT - cor0.col2 * 68 + + col0 AS col1 FROM tab1 cor0
----
-3669
-3812
-6448

query I rowsort
SELECT ALL + 28 - + col2 AS col1 FROM tab1
----
-26
-29
-68

query I rowsort
SELECT ALL - 35 + col1 * col1 - + 25 * - col2 * 13 AS col1 FROM tab2
----
11896
12604
9701

query I rowsort
SELECT col1 * - 10 + 54 AS col2 FROM tab2
----
-116
-256
-536

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7204
SELECT ALL col2 + + CAST( NULL AS DECIMAL ) + ( + col2 ) * + ( + 38 + col1 ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7204
SELECT ALL col2 + + CAST ( NULL AS REAL ) + ( + col2 ) * + ( + 38 + col1 ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 * ( col2 ) + - col0 * - 33 AS col1 FROM tab1 cor0
----
11856
3015
5361

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7206
SELECT DISTINCT - + col0 + - CAST( cor0.col2 AS SIGNED ) * col1 AS col1 FROM tab1 AS cor0
----
-1328
-1407
-634

skipif mysql # not compatible
query I rowsort label-7206
SELECT DISTINCT - + col0 + - CAST ( cor0.col2 AS INTEGER ) * col1 AS col1 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT ALL - + col1 * - col2 * 78 + col1 + col0 * 40 AS col1 FROM tab1 AS cor0
----
100557
109658
47030

query I rowsort
SELECT cor0.col2 AS col0 FROM tab0, tab2 AS cor0, tab2 cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT tab0.col2 * col2 + col1 AS col0 FROM tab0
----
1175
6815
98

query I rowsort
SELECT DISTINCT + 24 AS col2 FROM tab0 AS cor0
----
24

query I rowsort
SELECT - col1 + col0 * tab0.col2 * + tab0.col0 AS col0 FROM tab0
----
1128
18922
649431

query I rowsort
SELECT + col1 + - ( + col2 ) FROM tab2
----
-21
33
4

query I rowsort
SELECT ALL 41 AS col0 FROM tab0, tab2 AS cor0, tab1, tab2 AS cor1
----
81 values hashing to 0733f496a5445ffeac9d19797afe4831

query I rowsort
SELECT ( cor0.col2 ) * 20 AS col2 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 06d9adbe26d2978844d03525d9ac7f9d

onlyif mysql # use DIV operator for integer division
query I rowsort label-7215
SELECT ALL - col2 DIV col1 - 62 * - 78 AS col2 FROM tab2 AS cor0
----
4834
4836
4836

skipif mysql # not compatible
query I rowsort label-7215
SELECT ALL - col2 / col1 - 62 * - 78 AS col2 FROM tab2 AS cor0
----
4834
4836
4836

query I rowsort
SELECT - col2 + - col0 + + 27 FROM tab0
----
-144
-30
-9

query I rowsort
SELECT - 17 + col2 AS col2 FROM tab0
----
-16
16
65

query I rowsort
SELECT ALL - - col0 + col2 AS col1 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT ALL 93 * col0 * + 82 AS col0 FROM tab2 AS cor0
----
53382
594828
602454

query I rowsort
SELECT ALL + 45 * - col2 FROM tab0 AS cor0
----
-1485
-3690
-45

query I rowsort
SELECT DISTINCT col0 * + col1 + 19 AS col0 FROM tab2 AS cor0
----
1362
236
4621

query IIIIIIIII rowsort
SELECT * FROM tab0, tab0 AS cor0 CROSS JOIN tab1 cor1
----
243 values hashing to 9ed1a6a444254225f040123c46b7f70c

query I rowsort
SELECT DISTINCT 72 AS col2 FROM tab2, tab0 AS cor0
----
72

query I rowsort
SELECT ALL - ( cor0.col2 ) AS col1 FROM tab2 AS cor0
----
-26
-27
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * ( + col1 ) col0 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 76 col0 FROM tab0, tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
27 values hashing to d90b4aa5f03b4a149aa925c4a88acca0

query I rowsort
SELECT ALL + ( + col2 ) * col2 FROM tab0 AS cor0
----
1
1089
6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + 36 - + col2 * col2 col2 FROM tab2 AS cor0
----
-1487
-700
-718

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7229
SELECT DISTINCT - ( ( col0 ) ) * CAST( - cor0.col0 AS SIGNED ) FROM tab0 AS cor0
----
1225
576
7921

skipif mysql # not compatible
query I rowsort label-7229
SELECT DISTINCT - ( ( col0 ) ) * CAST ( - cor0.col0 AS INTEGER ) FROM tab0 AS cor0
----
1225
576
7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 87 + col2 * col1 col0 FROM tab1 AS cor0
----
1335
1491
657

query I rowsort
SELECT 39 * - col1 + col1 FROM tab2 AS cor0
----
-1178
-2242
-646

query I rowsort
SELECT + cor0.col1 + col2 AS col1 FROM tab2 AS cor0
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + + col1 col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + + col0 + - col1 FROM tab1 cor0
----
-23
54
67

query I rowsort
SELECT ALL - col1 * - 48 + 78 AS col2 FROM tab1 AS cor0
----
1326
558
702

query I rowsort
SELECT ( + 47 ) AS col1 FROM tab1, tab0 cor0
----
9 values hashing to 4fe192f296791e1e40ea00a68aa8dab7

query I rowsort
SELECT cor0.col0 * + 11 AS col2 FROM tab1 AS cor0
----
33
704
880

query I rowsort
SELECT DISTINCT - cor0.col1 + 97 FROM tab1 AS cor0
----
71
84
87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7239
SELECT ALL col2 + CAST( + col1 AS SIGNED ) * - col2 * cor0.col2 + + col2 col1 FROM tab2 cor0
----
-22545
-24472
-39832

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7239
SELECT ALL col2 + CAST ( + col1 AS INTEGER ) * - col2 * cor0.col2 + + col2 col1 FROM tab2 cor0
----
-22545
-24472
-39832

query I rowsort
SELECT DISTINCT ( col2 * + col1 ) FROM tab1
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-7241
SELECT DISTINCT col2 DIV - ( tab2.col1 + col2 * 16 ) FROM tab2
----
0

skipif mysql # not compatible
query I rowsort label-7241
SELECT DISTINCT col2 / - ( tab2.col1 + col2 * 16 ) FROM tab2
----
0

query I rowsort
SELECT + - col0 + + ( col2 ) AS col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT - + col2 * + col0 * - cor0.col2 AS col1 FROM tab2 AS cor0
----
114076
5103
52728

query I rowsort
SELECT 82 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to f318fd9dac2de7af4b82cc7574bbca2c

query I rowsort
SELECT + 14 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 83e5779d2487d12495e7d816c797264f

query I rowsort
SELECT - + 96 * col0 + + col2 * 17 FROM tab2 AS cor0
----
-213
-6938
-7046

query I rowsort
SELECT DISTINCT + - 85 FROM tab1 cor0 CROSS JOIN tab0 cor1
----
-85

query I rowsort
SELECT DISTINCT ( cor0.col2 ) + 26 AS col1 FROM tab1, tab0 AS cor0
----
108
27
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-7249
SELECT DISTINCT 38 DIV + col1 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-7249
SELECT DISTINCT 38 / + col1 FROM tab0
----
0

query I rowsort
SELECT + col2 * + col1 * col0 AS col1 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT ALL 19 * - col2 FROM tab2
----
-494
-513
-722

query I rowsort
SELECT - - col1 * col0 + col0 AS col1 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT ALL cor0.col0 * cor0.col2 + col1 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT - - col1 + ( 5 ) FROM tab1 AS cor0
----
15
18
31

query I rowsort
SELECT cor0.col0 + - ( - col1 * col0 ) AS col0 FROM tab1 cor0
----
1120
704
81

query I rowsort
SELECT - col0 + - ( - 78 * col1 ) FROM tab0 AS cor0
----
6684
7009
7531

query I rowsort
SELECT + - cor0.col1 * - col2 - col0 * col2 FROM tab1 AS cor0
----
-3078
-6432
1242

query I rowsort
SELECT DISTINCT - - col1 * - col1 + - 20 + col2 FROM tab1 AS cor0
----
-63
-642
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-7259
SELECT ALL - col0 DIV + 75 + col2 FROM tab1 AS cor0
----
54
57
95

skipif mysql # not compatible
query I rowsort label-7259
SELECT ALL - col0 / + 75 + col2 FROM tab1 AS cor0
----
54
57
95

query I rowsort
SELECT DISTINCT - col0 - col1 AS col0 FROM tab0
----
-110
-132
-180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7261
SELECT col2 + CAST( - col1 AS SIGNED ) FROM tab2
----
-33
-4
21

skipif mysql # not compatible
query I rowsort label-7261
SELECT col2 + CAST ( - col1 AS INTEGER ) FROM tab2
----
-33
-4
21

query I rowsort
SELECT col2 * - ( col1 + col0 ) FROM tab2
----
-1026
-3562
-3648

query I rowsort
SELECT DISTINCT + 91 FROM tab0, tab0 AS cor0
----
91

query I rowsort
SELECT DISTINCT + col1 * - col2 + col1 AS col0 FROM tab2
----
-1475
-629
-806

query I rowsort
SELECT tab1.col1 - - col0 * col2 FROM tab1
----
188
3658
7693

query I rowsort
SELECT col2 + ( ( col2 ) ) AS col1 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL col2 + 34 FROM tab0
----
116
35
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-7268
SELECT ALL - col1 DIV + 29 FROM tab2 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-7268
SELECT ALL - col1 / + 29 FROM tab2 AS cor0
----
-1
-2
0

query I rowsort
SELECT DISTINCT + + col2 * + cor0.col0 + col0 * + col2 * - ( 75 ) AS col1 FROM tab0 AS cor0
----
-2590
-540052
-58608

query I rowsort
SELECT col2 * col2 + col0 AS col0 FROM tab1
----
2919
3313
9296

query I rowsort
SELECT + ( 65 ) AS col1 FROM tab0
----
65
65
65

query I rowsort
SELECT - 83 + 66 FROM tab2 AS cor0
----
-17
-17
-17

onlyif mysql # use DIV operator for integer division
query I rowsort label-7273
SELECT - + 68 * + col1 - - ( + cor0.col1 ) DIV col0 col1 FROM tab2 cor0
----
-1156
-2104
-4012

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7273
SELECT - + 68 * + col1 - - ( + cor0.col1 ) / col0 col1 FROM tab2 cor0
----
-1156
-2104
-4012

onlyif mysql # use DIV operator for integer division
query I rowsort label-7274
SELECT + - col1 DIV col2 - col0 * + col0 * col2 FROM tab1 AS cor0
----
-233472
-486
-614400

skipif mysql # not compatible
query I rowsort label-7274
SELECT + - col1 / col2 - col0 * + col0 * col2 FROM tab1 AS cor0
----
-233472
-486
-614400

onlyif mysql # use DIV operator for integer division
query I rowsort label-7275
SELECT DISTINCT col0 DIV col1 + 25 AS col0 FROM tab0 AS cor0
----
25

skipif mysql # not compatible
query I rowsort label-7275
SELECT DISTINCT col0 / col1 + 25 AS col0 FROM tab0 AS cor0
----
25

query I rowsort
SELECT DISTINCT - col0 * + col0 + col1 * cor0.col0 AS col2 FROM tab0 AS cor0
----
1488
178
2170

query I rowsort
SELECT ALL ( cor0.col1 ) - - cor0.col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT + col0 + col0 * + col1 FROM tab2 cor0
----
1422
224
4680

query I rowsort
SELECT DISTINCT - + 9 FROM tab1 AS cor0
----
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-7280
SELECT DISTINCT + col1 DIV col0 + 54 AS col2 FROM tab0 AS cor0
----
55
56
57

skipif mysql # not compatible
query I rowsort label-7280
SELECT DISTINCT + col1 / col0 + 54 AS col2 FROM tab0 AS cor0
----
55
56
57

query I rowsort
SELECT ALL col1 * + col2 + - col0 * col1 FROM tab0 AS cor0
----
-3298
-637
774

query I rowsort
SELECT ALL col2 + - col2 * col2 AS col1 FROM tab2 AS cor0
----
-1406
-650
-702

query I rowsort
SELECT DISTINCT + col2 + + cor0.col2 * col1 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT ALL + col0 + + col0 + col2 * col2 AS col2 FROM tab1 AS cor0
----
2922
3377
9376

query I rowsort
SELECT DISTINCT - cor0.col2 * - col1 + + col1 + + 37 FROM tab1 cor0
----
1298
1467
617

query I rowsort
SELECT ALL col1 - - col1 AS col1 FROM tab2 AS cor0
----
118
34
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 - - col1 col0 FROM tab2 AS cor0
----
-21
33
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 95 col1 FROM tab0
----
95
95
95

query I rowsort
SELECT ALL 35 AS col2 FROM tab0
----
35
35
35

query I rowsort
SELECT + 67 + col1 * - col2 FROM tab0
----
-2771
-30
-7395

onlyif mysql # use DIV operator for integer division
query I rowsort label-7291
SELECT DISTINCT - + ( col2 ) DIV 31 + - cor0.col0 FROM tab0 AS cor0
----
-25
-35
-91

skipif mysql # not compatible
query I rowsort label-7291
SELECT DISTINCT - + ( col2 ) / 31 + - cor0.col0 FROM tab0 AS cor0
----
-25
-35
-91

query I rowsort
SELECT ALL + + ( col2 ) + col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT - 46 * - col2 - 0 AS col0 FROM tab2 AS cor0
----
1196
1242
1748

query I rowsort
SELECT DISTINCT - cor0.col0 + - col0 * - col1 AS col1 FROM tab0 AS cor0
----
2040
3360
8010

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7295
SELECT - - col1 * CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7295
SELECT - - col1 * CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col0 * - col2 + col0 * col1 FROM tab1 cor0
----
240
4288
8720

query I rowsort
SELECT - cor0.col0 - 13 AS col2 FROM tab0 cor0
----
-102
-37
-48

query I rowsort
SELECT ALL col2 * 79 AS col0 FROM tab0 AS cor0
----
2607
6478
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7299
SELECT DISTINCT + col0 * CAST( NULL AS SIGNED ) + + col2 AS col1 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7299
SELECT DISTINCT + col0 * CAST ( NULL AS INTEGER ) + + col2 AS col1 FROM tab0 cor0
----
NULL

query I rowsort
SELECT ALL + col2 + - 15 AS col1 FROM tab0 AS cor0
----
-14
18
67

query I rowsort
SELECT DISTINCT - col0 + cor0.col2 FROM tab1 cor0
----
-7
16
51

query I rowsort
SELECT ALL - - col1 * + col2 + - col0 - col1 AS col0 FROM tab2 AS cor0
----
1397
550
799

query I rowsort
SELECT + col1 * - ( col2 ) + col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT ALL col2 + - ( + col0 ) FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT + col0 * 6 - + 17 FROM tab1 AS cor0
----
1
367
463

query I rowsort
SELECT col2 - + cor0.col2 * - cor0.col0 AS col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT DISTINCT - 89 + cor0.col2 FROM tab2 AS cor0
----
-51
-62
-63

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7308
SELECT ALL CAST( NULL AS SIGNED ) + cor0.col1 * - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7308
SELECT ALL CAST ( NULL AS INTEGER ) + cor0.col1 * - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 52 + col1 FROM tab1 AS cor0
----
-26
-39
-42

query I rowsort
SELECT ALL 27 + col2 FROM tab2 AS cor0
----
53
54
65

query I rowsort
SELECT + col1 * + cor0.col1 AS col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT DISTINCT - ( ( col0 ) ) AS col1 FROM tab0 AS cor0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 74 * col2 * - col0 col0 FROM tab1 AS cor0
----
11988
269952
568320

query I rowsort
SELECT DISTINCT col2 * - 21 FROM tab1
----
-1134
-1197
-2016

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7315
SELECT DISTINCT + CAST( NULL AS SIGNED ) * 47 * + col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7315
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * 47 * + col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT - ( + 59 ) * - col2 FROM tab2 AS cor0
----
1534
1593
2242

query I rowsort
SELECT ALL 96 * - 2 FROM tab2 cor0
----
-192
-192
-192

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7318
SELECT CAST( + 11 AS SIGNED ) * - cor0.col2 FROM tab0 AS cor0
----
-11
-363
-902

skipif mysql # not compatible
query I rowsort label-7318
SELECT CAST ( + 11 AS INTEGER ) * - cor0.col2 FROM tab0 AS cor0
----
-11
-363
-902

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + + col0 * col2 col0 FROM tab2 AS cor0
----
162
2002
2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-7320
SELECT ALL + 60 + 74 * col2 DIV - 54 FROM tab2 AS cor0
----
23
25
8

skipif mysql # not compatible
query I rowsort label-7320
SELECT ALL + 60 + 74 * col2 / - 54 FROM tab2 AS cor0
----
23
25
8

query I rowsort
SELECT + col2 - + 74 FROM tab1
----
-17
-20
22

query I rowsort
SELECT col2 * - col2 + - col0 * col1 AS col1 FROM tab2
----
-2787
-5278
-946

query I rowsort
SELECT + col1 * cor0.col2 + - col0 AS col0 FROM tab2 AS cor0
----
1456
567
830

onlyif mysql # use DIV operator for integer division
query I rowsort label-7324
SELECT DISTINCT + - col0 + col1 DIV col1 FROM tab2 AS cor0
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort label-7324
SELECT DISTINCT + - col0 + col1 / col1 FROM tab2 AS cor0
----
-6
-77
-78

query I rowsort
SELECT ALL 18 + - col1 AS col2 FROM tab2 AS cor0
----
-13
-41
1

query I rowsort
SELECT ALL ( col2 ) * - col2 * col2 AS col0 FROM tab0
----
-1
-35937
-551368

query I rowsort
SELECT + - 28 AS col2 FROM tab2 AS cor0
----
-28
-28
-28

query I rowsort
SELECT col2 + col1 + - col0 AS col2 FROM tab1
----
29
3
77

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL IN ( col1 * - col1 )
----

query I rowsort
SELECT ALL + col0 * + col1 - - col2 * col2 FROM tab2
----
2787
5278
946

query I rowsort
SELECT ALL + col1 AS col2 FROM tab1 WHERE NOT + col1 * - col1 IN ( tab1.col1 )
----
10
13
26

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT ( - col2 ) NOT BETWEEN - col0 AND + col2
----
64
10
57

query I rowsort
SELECT DISTINCT - col0 - + col0 FROM tab1
----
-128
-160
-6

query I rowsort
SELECT col0 + + col2 * - col0 FROM tab0
----
-7209
-768
0

query I rowsort
SELECT ALL - col0 - - tab0.col0 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL col1 + + col0 FROM tab2 WHERE ( + col1 ) > NULL
----

query I rowsort
SELECT DISTINCT col2 * - tab1.col0 + - col1 AS col1 FROM tab1
----
-188
-3658
-7693

query I rowsort
SELECT - col2 * col1 + col1 AS col0 FROM tab0
----
-2752
-7371
0

query I rowsort
SELECT ALL tab1.col2 * + col1 + col2 FROM tab1
----
1344
1458
627

query I rowsort
SELECT ALL - col0 + col1 * + col0 FROM tab2
----
1264
210
4524

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab1.col1 / - tab1.col2 col0 FROM tab1 WHERE NULL NOT IN ( - col1 * tab1.col0 + + tab1.col1 )
----

query I rowsort
SELECT + tab1.col2 - + col2 FROM tab1
----
0
0
0

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT NULL NOT IN ( col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7344
SELECT DISTINCT col2 - - col2 DIV - col2 FROM tab1
----
53
56
95

skipif mysql # not compatible
query I rowsort label-7344
SELECT DISTINCT col2 - - col2 / - col2 FROM tab1
----
53
56
95

query I rowsort
SELECT ALL - cor0.col2 + + col0 AS col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT + + col2 - col2 FROM tab2 cor0
----
0

query I rowsort
SELECT - - col0 * col2 + col0 + - cor0.col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT col1 * - col1 + + col1 AS col1 FROM tab0 AS cor0
----
-7310
-8190
-9312

query I rowsort
SELECT DISTINCT cor0.col2 + - col1 + + col2 AS col2 FROM tab1 AS cor0
----
104
179
82

query I rowsort
SELECT DISTINCT col0 * col2 FROM tab0 AS cor0 WHERE NOT + col1 <> + col0 + col2
----

query I rowsort
SELECT + - col1 * 3 AS col2 FROM tab2 AS cor0
----
-177
-51
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - 63 col1 FROM tab0 AS cor0
----
-145
-64
-96

query I rowsort
SELECT ALL + col2 * 27 - 74 FROM tab0 AS cor0
----
-47
2140
817

query I rowsort
SELECT + col2 + col0 * cor0.col0 + col1 * col0 FROM tab0 AS cor0
----
16102
2673
4621

query I rowsort
SELECT DISTINCT + col0 * col2 - - col1 FROM tab2 AS cor0
----
2087
220
3019

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7356
SELECT ALL - CAST( - col2 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-7356
SELECT ALL - CAST ( - col2 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ALL + cor1.col0 + - 93 AS col1 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to b5967eca69a4c164878bce6407d8ac1c

query I rowsort
SELECT ALL + ( 14 ) FROM tab0 AS cor0
----
14
14
14

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7359
SELECT DISTINCT - CAST( NULL AS SIGNED ) - - col0 AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7359
SELECT DISTINCT - CAST ( NULL AS INTEGER ) - - col0 AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + col2 + - 35 * col0 AS col2 FROM tab0 AS cor0
----
-1224
-3033
-807

query I rowsort
SELECT - - ( - 9 ) + col0 AS col0 FROM tab0 AS cor0
----
15
26
80

query I rowsort
SELECT - cor0.col0 AS col2 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query I rowsort
SELECT + col1 + + col2 + + col2 FROM tab2 AS cor0
----
111
85
93

query I rowsort
SELECT DISTINCT - col1 * col1 * col0 FROM tab2
----
-22831
-271518
-6727

query I rowsort
SELECT tab2.col1 * col2 * + col1 FROM tab2
----
10982
25947
90506

query I rowsort
SELECT + col1 * + col0 + - col1 AS col0 FROM tab2
----
1326
186
4543

query I rowsort
SELECT col0 * col0 + col0 * col1 FROM tab0
----
16020
2640
4620

query I rowsort
SELECT DISTINCT col2 + tab1.col1 FROM tab1 WHERE NOT col2 * - col2 >= - col2
----
109
67
80

query I rowsort
SELECT col1 * + col2 + - 35 AS col1 FROM tab2 cor0
----
1499
611
802

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + + col1 col0 FROM tab2 AS cor0
----
137
38
96

query III rowsort
SELECT ALL * FROM tab1 WHERE NULL = ( + col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-7372
SELECT + col2 DIV col2 - tab0.col2 AS col2 FROM tab0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-7372
SELECT + col2 / col2 - tab0.col2 AS col2 FROM tab0
----
-32
-81
0

query I rowsort
SELECT ALL - col2 * - col1 * - col0 AS col0 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT - - col0 * - 17 FROM tab2 AS cor0
----
-119
-1326
-1343

query I rowsort
SELECT ALL + col2 * + ( col0 ) FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT - 29 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
-29

onlyif mysql # use DIV operator for integer division
query I rowsort label-7377
SELECT DISTINCT col1 * col2 DIV 12 FROM tab0
----
236
621
8

skipif mysql # not compatible
query I rowsort label-7377
SELECT DISTINCT col1 * col2 / 12 FROM tab0
----
236
621
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-7378
SELECT col2 - + col2 DIV - tab2.col1 AS col1 FROM tab2
----
26
27
40

skipif mysql # not compatible
query I rowsort label-7378
SELECT col2 - + col2 / - tab2.col1 AS col1 FROM tab2
----
26
27
40

skipif mysql # not compatible
query I rowsort
SELECT ALL col1 * ( - col2 * + CAST ( + 28 AS REAL ) + col0 ) AS col0 FROM tab1 AS cor0
----
-15320
-33904
-39234

query I rowsort
SELECT DISTINCT + 88 * col1 FROM tab2 AS cor0
----
1496
2728
5192

onlyif mysql # use DIV operator for integer division
query I rowsort label-7381
SELECT - - col1 * 48 DIV - col2 AS col0 FROM tab1 AS cor0
----
-23
-6
-8

skipif mysql # not compatible
query I rowsort label-7381
SELECT - - col1 * 48 / - col2 AS col0 FROM tab1 AS cor0
----
-23
-6
-8

query I rowsort
SELECT DISTINCT - + cor0.col1 * + col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT - 1 + - col0 FROM tab0 cor0
----
-25
-36
-90

query I rowsort
SELECT + col0 * - 64 AS col2 FROM tab1 AS cor0
----
-192
-4096
-5120

query I rowsort
SELECT - + ( - 32 ) * col1 FROM tab2 AS cor0
----
1888
544
992

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7386
SELECT ALL + - CAST( NULL AS SIGNED ) * col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7386
SELECT ALL + - CAST ( NULL AS INTEGER ) * col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 + 11 FROM tab1
----
21
24
37

query I rowsort
SELECT DISTINCT - cor0.col0 * - cor0.col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL + col2 * 15 + col2 * cor0.col1 FROM tab1 AS cor0
----
1425
2214
2688

query I rowsort
SELECT DISTINCT + col1 * 71 AS col2 FROM tab1 AS cor0
----
1846
710
923

query I rowsort
SELECT ALL tab2.col0 - + 44 * + col2 AS col0 FROM tab2
----
-1066
-1181
-1593

query I rowsort
SELECT ALL + + cor0.col0 + - col2 * 96 AS col2 FROM tab2 cor0
----
-2418
-2585
-3569

query I rowsort
SELECT + 63 * col2 - col2 * ( col0 ) AS col0 FROM tab2 AS cor0
----
-390
-608
1512

query I rowsort
SELECT DISTINCT col2 + ( - col0 ) AS col2 FROM tab2
----
-41
-52
20

query I rowsort
SELECT cor0.col1 - 57 * col0 AS col2 FROM tab1 AS cor0
----
-145
-3638
-4547

query I rowsort
SELECT DISTINCT col1 - 59 FROM tab0
----
27
32
38

query I rowsort
SELECT DISTINCT 10 * cor0.col2 AS col1 FROM tab2, tab2 AS cor0
----
260
270
380

query I rowsort
SELECT DISTINCT ( + col1 ) - col1 AS col2 FROM tab2
----
0

query I rowsort
SELECT + 5 AS col0 FROM tab2
----
5
5
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * ( col0 ) * col2 + ( - col0 * col0 ) col2 FROM tab0 AS cor0
----
0
18432
641601

query I rowsort
SELECT ALL - ( - col1 ) AS col0 FROM tab2
----
17
31
59

query I rowsort
SELECT - col1 * col0 * - col2 FROM tab1
----
36480
4212
99840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + + col0 col1 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-7404
SELECT DISTINCT - col2 * - col1 + - col0 DIV + col2 + + col2 FROM tab0 AS cor0
----
2871
63
7543

skipif mysql # not compatible
query I rowsort label-7404
SELECT DISTINCT - col2 * - col1 + - col0 / + col2 + + col2 FROM tab0 AS cor0
----
2871
63
7543

query I rowsort
SELECT DISTINCT + col0 + - col0 * col2 AS col0 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT col0 + col2 * col0 AS col0 FROM tab0
----
70
7387
816

query I rowsort
SELECT + 22 + + col2 AS col1 FROM tab2
----
48
49
60

query I rowsort
SELECT - 4 AS col2 FROM tab2
----
-4
-4
-4

query I rowsort
SELECT col1 + ( + col1 ) * + col0 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT DISTINCT - cor0.col1 + - col1 + col2 * + col1 FROM tab1 AS cor0
----
1222
1352
550

query I rowsort
SELECT col2 + + 58 AS col0 FROM tab0 AS cor0
----
140
59
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-7412
SELECT + + col0 * col2 DIV + col0 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-7412
SELECT + + col0 * col2 / + col0 col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT + + ( 15 ) FROM tab2, tab1, tab0 AS cor0, tab0
----
81 values hashing to 97c4e033347d2076218e240ed49af0a7

query I rowsort
SELECT ALL - col1 + - 48 FROM tab0 AS cor0
----
-134
-139
-145

query I rowsort
SELECT ALL + + col1 + + col2 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT DISTINCT + 54 * - cor0.col1 + + col1 * - col2 + ( + col0 ) FROM tab0 AS cor0
----
-12287
-5300
-7458

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + 93 * - col0 col0 FROM tab0 cor0
----
-2199
-3254
-8195

query I rowsort
SELECT DISTINCT ( - col0 ) * col2 + + ( + 24 + col1 ) * - 31 FROM tab1 AS cor0
----
-1712
-4702
-8827

query I rowsort
SELECT ALL - - 33 AS col2 FROM tab2 AS cor0
----
33
33
33

query I rowsort
SELECT DISTINCT + col2 * + 14 AS col1 FROM tab0 AS cor0
----
1148
14
462

query I rowsort
SELECT DISTINCT + cor0.col1 + ( cor0.col0 ) AS col2 FROM tab0 AS cor0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT + CAST ( + col0 AS REAL ) col1 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-7423
SELECT ALL + ( cor0.col1 ) * col0 DIV ( col2 ) - - col0 AS col2 FROM tab0 AS cor0
----
187
3430
86

skipif mysql # not compatible
query I rowsort label-7423
SELECT ALL + ( cor0.col1 ) * col0 / ( col2 ) - - col0 AS col2 FROM tab0 AS cor0
----
187
3430
86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7424
SELECT CAST( - 36 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-36
-36
-36

skipif mysql # not compatible
query I rowsort label-7424
SELECT CAST ( - 36 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-36
-36
-36

query I rowsort
SELECT ( + 1 ) * col2 AS col1 FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT DISTINCT + col0 * col2 * - col2 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT ALL + col1 - + col1 * + col2 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT ALL - - col2 + + cor0.col0 FROM tab0 cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-7429
SELECT ALL col0 * 13 + cor0.col1 * + cor0.col1 + + col2 DIV col0 AS col1 FROM tab0 AS cor0
----
7709
9438
9864

skipif mysql # not compatible
query I rowsort label-7429
SELECT ALL col0 * 13 + cor0.col1 * + cor0.col1 + + col2 / col0 AS col1 FROM tab0 AS cor0
----
7709
9438
9864

query I rowsort
SELECT - 64 * - 8 AS col1 FROM tab1 AS cor0
----
512
512
512

query I rowsort
SELECT DISTINCT - + 59 FROM tab2 AS cor0
----
-59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7432
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-7432
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
NULL

query I rowsort
SELECT ALL + + ( cor0.col0 ) - - col2 AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT + + 86 AS col1 FROM tab0 AS cor0
----
86

query I rowsort
SELECT 38 * + col2 - + col0 FROM tab2 AS cor0
----
1019
1365
910

query I rowsort
SELECT ALL col2 * col0 * 60 AS col2 FROM tab1 AS cor0
----
218880
460800
9720

query I rowsort
SELECT ALL - col2 * cor0.col0 * 60 AS col0 FROM tab1 AS cor0
----
-218880
-460800
-9720

query I rowsort
SELECT + 4 * + col0 FROM tab2 cor0
----
28
312
316

query I rowsort
SELECT - + col2 * col1 + col0 + + col1 AS col1 FROM tab2 AS cor0
----
-1397
-550
-799

onlyif mysql # use DIV operator for integer division
query I rowsort label-7440
SELECT col2 - + col1 DIV CAST( col0 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
46
57
96

skipif mysql # not compatible
query I rowsort label-7440
SELECT col2 - + col1 / CAST ( col0 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
46
57
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7441
SELECT - - ( col2 ) * - CAST( NULL AS SIGNED ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7441
SELECT - - ( col2 ) * - CAST ( NULL AS INTEGER ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7442
SELECT ALL + + col2 DIV - col0 AS col1 FROM tab2 AS cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-7442
SELECT ALL + + col2 / - col0 AS col1 FROM tab2 AS cor0
----
-3
0
0

query I rowsort
SELECT DISTINCT - ( cor0.col1 ) + - col1 + 83 * + col1 AS col2 FROM tab2 cor0
----
1377
2511
4779

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + - col2 col1 FROM tab0 AS cor0
----
-164
-2
-66

onlyif mysql # use DIV operator for integer division
query I rowsort label-7445
SELECT ALL - col2 DIV ( - col0 ) col2 FROM tab2 AS cor0
----
0
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7445
SELECT ALL - col2 / ( - col0 ) col2 FROM tab2 AS cor0
----
0
0
3

query I rowsort
SELECT ALL col0 * + cor0.col0 + col1 * + col2 FROM tab0 AS cor0
----
1322
15383
3414

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7447
SELECT ALL + col2 + CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7447
SELECT ALL + col2 + CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 + ( + col0 * col1 + cor0.col0 ) AS col0 FROM tab2 AS cor0
----
1460
251
4706

onlyif mysql # use DIV operator for integer division
query I rowsort label-7449
SELECT DISTINCT - - col0 DIV 36 + col0 FROM tab1 AS cor0
----
3
65
82

skipif mysql # not compatible
query I rowsort label-7449
SELECT DISTINCT - - col0 / 36 + col0 FROM tab1 AS cor0
----
3
65
82

query I rowsort
SELECT DISTINCT - col1 * col1 - 60 AS col0 FROM tab0 AS cor0
----
-7456
-8341
-9469

query I rowsort
SELECT - + cor0.col2 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT + - 8 AS col2 FROM tab1 AS cor0
----
-8
-8
-8

query I rowsort
SELECT DISTINCT - col1 + + 40 AS col2 FROM tab1 AS cor0
----
14
27
30

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7454
SELECT ALL col0 * - CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7454
SELECT ALL col0 * - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7455
SELECT col1 * col2 DIV col1 + col0 col1 FROM tab0 cor0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7455
SELECT col1 * col2 / col1 + col0 col1 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT ALL - 34 AS col2 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 5b88331e40da4796cc4826c442aa45f7

query I rowsort
SELECT ALL col1 * - col0 + 64 FROM tab1
----
-14
-576
-976

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7458
SELECT DISTINCT CAST( NULL AS SIGNED ) col1 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7458
SELECT DISTINCT CAST ( NULL AS INTEGER ) col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL - 0 * + ( col2 ) + - 23 AS col0 FROM tab1 cor0
----
-23
-23
-23

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 cor0, tab2 AS cor1, tab0 AS cor2
----
972 values hashing to e4c748f267e8d2a0e6d563281e1fb975

query I rowsort
SELECT ALL - - ( + col0 ) * - col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT + 78 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7463
SELECT - CAST( 50 AS SIGNED ) AS col0 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to faf91d5263c18db4877a3c30c47e2487

skipif mysql # not compatible
query I rowsort label-7463
SELECT - CAST ( 50 AS INTEGER ) AS col0 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to faf91d5263c18db4877a3c30c47e2487

query I rowsort
SELECT ( 30 ) + col0 FROM tab1 AS cor0
----
110
33
94

query I rowsort
SELECT + ( 46 ) + col2 * col1 AS col0 FROM tab0 cor0
----
143
2884
7508

query I rowsort
SELECT ALL + + cor0.col0 * col1 + + col0 AS col1 FROM tab1 cor0
----
1120
704
81

query I rowsort
SELECT + col1 + - col0 * - col0 AS col1 FROM tab2 AS cor0
----
6143
6258
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7468
SELECT + ( + col0 ) * + col2 + CAST( col0 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
165
3712
7760

skipif mysql # not compatible
query I rowsort label-7468
SELECT + ( + col0 ) * + col2 + CAST ( col0 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
165
3712
7760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 49 * 84 col1 FROM tab2 AS cor0
----
4116
4116
4116

query I rowsort
SELECT ALL 11 AS col2 FROM tab2, tab0 cor0 CROSS JOIN tab0, tab1, tab2 AS cor1
----
243 values hashing to 9abcb2f48b3a009aa8d65d82a30c843f

query I rowsort
SELECT DISTINCT - col2 - + 5 AS col2 FROM tab1
----
-101
-59
-62

query I rowsort
SELECT - col0 * 0 * col1 - col0 FROM tab0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 + cor0.col2 col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 48730a4f3ae72ef34da4083404b84d99

query I rowsort
SELECT + + ( - col0 ) * ( + 59 ) + col2 AS col0 FROM tab2 AS cor0
----
-386
-4576
-4623

query I rowsort
SELECT ALL ( - cor0.col1 ) + 24 FROM tab1 AS cor0
----
-2
11
14

onlyif mysql # use DIV operator for integer division
query I rowsort label-7476
SELECT + col0 DIV col0 AS col1 FROM tab2 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7476
SELECT + col0 / col0 AS col1 FROM tab2 cor0
----
1
1
1

query I rowsort
SELECT - 17 FROM tab1, tab0 AS cor0
----
9 values hashing to 490d008f3fb5b70d3971cfc6d84503f4

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1, tab1 cor0, tab0 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7479
SELECT + col0 * - CAST( - cor0.col1 AS SIGNED ) FROM tab1 AS cor0
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-7479
SELECT + col0 * - CAST ( - cor0.col1 AS INTEGER ) FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-7480
SELECT + cor0.col1 DIV ( col0 ) AS col2 FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-7480
SELECT + cor0.col1 / ( col0 ) AS col2 FROM tab1 AS cor0
----
0
0
8

query I rowsort
SELECT DISTINCT - + col2 * - 10 AS col2 FROM tab2 cor0
----
260
270
380

query I rowsort
SELECT ALL - 48 AS col2 FROM tab0 AS cor0
----
-48
-48
-48

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7483
SELECT ALL - CAST( 39 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-39
-39
-39

skipif mysql # not compatible
query I rowsort label-7483
SELECT ALL - CAST ( 39 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-39
-39
-39

query I rowsort
SELECT - + col2 * + 4 + + cor0.col2 FROM tab2 AS cor0
----
-114
-78
-81

onlyif mysql # use DIV operator for integer division
query I rowsort label-7485
SELECT - cor0.col0 * - 16 - - col2 DIV col0 FROM tab2 AS cor0
----
115
1248
1264

skipif mysql # not compatible
query I rowsort label-7485
SELECT - cor0.col0 * - 16 - - col2 / col0 FROM tab2 AS cor0
----
115
1248
1264

query I rowsort
SELECT ALL - 1 FROM tab0, tab1 AS cor0
----
9 values hashing to 60fdd6924bb763d6aca00ba74935ef4b

query I rowsort
SELECT DISTINCT + 30 + cor0.col0 * + 77 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
569
6036
6113

query I rowsort
SELECT ALL + + ( 69 ) AS col0 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

query I rowsort
SELECT - 70 + - col0 AS col1 FROM tab1
----
-134
-150
-73

onlyif mysql # use DIV operator for integer division
query I rowsort label-7490
SELECT - col2 + - tab1.col0 DIV - ( - tab1.col2 * - col2 ) FROM tab1
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-7490
SELECT - col2 + - tab1.col0 / - ( - tab1.col2 * - col2 ) FROM tab1
----
-54
-57
-96

query I rowsort
SELECT DISTINCT + col1 * cor0.col1 * col0 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT ALL - ( - col2 ) * - 75 + - 3 FROM tab0 AS cor0
----
-2478
-6153
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-7493
SELECT DISTINCT + + col0 DIV - col2 FROM tab1 cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-7493
SELECT DISTINCT + + col0 / - col2 FROM tab1 cor0
----
-1
0

query I rowsort
SELECT ALL - - ( - col1 ) + 38 * - col2 FROM tab1 AS cor0
----
-2078
-2176
-3661

query I rowsort
SELECT 46 * col0 FROM tab0 AS cor0
----
1104
1610
4094

query I rowsort
SELECT ALL 67 AS col2 FROM tab0 cor0
----
67
67
67

query I rowsort
SELECT DISTINCT - col2 + - col1 * - 98 AS col0 FROM tab2 AS cor0
----
1628
3011
5756

query I rowsort
SELECT 19 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + 56 col1 FROM tab2 AS cor0
----
134
135
63

query I rowsort
SELECT ALL - col0 + - 49 FROM tab1 AS cor0
----
-113
-129
-52

query I rowsort
SELECT + 23 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

query I rowsort
SELECT DISTINCT col0 * ( + col1 * - col2 ) AS col1 FROM tab1 cor0
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT + col1 + + 25 FROM tab2 AS cor0
----
42
56
84

query I rowsort
SELECT ALL - col1 * 15 FROM tab1 AS cor0
----
-150
-195
-390

query I rowsort
SELECT DISTINCT + col2 + col1 + ( + col1 ) AS col1 FROM tab1 AS cor0
----
106
122
77

query I rowsort
SELECT DISTINCT + col1 + + 84 * + col1 FROM tab2 AS cor0
----
1445
2635
5015

query I rowsort
SELECT DISTINCT + - 56 * col0 AS col0 FROM tab0 AS cor0
----
-1344
-1960
-4984

query I rowsort
SELECT 20 + col2 * col1 AS col0 FROM tab0
----
117
2858
7482

query I rowsort
SELECT + col2 + 17 FROM tab1
----
113
71
74

query I rowsort
SELECT DISTINCT col1 * - 51 + col1 AS col0 FROM tab2 AS cor0
----
-1550
-2950
-850

query I rowsort
SELECT col1 * col0 + col1 * col0 * 57 + col2 * - ( cor0.col2 + col1 ) FROM tab0 AS cor0
----
115785
196812
455556

onlyif mysql # use DIV operator for integer division
query I rowsort label-7512
SELECT ALL + - col0 DIV - col0 - + col0 col0 FROM tab1 AS cor0
----
-2
-63
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7512
SELECT ALL + - col0 / - col0 - + col0 col0 FROM tab1 AS cor0
----
-2
-63
-79

query I rowsort
SELECT ALL + ( - col1 ) + - col1 AS col0 FROM tab0 cor0
----
-172
-182
-194

query I rowsort
SELECT + + col0 * 84 + + cor0.col2 FROM tab2 AS cor0
----
615
6578
6674

onlyif mysql # use DIV operator for integer division
query I rowsort label-7515
SELECT + 20 DIV cor0.col2 FROM tab0, tab0 cor0
----
9 values hashing to 38de6cca07ffff7269c0f8db6a157d3c

skipif mysql # not compatible
query I rowsort label-7515
SELECT + 20 / cor0.col2 FROM tab0, tab0 cor0
----
9 values hashing to 38de6cca07ffff7269c0f8db6a157d3c

query I rowsort
SELECT ALL + - 69 AS col1 FROM tab0 AS cor0
----
-69
-69
-69

query I rowsort
SELECT ALL col1 + tab0.col1 * col2 + + col0 AS col1 FROM tab0
----
229
2948
7642

query I rowsort
SELECT ALL - cor0.col0 + col2 AS col1 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT ALL + + ( col2 ) + col0 * col1 FROM tab1 AS cor0
----
1136
132
697

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 + + col2 col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ( col2 ) + 21 * col0 AS col1 FROM tab0 AS cor0
----
1951
537
736

query I rowsort
SELECT DISTINCT col0 * + cor0.col2 + 29 * col1 FROM tab0 AS cor0
----
2848
3286
9937

onlyif mysql # use DIV operator for integer division
query I rowsort label-7523
SELECT DISTINCT + cor0.col2 * - col1 + - 54 - col0 DIV + col2 AS col0 FROM tab0 AS cor0
----
-186
-2892
-7517

skipif mysql # not compatible
query I rowsort label-7523
SELECT DISTINCT + cor0.col2 * - col1 + - 54 - col0 / + col2 AS col0 FROM tab0 AS cor0
----
-186
-2892
-7517

query I rowsort
SELECT DISTINCT + 85 + tab2.col1 AS col0 FROM tab2
----
102
116
144

query I rowsort
SELECT 78 AS col0 FROM tab2, tab1, tab2 AS cor0, tab0
----
81 values hashing to f0487ba81d377516702723e098c02ba1

onlyif mysql # use DIV operator for integer division
query I rowsort label-7526
SELECT 72 DIV cor0.col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 1cd643253f19b663914c5dbb8be19829

skipif mysql # not compatible
query I rowsort label-7526
SELECT 72 / cor0.col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 1cd643253f19b663914c5dbb8be19829

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7527
SELECT CAST( - col1 AS SIGNED ) + col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7527
SELECT CAST ( - col1 AS INTEGER ) + col1 FROM tab1
----
0
0
0

query I rowsort
SELECT + 69 + - 92 FROM tab0
----
-23
-23
-23

query I rowsort
SELECT DISTINCT + col1 + 85 FROM tab1
----
111
95
98

query I rowsort
SELECT ALL - 92 + + col2 FROM tab0
----
-10
-59
-91

query I rowsort
SELECT + 49 * col1 AS col1 FROM tab1
----
1274
490
637

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - tab1.col2 col0 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query I rowsort
SELECT DISTINCT + col0 * col2 + col2 AS col1 FROM tab1
----
216
3705
7776

query I rowsort
SELECT + col0 * ( col1 ) AS col2 FROM tab1
----
1040
640
78

query I rowsort
SELECT + col2 + col2 + - col1 * - cor0.col1 FROM tab0 AS cor0
----
7462
8445
9411

query I rowsort
SELECT - col2 * + col2 + + col0 FROM tab2 cor0
----
-1365
-598
-722

onlyif mysql # use DIV operator for integer division
query I rowsort label-7537
SELECT col0 * + col1 + col1 DIV + 19 FROM tab0 AS cor0
----
2068
3400
8103

skipif mysql # not compatible
query I rowsort label-7537
SELECT col0 * + col1 + col1 / + 19 FROM tab0 AS cor0
----
2068
3400
8103

query I rowsort
SELECT ALL 66 * + col0 AS col0 FROM tab1 cor0
----
198
4224
5280

onlyif mysql # use DIV operator for integer division
query I rowsort label-7539
SELECT ALL tab1.col1 + - col2 * col2 DIV + col2 FROM tab1
----
-28
-47
-83

skipif mysql # not compatible
query I rowsort label-7539
SELECT ALL tab1.col1 + - col2 * col2 / + col2 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT - - cor0.col0 * - col2 + 86 * + col0 AS col0 FROM tab0 AS cor0
----
1272
2975
356

query I rowsort
SELECT + ( col1 + col2 * col1 ) FROM tab0
----
194
2924
7553

query I rowsort
SELECT - col0 * + 57 AS col0 FROM tab2 AS cor0
----
-399
-4446
-4503

query I rowsort
SELECT - col0 + ( - col2 ) * + cor0.col0 AS col0 FROM tab1 AS cor0
----
-165
-3712
-7760

query I rowsort
SELECT 64 * + col2 FROM tab1
----
3456
3648
6144

onlyif mysql # use DIV operator for integer division
query I rowsort label-7545
SELECT + col2 + - col0 DIV - 39 FROM tab0
----
1
33
84

skipif mysql # not compatible
query I rowsort label-7545
SELECT + col2 + - col0 / - 39 FROM tab0
----
1
33
84

query I rowsort
SELECT ALL + 28 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 8a39580587f2831072e93c319ff94bbf

onlyif mysql # use DIV operator for integer division
query I rowsort label-7547
SELECT ALL + col1 DIV col0 col1 FROM tab2
----
0
0
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7547
SELECT ALL + col1 / col0 col1 FROM tab2
----
0
0
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-7548
SELECT ALL col2 DIV 83 - - col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-7548
SELECT ALL col2 / 83 - - col1 FROM tab0
----
86
91
97

query I rowsort
SELECT col2 + - 32 FROM tab0
----
-31
1
50

query I rowsort
SELECT ALL + 29 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 1e7120ba8e9191084172ddced17e5eb2

query I rowsort
SELECT ALL - col1 - ( 4 * + col1 ) FROM tab2
----
-155
-295
-85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7552
SELECT - + ( - col2 ) + col2 * CAST( - col1 AS SIGNED ) FROM tab2 cor0
----
-1508
-608
-810

skipif mysql # not compatible
query I rowsort label-7552
SELECT - + ( - col2 ) + col2 * CAST ( - col1 AS INTEGER ) FROM tab2 cor0
----
-1508
-608
-810

query I rowsort
SELECT - - ( col1 ) * cor0.col1 AS col0 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT DISTINCT tab0.col2 * - col0 * col2 - - tab0.col2 * + 37 FROM tab0
----
-24915
-595402
2

query I rowsort
SELECT DISTINCT ( tab2.col2 + + cor0.col2 ) * 44 AS col2 FROM tab0, tab1 AS cor0 CROSS JOIN tab2
----
9 values hashing to 683d287763e795cf795a30b80e5d3e3a

query I rowsort
SELECT DISTINCT - + 36 + col0 * col1 + 84 FROM tab2 AS cor0
----
1391
265
4650

query I rowsort
SELECT 16 + + col1 FROM tab2 AS cor0
----
33
47
75

query I rowsort
SELECT DISTINCT - - col0 + cor0.col0 AS col2 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT ALL + + cor0.col0 + - col2 + - col0 AS col1 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT - 71 - col2 AS col1 FROM tab1 AS cor0
----
-125
-128
-167

query I rowsort
SELECT ALL + 22 * 66 + + col1 + col0 FROM tab2 AS cor0
----
1490
1548
1589

query I rowsort
SELECT + ( 55 ) AS col0 FROM tab1 AS cor0
----
55
55
55

query I rowsort
SELECT - - ( col2 ) + - col2 - col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT - - 38 * - col1 AS col2 FROM tab0 AS cor0
----
-3268
-3458
-3686

query I rowsort
SELECT - ( + col0 ) * - col1 + - 4 FROM tab1 AS cor0
----
1036
636
74

query I rowsort
SELECT ALL - col2 * 81 + - col1 AS col1 FROM tab1 cor0
----
-4400
-4627
-7789

query I rowsort
SELECT ALL - + 1 * - col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL col1 * 62 + - col2 * ( col1 ) * col1 FROM tab2 AS cor0
----
-24025
-86848
-9928

query I rowsort
SELECT DISTINCT - + col0 * - col0 + col2 AS col2 FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT + 61 + col1 FROM tab2 AS cor0
----
120
78
92

query I rowsort
SELECT ALL - + col1 + + col2 - col0 AS col2 FROM tab2 AS cor0
----
-11
-111
-58

onlyif mysql # use DIV operator for integer division
query I rowsort label-7572
SELECT + + col1 DIV - 78 + - 61 FROM tab1 AS cor0
----
-61
-61
-61

skipif mysql # not compatible
query I rowsort label-7572
SELECT + + col1 / - 78 + - 61 FROM tab1 AS cor0
----
-61
-61
-61

query I rowsort
SELECT ALL - cor0.col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

query I rowsort
SELECT ALL - 66 * 76 FROM tab0, tab0 AS cor0
----
9 values hashing to e837adeecca56d725f4609078632ba85

query I rowsort
SELECT DISTINCT 20 FROM tab1, tab1 AS cor0
----
20

query I rowsort
SELECT - + col1 * - col0 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT col1 + + 4 * + col1 AS col1 FROM tab0 AS cor0
----
430
455
485

query I rowsort
SELECT + col1 * - ( + col2 ) + + col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT DISTINCT - - 17 AS col2 FROM tab2, tab2 cor0
----
17

query I rowsort
SELECT - col0 + 29 + - col2 FROM tab1 cor0
----
-147
-28
-92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7581
SELECT CAST( col0 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-7581
SELECT CAST ( col0 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7582
SELECT - CAST( NULL AS SIGNED ) + col0 col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7582
SELECT - CAST ( NULL AS INTEGER ) + col0 col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col1 + + col1 * - col1 FROM tab2 AS cor0
----
-272
-3422
-930

query I rowsort
SELECT DISTINCT col0 * tab0.col1 * ( + col2 ) AS col2 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT ALL col0 * - 5 + col2 * - col0 AS col0 FROM tab1 AS cor0
----
-177
-3968
-8080

query I rowsort
SELECT ALL - - 23 * col2 - cor0.col2 * 70 FROM tab1 AS cor0
----
-2538
-2679
-4512

query I rowsort
SELECT + col2 * col0 - col2 FROM tab0 AS cor0
----
34
7216
759

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 2 + + col1 col0 FROM tab2 AS cor0
----
15
29
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-7589
SELECT ALL + 74 DIV 67 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7589
SELECT ALL + 74 / 67 FROM tab0
----
1
1
1

query I rowsort
SELECT ALL col2 * ( col0 + 50 * - col2 ) FROM tab2
----
-31772
-36261
-69198

onlyif mysql # use DIV operator for integer division
query I rowsort label-7591
SELECT + - col0 DIV + col1 FROM tab2 cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-7591
SELECT + - col0 / + col1 FROM tab2 cor0
----
-1
-4
0

query I rowsort
SELECT 15 * - col2 AS col1 FROM tab0 AS cor0
----
-1230
-15
-495

query I rowsort
SELECT - - col1 * col1 * 52 AS col1 FROM tab0 AS cor0
----
384592
430612
489268

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col0 + col2 + + col1 * + col0 * col1 col0 FROM tab0
----
177561
329351
737180

query I rowsort
SELECT - tab0.col2 + + 19 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to b7d697aced2688efe8655fce93eddd32

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7596
SELECT + cor0.col2 * + CAST( NULL AS SIGNED ) + - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7596
SELECT + cor0.col2 * + CAST ( NULL AS INTEGER ) + - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - tab2.col1 AS col1 FROM tab2, tab1 cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT ALL + - 60 + col0 AS col1 FROM tab0 AS cor0
----
-25
-36
29

query I rowsort
SELECT col2 * - col0 + 5 * 18 FROM tab2 AS cor0
----
-1938
-2912
-99

onlyif mysql # use DIV operator for integer division
query I rowsort label-7600
SELECT 67 DIV - col0 FROM tab2
----
-9
0
0

skipif mysql # not compatible
query I rowsort label-7600
SELECT 67 / - col0 FROM tab2
----
-9
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 + + ( col1 ) + col2 col0 FROM tab2 AS cor0
----
144
72
89

query I rowsort
SELECT ALL - - col2 * - ( + 42 ) * col2 AS col2 FROM tab0 AS cor0
----
-282408
-42
-45738

skipif mysql # not compatible
query I rowsort
SELECT - col0 * - CAST ( col1 AS REAL ) - col2 FROM tab2 cor0
----
1305
190
4576

onlyif mysql # use DIV operator for integer division
query I rowsort label-7604
SELECT DISTINCT - col2 DIV 44 FROM tab1 AS cor0
----
-1
-2

skipif mysql # not compatible
query I rowsort label-7604
SELECT DISTINCT - col2 / 44 FROM tab1 AS cor0
----
-1
-2

onlyif mysql # use DIV operator for integer division
query I rowsort label-7605
SELECT - + col0 * + col0 DIV cor0.col0 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-7605
SELECT - + col0 * + col0 / cor0.col0 FROM tab0 AS cor0
----
-24
-35
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7606
SELECT col2 * CAST( col2 AS SIGNED ) - + col2 FROM tab0 AS cor0
----
0
1056
6642

skipif mysql # not compatible
query I rowsort label-7606
SELECT col2 * CAST ( col2 AS INTEGER ) - + col2 FROM tab0 AS cor0
----
0
1056
6642

onlyif mysql # use DIV operator for integer division
query I rowsort label-7607
SELECT ALL + - col0 DIV 9 FROM tab2 AS cor0
----
-8
-8
0

skipif mysql # not compatible
query I rowsort label-7607
SELECT ALL + - col0 / 9 FROM tab2 AS cor0
----
-8
-8
0

query I rowsort
SELECT DISTINCT col0 + - col2 AS col0 FROM tab2 AS cor0
----
-20
41
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * - col0 * cor0.col0 col1 FROM tab2 AS cor0
----
1323
158184
237158

query I rowsort
SELECT - 6 - col1 * ( col2 ) FROM tab0
----
-103
-2844
-7468

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 18 col1 FROM tab2
----
18
18
18

query I rowsort
SELECT DISTINCT + col0 - col0 * col1 FROM tab1
----
-576
-75
-960

query I rowsort
SELECT - 32 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to ef8f93119983b962f4c81381ebf4b1e6

query I rowsort
SELECT + tab2.col2 + tab2.col0 * col2 + col1 * + col2 FROM tab2
----
1053
3588
3686

query I rowsort
SELECT col2 * + 58 * + col1 - - col0 FROM tab1 AS cor0
----
33124
72464
81435

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0 CROSS JOIN tab0, tab2 cor1, tab0 AS cor2
----
3645 values hashing to 4fa4bd3038de6e74a345debc8ab4cd53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * ( - col0 ) - + 54 col1 FROM tab1
----
-1094
-132
-694

onlyif mysql # use DIV operator for integer division
query I rowsort label-7618
SELECT ALL col1 + ( col0 ) DIV col0 FROM tab1
----
11
14
27

skipif mysql # not compatible
query I rowsort label-7618
SELECT ALL col1 + ( col0 ) / col0 FROM tab1
----
11
14
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * - tab1.col1 col0 FROM tab1
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-7620
SELECT DISTINCT + col2 + col2 DIV - cor0.col2 + + col1 AS col1 FROM tab1 cor0
----
108
66
79

skipif mysql # not compatible
query I rowsort label-7620
SELECT DISTINCT + col2 + col2 / - cor0.col2 + + col1 AS col1 FROM tab1 cor0
----
108
66
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 12 col2 FROM tab1 AS cor0
----
-12
-12
-12

query I rowsort
SELECT DISTINCT + 23 * cor0.col1 + col0 * - cor0.col0 FROM tab2 AS cor0
----
-4727
-5850
664

query I rowsort
SELECT - 16 + col2 * - col2 FROM tab1 AS cor0
----
-2932
-3265
-9232

query I rowsort
SELECT + col1 * + 2 FROM tab1
----
20
26
52

query I rowsort
SELECT + - col0 + col2 * + col1 FROM tab0 cor0
----
2814
62
7373

query I rowsort
SELECT DISTINCT col2 * col1 + col2 AS col0 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT ALL + 86 * + 53 + - col0 AS col0 FROM tab1 cor0
----
4478
4494
4555

query I rowsort
SELECT DISTINCT 94 * 33 FROM tab1 cor0
----
3102

query I rowsort
SELECT DISTINCT + 54 - col1 AS col1 FROM tab1 AS cor0
----
28
41
44

query I rowsort
SELECT - col1 + + col2 * tab0.col0 AS col2 FROM tab0
----
-62
706
7207

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 86 col0 FROM tab1 AS cor0
----
-86
-86
-86

query I rowsort
SELECT ALL - col0 * 61 AS col0 FROM tab0 AS cor0
----
-1464
-2135
-5429

onlyif mysql # use DIV operator for integer division
query I rowsort label-7633
SELECT DISTINCT col1 * cor0.col0 + - col1 DIV col0 + - col0 * + col2 AS col2 FROM tab1 AS cor0
----
-3008
-6640
-92

skipif mysql # not compatible
query I rowsort label-7633
SELECT DISTINCT col1 * cor0.col0 + - col1 / col0 + - col0 * + col2 AS col2 FROM tab1 AS cor0
----
-3008
-6640
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 * - col2 + col1 + col2 col0 FROM tab0 cor0
----
-6551
-970
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7635
SELECT - - CAST( col2 AS SIGNED ) + col1 AS col1 FROM tab0 AS cor0
----
119
173
98

skipif mysql # not compatible
query I rowsort label-7635
SELECT - - CAST ( col2 AS INTEGER ) + col1 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL - col2 * 5 + - cor0.col1 FROM tab2 AS cor0
----
-166
-189
-207

query I rowsort
SELECT DISTINCT + 60 + 57 * + cor0.col1 FROM tab1 AS cor0
----
1542
630
801

query I rowsort
SELECT - tab0.col0 + - col2 FROM tab0
----
-171
-36
-57

query I rowsort
SELECT col1 * - tab0.col0 + tab0.col2 * - col1 + + col2 FROM tab0
----
-15479
-3491
-4869

query I rowsort
SELECT ALL - col1 - tab1.col2 AS col2 FROM tab1
----
-109
-67
-80

query I rowsort
SELECT ALL col1 * col2 - - 60 AS col2 FROM tab1
----
1308
1464
630

query I rowsort
SELECT DISTINCT + col2 * - col2 - + 37 AS col0 FROM tab2
----
-1481
-713
-766

onlyif mysql # use DIV operator for integer division
query I rowsort label-7643
SELECT ALL + 19 DIV col2 - + col0 * - col0 FROM tab0
----
1244
576
7921

skipif mysql # not compatible
query I rowsort label-7643
SELECT ALL + 19 / col2 - + col0 * - col0 FROM tab0
----
1244
576
7921

query I rowsort
SELECT - col1 + col2 + + col2 AS col0 FROM tab0
----
-20
-95
73

query I rowsort
SELECT ALL + + cor0.col1 * - col1 + col0 * col0 AS col0 FROM tab1 cor0
----
-667
3996
6231

query I rowsort
SELECT ALL + + 5 + - cor0.col1 AS col2 FROM tab0 AS cor0
----
-81
-86
-92

query I rowsort
SELECT DISTINCT + cor0.col2 + 98 * - 21 AS col2 FROM tab0, tab1 AS cor0
----
-1962
-2001
-2004

query I rowsort
SELECT ALL - col1 + - 70 AS col1 FROM tab2 AS cor0
----
-101
-129
-87

query I rowsort
SELECT DISTINCT col0 * - 8 + col1 + + col1 FROM tab0 AS cor0
----
-20
-530
-86

query I rowsort
SELECT DISTINCT col0 * + cor0.col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL col2 * col0 + + col2 AS col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT ALL - col1 - + 68 * - 82 AS col2 FROM tab1 AS cor0
----
5550
5563
5566

query I rowsort
SELECT - cor0.col1 + ( - col0 ) FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT ALL col0 + ( - 11 ) FROM tab1 AS cor0
----
-8
53
69

query I rowsort
SELECT DISTINCT - col2 * - 20 * + cor0.col1 FROM tab1 cor0
----
11400
24960
28080

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7656
SELECT DISTINCT - cor0.col2 * - CAST( col0 AS SIGNED ) + col1 AS col0 FROM tab0 AS cor0
----
132
7389
878

skipif mysql # not compatible
query I rowsort label-7656
SELECT DISTINCT - cor0.col2 * - CAST ( col0 AS INTEGER ) + col1 AS col0 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT ALL col0 + - cor0.col2 FROM tab2 AS cor0
----
-20
41
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7658
SELECT - - col0 + - CAST( - 21 AS SIGNED ) FROM tab1 AS cor0
----
101
24
85

skipif mysql # not compatible
query I rowsort label-7658
SELECT - - col0 + - CAST ( - 21 AS INTEGER ) FROM tab1 AS cor0
----
101
24
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7659
SELECT - + col0 * CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7659
SELECT - + col0 * CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7660
SELECT ALL - col2 - CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7660
SELECT ALL - col2 - CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( col1 + ( 89 ) ) * + col1 AS col1 FROM tab0
----
15050
16380
18042

query I rowsort
SELECT ALL tab0.col2 * col2 - + tab0.col1 AS col0 FROM tab0
----
-96
1003
6633

query I rowsort
SELECT ALL + col1 - + tab1.col1 AS col0 FROM tab1
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7664
SELECT - - cor0.col2 * CAST( col0 AS SIGNED ) - col2 FROM tab2 cor0
----
162
2002
2964

skipif mysql # not compatible
query I rowsort label-7664
SELECT - - cor0.col2 * CAST ( col0 AS INTEGER ) - col2 FROM tab2 cor0
----
162
2002
2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-7665
SELECT - cor0.col0 + 85 DIV col0 FROM tab0 AS cor0
----
-21
-33
-89

skipif mysql # not compatible
query I rowsort label-7665
SELECT - cor0.col0 + 85 / col0 FROM tab0 AS cor0
----
-21
-33
-89

query I rowsort
SELECT ALL + - col1 + - col2 * 6 FROM tab2 AS cor0
----
-193
-215
-245

query I rowsort
SELECT DISTINCT col0 * ( + 90 ) AS col0 FROM tab1 cor0
----
270
5760
7200

query I rowsort
SELECT DISTINCT - + col1 + - col0 * col1 AS col2 FROM tab2 AS cor0
----
-1360
-248
-4661

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * col0 col1 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT + col0 + - col1 + - col1 FROM tab1
----
-49
44
54

onlyif mysql # use DIV operator for integer division
query I rowsort label-7671
SELECT 40 DIV - col1 AS col2 FROM tab2
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-7671
SELECT 40 / - col1 AS col2 FROM tab2
----
-1
-2
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7672
SELECT col1 + - col2 * + col0 + col0 DIV col2 AS col2 FROM tab1 AS cor0
----
-136
-3637
-7667

skipif mysql # not compatible
query I rowsort label-7672
SELECT col1 + - col2 * + col0 + col0 / col2 AS col2 FROM tab1 AS cor0
----
-136
-3637
-7667

query I rowsort
SELECT + - col0 * col0 + + col1 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT - col2 + + col2 * + col1 * - col0 AS col0 FROM tab2
----
-119678
-51072
-5886

query I rowsort
SELECT col1 + - col0 * + col1 AS col0 FROM tab2
----
-1326
-186
-4543

query I rowsort
SELECT - col2 * - col0 + - col1 * cor0.col1 AS col2 FROM tab0 cor0
----
-6604
-9374
-983

query I rowsort
SELECT - col2 * + cor0.col1 + + col1 FROM tab0 cor0
----
-2752
-7371
0

query I rowsort
SELECT DISTINCT col2 * col1 + tab0.col2 AS col2 FROM tab0
----
2871
7544
98

query I rowsort
SELECT DISTINCT + tab1.col2 + - col1 + tab1.col1 FROM tab1
----
54
57
96

query I rowsort
SELECT DISTINCT tab2.col1 + + tab2.col2 * col1 AS col0 FROM tab2
----
1593
663
868

query I rowsort
SELECT + col0 * tab0.col2 * - col2 FROM tab0
----
-26136
-35
-598436

query I rowsort
SELECT col2 + col0 * + col0 + - col2 AS col0 FROM tab1
----
4096
6400
9

query I rowsort
SELECT DISTINCT 55 + + col2 AS col2 FROM tab2 AS cor0
----
81
82
93

query I rowsort
SELECT ALL 20 + col2 + col0 * col2 FROM tab2 AS cor0
----
2074
236
3060

query I rowsort
SELECT + col2 + col2 * - cor0.col1 AS col0 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT ALL 86 * + col0 + col0 AS col2 FROM tab1 cor0
----
261
5568
6960

query I rowsort
SELECT + - 17 AS col1 FROM tab1 AS cor0
----
-17
-17
-17

query I rowsort
SELECT DISTINCT + ( + col2 ) * - col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - 69 * col2 FROM tab2 AS cor0
----
-1794
-1863
-2622

query I rowsort
SELECT col0 * + col1 * col2 AS col1 FROM tab1 AS cor0
----
36480
4212
99840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 54 + - col1 col2 FROM tab2 AS cor0
----
-5
23
37

query I rowsort
SELECT - - 3 * + col0 AS col0 FROM tab0 cor0
----
105
267
72

query I rowsort
SELECT ALL + col2 * + col0 AS col1 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT - col2 * col0 * col0 FROM tab2 AS cor0
----
-1323
-158184
-237158

query I rowsort
SELECT ALL - 78 * col2 * tab2.col0 AS col2 FROM tab2
----
-14742
-158184
-234156

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7696
SELECT ALL + CAST( 11 AS SIGNED ) * col1 FROM tab2
----
187
341
649

skipif mysql # not compatible
query I rowsort label-7696
SELECT ALL + CAST ( 11 AS INTEGER ) * col1 FROM tab2
----
187
341
649

query I rowsort
SELECT - col2 * + col1 * col1 - - col2 FROM tab1
----
-16128
-36450
-5643

onlyif mysql # use DIV operator for integer division
query I rowsort label-7698
SELECT - col2 + col0 DIV - col1 AS col2 FROM tab2
----
-27
-27
-42

skipif mysql # not compatible
query I rowsort label-7698
SELECT - col2 + col0 / - col1 AS col2 FROM tab2
----
-27
-27
-42

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col0 col1 FROM tab0, tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT ( col0 * + col2 + + tab2.col0 ) FROM tab2
----
196
2106
3081

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7701
SELECT ALL CAST( 92 AS SIGNED ) AS col0 FROM tab2
----
92
92
92

skipif mysql # not compatible
query I rowsort label-7701
SELECT ALL CAST ( 92 AS INTEGER ) AS col0 FROM tab2
----
92
92
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-7702
SELECT tab0.col1 + - col1 DIV - col1 FROM tab0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-7702
SELECT tab0.col1 + - col1 / - col1 FROM tab0
----
87
92
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-7703
SELECT DISTINCT - 60 DIV col1 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-7703
SELECT DISTINCT - 60 / col1 FROM tab0
----
0

query I rowsort
SELECT ALL 50 * col2 FROM tab2
----
1300
1350
1900

query I rowsort
SELECT - - cor0.col1 + + col1 AS col2 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT - - ( + col1 ) * col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT + - ( col0 ) * col1 * col0 FROM tab0 AS cor0
----
-118825
-49536
-720811

query I rowsort
SELECT DISTINCT + cor0.col1 + - cor0.col1 * col2 AS col0 FROM tab1 cor0
----
-1235
-1378
-560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7709
SELECT CAST( col2 AS SIGNED ) col2 FROM tab2
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7709
SELECT CAST ( col2 AS INTEGER ) col2 FROM tab2
----
26
27
38

query I rowsort
SELECT DISTINCT + 30 * - tab2.col0 AS col1 FROM tab2
----
-210
-2340
-2370

query I rowsort
SELECT 19 + cor0.col2 * + cor0.col1 AS col2 FROM tab2 AS cor0
----
1553
665
856

query I rowsort
SELECT col2 - col2 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT cor0.col1 + col1 * 52 * col2 FROM tab0 AS cor0
----
147662
388115
5141

query I rowsort
SELECT - col0 * col0 + 67 * - col1 AS col2 FROM tab1 AS cor0
----
-1751
-4766
-7271

query I rowsort
SELECT - ( col1 ) + - 68 AS col1 FROM tab0 AS cor0
----
-154
-159
-165

query I rowsort
SELECT cor0.col1 * + tab0.col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 23253cfee4cea5e1d4f993bec937f9fe

query I rowsort
SELECT - ( col2 ) + col1 * 71 FROM tab2 AS cor0
----
1169
2174
4163

query I rowsort
SELECT + 65 - col2 AS col2 FROM tab0 cor0
----
-17
32
64

query I rowsort
SELECT + ( + tab2.col0 * col1 ) FROM tab2
----
1343
217
4602

query I rowsort
SELECT + ( tab1.col2 ) + - tab1.col2 AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT - + 98 * col0 FROM tab1 cor0
----
-294
-6272
-7840

query I rowsort
SELECT ALL col0 * - 4 FROM tab2
----
-28
-312
-316

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 90 col0 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 5d25a546acf3ae171e731e50adc0112e

query I rowsort
SELECT + 35 FROM tab1, tab1 AS cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

query I rowsort
SELECT - cor0.col1 * + cor0.col2 * + col0 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT - col0 * - 41 FROM tab0 AS cor0
----
1435
3649
984

query I rowsort
SELECT - col1 + col2 * - 68 * - col1 FROM tab0
----
192898
507325
6499

query I rowsort
SELECT 33 * col1 AS col0 FROM tab2 cor0
----
1023
1947
561

query I rowsort
SELECT ALL - col0 * - 18 AS col1 FROM tab2 AS cor0
----
126
1404
1422

query I rowsort
SELECT - ( - 67 ) + col0 * 48 FROM tab0 AS cor0
----
1219
1747
4339

onlyif mysql # use DIV operator for integer division
query I rowsort label-7731
SELECT ALL col2 DIV 48 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7731
SELECT ALL col2 / 48 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 88 + + col2 * col1 AS col2 FROM tab1 AS cor0
----
1336
1492
658

query I rowsort
SELECT DISTINCT - col2 * + col1 * + col1 AS col0 FROM tab1
----
-16224
-36504
-5700

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - CAST ( + col2 AS REAL ) col2 FROM tab0 cor0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-7735
SELECT col2 * - col0 DIV col0 FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-7735
SELECT col2 * - col0 / col0 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT - ( - col2 ) * - cor0.col2 + 40 AS col1 FROM tab1 AS cor0
----
-2876
-3209
-9176

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7737
SELECT DISTINCT + - CAST( ( col0 ) AS SIGNED ) * + 7 FROM tab2 AS cor0
----
-49
-546
-553

skipif mysql # not compatible
query I rowsort label-7737
SELECT DISTINCT + - CAST ( ( col0 ) AS INTEGER ) * + 7 FROM tab2 AS cor0
----
-49
-546
-553

query I rowsort
SELECT + ( + col0 ) + col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL 29 * + col1 AS col2 FROM tab0 AS cor0
----
2494
2639
2813

query I rowsort
SELECT ALL - col1 * col0 * + col1 AS col1 FROM tab2
----
-22831
-271518
-6727

query I rowsort
SELECT ALL + 79 * - col1 FROM tab1
----
-1027
-2054
-790

query I rowsort
SELECT col1 - + col0 * col1 FROM tab0
----
-1978
-3298
-8008

query I rowsort
SELECT 53 AS col1 FROM tab2, tab1 AS cor0 CROSS JOIN tab1
----
27 values hashing to 866ae1b4ab9e5b4043ac1bcfd413aaa6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7744
SELECT DISTINCT + CAST( NULL AS SIGNED ) / - col1 AS col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-7744
SELECT DISTINCT + CAST ( NULL AS INTEGER ) / - col1 AS col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - col0 * CAST ( - col0 * col1 AS REAL ) AS col2 FROM tab1 AS cor0
----
234
40960
83200

query I rowsort
SELECT - 70 + cor0.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to a95fd426c708e215ffae7de2fd26f68e

query I rowsort
SELECT ALL + - 4 * + cor0.col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 796d9f10295bb03e671430ba1f4138e5

query I rowsort
SELECT DISTINCT - col0 * col2 + - col1 * - tab1.col0 + col2 * + col1 FROM tab1
----
-2438
-5392
1320

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7749
SELECT ALL CAST( NULL AS SIGNED ) AS col0 FROM tab0, tab2 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-7749
SELECT ALL CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab2 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-7750
SELECT col2 * col0 - col1 DIV col0 FROM tab2
----
185
2028
3002

skipif mysql # not compatible
query I rowsort label-7750
SELECT col2 * col0 - col1 / col0 FROM tab2
----
185
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-7751
SELECT DISTINCT col0 + col2 DIV - col2 AS col0 FROM tab1
----
2
63
79

skipif mysql # not compatible
query I rowsort label-7751
SELECT DISTINCT col0 + col2 / - col2 AS col0 FROM tab1
----
2
63
79

query I rowsort
SELECT col1 - + 67 FROM tab2
----
-36
-50
-8

query I rowsort
SELECT col0 * - ( + col2 ) + + col2 AS col2 FROM tab0 AS cor0
----
-34
-7216
-759

onlyif mysql # use DIV operator for integer division
query I rowsort label-7754
SELECT + col2 * ( cor0.col1 ) DIV + col1 + - col2 FROM tab2 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7754
SELECT + col2 * ( cor0.col1 ) / + col1 + - col2 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT + col1 * + ( + 30 ) AS col2 FROM tab2
----
1770
510
930

query I rowsort
SELECT - - col0 * col1 + col1 AS col2 FROM tab1 cor0
----
104
1053
650

query I rowsort
SELECT col2 + + 0 + col0 * cor0.col1 * - col1 FROM tab0 AS cor0
----
-177471
-329314
-736927

query I rowsort
SELECT DISTINCT + col0 * 75 FROM tab1 AS cor0
----
225
4800
6000

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - ( 75 ) col1 FROM tab2 AS cor0
----
-1950
-2025
-2850

query I rowsort
SELECT ALL - col0 * 73 AS col2 FROM tab0 AS cor0
----
-1752
-2555
-6497

query I rowsort
SELECT + + col2 + + col0 AS col1 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT DISTINCT + col0 - 26 FROM tab2 AS cor0
----
-19
52
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + col1 * col2 col0 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT - + col1 * - 24 - - cor0.col2 FROM tab0 AS cor0
----
2097
2266
2329

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * 32 col0 FROM tab0 cor0
----
2752
2912
3104

query I rowsort
SELECT ALL + col1 + 93 * + col2 AS col1 FROM tab1 AS cor0
----
5048
5311
8941

query I rowsort
SELECT + + col2 + ( col1 * col2 ) FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT ALL - + col0 * 14 FROM tab1 AS cor0
----
-1120
-42
-896

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7769
SELECT ALL 31 * + col0 - - CAST( NULL AS SIGNED ) AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7769
SELECT ALL 31 * + col0 - - CAST ( NULL AS INTEGER ) AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL tab0.col1 - col1 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT + col0 * col0 * - col1 FROM tab1 AS cor0
----
-234
-40960
-83200

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7772
SELECT col0 * CAST( NULL AS SIGNED ) - + ( + col2 ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7772
SELECT col0 * CAST ( NULL AS INTEGER ) - + ( + col2 ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col0 * + col1 + + cor0.col2 FROM tab0 cor0
----
-2031
-3394
-8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-7774
SELECT ALL col1 * col2 DIV - 28 + tab1.col0 AS col0 FROM tab1
----
-47
36
44

skipif mysql # not compatible
query I rowsort label-7774
SELECT ALL col1 * col2 / - 28 + tab1.col0 AS col0 FROM tab1
----
-47
36
44

query I rowsort
SELECT DISTINCT - cor0.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 - col0 * + ( col2 ) + col1 + col0 col1 FROM tab0 AS cor0
----
-682
-7118
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7777
SELECT ALL + col1 * - CAST( - 91 AS SIGNED ) - + col0 AS col0 FROM tab0 cor0
----
7802
8192
8792

skipif mysql # not compatible
query I rowsort label-7777
SELECT ALL + col1 * - CAST ( - 91 AS INTEGER ) - + col0 AS col0 FROM tab0 cor0
----
7802
8192
8792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 4 * + col1 col1 FROM tab1
----
104
40
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-7779
SELECT ALL - + col1 DIV - cor0.col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7779
SELECT ALL - + col1 / - cor0.col2 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + + col2 col2 FROM tab0
----
119
173
98

query I rowsort
SELECT ( tab2.col1 * - ( + col2 ) ) + + col1 + - col2 FROM tab2
----
-1501
-667
-833

query I rowsort
SELECT DISTINCT + col1 * col2 + col1 * 56 AS col0 FROM tab0 AS cor0
----
12558
5529
7654

query I rowsort
SELECT ALL + col1 * col2 * + col1 AS col0 FROM tab2 cor0
----
10982
25947
90506

query I rowsort
SELECT ALL - 60 * - col2 FROM tab0 AS cor0
----
1980
4920
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + col2 col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT + col1 * cor0.col1 + col2 AS col2 FROM tab1 AS cor0
----
157
265
730

onlyif mysql # use DIV operator for integer division
query I rowsort label-7787
SELECT + col1 * + 43 - col0 DIV + col1 FROM tab2 AS cor0
----
1333
2536
727

skipif mysql # not compatible
query I rowsort label-7787
SELECT + col1 * + 43 - col0 / + col1 FROM tab2 AS cor0
----
1333
2536
727

query I rowsort
SELECT - 13 * - 55 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to c530d88d2b3f5ae240eb5d991bd2d7d4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7789
SELECT cor0.col2 * CAST( col1 AS SIGNED ) + + col0 * + col1 FROM tab2 AS cor0
----
1054
1989
6136

skipif mysql # not compatible
query I rowsort label-7789
SELECT cor0.col2 * CAST ( col1 AS INTEGER ) + + col0 * + col1 FROM tab2 AS cor0
----
1054
1989
6136

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0, tab2 cor1, tab0, tab0 cor2
----
3645 values hashing to 38896d3a4bd953cc78f93d73ae064cbd

query I rowsort
SELECT DISTINCT + 19 AS col2 FROM tab2, tab1, tab1 AS cor0
----
19

query I rowsort
SELECT DISTINCT - - ( - col1 ) + col1 AS col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT + 85 * 66 + + col2 FROM tab1 cor0
----
5664
5667
5706

query I rowsort
SELECT DISTINCT - col0 * 91 + col1 FROM tab0 AS cor0
----
-2098
-3088
-8008

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7795
SELECT DISTINCT + CAST( cor0.col1 AS SIGNED ) * + col0 + col0 AS col2 FROM tab1 AS cor0
----
1120
704
81

skipif mysql # not compatible
query I rowsort label-7795
SELECT DISTINCT + CAST ( cor0.col1 AS INTEGER ) * + col0 + col0 AS col2 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT ALL - cor0.col1 - 51 FROM tab1 AS cor0
----
-61
-64
-77

query I rowsort
SELECT - ( 17 ) * col2 + 63 AS col0 FROM tab2
----
-379
-396
-583

query I rowsort
SELECT DISTINCT + + ( 39 ) * + col0 AS col0 FROM tab1 AS cor0
----
117
2496
3120

query I rowsort
SELECT col2 * - col2 + - col2 + 3 AS col0 FROM tab1 AS cor0
----
-2967
-3303
-9309

query I rowsort
SELECT 49 + - col1 + col0 FROM tab0 AS cor0
----
-13
-13
47

query I rowsort
SELECT - ( col1 ) * col2 + + 22 AS col2 FROM tab1 AS cor0
----
-1226
-1382
-548

query I rowsort
SELECT - ( 1 ) FROM tab1 cor0
----
-1
-1
-1

query I rowsort
SELECT 18 * col2 AS col1 FROM tab2 AS cor0
----
468
486
684

query I rowsort
SELECT DISTINCT - 90 + col1 * - col0 AS col1 FROM tab2 AS cor0
----
-1433
-307
-4692

query I rowsort
SELECT DISTINCT - 41 AS col1 FROM tab1
----
-41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 62 col1 FROM tab0 AS cor0
----
-62
-62
-62

query I rowsort
SELECT DISTINCT + 66 AS col0 FROM tab0 AS cor0
----
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-7808
SELECT + tab1.col1 DIV ( col0 ) AS col0 FROM tab1
----
0
0
8

skipif mysql # not compatible
query I rowsort label-7808
SELECT + tab1.col1 / ( col0 ) AS col0 FROM tab1
----
0
0
8

query I rowsort
SELECT DISTINCT ( 94 * col1 ) FROM tab0
----
8084
8554
9118

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7810
SELECT - CAST( NULL AS SIGNED ) * col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7810
SELECT - CAST ( NULL AS INTEGER ) * col2 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7811
SELECT + col2 DIV + col0 - + col1 FROM tab2
----
-17
-28
-59

skipif mysql # not compatible
query I rowsort label-7811
SELECT + col2 / + col0 - + col1 FROM tab2
----
-17
-28
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 + + ( col1 ) col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT cor0.col1 * + cor0.col1 * cor0.col2 FROM tab2 AS cor0
----
10982
25947
90506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab1.col1 col2 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT DISTINCT + col1 + col1 * - 58 FROM tab0 AS cor0
----
-4902
-5187
-5529

query I rowsort
SELECT + 62 * + col2 FROM tab0 cor0
----
2046
5084
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7817
SELECT - col1 + + CAST( NULL AS DECIMAL ) * ( + col1 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7817
SELECT - col1 + + CAST ( NULL AS REAL ) * ( + col1 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7818
SELECT + - col2 DIV - col0 FROM tab1 cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-7818
SELECT + - col2 / - col0 FROM tab1 cor0
----
0
1
18

query I rowsort
SELECT - col2 + 43 * col2 FROM tab0
----
1386
3444
42

query I rowsort
SELECT ALL col2 + - 25 FROM tab0
----
-24
57
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-7821
SELECT ALL + col0 DIV - col1 + ( col2 ) * - ( - col2 * + tab2.col2 ) FROM tab2
----
17575
19683
54868

skipif mysql # not compatible
query I rowsort label-7821
SELECT ALL + col0 / - col1 + ( col2 ) * - ( - col2 * + tab2.col2 ) FROM tab2
----
17575
19683
54868

query I rowsort
SELECT col1 + 35 AS col1 FROM tab2 AS cor0
----
52
66
94

query I rowsort
SELECT DISTINCT col1 * - ( + col0 + + col0 ) * - ( ( col2 ) ) FROM tab2 AS cor0
----
102068
11718
239304

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + - ( - col1 ) col0 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT 59 + + col0 AS col2 FROM tab1 AS cor0
----
123
139
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-7826
SELECT DISTINCT + + ( 52 ) * col2 * ( col1 ) + col0 DIV col0 AS col2 FROM tab2 AS cor0
----
33593
43525
79769

skipif mysql # not compatible
query I rowsort label-7826
SELECT DISTINCT + + ( 52 ) * col2 * ( col1 ) + col0 / col0 AS col2 FROM tab2 AS cor0
----
33593
43525
79769

query I rowsort
SELECT ALL 54 + cor0.col0 AS col0 FROM tab0 AS cor0
----
143
78
89

query I rowsort
SELECT + cor0.col0 * col1 * - col1 FROM tab2 cor0
----
-22831
-271518
-6727

query I rowsort
SELECT DISTINCT - 53 AS col1 FROM tab0 AS cor0
----
-53

query I rowsort
SELECT DISTINCT + col1 + + col0 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT - - ( - col0 ) * col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + col0 + - ( - col2 ) AS col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT + + 49 + 50 AS col0 FROM tab2 AS cor0
----
99

query I rowsort
SELECT DISTINCT + col1 + + col2 - - col0 AS col1 FROM tab2 cor0
----
134
163
65

query I rowsort
SELECT DISTINCT + tab0.col1 AS col1 FROM tab0, tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT col0 * col1 * col2 + - col1 - - 77 AS col1 FROM tab1 AS cor0
----
36547
4263
99904

query I rowsort
SELECT DISTINCT + 16 + - col0 FROM tab0 AS cor0
----
-19
-73
-8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7838
SELECT DISTINCT - CAST( NULL AS SIGNED ) + + 60 AS col0 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7838
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + + 60 AS col0 FROM tab0 cor0
----
NULL

query I rowsort
SELECT - 53 * col1 + - cor0.col1 FROM tab2 AS cor0
----
-1674
-3186
-918

query I rowsort
SELECT DISTINCT col0 * - col0 - cor0.col0 * - col1 FROM tab1 AS cor0
----
-3456
-5360
69

query I rowsort
SELECT + col2 * cor0.col2 + + ( - cor0.col2 ) FROM tab1 AS cor0
----
2862
3192
9120

query I rowsort
SELECT + 65 + cor0.col0 FROM tab1 cor0
----
129
145
68

query I rowsort
SELECT DISTINCT + col1 + - col2 AS col0 FROM tab0
----
53
9
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 37 + - col0 col2 FROM tab1
----
-27
-43
34

query I rowsort
SELECT 79 * col1 * 82 + 41 AS col2 FROM tab0 AS cor0
----
557149
589539
628407

query I rowsort
SELECT ALL + - 34 * - col0 FROM tab0 AS cor0
----
1190
3026
816

query I rowsort
SELECT + - col0 - col2 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT ALL - 86 * col1 * + col0 AS col2 FROM tab1 AS cor0
----
-55040
-6708
-89440

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7849
SELECT + + col2 * col0 + cor0.col1 * ( col2 * + CAST( NULL AS SIGNED ) ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7849
SELECT + + col2 * col0 + cor0.col1 * ( col2 * + CAST ( NULL AS INTEGER ) ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 * + col2 - + col2 AS col2 FROM tab0 AS cor0
----
34
7216
759

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 21 col0 FROM tab0 AS cor0
----
21
21
21

query I rowsort
SELECT ALL + col2 * 22 - + ( + cor0.col1 * + 39 ) AS col0 FROM tab1 AS cor0
----
1605
174
864

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7853
SELECT ALL - col0 + + CAST( + cor0.col0 AS SIGNED ) * col2 * - ( - col2 * - col2 ) + - col0 AS col2 FROM tab2 AS cor0
----
-1371084
-137795
-4335046

skipif mysql # not compatible
query I rowsort label-7853
SELECT ALL - col0 + + CAST ( + cor0.col0 AS INTEGER ) * col2 * - ( - col2 * - col2 ) + - col0 AS col2 FROM tab2 AS cor0
----
-1371084
-137795
-4335046

query I rowsort
SELECT ALL + col2 + - ( - cor0.col2 ) AS col0 FROM tab2 cor0
----
52
54
76

query I rowsort
SELECT + col1 * - ( - cor0.col2 * - col0 ) + col2 FROM tab1 AS cor0
----
-36423
-4158
-99744

query I rowsort
SELECT + col2 * 94 + + cor0.col0 AS col0 FROM tab2 AS cor0
----
2522
2545
3651

onlyif mysql # use DIV operator for integer division
query I rowsort label-7857
SELECT DISTINCT + col0 DIV col0 + + col0 + + col1 FROM tab1 AS cor0
----
30
75
94

skipif mysql # not compatible
query I rowsort label-7857
SELECT DISTINCT + col0 / col0 + + col0 + + col1 FROM tab1 AS cor0
----
30
75
94

query I rowsort
SELECT DISTINCT - + cor0.col0 + + ( cor0.col1 ) FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT ALL col2 * col0 * - col1 - 15 AS col1 FROM tab1
----
-36495
-4227
-99855

query I rowsort
SELECT ALL + col2 + 83 AS col2 FROM tab1 AS cor0
----
137
140
179

query I rowsort
SELECT ALL 49 - + cor0.col1 * col0 FROM tab1 AS cor0
----
-29
-591
-991

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7862
SELECT DISTINCT - - CAST( NULL AS SIGNED ) + col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7862
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) + col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + col1 + - col2 * + col1 FROM tab1 cor0
----
-1235
-1378
-560

onlyif mysql # use DIV operator for integer division
query I rowsort label-7864
SELECT DISTINCT - 47 + col2 DIV col2 FROM tab0 cor0
----
-46

skipif mysql # not compatible
query I rowsort label-7864
SELECT DISTINCT - 47 + col2 / col2 FROM tab0 cor0
----
-46

query I rowsort
SELECT DISTINCT - - 20 AS col1 FROM tab1 AS cor0
----
20

query I rowsort
SELECT DISTINCT col2 * 4 FROM tab1 AS cor0
----
216
228
384

query I rowsort
SELECT 11 + 12 FROM tab0 AS cor0
----
23
23
23

query I rowsort
SELECT ALL + 97 * cor0.col0 FROM tab2 AS cor0
----
679
7566
7663

query I rowsort
SELECT DISTINCT - 15 AS col0 FROM tab0 cor0
----
-15

query I rowsort
SELECT DISTINCT + + col2 * - 85 - - col1 AS col1 FROM tab1 AS cor0
----
-4564
-4835
-8147

query I rowsort
SELECT ALL + 13 * - 23 + cor0.col0 FROM tab1 AS cor0
----
-219
-235
-296

query I rowsort
SELECT DISTINCT - col1 * - ( col2 + + col0 ) FROM tab1 AS cor0
----
1210
1482
2288

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7873
SELECT DISTINCT - CAST( + 56 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-56

skipif mysql # not compatible
query I rowsort label-7873
SELECT DISTINCT - CAST ( + 56 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 40 col2 FROM tab0 AS cor0
----
40

query I rowsort
SELECT ALL + - 47 * col1 AS col1 FROM tab2 AS cor0
----
-1457
-2773
-799

query I rowsort
SELECT - + col1 + col2 AS col0 FROM tab1 cor0
----
28
47
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-7877
SELECT DISTINCT - col1 DIV col0 + - CAST( - 40 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
36
40

skipif mysql # not compatible
query I rowsort label-7877
SELECT DISTINCT - col1 / col0 + - CAST ( - 40 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
36
40

query I rowsort
SELECT ALL + + col1 + + col0 * + 42 AS col0 FROM tab1 AS cor0
----
152
2698
3373

query I rowsort
SELECT ALL + ( - col1 ) + - ( 73 * col2 + + col0 * col1 ) FROM tab0 AS cor0
----
-14176
-3565
-4559

query I rowsort
SELECT ALL - - cor1.col0 * + 46 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 599c879a703b68c00457e69817d9ad45

onlyif mysql # use DIV operator for integer division
query I rowsort label-7881
SELECT + 32 DIV + tab2.col0 AS col0 FROM tab2
----
0
0
4

skipif mysql # not compatible
query I rowsort label-7881
SELECT + 32 / + tab2.col0 AS col0 FROM tab2
----
0
0
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-7882
SELECT + col1 DIV 45 AS col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7882
SELECT + col1 / 45 AS col2 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL - + col0 * 2 FROM tab0 AS cor0
----
-178
-48
-70

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0, tab2 AS cor1, tab2, tab2 AS cor2
----
3645 values hashing to 7e572cf6967c395d92dce41dcb35c4db

onlyif mysql # use DIV operator for integer division
query I rowsort label-7885
SELECT - + cor0.col1 DIV col1 + col1 FROM tab0 AS cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-7885
SELECT - + cor0.col1 / col1 + col1 FROM tab0 AS cor0
----
85
90
96

query I rowsort
SELECT + - 15 FROM tab1, tab0 AS cor0, tab2 cor1, tab2, tab0 AS cor2
----
243 values hashing to 493d0614a60e9819b5547eae2efb074c

query I rowsort
SELECT DISTINCT col1 + + 80 FROM tab2 AS cor0
----
111
139
97

query I rowsort
SELECT - cor0.col0 + + col2 * + 12 FROM tab0 AS cor0
----
-23
372
895

query I rowsort
SELECT ALL - col2 + + ( col1 ) FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT ALL col2 * + col0 + ( 97 ) FROM tab0
----
132
7395
889

query I rowsort
SELECT ( 91 ) FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

query I rowsort
SELECT DISTINCT - cor1.col0 + 60 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
-20
-4
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col2 * - col0 col1 FROM tab0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-7894
SELECT + tab1.col2 DIV + ( col1 ) + col2 AS col0 FROM tab1
----
103
56
62

skipif mysql # not compatible
query I rowsort label-7894
SELECT + tab1.col2 / + ( col1 ) + col2 AS col0 FROM tab1
----
103
56
62

query I rowsort
SELECT - 3 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 95b6b9b4aae5cc2d9545db9f8940b2dc

query I rowsort
SELECT ALL - - col0 * + 62 + - 71 + - col0 AS col0 FROM tab0 AS cor0
----
1393
2064
5358

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 8 col0 FROM tab1, tab1 cor0
----
9 values hashing to ffc5b4c98b57ae546521175995c49c57

onlyif mysql # use DIV operator for integer division
query I rowsort label-7898
SELECT + + col1 DIV 55 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7898
SELECT + + col1 / 55 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - cor0.col0 * col2 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT col2 * ( - 9 ) AS col0 FROM tab1
----
-486
-513
-864

query I rowsort
SELECT 81 * col0 + col1 FROM tab2
----
598
6377
6416

query I rowsort
SELECT - ( 76 ) * col2 * 59 FROM tab2 AS cor0
----
-116584
-121068
-170392

query I rowsort
SELECT ALL cor1.col1 AS col2 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + col0 + col0 * - 71 + cor0.col2 col2 FROM tab0 AS cor0
----
1862
393
911

query I rowsort
SELECT DISTINCT + - col0 + 25 FROM tab2 AS cor0
----
-53
-54
18

query I rowsort
SELECT ALL - + 82 + - col0 AS col0 FROM tab2 AS cor0
----
-160
-161
-89

query I rowsort
SELECT 16 * tab2.col0 + - col1 FROM tab2
----
1189
1247
81

query I rowsort
SELECT + tab1.col0 + + tab1.col1 + - ( + ( col2 ) ) AS col2 FROM tab1
----
-25
-3
17

query I rowsort
SELECT - col2 * col1 + 32 * col0 FROM tab1
----
-1308
1312
1478

query I rowsort
SELECT DISTINCT + 78 + - col0 AS col0 FROM tab0
----
-11
43
54

query I rowsort
SELECT ALL - col2 + tab1.col0 FROM tab1
----
-16
-51
7

query I rowsort
SELECT - 15 * + col2 FROM tab2
----
-390
-405
-570

query I rowsort
SELECT + 59 + col1 AS col0 FROM tab0
----
145
150
156

query I rowsort
SELECT DISTINCT 40 * col1 + + col1 * - ( + col0 ) FROM tab0
----
-4459
1376
485

query I rowsort
SELECT - 80 AS col0 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 26dbcc98d4b4e864ffa31be685a5dfbd

query I rowsort
SELECT DISTINCT - tab0.col0 + + col1 AS col0 FROM tab0
----
2
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-7917
SELECT ALL + col0 + + col2 DIV col1 AS col1 FROM tab2 AS cor0
----
7
78
81

skipif mysql # not compatible
query I rowsort label-7917
SELECT ALL + col0 + + col2 / col1 AS col1 FROM tab2 AS cor0
----
7
78
81

query I rowsort
SELECT DISTINCT - + 94 FROM tab0 AS cor0
----
-94

onlyif mysql # use DIV operator for integer division
query I rowsort label-7919
SELECT + 42 DIV col1 + col2 FROM tab2 AS cor0
----
26
28
40

skipif mysql # not compatible
query I rowsort label-7919
SELECT + 42 / col1 + col2 FROM tab2 AS cor0
----
26
28
40

query I rowsort
SELECT ALL + 35 * + col1 FROM tab2
----
1085
2065
595

onlyif mysql # use DIV operator for integer division
query I rowsort label-7921
SELECT DISTINCT col0 * - col1 + - 68 + 11 DIV col2 FROM tab1 AS cor0
----
-1108
-146
-708

skipif mysql # not compatible
query I rowsort label-7921
SELECT DISTINCT col0 * - col1 + - 68 + 11 / col2 FROM tab1 AS cor0
----
-1108
-146
-708

query I rowsort
SELECT DISTINCT cor0.col2 * 22 * + 64 FROM tab2 AS cor0
----
36608
38016
53504

onlyif mysql # use DIV operator for integer division
query I rowsort label-7923
SELECT DISTINCT + + col2 DIV col0 AS col1 FROM tab2 AS cor0
----
0
3

skipif mysql # not compatible
query I rowsort label-7923
SELECT DISTINCT + + col2 / col0 AS col1 FROM tab2 AS cor0
----
0
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-7924
SELECT ALL + col1 + + ( + 9 ) DIV - col0 FROM tab1 AS cor0
----
10
13
23

skipif mysql # not compatible
query I rowsort label-7924
SELECT ALL + col1 + + ( + 9 ) / - col0 FROM tab1 AS cor0
----
10
13
23

query I rowsort
SELECT ALL + - col1 * + ( - col0 ) + - cor0.col0 AS col2 FROM tab0 AS cor0
----
2040
3360
8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + - col1 * ( col1 * col1 ) col0 FROM tab2 AS cor0
----
-205353
-29764
-4875

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 * col1 + - col0 col1 FROM tab2 AS cor0
----
-1612
-725
-844

query I rowsort
SELECT - col0 * + cor0.col2 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-7929
SELECT - col1 * 83 DIV col0 FROM tab0 AS cor0
----
-230
-297
-84

skipif mysql # not compatible
query I rowsort label-7929
SELECT - col1 * 83 / col0 FROM tab0 AS cor0
----
-230
-297
-84

query I rowsort
SELECT DISTINCT col2 * + 99 AS col1 FROM tab1 AS cor0
----
5346
5643
9504

query I rowsort
SELECT ALL - cor0.col2 + 84 * 28 + + col1 FROM tab1 cor0
----
2269
2305
2324

query I rowsort
SELECT cor0.col1 * ( 47 ) + - col2 FROM tab2 AS cor0
----
1430
2747
761

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 + ( col1 ) * + col1 col0 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT + + col1 * - 52 AS col0 FROM tab1 cor0
----
-1352
-520
-676

query I rowsort
SELECT DISTINCT + col2 + col1 * 45 * + 51 AS col2 FROM tab0
----
197403
208927
222616

query I rowsort
SELECT + + col1 + col1 * - col1 FROM tab2 AS cor0
----
-272
-3422
-930

query I rowsort
SELECT DISTINCT cor1.col0 FROM tab2, tab2 AS cor0, tab2 AS cor1, tab1 AS cor2
----
7
78
79

query I rowsort
SELECT + cor0.col1 * + col2 + - col0 FROM tab1 AS cor0
----
1168
1401
506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * cor0.col1 + - col1 col2 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT - 53 FROM tab1, tab0 AS cor0, tab1 cor1
----
27 values hashing to 2876418587c77a182d88db2907b0a51a

query I rowsort
SELECT col2 + col2 + ( - col1 * col0 ) FROM tab0 AS cor0
----
-1998
-3393
-7935

query I rowsort
SELECT - 85 FROM tab0, tab1 AS cor0, tab0 cor1
----
27 values hashing to 91e44ead5e72fa22f87a57243e232ede

query I rowsort
SELECT ALL col1 + 70 AS col2 FROM tab1 AS cor0
----
80
83
96

query I rowsort
SELECT DISTINCT - col0 + col2 * + col1 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT ALL + col1 + col1 + 18 AS col1 FROM tab0 AS cor0
----
190
200
212

query I rowsort
SELECT ALL + col0 * ( - cor0.col2 ) * col1 - col2 AS col1 FROM tab0 cor0
----
-3396
-664200
-68145

query I rowsort
SELECT DISTINCT + ( col0 ) + col2 FROM tab0
----
171
36
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7948
SELECT col1 + - col1 * CAST( - col2 AS SIGNED ) AS col1 FROM tab0
----
194
2924
7553

skipif mysql # not compatible
query I rowsort label-7948
SELECT col1 + - col1 * CAST ( - col2 AS INTEGER ) AS col1 FROM tab0
----
194
2924
7553

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7949
SELECT + col2 * - cor0.col1 + cor0.col2 + + CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7949
SELECT + col2 * - cor0.col1 + cor0.col2 + + CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 * 45 + - col2 + + col2 FROM tab0 AS cor0
----
3870
4095
4365

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * + 23 + col1 * col2 + - col1 col0 FROM tab1
----
1534
1976
790

query I rowsort
SELECT - ( 6 ) + - col1 + + col2 FROM tab0 AS cor0
----
-102
-15
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-7953
SELECT - col2 DIV + 37 FROM tab2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7953
SELECT - col2 / + 37 FROM tab2
----
-1
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7954
SELECT DISTINCT col0 + CAST( NULL AS SIGNED ) / col2 AS col2 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-7954
SELECT DISTINCT col0 + CAST ( NULL AS INTEGER ) / col2 AS col2 FROM tab0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7955
SELECT ALL + CAST( NULL AS SIGNED ) * col0 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7955
SELECT ALL + CAST ( NULL AS INTEGER ) * col0 AS col2 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7956
SELECT - CAST( NULL AS SIGNED ) + col2 AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7956
SELECT - CAST ( NULL AS INTEGER ) + col2 AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + 23 + col0 FROM tab0 AS cor0
----
112
47
58

query I rowsort
SELECT + 23 * + col0 AS col0 FROM tab2
----
161
1794
1817

query I rowsort
SELECT + + ( + col0 ) + col1 AS col1 FROM tab1 cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-7960
SELECT + col1 * col2 DIV col0 AS col2 FROM tab0 AS cor0
----
118
2
83

skipif mysql # not compatible
query I rowsort label-7960
SELECT + col1 * col2 / col0 AS col2 FROM tab0 AS cor0
----
118
2
83

query I rowsort
SELECT DISTINCT - 10 AS col1 FROM tab1
----
-10

query I rowsort
SELECT ALL - 84 * col0 - + col0 AS col2 FROM tab0
----
-2040
-2975
-7565

query I rowsort
SELECT + - col2 + - col2 * - col1 AS col2 FROM tab2 cor0
----
1508
608
810

query I rowsort
SELECT DISTINCT - col2 * + col0 AS col2 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL - col2 + + col1 + col1 AS col0 FROM tab2 AS cor0
----
-4
35
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-7966
SELECT ALL - 48 DIV + col2 col2 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7966
SELECT ALL - 48 / + col2 col2 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL + 48 - col0 AS col1 FROM tab1
----
-16
-32
45

query I rowsort
SELECT ALL - col2 - - 19 * + col0 AS col1 FROM tab0
----
1609
423
664

onlyif mysql # use DIV operator for integer division
query I rowsort label-7969
SELECT + 61 DIV + col1 AS col2 FROM tab2 cor0
----
1
1
3

skipif mysql # not compatible
query I rowsort label-7969
SELECT + 61 / + col1 AS col2 FROM tab2 cor0
----
1
1
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-7970
SELECT + 21 + + col1 DIV + col1 AS col0 FROM tab2 AS cor0
----
22
22
22

skipif mysql # not compatible
query I rowsort label-7970
SELECT + 21 + + col1 / + col1 AS col0 FROM tab2 AS cor0
----
22
22
22

query I rowsort
SELECT 4 * col0 + + ( - 54 ) * col1 FROM tab2 AS cor0
----
-1646
-2874
-602

query I rowsort
SELECT DISTINCT + 53 + col2 AS col2 FROM tab0 AS cor0
----
135
54
86

query I rowsort
SELECT ALL + 56 + + col1 AS col1 FROM tab2 cor0
----
115
73
87

query I rowsort
SELECT + col0 + - col1 * 9 AS col1 FROM tab1 AS cor0
----
-231
-26
-37

query I rowsort
SELECT DISTINCT - 57 * + col2 FROM tab2 AS cor0
----
-1482
-1539
-2166

onlyif mysql # use DIV operator for integer division
query I rowsort label-7976
SELECT + col2 DIV col1 + - 32 * + col0 AS col0 FROM tab1 AS cor0
----
-2043
-2553
-94

skipif mysql # not compatible
query I rowsort label-7976
SELECT + col2 / col1 + - 32 * + col0 AS col0 FROM tab1 AS cor0
----
-2043
-2553
-94

onlyif mysql # use DIV operator for integer division
query I rowsort label-7977
SELECT + ( cor0.col0 ) * col0 + - 32 DIV - cor0.col0 FROM tab1 AS cor0
----
19
4096
6400

skipif mysql # not compatible
query I rowsort label-7977
SELECT + ( cor0.col0 ) * col0 + - 32 / - cor0.col0 FROM tab1 AS cor0
----
19
4096
6400

query I rowsort
SELECT ALL - ( - col2 ) + - 70 AS col2 FROM tab1 AS cor0
----
-13
-16
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-7979
SELECT cor0.col2 DIV - col1 + col1 * col1 AS col1 FROM tab2 AS cor0
----
287
3481
961

skipif mysql # not compatible
query I rowsort label-7979
SELECT cor0.col2 / - col1 + col1 * col1 AS col1 FROM tab2 AS cor0
----
287
3481
961

query I rowsort
SELECT ALL + - col1 + col0 * 63 * + 24 AS col2 FROM tab2 AS cor0
----
10553
117877
119431

query I rowsort
SELECT 57 * tab2.col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 4c6548c0f5af5408e3f2bca06071606c

query I rowsort
SELECT cor0.col2 AS col2 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT + + col0 * 13 FROM tab2 AS cor0
----
1014
1027
91

query I rowsort
SELECT + 25 * + cor0.col1 + - col2 FROM tab0 AS cor0
----
2117
2193
2424

query I rowsort
SELECT DISTINCT - col2 + - col2 + col2 AS col2 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col1 * col2 AS col0 FROM tab0 cor0
----
194
2924
7553

query I rowsort
SELECT ALL + col1 * + col2 - col1 FROM tab1 AS cor0
----
1235
1378
560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7988
SELECT col2 + CAST( - 24 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
30
33
72

skipif mysql # not compatible
query I rowsort label-7988
SELECT col2 + CAST ( - 24 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
30
33
72

query I rowsort
SELECT DISTINCT ( col1 + 65 ) * col1 AS col1 FROM tab1
----
1014
2366
750

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7990
SELECT ALL + tab0.col2 * - col0 / - CAST( NULL AS SIGNED ) AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7990
SELECT ALL + tab0.col2 * - col0 / - CAST ( NULL AS INTEGER ) AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT tab1.col0 + tab1.col0 FROM tab1
----
128
160
6

query I rowsort
SELECT ALL + 10 FROM tab1
----
10
10
10

query I rowsort
SELECT ALL - 10 FROM tab2
----
-10
-10
-10

query I rowsort
SELECT + + col2 + 83 FROM tab0 AS cor0
----
116
165
84

query I rowsort
SELECT ALL + col2 + 40 * col2 AS col1 FROM tab0 AS cor0
----
1353
3362
41

onlyif mysql # use DIV operator for integer division
query I rowsort label-7996
SELECT + col0 DIV - 88 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7996
SELECT + col0 / - 88 FROM tab0 AS cor0
----
-1
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7997
SELECT ALL + col1 * + CAST( NULL AS SIGNED ) + + 8 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7997
SELECT ALL + col1 * + CAST ( NULL AS INTEGER ) + + 8 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col0 * 33 * tab0.col1 AS col1 FROM tab0
----
112035
267267
68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-7999
SELECT + - col2 DIV cor0.col0 FROM tab1 cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-7999
SELECT + - col2 / cor0.col0 FROM tab1 cor0
----
-1
-18
0

query I rowsort
SELECT ALL - col2 * col2 + 55 FROM tab0 AS cor0
----
-1034
-6669
54

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8001
SELECT ALL + col1 * CAST( NULL AS DECIMAL ) + - col0 col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8001
SELECT ALL + col1 * CAST ( NULL AS REAL ) + - col0 col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col2 + + ( - col0 ) * - col1 AS col0 FROM tab2 cor0
----
1381
244
4628

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 52 col1 FROM tab2 AS cor0
----
-52

query I rowsort
SELECT col1 * - tab1.col0 + col1 FROM tab1
----
-1027
-52
-630

query I rowsort
SELECT ALL 33 * + col2 AS col2 FROM tab1 AS cor0
----
1782
1881
3168

query I rowsort
SELECT ALL - + col1 + col0 * + col0 FROM tab2 AS cor0
----
18
6025
6224

onlyif mysql # use DIV operator for integer division
query I rowsort label-8007
SELECT DISTINCT - col1 DIV + 12 FROM tab2 AS cor0
----
-1
-2
-4

skipif mysql # not compatible
query I rowsort label-8007
SELECT DISTINCT - col1 / + 12 FROM tab2 AS cor0
----
-1
-2
-4

query I rowsort
SELECT DISTINCT - 88 + col0 AS col0 FROM tab2 cor0
----
-10
-81
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - ( cor0.col1 ) col2 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT 8 * - col1 AS col1 FROM tab2 AS cor0
----
-136
-248
-472

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8011
SELECT - + CAST( NULL AS SIGNED ) + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8011
SELECT - + CAST ( NULL AS INTEGER ) + col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 56 + ( + col1 ) AS col2 FROM tab2 AS cor0
----
115
73
87

query I rowsort
SELECT DISTINCT + ( + col0 ) * + col2 - - 93 * 36 FROM tab0 AS cor0
----
10646
3383
4140

query I rowsort
SELECT DISTINCT - + 13 + + 84 * - cor0.col0 FROM tab1 AS cor0
----
-265
-5389
-6733

query I rowsort
SELECT + 38 + col1 AS col2 FROM tab2 AS cor0
----
55
69
97

query I rowsort
SELECT DISTINCT - 8 * 82 - col0 AS col1 FROM tab2 AS cor0
----
-663
-734
-735

query I rowsort
SELECT + 70 * - 60 + col2 AS col2 FROM tab1 AS cor0
----
-4104
-4143
-4146

onlyif mysql # use DIV operator for integer division
query I rowsort label-8018
SELECT ALL - + CAST( col0 AS SIGNED ) DIV - col0 + + col2 * col1 FROM tab2 AS cor0
----
1535
647
838

skipif mysql # not compatible
query I rowsort label-8018
SELECT ALL - + CAST ( col0 AS INTEGER ) / - col0 + + col2 * col1 FROM tab2 AS cor0
----
1535
647
838

query I rowsort
SELECT DISTINCT - + col2 * + ( - col1 ) - - col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT ALL + 82 * + col1 FROM tab0 AS cor0
----
7052
7462
7954

onlyif mysql # use DIV operator for integer division
query I rowsort label-8021
SELECT ALL - + 59 DIV col1 + + ( - 21 * + col1 ) + col2 AS col1 FROM tab2 AS cor0
----
-1214
-322
-625

skipif mysql # not compatible
query I rowsort label-8021
SELECT ALL - + 59 / col1 + + ( - 21 * + col1 ) + col2 AS col1 FROM tab2 AS cor0
----
-1214
-322
-625

query I rowsort
SELECT + col2 + col2 * + col0 + - 94 FROM tab2 AS cor0
----
122
1960
2946

query I rowsort
SELECT DISTINCT + 28 * - col2 * - col0 AS col1 FROM tab1 AS cor0
----
102144
215040
4536

query I rowsort
SELECT DISTINCT - 79 + col0 * - 39 + col2 FROM tab0 AS cor0
----
-1443
-3468
-982

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + + col1 * + col2 col1 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT DISTINCT 53 + col1 AS col2 FROM tab0 AS cor0
----
139
144
150

query I rowsort
SELECT tab0.col0 + + 29 AS col0 FROM tab0
----
118
53
64

query I rowsort
SELECT + 26 * col0 + col2 FROM tab0 AS cor0
----
2396
657
911

query I rowsort
SELECT - - ( - col2 ) + cor0.col1 FROM tab0 AS cor0
----
53
9
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-8030
SELECT DISTINCT - 50 + col0 DIV col0 AS col2 FROM tab1 AS cor0
----
-49

skipif mysql # not compatible
query I rowsort label-8030
SELECT DISTINCT - 50 + col0 / col0 AS col2 FROM tab1 AS cor0
----
-49

query I rowsort
SELECT col0 * col1 - col0 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT + + col0 + col1 + + col0 FROM tab2 AS cor0
----
175
215
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-8033
SELECT + col2 DIV + col1 + + col0 + col1 FROM tab2 AS cor0
----
137
38
98

skipif mysql # not compatible
query I rowsort label-8033
SELECT + col2 / + col1 + + col0 + col1 FROM tab2 AS cor0
----
137
38
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-8034
SELECT col1 * 64 + col0 DIV - col2 FROM tab0 AS cor0
----
5504
5823
6173

skipif mysql # not compatible
query I rowsort label-8034
SELECT col1 * 64 + col0 / - col2 FROM tab0 AS cor0
----
5504
5823
6173

query I rowsort
SELECT - ( col2 ) + + col0 + col1 AS col1 FROM tab1 cor0
----
-25
-3
17

query I rowsort
SELECT + + col0 * col0 + - col1 + - col1 FROM tab1 cor0
----
-43
4076
6374

query I rowsort
SELECT - ( tab1.col2 ) AS col2 FROM tab1, tab2 cor0
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

onlyif mysql # use DIV operator for integer division
query I rowsort label-8038
SELECT DISTINCT col2 DIV ( 86 + - col0 ) AS col2 FROM tab0
----
-27
0

skipif mysql # not compatible
query I rowsort label-8038
SELECT DISTINCT col2 / ( 86 + - col0 ) AS col2 FROM tab0
----
-27
0

query I rowsort
SELECT DISTINCT + 15 * col1 AS col2 FROM tab0
----
1290
1365
1455

onlyif mysql # use DIV operator for integer division
query I rowsort label-8040
SELECT + CAST( col1 AS SIGNED ) DIV col0 col0 FROM tab1
----
0
0
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8040
SELECT + CAST ( col1 AS INTEGER ) / col0 col0 FROM tab1
----
0
0
8

query I rowsort
SELECT DISTINCT tab2.col2 + col2 + col0 AS col1 FROM tab2
----
130
155
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col1 + col1 col0 FROM tab1
----
106
55
84

query I rowsort
SELECT ( tab1.col0 ) * col1 AS col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT col2 * col1 * - col0 AS col1 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT col2 * col2 + + col1 AS col2 FROM tab0
----
1175
6815
98

query I rowsort
SELECT ALL 50 * - col2 FROM tab0 AS cor0
----
-1650
-4100
-50

onlyif mysql # use DIV operator for integer division
query I rowsort label-8047
SELECT ALL + cor0.col2 DIV col2 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-8047
SELECT ALL + cor0.col2 / col2 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT ALL - col1 + - col1 * col0 * col0 AS col0 FROM tab1 AS cor0
----
-260
-40970
-83213

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8049
SELECT ALL + CAST( + col1 AS SIGNED ) * col1 AS col2 FROM tab2 AS cor0
----
289
3481
961

skipif mysql # not compatible
query I rowsort label-8049
SELECT ALL + CAST ( + col1 AS INTEGER ) * col1 AS col2 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT DISTINCT + col2 * + 98 FROM tab0
----
3234
8036
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-8051
SELECT ALL col2 DIV + 35 FROM tab0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-8051
SELECT ALL col2 / + 35 FROM tab0
----
0
0
2

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab1 cor1
----
-26
-27
-38

query I rowsort
SELECT cor0.col1 * + 9 * col0 + + col2 FROM tab1 AS cor0
----
5817
756
9456

query I rowsort
SELECT + col1 + - 39 AS col0 FROM tab1 AS cor0
----
-13
-26
-29

query I rowsort
SELECT DISTINCT 38 + col2 FROM tab2
----
64
65
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 92 * 77 * - col0 col0 FROM tab1 AS cor0
----
21252
453376
566720

onlyif mysql # use DIV operator for integer division
query I rowsort label-8057
SELECT - 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-8057
SELECT - col1 / col0 col2 FROM tab0 AS cor0
----
-1
-2
-3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8058
SELECT ALL ( - col2 ) + col2 * + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8058
SELECT ALL ( - col2 ) + col2 * + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * + cor0.col1 + col1 * - cor0.col0 * + col2 AS col2 FROM tab0 AS cor0
----
-12804
-672399
-75508

query I rowsort
SELECT DISTINCT + col1 + + 1 * col2 AS col0 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT col0 + col1 * col1 AS col1 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT 52 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 76100d10f51995d20efdeb657e444d3c

onlyif mysql # use DIV operator for integer division
query I rowsort label-8063
SELECT DISTINCT + - cor0.col1 DIV col1 col0 FROM tab0 AS cor0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8063
SELECT DISTINCT + - cor0.col1 / col1 col0 FROM tab0 AS cor0
----
-1

query I rowsort
SELECT col0 + - col1 * col0 * - col2 AS col2 FROM tab2 AS cor0
----
119730
51113
5866

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( 37 AS REAL ) FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to c023509f63faa044d654943e6df55ca2

query I rowsort
SELECT ALL 29 * col1 FROM tab2
----
1711
493
899

query I rowsort
SELECT DISTINCT + 43 AS col1 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
43

onlyif mysql # use DIV operator for integer division
query I rowsort label-8068
SELECT - tab0.col1 * col0 DIV - col2 col2 FROM tab0
----
3395
62
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8068
SELECT - tab0.col1 * col0 / - col2 col2 FROM tab0
----
3395
62
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + ( col2 * col2 ) col1 FROM tab0 AS cor0
----
-1
-35937
-551368

query IIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0 WHERE NOT NULL < NULL
----

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8071
SELECT ALL + col0 - + CAST( + col0 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8071
SELECT ALL + col0 - + CAST ( + col0 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + cor0.col0 + 41 FROM tab0 AS cor0
----
130
65
76

query I rowsort
SELECT DISTINCT + - col0 * col1 + col2 * col1 FROM tab2 AS cor0
----
-3068
-697
620

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 + col0 col0 FROM tab0 cor0
----
-9
34
7

query I rowsort
SELECT ALL + col0 * + col2 AS col1 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( 75 * - tab2.col1 ) col1 FROM tab2, tab0 AS cor0
----
-1275
-2325
-4425

query I rowsort
SELECT ALL 14 + - col1 FROM tab2 AS cor0
----
-17
-3
-45

query I rowsort
SELECT ( 95 ) * - col0 + col2 FROM tab1 cor0
----
-231
-6023
-7504

query I rowsort
SELECT DISTINCT - - col0 + + col1 * col2 FROM tab2 cor0
----
1612
725
844

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( 58 ) - cor0.col1 col1 FROM tab0 AS cor0
----
-28
-33
-39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col1 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT col0 * - col0 + + 5 * + col2 + col0 FROM tab1
----
-3747
-5840
264

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8083
SELECT DISTINCT col2 + - CAST( + 70 AS SIGNED ) * col1 col2 FROM tab0
----
-5987
-6288
-6789

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8083
SELECT DISTINCT col2 + - CAST ( + 70 AS INTEGER ) * col1 col2 FROM tab0
----
-5987
-6288
-6789

query I rowsort
SELECT ALL col0 + - col2 * 14 FROM tab2
----
-286
-371
-453

query I rowsort
SELECT DISTINCT + col1 + col0 + + col2 FROM tab0
----
133
143
262

query I rowsort
SELECT DISTINCT col2 * - tab0.col0 + col0 AS col0 FROM tab0
----
-7209
-768
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8087
SELECT tab2.col1 DIV - CAST( + ( col0 ) + 65 * - col1 AS SIGNED ) AS col1 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8087
SELECT tab2.col1 / - CAST ( + ( col0 ) + 65 * - col1 AS INTEGER ) AS col1 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL tab2.col2 * + col2 * col0 FROM tab2
----
114076
5103
52728

query I rowsort
SELECT ALL - col2 + + cor0.col2 * + cor0.col2 FROM tab2 AS cor0
----
1406
650
702

query I rowsort
SELECT - 27 * col2 * 46 AS col0 FROM tab0 AS cor0
----
-101844
-1242
-40986

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8091
SELECT CAST( NULL AS SIGNED ) + - 83 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8091
SELECT CAST ( NULL AS INTEGER ) + - 83 AS col1 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT + 86 * 82 AS col1 FROM tab0
----
7052
7052
7052

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 70 + col2 * - col2 col2 FROM tab1
----
-2846
-3179
-9146

query I rowsort
SELECT tab1.col0 - + tab1.col1 FROM tab1
----
-23
54
67

query I rowsort
SELECT ALL col0 + + col1 + col0 * col0 FROM tab1
----
38
4170
6493

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 22 + col0 * + col0 col1 FROM tab2
----
6106
6263
71

query I rowsort
SELECT DISTINCT - col1 * + 20 * - col0 + col2 AS col1 FROM tab2
----
26898
4367
92066

query I rowsort
SELECT 89 * + col2 + - 51 FROM tab1
----
4755
5022
8493

onlyif mysql # use DIV operator for integer division
query I rowsort label-8099
SELECT + col1 DIV - col2 + 12 AS col2 FROM tab1
----
12
12
12

skipif mysql # not compatible
query I rowsort label-8099
SELECT + col1 / - col2 + 12 AS col2 FROM tab1
----
12
12
12

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8100
SELECT ALL - - col2 + col1 * CAST( + col1 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
157
265
730

skipif mysql # not compatible
query I rowsort label-8100
SELECT ALL - - col2 + col1 * CAST ( + col1 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT - + ( + col1 ) * + col1 * - col0 AS col2 FROM tab2 cor0
----
22831
271518
6727

query I rowsort
SELECT ALL + 95 FROM tab1 cor0
----
95
95
95

query I rowsort
SELECT 99 * col1 AS col1 FROM tab1 AS cor0
----
1287
2574
990

query I rowsort
SELECT ALL - col2 * col1 * ( col2 ) + col2 AS col0 FROM tab1 AS cor0
----
-119712
-32433
-75762

onlyif mysql # use DIV operator for integer division
query I rowsort label-8105
SELECT - cor0.col0 DIV + col1 FROM tab1 AS cor0
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-8105
SELECT - cor0.col0 / + col1 FROM tab1 AS cor0
----
-6
-6
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8106
SELECT - col2 DIV + col1 col0 FROM tab1 AS cor0
----
-2
-5
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8106
SELECT - col2 / + col1 col0 FROM tab1 AS cor0
----
-2
-5
-7

query I rowsort
SELECT 91 * col2 * 85 AS col2 FROM tab1 AS cor0
----
417690
440895
742560

query I rowsort
SELECT - 4 * + col0 + + col0 AS col0 FROM tab0 AS cor0
----
-105
-267
-72

query I rowsort
SELECT + - 27 + col1 * 30 FROM tab0 AS cor0
----
2553
2703
2883

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8110
SELECT ALL 14 * col2 + col2 * CAST( + tab0.col1 * tab0.col1 AS SIGNED ) FROM tab0
----
244530
680190
9423

skipif mysql # not compatible
query I rowsort label-8110
SELECT ALL 14 * col2 + col2 * CAST ( + tab0.col1 * tab0.col1 AS INTEGER ) FROM tab0
----
244530
680190
9423

onlyif mysql # use DIV operator for integer division
query I rowsort label-8111
SELECT DISTINCT col2 + - cor0.col0 DIV col2 AS col2 FROM tab0 cor0
----
-34
33
81

skipif mysql # not compatible
query I rowsort label-8111
SELECT DISTINCT col2 + - cor0.col0 / col2 AS col2 FROM tab0 cor0
----
-34
33
81

query I rowsort
SELECT ALL ( - col2 ) * + col2 AS col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT - 11 * + col0 * cor0.col0 FROM tab0 AS cor0
----
-13475
-6336
-87131

query I rowsort
SELECT ALL + 18 + + col1 AS col2 FROM tab1 AS cor0
----
28
31
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col0 + col0 * - col1 col0 FROM tab0
----
-2040
-3360
-8010

query I rowsort
SELECT DISTINCT + col1 + - ( + tab2.col1 ) AS col1 FROM tab2
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8117
SELECT - col2 * col2 * col0 + + CAST( + 39 AS SIGNED ) FROM tab2
----
-114037
-5064
-52689

skipif mysql # not compatible
query I rowsort label-8117
SELECT - col2 * col2 * col0 + + CAST ( + 39 AS INTEGER ) FROM tab2
----
-114037
-5064
-52689

query I rowsort
SELECT + tab1.col2 * tab1.col2 AS col0 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT DISTINCT col1 + col1 * - col0 FROM tab2
----
-1326
-186
-4543

query I rowsort
SELECT DISTINCT + 28 * + col1 + col1 * col2 * - 97 + col2 FROM tab0
----
-272845
-6692
-721184

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 96 + col2 col2 FROM tab0
----
129
178
97

query I rowsort
SELECT col0 * + 70 AS col1 FROM tab1
----
210
4480
5600

query I rowsort
SELECT ALL col1 * + 90 + col0 AS col2 FROM tab1
----
1250
2343
964

onlyif mysql # use DIV operator for integer division
query I rowsort label-8124
SELECT + col1 * cor0.col1 DIV cor0.col1 FROM tab1 cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-8124
SELECT + col1 * cor0.col1 / cor0.col1 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT ALL - + 35 + + col2 * - cor0.col0 AS col2 FROM tab1 AS cor0
----
-197
-3683
-7715

query I rowsort
SELECT DISTINCT + - cor0.col1 * - col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT + + 74 * col2 AS col1 FROM tab1 AS cor0
----
3996
4218
7104

onlyif mysql # use DIV operator for integer division
query I rowsort label-8128
SELECT ALL col1 DIV + col0 AS col2 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-8128
SELECT ALL col1 / + col0 AS col2 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT DISTINCT + + 1 + - col0 FROM tab0 AS cor0
----
-23
-34
-88

onlyif mysql # use DIV operator for integer division
query I rowsort label-8130
SELECT - + col0 DIV + col0 FROM tab1 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-8130
SELECT - + col0 / + col0 FROM tab1 cor0
----
-1
-1
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8131
SELECT DISTINCT - - 50 * col0 + + CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8131
SELECT DISTINCT - - 50 * col0 + + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8132
SELECT DISTINCT + + col1 DIV + col0 FROM tab1 AS cor0
----
0
8

skipif mysql # not compatible
query I rowsort label-8132
SELECT DISTINCT + + col1 / + col0 FROM tab1 AS cor0
----
0
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 64 + cor0.col2 * col1 col0 FROM tab1 AS cor0
----
1312
1468
634

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * col0 - col2 col0 FROM tab0 AS cor0
----
-36
-7380
-825

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8135
SELECT DISTINCT + + cor0.col1 - CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8135
SELECT DISTINCT + + cor0.col1 - CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8136
SELECT col2 + CAST( ( + col1 ) AS SIGNED ) AS col2 FROM tab0 AS cor0
----
119
173
98

skipif mysql # not compatible
query I rowsort label-8136
SELECT col2 + CAST ( ( + col1 ) AS INTEGER ) AS col2 FROM tab0 AS cor0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 + 80 - + 3 col1 FROM tab0 AS cor0
----
-14
-20
-9

query I rowsort
SELECT ALL col0 * + cor0.col2 * - col0 + col1 AS col0 FROM tab2 AS cor0
----
-1292
-158125
-237141

query I rowsort
SELECT + ( - 51 ) + cor0.col0 + + tab2.col1 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 3990fa11172dbde7de6dfb0745ab966c

query I rowsort
SELECT + col0 * + col2 + 11 AS col1 FROM tab0 AS cor0
----
46
7309
803

query I rowsort
SELECT DISTINCT 3 FROM tab2, tab1 cor0
----
3

query I rowsort
SELECT ALL - 12 * - col2 AS col1 FROM tab0 AS cor0
----
12
396
984

query I rowsort
SELECT cor0.col0 AS col1 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT DISTINCT - col1 + + 37 FROM tab2
----
-22
20
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * 46 col0 FROM tab0 AS cor0
----
-1104
-1610
-4094

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8146
SELECT ALL - CAST( NULL AS SIGNED ) + + 86 * col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8146
SELECT ALL - CAST ( NULL AS INTEGER ) + + 86 * col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8147
SELECT - - CAST( 20 AS SIGNED ) * - cor0.col1 + + col0 AS col1 FROM tab0 AS cor0
----
-1696
-1731
-1905

skipif mysql # not compatible
query I rowsort label-8147
SELECT - - CAST ( 20 AS INTEGER ) * - cor0.col1 + + col0 AS col1 FROM tab0 AS cor0
----
-1696
-1731
-1905

query I rowsort
SELECT - 81 + - col0 FROM tab2 AS cor0
----
-159
-160
-88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8149
SELECT DISTINCT + CAST( NULL AS DECIMAL ) + col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8149
SELECT DISTINCT + CAST ( NULL AS REAL ) + col1 FROM tab1 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8150
SELECT DISTINCT - CAST( NULL AS SIGNED ) * col1 - + col2 AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8150
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * col1 - + col2 AS col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + - ( - col2 ) + + col1 FROM tab2 AS cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-8152
SELECT - 69 DIV - ( col1 + - 91 ) FROM tab2 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-8152
SELECT - 69 / - ( col1 + - 91 ) FROM tab2 AS cor0
----
-1
-2
0

query I rowsort
SELECT DISTINCT - + 69 * cor0.col1 + col1 AS col1 FROM tab2 cor0
----
-1156
-2108
-4012

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8154
SELECT DISTINCT + 53 + 44 * - col1 - CAST( col1 + col2 AS SIGNED ) FROM tab2 AS cor0
----
-1369
-2628
-750

skipif mysql # not compatible
query I rowsort label-8154
SELECT DISTINCT + 53 + 44 * - col1 - CAST ( col1 + col2 AS INTEGER ) FROM tab2 AS cor0
----
-1369
-2628
-750

query I rowsort
SELECT ALL - + col1 + col0 * + col1 AS col2 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT DISTINCT + - ( col0 ) - + col0 FROM tab1 AS cor0
----
-128
-160
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-8157
SELECT cor0.col1 + - col2 DIV + col0 AS col1 FROM tab1 AS cor0
----
10
12
8

skipif mysql # not compatible
query I rowsort label-8157
SELECT cor0.col1 + - col2 / + col0 AS col1 FROM tab1 AS cor0
----
10
12
8

query I rowsort
SELECT 27 - col1 FROM tab1 AS cor0
----
1
14
17

onlyif mysql # use DIV operator for integer division
query I rowsort label-8159
SELECT - 93 * cor0.col2 + + col2 DIV col0 AS col2 FROM tab0 cor0
----
-3068
-7626
-93

skipif mysql # not compatible
query I rowsort label-8159
SELECT - 93 * cor0.col2 + + col2 / col0 AS col2 FROM tab0 cor0
----
-3068
-7626
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + col1 * 3 col1 FROM tab2 AS cor0
----
124
236
68

query I rowsort
SELECT DISTINCT - col1 * 84 FROM tab0 AS cor0
----
-7224
-7644
-8148

query I rowsort
SELECT 58 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 9ee363c6ac19cfdb8a50c7dfd5cc2b8a

query I rowsort
SELECT DISTINCT - col0 * 26 AS col0 FROM tab1 AS cor0
----
-1664
-2080
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8164
SELECT ALL - - col0 - CAST( - col1 * col0 AS SIGNED ) FROM tab1 AS cor0
----
1120
704
81

skipif mysql # not compatible
query I rowsort label-8164
SELECT ALL - - col0 - CAST ( - col1 * col0 AS INTEGER ) FROM tab1 AS cor0
----
1120
704
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8165
SELECT - - cor0.col0 + - CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8165
SELECT - - cor0.col0 + - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 + col2 + + cor0.col0 FROM tab2 AS cor0
----
182
196
41

query I rowsort
SELECT ALL + col1 * - col0 + col0 - cor0.col0 * ( - col1 ) AS col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT + + col1 + + cor0.col2 * col0 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT + 85 + 85 FROM tab2 AS cor0
----
170
170
170

query I rowsort
SELECT DISTINCT - col1 * - tab2.col0 * col2 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT ALL + col0 * - col0 * + tab2.col0 FROM tab2
----
-343
-474552
-493039

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * col1 * + 80 col0 FROM tab0
----
591680
662480
752720

query I rowsort
SELECT col1 + col2 AS col1 FROM tab1 AS cor0 WHERE ( NULL ) IN ( col1 )
----

query I rowsort
SELECT + col2 AS col0 FROM tab0 AS cor0 WHERE ( NULL ) BETWEEN - col2 AND ( NULL )
----

query I rowsort
SELECT col1 * tab1.col0 * + tab1.col0 FROM tab1
----
234
40960
83200

query I rowsort
SELECT ALL - col0 AS col0 FROM tab1 WHERE NOT NULL = ( NULL )
----

query I rowsort
SELECT DISTINCT col1 * - col1 * - col2 FROM tab0
----
244068
679042
9409

query I rowsort
SELECT ALL col1 * - tab2.col2 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT col0 * - col0 + - col0 * + col2 FROM tab0 AS cor0
----
-1260
-1368
-15219

query I rowsort
SELECT ALL + col1 / col2 AS col1 FROM tab2 WHERE NULL < NULL
----

query I rowsort
SELECT + col1 + + tab2.col2 + col2 FROM tab2
----
111
85
93

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 WHERE ( + col0 ) NOT IN ( + col1 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT ALL + cor0.col1 * cor0.col0 AS col1 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT ALL col2 + - col2 * + col2 AS col2 FROM tab1 AS cor0 WHERE NOT ( NULL ) >= NULL
----

query I rowsort
SELECT - - col0 * + col2 * col2 FROM tab2 AS cor0
----
114076
5103
52728

query I rowsort
SELECT ALL col0 * - col0 + col1 * - cor0.col1 * cor0.col2 + col0 AS col0 FROM tab2 AS cor0
----
-17144
-25989
-96512

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 col0 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT + 18 * col0 AS col1 FROM tab1 AS cor0
----
1152
1440
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + col2 ) * + col0 - 91 col2 FROM tab2 AS cor0
----
1937
2911
98

query I rowsort
SELECT ALL - 78 + col2 FROM tab1 AS cor0
----
-21
-24
18

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8191
SELECT ALL + cor0.col2 + CAST( - col1 + + col2 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
104
179
82

skipif mysql # not compatible
query I rowsort label-8191
SELECT ALL + cor0.col2 + CAST ( - col1 + + col2 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
104
179
82

query I rowsort
SELECT ALL + col0 + col1 * 50 AS col1 FROM tab2 AS cor0
----
1557
3028
929

query I rowsort
SELECT DISTINCT + + col1 + ( col0 * + col2 ) + - 21 FROM tab2 AS cor0
----
199
2066
2998

query I rowsort
SELECT - col0 * 27 AS col0 FROM tab2 AS cor0
----
-189
-2106
-2133

query I rowsort
SELECT DISTINCT - + cor0.col2 + col0 * 79 * - cor0.col2 AS col1 FROM tab1 AS cor0
----
-12852
-288249
-606816

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8196
SELECT DISTINCT + + col2 - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8196
SELECT DISTINCT + + col2 - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8197
SELECT ALL + + col2 + - CAST( - col1 AS SIGNED ) + - col2 AS col1 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-8197
SELECT ALL + + col2 + - CAST ( - col1 AS INTEGER ) + - col2 AS col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT col0 + - 55 AS col0 FROM tab2 AS cor0
----
-48
23
24

query I rowsort
SELECT ALL - col2 + ( + cor0.col0 ) FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT + col2 - col1 AS col2 FROM tab0
----
-53
-9
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8201
SELECT tab1.col0 * col1 - CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8201
SELECT tab1.col0 * col1 - CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ( col1 ) + - tab2.col0 AS col2 FROM tab2
----
-19
-62
24

query I rowsort
SELECT col2 * - col0 FROM tab1 WHERE NOT ( NULL ) < - col0
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + col2 + - tab2.col1 col0 FROM tab2
----
-1461
-735
-760

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT ( col1 ) > col2
----
79
17
38

query III rowsort
SELECT * FROM tab0 WHERE NOT ( - col0 ) NOT IN ( col0 * col0 + - col1 + + col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * col2 - - col0 col0 FROM tab2
----
-182
-1950
-2923

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 - - col1 col0 FROM tab2
----
137
38
96

query I rowsort
SELECT - col0 - + col0 FROM tab0
----
-178
-48
-70

query I rowsort
SELECT + col0 AS col1 FROM tab1 WHERE NOT NULL >= col0 / col2
----

query III rowsort
SELECT * FROM tab0 WHERE NOT tab0.col0 <= NULL
----

query I rowsort
SELECT DISTINCT col1 * col2 * col2 - tab2.col1 * tab2.col1 * + col1 FROM tab2
----
-165495
-7192
19635

query I rowsort
SELECT DISTINCT col2 * - tab2.col0 AS col2 FROM tab2
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-8214
SELECT ALL + tab0.col2 DIV + col2 + col0 * col1 FROM tab0
----
2065
3396
8100

skipif mysql # not compatible
query I rowsort label-8214
SELECT ALL + tab0.col2 / + col2 + col0 * col1 FROM tab0
----
2065
3396
8100

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT + col0 BETWEEN - col0 AND ( col1 )
----
78
59
26
79
17
38

query I rowsort
SELECT - col1 FROM tab0 WHERE NOT NULL NOT IN ( col2 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + col1 col2 FROM tab0
----
172
182
194

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col2 FROM tab2 AS cor0
----
55
58
85

query III rowsort
SELECT ALL * FROM tab2 WHERE ( NULL ) NOT BETWEEN + col1 * col0 AND ( NULL )
----

query I rowsort
SELECT ALL col1 * - col0 * + tab2.col1 FROM tab2
----
-22831
-271518
-6727

query I rowsort
SELECT DISTINCT + col2 - - col2 AS col0 FROM tab0
----
164
2
66

query I rowsort
SELECT DISTINCT - tab0.col0 * - col1 FROM tab0 WHERE NULL IN ( col0 + col1 / col2 )
----

query I rowsort
SELECT + tab1.col2 FROM tab1 WHERE NOT NULL NOT IN ( col0 )
----

query I rowsort
SELECT ALL - - col2 + + col0 * + 37 AS col0 FROM tab0 AS cor0
----
1296
3375
921

query I rowsort
SELECT DISTINCT + 41 AS col2 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
41

query I rowsort
SELECT ALL - col1 * - 55 FROM tab2 AS cor0
----
1705
3245
935

query I rowsort
SELECT + ( - cor0.col1 ) * col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL 83 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 002a717a3d902d97220759065fb107c3

query I rowsort
SELECT + tab0.col1 * - 13 AS col0 FROM tab0
----
-1118
-1183
-1261

query I rowsort
SELECT ALL + col1 * - col1 + + 4 FROM tab1
----
-165
-672
-96

query I rowsort
SELECT DISTINCT tab2.col0 * col2 + + tab2.col1 * - col1 AS col2 FROM tab2
----
-1453
-772
2713

query I rowsort
SELECT + - 66 + col1 AS col1 FROM tab1 AS cor0
----
-40
-53
-56

onlyif mysql # use DIV operator for integer division
query I rowsort label-8233
SELECT 64 DIV col2 AS col2 FROM tab1 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-8233
SELECT 64 / col2 AS col2 FROM tab1 AS cor0
----
0
1
1

query I rowsort
SELECT ALL + col1 * cor0.col1 AS col0 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT ALL - - cor0.col0 * col0 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT ALL col0 + cor0.col1 - + 56 * col2 AS col2 FROM tab1 AS cor0
----
-2995
-3118
-5283

onlyif mysql # use DIV operator for integer division
query I rowsort label-8237
SELECT - col2 DIV - 53 + + tab1.col2 AS col1 FROM tab1
----
55
58
97

skipif mysql # not compatible
query I rowsort label-8237
SELECT - col2 / - 53 + + tab1.col2 AS col1 FROM tab1
----
55
58
97

query I rowsort
SELECT DISTINCT + ( 84 ) FROM tab1, tab2, tab0 cor0
----
84

query I rowsort
SELECT DISTINCT + col1 * ( col1 ) FROM tab1
----
100
169
676

query I rowsort
SELECT DISTINCT 98 * - col0 * tab1.col0 FROM tab1
----
-401408
-627200
-882

onlyif mysql # use DIV operator for integer division
query I rowsort label-8241
SELECT + 75 DIV - col1 col2 FROM tab2
----
-1
-2
-4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8241
SELECT + 75 / - col1 col2 FROM tab2
----
-1
-2
-4

query I rowsort
SELECT - 4 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 5784540a5af6ca2be84399d314acd2fd

query I rowsort
SELECT DISTINCT col0 * col1 + col0 + - col2 FROM tab1
----
1024
27
647

query I rowsort
SELECT - 97 * - col2 AS col1 FROM tab2 AS cor0
----
2522
2619
3686

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + col1 col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT - 48 * col0 AS col1 FROM tab1 AS cor0
----
-144
-3072
-3840

query I rowsort
SELECT ALL - 93 FROM tab1 cor0
----
-93
-93
-93

query I rowsort
SELECT 18 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to b95bafa733666df39c5d3f94760d010f

onlyif mysql # use DIV operator for integer division
query I rowsort label-8249
SELECT DISTINCT + 93 * col1 DIV col0 AS col0 FROM tab1
----
14
15
806

skipif mysql # not compatible
query I rowsort label-8249
SELECT DISTINCT + 93 * col1 / col0 AS col0 FROM tab1
----
14
15
806

query I rowsort
SELECT ALL + 44 AS col0 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 0cc3e52e781e46962291c3060c6ae73b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8251
SELECT DISTINCT CAST( - 93 AS SIGNED ) col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
-93

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8251
SELECT DISTINCT CAST ( - 93 AS INTEGER ) col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
-93

query I rowsort
SELECT + + col0 * ( cor0.col0 + col1 ) FROM tab1 AS cor0
----
4736
7440
87

onlyif mysql # use DIV operator for integer division
query I rowsort label-8253
SELECT col1 DIV 38 AS col2 FROM tab0
----
2
2
2

skipif mysql # not compatible
query I rowsort label-8253
SELECT col1 / 38 AS col2 FROM tab0
----
2
2
2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8254
SELECT col2 + CAST( - col0 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
-7
16
51

skipif mysql # not compatible
query I rowsort label-8254
SELECT col2 + CAST ( - col0 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT + col0 * - 60 FROM tab2 AS cor0
----
-420
-4680
-4740

query I rowsort
SELECT DISTINCT - + ( - col0 ) + col0 AS col2 FROM tab1 cor0
----
128
160
6

query I rowsort
SELECT DISTINCT + col1 + ( + col0 ) + col2 AS col1 FROM tab0 AS cor0
----
133
143
262

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8258
SELECT ALL + + col1 * - cor0.col1 - col0 * + CAST( 57 AS SIGNED ) FROM tab1 AS cor0
----
-3748
-4729
-847

skipif mysql # not compatible
query I rowsort label-8258
SELECT ALL + + col1 * - cor0.col1 - col0 * + CAST ( 57 AS INTEGER ) FROM tab1 AS cor0
----
-3748
-4729
-847

query I rowsort
SELECT + + 41 + col0 * - cor0.col2 FROM tab0 AS cor0
----
-7257
-751
6

query I rowsort
SELECT - - 44 + col0 FROM tab2 AS cor0
----
122
123
51

query I rowsort
SELECT ALL - + 28 + + col1 * col0 FROM tab2 AS cor0
----
1315
189
4574

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8262
SELECT + CAST( + col0 AS SIGNED ) * + col0 FROM tab0 AS cor0
----
1225
576
7921

skipif mysql # not compatible
query I rowsort label-8262
SELECT + CAST ( + col0 AS INTEGER ) * + col0 FROM tab0 AS cor0
----
1225
576
7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 88 * col2 col1 FROM tab0 AS cor0
----
2904
7216
88

query I rowsort
SELECT col1 * 48 + + col1 * col0 * - col2 AS col1 FROM tab2 AS cor0
----
-116820
-4371
-50218

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab1, tab1 cor0, tab1 AS cor1, tab1 cor2
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col0 + + col2 + col1 col1 FROM tab1 AS cor0
----
131
189
83

query I rowsort
SELECT - 0 * cor0.col0 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL ( 45 ) FROM tab1
----
45
45
45

query I rowsort
SELECT - - 79 * + col1 AS col2 FROM tab2 AS cor0
----
1343
2449
4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-8270
SELECT DISTINCT 57 DIV ( - col2 * col2 ) - - 95 AS col2 FROM tab0 AS cor0
----
38
95

skipif mysql # not compatible
query I rowsort label-8270
SELECT DISTINCT 57 / ( - col2 * col2 ) - - 95 AS col2 FROM tab0 AS cor0
----
38
95

query I rowsort
SELECT + + 69 FROM tab2 AS cor0
----
69
69
69

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8272
SELECT - + CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8272
SELECT - + CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 36 + cor0.col0 * - col2 AS col1 FROM tab1 AS cor0
----
-198
-3684
-7716

query I rowsort
SELECT - - 89 AS col0 FROM tab0 cor0
----
89
89
89

query I rowsort
SELECT - + ( col0 ) + col2 AS col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL + ( cor0.col0 ) + - col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT - + 32 * - col1 * col0 AS col0 FROM tab2 AS cor0
----
147264
42976
6944

query I rowsort
SELECT DISTINCT 58 AS col2 FROM tab1, tab1 cor0
----
58

query I rowsort
SELECT ALL 84 * cor0.col0 + + col0 FROM tab2 AS cor0
----
595
6630
6715

query I rowsort
SELECT ALL + + 51 FROM tab2 AS cor0
----
51
51
51

query I rowsort
SELECT 74 * 41 AS col0 FROM tab0 AS cor0
----
3034
3034
3034

query I rowsort
SELECT DISTINCT - col0 - - ( col0 * + ( - col0 ) ) FROM tab0 AS cor0
----
-1260
-600
-8010

query I rowsort
SELECT DISTINCT - col1 * 36 AS col0 FROM tab1 cor0
----
-360
-468
-936

query I rowsort
SELECT DISTINCT + 17 AS col0 FROM tab1, tab0 AS cor0
----
17

query I rowsort
SELECT ALL + col0 * - cor0.col0 + - col1 - - col0 FROM tab0 cor0
----
-1287
-638
-7923

query I rowsort
SELECT ALL 46 * - col0 AS col0 FROM tab1 AS cor0
----
-138
-2944
-3680

query I rowsort
SELECT ALL - col1 * + col2 * col2 FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT + 9 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to ebef7303942834ca1e6ca8604ec18a07

query I rowsort
SELECT + col2 * - 97 FROM tab1 AS cor0
----
-5238
-5529
-9312

query I rowsort
SELECT - + col2 + + ( - col0 ) FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT - 84 AS col2 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 975e2ef2a3bf1ee2622362f4e435752f

onlyif mysql # use DIV operator for integer division
query I rowsort label-8292
SELECT + + col0 * 47 DIV col0 + col2 AS col2 FROM tab1 AS cor0
----
101
104
143

skipif mysql # not compatible
query I rowsort label-8292
SELECT + + col0 * 47 / col0 + col2 AS col2 FROM tab1 AS cor0
----
101
104
143

query I rowsort
SELECT DISTINCT - col0 * - ( + col1 + col1 ) AS col0 FROM tab1 AS cor0
----
1280
156
2080

query I rowsort
SELECT ALL + col1 + 73 FROM tab0
----
159
164
170

query I rowsort
SELECT ALL cor1.col1 FROM tab2, tab1 AS cor0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to d7d3fabcafbed14f0d6ffd37195c971c

query I rowsort
SELECT cor0.col2 * col2 AS col2 FROM tab2 cor0
----
1444
676
729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8297
SELECT DISTINCT col1 + CAST( col2 AS SIGNED ) + - tab1.col0 * - ( col2 ) * col1 AS col1 FROM tab1
----
36547
4292
99949

skipif mysql # not compatible
query I rowsort label-8297
SELECT DISTINCT col1 + CAST ( col2 AS INTEGER ) + - tab1.col0 * - ( col2 ) * col1 AS col1 FROM tab1
----
36547
4292
99949

query I rowsort
SELECT + tab0.col2 + col0 AS col1 FROM tab0
----
171
36
57

query I rowsort
SELECT + cor0.col0 + ( col2 * 74 ) AS col1 FROM tab2 AS cor0
----
2002
2005
2891

query I rowsort
SELECT + col2 + - col0 * col2 FROM tab2
----
-162
-2002
-2964

query I rowsort
SELECT DISTINCT + - col2 * ( - col1 ) + + col1 AS col2 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT ALL col0 + + 84 AS col2 FROM tab1
----
148
164
87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8303
SELECT DISTINCT CAST( 8 AS SIGNED ) FROM tab1, tab1 AS cor0
----
8

skipif mysql # not compatible
query I rowsort label-8303
SELECT DISTINCT CAST ( 8 AS INTEGER ) FROM tab1, tab1 AS cor0
----
8

query I rowsort
SELECT DISTINCT col2 + 29 AS col2 FROM tab2 AS cor0
----
55
56
67

query I rowsort
SELECT 33 * - 93 * col2 + - col1 FROM tab2
----
-116639
-79853
-82894

query I rowsort
SELECT ALL - cor2.col0 FROM tab0, tab2 AS cor0, tab2 AS cor1, tab2, tab0 AS cor2
----
243 values hashing to 68438270ef4dcbfd48dcdbe0b98336f5

query I rowsort
SELECT ALL + col1 * col1 + col0 FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT ALL + - col2 + - col1 AS col1 FROM tab0 AS cor0
----
-119
-173
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 25 * cor0.col2 col2 FROM tab2 AS cor0
----
650
675
950

query I rowsort
SELECT DISTINCT col2 * + ( col1 ) AS col2 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT ALL 78 FROM tab1, tab1 AS cor0, tab2 cor1, tab1 AS cor2
----
81 values hashing to f0487ba81d377516702723e098c02ba1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8312
SELECT ALL col1 - + col0 DIV ( 57 ) AS col2 FROM tab1
----
12
26
9

skipif mysql # not compatible
query I rowsort label-8312
SELECT ALL col1 - + col0 / ( 57 ) AS col2 FROM tab1
----
12
26
9

query I rowsort
SELECT DISTINCT + cor0.col0 * - col1 + ( - col0 ) * cor0.col2 AS col1 FROM tab2 AS cor0
----
-406
-4345
-6630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 * - cor0.col0 + - col0 * - cor0.col1 col0 FROM tab0 AS cor0
----
1272
3360
801

onlyif mysql # use DIV operator for integer division
query I rowsort label-8315
SELECT - col1 DIV + col0 + col1 DIV + 26 col1 FROM tab2 AS cor0
----
-3
0
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8315
SELECT - col1 / + col0 + col1 / + 26 col1 FROM tab2 AS cor0
----
-3
0
2

query I rowsort
SELECT ALL - - col1 + + col2 * ( + ( col1 ) ) AS col0 FROM tab1 AS cor0
----
1261
1430
580

onlyif mysql # use DIV operator for integer division
query I rowsort label-8317
SELECT + - col0 DIV + 36 FROM tab0 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-8317
SELECT + - col0 / + 36 FROM tab0 AS cor0
----
-2
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8318
SELECT DISTINCT + cor0.col0 DIV + CAST( 53 + + col1 AS SIGNED ) FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-8318
SELECT DISTINCT + cor0.col0 / + CAST ( 53 + + col1 AS INTEGER ) FROM tab1 AS cor0
----
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-8319
SELECT ALL + col0 + col2 DIV col2 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-8319
SELECT ALL + col0 + col2 / col2 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT + + col2 + - ( - 37 ) AS col1 FROM tab1 AS cor0
----
133
91
94

query I rowsort
SELECT ALL col1 * - 5 AS col2 FROM tab1 AS cor0
----
-130
-50
-65

query I rowsort
SELECT DISTINCT cor0.col1 * 15 + - col0 FROM tab1 AS cor0
----
115
387
86

query I rowsort
SELECT ALL - col0 * col0 + ( col1 ) FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT ALL + - col0 * ( ( + col1 ) ) + - col0 AS col1 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT DISTINCT + col2 * ( col2 ) + - col0 * 40 AS col2 FROM tab0 cor0
----
-1399
129
3164

query I rowsort
SELECT - col0 * + ( + col0 ) FROM tab1 AS cor0
----
-4096
-6400
-9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8327
SELECT DISTINCT col0 * - CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8327
SELECT DISTINCT col0 * - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - ( - col0 ) - col2 AS col1 FROM tab0
----
-9
34
7

query I rowsort
SELECT ALL - 15 * tab1.col2 * + ( - 27 ) - + col1 FROM tab1
----
21844
23075
38867

query I rowsort
SELECT + + col0 - 79 FROM tab1 AS cor0
----
-15
-76
1

query I rowsort
SELECT DISTINCT - cor0.col0 * - col1 * 14 + col1 AS col1 FROM tab0 AS cor0
----
113477
28982
47627

query I rowsort
SELECT DISTINCT - + col0 * ( + col0 ) FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT + col2 + + ( - col1 ) AS col1 FROM tab1 AS cor0
----
28
47
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-8334
SELECT ALL + col0 DIV 47 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-8334
SELECT ALL + col0 / 47 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT - cor1.col1 AS col1 FROM tab2, tab0, tab1 cor0, tab2 cor1
----
81 values hashing to b7a1b38fe8e4f34388e3be1f52601ae5

query I rowsort
SELECT DISTINCT - cor0.col0 + 49 * - col0 * cor0.col2 FROM tab1 AS cor0
----
-178816
-376400
-7941

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8337
SELECT ALL cor0.col1 * CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8337
SELECT ALL cor0.col1 * CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ( + tab0.col2 ) * col2 FROM tab0
----
1
1089
6724

query I rowsort
SELECT DISTINCT 77 AS col2 FROM tab2
----
77

query I rowsort
SELECT + 57 + tab2.col0 FROM tab2
----
135
136
64

query I rowsort
SELECT 0 + 13 * + tab1.col0 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to c737fae611fbaaae9b8443a8e6bdd21a

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( col2 AS REAL ) FROM tab0
----
1
33
82

query I rowsort
SELECT ALL 13 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 184e52d7aa5aa66591291e39c67a3dfb

query I rowsort
SELECT + col1 * col0 + + col0 FROM tab0
----
2088
3430
8188

query I rowsort
SELECT ALL - cor0.col0 * 23 FROM tab0 AS cor0
----
-2047
-552
-805

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 5 - + col1 col2 FROM tab0 AS cor0
----
-81
-86
-92

query I rowsort
SELECT DISTINCT - + col0 * col1 + - col2 FROM tab2 AS cor0
----
-1381
-244
-4628

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8348
SELECT ALL + CAST( col2 AS SIGNED ) * + cor0.col2 - + cor0.col0 * - col2 FROM tab0 AS cor0
----
14022
1881
36

skipif mysql # not compatible
query I rowsort label-8348
SELECT ALL + CAST ( col2 AS INTEGER ) * + cor0.col2 - + cor0.col0 * - col2 FROM tab0 AS cor0
----
14022
1881
36

query I rowsort
SELECT ALL col2 * col1 * cor0.col0 AS col1 FROM tab0 AS cor0
----
3395
664118
68112

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8350
SELECT + col0 / + col2 + CAST( NULL AS SIGNED ) - col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8350
SELECT + col0 / + col2 + CAST ( NULL AS INTEGER ) - col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 72 + col2 FROM tab1 AS cor0
----
126
129
168

onlyif mysql # use DIV operator for integer division
query I rowsort label-8352
SELECT col1 DIV + col2 - 29 FROM tab1 AS cor0
----
-29
-29
-29

skipif mysql # not compatible
query I rowsort label-8352
SELECT col1 / + col2 - 29 FROM tab1 AS cor0
----
-29
-29
-29

query I rowsort
SELECT + + col1 + - col2 * col1 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT DISTINCT + col2 * col2 + 97 * 67 AS col2 FROM tab2 AS cor0
----
7175
7228
7943

query I rowsort
SELECT DISTINCT + col0 * - col0 - + 91 FROM tab1 cor0
----
-100
-4187
-6491

query I rowsort
SELECT cor0.col1 - - col0 * - 9 FROM tab0 AS cor0
----
-130
-218
-710

query I rowsort
SELECT - 67 * - col2 * col0 + - col2 - col0 * - ( - col1 ) AS col0 FROM tab0 AS cor0
----
-1051
480785
50967

query I rowsort
SELECT + col2 + cor0.col1 * col0 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT - + cor0.col2 + - col1 * - 69 AS col0 FROM tab2 cor0
----
1135
2112
4045

query I rowsort
SELECT DISTINCT - col0 * col1 + ( 52 ) AS col2 FROM tab1 AS cor0
----
-26
-588
-988

onlyif mysql # use DIV operator for integer division
query I rowsort label-8361
SELECT ALL - col1 * col2 + - col1 DIV + col1 FROM tab0
----
-2839
-7463
-98

skipif mysql # not compatible
query I rowsort label-8361
SELECT ALL - col1 * col2 + - col1 / + col1 FROM tab0
----
-2839
-7463
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col1 + + col0 col2 FROM tab0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-8363
SELECT - ( cor0.col1 ) + col1 DIV - col0 FROM tab0 cor0
----
-89
-92
-99

skipif mysql # not compatible
query I rowsort label-8363
SELECT - ( cor0.col1 ) + col1 / - col0 FROM tab0 cor0
----
-89
-92
-99

query I rowsort
SELECT - + col1 + - cor0.col2 AS col1 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT DISTINCT col1 * - ( cor0.col0 ) - cor0.col2 FROM tab1 AS cor0
----
-1136
-132
-697

query I rowsort
SELECT DISTINCT - + cor0.col2 + + ( - col0 ) * + col1 AS col1 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT DISTINCT + - col2 * col0 - col0 AS col0 FROM tab1 AS cor0
----
-165
-3712
-7760

query I rowsort
SELECT DISTINCT - + col2 + - 54 AS col1 FROM tab2 cor0
----
-80
-81
-92

query I rowsort
SELECT - cor0.col2 * col2 FROM tab0 cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT - cor0.col0 AS col2 FROM tab1, tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT + col1 + col0 + + col0 FROM tab2
----
175
215
45

query I rowsort
SELECT ALL - - col1 * - col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + col1 * + 99 * + col1 AS col0 FROM tab0 AS cor0
----
732204
819819
931491

query I rowsort
SELECT cor1.col2 - 42 AS col0 FROM tab2 cor0 CROSS JOIN tab1, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to eddac5103b05b0891b77ec19a67fe60f

query I rowsort
SELECT + ( ( - col2 ) ) * - col1 + - col1 * - col2 AS col2 FROM tab1 AS cor0
----
1140
2496
2808

query I rowsort
SELECT + cor0.col1 * ( col1 ) FROM tab1 cor0
----
100
169
676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 + col2 * col0 * 99 col0 FROM tab0 AS cor0
----
3464
722420
78375

query I rowsort
SELECT ( + col0 ) + - col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT 74 * - tab1.col0 + - cor0.col0 + - 57 FROM tab1, tab0 AS cor0
----
9 values hashing to 2617607411282ac6116cecd3b8338f28

query I rowsort
SELECT ALL + 50 FROM tab2, tab0 cor0
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8381
SELECT DISTINCT - col2 * CAST( - col2 AS SIGNED ) AS col0 FROM tab2
----
1444
676
729

skipif mysql # not compatible
query I rowsort label-8381
SELECT DISTINCT - col2 * CAST ( - col2 AS INTEGER ) AS col0 FROM tab2
----
1444
676
729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 93 col2 FROM tab1, tab1 AS cor0
----
93

query I rowsort
SELECT DISTINCT col1 * - col0 * + tab2.col2 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT - ( - tab0.col2 ) AS col0 FROM tab0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-8385
SELECT DISTINCT - col1 + + ( cor0.col0 ) DIV - ( - 1 * - col2 ) FROM tab0 AS cor0
----
-132
-86
-92

skipif mysql # not compatible
query I rowsort label-8385
SELECT DISTINCT - col1 + + ( cor0.col0 ) / - ( - 1 * - col2 ) FROM tab0 AS cor0
----
-132
-86
-92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8386
SELECT + + CAST( + col1 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-8386
SELECT + + CAST ( + col1 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL + 5 * col0 * + col1 AS col2 FROM tab2
----
1085
23010
6715

query I rowsort
SELECT ALL + 44 + col2 FROM tab2
----
70
71
82

query I rowsort
SELECT DISTINCT ( 70 ) AS col2 FROM tab1, tab2 AS cor0, tab0 cor1
----
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * col0 + + 47 col2 FROM tab0 AS cor0
----
-2017
-3348
-8052

onlyif mysql # use DIV operator for integer division
query I rowsort label-8391
SELECT - - ( - col2 ) DIV col0 - cor0.col0 * - cor0.col0 * + ( 72 ) AS col0 FROM tab1 AS cor0
----
294912
460799
630

skipif mysql # not compatible
query I rowsort label-8391
SELECT - - ( - col2 ) / col0 - cor0.col0 * - cor0.col0 * + ( 72 ) AS col0 FROM tab1 AS cor0
----
294912
460799
630

query I rowsort
SELECT - 8 AS col2 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 47f43f23dcd23959d97d8e3b0aab692e

query I rowsort
SELECT - ( 50 ) AS col2 FROM tab2, tab1 AS cor0, tab2 cor1
----
27 values hashing to faf91d5263c18db4877a3c30c47e2487

query I rowsort
SELECT ALL + col0 * - ( col0 + + col0 ) FROM tab1
----
-12800
-18
-8192

query I rowsort
SELECT DISTINCT + 80 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
80

query I rowsort
SELECT + col0 * col1 + col1 FROM tab1 cor0
----
104
1053
650

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + - col0 col0 FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT + 28 + - col1 FROM tab0 cor0
----
-58
-63
-69

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8399
SELECT DISTINCT - - ( - col0 ) * + CAST( + col1 AS SIGNED ) FROM tab1 cor0
----
-1040
-640
-78

skipif mysql # not compatible
query I rowsort label-8399
SELECT DISTINCT - - ( - col0 ) * + CAST ( + col1 AS INTEGER ) FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - col0 * - col0 + ( col0 ) FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT DISTINCT - 80 * col0 FROM tab1 AS cor0
----
-240
-5120
-6400

query I rowsort
SELECT 83 AS col0 FROM tab2 AS cor0
----
83
83
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col0 ) * 58 + - col2 col2 FROM tab2 AS cor0
----
379
4498
4544

query I rowsort
SELECT ALL - cor0.col2 * col0 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-8405
SELECT ALL + cor0.col2 DIV - 6 AS col0 FROM tab0 AS cor0
----
-13
-5
0

skipif mysql # not compatible
query I rowsort label-8405
SELECT ALL + cor0.col2 / - 6 AS col0 FROM tab0 AS cor0
----
-13
-5
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8406
SELECT - col1 DIV + 22 AS col2 FROM tab0 cor0
----
-3
-4
-4

skipif mysql # not compatible
query I rowsort label-8406
SELECT - col1 / + 22 AS col2 FROM tab0 cor0
----
-3
-4
-4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8407
SELECT DISTINCT + col0 + - CAST( + col1 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-2
-62

skipif mysql # not compatible
query I rowsort label-8407
SELECT DISTINCT + col0 + - CAST ( + col1 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-2
-62

query I rowsort
SELECT + cor0.col0 + + col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT + 5 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 6035628694bdea36f584f3649088551d

query I rowsort
SELECT - - col1 * - cor0.col1 AS col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT - col0 + + col0 * - cor0.col2 FROM tab1 AS cor0
----
-165
-3712
-7760

query I rowsort
SELECT DISTINCT + tab0.col1 * + ( col1 ) FROM tab0
----
7396
8281
9409

query I rowsort
SELECT ALL - col1 * - col1 * - col2 FROM tab0 AS cor0
----
-244068
-679042
-9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8414
SELECT ALL + - col0 + ( col0 ) * CAST( - col0 AS SIGNED ) AS col0 FROM tab1 cor0
----
-12
-4160
-6480

skipif mysql # not compatible
query I rowsort label-8414
SELECT ALL + - col0 + ( col0 ) * CAST ( - col0 AS INTEGER ) AS col0 FROM tab1 cor0
----
-12
-4160
-6480

query I rowsort
SELECT DISTINCT - ( tab1.col0 ) AS col2 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT - - col1 + col0 * ( + 23 ) AS col1 FROM tab2 cor0
----
1834
1853
192

query I rowsort
SELECT ALL 66 + ( col1 ) + + col0 FROM tab2
----
104
162
203

query I rowsort
SELECT ALL - cor0.col0 * + tab0.col2 FROM tab0, tab2 AS cor0
----
9 values hashing to a3b44b1349b97a64e1970dbe00e8d983

query I rowsort
SELECT + + col0 * + col1 + - cor0.col2 * + col0 - + col0 AS col1 FROM tab1 AS cor0
----
-3072
-6720
-87

query I rowsort
SELECT 12 * col1 + - 74 + col0 FROM tab2 AS cor0
----
209
305
712

query I rowsort
SELECT DISTINCT + + col0 * col0 AS col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT - col1 * + col1 AS col2 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT - - 43 * col0 + - ( - col2 ) * - col1 FROM tab0 AS cor0
----
-1806
-3635
1408

query I rowsort
SELECT DISTINCT ( col1 ) + col2 * - 80 * col0 - col1 FROM tab2
----
-15120
-162240
-240160

onlyif mysql # use DIV operator for integer division
query I rowsort label-8425
SELECT DISTINCT - col1 + - col2 DIV - ( + col0 * col0 ) FROM tab2
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-8425
SELECT DISTINCT - col1 + - col2 / - ( + col0 * col0 ) FROM tab2
----
-17
-31
-59

query I rowsort
SELECT DISTINCT 22 + col1 * 76 AS col0 FROM tab0
----
6558
6938
7394

query I rowsort
SELECT DISTINCT - col2 + + col0 * ( col2 ) AS col1 FROM tab1
----
108
3591
7584

query I rowsort
SELECT + 32 AS col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to cf4f01ac97eb83445b1721f3ae28961a

query I rowsort
SELECT ALL + - col2 * cor0.col1 AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT col2 + cor0.col2 + 92 AS col1 FROM tab1 AS cor0
----
200
206
284

onlyif mysql # use DIV operator for integer division
query I rowsort label-8431
SELECT - cor0.col1 DIV col0 + - cor0.col1 AS col0 FROM tab0 AS cor0
----
-89
-92
-99

skipif mysql # not compatible
query I rowsort label-8431
SELECT - cor0.col1 / col0 + - cor0.col1 AS col0 FROM tab0 AS cor0
----
-89
-92
-99

query I rowsort
SELECT + ( col0 ) * - col2 FROM tab2
----
-189
-2028
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 col2 FROM tab2 AS cor0
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-8434
SELECT DISTINCT col0 DIV ( 65 ) AS col0 FROM tab1
----
0
1

skipif mysql # not compatible
query I rowsort label-8434
SELECT DISTINCT col0 / ( 65 ) AS col0 FROM tab1
----
0
1

query I rowsort
SELECT DISTINCT col2 * ( col0 ) FROM tab0
----
35
7298
792

query I rowsort
SELECT + + 17 + + col0 + col1 * 3 FROM tab1 AS cor0
----
111
136
98

query I rowsort
SELECT - - 39 + 45 + + col2 FROM tab2 AS cor0
----
110
111
122

onlyif mysql # use DIV operator for integer division
query I rowsort label-8438
SELECT DISTINCT + + col2 DIV + 84 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-8438
SELECT DISTINCT + + col2 / + 84 FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8439
SELECT + col1 * col1 + + col1 DIV cor0.col2 + ( cor0.col0 + 83 ) * - 93 FROM tab1 AS cor0
----
-13571
-14990
-7322

skipif mysql # not compatible
query I rowsort label-8439
SELECT + col1 * col1 + + col1 / cor0.col2 + ( cor0.col0 + 83 ) * - 93 FROM tab1 AS cor0
----
-13571
-14990
-7322

query I rowsort
SELECT ALL - col1 + + 47 * col1 FROM tab0 AS cor0
----
3956
4186
4462

query I rowsort
SELECT + col1 - col2 * col1 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT DISTINCT + col2 + col0 * + col0 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT - + ( + ( cor0.col0 ) ) FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT - 36 AS col2 FROM tab0 AS cor0
----
-36
-36
-36

query I rowsort
SELECT DISTINCT + 24 + - ( cor0.col2 ) FROM tab0 AS cor0
----
-58
-9
23

query I rowsort
SELECT 83 AS col2 FROM tab1 AS cor0
----
83
83
83

query I rowsort
SELECT - col0 * col2 * + col1 AS col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT ALL + col2 * cor0.col2 + - col2 * 43 FROM tab1 cor0
----
5088
594
798

query I rowsort
SELECT + col0 * 39 AS col2 FROM tab2 AS cor0
----
273
3042
3081

query I rowsort
SELECT DISTINCT + col1 * + ( col1 + + 65 ) AS col1 FROM tab0 AS cor0
----
12986
14196
15714

query I rowsort
SELECT DISTINCT + ( col0 ) * col2 AS col0 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-8452
SELECT ALL - 16 DIV ( - cor0.col1 ) FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8452
SELECT ALL - 16 / ( - cor0.col1 ) FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col2 * 15 FROM tab2
----
390
405
570

query I rowsort
SELECT + 18 AS col2 FROM tab2 AS cor0
----
18
18
18

query I rowsort
SELECT + 16 AS col2 FROM tab0, tab2 cor0
----
9 values hashing to 3fdb08ec2e3d4b642dd4594778cca8b3

query I rowsort
SELECT ALL + cor1.col1 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT DISTINCT + col2 * + col1 AS col0 FROM tab0
----
2838
7462
97

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0 AS cor0, tab1 AS cor1, tab2, tab1 cor2
----
3645 values hashing to 1c1b1a313871216b88e662d7d3078b12

query I rowsort
SELECT + cor0.col2 + - cor0.col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - 9 + 72 * + col2 AS col2 FROM tab0 AS cor0
----
2367
5895
63

query I rowsort
SELECT ALL - col2 + - 19 * - col1 AS col2 FROM tab1 AS cor0
----
133
151
440

query I rowsort
SELECT 12 * col2 FROM tab1
----
1152
648
684

query I rowsort
SELECT DISTINCT 97 * + tab0.col0 FROM tab0
----
2328
3395
8633

query I rowsort
SELECT + col2 * - tab2.col1 + col0 FROM tab2
----
-1456
-567
-830

query I rowsort
SELECT ALL - tab1.col2 AS col2 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query I rowsort
SELECT + col1 * cor0.col2 + col0 AS col1 FROM tab2 AS cor0
----
1612
725
844

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + + col2 col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL + col1 + col0 * + 78 AS col1 FROM tab1 AS cor0
----
260
5002
6253

query I rowsort
SELECT + 72 * + col0 FROM tab1
----
216
4608
5760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8470
SELECT col0 * CAST( NULL AS SIGNED ) AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8470
SELECT col0 * CAST ( NULL AS INTEGER ) AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8471
SELECT + - cor0.col2 * + CAST( NULL AS SIGNED ) * + 61 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8471
SELECT + - cor0.col2 * + CAST ( NULL AS INTEGER ) * + 61 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 * - ( cor0.col2 * - col0 ) AS col1 FROM tab0 cor0
----
1225
19008
649522

query I rowsort
SELECT DISTINCT - col2 * col2 + + col0 * cor0.col0 AS col1 FROM tab1 AS cor0
----
-2816
-2907
847

query I rowsort
SELECT DISTINCT + col1 + col1 AS col0 FROM tab1 AS cor0
----
20
26
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8475
SELECT col0 * - col1 + CAST( col0 + - col2 AS SIGNED ) FROM tab1
----
-1056
-129
-633

skipif mysql # not compatible
query I rowsort label-8475
SELECT col0 * - col1 + CAST ( col0 + - col2 AS INTEGER ) FROM tab1
----
-1056
-129
-633

query I rowsort
SELECT + col0 * cor0.col0 + col1 AS col2 FROM tab1 AS cor0
----
35
4106
6413

query I rowsort
SELECT col1 * ( col2 ) AS col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - col0 * - 96 + 36 FROM tab1 AS cor0
----
324
6180
7716

query I rowsort
SELECT + col1 * ( col0 + col2 ) FROM tab2
----
1054
1989
6136

query I rowsort
SELECT + ( + 48 ) AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

query I rowsort
SELECT - - col2 * + 30 + cor0.col0 FROM tab1 AS cor0
----
1623
1774
2960

query I rowsort
SELECT - + col1 * - cor0.col2 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + + ( 94 ) * + col0 AS col2 FROM tab1 AS cor0
----
282
6016
7520

query I rowsort
SELECT - ( 52 ) AS col0 FROM tab0 AS cor0
----
-52
-52
-52

query I rowsort
SELECT - col0 * + col0 AS col2 FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT + cor0.col2 * 17 FROM tab1 AS cor0
----
1632
918
969

onlyif mysql # use DIV operator for integer division
query I rowsort label-8487
SELECT CAST( 19 AS SIGNED ) + col1 DIV + col0 FROM tab1 AS cor0
----
19
19
27

skipif mysql # not compatible
query I rowsort label-8487
SELECT CAST ( 19 AS INTEGER ) + col1 / + col0 FROM tab1 AS cor0
----
19
19
27

query I rowsort
SELECT ALL - 68 * - 20 FROM tab0 AS cor0
----
1360
1360
1360

query I rowsort
SELECT + col2 + + 74 * col1 * + ( col2 * + col0 + 20 ) AS col2 FROM tab0 AS cor0
----
394791
49279494
5167601

query I rowsort
SELECT ALL - + col1 + - 30 AS col2 FROM tab1 AS cor0
----
-40
-43
-56

query I rowsort
SELECT DISTINCT + 70 + 71 FROM tab1 AS cor0
----
141

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8492
SELECT ALL CAST( 46 AS SIGNED ) + col2 * - cor0.col2 AS col2 FROM tab1 cor0
----
-2870
-3203
-9170

skipif mysql # not compatible
query I rowsort label-8492
SELECT ALL CAST ( 46 AS INTEGER ) + col2 * - cor0.col2 AS col2 FROM tab1 cor0
----
-2870
-3203
-9170

query I rowsort
SELECT - col0 * 93 FROM tab1
----
-279
-5952
-7440

query I rowsort
SELECT - - col2 * - col2 - + col1 AS col1 FROM tab2 AS cor0
----
-1461
-735
-760

query I rowsort
SELECT - - col1 + - cor0.col1 * - col0 - ( col0 + 17 ) * 4 AS col0 FROM tab0 AS cor0
----
1986
3284
7766

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8496
SELECT + CAST( NULL AS DECIMAL ) FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-8496
SELECT + CAST ( NULL AS REAL ) FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT ALL 65 * - col1 AS col1 FROM tab0
----
-5590
-5915
-6305

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0, tab1 cor1, tab0, tab0 AS cor2
----
3645 values hashing to 4037d65571c1bbf6e0e7d759f858120e

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
3
64
80

query I rowsort
SELECT DISTINCT + ( + cor1.col0 ) AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
24
35
89

query I rowsort
SELECT DISTINCT + tab1.col0 * col2 * + col0 AS col0 FROM tab1
----
233472
486
614400

query I rowsort
SELECT ALL + col0 * col1 - + col1 AS col1 FROM tab2
----
1326
186
4543

query I rowsort
SELECT - col2 + col1 + - col2 FROM tab2 cor0
----
-23
-59
7

query I rowsort
SELECT + col0 * - col1 + + col0 + col2 AS col2 FROM tab0 AS cor0
----
-2007
-3359
-7928

query I rowsort
SELECT DISTINCT - + col0 + + col2 AS col0 FROM tab2 AS cor0
----
-41
-52
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-8506
SELECT ALL + - col1 + - col1 + - col2 DIV + col0 FROM tab2 cor0
----
-118
-34
-65

skipif mysql # not compatible
query I rowsort label-8506
SELECT ALL + - col1 + - col1 + - col2 / + col0 FROM tab2 cor0
----
-118
-34
-65

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - col0 col2 FROM tab0 AS cor0
----
-178
-48
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-8508
SELECT ALL col2 * - col0 + col1 + - col1 DIV - col0 col0 FROM tab2
----
-154
-1969
-2985

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8508
SELECT ALL col2 * - col0 + col1 + - col1 / - col0 col0 FROM tab2
----
-154
-1969
-2985

query I rowsort
SELECT col0 * - col1 + + col1 AS col0 FROM tab1
----
-1027
-52
-630

query I rowsort
SELECT ALL - col0 - col1 * col2 AS col2 FROM tab0
----
-132
-2862
-7551

query I rowsort
SELECT ALL col0 + - col2 * col0 * - tab2.col1 AS col2 FROM tab2
----
119730
51113
5866

query I rowsort
SELECT col0 - col1 * col1 FROM tab1
----
-36
-673
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-8513
SELECT ALL + col0 * col2 + + tab0.col2 + tab0.col1 DIV tab0.col2 FROM tab0
----
133
7381
827

skipif mysql # not compatible
query I rowsort label-8513
SELECT ALL + col0 * col2 + + tab0.col2 + tab0.col1 / tab0.col2 FROM tab0
----
133
7381
827

query I rowsort
SELECT DISTINCT - col0 + col2 * col1 AS col2 FROM tab1
----
1168
1401
506

onlyif mysql # use DIV operator for integer division
query I rowsort label-8515
SELECT DISTINCT + col2 + + col0 DIV - col0 FROM tab2
----
25
26
37

skipif mysql # not compatible
query I rowsort label-8515
SELECT DISTINCT + col2 + + col0 / - col0 FROM tab2
----
25
26
37

query I rowsort
SELECT ALL + col2 + - col0 + + col2 AS col1 FROM tab2
----
-26
-3
47

query I rowsort
SELECT DISTINCT col0 + + cor0.col1 * col2 AS col1 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT DISTINCT - col1 * col0 + + col1 FROM tab0 cor0
----
-1978
-3298
-8008

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + cor0.col0 + col1 col2 FROM tab2 AS cor0
----
134
163
65

query I rowsort
SELECT - col2 * col1 * + cor0.col2 + + col0 FROM tab2 cor0
----
-22592
-24469
-39806

query I rowsort
SELECT ALL + col0 * cor0.col0 * + col2 AS col0 FROM tab2 AS cor0
----
1323
158184
237158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 * + col1 col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT col1 * - col1 + col0 AS col1 FROM tab2 AS cor0
----
-210
-3403
-954

onlyif mysql # use DIV operator for integer division
query I rowsort label-8524
SELECT col0 DIV - col0 + col2 + col2 * col2 FROM tab1 AS cor0
----
2969
3305
9311

skipif mysql # not compatible
query I rowsort label-8524
SELECT col0 / - col0 + col2 + col2 * col2 FROM tab1 AS cor0
----
2969
3305
9311

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + + col0 col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT col2 + - col1 + col2 FROM tab1 AS cor0
----
104
179
82

query I rowsort
SELECT - col2 + + col1 * col1 FROM tab0
----
7363
8199
9408

query I rowsort
SELECT + col2 + - col0 + col0 AS col0 FROM tab2
----
26
27
38

query I rowsort
SELECT + col2 * - col0 + col2 * tab2.col1 * col1 AS col0 FROM tab2
----
25758
7980
88478

query I rowsort
SELECT ALL - col0 - + tab1.col2 AS col1 FROM tab1
----
-121
-176
-57

query I rowsort
SELECT col0 FROM tab1 WHERE ( + col1 * + col0 ) <= NULL
----

query I rowsort
SELECT col0 + + col2 - - tab0.col2 AS col1 FROM tab0
----
253
37
90

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE ( col0 ) IN ( col0 / col2 )
----

query I rowsort
SELECT col1 + col2 - 29 FROM tab0 AS cor0
----
144
69
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-8535
SELECT col1 DIV tab0.col1 + col2 FROM tab0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-8535
SELECT col1 / tab0.col1 + col2 FROM tab0
----
2
34
83

query I rowsort
SELECT ALL - + col0 * - col0 + + col0 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT + + ( + cor0.col0 ) AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT DISTINCT - 93 + + col1 AS col2 FROM tab2 AS cor0
----
-34
-62
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 54 + + col0 col1 FROM tab1 AS cor0
----
-51
10
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-8540
SELECT col1 * col1 DIV col0 + col0 AS col0 FROM tab2
----
122
144
82

skipif mysql # not compatible
query I rowsort label-8540
SELECT col1 * col1 / col0 + col0 AS col0 FROM tab2
----
122
144
82

query I rowsort
SELECT col2 * + col0 * - col2 FROM tab1
----
-207936
-737280
-8748

onlyif mysql # use DIV operator for integer division
query I rowsort label-8542
SELECT tab0.col0 * col0 DIV col0 - - tab0.col0 AS col1 FROM tab0
----
178
48
70

skipif mysql # not compatible
query I rowsort label-8542
SELECT tab0.col0 * col0 / col0 - - tab0.col0 AS col1 FROM tab0
----
178
48
70

query III rowsort
SELECT * FROM tab0 WHERE NOT col0 + col1 NOT BETWEEN ( NULL ) AND - col1
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-8544
SELECT ALL col2 + + tab1.col1 DIV + col1 + - tab1.col1 * col1 * tab1.col0 FROM tab1
----
-13423
-1973
-6342

skipif mysql # not compatible
query I rowsort label-8544
SELECT ALL col2 + + tab1.col1 / + col1 + - tab1.col1 * col1 * tab1.col0 FROM tab1
----
-13423
-1973
-6342

query I rowsort
SELECT col1 * + col2 + + col2 FROM tab2
----
1560
684
864

query I rowsort
SELECT ALL col1 AS col1 FROM tab2 WHERE ( col0 * col1 - col1 ) NOT IN ( - col1 )
----
17
31
59

query I rowsort
SELECT ALL + col1 * - col1 * col0 + + col2 * col0 * col0 + + col2 FROM tab1
----
-1488
227129
600976

query I rowsort
SELECT DISTINCT + tab0.col2 * col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT DISTINCT tab1.col2 + - col1 - + col0 FROM tab1
----
-17
25
3

query I rowsort
SELECT - col0 * col0 * - col0 AS col0 FROM tab2
----
343
474552
493039

query I rowsort
SELECT DISTINCT + col0 - col0 * - col0 AS col0 FROM tab0 cor0
----
1260
600
8010

query I rowsort
SELECT ALL col2 * + cor0.col1 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL + col0 + + col1 * - col2 * col2 FROM tab1
----
-119728
-32426
-75813

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col2 FROM tab1, tab1 AS cor0 CROSS JOIN tab0
----
-10
-13
-26

query I rowsort
SELECT - tab0.col1 - col0 * tab0.col0 * col2 FROM tab0
----
-1322
-19094
-649613

query I rowsort
SELECT tab2.col2 - + tab2.col0 * col2 FROM tab2
----
-162
-2002
-2964

query III rowsort
SELECT * FROM tab2 WHERE col2 <> tab2.col1 / col0 - + col1
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT NULL BETWEEN col1 AND + col2
----

query I rowsort
SELECT ALL col2 + + col0 * + col1 AS col1 FROM tab0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT - tab0.col2 - - col2 * col1 * + tab0.col1 AS col2 FROM tab0
----
244035
678960
9408

query I rowsort
SELECT ALL - col0 - col1 AS col2 FROM tab1
----
-29
-74
-93

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL NOT IN ( col0 * + col1 + - col2 + col2 )
----

query I rowsort
SELECT + + col2 * + cor0.col2 + 85 * + col1 FROM tab0 AS cor0
----
14459
8246
8399

query I rowsort
SELECT 93 + col1 * + 61 AS col0 FROM tab2 AS cor0
----
1130
1984
3692

onlyif mysql # use DIV operator for integer division
query I rowsort label-8565
SELECT DISTINCT - col0 + + col2 DIV col0 FROM tab2
----
-4
-78
-79

skipif mysql # not compatible
query I rowsort label-8565
SELECT DISTINCT - col0 + + col2 / col0 FROM tab2
----
-4
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 66 col1 FROM tab2
----
-66
-66
-66

query I rowsort
SELECT - col1 + - 26 * cor0.col2 FROM tab2 AS cor0
----
-1005
-733
-735

query I rowsort
SELECT col2 * - col0 + + ( - col0 ) * - col2 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT 59 + 74 AS col0 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
133

query I rowsort
SELECT DISTINCT cor0.col1 * - cor0.col1 FROM tab0 cor0
----
-7396
-8281
-9409

query I rowsort
SELECT - 61 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to c91d7b51e91f33d302e697913fb438b6

query I rowsort
SELECT ALL col2 - - ( - col2 ) * col0 AS col1 FROM tab0
----
-34
-7216
-759

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8573
SELECT ALL - col1 + CAST( - col0 AS SIGNED ) * col0 FROM tab1
----
-35
-4106
-6413

skipif mysql # not compatible
query I rowsort label-8573
SELECT ALL - col1 + CAST ( - col0 AS INTEGER ) * col0 FROM tab1
----
-35
-4106
-6413

onlyif mysql # use DIV operator for integer division
query I rowsort label-8574
SELECT cor0.col1 DIV + tab0.col0 + tab0.col2 FROM tab0, tab2 AS cor0
----
9 values hashing to ecdb5a8550f24a07f1ee13f2f4f91aaf

skipif mysql # not compatible
query I rowsort label-8574
SELECT cor0.col1 / + tab0.col0 + tab0.col2 FROM tab0, tab2 AS cor0
----
9 values hashing to ecdb5a8550f24a07f1ee13f2f4f91aaf

query I rowsort
SELECT ALL tab2.col2 * col1 + - 80 + - col1 AS col2 FROM tab2
----
1395
549
726

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8576
SELECT - - CAST( NULL AS DECIMAL ) + + col0 + cor0.col1 * - ( col1 ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8576
SELECT - - CAST ( NULL AS REAL ) + + col0 + cor0.col1 * - ( col1 ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - ( 67 ) * - cor0.col1 + cor0.col0 FROM tab1 AS cor0
----
1745
734
951

query I rowsort
SELECT ALL - 14 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to d321461994ba49c3a70fa6373032fc94

query I rowsort
SELECT DISTINCT col2 + col1 * + tab0.col0 AS col1 FROM tab0
----
2097
3396
8181

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8580
SELECT DISTINCT + CAST( NULL AS DECIMAL ) FROM tab2, tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8580
SELECT DISTINCT + CAST ( NULL AS REAL ) FROM tab2, tab2 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8581
SELECT ALL + col2 + - CAST( - col2 * col1 AS SIGNED ) + - col0 FROM tab2
----
1482
605
857

skipif mysql # not compatible
query I rowsort label-8581
SELECT ALL + col2 + - CAST ( - col2 * col1 AS INTEGER ) + - col0 FROM tab2
----
1482
605
857

onlyif mysql # use DIV operator for integer division
query I rowsort label-8582
SELECT DISTINCT col1 * 54 + col0 DIV - tab0.col0 FROM tab0
----
4643
4913
5237

skipif mysql # not compatible
query I rowsort label-8582
SELECT DISTINCT col1 * 54 + col0 / - tab0.col0 FROM tab0
----
4643
4913
5237

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 cor0 CROSS JOIN tab2, tab2 AS cor1
----
972 values hashing to 64ce0e736818e884f0a9ecd075da5eb7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8584
SELECT + CAST( NULL AS SIGNED ) + col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8584
SELECT + CAST ( NULL AS INTEGER ) + col0 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - ( - 29 ) AS col1 FROM tab2 AS cor0
----
-29
-29
-29

query I rowsort
SELECT ALL - - 10 FROM tab2 AS cor0
----
10
10
10

onlyif mysql # use DIV operator for integer division
query I rowsort label-8587
SELECT DISTINCT + 23 DIV col2 FROM tab0 AS cor0
----
0
23

skipif mysql # not compatible
query I rowsort label-8587
SELECT DISTINCT + 23 / col2 FROM tab0 AS cor0
----
0
23

query I rowsort
SELECT - 86 - 85 FROM tab2 AS cor0
----
-171
-171
-171

query I rowsort
SELECT ALL - 24 * ( + cor0.col1 ) AS col0 FROM tab1 AS cor0
----
-240
-312
-624

query I rowsort
SELECT - - col0 + col1 + + col0 FROM tab1 AS cor0
----
138
173
32

query I rowsort
SELECT 77 * + 95 - cor0.col1 AS col0 FROM tab1 AS cor0
----
7289
7302
7305

query I rowsort
SELECT DISTINCT - ( + 32 ) AS col2 FROM tab1 AS cor0
----
-32

query I rowsort
SELECT ( col0 ) + + col1 AS col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL col2 * col1 * - col1 FROM tab2 AS cor0
----
-10982
-25947
-90506

query I rowsort
SELECT + + 63 * + 76 - col1 AS col1 FROM tab2 AS cor0
----
4729
4757
4771

query I rowsort
SELECT + - ( + 3 ) + col0 AS col1 FROM tab2 AS cor0
----
4
75
76

query I rowsort
SELECT DISTINCT ( - col2 ) * + col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT + ( col2 ) * - col2 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT col1 * + 8 AS col1 FROM tab1
----
104
208
80

query I rowsort
SELECT - tab1.col1 * + 14 FROM tab1
----
-140
-182
-364

query I rowsort
SELECT DISTINCT 0 FROM tab2, tab1 AS cor0
----
0

query I rowsort
SELECT + 31 * + col1 * col0 FROM tab1
----
19840
2418
32240

onlyif mysql # use DIV operator for integer division
query I rowsort label-8603
SELECT + 66 DIV col1 - - col2 AS col2 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-8603
SELECT + 66 / col1 - - col2 AS col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT - 83 * - col1 AS col0 FROM tab1
----
1079
2158
830

query I rowsort
SELECT col1 + col1 * col0 - + col1 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + 82 + + col1 FROM tab1 AS cor0
----
108
92
95

query I rowsort
SELECT - col1 * + col2 + cor0.col0 AS col1 FROM tab1 AS cor0
----
-1168
-1401
-506

onlyif mysql # use DIV operator for integer division
query I rowsort label-8608
SELECT + col0 - + col1 DIV 19 AS col1 FROM tab2 AS cor0
----
6
75
79

skipif mysql # not compatible
query I rowsort label-8608
SELECT + col0 - + col1 / 19 AS col1 FROM tab2 AS cor0
----
6
75
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + col0 col1 FROM tab1 cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-8610
SELECT DISTINCT col0 DIV col0 + col2 AS col1 FROM tab1 AS cor0
----
55
58
97

skipif mysql # not compatible
query I rowsort label-8610
SELECT DISTINCT col0 / col0 + col2 AS col1 FROM tab1 AS cor0
----
55
58
97

query I rowsort
SELECT + 37 * - 53 AS col0 FROM tab0
----
-1961
-1961
-1961

query I rowsort
SELECT - col0 * col1 + - col1 * col0 AS col1 FROM tab0 AS cor0
----
-16198
-4128
-6790

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 53 + col0 col0 FROM tab0 AS cor0
----
142
77
88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8614
SELECT ALL - col1 * CAST( NULL AS SIGNED ) / - col2 col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8614
SELECT ALL - col1 * CAST ( NULL AS INTEGER ) / - col2 col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - ( + cor1.col0 ) FROM tab1, tab0 AS cor0, tab0 cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

query I rowsort
SELECT + - col0 * - cor0.col1 AS col2 FROM tab1 cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-8617
SELECT 11 + col1 DIV col2 AS col2 FROM tab1 AS cor0
----
11
11
11

skipif mysql # not compatible
query I rowsort label-8617
SELECT 11 + col1 / col2 AS col2 FROM tab1 AS cor0
----
11
11
11

query I rowsort
SELECT ALL + 60 FROM tab2, tab2 AS cor0
----
9 values hashing to a97561e17ecaa618227c75a57b268f33

query I rowsort
SELECT DISTINCT + col0 + - 98 AS col0 FROM tab2 AS cor0
----
-19
-20
-91

onlyif mysql # use DIV operator for integer division
query I rowsort label-8620
SELECT ALL col1 DIV - 46 - col2 FROM tab0 AS cor0
----
-3
-34
-83

skipif mysql # not compatible
query I rowsort label-8620
SELECT ALL col1 / - 46 - col2 FROM tab0 AS cor0
----
-3
-34
-83

query I rowsort
SELECT col2 * col1 + + col1 * col1 FROM tab2 AS cor0
----
1798
5015
935

query I rowsort
SELECT - - col2 * + col0 * + 57 AS col2 FROM tab2 AS cor0
----
10773
115596
171114

query I rowsort
SELECT DISTINCT + + col2 + + 86 AS col1 FROM tab1 AS cor0
----
140
143
182

onlyif mysql # use DIV operator for integer division
query I rowsort label-8624
SELECT DISTINCT col1 DIV + ( 50 ) FROM tab2 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-8624
SELECT DISTINCT col1 / + ( 50 ) FROM tab2 AS cor0
----
0
1

query I rowsort
SELECT ALL + + col1 + col2 * 39 AS col2 FROM tab2 AS cor0
----
1073
1084
1499

query I rowsort
SELECT + + col1 + - ( + col1 ) + - col2 AS col0 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT - - col1 * 41 FROM tab2 AS cor0
----
1271
2419
697

query I rowsort
SELECT - col0 * ( + cor0.col2 ) FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL - + cor0.col1 * - ( col1 ) FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT + + col1 * - 10 * col2 AS col1 FROM tab0 AS cor0
----
-28380
-74620
-970

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8631
SELECT 20 * col0 - CAST( NULL AS SIGNED ) * col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8631
SELECT 20 * col0 - CAST ( NULL AS INTEGER ) * col0 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8632
SELECT DISTINCT - col1 DIV + col1 AS col0 FROM tab2
----
-1

skipif mysql # not compatible
query I rowsort label-8632
SELECT DISTINCT - col1 / + col1 AS col0 FROM tab2
----
-1

query IIIIIIIIIIII rowsort
SELECT * FROM tab1 cor0 CROSS JOIN tab1, tab0 AS cor1, tab1 cor2
----
972 values hashing to 465d072d2d9eababbfc8e88b82707474

query I rowsort
SELECT ALL - 16 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to be22ac76b42c6f7212ecc0ba7c89eb34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * - col1 + 31 col2 FROM tab1 AS cor0
----
1071
109
671

query I rowsort
SELECT - col0 * - col2 - col1 * col2 AS col2 FROM tab0 AS cor0
----
-164
-2046
-62

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 4b145ce61881e246723968d1ac787ac2

query I rowsort
SELECT DISTINCT - col1 * - 91 + col0 AS col2 FROM tab1
----
1263
2369
974

query I rowsort
SELECT ( 1 * - tab1.col1 + col0 ) AS col2 FROM tab1
----
-23
54
67

query I rowsort
SELECT - 69 * tab1.col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 3c2cf32686a3cf51d385ede68cdd5694

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col0 ) + - col1 * - 85 col1 FROM tab1 AS cor0
----
1185
2213
914

query I rowsort
SELECT + + cor1.col2 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT DISTINCT 7 + cor0.col1 + 19 AS col1 FROM tab1, tab2 AS cor0
----
43
57
85

query I rowsort
SELECT 43 + col2 * ( 48 ) FROM tab1 AS cor0
----
2635
2779
4651

query I rowsort
SELECT ALL - 79 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to c9cc9510604e093bd158ca33928acaed

onlyif mysql # use DIV operator for integer division
query I rowsort label-8646
SELECT ALL - col1 DIV + col0 AS col2 FROM tab2 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-8646
SELECT ALL - col1 / + col0 AS col2 FROM tab2 AS cor0
----
-4
0
0

query I rowsort
SELECT - 77 + col0 AS col1 FROM tab1
----
-13
-74
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-8648
SELECT ALL 37 DIV - col0 FROM tab2
----
-5
0
0

skipif mysql # not compatible
query I rowsort label-8648
SELECT ALL 37 / - col0 FROM tab2
----
-5
0
0

query I rowsort
SELECT DISTINCT - - 2 + cor0.col2 AS col1 FROM tab1 AS cor0
----
56
59
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-8650
SELECT DISTINCT - + 80 DIV col2 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-8650
SELECT DISTINCT - + 80 / col2 FROM tab1 AS cor0
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 12 col1 FROM tab0 AS cor0
----
12
12
12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 * cor0.col1 col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - 80 + + col1 AS col0 FROM tab0 AS cor0
----
11
17
6

query I rowsort
SELECT ALL - - col0 - + col1 AS col1 FROM tab1 AS cor0
----
-23
54
67

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8655
SELECT DISTINCT col2 - cor0.col2 / CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8655
SELECT DISTINCT col2 - cor0.col2 / CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8656
SELECT ALL + cor0.col1 + - col1 * ( 75 ) DIV col2 col1 FROM tab1 AS cor0
----
-10
-3
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8656
SELECT ALL + cor0.col1 + - col1 * ( 75 ) / col2 col1 FROM tab1 AS cor0
----
-10
-3
3

query I rowsort
SELECT ALL 36 * col1 + - col0 AS col0 FROM tab0 AS cor0
----
3072
3187
3457

onlyif mysql # use DIV operator for integer division
query I rowsort label-8658
SELECT ALL col2 * - cor0.col2 DIV col2 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-8658
SELECT ALL col2 * - cor0.col2 / col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT + 91 AS col2 FROM tab2, tab2 AS cor0, tab1 AS cor1, tab0, tab0 cor2
----
243 values hashing to d6f0339e9f022f317c10dc07cb55927b

onlyif mysql # use DIV operator for integer division
query I rowsort label-8660
SELECT col0 DIV + cor0.col2 FROM tab0 cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-8660
SELECT col0 / + cor0.col2 FROM tab0 cor0
----
0
1
35

query I rowsort
SELECT DISTINCT - col0 + col1 * - 54 FROM tab1 cor0
----
-1407
-604
-782

query I rowsort
SELECT ALL col2 * - 14 - col0 AS col1 FROM tab1 AS cor0
----
-1424
-759
-862

query I rowsort
SELECT DISTINCT - - col0 * + col2 AS col2 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8664
SELECT DISTINCT - + col0 / + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8664
SELECT DISTINCT - + col0 / + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL + col1 * - 77 * - col1 FROM tab2 AS cor0
----
22253
268037
73997

query I rowsort
SELECT DISTINCT + ( 92 ) FROM tab1, tab0 AS cor0
----
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-8667
SELECT cor0.col1 DIV - col2 AS col0 FROM tab0 AS cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-8667
SELECT cor0.col1 / - col2 AS col0 FROM tab0 AS cor0
----
-1
-2
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 + - 48 col1 FROM tab0 cor0
----
38
43
49

onlyif mysql # use DIV operator for integer division
query I rowsort label-8669
SELECT DISTINCT - ( col2 ) * col0 + col2 + + 12 DIV + col1 col2 FROM tab1 cor0
----
-108
-3590
-7584

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8669
SELECT DISTINCT - ( col2 ) * col0 + col2 + + 12 / + col1 col2 FROM tab1 cor0
----
-108
-3590
-7584

query I rowsort
SELECT + col0 * - 90 * tab0.col1 AS col2 FROM tab0
----
-185760
-305550
-728910

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8671
SELECT + CAST( NULL AS SIGNED ) * 61 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8671
SELECT + CAST ( NULL AS INTEGER ) * 61 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 * tab0.col2 + col1 * - 12 + + col1 FROM tab0
----
-1102
-1738
-8299

onlyif mysql # use DIV operator for integer division
query I rowsort label-8673
SELECT DISTINCT + - col2 + + col2 - + col1 DIV col1 col0 FROM tab0 AS cor0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8673
SELECT DISTINCT + - col2 + + col2 - + col1 / col1 col0 FROM tab0 AS cor0
----
-1

query I rowsort
SELECT + ( 25 ) + col2 FROM tab0 AS cor0
----
107
26
58

query I rowsort
SELECT 66 AS col1 FROM tab0, tab1 cor0
----
9 values hashing to 29794915b585eea848ad670075452c88

query I rowsort
SELECT DISTINCT - + 75 + col2 AS col1 FROM tab2 AS cor0
----
-37
-48
-49

query I rowsort
SELECT DISTINCT + col1 * - col1 + col0 AS col0 FROM tab1 cor0
----
-36
-673
-89

query I rowsort
SELECT ALL - - ( + 67 ) + - col1 + - 83 FROM tab2 AS cor0
----
-33
-47
-75

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( col1 AS REAL ) / cor0.col1 + col2 + + 7 AS col0 FROM tab0 AS cor0
----
41
9
90

query I rowsort
SELECT DISTINCT - - 38 - col1 AS col1 FROM tab0 AS cor0
----
-48
-53
-59

query I rowsort
SELECT + 48 + + col0 FROM tab0 AS cor0
----
137
72
83

query I rowsort
SELECT + - 15 * col2 + cor0.col2 * col2 FROM tab0 AS cor0
----
-14
5494
594

query I rowsort
SELECT DISTINCT + col2 + + cor0.col1 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL + 17 + + ( + col2 ) AS col2 FROM tab1
----
113
71
74

query I rowsort
SELECT + tab0.col0 * col2 * + col2 FROM tab0
----
26136
35
598436

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8686
SELECT DISTINCT + ( col1 ) * - CAST( NULL AS SIGNED ) + col0 * - col0 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-8686
SELECT DISTINCT + ( col1 ) * - CAST ( NULL AS INTEGER ) + col0 * - col0 FROM tab0 cor0
----
NULL

query I rowsort
SELECT ALL + + cor0.col2 - cor0.col0 AS col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT + - cor0.col0 AS col0 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT ALL - 49 * col1 * col0 + col1 FROM tab1
----
-31350
-3796
-50947

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - tab0.col1 col2 FROM tab0
----
-110
-132
-180

query I rowsort
SELECT - 51 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 08d3853e39924d3c636260a6dd856837

query I rowsort
SELECT 17 * 19 + tab1.col1 FROM tab1
----
333
336
349

query I rowsort
SELECT - 81 * 57 + col0 AS col1 FROM tab0
----
-4528
-4582
-4593

onlyif mysql # use DIV operator for integer division
query I rowsort label-8694
SELECT ALL ( col1 ) DIV + col1 + - 68 * col1 FROM tab0
----
-5847
-6187
-6595

skipif mysql # not compatible
query I rowsort label-8694
SELECT ALL ( col1 ) / + col1 + - 68 * col1 FROM tab0
----
-5847
-6187
-6595

query I rowsort
SELECT + col0 + + ( ( col1 ) ) * + col1 - + col0 FROM tab2 cor0
----
289
3481
961

query I rowsort
SELECT DISTINCT - col0 + 63 FROM tab1 AS cor0
----
-1
-17
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-8697
SELECT col1 + - ( - col2 ) DIV + col0 + cor0.col1 FROM tab0 AS cor0
----
173
182
194

skipif mysql # not compatible
query I rowsort label-8697
SELECT col1 + - ( - col2 ) / + col0 + cor0.col1 FROM tab0 AS cor0
----
173
182
194

query I rowsort
SELECT col0 * - col2 + - 15 AS col1 FROM tab0 AS cor0
----
-50
-7313
-807

query I rowsort
SELECT - col2 * - cor0.col2 + - col0 FROM tab2 AS cor0
----
1365
598
722

query I rowsort
SELECT + ( - col0 ) * col1 + + col1 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT + + col0 * + 16 + + col2 AS col1 FROM tab2 AS cor0
----
1274
1302
139

query I rowsort
SELECT - 33 + + 38 FROM tab0 AS cor0
----
5
5
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-8703
SELECT tab0.col0 DIV + 39 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to e1e0cfc6d15933eb424ade504a2163bc

skipif mysql # not compatible
query I rowsort label-8703
SELECT tab0.col0 / + 39 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to e1e0cfc6d15933eb424ade504a2163bc

query I rowsort
SELECT DISTINCT + - col2 - cor0.col0 AS col1 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT + 33 * + col2 + col2 FROM tab0 AS cor0
----
1122
2788
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + col1 + - col2 col2 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT + + col2 - + 90 FROM tab1 AS cor0
----
-33
-36
6

query I rowsort
SELECT DISTINCT - 38 AS col1 FROM tab2
----
-38

query I rowsort
SELECT DISTINCT + 61 AS col0 FROM tab1, tab0, tab0 AS cor0
----
61

query I rowsort
SELECT DISTINCT - - col2 * + cor0.col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL - col1 * - 70 + - col1 * + col1 FROM tab0 AS cor0
----
-1376
-1911
-2619

query I rowsort
SELECT + + ( cor0.col0 ) AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT DISTINCT - 96 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - tab0.col1 ) col2 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT 34 AS col2 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
34

query I rowsort
SELECT DISTINCT + col0 * - tab0.col2 AS col1 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT ALL + 96 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 22c5141a629f0ef396738ee2c8be6303

query I rowsort
SELECT + - col1 * - ( col0 ) FROM tab0 AS cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + col0 + col0 ) col1 FROM tab2
----
14
156
158

query I rowsort
SELECT + 22 * cor0.col1 * col0 FROM tab0 AS cor0
----
178178
45408
74690

query I rowsort
SELECT DISTINCT 91 FROM tab2 cor0
----
91

query I rowsort
SELECT - - col2 + col0 * + col0 * - col2 FROM tab0 cor0
----
-1224
-18975
-649440

onlyif mysql # use DIV operator for integer division
query I rowsort label-8723
SELECT DISTINCT - 50 DIV + col1 FROM tab2
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-8723
SELECT DISTINCT - 50 / + col1 FROM tab2
----
-1
-2
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8724
SELECT DISTINCT - col2 DIV 35 FROM tab0
----
-2
0

skipif mysql # not compatible
query I rowsort label-8724
SELECT DISTINCT - col2 / 35 FROM tab0
----
-2
0

query I rowsort
SELECT ALL 9 * col1 AS col1 FROM tab0
----
774
819
873

query I rowsort
SELECT DISTINCT - 13 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
-13

query I rowsort
SELECT + 70 AS col0 FROM tab2 cor0
----
70
70
70

query I rowsort
SELECT 58 AS col2 FROM tab2, tab0 cor0, tab2 AS cor1
----
27 values hashing to 9ee363c6ac19cfdb8a50c7dfd5cc2b8a

query I rowsort
SELECT + col0 + - col1 * col0 * - 64 FROM tab2 AS cor0
----
13895
294606
86031

query I rowsort
SELECT - - 52 * cor0.col1 AS col0 FROM tab2 AS cor0
----
1612
3068
884

query I rowsort
SELECT 6 + col1 * + col0 AS col2 FROM tab2 AS cor0
----
1349
223
4608

query I rowsort
SELECT - col2 + 12 FROM tab2
----
-14
-15
-26

query I rowsort
SELECT + 53 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to fede6033dee346dbd272085c05724fda

query I rowsort
SELECT ALL + 40 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

onlyif mysql # use DIV operator for integer division
query I rowsort label-8735
SELECT DISTINCT - - col1 DIV col1 AS col2 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-8735
SELECT DISTINCT - - col1 / col1 AS col2 FROM tab1 AS cor0
----
1

query I rowsort
SELECT - - col0 + ( + col0 ) AS col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT + 44 - + cor0.col2 FROM tab2, tab0 cor0
----
9 values hashing to 7dc81b41fbc768f9f27ec3bd1444b62e

query I rowsort
SELECT DISTINCT - col0 * cor0.col0 - col2 FROM tab1 AS cor0
----
-4153
-63
-6496

query I rowsort
SELECT ALL col2 * 94 FROM tab1 AS cor0
----
5076
5358
9024

query I rowsort
SELECT + ( + cor2.col1 ) FROM tab1, tab0 AS cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to 8c9db501a604ea66e3b5e5598f3f2a91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 86 col0 FROM tab1 cor0
----
-86
-86
-86

query I rowsort
SELECT ALL col0 * + col1 + + col2 FROM tab0 cor0
----
2097
3396
8181

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 21 col1 FROM tab0 AS cor0
----
-21
-21
-21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col0 col1 FROM tab0 AS cor0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + ( + col0 ) col2 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT + - 96 FROM tab2 AS cor0
----
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-8747
SELECT - 81 DIV - col1 FROM tab2 AS cor0
----
1
2
4

skipif mysql # not compatible
query I rowsort label-8747
SELECT - 81 / - col1 FROM tab2 AS cor0
----
1
2
4

query I rowsort
SELECT DISTINCT 40 + col0 AS col2 FROM tab0 AS cor0
----
129
64
75

onlyif mysql # use DIV operator for integer division
query I rowsort label-8749
SELECT DISTINCT + cor0.col2 + + col2 DIV cor0.col2 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-8749
SELECT DISTINCT + cor0.col2 + + col2 / cor0.col2 FROM tab0 AS cor0
----
2
34
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-8750
SELECT ALL - 3 DIV col2 - ( + col2 * cor0.col2 ) FROM tab1 AS cor0
----
-2916
-3249
-9216

skipif mysql # not compatible
query I rowsort label-8750
SELECT ALL - 3 / col2 - ( + col2 * cor0.col2 ) FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT - 73 FROM tab2, tab0 AS cor0
----
9 values hashing to 84ab9db5468b4a1781bd8d5c8e0e77fc

query I rowsort
SELECT DISTINCT + 44 * col2 FROM tab1 AS cor0
----
2376
2508
4224

query I rowsort
SELECT DISTINCT 10 * col2 FROM tab1
----
540
570
960

query I rowsort
SELECT + 84 + col0 AS col0 FROM tab2
----
162
163
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-8755
SELECT ALL col2 + + col2 DIV col2 AS col1 FROM tab1 AS cor0
----
55
58
97

skipif mysql # not compatible
query I rowsort label-8755
SELECT ALL col2 + + col2 / col2 AS col1 FROM tab1 AS cor0
----
55
58
97

query I rowsort
SELECT - cor0.col1 * - col2 + 68 AS col1 FROM tab0 AS cor0
----
165
2906
7530

query I rowsort
SELECT ALL col2 * col2 * - 6 + cor0.col2 * 89 FROM tab0 cor0
----
-33046
-3597
83

query I rowsort
SELECT ALL col0 + ( cor0.col1 ) FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT + cor0.col0 * col2 + cor0.col0 * + col0 AS col0 FROM tab1 AS cor0
----
14080
171
7744

query I rowsort
SELECT + + cor0.col0 * - 43 AS col2 FROM tab1 AS cor0
----
-129
-2752
-3440

query I rowsort
SELECT ALL - 88 * + col2 FROM tab1
----
-4752
-5016
-8448

query I rowsort
SELECT DISTINCT + cor0.col2 * ( + 68 ) + col0 AS col0 FROM tab1 AS cor0
----
3675
3940
6608

query I rowsort
SELECT ALL col1 + + ( + 8 + col0 * col2 ) AS col1 FROM tab1 AS cor0
----
196
3666
7701

query I rowsort
SELECT DISTINCT col1 + ( col2 * col2 + col0 ) FROM tab0
----
1199
133
6904

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab2, tab1 AS cor2
----
3645 values hashing to d5761ba4e40f0c65536d1d3c9de4e566

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - col2 * - col1 col0 FROM tab1 cor0
----
1344
1458
627

query I rowsort
SELECT DISTINCT - - 43 + + col1 * col0 FROM tab0 AS cor0
----
2107
3438
8142

query I rowsort
SELECT - 70 + col0 AS col2 FROM tab2 AS cor0
----
-63
8
9

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( col0 AS REAL ) AS col1 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8770
SELECT + CAST( col1 AS SIGNED ) + col0 FROM tab1 AS cor0
----
29
74
93

skipif mysql # not compatible
query I rowsort label-8770
SELECT + CAST ( col1 AS INTEGER ) + col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT col1 + 11 AS col1 FROM tab0
----
102
108
97

query I rowsort
SELECT DISTINCT tab2.col2 + col2 AS col2 FROM tab2
----
52
54
76

query I rowsort
SELECT + tab2.col2 + col2 * col1 + col1 AS col1 FROM tab2
----
1619
701
895

query I rowsort
SELECT + col1 + col2 * - col1 FROM tab0
----
-2752
-7371
0

query I rowsort
SELECT ALL tab1.col2 + 69 FROM tab1
----
123
126
165

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8776
SELECT tab0.col2 + - CAST( col1 AS SIGNED ) col2 FROM tab0
----
-53
-9
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8776
SELECT tab0.col2 + - CAST ( col1 AS INTEGER ) col2 FROM tab0
----
-53
-9
-96

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0 CROSS JOIN tab2, tab0, tab1 cor1
----
3645 values hashing to 77ce60d8d42550cc1b5a38c7d1dc5d13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 36 col0 FROM tab2, tab0 AS cor0 CROSS JOIN tab0, tab0 cor1
----
81 values hashing to e09b197365a04fabbaaf0718d2ae88c5

query I rowsort
SELECT - 18 * + 59 AS col1 FROM tab1 AS cor0
----
-1062
-1062
-1062

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8780
SELECT + CAST( - col2 AS SIGNED ) + + col2 * 38 FROM tab0 AS cor0
----
1221
3034
37

skipif mysql # not compatible
query I rowsort label-8780
SELECT + CAST ( - col2 AS INTEGER ) + + col2 * 38 FROM tab0 AS cor0
----
1221
3034
37

query I rowsort
SELECT DISTINCT cor0.col2 * col2 + - col0 FROM tab1 AS cor0
----
2913
3185
9136

query I rowsort
SELECT - ( + col2 ) * + col2 + - ( + col0 ) * + col1 FROM tab0 AS cor0
----
-14823
-3153
-3396

query I rowsort
SELECT ALL - col2 * col2 + - col2 AS col1 FROM tab1 AS cor0
----
-2970
-3306
-9312

query I rowsort
SELECT - col1 + + cor0.col0 AS col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT ALL ( col2 ) * - col0 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT - ( - 72 ) FROM tab1
----
72
72
72

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + ( tab0.col2 ) ) col2 FROM tab0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-8788
SELECT DISTINCT 85 * + 50 * col1 + - col1 DIV cor0.col0 AS col2 FROM tab0 AS cor0
----
365497
386749
412248

skipif mysql # not compatible
query I rowsort label-8788
SELECT DISTINCT 85 * + 50 * col1 + - col1 / cor0.col0 AS col2 FROM tab0 AS cor0
----
365497
386749
412248

query I rowsort
SELECT - 55 AS col0 FROM tab1 cor0
----
-55
-55
-55

query I rowsort
SELECT ALL - + col0 - 23 FROM tab0 cor0
----
-112
-47
-58

query I rowsort
SELECT ALL - col2 + col2 * col2 AS col0 FROM tab1 AS cor0
----
2862
3192
9120

query I rowsort
SELECT + ( cor0.col0 ) * - col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT ALL + 9 - 58 FROM tab2 AS cor0
----
-49
-49
-49

query I rowsort
SELECT DISTINCT + ( - cor0.col1 ) * col2 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT col0 * col0 * + col2 + + tab2.col2 + - col1 FROM tab2
----
1319
158151
237179

query I rowsort
SELECT tab0.col2 * + cor0.col1 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to e5422173e1caaeeb02bbae09b3f4e2fd

query I rowsort
SELECT ALL + + col0 * - col1 * col0 AS col1 FROM tab0 AS cor0
----
-118825
-49536
-720811

query I rowsort
SELECT ALL + 72 * col2 FROM tab1 AS cor0
----
3888
4104
6912

query I rowsort
SELECT - - col0 - col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + 28 AS col2 FROM tab2 cor0
----
28

query I rowsort
SELECT + + col2 * + col1 - ( + cor0.col0 ) * + col1 AS col2 FROM tab1 AS cor0
----
-70
1326
208

query I rowsort
SELECT - col2 * col2 * ( cor0.col0 ) - col0 * - ( - col0 ) FROM tab0 AS cor0
----
-1260
-26712
-606357

query I rowsort
SELECT DISTINCT + + 48 + col0 * + col0 AS col2 FROM tab2 AS cor0
----
6132
6289
97

query I rowsort
SELECT DISTINCT + col1 + col2 * col2 AS col1 FROM tab2
----
1461
735
760

query I rowsort
SELECT DISTINCT + cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
7
78
79

query I rowsort
SELECT col1 + - ( cor0.col2 ) * col0 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT col0 + 19 FROM tab2 AS cor0
----
26
97
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - ( ( + cor0.col1 ) * 61 ) + - ( - cor0.col1 ) col0 FROM tab0 AS cor0
----
451242
505232
574046

onlyif mysql # use DIV operator for integer division
query I rowsort label-8809
SELECT DISTINCT tab1.col1 DIV - 57 col1 FROM tab1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8809
SELECT DISTINCT tab1.col1 / - 57 col1 FROM tab1
----
0

query I rowsort
SELECT DISTINCT - col2 * ( - col2 ) * col2 FROM tab2 AS cor0
----
17576
19683
54872

query I rowsort
SELECT DISTINCT col2 + 82 AS col0 FROM tab0 cor0
----
115
164
83

query I rowsort
SELECT ALL + col0 * col1 * + col0 FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT ALL - cor0.col0 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query I rowsort
SELECT ALL - + cor0.col1 * + ( col2 ) AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8815
SELECT ALL CAST( NULL AS SIGNED ) * col0 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8815
SELECT ALL CAST ( NULL AS INTEGER ) * col0 AS col1 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8816
SELECT - CAST( - 19 AS SIGNED ) FROM tab0
----
19
19
19

skipif mysql # not compatible
query I rowsort label-8816
SELECT - CAST ( - 19 AS INTEGER ) FROM tab0
----
19
19
19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 25 * + col1 col2 FROM tab0
----
2150
2275
2425

query I rowsort
SELECT ( col0 ) + col1 AS col2 FROM tab2
----
137
38
96

query I rowsort
SELECT 1 + - 52 FROM tab0
----
-51
-51
-51

query I rowsort
SELECT DISTINCT + col0 + + cor0.col2 * + col2 AS col2 FROM tab2 cor0
----
1523
736
754

query I rowsort
SELECT + ( 80 ) + col0 FROM tab0 AS cor0
----
104
115
169

query I rowsort
SELECT ALL 99 * + 14 FROM tab2 AS cor0
----
1386
1386
1386

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8823
SELECT ALL + + CAST( + cor0.col0 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-8823
SELECT ALL + + CAST ( + cor0.col0 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT 9 + + col0 AS col1 FROM tab1 AS cor0
----
12
73
89

query I rowsort
SELECT DISTINCT 73 * - tab1.col0 FROM tab1, tab2 AS cor0
----
-219
-4672
-5840

onlyif mysql # use DIV operator for integer division
query I rowsort label-8826
SELECT ALL + col2 DIV + col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-8826
SELECT ALL + col2 / + col1 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + - col2 * col2 + - 15 col1 FROM tab1 AS cor0
----
-2957
-3274
-9244

query I rowsort
SELECT + ( + col1 ) * - cor0.col2 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + col2 * + ( - col0 ) AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-8830
SELECT DISTINCT + col0 * + col0 + + ( - col1 ) DIV col1 + + ( col1 ) * col1 col1 FROM tab0 cor0
----
10633
16201
7971

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8830
SELECT DISTINCT + col0 * + col0 + + ( - col1 ) / col1 + + ( col1 ) * col1 col1 FROM tab0 cor0
----
10633
16201
7971

query I rowsort
SELECT - + col1 * col2 + + 53 FROM tab0 AS cor0
----
-2785
-44
-7409

query I rowsort
SELECT ALL + col0 + col1 + + col1 AS col1 FROM tab1 AS cor0
----
106
55
84

query I rowsort
SELECT DISTINCT - col1 + ( - col0 * - cor0.col2 ) FROM tab0 AS cor0
----
-62
706
7207

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col2 + col1 col1 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-8835
SELECT DISTINCT cor0.col1 DIV + col1 + + col1 FROM tab1 cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-8835
SELECT DISTINCT cor0.col1 / + col1 + + col1 FROM tab1 cor0
----
11
14
27

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8836
SELECT - - CAST( 26 AS SIGNED ) FROM tab2 AS cor0
----
26
26
26

skipif mysql # not compatible
query I rowsort label-8836
SELECT - - CAST ( 26 AS INTEGER ) FROM tab2 AS cor0
----
26
26
26

query I rowsort
SELECT - 51 * col0 FROM tab2 AS cor0
----
-357
-3978
-4029

query I rowsort
SELECT - 8 AS col0 FROM tab1 AS cor0
----
-8
-8
-8

query I rowsort
SELECT ALL - ( cor0.col2 ) + col2 * col0 FROM tab2 cor0
----
162
2002
2964

query I rowsort
SELECT - col2 + 20 FROM tab2
----
-18
-6
-7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * 96 + + col1 col2 FROM tab2
----
1649
3007
5723

query I rowsort
SELECT + col2 + + 62 * 62 * col0 AS col2 FROM tab1
----
11586
246073
307616

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8843
SELECT + CAST( NULL AS SIGNED ) * 46 + cor0.col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8843
SELECT + CAST ( NULL AS INTEGER ) * 46 + cor0.col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0, tab1 cor1, tab0, tab2 AS cor2
----
3645 values hashing to d6a6e32c6adcc8525ed3eb7827781237

query I rowsort
SELECT DISTINCT + 38 * cor0.col0 AS col1 FROM tab1 AS cor0
----
114
2432
3040

query I rowsort
SELECT + + 89 * 52 FROM tab0 AS cor0
----
4628
4628
4628

query I rowsort
SELECT 85 * col2 + col2 * - col2 FROM tab2 AS cor0
----
1534
1566
1786

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 - + col1 col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 7 + col0 * col0 * + col1 FROM tab1 AS cor0
----
241
40967
83207

query I rowsort
SELECT ALL + 19 * + col1 - + cor0.col1 * col0 FROM tab0 AS cor0
----
-1552
-430
-6370

query I rowsort
SELECT ALL 18 * - col0 AS col1 FROM tab0 cor0
----
-1602
-432
-630

query I rowsort
SELECT 14 AS col0 FROM tab0 AS cor0
----
14
14
14

query I rowsort
SELECT ALL ( - 49 ) AS col2 FROM tab0
----
-49
-49
-49

query I rowsort
SELECT ALL - 83 FROM tab1
----
-83
-83
-83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8855
SELECT col1 * CAST( NULL AS SIGNED ) + + col2 + - col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8855
SELECT col1 * CAST ( NULL AS INTEGER ) + + col2 + - col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-8856
SELECT - cor0.col1 + 23 DIV cor0.col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-8856
SELECT - cor0.col1 + 23 / cor0.col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT - 12 AS col1 FROM tab1
----
-12
-12
-12

query I rowsort
SELECT ALL - + tab1.col1 AS col0 FROM tab1, tab0, tab0 cor0
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

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 tab2.col1 * col0 * - 38 FROM tab2
----
-174876
-51034
-8246

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8861
SELECT + + cor0.col2 + + CAST( NULL AS SIGNED ) * col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8861
SELECT + + cor0.col2 + + CAST ( NULL AS INTEGER ) * col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 + + col1 + + cor0.col2 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT col2 * + ( 46 ) + + cor0.col0 * - col0 * - col1 AS col1 FROM tab0 AS cor0
----
118871
51054
724583

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 17 + - col0 col0 FROM tab2
----
-61
-62
10

query I rowsort
SELECT ALL - col0 + col0 + col2 AS col2 FROM tab0
----
1
33
82

query I rowsort
SELECT - tab2.col0 + col1 * + col0 AS col1 FROM tab2
----
1264
210
4524

query I rowsort
SELECT ALL + 91 * col1 + tab0.col0 AS col1 FROM tab0
----
7850
8370
8862

query I rowsort
SELECT + col2 * col0 + 67 FROM tab1 AS cor0
----
229
3715
7747

query I rowsort
SELECT col2 * + col1 + + 26 FROM tab2 AS cor0
----
1560
672
863

onlyif mysql # use DIV operator for integer division
query I rowsort label-8870
SELECT ALL - ( cor0.col0 ) DIV 52 + col2 * - col0 AS col2 FROM tab2 AS cor0
----
-189
-2029
-3003

skipif mysql # not compatible
query I rowsort label-8870
SELECT ALL - ( cor0.col0 ) / 52 + col2 * - col0 AS col2 FROM tab2 AS cor0
----
-189
-2029
-3003

query I rowsort
SELECT - 11 AS col2 FROM tab2
----
-11
-11
-11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 36 * - col0 + + 14 col1 FROM tab2
----
-238
-2794
-2830

query I rowsort
SELECT + + col2 + col0 * + ( + col0 ) + col2 * 25 FROM tab2 AS cor0
----
6760
7229
751

query I rowsort
SELECT DISTINCT - col0 + 24 FROM tab0 AS cor0
----
-11
-65
0

query I rowsort
SELECT + col1 + - 16 FROM tab1 AS cor0
----
-3
-6
10

onlyif mysql # use DIV operator for integer division
query I rowsort label-8876
SELECT + col1 DIV - ( col0 ) FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-8876
SELECT + col1 / - ( col0 ) FROM tab0 AS cor0
----
-1
-2
-3

query I rowsort
SELECT DISTINCT 3 + + cor0.col1 AS col2 FROM tab1, tab1 cor0
----
13
16
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + ( + 65 * col1 ) col0 FROM tab0 AS cor0
----
5614
6004
6340

query I rowsort
SELECT DISTINCT col0 + - 73 FROM tab2 AS cor0
----
-66
5
6

query I rowsort
SELECT cor0.col0 + - ( + col2 ) AS col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT col1 * 27 * + col0 FROM tab1 cor0
----
17280
2106
28080

query I rowsort
SELECT ALL - cor0.col1 + col2 * cor0.col1 * cor0.col0 AS col2 FROM tab2 AS cor0
----
119593
51017
5828

query I rowsort
SELECT ALL - 33 * col0 * 58 FROM tab2
----
-13398
-149292
-151206

query I rowsort
SELECT + col0 + 83 AS col0 FROM tab2 AS cor0
----
161
162
90

query I rowsort
SELECT col0 * 36 FROM tab2 cor0
----
252
2808
2844

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 90 * + col1 + - col0 col1 FROM tab0 AS cor0
----
7716
8101
8695

query I rowsort
SELECT ALL col0 - ( + col1 ) AS col1 FROM tab0 cor0
----
-2
-62
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( + cor0.col2 ) * - col0 + + col1 col1 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT DISTINCT - 42 + ( col1 ) FROM tab2 AS cor0
----
-11
-25
17

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8890
SELECT - CAST( NULL AS DECIMAL ) * - col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-8890
SELECT - CAST ( NULL AS REAL ) * - col2 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 33 * col0 + - col2 FROM tab1 AS cor0
----
-153
-2169
-2736

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + + col1 col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT - ( col0 ) + + col1 * + col2 * - ( col0 + ( + ( col0 ) ) ) FROM tab1 AS cor0
----
-199760
-73024
-8427

query I rowsort
SELECT - - ( + col0 ) * - col2 * col1 + col1 * - col1 * + col2 AS col0 FROM tab0 AS cor0
----
-12804
-1343160
-312180

onlyif mysql # use DIV operator for integer division
query I rowsort label-8895
SELECT DISTINCT col1 DIV + col0 + + col2 AS col0 FROM tab2 AS cor0
----
26
31
38

skipif mysql # not compatible
query I rowsort label-8895
SELECT DISTINCT col1 / + col0 + + col2 AS col0 FROM tab2 AS cor0
----
26
31
38

query I rowsort
SELECT ALL + ( col0 ) - col1 * col0 FROM tab0 cor0
----
-2040
-3360
-8010

query I rowsort
SELECT - + cor0.col1 + + 9 * col1 FROM tab1 AS cor0
----
104
208
80

query I rowsort
SELECT ALL - - 30 * col0 AS col2 FROM tab2 AS cor0
----
210
2340
2370

onlyif mysql # use DIV operator for integer division
query I rowsort label-8899
SELECT ALL 87 DIV - col0 + - 17 AS col0 FROM tab1 AS cor0
----
-18
-18
-46

skipif mysql # not compatible
query I rowsort label-8899
SELECT ALL 87 / - col0 + - 17 AS col0 FROM tab1 AS cor0
----
-18
-18
-46

query I rowsort
SELECT + col1 + col0 * + cor0.col2 FROM tab1 cor0
----
188
3658
7693

onlyif mysql # use DIV operator for integer division
query I rowsort label-8901
SELECT DISTINCT col1 - col1 DIV 87 FROM tab0 AS cor0
----
86
90
96

skipif mysql # not compatible
query I rowsort label-8901
SELECT DISTINCT col1 - col1 / 87 FROM tab0 AS cor0
----
86
90
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col2 * tab0.col0 - - col2 col0 FROM tab0
----
36
7380
825

query I rowsort
SELECT + 81 * col1 FROM tab1 AS cor0
----
1053
2106
810

query I rowsort
SELECT DISTINCT col2 + + cor0.col1 * + cor0.col1 FROM tab0 cor0
----
7429
8363
9410

query I rowsort
SELECT ALL - - col2 + - col0 * col0 AS col2 FROM tab0 cor0
----
-1224
-543
-7839

query I rowsort
SELECT ALL col1 - cor0.col2 AS col0 FROM tab0 AS cor0
----
53
9
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 76 * col0 + col2 col2 FROM tab1 AS cor0
----
-174
-4807
-5984

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 36 * - col2 + - 82 col1 FROM tab1 cor0
----
-2026
-2134
-3538

query I rowsort
SELECT DISTINCT + - col1 * + col1 * col1 AS col1 FROM tab2 AS cor0
----
-205379
-29791
-4913

query I rowsort
SELECT DISTINCT - - 96 AS col2 FROM tab2 AS cor0
----
96

query I rowsort
SELECT + ( col1 ) + + col0 AS col1 FROM tab1 cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-8912
SELECT ALL - col2 DIV col0 AS col2 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-8912
SELECT ALL - col2 / col0 AS col2 FROM tab0 AS cor0
----
-1
0
0

query I rowsort
SELECT - ( col1 * col2 ) - + 70 AS col2 FROM tab0
----
-167
-2908
-7532

onlyif mysql # use DIV operator for integer division
query I rowsort label-8914
SELECT - 95 * 65 + - tab1.col2 DIV tab1.col1 AS col1 FROM tab1
----
-6177
-6180
-6182

skipif mysql # not compatible
query I rowsort label-8914
SELECT - 95 * 65 + - tab1.col2 / tab1.col1 AS col1 FROM tab1
----
-6177
-6180
-6182

query I rowsort
SELECT ALL + ( ( + col0 ) ) + 7 AS col1 FROM tab0
----
31
42
96

query I rowsort
SELECT ALL - - col1 - cor0.col2 AS col2 FROM tab0 AS cor0
----
53
9
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col1 ) * - col1 + - col0 * col1 col0 FROM tab2 AS cor0
----
-1178
-1632
-8083

query I rowsort
SELECT DISTINCT + 18 AS col2 FROM tab2, tab2 AS cor0
----
18

query I rowsort
SELECT DISTINCT + 14 + - col0 AS col1 FROM tab2
----
-64
-65
7

query I rowsort
SELECT - 10 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to bb7f754a7a056e665155ed52a63f5bc0

onlyif mysql # use DIV operator for integer division
query I rowsort label-8921
SELECT DISTINCT - + cor0.col1 DIV col2 + col2 + + col0 AS col2 FROM tab1 AS cor0
----
121
176
57

skipif mysql # not compatible
query I rowsort label-8921
SELECT DISTINCT - + cor0.col1 / col2 + col2 + + col0 AS col2 FROM tab1 AS cor0
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8922
SELECT ALL - col1 * col0 + + CAST( + col2 AS SIGNED ) AS col0 FROM tab1
----
-24
-583
-944

skipif mysql # not compatible
query I rowsort label-8922
SELECT ALL - col1 * col0 + + CAST ( + col2 AS INTEGER ) AS col0 FROM tab1
----
-24
-583
-944

query I rowsort
SELECT DISTINCT ( - cor0.col0 ) * col2 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT cor0.col2 + + col1 * - cor0.col0 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT ALL + tab2.col2 AS col0 FROM tab2, tab1 cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT + tab2.col2 + 77 AS col2 FROM tab2
----
103
104
115

onlyif mysql # use DIV operator for integer division
query I rowsort label-8927
SELECT 74 * + tab0.col2 DIV - col2 + ( + col2 * - col1 + ( - col1 ) ) FROM tab0
----
-268
-2998
-7627

skipif mysql # not compatible
query I rowsort label-8927
SELECT 74 * + tab0.col2 / - col2 + ( + col2 * - col1 + ( - col1 ) ) FROM tab0
----
-268
-2998
-7627

query I rowsort
SELECT + + 61 * 17 - + cor0.col1 * - 75 AS col1 FROM tab2 AS cor0
----
2312
3362
5462

query I rowsort
SELECT DISTINCT - 36 * + 88 * col2 + - 9 AS col1 FROM tab1
----
-171081
-180585
-304137

query I rowsort
SELECT + 63 + col0 + - col0 AS col1 FROM tab2
----
63
63
63

query I rowsort
SELECT ALL - ( + ( col1 ) ) * col1 + + col2 FROM tab1
----
-43
-622
-73

query I rowsort
SELECT ALL - 10 * - col0 AS col1 FROM tab0 cor0
----
240
350
890

query I rowsort
SELECT DISTINCT + cor1.col0 AS col2 FROM tab2, tab0 cor0, tab2 AS cor1
----
7
78
79

query I rowsort
SELECT DISTINCT - col2 + + col1 FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT + 22 * + col1 AS col0 FROM tab2 AS cor0
----
1298
374
682

query I rowsort
SELECT - 2 * + col0 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT ( 57 ) * col2 * - 23 AS col0 FROM tab2 AS cor0
----
-34086
-35397
-49818

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 + 7 FROM tab1, tab0 AS cor0
----
9 values hashing to 3362c0cb2b2c663037159d0699d46b76

query I rowsort
SELECT + 67 AS col0 FROM tab1 cor0
----
67
67
67

query I rowsort
SELECT 8 * 80 FROM tab2, tab2 AS cor0
----
9 values hashing to afde32c5e12d020b23d5997c79b19805

query I rowsort
SELECT - tab2.col2 + - tab2.col0 AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to a0bd6fe4ff31b307a7166ced74c5075b

query I rowsort
SELECT ( - tab0.col2 * col2 ) FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT 15 * + tab1.col0 AS col0 FROM tab1
----
1200
45
960

query I rowsort
SELECT ALL + 62 * col0 * + col0 + col2 + col0 AS col0 FROM tab2 AS cor0
----
3072
377312
387059

query I rowsort
SELECT DISTINCT + ( - col1 * col0 + + ( - col1 ) ) AS col1 FROM tab0
----
-2150
-3492
-8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-8947
SELECT col1 DIV - col2 + col0 * cor0.col2 FROM tab0 cor0
----
-62
7297
790

skipif mysql # not compatible
query I rowsort label-8947
SELECT col1 / - col2 + col0 * cor0.col2 FROM tab0 cor0
----
-62
7297
790

query I rowsort
SELECT + cor0.col2 * 92 + - 91 * col0 FROM tab1 AS cor0
----
-580
1552
4695

query I rowsort
SELECT ALL 52 + cor0.col1 AS col1 FROM tab2 cor0
----
111
69
83

query I rowsort
SELECT + + col1 + + col0 * + col0 + - cor0.col2 AS col0 FROM tab0 cor0
----
1321
629
7930

query I rowsort
SELECT ALL col0 * 95 FROM tab1
----
285
6080
7600

query I rowsort
SELECT DISTINCT col2 + ( - col1 + - cor0.col2 ) * + col1 * col0 FROM tab1 AS cor0
----
-113264
-42823
-6186

onlyif mysql # use DIV operator for integer division
query I rowsort label-8953
SELECT + + col2 + - 81 DIV 60 AS col0 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-8953
SELECT + + col2 + - 81 / 60 AS col0 FROM tab0 AS cor0
----
0
32
81

query I rowsort
SELECT + col2 * - 80 + cor0.col0 FROM tab1 AS cor0
----
-4317
-4496
-7600

query I rowsort
SELECT DISTINCT + col0 + 51 FROM tab2
----
129
130
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT - col1 + - ( cor0.col2 ) FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT + ( col2 ) + - col1 FROM tab1 AS cor0
----
28
47
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-8959
SELECT - col2 + - 24 DIV + col1 AS col1 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-8959
SELECT - col2 + - 24 / + col1 AS col1 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT - 23 AS col0 FROM tab2, tab1 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to c8c4f0bd925413f7f95df1d166aef9dd

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col0 + - cor0.col0 col0 FROM tab0 AS cor0
----
1190
552
7832

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 20 col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

query I rowsort
SELECT ALL + - 11 AS col2 FROM tab0 AS cor0
----
-11
-11
-11

onlyif mysql # use DIV operator for integer division
query I rowsort label-8964
SELECT col0 * + 79 + - cor0.col0 DIV ( + col0 ) AS col2 FROM tab1 AS cor0
----
236
5055
6319

skipif mysql # not compatible
query I rowsort label-8964
SELECT col0 * + 79 + - cor0.col0 / ( + col0 ) AS col2 FROM tab1 AS cor0
----
236
5055
6319

onlyif mysql # use DIV operator for integer division
query I rowsort label-8965
SELECT - col2 DIV 20 + col0 AS col2 FROM tab0 AS cor0
----
23
35
85

skipif mysql # not compatible
query I rowsort label-8965
SELECT - col2 / 20 + col0 AS col2 FROM tab0 AS cor0
----
23
35
85

query I rowsort
SELECT ALL - + ( col2 ) * + cor0.col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0, tab1 cor1, tab0, tab2 AS cor2
----
3645 values hashing to 773bb916e463ebc075d701108532badb

query I rowsort
SELECT ALL - + col0 * + 49 AS col0 FROM tab0 AS cor0
----
-1176
-1715
-4361

query I rowsort
SELECT - - col2 * ( 64 ) FROM tab1 AS cor0
----
3456
3648
6144

query I rowsort
SELECT ALL - + col1 * + 38 + col2 FROM tab1 AS cor0
----
-323
-398
-934

query I rowsort
SELECT + - col0 + + ( col2 + - col0 ) FROM tab0 cor0
----
-15
-69
-96

query I rowsort
SELECT col1 * col1 + - col0 AS col0 FROM tab2 AS cor0
----
210
3403
954

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1, tab2 cor0, tab0 AS cor1
----
972 values hashing to 58757c5bbbd4217c03cf2ac0b6126e55

query I rowsort
SELECT 27 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 1a3cef5c33b8f87ffeded378fd207753

query I rowsort
SELECT ALL - col0 * col1 * col2 AS col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT 66 * col1 AS col1 FROM tab0 AS cor0
----
5676
6006
6402

query I rowsort
SELECT DISTINCT col0 * - col2 + cor0.col0 * - 9 + - col1 FROM tab1 AS cor0
----
-215
-4234
-8413

query I rowsort
SELECT DISTINCT ( ( col0 ) ) - ( col1 ) FROM tab0
----
-2
-62

query I rowsort
SELECT 57 + tab0.col2 FROM tab0, tab1 AS cor0
----
9 values hashing to e4e0d28d0cf714c65cf04593ae67aa98

query I rowsort
SELECT - col1 + 84 FROM tab0
----
-13
-2
-7

query I rowsort
SELECT + ( col2 ) + + 56 AS col2 FROM tab0
----
138
57
89

query I rowsort
SELECT ALL 25 * + tab2.col1 + + 93 AS col1 FROM tab2
----
1568
518
868

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-8983
SELECT ALL - col2 * + col1 + col1 * ( col2 * + CAST( NULL AS SIGNED ) ) + cor0.col0 * - col2 col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-8983
SELECT ALL - col2 * + col1 + col1 * ( col2 * + CAST ( NULL AS INTEGER ) ) + cor0.col0 * - col2 col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + ( - col1 ) + 75 FROM tab1 AS cor0
----
49
62
65

query I rowsort
SELECT + 99 + col2 * col0 AS col2 FROM tab2 AS cor0
----
2127
288
3101

query I rowsort
SELECT DISTINCT col1 * + col1 + 42 * col0 AS col1 FROM tab2 AS cor0
----
1255
3607
6757

query I rowsort
SELECT DISTINCT + 6 - + col2 FROM tab2 AS cor0
----
-20
-21
-32

query I rowsort
SELECT col2 * + tab2.col2 + col0 * - col1 FROM tab2
----
-3926
101
512

query I rowsort
SELECT + col2 + - ( 3 ) AS col2 FROM tab1
----
51
54
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 1 col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT col2 - - col2 * + col1 * col1 FROM tab0
----
244101
679124
9410

query I rowsort
SELECT DISTINCT 93 AS col2 FROM tab2, tab1 AS cor0, tab0 AS cor1, tab0, tab2 AS cor2
----
93

query I rowsort
SELECT cor1.col2 AS col1 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT col0 * 58 FROM tab2 AS cor0
----
406
4524
4582

query I rowsort
SELECT ( + col2 ) * - col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT - - col2 - - col1 AS col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT col1 + 0 AS col2 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + 70 - - col1 * col0 FROM tab1 AS cor0
----
1110
148
710

query I rowsort
SELECT col2 * 19 + col2 AS col0 FROM tab0 AS cor0
----
1640
20
660

query I rowsort
SELECT ALL + - col0 + - col0 FROM tab1 cor0
----
-128
-160
-6

query I rowsort
SELECT DISTINCT - cor0.col2 * cor0.col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL cor0.col2 * cor0.col0 AS col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - col1 - 30 AS col2 FROM tab1 AS cor0
----
-40
-43
-56

query I rowsort
SELECT - ( 14 ) * + col1 + - cor0.col0 + + col1 AS col2 FROM tab0 AS cor0
----
-1142
-1272
-1296

onlyif mysql # use DIV operator for integer division
query I rowsort label-9005
SELECT ALL - - ( + col0 ) - - col0 DIV col1 AS col0 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-9005
SELECT ALL - - ( + col0 ) - - col0 / col1 AS col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT - cor0.col0 + 37 AS col2 FROM tab0 AS cor0
----
-52
13
2

query I rowsort
SELECT ALL cor0.col2 * ( cor0.col2 ) FROM tab1 cor0
----
2916
3249
9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 - col2 col2 FROM tab1 AS cor0
----
-28
-47
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-9009
SELECT ALL + + 67 * - col0 DIV + col0 AS col1 FROM tab2 AS cor0
----
-67
-67
-67

skipif mysql # not compatible
query I rowsort label-9009
SELECT ALL + + 67 * - col0 / + col0 AS col1 FROM tab2 AS cor0
----
-67
-67
-67

query I rowsort
SELECT + cor0.col0 * col0 - col0 FROM tab1 AS cor0
----
4032
6
6320

query I rowsort
SELECT ALL + 54 AS col1 FROM tab2
----
54
54
54

query I rowsort
SELECT DISTINCT + col2 * 86 AS col0 FROM tab0 AS cor0
----
2838
7052
86

query I rowsort
SELECT + + ( col1 ) + col1 * + ( col1 + col2 ) * 99 AS col0 FROM tab2 AS cor0
----
178033
496544
92582

query I rowsort
SELECT DISTINCT - ( + 92 ) + col1 FROM tab1 AS cor0
----
-66
-79
-82

query I rowsort
SELECT + 18 + - cor0.col0 FROM tab2, tab1 AS cor0
----
9 values hashing to a7f75b0a84f7287912ba7b770693785b

query I rowsort
SELECT ( - col0 ) + col0 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL ( + col1 ) * + col1 AS col0 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT - - 54 * + col1 * col1 AS col1 FROM tab0 AS cor0
----
399384
447174
508086

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 36 + cor0.col2 col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 02e74cc85484ebef95d60e4d930018a3

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab1, tab0 cor0, tab1 AS cor1
----
-1
-33
-82

query I rowsort
SELECT + 18 + col0 AS col2 FROM tab0 cor0
----
107
42
53

query I rowsort
SELECT 31 * col2 + col1 + col2 FROM tab1 AS cor0
----
1754
1834
3085

query I rowsort
SELECT + + 10 FROM tab0 cor0
----
10
10
10

query I rowsort
SELECT col2 * + col1 + - 56 + col2 FROM tab1 AS cor0
----
1288
1402
571

query I rowsort
SELECT + col0 + col2 - 36 * + col0 FROM tab2 AS cor0
----
-218
-2704
-2727

query I rowsort
SELECT + col0 + - col0 * col2 + - cor0.col1 AS col2 FROM tab0 AS cor0
----
-7300
-854
-97

query I rowsort
SELECT ALL + + 33 AS col0 FROM tab0 AS cor0
----
33
33
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 * col0 col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL + + ( col1 ) AS col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + col0 * col2 * col1 FROM tab1 AS cor0
----
36480
4212
99840

onlyif mysql # use DIV operator for integer division
query I rowsort label-9031
SELECT ALL - 0 DIV - col0 + + col2 AS col2 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-9031
SELECT ALL - 0 / - col0 + + col2 AS col2 FROM tab0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 64 * + col1 + + col2 col1 FROM tab0 AS cor0
----
5537
5906
6209

query I rowsort
SELECT ALL - - cor0.col0 + - 60 AS col1 FROM tab1 cor0
----
-57
20
4

query I rowsort
SELECT ALL + col1 * - 15 - - col1 FROM tab0 AS cor0
----
-1204
-1274
-1358

query I rowsort
SELECT DISTINCT + - cor0.col2 * - 33 + - 42 FROM tab0 AS cor0
----
-9
1047
2664

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9036
SELECT + col2 + + CAST( col0 AS SIGNED ) FROM tab0 cor0
----
171
36
57

skipif mysql # not compatible
query I rowsort label-9036
SELECT + col2 + + CAST ( col0 AS INTEGER ) FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT DISTINCT + col2 - cor0.col2 AS col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT - col0 - - col2 * col2 FROM tab0 AS cor0
----
-34
1065
6635

query I rowsort
SELECT ALL - col1 - + 15 AS col0 FROM tab2 AS cor0
----
-32
-46
-74

query I rowsort
SELECT + - col0 * col0 AS col2 FROM tab2 cor0
----
-49
-6084
-6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + - col1 col1 FROM tab1 AS cor0
----
28
47
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-9042
SELECT DISTINCT - + col2 DIV 37 AS col1 FROM tab2 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-9042
SELECT DISTINCT - + col2 / 37 AS col1 FROM tab2 AS cor0
----
-1
0

query I rowsort
SELECT DISTINCT + col1 + + 65 AS col2 FROM tab2 cor0
----
124
82
96

query I rowsort
SELECT - + col2 + 26 * + col0 * - col2 AS col0 FROM tab0 cor0
----
-189830
-20625
-911

query I rowsort
SELECT + col0 * - col0 + tab2.col0 FROM tab2
----
-42
-6006
-6162

query I rowsort
SELECT 83 FROM tab0, tab1, tab0 cor0
----
27 values hashing to 002a717a3d902d97220759065fb107c3

query I rowsort
SELECT DISTINCT + col1 + ( col0 ) * + col2 FROM tab2 cor0
----
2087
220
3019

query I rowsort
SELECT - + 2 + 76 FROM tab0 AS cor0
----
74
74
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 35 col0 FROM tab0, tab2 AS cor0
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

query I rowsort
SELECT + 45 AS col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 14cec871edc37b5056cda01c8331fdca

query I rowsort
SELECT - 38 FROM tab1, tab1 AS cor0
----
9 values hashing to e571541ae40cb0ddaca16e11f4359507

query I rowsort
SELECT + col0 + - col2 * 70 FROM tab0 AS cor0
----
-2286
-35
-5651

query I rowsort
SELECT + + 91 AS col2 FROM tab2 AS cor0
----
91
91
91

query I rowsort
SELECT ALL cor0.col2 - + col1 AS col1 FROM tab1 AS cor0
----
28
47
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-9055
SELECT ( - col2 ) * col0 + + col1 DIV - col0 FROM tab0 AS cor0
----
-37
-7299
-795

skipif mysql # not compatible
query I rowsort label-9055
SELECT ( - col2 ) * col0 + + col1 / - col0 FROM tab0 AS cor0
----
-37
-7299
-795

query I rowsort
SELECT - 21 * col2 + col2 AS col2 FROM tab2 AS cor0
----
-520
-540
-760

query I rowsort
SELECT ALL + ( + col1 ) * + col1 + 95 AS col2 FROM tab2
----
1056
3576
384

query I rowsort
SELECT - tab0.col1 + + col0 + - col1 * - tab0.col1 FROM tab0
----
7334
8279
9347

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 + col2 col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + - col2 * - cor0.col1 + - col2 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT - col0 * col2 * 14 AS col1 FROM tab0
----
-102172
-11088
-490

query I rowsort
SELECT + + col1 * col2 - + col0 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT ALL col1 + 48 * col1 FROM tab2
----
1519
2891
833

query I rowsort
SELECT - - col0 + ( - col0 * - 29 ) + col1 * col2 AS col1 FROM tab2 AS cor0
----
1047
3016
3874

query I rowsort
SELECT DISTINCT col1 * col1 * + tab2.col0 FROM tab2
----
22831
271518
6727

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 88 col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

query I rowsort
SELECT col1 + 78 AS col1 FROM tab1
----
104
88
91

query I rowsort
SELECT DISTINCT col2 + - 69 * 59 AS col0 FROM tab2
----
-4033
-4044
-4045

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab0 cor2
----
972 values hashing to 67c5300bc5cba0be4f54a444dc6f05b9

query I rowsort
SELECT + col0 * + col2 + - tab2.col1 + - col1 * 95 FROM tab2
----
-2787
-3636
1370

query I rowsort
SELECT DISTINCT - 73 FROM tab0
----
-73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9072
SELECT DISTINCT CAST( ( col2 ) AS SIGNED ) * + 48 AS col0 FROM tab0
----
1584
3936
48

skipif mysql # not compatible
query I rowsort label-9072
SELECT DISTINCT CAST ( ( col2 ) AS INTEGER ) * + 48 AS col0 FROM tab0
----
1584
3936
48

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9073
SELECT DISTINCT CAST( + 26 AS SIGNED ) + col1 * - col0 AS col1 FROM tab2
----
-1317
-191
-4576

skipif mysql # not compatible
query I rowsort label-9073
SELECT DISTINCT CAST ( + 26 AS INTEGER ) + col1 * - col0 AS col1 FROM tab2
----
-1317
-191
-4576

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9074
SELECT - CAST( NULL AS SIGNED ) * col2 AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9074
SELECT - CAST ( NULL AS INTEGER ) * col2 AS col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 13 * ( - cor0.col2 ) AS col2 FROM tab2 AS cor0
----
-338
-351
-494

query I rowsort
SELECT DISTINCT - - col2 * 78 + col2 AS col1 FROM tab1 AS cor0
----
4266
4503
7584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 64 * col0 col1 FROM tab1 AS cor0
----
192
4096
5120

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9078
SELECT - ( ( col2 ) ) * CAST( + 11 AS SIGNED ) FROM tab1 cor0
----
-1056
-594
-627

skipif mysql # not compatible
query I rowsort label-9078
SELECT - ( ( col2 ) ) * CAST ( + 11 AS INTEGER ) FROM tab1 cor0
----
-1056
-594
-627

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * ( col2 ) - col1 col1 FROM tab1 AS cor0
----
2890
3239
9203

query I rowsort
SELECT + 76 + - col2 + cor0.col2 FROM tab1 cor0
----
76
76
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-9081
SELECT DISTINCT + - col0 + - col2 DIV + col1 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-9081
SELECT DISTINCT + - col0 + - col2 / + col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT ALL ( col2 ) - + tab0.col1 AS col1 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT ALL - tab1.col0 AS col1 FROM tab1, tab0 cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9084
SELECT ALL + col0 * + col2 * CAST( NULL AS SIGNED ) + col1 AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9084
SELECT ALL + col0 * + col2 * CAST ( NULL AS INTEGER ) + col1 AS col2 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9085
SELECT ALL + 40 * + tab1.col0 * + col0 + + col0 + - tab1.col1 DIV - col2 AS col1 FROM tab1
----
163904
256080
363

skipif mysql # not compatible
query I rowsort label-9085
SELECT ALL + 40 * + tab1.col0 * + col0 + + col0 + - tab1.col1 / - col2 AS col1 FROM tab1
----
163904
256080
363

onlyif mysql # use DIV operator for integer division
query I rowsort label-9086
SELECT DISTINCT 94 * col1 + + col1 DIV 91 AS col1 FROM tab1
----
1222
2444
940

skipif mysql # not compatible
query I rowsort label-9086
SELECT DISTINCT 94 * col1 + + col1 / 91 AS col1 FROM tab1
----
1222
2444
940

query I rowsort
SELECT col2 * col0 + 16 * col0 FROM tab1 cor0
----
210
4672
8960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9088
SELECT ALL col1 * col2 / CAST( NULL AS SIGNED ) + col0 * + col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9088
SELECT ALL col1 * col2 / CAST ( NULL AS INTEGER ) + col0 * + col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT 49 + col0 + - col0 FROM tab0 AS cor0
----
49
49
49

query I rowsort
SELECT - - col1 + - cor0.col1 * - col0 + col2 * - col0 AS col1 FROM tab1 cor0
----
-2998
-58
-6627

query I rowsort
SELECT DISTINCT 16 AS col2 FROM tab0 AS cor0
----
16

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9092
SELECT DISTINCT col2 * CAST( NULL AS SIGNED ) AS col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-9092
SELECT DISTINCT col2 * CAST ( NULL AS INTEGER ) AS col1 FROM tab1
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9093
SELECT DISTINCT + col0 DIV CAST( - col1 * - col1 AS SIGNED ) AS col1 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-9093
SELECT DISTINCT + col0 / CAST ( - col1 * - col1 AS INTEGER ) AS col1 FROM tab1
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9094
SELECT + col0 * - CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9094
SELECT + col0 * - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col2 col0 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-9096
SELECT 21 DIV col1 AS col1 FROM tab2 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-9096
SELECT 21 / col1 AS col1 FROM tab2 AS cor0
----
0
0
1

query I rowsort
SELECT - + 45 * - col2 * - col2 FROM tab0 AS cor0
----
-302580
-45
-49005

onlyif mysql # use DIV operator for integer division
query I rowsort label-9098
SELECT ALL + col2 DIV - ( col0 ) AS col2 FROM tab1
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-9098
SELECT ALL + col2 / - ( col0 ) AS col2 FROM tab1
----
-1
-18
0

query I rowsort
SELECT ALL - col0 * - 54 AS col1 FROM tab0 AS cor0
----
1296
1890
4806

query I rowsort
SELECT DISTINCT col0 * - 25 FROM tab2 AS cor0
----
-175
-1950
-1975

query I rowsort
SELECT + 14 * cor0.col2 FROM tab2 AS cor0
----
364
378
532

query I rowsort
SELECT + + col2 + ( - col0 ) FROM tab0 cor0
----
-34
-7
9

query I rowsort
SELECT - ( - 87 ) FROM tab1, tab0 cor0
----
9 values hashing to fa0cdd86483844cda3bb806e032d5c64

query I rowsort
SELECT DISTINCT col2 * 42 * + col1 FROM tab1 AS cor0
----
23940
52416
58968

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 cor0, tab1 AS cor1, tab2 cor2
----
972 values hashing to 72eb3d4d523f5d0c69d1b855edd18f4a

onlyif mysql # use DIV operator for integer division
query I rowsort label-9106
SELECT ALL col0 DIV - ( - 15 ) FROM tab0 AS cor0
----
1
2
5

skipif mysql # not compatible
query I rowsort label-9106
SELECT ALL col0 / - ( - 15 ) FROM tab0 AS cor0
----
1
2
5

query I rowsort
SELECT ALL + col2 * - col0 + col1 * col1 FROM tab1 AS cor0
----
-3548
-7511
514

query I rowsort
SELECT DISTINCT + col1 * col2 + col0 * + col0 AS col2 FROM tab1 AS cor0
----
1413
4666
7648

query I rowsort
SELECT ALL - 17 * col0 + - col2 FROM tab2 AS cor0
----
-1352
-1381
-146

query I rowsort
SELECT DISTINCT - col1 + - 25 AS col1 FROM tab2 AS cor0
----
-42
-56
-84

query I rowsort
SELECT DISTINCT - - 75 * col2 AS col1 FROM tab0 AS cor0
----
2475
6150
75

query I rowsort
SELECT - - col2 * + cor0.col0 - cor0.col2 FROM tab2 AS cor0
----
162
2002
2964

query I rowsort
SELECT ALL + col0 - 72 * + 6 AS col0 FROM tab1
----
-352
-368
-429

query I rowsort
SELECT ALL + col2 + - ( tab2.col1 ) FROM tab2
----
-33
-4
21

query I rowsort
SELECT ALL - col1 + ( 40 ) AS col0 FROM tab1
----
14
27
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * col1 + + col0 * + col2 col0 FROM tab1
----
240
4288
8720

skipif mysql # not compatible
query I rowsort
SELECT ALL - tab2.col1 + CAST ( 97 AS REAL ) * col0 AS col2 FROM tab2
----
648
7507
7646

onlyif mysql # use DIV operator for integer division
query I rowsort label-9118
SELECT ALL col2 + 55 * col1 DIV col1 AS col0 FROM tab2
----
81
82
93

skipif mysql # not compatible
query I rowsort label-9118
SELECT ALL col2 + 55 * col1 / col1 AS col0 FROM tab2
----
81
82
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 * col2 col0 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-9120
SELECT ALL - + col0 DIV - col1 col2 FROM tab2 AS cor0
----
0
1
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9120
SELECT ALL - + col0 / - col1 col2 FROM tab2 AS cor0
----
0
1
4

query I rowsort
SELECT DISTINCT + 10 + col0 AS col1 FROM tab0 AS cor0
----
34
45
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + tab1.col0 col2 FROM tab1
----
128
160
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + tab0.col1 ) + - tab0.col0 col2 FROM tab0
----
-110
-132
-180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + col0 col1 FROM tab1
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-9125
SELECT DISTINCT 38 DIV + tab2.col1 FROM tab2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-9125
SELECT DISTINCT 38 / + tab2.col1 FROM tab2
----
0
1
2

query I rowsort
SELECT + 38 - col2 AS col2 FROM tab1
----
-16
-19
-58

onlyif mysql # use DIV operator for integer division
query I rowsort label-9127
SELECT ALL col2 DIV 29 + col2 * col2 AS col2 FROM tab0
----
1
1090
6726

skipif mysql # not compatible
query I rowsort label-9127
SELECT ALL col2 / 29 + col2 * col2 AS col2 FROM tab0
----
1
1090
6726

query I rowsort
SELECT ALL ( col0 * - col1 ) + 46 FROM tab1
----
-32
-594
-994

query I rowsort
SELECT DISTINCT + 44 * + 9 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
396

query I rowsort
SELECT ALL col0 * + tab2.col1 * - 50 AS col2 FROM tab2
----
-10850
-230100
-67150

onlyif mysql # use DIV operator for integer division
query I rowsort label-9131
SELECT DISTINCT + ( col2 ) + ( - col2 ) + col1 DIV + 45 AS col2 FROM tab0 AS cor0
----
1
2

skipif mysql # not compatible
query I rowsort label-9131
SELECT DISTINCT + ( col2 ) + ( - col2 ) + col1 / + 45 AS col2 FROM tab0 AS cor0
----
1
2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9132
SELECT ALL + 4 * col0 - CAST( + col2 * col1 AS SIGNED ) AS col0 FROM tab2 cor0
----
-1222
-330
-809

skipif mysql # not compatible
query I rowsort label-9132
SELECT ALL + 4 * col0 - CAST ( + col2 * col1 AS INTEGER ) AS col0 FROM tab2 cor0
----
-1222
-330
-809

query I rowsort
SELECT ALL 63 + - col1 AS col0 FROM tab1 AS cor0
----
37
50
53

query I rowsort
SELECT DISTINCT + 1 + - cor0.col1 * - col0 AS col0 FROM tab1 AS cor0
----
1041
641
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-9135
SELECT ALL - - col0 DIV + col0 AS col0 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9135
SELECT ALL - - col0 / + col0 AS col0 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT ALL 14 * col0 AS col0 FROM tab2 AS cor0
----
1092
1106
98

query I rowsort
SELECT ALL + - 74 FROM tab0 cor0
----
-74
-74
-74

query I rowsort
SELECT DISTINCT + 63 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
63

query I rowsort
SELECT - ( + col0 ) * + col0 AS col1 FROM tab1 AS cor0
----
-4096
-6400
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 4 * col0 + + ( col2 ) * + col2 col0 FROM tab1
----
2928
3505
9536

onlyif mysql # use DIV operator for integer division
query I rowsort label-9141
SELECT DISTINCT 20 DIV col1 AS col1 FROM tab2
----
0
1

skipif mysql # not compatible
query I rowsort label-9141
SELECT DISTINCT 20 / col1 AS col1 FROM tab2
----
0
1

query I rowsort
SELECT + - col1 + cor0.col2 * ( col1 + + col2 ) AS col2 FROM tab1 AS cor0
----
10451
3809
4294

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9143
SELECT ALL + 47 * col0 + - CAST( NULL AS SIGNED ) * + 7 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-9143
SELECT ALL + 47 * col0 + - CAST ( NULL AS INTEGER ) * + 7 col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - col0 + col2 AS col2 FROM tab2 cor0
----
104
117
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9145
SELECT DISTINCT cor0.col2 * - CAST( NULL AS DECIMAL ) col0 FROM tab0, tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9145
SELECT DISTINCT cor0.col2 * - CAST ( NULL AS REAL ) col0 FROM tab0, tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + - col0 + + ( col2 ) AS col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT DISTINCT + col0 + cor0.col2 AS col2 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT DISTINCT + - col1 * col0 + col1 * + col1 FROM tab1 cor0
----
-540
-871
598

onlyif mysql # use DIV operator for integer division
query I rowsort label-9149
SELECT - col0 DIV + 49 col0 FROM tab0 AS cor0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9149
SELECT - col0 / + 49 col0 FROM tab0 AS cor0
----
-1
0
0

query I rowsort
SELECT ALL - cor0.col2 * col0 + + col2 AS col2 FROM tab1 AS cor0
----
-108
-3591
-7584

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9151
SELECT DISTINCT + + col1 * - CAST( col2 AS SIGNED ) FROM tab1 AS cor0
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort label-9151
SELECT DISTINCT + + col1 * - CAST ( col2 AS INTEGER ) FROM tab1 AS cor0
----
-1248
-1404
-570

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 CROSS JOIN tab2, tab1 AS cor1, tab1, tab2 cor2 WHERE NOT NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT col1 * + col0 * col2 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT + col0 + + 17 AS col2 FROM tab1 AS cor0
----
20
81
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 * cor0.col0 + + 99 col1 FROM tab0 cor0
----
1324
675
8020

query I rowsort
SELECT + cor0.col0 * 3 AS col0 FROM tab2 AS cor0
----
21
234
237

query I rowsort
SELECT DISTINCT col1 * - 38 FROM tab1 AS cor0
----
-380
-494
-988

query I rowsort
SELECT ALL 94 + col0 FROM tab2
----
101
172
173

query I rowsort
SELECT ( 17 ) AS col0 FROM tab1, tab2 AS cor0 CROSS JOIN tab0
----
27 values hashing to e0dd9155e4d67132637a04c18ef46b2a

query I rowsort
SELECT ALL + col0 + + 99 AS col1 FROM tab1 AS cor0
----
102
163
179

query I rowsort
SELECT + 2 + + col0 FROM tab2 AS cor0
----
80
81
9

query I rowsort
SELECT ALL + ( col1 ) * + col1 AS col0 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT DISTINCT + 44 + + 62 * col2 FROM tab2 cor0
----
1656
1718
2400

query I rowsort
SELECT ALL - - col1 + + col0 * col2 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT ALL col1 + 37 * col0 AS col0 FROM tab1 AS cor0
----
137
2378
2973

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + cor0.col2 ) + - col0 * + col1 col0 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT DISTINCT - 47 * col1 AS col0 FROM tab0 AS cor0
----
-4042
-4277
-4559

query I rowsort
SELECT col2 * - col0 + - col2 FROM tab1 cor0
----
-216
-3705
-7776

query I rowsort
SELECT DISTINCT - 93 AS col0 FROM tab0 cor0
----
-93

query I rowsort
SELECT DISTINCT + col1 + col0 * col1 FROM tab1 AS cor0
----
104
1053
650

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9171
SELECT + CAST( - col0 AS SIGNED ) * col1 + col0 FROM tab2 AS cor0
----
-1264
-210
-4524

skipif mysql # not compatible
query I rowsort label-9171
SELECT + CAST ( - col0 AS INTEGER ) * col1 + col0 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT ALL cor0.col0 * col1 * + col2 AS col0 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT ALL ( - col1 ) * col1 AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

onlyif mysql # use DIV operator for integer division
query I rowsort label-9174
SELECT - - ( + col0 ) + col0 DIV 84 FROM tab1 cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-9174
SELECT - - ( + col0 ) + col0 / 84 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT DISTINCT - 30 * col2 + col0 FROM tab2 AS cor0
----
-1061
-702
-803

query I rowsort
SELECT DISTINCT - col0 + + col0 * 67 FROM tab0 AS cor0
----
1584
2310
5874

query I rowsort
SELECT cor0.col0 + col2 * + 88 AS col2 FROM tab1 cor0
----
4755
5080
8528

onlyif mysql # use DIV operator for integer division
query I rowsort label-9178
SELECT ALL + cor0.col1 * 91 DIV ( cor0.col0 ) FROM tab0, tab0 AS cor0
----
9 values hashing to a5933b7d5415ddf14cb98d5d9526881a

skipif mysql # not compatible
query I rowsort label-9178
SELECT ALL + cor0.col1 * 91 / ( cor0.col0 ) FROM tab0, tab0 AS cor0
----
9 values hashing to a5933b7d5415ddf14cb98d5d9526881a

query I rowsort
SELECT 21 AS col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 312c166f4dc412730c43555105b1f44b

query I rowsort
SELECT DISTINCT - cor0.col0 + + col0 AS col1 FROM tab0 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 40 * + 23 + - col2 col1 FROM tab0
----
-1002
-921
-953

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 86 col2 FROM tab0 AS cor0
----
86
86
86

query I rowsort
SELECT ALL + 38 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9184
SELECT col1 * CAST( 90 AS SIGNED ) * - tab0.col2 FROM tab0
----
-255420
-671580
-8730

skipif mysql # not compatible
query I rowsort label-9184
SELECT col1 * CAST ( 90 AS INTEGER ) * - tab0.col2 FROM tab0
----
-255420
-671580
-8730

onlyif mysql # use DIV operator for integer division
query I rowsort label-9185
SELECT col2 * - ( + col1 ) DIV col1 FROM tab1
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-9185
SELECT col2 * - ( + col1 ) / col1 FROM tab1
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col2 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT ALL col0 * col0 * tab2.col1 FROM tab2
----
106097
1519
358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-9188
SELECT DISTINCT - col0 DIV + col0 AS col2 FROM tab0
----
-1

skipif mysql # not compatible
query I rowsort label-9188
SELECT DISTINCT - col0 / + col0 AS col2 FROM tab0
----
-1

query I rowsort
SELECT col2 - - col0 * + col1 FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT - col0 * ( col1 ) AS col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + col0 * + 40 FROM tab0
----
1400
3560
960

query I rowsort
SELECT - ( + cor0.col1 ) * col0 + 6 + - col1 FROM tab0 AS cor0
----
-2144
-3486
-8184

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col2 col0 FROM tab2
----
-41
-52
20

query I rowsort
SELECT - - col1 + col0 * + col0 + - 54 FROM tab1 AS cor0
----
-19
4052
6359

query I rowsort
SELECT + ( - 13 ) AS col1 FROM tab1 AS cor0
----
-13
-13
-13

query I rowsort
SELECT + 17 - - col2 FROM tab0 cor0
----
18
50
99

query I rowsort
SELECT DISTINCT - - ( + col0 ) * col2 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT 4 + cor0.col1 FROM tab0 AS cor0
----
101
90
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 * - col2 + ( - cor0.col1 ) col1 FROM tab2 AS cor0
----
-1593
-663
-868

query I rowsort
SELECT DISTINCT - col2 + col1 * + col0 AS col2 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT + col0 * col1 + col2 AS col0 FROM tab1 cor0
----
1136
132
697

query I rowsort
SELECT - - cor0.col0 * - cor0.col0 AS col1 FROM tab0 AS cor0
----
-1225
-576
-7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-9203
SELECT col2 + col2 DIV - 58 col1 FROM tab1 AS cor0
----
54
57
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9203
SELECT col2 + col2 / - 58 col1 FROM tab1 AS cor0
----
54
57
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - 12 col1 FROM tab2 AS cor0
----
-38
-39
-50

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9205
SELECT - - col2 * CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9205
SELECT - - col2 * CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9206
SELECT + - col2 + CAST( NULL AS SIGNED ) * col2 + col2 * - col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9206
SELECT + - col2 + CAST ( NULL AS INTEGER ) * col2 + col2 * - col2 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ( col2 * 39 ) AS col1 FROM tab0
----
1287
3198
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col1 * + col1 col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL - col2 - col2 * - col1 AS col1 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT DISTINCT + col0 * 0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL col0 + + col0 * col1 + col1 FROM tab0 AS cor0
----
2174
3527
8279

query I rowsort
SELECT DISTINCT + col0 * 42 + col1 AS col0 FROM tab2 AS cor0
----
325
3335

query I rowsort
SELECT ALL col1 - + 35 * + col0 AS col0 FROM tab2 AS cor0
----
-214
-2671
-2748

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 DISTINCT - col2 * + 63 col1 FROM tab2 AS cor0
----
-1638
-1701
-2394

query I rowsort
SELECT ALL ( col2 + + col1 ) AS col2 FROM tab0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col2 * 52 col0 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 06f92cce2c12184466b1c323376e1e3d

query I rowsort
SELECT ALL - - col0 + ( col0 ) FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT ALL - cor0.col1 * 64 AS col0 FROM tab2 cor0
----
-1088
-1984
-3776

query I rowsort
SELECT ALL + + col2 * col2 + col1 AS col0 FROM tab0 AS cor0
----
1175
6815
98

query I rowsort
SELECT ALL 53 AS col0 FROM tab1, tab0 AS cor0, tab2 cor1
----
27 values hashing to 866ae1b4ab9e5b4043ac1bcfd413aaa6

query I rowsort
SELECT DISTINCT + - col2 * col0 + - col0 AS col0 FROM tab1 AS cor0
----
-165
-3712
-7760

query I rowsort
SELECT - ( + col1 ) - col0 FROM tab1 AS cor0
----
-29
-74
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-9224
SELECT DISTINCT cor0.col1 DIV col2 + - cor0.col1 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-9224
SELECT DISTINCT cor0.col1 / col2 + - cor0.col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT + + cor0.col0 FROM tab0, tab1 AS cor0
----
3
64
80

query I rowsort
SELECT - col0 * col0 + + col1 AS col1 FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT - col1 * + cor0.col0 AS col1 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL + col0 + col0 * - cor0.col2 AS col0 FROM tab1 cor0
----
-159
-3584
-7600

query I rowsort
SELECT - cor0.col0 + - cor0.col0 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to f695e8ac4bda97d478d6d74ae91ee549

query I rowsort
SELECT cor0.col1 AS col2 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT ALL - 52 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to e8a5cb10c0973a78554f344d4f6e7e74

query I rowsort
SELECT DISTINCT + tab0.col0 AS col0 FROM tab0, tab2, tab0 AS cor0
----
24
35
89

query I rowsort
SELECT + + 39 + - col0 AS col0 FROM tab2 AS cor0
----
-39
-40
32

query I rowsort
SELECT - 20 + + col1 AS col0 FROM tab2 AS cor0
----
-3
11
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 60 * col1 col1 FROM tab2 AS cor0
----
-1020
-1860
-3540

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9236
SELECT - CAST( NULL AS SIGNED ) * + 65 * - col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9236
SELECT - CAST ( NULL AS INTEGER ) * + 65 * - col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + cor0.col2 * col2 AS col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL - - cor0.col0 * + col2 + - col2 * 89 FROM tab1 AS cor0
----
-1425
-4644
-864

query I rowsort
SELECT ALL - ( - col0 ) * cor0.col0 AS col1 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT ALL - - col2 * col0 AS col0 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT - + ( col0 ) * col0 AS col1 FROM tab0 AS cor0
----
-1225
-576
-7921

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9242
SELECT + - CAST( NULL AS SIGNED ) * - col1 * + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9242
SELECT + - CAST ( NULL AS INTEGER ) * - col1 * + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + 22 * + col1 + col2 FROM tab2 AS cor0
----
1324
412
709

query I rowsort
SELECT ALL col2 * cor0.col0 * + 0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9245
SELECT DISTINCT + col0 * col0 * - CAST( + col0 AS SIGNED ) col1 FROM tab0 AS cor0
----
-13824
-42875
-704969

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9245
SELECT DISTINCT + col0 * col0 * - CAST ( + col0 AS INTEGER ) col1 FROM tab0 AS cor0
----
-13824
-42875
-704969

query I rowsort
SELECT 71 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to c1aace5d5fe27721cc925552513c85c0

query I rowsort
SELECT ALL + - col1 * col1 + 89 AS col0 FROM tab0 AS cor0
----
-7307
-8192
-9320

query I rowsort
SELECT DISTINCT cor0.col2 + cor0.col0 FROM tab1 cor0
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9249
SELECT ALL - col0 + CAST( NULL AS SIGNED ) + + cor0.col0 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-9249
SELECT ALL - col0 + CAST ( NULL AS INTEGER ) + + cor0.col0 col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col0 * - col0 + 98 FROM tab1 AS cor0
----
-3998
-6302
89

query I rowsort
SELECT - col1 + - col0 * + col0 AS col2 FROM tab0
----
-1322
-662
-8012

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9252
SELECT - CAST( + 22 AS SIGNED ) FROM tab1, tab0 AS cor0
----
9 values hashing to fae46f8148b02964f7145eb6ed5819f9

skipif mysql # not compatible
query I rowsort label-9252
SELECT - CAST ( + 22 AS INTEGER ) FROM tab1, tab0 AS cor0
----
9 values hashing to fae46f8148b02964f7145eb6ed5819f9

query I rowsort
SELECT - tab1.col0 + 10 * col0 AS col0 FROM tab1
----
27
576
720

query I rowsort
SELECT + + col2 + - cor0.col1 AS col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT ALL - + col1 + + 34 FROM tab0 cor0
----
-52
-57
-63

query I rowsort
SELECT DISTINCT 52 FROM tab2, tab0 AS cor0
----
52

query I rowsort
SELECT col1 + - col0 * - cor0.col1 FROM tab1 AS cor0
----
104
1053
650

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * ( + ( - col0 ) ) - + col2 col0 FROM tab0 cor0
----
-2097
-3396
-8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-9259
SELECT DISTINCT + col0 + + ( 22 ) DIV - col1 + - cor0.col0 AS col2 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-9259
SELECT DISTINCT + col0 + + ( 22 ) / - col1 + - cor0.col0 AS col2 FROM tab0 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 + col1 * ( - col2 ) col0 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT - + ( col1 ) + cor0.col2 AS col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT - 2 * - cor0.col1 + - col1 AS col0 FROM tab1 AS cor0
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9263
SELECT ALL - CAST( NULL AS SIGNED ) + - cor0.col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9263
SELECT ALL - CAST ( NULL AS INTEGER ) + - cor0.col2 AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor0.col2 * - col2 + col0 * - 14 FROM tab2 AS cor0
----
-416
338
631

query I rowsort
SELECT - - ( + col2 ) + cor0.col1 * col2 * + ( cor0.col0 ) FROM tab1 AS cor0
----
36537
4266
99936

onlyif mysql # use DIV operator for integer division
query I rowsort label-9266
SELECT DISTINCT - 33 + + col1 DIV col1 + col1 col0 FROM tab1 AS cor0
----
-19
-22
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9266
SELECT DISTINCT - 33 + + col1 / col1 + col1 col0 FROM tab1 AS cor0
----
-19
-22
-6

query I rowsort
SELECT ALL + ( col0 ) + + col0 * col0 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT ALL ( + 67 ) * + col0 FROM tab2 AS cor0
----
469
5226
5293

onlyif mysql # use DIV operator for integer division
query I rowsort label-9269
SELECT - col0 + - 25 DIV 60 AS col1 FROM tab2
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-9269
SELECT - col0 + - 25 / 60 AS col1 FROM tab2
----
-7
-78
-79

query I rowsort
SELECT ALL - col2 * col0 + col2 FROM tab0
----
-34
-7216
-759

query I rowsort
SELECT - col0 - + col2 * col0 FROM tab2
----
-196
-2106
-3081

query I rowsort
SELECT - col2 + - cor0.col0 * + col0 AS col1 FROM tab0 AS cor0
----
-1226
-609
-8003

query I rowsort
SELECT ALL + - col1 + + cor0.col1 * col1 AS col2 FROM tab2 AS cor0
----
272
3422
930

query I rowsort
SELECT - tab2.col2 + ( - 94 ) FROM tab2
----
-120
-121
-132

query I rowsort
SELECT col0 * col2 + col2 + 55 AS col2 FROM tab2 AS cor0
----
2109
271
3095

query I rowsort
SELECT 90 + tab1.col0 FROM tab1
----
154
170
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + tab1.col0 ) + - col1 col2 FROM tab1
----
-23
54
67

query I rowsort
SELECT DISTINCT + - col1 + + cor0.col1 FROM tab2 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9279
SELECT 36 DIV + col1 AS col0 FROM tab2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-9279
SELECT 36 / + col1 AS col0 FROM tab2
----
0
1
2

query I rowsort
SELECT ALL col2 + - col1 + col1 FROM tab1
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-9281
SELECT ALL - col1 DIV col1 + ( col1 ) AS col0 FROM tab2
----
16
30
58

skipif mysql # not compatible
query I rowsort label-9281
SELECT ALL - col1 / col1 + ( col1 ) AS col0 FROM tab2
----
16
30
58

query I rowsort
SELECT col1 + col0 * 36 AS col1 FROM tab1 AS cor0
----
134
2314
2893

query I rowsort
SELECT col1 + cor0.col2 * - 82 FROM tab2 cor0
----
-2073
-2183
-3099

query I rowsort
SELECT + cor0.col2 * - col0 * cor0.col2 FROM tab1 AS cor0
----
-207936
-737280
-8748

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 45 col1 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 14cec871edc37b5056cda01c8331fdca

query I rowsort
SELECT + col0 + col2 * - col1 + + tab1.col2 * - col2 FROM tab1
----
-10384
-3755
-4317

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
3
64
80

query I rowsort
SELECT ALL 14 + col0 AS col1 FROM tab2
----
21
92
93

query I rowsort
SELECT 89 * + col1 * 2 FROM tab1
----
1780
2314
4628

query I rowsort
SELECT ALL - 85 + col0 AS col2 FROM tab2
----
-6
-7
-78

query I rowsort
SELECT DISTINCT 79 FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
79

query I rowsort
SELECT + - col1 * + ( 27 ) + col1 * + col2 + col2 FROM tab2 AS cor0
----
-33
225
27

query I rowsort
SELECT + col1 + 95 FROM tab2 AS cor0
----
112
126
154

query I rowsort
SELECT ALL + - cor0.col2 * - col2 AS col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ALL - cor0.col0 * cor0.col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT - col0 * + cor0.col0 + + 15 AS col2 FROM tab1 AS cor0
----
-4081
-6385
6

query I rowsort
SELECT DISTINCT - + cor0.col2 * - ( + col2 ) - - col2 * - 41 * col0 FROM tab2 AS cor0
----
-121638
-7020
-82472

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 + col2 col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT DISTINCT - col0 * - ( ( - col2 ) ) FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT - col1 * ( - col1 ) - - col2 * 50 AS col2 FROM tab2 cor0
----
2189
2311
4781

query I rowsort
SELECT DISTINCT + col0 * ( col0 ) + col1 + col1 * col2 FROM tab0 AS cor0
----
1419
15474
3500

query I rowsort
SELECT - - col1 * ( + cor0.col0 ) - + cor0.col0 * 55 AS col1 FROM tab1 AS cor0
----
-2880
-3360
-87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 + col2 * col2 * col1 col0 FROM tab1 AS cor0
----
119728
32426
75813

query I rowsort
SELECT + cor0.col2 * + col0 * - col2 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT ALL - - col2 + 33 AS col0 FROM tab2 AS cor0
----
59
60
71

query I rowsort
SELECT ALL - tab2.col2 * col1 AS col0 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT ALL + 42 * col2 AS col2 FROM tab2
----
1092
1134
1596

query I rowsort
SELECT DISTINCT + cor1.col2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
26
27
38

query I rowsort
SELECT - + col0 - + 59 * - cor0.col0 AS col0 FROM tab2 AS cor0
----
406
4524
4582

query I rowsort
SELECT col1 * ( + 61 ) - col2 AS col0 FROM tab1 AS cor0
----
1532
553
697

query I rowsort
SELECT DISTINCT - col1 * col1 + + col0 AS col1 FROM tab2
----
-210
-3403
-954

query I rowsort
SELECT - col0 - - col2 * col1 FROM tab0
----
2814
62
7373

query I rowsort
SELECT - col0 FROM tab0 WHERE NOT NULL > + col2
----

query III rowsort
SELECT ALL * FROM tab1 WHERE + col0 NOT IN ( - tab1.col1 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

onlyif mysql # use DIV operator for integer division
query I rowsort label-9315
SELECT DISTINCT col2 + + col1 DIV col0 FROM tab2
----
26
31
38

skipif mysql # not compatible
query I rowsort label-9315
SELECT DISTINCT col2 + + col1 / col0 FROM tab2
----
26
31
38

query I rowsort
SELECT ALL + col0 * - tab0.col1 + + tab0.col1 * - col2 FROM tab0
----
-15561
-3492
-4902

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NULL NOT IN ( col0 * col1 )
----

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE + col1 + col0 * col2 + col0 * col2 IN ( - tab0.col1 )
----

query I rowsort
SELECT ALL col0 AS col1 FROM tab1 WHERE NOT + col0 + + col1 NOT IN ( - col1 * col1 - - col0 * col2 / + col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + tab2.col0 + + col1 - + col0 col1 FROM tab2
----
6065
6179
73

query I rowsort
SELECT - col1 + + col2 - col0 AS col0 FROM tab2
----
-11
-111
-58

query I rowsort
SELECT ALL col1 * col1 * col1 AS col0 FROM tab1 WHERE NULL = NULL
----

query I rowsort
SELECT + col0 + - tab0.col0 * + col0 FROM tab0
----
-1190
-552
-7832

query I rowsort
SELECT + col2 * - col2 + + tab2.col0 FROM tab2
----
-1365
-598
-722

onlyif mysql # use DIV operator for integer division
query I rowsort label-9325
SELECT - col0 DIV - col0 AS col1 FROM tab0 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9325
SELECT - col0 / - col0 AS col1 FROM tab0 cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + + col1 col0 FROM tab1
----
20
26
52

query I rowsort
SELECT col0 + - col2 - - col2 AS col1 FROM tab0 WHERE NOT col2 / - col1 IN ( - col0 * col0 )
----
24
35
89

query I rowsort
SELECT + 45 + + col1 FROM tab1 AS cor0
----
55
58
71

query I rowsort
SELECT + + 6 * col0 AS col1 FROM tab0 cor0
----
144
210
534

query I rowsort
SELECT - col1 * + col0 + - cor0.col0 FROM tab0 cor0
----
-2088
-3430
-8188

query I rowsort
SELECT DISTINCT + 42 FROM tab2 cor0
----
42

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9332
SELECT - cor0.col0 + col1 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9332
SELECT - cor0.col0 + 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 ALL cor0.col1 + col2 + + col2 * + col1 col0 FROM tab0 AS cor0
----
195
2957
7635

query I rowsort
SELECT ALL - ( + col0 ) * + ( - ( - col2 ) ) AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + col1 * - col1 + ( - col0 ) * + col0 * - 25 + col2 * - col0 FROM tab0 AS cor0
----
182446
21181
6212

onlyif mysql # use DIV operator for integer division
query I rowsort label-9336
SELECT DISTINCT - col1 DIV + ( col2 ) FROM tab0 AS cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-9336
SELECT DISTINCT - col1 / + ( col2 ) FROM tab0 AS cor0
----
-1
-2
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9337
SELECT + - col0 / CAST( NULL AS DECIMAL ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9337
SELECT + - col0 / CAST ( NULL AS REAL ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 3 + - ( col1 ) * col0 FROM tab1 AS cor0
----
-1043
-643
-81

query I rowsort
SELECT - 34 + - col2 FROM tab1 AS cor0
----
-130
-88
-91

query I rowsort
SELECT DISTINCT col1 * + col1 + col2 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT + + col2 - ( col1 ) FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT ALL + 97 + + 72 * + col0 AS col0 FROM tab1 AS cor0
----
313
4705
5857

query I rowsort
SELECT DISTINCT - + 56 * + cor0.col2 + col1 AS col1 FROM tab1 AS cor0
----
-2998
-3182
-5363

query I rowsort
SELECT ( + 35 ) AS col0 FROM tab0
----
35
35
35

query I rowsort
SELECT col2 * - ( - col2 ) AS col0 FROM tab0
----
1
1089
6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col2 + + col0 col2 FROM tab2 AS cor0
----
104
117
34

skipif mysql # not compatible
query I rowsort
SELECT ALL col2 + cor0.col0 * CAST ( + 92 AS REAL ) FROM tab0 AS cor0
----
2241
3221
8270

query I rowsort
SELECT DISTINCT - 30 AS col1 FROM tab1
----
-30

query I rowsort
SELECT ALL + ( + col1 * col0 ) + tab2.col2 * ( - col0 * - 57 + - 97 ) AS col2 FROM tab2
----
117676
168771
8371

query I rowsort
SELECT ALL 49 FROM tab0, tab1 AS cor0
----
9 values hashing to cb40783c0fff72e8802cdf0682e7cb55

onlyif mysql # use DIV operator for integer division
query I rowsort label-9351
SELECT - + col0 DIV col2 + - col1 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-9351
SELECT - + col0 / col2 + - col1 col1 FROM tab1 AS cor0
----
-11
-13
-26

query I rowsort
SELECT DISTINCT + 53 + - tab0.col2 * - col0 FROM tab0
----
7351
845
88

query I rowsort
SELECT ALL 52 + cor0.col2 AS col0 FROM tab1 cor0
----
106
109
148

query I rowsort
SELECT col2 + cor0.col2 * col2 FROM tab0 AS cor0
----
1122
2
6806

onlyif mysql # use DIV operator for integer division
query I rowsort label-9355
SELECT ALL col0 + col2 * col0 DIV col1 AS col0 FROM tab0
----
169
33
35

skipif mysql # not compatible
query I rowsort label-9355
SELECT ALL col0 + col2 * col0 / col1 AS col0 FROM tab0
----
169
33
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-9356
SELECT ALL - - col2 DIV - col2 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-9356
SELECT ALL - - col2 / - col2 FROM tab1 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-9357
SELECT DISTINCT col0 DIV + col2 - col2 FROM tab1 AS cor0
----
-54
-56
-96

skipif mysql # not compatible
query I rowsort label-9357
SELECT DISTINCT col0 / + col2 - col2 FROM tab1 AS cor0
----
-54
-56
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-9358
SELECT ALL col0 * col0 - col1 DIV col2 FROM tab0 AS cor0
----
1128
574
7920

skipif mysql # not compatible
query I rowsort label-9358
SELECT ALL col0 * col0 - col1 / col2 FROM tab0 AS cor0
----
1128
574
7920

query I rowsort
SELECT ALL + 59 + - ( + col0 ) AS col2 FROM tab1
----
-21
-5
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-9360
SELECT 93 DIV tab0.col1 FROM tab0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-9360
SELECT 93 / tab0.col1 FROM tab0
----
0
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-9361
SELECT ALL 73 + 19 DIV col2 AS col0 FROM tab1
----
73
73
73

skipif mysql # not compatible
query I rowsort label-9361
SELECT ALL 73 + 19 / col2 AS col0 FROM tab1
----
73
73
73

query I rowsort
SELECT DISTINCT - 25 + col1 * col0 FROM tab1
----
1015
53
615

query I rowsort
SELECT ALL + 32 + col1 AS col2 FROM tab2
----
49
63
91

query I rowsort
SELECT ALL - tab0.col0 + - 73 AS col0 FROM tab0
----
-108
-162
-97

query I rowsort
SELECT ALL col2 + 38 * col0 * + tab0.col0 FROM tab0
----
21921
301080
46551

query I rowsort
SELECT ALL - 84 FROM tab1 cor0
----
-84
-84
-84

query I rowsort
SELECT ALL + col1 * + 96 * - col0 FROM tab0 AS cor0
----
-198144
-325920
-777504

query I rowsort
SELECT ALL - - col2 * + col2 AS col2 FROM tab1 AS cor0
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-9369
SELECT - col2 DIV - 29 + col2 AS col1 FROM tab2 AS cor0
----
26
27
39

skipif mysql # not compatible
query I rowsort label-9369
SELECT - col2 / - 29 + col2 AS col1 FROM tab2 AS cor0
----
26
27
39

query I rowsort
SELECT DISTINCT + 28 * 95 FROM tab0 AS cor0
----
2660

query I rowsort
SELECT col2 * - cor0.col2 * col1 + col1 * - col0 AS col1 FROM tab2 AS cor0
----
-22816
-25891
-44486

query I rowsort
SELECT ALL col1 * - col2 + - col1 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT ALL + 78 * + col1 AS col0 FROM tab2 AS cor0
----
1326
2418
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-9374
SELECT ALL + ( - col1 ) DIV cor0.col2 + col2 DIV + col2 AS col2 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9374
SELECT ALL + ( - col1 ) / cor0.col2 + col2 / + col2 AS col2 FROM tab1 cor0
----
1
1
1

query I rowsort
SELECT + col0 * col2 + - col0 * cor0.col0 FROM tab2 AS cor0
----
-3239
-4056
140

query I rowsort
SELECT ALL - 82 * col0 FROM tab1 AS cor0
----
-246
-5248
-6560

query I rowsort
SELECT DISTINCT 12 * + cor0.col0 AS col2 FROM tab1 AS cor0
----
36
768
960

query I rowsort
SELECT ALL + ( col2 ) * - col2 AS col0 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT + + col1 + - col0 * col0 + col2 * - col1 * - col1 FROM tab1 AS cor0
----
1614
36521
9837

query I rowsort
SELECT + cor0.col0 * - cor0.col1 + + col2 FROM tab1 AS cor0
----
-24
-583
-944

onlyif mysql # use DIV operator for integer division
query I rowsort label-9381
SELECT ALL - + col1 * - col2 + cor0.col2 DIV col2 FROM tab1 AS cor0
----
1249
1405
571

skipif mysql # not compatible
query I rowsort label-9381
SELECT ALL - + col1 * - col2 + cor0.col2 / col2 FROM tab1 AS cor0
----
1249
1405
571

query I rowsort
SELECT + col2 - col1 * col0 AS col1 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT DISTINCT col2 * + 33 * + col2 + + col2 - tab0.col2 * - col1 AS col0 FROM tab0
----
131
229436
38808

onlyif mysql # use DIV operator for integer division
query I rowsort label-9384
SELECT ALL + ( + col0 ) DIV + col1 + cor0.col0 DIV + col1 AS col1 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9384
SELECT ALL + ( + col0 ) / + col1 + cor0.col0 / + col1 AS col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - + 31 * col2 + col2 AS col1 FROM tab2 AS cor0
----
-1140
-780
-810

query I rowsort
SELECT col1 * - col2 + col1 * col1 AS col2 FROM tab1 cor0
----
-1079
-470
-728

query I rowsort
SELECT DISTINCT 39 + + col0 FROM tab0 AS cor0
----
128
63
74

query I rowsort
SELECT ALL - - col2 * col1 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - 66 * tab1.col0 FROM tab1
----
-198
-4224
-5280

query I rowsort
SELECT ALL + cor0.col0 * col0 AS col2 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT col0 AS col0 FROM tab1 AS cor0 WHERE NOT NULL BETWEEN - col2 / + col1 + + col2 * col2 AND ( - col2 )
----

query I rowsort
SELECT DISTINCT col1 * + col0 * col1 + col2 FROM tab0 AS cor0
----
177537
329316
737091

query I rowsort
SELECT + col0 * - col1 + - col2 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT - col2 * - col0 + col1 AS col1 FROM tab1
----
188
3658
7693

onlyif mysql # use DIV operator for integer division
query I rowsort label-9395
SELECT ALL - col1 DIV - col0 AS col1 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-9395
SELECT ALL - col1 / - col0 AS col1 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT ALL + col0 FROM tab2 WHERE NOT NULL > ( col2 )
----

query I rowsort
SELECT - col2 * tab1.col2 + col1 FROM tab1
----
-2890
-3239
-9203

query I rowsort
SELECT col1 FROM tab0 WHERE NULL = ( NULL )
----

query I rowsort
SELECT - col0 - - col0 FROM tab2 WHERE NULL BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT tab1.col0 + - col0 + - col1 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT ALL + col2 * - col1 + col0 AS col2 FROM tab2
----
-1456
-567
-830

query I rowsort
SELECT + tab0.col2 - + tab0.col2 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT - col2 FROM tab0 WHERE NULL NOT BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT col1 FROM tab1 WHERE ( col0 + col1 ) > - col1 + - col0
----
10
13
26

query I rowsort
SELECT DISTINCT - col2 - tab1.col0 FROM tab1
----
-121
-176
-57

query I rowsort
SELECT + tab1.col1 * - col2 + col0 AS col1 FROM tab1
----
-1168
-1401
-506

query I rowsort
SELECT col0 * tab2.col0 + col2 AS col2 FROM tab2
----
6110
6279
76

query I rowsort
SELECT DISTINCT col1 FROM tab1 WHERE NOT + tab1.col1 < col0
----
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * + col1 col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + + col2 * - col1 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL col2 * + col2 AS col1 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT DISTINCT + - col1 + + col0 * col1 - col1 FROM tab0 AS cor0
----
1892
3201
7917

query I rowsort
SELECT col2 * - col0 AS col0 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT - col2 + + col2 * - col2 AS col0 FROM tab1 AS cor0
----
-2970
-3306
-9312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * tab2.col2 + tab2.col0 col2 FROM tab2
----
-1365
-598
-722

query I rowsort
SELECT - col0 + - col1 * col2 * + col1 AS col1 FROM tab1
----
-16304
-36507
-5764

query I rowsort
SELECT + tab0.col0 + tab0.col2 FROM tab0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-9418
SELECT DISTINCT + tab2.col0 DIV col0 + + col0 FROM tab2
----
79
8
80

skipif mysql # not compatible
query I rowsort label-9418
SELECT DISTINCT + tab2.col0 / col0 + + col0 FROM tab2
----
79
8
80

query I rowsort
SELECT col0 + + col2 * col2 + col1 AS col2 FROM tab2
----
1540
767
813

query I rowsort
SELECT DISTINCT + col2 * - tab0.col1 + - col1 FROM tab0
----
-194
-2924
-7553

query I rowsort
SELECT ALL col1 * - col0 + col2 * col2 AS col1 FROM tab2 AS cor0
----
-3926
101
512

query I rowsort
SELECT DISTINCT - col0 * + col2 + col2 * col1 FROM tab1 AS cor0
----
-3078
-6432
1242

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - cor0.col1 + col2 * col2 * + col0 col2 FROM tab0 AS cor0
----
-62
26050
598345

query I rowsort
SELECT ALL - col0 + col1 - - col2 FROM tab2 AS cor0
----
-24
51
7

query III rowsort
SELECT ALL * FROM tab2 WHERE NULL = + col1
----

query I rowsort
SELECT + 60 + - col1 FROM tab1
----
34
47
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col0 ) col2 FROM tab0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 88 ) col0 FROM tab2
----
88
88
88

query I rowsort
SELECT - ( col2 ) + - col0 * - col2 FROM tab1
----
108
3591
7584

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9430
SELECT + CAST( + col0 AS SIGNED ) col0 FROM tab1
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9430
SELECT + CAST ( + col0 AS INTEGER ) col0 FROM tab1
----
3
64
80

query I rowsort
SELECT DISTINCT + ( 17 ) * + col2 + col0 * 34 + + col2 FROM tab0 AS cor0
----
1208
1410
4502

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 28 col0 FROM tab1, tab0 AS cor0
----
9 values hashing to aad32232c428b3ecb5ada63f7e9b0a97

query I rowsort
SELECT ALL ( col0 ) + + ( - 6 ) FROM tab1 AS cor0
----
-3
58
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-9434
SELECT col2 DIV + cor0.col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-9434
SELECT col2 / + cor0.col1 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT ALL col1 * cor0.col0 + + 72 AS col1 FROM tab0 AS cor0
----
2136
3467
8171

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 * + cor0.col0 col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT - 31 * - cor0.col0 AS col0 FROM tab1 AS cor0
----
1984
2480
93

query I rowsort
SELECT ALL + - col1 * + col0 + + cor0.col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-9439
SELECT DISTINCT + - col0 DIV cor0.col1 FROM tab2 AS cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-9439
SELECT DISTINCT + - col0 / cor0.col1 FROM tab2 AS cor0
----
-1
-4
0

query I rowsort
SELECT DISTINCT 54 AS col0 FROM tab2 AS cor0
----
54

query I rowsort
SELECT DISTINCT 52 AS col0 FROM tab0, tab0 AS cor0
----
52

query I rowsort
SELECT DISTINCT + tab2.col2 * + col0 AS col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT + + col1 * - col1 * col1 + col0 FROM tab1 AS cor0
----
-17573
-2117
-936

onlyif mysql # use DIV operator for integer division
query I rowsort label-9444
SELECT - - col0 * 36 + - cor0.col0 DIV col2 col1 FROM tab0 AS cor0
----
1225
3203
864

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9444
SELECT - - col0 * 36 + - cor0.col0 / col2 col1 FROM tab0 AS cor0
----
1225
3203
864

query I rowsort
SELECT 20 AS col0 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 0a35fe98f3e7d5fc8ff2ae815bd20ef4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9446
SELECT DISTINCT - col0 + - col1 * CAST( col1 AS SIGNED ) AS col2 FROM tab0
----
-7420
-8370
-9444

skipif mysql # not compatible
query I rowsort label-9446
SELECT DISTINCT - col0 + - col1 * CAST ( col1 AS INTEGER ) AS col2 FROM tab0
----
-7420
-8370
-9444

query I rowsort
SELECT DISTINCT tab2.col1 AS col1 FROM tab2, tab1 AS cor0
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-9448
SELECT col0 DIV col0 + + 74 FROM tab0 AS cor0
----
75
75
75

skipif mysql # not compatible
query I rowsort label-9448
SELECT col0 / col0 + + 74 FROM tab0 AS cor0
----
75
75
75

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9449
SELECT ALL + CAST( + 19 AS SIGNED ) AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

skipif mysql # not compatible
query I rowsort label-9449
SELECT ALL + CAST ( + 19 AS INTEGER ) AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

query I rowsort
SELECT DISTINCT col0 * 1 AS col1 FROM tab1
----
3
64
80

query I rowsort
SELECT - col0 * 37 - ( + tab0.col0 ) AS col1 FROM tab0
----
-1330
-3382
-912

query I rowsort
SELECT DISTINCT - col1 + 86 * - col1 FROM tab2
----
-1479
-2697
-5133

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9453
SELECT DISTINCT + + CAST( NULL AS SIGNED ) + col0 - col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9453
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) + col0 - col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - 50 + - col0 FROM tab2 cor0
----
-128
-129
-57

query I rowsort
SELECT ALL + + col1 * 65 FROM tab0 cor0
----
5590
5915
6305

query I rowsort
SELECT DISTINCT + 72 * col1 AS col2 FROM tab1 AS cor0
----
1872
720
936

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 89 + col2 col2 FROM tab0 AS cor0
----
122
171
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 + 61 col1 FROM tab0 AS cor0
----
150
85
96

query I rowsort
SELECT - tab1.col1 * 34 FROM tab1, tab2 AS cor0
----
9 values hashing to 56eae609d7f3aa151442a61859b81b4b

query I rowsort
SELECT + col2 * + 90 + 37 + col1 FROM tab2
----
2436
2498
3474

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9461
SELECT ALL col2 + + CAST( NULL AS DECIMAL ) * - col1 * col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9461
SELECT ALL col2 + + CAST ( NULL AS REAL ) * - col1 * col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 41 FROM tab0, tab2, tab2 AS cor0, tab1 AS cor1
----
81 values hashing to 007857b49fbf51962923f3da53f42f2b

query I rowsort
SELECT + col0 + col2 * - cor0.col2 FROM tab2 AS cor0
----
-1365
-598
-722

query I rowsort
SELECT col1 * + col0 * col0 + 39 FROM tab2 cor0
----
106136
1558
358995

query I rowsort
SELECT - + 16 * col1 FROM tab2 AS cor0
----
-272
-496
-944

query I rowsort
SELECT DISTINCT col0 + ( + cor0.col1 ) * - ( - col0 ) AS col0 FROM tab1 cor0
----
1120
704
81

query I rowsort
SELECT ALL - ( + ( + col1 ) ) * + ( + ( + col1 ) ) * + col1 + col0 FROM tab2 AS cor0
----
-205301
-29784
-4834

query I rowsort
SELECT DISTINCT - cor0.col1 - - col0 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT ALL + + ( - col0 ) AS col2 FROM tab2 AS cor0
----
-7
-78
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9470
SELECT CAST( + col1 AS SIGNED ) + - col2 FROM tab2 cor0
----
-21
33
4

skipif mysql # not compatible
query I rowsort label-9470
SELECT CAST ( + col1 AS INTEGER ) + - col2 FROM tab2 cor0
----
-21
33
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9471
SELECT ALL + ( + ( col2 ) ) - CAST( + col1 AS SIGNED ) * + col0 FROM tab1 cor0
----
-24
-583
-944

skipif mysql # not compatible
query I rowsort label-9471
SELECT ALL + ( + ( col2 ) ) - CAST ( + col1 AS INTEGER ) * + col0 FROM tab1 cor0
----
-24
-583
-944

query I rowsort
SELECT ALL 0 * - ( col0 ) + - col1 AS col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT cor0.col0 * + col1 * + 38 FROM tab2 cor0
----
174876
51034
8246

query I rowsort
SELECT col2 + - col0 * - col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT + col1 * cor0.col0 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT - - col2 * 50 FROM tab1 AS cor0
----
2700
2850
4800

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 * - ( 77 ) col2 FROM tab2 cor0
----
-2002
-2079
-2926

query I rowsort
SELECT - - 40 FROM tab1, tab1 AS cor0
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

onlyif mysql # use DIV operator for integer division
query I rowsort label-9479
SELECT - 15 DIV col0 FROM tab2
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-9479
SELECT - 15 / col0 FROM tab2
----
-2
0
0

query I rowsort
SELECT - tab0.col2 * col2 * + ( - col2 * col1 ) AS col1 FROM tab0
----
3090582
50174488
97

query I rowsort
SELECT ALL 57 AS col2 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 220a93709e207779b34ef74b544764a5

query I rowsort
SELECT + tab0.col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT - cor0.col0 * col2 + + 63 + + col0 AS col2 FROM tab2 AS cor0
----
-119
-1887
-2860

onlyif mysql # use DIV operator for integer division
query I rowsort label-9484
SELECT DISTINCT + + col0 DIV + col2 FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-9484
SELECT DISTINCT + + col0 / + col2 FROM tab1 AS cor0
----
0
1

query I rowsort
SELECT - col2 * - ( 55 ) + cor0.col1 * 67 AS col0 FROM tab1 cor0
----
3805
4712
6151

query I rowsort
SELECT + cor0.col2 + cor0.col1 * + col0 FROM tab1 cor0
----
1136
132
697

query I rowsort
SELECT ALL + 36 AS col1 FROM tab0 cor0
----
36
36
36

query I rowsort
SELECT + - col0 - + col0 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT DISTINCT + - 97 * - col2 + - ( - col2 ) FROM tab0 AS cor0
----
3234
8036
98

query I rowsort
SELECT - 35 * cor0.col0 + + 83 AS col1 FROM tab0 AS cor0
----
-1142
-3032
-757

query I rowsort
SELECT DISTINCT - col2 * cor0.col1 + + 36 * 44 AS col2 FROM tab0 AS cor0
----
-1254
-5878
1487

query I rowsort
SELECT ALL - + col2 * + cor0.col0 AS col2 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL - + col2 + + cor0.col1 * + 24 * - col2 FROM tab1 AS cor0
----
-13737
-30048
-33750

onlyif mysql # use DIV operator for integer division
query I rowsort label-9494
SELECT ALL - + 74 * col1 DIV col1 + - 92 * col2 col0 FROM tab0 cor0
----
-166
-3110
-7618

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9494
SELECT ALL - + 74 * col1 / col1 + - 92 * col2 col0 FROM tab0 cor0
----
-166
-3110
-7618

query I rowsort
SELECT DISTINCT - - col0 * + col1 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT - col0 * + cor0.col2 + 92 AS col2 FROM tab1 AS cor0
----
-3556
-70
-7588

query I rowsort
SELECT ALL 99 + col1 FROM tab1 AS cor0
----
109
112
125

query I rowsort
SELECT 46 + + col0 AS col1 FROM tab0
----
135
70
81

query I rowsort
SELECT + + 69 + + col1 AS col2 FROM tab0 AS cor0
----
155
160
166

query I rowsort
SELECT DISTINCT 93 * ( cor1.col0 ) + 90 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
369
6042
7530

query I rowsort
SELECT ALL - 53 + col0 FROM tab0
----
-18
-29
36

query I rowsort
SELECT - - col1 * - cor0.col1 AS col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT - cor0.col0 + - 33 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 34803e2d8055fe2883dc988ed71c680b

query I rowsort
SELECT ALL + 3 AS col2 FROM tab1
----
3
3
3

query I rowsort
SELECT - - 2 FROM tab2 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

query I rowsort
SELECT + + col0 * + cor0.col1 + - ( + 34 ) AS col1 FROM tab2 AS cor0
----
1309
183
4568

query I rowsort
SELECT ALL + col1 * col1 + + ( cor0.col0 ) AS col0 FROM tab0 cor0
----
7420
8370
9444

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9508
SELECT ALL CAST( NULL AS SIGNED ) + - col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9508
SELECT ALL CAST ( NULL AS INTEGER ) + - col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( cor0.col2 ) col2 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT ALL + 87 * - 95 FROM tab1, tab0 cor0
----
9 values hashing to f4c429354061e524833cbb496808e6cc

query I rowsort
SELECT DISTINCT - col2 * + 44 AS col1 FROM tab0
----
-1452
-3608
-44

query I rowsort
SELECT ALL tab0.col0 + 47 FROM tab0
----
136
71
82

query I rowsort
SELECT + 18 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 903ac227935c1532300db45a8537c595

query I rowsort
SELECT ALL + col0 + + 77 FROM tab0
----
101
112
166

query I rowsort
SELECT + 11 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to f4d199584b44732f1a897e6691b4ea00

query I rowsort
SELECT DISTINCT - - 65 AS col1 FROM tab2 AS cor0
----
65

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0, tab2 cor1, tab0, tab0 cor2
----
3645 values hashing to 1713adaf687595322d888d4eeefdbbc8

query I rowsort
SELECT ( - 13 ) * + col2 + + col0 AS col2 FROM tab2 cor0
----
-260
-344
-415

query I rowsort
SELECT DISTINCT + ( - col0 ) * + col0 + 22 FROM tab1 AS cor0
----
-4074
-6378
13

onlyif mysql # use DIV operator for integer division
query I rowsort label-9520
SELECT col1 + 29 DIV cor0.col2 FROM tab0 AS cor0
----
126
86
91

skipif mysql # not compatible
query I rowsort label-9520
SELECT col1 + 29 / cor0.col2 FROM tab0 AS cor0
----
126
86
91

query I rowsort
SELECT ALL - col1 * - col1 * col1 AS col1 FROM tab2 cor0
----
205379
29791
4913

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab1 cor0, tab2 AS cor1, tab0 AS cor2
----
972 values hashing to 58757c5bbbd4217c03cf2ac0b6126e55

query I rowsort
SELECT DISTINCT col0 * ( col0 ) AS col0 FROM tab1
----
4096
6400
9

query I rowsort
SELECT col1 * - cor0.col2 + - 56 + col2 * - col0 FROM tab2 AS cor0
----
-1082
-3618
-3704

query I rowsort
SELECT DISTINCT ( - col0 * col1 ) + + col2 AS col2 FROM tab0
----
-2031
-3394
-8017

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * - col2 col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT - 42 * - col0 AS col0 FROM tab1 cor0
----
126
2688
3360

query I rowsort
SELECT + ( - 98 ) + + col0 FROM tab2 cor0
----
-19
-20
-91

query I rowsort
SELECT 4 * - col0 FROM tab0 AS cor0
----
-140
-356
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( tab1.col0 ) col1 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 * cor0.col2 col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - + col2 * - col0 + 67 * - col0 AS col2 FROM tab0 AS cor0
----
-2310
-816
1335

query I rowsort
SELECT - col1 * col1 + cor0.col1 AS col1 FROM tab2 AS cor0
----
-272
-3422
-930

onlyif mysql # use DIV operator for integer division
query I rowsort label-9534
SELECT + col1 DIV col1 AS col1 FROM tab0 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9534
SELECT + col1 / col1 AS col1 FROM tab0 cor0
----
1
1
1

query I rowsort
SELECT + col1 * col2 + + col2 * col2 FROM tab2 AS cor0
----
1566
2090
2210

query I rowsort
SELECT DISTINCT + col0 * + ( col1 ) AS col1 FROM tab1 AS cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 33 * ( - tab1.col0 + 44 ) col2 FROM tab1, tab2 cor0
----
9 values hashing to d886b3ecc7c62c4fa363a0a57f21fdf2

onlyif mysql # use DIV operator for integer division
query I rowsort label-9538
SELECT ALL - col1 DIV 87 AS col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9538
SELECT ALL - col1 / 87 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT + 26 FROM tab1, tab2 AS cor0, tab0 cor1
----
27 values hashing to ede8226bb7e602e221f9d98345b4da37

query I rowsort
SELECT DISTINCT + col1 + + col0 + + cor0.col0 * col1 AS col2 FROM tab0 AS cor0
----
2174
3527
8279

query I rowsort
SELECT - 19 + col0 FROM tab1 cor0
----
-16
45
61

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9542
SELECT CAST( NULL AS SIGNED ) * - col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9542
SELECT CAST ( NULL AS INTEGER ) * - col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - 10 + col1 * col2 FROM tab2 AS cor0
----
1544
656
847

query I rowsort
SELECT + col0 * - 94 AS col0 FROM tab1 AS cor0
----
-282
-6016
-7520

query I rowsort
SELECT col1 + 46 AS col0 FROM tab2
----
105
63
77

query I rowsort
SELECT DISTINCT + col0 * + 43 * - col0 AS col0 FROM tab1
----
-176128
-275200
-387

onlyif mysql # use DIV operator for integer division
query I rowsort label-9547
SELECT + col0 DIV + ( - 28 ) + col0 AS col2 FROM tab2
----
7
76
77

skipif mysql # not compatible
query I rowsort label-9547
SELECT + col0 / + ( - 28 ) + col0 AS col2 FROM tab2
----
7
76
77

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 col0 + ( + 22 ) col0 FROM tab1
----
102
25
86

query I rowsort
SELECT - col2 + - tab0.col0 FROM tab0
----
-171
-36
-57

query I rowsort
SELECT ALL - ( + tab1.col2 ) AS col0 FROM tab1
----
-54
-57
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9552
SELECT + col0 * col2 + + CAST( + col2 * + col2 AS SIGNED ) FROM tab1 cor0
----
16896
3078
6897

skipif mysql # not compatible
query I rowsort label-9552
SELECT + col0 * col2 + + CAST ( + col2 * + col2 AS INTEGER ) FROM tab1 cor0
----
16896
3078
6897

query I rowsort
SELECT + 34 AS col2 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 4e2ca147a59e0d5661c28cf3e5431caa

onlyif mysql # use DIV operator for integer division
query I rowsort label-9554
SELECT ALL + 25 DIV + col2 AS col2 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9554
SELECT ALL + 25 / + col2 AS col2 FROM tab1
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9555
SELECT col2 * col1 + + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9555
SELECT col2 * col1 + + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9556
SELECT - + col2 DIV + CAST( ( - col0 ) + - 34 AS SIGNED ) col2 FROM tab1 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9556
SELECT - + col2 / + CAST ( ( - col0 ) + - 34 AS INTEGER ) col2 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT + - col0 * + col2 + - col2 * col0 * ( - col1 ) AS col0 FROM tab1 AS cor0
----
32832
4050
92160

onlyif mysql # use DIV operator for integer division
query I rowsort label-9558
SELECT + col2 DIV cor0.col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9558
SELECT + col2 / cor0.col1 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9559
SELECT ALL col0 + col0 DIV + col1 AS col0 FROM tab0 cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-9559
SELECT ALL col0 + col0 / + col1 AS col0 FROM tab0 cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-9560
SELECT + col1 * col1 + col1 DIV col0 FROM tab2 AS cor0
----
289
3481
965

skipif mysql # not compatible
query I rowsort label-9560
SELECT + col1 * col1 + col1 / col0 FROM tab2 AS cor0
----
289
3481
965

query I rowsort
SELECT DISTINCT + 79 * col0 AS col1 FROM tab0
----
1896
2765
7031

query I rowsort
SELECT ALL - col2 * tab1.col2 AS col1 FROM tab1
----
-2916
-3249
-9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-9563
SELECT ALL - col1 DIV + tab1.col0 AS col1 FROM tab1
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-9563
SELECT ALL - col1 / + tab1.col0 AS col1 FROM tab1
----
-8
0
0

query I rowsort
SELECT DISTINCT + col0 * + 38 AS col1 FROM tab1 AS cor0
----
114
2432
3040

query I rowsort
SELECT ALL - col2 * + 84 + - 73 * + col0 FROM tab1 AS cor0
----
-13904
-4755
-9460

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - 68 col0 FROM tab0 AS cor0
----
-35
-67
14

query I rowsort
SELECT + cor0.col2 + col0 AS col2 FROM tab1 cor0
----
121
176
57

query I rowsort
SELECT 41 + - col2 * col0 FROM tab0 AS cor0
----
-7257
-751
6

query I rowsort
SELECT + - 2 * + col0 - col0 FROM tab0 AS cor0
----
-105
-267
-72

query I rowsort
SELECT - col1 + col2 AS col0 FROM tab1 cor0
----
28
47
83

query I rowsort
SELECT ( + cor0.col1 ) * col1 - col1 * - col0 AS col1 FROM tab2 AS cor0
----
1178
1632
8083

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9572
SELECT - CAST( + col1 AS SIGNED ) FROM tab1 cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-9572
SELECT - CAST ( + col1 AS INTEGER ) FROM tab1 cor0
----
-10
-13
-26

query IIIIIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab0 AS cor2, tab2 AS cor3
----
13122 values hashing to e1316acfe11992c6a002752fac502b42

query I rowsort
SELECT + - 78 - cor0.col2 FROM tab2 cor0
----
-104
-105
-116

query I rowsort
SELECT DISTINCT + - cor0.col0 * col0 * col2 + + 42 * col1 AS col1 FROM tab0 AS cor0
----
-15396
-645700
2849

query I rowsort
SELECT ALL ( + 33 * col0 ) FROM tab1
----
2112
2640
99

query I rowsort
SELECT + + 66 * + col2 - - 84 * + 12 FROM tab2 cor0
----
2724
2790
3516

query I rowsort
SELECT - cor0.col0 * col0 + + 42 AS col2 FROM tab0 AS cor0
----
-1183
-534
-7879

query I rowsort
SELECT ALL 98 * cor0.col0 FROM tab2 AS cor0
----
686
7644
7742

query I rowsort
SELECT ALL + cor0.col2 + - col2 * 64 FROM tab0 AS cor0
----
-2079
-5166
-63

query I rowsort
SELECT DISTINCT - 15 * + col2 AS col2 FROM tab0 cor0
----
-1230
-15
-495

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9582
SELECT ALL + ( + col0 ) * + CAST( + col2 AS SIGNED ) + + col0 AS col1 FROM tab2 AS cor0
----
196
2106
3081

skipif mysql # not compatible
query I rowsort label-9582
SELECT ALL + ( + col0 ) * + CAST ( + col2 AS INTEGER ) + + col0 AS col1 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT ALL - col1 - + col2 * - ( col2 + col2 ) FROM tab2 AS cor0
----
1293
1427
2871

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9584
SELECT DISTINCT col2 + col1 * CAST( 29 AS SIGNED ) col1 FROM tab0 AS cor0
----
2527
2721
2814

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9584
SELECT DISTINCT col2 + col1 * CAST ( 29 AS INTEGER ) col1 FROM tab0 AS cor0
----
2527
2721
2814

query I rowsort
SELECT + col2 * col1 - col1 * 9 FROM tab2 cor0
----
1003
493
558

query I rowsort
SELECT ALL 17 + + col1 FROM tab0 AS cor0
----
103
108
114

query I rowsort
SELECT + 2 - cor0.col2 AS col0 FROM tab0 AS cor0
----
-31
-80
1

query I rowsort
SELECT - col1 + 97 + + col0 FROM tab2
----
116
159
73

query I rowsort
SELECT DISTINCT 75 AS col1 FROM tab1
----
75

query I rowsort
SELECT DISTINCT 59 * col2 + 12 FROM tab0
----
1959
4850
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-9591
SELECT - col1 DIV cor0.col1 + + 31 FROM tab0 AS cor0
----
30
30
30

skipif mysql # not compatible
query I rowsort label-9591
SELECT - col1 / cor0.col1 + + 31 FROM tab0 AS cor0
----
30
30
30

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9592
SELECT - col1 + col2 / + CAST( NULL AS DECIMAL ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9592
SELECT - col1 + col2 / + CAST ( NULL AS REAL ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 71 * cor0.col2 FROM tab0 AS cor0
----
-2343
-5822
-71

query I rowsort
SELECT - - 46 + - col0 FROM tab2 AS cor0
----
-32
-33
39

query I rowsort
SELECT DISTINCT 56 + + col0 AS col0 FROM tab0 AS cor0
----
145
80
91

query I rowsort
SELECT DISTINCT + col0 * - col1 * + tab0.col1 AS col2 FROM tab0
----
-177504
-329315
-737009

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 8 col1 FROM tab1 cor0
----
8
8
8

query I rowsort
SELECT + col0 + - col1 * col0 FROM tab2
----
-1264
-210
-4524

query I rowsort
SELECT ALL 67 FROM tab0, tab0 cor0
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

query I rowsort
SELECT ALL 87 * - 28 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to fde04ab85f8c69535653cf6554dfe78f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9601
SELECT + CAST( col0 AS SIGNED ) AS col2 FROM tab1 cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-9601
SELECT + CAST ( col0 AS INTEGER ) AS col2 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT ALL - + ( 31 ) FROM tab1 cor0
----
-31
-31
-31

query I rowsort
SELECT DISTINCT - - col1 + + 99 * col0 + col1 * + 18 FROM tab1 AS cor0
----
6526
791
8167

query I rowsort
SELECT + cor0.col0 + + 10 FROM tab0 AS cor0
----
34
45
99

query I rowsort
SELECT ALL + - col1 * cor0.col0 + col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9606
SELECT col2 * CAST( NULL AS SIGNED ) * - col2 + + col2 * 50 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9606
SELECT col2 * CAST ( NULL AS INTEGER ) * - col2 + + col2 * 50 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9607
SELECT ALL - - col1 + - 33 DIV - col2 AS col1 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-9607
SELECT ALL - - col1 + - 33 / - col2 AS col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL - col0 * - ( + col1 ) AS col0 FROM tab2 cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + 34 col1 FROM tab1 AS cor0
----
44
47
60

query I rowsort
SELECT + col1 * 42 AS col0 FROM tab0 AS cor0
----
3612
3822
4074

query I rowsort
SELECT DISTINCT col1 * + 8 - + col2 AS col1 FROM tab0 AS cor0
----
646
655
775

query I rowsort
SELECT DISTINCT + col1 * + 28 AS col1 FROM tab0 AS cor0
----
2408
2548
2716

query I rowsort
SELECT ALL + - cor0.col2 * cor0.col0 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT col1 * - 36 AS col1 FROM tab0 cor0
----
-3096
-3276
-3492

query I rowsort
SELECT 69 + + col2 FROM tab0 AS cor0
----
102
151
70

query I rowsort
SELECT - 80 FROM tab1, tab2 AS cor0
----
9 values hashing to 4dde3bd5652d30396b9cadd0e2cfb680

query I rowsort
SELECT + 27 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

query I rowsort
SELECT + cor0.col1 + 76 FROM tab1 AS cor0
----
102
86
89

query I rowsort
SELECT DISTINCT col0 * ( col1 ) AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT + col2 * - 93 + - col0 + + col0 AS col2 FROM tab2
----
-2418
-2511
-3534

query I rowsort
SELECT col2 + + 75 * 22 AS col0 FROM tab0
----
1651
1683
1732

query I rowsort
SELECT - col2 * ( - tab0.col0 ) + - col2 * col2 - col0 * + tab0.col0 FROM tab0
----
-1191
-7347
-873

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9623
SELECT DISTINCT + col0 + + CAST( NULL AS SIGNED ) + - col1 AS col0 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-9623
SELECT DISTINCT + col0 + + CAST ( NULL AS INTEGER ) + - col1 AS col0 FROM tab1
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-9624
SELECT col1 DIV 38 AS col1 FROM tab2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-9624
SELECT col1 / 38 AS col1 FROM tab2
----
0
0
1

query I rowsort
SELECT DISTINCT + ( col1 ) + - 79 AS col2 FROM tab0 AS cor0
----
12
18
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9626
SELECT DISTINCT + col2 + col1 + - CAST( col1 AS SIGNED ) FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-9626
SELECT DISTINCT + col2 + col1 + - CAST ( col1 AS INTEGER ) FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - - 62 * cor0.col1 AS col1 FROM tab0 AS cor0
----
5332
5642
6014

query I rowsort
SELECT DISTINCT col2 + + col0 * + col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT 34 * cor0.col0 AS col1 FROM tab1 AS cor0
----
102
2176
2720

query I rowsort
SELECT DISTINCT + + cor0.col2 + - cor0.col2 * col2 AS col0 FROM tab1 AS cor0
----
-2862
-3192
-9120

query I rowsort
SELECT ALL col0 * + col1 * col1 + col2 AS col1 FROM tab1 AS cor0
----
13616
2082
6457

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 CROSS JOIN tab0, tab1 cor1, tab2 AS cor2
----
3645 values hashing to 9aea36b1adc82580fae09bf05c24fd77

query I rowsort
SELECT - col1 + ( col0 + ( col1 ) * + col2 ) AS col2 FROM tab0
----
2776
35
7460

query I rowsort
SELECT + cor0.col2 + - 55 - + 87 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 426f2c832836381df7fbf8a9ba0d3e54

query I rowsort
SELECT DISTINCT - cor0.col0 + tab1.col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 62ddc90ca27823261d1fd426a70a2985

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 - - tab1.col0 * - col0 col1 FROM tab1
----
-4039
-6304
45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9637
SELECT ALL + 77 * - col1 + CAST( NULL AS SIGNED ) * cor0.col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9637
SELECT ALL + 77 * - col1 + CAST ( NULL AS INTEGER ) * cor0.col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 37 + + col2 FROM tab0 AS cor0
----
119
38
70

query I rowsort
SELECT DISTINCT - + col2 * col1 + - col1 AS col1 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT DISTINCT - 61 * col1 AS col2 FROM tab0
----
-5246
-5551
-5917

onlyif mysql # use DIV operator for integer division
query I rowsort label-9641
SELECT col1 DIV col0 + col2 * ( - col2 ) * - 87 FROM tab0
----
584989
89
94746

skipif mysql # not compatible
query I rowsort label-9641
SELECT col1 / col0 + col2 * ( - col2 ) * - 87 FROM tab0
----
584989
89
94746

onlyif mysql # use DIV operator for integer division
query I rowsort label-9642
SELECT ALL tab0.col0 DIV + col2 AS col2 FROM tab0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-9642
SELECT ALL tab0.col0 / + col2 AS col2 FROM tab0
----
0
1
35

query I rowsort
SELECT col1 * - 31 AS col2 FROM tab2 AS cor0
----
-1829
-527
-961

query I rowsort
SELECT ALL 29 AS col0 FROM tab2
----
29
29
29

query I rowsort
SELECT ALL - 93 AS col1 FROM tab2
----
-93
-93
-93

query I rowsort
SELECT DISTINCT col1 * - 3 AS col1 FROM tab0
----
-258
-273
-291

query I rowsort
SELECT + tab0.col2 AS col0 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT - 96 + cor1.col1 AS col0 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to adf2bea1187fab215e09c9d50296cd45

query I rowsort
SELECT ALL - cor1.col2 AS col0 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT ALL - 50 + + tab0.col0 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to daea533e187eb077b9c995ad22cb5b25

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9651
SELECT + col2 * - CAST( + col1 AS SIGNED ) FROM tab2 AS cor0
----
-1534
-646
-837

skipif mysql # not compatible
query I rowsort label-9651
SELECT + col2 * - CAST ( + col1 AS INTEGER ) FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT + 18 FROM tab1, tab2 cor0, tab2 AS cor1
----
27 values hashing to 903ac227935c1532300db45a8537c595

query I rowsort
SELECT ALL - col0 + + 90 AS col0 FROM tab2 AS cor0
----
11
12
83

query I rowsort
SELECT - cor2.col2 FROM tab1, tab0 AS cor0, tab0 AS cor1, tab2, tab0 AS cor2
----
243 values hashing to 3e2b81ca10484cbfc66f186955e0e920

query I rowsort
SELECT ALL + 54 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

query I rowsort
SELECT ALL + 64 * col0 FROM tab2
----
448
4992
5056

query I rowsort
SELECT + col2 + - 41 FROM tab1
----
13
16
55

query I rowsort
SELECT DISTINCT 18 * col0 AS col1 FROM tab1
----
1152
1440
54

query I rowsort
SELECT DISTINCT col0 + 11 AS col1 FROM tab2
----
18
89
90

query I rowsort
SELECT ALL - 34 + - col2 FROM tab1 AS cor0
----
-130
-88
-91

query I rowsort
SELECT ALL - 99 * + cor0.col0 * - col1 FROM tab2 AS cor0
----
132957
21483
455598

query I rowsort
SELECT ALL + - col2 * - col0 + col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT DISTINCT ( + col0 ) + + col1 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-9664
SELECT DISTINCT + 91 DIV - tab1.col1 AS col0 FROM tab1
----
-3
-7
-9

skipif mysql # not compatible
query I rowsort label-9664
SELECT DISTINCT + 91 / - tab1.col1 AS col0 FROM tab1
----
-3
-7
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 90 col1 FROM tab1 cor0
----
90

query I rowsort
SELECT DISTINCT - + 90 * - col1 AS col0 FROM tab1 AS cor0
----
1170
2340
900

query I rowsort
SELECT ALL + 83 + col1 AS col1 FROM tab0 AS cor0
----
169
174
180

query I rowsort
SELECT DISTINCT - ( cor0.col2 ) * ( 13 ) FROM tab2 AS cor0
----
-338
-351
-494

query I rowsort
SELECT ALL + - 53 * - col2 AS col2 FROM tab2 AS cor0
----
1378
1431
2014

query I rowsort
SELECT ALL - 86 + col2 * cor0.col0 AS col2 FROM tab0 AS cor0
----
-51
706
7212

query I rowsort
SELECT + 17 * + col2 FROM tab2 cor0
----
442
459
646

query I rowsort
SELECT ALL cor1.col2 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT 4 * cor0.col0 FROM tab1 AS cor0
----
12
256
320

query I rowsort
SELECT - col1 * col0 + col0 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT - cor0.col2 * - col2 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT ALL col0 - + col1 * tab1.col0 AS col0 FROM tab1
----
-576
-75
-960

onlyif mysql # use DIV operator for integer division
query I rowsort label-9677
SELECT col1 - tab2.col1 DIV col1 AS col2 FROM tab2
----
16
30
58

skipif mysql # not compatible
query I rowsort label-9677
SELECT col1 - tab2.col1 / col1 AS col2 FROM tab2
----
16
30
58

query I rowsort
SELECT DISTINCT - - ( - col2 ) * col1 + - col0 + cor0.col1 AS col1 FROM tab0 AS cor0
----
-2776
-35
-7460

query I rowsort
SELECT ALL + col1 + + col2 AS col0 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT 68 AS col1 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 10aa25f1c6b97582c34521ac6452e0b4

query I rowsort
SELECT ALL + + cor0.col0 * col1 - + cor0.col2 AS col0 FROM tab1 AS cor0
----
24
583
944

onlyif mysql # use DIV operator for integer division
query I rowsort label-9682
SELECT col0 * - col1 DIV + col1 AS col1 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-9682
SELECT col0 * - col1 / + col1 AS col1 FROM tab0
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-9683
SELECT ALL + col1 DIV col0 col0 FROM tab2
----
0
0
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9683
SELECT ALL + col1 / col0 col0 FROM tab2
----
0
0
4

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL NOT IN ( + col1 * col1 + col0 )
----

query I rowsort
SELECT DISTINCT - col0 + col1 * col0 + col1 FROM tab1
----
101
586
973

query I rowsort
SELECT + tab2.col1 + col2 * - col1 + col0 * col0 FROM tab2
----
-757
4609
5612

query I rowsort
SELECT ALL col2 AS col1 FROM tab2 WHERE NOT NULL NOT BETWEEN col0 AND NULL
----

query I rowsort
SELECT DISTINCT col0 - - tab1.col0 AS col0 FROM tab1
----
128
160
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-9689
SELECT col1 DIV col2 - col2 * + tab1.col0 FROM tab1
----
-162
-3648
-7680

skipif mysql # not compatible
query I rowsort label-9689
SELECT col1 / col2 - col2 * + tab1.col0 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT ALL tab1.col0 + col0 * + col0 AS col2 FROM tab1
----
12
4160
6480

query I rowsort
SELECT + 34 * + col2 AS col0 FROM tab1
----
1836
1938
3264

query I rowsort
SELECT + - col1 * col0 + + cor0.col1 * col1 AS col2 FROM tab0 AS cor0
----
182
5332
6014

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 46 col0 FROM tab1 AS cor0
----
46

query I rowsort
SELECT DISTINCT + ( cor0.col0 ) * 18 * - 20 + + col0 AS col1 FROM tab2 AS cor0
----
-2513
-28002
-28361

query I rowsort
SELECT - - ( + col2 ) + - 60 * - ( col2 * - col1 ) AS col1 FROM tab1 cor0
----
-34143
-74784
-84186

query I rowsort
SELECT - col2 + col1 + ( + 45 ) AS col0 FROM tab1 cor0
----
-2
-38
17

query I rowsort
SELECT 47 + - cor0.col0 * + 64 FROM tab0 AS cor0
----
-1489
-2193
-5649

query I rowsort
SELECT - col2 + cor0.col1 * + 3 + 43 FROM tab1 AS cor0
----
-14
16
67

query I rowsort
SELECT col2 - + col1 AS col1 FROM tab1
----
28
47
83

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL NOT IN ( + col0 - - col1 )
----

query III rowsort
SELECT * FROM tab0 WHERE - col2 * - col1 BETWEEN ( NULL ) AND ( col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col2 FROM tab0, tab2 cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT DISTINCT col1 - col1 AS col2 FROM tab2
----
0

query I rowsort
SELECT col0 + - col0 + col0 FROM tab1
----
3
64
80

query III rowsort
SELECT ALL * FROM tab0 WHERE ( NULL ) IN ( + col0 )
----

query I rowsort
SELECT col1 FROM tab1 WHERE NOT ( NULL ) NOT IN ( col0 + col0 - col2 * col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-9707
SELECT ALL col2 * col2 DIV + col0 + - col2 + col0 * col0 * col1 FROM tab1
----
1152
40953
83219

skipif mysql # not compatible
query I rowsort label-9707
SELECT ALL col2 * col2 / + col0 + - col2 + col0 * col0 * col1 FROM tab1
----
1152
40953
83219

query I rowsort
SELECT ALL + col1 FROM tab1 WHERE NOT ( NULL ) IN ( - col1 * col2 + + col2 )
----

query I rowsort
SELECT - tab0.col1 * - tab0.col2 AS col1 FROM tab0
----
2838
7462
97

query I rowsort
SELECT DISTINCT tab0.col1 - tab0.col2 FROM tab0
----
53
9
96

query I rowsort
SELECT DISTINCT tab0.col2 - - tab0.col2 * tab0.col0 FROM tab0
----
36
7380
825

query I rowsort
SELECT col1 + - col1 * col0 AS col0 FROM tab1
----
-1027
-52
-630

query I rowsort
SELECT DISTINCT 93 + 26 FROM tab1 AS cor0
----
119

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9714
SELECT + ( + col0 ) * col0 + + CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9714
SELECT + ( + col0 ) * col0 + + CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL
NULL
NULL

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0, tab2 cor1, tab2, tab2 AS cor2
----
3645 values hashing to db428ec66bce13149e3129b417b0fe94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9716
SELECT + - CAST( 2 AS SIGNED ) AS col2 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 20c9213316527d507e26425041e08387

skipif mysql # not compatible
query I rowsort label-9716
SELECT + - CAST ( 2 AS INTEGER ) AS col2 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 20c9213316527d507e26425041e08387

skipif mysql # not compatible
query I rowsort
SELECT ALL + CAST ( + col0 AS REAL ) * + col0 AS col2 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT - 34 + + col2 FROM tab2 AS cor0
----
-7
-8
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-9719
SELECT ALL - - 53 * 62 DIV - col2 FROM tab0 AS cor0
----
-3286
-40
-99

skipif mysql # not compatible
query I rowsort label-9719
SELECT ALL - - 53 * 62 / - col2 FROM tab0 AS cor0
----
-3286
-40
-99

query I rowsort
SELECT - col2 * 34 FROM tab2 AS cor0
----
-1292
-884
-918

query I rowsort
SELECT DISTINCT + 40 * 75 FROM tab2 cor0
----
3000

query I rowsort
SELECT - 39 * - 69 FROM tab1 AS cor0
----
2691
2691
2691

query I rowsort
SELECT - 5 + - col1 * - col1 FROM tab2 AS cor0
----
284
3476
956

query I rowsort
SELECT DISTINCT + + 67 + - col0 * col0 FROM tab1 AS cor0
----
-4029
-6333
58

query I rowsort
SELECT + - col0 * col1 + col2 * + 0 + cor0.col2 AS col2 FROM tab1 AS cor0
----
-24
-583
-944

onlyif mysql # use DIV operator for integer division
query I rowsort label-9726
SELECT DISTINCT + 34 DIV col0 FROM tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-9726
SELECT DISTINCT + 34 / col0 FROM tab0 AS cor0
----
0
1

query I rowsort
SELECT ALL - + col0 + - col0 * + col0 FROM tab2 AS cor0
----
-56
-6162
-6320

query I rowsort
SELECT - col1 * col0 * col2 AS col0 FROM tab1 cor0
----
-36480
-4212
-99840

query I rowsort
SELECT ALL - 41 AS col1 FROM tab2 AS cor0
----
-41
-41
-41

query I rowsort
SELECT ALL 10 FROM tab0, tab0 AS cor0
----
9 values hashing to a47194429f3e0358a3aebffd5f050113

query I rowsort
SELECT + col0 - col0 * col2 AS col2 FROM tab0
----
-7209
-768
0

query I rowsort
SELECT + col1 + 63 * col0 AS col0 FROM tab0 AS cor0
----
1598
2302
5698

query I rowsort
SELECT ALL col2 + - 78 FROM tab1 AS cor0
----
-21
-24
18

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9734
SELECT DISTINCT + col2 / + CAST( NULL AS SIGNED ) + + 99 AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9734
SELECT DISTINCT + col2 / + CAST ( NULL AS INTEGER ) + + 99 AS col0 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT cor0.col1 * ( + col1 ) AS col2 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT ALL + col0 + + col2 + col1 FROM tab1 AS cor0
----
131
189
83

query I rowsort
SELECT ( + col2 ) * - col1 * col0 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT - col1 * + 69 + - col0 AS col0 FROM tab0 AS cor0
----
-5958
-6368
-6728

query I rowsort
SELECT DISTINCT - col2 + 81 AS col1 FROM tab1 AS cor0
----
-15
24
27

query I rowsort
SELECT ALL + col0 - 33 AS col2 FROM tab0 cor0
----
-9
2
56

query I rowsort
SELECT 42 * + cor1.col1 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 075b0bd456eac5567dc2e9c4391fd26b

onlyif mysql # use DIV operator for integer division
query I rowsort label-9742
SELECT col1 DIV 87 AS col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-9742
SELECT col1 / 87 AS col0 FROM tab1 AS cor0
----
0
0
0

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 CROSS JOIN tab2, tab1 cor1, tab2 AS cor2, tab2 AS cor3
----
3645 values hashing to e3826bc27970dd1a441a9cd4c13b096d

query I rowsort
SELECT DISTINCT + 78 AS col2 FROM tab1, tab0 AS cor0
----
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 34 col1 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 5b88331e40da4796cc4826c442aa45f7

query I rowsort
SELECT DISTINCT - 11 AS col0 FROM tab1
----
-11

query I rowsort
SELECT ( 16 ) + - col1 AS col1 FROM tab2
----
-1
-15
-43

query I rowsort
SELECT DISTINCT col0 + - ( + col2 ) FROM tab0 AS cor0
----
-9
34
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 72 - + col2 col2 FROM tab0 AS cor0
----
-105
-154
-73

query I rowsort
SELECT DISTINCT ( - col2 ) + + col1 * + col2 + col1 AS col0 FROM tab1 AS cor0
----
1165
1376
523

query I rowsort
SELECT + 92 AS col1 FROM tab2 AS cor0
----
92
92
92

query I rowsort
SELECT ALL cor0.col2 + - col1 * + col0 AS col0 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT - 34 * col2 FROM tab1 AS cor0
----
-1836
-1938
-3264

query I rowsort
SELECT DISTINCT - - 19 AS col2 FROM tab1 AS cor0
----
19

query I rowsort
SELECT ALL - 42 + + cor0.col0 * col0 FROM tab1 cor0
----
-33
4054
6358

skipif mysql # not compatible
query I rowsort
SELECT ALL - col0 * + CAST ( + 87 AS REAL ) + - col1 AS col1 FROM tab2 AS cor0
----
-640
-6845
-6890

query I rowsort
SELECT - - cor0.col1 * + col1 + - col1 * - cor0.col0 AS col2 FROM tab2 AS cor0
----
1178
1632
8083

query I rowsort
SELECT + - col0 * 22 + cor0.col0 - col1 AS col0 FROM tab0 AS cor0
----
-1960
-590
-832

query I rowsort
SELECT ALL col2 * col1 * + col0 AS col1 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT DISTINCT - col2 * 58 AS col1 FROM tab2 cor0
----
-1508
-1566
-2204

onlyif mysql # use DIV operator for integer division
query I rowsort label-9761
SELECT - col0 DIV - 63 FROM tab1 cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-9761
SELECT - col0 / - 63 FROM tab1 cor0
----
0
1
1

query I rowsort
SELECT + col2 * - ( col2 ) + col1 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT DISTINCT col2 + ( 7 ) FROM tab0 AS cor0
----
40
8
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9764
SELECT + - CAST( NULL AS SIGNED ) * + col2 * - cor0.col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9764
SELECT + - CAST ( NULL AS INTEGER ) * + col2 * - cor0.col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 96 FROM tab0, tab2 cor0
----
9 values hashing to 22c5141a629f0ef396738ee2c8be6303

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9766
SELECT DISTINCT + CAST( NULL AS SIGNED ) + - col1 * - col1 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9766
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + - col1 * - col1 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 80 col0 FROM tab2 cor0
----
-80
-80
-80

query I rowsort
SELECT DISTINCT + 84 AS col2 FROM tab1 AS cor0
----
84

query I rowsort
SELECT - + ( 53 ) * - col0 + + col0 FROM tab0 cor0
----
1296
1890
4806

onlyif mysql # use DIV operator for integer division
query I rowsort label-9770
SELECT tab2.col1 DIV + tab2.col1 + col0 FROM tab2
----
79
8
80

skipif mysql # not compatible
query I rowsort label-9770
SELECT tab2.col1 / + tab2.col1 + col0 FROM tab2
----
79
8
80

query I rowsort
SELECT DISTINCT 49 AS col0 FROM tab0, tab2 cor0
----
49

query I rowsort
SELECT ALL 53 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to fede6033dee346dbd272085c05724fda

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col0 + col1 col2 FROM tab1
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 * + cor0.col2 col2 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT + + cor0.col2 * col0 + col0 * - cor0.col1 * col2 AS col0 FROM tab2 AS cor0
----
-117624
-48032
-5670

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE ( - col0 ) NOT BETWEEN - col1 AND NULL OR NULL NOT BETWEEN NULL AND ( NULL )
----
64
10
57
80
13
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col1 * - col2 + - col0 col1 FROM tab2 cor0
----
1456
567
830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + col1 * col2 col1 FROM tab2 AS cor0
----
1612
725
844

query III rowsort
SELECT ALL * FROM tab0 AS cor0 WHERE NOT col0 IN ( + cor0.col2 + - col1 * - col2 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query III rowsort
SELECT * FROM tab1 WHERE NOT col0 <> col1 - col0
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 - col1 col1 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT DISTINCT ( + col0 ) + col1 * + col0 FROM tab1
----
1120
704
81

query I rowsort
SELECT DISTINCT + col0 * + col0 + + col0 AS col0 FROM tab2
----
56
6162
6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-9784
SELECT - col2 + - col0 DIV tab0.col1 + - col2 FROM tab0
----
-164
-2
-66

skipif mysql # not compatible
query I rowsort label-9784
SELECT - col2 + - col0 / tab0.col1 + - col2 FROM tab0
----
-164
-2
-66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * - cor0.col1 col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 75a608bf2ba236d24f146ac4aff9ec52

onlyif mysql # use DIV operator for integer division
query I rowsort label-9786
SELECT DISTINCT col0 * - col2 + col1 + col1 DIV tab0.col2 FROM tab0
----
-704
-7206
159

skipif mysql # not compatible
query I rowsort label-9786
SELECT DISTINCT col0 * - col2 + col1 + col1 / tab0.col2 FROM tab0
----
-704
-7206
159

onlyif mysql # use DIV operator for integer division
query I rowsort label-9787
SELECT - tab2.col1 + - tab2.col0 * col1 DIV + col0 FROM tab2
----
-118
-34
-62

skipif mysql # not compatible
query I rowsort label-9787
SELECT - tab2.col1 + - tab2.col0 * col1 / + col0 FROM tab2
----
-118
-34
-62

query I rowsort
SELECT + col1 * - cor0.col0 + col0 * col2 AS col0 FROM tab1 AS cor0
----
3008
6640
84

query I rowsort
SELECT DISTINCT cor0.col2 * + col0 AS col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT - + col2 * col1 + - 65 AS col0 FROM tab1 AS cor0
----
-1313
-1469
-635

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor1.col1 col0 FROM tab2, tab0 AS cor0, tab0 AS cor1, tab0, tab1 AS cor2
----
86
91
97

query I rowsort
SELECT DISTINCT - col0 * col0 * + col2 + cor0.col2 FROM tab1 AS cor0
----
-233415
-432
-614304

query I rowsort
SELECT DISTINCT + col1 * - 76 * + 61 - - col0 * ( - ( col0 ) ) FROM tab0
----
-399272
-429797
-450917

query I rowsort
SELECT - 54 FROM tab2, tab1 cor0, tab2 AS cor1
----
27 values hashing to 71e27a12767d3a987ce05e4d6edad211

query I rowsort
SELECT DISTINCT ( cor0.col2 ) FROM tab0, tab1 AS cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-9796
SELECT tab0.col0 DIV - 80 FROM tab0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-9796
SELECT tab0.col0 / - 80 FROM tab0
----
-1
0
0

query I rowsort
SELECT - col0 + col0 + + col2 FROM tab1
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-9798
SELECT + col0 DIV - 1 - + col0 FROM tab1
----
-128
-160
-6

skipif mysql # not compatible
query I rowsort label-9798
SELECT + col0 / - 1 - + col0 FROM tab1
----
-128
-160
-6

query I rowsort
SELECT - tab0.col1 * - 39 FROM tab0, tab2 cor0, tab1 AS cor1
----
27 values hashing to 82e803dd2c1eeff2a43161ac8c810948

query I rowsort
SELECT - 38 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to e8c064543bf0f2e57329db1bb0a411e3

query I rowsort
SELECT DISTINCT + 9 * 50 FROM tab1
----
450

query I rowsort
SELECT DISTINCT + 55 * - col1 * col1 AS col0 FROM tab0 AS cor0
----
-406780
-455455
-517495

query I rowsort
SELECT DISTINCT - - col2 - + col2 AS col2 FROM tab2 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-9804
SELECT ALL - 62 DIV - col1 AS col2 FROM tab2 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-9804
SELECT ALL - 62 / - col1 AS col2 FROM tab2 AS cor0
----
1
2
3

query I rowsort
SELECT + col1 * + col0 + + col2 AS col1 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT ALL + + 41 + col1 * 41 AS col2 FROM tab1 AS cor0
----
1107
451
574

query I rowsort
SELECT ALL 26 FROM tab0, tab1, tab1 cor0
----
27 values hashing to ede8226bb7e602e221f9d98345b4da37

query I rowsort
SELECT DISTINCT cor0.col0 FROM tab2, tab0, tab0 AS cor0
----
24
35
89

query I rowsort
SELECT 2 * + tab1.col2 AS col1 FROM tab1, tab0, tab2 AS cor0, tab1 AS cor1
----
81 values hashing to f48c8bb695871f0da31c445210023ea6

query I rowsort
SELECT - + 40 * col1 FROM tab0 cor0
----
-3440
-3640
-3880

query I rowsort
SELECT ( - col0 ) * + col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT col2 * + col1 * col1 FROM tab1
----
16224
36504
5700

query I rowsort
SELECT ( col2 ) - col0 FROM tab2
----
-41
-52
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-9814
SELECT + 91 - col0 DIV 40 col1 FROM tab2
----
90
90
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9814
SELECT + 91 - col0 / 40 col1 FROM tab2
----
90
90
91

query I rowsort
SELECT ALL 14 + cor0.col0 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 4239d05e3825cd03b6cbe4d3f3d7679e

onlyif mysql # use DIV operator for integer division
query I rowsort label-9816
SELECT ALL - 8 DIV - col2 + - col1 AS col1 FROM tab1
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-9816
SELECT ALL - 8 / - col2 + - col1 AS col1 FROM tab1
----
-10
-13
-26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 50 * col0 col0 FROM tab1
----
-150
-3200
-4000

query I rowsort
SELECT ALL col1 + tab2.col0 AS col2 FROM tab2
----
137
38
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9819
SELECT DISTINCT col2 + + col2 * CAST( NULL AS DECIMAL ) FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-9819
SELECT DISTINCT col2 + + col2 * CAST ( NULL AS REAL ) FROM tab2
----
NULL

query I rowsort
SELECT cor0.col1 * cor0.col0 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-9821
SELECT cor0.col1 DIV + cor0.col1 + col2 AS col0 FROM tab2 AS cor0
----
27
28
39

skipif mysql # not compatible
query I rowsort label-9821
SELECT cor0.col1 / + cor0.col1 + col2 AS col0 FROM tab2 AS cor0
----
27
28
39

onlyif mysql # use DIV operator for integer division
query I rowsort label-9822
SELECT - col1 DIV col0 + + col0 AS col2 FROM tab1
----
-5
64
80

skipif mysql # not compatible
query I rowsort label-9822
SELECT - col1 / col0 + + col0 AS col2 FROM tab1
----
-5
64
80

query I rowsort
SELECT col1 * + 16 * - col2 FROM tab2 cor0
----
-10336
-13392
-24544

query I rowsort
SELECT ALL col1 * 17 FROM tab1 AS cor0
----
170
221
442

onlyif mysql # use DIV operator for integer division
query I rowsort label-9825
SELECT + col2 DIV - ( col0 ) AS col2 FROM tab2 AS cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-9825
SELECT + col2 / - ( col0 ) AS col2 FROM tab2 AS cor0
----
-3
0
0

query I rowsort
SELECT DISTINCT - cor0.col2 * 3 FROM tab2 AS cor0
----
-114
-78
-81

query I rowsort
SELECT - col2 * + 71 AS col1 FROM tab1 cor0
----
-3834
-4047
-6816

query I rowsort
SELECT ALL + col0 - 0 * - col2 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + col1 + ( - 6 + - col1 ) AS col1 FROM tab1 AS cor0
----
-6

onlyif mysql # use DIV operator for integer division
query I rowsort label-9830
SELECT ALL - col0 + + col0 DIV - col0 AS col1 FROM tab0 AS cor0
----
-25
-36
-90

skipif mysql # not compatible
query I rowsort label-9830
SELECT ALL - col0 + + col0 / - col0 AS col1 FROM tab0 AS cor0
----
-25
-36
-90

query I rowsort
SELECT col0 + col1 * col2 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT ALL col2 * cor0.col0 + col1 AS col1 FROM tab1 AS cor0
----
188
3658
7693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + cor0.col0 col2 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT ALL - col2 * - 97 FROM tab2 AS cor0
----
2522
2619
3686

skipif mysql # not compatible
query I rowsort
SELECT CAST ( + ( col1 ) AS REAL ) + + col0 * + 76 AS col1 FROM tab2 AS cor0
----
563
5987
6021

query I rowsort
SELECT + col1 * ( + col1 ) + + 25 * 81 * col0 AS col1 FROM tab1 AS cor0
----
129700
162169
6751

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9837
SELECT + CAST( NULL AS DECIMAL ) * + col2 + + col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9837
SELECT + CAST ( NULL AS REAL ) * + col2 + + col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - 15 AS col0 FROM tab1 AS cor0
----
15
15
15

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9839
SELECT ALL + + CAST( NULL AS DECIMAL ) + - cor0.col0 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9839
SELECT ALL + + CAST ( NULL AS REAL ) + - 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-9840
SELECT DISTINCT - CAST( NULL AS SIGNED ) + - col2 + col1 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9840
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + - col2 + col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + + ( - 19 ) + col1 * col0 - 18 FROM tab1 AS cor0
----
1003
41
603

query I rowsort
SELECT - ( 48 ) AS col2 FROM tab2 AS cor0
----
-48
-48
-48

onlyif mysql # use DIV operator for integer division
query I rowsort label-9843
SELECT ALL + 67 * col2 DIV col1 + col1 * + cor0.col2 + + col0 AS col1 FROM tab1 AS cor0
----
1015
1546
1822

skipif mysql # not compatible
query I rowsort label-9843
SELECT ALL + 67 * col2 / col1 + col1 * + cor0.col2 + + col0 AS col1 FROM tab1 AS cor0
----
1015
1546
1822

query I rowsort
SELECT ALL 52 + col0 * - col2 FROM tab2 cor0
----
-137
-1976
-2950

query I rowsort
SELECT DISTINCT + - ( cor0.col2 ) FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT - - 87 * col2 + col1 FROM tab2 AS cor0
----
2321
2380
3323

query I rowsort
SELECT 31 AS col2 FROM tab1, tab0 AS cor0 CROSS JOIN tab2
----
27 values hashing to c3c6f92f0ca72d71793339f88a57e336

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9848
SELECT CAST( + col1 AS SIGNED ) + - col0 AS col0 FROM tab1
----
-54
-67
23

skipif mysql # not compatible
query I rowsort label-9848
SELECT CAST ( + col1 AS INTEGER ) + - col0 AS col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT col1 - 25 AS col1 FROM tab1
----
-12
-15
1

query I rowsort
SELECT ALL col0 + 79 * col0 FROM tab0
----
1920
2800
7120

query I rowsort
SELECT ALL - col1 + + 58 * col2 - 84 AS col2 FROM tab2 cor0
----
1365
1451
2103

query I rowsort
SELECT - 33 + col2 AS col0 FROM tab2 AS cor0
----
-6
-7
5

query I rowsort
SELECT + + ( + 42 ) FROM tab2 AS cor0
----
42
42
42

query I rowsort
SELECT + col2 * + 76 * - tab2.col1 + col2 FROM tab2
----
-116558
-49058
-63585

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9855
SELECT ALL - tab0.col1 * - CAST( + col2 AS SIGNED ) + col0 AS col2 FROM tab0
----
132
2862
7551

skipif mysql # not compatible
query I rowsort label-9855
SELECT ALL - tab0.col1 * - CAST ( + col2 AS INTEGER ) + col0 AS col2 FROM tab0
----
132
2862
7551

onlyif mysql # use DIV operator for integer division
query I rowsort label-9856
SELECT col1 * col1 + + col1 DIV col0 FROM tab0
----
7399
8282
9411

skipif mysql # not compatible
query I rowsort label-9856
SELECT col1 * col1 + + col1 / col0 FROM tab0
----
7399
8282
9411

query I rowsort
SELECT - 1 * col0 FROM tab0 AS cor0
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-9858
SELECT ALL + col0 DIV - col1 + - col2 AS col0 FROM tab1 AS cor0
----
-102
-54
-63

skipif mysql # not compatible
query I rowsort label-9858
SELECT ALL + col0 / - col1 + - col2 AS col0 FROM tab1 AS cor0
----
-102
-54
-63

query I rowsort
SELECT ALL col0 * - ( - col2 ) FROM tab0 cor0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - col0 ) col1 FROM tab1 cor0
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( - col0 ) * + col0 + + 38 col1 FROM tab0 AS cor0
----
-1187
-538
-7883

onlyif mysql # use DIV operator for integer division
query I rowsort label-9862
SELECT ALL - + ( - col2 ) DIV + col2 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-9862
SELECT ALL - + ( - col2 ) / + col2 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT + - col2 + + 18 FROM tab0 AS cor0
----
-15
-64
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 50 * col0 + + col1 col2 FROM tab1 AS cor0
----
-124
-3190
-3987

onlyif mysql # use DIV operator for integer division
query I rowsort label-9865
SELECT ALL - col2 DIV + col1 + col1 * 12 AS col0 FROM tab0 AS cor0
----
1032
1092
1164

skipif mysql # not compatible
query I rowsort label-9865
SELECT ALL - col2 / + col1 + col1 * 12 AS col0 FROM tab0 AS cor0
----
1032
1092
1164

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9866
SELECT - + CAST( + col0 AS SIGNED ) + col1 col0 FROM tab0 cor0
----
2
62
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9866
SELECT - + CAST ( + col0 AS INTEGER ) + col1 col0 FROM tab0 cor0
----
2
62
62

query I rowsort
SELECT ALL + - ( col1 ) * - col1 + 82 FROM tab1 AS cor0
----
182
251
758

query I rowsort
SELECT DISTINCT + 62 + col1 * 35 * col0 + - col1 FROM tab0
----
118790
283436
72216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor1.col1 col2 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT + col1 - - col2 AS col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT - ( + col0 ) - - col2 AS col1 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT + - ( - col0 ) - col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT - col1 * - col2 + + 14 * col1 AS col1 FROM tab2 AS cor0
----
1271
2360
884

query I rowsort
SELECT + 2 FROM tab1 cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

query I rowsort
SELECT ALL col1 + col1 * - col1 AS col0 FROM tab0 AS cor0
----
-7310
-8190
-9312

query I rowsort
SELECT ALL + cor0.col2 * - 96 FROM tab2 AS cor0
----
-2496
-2592
-3648

query I rowsort
SELECT col1 * ( 55 ) FROM tab1
----
1430
550
715

query I rowsort
SELECT ALL + col2 + cor0.col1 * col2 + + col0 AS col0 FROM tab0 AS cor0
----
133
2895
7633

query I rowsort
SELECT col0 * + 25 AS col0 FROM tab2 AS cor0
----
175
1950
1975

query I rowsort
SELECT ALL - col2 + - col2 * + cor0.col0 FROM tab0 AS cor0
----
-36
-7380
-825

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9881
SELECT - - cor0.col2 + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9881
SELECT - - cor0.col2 + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 + ( + 66 ) AS col2 FROM tab2 cor0
----
144
145
73

query I rowsort
SELECT + cor0.col2 * 38 + col1 FROM tab1 cor0
----
2078
2176
3661

query I rowsort
SELECT DISTINCT + cor0.col0 + 22 * 70 AS col0 FROM tab2 AS cor0
----
1547
1618
1619

query I rowsort
SELECT ALL - col2 * + cor0.col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT - col2 + + col2 + + col2 AS col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT + + 97 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
97

query I rowsort
SELECT 13 * 89 FROM tab0, tab0 AS cor0
----
9 values hashing to bf5911ea657894dccd955f968e3967ad

query I rowsort
SELECT + col2 * cor0.col1 - - 48 AS col0 FROM tab1 AS cor0
----
1296
1452
618

query I rowsort
SELECT col1 + col1 * - col1 AS col1 FROM tab0 AS cor0
----
-7310
-8190
-9312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * 53 + - 23 * + cor0.col0 + cor0.col0 col0 FROM tab2 cor0
----
-837
1411
1489

query I rowsort
SELECT + cor0.col0 + - 35 - col2 * col1 AS col2 FROM tab1 cor0
----
-1203
-1436
-541

query I rowsort
SELECT ALL - col2 + + 87 * - col2 + + col2 FROM tab2 AS cor0
----
-2262
-2349
-3306

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 75 col2 FROM tab0, tab1 cor0
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 cor0, tab0 cor1, tab1 cor2
----
972 values hashing to 0210050fb1701e2797a9b17e1ebac91e

query I rowsort
SELECT + col0 * - col0 + + col0 AS col1 FROM tab2 AS cor0
----
-42
-6006
-6162

query I rowsort
SELECT DISTINCT cor1.col2 AS col1 FROM tab2, tab0 cor0, tab1 cor1
----
54
57
96

query I rowsort
SELECT - col0 * col2 + col1 AS col0 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT - - col2 + + 59 + + cor0.col1 FROM tab2 AS cor0
----
114
117
144

query I rowsort
SELECT + - ( + col2 ) AS col0 FROM tab1 cor0
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - col0 * col2 + 46 * col0 col2 FROM tab2 AS cor0
----
123240
54668
6181

query I rowsort
SELECT + + cor0.col2 + col1 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9903
SELECT ALL CAST( NULL AS SIGNED ) * - cor0.col0 AS col1 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-9903
SELECT ALL CAST ( NULL AS INTEGER ) * - cor0.col0 AS col1 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT DISTINCT + col0 + cor0.col0 * cor0.col0 * 38 AS col0 FROM tab2 AS cor0
----
1869
231270
237237

query I rowsort
SELECT ALL - - 89 + col1 * + 99 AS col1 FROM tab2 AS cor0
----
1772
3158
5930

query I rowsort
SELECT - 77 + + col1 AS col1 FROM tab1 AS cor0
----
-51
-64
-67

query I rowsort
SELECT DISTINCT 49 + col2 AS col1 FROM tab0
----
131
50
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-9908
SELECT 41 DIV + col1 col0 FROM tab2
----
0
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-9908
SELECT 41 / + col1 col0 FROM tab2
----
0
1
2

query I rowsort
SELECT - + cor0.col0 * - col2 + - col2 + col2 * + 70 FROM tab2 AS cor0
----
2052
3822
5624

query I rowsort
SELECT + + cor0.col0 + - col0 + + 11 FROM tab2 AS cor0
----
11
11
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - tab1.col0 ) col0 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT ALL + col2 * + 34 * col2 AS col0 FROM tab0
----
228616
34
37026

query I rowsort
SELECT ALL - 72 * + col0 * - col1 + col2 AS col0 FROM tab2 AS cor0
----
15651
331370
96734

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9914
SELECT DISTINCT CAST( NULL AS SIGNED ) * - cor0.col1 * - col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9914
SELECT DISTINCT CAST ( NULL AS INTEGER ) * - cor0.col1 * - col0 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 67 * col0 col1 FROM tab2 AS cor0
----
-469
-5226
-5293

skipif mysql # not compatible
query I rowsort
SELECT CAST ( + cor0.col1 AS REAL ) * + col1 * col2 FROM tab0 AS cor0
----
244068
679042
9409

query I rowsort
SELECT - 21 + - col2 FROM tab2 AS cor0
----
-47
-48
-59

query I rowsort
SELECT - - ( col0 ) * 20 AS col2 FROM tab0 cor0
----
1780
480
700

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9919
SELECT + - 84 + col2 * CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9919
SELECT + - 84 + col2 * CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + col2 + + col2 * + col2 FROM tab0 AS cor0
----
0
1056
6642

query I rowsort
SELECT 2 AS col2 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 535345c50a19fdab97ce05d1837b1f09

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 * - col0 col1 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT - ( col1 ) * - 10 FROM tab0 AS cor0
----
860
910
970

query I rowsort
SELECT DISTINCT - + cor1.col2 - 76 FROM tab1 cor0 CROSS JOIN tab0 cor1
----
-109
-158
-77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( ( col1 ) ) * col0 col2 FROM tab2
----
1343
217
4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9926
SELECT CAST( 23 AS SIGNED ) AS col1 FROM tab2
----
23
23
23

skipif mysql # not compatible
query I rowsort label-9926
SELECT CAST ( 23 AS INTEGER ) AS col1 FROM tab2
----
23
23
23

query I rowsort
SELECT DISTINCT + 53 * col1 AS col1 FROM tab0
----
4558
4823
5141

query I rowsort
SELECT - col2 * + ( - col1 ) + cor0.col0 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT - col1 + + 19 * col2 AS col0 FROM tab1 AS cor0
----
1000
1073
1811

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * col0 + col1 * + col1 col0 FROM tab2 AS cor0
----
-2603
-5952
912

query I rowsort
SELECT col0 * - 0 + cor0.col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL + cor0.col1 + col0 AS col0 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT DISTINCT - col2 - 44 AS col1 FROM tab2 AS cor0
----
-70
-71
-82

query I rowsort
SELECT - col0 - + 73 * + col2 FROM tab0 AS cor0
----
-108
-2433
-6075

query I rowsort
SELECT ALL col1 * col1 + - col2 FROM tab2 AS cor0
----
251
3455
934

query I rowsort
SELECT DISTINCT tab1.col0 * + ( tab1.col2 + col2 ) * + col2 FROM tab1
----
1474560
17496
415872

query I rowsort
SELECT ALL 3 AS col1 FROM tab1, tab1 cor0
----
9 values hashing to 3cf1e377a943589897b8d431a834f1ba

query I rowsort
SELECT col0 * ( col2 ) AS col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT ALL ( - 24 ) AS col0 FROM tab2 cor0
----
-24
-24
-24

query I rowsort
SELECT - - 61 * col0 * col2 FROM tab0 AS cor0
----
2135
445178
48312

query I rowsort
SELECT ALL + 94 * - col0 AS col2 FROM tab2 AS cor0
----
-658
-7332
-7426

query I rowsort
SELECT - 97 * ( + col1 * col2 ) AS col1 FROM tab2 AS cor0
----
-148798
-62662
-81189

query I rowsort
SELECT DISTINCT - 83 AS col2 FROM tab1, tab2 AS cor0
----
-83

query I rowsort
SELECT - col1 * - col0 * col0 + + tab0.col1 * ( - col1 ) FROM tab0
----
109416
42140
712530

query I rowsort
SELECT ALL - 49 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 01b1fa22fee872a7ba64f90d6046ffae

query I rowsort
SELECT DISTINCT + - 3 - col2 * - col0 FROM tab2 AS cor0
----
186
2025
2999

query I rowsort
SELECT ALL + 62 + + cor0.col1 * col2 FROM tab0 AS cor0
----
159
2900
7524

query I rowsort
SELECT ALL + + ( col0 ) + - col1 AS col2 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT - col1 - + tab1.col2 FROM tab1
----
-109
-67
-80

query I rowsort
SELECT ALL 67 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

query I rowsort
SELECT + col2 + - 27 FROM tab1
----
27
30
69

query I rowsort
SELECT ALL 2 + - col1 * col2 FROM tab0
----
-2836
-7460
-95

query I rowsort
SELECT ALL + - ( col2 ) + col2 + - col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT col1 + + col1 * col0 FROM tab2 cor0
----
1360
248
4661

query I rowsort
SELECT DISTINCT cor1.col2 AS col0 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-9956
SELECT DISTINCT 95 * + 13 + col1 + col1 DIV col2 FROM tab1 AS cor0
----
1245
1248
1261

skipif mysql # not compatible
query I rowsort label-9956
SELECT DISTINCT 95 * + 13 + col1 + col1 / col2 FROM tab1 AS cor0
----
1245
1248
1261

query I rowsort
SELECT ALL - - 17 + + cor0.col1 FROM tab1 AS cor0
----
27
30
43

query I rowsort
SELECT DISTINCT + + col2 * + cor0.col0 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT 2 + col2 AS col2 FROM tab2 AS cor0
----
28
29
40

query I rowsort
SELECT + col2 * col0 - + 67 * - 86 * tab0.col1 FROM tab0
----
496324
531640
558949

query I rowsort
SELECT DISTINCT - 65 * col2 AS col2 FROM tab0
----
-2145
-5330
-65

query I rowsort
SELECT DISTINCT + 23 FROM tab2
----
23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9963
SELECT ALL + col2 - CAST( - col1 AS SIGNED ) * cor0.col0 FROM tab1 AS cor0
----
1136
132
697

skipif mysql # not compatible
query I rowsort label-9963
SELECT ALL + col2 - CAST ( - col1 AS INTEGER ) * cor0.col0 FROM tab1 AS cor0
----
1136
132
697

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9964
SELECT - col1 * CAST( + cor0.col2 AS SIGNED ) + - col2 FROM tab0 AS cor0
----
-2871
-7544
-98

skipif mysql # not compatible
query I rowsort label-9964
SELECT - col1 * CAST ( + cor0.col2 AS INTEGER ) + - col2 FROM tab0 AS cor0
----
-2871
-7544
-98

query I rowsort
SELECT - col1 * col1 * + col2 + + col1 AS col0 FROM tab1
----
-16211
-36478
-5690

query I rowsort
SELECT 92 * - col0 + - col2 AS col2 FROM tab0
----
-2241
-3221
-8270

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 * ( 64 ) col0 FROM tab0 AS cor0
----
1536
2240
5696

query I rowsort
SELECT + col1 + - 49 FROM tab1 AS cor0
----
-23
-36
-39

query I rowsort
SELECT DISTINCT - + col0 * col2 * 14 + - col0 FROM tab0 AS cor0
----
-102261
-11112
-525

query I rowsort
SELECT ALL + col0 * col2 + 29 AS col1 FROM tab0 AS cor0
----
64
7327
821

query I rowsort
SELECT DISTINCT col1 * - col2 + - ( col0 ) * + col0 AS col2 FROM tab0 AS cor0
----
-1322
-15383
-3414

query I rowsort
SELECT DISTINCT + col2 - col0 FROM tab2 cor0
----
-41
-52
20

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9974
SELECT DISTINCT - - cor0.col2 * + CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9974
SELECT DISTINCT - - cor0.col2 * + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + col1 * - 74 * 7 FROM tab1 AS cor0
----
-13468
-5180
-6734

query I rowsort
SELECT + col1 * + col0 + + col1 FROM tab1 cor0
----
104
1053
650

query I rowsort
SELECT + col0 * 5 + + col1 AS col2 FROM tab2 AS cor0
----
412
449
66

query I rowsort
SELECT ALL - + col2 + cor0.col0 * - col2 AS col0 FROM tab1 cor0
----
-216
-3705
-7776

query I rowsort
SELECT DISTINCT - ( - col0 ) * col0 FROM tab0 AS cor0
----
1225
576
7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 15 col0 FROM tab0
----
-15
-15
-15

query I rowsort
SELECT DISTINCT col2 + + cor0.col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT + 20 + + col2 * col0 FROM tab2 AS cor0
----
2048
209
3022

query I rowsort
SELECT + cor0.col1 + col0 * - col0 AS col2 FROM tab0 AS cor0
----
-1128
-490
-7830

query I rowsort
SELECT - col0 + 68 * col0 FROM tab1 AS cor0
----
201
4288
5360

query I rowsort
SELECT cor0.col0 * - 10 AS col2 FROM tab1 AS cor0
----
-30
-640
-800

onlyif mysql # use DIV operator for integer division
query I rowsort label-9986
SELECT + col0 + - CAST( + col2 AS SIGNED ) DIV cor0.col1 AS col2 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-9986
SELECT + col0 + - CAST ( + col2 AS INTEGER ) / cor0.col1 AS col2 FROM tab0 AS cor0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9987
SELECT col0 * + CAST( - col0 AS SIGNED ) + col2 AS col0 FROM tab1 AS cor0
----
-4039
-6304
45

skipif mysql # not compatible
query I rowsort label-9987
SELECT col0 * + CAST ( - col0 AS INTEGER ) + col2 AS col0 FROM tab1 AS cor0
----
-4039
-6304
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 53 * + col0 col0 FROM tab0
----
-1272
-1855
-4717

query I rowsort
SELECT ALL 56 + + tab2.col2 * 54 FROM tab2
----
1460
1514
2108

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * col1 col1 FROM tab0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9991
SELECT + tab2.col1 + - col1 * - CAST( NULL AS SIGNED ) * ( - tab2.col2 ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-9991
SELECT + tab2.col1 + - col1 * - CAST ( NULL AS INTEGER ) * ( - tab2.col2 ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + col1 * - col2 AS col1 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT - - 81 + - col0 * col1 FROM tab2 AS cor0
----
-1262
-136
-4521

query I rowsort
SELECT DISTINCT - 14 * + cor0.col2 AS col1 FROM tab1, tab2 AS cor0
----
-364
-378
-532

onlyif mysql # use DIV operator for integer division
query I rowsort label-9995
SELECT 48 * 35 DIV col2 AS col1 FROM tab1
----
17
29
31

skipif mysql # not compatible
query I rowsort label-9995
SELECT 48 * 35 / col2 AS col1 FROM tab1
----
17
29
31

query I rowsort
SELECT ALL col2 * cor0.col2 * + col0 FROM tab0 AS cor0
----
26136
35
598436

onlyif mysql # use DIV operator for integer division
query I rowsort label-9997
SELECT DISTINCT - 7 + + col0 DIV col0 FROM tab1 cor0
----
-6

skipif mysql # not compatible
query I rowsort label-9997
SELECT DISTINCT - 7 + + col0 / col0 FROM tab1 cor0
----
-6

query I rowsort
SELECT ALL + 9 * 61 FROM tab2 AS cor0
----
549
549
549

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-9999
SELECT DISTINCT cor0.col2 * col0 * col1 + + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-9999
SELECT DISTINCT cor0.col2 * col0 * col1 + + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL

