sqllogictest
Artifact Content
Not logged in

Artifact d213d2ba02338cf1fa39c275b3c9e418c17fdc5f:


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)

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + col2 * col0 col0 FROM tab1 AS cor0
----
159
3584
7600

onlyif mysql # use DIV operator for integer division
query I rowsort label-1
SELECT + 94 DIV - col2 + col1 + 9 FROM tab0 AS cor0
----
12
93
99

skipif mysql # not compatible
query I rowsort label-1
SELECT + 94 / - col2 + col1 + 9 FROM tab0 AS cor0
----
12
93
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 + col1 * col2 * col1 col0 FROM tab2 AS cor0
----
10944
25920
90480

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

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7
SELECT ALL CAST( + 55 AS SIGNED ) FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 832128adb1ddc65c3105e29cc2c8b3a3

skipif mysql # not compatible
query I rowsort label-7
SELECT ALL CAST ( + 55 AS INTEGER ) FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 832128adb1ddc65c3105e29cc2c8b3a3

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

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

query I rowsort
SELECT ( + 24 ) + + col1 * col0 AS col1 FROM tab2
----
1367
241
4626

query I rowsort
SELECT + ( 20 ) + - col1 AS col1 FROM tab1 cor0
----
-6
10
7

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

query I rowsort
SELECT - - 79 FROM tab1 cor0
----
79
79
79

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

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

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

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

query I rowsort
SELECT - 62 FROM tab2, tab1 AS cor0
----
9 values hashing to f0e93f6ff5fc3cf50a14e276206dad5c

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

query I rowsort
SELECT + col2 * 66 + + col0 FROM tab1
----
3567
3826
6416

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

query I rowsort
SELECT 4 * cor0.col0 AS col2 FROM tab1, tab0 AS cor0, tab2, tab0 AS cor1
----
81 values hashing to 2bea8b2dcf8e0f0e6a2e48cbf386f1a3

query I rowsort
SELECT - 82 FROM tab0, tab0 cor0
----
9 values hashing to f800b0aad28b82b2deb67f7045c9a45c

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

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

query I rowsort
SELECT ALL - ( + 87 ) FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to c0011cd00aa3e86f06bebc13678997f9

query I rowsort
SELECT DISTINCT - 36 * cor1.col1 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
-360
-468
-936

query I rowsort
SELECT DISTINCT 56 AS col2 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
56

query I rowsort
SELECT ALL - col0 * 13 AS col0 FROM tab0
----
-1157
-312
-455

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

query I rowsort
SELECT + col2 * 27 AS col2 FROM tab2 AS cor0
----
1026
702
729

query I rowsort
SELECT DISTINCT 11 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
11

query I rowsort
SELECT col2 - - ( + col1 + + col1 ) * - 92 AS col0 FROM tab1
----
-1783
-2296
-4730

query I rowsort
SELECT + - col0 + col1 * - 54 FROM tab2 AS cor0
----
-1681
-3264
-997

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

skipif mysql # not compatible
query I rowsort label-34
SELECT - col1 * CAST ( + col1 AS INTEGER ) + col0 FROM tab0 AS cor0
----
-7372
-8192
-9374

query I rowsort
SELECT - 29 FROM tab0, tab0 cor0
----
9 values hashing to 0cc9ddad93fc783055518ae4b6be054b

query I rowsort
SELECT DISTINCT + + col1 + + 95 FROM tab1 AS cor0
----
105
108
121

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

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0, tab1 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 0a3bf4d9642f43f11aad64de0d046e6b

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

query I rowsort
SELECT ALL - + 13 * + col0 * cor0.col2 + col0 FROM tab1 AS cor0
----
-2103
-47360
-99760

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-43
SELECT col1 DIV col0 + col0 * + col0 FROM tab1 AS cor0
----
17
4096
6400

skipif mysql # not compatible
query I rowsort label-43
SELECT col1 / col0 + col0 * + col0 FROM tab1 AS cor0
----
17
4096
6400

query I rowsort
SELECT ALL col1 * 48 + - col1 + + 68 FROM tab2 AS cor0
----
1525
2841
867

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

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

query I rowsort
SELECT DISTINCT + - 1 * - col2 AS col1 FROM tab2 AS cor0
----
26
27
38

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

query I rowsort
SELECT ALL col2 - + col0 AS col2 FROM tab0
----
-34
-7
9

query I rowsort
SELECT ALL - 74 + col0 - tab1.col1 AS col0 FROM tab1
----
-20
-7
-97

query I rowsort
SELECT ALL 73 * col0 * col1 - col2 AS col0 FROM tab1
----
46663
5640
75824

query I rowsort
SELECT + 53 AS col2 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 866ae1b4ab9e5b4043ac1bcfd413aaa6

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

query I rowsort
SELECT 41 + cor0.col1 * - col0 FROM tab0 AS cor0
----
-2023
-3354
-8058

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

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

skipif mysql # not compatible
query I rowsort label-55
SELECT + + col0 * CAST ( + col0 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
1225
576
7921

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-60
SELECT DISTINCT + cor0.col2 * CAST ( col2 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-61
SELECT col2 DIV - 24 + cor0.col2 * + cor0.col0 FROM tab2 AS cor0
----
188
2027
3001

skipif mysql # not compatible
query I rowsort label-61
SELECT col2 / - 24 + cor0.col2 * + cor0.col0 FROM tab2 AS cor0
----
188
2027
3001

query I rowsort
SELECT ALL + col1 + + 17 * - col0 AS col2 FROM tab1 AS cor0
----
-1078
-1347
-25

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

skipif mysql # not compatible
query I rowsort label-63
SELECT DISTINCT col2 - + ( col2 ) / col0 AS col0 FROM tab1 AS cor0
----
36
57
95

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

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

query I rowsort
SELECT ALL - col2 * - ( 88 ) FROM tab2 AS cor0
----
2288
2376
3344

query I rowsort
SELECT DISTINCT - + col0 * cor0.col1 + - 34 + + col0 AS col2 FROM tab2 AS cor0
----
-1298
-244
-4558

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

query I rowsort
SELECT col1 * tab1.col2 + 56 + col1 * col1 AS col2 FROM tab1
----
1473
2136
726

query I rowsort
SELECT - 60 AS col0 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 1a0b29f8e6f82c54623a665ba4af8fd1

query I rowsort
SELECT - 12 AS col0 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 3983bffe2adf88cb2efc3be93ee620c0

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

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

query I rowsort
SELECT 85 * + tab1.col2 FROM tab1
----
4590
4845
8160

query I rowsort
SELECT 74 FROM tab2, tab2 cor0, tab2 AS cor1
----
27 values hashing to dc22979e6d261795bd3ce2990fdbbf82

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT + col1 * col1 + col2 AS col0 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT + col0 + col0 * col0 FROM tab0 cor0
----
1260
600
8010

query I rowsort
SELECT DISTINCT - - 1 + col1 FROM tab2 cor0
----
18
32
60

query I rowsort
SELECT DISTINCT cor0.col0 * - ( + ( + col1 ) ) + 25 + + col0 AS col0 FROM tab1 AS cor0
----
-50
-551
-935

onlyif mysql # use DIV operator for integer division
query I rowsort label-87
SELECT - col0 * + 31 - col1 DIV col0 AS col0 FROM tab0 AS cor0
----
-1087
-2760
-747

skipif mysql # not compatible
query I rowsort label-87
SELECT - col0 * + 31 - col1 / col0 AS col0 FROM tab0 AS cor0
----
-1087
-2760
-747

query I rowsort
SELECT ALL + col0 - ( col0 ) * col0 AS col1 FROM tab0 AS cor0
----
-1190
-552
-7832

query I rowsort
SELECT ALL - col2 + ( col0 ) + - cor0.col2 FROM tab0 AS cor0
----
-42
-75
33

onlyif mysql # use DIV operator for integer division
query I rowsort label-90
SELECT DISTINCT + cor0.col0 DIV + col2 + 43 * - col0 FROM tab1 AS cor0
----
-129
-2751
-3440

skipif mysql # not compatible
query I rowsort label-90
SELECT DISTINCT + cor0.col0 / + col2 + 43 * - col0 FROM tab1 AS cor0
----
-129
-2751
-3440

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + 91 col1 FROM tab0 AS cor0
----
115
126
180

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-94
SELECT - - cor0.col2 DIV col0 - 30 FROM tab1 AS cor0
----
-12
-29
-30

skipif mysql # not compatible
query I rowsort label-94
SELECT - - cor0.col2 / col0 - 30 FROM tab1 AS cor0
----
-12
-29
-30

query I rowsort
SELECT 45 FROM tab1, tab1 AS cor0
----
9 values hashing to 60b9f935ee8e404d155a2f5e9515c050

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

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

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

query I rowsort
SELECT DISTINCT - 27 + - col2 * - cor0.col0 AS col1 FROM tab2 AS cor0
----
162
2001
2975

query I rowsort
SELECT DISTINCT + 53 * col2 AS col2 FROM tab2 AS cor0
----
1378
1431
2014

query I rowsort
SELECT ALL + 54 + - col2 AS col2 FROM tab2 cor0
----
16
27
28

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

query I rowsort
SELECT col1 + - cor0.col2 + + col1 FROM tab2 cor0
----
-4
35
92

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

query I rowsort
SELECT ALL + col1 * 88 AS col2 FROM tab1 AS cor0
----
1144
2288
880

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

query I rowsort
SELECT ALL + - col2 * col2 FROM tab2 cor0
----
-1444
-676
-729

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

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-114
SELECT + col2 + 66 DIV + col2 AS col1 FROM tab0
----
35
67
82

skipif mysql # not compatible
query I rowsort label-114
SELECT + col2 + 66 / + col2 AS col1 FROM tab0
----
35
67
82

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

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

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

query I rowsort
SELECT col0 + - col2 * - col2 * + cor0.col2 FROM tab2 AS cor0
----
17654
19690
54951

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

query I rowsort
SELECT ALL - 12 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 3983bffe2adf88cb2efc3be93ee620c0

query I rowsort
SELECT + 29 AS col2 FROM tab0
----
29
29
29

query I rowsort
SELECT DISTINCT 59 * - col2 * col2 AS col2 FROM tab1
----
-172044
-191691
-543744

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

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

skipif mysql # not compatible
query I rowsort label-123
SELECT ALL col0 / - col1 FROM tab2
----
-1
-4
0

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

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

query I rowsort
SELECT ALL - col2 + + 69 * col1 FROM tab1
----
1740
633
801

query I rowsort
SELECT ALL col2 + 65 FROM tab2
----
103
91
92

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

query I rowsort
SELECT ALL 90 AS col2 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 5d25a546acf3ae171e731e50adc0112e

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

skipif mysql # not compatible
query I rowsort label-130
SELECT col1 / - 42 FROM tab1 AS cor0
----
0
0
0

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

query I rowsort
SELECT ALL col0 + 72 FROM tab0
----
107
161
96

query I rowsort
SELECT ALL tab1.col0 + + 52 * col0 * - tab1.col2 AS col0 FROM tab1
----
-189632
-399280
-8421

query I rowsort
SELECT DISTINCT + tab2.col1 * 77 + - 66 FROM tab2
----
1243
2321
4477

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-135
SELECT DISTINCT - col2 + - CAST( - col1 + - col2 AS SIGNED ) FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-135
SELECT DISTINCT - col2 + - CAST ( - col1 + - col2 AS INTEGER ) FROM tab2
----
17
31
59

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

query I rowsort
SELECT ALL + ( - 66 + col1 ) AS col2 FROM tab1
----
-40
-53
-56

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

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

query I rowsort
SELECT DISTINCT - col2 + ( cor0.col2 ) * 35 FROM tab0 AS cor0
----
1122
2788
34

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

query I rowsort
SELECT - 48 + + col0 AS col2 FROM tab1 AS cor0
----
-45
16
32

query I rowsort
SELECT + col1 + 51 * cor0.col0 FROM tab1 AS cor0
----
179
3274
4093

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

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

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

query I rowsort
SELECT DISTINCT - 41 * 19 * col2 AS col1 FROM tab2 AS cor0
----
-20254
-21033
-29602

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - cor0.col2 * 32 col0 FROM tab1 cor0
----
1728
1824
3072

query I rowsort
SELECT DISTINCT col0 + 15 FROM tab0 AS cor0
----
104
39
50

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

query I rowsort
SELECT ALL 82 + col0 * col2 + - ( col1 ) AS col0 FROM tab0 AS cor0
----
20
7289
788

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

query I rowsort
SELECT DISTINCT + - col1 * + 59 FROM tab1 AS cor0
----
-1534
-590
-767

query I rowsort
SELECT DISTINCT - ( 51 ) AS col2 FROM tab2, tab1 AS cor0
----
-51

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

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

query I rowsort
SELECT ALL - + col0 * + col2 - col2 * col2 AS col2 FROM tab2 AS cor0
----
-2704
-4446
-918

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-159
SELECT ALL - ( cor0.col0 ) + - cor0.col2 DIV + col0 FROM tab0 AS cor0
----
-25
-35
-89

skipif mysql # not compatible
query I rowsort label-159
SELECT ALL - ( cor0.col0 ) + - cor0.col2 / + col0 FROM tab0 AS cor0
----
-25
-35
-89

query I rowsort
SELECT DISTINCT - 91 + 44 AS col2 FROM tab1 AS cor0
----
-47

query I rowsort
SELECT + - col1 * col1 * cor0.col1 FROM tab0 cor0
----
-636056
-753571
-912673

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 85 + col0 col1 FROM tab1 AS cor0
----
-21
-5
-82

query I rowsort
SELECT - + col2 * 56 + - cor0.col1 FROM tab2 AS cor0
----
-1515
-1543
-2145

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

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

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

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

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

query I rowsort
SELECT ALL - 46 * col1 + cor0.col0 * + col0 FROM tab1 cor0
----
-1187
3636
5802

query I rowsort
SELECT cor0.col2 * col0 * 66 FROM tab0 cor0
----
2310
481668
52272

query I rowsort
SELECT 54 * + col2 AS col1 FROM tab1 AS cor0
----
2916
3078
5184

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-176
SELECT col1 * - col0 * CAST( col1 AS SIGNED ) + - col2 + ( 19 ) * cor0.col1 FROM tab0 cor0
----
-175903
-327473
-735362

skipif mysql # not compatible
query I rowsort label-176
SELECT col1 * - col0 * CAST ( col1 AS INTEGER ) + - col2 + ( 19 ) * cor0.col1 FROM tab0 cor0
----
-175903
-327473
-735362

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

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

query I rowsort
SELECT - 19 * col0 FROM tab1 AS cor0
----
-1216
-1520
-57

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

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

query I rowsort
SELECT ALL col0 + 96 FROM tab2 cor0
----
103
174
175

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col2 * - col2 + - cor0.col0 * cor0.col0 AS col2 FROM tab2 AS cor0
----
-120317
-5152
-58812

query I rowsort
SELECT ALL + cor0.col1 * - 14 + + cor0.col2 FROM tab1 AS cor0
----
-310
-83
-86

query I rowsort
SELECT DISTINCT - col0 * - ( + cor0.col0 * + col0 ) + - col0 - col1 AS col1 FROM tab2 AS cor0
----
305
474415
492943

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-188
SELECT CAST( NULL AS SIGNED ) FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-188
SELECT CAST ( NULL AS INTEGER ) FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT - - col0 * + ( col1 + cor0.col2 ) * + cor0.col1 FROM tab2 AS cor0
----
12586
391170
73865

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

query I rowsort
SELECT - cor0.col2 + ( 92 ) + + col0 AS col0 FROM tab1 AS cor0
----
41
76
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-192
SELECT + - col2 DIV ( - 94 ) + - cor0.col2 + 21 AS col2 FROM tab1 cor0
----
-33
-36
-74

skipif mysql # not compatible
query I rowsort label-192
SELECT + - col2 / ( - 94 ) + - cor0.col2 + 21 AS col2 FROM tab1 cor0
----
-33
-36
-74

query I rowsort
SELECT + col2 * 79 AS col1 FROM tab0 AS cor0
----
2607
6478
79

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

query I rowsort
SELECT ALL col1 + + col1 + 72 FROM tab0 AS cor0
----
244
254
266

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

query I rowsort
SELECT DISTINCT + col0 * + 14 * + col2 AS col2 FROM tab2 AS cor0
----
2646
28392
42028

query I rowsort
SELECT - + col1 * - col1 + + 69 + + col0 FROM tab2 AS cor0
----
1037
3628
437

query I rowsort
SELECT DISTINCT - col1 * col1 * - 84 AS col0 FROM tab1 AS cor0
----
14196
56784
8400

onlyif mysql # use DIV operator for integer division
query I rowsort label-200
SELECT DISTINCT + 79 * - col0 - col1 DIV 45 AS col2 FROM tab2
----
-553
-6163
-6241

skipif mysql # not compatible
query I rowsort label-200
SELECT DISTINCT + 79 * - col0 - col1 / 45 AS col2 FROM tab2
----
-553
-6163
-6241

query I rowsort
SELECT ALL + col1 - tab0.col2 * 51 AS col2 FROM tab0
----
-1597
-4091
46

query I rowsort
SELECT ALL + col1 * col1 - 41 FROM tab0
----
7355
8240
9368

query I rowsort
SELECT ALL + tab1.col2 * col1 - ( col2 ) FROM tab1
----
1152
1350
513

query I rowsort
SELECT 8 + tab2.col0 + + col1 FROM tab2
----
104
145
46

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

query I rowsort
SELECT col1 * 97 * - col0 AS col1 FROM tab1
----
-100880
-62080
-7566

onlyif mysql # use DIV operator for integer division
query I rowsort label-207
SELECT DISTINCT - - col2 DIV - 37 + - col0 + col0 DIV - CAST( + col2 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-24
-70
-92

skipif mysql # not compatible
query I rowsort label-207
SELECT DISTINCT - - col2 / - 37 + - col0 + col0 / - CAST ( + col2 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-24
-70
-92

query I rowsort
SELECT ALL + col1 * 60 AS col0 FROM tab2 cor0
----
1020
1860
3540

query I rowsort
SELECT ALL - col1 * - 0 * 29 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - 32 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to ef8f93119983b962f4c81381ebf4b1e6

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

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

query I rowsort
SELECT ALL - + 8 * - col2 * col0 FROM tab0 AS cor0
----
280
58384
6336

onlyif mysql # use DIV operator for integer division
query I rowsort label-213
SELECT + + 18 DIV col0 + 20 FROM tab2 AS cor0
----
20
20
22

skipif mysql # not compatible
query I rowsort label-213
SELECT + + 18 / col0 + 20 FROM tab2 AS cor0
----
20
20
22

query I rowsort
SELECT DISTINCT + tab1.col0 + col1 + 73 * + ( col0 ) AS col1 FROM tab1
----
248
4746
5933

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 82 * cor0.col0 col1 FROM tab0 AS cor0
----
1968
2870
7298

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-219
SELECT ALL - col2 + - col0 * CAST( - col0 AS SIGNED ) FROM tab1 AS cor0
----
-45
4039
6304

skipif mysql # not compatible
query I rowsort label-219
SELECT ALL - col2 + - col0 * CAST ( - col0 AS INTEGER ) FROM tab1 AS cor0
----
-45
4039
6304

query I rowsort
SELECT DISTINCT col2 + + col2 * + 24 FROM tab1 AS cor0
----
1350
1425
2400

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

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

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

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

query I rowsort
SELECT ALL - col2 + - 74 AS col2 FROM tab2 AS cor0
----
-100
-101
-112

onlyif mysql # use DIV operator for integer division
query I rowsort label-226
SELECT DISTINCT + col1 + - 76 * cor0.col1 DIV col1 AS col2 FROM tab2 AS cor0
----
-17
-45
-59

skipif mysql # not compatible
query I rowsort label-226
SELECT DISTINCT + col1 + - 76 * cor0.col1 / col1 AS col2 FROM tab2 AS cor0
----
-17
-45
-59

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 35 * 44 + col2 col2 FROM tab0 AS cor0
----
-1458
-1507
-1539

onlyif mysql # use DIV operator for integer division
query I rowsort label-229
SELECT - 32 DIV col0 AS col0 FROM tab1 cor0
----
-10
0
0

skipif mysql # not compatible
query I rowsort label-229
SELECT - 32 / col0 AS col0 FROM tab1 cor0
----
-10
0
0

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

query I rowsort
SELECT ALL col0 + - 69 * col1 AS col1 FROM tab2 cor0
----
-1094
-2132
-3993

query I rowsort
SELECT DISTINCT - 40 + + col0 AS col2 FROM tab0 AS cor0
----
-16
-5
49

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

query I rowsort
SELECT ALL col1 + + col1 * - col2 - ( col2 ) FROM tab1 AS cor0
----
-1331
-1432
-617

query I rowsort
SELECT 39 * + 52 AS col1 FROM tab0 AS cor0
----
2028
2028
2028

query I rowsort
SELECT DISTINCT + 42 + 10 AS col0 FROM tab1 AS cor0
----
52

query I rowsort
SELECT ALL + 71 + + col0 FROM tab2
----
149
150
78

query I rowsort
SELECT DISTINCT - 98 * + tab1.col2 FROM tab1
----
-5292
-5586
-9408

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

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

skipif mysql # not compatible
query I rowsort label-240
SELECT ALL + col0 + - cor0.col1 * + CAST ( 0 AS INTEGER ) FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT + col0 * col0 * 91 AS col0 FROM tab0 AS cor0
----
111475
52416
720811

query I rowsort
SELECT - 81 + cor0.col1 FROM tab2 AS cor0
----
-22
-50
-64

query I rowsort
SELECT ALL + 96 * + col2 FROM tab2 AS cor0
----
2496
2592
3648

query I rowsort
SELECT 93 + col0 FROM tab0 AS cor0
----
117
128
182

query I rowsort
SELECT ALL 77 * + col2 FROM tab0 AS cor0
----
2541
6314
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-246
SELECT DISTINCT + cor0.col1 DIV 38 + + col1 AS col1 FROM tab2 AS cor0
----
17
31
60

skipif mysql # not compatible
query I rowsort label-246
SELECT DISTINCT + cor0.col1 / 38 + + col1 AS col1 FROM tab2 AS cor0
----
17
31
60

query I rowsort
SELECT ALL + col1 + - 60 * - col1 - + col1 * - col0 FROM tab2 AS cor0
----
2108
2380
8201

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

query I rowsort
SELECT ALL - - col2 * col1 * col2 + - col1 AS col0 FROM tab0 AS cor0
----
0
611793
93568

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

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

query I rowsort
SELECT ALL - - col0 + + 43 * col2 FROM tab2 AS cor0
----
1168
1196
1713

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-255
SELECT - - col0 * + CAST( - 64 AS SIGNED ) + + col0 AS col0 FROM tab0 AS cor0
----
-1512
-2205
-5607

skipif mysql # not compatible
query I rowsort label-255
SELECT - - col0 * + CAST ( - 64 AS INTEGER ) + + col0 AS col0 FROM tab0 AS cor0
----
-1512
-2205
-5607

query I rowsort
SELECT DISTINCT - col0 * ( 47 ) + + col2 FROM tab2 AS cor0
----
-302
-3640
-3675

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

query I rowsort
SELECT ALL 55 + + col1 AS col1 FROM tab1
----
65
68
81

query I rowsort
SELECT DISTINCT cor0.col2 * 48 + + col2 AS col1 FROM tab0 AS cor0
----
1617
4018
49

query I rowsort
SELECT ALL + col2 + + col0 * + ( - col2 + - col1 ) * - 37 AS col2 FROM tab0 AS cor0
----
105705
126911
569771

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

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

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

query I rowsort
SELECT - col0 * + 22 + col0 + col1 FROM tab1 AS cor0
----
-1334
-1667
-37

query I rowsort
SELECT - ( 17 ) * col1 * 25 + 24 * - col1 AS col1 FROM tab0 AS cor0
----
-38614
-40859
-43553

query I rowsort
SELECT + 50 * 24 FROM tab2 AS cor0
----
1200
1200
1200

query I rowsort
SELECT + col1 * - 49 AS col1 FROM tab2 AS cor0
----
-1519
-2891
-833

query I rowsort
SELECT + 69 + - col2 AS col1 FROM tab1 AS cor0
----
-27
12
15

query I rowsort
SELECT 16 FROM tab0, tab2 cor0
----
9 values hashing to 3fdb08ec2e3d4b642dd4594778cca8b3

query I rowsort
SELECT - col1 * col1 * 4 AS col0 FROM tab0
----
-29584
-33124
-37636

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-273
SELECT + ( col0 ) + CAST( + ( - col2 ) AS SIGNED ) DIV col0 AS col0 FROM tab1 AS cor0
----
-15
64
79

skipif mysql # not compatible
query I rowsort label-273
SELECT + ( col0 ) + CAST ( + ( - col2 ) AS INTEGER ) / col0 AS col0 FROM tab1 AS cor0
----
-15
64
79

query I rowsort
SELECT + ( - cor0.col0 ) * - col0 + col0 * + cor0.col2 FROM tab0 AS cor0
----
1260
1368
15219

query I rowsort
SELECT + + 86 - + col0 * col0 AS col1 FROM tab1 AS cor0
----
-4010
-6314
77

query I rowsort
SELECT + ( + col2 ) + - 94 AS col0 FROM tab1 AS cor0
----
-37
-40
2

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

query I rowsort
SELECT col0 + col2 * col2 * 17 FROM tab0
----
114397
18537
52

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

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

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

query I rowsort
SELECT ALL + col1 + col1 + 63 * - col0 AS col2 FROM tab0
----
-1340
-2011
-5425

query I rowsort
SELECT 59 * tab1.col1 FROM tab1
----
1534
590
767

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-284
SELECT - 97 * col2 * CAST( - col1 + col2 AS SIGNED ) FROM tab2
----
-77406
10476
83226

skipif mysql # not compatible
query I rowsort label-284
SELECT - 97 * col2 * CAST ( - col1 + col2 AS INTEGER ) FROM tab2
----
-77406
10476
83226

query I rowsort
SELECT DISTINCT - col0 * - col2 + + 59 FROM tab2
----
2087
248
3061

query I rowsort
SELECT + col1 + col1 + - 69 FROM tab2
----
-35
-7
49

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

query I rowsort
SELECT ALL + cor0.col0 + col2 * col2 * col0 AS col0 FROM tab1 AS cor0
----
208000
737360
8751

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

query I rowsort
SELECT + cor0.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 col2 + col2 * col2 col2 FROM tab2 AS cor0
----
1482
702
756

onlyif mysql # use DIV operator for integer division
query I rowsort label-292
SELECT - 68 * col2 - 90 DIV - 77 AS col0 FROM tab1 AS cor0
----
-3671
-3875
-6527

skipif mysql # not compatible
query I rowsort label-292
SELECT - 68 * col2 - 90 / - 77 AS col0 FROM tab1 AS cor0
----
-3671
-3875
-6527

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

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

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

query I rowsort
SELECT - 99 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 64d06513850a26495bc6c2fddeb254b7

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

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

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

query I rowsort
SELECT DISTINCT 2 * tab0.col2 + + col0 * col1 FROM tab0
----
2130
3397
8263

onlyif mysql # use DIV operator for integer division
query I rowsort label-300
SELECT DISTINCT + col1 + col1 DIV + col0 FROM tab0 AS cor0
----
89
92
99

skipif mysql # not compatible
query I rowsort label-300
SELECT DISTINCT + col1 + col1 / + col0 FROM tab0 AS cor0
----
89
92
99

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

query I rowsort
SELECT ALL + col0 * - col0 - cor0.col2 * 79 FROM tab0 AS cor0
----
-1304
-14399
-3183

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 + col2 * col1 col2 FROM tab0 AS cor0
----
2871
7544
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-307
SELECT + col0 + + col1 DIV 57 AS col2 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-307
SELECT + col0 + + col1 / 57 AS col2 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT - 15 + col2 FROM tab2 AS cor0
----
11
12
23

query I rowsort
SELECT ALL 66 * + col0 * + col1 + col0 AS col0 FROM tab1 AS cor0
----
42304
5151
68720

query I rowsort
SELECT 77 + - col1 * ( + 17 ) FROM tab0 cor0
----
-1385
-1470
-1572

query I rowsort
SELECT DISTINCT + col0 + col2 + - col2 * col2 FROM tab2 cor0
----
-1327
-572
-695

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

query I rowsort
SELECT + col1 * ( 7 ) * - cor0.col1 FROM tab2 AS cor0
----
-2023
-24367
-6727

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

query I rowsort
SELECT - col1 * - 21 FROM tab2 AS cor0
----
1239
357
651

query I rowsort
SELECT + + cor0.col1 * - 10 FROM tab2 AS cor0
----
-170
-310
-590

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

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

query I rowsort
SELECT 48 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

query I rowsort
SELECT - cor0.col2 * 88 + col2 AS col0 FROM tab2 AS cor0
----
-2262
-2349
-3306

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

query I rowsort
SELECT ALL + 49 FROM tab2, tab2 AS cor0
----
9 values hashing to cb40783c0fff72e8802cdf0682e7cb55

query I rowsort
SELECT DISTINCT ( 30 ) AS col0 FROM tab2, tab1 AS cor0
----
30

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-323
SELECT ALL + - CAST ( NULL AS INTEGER ) col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-329
SELECT - cor0.col1 * + 18 * - col2 + + ( col0 ) DIV + col1 AS col2 FROM tab1 AS cor0
----
10266
22470
25272

skipif mysql # not compatible
query I rowsort label-329
SELECT - cor0.col1 * + 18 * - col2 + + ( col0 ) / + col1 AS col2 FROM tab1 AS cor0
----
10266
22470
25272

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

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

query I rowsort
SELECT DISTINCT - col0 * tab0.col0 AS col0 FROM tab0
----
-1225
-576
-7921

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

query I rowsort
SELECT ( + 25 ) * col0 AS col0 FROM tab1 AS cor0
----
1600
2000
75

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-334
SELECT - 9 / cor0.col0 col1 FROM tab2 AS cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT + + 74 AS col2 FROM tab1 AS cor0
----
74

query I rowsort
SELECT 67 * - col1 FROM tab0 AS cor0
----
-5762
-6097
-6499

query I rowsort
SELECT - + cor0.col0 + 12 * col2 AS col0 FROM tab1 AS cor0
----
1072
620
645

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 4 - + col0 * col0 col2 FROM tab0
----
-1221
-572
-7917

query I rowsort
SELECT DISTINCT 69 * col1 + ( + col1 ) AS col0 FROM tab2 AS cor0
----
1190
2170
4130

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 18 * col0 col1 FROM tab1 AS cor0
----
-1152
-1440
-54

onlyif mysql # use DIV operator for integer division
query I rowsort label-343
SELECT DISTINCT + col1 * cor0.col1 DIV ( - col0 * col0 ) FROM tab2 AS cor0
----
-19
0

skipif mysql # not compatible
query I rowsort label-343
SELECT DISTINCT + col1 * cor0.col1 / ( - col0 * col0 ) FROM tab2 AS cor0
----
-19
0

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

query I rowsort
SELECT + 62 + col1 - col0 * ( col2 ) FROM tab2
----
-1907
-2923
-96

query I rowsort
SELECT DISTINCT - col2 + + 9 FROM tab1 AS cor0
----
-45
-48
-87

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

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

query I rowsort
SELECT ALL + col0 + + 21 FROM tab1 AS cor0
----
101
24
85

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

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

query I rowsort
SELECT 98 AS col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to c758e8afbdfa6aae279045b0e9cbacc2

query I rowsort
SELECT - cor0.col2 - cor0.col1 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to a464155f1f6cb07f325fb0d7a4ec61f2

query I rowsort
SELECT 29 * col2 + 82 FROM tab2
----
1184
836
865

query I rowsort
SELECT - ( col1 ) * ( col0 + col1 * - col0 ) AS col0 FROM tab0
----
175440
325920
728910

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

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

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

query I rowsort
SELECT DISTINCT col1 * + 86 AS col1 FROM tab2
----
1462
2666
5074

query I rowsort
SELECT 37 + - 12 FROM tab0, tab1 AS cor0
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-359
SELECT + - col1 DIV col1 + - ( col0 ) * col2 AS col2 FROM tab1 AS cor0
----
-163
-3649
-7681

skipif mysql # not compatible
query I rowsort label-359
SELECT + - col1 / col1 + - ( col0 ) * col2 AS col2 FROM tab1 AS cor0
----
-163
-3649
-7681

query I rowsort
SELECT + - ( - col0 ) * - col0 + col1 * col2 FROM tab2 AS cor0
----
-4550
-5595
788

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

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

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

query I rowsort
SELECT ALL - 24 + - col0 * col0 AS col1 FROM tab2 AS cor0
----
-6108
-6265
-73

query I rowsort
SELECT - 14 * cor0.col1 + - col0 * + 26 FROM tab2 AS cor0
----
-2292
-2854
-616

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-366
SELECT ALL + col2 * col0 * - CAST( 21 AS SIGNED ) col2 FROM tab0 AS cor0
----
-153258
-16632
-735

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-366
SELECT ALL + col2 * col0 * - CAST ( 21 AS INTEGER ) col2 FROM tab0 AS cor0
----
-153258
-16632
-735

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

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

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

query I rowsort
SELECT + - cor0.col0 * 29 + cor1.col0 * 58 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 9ce03b6fc3fd13e3e7cb59f50f353701

query I rowsort
SELECT + col0 * cor0.col0 + 64 FROM tab0 cor0
----
1289
640
7985

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

query I rowsort
SELECT - 75 * cor0.col0 AS col1 FROM tab2 AS cor0
----
-525
-5850
-5925

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

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

query I rowsort
SELECT col0 * ( col0 ) * + col0 + col1 + col0 AS col2 FROM tab1 AS cor0
----
262218
512093
56

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-378
SELECT ALL tab0.col1 DIV 87 AS col1 FROM tab0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-378
SELECT ALL tab0.col1 / 87 AS col1 FROM tab0
----
0
1
1

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-381
SELECT + + cor0.col2 DIV col0 - col0 AS col1 FROM tab1 AS cor0
----
-64
-79
15

skipif mysql # not compatible
query I rowsort label-381
SELECT + + cor0.col2 / col0 - col0 AS col1 FROM tab1 AS cor0
----
-64
-79
15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 * + ( - col2 * 83 ) col1 FROM tab2 AS cor0
----
119852
56108
60507

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 48 * - ( col2 ) col1 FROM tab1 AS cor0
----
2592
2736
4608

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

query I rowsort
SELECT DISTINCT ( col2 ) + - col1 * + cor0.col0 * + cor0.col2 AS col0 FROM tab1 cor0
----
-36423
-4158
-99744

onlyif mysql # use DIV operator for integer division
query I rowsort label-387
SELECT ( + 71 ) DIV - cor2.col2 AS col1 FROM tab1, tab1 AS cor0, tab0 AS cor1, tab1 cor2
----
81 values hashing to 5126313d4765c5364287d9d255e52040

skipif mysql # not compatible
query I rowsort label-387
SELECT ( + 71 ) / - cor2.col2 AS col1 FROM tab1, tab1 AS cor0, tab0 AS cor1, tab1 cor2
----
81 values hashing to 5126313d4765c5364287d9d255e52040

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

query I rowsort
SELECT DISTINCT cor0.col0 + col1 * col0 + col2 AS col0 FROM tab2 AS cor0
----
1460
251
4706

query I rowsort
SELECT - col2 * - cor0.col1 - cor0.col1 AS col0 FROM tab0 AS cor0
----
0
2752
7371

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col0 ) * tab1.col1 * - tab1.col0 col1 FROM tab1
----
234
40960
83200

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

query I rowsort
SELECT tab0.col2 - 70 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to d2bce778033a27407315aef6f3e10df5

query I rowsort
SELECT ALL - col0 + col1 + ( - col1 ) FROM tab1
----
-3
-64
-80

query I rowsort
SELECT - cor0.col2 AS col1 FROM tab2 cor0
----
-26
-27
-38

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

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

query I rowsort
SELECT DISTINCT + + cor0.col1 + 38 AS col0 FROM tab0 AS cor0
----
124
129
135

query I rowsort
SELECT + + col2 * col1 * 67 AS col0 FROM tab2 AS cor0
----
102778
43282
56079

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL tab0.col0 * 54 FROM tab0
----
1296
1890
4806

query I rowsort
SELECT cor0.col1 * + 37 AS col1 FROM tab2 AS cor0
----
1147
2183
629

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

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

query I rowsort
SELECT DISTINCT + cor0.col1 + - col2 * 92 * col0 FROM tab2 AS cor0
----
-17357
-186517
-276167

query I rowsort
SELECT DISTINCT col0 * 26 FROM tab2 AS cor0
----
182
2028
2054

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

query I rowsort
SELECT DISTINCT - - col1 * + 38 FROM tab0 AS cor0
----
3268
3458
3686

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 - - 79 col2 FROM tab2
----
110
138
96

query I rowsort
SELECT ALL - col2 * ( + 76 ) + + col2 + + col0 FROM tab0
----
-2451
-40
-6061

query I rowsort
SELECT - + col2 * ( - col1 ) + - col2 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT col1 * 20 + - 38 FROM tab0
----
1682
1782
1902

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

skipif mysql # not compatible
query I rowsort label-422
SELECT ALL col0 + CAST ( - ( + col0 ) + - col0 AS INTEGER ) * + col0 * - col1 FROM tab2
----
212273
3045
717990

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

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

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

query I rowsort
SELECT 72 + - 16 FROM tab1
----
56
56
56

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

query I rowsort
SELECT 28 * + col1 * col0 - - col2 FROM tab2
----
128882
37642
6103

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

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

query I rowsort
SELECT + 97 + col0 FROM tab2 cor0
----
104
175
176

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

skipif mysql # not compatible
query I rowsort label-430
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
NULL

query I rowsort
SELECT ALL + - col2 * col1 + + col0 - ( - cor0.col0 ) AS col0 FROM tab2 AS cor0
----
-1378
-488
-823

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

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

query I rowsort
SELECT 48 AS col1 FROM tab2 AS cor0
----
48
48
48

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-436
SELECT - col1 * col1 DIV - col1 + - col2 * col0 DIV col2 FROM tab0
----
2
62
62

skipif mysql # not compatible
query I rowsort label-436
SELECT - col1 * col1 / - col1 + - col2 * col0 / col2 FROM tab0
----
2
62
62

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

query I rowsort
SELECT DISTINCT - cor0.col1 + col2 * + 30 FROM tab2 AS cor0
----
1123
721
779

query I rowsort
SELECT DISTINCT 17 FROM tab1, tab2 AS cor0, tab1 AS cor1, tab2, tab0 AS cor2
----
17

query I rowsort
SELECT DISTINCT + - 20 AS col1 FROM tab1 AS cor0
----
-20

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-442
SELECT DISTINCT col2 DIV + ( + 36 * col2 ) col0 FROM tab1 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-442
SELECT DISTINCT col2 / + ( + 36 * col2 ) col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL + col0 + 53 AS col2 FROM tab1 cor0
----
117
133
56

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

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-449
SELECT DISTINCT + + col0 * + col0 + cor0.col2 DIV cor0.col1 AS col0 FROM tab1 AS cor0
----
11
4101
6407

skipif mysql # not compatible
query I rowsort label-449
SELECT DISTINCT + + col0 * + col0 + cor0.col2 / cor0.col1 AS col0 FROM tab1 AS cor0
----
11
4101
6407

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

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

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

query I rowsort
SELECT DISTINCT - + col1 + ( - cor0.col1 * col0 + + ( - 15 ) * + cor0.col0 ) AS col2 FROM tab1 AS cor0
----
-149
-1610
-2253

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

query I rowsort
SELECT DISTINCT col1 * col2 - 98 FROM tab0 AS cor0
----
-1
2740
7364

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 + cor0.col2 * 80 col0 FROM tab0 AS cor0
----
2607
6478
79

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col2 AS REAL ) AS col0 FROM tab0 AS cor0
----
1
33
82

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

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

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

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

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

query I rowsort
SELECT DISTINCT + 56 * + cor0.col0 FROM tab0 AS cor0
----
1344
1960
4984

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-464
SELECT + - col0 DIV + col0 + col1 FROM tab2 cor0
----
16
30
58

skipif mysql # not compatible
query I rowsort label-464
SELECT + - col0 / + col0 + col1 FROM tab2 cor0
----
16
30
58

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

query I rowsort
SELECT ALL 42 * + cor0.col0 + - 86 FROM tab1 AS cor0
----
2602
3274
40

query I rowsort
SELECT DISTINCT cor0.col0 * + cor0.col0 + col0 AS col2 FROM tab2 cor0
----
56
6162
6320

query I rowsort
SELECT + 79 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 40a2261caa2c5cdbfd80965d7df1231f

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

query I rowsort
SELECT ALL + tab1.col2 + + col1 FROM tab1
----
109
67
80

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-476
SELECT + col2 DIV col2 + - col1 col1 FROM tab1
----
-12
-25
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-476
SELECT + col2 / col2 + - col1 col1 FROM tab1
----
-12
-25
-9

query III rowsort
SELECT * FROM tab1 WHERE NOT ( NULL ) IN ( col2 * col0 )
----

query I rowsort
SELECT DISTINCT - tab2.col0 * col2 + + col0 * - col2 + col1 AS col2 FROM tab2
----
-347
-3997
-5987

onlyif mysql # use DIV operator for integer division
query I rowsort label-479
SELECT DISTINCT col2 DIV - col2 FROM tab0
----
-1

skipif mysql # not compatible
query I rowsort label-479
SELECT DISTINCT col2 / - col2 FROM tab0
----
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-480
SELECT ALL + col0 + col0 + tab1.col1 DIV + col2 AS col0 FROM tab1
----
128
160
6

skipif mysql # not compatible
query I rowsort label-480
SELECT ALL + col0 + col0 + tab1.col1 / + col2 AS col0 FROM tab1
----
128
160
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * col0 + + col1 + + col1 * - tab0.col1 * col0 col2 FROM tab0 WHERE ( + col1 * + col1 ) <= col1 * + col2 + + col2 + - col1
----

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

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

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

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

query III rowsort
SELECT ALL * FROM tab2 WHERE col1 * + col2 + col0 IN ( - col0 * + tab2.col2 )
----

query I rowsort
SELECT + col2 + + col2 * tab1.col2 - - col0 AS col1 FROM tab1
----
2973
3370
9392

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

query I rowsort
SELECT DISTINCT - col0 * col1 * + col1 FROM tab0
----
-177504
-329315
-737009

query I rowsort
SELECT DISTINCT col1 - tab0.col2 / tab0.col2 FROM tab0 WHERE NOT NULL <> ( col1 )
----

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

query I rowsort
SELECT col0 + + col0 + col1 AS col1 FROM tab1
----
138
173
32

query III rowsort
SELECT * FROM tab2 WHERE NULL <= ( col1 )
----

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

query I rowsort
SELECT tab1.col1 + col1 + col0 AS col0 FROM tab1
----
106
55
84

query I rowsort
SELECT ALL + tab0.col1 * + col1 * + col1 AS col1 FROM tab0
----
636056
753571
912673

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * + col1 col0 FROM tab2 AS cor0
----
289
3481
961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - col1 * cor0.col1 col0 FROM tab2 AS cor0
----
-205379
-29791
-4913

onlyif mysql # use DIV operator for integer division
query I rowsort label-500
SELECT DISTINCT - col1 DIV col2 AS col2 FROM tab0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-500
SELECT DISTINCT - col1 / col2 AS col2 FROM tab0
----
-1
-2
-97

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

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

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT col1 + - col0 = col0
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

onlyif mysql # use DIV operator for integer division
query I rowsort label-504
SELECT DISTINCT - col1 DIV - col1 FROM tab0
----
1

skipif mysql # not compatible
query I rowsort label-504
SELECT DISTINCT - col1 / - col1 FROM tab0
----
1

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-508
SELECT ALL col1 * - col0 + + col0 * + col0 + + col2 DIV col2 AS col2 FROM tab0
----
-1487
-177
-2169

skipif mysql # not compatible
query I rowsort label-508
SELECT ALL col1 * - col0 + + col0 * + col0 + + col2 / col2 AS col2 FROM tab0
----
-1487
-177
-2169

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

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

query I rowsort
SELECT ALL + col2 * + cor0.col2 + col2 * - col0 FROM tab1 AS cor0
----
-399
1536
2754

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NOT NULL = NULL
----

query I rowsort
SELECT col2 + col2 * + col2 * col2 FROM tab0
----
2
35970
551450

query I rowsort
SELECT DISTINCT + col1 + + col1 AS col0 FROM tab0
----
172
182
194

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

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

query I rowsort
SELECT col2 FROM tab2 WHERE NOT - col0 BETWEEN col2 AND NULL
----
26
27
38

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-520
SELECT + 65 DIV ( - col0 ) FROM tab1
----
-1
-21
0

skipif mysql # not compatible
query I rowsort label-520
SELECT + 65 / ( - col0 ) FROM tab1
----
-1
-21
0

query I rowsort
SELECT 51 * col0 AS col0 FROM tab2
----
357
3978
4029

onlyif mysql # use DIV operator for integer division
query I rowsort label-522
SELECT ( tab2.col2 ) * tab2.col2 DIV col0 FROM tab2
----
104
18
8

skipif mysql # not compatible
query I rowsort label-522
SELECT ( tab2.col2 ) * tab2.col2 / col0 FROM tab2
----
104
18
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( ( col2 ) ) * col1 col2 FROM tab1
----
1248
1404
570

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

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

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

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

query I rowsort
SELECT col1 * tab0.col1 + + 6 FROM tab0
----
7402
8287
9415

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

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

query I rowsort
SELECT DISTINCT + col1 * + 47 FROM tab1 AS cor0
----
1222
470
611

query I rowsort
SELECT ALL - col2 * col2 + + col2 + + cor0.col2 * + 57 AS col0 FROM tab0 cor0
----
-1968
57
825

query I rowsort
SELECT + 29 + - col2 * - col2 FROM tab0 AS cor0
----
1118
30
6753

query I rowsort
SELECT + col1 * col1 * cor0.col1 FROM tab2 AS cor0
----
205379
29791
4913

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

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

query I rowsort
SELECT ALL 30 AS col1 FROM tab2
----
30
30
30

query I rowsort
SELECT + - 99 + + col0 AS col1 FROM tab0 AS cor0
----
-10
-64
-75

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-540
SELECT ALL col2 DIV + col1 + col2 FROM tab0 AS cor0
----
1
33
82

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

query I rowsort
SELECT ALL - + 74 + - col2 + col1 AS col0 FROM tab1 AS cor0
----
-102
-121
-157

query I rowsort
SELECT DISTINCT - + 92 + col2 - col2 * + col0 AS col0 FROM tab2 cor0
----
-2094
-254
-3056

query I rowsort
SELECT col1 - - 78 AS col2 FROM tab1
----
104
88
91

query I rowsort
SELECT DISTINCT + 80 * + 28 * col2 FROM tab2
----
58240
60480
85120

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-546
SELECT 12 DIV - 78 + + col0 col2 FROM tab2
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-546
SELECT 12 / - 78 + + col0 col2 FROM tab2
----
7
78
79

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-549
SELECT 79 + - 24 DIV + col2 FROM tab0
----
55
79
79

skipif mysql # not compatible
query I rowsort label-549
SELECT 79 + - 24 / + col2 FROM tab0
----
55
79
79

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

query I rowsort
SELECT DISTINCT - - cor0.col1 * - ( 22 ) + col1 FROM tab2 AS cor0
----
-1239
-357
-651

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

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

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

query I rowsort
SELECT cor0.col2 + ( + col0 ) * cor0.col0 AS col1 FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT ALL - cor1.col0 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

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

query I rowsort
SELECT col0 * 88 - + col0 * col0 FROM tab0
----
-89
1536
1855

query I rowsort
SELECT - + cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT + col0 * + ( 2 ) AS col0 FROM tab2 AS cor0
----
14
156
158

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

query I rowsort
SELECT ALL - 34 + cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 34f0a55ae4c06261e025a5f3a30f6d67

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

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

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

query I rowsort
SELECT ALL - col1 * - col2 + col2 * + col1 FROM tab1 AS cor0
----
1140
2496
2808

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-569
SELECT DISTINCT - col0 DIV - col1 + + col2 * + col0 AS col1 FROM tab1
----
162
3654
7686

skipif mysql # not compatible
query I rowsort label-569
SELECT DISTINCT - col0 / - col1 + + col2 * + col0 AS col1 FROM tab1
----
162
3654
7686

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-572
SELECT - col0 * col1 DIV + tab2.col1 + - col1 + col2 DIV + tab2.col0 FROM tab2
----
-137
-35
-96

skipif mysql # not compatible
query I rowsort label-572
SELECT - col0 * col1 / + tab2.col1 + - col1 + col2 / + tab2.col0 FROM tab2
----
-137
-35
-96

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

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

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

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

query I rowsort
SELECT ALL tab0.col1 + tab0.col1 * col0 FROM tab0 WHERE NOT NULL <> NULL
----

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

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

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 WHERE NULL NOT IN ( col1 + - col1 / col2 ) OR + col0 * - col2 IN ( + col0 )
----

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col0 * + col0 + + cor0.col1 col0 FROM tab2 AS cor0
----
-18
-6025
-6224

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

query I rowsort
SELECT DISTINCT + col2 + col1 + col1 AS col2 FROM tab1 AS cor0
----
106
122
77

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

skipif mysql # not compatible
query I rowsort label-588
SELECT - col2 / + col1 FROM tab0
----
0
0
0

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-594
SELECT DISTINCT + col2 * col0 DIV + col1 AS col2 FROM tab2 AS cor0
----
176
34
6

skipif mysql # not compatible
query I rowsort label-594
SELECT DISTINCT + col2 * col0 / + col1 AS col2 FROM tab2 AS cor0
----
176
34
6

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col1 + - col0 * - col0 col2 FROM tab1 AS cor0
----
1413
4666
7648

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

query I rowsort
SELECT ALL 81 AS col1 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 0a85639e0dddbffdab2cb16b027cb360

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

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

query I rowsort
SELECT DISTINCT - + cor0.col0 * cor0.col2 + 27 * + col0 FROM tab0 AS cor0
----
-144
-4895
910

query I rowsort
SELECT 19 FROM tab2 cor0
----
19
19
19

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

query I rowsort
SELECT ALL + col1 - cor0.col1 * col2 * + 17 FROM tab2 AS cor0
----
-10965
-14198
-26019

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 92 col0 FROM tab1 AS cor0
----
92
92
92

query I rowsort
SELECT - col1 + 78 * + col1 + col1 FROM tab0 AS cor0
----
6708
7098
7566

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

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

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

query I rowsort
SELECT + col0 + 43 * col1 FROM tab2 cor0
----
1340
2615
810

query I rowsort
SELECT - + col2 - 86 FROM tab2 cor0
----
-112
-113
-124

query I rowsort
SELECT col2 * + 79 + - col1 AS col0 FROM tab1 AS cor0
----
4240
4493
7571

query I rowsort
SELECT + cor0.col0 - 37 FROM tab1 AS cor0
----
-34
27
43

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 - - ( col0 ) col2 FROM tab2 cor0
----
137
38
96

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-616
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) col1 FROM tab1, tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
NULL

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

query I rowsort
SELECT ALL + - col1 + 15 AS col2 FROM tab1 cor0
----
-11
2
5

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

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

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

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

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

query I rowsort
SELECT - 95 * col2 AS col1 FROM tab1 AS cor0
----
-5130
-5415
-9120

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-628
SELECT DISTINCT + + ( + 42 ) * col1 + - col0 DIV - col0 FROM tab1 AS cor0
----
1093
421
547

skipif mysql # not compatible
query I rowsort label-628
SELECT DISTINCT + + ( + 42 ) * col1 + - col0 / - col0 FROM tab1 AS cor0
----
1093
421
547

query I rowsort
SELECT DISTINCT + 44 * 8 + col1 AS col1 FROM tab1 AS cor0
----
362
365
378

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

query I rowsort
SELECT - + 15 + 29 FROM tab1 AS cor0
----
14
14
14

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

query I rowsort
SELECT DISTINCT + 66 + ( + col1 ) - + ( - col1 ) * col2 * col0 AS col1 FROM tab2 AS cor0
----
119777
51117
5956

query I rowsort
SELECT + 74 * - cor0.col0 + + cor1.col1 AS col2 FROM tab2, tab2 AS cor0, tab1 cor1
----
27 values hashing to 762056096b032593af90237c3f85bbf3

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

query I rowsort
SELECT col0 * col1 + - col0 * 44 + - col0 AS col1 FROM tab0 AS cor0
----
1820
4094
984

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

query I rowsort
SELECT ALL col1 - 43 AS col0 FROM tab1 AS cor0
----
-17
-30
-33

query I rowsort
SELECT DISTINCT + col0 * 42 + col0 AS col1 FROM tab0 AS cor0
----
1032
1505
3827

query I rowsort
SELECT - 49 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 01b1fa22fee872a7ba64f90d6046ffae

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

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

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

query I rowsort
SELECT ALL 1 AS col0 FROM tab1, tab1 cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT ALL - - 83 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 002a717a3d902d97220759065fb107c3

query I rowsort
SELECT 24 * col2 AS col2 FROM tab1
----
1296
1368
2304

query I rowsort
SELECT - 29 AS col0 FROM tab0
----
-29
-29
-29

query I rowsort
SELECT DISTINCT col0 * col2 + 92 AS col2 FROM tab1
----
254
3740
7772

query I rowsort
SELECT + 90 + cor2.col1 AS col2 FROM tab0 cor0 CROSS JOIN tab2, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to 9cd1544721bd1a987837cde4ec0299d4

query I rowsort
SELECT + 46 * 60 AS col2 FROM tab0 AS cor0
----
2760
2760
2760

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

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

query I rowsort
SELECT + ( 19 * - col1 ) FROM tab2
----
-1121
-323
-589

query I rowsort
SELECT col0 * 16 FROM tab2 AS cor0
----
112
1248
1264

onlyif mysql # use DIV operator for integer division
query I rowsort label-653
SELECT DISTINCT - cor0.col2 + col1 DIV col1 AS col2 FROM tab2 AS cor0
----
-25
-26
-37

skipif mysql # not compatible
query I rowsort label-653
SELECT DISTINCT - cor0.col2 + col1 / col1 AS col2 FROM tab2 AS cor0
----
-25
-26
-37

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

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

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

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

query I rowsort
SELECT + ( - 37 ) AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1, tab1 cor2
----
81 values hashing to a283a98d14c34636d74b0e0b57633585

onlyif mysql # use DIV operator for integer division
query I rowsort label-658
SELECT DISTINCT - + col1 DIV - col1 + cor0.col2 FROM tab2 AS cor0
----
27
28
39

skipif mysql # not compatible
query I rowsort label-658
SELECT DISTINCT - + col1 / - col1 + cor0.col2 FROM tab2 AS cor0
----
27
28
39

query I rowsort
SELECT DISTINCT + - 24 * col1 AS col2 FROM tab0 AS cor0
----
-2064
-2184
-2328

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

query I rowsort
SELECT - - col2 * col0 * cor0.col2 + - cor0.col0 AS col0 FROM tab1 AS cor0
----
207872
737200
8745

query I rowsort
SELECT ALL + + col2 + + col0 * 10 AS col2 FROM tab1 AS cor0
----
697
84
896

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

query I rowsort
SELECT 9 FROM tab2, tab1 cor0
----
9 values hashing to 03b93b53107e36cf7d524e48c509b17b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * 59 col1 FROM tab1 AS cor0
----
177
3776
4720

query I rowsort
SELECT - - col2 + - 98 AS col1 FROM tab0 cor0
----
-16
-65
-97

query I rowsort
SELECT ALL + col2 * col0 + - col0 * - col2 AS col1 FROM tab1 AS cor0
----
15360
324
7296

query I rowsort
SELECT ALL - col2 * + col1 + - 3 FROM tab2 AS cor0
----
-1537
-649
-840

onlyif mysql # use DIV operator for integer division
query I rowsort label-669
SELECT - + col1 DIV 66 + col1 FROM tab2 cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-669
SELECT - + col1 / 66 + col1 FROM tab2 cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * 94 + 1 col2 FROM tab1 AS cor0
----
1223
2445
941

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

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

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

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

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

query I rowsort
SELECT - - col0 + 11 FROM tab1 AS cor0
----
14
75
91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col0 col2 FROM tab2, tab0, tab2 AS cor0
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 - tab2.col0 col0 FROM tab2
----
-41
-52
20

query I rowsort
SELECT - ( - col0 ) * - 89 AS col2 FROM tab1
----
-267
-5696
-7120

query I rowsort
SELECT 90 * + col0 FROM tab2
----
630
7020
7110

query I rowsort
SELECT + + cor0.col2 * 75 FROM tab1 AS cor0
----
4050
4275
7200

onlyif mysql # use DIV operator for integer division
query I rowsort label-681
SELECT ALL + col2 - 50 DIV 23 FROM tab0 AS cor0
----
-1
31
80

skipif mysql # not compatible
query I rowsort label-681
SELECT ALL + col2 - 50 / 23 FROM tab0 AS cor0
----
-1
31
80

query I rowsort
SELECT DISTINCT - col0 * ( col1 + col2 * - col0 ) FROM tab2 AS cor0
----
1106
153582
235815

onlyif mysql # use DIV operator for integer division
query I rowsort label-683
SELECT DISTINCT + cor0.col0 + 33 DIV cor0.col1 FROM tab1 AS cor0
----
4
67
82

skipif mysql # not compatible
query I rowsort label-683
SELECT DISTINCT + cor0.col0 + 33 / cor0.col1 FROM tab1 AS cor0
----
4
67
82

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-685
SELECT - cor0.col2 * + 46 * 90 - col2 * 32 DIV 89 FROM tab1 AS cor0
----
-223579
-236000
-397474

skipif mysql # not compatible
query I rowsort label-685
SELECT - cor0.col2 * + 46 * 90 - col2 * 32 / 89 FROM tab1 AS cor0
----
-223579
-236000
-397474

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

query I rowsort
SELECT ALL col0 - + col1 * 90 AS col0 FROM tab1
----
-1090
-2337
-836

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

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

query I rowsort
SELECT 1 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 - + col0 * 29 col0 FROM tab2
----
-196
-2184
-2212

query I rowsort
SELECT ALL + + tab0.col2 AS col0 FROM tab2, tab1, tab1 AS cor0, tab0
----
81 values hashing to e938777ebffc2e3e9c0cdfaa4f732c05

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

query I rowsort
SELECT ALL - col1 * - ( col1 * col2 ) + - col1 FROM tab1
----
16211
36478
5690

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

query I rowsort
SELECT DISTINCT + 81 * - tab1.col1 FROM tab1
----
-1053
-2106
-810

query I rowsort
SELECT ALL col1 * + col1 + col0 AS col1 FROM tab2 AS cor0
----
3559
368
968

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

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

query I rowsort
SELECT 73 + ( - tab0.col0 ) AS col1 FROM tab0
----
-16
38
49

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-702
SELECT - CAST( 70 AS SIGNED ) + col1 AS col2 FROM tab0
----
16
21
27

skipif mysql # not compatible
query I rowsort label-702
SELECT - CAST ( 70 AS INTEGER ) + col1 AS col2 FROM tab0
----
16
21
27

query I rowsort
SELECT DISTINCT + 63 AS col0 FROM tab2
----
63

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 8 + col1 col0 FROM tab2
----
25
39
67

query I rowsort
SELECT ALL + - col2 + col1 * + col1 * + 93 + col1 FROM tab0 AS cor0
----
687881
770142
875133

query I rowsort
SELECT - + 74 + + col0 * col1 FROM tab1 cor0
----
4
566
966

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

skipif mysql # not compatible
query I rowsort label-710
SELECT ALL - - col1 * col2 / col2 AS col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT - col0 * col1 + - 98 AS col1 FROM tab2 AS cor0
----
-1441
-315
-4700

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-714
SELECT 72 DIV col2 + 41 FROM tab0 AS cor0
----
113
41
43

skipif mysql # not compatible
query I rowsort label-714
SELECT 72 / col2 + 41 FROM tab0 AS cor0
----
113
41
43

query I rowsort
SELECT cor0.col0 + + cor0.col0 - + ( + 80 + - cor0.col0 * col2 ) AS col1 FROM tab0 AS cor0
----
25
7396
760

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

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

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

query I rowsort
SELECT - - ( + 78 ) * col1 AS col2 FROM tab2 AS cor0
----
1326
2418
4602

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

query I rowsort
SELECT ALL - col2 * 98 AS col2 FROM tab2
----
-2548
-2646
-3724

onlyif mysql # use DIV operator for integer division
query I rowsort label-722
SELECT DISTINCT col1 DIV + CAST( col0 AS SIGNED ) AS col1 FROM tab1
----
0
8

skipif mysql # not compatible
query I rowsort label-722
SELECT DISTINCT col1 / + CAST ( col0 AS INTEGER ) AS col1 FROM tab1
----
0
8

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

query I rowsort
SELECT ALL 25 FROM tab2, tab1 AS cor0
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

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

query I rowsort
SELECT DISTINCT + col0 + 67 AS col0 FROM tab2 AS cor0
----
145
146
74

query I rowsort
SELECT ALL + col2 + col2 * - col2 + - 51 AS col2 FROM tab0 AS cor0
----
-1107
-51
-6693

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-730
SELECT DISTINCT + - ( - col0 ) DIV col0 + + 96 AS col1 FROM tab2 AS cor0
----
97

skipif mysql # not compatible
query I rowsort label-730
SELECT DISTINCT + - ( - col0 ) / col0 + + 96 AS col1 FROM tab2 AS cor0
----
97

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-732
SELECT ALL + - 75 DIV - col0 + - col0 FROM tab0 AS cor0
----
-21
-33
-89

skipif mysql # not compatible
query I rowsort label-732
SELECT ALL + - 75 / - col0 + - col0 FROM tab0 AS cor0
----
-21
-33
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col0 + - col0 * - col0 * col2 col0 FROM tab0 cor0
----
1260
19032
649611

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

query I rowsort
SELECT DISTINCT col2 * col2 + - col1 FROM tab1
----
2890
3239
9203

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

query I rowsort
SELECT 12 - col1 FROM tab0
----
-74
-79
-85

query I rowsort
SELECT tab1.col2 + + col0 * col2 AS col1 FROM tab1
----
216
3705
7776

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

query I rowsort
SELECT ALL + - col2 + - col2 * 69 AS col2 FROM tab0 AS cor0
----
-2310
-5740
-70

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-742
SELECT DISTINCT + 79 + cor0.col2 * cor0.col2 DIV 99 AS col1 FROM tab2 AS cor0
----
85
86
93

skipif mysql # not compatible
query I rowsort label-742
SELECT DISTINCT + 79 + cor0.col2 * cor0.col2 / 99 AS col1 FROM tab2 AS cor0
----
85
86
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - ( cor0.col1 ) * ( - cor0.col1 ) col1 FROM tab1 AS cor0
----
100
169
676

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

query I rowsort
SELECT col0 * 35 * cor0.col0 AS col0 FROM tab1 AS cor0
----
143360
224000
315

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

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

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

query I rowsort
SELECT - col1 * - 93 AS col2 FROM tab2 AS cor0
----
1581
2883
5487

query I rowsort
SELECT - col2 * 54 + + 56 * col1 FROM tab2 AS cor0
----
-1100
1900
278

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

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

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

query I rowsort
SELECT 19 + + cor0.col1 * col1 FROM tab1 AS cor0
----
119
188
695

onlyif mysql # use DIV operator for integer division
query I rowsort label-754
SELECT + col2 * 65 + cor0.col2 DIV - CAST( col1 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
3508
3700
6233

skipif mysql # not compatible
query I rowsort label-754
SELECT + col2 * 65 + cor0.col2 / - CAST ( col1 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
3508
3700
6233

query I rowsort
SELECT DISTINCT - 88 + - col2 * + cor0.col1 FROM tab2 AS cor0
----
-1622
-734
-925

query I rowsort
SELECT 19 * + cor0.col0 * col0 + ( - col1 ) FROM tab2 AS cor0
----
115537
118562
900

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

query I rowsort
SELECT - 61 * + cor0.col1 - + 53 AS col1 FROM tab0 AS cor0
----
-5299
-5604
-5970

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

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

skipif mysql # not compatible
query I rowsort label-760
SELECT - CAST ( NULL AS INTEGER ) / 3 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

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

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

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

query I rowsort
SELECT + cor0.col0 * + tab2.col1 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to ee9a612676395b6deb95e76b47378cb3

onlyif mysql # use DIV operator for integer division
query I rowsort label-764
SELECT ALL + 55 + col0 DIV + col2 AS col0 FROM tab0
----
55
56
90

skipif mysql # not compatible
query I rowsort label-764
SELECT ALL + 55 + col0 / + col2 AS col0 FROM tab0
----
55
56
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 - - 82 col1 FROM tab0 AS cor0
----
-7
47
58

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-766
SELECT + col0 * - CAST ( col1 * cor0.col1 AS INTEGER ) + col0 col0 FROM tab1 AS cor0
----
-13440
-2025
-6336

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-768
SELECT - 30 DIV + col0 AS col0 FROM tab1
----
-10
0
0

skipif mysql # not compatible
query I rowsort label-768
SELECT - 30 / + col0 AS col0 FROM tab1
----
-10
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-769
SELECT + col0 + cor0.col1 + - col1 DIV - 25 FROM tab2 AS cor0
----
139
39
96

skipif mysql # not compatible
query I rowsort label-769
SELECT + col0 + cor0.col1 + - col1 / - 25 FROM tab2 AS cor0
----
139
39
96

query I rowsort
SELECT DISTINCT ( + 9 * - col1 ) + col0 FROM tab0
----
-730
-750
-838

query I rowsort
SELECT DISTINCT - 55 - - tab2.col0 FROM tab2
----
-48
23
24

query I rowsort
SELECT + col2 * col2 + + ( - 10 ) AS col0 FROM tab2
----
1434
666
719

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

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

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

query I rowsort
SELECT + col0 + + 11 FROM tab2
----
18
89
90

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

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

query I rowsort
SELECT col2 * 39 - + col2 AS col1 FROM tab2
----
1026
1444
988

query I rowsort
SELECT - col0 * - 85 FROM tab2 cor0
----
595
6630
6715

query I rowsort
SELECT + 45 - ( + col1 ) AS col2 FROM tab1 AS cor0
----
19
32
35

query I rowsort
SELECT + - 16 + col0 * + col1 + - col0 AS col1 FROM tab0 AS cor0
----
2024
3344
7994

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

query I rowsort
SELECT - col2 + + col2 * col1 * + 82 AS col0 FROM tab0 AS cor0
----
232683
611802
7953

onlyif mysql # use DIV operator for integer division
query I rowsort label-784
SELECT - col0 DIV 2 FROM tab2
----
-3
-39
-39

skipif mysql # not compatible
query I rowsort label-784
SELECT - col0 / 2 FROM tab2
----
-3
-39
-39

query I rowsort
SELECT - cor0.col2 * col2 + col1 * cor0.col2 FROM tab1 AS cor0
----
-1512
-2679
-7968

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

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

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

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

query I rowsort
SELECT ALL + col0 * + 57 * - col2 FROM tab2 AS cor0
----
-10773
-115596
-171114

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-790
SELECT DISTINCT + + CAST( 94 AS SIGNED ) + - cor0.col2 * - col0 AS col1 FROM tab1 AS cor0
----
256
3742
7774

skipif mysql # not compatible
query I rowsort label-790
SELECT DISTINCT + + CAST ( 94 AS INTEGER ) + - cor0.col2 * - col0 AS col1 FROM tab1 AS cor0
----
256
3742
7774

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

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

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

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

query I rowsort
SELECT ALL - + 53 * ( col0 ) + 45 AS col2 FROM tab0 AS cor0
----
-1227
-1810
-4672

query I rowsort
SELECT ALL 54 * + col1 * col1 + 29 FROM tab0
----
399413
447203
508115

query I rowsort
SELECT - ( ( col1 ) * 94 ) FROM tab2
----
-1598
-2914
-5546

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

query I rowsort
SELECT ALL + col0 * 1 + - col2 AS col0 FROM tab0
----
-9
34
7

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

query I rowsort
SELECT ALL + + 36 * col1 - col1 * col2 FROM tab0 AS cor0
----
-4186
258
3395

query I rowsort
SELECT ALL - col2 + - 10 AS col1 FROM tab1 AS cor0
----
-106
-64
-67

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

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

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

query I rowsort
SELECT - 73 + col1 AS col0 FROM tab1 AS cor0
----
-47
-60
-63

query I rowsort
SELECT ALL - - 13 * col1 FROM tab1 cor0
----
130
169
338

query I rowsort
SELECT DISTINCT + ( - col1 ) * col2 + col0 + - cor0.col2 AS col0 FROM tab1 AS cor0
----
-1264
-1455
-563

query I rowsort
SELECT + col2 * + col2 - 88 * - col1 * col2 FROM tab1 AS cor0
----
119040
126468
53409

query I rowsort
SELECT col0 * col1 + 6 AS col2 FROM tab1 AS cor0
----
1046
646
84

query I rowsort
SELECT ALL col2 + col2 + 46 * - 29 AS col2 FROM tab2 AS cor0
----
-1258
-1280
-1282

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

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

query I rowsort
SELECT ALL - 60 + + col2 * - cor0.col1 AS col2 FROM tab2 AS cor0
----
-1594
-706
-897

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

query I rowsort
SELECT DISTINCT - 73 - + 30 AS col0 FROM tab2
----
-103

query I rowsort
SELECT - ( - col1 ) + + col2 + tab2.col2 AS col0 FROM tab2
----
111
85
93

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

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

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

query I rowsort
SELECT + 75 AS col2 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to e61b59795204c348103a58c0a8e4ce16

onlyif mysql # use DIV operator for integer division
query I rowsort label-821
SELECT col2 * + col2 - + col2 DIV + col1 FROM tab2
----
1442
676
729

skipif mysql # not compatible
query I rowsort label-821
SELECT col2 * + col2 - + col2 / + col1 FROM tab2
----
1442
676
729

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 DISTINCT + - col2 * + ( + cor0.col2 ) + - cor0.col2 * + cor0.col2 FROM tab0 cor0
----
-13448
-2
-2178

onlyif mysql # use DIV operator for integer division
query I rowsort label-824
SELECT ALL col1 DIV CAST( 42 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-824
SELECT ALL col1 / CAST ( 42 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
0
0
1

query I rowsort
SELECT DISTINCT - col1 + + ( - cor0.col1 ) * - cor0.col2 AS col0 FROM tab0 AS cor0
----
0
2752
7371

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

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

skipif mysql # not compatible
query I rowsort label-827
SELECT DISTINCT col0 + CAST ( - col1 AS INTEGER ) FROM tab0 AS cor0
----
-2
-62

query I rowsort
SELECT DISTINCT + - col2 + 19 * col0 FROM tab0 AS cor0
----
1609
423
664

query I rowsort
SELECT ALL - col0 * col2 * + col2 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT col1 * 75 FROM tab1 AS cor0
----
1950
750
975

query I rowsort
SELECT DISTINCT col1 * 66 FROM tab0 AS cor0
----
5676
6006
6402

query I rowsort
SELECT ALL cor0.col2 * + col1 + + 30 * - col1 + col2 FROM tab0 AS cor0
----
-2812
291
4814

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

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

query I rowsort
SELECT 37 FROM tab2, tab0 cor0, tab1 AS cor1
----
27 values hashing to c023509f63faa044d654943e6df55ca2

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

query I rowsort
SELECT - + col2 + 25 * col2 AS col0 FROM tab0 AS cor0
----
1968
24
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * col1 * + cor0.col1 col2 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT ALL - col1 * - 48 AS col2 FROM tab0 cor0
----
4128
4368
4656

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

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

query I rowsort
SELECT ALL - + 22 + col1 AS col0 FROM tab1 cor0
----
-12
-9
4

query I rowsort
SELECT DISTINCT - 34 * cor0.col2 + col1 * col1 AS col1 FROM tab1 AS cor0
----
-1160
-1838
-3095

onlyif mysql # use DIV operator for integer division
query I rowsort label-843
SELECT + col1 DIV 5 + + col0 col1 FROM tab2
----
13
82
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-843
SELECT + col1 / 5 + + col0 col1 FROM tab2
----
13
82
89

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

query I rowsort
SELECT DISTINCT + col1 * cor0.col2 * col1 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT - col1 AS col1 FROM tab2 AS cor0 WHERE NOT NULL <> ( NULL )
----

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-849
SELECT DISTINCT + col2 + col1 DIV - tab0.col2 AS col0 FROM tab0
----
-96
31
81

skipif mysql # not compatible
query I rowsort label-849
SELECT DISTINCT + col2 + col1 / - tab0.col2 AS col0 FROM tab0
----
-96
31
81

query I rowsort
SELECT DISTINCT + col0 FROM tab0 WHERE NULL = col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - col0 - + col0 col1 FROM tab1
----
159
3584
7600

onlyif mysql # use DIV operator for integer division
query I rowsort label-852
SELECT - col0 + + col1 DIV col2 + + col2 FROM tab1 AS cor0
----
-7
16
51

skipif mysql # not compatible
query I rowsort label-852
SELECT - col0 + + col1 / col2 + + col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT col1 * - col0 * col0 AS col0 FROM tab0 AS cor0
----
-118825
-49536
-720811

query I rowsort
SELECT DISTINCT + cor0.col2 AS col1 FROM tab1, tab0 AS cor0
----
1
33
82

query III rowsort
SELECT ALL * FROM tab0 cor0 WHERE ( NULL ) >= NULL
----

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

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

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

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT NULL NOT BETWEEN NULL AND ( NULL )
----

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

query III rowsort
SELECT * FROM tab2 WHERE ( NULL ) NOT IN ( col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-862
SELECT tab1.col0 + col1 DIV - col2 - col1 AS col1 FROM tab1
----
-23
54
67

skipif mysql # not compatible
query I rowsort label-862
SELECT tab1.col0 + col1 / - col2 - col1 AS col1 FROM tab1
----
-23
54
67

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

query III rowsort
SELECT ALL * FROM tab1 WHERE NULL IN ( col1 )
----

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

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

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

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

query I rowsort
SELECT DISTINCT - col1 * col1 - - col0 FROM tab1
----
-36
-673
-89

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

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

query I rowsort
SELECT - col1 + - col1 * col2 * col1 FROM tab0
----
-244154
-679133
-9506

onlyif mysql # use DIV operator for integer division
query I rowsort label-873
SELECT ALL col1 DIV col1 + col0 * col1 * col0 AS col1 FROM tab1
----
235
40961
83201

skipif mysql # not compatible
query I rowsort label-873
SELECT ALL col1 / col1 + col0 * col1 * col0 AS col1 FROM tab1
----
235
40961
83201

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

skipif mysql # not compatible
query I rowsort label-874
SELECT + - col0 * col2 / col0 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT - cor0.col2 + cor0.col2 - col2 FROM tab0 AS cor0
----
-1
-33
-82

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-877
SELECT col2 * - col0 / col0 + col1 + - col1 col1 FROM tab2
----
-26
-27
-38

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 - cor0.col2 col1 FROM tab1 AS cor0
----
-16
-51
7

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

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

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

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

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

query I rowsort
SELECT ALL col1 + + col1 * + col2 FROM tab1
----
1261
1430
580

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

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

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

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

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

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

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

query I rowsort
SELECT - col2 + - 9 * col0 + - cor0.col1 FROM tab0 AS cor0
----
-335
-413
-974

query I rowsort
SELECT DISTINCT - col1 * 45 AS col0 FROM tab0 AS cor0
----
-3870
-4095
-4365

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

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

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

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

query I rowsort
SELECT col1 * + 11 + - col0 + col0 AS col2 FROM tab0 AS cor0
----
1001
1067
946

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-900
SELECT col1 + + col1 DIV col1 - col0 * - col0 * + 18 AS col0 FROM tab0
----
10455
142670
22148

skipif mysql # not compatible
query I rowsort label-900
SELECT col1 + + col1 / col1 - col0 * - col0 * + 18 AS col0 FROM tab0
----
10455
142670
22148

query I rowsort
SELECT ALL col2 * - col2 * ( col1 ) AS col1 FROM tab0
----
-611884
-93654
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-902
SELECT DISTINCT + ( + col1 ) DIV - 50 AS col2 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-902
SELECT DISTINCT + ( + col1 ) / - 50 AS col2 FROM tab1
----
0

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

query I rowsort
SELECT tab1.col1 * 57 AS col1 FROM tab1, tab1 cor0, tab1 AS cor1
----
27 values hashing to 845086b0033ec6c263d53a1cb16671ae

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

skipif mysql # not compatible
query I rowsort label-905
SELECT - col2 / - col0 + - cor0.col0 AS col1 FROM tab2 AS cor0
----
-4
-78
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-906
SELECT - col2 * + col1 * - col2 + cor0.col2 * + CAST( 26 * col0 AS SIGNED ) + - CAST( col2 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
1006
114213
801550

skipif mysql # not compatible
query I rowsort label-906
SELECT - col2 * + col1 * - col2 + cor0.col2 * + CAST ( 26 * col0 AS INTEGER ) + - CAST ( col2 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
1006
114213
801550

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

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

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

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

query I rowsort
SELECT + col1 + - 4 * + cor0.col2 AS col2 FROM tab0 AS cor0
----
-237
-46
93

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

query I rowsort
SELECT col0 FROM tab2 WHERE NOT ( + col2 ) > NULL
----

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

query III rowsort
SELECT * FROM tab1 WHERE NOT col1 BETWEEN col2 + + col2 * col0 AND NULL
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

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

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

query I rowsort
SELECT col1 * col0 * col2 + + tab0.col0 FROM tab0 WHERE NOT col2 NOT BETWEEN NULL AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-918
SELECT ALL col2 * - col0 * tab2.col0 + col2 DIV - col0 FROM tab2
----
-1326
-158184
-237158

skipif mysql # not compatible
query I rowsort label-918
SELECT ALL col2 * - col0 * tab2.col0 + col2 / - col0 FROM tab2
----
-1326
-158184
-237158

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

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

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-923
SELECT CAST( cor0.col2 AS SIGNED ) AS col1 FROM tab1, tab0 cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

skipif mysql # not compatible
query I rowsort label-923
SELECT CAST ( cor0.col2 AS INTEGER ) AS col1 FROM tab1, tab0 cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT ALL + 60 FROM tab0 AS cor0
----
60
60
60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-925
SELECT ALL CAST( - 22 AS SIGNED ) AS col2 FROM tab2, tab2 AS cor0, tab2 cor1
----
27 values hashing to 647e567609c5ada1d3454d2102819bfe

skipif mysql # not compatible
query I rowsort label-925
SELECT ALL CAST ( - 22 AS INTEGER ) AS col2 FROM tab2, tab2 AS cor0, tab2 cor1
----
27 values hashing to 647e567609c5ada1d3454d2102819bfe

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

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

query I rowsort
SELECT - col0 + - col2 * - col2 FROM tab0 AS cor0
----
-34
1065
6635

query I rowsort
SELECT ALL - - col1 * col0 + col0 AS col2 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT DISTINCT - - col1 + 1 * cor0.col0 - - cor0.col0 AS col2 FROM tab1 AS cor0
----
138
173
32

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

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

query I rowsort
SELECT ALL + - col0 + + 56 * + col2 FROM tab2 AS cor0
----
1378
1505
2049

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

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

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

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

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

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

query I rowsort
SELECT ALL - col1 * 25 * + col2 + + col0 * cor0.col0 AS col2 FROM tab2 AS cor0
----
-20876
-32266
-9909

query I rowsort
SELECT ALL - col2 * 46 FROM tab0 AS cor0
----
-1518
-3772
-46

query I rowsort
SELECT DISTINCT 45 AS col2 FROM tab0
----
45

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

query I rowsort
SELECT DISTINCT + col1 - - 46 * - 0 * col2 FROM tab1 AS cor0
----
10
13
26

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

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

query I rowsort
SELECT - - col0 + - 11 FROM tab0 AS cor0
----
13
24
78

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

skipif mysql # not compatible
query I rowsort label-947
SELECT - col0 * CAST ( + col2 AS INTEGER ) + col1 * - col1 FROM tab2 AS cor0
----
-1150
-3291
-5509

onlyif mysql # use DIV operator for integer division
query I rowsort label-948
SELECT DISTINCT + ( + col0 ) + col1 DIV col1 FROM tab2 AS cor0
----
79
8
80

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

query I rowsort
SELECT ALL + 71 AS col0 FROM tab0, tab2 cor0
----
9 values hashing to c1aace5d5fe27721cc925552513c85c0

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

query I rowsort
SELECT + col0 * col0 * 92 AS col0 FROM tab2
----
4508
559728
574172

query I rowsort
SELECT + col2 + 12 + - tab1.col1 AS col0 FROM tab1
----
40
59
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-953
SELECT 74 + + col0 DIV - ( + 82 ) FROM tab1 AS cor0
----
74
74
74

skipif mysql # not compatible
query I rowsort label-953
SELECT 74 + + col0 / - ( + 82 ) FROM tab1 AS cor0
----
74
74
74

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( + cor0.col2 ) col0 FROM tab1 AS cor0
----
54
57
96

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

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( col2 AS REAL ) FROM tab0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 4 col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 77 - col0 * ( 67 ) col1 FROM tab1
----
-278
-4365
-5437

onlyif mysql # use DIV operator for integer division
query I rowsort label-960
SELECT 22 DIV col0 + + tab0.col1 AS col1 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-960
SELECT 22 / col0 + + tab0.col1 AS col1 FROM tab0
----
86
91
97

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

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

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

query I rowsort
SELECT ALL - 36 FROM tab0 AS cor0
----
-36
-36
-36

query I rowsort
SELECT ALL - ( col0 ) * 49 FROM tab1 AS cor0
----
-147
-3136
-3920

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

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

query I rowsort
SELECT - col2 * col2 * col0 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT ALL + col2 * + col0 + col2 * + col0 AS col2 FROM tab2 AS cor0
----
378
4056
6004

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

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

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

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

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

query I rowsort
SELECT - col0 * 54 AS col1 FROM tab0
----
-1296
-1890
-4806

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

skipif mysql # not compatible
query I rowsort label-975
SELECT ALL - col0 / - col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - 72 AS col1 FROM tab2 AS cor0
----
-72

query I rowsort
SELECT - ( + 32 ) * + cor0.col0 AS col2 FROM tab2 AS cor0
----
-224
-2496
-2528

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

skipif mysql # not compatible
query I rowsort label-978
SELECT DISTINCT - ( - col1 ) / + col0 FROM tab1 AS cor0
----
0
8

query I rowsort
SELECT DISTINCT - + 14 + + col2 AS col1 FROM tab0 AS cor0
----
-13
19
68

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 41 * + 54 col2 FROM tab2 AS cor0
----
2214

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 + col0 * col0 col2 FROM tab1 AS cor0
----
12
4160
6480

onlyif mysql # use DIV operator for integer division
query I rowsort label-985
SELECT DISTINCT + 47 + cor0.col2 DIV col2 col2 FROM tab0 AS cor0
----
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-985
SELECT DISTINCT + 47 + cor0.col2 / col2 col2 FROM tab0 AS cor0
----
48

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

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

query I rowsort
SELECT DISTINCT - 91 * cor0.col2 + - col2 AS col1 FROM tab0 AS cor0
----
-3036
-7544
-92

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

query I rowsort
SELECT DISTINCT - + 15 * cor0.col2 FROM tab1 AS cor0
----
-1440
-810
-855

onlyif mysql # use DIV operator for integer division
query I rowsort label-991
SELECT ALL - col1 DIV + col2 + cor0.col1 * cor0.col1 AS col1 FROM tab0 AS cor0
----
7394
8280
9312

skipif mysql # not compatible
query I rowsort label-991
SELECT ALL - col1 / + col2 + cor0.col1 * cor0.col1 AS col1 FROM tab0 AS cor0
----
7394
8280
9312

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

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

query I rowsort
SELECT ALL + 40 + col0 * - col2 AS col1 FROM tab2 AS cor0
----
-149
-1988
-2962

query I rowsort
SELECT ALL ( col0 ) + col2 + + col0 AS col2 FROM tab1 AS cor0
----
185
256
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 99 + + col2 * - col2 col2 FROM tab0 AS cor0
----
-6625
-990
98

query I rowsort
SELECT DISTINCT + 62 * col0 - col2 * + col0 AS col2 FROM tab0 AS cor0
----
-1780
2135
696

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

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

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

query I rowsort
SELECT DISTINCT col0 * - 79 * tab1.col2 + - col0 AS col2 FROM tab1
----
-12801
-288256
-606800

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

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

query I rowsort
SELECT + col0 * + col2 + cor0.col2 * cor0.col2 FROM tab2 AS cor0
----
2704
4446
918

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col1 + col2 col0 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT ALL 79 + - col1 * + col2 AS col2 FROM tab1
----
-1169
-1325
-491

query I rowsort
SELECT 88 - 27 AS col2 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 8d4dfe649433a599fc4b10830cc7ce55

query I rowsort
SELECT - 95 * 51 AS col2 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 6ffecb838a14f286a861b9bcdb3b19b9

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

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

query I rowsort
SELECT + 65 + - 53 FROM tab1 AS cor0
----
12
12
12

query I rowsort
SELECT ALL - + 32 * 3 + + col2 * - col0 AS col1 FROM tab1 AS cor0
----
-258
-3744
-7776

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

query I rowsort
SELECT ALL - 72 + - col0 - - cor0.col2 AS col1 FROM tab2 AS cor0
----
-113
-124
-52

query I rowsort
SELECT + col2 + - col2 * col1 + col0 FROM tab2 cor0
----
-1430
-529
-803

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1015
SELECT + col0 + + col2 / + cor0.col0 + - cor0.col0 col1 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT - + 20 + col0 * + cor0.col1 AS col0 FROM tab1 AS cor0
----
1020
58
620

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

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

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT + col1 * cor0.col1 + col1 AS col2 FROM tab1 AS cor0
----
110
182
702

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + + 2 col1 FROM tab0 AS cor0
----
88
93
99

query I rowsort
SELECT col1 * + col1 * - 6 FROM tab1 AS cor0
----
-1014
-4056
-600

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

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

query I rowsort
SELECT ALL - col2 * 39 + - 19 * + cor0.col2 FROM tab1 AS cor0
----
-3132
-3306
-5568

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

query I rowsort
SELECT - cor0.col2 * - 99 FROM tab1 AS cor0
----
5346
5643
9504

query I rowsort
SELECT + col2 + 96 * 54 AS col0 FROM tab2 AS cor0
----
5210
5211
5222

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 + 81 * col2 col1 FROM tab1 AS cor0
----
4371
4553
7696

query I rowsort
SELECT 47 - - col2 FROM tab1 AS cor0
----
101
104
143

query I rowsort
SELECT ALL 29 FROM tab2, tab2 cor0
----
9 values hashing to 1e7120ba8e9191084172ddced17e5eb2

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

query I rowsort
SELECT 30 + col0 FROM tab0 AS cor0
----
119
54
65

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

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

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

query I rowsort
SELECT - 83 * + cor0.col2 FROM tab2 AS cor0
----
-2158
-2241
-3154

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

skipif mysql # not compatible
query I rowsort label-1039
SELECT - col0 * col1 / col1 FROM tab0 AS cor0
----
-24
-35
-89

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

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

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

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

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

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

query I rowsort
SELECT ALL - col0 + + col2 * + cor0.col2 FROM tab0 AS cor0
----
-34
1065
6635

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

query IIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
243 values hashing to 5c33e96b85afe1ea51bb6d4e9fa6f993

query I rowsort
SELECT 48 * tab1.col0 AS col2 FROM tab1
----
144
3072
3840

query I rowsort
SELECT col2 + - 72 AS col0 FROM tab2 AS cor0
----
-34
-45
-46

query I rowsort
SELECT + col1 * 59 + - col2 AS col0 FROM tab1 AS cor0
----
1480
533
671

query I rowsort
SELECT ALL 99 FROM tab1, tab1 cor0
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

onlyif mysql # use DIV operator for integer division
query I rowsort label-1052
SELECT + col2 * col2 DIV - col1 FROM tab2 cor0
----
-11
-23
-84

skipif mysql # not compatible
query I rowsort label-1052
SELECT + col2 * col2 / - col1 FROM tab2 cor0
----
-11
-23
-84

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-1055
SELECT DISTINCT col2 + col1 / - col1 FROM tab1 AS cor0
----
53
56
95

query I rowsort
SELECT ALL - + 97 + col0 AS col1 FROM tab1 AS cor0
----
-17
-33
-94

query I rowsort
SELECT - col1 + - col2 * + ( col0 + cor0.col2 ) AS col0 FROM tab2 AS cor0
----
-2763
-4463
-949

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + 66 * + col2 + + ( - 93 + + col1 ) * 90 col2 FROM tab2 AS cor0
----
-1344
-3798
-4332

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

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

query I rowsort
SELECT ALL + + 95 * + col1 * ( + col1 * - col0 ) AS col1 FROM tab1 AS cor0
----
-1284400
-192660
-608000

query I rowsort
SELECT ALL + - 87 - col2 * - ( col0 * col2 ) AS col0 FROM tab1 AS cor0
----
207849
737193
8661

query I rowsort
SELECT - 46 AS col1 FROM tab2 cor0
----
-46
-46
-46

query I rowsort
SELECT ALL + col0 + ( col2 ) * - col2 * col2 AS col1 FROM tab1 AS cor0
----
-157461
-185129
-884656

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

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

query I rowsort
SELECT DISTINCT - + col1 + 27 AS col0 FROM tab1 AS cor0
----
1
14
17

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 - - col1 col1 FROM tab0 AS cor0
----
172
182
194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * 84 col1 FROM tab2 AS cor0
----
588
6552
6636

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1074
SELECT CAST( col0 AS SIGNED ) + col1 * + 56 AS col1 FROM tab1 cor0
----
1459
624
808

skipif mysql # not compatible
query I rowsort label-1074
SELECT CAST ( col0 AS INTEGER ) + col1 * + 56 AS col1 FROM tab1 cor0
----
1459
624
808

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

query I rowsort
SELECT + cor0.col2 * - 58 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 8695eeddd3aa406829edfad6000c114c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1077
SELECT ALL - CAST( NULL AS SIGNED ) + + 6 FROM tab0, tab2 AS cor0, tab1, tab0 AS cor1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-1077
SELECT ALL - CAST ( NULL AS INTEGER ) + + 6 FROM tab0, tab2 AS cor0, tab1, tab0 AS cor1
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

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

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

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

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

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

query I rowsort
SELECT ALL tab1.col1 + + 65 + col1 FROM tab1
----
117
85
91

query I rowsort
SELECT ALL + col1 * + 45 + + col0 * - tab2.col1 FROM tab2
----
-1947
-578
1178

query I rowsort
SELECT ALL 27 + col2 FROM tab2
----
53
54
65

query I rowsort
SELECT col1 * col1 + col1 FROM tab1
----
110
182
702

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1086
SELECT CAST( - 40 AS SIGNED ) + + col0 FROM tab0
----
-16
-5
49

skipif mysql # not compatible
query I rowsort label-1086
SELECT CAST ( - 40 AS INTEGER ) + + col0 FROM tab0
----
-16
-5
49

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1088
SELECT - - 73 + - col1 * + CAST( + col2 * col1 + - 74 AS SIGNED ) FROM tab0 AS cor0
----
-2158
-237631
-672235

skipif mysql # not compatible
query I rowsort label-1088
SELECT - - 73 + - col1 * + CAST ( + col2 * col1 + - 74 AS INTEGER ) FROM tab0 AS cor0
----
-2158
-237631
-672235

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

query I rowsort
SELECT - - 10 AS col2 FROM tab1 AS cor0
----
10
10
10

query I rowsort
SELECT - col1 * + 57 * col1 + col0 FROM tab2
----
-16394
-198339
-54770

query I rowsort
SELECT col0 - col1 * - col0 FROM tab1
----
1120
704
81

query I rowsort
SELECT + col2 * + tab0.col1 + tab0.col0 * + col1 * tab0.col1 FROM tab0
----
180342
329412
744471

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

query I rowsort
SELECT - col0 * - col2 * - col1 + col0 FROM tab0
----
-3360
-664029
-68088

query I rowsort
SELECT DISTINCT 86 * col0 FROM tab1
----
258
5504
6880

query I rowsort
SELECT ALL - - 86 FROM tab0 AS cor0
----
86
86
86

query I rowsort
SELECT - - 82 + cor0.col1 FROM tab1 AS cor0
----
108
92
95

query I rowsort
SELECT DISTINCT + col0 + col1 - + col2 * col0 FROM tab2
----
-151
-1891
-2906

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col1 * - ( - tab1.col2 ) + + col2 * - col2 col0 FROM tab1
----
110592
29241
72900

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

query I rowsort
SELECT col0 * + col1 + col0 + + col2 * + 23 FROM tab2
----
2296
5278
845

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1105
SELECT col0 + 15 DIV - col1 + col0 AS col1 FROM tab1
----
127
159
6

skipif mysql # not compatible
query I rowsort label-1105
SELECT col0 + 15 / - col1 + col0 AS col1 FROM tab1
----
127
159
6

query I rowsort
SELECT DISTINCT col1 * 48 * col1 - col1 * ( col2 ) AS col0 FROM tab2
----
13226
165554
45291

query I rowsort
SELECT col1 * + col0 * + 90 AS col1 FROM tab0
----
185760
305550
728910

query I rowsort
SELECT DISTINCT col1 * col2 + col2 * + col0 * - cor0.col1 FROM tab1 AS cor0
----
-2808
-35910
-98592

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1111
SELECT + 25 DIV - 57 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-1111
SELECT + 25 / - 57 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT DISTINCT - col1 + 11 FROM tab1
----
-15
-2
1

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

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

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

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

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

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

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

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

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

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

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

query I rowsort
SELECT ALL + 0 * 20 FROM tab0 AS cor0
----
0
0
0

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

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

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

query I rowsort
SELECT - - 54 - + col2 FROM tab0 AS cor0
----
-28
21
53

query I rowsort
SELECT DISTINCT + - 5 + 80 + + col2 AS col0 FROM tab2 cor0
----
101
102
113

query I rowsort
SELECT DISTINCT - cor0.col0 + 61 + col2 * ( - 62 ) AS col1 FROM tab1 AS cor0
----
-3290
-3537
-5971

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

query I rowsort
SELECT ALL col1 + col1 * col1 FROM tab0 AS cor0
----
7482
8372
9506

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

skipif mysql # not compatible
query I rowsort label-1130
SELECT ALL CAST ( col1 AS INTEGER ) + col2 AS col1 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT 90 * - 93 FROM tab0 AS cor0
----
-8370
-8370
-8370

onlyif mysql # use DIV operator for integer division
query I rowsort label-1132
SELECT ALL + col2 * + col1 + cor0.col2 DIV - 2 + col1 FROM tab2 AS cor0
----
1580
644
855

skipif mysql # not compatible
query I rowsort label-1132
SELECT ALL + col2 * + col1 + cor0.col2 / - 2 + col1 FROM tab2 AS cor0
----
1580
644
855

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

query I rowsort
SELECT cor0.col0 * + col0 + - cor0.col2 + 57 FROM tab2 cor0
----
6115
6260
79

query I rowsort
SELECT ALL - ( + col1 ) * cor0.col1 AS col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

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

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

query I rowsort
SELECT 74 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

query I rowsort
SELECT col1 * - col1 * col0 + - col1 AS col0 FROM tab2 AS cor0
----
-22848
-271577
-6758

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

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

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

query I rowsort
SELECT + 54 AS col1 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 81150d59d6c3fc48b4ef5a4a5495bc7a

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

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

query I rowsort
SELECT DISTINCT + 88 + - col1 * col1 AS col1 FROM tab1 cor0
----
-12
-588
-81

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

skipif mysql # not compatible
query I rowsort label-1146
SELECT ALL - col1 / - 50 FROM tab0 AS cor0
----
1
1
1

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

query I rowsort
SELECT - 90 * ( - col1 ) FROM tab0
----
7740
8190
8730

onlyif mysql # use DIV operator for integer division
query I rowsort label-1149
SELECT DISTINCT - 77 DIV col1 FROM tab2
----
-1
-2
-4

skipif mysql # not compatible
query I rowsort label-1149
SELECT DISTINCT - 77 / col1 FROM tab2
----
-1
-2
-4

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

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

query I rowsort
SELECT DISTINCT + - cor0.col0 * col2 + col2 * - cor0.col1 + col0 AS col1 FROM tab1 AS cor0
----
-1563
-4154
-8848

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

query I rowsort
SELECT - 48 * col0 AS col2 FROM tab1 cor0
----
-144
-3072
-3840

query I rowsort
SELECT ALL - 5 FROM tab0 AS cor0
----
-5
-5
-5

query I rowsort
SELECT DISTINCT - - col2 * col2 * 80 AS col2 FROM tab1 cor0
----
233280
259920
737280

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1158
SELECT - col2 DIV col0 + - col1 AS col2 FROM tab1
----
-10
-14
-44

skipif mysql # not compatible
query I rowsort label-1158
SELECT - col2 / col0 + - col1 AS col2 FROM tab1
----
-10
-14
-44

query I rowsort
SELECT ALL - 59 FROM tab1
----
-59
-59
-59

query I rowsort
SELECT + 23 AS col1 FROM tab2, tab0, tab1 cor0
----
27 values hashing to 546d49aa433406dd83ea19885588e658

query I rowsort
SELECT + 95 - + col2 FROM tab1
----
-1
38
41

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

query I rowsort
SELECT ALL - + col2 + col0 + col1 AS col2 FROM tab2 cor0
----
11
111
58

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + col1 + CAST ( + col0 AS REAL ) AS col2 FROM tab1 AS cor0
----
29
74
93

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1169
SELECT DISTINCT - - cor0.col0 + ( col1 ) DIV col0 + 36 FROM tab2 AS cor0
----
114
115
47

skipif mysql # not compatible
query I rowsort label-1169
SELECT DISTINCT - - cor0.col0 + ( col1 ) / col0 + 36 FROM tab2 AS cor0
----
114
115
47

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

query I rowsort
SELECT ALL + cor0.col0 AS col2 FROM tab2, tab0, tab0 cor0, tab1
----
81 values hashing to 2304fcc140e955eb2d1ee28ab1eea994

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

query I rowsort
SELECT + col2 + - 50 AS col0 FROM tab1 AS cor0
----
4
46
7

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

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

skipif mysql # not compatible
query I rowsort label-1175
SELECT DISTINCT - col1 + + 27 / - col0 FROM tab2 AS cor0
----
-17
-34
-59

query I rowsort
SELECT ALL + - col1 + 0 * col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT - 80 AS col1 FROM tab1
----
-80

query I rowsort
SELECT + ( - cor0.col0 ) * col2 + 7 AS col2 FROM tab0 AS cor0
----
-28
-7291
-785

query I rowsort
SELECT + cor0.col1 * + col2 + col0 AS col0 FROM tab1 cor0
----
1328
1407
634

onlyif mysql # use DIV operator for integer division
query I rowsort label-1180
SELECT + cor0.col1 DIV col1 + - col2 AS col2 FROM tab0 AS cor0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-1180
SELECT + cor0.col1 / col1 + - col2 AS col2 FROM tab0 AS cor0
----
-32
-81
0

query I rowsort
SELECT - + 92 * cor0.col0 FROM tab1 AS cor0
----
-276
-5888
-7360

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * 34 col1 FROM tab2
----
-1054
-2006
-578

query I rowsort
SELECT - 92 + col2 FROM tab0 AS cor0
----
-10
-59
-91

query I rowsort
SELECT + 3 + - col0 * + col0 * + 82 FROM tab2 AS cor0
----
-4015
-498885
-511759

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1187
SELECT 6 * - col1 * cor0.col0 + CAST( - col1 AS SIGNED ) * - col2 AS col1 FROM tab2 AS cor0
----
-26078
-465
-7412

skipif mysql # not compatible
query I rowsort label-1187
SELECT 6 * - col1 * cor0.col0 + CAST ( - col1 AS INTEGER ) * - col2 AS col1 FROM tab2 AS cor0
----
-26078
-465
-7412

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 47 * - col0 + col0 * 33 col1 FROM tab2 cor0
----
-1092
-1106
-98

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

query I rowsort
SELECT + 98 + - col2 AS col2 FROM tab2 AS cor0
----
60
71
72

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * col2 col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL + - 68 * col2 FROM tab0 AS cor0
----
-2244
-5576
-68

query I rowsort
SELECT - + ( + col0 ) + + col2 + + col1 * col0 AS col0 FROM tab2 cor0
----
1302
237
4550

skipif mysql # not compatible
query I rowsort
SELECT ALL + CAST ( - col2 AS REAL ) * col2 + - 47 FROM tab1 cor0
----
-2963
-3296
-9263

query I rowsort
SELECT DISTINCT + col2 * col1 + + col1 * + col0 FROM tab2 AS cor0
----
1054
1989
6136

onlyif mysql # use DIV operator for integer division
query I rowsort label-1197
SELECT DISTINCT + - col0 DIV - 39 AS col2 FROM tab2 AS cor0
----
0
2

skipif mysql # not compatible
query I rowsort label-1197
SELECT DISTINCT + - col0 / - 39 AS col2 FROM tab2 AS cor0
----
0
2

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

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

query I rowsort
SELECT DISTINCT - col2 + col0 + + col0 AS col2 FROM tab2
----
-13
120
130

query I rowsort
SELECT DISTINCT - cor0.col2 + col0 * - col0 FROM tab2 cor0
----
-6110
-6279
-76

query I rowsort
SELECT 52 AS col0 FROM tab0
----
52
52
52

query I rowsort
SELECT ALL - 53 AS col0 FROM tab2
----
-53
-53
-53

query I rowsort
SELECT ALL + 99 FROM tab0, tab0 cor0
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT 19 FROM tab1 cor0
----
19

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

query I rowsort
SELECT - 11 + col1 * col1 FROM tab2 AS cor0
----
278
3470
950

query I rowsort
SELECT + 12 * col1 AS col0 FROM tab1 AS cor0
----
120
156
312

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col2 col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL + + 23 * + col0 * + col0 AS col0 FROM tab1 AS cor0
----
147200
207
94208

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

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

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + - CAST ( col1 AS REAL ) / + col1 FROM tab1 AS cor0
----
-1

query I rowsort
SELECT - 81 * col1 AS col1 FROM tab1 cor0
----
-1053
-2106
-810

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + cor0.col2 * col0 * + 75 col1 FROM tab2 AS cor0
----
14182
152178
225229

onlyif mysql # use DIV operator for integer division
query I rowsort label-1220
SELECT col2 * col0 DIV - col2 FROM tab1
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-1220
SELECT col2 * col0 / - col2 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT DISTINCT + 40 + col1 * col0 + cor0.col0 AS col1 FROM tab0 AS cor0
----
2128
3470
8228

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

query I rowsort
SELECT ALL 26 + + col1 * 67 AS col1 FROM tab2 cor0
----
1165
2103
3979

query I rowsort
SELECT 60 - + col1 AS col0 FROM tab0 AS cor0
----
-26
-31
-37

query I rowsort
SELECT DISTINCT - + 7 * cor0.col2 - col2 * - col0 * cor0.col0 AS col0 FROM tab1 AS cor0
----
108
233073
613728

onlyif mysql # use DIV operator for integer division
query I rowsort label-1226
SELECT col2 + - col1 DIV col1 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-1226
SELECT col2 + - col1 / col1 FROM tab0 AS cor0
----
0
32
81

query I rowsort
SELECT 14 AS col2 FROM tab2 AS cor0
----
14
14
14

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

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

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

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

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

query I rowsort
SELECT ALL 38 AS col0 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to a7827a79248ee7bf2cee915a631d02cb

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

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

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

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

query I rowsort
SELECT ALL + 19 + 11 FROM tab1, tab1 AS cor0
----
9 values hashing to da5de0c411a2c0f445400f1b63ea9f89

query I rowsort
SELECT DISTINCT + col0 + ( + col1 ) * cor0.col0 FROM tab2 AS cor0
----
1422
224
4680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - 23 col1 FROM tab0 AS cor0
----
63
68
74

query I rowsort
SELECT - + col2 * 87 + col2 AS col0 FROM tab0 AS cor0
----
-2838
-7052
-86

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

query I rowsort
SELECT cor1.col2 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT 67 AS col2 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to eea8a0738728ea55e4e7ba1506c9905a

query I rowsort
SELECT + col1 + + ( + 43 ) * col0 FROM tab1 AS cor0
----
155
2762
3453

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 + + col1 * col0 * - col2 col2 FROM tab0 AS cor0
----
-3298
-664027
-68026

query I rowsort
SELECT DISTINCT - col1 + - 32 + - col1 AS col1 FROM tab0 AS cor0
----
-204
-214
-226

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

query I rowsort
SELECT DISTINCT + - col2 * col2 + col2 * + col0 AS col0 FROM tab2 AS cor0
----
-540
1352
1558

query I rowsort
SELECT ALL - col2 + 37 AS col0 FROM tab0 AS cor0
----
-45
36
4

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

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

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

skipif mysql # not compatible
query I rowsort label-1250
SELECT DISTINCT CAST ( NULL AS INTEGER ) AS col0 FROM tab1, tab1 AS cor0, tab2 AS cor1, tab2 AS cor2
----
NULL

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

query I rowsort
SELECT ALL - - 71 FROM tab2 AS cor0
----
71
71
71

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

query I rowsort
SELECT DISTINCT col2 + - col0 * - col2 * cor0.col1 + - col0 FROM tab1 AS cor0
----
36473
4263
99856

query I rowsort
SELECT - col0 * + col2 * - 71 FROM tab2 AS cor0
----
13419
143988
213142

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 30 * + col0 col0 FROM tab1 AS cor0
----
-1920
-2400
-90

query I rowsort
SELECT ( - col2 ) * col0 * - col0 FROM tab2 AS cor0
----
1323
158184
237158

query I rowsort
SELECT 29 + - col1 FROM tab0
----
-57
-62
-68

query I rowsort
SELECT cor0.col1 + 7 AS col1 FROM tab2, tab1 cor0
----
9 values hashing to 3d5aee103edbbe514952d9b03a9c1f88

onlyif mysql # use DIV operator for integer division
query I rowsort label-1261
SELECT - 70 + - tab0.col0 - - col2 DIV col0 AS col0 FROM tab0
----
-105
-159
-93

skipif mysql # not compatible
query I rowsort label-1261
SELECT - 70 + - tab0.col0 - - col2 / col0 AS col0 FROM tab0
----
-105
-159
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-1262
SELECT - 91 DIV col0 AS col0 FROM tab0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-1262
SELECT - 91 / col0 AS col0 FROM tab0
----
-1
-2
-3

query I rowsort
SELECT ALL 40 + col1 AS col1 FROM tab2
----
57
71
99

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

query I rowsort
SELECT - 67 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 95c9eba643f6489e03be4d5e83f1ef99

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1267
SELECT ALL col1 * col1 + CAST( col0 AS SIGNED ) * col0 AS col1 FROM tab1
----
4196
6569
685

skipif mysql # not compatible
query I rowsort label-1267
SELECT ALL col1 * col1 + CAST ( col0 AS INTEGER ) * col0 AS col1 FROM tab1
----
4196
6569
685

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + col2 * + col0 + - col1 col0 FROM tab2
----
189
2028
3002

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

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

query I rowsort
SELECT 22 FROM tab2, tab1 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to c6f049334398e3533dd6996714479a2f

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

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

query I rowsort
SELECT col1 * + ( + col1 * - col0 ) + ( - col1 ) + col2 AS col0 FROM tab1 AS cor0
----
-13437
-2000
-6353

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 27 * + col2 col1 FROM tab2
----
-1026
-702
-729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col0 * col0 col1 FROM tab0
----
1225
19008
649522

query I rowsort
SELECT 78 FROM tab2, tab1 AS cor0, tab0 cor1
----
27 values hashing to d8e5ef4db3419fc251e82c50ba04e048

query I rowsort
SELECT - 33 + 98 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 8bef2ea1f05f3514633f851312bdd805

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

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

query I rowsort
SELECT - col2 * - 10 + - col1 AS col2 FROM tab0 AS cor0
----
-87
244
729

query I rowsort
SELECT col2 + + ( col0 ) * col0 + + col1 FROM tab1 AS cor0
----
4163
6509
89

query I rowsort
SELECT + - cor0.col1 + 30 + col1 * col2 FROM tab2 AS cor0
----
1505
659
836

query I rowsort
SELECT - - col0 + - 75 * - cor0.col0 AS col1 FROM tab1 AS cor0
----
228
4864
6080

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1285
SELECT ALL col0 * col2 DIV + 83 AS col0 FROM tab1 AS cor0
----
1
43
92

skipif mysql # not compatible
query I rowsort label-1285
SELECT ALL col0 * col2 / + 83 AS col0 FROM tab1 AS cor0
----
1
43
92

query I rowsort
SELECT + col2 + ( + col0 * + col2 ) + - col2 * - col2 AS col2 FROM tab1 AS cor0
----
16992
3132
6954

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

query I rowsort
SELECT DISTINCT + 23 * tab2.col0 AS col0 FROM tab2, tab1 AS cor0, tab1 cor1
----
161
1794
1817

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

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

query I rowsort
SELECT col1 * + col2 + - 4 FROM tab1 AS cor0
----
1244
1400
566

query I rowsort
SELECT - col0 * + 12 + col0 AS col1 FROM tab1 AS cor0
----
-33
-704
-880

query I rowsort
SELECT col2 + - 16 * col1 AS col1 FROM tab1
----
-103
-112
-362

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

query I rowsort
SELECT ALL tab0.col0 + 37 * col0 AS col2 FROM tab0
----
1330
3382
912

onlyif mysql # use DIV operator for integer division
query I rowsort label-1296
SELECT + col2 DIV col2 + + col0 col1 FROM tab1 AS cor0
----
4
65
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1296
SELECT + col2 / col2 + + col0 col1 FROM tab1 AS cor0
----
4
65
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 * col2 col0 FROM tab2 AS cor0
----
189
2028
3002

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

query I rowsort
SELECT - ( col1 ) * + col1 - col2 AS col0 FROM tab1
----
-157
-265
-730

skipif mysql # not compatible
query I rowsort
SELECT + ( - tab0.col2 * - col2 + - CAST ( col1 AS REAL ) ) AS col1 FROM tab0
----
-96
1003
6633

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1302
SELECT DISTINCT 44 + cor0.col2 DIV col1 AS col2 FROM tab0 AS cor0
----
44

skipif mysql # not compatible
query I rowsort label-1302
SELECT DISTINCT 44 + cor0.col2 / col1 AS col2 FROM tab0 AS cor0
----
44

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

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

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

query I rowsort
SELECT DISTINCT + 83 + col1 FROM tab1 AS cor0
----
109
93
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-1306
SELECT - CAST( - col1 AS SIGNED ) DIV - cor0.col1 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1306
SELECT - CAST ( - col1 AS INTEGER ) / - cor0.col1 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL + tab0.col2 * col0 - 99 AS col2 FROM tab0
----
-64
693
7199

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

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

query I rowsort
SELECT 72 + col1 FROM tab1 AS cor0
----
82
85
98

query I rowsort
SELECT + 14 * + cor0.col2 AS col0 FROM tab2 cor0
----
364
378
532

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1313
SELECT col0 - - CAST( NULL AS SIGNED ) / + col2 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-1313
SELECT col0 - - CAST ( NULL AS INTEGER ) / + col2 col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

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

query I rowsort
SELECT DISTINCT + col2 * col0 + 68 * 5 FROM tab0 AS cor0
----
1132
375
7638

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1317
SELECT + col1 DIV + col2 + - cor0.col2 * - 34 FROM tab1 cor0
----
1836
1938
3264

skipif mysql # not compatible
query I rowsort label-1317
SELECT + col1 / + col2 + - cor0.col2 * - 34 FROM tab1 cor0
----
1836
1938
3264

query I rowsort
SELECT + 14 * - col2 FROM tab1 AS cor0
----
-1344
-756
-798

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 31 * + col2 col2 FROM tab2 AS cor0
----
-1178
-806
-837

query I rowsort
SELECT + 85 * - 1 + + col0 FROM tab2
----
-6
-7
-78

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

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

query I rowsort
SELECT ALL 82 FROM tab0 AS cor0
----
82
82
82

query I rowsort
SELECT + 34 * - col2 - tab0.col2 AS col2 FROM tab0
----
-1155
-2870
-35

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

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

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

query I rowsort
SELECT + col2 + - col2 + + col0 * - 80 AS col2 FROM tab2 AS cor0
----
-560
-6240
-6320

query I rowsort
SELECT col1 * col2 + + 40 + + 6 AS col0 FROM tab1 cor0
----
1294
1450
616

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 18 * col0 col0 FROM tab2 cor0
----
126
1404
1422

query I rowsort
SELECT ALL + ( col1 ) * 46 AS col1 FROM tab1 AS cor0
----
1196
460
598

query I rowsort
SELECT - 21 + col2 + + col1 * - col0 AS col1 FROM tab2 AS cor0
----
-1326
-211
-4597

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

query I rowsort
SELECT cor1.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

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

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

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

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1340
SELECT + CAST( 82 * col1 AS SIGNED ) AS col2 FROM tab2
----
1394
2542
4838

skipif mysql # not compatible
query I rowsort label-1340
SELECT + CAST ( 82 * col1 AS INTEGER ) AS col2 FROM tab2
----
1394
2542
4838

query I rowsort
SELECT ALL + col0 + - 32 FROM tab1
----
-29
32
48

query I rowsort
SELECT ALL col2 * - 29 FROM tab0 AS cor0
----
-2378
-29
-957

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

skipif mysql # not compatible
query I rowsort label-1343
SELECT ALL CAST ( - col2 AS INTEGER ) * + col1 FROM tab1 AS cor0
----
-1248
-1404
-570

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

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

query I rowsort
SELECT 77 - + cor0.col2 AS col1 FROM tab0 AS cor0
----
-5
44
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-1347
SELECT DISTINCT - ( - 2 * - col1 ) + - col1 * col1 * - col1 + + tab2.col1 DIV - col0 FROM tab2
----
205261
29725
4879

skipif mysql # not compatible
query I rowsort label-1347
SELECT DISTINCT - ( - 2 * - col1 ) + - col1 * col1 * - col1 + + tab2.col1 / - col0 FROM tab2
----
205261
29725
4879

query I rowsort
SELECT 11 * + col2 AS col1 FROM tab0
----
11
363
902

query I rowsort
SELECT DISTINCT - ( - col1 ) + col2 FROM tab0
----
119
173
98

query I rowsort
SELECT + 88 * 55 AS col0 FROM tab0
----
4840
4840
4840

onlyif mysql # use DIV operator for integer division
query I rowsort label-1351
SELECT DISTINCT col2 + + ( col0 + col1 ) DIV col2 AS col2 FROM tab0 AS cor0
----
133
36
84

skipif mysql # not compatible
query I rowsort label-1351
SELECT DISTINCT col2 + + ( col0 + col1 ) / col2 AS col2 FROM tab0 AS cor0
----
133
36
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-1352
SELECT DISTINCT + col0 - col0 DIV - col0 FROM tab2 AS cor0
----
79
8
80

skipif mysql # not compatible
query I rowsort label-1352
SELECT DISTINCT + col0 - col0 / - col0 FROM tab2 AS cor0
----
79
8
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col1 FROM tab1 cor0
----
3
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1354
SELECT DISTINCT - CAST( - col1 AS SIGNED ) + + col1 * ( col1 ) AS col0 FROM tab2 cor0
----
306
3540
992

skipif mysql # not compatible
query I rowsort label-1354
SELECT DISTINCT - CAST ( - col1 AS INTEGER ) + + col1 * ( col1 ) AS col0 FROM tab2 cor0
----
306
3540
992

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

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

query I rowsort
SELECT DISTINCT + + 81 * cor0.col0 + - col1 * ( col0 ) FROM tab0 AS cor0
----
-120
-560
-890

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1357
SELECT - CAST( - 86 AS SIGNED ) + col2 AS col2 FROM tab0 AS cor0
----
119
168
87

skipif mysql # not compatible
query I rowsort label-1357
SELECT - CAST ( - 86 AS INTEGER ) + col2 AS col2 FROM tab0 AS cor0
----
119
168
87

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

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

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

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

query I rowsort
SELECT ALL ( 41 ) * cor0.col2 FROM tab1 AS cor0
----
2214
2337
3936

query I rowsort
SELECT + col1 + col1 * + 51 * col2 FROM tab2 AS cor0
----
32963
42718
78293

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

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

query I rowsort
SELECT ALL + ( + col2 ) * - 28 - - col0 * col2 * - col1 AS col0 FROM tab0 AS cor0
----
-3423
-666414
-69036

query I rowsort
SELECT + 91 FROM tab0, tab2 AS cor0, tab1 cor1
----
27 values hashing to deebbcfb9c7803a34dca6bd860849afe

query I rowsort
SELECT + - 13 AS col1 FROM tab0 AS cor0
----
-13
-13
-13

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

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

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

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

query I rowsort
SELECT ALL - col2 * - col0 * cor0.col1 + col2 FROM tab2 AS cor0
----
119678
51072
5886

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1374
SELECT DISTINCT + col0 + - col0 DIV tab2.col1 FROM tab2
----
7
75
77

skipif mysql # not compatible
query I rowsort label-1374
SELECT DISTINCT + col0 + - col0 / tab2.col1 FROM tab2
----
7
75
77

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

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

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

query I rowsort
SELECT ALL + - col0 * - 65 + - col0 AS col1 FROM tab1 AS cor0
----
192
4096
5120

query I rowsort
SELECT DISTINCT - col2 + 47 * col2 FROM tab2 cor0
----
1196
1242
1748

query I rowsort
SELECT ALL - + 98 - - cor0.col0 FROM tab0 AS cor0
----
-63
-74
-9

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

query I rowsort
SELECT DISTINCT ( 71 ) + - col2 FROM tab0 AS cor0
----
-11
38
70

query I rowsort
SELECT ( - 98 ) FROM tab0 AS cor0
----
-98
-98
-98

query I rowsort
SELECT + 48 * col2 AS col1 FROM tab0 AS cor0
----
1584
3936
48

query I rowsort
SELECT DISTINCT 43 FROM tab2, tab1 cor0, tab0 cor1
----
43

query I rowsort
SELECT - col0 + col1 * 58 FROM tab1
----
1505
516
674

onlyif mysql # use DIV operator for integer division
query I rowsort label-1386
SELECT + + col2 * col1 + ( + col2 ) DIV 10 FROM tab1 AS cor0
----
1257
1409
575

skipif mysql # not compatible
query I rowsort label-1386
SELECT + + col2 * col1 + ( + col2 ) / 10 FROM tab1 AS cor0
----
1257
1409
575

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

skipif mysql # not compatible
query I rowsort label-1387
SELECT - CAST ( - ( col2 ) AS INTEGER ) AS col0 FROM tab1 AS cor0
----
54
57
96

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

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

query I rowsort
SELECT - col1 * + col0 * - col1 - col2 FROM tab2 AS cor0
----
22793
271492
6700

onlyif mysql # use DIV operator for integer division
query I rowsort label-1391
SELECT DISTINCT col0 DIV - col1 + + col1 * - col1 - col1 * - 82 AS col1 FROM tab0 cor0
----
-1455
-344
-819

skipif mysql # not compatible
query I rowsort label-1391
SELECT DISTINCT col0 / - col1 + + col1 * - col1 - col1 * - 82 AS col1 FROM tab0 cor0
----
-1455
-344
-819

query I rowsort
SELECT + col0 - col1 * 33 * col1 FROM tab0 cor0
----
-244044
-273184
-310462

query I rowsort
SELECT - 26 * col0 + col1 AS col1 FROM tab2 AS cor0
----
-151
-1969
-2037

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

query I rowsort
SELECT - col1 * 52 + - col2 * cor0.col0 FROM tab0 AS cor0
----
-12030
-5079
-5264

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

query I rowsort
SELECT + col1 + ( col1 * + col0 + + ( cor0.col0 ) ) AS col2 FROM tab1 AS cor0
----
107
1133
714

query I rowsort
SELECT - cor0.col1 * + 20 + - col0 * + col2 AS col1 FROM tab2 AS cor0
----
-3208
-3342
-809

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

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

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

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

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

query I rowsort
SELECT tab1.col2 FROM tab1, tab0, tab2 cor0
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT DISTINCT - + col0 * 62 - col1 FROM tab2 cor0
----
-465
-4895
-4915

query I rowsort
SELECT + col0 * col1 - + col1 AS col1 FROM tab1 AS cor0
----
1027
52
630

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

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

query I rowsort
SELECT ALL - + col0 * 50 + 54 * cor0.col0 FROM tab1 AS cor0
----
12
256
320

query I rowsort
SELECT col0 * - ( - col0 ) - col0 AS col1 FROM tab2
----
42
6006
6162

query I rowsort
SELECT DISTINCT col2 + ( col0 ) * tab0.col1 * + col2 AS col1 FROM tab0
----
3396
664200
68145

query I rowsort
SELECT col2 * tab2.col0 + col2 * - col1 FROM tab2
----
-648
2356
494

query I rowsort
SELECT ALL 99 FROM tab1, tab0 cor0
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

query I rowsort
SELECT ( + 26 ) AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 2d1c3129ed17fd721d4876b21c035584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + cor0.col1 col2 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT 61 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 07149905a72bd87553381f34d19ed290

query I rowsort
SELECT ALL col2 + 44 AS col1 FROM tab0
----
126
45
77

query I rowsort
SELECT DISTINCT col1 * col2 + 19 FROM tab1
----
1267
1423
589

onlyif mysql # use DIV operator for integer division
query I rowsort label-1418
SELECT + tab1.col0 + col2 DIV col2 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-1418
SELECT + tab1.col0 + col2 / col2 FROM tab1
----
4
65
81

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

query I rowsort
SELECT ( 10 ) FROM tab0, tab0 AS cor0
----
9 values hashing to a47194429f3e0358a3aebffd5f050113

onlyif mysql # use DIV operator for integer division
query I rowsort label-1421
SELECT + 53 DIV col0 FROM tab2 cor0
----
0
0
7

skipif mysql # not compatible
query I rowsort label-1421
SELECT + 53 / col0 FROM tab2 cor0
----
0
0
7

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

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

query I rowsort
SELECT DISTINCT - col2 + col2 * col2 * + col2 FROM tab0 AS cor0
----
0
35904
551286

query I rowsort
SELECT DISTINCT - 26 * - col0 * + col1 + col2 FROM tab2 AS cor0
----
119678
34956
5669

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

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

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

query I rowsort
SELECT + ( 48 ) AS col1 FROM tab2
----
48
48
48

query I rowsort
SELECT + 38 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

query I rowsort
SELECT ALL 81 * col1 * 4 FROM tab1
----
3240
4212
8424

query I rowsort
SELECT 13 * - col2 * 81 FROM tab0 cor0
----
-1053
-34749
-86346

query I rowsort
SELECT DISTINCT + 97 AS col2 FROM tab1 cor0
----
97

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col1 * col0 col0 FROM tab0 AS cor0
----
-177504
-329315
-737009

query I rowsort
SELECT - col0 + col1 * - 11 FROM tab1 AS cor0
----
-174
-223
-289

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1437
SELECT ALL - col0 + + cor0.col0 DIV - cor0.col0 AS col2 FROM tab0 AS cor0
----
-25
-36
-90

skipif mysql # not compatible
query I rowsort label-1437
SELECT ALL - col0 + + cor0.col0 / - cor0.col0 AS col2 FROM tab0 AS cor0
----
-25
-36
-90

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

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

query I rowsort
SELECT ALL + col2 + - 13 * col2 AS col2 FROM tab0 AS cor0
----
-12
-396
-984

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

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

query I rowsort
SELECT + 93 AS col1 FROM tab0 AS cor0
----
93
93
93

query I rowsort
SELECT DISTINCT 42 - - col0 AS col1 FROM tab2 AS cor0
----
120
121
49

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

query I rowsort
SELECT ALL col2 * col2 + col1 * - col0 AS col1 FROM tab1 AS cor0
----
2609
2838
8176

query I rowsort
SELECT + cor1.col0 * ( cor1.col2 ) FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 02081120b66025475df9f31f465bcbe4

query I rowsort
SELECT + ( cor0.col2 ) * - ( 48 ) FROM tab0, tab0 AS cor0
----
9 values hashing to 8199dd29730c6b690b1665874eb6c23d

query I rowsort
SELECT + 74 AS col2 FROM tab1, tab1 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to 22fe261d6995563c0767a5087aea05b1

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1451
SELECT ALL - - CAST( 79 AS SIGNED ) * + col1 + - col0 AS col2 FROM tab1 cor0
----
2051
726
947

skipif mysql # not compatible
query I rowsort label-1451
SELECT ALL - - CAST ( 79 AS INTEGER ) * + col1 + - col0 AS col2 FROM tab1 cor0
----
2051
726
947

query I rowsort
SELECT DISTINCT - 10 * + col2 + - 17 FROM tab1 AS cor0
----
-557
-587
-977

query I rowsort
SELECT - col0 - + cor0.col2 * col2 * + col2 FROM tab1 AS cor0
----
-157467
-185257
-884816

query I rowsort
SELECT + - col2 * - col1 + col2 * col2 + col0 * col1 * col1 FROM tab1 AS cor0
----
10219
23984
6348

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 30 + col2 col0 FROM tab1 AS cor0
----
126
84
87

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

query I rowsort
SELECT ALL + + col2 * col2 + 64 * 15 + cor0.col0 FROM tab1 cor0
----
10256
3879
4273

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - col2 col1 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT DISTINCT + col1 * - cor0.col0 + - col1 * + col0 + + col1 * col2 AS col2 FROM tab1 AS cor0
----
-710
-832
1248

query I rowsort
SELECT DISTINCT + - 26 AS col1 FROM tab0 AS cor0
----
-26

query I rowsort
SELECT DISTINCT - col1 * - 41 + - col0 * - tab2.col2 AS col1 FROM tab2
----
1460
3699
4447

query I rowsort
SELECT 39 + col1 + - col2 AS col1 FROM tab2
----
18
43
72

query I rowsort
SELECT DISTINCT + col2 + 67 FROM tab0
----
100
149
68

query I rowsort
SELECT col0 - + 29 FROM tab2
----
-22
49
50

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

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

query I rowsort
SELECT col2 * 78 * - col0 AS col0 FROM tab0 AS cor0
----
-2730
-569244
-61776

query I rowsort
SELECT ALL - + col0 * - 36 FROM tab2 AS cor0
----
252
2808
2844

query I rowsort
SELECT DISTINCT col0 + + cor0.col2 * + 94 FROM tab0 AS cor0
----
129
3126
7797

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 * col1 - + 20 col0 FROM tab2 AS cor0
----
269
3461
941

query I rowsort
SELECT + cor0.col2 * 67 AS col2 FROM tab2 cor0
----
1742
1809
2546

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * + col1 * - col0 col2 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT 24 AS col0 FROM tab0
----
24
24
24

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

query I rowsort
SELECT ALL - + col0 + 80 FROM tab0 AS cor0
----
-9
45
56

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

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

query I rowsort
SELECT DISTINCT + - col0 + ( 79 ) AS col2 FROM tab0 AS cor0
----
-10
44
55

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

query I rowsort
SELECT DISTINCT + + col0 * col0 + + col1 * col1 - 55 AS col0 FROM tab2 AS cor0
----
6475
9510
955

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1483
SELECT ALL - col2 * - ( + col1 ) + col1 DIV - cor0.col2 FROM tab0 AS cor0
----
0
2836
7461

skipif mysql # not compatible
query I rowsort label-1483
SELECT ALL - col2 * - ( + col1 ) + col1 / - cor0.col2 FROM tab0 AS cor0
----
0
2836
7461

query I rowsort
SELECT col0 * + ( 5 ) - col1 FROM tab1
----
-11
310
387

query I rowsort
SELECT + 15 * - col0 AS col1 FROM tab2 AS cor0
----
-105
-1170
-1185

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

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

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

skipif mysql # not compatible
query I rowsort label-1487
SELECT + + CAST ( col2 AS INTEGER ) * + col2 FROM tab2 cor0
----
1444
676
729

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

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

query I rowsort
SELECT DISTINCT + 75 * cor0.col0 FROM tab0, tab1 AS cor0
----
225
4800
6000

query I rowsort
SELECT DISTINCT 17 + cor0.col0 FROM tab1, tab0 cor0
----
106
41
52

query I rowsort
SELECT DISTINCT ( - col0 ) AS col0 FROM tab2 AS cor0
----
-7
-78
-79

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

query I rowsort
SELECT 90 * 9 FROM tab1 AS cor0
----
810
810
810

query I rowsort
SELECT + 53 * - col1 + - cor0.col1 * + cor0.col1 FROM tab0 AS cor0
----
-11954
-13104
-14550

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( - 15 ) + col1 * 91 col1 FROM tab1 AS cor0
----
1168
2351
895

query I rowsort
SELECT ALL - col0 * ( col2 ) + - col1 + col0 AS col1 FROM tab0 AS cor0
----
-7300
-854
-97

query I rowsort
SELECT + 63 * 20 AS col2 FROM tab2 AS cor0
----
1260
1260
1260

query I rowsort
SELECT 36 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to eee96a85519f92856a7500dc8b6cf752

query I rowsort
SELECT + ( col2 ) * + col2 * col0 AS col1 FROM tab1
----
207936
737280
8748

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + col2 + - 76 col1 FROM tab2
----
-42
28
41

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

query I rowsort
SELECT DISTINCT + col0 + col1 * col0 + col0 FROM tab2 AS cor0
----
1501
231
4758

query I rowsort
SELECT - col0 + - col0 - 1 * 22 AS col0 FROM tab1 AS cor0
----
-150
-182
-28

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

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

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

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

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

query I rowsort
SELECT ALL - 72 AS col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to b7689a8218ac9df1cca20d2ba5c53888

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

query I rowsort
SELECT col0 + - 66 + cor0.col0 AS col0 FROM tab1 AS cor0
----
-60
62
94

query I rowsort
SELECT col1 * - 86 + col2 AS col1 FROM tab2 AS cor0
----
-1424
-2639
-5048

query I rowsort
SELECT - cor0.col0 * + col1 + - 93 + col1 FROM tab0 AS cor0
----
-2071
-3391
-8101

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

query I rowsort
SELECT + - col2 * 96 - - cor0.col2 AS col1 FROM tab2 AS cor0
----
-2470
-2565
-3610

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1515
SELECT + cor0.col0 DIV col2 + + 7 AS col2 FROM tab1 AS cor0
----
7
7
8

skipif mysql # not compatible
query I rowsort label-1515
SELECT + cor0.col0 / col2 + + 7 AS col2 FROM tab1 AS cor0
----
7
7
8

query I rowsort
SELECT - 32 FROM tab2, tab0 AS cor0
----
9 values hashing to ef8f93119983b962f4c81381ebf4b1e6

query I rowsort
SELECT ALL + col2 + + col0 * col2 FROM tab1
----
216
3705
7776

query I rowsort
SELECT ALL + col0 + col2 * + ( col2 ) + - col2 FROM tab2
----
1485
709
728

query I rowsort
SELECT DISTINCT tab1.col1 + + col2 * 33 + + 70 AS col2 FROM tab1
----
1878
1961
3251

query I rowsort
SELECT + cor0.col1 + - col2 + + col2 FROM tab0 cor0
----
86
91
97

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1522
SELECT DISTINCT - tab0.col1 DIV cor0.col0 AS col0 FROM tab0, tab1 AS cor0
----
-1
-28
-30
-32

skipif mysql # not compatible
query I rowsort label-1522
SELECT DISTINCT - tab0.col1 / cor0.col0 AS col0 FROM tab0, tab1 AS cor0
----
-1
-28
-30
-32

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

query I rowsort
SELECT + 32 FROM tab0, tab0 AS cor0
----
9 values hashing to d30a2acbf33c88274474306936d3227b

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

query I rowsort
SELECT ALL - col2 + + 82 FROM tab0 AS cor0
----
0
49
81

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

query I rowsort
SELECT + + 30 - - cor0.col2 AS col2 FROM tab0 AS cor0
----
112
31
63

query I rowsort
SELECT 38 * + col1 AS col1 FROM tab0 AS cor0
----
3268
3458
3686

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

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

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

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

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

query I rowsort
SELECT ALL 33 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

query I rowsort
SELECT + col0 * 11 FROM tab1 AS cor0
----
33
704
880

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

skipif mysql # not compatible
query I rowsort label-1536
SELECT 45 / ( + col2 + col2 ) FROM tab0 AS cor0
----
0
0
22

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1537
SELECT - CAST( - 22 AS SIGNED ) + col2 * col1 FROM tab0 AS cor0
----
119
2860
7484

skipif mysql # not compatible
query I rowsort label-1537
SELECT - CAST ( - 22 AS INTEGER ) + col2 * col1 FROM tab0 AS cor0
----
119
2860
7484

query I rowsort
SELECT DISTINCT 89 * - tab2.col1 AS col1 FROM tab2, tab0 AS cor0
----
-1513
-2759
-5251

query I rowsort
SELECT DISTINCT + 17 * col0 FROM tab0 AS cor0
----
1513
408
595

query I rowsort
SELECT DISTINCT + 18 - + col0 FROM tab1 AS cor0
----
-46
-62
15

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

query I rowsort
SELECT + + ( - 33 ) * - cor0.col2 FROM tab0 AS cor0
----
1089
2706
33

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

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

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

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

query I rowsort
SELECT ALL + ( + 70 ) AS col2 FROM tab1
----
70
70
70

query I rowsort
SELECT DISTINCT + 9 * + col2 + + 11 FROM tab0 AS cor0
----
20
308
749

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 + - col0 col2 FROM tab0 AS cor0
----
-178
-48
-70

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

query I rowsort
SELECT ALL + - 2 - col1 AS col0 FROM tab0 AS cor0
----
-88
-93
-99

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col1 ) * - ( - 81 ) + col2 col1 FROM tab1 AS cor0
----
-2052
-753
-957

query I rowsort
SELECT col1 + 2 FROM tab0
----
88
93
99

query I rowsort
SELECT ALL col2 * - 69 AS col2 FROM tab1 cor0
----
-3726
-3933
-6624

query I rowsort
SELECT ALL + - col0 * ( col1 + col2 ) * - 63 AS col0 FROM tab1 AS cor0
----
15120
270144
549360

query I rowsort
SELECT col2 + cor0.col0 * - 37 FROM tab2 cor0
----
-232
-2860
-2885

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

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

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

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

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

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

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

query I rowsort
SELECT ALL - tab0.col0 * col0 AS col1 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT + col0 * col0 * 76 FROM tab1
----
311296
486400
684

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

query I rowsort
SELECT - 74 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 5a567947d14593676e3825756f8e6130

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

query I rowsort
SELECT col0 * + cor0.col0 + + 23 AS col0 FROM tab1 AS cor0
----
32
4119
6423

query I rowsort
SELECT ALL + - 98 * - cor0.col2 AS col1 FROM tab1 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to defbbcee3f2ee18ae2eed3ca5bbc70b8

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

query I rowsort
SELECT DISTINCT 57 AS col0 FROM tab0
----
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-1571
SELECT 98 * col1 - 77 DIV col0 FROM tab1
----
1274
2523
979

skipif mysql # not compatible
query I rowsort label-1571
SELECT 98 * col1 - 77 / col0 FROM tab1
----
1274
2523
979

query I rowsort
SELECT - - ( cor0.col0 ) FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT cor0.col0 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT DISTINCT + col0 * cor0.col2 AS col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL - 21 + + cor0.col2 AS col0 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to b96bedc1fc768503a0f0c0947644c7ca

query I rowsort
SELECT ALL 14 * - col1 + + col1 * - cor0.col2 FROM tab1 AS cor0
----
-1430
-1768
-710

onlyif mysql # use DIV operator for integer division
query I rowsort label-1577
SELECT DISTINCT + cor0.col1 DIV col0 AS col2 FROM tab2 AS cor0
----
0
4

skipif mysql # not compatible
query I rowsort label-1577
SELECT DISTINCT + cor0.col1 / col0 AS col2 FROM tab2 AS cor0
----
0
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 + + col1 * + col0 * - col1 col2 FROM tab1 AS cor0
----
-13533
-2054
-6410

query I rowsort
SELECT - + col1 + 65 AS col1 FROM tab2 AS cor0
----
34
48
6

query I rowsort
SELECT cor0.col1 * 7 FROM tab2 AS cor0
----
119
217
413

onlyif mysql # use DIV operator for integer division
query I rowsort label-1581
SELECT col1 DIV ( 69 ) FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1581
SELECT col1 / ( 69 ) FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1582
SELECT - - cor0.col1 * 2 DIV + col1 FROM tab1 AS cor0
----
2
2
2

skipif mysql # not compatible
query I rowsort label-1582
SELECT - - cor0.col1 * 2 / + col1 FROM tab1 AS cor0
----
2
2
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-1583
SELECT ALL + col1 + 20 DIV col2 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-1583
SELECT ALL + col1 + 20 / col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT - + col1 * - 53 + 16 FROM tab1 AS cor0
----
1394
546
705

query I rowsort
SELECT + col0 + 65 * - col0 AS col0 FROM tab2 AS cor0
----
-448
-4992
-5056

query I rowsort
SELECT + col1 + - col1 * cor0.col0 AS col2 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT - + col0 + + 1 * - 63 FROM tab1 AS cor0
----
-127
-143
-66

query I rowsort
SELECT col0 * ( + cor0.col1 ) FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL col2 * 90 + 82 FROM tab1 AS cor0
----
4942
5212
8722

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1590
SELECT DISTINCT + - col2 * CAST( - cor0.col0 AS SIGNED ) AS col2 FROM tab1 cor0
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-1590
SELECT DISTINCT + - col2 * CAST ( - cor0.col0 AS INTEGER ) AS col2 FROM tab1 cor0
----
162
3648
7680

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 ALL col2 * 47 + - col0 * + col1 AS col2 FROM tab0 AS cor0
----
-3348
-4245
-513

query I rowsort
SELECT + - col2 + cor0.col0 * col1 FROM tab0 AS cor0
----
2031
3394
8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-1594
SELECT col0 + col0 DIV col0 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-1594
SELECT col0 + col0 / col0 FROM tab0 AS cor0
----
25
36
90

query I rowsort
SELECT ALL + + col1 + - 38 FROM tab0 AS cor0
----
48
53
59

query I rowsort
SELECT ALL col2 * col2 * cor0.col2 FROM tab0 AS cor0
----
1
35937
551368

query I rowsort
SELECT + 16 AS col0 FROM tab2 AS cor0
----
16
16
16

query I rowsort
SELECT DISTINCT - 98 AS col1 FROM tab1, tab1 AS cor0
----
-98

query I rowsort
SELECT ALL - col0 * ( col2 * col0 ) + 77 AS col2 FROM tab0 AS cor0
----
-1148
-18931
-649445

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1600
SELECT CAST( + 51 AS SIGNED ) FROM tab2 AS cor0
----
51
51
51

skipif mysql # not compatible
query I rowsort label-1600
SELECT CAST ( + 51 AS INTEGER ) FROM tab2 AS cor0
----
51
51
51

query I rowsort
SELECT DISTINCT - - 53 * - cor0.col0 + - col1 FROM tab1 AS cor0
----
-185
-3402
-4253

query I rowsort
SELECT + - cor0.col1 + 1 FROM tab0 AS cor0
----
-85
-90
-96

query I rowsort
SELECT 34 * + 99 * col0 + - 45 FROM tab0 AS cor0
----
117765
299529
80739

query I rowsort
SELECT DISTINCT - 25 - + col2 AS col0 FROM tab0 AS cor0
----
-107
-26
-58

query I rowsort
SELECT - cor0.col1 * + ( col2 ) AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL - col1 + - col1 * col1 AS col0 FROM tab2 cor0
----
-306
-3540
-992

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1607
SELECT ( - col1 ) + - col2 * CAST( col0 + + cor0.col0 AS SIGNED ) FROM tab0 AS cor0
----
-14687
-167
-1670

skipif mysql # not compatible
query I rowsort label-1607
SELECT ( - col1 ) + - col2 * CAST ( col0 + + cor0.col0 AS INTEGER ) FROM tab0 AS cor0
----
-14687
-167
-1670

query I rowsort
SELECT + 83 AS col2 FROM tab0 AS cor0
----
83
83
83

query I rowsort
SELECT DISTINCT + - col1 + + col2 * + cor0.col1 * - cor0.col0 FROM tab0 AS cor0
----
-3492
-664209
-68198

onlyif mysql # use DIV operator for integer division
query I rowsort label-1610
SELECT DISTINCT - + col1 + + col0 DIV col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-1610
SELECT DISTINCT - + col1 + + col0 / col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT col1 * col2 * - col1 + + 43 FROM tab2 AS cor0
----
-10939
-25904
-90463

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 * + col0 col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT cor0.col1 * col1 + - cor0.col0 FROM tab1 AS cor0
----
36
673
89

query I rowsort
SELECT + 31 AS col0 FROM tab0 cor0
----
31
31
31

query I rowsort
SELECT + 0 AS col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL + + 34 AS col0 FROM tab0 AS cor0
----
34
34
34

query I rowsort
SELECT ALL - + col2 * col2 + - ( col2 ) AS col0 FROM tab0 AS cor0
----
-1122
-2
-6806

query I rowsort
SELECT + 51 FROM tab0 AS cor0
----
51
51
51

query I rowsort
SELECT ALL ( col0 ) + col1 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-1620
SELECT DISTINCT - ( col0 ) + ( col2 ) DIV col1 AS col1 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-1620
SELECT DISTINCT - ( col0 ) + ( col2 ) / col1 AS col1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT - ( 86 ) + col0 FROM tab0
----
-51
-62
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-1622
SELECT 23 + - tab1.col0 DIV col1 AS col2 FROM tab1
----
17
17
23

skipif mysql # not compatible
query I rowsort label-1622
SELECT 23 + - tab1.col0 / col1 AS col2 FROM tab1
----
17
17
23

query I rowsort
SELECT 7 - - col1 FROM tab2
----
24
38
66

query I rowsort
SELECT 99 * ( - col0 ) FROM tab2
----
-693
-7722
-7821

query I rowsort
SELECT DISTINCT col1 * tab2.col2 + + col0 * + tab2.col2 FROM tab2
----
1026
3562
3648

query I rowsort
SELECT 90 * + col0 * 62 + col2 * - col2 FROM tab1 AS cor0
----
13824
353871
437184

query I rowsort
SELECT + col0 * + cor0.col0 + 54 * + col0 AS col0 FROM tab1 AS cor0
----
10720
171
7552

query I rowsort
SELECT - + 39 + col2 + + col1 AS col0 FROM tab2 AS cor0
----
16
19
46

query I rowsort
SELECT ALL + - col0 * - col2 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + - 72 FROM tab2 AS cor0
----
-72

query I rowsort
SELECT ALL - col0 * tab1.col2 * + col1 + - col0 + col2 AS col1 FROM tab1
----
-36487
-4161
-99824

query I rowsort
SELECT 58 AS col1 FROM tab1 AS cor0
----
58
58
58

query I rowsort
SELECT + - cor0.col0 * col0 + - 36 FROM tab2 AS cor0
----
-6120
-6277
-85

query I rowsort
SELECT + col2 + cor0.col2 * col1 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT - col0 + col1 * col2 AS col2 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT ALL tab1.col0 - col1 AS col1 FROM tab1
----
-23
54
67

query I rowsort
SELECT - + 26 + - col0 * + col1 FROM tab2 AS cor0
----
-1369
-243
-4628

onlyif mysql # use DIV operator for integer division
query I rowsort label-1638
SELECT + col2 DIV + col0 FROM tab0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-1638
SELECT + col2 / + col0 FROM tab0
----
0
0
1

query I rowsort
SELECT 55 - 76 FROM tab1, tab1 AS cor0
----
9 values hashing to 631fbd1fd929405aba54a22c2a06c757

query I rowsort
SELECT - 93 * - col0 * col2 FROM tab1
----
15066
339264
714240

onlyif mysql # use DIV operator for integer division
query I rowsort label-1641
SELECT col1 DIV 50 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1641
SELECT col1 / 50 FROM tab1
----
0
0
0

query I rowsort
SELECT + tab2.col0 * + tab2.col0 AS col1 FROM tab2
----
49
6084
6241

query I rowsort
SELECT ALL col1 * + col2 + + tab2.col1 * 61 + col2 FROM tab2
----
1721
2755
5159

query I rowsort
SELECT DISTINCT 2 FROM tab2, tab1 AS cor0
----
2

query I rowsort
SELECT ALL ( col2 ) * col0 * + col1 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT ALL + 90 * + col0 AS col1 FROM tab2 cor0
----
630
7020
7110

query I rowsort
SELECT DISTINCT + ( + col1 ) - + col1 AS col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ( + 91 ) * col2 + - cor0.col0 FROM tab0 AS cor0
----
2979
56
7373

query I rowsort
SELECT ( col0 ) - cor0.col2 AS col0 FROM tab2 AS cor0
----
-20
41
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1650
SELECT ALL + + col2 + - col1 * col0 * - CAST( col1 + - col0 AS SIGNED ) FROM tab0 AS cor0
----
128001
16280
210491

skipif mysql # not compatible
query I rowsort label-1650
SELECT ALL + + col2 + - col1 * col0 * - CAST ( col1 + - col0 AS INTEGER ) FROM tab0 AS cor0
----
128001
16280
210491

query I rowsort
SELECT + - col2 * + col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT + col0 + + col1 * + cor0.col1 AS col0 FROM tab2 AS cor0
----
3559
368
968

query I rowsort
SELECT - - cor0.col2 * cor0.col1 + + 91 AS col0 FROM tab2 AS cor0
----
1625
737
928

query I rowsort
SELECT - col2 * 21 FROM tab0 AS cor0
----
-1722
-21
-693

query I rowsort
SELECT - tab2.col1 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT DISTINCT cor0.col2 + - ( + 86 ) + col2 AS col1 FROM tab2 cor0
----
-10
-32
-34

query I rowsort
SELECT ALL + col2 * col2 - + 43 AS col1 FROM tab0 AS cor0
----
-42
1046
6681

query I rowsort
SELECT col0 * + 25 * col1 AS col1 FROM tab0
----
202475
51600
84875

query I rowsort
SELECT ALL + col1 * - ( + col0 ) * tab0.col1 AS col2 FROM tab0
----
-177504
-329315
-737009

query I rowsort
SELECT col1 * 52 AS col1 FROM tab0 AS cor0
----
4472
4732
5044

query I rowsort
SELECT ALL col0 * 31 * col2 - col2 * + 8 FROM tab1
----
112632
237312
4590

query I rowsort
SELECT DISTINCT 71 AS col0 FROM tab1, tab2 cor0
----
71

query I rowsort
SELECT DISTINCT 1 AS col1 FROM tab0, tab0 AS cor0, tab0 cor1, tab0 AS cor2
----
1

query I rowsort
SELECT DISTINCT - + 0 AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT + cor0.col1 FROM tab0, tab2 AS cor0, tab2, tab2 AS cor1
----
81 values hashing to a5b6acb471910ea4ad7f31cae3b818f7

onlyif mysql # use DIV operator for integer division
query I rowsort label-1666
SELECT + col0 + col1 DIV col0 FROM tab0
----
27
37
90

skipif mysql # not compatible
query I rowsort label-1666
SELECT + col0 + col1 / col0 FROM tab0
----
27
37
90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1667
SELECT DISTINCT cor0.col1 + - CAST( NULL AS SIGNED ) AS col0 FROM tab1, tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1667
SELECT DISTINCT cor0.col1 + - CAST ( NULL AS INTEGER ) AS col0 FROM tab1, tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - tab2.col0 + + 99 AS col1 FROM tab2, tab0 cor0
----
20
21
92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1669
SELECT + col0 * + col0 * - CAST( - col2 * col1 AS SIGNED ) FROM tab2 cor0
----
4031686
41013
9332856

skipif mysql # not compatible
query I rowsort label-1669
SELECT + col0 * + col0 * - CAST ( - col2 * col1 AS INTEGER ) FROM tab2 cor0
----
4031686
41013
9332856

query I rowsort
SELECT + ( col0 ) + col2 FROM tab2
----
104
117
34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1671
SELECT DISTINCT - col1 * col2 + CAST( NULL AS SIGNED ) FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-1671
SELECT DISTINCT - col1 * col2 + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL

query I rowsort
SELECT - col2 * col2 - + col1 FROM tab2
----
-1461
-735
-760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 81 + + col0 col1 FROM tab0
----
105
116
170

query I rowsort
SELECT col1 * col0 + 54 * - col0 + cor0.col1 * 43 FROM tab1 AS cor0
----
-2386
-2721
1034

query I rowsort
SELECT ALL - ( col1 ) + 6 * - col2 FROM tab2 AS cor0
----
-193
-215
-245

query I rowsort
SELECT DISTINCT - 49 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
-49

query I rowsort
SELECT - 84 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 975e2ef2a3bf1ee2622362f4e435752f

query I rowsort
SELECT col1 + + col2 * 50 AS col0 FROM tab0
----
147
1736
4191

query I rowsort
SELECT + col0 * 5 FROM tab2 AS cor0
----
35
390
395

query I rowsort
SELECT ALL + cor0.col0 + cor0.col0 FROM tab1 AS cor0
----
128
160
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-1681
SELECT ALL col1 + - col2 DIV - 97 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-1681
SELECT ALL col1 + - col2 / - 97 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL - 29 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 0cc9ddad93fc783055518ae4b6be054b

onlyif mysql # use DIV operator for integer division
query I rowsort label-1683
SELECT - - col2 DIV + 6 FROM tab0 AS cor0
----
0
13
5

skipif mysql # not compatible
query I rowsort label-1683
SELECT - - col2 / + 6 FROM tab0 AS cor0
----
0
13
5

query I rowsort
SELECT ALL + col1 + - 88 AS col1 FROM tab2 AS cor0
----
-29
-57
-71

query I rowsort
SELECT - col1 + col1 * 51 FROM tab1 AS cor0
----
1300
500
650

query I rowsort
SELECT ALL 48 * 17 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 48462613363f2c740d5a7ef5958a64ae

query I rowsort
SELECT cor0.col1 * 23 FROM tab1 cor0
----
230
299
598

query I rowsort
SELECT DISTINCT - 94 + - 42 * + tab0.col1 * col0 FROM tab0
----
-142684
-340252
-86782

query I rowsort
SELECT ALL 72 + 13 AS col1 FROM tab1
----
85
85
85

query I rowsort
SELECT DISTINCT + tab2.col1 * - 85 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
-1445
-2635
-5015

onlyif mysql # use DIV operator for integer division
query I rowsort label-1691
SELECT ALL ( tab2.col2 ) DIV col1 + tab2.col0 DIV ( col0 ) AS col2 FROM tab2
----
1
1
3

skipif mysql # not compatible
query I rowsort label-1691
SELECT ALL ( tab2.col2 ) / col1 + tab2.col0 / ( col0 ) AS col2 FROM tab2
----
1
1
3

query I rowsort
SELECT DISTINCT 42 + - col1 AS col2 FROM tab1 AS cor0
----
16
29
32

query I rowsort
SELECT ALL + 18 FROM tab0, tab2 AS cor0
----
9 values hashing to b95bafa733666df39c5d3f94760d010f

query I rowsort
SELECT ALL 1 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT - 85 FROM tab1 AS cor0
----
-85
-85
-85

query I rowsort
SELECT ALL + - col2 + col2 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 56 + + col2 AS col1 FROM tab2 cor0
----
82
83
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-1698
SELECT DISTINCT + - col1 DIV - col0 FROM tab1 AS cor0
----
0
8

skipif mysql # not compatible
query I rowsort label-1698
SELECT DISTINCT + - col1 / - col0 FROM tab1 AS cor0
----
0
8

query I rowsort
SELECT DISTINCT - 65 * - col1 + + cor0.col1 * col2 AS col0 FROM tab1 AS cor0
----
1220
2093
3094

onlyif mysql # use DIV operator for integer division
query I rowsort label-1700
SELECT ALL - ( + col2 ) * + CAST( 11 AS SIGNED ) * col2 + - 51 DIV + col0 FROM tab1 AS cor0
----
-101376
-32093
-35739

skipif mysql # not compatible
query I rowsort label-1700
SELECT ALL - ( + col2 ) * + CAST ( 11 AS INTEGER ) * col2 + - 51 / + col0 FROM tab1 AS cor0
----
-101376
-32093
-35739

query I rowsort
SELECT + 81 + - col0 * - 14 FROM tab2 cor0
----
1173
1187
179

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + col1 ) + - col2 col1 FROM tab1 cor0
----
-28
-47
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-1703
SELECT ALL - 49 DIV - cor0.col0 FROM tab2 AS cor0
----
0
0
7

skipif mysql # not compatible
query I rowsort label-1703
SELECT ALL - 49 / - cor0.col0 FROM tab2 AS cor0
----
0
0
7

query I rowsort
SELECT cor0.col0 + col1 * - 84 FROM tab1 AS cor0
----
-1012
-2181
-776

query I rowsort
SELECT ALL - 66 AS col2 FROM tab1 AS cor0
----
-66
-66
-66

query I rowsort
SELECT ( col2 + tab1.col1 ) * col0 AS col0 FROM tab1
----
240
4288
8720

query I rowsort
SELECT DISTINCT 89 AS col2 FROM tab2
----
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1708
SELECT DISTINCT - CAST( 45 AS SIGNED ) + col0 * ( - col1 ) AS col1 FROM tab2
----
-1388
-262
-4647

skipif mysql # not compatible
query I rowsort label-1708
SELECT DISTINCT - CAST ( 45 AS INTEGER ) + col0 * ( - col1 ) AS col1 FROM tab2
----
-1388
-262
-4647

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1709
SELECT DISTINCT - CAST( - 58 AS SIGNED ) AS col2 FROM tab0
----
58

skipif mysql # not compatible
query I rowsort label-1709
SELECT DISTINCT - CAST ( - 58 AS INTEGER ) AS col2 FROM tab0
----
58

query I rowsort
SELECT ALL - - col2 * - col1 * 32 AS col1 FROM tab1 AS cor0
----
-18240
-39936
-44928

query I rowsort
SELECT + 18 + col1 FROM tab2 AS cor0
----
35
49
77

query I rowsort
SELECT - + col1 + + 22 + col1 AS col1 FROM tab0 AS cor0
----
22
22
22

query I rowsort
SELECT cor0.col1 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT ( + 90 ) AS col1 FROM tab1 cor0
----
90
90
90

query I rowsort
SELECT DISTINCT cor0.col2 + 43 * col1 AS col0 FROM tab0 cor0
----
3731
3995
4172

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 85 col1 FROM tab1 AS cor0
----
85

query I rowsort
SELECT DISTINCT col0 + col2 AS col1 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT ALL + 94 * - 68 AS col2 FROM tab0 AS cor0
----
-6392
-6392
-6392

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - 69 col2 FROM tab1
----
-3726
-3933
-6624

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1720
SELECT ALL + col0 + - CAST( col0 AS SIGNED ) * col1 + CAST( 61 AS SIGNED ) AS col2 FROM tab0
----
-1979
-3299
-7949

skipif mysql # not compatible
query I rowsort label-1720
SELECT ALL + col0 + - CAST ( col0 AS INTEGER ) * col1 + CAST ( 61 AS INTEGER ) AS col2 FROM tab0
----
-1979
-3299
-7949

onlyif mysql # use DIV operator for integer division
query I rowsort label-1721
SELECT col1 + + col2 DIV col2 AS col0 FROM tab1
----
11
14
27

skipif mysql # not compatible
query I rowsort label-1721
SELECT col1 + + col2 / col2 AS col0 FROM tab1
----
11
14
27

query I rowsort
SELECT DISTINCT 43 FROM tab0, tab0 AS cor0
----
43

query I rowsort
SELECT col0 + col2 * + tab0.col1 FROM tab0
----
132
2862
7551

query I rowsort
SELECT DISTINCT 15 * + col1 AS col2 FROM tab0
----
1290
1365
1455

query I rowsort
SELECT + col1 + + 14 FROM tab1
----
24
27
40

query I rowsort
SELECT - ( + tab2.col0 ) FROM tab2
----
-7
-78
-79

query I rowsort
SELECT ALL + cor1.col0 AS col1 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT - 88 FROM tab1, tab0 AS cor0
----
9 values hashing to 467301f887614eb7beda22c561b0fad2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 + 62 col1 FROM tab1 AS cor0
----
72
75
88

query I rowsort
SELECT DISTINCT + 62 AS col1 FROM tab0
----
62

query I rowsort
SELECT ( ( col1 ) ) FROM tab0
----
86
91
97

query I rowsort
SELECT DISTINCT + 45 + - col1 + - 92 AS col2 FROM tab1
----
-57
-60
-73

query I rowsort
SELECT col2 + col1 + col0 FROM tab0
----
133
143
262

query I rowsort
SELECT - col0 + - 6 * 77 AS col1 FROM tab0 AS cor0
----
-486
-497
-551

query I rowsort
SELECT - col1 * 62 + - cor0.col1 * + col1 + + 39 FROM tab0 AS cor0
----
-12689
-13884
-15384

query I rowsort
SELECT + col0 + col2 - 75 * col2 AS col2 FROM tab2
----
-1846
-1991
-2733

onlyif mysql # use DIV operator for integer division
query I rowsort label-1737
SELECT - col1 DIV - col1 - col2 AS col0 FROM tab0
----
-32
-81
0

skipif mysql # not compatible
query I rowsort label-1737
SELECT - col1 / - col1 - col2 AS col0 FROM tab0
----
-32
-81
0

query I rowsort
SELECT ALL + - col1 * - cor0.col1 + col1 * 65 AS col1 FROM tab2 AS cor0
----
1394
2976
7316

query I rowsort
SELECT ALL - 2 * col1 + tab0.col0 + - ( - col0 ) * ( col1 ) FROM tab0
----
1916
3236
8006

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab2.col0 + + col0 col1 FROM tab2
----
0
0
0

query I rowsort
SELECT ( tab2.col0 ) * - col2 + - col0 AS col2 FROM tab2
----
-196
-2106
-3081

query I rowsort
SELECT DISTINCT col2 + - 26 AS col1 FROM tab0 cor0
----
-25
56
7

skipif mysql # not compatible
query I rowsort
SELECT + col1 + col2 * + col1 + col1 * + CAST ( - col0 + col1 AS REAL ) AS col1 FROM tab2 AS cor0
----
-391
1612
472

query I rowsort
SELECT ALL - - col1 + col0 AS col2 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT - col1 + - 90 AS col0 FROM tab0 AS cor0
----
-176
-181
-187

query I rowsort
SELECT ALL - cor0.col2 * 3 AS col1 FROM tab1 AS cor0
----
-162
-171
-288

query I rowsort
SELECT ALL + cor0.col2 * 23 * + col2 FROM tab0 AS cor0
----
154652
23
25047

query I rowsort
SELECT col1 + + 98 FROM tab1 AS cor0
----
108
111
124

onlyif mysql # use DIV operator for integer division
query I rowsort label-1749
SELECT DISTINCT col1 DIV cor0.col1 FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-1749
SELECT DISTINCT col1 / cor0.col1 FROM tab0 AS cor0
----
1

query I rowsort
SELECT - col0 + col2 + 98 FROM tab2 AS cor0
----
118
46
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-1751
SELECT + col1 DIV col1 - - col0 AS col1 FROM tab2 AS cor0
----
79
8
80

skipif mysql # not compatible
query I rowsort label-1751
SELECT + col1 / col1 - - col0 AS col1 FROM tab2 AS cor0
----
79
8
80

query I rowsort
SELECT DISTINCT col1 * 55 * + 91 FROM tab1 AS cor0
----
130130
50050
65065

query I rowsort
SELECT col2 * 51 + - col2 + + cor0.col2 AS col2 FROM tab0 AS cor0
----
1683
4182
51

query I rowsort
SELECT ALL - + col1 + cor0.col2 * cor0.col1 FROM tab2 AS cor0
----
1475
629
806

onlyif mysql # use DIV operator for integer division
query I rowsort label-1755
SELECT DISTINCT - - cor0.col2 DIV + ( + col0 ) AS col2 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-1755
SELECT DISTINCT - - cor0.col2 / + ( + col0 ) AS col2 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT - + col0 + + cor0.col2 * + 8 + col0 FROM tab2 AS cor0
----
208
216
304

query I rowsort
SELECT - col2 + ( + ( - col0 ) ) FROM tab2 AS cor0
----
-104
-117
-34

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1758
SELECT cor0.col0 * + 40 + - ( col2 ) * + CAST( 75 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-1515
-2590
1325

skipif mysql # not compatible
query I rowsort label-1758
SELECT cor0.col0 * + 40 + - ( col2 ) * + CAST ( 75 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-1515
-2590
1325

query I rowsort
SELECT DISTINCT col1 + ( - 16 ) FROM tab0 AS cor0
----
70
75
81

query I rowsort
SELECT + 10 * - 4 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to f02f17e9bc17e514af018c6f245ed7a9

query I rowsort
SELECT ALL + col1 * 81 AS col1 FROM tab2
----
1377
2511
4779

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 - 90 * - col1 col0 FROM tab1 AS cor0
----
1074
2286
843

onlyif mysql # use DIV operator for integer division
query I rowsort label-1763
SELECT tab1.col0 DIV col0 AS col2 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1763
SELECT tab1.col0 / col0 AS col2 FROM tab1
----
1
1
1

query I rowsort
SELECT + col0 * + 91 * 71 FROM tab2
----
45227
503958
510419

query I rowsort
SELECT ALL col1 * + 42 AS col0 FROM tab2 AS cor0
----
1302
2478
714

query I rowsort
SELECT DISTINCT - col1 * - 65 AS col1 FROM tab0
----
5590
5915
6305

query I rowsort
SELECT ALL + + col2 + - col1 AS col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT + - col1 + col2 * col2 AS col0 FROM tab2 AS cor0
----
1427
617
698

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 + + ( col2 ) col1 FROM tab1 cor0
----
-7
16
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * col2 col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT col1 * col2 + col2 AS col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT ALL - ( col2 ) FROM tab2 AS cor0
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-1773
SELECT + 35 DIV - col0 + col1 * - 73 + col1 AS col1 FROM tab0 AS cor0
----
-6193
-6552
-6985

skipif mysql # not compatible
query I rowsort label-1773
SELECT + 35 / - col0 + col1 * - 73 + col1 AS col1 FROM tab0 AS cor0
----
-6193
-6552
-6985

query I rowsort
SELECT col2 * col1 + col0 AS col0 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT 52 FROM tab2, tab1 AS cor0
----
9 values hashing to 7f4ae30893ab330784829711032ae599

onlyif mysql # use DIV operator for integer division
query I rowsort label-1776
SELECT ALL col1 + 88 * 72 DIV - col2 AS col2 FROM tab1
----
-101
-53
-91

skipif mysql # not compatible
query I rowsort label-1776
SELECT ALL col1 + 88 * 72 / - col2 AS col2 FROM tab1
----
-101
-53
-91

query I rowsort
SELECT - 20 * + cor0.col0 FROM tab2 cor0
----
-140
-1560
-1580

query I rowsort
SELECT ALL - 26 + col0 FROM tab0 cor0
----
-2
63
9

query I rowsort
SELECT DISTINCT col0 - col1 AS col2 FROM tab0 AS cor0
----
-2
-62

query I rowsort
SELECT ALL + + col1 - col0 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL col1 * col2 + + 56 * col1 + + col0 * col0 AS col1 FROM tab1 AS cor0
----
2869
5226
8376

query I rowsort
SELECT ALL col0 + - col0 AS col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT - + cor0.col1 * + col2 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT + col0 * - col2 + col2 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT ALL + col0 - + cor0.col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + 22 * col1 FROM tab1 AS cor0
----
220
286
572

query I rowsort
SELECT - col0 * col1 + - 6 AS col0 FROM tab2 cor0
----
-1349
-223
-4608

query I rowsort
SELECT + ( col1 ) AS col2 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT + 18 AS col1 FROM tab2 cor0
----
18
18
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + tab0.col2 col2 FROM tab0
----
171
36
57

query I rowsort
SELECT + + col0 + - 17 AS col0 FROM tab0 AS cor0
----
18
7
72

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT + col2 * + col0 + - ( col1 ) FROM tab2
----
158
1969
2985

query I rowsort
SELECT DISTINCT 25 + col1 + - col2 FROM tab2
----
29
4
58

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1795
SELECT ALL + col1 + - col2 * + CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1795
SELECT ALL + col1 + - col2 * + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - col2 col0 FROM tab1
----
-108
-114
-192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + col0 col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL + col1 - + col0 FROM tab0 cor0
----
2
62
62

query I rowsort
SELECT DISTINCT + col0 - col1 * cor0.col1 AS col0 FROM tab1 AS cor0
----
-36
-673
-89

query III rowsort
SELECT * FROM tab1 WHERE ( - col2 / - col1 ) <> ( - col1 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab2, tab1 cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT ALL - col2 + - col1 * - col2 AS col1 FROM tab2 AS cor0
----
1508
608
810

query III rowsort
SELECT DISTINCT * FROM tab2 cor0 WHERE NOT cor0.col0 + + col0 NOT BETWEEN NULL AND NULL
----

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT - col0 BETWEEN - col0 AND col0 * - col0
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

onlyif mysql # use DIV operator for integer division
query I rowsort label-1805
SELECT col1 DIV + col0 + col1 + col2 * col1 AS col2 FROM tab1 AS cor0
----
1261
1438
580

skipif mysql # not compatible
query I rowsort label-1805
SELECT col1 / + col0 + col1 + col2 * col1 AS col2 FROM tab1 AS cor0
----
1261
1438
580

query I rowsort
SELECT - + cor0.col1 * col0 AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT col2 * tab2.col1 * tab2.col2 AS col1 FROM tab2
----
22599
24548
39884

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - col2 + - col2 col2 FROM tab0
----
-1122
-2
-6806

query I rowsort
SELECT ALL col2 + col0 * col2 AS col0 FROM tab1
----
216
3705
7776

query I rowsort
SELECT DISTINCT - 86 * + col0 AS col2 FROM tab0 AS cor0
----
-2064
-3010
-7654

query I rowsort
SELECT DISTINCT cor0.col1 * - col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT DISTINCT - + 99 * col1 FROM tab2 AS cor0
----
-1683
-3069
-5841

query I rowsort
SELECT DISTINCT + - ( + col1 ) FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ALL + col2 + col2 * col0 AS col1 FROM tab0 cor0
----
36
7380
825

query I rowsort
SELECT col2 + - col1 * - tab0.col1 AS col0 FROM tab0
----
7429
8363
9410

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col0 + + tab2.col2 col2 FROM tab2
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-1817
SELECT - col2 DIV col0 AS col2 FROM tab0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-1817
SELECT - col2 / col0 AS col2 FROM tab0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * + col2 + col1 + + col2 * col0 * - col2 col2 FROM tab0
----
-25258
-591047
97

query I rowsort
SELECT - tab1.col0 * + col0 AS col1 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT col1 + col0 + - col2 FROM tab2
----
11
111
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + + col2 + + col2 col2 FROM tab0
----
253
37
90

query I rowsort
SELECT + col2 * + col0 * col0 AS col1 FROM tab2
----
1323
158184
237158

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NOT col1 * col0 + col0 BETWEEN ( col0 ) AND - col1
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * - tab1.col1 + + tab1.col0 col2 FROM tab1
----
1120
704
81

query I rowsort
SELECT + tab2.col0 / col2 FROM tab2 WHERE NOT NULL IN ( + col1 * - col1 )
----

query I rowsort
SELECT DISTINCT + cor1.col2 * - cor0.col0 + cor0.col0 AS col1 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
9 values hashing to d5f9c6abc5468edc9215dcadaa28ad69

query I rowsort
SELECT ALL + col0 + col1 FROM tab0
----
110
132
180

query I rowsort
SELECT ALL - col1 + - tab2.col1 * col0 + col2 FROM tab2
----
-1322
-221
-4635

query I rowsort
SELECT - 57 AS col0 FROM tab0 cor0
----
-57
-57
-57

query I rowsort
SELECT DISTINCT tab1.col1 + - col0 + col0 FROM tab1
----
10
13
26

query I rowsort
SELECT col1 * - col1 * col0 + - col1 AS col0 FROM tab1
----
-13533
-2054
-6410

query I rowsort
SELECT col1 * - col2 + col2 AS col1 FROM tab2
----
-1508
-608
-810

query I rowsort
SELECT col2 + + col0 + col1 * + col0 * + col2 AS col1 FROM tab2
----
119756
51151
5893

query I rowsort
SELECT ALL col2 / col0 FROM tab2 WHERE NOT NULL > NULL
----

query I rowsort
SELECT col1 * + col1 + + col1 * col2 AS col1 FROM tab1
----
1417
2080
670

query I rowsort
SELECT ALL - col1 - col2 FROM tab2 WHERE col0 < + col0
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-1837
SELECT - col1 DIV col1 + - col2 FROM tab2
----
-27
-28
-39

skipif mysql # not compatible
query I rowsort label-1837
SELECT - col1 / col1 + - col2 FROM tab2
----
-27
-28
-39

query I rowsort
SELECT DISTINCT + col2 + - tab1.col1 AS col0 FROM tab1
----
28
47
83

query I rowsort
SELECT ALL + col1 - + tab2.col1 FROM tab2
----
0
0
0

query I rowsort
SELECT cor0.col2 * + col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT col2 * col2 * col0 AS col0 FROM tab2
----
114076
5103
52728

query I rowsort
SELECT + col0 * + col1 * - col1 AS col0 FROM tab2
----
-22831
-271518
-6727

query I rowsort
SELECT DISTINCT tab1.col0 * - col0 * col2 AS col1 FROM tab1 WHERE NOT NULL NOT IN ( - tab1.col2 )
----

query I rowsort
SELECT DISTINCT + tab2.col1 + + tab2.col0 * col2 * - col1 FROM tab2
----
-119593
-51017
-5828

query I rowsort
SELECT DISTINCT col2 + - col2 * + tab2.col2 FROM tab2
----
-1406
-650
-702

query I rowsort
SELECT DISTINCT + tab0.col1 * col2 AS col1 FROM tab0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-1847
SELECT - col2 DIV col1 + col1 FROM tab1
----
24
5
6

skipif mysql # not compatible
query I rowsort label-1847
SELECT - col2 / col1 + col1 FROM tab1
----
24
5
6

query I rowsort
SELECT DISTINCT col2 + col1 + - col1 AS col2 FROM tab0
----
1
33
82

query I rowsort
SELECT ALL col2 + col2 + col1 * col0 FROM tab2
----
1419
271
4654

query I rowsort
SELECT ALL - col0 * col0 * + tab2.col2 + tab2.col1 AS col2 FROM tab2
----
-1292
-158125
-237141

query I rowsort
SELECT col2 + tab0.col2 + tab0.col0 * - col0 FROM tab0
----
-1223
-510
-7757

query I rowsort
SELECT ALL - col0 * - tab1.col0 FROM tab1
----
4096
6400
9

query I rowsort
SELECT ALL col0 * - col1 * + col2 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT col0 + + col1 AS col2 FROM tab2
----
137
38
96

query I rowsort
SELECT + tab0.col0 * + col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL col1 + - col1 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL - 35 AS col2 FROM tab0 AS cor0
----
-35
-35
-35

query I rowsort
SELECT 39 * + col2 AS col2 FROM tab0 AS cor0
----
1287
3198
39

query I rowsort
SELECT ALL + col1 * col2 * + 20 AS col2 FROM tab1 AS cor0
----
11400
24960
28080

query I rowsort
SELECT 8 FROM tab1 cor0
----
8
8
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-1861
SELECT ALL - col1 + col2 DIV + col2 FROM tab0 AS cor0
----
-85
-90
-96

skipif mysql # not compatible
query I rowsort label-1861
SELECT ALL - col1 + col2 / + col2 FROM tab0 AS cor0
----
-85
-90
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1862
SELECT DISTINCT - col2 * + col0 * CAST( + ( col0 ) AS SIGNED ) FROM tab0 cor0
----
-1225
-19008
-649522

skipif mysql # not compatible
query I rowsort label-1862
SELECT DISTINCT - col2 * + col0 * CAST ( + ( col0 ) AS INTEGER ) FROM tab0 cor0
----
-1225
-19008
-649522

onlyif mysql # use DIV operator for integer division
query I rowsort label-1863
SELECT ALL col0 DIV col0 AS col2 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1863
SELECT ALL col0 / col0 AS col2 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT + col1 * col2 * col2 + - col0 AS col2 FROM tab0 AS cor0
----
611795
62
93630

query I rowsort
SELECT ALL - + col0 * - col1 * col2 AS col2 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT ALL - + ( - cor0.col1 ) AS col0 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT + cor0.col1 * + 54 AS col0 FROM tab2, tab2 cor0, tab1 AS cor1
----
27 values hashing to 9e2ad2c14ce97bdcc1f0109f05f69e08

query I rowsort
SELECT ALL + col1 + + col1 AS col1 FROM tab1
----
20
26
52

query I rowsort
SELECT ALL 7 * + col2 + col2 AS col1 FROM tab0
----
264
656
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-1870
SELECT col1 * ( + col2 ) + + col2 DIV col1 FROM tab0 AS cor0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-1870
SELECT col1 * ( + col2 ) + + col2 / col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + - cor0.col0 + cor0.col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT + col2 * col2 + col1 + + 53 * col0 FROM tab1
----
13469
3101
6651

query I rowsort
SELECT 55 * - tab1.col1 AS col0 FROM tab1
----
-1430
-550
-715

query I rowsort
SELECT ALL 13 AS col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to a90d0f37cec603ae1bc0a60dc7fbaeed

query I rowsort
SELECT ALL ( col2 ) + + col1 FROM tab1
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col2 * col1 * col1 col1 FROM tab1
----
16320
36558
5757

query I rowsort
SELECT DISTINCT + col0 + - col1 * + tab2.col1 FROM tab2
----
-210
-3403
-954

query I rowsort
SELECT ALL 55 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 832128adb1ddc65c3105e29cc2c8b3a3

query I rowsort
SELECT DISTINCT + 97 * col0 FROM tab2 AS cor0
----
679
7566
7663

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * + col0 col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT - col1 * 50 AS col0 FROM tab0 AS cor0
----
-4300
-4550
-4850

query I rowsort
SELECT ALL - 75 FROM tab2 AS cor0
----
-75
-75
-75

query I rowsort
SELECT - + 79 FROM tab1 cor0
----
-79
-79
-79

query I rowsort
SELECT ALL - cor0.col2 + cor0.col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT - 16 * + col1 * - col1 FROM tab2 AS cor0
----
15376
4624
55696

query I rowsort
SELECT ( + col1 ) + - col2 - + 89 * col1 * - col0 AS col1 FROM tab2 AS cor0
----
119506
19317
409611

query I rowsort
SELECT ALL + + ( col2 ) * - col0 AS col1 FROM tab0 cor0
----
-35
-7298
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col2 ) * + col0 col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + - ( cor0.col0 ) * - col2 AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT cor0.col0 * + 6 FROM tab1 AS cor0
----
18
384
480

query I rowsort
SELECT col1 + + 65 FROM tab0
----
151
156
162

query I rowsort
SELECT 26 FROM tab1, tab2 AS cor0
----
9 values hashing to 2d1c3129ed17fd721d4876b21c035584

query I rowsort
SELECT tab0.col1 + - col2 AS col0 FROM tab0
----
53
9
96

query I rowsort
SELECT ALL col1 * + 92 FROM tab2
----
1564
2852
5428

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 cor0 CROSS JOIN tab0, tab1 AS cor1
----
972 values hashing to 0210050fb1701e2797a9b17e1ebac91e

query I rowsort
SELECT ALL cor0.col0 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT DISTINCT - cor0.col2 + - col1 * cor0.col2 FROM tab2 AS cor0
----
-1560
-684
-864

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1898
SELECT - CAST( NULL AS SIGNED ) + cor0.col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1898
SELECT - CAST ( NULL AS INTEGER ) + cor0.col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 * + col2 * - col0 FROM tab2 cor0
----
-114076
-5103
-52728

query I rowsort
SELECT ALL + + ( col2 ) FROM tab0 cor0
----
1
33
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1901
SELECT DISTINCT CAST( 33 AS SIGNED ) + col2 AS col0 FROM tab0 AS cor0
----
115
34
66

skipif mysql # not compatible
query I rowsort label-1901
SELECT DISTINCT CAST ( 33 AS INTEGER ) + col2 AS col0 FROM tab0 AS cor0
----
115
34
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1902
SELECT ALL - CAST( col0 AS SIGNED ) * - col1 AS col0 FROM tab2 AS cor0
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-1902
SELECT ALL - CAST ( col0 AS INTEGER ) * - col1 AS col0 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1903
SELECT DISTINCT + CAST( + col2 AS SIGNED ) + col2 * - col1 AS col2 FROM tab0 AS cor0
----
-2805
-7380
-96

skipif mysql # not compatible
query I rowsort label-1903
SELECT DISTINCT + CAST ( + col2 AS INTEGER ) + col2 * - col1 AS col2 FROM tab0 AS cor0
----
-2805
-7380
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-1904
SELECT 14 * col1 DIV + col2 FROM tab0
----
1358
15
36

skipif mysql # not compatible
query I rowsort label-1904
SELECT 14 * col1 / + col2 FROM tab0
----
1358
15
36

query I rowsort
SELECT DISTINCT ( col0 ) * + col1 + ( 38 ) * col0 FROM tab0 AS cor0
----
11481
2976
4725

query I rowsort
SELECT ALL + + ( 53 ) * col0 - ( 14 ) * + col0 FROM tab0 AS cor0
----
1365
3471
936

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1907
SELECT - col1 * col2 * col0 + - CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1907
SELECT - col1 * col2 * col0 + - CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 51 FROM tab1
----
51

query I rowsort
SELECT - 35 + + 59 AS col0 FROM tab2
----
24
24
24

query I rowsort
SELECT + ( - ( col0 ) ) AS col1 FROM tab2
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 54 col0 FROM tab2
----
54
54
54

onlyif mysql # use DIV operator for integer division
query I rowsort label-1912
SELECT col0 DIV col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1912
SELECT col0 / col1 AS col2 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1913
SELECT 8 DIV - 78 + tab1.col0 + - col1 col0 FROM tab1
----
-23
54
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1913
SELECT 8 / - 78 + tab1.col0 + - col1 col0 FROM tab1
----
-23
54
67

query I rowsort
SELECT - col1 * col2 AS col1 FROM tab0
----
-2838
-7462
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 90 col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 96f7a90428db93f472e0d219bab64853

query I rowsort
SELECT + 7 AS col2 FROM tab1
----
7
7
7

query I rowsort
SELECT DISTINCT 57 AS col2 FROM tab0 AS cor0
----
57

query I rowsort
SELECT + + 58 AS col2 FROM tab2 AS cor0
----
58
58
58

query I rowsort
SELECT ALL + ( - col2 + - col2 ) * col0 AS col1 FROM tab2
----
-378
-4056
-6004

query I rowsort
SELECT DISTINCT - - 30 + col1 FROM tab0 cor0
----
116
121
127

query I rowsort
SELECT ALL - + 73 + - col1 * cor0.col1 FROM tab0 AS cor0
----
-7469
-8354
-9482

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 - - cor0.col1 col2 FROM tab2 AS cor0
----
118
34
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * + col2 col0 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT ALL 31 * cor0.col2 AS col0 FROM tab2 AS cor0
----
1178
806
837

query I rowsort
SELECT + + col1 * col2 + + col1 FROM tab0 AS cor0
----
194
2924
7553

onlyif mysql # use DIV operator for integer division
query I rowsort label-1926
SELECT DISTINCT - - col2 DIV col1 FROM tab2 AS cor0
----
0
2

skipif mysql # not compatible
query I rowsort label-1926
SELECT DISTINCT - - col2 / col1 FROM tab2 AS cor0
----
0
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-1927
SELECT ALL + col2 DIV + col2 AS col0 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-1927
SELECT ALL + col2 / + col2 AS col0 FROM tab0
----
1
1
1

query I rowsort
SELECT 64 * + col0 AS col0 FROM tab2
----
448
4992
5056

query I rowsort
SELECT + col1 - col0 * col2 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT + col1 * - col2 * col1 + col1 AS col1 FROM tab1 AS cor0
----
-16211
-36478
-5690

query I rowsort
SELECT - col0 * cor0.col1 AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT + - col2 + - col1 FROM tab2 cor0
----
-55
-58
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-1933
SELECT + col0 DIV col2 + + col0 AS col0 FROM tab1 AS cor0
----
3
65
80

skipif mysql # not compatible
query I rowsort label-1933
SELECT + col0 / col2 + + col0 AS col0 FROM tab1 AS cor0
----
3
65
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1934
SELECT DISTINCT + CAST( NULL AS SIGNED ) FROM tab1, tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1934
SELECT DISTINCT + CAST ( NULL AS INTEGER ) FROM tab1, tab2 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1935
SELECT ALL + col2 * + CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1935
SELECT ALL + col2 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col1 * col0 + + 52 AS col0 FROM tab2 AS cor0
----
1395
269
4654

query I rowsort
SELECT DISTINCT + col2 + cor0.col2 FROM tab1 cor0
----
108
114
192

query I rowsort
SELECT ALL - col0 + 73 AS col2 FROM tab1 AS cor0
----
-7
70
9

query I rowsort
SELECT DISTINCT - col2 * - ( - 99 ) * + col1 AS col1 FROM tab1 cor0
----
-123552
-138996
-56430

query I rowsort
SELECT col2 * + 82 FROM tab1 AS cor0
----
4428
4674
7872

query I rowsort
SELECT ALL + - col0 * + col1 + col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT DISTINCT - col2 * - ( + 31 ) + - col1 FROM tab1 cor0
----
1648
1757
2963

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1943
SELECT col1 + + CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1943
SELECT col1 + + CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 * + 28 FROM tab0 AS cor0
----
2492
672
980

onlyif mysql # use DIV operator for integer division
query I rowsort label-1945
SELECT + + col2 DIV + 15 AS col2 FROM tab2 AS cor0
----
1
1
2

skipif mysql # not compatible
query I rowsort label-1945
SELECT + + col2 / + 15 AS col2 FROM tab2 AS cor0
----
1
1
2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1946
SELECT - col0 * CAST( NULL AS SIGNED ) AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1946
SELECT - col0 * CAST ( NULL AS INTEGER ) AS col0 FROM tab0 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1947
SELECT DISTINCT + col1 DIV + ( col2 ) AS col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-1947
SELECT DISTINCT + col1 / + ( col2 ) AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT - col1 + - 5 FROM tab2 AS cor0
----
-22
-36
-64

query I rowsort
SELECT ALL ( col2 ) + + col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT DISTINCT - 23 AS col0 FROM tab2, tab2 AS cor0
----
-23

query I rowsort
SELECT - 44 FROM tab0, tab0 AS cor0
----
9 values hashing to 07457d9e571e036a9a3a0f5a5a2e1ef2

query I rowsort
SELECT cor0.col1 + 38 * + col0 AS col2 FROM tab2 AS cor0
----
297
3019
3023

onlyif mysql # use DIV operator for integer division
query I rowsort label-1953
SELECT - - 81 DIV - col0 AS col1 FROM tab1 AS cor0
----
-1
-1
-27

skipif mysql # not compatible
query I rowsort label-1953
SELECT - - 81 / - col0 AS col1 FROM tab1 AS cor0
----
-1
-1
-27

query I rowsort
SELECT col1 * col2 * col0 + - col1 * - ( ( tab0.col0 ) ) * 48 AS col0 FROM tab0
----
1052870
166355
167184

query I rowsort
SELECT DISTINCT - col2 + col0 * col2 FROM tab2
----
162
2002
2964

query I rowsort
SELECT + + 24 * - col2 FROM tab0 AS cor0
----
-1968
-24
-792

query I rowsort
SELECT - - col2 + - 71 FROM tab1 AS cor0
----
-14
-17
25

onlyif mysql # use DIV operator for integer division
query I rowsort label-1958
SELECT - col1 DIV 60 AS col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1958
SELECT - col1 / 60 AS col2 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1959
SELECT DISTINCT CAST( col0 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-1959
SELECT DISTINCT CAST ( col0 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT - 43 * + 56 FROM tab0 AS cor0
----
-2408

onlyif mysql # use DIV operator for integer division
query I rowsort label-1961
SELECT DISTINCT col1 DIV + 60 AS col1 FROM tab0 cor0
----
1

skipif mysql # not compatible
query I rowsort label-1961
SELECT DISTINCT col1 / + 60 AS col1 FROM tab0 cor0
----
1

query I rowsort
SELECT DISTINCT + - 58 FROM tab2 AS cor0
----
-58

query I rowsort
SELECT ALL - ( col0 ) * - cor0.col0 + + ( 23 ) AS col2 FROM tab1 AS cor0
----
32
4119
6423

query I rowsort
SELECT - cor0.col2 - + col0 AS col1 FROM tab0 cor0
----
-171
-36
-57

query I rowsort
SELECT - + 49 * col2 FROM tab0 AS cor0
----
-1617
-4018
-49

query I rowsort
SELECT - ( + cor0.col2 ) FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT - ( + col2 ) * + col0 + - 76 AS col1 FROM tab1 AS cor0
----
-238
-3724
-7756

query I rowsort
SELECT ( col1 ) - 70 * - col0 AS col1 FROM tab0 cor0
----
1766
2547
6321

query I rowsort
SELECT 91 - + cor0.col2 * ( col2 ) AS col0 FROM tab1 AS cor0
----
-2825
-3158
-9125

query I rowsort
SELECT ALL + col1 * - col1 * - col0 AS col1 FROM tab1
----
13520
2028
6400

onlyif mysql # use DIV operator for integer division
query I rowsort label-1971
SELECT DISTINCT + cor0.col2 DIV + 13 + - tab0.col1 * - cor0.col1 - 23 FROM tab0, tab2 cor0
----
9 values hashing to a612d3185542642eaf9908f864809084

skipif mysql # not compatible
query I rowsort label-1971
SELECT DISTINCT + cor0.col2 / + 13 + - tab0.col1 * - cor0.col1 - 23 FROM tab0, tab2 cor0
----
9 values hashing to a612d3185542642eaf9908f864809084

query I rowsort
SELECT ALL + col0 * + cor0.col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT col0 * - cor0.col1 + col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT col2 * col1 * - col0 AS col0 FROM tab0
----
-3395
-664118
-68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-1975
SELECT ALL col2 * + col2 + 28 - + col1 DIV col0 FROM tab1 AS cor0
----
2936
3277
9244

skipif mysql # not compatible
query I rowsort label-1975
SELECT ALL col2 * + col2 + 28 - + col1 / col0 FROM tab1 AS cor0
----
2936
3277
9244

query I rowsort
SELECT + + cor0.col1 + - cor0.col1 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col1 + 17 FROM tab0 AS cor0
----
-69
-74
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1978
SELECT ALL - col0 + CAST( - 76 AS SIGNED ) + - col0 AS col2 FROM tab2 AS cor0
----
-232
-234
-90

skipif mysql # not compatible
query I rowsort label-1978
SELECT ALL - col0 + CAST ( - 76 AS INTEGER ) + - col0 AS col2 FROM tab2 AS cor0
----
-232
-234
-90

query I rowsort
SELECT DISTINCT col0 - - col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT + col2 + col1 * 24 AS col2 FROM tab0 cor0
----
2097
2266
2329

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1981
SELECT DISTINCT + col1 + CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-1981
SELECT DISTINCT + col1 + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL - + col1 - ( + cor0.col0 + - cor0.col0 ) * + col1 AS col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL 71 FROM tab1, tab1 AS cor0
----
9 values hashing to c1aace5d5fe27721cc925552513c85c0

query I rowsort
SELECT - col1 * cor0.col2 + + 58 FROM tab2 AS cor0
----
-1476
-588
-779

onlyif mysql # use DIV operator for integer division
query I rowsort label-1985
SELECT DISTINCT col2 DIV + ( - 5 ) + - col2 FROM tab0 cor0
----
-1
-39
-98

skipif mysql # not compatible
query I rowsort label-1985
SELECT DISTINCT col2 / + ( - 5 ) + - col2 FROM tab0 cor0
----
-1
-39
-98

query I rowsort
SELECT ALL + - cor0.col1 * - ( 83 ) * col2 + cor0.col2 AS col2 FROM tab2 cor0
----
127348
53656
69498

query I rowsort
SELECT col1 + + cor0.col2 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT ALL - + col1 * col2 + - 49 * col1 AS col1 FROM tab2 AS cor0
----
-1479
-2356
-4425

query I rowsort
SELECT - col2 * + 34 - + 76 * col0 FROM tab1 cor0
----
-2064
-6802
-9344

query I rowsort
SELECT ALL col1 + col0 * + col2 FROM tab0 AS cor0
----
132
7389
878

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( - col2 * col1 ) col1 FROM tab0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-1992
SELECT ALL cor0.col0 DIV + col0 + + 45 FROM tab0 AS cor0
----
46
46
46

skipif mysql # not compatible
query I rowsort label-1992
SELECT ALL cor0.col0 / + col0 + + 45 FROM tab0 AS cor0
----
46
46
46

query I rowsort
SELECT ALL + col1 * col1 + col0 * - col1 FROM tab2 AS cor0
----
-1054
-1121
744

query I rowsort
SELECT + col0 + + cor0.col0 AS col1 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT - 81 + col1 FROM tab1 cor0
----
-55
-68
-71

query I rowsort
SELECT ALL - col2 * - 69 - col1 AS col1 FROM tab2
----
1735
1832
2605

query I rowsort
SELECT ALL col0 + 39 * col0 AS col2 FROM tab2 AS cor0
----
280
3120
3160

query I rowsort
SELECT cor0.col1 * + ( col0 ) + - cor0.col1 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT DISTINCT + col2 * - 89 + + col2 AS col2 FROM tab2 cor0
----
-2288
-2376
-3344

query I rowsort
SELECT DISTINCT - col1 * + 10 + col0 AS col0 FROM tab2
----
-303
-512
-91

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2001
SELECT ALL - CAST( NULL AS SIGNED ) - cor0.col0 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2001
SELECT ALL - CAST ( NULL AS INTEGER ) - cor0.col0 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + 22 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 7dda382e7c08428abac8600fd696eb3e

query I rowsort
SELECT + 88 * col0 AS col1 FROM tab0 cor0
----
2112
3080
7832

onlyif mysql # use DIV operator for integer division
query I rowsort label-2004
SELECT DISTINCT - col2 - col2 DIV - col2 FROM tab1 AS cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-2004
SELECT DISTINCT - col2 - col2 / - col2 FROM tab1 AS cor0
----
-53
-56
-95

onlyif mysql # use DIV operator for integer division
query I rowsort label-2005
SELECT ALL - + cor0.col1 DIV + col1 - - ( + cor0.col0 ) FROM tab2 AS cor0
----
6
77
78

skipif mysql # not compatible
query I rowsort label-2005
SELECT ALL - + cor0.col1 / + col1 - - ( + cor0.col0 ) FROM tab2 AS cor0
----
6
77
78

query I rowsort
SELECT ALL + + 5 * col2 * ( + col2 ) FROM tab1 AS cor0
----
14580
16245
46080

onlyif mysql # use DIV operator for integer division
query I rowsort label-2007
SELECT - col0 DIV col2 + col1 FROM tab0
----
62
86
90

skipif mysql # not compatible
query I rowsort label-2007
SELECT - col0 / col2 + col1 FROM tab0
----
62
86
90

query I rowsort
SELECT col1 * + col2 - - tab2.col0 * col1 AS col2 FROM tab2
----
1054
1989
6136

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2009
SELECT DISTINCT + CAST( col1 AS SIGNED ) FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-2009
SELECT DISTINCT + CAST ( col1 AS INTEGER ) FROM tab2
----
17
31
59

query IIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
243 values hashing to d489341cd587fd6eb0b972c5464c6ddc

onlyif mysql # use DIV operator for integer division
query I rowsort label-2011
SELECT col2 DIV 19 + col0 FROM tab0
----
25
35
93

skipif mysql # not compatible
query I rowsort label-2011
SELECT col2 / 19 + col0 FROM tab0
----
25
35
93

query I rowsort
SELECT ( - col1 ) * - 99 * 16 + col2 FROM tab2
----
26966
49131
93482

query I rowsort
SELECT col2 * tab1.col1 - + ( - col1 ) FROM tab1
----
1261
1430
580

query I rowsort
SELECT + 26 - col1 FROM tab0
----
-60
-65
-71

query I rowsort
SELECT ALL + + cor0.col1 FROM tab1, tab0 AS cor0, tab0 AS cor1, tab2, tab2 AS cor2
----
243 values hashing to c6425afc100dd55de8d45dec18c469ea

query I rowsort
SELECT DISTINCT col2 + col0 AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT - col1 * tab2.col2 + + 61 FROM tab2
----
-1473
-585
-776

query I rowsort
SELECT ALL 55 + col2 FROM tab1
----
109
112
151

query I rowsort
SELECT ALL + + col2 * col2 FROM tab0 cor0
----
1
1089
6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 16 * - col2 col2 FROM tab2 AS cor0
----
-416
-432
-608

query I rowsort
SELECT - - cor0.col1 + - 34 FROM tab0 AS cor0
----
52
57
63

query I rowsort
SELECT ALL - 23 AS col0 FROM tab0 AS cor0
----
-23
-23
-23

query I rowsort
SELECT DISTINCT + ( col1 ) * - col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT - - 10 FROM tab0 AS cor0
----
10
10
10

onlyif mysql # use DIV operator for integer division
query I rowsort label-2025
SELECT cor0.col0 - col2 DIV + col0 FROM tab0 cor0
----
23
35
89

skipif mysql # not compatible
query I rowsort label-2025
SELECT cor0.col0 - col2 / + col0 FROM tab0 cor0
----
23
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-2026
SELECT - + col1 DIV col0 - col1 FROM tab2 AS cor0
----
-17
-35
-59

skipif mysql # not compatible
query I rowsort label-2026
SELECT - + col1 / col0 - col1 FROM tab2 AS cor0
----
-17
-35
-59

query I rowsort
SELECT ( + col1 ) * - col2 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT - + col0 - + col2 * - col0 * - col2 FROM tab0 AS cor0
----
-26160
-598525
-70

query I rowsort
SELECT DISTINCT + - col1 * col0 AS col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + + col2 * - col0 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 cor0 CROSS JOIN tab1, tab0 cor1
----
972 values hashing to b51b4342db121ebc2d3d353dcd8ed521

query I rowsort
SELECT ALL 14 + + tab0.col1 AS col0 FROM tab0
----
100
105
111

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 + + col1 * + col0 col0 FROM tab1 AS cor0
----
1027
52
630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + ( col1 ) col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT - - col2 * - col2 + col0 * col1 FROM tab2 AS cor0
----
-101
-512
3926

query I rowsort
SELECT DISTINCT + - col0 * 29 - 14 AS col0 FROM tab1 AS cor0
----
-101
-1870
-2334

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2037
SELECT - - col1 + + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2037
SELECT - - col1 + + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col2 * 77 + cor0.col2 AS col2 FROM tab1 AS cor0
----
4212
4446
7488

query I rowsort
SELECT + 99 FROM tab1, tab0 AS cor0, tab0 cor1
----
27 values hashing to 05ea182fd6036c7f5e0ea08fc061cc67

onlyif mysql # use DIV operator for integer division
query I rowsort label-2040
SELECT - - col0 DIV - 41 col1 FROM tab1 AS cor0
----
-1
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2040
SELECT - - col0 / - 41 col1 FROM tab1 AS cor0
----
-1
-1
0

query I rowsort
SELECT DISTINCT + + col0 * col1 + + cor0.col2 + - cor0.col0 FROM tab1 AS cor0
----
1056
129
633

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 AS cor0, tab2 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 79b6ae096785aaecea9c1428e4a43e5f

query I rowsort
SELECT + col1 + + 55 AS col0 FROM tab1
----
65
68
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2044
SELECT ALL + - CAST( col0 AS SIGNED ) FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-2044
SELECT ALL + - CAST ( col0 AS INTEGER ) FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL + col2 + + 6 AS col2 FROM tab2 cor0
----
32
33
44

onlyif mysql # use DIV operator for integer division
query I rowsort label-2046
SELECT + + col1 DIV 90 AS col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2046
SELECT + + col1 / 90 AS col2 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2047
SELECT tab1.col2 + - CAST( NULL AS SIGNED ) AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2047
SELECT tab1.col2 + - CAST ( NULL AS INTEGER ) AS col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT - cor0.col2 + + cor0.col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 1c0f12b2ac8c8b522b92205460500f94

query I rowsort
SELECT - col0 + - 0 FROM tab0
----
-24
-35
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2050
SELECT DISTINCT - tab1.col2 * CAST( NULL AS SIGNED ) FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-2050
SELECT DISTINCT - tab1.col2 * CAST ( NULL AS INTEGER ) FROM tab1
----
NULL

query I rowsort
SELECT DISTINCT - 44 AS col2 FROM tab2, tab2 cor0
----
-44

query I rowsort
SELECT ALL 29 FROM tab0, tab2 AS cor0
----
9 values hashing to 1e7120ba8e9191084172ddced17e5eb2

query I rowsort
SELECT + 34 FROM tab1 AS cor0
----
34
34
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 87 * col2 col1 FROM tab1 AS cor0
----
4698
4959
8352

query I rowsort
SELECT - ( - 52 ) FROM tab0 AS cor0
----
52
52
52

query I rowsort
SELECT ALL 34 AS col2 FROM tab2
----
34
34
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + 93 ) col0 FROM tab0
----
93
93
93

query I rowsort
SELECT DISTINCT tab0.col1 AS col0 FROM tab0, tab0 cor0, tab0 AS cor1
----
86
91
97

query I rowsort
SELECT DISTINCT 83 FROM tab0
----
83

query I rowsort
SELECT ALL col2 + - col2 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + + 13 FROM tab2 AS cor0
----
13
13
13

query I rowsort
SELECT + 39 FROM tab0
----
39
39
39

query I rowsort
SELECT - col1 * - cor0.col1 AS col0 FROM tab1 cor0
----
100
169
676

query I rowsort
SELECT ALL + col1 + col0 + - ( - col2 ) AS col0 FROM tab0
----
133
143
262

query I rowsort
SELECT + tab1.col2 + - col1 FROM tab1
----
28
47
83

query I rowsort
SELECT cor0.col2 + - 85 FROM tab0 AS cor0
----
-3
-52
-84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 + - 97 col2 FROM tab1 cor0
----
-17
-33
-94

query I rowsort
SELECT ALL 43 * - col1 * + col1 FROM tab1
----
-29068
-4300
-7267

query I rowsort
SELECT DISTINCT - tab1.col1 * + 37 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
-370
-481
-962

query I rowsort
SELECT + 48 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

query I rowsort
SELECT ALL - cor0.col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

onlyif mysql # use DIV operator for integer division
query I rowsort label-2072
SELECT + col0 * ( 83 ) * cor0.col1 + 47 DIV col2 FROM tab0 AS cor0
----
171313
281832
672217

skipif mysql # not compatible
query I rowsort label-2072
SELECT + col0 * ( 83 ) * cor0.col1 + 47 / col2 FROM tab0 AS cor0
----
171313
281832
672217

query I rowsort
SELECT DISTINCT + + col1 * - col2 * 80 FROM tab1 AS cor0
----
-112320
-45600
-99840

query I rowsort
SELECT + col1 * col1 + col0 AS col2 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT DISTINCT col1 - 3 AS col2 FROM tab1 cor0
----
10
23
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2076
SELECT col0 + CAST( + col2 AS SIGNED ) FROM tab1 AS cor0
----
121
176
57

skipif mysql # not compatible
query I rowsort label-2076
SELECT col0 + CAST ( + col2 AS INTEGER ) FROM tab1 AS cor0
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 40 * - cor0.col0 * + col2 col2 FROM tab0 AS cor0
----
-1400
-291920
-31680

query I rowsort
SELECT - + col0 + col0 AS col1 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT ( col1 ) * col2 FROM tab0 AS cor0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + col1 ) col2 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2082
SELECT DISTINCT - cor0.col0 DIV - col1 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-2082
SELECT DISTINCT - cor0.col0 / - col1 FROM tab2 AS cor0
----
0
1
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-2083
SELECT + col2 - - col2 DIV + col2 AS col1 FROM tab1 AS cor0
----
55
58
97

skipif mysql # not compatible
query I rowsort label-2083
SELECT + col2 - - col2 / + col2 AS col1 FROM tab1 AS cor0
----
55
58
97

query I rowsort
SELECT DISTINCT + + cor0.col1 + col2 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT - + ( col1 ) * - col0 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + col0 + - col1 * - col0 AS col2 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT - col2 * - col1 + - col1 AS col2 FROM tab0 AS cor0
----
0
2752
7371

onlyif mysql # use DIV operator for integer division
query I rowsort label-2088
SELECT - col0 DIV - col0 AS col1 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2088
SELECT - col0 / - col0 AS col1 FROM tab0
----
1
1
1

query I rowsort
SELECT DISTINCT col0 + - 0 - - tab1.col0 FROM tab1
----
128
160
6

query I rowsort
SELECT DISTINCT col1 - tab2.col1 * col0 AS col1 FROM tab2
----
-1326
-186
-4543

query I rowsort
SELECT DISTINCT - 96 - ( col1 ) FROM tab2
----
-113
-127
-155

query I rowsort
SELECT DISTINCT tab0.col1 + cor0.col1 AS col0 FROM tab0, tab0 AS cor0
----
172
177
182
183
188
194

query I rowsort
SELECT tab0.col1 * + col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT + 95 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 14faa6dda52e3dfe1f5db2579c274a7e

query I rowsort
SELECT - + col1 * col2 + - col2 AS col1 FROM tab2 AS cor0
----
-1560
-684
-864

query I rowsort
SELECT + - col2 * col0 * - 3 FROM tab0 AS cor0
----
105
21894
2376

query I rowsort
SELECT ALL + 26 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 2d1c3129ed17fd721d4876b21c035584

query I rowsort
SELECT - 72 * - col2 + col2 FROM tab2
----
1898
1971
2774

query I rowsort
SELECT + - ( col0 ) - + ( 4 + col0 ) FROM tab1 AS cor0
----
-10
-132
-164

query I rowsort
SELECT - col0 * col2 + 1 FROM tab2 AS cor0
----
-188
-2027
-3001

query I rowsort
SELECT + col2 + + col2 AS col0 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT col1 * + col0 + cor0.col2 AS col0 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT - col1 * 63 FROM tab0
----
-5418
-5733
-6111

query I rowsort
SELECT ALL + 21 * - cor0.col1 - - cor1.col2 AS col0 FROM tab2, tab0 AS cor0, tab0, tab1 AS cor1
----
81 values hashing to 50f2132fdd3a70387d92b7784801c007

query I rowsort
SELECT - - cor0.col2 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT + + col0 * + 21 * col0 AS col2 FROM tab0 AS cor0
----
12096
166341
25725

query I rowsort
SELECT + tab2.col0 * 89 + col0 FROM tab2
----
630
7020
7110

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2108
SELECT + CAST( NULL AS SIGNED ) + - cor0.col0 * - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2108
SELECT + CAST ( NULL AS INTEGER ) + - cor0.col0 * - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2109
SELECT - - col2 + + col2 * + col0 - + CAST( - col2 AS SIGNED ) * cor0.col2 FROM tab1 cor0
----
16992
3132
6954

skipif mysql # not compatible
query I rowsort label-2109
SELECT - - col2 + + col2 * + col0 - + CAST ( - col2 AS INTEGER ) * cor0.col2 FROM tab1 cor0
----
16992
3132
6954

query I rowsort
SELECT + cor0.col0 + - col1 * col1 AS col2 FROM tab1 cor0
----
-36
-673
-89

query I rowsort
SELECT col0 * - col2 * + col1 AS col2 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT col1 + col1 * + tab0.col1 AS col2 FROM tab0
----
7482
8372
9506

query I rowsort
SELECT ALL 47 * 54 AS col0 FROM tab0 AS cor0
----
2538
2538
2538

query I rowsort
SELECT DISTINCT + 31 AS col0 FROM tab0 cor0
----
31

query I rowsort
SELECT 68 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

query I rowsort
SELECT ALL + ( + 94 ) FROM tab0 AS cor0
----
94
94
94

query I rowsort
SELECT - 78 + - col0 FROM tab2 AS cor0
----
-156
-157
-85

query I rowsort
SELECT DISTINCT + - col1 * - col1 + + col2 * 5 AS col1 FROM tab1 AS cor0
----
385
649
946

query I rowsort
SELECT DISTINCT - + col0 + + col0 * cor0.col0 FROM tab2 AS cor0
----
42
6006
6162

query I rowsort
SELECT - cor0.col0 + cor0.col1 AS col0 FROM tab1 AS cor0
----
-54
-67
23

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2121
SELECT ALL CAST( NULL AS SIGNED ) * 96 + - col2 + 60 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2121
SELECT ALL CAST ( NULL AS INTEGER ) * 96 + - col2 + 60 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2122
SELECT ALL - cor0.col0 + + col0 DIV - col1 + 37 AS col2 FROM tab0 AS cor0
----
-52
13
2

skipif mysql # not compatible
query I rowsort label-2122
SELECT ALL - cor0.col0 + + col0 / - col1 + 37 AS col2 FROM tab0 AS cor0
----
-52
13
2

query I rowsort
SELECT DISTINCT + ( col0 ) * col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL ( - 86 ) FROM tab1 cor0
----
-86
-86
-86

query I rowsort
SELECT ALL - 7 * + col1 AS col0 FROM tab2 AS cor0
----
-119
-217
-413

onlyif mysql # use DIV operator for integer division
query I rowsort label-2126
SELECT DISTINCT col0 DIV + col0 + + col2 AS col0 FROM tab2 AS cor0
----
27
28
39

skipif mysql # not compatible
query I rowsort label-2126
SELECT DISTINCT col0 / + col0 + + col2 AS col0 FROM tab2 AS cor0
----
27
28
39

query I rowsort
SELECT DISTINCT + 57 * - col0 AS col0 FROM tab2 AS cor0
----
-399
-4446
-4503

query I rowsort
SELECT DISTINCT - 60 + + col2 FROM tab0 AS cor0
----
-27
-59
22

query I rowsort
SELECT - 33 - col0 FROM tab2 AS cor0
----
-111
-112
-40

onlyif mysql # use DIV operator for integer division
query I rowsort label-2130
SELECT DISTINCT - 53 DIV + col1 + 84 AS col2 FROM tab0 AS cor0
----
84

skipif mysql # not compatible
query I rowsort label-2130
SELECT DISTINCT - 53 / + col1 + 84 AS col2 FROM tab0 AS cor0
----
84

query I rowsort
SELECT ALL + col2 - col2 * + col2 AS col2 FROM tab2 cor0
----
-1406
-650
-702

query I rowsort
SELECT ALL - cor0.col2 * - cor0.col1 FROM tab2 AS cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( col0 ) * - col2 col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT - - 4 FROM tab2 AS cor0
----
4

query I rowsort
SELECT ALL - - col2 * col1 + - ( + col2 ) * 1 AS col2 FROM tab1 AS cor0
----
1152
1350
513

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + cor0.col0 * col1 col2 FROM tab1 cor0
----
1027
52
630

query I rowsort
SELECT ALL col2 * 24 AS col2 FROM tab2 AS cor0
----
624
648
912

query I rowsort
SELECT 78 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

query I rowsort
SELECT DISTINCT + col1 * + cor0.col0 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT + col2 * - 47 * col2 + col0 + col0 AS col2 FROM tab2 AS cor0
----
-31616
-34249
-67710

query I rowsort
SELECT DISTINCT col0 * + col1 AS col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT + - col0 + - 55 * - col2 FROM tab0 AS cor0
----
1791
20
4421

query I rowsort
SELECT - + col0 * col0 * - 95 AS col1 FROM tab1 cor0
----
389120
608000
855

query I rowsort
SELECT DISTINCT col2 + - col2 * + col2 AS col0 FROM tab1 AS cor0
----
-2862
-3192
-9120

query I rowsort
SELECT ALL col2 + + ( col1 ) * cor0.col0 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT DISTINCT - col1 * col0 + cor0.col2 AS col0 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT - col2 + + 90 FROM tab0 AS cor0
----
57
8
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-2148
SELECT ALL - col1 DIV + col0 + - col2 * - col2 FROM tab1 AS cor0
----
2908
3249
9216

skipif mysql # not compatible
query I rowsort label-2148
SELECT ALL - col1 / + col0 + - col2 * - col2 FROM tab1 AS cor0
----
2908
3249
9216

query I rowsort
SELECT + - 4 AS col2 FROM tab0 AS cor0
----
-4
-4
-4

query I rowsort
SELECT ALL + - 40 * col1 + + col0 FROM tab0 AS cor0
----
-3416
-3551
-3845

query I rowsort
SELECT DISTINCT + - col0 + - col1 AS col1 FROM tab2 cor0
----
-137
-38
-96

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( 59 AS REAL ) FROM tab1 cor0
----
59
59
59

query I rowsort
SELECT ALL - - col0 + cor0.col2 FROM tab1 AS cor0
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + tab1.col2 col0 FROM tab1
----
109
67
80

query I rowsort
SELECT ALL + tab0.col0 AS col0 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

onlyif mysql # use DIV operator for integer division
query I rowsort label-2156
SELECT + col0 DIV - 31 + - col0 FROM tab1
----
-3
-66
-82

skipif mysql # not compatible
query I rowsort label-2156
SELECT + col0 / - 31 + - col0 FROM tab1
----
-3
-66
-82

query I rowsort
SELECT ALL - col1 * + col0 * ( - col0 ) FROM tab0
----
118825
49536
720811

query I rowsort
SELECT 53 AS col0 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to fede6033dee346dbd272085c05724fda

query I rowsort
SELECT DISTINCT + - cor0.col2 + + col1 * 10 AS col1 FROM tab2 AS cor0
----
132
283
564

query I rowsort
SELECT DISTINCT - 84 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
-84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2161
SELECT DISTINCT - CAST( NULL AS DECIMAL ) col0 FROM tab2, tab0 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2161
SELECT DISTINCT - CAST ( NULL AS REAL ) col0 FROM tab2, tab0 cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2162
SELECT DISTINCT + col2 * CAST( NULL AS SIGNED ) FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-2162
SELECT DISTINCT + col2 * CAST ( NULL AS INTEGER ) FROM tab2
----
NULL

query I rowsort
SELECT - col1 * - ( col2 ) FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT ALL - - col0 * col2 - - cor0.col2 AS col0 FROM tab1 AS cor0
----
216
3705
7776

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ALL - col1 * - CAST ( ( - col1 ) AS REAL ) + 60 col2 FROM tab0 AS cor0
----
-7336
-8221
-9349

query I rowsort
SELECT + col2 * + 85 + col2 AS col0 FROM tab2
----
2236
2322
3268

query I rowsort
SELECT + 18 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to b95bafa733666df39c5d3f94760d010f

query I rowsort
SELECT ALL ( ( tab2.col2 ) ) * 31 + - 97 * + col0 * ( col2 ) FROM tab2
----
-17496
-195910
-290016

query I rowsort
SELECT DISTINCT tab0.col0 FROM tab0, tab0 cor0, tab1 AS cor1
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-2170
SELECT - ( col2 ) + col2 DIV col0 AS col2 FROM tab2 AS cor0
----
-24
-26
-38

skipif mysql # not compatible
query I rowsort label-2170
SELECT - ( col2 ) + col2 / col0 AS col2 FROM tab2 AS cor0
----
-24
-26
-38

query I rowsort
SELECT DISTINCT + 12 * - col1 AS col0 FROM tab1 cor0
----
-120
-156
-312

query I rowsort
SELECT + 80 AS col1 FROM tab2 AS cor0
----
80
80
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2173
SELECT DISTINCT - CAST( 1 AS SIGNED ) AS col0 FROM tab1
----
-1

skipif mysql # not compatible
query I rowsort label-2173
SELECT DISTINCT - CAST ( 1 AS INTEGER ) AS col0 FROM tab1
----
-1

query I rowsort
SELECT ( + col2 ) * cor0.col1 AS col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT ALL + col0 * cor0.col0 AS col2 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT - 33 AS col1 FROM tab2 AS cor0
----
-33

query I rowsort
SELECT ALL - + 90 + - col1 * 16 AS col2 FROM tab0 AS cor0
----
-1466
-1546
-1642

skipif mysql # not compatible
query I rowsort
SELECT ALL col2 * col1 + CAST ( 31 AS REAL ) AS col1 FROM tab2 AS cor0
----
1565
677
868

onlyif mysql # use DIV operator for integer division
query I rowsort label-2179
SELECT + + 9 DIV col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2179
SELECT + + 9 / col0 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + + col0 col1 FROM tab0 AS cor0
----
178
48
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-2181
SELECT ALL - col1 DIV - col1 FROM tab0 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2181
SELECT ALL - col1 / - col1 FROM tab0 cor0
----
1
1
1

query I rowsort
SELECT ALL - ( - col1 ) + 5 FROM tab2 AS cor0
----
22
36
64

query I rowsort
SELECT ALL + col1 * - col2 + col2 FROM tab1 AS cor0
----
-1152
-1350
-513

onlyif mysql # use DIV operator for integer division
query I rowsort label-2184
SELECT col2 + cor0.col0 DIV 46 AS col0 FROM tab2 AS cor0
----
27
27
39

skipif mysql # not compatible
query I rowsort label-2184
SELECT col2 + cor0.col0 / 46 AS col0 FROM tab2 AS cor0
----
27
27
39

query I rowsort
SELECT ALL - 65 + cor0.col2 * ( - 13 ) FROM tab2 AS cor0
----
-403
-416
-559

query I rowsort
SELECT DISTINCT 34 * - col1 * 0 FROM tab2 cor0
----
0

query I rowsort
SELECT 73 AS col2 FROM tab2 cor0
----
73
73
73

query I rowsort
SELECT ALL col1 + col2 * - col2 FROM tab2 cor0
----
-1427
-617
-698

query I rowsort
SELECT 32 * + col2 AS col0 FROM tab1 AS cor0
----
1728
1824
3072

query I rowsort
SELECT ALL - 1 AS col2 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT - col0 * + col1 AS col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT + cor0.col2 * tab1.col2 AS col0 FROM tab1, tab0, tab1 AS cor0
----
2916
3078
3249
5184
5472
9216

query I rowsort
SELECT + - col1 + - col1 FROM tab0 AS cor0
----
-172
-182
-194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 77 + - col0 col0 FROM tab2 AS cor0
----
-155
-156
-84

query I rowsort
SELECT - 31 * + col1 FROM tab2 AS cor0
----
-1829
-527
-961

query I rowsort
SELECT DISTINCT + - 48 FROM tab0, tab2 AS cor0
----
-48

query I rowsort
SELECT + + cor0.col0 AS col1 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT col2 * 48 AS col0 FROM tab2 AS cor0
----
1248
1296
1824

query I rowsort
SELECT 1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to da8a72a7967c0c73d91239275230aed9

onlyif mysql # use DIV operator for integer division
query I rowsort label-2200
SELECT DISTINCT 35 DIV tab1.col0 col1 FROM tab1
----
0
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2200
SELECT DISTINCT 35 / tab1.col0 col1 FROM tab1
----
0
11

query I rowsort
SELECT ( tab1.col1 * - tab1.col1 + 58 * tab1.col0 ) FROM tab1
----
-502
3612
4471

query I rowsort
SELECT + ( cor0.col2 ) * - col2 + col2 * + cor0.col0 FROM tab2 AS cor0
----
-540
1352
1558

query I rowsort
SELECT 52 * - ( col0 * 26 ) + col0 * + col0 AS col0 FROM tab1 cor0
----
-101760
-4047
-82432

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2204
SELECT ALL - + CAST( NULL AS SIGNED ) + + 78 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2204
SELECT ALL - + CAST ( NULL AS INTEGER ) + + 78 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col2 * col1 + col1 * - col2 FROM tab2 AS cor0
----
-1292
-1674
-3068

query I rowsort
SELECT + 48 - - col1 * col1 FROM tab1 cor0
----
148
217
724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2207
SELECT col2 + + CAST( - col0 AS SIGNED ) * col2 FROM tab2
----
-162
-2002
-2964

skipif mysql # not compatible
query I rowsort label-2207
SELECT col2 + + CAST ( - col0 AS INTEGER ) * col2 FROM tab2
----
-162
-2002
-2964

query I rowsort
SELECT DISTINCT col2 + ( col0 ) FROM tab2
----
104
117
34

query I rowsort
SELECT DISTINCT - tab0.col2 + - col1 FROM tab0
----
-119
-173
-98

query I rowsort
SELECT ALL - col2 + - col0 AS col1 FROM tab2
----
-104
-117
-34

query I rowsort
SELECT - ( col0 ) * - col0 + - ( cor0.col1 ) FROM tab1 AS cor0
----
-17
4086
6387

query I rowsort
SELECT DISTINCT - tab2.col1 + - col0 * col2 FROM tab2
----
-2087
-220
-3019

query I rowsort
SELECT - col1 * ( col2 ) AS col0 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT - 42 * col2 AS col0 FROM tab1
----
-2268
-2394
-4032

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col1 ) + - col2 * 12 * col0 col0 FROM tab1
----
-1970
-43786
-92173

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab2 cor0, tab0, tab1 cor1
----
972 values hashing to 0210050fb1701e2797a9b17e1ebac91e

query I rowsort
SELECT ALL + cor0.col2 + - col0 FROM tab1 AS cor0
----
-7
16
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 - + 11 * - col2 col1 FROM tab2 AS cor0
----
304
364
497

query I rowsort
SELECT ALL - - ( 80 ) + - cor0.col2 * col0 AS col1 FROM tab2 cor0
----
-109
-1948
-2922

query I rowsort
SELECT DISTINCT 92 FROM tab2, tab0 AS cor0
----
92

query I rowsort
SELECT ALL + ( - col1 ) AS col1 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT - + col1 * + col0 + col0 AS col2 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT DISTINCT + + col0 * col2 * cor0.col2 FROM tab2 AS cor0
----
114076
5103
52728

onlyif mysql # use DIV operator for integer division
query I rowsort label-2224
SELECT col0 DIV + col2 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2224
SELECT col0 / + col2 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT DISTINCT - cor0.col2 + + col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT + - col0 * + col2 - + col2 AS col1 FROM tab0 AS cor0
----
-36
-7380
-825

query I rowsort
SELECT ALL + col2 * col0 * - col1 - col2 AS col0 FROM tab2 AS cor0
----
-119678
-51072
-5886

query I rowsort
SELECT DISTINCT - cor0.col0 * col1 + - col1 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT - - col0 * - col0 - col0 AS col1 FROM tab1 AS cor0
----
-12
-4160
-6480

query I rowsort
SELECT ALL + + col0 * col0 * + col2 + cor0.col0 AS col1 FROM tab0 AS cor0
----
1260
19032
649611

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * cor0.col2 col2 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT ALL - col2 + + col2 FROM tab2 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + - col2 col2 FROM tab0 cor0
----
-119
-173
-98

query I rowsort
SELECT - + col1 * + col1 + - cor0.col1 + col2 FROM tab2 AS cor0
----
-268
-3514
-965

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 WHERE cor0.col0 = NULL OR + col2 + col0 + cor0.col2 * col1 NOT BETWEEN NULL AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * col0 col1 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - cor0.col1 + col0 * col1 FROM tab0 AS cor0
----
1978
3298
8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-2238
SELECT DISTINCT col2 * - col1 + - col0 - - col0 DIV tab0.col1 FROM tab0
----
-132
-2862
-7551

skipif mysql # not compatible
query I rowsort label-2238
SELECT DISTINCT col2 * - col1 + - col0 - - col0 / tab0.col1 FROM tab0
----
-132
-2862
-7551

query I rowsort
SELECT - col1 * + tab2.col1 - + col0 FROM tab2
----
-3559
-368
-968

query I rowsort
SELECT DISTINCT col2 * - tab2.col2 * col2 AS col1 FROM tab2
----
-17576
-19683
-54872

query I rowsort
SELECT ALL 37 * col0 + - col1 FROM tab1 AS cor0
----
2358
2947
85

query I rowsort
SELECT DISTINCT - - col1 - + cor0.col0 * cor0.col1 * - col2 AS col0 FROM tab0 AS cor0
----
3492
664209
68198

query I rowsort
SELECT DISTINCT + 22 * - col2 + col0 FROM tab1 AS cor0
----
-1185
-1190
-2032

query I rowsort
SELECT - col2 * + col2 + + col0 * + col1 + col0 AS col1 FROM tab1 AS cor0
----
-2545
-2835
-8096

query I rowsort
SELECT - + 92 AS col1 FROM tab0 AS cor0
----
-92
-92
-92

onlyif mysql # use DIV operator for integer division
query I rowsort label-2246
SELECT ALL - col2 * col2 DIV - col0 + col1 + - col1 FROM tab2 cor0
----
104
18
8

skipif mysql # not compatible
query I rowsort label-2246
SELECT ALL - col2 * col2 / - col0 + col1 + - col1 FROM tab2 cor0
----
104
18
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 28 col0 FROM tab0
----
-28

query I rowsort
SELECT - 98 * tab2.col0 FROM tab2, tab2 AS cor0
----
9 values hashing to fbf241e27e7143fb977649fe0a617f15

query I rowsort
SELECT + ( + 49 ) FROM tab2
----
49
49
49

query I rowsort
SELECT ALL 20 FROM tab0
----
20
20
20

query I rowsort
SELECT DISTINCT + 96 * + 57 FROM tab2
----
5472

query I rowsort
SELECT 45 + + tab0.col1 AS col2 FROM tab0
----
131
136
142

query I rowsort
SELECT - - 12 AS col1 FROM tab2 AS cor0
----
12
12
12

query I rowsort
SELECT + 8 FROM tab0 AS cor0
----
8
8
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * tab1.col0 + + col2 col0 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT DISTINCT tab0.col0 * col0 FROM tab0
----
1225
576
7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-2257
SELECT - col2 DIV - col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2257
SELECT - col2 / - col1 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2258
SELECT col0 + - tab0.col1 + + col1 * + col1 DIV + tab0.col1 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-2258
SELECT col0 + - tab0.col1 + + col1 * + col1 / + tab0.col1 FROM tab0
----
24
35
89

query I rowsort
SELECT - col0 * tab2.col2 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT col2 * - col2 + + col1 * + tab2.col2 AS col2 FROM tab2
----
-798
108
858

query I rowsort
SELECT + col1 + - col1 * - col1 AS col1 FROM tab2
----
306
3540
992

query I rowsort
SELECT DISTINCT tab2.col1 + col2 FROM tab2
----
55
58
85

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT col0 + - tab2.col0 AS col1 FROM tab2
----
0
0
0

query I rowsort
SELECT - col2 AS col1 FROM tab2 WHERE ( NULL ) IN ( col2 )
----

query I rowsort
SELECT ALL - col2 + - col0 FROM tab0
----
-171
-36
-57

query I rowsort
SELECT DISTINCT col1 - col2 * tab0.col2 FROM tab0
----
-1003
-6633
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2268
SELECT col1 DIV tab0.col2 col0 FROM tab0
----
1
2
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2268
SELECT col1 / tab0.col2 col0 FROM tab0
----
1
2
97

query I rowsort
SELECT DISTINCT - col1 + + tab2.col0 FROM tab2
----
-24
19
62

query I rowsort
SELECT - col1 FROM tab2 WHERE NOT - col1 IN ( - col2 * col0 )
----
-17
-31
-59

query I rowsort
SELECT col2 + col0 / col0 FROM tab2 WHERE NOT + col1 * col1 <= NULL
----

query I rowsort
SELECT ALL - col1 + + tab0.col0 FROM tab0
----
-2
-62
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-2273
SELECT DISTINCT + col1 + col2 DIV tab1.col1 AS col0 FROM tab1
----
15
20
28

skipif mysql # not compatible
query I rowsort label-2273
SELECT DISTINCT + col1 + col2 / tab1.col1 AS col0 FROM tab1
----
15
20
28

query I rowsort
SELECT + col0 * - tab1.col2 AS col1 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT + col0 * col0 + - tab0.col0 FROM tab0
----
1190
552
7832

query III rowsort
SELECT ALL * FROM tab1 WHERE NULL <= + col1 + + col0
----

query I rowsort
SELECT - col2 + + col2 FROM tab1
----
0
0
0

query III rowsort
SELECT * FROM tab1 WHERE NOT col0 NOT IN ( col1 * - col0 * col2 - col1 )
----

query I rowsort
SELECT DISTINCT + col0 FROM tab0 WHERE NOT ( + col1 * - col1 ) = ( col2 )
----
24
35
89

query I rowsort
SELECT ALL + col0 * + col1 + - col2 FROM tab1
----
24
583
944

query I rowsort
SELECT ALL - col0 + - col0 AS col1 FROM tab1
----
-128
-160
-6

query I rowsort
SELECT ALL + col1 * + col1 AS col0 FROM tab2 WHERE ( NULL ) <= - col0 / - col2 + - col0
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col2 col2 FROM tab1 AS cor0 CROSS JOIN tab2
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT - col1 + tab2.col0 * col2 FROM tab2
----
158
1969
2985

query I rowsort
SELECT ALL - col2 + + col2 + col1 * col1 AS col2 FROM tab2
----
289
3481
961

query I rowsort
SELECT + tab2.col0 + + col1 - col1 * - col1 FROM tab2
----
3618
385
999

query I rowsort
SELECT ALL col2 + + col1 + + col1 FROM tab2
----
144
72
89

query I rowsort
SELECT ALL + col0 * + col2 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT + cor0.col1 * - cor0.col1 - - col1 AS col1 FROM tab0 AS cor0
----
-7310
-8190
-9312

query I rowsort
SELECT + - cor0.col0 + + col2 + - cor0.col2 AS col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT + col2 + col2 FROM tab2
----
52
54
76

query I rowsort
SELECT col1 FROM tab0 WHERE NOT ( NULL ) <= NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col0 FROM tab0, tab1 cor0
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

query I rowsort
SELECT DISTINCT col0 * + col2 * - col2 AS col0 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT cor0.col0 + col0 + col2 AS col1 FROM tab1 AS cor0
----
185
256
60

query I rowsort
SELECT col0 * col0 AS col1 FROM tab0 cor0
----
1225
576
7921

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2297
SELECT - CAST( NULL AS SIGNED ) + - col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2297
SELECT - CAST ( NULL AS INTEGER ) + - col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col1 + + col1 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 38 + cor0.col1 * col0 FROM tab1 AS cor0
----
1078
116
678

query I rowsort
SELECT ALL cor0.col2 + col2 AS col0 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT DISTINCT - + 95 AS col0 FROM tab0 AS cor0
----
-95

query I rowsort
SELECT + col1 * 90 + col0 FROM tab1 AS cor0
----
1250
2343
964

query I rowsort
SELECT DISTINCT + ( + ( + col1 ) ) * col0 + 93 AS col1 FROM tab0 AS cor0
----
2157
3488
8192

query I rowsort
SELECT ALL + + col0 * + col1 + col0 AS col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT tab2.col2 + - col1 * + 64 AS col2 FROM tab2
----
-1050
-1957
-3750

query I rowsort
SELECT + - col0 * 77 AS col2 FROM tab1 AS cor0
----
-231
-4928
-6160

query I rowsort
SELECT - 60 FROM tab1, tab1 AS cor0
----
9 values hashing to 067a4b5daf8747042e3b07ca8459859f

query I rowsort
SELECT + - col1 * - col1 + - col1 AS col2 FROM tab2 AS cor0
----
272
3422
930

onlyif mysql # use DIV operator for integer division
query I rowsort label-2309
SELECT ALL col1 + tab2.col0 DIV col1 FROM tab2
----
21
31
60

skipif mysql # not compatible
query I rowsort label-2309
SELECT ALL col1 + tab2.col0 / col1 FROM tab2
----
21
31
60

query I rowsort
SELECT + col2 * - col2 AS col2 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-2312
SELECT 99 * - col2 + col1 + - 52 DIV + col1 FROM tab2
----
-2515
-2643
-3748

skipif mysql # not compatible
query I rowsort label-2312
SELECT 99 * - col2 + col1 + - 52 / + col1 FROM tab2
----
-2515
-2643
-3748

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - col0 col1 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT col1 * + col1 AS col0 FROM tab2
----
289
3481
961

query I rowsort
SELECT ALL - col2 * col1 * - cor0.col2 FROM tab0 AS cor0
----
611884
93654
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 + col0 col2 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT + + col1 * + ( 33 ) FROM tab1 AS cor0
----
330
429
858

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * 52 col0 FROM tab1 AS cor0
----
2808
2964
4992

query I rowsort
SELECT ALL - cor2.col0 FROM tab1, tab2 cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to adaea38eae032c1639715f21831dd376

onlyif mysql # use DIV operator for integer division
query I rowsort label-2320
SELECT DISTINCT - cor0.col2 DIV - col1 FROM tab2 AS cor0
----
0
2

skipif mysql # not compatible
query I rowsort label-2320
SELECT DISTINCT - cor0.col2 / - col1 FROM tab2 AS cor0
----
0
2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2321
SELECT + - col1 * + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2321
SELECT + - col1 * + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * 6 FROM tab2 AS cor0
----
-102
-186
-354

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2323
SELECT col1 / CAST( NULL AS SIGNED ) col2 FROM tab1
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2323
SELECT col1 / CAST ( NULL AS INTEGER ) col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + - col2 * ( col1 ) AS col1 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT - col1 * + col0 AS col2 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT - - col0 * cor0.col2 + - col2 * - col0 + + col1 * col0 * cor0.col1 FROM tab0 AS cor0
----
179088
329385
751605

onlyif mysql # use DIV operator for integer division
query I rowsort label-2327
SELECT ALL col0 DIV tab0.col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2327
SELECT ALL col0 / tab0.col1 FROM tab0
----
0
0
0

query I rowsort
SELECT col2 * + col2 * col2 + col2 FROM tab2
----
17602
19710
54910

query I rowsort
SELECT + - col0 * col1 + cor0.col1 AS col2 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT + + col2 * - col2 AS col1 FROM tab2 cor0
----
-1444
-676
-729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 81 col1 FROM tab2
----
-81
-81
-81

query I rowsort
SELECT + 46 * col0 FROM tab1
----
138
2944
3680

query I rowsort
SELECT - col0 * 43 AS col2 FROM tab1
----
-129
-2752
-3440

query I rowsort
SELECT - - col1 * - col0 * + col0 + + col2 FROM tab2 AS cor0
----
-106059
-1492
-358930

query I rowsort
SELECT DISTINCT + col2 * + 19 * col0 FROM tab2 AS cor0
----
3591
38532
57038

query I rowsort
SELECT 75 * col0 FROM tab2 cor0
----
525
5850
5925

query I rowsort
SELECT DISTINCT - - tab2.col1 AS col1 FROM tab1, tab0, tab0 AS cor0, tab2
----
17
31
59

query I rowsort
SELECT DISTINCT + 25 AS col1 FROM tab0 AS cor0
----
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col0 * col0 col2 FROM tab2
----
49
6084
6241

query I rowsort
SELECT 29 + - col1 AS col2 FROM tab0 cor0
----
-57
-62
-68

skipif mysql # not compatible
query I rowsort
SELECT cor0.col1 - CAST ( - cor0.col2 AS REAL ) AS col0 FROM tab1 AS cor0
----
109
67
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + - ( + 18 * - col2 ) col0 FROM tab0 AS cor0
----
1394
17
561

query I rowsort
SELECT - cor0.col0 - ( + col0 ) FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT col2 * + 38 AS col2 FROM tab0 AS cor0
----
1254
3116
38

query I rowsort
SELECT cor0.col0 + ( ( + col2 ) ) * col2 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT - col1 * 73 AS col0 FROM tab0 cor0
----
-6278
-6643
-7081

query I rowsort
SELECT - - cor0.col0 - ( col0 + + col0 ) * col1 FROM tab0 AS cor0
----
-16109
-4104
-6755

query I rowsort
SELECT + ( col1 * col1 + - col0 ) AS col1 FROM tab0
----
7372
8192
9374

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2349
SELECT - col1 + + CAST( col2 + cor0.col0 AS SIGNED ) FROM tab2 AS cor0
----
100
3
45

skipif mysql # not compatible
query I rowsort label-2349
SELECT - col1 + + CAST ( col2 + cor0.col0 AS INTEGER ) FROM tab2 AS cor0
----
100
3
45

query I rowsort
SELECT DISTINCT + 84 AS col2 FROM tab2
----
84

query I rowsort
SELECT ( col1 ) * + 38 + col1 FROM tab0
----
3354
3549
3783

onlyif mysql # use DIV operator for integer division
query I rowsort label-2352
SELECT ALL + col0 DIV col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2352
SELECT ALL + col0 / col1 FROM tab0
----
0
0
0

query I rowsort
SELECT - 21 + col2 * col1 AS col1 FROM tab2 AS cor0
----
1513
625
816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 78 * 81 col1 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 826fba532b25a906b0365395edf25f4a

query I rowsort
SELECT - - cor0.col0 * cor0.col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT + col2 + - 38 AS col2 FROM tab0 AS cor0
----
-37
-5
44

query I rowsort
SELECT + col2 * + 10 FROM tab1 AS cor0
----
540
570
960

onlyif mysql # use DIV operator for integer division
query I rowsort label-2358
SELECT + col0 * - col0 DIV + col0 AS col0 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-2358
SELECT + col0 * - col0 / + col0 AS col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT + col0 + + col0 * col2 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT col2 + 13 FROM tab2 AS cor0
----
39
40
51

query I rowsort
SELECT DISTINCT + - col0 * 25 + - cor0.col1 FROM tab0 AS cor0
----
-2316
-686
-972

query I rowsort
SELECT DISTINCT col2 * - tab1.col2 AS col1 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT ALL - + col1 * cor0.col0 + col2 AS col0 FROM tab1 cor0
----
-24
-583
-944

query I rowsort
SELECT - col0 * - ( col2 ) FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT 49 * col0 FROM tab1
----
147
3136
3920

query I rowsort
SELECT - + col0 * - ( + col2 ) AS col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - ( + ( - cor0.col0 ) ) + col0 * + ( col2 ) * 35 AS col1 FROM tab2 AS cor0
----
105149
6622
71058

query I rowsort
SELECT - - col1 + + cor0.col1 * + col0 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT - col1 + + 44 FROM tab2 AS cor0
----
-15
13
27

query I rowsort
SELECT 79 + - ( - col0 + 91 ) * - col1 AS col0 FROM tab1 AS cor0
----
222
2367
349

query I rowsort
SELECT col1 + col0 * + col2 * - col2 AS col0 FROM tab0 cor0
----
-26050
-598345
62

query I rowsort
SELECT + col2 * - 55 + col2 FROM tab2 AS cor0
----
-1404
-1458
-2052

onlyif mysql # use DIV operator for integer division
query I rowsort label-2373
SELECT ALL 98 * col1 + col0 DIV - 28 FROM tab2 AS cor0
----
1664
3038
5780

skipif mysql # not compatible
query I rowsort label-2373
SELECT ALL 98 * col1 + col0 / - 28 FROM tab2 AS cor0
----
1664
3038
5780

query I rowsort
SELECT - col2 * - 40 AS col0 FROM tab2 cor0
----
1040
1080
1520

query I rowsort
SELECT DISTINCT + col0 + - cor0.col1 * cor0.col1 FROM tab2 cor0
----
-210
-3403
-954

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2376
SELECT ALL + col0 * col1 * + col0 + CAST( col2 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
288
41017
83296

skipif mysql # not compatible
query I rowsort label-2376
SELECT ALL + col0 * col1 * + col0 + CAST ( col2 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
288
41017
83296

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - col1 col2 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 * + col0 col1 FROM tab0 AS cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor0.col0 + - col2 col1 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT - cor0.col1 + + cor0.col0 * - col2 AS col0 FROM tab0 cor0
----
-132
-7389
-878

onlyif mysql # use DIV operator for integer division
query I rowsort label-2381
SELECT DISTINCT - col2 DIV + col0 FROM tab2 AS cor0
----
-3
0

skipif mysql # not compatible
query I rowsort label-2381
SELECT DISTINCT - col2 / + col0 FROM tab2 AS cor0
----
-3
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 45 + - ( - col2 ) col0 FROM tab1
----
102
141
99

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1
----
972 values hashing to 92235dbc382d83baa93d6546ed489b0c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col2 + + 47 col0 FROM tab1 cor0
----
-115
-3601
-7633

query I rowsort
SELECT DISTINCT - col2 * - col2 + - col0 * + col0 AS col2 FROM tab2 AS cor0
----
-4797
-5408
680

query I rowsort
SELECT DISTINCT cor0.col2 - + col0 AS col0 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT ALL - ( - col0 ) * - col1 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-2388
SELECT col1 DIV cor0.col0 + - col2 FROM tab1 AS cor0
----
-46
-57
-96

skipif mysql # not compatible
query I rowsort label-2388
SELECT col1 / cor0.col0 + - col2 FROM tab1 AS cor0
----
-46
-57
-96

query I rowsort
SELECT cor0.col2 * col1 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT 62 - - col1 AS col0 FROM tab1 AS cor0
----
72
75
88

query I rowsort
SELECT ALL - 50 * + col2 + - cor0.col2 AS col0 FROM tab1 AS cor0
----
-2754
-2907
-4896

query I rowsort
SELECT ALL - col2 + col1 AS col1 FROM tab2 AS cor0
----
-21
33
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 * - col0 col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - col0 + col2 * cor0.col1 AS col0 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT DISTINCT - ( col1 ) - + col0 AS col0 FROM tab1 AS cor0
----
-29
-74
-93

onlyif mysql # use DIV operator for integer division
query I rowsort label-2396
SELECT col2 DIV col0 - + tab0.col0 FROM tab0
----
-23
-35
-89

skipif mysql # not compatible
query I rowsort label-2396
SELECT col2 / col0 - + tab0.col0 FROM tab0
----
-23
-35
-89

query I rowsort
SELECT DISTINCT col0 + - 86 * - col1 FROM tab0
----
7420
7915
8377

query I rowsort
SELECT DISTINCT + cor0.col0 + - col2 AS col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT 67 * + col2 - col1 AS col1 FROM tab0
----
-30
2125
5403

query I rowsort
SELECT + 11 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to f4d199584b44732f1a897e6691b4ea00

query I rowsort
SELECT - col0 * - cor0.col2 + col0 AS col0 FROM tab1 cor0
----
165
3712
7760

query I rowsort
SELECT ALL - + col1 * - cor0.col0 + cor0.col1 * col1 AS col1 FROM tab2 AS cor0
----
1178
1632
8083

query I rowsort
SELECT ALL - ( cor0.col2 ) * - col2 * 79 + col0 FROM tab1 AS cor0
----
230367
256735
728144

onlyif mysql # use DIV operator for integer division
query I rowsort label-2404
SELECT DISTINCT - col0 * col0 + + 53 DIV + 66 + cor0.col2 FROM tab2 cor0
----
-22
-6058
-6203

skipif mysql # not compatible
query I rowsort label-2404
SELECT DISTINCT - col0 * col0 + + 53 / + 66 + cor0.col2 FROM tab2 cor0
----
-22
-6058
-6203

query I rowsort
SELECT ALL - 75 + col0 FROM tab2 AS cor0
----
-68
3
4

query I rowsort
SELECT - col1 + col1 + - ( + col1 ) FROM tab1
----
-10
-13
-26

query I rowsort
SELECT + col0 + - tab0.col2 + 34 FROM tab0
----
25
41
68

query I rowsort
SELECT ALL cor1.col1 * - 40 + 22 AS col0 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 67101688d191cd8c73f659881c602620

onlyif mysql # use DIV operator for integer division
query I rowsort label-2409
SELECT + col0 + ( col1 + col0 ) DIV 7 AS col1 FROM tab0
----
114
39
53

skipif mysql # not compatible
query I rowsort label-2409
SELECT + col0 + ( col1 + col0 ) / 7 AS col1 FROM tab0
----
114
39
53

query I rowsort
SELECT ALL col2 * 23 AS col2 FROM tab1
----
1242
1311
2208

query I rowsort
SELECT ALL + col1 + - col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT ALL - 39 FROM tab2, tab1 AS cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to fe3460a5258986a2d83e1ea75c1e275e

query I rowsort
SELECT ALL + col0 + col2 * + tab0.col0 FROM tab0
----
70
7387
816

query I rowsort
SELECT + 96 * col2 AS col0 FROM tab2
----
2496
2592
3648

query I rowsort
SELECT DISTINCT - col1 + + col1 * tab0.col0 + - ( + 47 ) FROM tab0
----
1931
3251
7961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 9 * + cor0.col2 + col0 * + ( + col1 ) col0 FROM tab1 AS cor0
----
1153
1904
564

query I rowsort
SELECT ALL - - col1 * + 87 - + cor0.col2 FROM tab1 AS cor0
----
1035
2208
813

query I rowsort
SELECT ALL + + 76 * cor0.col0 AS col1 FROM tab0 cor0
----
1824
2660
6764

query I rowsort
SELECT DISTINCT + col1 + col0 * col0 FROM tab0 AS cor0
----
1322
662
8012

query I rowsort
SELECT DISTINCT - 48 * 88 AS col2 FROM tab1 AS cor0
----
-4224

query I rowsort
SELECT ALL 60 FROM tab2, tab2 AS cor0, tab2 AS cor1, tab2 cor2
----
81 values hashing to 1ef27a1d2784b3ab642571630db70349

query I rowsort
SELECT DISTINCT + col1 - col2 AS col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT + col1 * + 0 - col1 AS col0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL col0 + - cor0.col1 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT - + col1 + - 63 * col2 AS col0 FROM tab2 AS cor0
----
-1697
-1732
-2411

onlyif mysql # use DIV operator for integer division
query I rowsort label-2426
SELECT ALL + + col2 * col0 DIV - col0 + - cor0.col1 AS col2 FROM tab0 AS cor0
----
-119
-173
-98

skipif mysql # not compatible
query I rowsort label-2426
SELECT ALL + + col2 * col0 / - col0 + - cor0.col1 AS col2 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT - col2 * 57 AS col2 FROM tab2
----
-1482
-1539
-2166

onlyif mysql # use DIV operator for integer division
query I rowsort label-2428
SELECT + cor0.col1 * 31 * 37 + cor0.col1 DIV - col1 - col0 AS col1 FROM tab0 AS cor0
----
104287
111223
98617

skipif mysql # not compatible
query I rowsort label-2428
SELECT + cor0.col1 * 31 * 37 + cor0.col1 / - col1 - col0 AS col1 FROM tab0 AS cor0
----
104287
111223
98617

query I rowsort
SELECT - col0 + 92 FROM tab1 AS cor0
----
12
28
89

query I rowsort
SELECT col1 + cor0.col2 * 72 AS col0 FROM tab0 AS cor0
----
169
2462
5995

query I rowsort
SELECT DISTINCT col0 * ( col2 * cor0.col0 ) + col2 - 51 FROM tab2 AS cor0
----
1299
158159
237145

query I rowsort
SELECT ALL + col1 + 86 FROM tab2 AS cor0
----
103
117
145

query I rowsort
SELECT DISTINCT + col2 * + ( cor0.col1 ) + - cor0.col0 AS col1 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT - cor0.col0 * 68 FROM tab2 AS cor0
----
-476
-5304
-5372

query I rowsort
SELECT - 97 FROM tab0 AS cor0
----
-97
-97
-97

query I rowsort
SELECT - - ( ( col1 ) ) AS col1 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT - col2 * - col1 + + col0 FROM tab2
----
1612
725
844

query I rowsort
SELECT DISTINCT + 49 FROM tab0 AS cor0
----
49

query I rowsort
SELECT + 70 * col0 AS col2 FROM tab1 AS cor0
----
210
4480
5600

query I rowsort
SELECT DISTINCT + + 27 * col0 + - col0 FROM tab1 AS cor0
----
1664
2080
78

query I rowsort
SELECT col0 * - cor0.col2 AS col0 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT cor0.col0 + col1 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT DISTINCT - col1 * - col0 FROM tab1 WHERE NOT ( col1 ) NOT BETWEEN + col1 AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2444
SELECT + tab0.col0 + - col0 DIV col0 AS col0 FROM tab0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-2444
SELECT + tab0.col0 + - col0 / col0 AS col0 FROM tab0
----
23
34
88

query I rowsort
SELECT DISTINCT - col1 FROM tab1 WHERE col1 IN ( col2 )
----

query I rowsort
SELECT ALL - col2 * - col1 + - col0 * + col0 AS col0 FROM tab0
----
-1128
-459
2262

onlyif mysql # use DIV operator for integer division
query I rowsort label-2447
SELECT col2 * + col2 DIV - 1 AS col2 FROM tab2
----
-1444
-676
-729

skipif mysql # not compatible
query I rowsort label-2447
SELECT col2 * + col2 / - 1 AS col2 FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT + - col2 * col2 + col1 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT - col2 * col1 - - col1 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT ALL 14 + col1 AS col0 FROM tab0
----
100
105
111

query I rowsort
SELECT ALL 29 + col0 FROM tab1
----
109
32
93

query I rowsort
SELECT 93 - - col0 AS col2 FROM tab0 AS cor0
----
117
128
182

onlyif mysql # use DIV operator for integer division
query I rowsort label-2453
SELECT DISTINCT - 33 DIV cor0.col1 + col2 FROM tab2 cor0
----
26
37

skipif mysql # not compatible
query I rowsort label-2453
SELECT DISTINCT - 33 / cor0.col1 + col2 FROM tab2 cor0
----
26
37

onlyif mysql # use DIV operator for integer division
query I rowsort label-2454
SELECT col0 + col2 DIV - 74 + + tab0.col2 col1 FROM tab0
----
170
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2454
SELECT col0 + col2 / - 74 + + tab0.col2 col1 FROM tab0
----
170
36
57

query I rowsort
SELECT 91 * col2 + - 16 + - tab2.col0 AS col2 FROM tab2
----
2272
2434
3363

onlyif mysql # use DIV operator for integer division
query I rowsort label-2456
SELECT 69 + col0 DIV + col0 FROM tab0
----
70
70
70

skipif mysql # not compatible
query I rowsort label-2456
SELECT 69 + col0 / + col0 FROM tab0
----
70
70
70

query I rowsort
SELECT col1 * ( - 21 ) - + col0 * + 41 * - cor0.col2 AS col2 FROM tab1 AS cor0
----
149358
314607
6096

onlyif mysql # use DIV operator for integer division
query I rowsort label-2458
SELECT col2 * 4 DIV - 73 AS col2 FROM tab0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-2458
SELECT col2 * 4 / - 73 AS col2 FROM tab0
----
-1
-4
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2459
SELECT DISTINCT - col0 * + CAST( NULL AS SIGNED ) AS col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-2459
SELECT DISTINCT - col0 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab1
----
NULL

query I rowsort
SELECT col1 * tab1.col0 * tab1.col2 FROM tab1
----
36480
4212
99840

onlyif mysql # use DIV operator for integer division
query I rowsort label-2461
SELECT col2 DIV col2 - + cor0.col1 DIV col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2461
SELECT col2 / col2 - + cor0.col1 / col1 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + 0 col1 FROM tab2 AS cor0
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-2463
SELECT col1 * ( + col0 ) + col1 * 26 - - col1 DIV - col1 AS col2 FROM tab1 AS cor0
----
1377
753
899

skipif mysql # not compatible
query I rowsort label-2463
SELECT col1 * ( + col0 ) + col1 * 26 - - col1 / - col1 AS col2 FROM tab1 AS cor0
----
1377
753
899

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2464
SELECT ALL CAST( NULL AS SIGNED ) AS col0 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-2464
SELECT ALL CAST ( NULL AS INTEGER ) AS col0 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 0 * col1 col2 FROM tab2
----
0

query I rowsort
SELECT 84 AS col1 FROM tab0, tab1 cor0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

query I rowsort
SELECT - 12 * - 49 FROM tab1 AS cor0
----
588
588
588

query I rowsort
SELECT + ( - col2 ) AS col2 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT ALL 81 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 7a8ea30c6803aeddc5fca5b5821d8267

query I rowsort
SELECT 47 AS col2 FROM tab1
----
47
47
47

query I rowsort
SELECT ALL col1 * tab0.col2 AS col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT ( col1 ) * 8 * col0 AS col2 FROM tab0 AS cor0
----
16512
27160
64792

query I rowsort
SELECT - + col2 + - col0 * 98 AS col0 FROM tab1 AS cor0
----
-348
-6329
-7936

query I rowsort
SELECT 43 * col2 FROM tab1 AS cor0
----
2322
2451
4128

query I rowsort
SELECT - col2 * col1 * + col0 AS col0 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT + 86 * + col1 * - col1 FROM tab0 AS cor0
----
-636056
-712166
-809174

query I rowsort
SELECT DISTINCT - 88 * 48 - col0 FROM tab1 cor0
----
-4227
-4288
-4304

query I rowsort
SELECT DISTINCT + 22 FROM tab0, tab1 AS cor0
----
22

query I rowsort
SELECT + cor0.col1 + + 10 FROM tab1 AS cor0
----
20
23
36

query I rowsort
SELECT ALL 44 * - col1 + col0 * col2 * col2 AS col2 FROM tab0 AS cor0
----
-4233
22352
594432

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 68 col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

onlyif mysql # use DIV operator for integer division
query I rowsort label-2482
SELECT ALL + col1 + col0 DIV col1 + col2 AS col0 FROM tab0 AS cor0
----
119
173
98

skipif mysql # not compatible
query I rowsort label-2482
SELECT ALL + col1 + col0 / col1 + col2 AS col0 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT - col0 * + 1 FROM tab2
----
-7
-78
-79

query I rowsort
SELECT ALL - 64 FROM tab2
----
-64
-64
-64

query I rowsort
SELECT + col0 + col1 * col0 AS col0 FROM tab1
----
1120
704
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2486
SELECT - CAST( NULL AS SIGNED ) * tab0.col0 + + tab0.col2 * ( col1 ) AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2486
SELECT - CAST ( NULL AS INTEGER ) * tab0.col0 + + tab0.col2 * ( col1 ) AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 22 * ( - col0 ) * 44 AS col0 FROM tab2
----
6776
75504
76472

query I rowsort
SELECT - 7 * cor0.col0 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 7c704b14fa994e69c045264655a6b741

query I rowsort
SELECT 99 AS col0 FROM tab2 AS cor0
----
99
99
99

query I rowsort
SELECT DISTINCT ( 32 ) AS col0 FROM tab0 AS cor0
----
32

query I rowsort
SELECT DISTINCT 99 * cor0.col2 + col2 + + ( 43 ) * - col0 FROM tab2 AS cor0
----
-754
2399
403

query I rowsort
SELECT DISTINCT - cor1.col1 + + ( + 18 ) AS col1 FROM tab2, tab0 cor0, tab2 AS cor1
----
-13
-41
1

query I rowsort
SELECT ALL cor1.col0 * 50 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 480211018bc0256494927bdfd67e1c61

query I rowsort
SELECT ALL + 70 AS col0 FROM tab2 AS cor0
----
70
70
70

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT + - ( + cor0.col0 ) * + col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT 10 + col1 * col2 FROM tab0
----
107
2848
7472

query I rowsort
SELECT - 17 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 28cd5b4c959cb41fbc56389ab43d167e

query I rowsort
SELECT DISTINCT + tab2.col1 * + col1 FROM tab2
----
289
3481
961

query I rowsort
SELECT - col2 * col1 + col1 AS col0 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT + ( col2 ) * - 74 AS col2 FROM tab0
----
-2442
-6068
-74

onlyif mysql # use DIV operator for integer division
query I rowsort label-2502
SELECT 98 + tab1.col0 * 95 DIV - tab1.col1 + col0 AS col0 FROM tab1
----
-406
-446
91

skipif mysql # not compatible
query I rowsort label-2502
SELECT 98 + tab1.col0 * 95 / - tab1.col1 + col0 AS col0 FROM tab1
----
-406
-446
91

query I rowsort
SELECT col2 + + col0 * 70 + + col1 AS col2 FROM tab1
----
290
4547
5709

onlyif mysql # use DIV operator for integer division
query I rowsort label-2504
SELECT - col0 DIV col0 + + 54 AS col2 FROM tab2 cor0
----
53
53
53

skipif mysql # not compatible
query I rowsort label-2504
SELECT - col0 / col0 + + 54 AS col2 FROM tab2 cor0
----
53
53
53

query I rowsort
SELECT ALL + col2 * + ( ( - col0 ) ) * + 98 FROM tab1 AS cor0
----
-15876
-357504
-752640

query I rowsort
SELECT DISTINCT + col0 + 59 FROM tab1 AS cor0
----
123
139
62

query I rowsort
SELECT ALL + col0 * 56 FROM tab2 AS cor0
----
392
4368
4424

query I rowsort
SELECT - - col0 * + cor0.col1 + - col0 AS col2 FROM tab2 cor0
----
1264
210
4524

query I rowsort
SELECT ALL - cor0.col2 * ( - cor0.col0 ) * + col0 FROM tab1 AS cor0
----
233472
486
614400

query I rowsort
SELECT ALL - col0 - - 28 * - cor0.col1 FROM tab1 AS cor0
----
-344
-444
-731

query I rowsort
SELECT cor0.col0 * col1 + - ( - col0 ) FROM tab2 cor0
----
1422
224
4680

query I rowsort
SELECT DISTINCT - + col1 + + ( - col1 ) AS col2 FROM tab1 cor0
----
-20
-26
-52

query I rowsort
SELECT - - col1 * - col2 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT cor0.col0 * + col0 + 99 + - col1 * + ( - col0 ) FROM tab1 AS cor0
----
186
4835
7539

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * cor0.col0 col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT + 89 AS col1 FROM tab2, tab2 cor0
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT cor0.col1 - - 38 FROM tab1 AS cor0
----
48
51
64

query I rowsort
SELECT DISTINCT - col0 + + col2 * - col0 AS col0 FROM tab2 AS cor0
----
-196
-2106
-3081

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2519
SELECT DISTINCT + + col2 + CAST( + 14 AS SIGNED ) * - col1 FROM tab1 AS cor0
----
-310
-83
-86

skipif mysql # not compatible
query I rowsort label-2519
SELECT DISTINCT + + col2 + CAST ( + 14 AS INTEGER ) * - col1 FROM tab1 AS cor0
----
-310
-83
-86

query I rowsort
SELECT ALL + 68 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

query I rowsort
SELECT DISTINCT - col2 * - 5 + 8 AS col0 FROM tab2
----
138
143
198

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2522
SELECT DISTINCT + - col0 * - CAST( col0 * + col1 + - col0 AS SIGNED ) FROM tab0 cor0
----
117600
48960
712890

skipif mysql # not compatible
query I rowsort label-2522
SELECT DISTINCT + - col0 * - CAST ( col0 * + col1 + - col0 AS INTEGER ) FROM tab0 cor0
----
117600
48960
712890

query I rowsort
SELECT col0 - col0 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT 58 AS col2 FROM tab0, tab0 AS cor0, tab1 AS cor1, tab2, tab0 AS cor2
----
243 values hashing to 35fbb9c8a846114caca5e1135cf8703c

onlyif mysql # use DIV operator for integer division
query I rowsort label-2525
SELECT ALL + col0 DIV col2 FROM tab1 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-2525
SELECT ALL + col0 / col2 FROM tab1 cor0
----
0
0
1

query I rowsort
SELECT DISTINCT + ( + 93 ) AS col1 FROM tab2, tab1 AS cor0
----
93

query I rowsort
SELECT ALL - + col1 * col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT 4 + - ( col2 * + cor0.col2 ) FROM tab0 cor0
----
-1085
-6720
3

query I rowsort
SELECT - cor0.col0 - + col2 * + col2 FROM tab1 AS cor0
----
-2919
-3313
-9296

onlyif mysql # use DIV operator for integer division
query I rowsort label-2530
SELECT + CAST( + cor0.col1 AS SIGNED ) * col0 + ( 10 ) DIV - col0 + + 67 AS col1 FROM tab1 AS cor0
----
1107
142
707

skipif mysql # not compatible
query I rowsort label-2530
SELECT + CAST ( + cor0.col1 AS INTEGER ) * col0 + ( 10 ) / - col0 + + 67 AS col1 FROM tab1 AS cor0
----
1107
142
707

query I rowsort
SELECT DISTINCT 79 * cor0.col2 FROM tab1 cor0
----
4266
4503
7584

query I rowsort
SELECT DISTINCT + - col2 + + cor0.col2 AS col2 FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2533
SELECT DISTINCT - + col1 DIV - col0 FROM tab2 AS cor0
----
0
4

skipif mysql # not compatible
query I rowsort label-2533
SELECT DISTINCT - + col1 / - col0 FROM tab2 AS cor0
----
0
4

query I rowsort
SELECT ( col1 ) * - col0 + + col2 AS col1 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT - 14 * + col2 AS col1 FROM tab2 cor0
----
-364
-378
-532

query I rowsort
SELECT DISTINCT ( col0 ) AS col1 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT DISTINCT + col2 * col0 + tab0.col0 * - col1 FROM tab0
----
-1272
-3360
-801

query I rowsort
SELECT DISTINCT + col0 + - 14 FROM tab0
----
10
21
75

query I rowsort
SELECT col1 * + 98 FROM tab1
----
1274
2548
980

query I rowsort
SELECT ALL col2 + ( 5 ) FROM tab1
----
101
59
62

query I rowsort
SELECT + - col0 + - 28 AS col1 FROM tab0 cor0
----
-117
-52
-63

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2542
SELECT col2 * + CAST( 91 AS SIGNED ) * - col0 AS col2 FROM tab1
----
-14742
-331968
-698880

skipif mysql # not compatible
query I rowsort label-2542
SELECT col2 * + CAST ( 91 AS INTEGER ) * - col0 AS col2 FROM tab1
----
-14742
-331968
-698880

query I rowsort
SELECT DISTINCT - tab0.col0 + ( + col2 * col2 ) AS col2 FROM tab0
----
-34
1065
6635

query I rowsort
SELECT DISTINCT + + 52 + col1 FROM tab0 AS cor0
----
138
143
149

query I rowsort
SELECT - - 57 FROM tab0 AS cor0
----
57
57
57

query I rowsort
SELECT ALL + - cor0.col2 + col2 FROM tab0 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2547
SELECT DISTINCT - 82 DIV col2 AS col1 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-2547
SELECT DISTINCT - 82 / col2 AS col1 FROM tab1 AS cor0
----
-1
0

query I rowsort
SELECT DISTINCT + - ( + col2 ) + - col1 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT ALL + - col0 + - col1 * ( + 78 ) AS col0 FROM tab1 cor0
----
-1094
-2031
-844

query I rowsort
SELECT ALL - col0 * + cor0.col1 + - ( - col1 ) FROM tab2 cor0
----
-1326
-186
-4543

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 3 + + col2 col1 FROM tab0 AS cor0
----
-2
30
79

query I rowsort
SELECT ALL - col1 + cor0.col0 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT ALL + ( col1 ) + + col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT + - col2 * + col0 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT - 86 + - col0 FROM tab0 AS cor0
----
-110
-121
-175

query I rowsort
SELECT DISTINCT - + col2 + col1 * - col1 AS col0 FROM tab2 AS cor0
----
-327
-3507
-988

onlyif mysql # use DIV operator for integer division
query I rowsort label-2557
SELECT ALL + + 50 DIV col1 - 93 AS col1 FROM tab1 AS cor0
----
-88
-90
-92

skipif mysql # not compatible
query I rowsort label-2557
SELECT ALL + + 50 / col1 - 93 AS col1 FROM tab1 AS cor0
----
-88
-90
-92

query I rowsort
SELECT ALL - - ( + col1 ) + 41 AS col2 FROM tab2 AS cor0
----
100
58
72

query I rowsort
SELECT ALL + 97 + - col2 - - col2 AS col1 FROM tab0 cor0
----
97
97
97

query I rowsort
SELECT 55 FROM tab0, tab2 cor0
----
9 values hashing to 1626bd3008abd9f18cc88cdecf7b64d0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2561
SELECT + col0 DIV - 95 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-2561
SELECT + col0 / - 95 col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - + 75 FROM tab1 AS cor0
----
-75
-75
-75

query I rowsort
SELECT DISTINCT + ( 95 ) FROM tab1, tab0 AS cor0, tab0 AS cor1
----
95

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2564
SELECT DISTINCT + CAST( NULL AS SIGNED ) + - 29 AS col1 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-2564
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + - 29 AS col1 FROM tab0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2565
SELECT ALL + CAST( col0 AS SIGNED ) + col0 AS col2 FROM tab2
----
14
156
158

skipif mysql # not compatible
query I rowsort label-2565
SELECT ALL + CAST ( col0 AS INTEGER ) + col0 AS col2 FROM tab2
----
14
156
158

query I rowsort
SELECT ALL tab2.col1 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT ALL col1 * col0 + col0 AS col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT ALL + ( + tab1.col2 + - tab1.col2 ) * ( 33 ) AS col2 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2569
SELECT ALL 57 * col0 DIV + col1 AS col2 FROM tab2
----
12
264
75

skipif mysql # not compatible
query I rowsort label-2569
SELECT ALL 57 * col0 / + col1 AS col2 FROM tab2
----
12
264
75

query I rowsort
SELECT 49 AS col0 FROM tab2 cor0
----
49
49
49

query I rowsort
SELECT + col0 * - col1 + 86 * + 28 * - cor0.col2 AS col0 FROM tab0 AS cor0
----
-205555
-5803
-81528

onlyif mysql # use DIV operator for integer division
query I rowsort label-2572
SELECT ( + col2 ) DIV + col0 - col2 FROM tab2 cor0
----
-24
-26
-38

skipif mysql # not compatible
query I rowsort label-2572
SELECT ( + col2 ) / + col0 - col2 FROM tab2 cor0
----
-24
-26
-38

query I rowsort
SELECT col2 - col2 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + - col2 + col2 * col2 AS col2 FROM tab1 AS cor0
----
2862
3192
9120

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2575
SELECT DISTINCT CAST( NULL AS SIGNED ) col2 FROM tab1, tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2575
SELECT DISTINCT CAST ( NULL AS INTEGER ) col2 FROM tab1, tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + col2 + + ( col0 ) * - cor0.col2 FROM tab1 cor0
----
-108
-3591
-7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-2577
SELECT - + col1 DIV - 5 + col2 FROM tab0 AS cor0
----
100
20
50

skipif mysql # not compatible
query I rowsort label-2577
SELECT - + col1 / - 5 + col2 FROM tab0 AS cor0
----
100
20
50

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2578
SELECT DISTINCT + - col1 * CAST( NULL AS SIGNED ) + + 22 * + col0 AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2578
SELECT DISTINCT + - col1 * CAST ( NULL AS INTEGER ) + + 22 * + col0 AS col2 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + + 33 * col0 col1 FROM tab1 AS cor0
----
2055
2544
45

query I rowsort
SELECT col2 + 74 AS col1 FROM tab1 AS cor0
----
128
131
170

query I rowsort
SELECT col2 * col1 + col0 FROM tab0 cor0
----
132
2862
7551

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2582
SELECT DISTINCT - col0 + CAST( col1 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-54
-67
23

skipif mysql # not compatible
query I rowsort label-2582
SELECT DISTINCT - col0 + CAST ( col1 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT cor1.col1 + 26 AS col0 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
36
39
52

query I rowsort
SELECT + 96 * - col0 AS col0 FROM tab1 AS cor0
----
-288
-6144
-7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2585
SELECT CAST( + col0 AS SIGNED ) * col0 AS col2 FROM tab2 AS cor0
----
49
6084
6241

skipif mysql # not compatible
query I rowsort label-2585
SELECT CAST ( + col0 AS INTEGER ) * col0 AS col2 FROM tab2 AS cor0
----
49
6084
6241

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0, tab0 AS cor1, tab1, tab2 AS cor2
----
3645 values hashing to df00d19f178a708f636b036dcb6c6f87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 66 col0 FROM tab2 AS cor0
----
66
66
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-2588
SELECT - col2 DIV 67 col1 FROM tab0 AS cor0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2588
SELECT - col2 / 67 col1 FROM tab0 AS cor0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - col1 - tab0.col2 col2 FROM tab0
----
-2871
-7544
-98

query I rowsort
SELECT ALL - - col0 * - ( col0 ) FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT col0 * + col1 AS col2 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT ALL ( + col1 ) * - col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT - + cor0.col1 + col2 * - col1 * - col2 AS col1 FROM tab2 AS cor0
----
22568
24531
39825

query I rowsort
SELECT col0 * - 26 AS col1 FROM tab0 cor0
----
-2314
-624
-910

onlyif mysql # use DIV operator for integer division
query I rowsort label-2595
SELECT ALL 26 + + col1 DIV - col2 AS col0 FROM tab0 AS cor0
----
-71
24
25

skipif mysql # not compatible
query I rowsort label-2595
SELECT ALL 26 + + col1 / - col2 AS col0 FROM tab0 AS cor0
----
-71
24
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + 20 ) * - col0 col1 FROM tab1 AS cor0
----
1280
1600
60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2597
SELECT - - CAST( 24 AS SIGNED ) + col2 AS col2 FROM tab0 AS cor0
----
106
25
57

skipif mysql # not compatible
query I rowsort label-2597
SELECT - - CAST ( 24 AS INTEGER ) + col2 AS col2 FROM tab0 AS cor0
----
106
25
57

query I rowsort
SELECT - + ( 8 ) FROM tab1 AS cor0
----
-8
-8
-8

onlyif mysql # use DIV operator for integer division
query I rowsort label-2599
SELECT - - col0 DIV + col1 AS col1 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-2599
SELECT - - col0 / + col1 AS col1 FROM tab2 AS cor0
----
0
1
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-2600
SELECT DISTINCT col0 + + col0 DIV col2 + 52 FROM tab1 AS cor0
----
117
132
55

skipif mysql # not compatible
query I rowsort label-2600
SELECT DISTINCT col0 + + col0 / col2 + 52 FROM tab1 AS cor0
----
117
132
55

query I rowsort
SELECT + 75 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to e61b59795204c348103a58c0a8e4ce16

query I rowsort
SELECT DISTINCT + 84 FROM tab1 AS cor0
----
84

query I rowsort
SELECT ALL + col1 * + col1 + col2 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT ( - ( col1 ) ) FROM tab1
----
-10
-13
-26

query I rowsort
SELECT DISTINCT - + 90 FROM tab0, tab0 cor0, tab1, tab2 AS cor1
----
-90

query I rowsort
SELECT 30 FROM tab1, tab0 cor0, tab1 AS cor1
----
27 values hashing to 6c98840ed134c765d56389f4150075f0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2607
SELECT cor0.col1 + CAST( NULL AS SIGNED ) AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2607
SELECT cor0.col1 + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 * cor0.col2 + col2 AS col2 FROM tab0 cor0
----
-1056
-6642
0

query I rowsort
SELECT DISTINCT - - 58 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
58

query I rowsort
SELECT - ( + col0 ) * col0 AS col1 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT col0 * + col2 * tab2.col0 + col2 * col1 + ( + col2 ) FROM tab2
----
159744
2187
237842

query I rowsort
SELECT ALL - col2 * - col2 * - col0 AS col1 FROM tab0
----
-26136
-35
-598436

query I rowsort
SELECT ALL col1 + col1 * 63 * + col2 FROM tab0
----
178880
470197
6208

query I rowsort
SELECT + cor0.col2 + 64 FROM tab1, tab0 cor0
----
9 values hashing to 9eead868a8ce3e9ae24bbd63da905974

query I rowsort
SELECT - col0 * col2 - + col1 FROM tab0 cor0
----
-132
-7389
-878

query I rowsort
SELECT DISTINCT + - 88 + col2 * + col0 FROM tab2 cor0
----
101
1940
2914

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 94 * - col1 col0 FROM tab0 AS cor0
----
-8084
-8554
-9118

query I rowsort
SELECT + 35 AS col0 FROM tab1, tab2 AS cor0 CROSS JOIN tab1 cor1
----
27 values hashing to 0d13dfd4c4a9d51ace3582c31cadcdbc

query I rowsort
SELECT col0 * - tab0.col0 AS col0 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT - col2 + - col0 * - 2 AS col2 FROM tab0
----
15
69
96

query I rowsort
SELECT DISTINCT - tab1.col0 + tab1.col0 FROM tab1
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2622
SELECT tab0.col0 + + col0 DIV + ( + col2 ) FROM tab0
----
24
70
90

skipif mysql # not compatible
query I rowsort label-2622
SELECT tab0.col0 + + col0 / + ( + col2 ) FROM tab0
----
24
70
90

query I rowsort
SELECT - 33 + + col0 * 48 AS col0 FROM tab2
----
303
3711
3759

query I rowsort
SELECT DISTINCT 82 + - col0 AS col1 FROM tab1
----
18
2
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-2625
SELECT - ( col2 ) DIV 47 - col2 AS col1 FROM tab1
----
-55
-58
-98

skipif mysql # not compatible
query I rowsort label-2625
SELECT - ( col2 ) / 47 - col2 AS col1 FROM tab1
----
-55
-58
-98

query I rowsort
SELECT DISTINCT cor0.col2 + col1 AS col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT + col0 + + col0 AS col1 FROM tab2
----
14
156
158

query I rowsort
SELECT ALL - col0 + + col1 AS col2 FROM tab2
----
-19
-62
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-2629
SELECT 57 DIV col1 + tab1.col1 FROM tab1
----
15
17
28

skipif mysql # not compatible
query I rowsort label-2629
SELECT 57 / col1 + tab1.col1 FROM tab1
----
15
17
28

query I rowsort
SELECT ALL - col2 * ( col1 ) FROM tab1
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-2631
SELECT ALL col0 DIV - col0 + + col2 + col2 * col0 FROM tab0 AS cor0
----
35
7379
824

skipif mysql # not compatible
query I rowsort label-2631
SELECT ALL col0 / - col0 + + col2 + col2 * col0 FROM tab0 AS cor0
----
35
7379
824

query I rowsort
SELECT DISTINCT col2 - cor0.col1 AS col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT - 86 * - col2 FROM tab2 AS cor0
----
2236
2322
3268

query I rowsort
SELECT ALL + ( cor0.col1 ) FROM tab1 AS cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + + cor0.col1 col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + + ( col0 ) * col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT cor0.col2 * 83 * + col0 + - cor0.col2 FROM tab2 AS cor0
----
15660
168298
249128

query I rowsort
SELECT - tab1.col2 - 68 AS col1 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to d5e4bb01666464735d90928ac4d5d95b

query I rowsort
SELECT ALL col2 - 4 AS col0 FROM tab1
----
50
53
92

query I rowsort
SELECT ALL + col1 * - col2 - - col1 * ( col2 ) * col0 FROM tab2
----
118118
5022
50388

query I rowsort
SELECT ALL - - 80 + + col0 FROM tab0 cor0
----
104
115
169

query I rowsort
SELECT cor0.col2 * - 38 + + col0 FROM tab0 AS cor0
----
-1230
-3
-3027

query I rowsort
SELECT DISTINCT - - col2 - - cor0.col1 AS col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT + + ( + 98 ) * cor0.col2 FROM tab0 AS cor0
----
3234
8036
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2645
SELECT ALL - CAST( NULL AS DECIMAL ) * 59 * col2 AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2645
SELECT ALL - CAST ( NULL AS REAL ) * 59 * col2 AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT 22 + + col1 * col2 * + 84 AS col1 FROM tab0
----
238414
626830
8170

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2647
SELECT DISTINCT CAST( NULL AS SIGNED ) * 10 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-2647
SELECT DISTINCT CAST ( NULL AS INTEGER ) * 10 FROM tab0
----
NULL

query I rowsort
SELECT ALL tab2.col1 * + col1 * col2 AS col0 FROM tab2
----
10982
25947
90506

query I rowsort
SELECT ALL col2 * - tab0.col1 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT - 53 AS col0 FROM tab0 AS cor0
----
-53
-53
-53

query I rowsort
SELECT - + col0 * + col1 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-2652
SELECT DISTINCT - + col1 DIV cor0.col1 AS col0 FROM tab1 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-2652
SELECT DISTINCT - + col1 / cor0.col1 AS col0 FROM tab1 AS cor0
----
-1

query I rowsort
SELECT ALL + 91 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to deebbcfb9c7803a34dca6bd860849afe

query I rowsort
SELECT DISTINCT - col0 * - col2 + - col0 * col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT - ( + tab2.col2 ) AS col2 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT + col0 * + col1 - col1 FROM tab2 cor0
----
1326
186
4543

query I rowsort
SELECT ALL - + 81 FROM tab1 AS cor0
----
-81
-81
-81

onlyif mysql # use DIV operator for integer division
query I rowsort label-2658
SELECT - + col0 DIV col2 + - col0 AS col2 FROM tab1 AS cor0
----
-3
-65
-80

skipif mysql # not compatible
query I rowsort label-2658
SELECT - + col0 / col2 + - col0 AS col2 FROM tab1 AS cor0
----
-3
-65
-80

query I rowsort
SELECT ALL + col0 + - cor0.col1 * cor0.col2 * - col2 AS col0 FROM tab1 AS cor0
----
119888
32554
75819

query I rowsort
SELECT col0 + cor0.col2 AS col2 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT DISTINCT + + col0 * + col0 AS col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT - - col1 + + col1 * + ( - ( col1 ) ) AS col0 FROM tab2 AS cor0
----
-272
-3422
-930

query I rowsort
SELECT ALL + - cor0.col2 + + col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT - ( col2 ) - ( - ( col1 ) ) FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT ALL - cor0.col2 * + tab2.col0 FROM tab2, tab0 AS cor0
----
9 values hashing to a3b44b1349b97a64e1970dbe00e8d983

query I rowsort
SELECT DISTINCT - ( - col1 ) * - col1 AS col2 FROM tab0 AS cor0
----
-7396
-8281
-9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-2667
SELECT - col0 DIV col1 AS col2 FROM tab1 AS cor0
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-2667
SELECT - col0 / col1 AS col2 FROM tab1 AS cor0
----
-6
-6
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2668
SELECT ALL - col1 * col1 + CAST( + col1 AS SIGNED ) * + col2 FROM tab1 AS cor0
----
1079
470
728

skipif mysql # not compatible
query I rowsort label-2668
SELECT ALL - col1 * col1 + CAST ( + col1 AS INTEGER ) * + col2 FROM tab1 AS cor0
----
1079
470
728

query I rowsort
SELECT ALL - col1 * + cor0.col2 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-2670
SELECT + - 13 DIV + col0 AS col2 FROM tab1 AS cor0
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-2670
SELECT + - 13 / + col0 AS col2 FROM tab1 AS cor0
----
-4
0
0

query I rowsort
SELECT ALL + col2 * col0 + cor0.col0 * col2 FROM tab2 cor0
----
378
4056
6004

query I rowsort
SELECT ALL + - col2 + - ( + col2 ) FROM tab0 AS cor0
----
-164
-2
-66

onlyif mysql # use DIV operator for integer division
query I rowsort label-2673
SELECT - col2 DIV cor0.col0 + 57 * cor0.col1 FROM tab1 AS cor0
----
1464
570
740

skipif mysql # not compatible
query I rowsort label-2673
SELECT - col2 / cor0.col0 + 57 * cor0.col1 FROM tab1 AS cor0
----
1464
570
740

query I rowsort
SELECT DISTINCT + + col2 * 38 AS col2 FROM tab0 AS cor0
----
1254
3116
38

query I rowsort
SELECT DISTINCT cor0.col1 * col1 * 3 FROM tab1 AS cor0
----
2028
300
507

query I rowsort
SELECT ALL col0 * - 54 + - col0 FROM tab0 AS cor0
----
-1320
-1925
-4895

query I rowsort
SELECT + cor0.col0 * col2 + col2 * col0 + + col0 * - 69 FROM tab0 AS cor0
----
-2345
-72
8455

query I rowsort
SELECT DISTINCT + cor0.col0 + col1 AS col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL - + col0 + 63 FROM tab2 AS cor0
----
-15
-16
56

onlyif mysql # use DIV operator for integer division
query I rowsort label-2680
SELECT DISTINCT col1 DIV 20 AS col0 FROM tab0 AS cor0
----
4

skipif mysql # not compatible
query I rowsort label-2680
SELECT DISTINCT col1 / 20 AS col0 FROM tab0 AS cor0
----
4

query I rowsort
SELECT - col1 + + 92 FROM tab2 AS cor0
----
33
61
75

query I rowsort
SELECT ALL - - cor0.col0 + - ( 39 ) FROM tab2 AS cor0
----
-32
39
40

onlyif mysql # use DIV operator for integer division
query I rowsort label-2683
SELECT DISTINCT - cor0.col1 DIV 76 - - col1 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-2683
SELECT DISTINCT - cor0.col1 / 76 - - col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT + - cor0.col2 * 72 + + col1 AS col0 FROM tab0 AS cor0
----
-2290
-5813
25

onlyif mysql # use DIV operator for integer division
query I rowsort label-2685
SELECT + 64 DIV - 92 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2685
SELECT + 64 / - 92 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + + cor0.col1 + + col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL - 23 + + col1 AS col1 FROM tab2 AS cor0
----
-6
36
8

query I rowsort
SELECT ALL + col1 * + col1 AS col1 FROM tab1 cor0
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-2689
SELECT ALL - ( - col1 ) DIV - col0 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-2689
SELECT ALL - ( - col1 ) / - col0 FROM tab0 AS cor0
----
-1
-2
-3

query I rowsort
SELECT 51 AS col1 FROM tab1 AS cor0
----
51
51
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-2691
SELECT col1 DIV col0 AS col1 FROM tab2 cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-2691
SELECT col1 / col0 AS col1 FROM tab2 cor0
----
0
0
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2692
SELECT DISTINCT - col2 + + CAST( NULL AS SIGNED ) AS col0 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-2692
SELECT DISTINCT - col2 + + CAST ( NULL AS INTEGER ) AS col0 FROM tab1
----
NULL

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 cor0 CROSS JOIN tab0, tab2 AS cor1
----
243 values hashing to ce53c0e8839c969b0513568da6eb2c4b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2694
SELECT col2 + + CAST( NULL AS SIGNED ) * - 54 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2694
SELECT col2 + + CAST ( NULL AS INTEGER ) * - 54 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 99 AS col0 FROM tab0, tab1 cor0, tab2 cor1
----
27 values hashing to 761f5f1a166a00db99360141565a85da

query I rowsort
SELECT tab1.col2 * col0 + - col2 FROM tab1
----
108
3591
7584

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2697
SELECT DISTINCT + col2 * CAST( NULL AS SIGNED ) * col1 + col0 AS col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-2697
SELECT DISTINCT + col2 * CAST ( NULL AS INTEGER ) * col1 + col0 AS col0 FROM tab0
----
NULL

query I rowsort
SELECT DISTINCT - ( - tab1.col2 ) FROM tab1, tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL 0 AS col1 FROM tab0 cor0 CROSS JOIN tab0, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to 1f117f467f45d8c6b7553e2e3c842942

query I rowsort
SELECT ALL - + cor0.col2 AS col2 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT ALL + cor0.col1 * ( + cor0.col1 ) AS col2 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT - col1 + + ( col1 ) * - col2 AS col1 FROM tab0 AS cor0
----
-194
-2924
-7553

query I rowsort
SELECT DISTINCT + col1 * - cor0.col2 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL - cor0.col1 * + 61 * 43 AS col1 FROM tab2, tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
81 values hashing to 626c90dc8244b3de875267f581b65264

query I rowsort
SELECT DISTINCT 48 + + col1 AS col1 FROM tab1 cor0
----
58
61
74

query I rowsort
SELECT DISTINCT - - col1 - col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT + - 54 + - 51 * col1 FROM tab2 AS cor0
----
-1635
-3063
-921

query I rowsort
SELECT ALL + + col1 * col1 AS col2 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT col0 * - 78 + col2 AS col2 FROM tab0 AS cor0
----
-1839
-2729
-6860

onlyif mysql # use DIV operator for integer division
query I rowsort label-2710
SELECT col1 DIV - 19 + col1 AS col1 FROM tab1 AS cor0
----
10
13
25

skipif mysql # not compatible
query I rowsort label-2710
SELECT col1 / - 19 + col1 AS col1 FROM tab1 AS cor0
----
10
13
25

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2711
SELECT ALL - + CAST( col2 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-2711
SELECT ALL - + CAST ( col2 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT + + cor0.col0 * + col0 AS col1 FROM tab1 AS cor0
----
4096
6400
9

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-2714
SELECT DISTINCT - col2 * + col0 DIV col0 FROM tab1
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-2714
SELECT DISTINCT - col2 * + col0 / col0 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT ALL + col0 * col0 AS col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL - col0 + + cor0.col2 * 53 FROM tab0 AS cor0
----
1725
18
4257

query I rowsort
SELECT ALL - cor0.col0 * cor0.col1 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT - col2 * col2 * 13 AS col2 FROM tab0 AS cor0
----
-13
-14157
-87412

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 62 col0 FROM tab0, tab1 cor0, tab0 AS cor1
----
27 values hashing to 4911b1417a3797d23dd8f38b6ed05c1b

query I rowsort
SELECT + col2 + col1 * col1 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT - + cor1.col0 - 33 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 34803e2d8055fe2883dc988ed71c680b

onlyif mysql # use DIV operator for integer division
query I rowsort label-2722
SELECT ALL col0 DIV col2 col0 FROM tab0
----
0
1
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2722
SELECT ALL col0 / col2 col0 FROM tab0
----
0
1
35

query I rowsort
SELECT + - 38 * col0 AS col2 FROM tab0 AS cor0
----
-1330
-3382
-912

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-2725
SELECT - 32 DIV col2 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2725
SELECT - 32 / col2 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - 79 + + col0 + + 32 AS col0 FROM tab0 cor0
----
-12
-23
42

query I rowsort
SELECT + 25 * - cor0.col1 AS col2 FROM tab1 AS cor0
----
-250
-325
-650

query I rowsort
SELECT - 86 + + col0 * + cor0.col1 * col0 AS col2 FROM tab1 AS cor0
----
148
40874
83114

query I rowsort
SELECT - - 86 + col0 AS col1 FROM tab0 AS cor0
----
110
121
175

query I rowsort
SELECT - col2 + col1 * - 0 * col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT DISTINCT - 60 * col1 AS col0 FROM tab2
----
-1020
-1860
-3540

query I rowsort
SELECT + - 7 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to ba940cd66e21e94e95aada5f28e1faf5

query I rowsort
SELECT DISTINCT col2 * col0 * - col2 + col0 AS col0 FROM tab1 AS cor0
----
-207872
-737200
-8745

query I rowsort
SELECT - + col0 + col1 * col1 AS col2 FROM tab1 AS cor0
----
36
673
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-2735
SELECT DISTINCT + + col0 DIV 60 + + 71 FROM tab1 AS cor0
----
71
72

skipif mysql # not compatible
query I rowsort label-2735
SELECT DISTINCT + + col0 / 60 + + 71 FROM tab1 AS cor0
----
71
72

query I rowsort
SELECT col0 * col0 - + col2 * + col1 * col1 AS col0 FROM tab0 cor0
----
-243492
-671121
-8184

query I rowsort
SELECT + col1 + - ( + col1 ) * - col2 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT + 38 AS col2 FROM tab2 cor0
----
38
38
38

query I rowsort
SELECT ALL - 6 + + col0 FROM tab1 AS cor0
----
-3
58
74

query I rowsort
SELECT cor0.col1 * 10 + 90 AS col2 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 9d1e2f078537f0ef403a53844ab17109

query I rowsort
SELECT DISTINCT + col0 * + col0 AS col2 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT ALL 89 FROM tab2
----
89
89
89

query I rowsort
SELECT DISTINCT + tab1.col1 FROM tab1, tab2, tab2 AS cor0
----
10
13
26

query I rowsort
SELECT - - 54 * - col0 + + col0 FROM tab1 AS cor0
----
-159
-3392
-4240

query I rowsort
SELECT + col2 + + col0 + + 41 FROM tab0 cor0
----
212
77
98

query I rowsort
SELECT DISTINCT ( col0 ) * - col0 AS col0 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT ( + 20 ) FROM tab2
----
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-2748
SELECT tab2.col1 DIV tab2.col0 AS col1 FROM tab2
----
0
0
4

skipif mysql # not compatible
query I rowsort label-2748
SELECT tab2.col1 / tab2.col0 AS col1 FROM tab2
----
0
0
4

query I rowsort
SELECT 91 FROM tab0, tab0 AS cor0
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

query I rowsort
SELECT ( + 0 ) * + col1 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2751
SELECT DISTINCT + - CAST( col1 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-2751
SELECT DISTINCT + - CAST ( col1 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT - ( col1 ) * - col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - + 59 AS col1 FROM tab2 AS cor0
----
-59
-59
-59

query I rowsort
SELECT ALL - - col0 * col2 + - col2 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT DISTINCT - ( 75 ) + - col0 AS col0 FROM tab2 cor0
----
-153
-154
-82

query I rowsort
SELECT ALL - 65 AS col2 FROM tab0 AS cor0
----
-65
-65
-65

query I rowsort
SELECT DISTINCT + + 57 AS col1 FROM tab2 AS cor0
----
57

query I rowsort
SELECT - + 4 + col2 * + col2 * + cor0.col2 FROM tab1 AS cor0
----
157460
185189
884732

query I rowsort
SELECT DISTINCT - 83 FROM tab0 AS cor0
----
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-2760
SELECT col1 DIV cor0.col0 AS col0 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-2760
SELECT col1 / cor0.col0 AS col0 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT DISTINCT + ( + cor0.col1 ) AS col2 FROM tab2 cor0
----
17
31
59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 46 + col0 * col2 col1 FROM tab2 cor0
----
143
1982
2956

query I rowsort
SELECT ALL + + col0 * - cor0.col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + col0 * + col1 - + col2 FROM tab2 AS cor0
----
1305
190
4576

query I rowsort
SELECT - - 94 * - col2 * col2 FROM tab2 cor0
----
-135736
-63544
-68526

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 * + col1 col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT - col2 * - tab0.col2 AS col1 FROM tab0
----
1
1089
6724

query I rowsort
SELECT DISTINCT + - col2 * + col0 FROM tab0 cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-2769
SELECT - - 73 DIV col1 FROM tab2 AS cor0
----
1
2
4

skipif mysql # not compatible
query I rowsort label-2769
SELECT - - 73 / col1 FROM tab2 AS cor0
----
1
2
4

query I rowsort
SELECT DISTINCT - col0 + cor0.col0 * col2 AS col0 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT DISTINCT - col2 * 26 * - col0 + col1 + col2 FROM tab1 AS cor0
----
199789
4292
94915

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2772
SELECT + col1 * - CAST( + cor0.col1 AS SIGNED ) FROM tab0 AS cor0
----
-7396
-8281
-9409

skipif mysql # not compatible
query I rowsort label-2772
SELECT + col1 * - CAST ( + cor0.col1 AS INTEGER ) FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT - col0 + + col1 * cor0.col0 AS col1 FROM tab2 cor0
----
1264
210
4524

query I rowsort
SELECT ALL + ( - cor1.col2 ) FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

query I rowsort
SELECT DISTINCT - + col0 * + col0 * col1 FROM tab1 AS cor0
----
-234
-40960
-83200

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2776
SELECT ALL - col1 + + CAST( + 9 * - col0 AS SIGNED ) AS col0 FROM tab2 cor0
----
-728
-761
-94

skipif mysql # not compatible
query I rowsort label-2776
SELECT ALL - col1 + + CAST ( + 9 * - col0 AS INTEGER ) AS col0 FROM tab2 cor0
----
-728
-761
-94

query I rowsort
SELECT ALL - cor0.col0 * 2 * 16 + + col0 FROM tab1 AS cor0
----
-1984
-2480
-93

query I rowsort
SELECT ALL + col2 + cor0.col1 * - col2 + col0 FROM tab0 AS cor0
----
-2781
-61
-7291

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - ( col2 ) ) col0 FROM tab2 AS cor0
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-2780
SELECT DISTINCT - + col1 + + 91 DIV - col1 FROM tab2 AS cor0
----
-22
-33
-60

skipif mysql # not compatible
query I rowsort label-2780
SELECT DISTINCT - + col1 + + 91 / - col1 FROM tab2 AS cor0
----
-22
-33
-60

query I rowsort
SELECT DISTINCT + cor0.col1 + col0 FROM tab2 AS cor0
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-2782
SELECT 45 DIV - col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2782
SELECT 45 / - col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + ( - 10 ) AS col2 FROM tab1 AS cor0
----
-10
-10
-10

query I rowsort
SELECT DISTINCT 53 AS col1 FROM tab1, tab2 AS cor0
----
53

query I rowsort
SELECT + 61 + - col1 AS col2 FROM tab0 AS cor0
----
-25
-30
-36

query I rowsort
SELECT DISTINCT + 44 * col1 FROM tab0 AS cor0
----
3784
4004
4268

query I rowsort
SELECT ALL 81 * col1 + col2 FROM tab0 AS cor0
----
6999
7453
7858

query I rowsort
SELECT ALL col0 + + cor0.col2 * + cor0.col2 AS col2 FROM tab1 AS cor0
----
2919
3313
9296

onlyif mysql # use DIV operator for integer division
query I rowsort label-2789
SELECT ALL + - 23 + + col2 + + col1 DIV + col0 AS col0 FROM tab1 AS cor0
----
34
39
73

skipif mysql # not compatible
query I rowsort label-2789
SELECT ALL + - 23 + + col2 + + col1 / + col0 AS col0 FROM tab1 AS cor0
----
34
39
73

query I rowsort
SELECT + col0 * + 16 * cor0.col0 + col2 * 69 FROM tab1 AS cor0
----
109024
3870
69469

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab1, tab2 cor1, tab2 AS cor2, tab2 AS cor3
----
3645 values hashing to 1b40f6ebec12e55a9e5893620c5636c7

query I rowsort
SELECT DISTINCT - 44 FROM tab2
----
-44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 56 col0 FROM tab0
----
56
56
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 85 + col1 * + col0 col1 FROM tab0 AS cor0
----
1979
3310
8014

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2795
SELECT + CAST( + col0 AS SIGNED ) AS col1 FROM tab1 cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-2795
SELECT + CAST ( + col0 AS INTEGER ) AS col1 FROM tab1 cor0
----
3
64
80

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab1 AS cor0, tab0 AS cor1, tab2 cor2
----
972 values hashing to a9068b700464993db9fae6f630605fde

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + col0 col2 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2798
SELECT CAST( + col2 AS SIGNED ) AS col0 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-2798
SELECT CAST ( + col2 AS INTEGER ) AS col0 FROM tab1
----
54
57
96

query I rowsort
SELECT - ( + 9 * col0 ) FROM tab1
----
-27
-576
-720

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2800
SELECT DISTINCT ( tab2.col0 ) + - CAST( col0 + col1 AS SIGNED ) FROM tab2
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-2800
SELECT DISTINCT ( tab2.col0 ) + - CAST ( col0 + col1 AS INTEGER ) FROM tab2
----
-17
-31
-59

query I rowsort
SELECT DISTINCT - col2 * - col0 * col1 + ( col1 ) FROM tab0
----
3492
664209
68198

query I rowsort
SELECT + tab1.col1 + + col0 - - 29 FROM tab1
----
103
122
58

query I rowsort
SELECT col1 - - col0 * + cor0.col1 FROM tab0 AS cor0
----
2150
3492
8190

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( col2 ) + - col0 * + col0 col1 FROM tab0
----
-1226
-609
-8003

onlyif mysql # use DIV operator for integer division
query I rowsort label-2805
SELECT ALL cor0.col2 - col0 DIV - 24 col0 FROM tab0 AS cor0
----
2
34
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2805
SELECT ALL cor0.col2 - col0 / - 24 col0 FROM tab0 AS cor0
----
2
34
85

query I rowsort
SELECT + tab2.col1 * - col1 + col1 * - tab2.col1 FROM tab2
----
-1922
-578
-6962

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2807
SELECT DISTINCT col0 + col1 + + CAST( col1 + + col1 AS SIGNED ) FROM tab2
----
100
130
255

skipif mysql # not compatible
query I rowsort label-2807
SELECT DISTINCT col0 + col1 + + CAST ( col1 + + col1 AS INTEGER ) FROM tab2
----
100
130
255

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab1 AS cor2, tab2 AS cor3
----
3645 values hashing to bd2b318ad064d89aa12ab468220362b6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2809
SELECT col2 + CAST( NULL AS SIGNED ) col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2809
SELECT col2 + CAST ( NULL AS INTEGER ) col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col2 * + cor0.col2 * - 6 + col0 * + ( col1 ) + - col0 AS col2 FROM tab0 AS cor0
----
-32334
-4494
3354

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + - col1 * + col0 col2 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT ALL - - col0 * cor0.col1 - col0 AS col2 FROM tab2 AS cor0
----
1264
210
4524

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 + col0 col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT - - col2 + col1 AS col1 FROM tab0 AS cor0
----
119
173
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2815
SELECT + col2 * CAST( + col2 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
1444
676
729

skipif mysql # not compatible
query I rowsort label-2815
SELECT + col2 * CAST ( + col2 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT - col2 + - col2 AS col2 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT - - col1 * cor0.col1 * + col0 + + col0 AS col1 FROM tab1 AS cor0
----
13600
2031
6464

query I rowsort
SELECT ALL + col0 + ( + col2 ) * + col2 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT + col1 + + cor0.col0 * col2 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT + col0 * 11 FROM tab0 AS cor0
----
264
385
979

query I rowsort
SELECT col0 * 76 FROM tab2 AS cor0
----
532
5928
6004

query I rowsort
SELECT ALL + - 99 * + cor0.col2 FROM tab2 AS cor0
----
-2574
-2673
-3762

query I rowsort
SELECT + col1 + + cor0.col0 * - cor0.col1 AS col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT + + col0 * - col0 + - cor0.col1 FROM tab2 cor0
----
-6143
-6258
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2825
SELECT col1 DIV cor0.col0 FROM tab1 AS cor0
----
0
0
8

skipif mysql # not compatible
query I rowsort label-2825
SELECT col1 / cor0.col0 FROM tab1 AS cor0
----
0
0
8

query I rowsort
SELECT 55 + col2 FROM tab1 AS cor0
----
109
112
151

query I rowsort
SELECT + col2 * ( - col1 * + col0 ) AS col2 FROM tab2 AS cor0
----
-119652
-51034
-5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-2828
SELECT ALL - col2 DIV tab2.col0 FROM tab2
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-2828
SELECT ALL - col2 / tab2.col0 FROM tab2
----
-3
0
0

query I rowsort
SELECT + ( col1 ) * + 10 FROM tab2
----
170
310
590

query I rowsort
SELECT - 48 * + col1 AS col1 FROM tab2
----
-1488
-2832
-816

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2831
SELECT col2 + col1 * - CAST( + 24 AS SIGNED ) AS col0 FROM tab1
----
-183
-216
-570

skipif mysql # not compatible
query I rowsort label-2831
SELECT col2 + col1 * - CAST ( + 24 AS INTEGER ) AS col0 FROM tab1
----
-183
-216
-570

query I rowsort
SELECT 59 AS col0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to e29fef8cdec1ee45a71d213f16d2f1d3

query I rowsort
SELECT col0 * - tab1.col1 * + col0 AS col1 FROM tab1
----
-234
-40960
-83200

onlyif mysql # use DIV operator for integer division
query I rowsort label-2834
SELECT DISTINCT + col0 DIV tab2.col0 col0 FROM tab2
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2834
SELECT DISTINCT + col0 / tab2.col0 col0 FROM tab2
----
1

query I rowsort
SELECT - tab2.col2 + + tab2.col1 + - tab2.col0 FROM tab2
----
-100
-3
-45

query I rowsort
SELECT DISTINCT col1 + col1 * - tab1.col2 + + col1 FROM tab1
----
-1222
-1352
-550

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col2 + + tab0.col0 + - col0 col2 FROM tab0
----
1
1089
6724

query III rowsort
SELECT ALL * FROM tab2 WHERE - col2 + + col2 BETWEEN col0 AND NULL
----

query I rowsort
SELECT ALL col2 + col2 + col2 AS col2 FROM tab1
----
162
171
288

onlyif mysql # use DIV operator for integer division
query I rowsort label-2840
SELECT col0 DIV tab2.col1 FROM tab2
----
0
1
4

skipif mysql # not compatible
query I rowsort label-2840
SELECT col0 / tab2.col1 FROM tab2
----
0
1
4

query I rowsort
SELECT ALL + col1 + + tab2.col1 * tab2.col0 AS col0 FROM tab2
----
1360
248
4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-2842
SELECT col2 * + col1 FROM tab0 WHERE NOT + col1 - col1 = ( + col0 DIV col2 )
----
7462
97

skipif mysql # not compatible
query I rowsort label-2842
SELECT col2 * + col1 FROM tab0 WHERE NOT + col1 - col1 = ( + col0 / col2 )
----
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2843
SELECT ALL + col2 DIV - tab0.col2 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2843
SELECT ALL + col2 / - tab0.col2 FROM tab0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2844
SELECT - tab1.col2 * col0 DIV col1 FROM tab1
----
-364
-590
-6

skipif mysql # not compatible
query I rowsort label-2844
SELECT - tab1.col2 * col0 / col1 FROM tab1
----
-364
-590
-6

query I rowsort
SELECT DISTINCT - col0 FROM tab0 WHERE NULL NOT IN ( + col0 + col0 / col0 )
----

query I rowsort
SELECT ALL + col1 * - col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT ALL tab1.col0 * tab1.col0 - + col1 FROM tab1
----
-17
4086
6387

query I rowsort
SELECT - col1 - col0 * col2 * + col1 AS col2 FROM tab2
----
-119711
-51051
-5890

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * col0 col0 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT - tab2.col0 * tab2.col2 * tab2.col2 + + col2 FROM tab2
----
-114038
-5076
-52702

onlyif mysql # use DIV operator for integer division
query I rowsort label-2851
SELECT DISTINCT + col1 DIV + col1 + col0 - + col2 FROM tab1
----
-15
-50
8

skipif mysql # not compatible
query I rowsort label-2851
SELECT DISTINCT + col1 / + col1 + col0 - + col2 FROM tab1
----
-15
-50
8

query I rowsort
SELECT tab2.col1 AS col1 FROM tab2 WHERE ( + col1 * + col1 ) < - col2
----

query I rowsort
SELECT DISTINCT col1 * col2 AS col1 FROM tab0 WHERE NOT - col0 >= col2
----
2838
7462
97

query III rowsort
SELECT * FROM tab1 WHERE NOT ( - col0 ) NOT IN ( tab1.col2 )
----

query I rowsort
SELECT ALL col1 + - col1 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT + col1 * col1 FROM tab0 WHERE ( NULL ) BETWEEN + col0 + + col2 + - col1 AND ( col1 )
----

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT ( + tab1.col2 ) >= NULL
----

query I rowsort
SELECT ALL + col2 + + col0 FROM tab1
----
121
176
57

query I rowsort
SELECT ALL col2 * col2 + + col2 FROM tab0
----
1122
2
6806

query I rowsort
SELECT + col1 * - tab2.col0 - tab2.col0 FROM tab2
----
-1422
-224
-4680

query I rowsort
SELECT DISTINCT + tab1.col0 * col1 + tab1.col0 * - tab1.col0 FROM tab1
----
-3456
-5360
69

query I rowsort
SELECT DISTINCT - col1 + + col0 * + tab1.col0 * col1 AS col2 FROM tab1
----
208
40950
83187

query I rowsort
SELECT ALL col1 + + tab1.col2 AS col2 FROM tab1
----
109
67
80

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT + col1 < NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - tab2.col0 + col2 * col1 col2 FROM tab2
----
-4550
-5595
788

query I rowsort
SELECT col2 * + col2 + col2 AS col2 FROM tab2
----
1482
702
756

query I rowsort
SELECT + col1 * tab0.col0 - col1 FROM tab0
----
1978
3298
8008

query I rowsort
SELECT DISTINCT 25 + col2 FROM tab2 AS cor0
----
51
52
63

query I rowsort
SELECT col0 * col0 + col0 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT DISTINCT + col2 + + col1 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2871
SELECT - ( + col2 ) DIV 13 + + 2 AS col2 FROM tab1 cor0
----
-2
-2
-5

skipif mysql # not compatible
query I rowsort label-2871
SELECT - ( + col2 ) / 13 + + 2 AS col2 FROM tab1 cor0
----
-2
-2
-5

query I rowsort
SELECT ALL - - 84 FROM tab0 AS cor0
----
84
84
84

query I rowsort
SELECT DISTINCT cor0.col2 * col0 + 55 AS col2 FROM tab0 AS cor0
----
7353
847
90

query I rowsort
SELECT ALL + 33 + col0 FROM tab1 AS cor0
----
113
36
97

query I rowsort
SELECT DISTINCT col1 + cor0.col0 AS col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL + col2 * cor0.col2 AS col0 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ( col1 ) + + ( 99 ) AS col2 FROM tab1 AS cor0
----
109
112
125

query I rowsort
SELECT DISTINCT + + 37 * - col2 * - ( 69 ) + - col0 FROM tab0 cor0
----
209257
2518
84225

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col1 FROM tab2, tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL - col2 * col1 * col0 FROM tab0
----
-3395
-664118
-68112

query I rowsort
SELECT + - 25 + cor1.col1 FROM tab0 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 5f3cd3b4fc296e5cf236d34ac80d51fd

query I rowsort
SELECT DISTINCT col2 + col0 AS col0 FROM tab2
----
104
117
34

query I rowsort
SELECT - cor1.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT col2 * cor0.col0 + col0 AS col1 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT - 83 - col1 FROM tab0 AS cor0
----
-169
-174
-180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 42 + - col0 col0 FROM tab1 AS cor0
----
-22
-38
39

query I rowsort
SELECT - 52 + col1 FROM tab0 AS cor0
----
34
39
45

query I rowsort
SELECT DISTINCT + col0 * - col2 * tab1.col0 AS col2 FROM tab1
----
-233472
-486
-614400

query I rowsort
SELECT col2 * col1 + + ( - tab0.col2 ) FROM tab0
----
2805
7380
96

query I rowsort
SELECT - cor0.col1 + + 40 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 437ab7933dd0494043cbc389a4fad5a6

query I rowsort
SELECT DISTINCT 98 - col1 AS col0 FROM tab2
----
39
67
81

query I rowsort
SELECT col2 - 20 * col1 FROM tab0 AS cor0
----
-1687
-1738
-1939

query I rowsort
SELECT DISTINCT col0 * + col0 AS col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT + + cor0.col2 * - 34 AS col2 FROM tab0 AS cor0
----
-1122
-2788
-34

query I rowsort
SELECT + col2 * col2 + col2 * + col2 FROM tab2 AS cor0
----
1352
1458
2888

query I rowsort
SELECT col0 + tab2.col0 * col2 * + col2 AS col0 FROM tab2
----
114155
5110
52806

query I rowsort
SELECT + 76 * + col2 * + col1 AS col2 FROM tab1 cor0
----
106704
43320
94848

query I rowsort
SELECT - + 44 * col0 AS col1 FROM tab1 AS cor0
----
-132
-2816
-3520

query I rowsort
SELECT - col0 + - cor0.col0 * - 68 AS col0 FROM tab2 AS cor0
----
469
5226
5293

query I rowsort
SELECT DISTINCT - col1 + 65 AS col2 FROM tab2 AS cor0
----
34
48
6

query I rowsort
SELECT ALL - col2 * cor0.col2 + col1 * col0 AS col2 FROM tab1 AS cor0
----
-2609
-2838
-8176

query I rowsort
SELECT + col1 + 50 * col0 FROM tab2 cor0
----
381
3959
3967

query I rowsort
SELECT DISTINCT 65 FROM tab0, tab2 AS cor0
----
65

onlyif mysql # use DIV operator for integer division
query I rowsort label-2904
SELECT ALL - - col2 DIV col2 AS col0 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2904
SELECT ALL - - col2 / col2 AS col0 FROM tab1 cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2905
SELECT col2 DIV 62 + + col1 AS col2 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-2905
SELECT col2 / 62 + + col1 AS col2 FROM tab2
----
17
31
59

query I rowsort
SELECT col2 * - 59 FROM tab2 cor0
----
-1534
-1593
-2242

query I rowsort
SELECT DISTINCT + col0 + 6 AS col1 FROM tab2 AS cor0
----
13
84
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + - col0 col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT + col0 * ( + col0 ) FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT - col1 + - 90 AS col1 FROM tab2 AS cor0
----
-107
-121
-149

query I rowsort
SELECT ALL + - col0 + col2 * col1 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT + col1 * 25 AS col2 FROM tab1 AS cor0
----
250
325
650

query I rowsort
SELECT DISTINCT - 98 + + 31 + col2 AS col0 FROM tab0
----
-34
-66
15

query I rowsort
SELECT + - 50 - col1 FROM tab0 AS cor0
----
-136
-141
-147

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2915
SELECT DISTINCT CAST( NULL AS SIGNED ) + 36 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-2915
SELECT DISTINCT CAST ( NULL AS INTEGER ) + 36 FROM tab2
----
NULL

query I rowsort
SELECT - col2 - + 73 AS col0 FROM tab2
----
-100
-111
-99

query I rowsort
SELECT tab1.col0 + col2 * - col2 FROM tab1
----
-2913
-3185
-9136

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0, tab0 AS cor1, tab0, tab2 AS cor2
----
3645 values hashing to 71180f9f3efadf0ee3a7fec9678208ad

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + - cor0.col1 col1 FROM tab1 cor0
----
-20
-26
-52

query I rowsort
SELECT ALL 42 FROM tab0, tab1 AS cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to 4d49d5ffe533e92cf06d98cb59a19b10

query I rowsort
SELECT ALL - col0 * col1 * + col0 AS col0 FROM tab0 cor0
----
-118825
-49536
-720811

onlyif mysql # use DIV operator for integer division
query I rowsort label-2922
SELECT cor0.col2 DIV - col2 col2 FROM tab1 AS cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2922
SELECT cor0.col2 / - col2 col2 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + - col1 * col0 * + 76 + col1 + + col2 * col1 FROM tab2 AS cor0
----
-101405
-15624
-348159

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * - col0 col1 FROM tab0 cor0
----
-1225
-576
-7921

query I rowsort
SELECT ALL + col1 + + col2 * - col2 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT ALL - cor0.col2 * cor0.col1 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-2927
SELECT + - 37 * + col1 + cor0.col0 DIV cor0.col1 AS col2 FROM tab2 AS cor0
----
-1147
-2182
-625

skipif mysql # not compatible
query I rowsort label-2927
SELECT + - 37 * + col1 + cor0.col0 / cor0.col1 AS col2 FROM tab2 AS cor0
----
-1147
-2182
-625

query I rowsort
SELECT DISTINCT + - col2 + - col2 * + col0 FROM tab2 AS cor0
----
-2054
-216
-3040

query I rowsort
SELECT + col1 + ( - col2 ) AS col0 FROM tab1
----
-28
-47
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-2930
SELECT DISTINCT + col2 + + 30 DIV col0 FROM tab0
----
1
34
82

skipif mysql # not compatible
query I rowsort label-2930
SELECT DISTINCT + col2 + + 30 / col0 FROM tab0
----
1
34
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 70 + tab2.col1 col2 FROM tab2
----
101
129
87

query I rowsort
SELECT DISTINCT ( + col1 ) AS col0 FROM tab2 AS cor0
----
17
31
59

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0, tab0 AS cor1, tab0, tab0 AS cor2
----
3645 values hashing to 2270901c73a658a63f841c68db8155ba

onlyif mysql # use DIV operator for integer division
query I rowsort label-2934
SELECT ALL + 85 * + col0 + 32 DIV + col2 FROM tab0 AS cor0
----
2040
3007
7565

skipif mysql # not compatible
query I rowsort label-2934
SELECT ALL + 85 * + col0 + 32 / + col2 FROM tab0 AS cor0
----
2040
3007
7565

query I rowsort
SELECT ALL - cor0.col2 * + col0 AS col1 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT - 45 AS col1 FROM tab1, tab1 cor0, tab0 AS cor1, tab2 cor2
----
-45

query I rowsort
SELECT ALL - 80 FROM tab2, tab0 AS cor0
----
9 values hashing to 4dde3bd5652d30396b9cadd0e2cfb680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 51 col0 FROM tab1 AS cor0
----
-51

query I rowsort
SELECT DISTINCT cor0.col1 * - col1 AS col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL + - ( col1 ) + - col2 AS col0 FROM tab1 AS cor0
----
-109
-67
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2941
SELECT ALL col2 DIV - col1 + col1 AS col2 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-2941
SELECT ALL col2 / - col1 + col1 AS col2 FROM tab0
----
86
91
97

query I rowsort
SELECT - 98 FROM tab1, tab0, tab1 cor0
----
27 values hashing to 9b0655947ad21e0b95a137a474fa6a1f

query I rowsort
SELECT ALL 78 * + 10 AS col1 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 6b43e850a7c75583920f5c9d7d52d4b7

onlyif mysql # use DIV operator for integer division
query I rowsort label-2944
SELECT DISTINCT col2 + col0 DIV + 32 + - 60 FROM tab2
----
-20
-32
-33

skipif mysql # not compatible
query I rowsort label-2944
SELECT DISTINCT col2 + col0 / + 32 + - 60 FROM tab2
----
-20
-32
-33

query I rowsort
SELECT tab1.col1 * + tab1.col2 AS col1 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to f8894e3f33962cda5901e1c2ce65d5b0

query I rowsort
SELECT ALL + 12 * col1 + 12 AS col1 FROM tab0
----
1044
1104
1176

query I rowsort
SELECT + col0 + + 35 FROM tab0 cor0
----
124
59
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + col0 col0 FROM tab2 cor0
----
-20
41
52

query I rowsort
SELECT - 31 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to c6c8eebeb1a59f7c046402e25630c0ac

query I rowsort
SELECT DISTINCT + col1 + ( col0 ) * + col1 FROM tab1 cor0
----
104
1053
650

query I rowsort
SELECT DISTINCT + - 25 + + ( - col2 ) FROM tab1 AS cor0
----
-121
-79
-82

query I rowsort
SELECT ALL + 66 * ( - col0 ) - + col1 * col2 AS col1 FROM tab2 AS cor0
----
-1299
-5860
-6682

query I rowsort
SELECT DISTINCT 32 * - 58 + - col1 FROM tab0 AS cor0
----
-1942
-1947
-1953

query I rowsort
SELECT + col0 * 38 + - col2 FROM tab2 AS cor0
----
239
2938
2964

skipif mysql # not compatible
query I rowsort
SELECT - - CAST ( + 63 AS REAL ) - - cor0.col1 FROM tab0 cor0
----
149
154
160

query I rowsort
SELECT DISTINCT - + col2 + col1 AS col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT ALL + - col2 + col1 * - col1 + - 45 * cor0.col1 FROM tab0 AS cor0
----
-11299
-12458
-13775

query I rowsort
SELECT - ( - col1 ) * + col1 + 11 AS col1 FROM tab2 AS cor0
----
300
3492
972

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + 19 * col1 col2 FROM tab0
----
1658
1818
1878

query I rowsort
SELECT col2 + + 10 FROM tab0
----
11
43
92

query I rowsort
SELECT 52 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 7f4ae30893ab330784829711032ae599

query I rowsort
SELECT DISTINCT - tab0.col1 * col0 * col1 AS col1 FROM tab0
----
-177504
-329315
-737009

query I rowsort
SELECT ALL - ( + col1 ) + - col2 * 80 FROM tab0
----
-177
-2726
-6651

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( - col2 ) + + col1 col0 FROM tab1
----
-28
-47
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 50 col2 FROM tab0 cor0
----
-50
-50
-50

query I rowsort
SELECT DISTINCT + 98 * + 98 * col1 AS col1 FROM tab0 AS cor0
----
825944
873964
931588

query I rowsort
SELECT ALL + 36 + - col1 FROM tab0 AS cor0
----
-50
-55
-61

query I rowsort
SELECT ( 4 ) + col0 AS col0 FROM tab2 AS cor0
----
11
82
83

query I rowsort
SELECT ALL - 37 * col2 FROM tab0 AS cor0
----
-1221
-3034
-37

query I rowsort
SELECT ALL - + col1 * 99 * + col0 + + ( - col1 ) * col0 * - col2 AS col2 FROM tab2 AS cor0
----
-15624
-335946
-81923

query I rowsort
SELECT col2 * 42 FROM tab0 cor0
----
1386
3444
42

query I rowsort
SELECT DISTINCT - - col1 * - cor0.col0 + - col0 * 82 + col2 FROM tab1 AS cor0
----
-270
-5831
-7504

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 CROSS JOIN tab1, tab2, tab2 AS cor1
----
3645 values hashing to e3826bc27970dd1a441a9cd4c13b096d

query I rowsort
SELECT DISTINCT + ( col2 ) * - col2 - + ( cor0.col1 ) FROM tab0 AS cor0
----
-1175
-6815
-98

query I rowsort
SELECT DISTINCT + + 7 AS col0 FROM tab0 AS cor0
----
7

query I rowsort
SELECT DISTINCT - ( 81 ) - col0 AS col2 FROM tab2 AS cor0
----
-159
-160
-88

query I rowsort
SELECT - + col1 + + col0 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT col0 - - 95 AS col2 FROM tab0 AS cor0
----
119
130
184

onlyif mysql # use DIV operator for integer division
query I rowsort label-2979
SELECT ALL - col1 + col1 DIV - col1 FROM tab1 AS cor0
----
-11
-14
-27

skipif mysql # not compatible
query I rowsort label-2979
SELECT ALL - col1 + col1 / - col1 FROM tab1 AS cor0
----
-11
-14
-27

query I rowsort
SELECT ALL - col1 * - col1 * + col0 FROM tab2
----
22831
271518
6727

onlyif mysql # use DIV operator for integer division
query I rowsort label-2981
SELECT + col0 DIV + 67 AS col0 FROM tab2
----
0
1
1

skipif mysql # not compatible
query I rowsort label-2981
SELECT + col0 / + 67 AS col0 FROM tab2
----
0
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2982
SELECT DISTINCT + col0 DIV ( 93 ) FROM tab2
----
0

skipif mysql # not compatible
query I rowsort label-2982
SELECT DISTINCT + col0 / ( 93 ) FROM tab2
----
0

query I rowsort
SELECT ALL - col1 * ( col0 + col1 ) * col0 FROM tab1
----
-2262
-47360
-96720

query I rowsort
SELECT DISTINCT col0 * col2 + col0 AS col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT + col1 * - 95 FROM tab0 AS cor0
----
-8170
-8645
-9215

query I rowsort
SELECT ALL col0 * + ( - col1 ) * col0 + cor0.col1 * col2 * - col2 AS col1 FROM tab2 AS cor0
----
-130645
-24118
-398840

onlyif mysql # use DIV operator for integer division
query I rowsort label-2987
SELECT + - col1 DIV 98 + cor0.col2 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-2987
SELECT + - col1 / 98 + cor0.col2 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort
SELECT + + CAST ( + col1 AS REAL ) AS col2 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT 94 + col0 AS col1 FROM tab0 AS cor0
----
118
129
183

query I rowsort
SELECT + - 9 AS col0 FROM tab0 AS cor0
----
-9
-9
-9

query I rowsort
SELECT 82 + + col1 * + col1 + + 65 * + 6 FROM tab2 AS cor0
----
1433
3953
761

query I rowsort
SELECT + cor0.col2 * + col0 AS col1 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-2993
SELECT DISTINCT - + 29 * - col1 + 70 DIV - col1 + col1 AS col1 FROM tab2 AS cor0
----
1769
506
928

skipif mysql # not compatible
query I rowsort label-2993
SELECT DISTINCT - + 29 * - col1 + 70 / - col1 + col1 AS col1 FROM tab2 AS cor0
----
1769
506
928

onlyif mysql # use DIV operator for integer division
query I rowsort label-2994
SELECT - + col2 + + col2 DIV 79 FROM tab1 AS cor0
----
-54
-57
-95

skipif mysql # not compatible
query I rowsort label-2994
SELECT - + col2 + + col2 / 79 FROM tab1 AS cor0
----
-54
-57
-95

query I rowsort
SELECT DISTINCT cor0.col0 * col2 + col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT DISTINCT - cor0.col1 + - col1 FROM tab2 AS cor0
----
-118
-34
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-2997
SELECT - - col1 DIV - col2 FROM tab0 AS cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-2997
SELECT - - col1 / - col2 FROM tab0 AS cor0
----
-1
-2
-97

query I rowsort
SELECT DISTINCT + cor0.col1 * col1 AS col0 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT col1 + + cor0.col2 AS col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT + 64 * col0 FROM tab2 AS cor0
----
448
4992
5056

query I rowsort
SELECT + col0 * + cor0.col0 AS col0 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT col1 * - ( + col1 * col2 ) FROM tab0 cor0
----
-244068
-679042
-9409

query I rowsort
SELECT + + 91 * - cor0.col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 5242216aed08a56af814cf20ca064ada

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 + col0 * - 11 col1 FROM tab0 AS cor0
----
-231
-384
-897

query I rowsort
SELECT tab1.col1 * + tab1.col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT 19 + + 35 AS col2 FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

query I rowsort
SELECT ALL + col0 * col0 AS col0 FROM tab1
----
4096
6400
9

query I rowsort
SELECT DISTINCT 31 + - col1 FROM tab2
----
-28
0
14

query I rowsort
SELECT + - col2 + - col2 * + col1 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT ALL col2 * col0 + 80 FROM tab0 AS cor0
----
115
7378
872

query I rowsort
SELECT DISTINCT col0 * - col1 - + col0 * col2 FROM tab0 AS cor0
----
-15397
-2856
-3430

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3012
SELECT + cor0.col1 * - CAST( 13 AS SIGNED ) + col1 + 56 FROM tab0 AS cor0
----
-1036
-1108
-976

skipif mysql # not compatible
query I rowsort label-3012
SELECT + cor0.col1 * - CAST ( 13 AS INTEGER ) + col1 + 56 FROM tab0 AS cor0
----
-1036
-1108
-976

query I rowsort
SELECT col0 + ( + cor0.col0 ) * - cor0.col1 * ( - col0 + - col1 ) FROM tab2 AS cor0
----
129007
630552
8253

query I rowsort
SELECT - - col2 * - col0 AS col1 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT 27 AS col2 FROM tab1
----
27
27
27

query I rowsort
SELECT DISTINCT + ( + 71 ) FROM tab1, tab2 AS cor0, tab2 AS cor1
----
71

query I rowsort
SELECT ALL col2 * + 32 FROM tab0 cor0
----
1056
2624
32

query I rowsort
SELECT DISTINCT - col2 * col1 + - col2 + - col1 FROM tab0 AS cor0
----
-195
-2957
-7635

query I rowsort
SELECT DISTINCT col0 - - col2 AS col2 FROM tab0 cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-3020
SELECT + col2 DIV 49 AS col1 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3020
SELECT + col2 / 49 AS col1 FROM tab1
----
1
1
1

query I rowsort
SELECT ALL cor0.col2 + col0 FROM tab1 AS cor0
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col1 * - cor0.col1 col0 FROM tab0 AS cor0
----
636056
753571
912673

query I rowsort
SELECT col1 * - 39 FROM tab1
----
-1014
-390
-507

onlyif mysql # use DIV operator for integer division
query I rowsort label-3024
SELECT - col2 - - col1 DIV 44 col0 FROM tab2 AS cor0
----
-25
-27
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3024
SELECT - col2 - - col1 / 44 col0 FROM tab2 AS cor0
----
-25
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-3025
SELECT DISTINCT col2 DIV + col0 - - col1 AS col0 FROM tab0
----
87
91
97

skipif mysql # not compatible
query I rowsort label-3025
SELECT DISTINCT col2 / + col0 - - col1 AS col0 FROM tab0
----
87
91
97

query I rowsort
SELECT ALL + col2 - col0 * + 16 AS col2 FROM tab0
----
-1342
-351
-559

query I rowsort
SELECT ALL + 72 AS col1 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 92cc3d5daa550304e96c1542787691c7

query I rowsort
SELECT ALL + col1 + + col1 AS col2 FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT DISTINCT 58 AS col2 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
58

query I rowsort
SELECT ALL - col2 * - col2 - 72 FROM tab0 cor0
----
-71
1017
6652

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 4 col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3032
SELECT DISTINCT CAST( cor1.col0 AS SIGNED ) AS col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
3
64
80

skipif mysql # not compatible
query I rowsort label-3032
SELECT DISTINCT CAST ( cor1.col0 AS INTEGER ) AS col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 24 col2 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to f2e40f6e5cdbc2877843191cb261975f

query I rowsort
SELECT - 2 + col1 FROM tab2 cor0
----
15
29
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3035
SELECT + ( - col1 ) + - CAST( + col0 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-110
-132
-180

skipif mysql # not compatible
query I rowsort label-3035
SELECT + ( - col1 ) + - CAST ( + col0 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT + 82 FROM tab2 cor0
----
82
82
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col0 + - col2 col1 FROM tab0 AS cor0
----
-171
-36
-57

query I rowsort
SELECT ALL + 34 AS col0 FROM tab0, tab2 AS cor0, tab1 cor1, tab2 AS cor2
----
81 values hashing to 6cda47a564e8ee9e9e7915815a3a7769

query I rowsort
SELECT + 92 * 76 + col2 AS col2 FROM tab0 AS cor0
----
6993
7025
7074

query I rowsort
SELECT col2 + col2 * + col1 AS col1 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT DISTINCT - - 70 * col0 + + col1 FROM tab1 AS cor0
----
236
4490
5613

query I rowsort
SELECT - 72 + cor0.col1 * + col1 FROM tab1 cor0
----
28
604
97

query I rowsort
SELECT ALL 37 + + 24 FROM tab0 AS cor0
----
61
61
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + - cor0.col1 col0 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT ALL + - 5 * col0 AS col1 FROM tab2 cor0
----
-35
-390
-395

query I rowsort
SELECT ALL - col2 + + cor0.col1 * cor0.col2 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT ALL + - ( col1 ) + + col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT + - 98 + + col2 AS col0 FROM tab0 AS cor0
----
-16
-65
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3049
SELECT ALL + CAST( 4 AS SIGNED ) DIV col0 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3049
SELECT ALL + CAST ( 4 AS INTEGER ) / col0 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT DISTINCT - col2 + col2 * - col1 FROM tab1 cor0
----
-1344
-1458
-627

query I rowsort
SELECT ALL 66 * col0 FROM tab1 AS cor0
----
198
4224
5280

query I rowsort
SELECT - + cor0.col1 + col2 AS col0 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT ALL + 58 AS col1 FROM tab1 AS cor0
----
58
58
58

query I rowsort
SELECT + cor0.col0 + - ( - cor0.col2 ) AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL + ( col0 ) + col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT + col2 - - col2 FROM tab0
----
164
2
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-3057
SELECT - col1 DIV col0 + - 25 AS col0 FROM tab1
----
-25
-25
-33

skipif mysql # not compatible
query I rowsort label-3057
SELECT - col1 / col0 + - 25 AS col0 FROM tab1
----
-25
-25
-33

query I rowsort
SELECT DISTINCT + tab0.col1 + col0 FROM tab0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-3059
SELECT tab1.col1 + col1 DIV col0 AS col0 FROM tab1
----
10
13
34

skipif mysql # not compatible
query I rowsort label-3059
SELECT tab1.col1 + col1 / col0 AS col0 FROM tab1
----
10
13
34

skipif mysql # not compatible
query I rowsort
SELECT + + CAST ( cor0.col2 AS REAL ) FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL 98 * + col2 + cor0.col2 AS col2 FROM tab0 cor0
----
3267
8118
99

query I rowsort
SELECT DISTINCT col0 + - col1 * ( - col1 ) AS col1 FROM tab2
----
3559
368
968

query I rowsort
SELECT - + 2 FROM tab2, tab2 AS cor0, tab1, tab2 AS cor1
----
81 values hashing to fbbdc69ed4bc9a68f44d1ba867b620b3

query I rowsort
SELECT DISTINCT ( cor0.col1 ) * cor0.col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT col0 + 30 AS col2 FROM tab2 AS cor0
----
108
109
37

query I rowsort
SELECT ALL 55 FROM tab1 AS cor0
----
55
55
55

query I rowsort
SELECT DISTINCT + cor0.col0 + col1 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT ALL + + col1 * + ( col0 ) - + col2 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT DISTINCT 30 FROM tab1, tab1 AS cor0
----
30

query I rowsort
SELECT - + col2 + + col2 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + 62 * - col0 FROM tab1 AS cor0
----
-186
-3968
-4960

query I rowsort
SELECT + col0 + - ( - 90 ) * - col0 FROM tab2
----
-623
-6942
-7031

query I rowsort
SELECT DISTINCT + col0 + 4 AS col2 FROM tab0
----
28
39
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3074
SELECT ALL col1 + CAST( - col2 AS SIGNED ) * col1 * + col1 AS col0 FROM tab1
----
-16211
-36478
-5690

skipif mysql # not compatible
query I rowsort label-3074
SELECT ALL col1 + CAST ( - col2 AS INTEGER ) * col1 * + col1 AS col0 FROM tab1
----
-16211
-36478
-5690

query I rowsort
SELECT DISTINCT - col1 * + 68 FROM tab2 AS cor0
----
-1156
-2108
-4012

query I rowsort
SELECT col0 * tab1.col0 + col0 + + col2 FROM tab1
----
4217
6576
66

query I rowsort
SELECT DISTINCT - tab2.col2 + + 65 * + col2 AS col0 FROM tab2
----
1664
1728
2432

query I rowsort
SELECT DISTINCT - col0 - + col0 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT ALL + + col2 + col0 AS col1 FROM tab0 cor0
----
171
36
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3080
SELECT + CAST( NULL AS SIGNED ) * + 15 + - cor0.col2 FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3080
SELECT + CAST ( NULL AS INTEGER ) * + 15 + - cor0.col2 FROM tab1, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + col2 + - col2 - col2 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT - col0 * + col2 + - col0 + + col2 AS col2 FROM tab2 AS cor0
----
-169
-2080
-3043

onlyif mysql # use DIV operator for integer division
query I rowsort label-3083
SELECT + - col0 DIV ( - 52 * + col0 ) FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3083
SELECT + - col0 / ( - 52 * + col0 ) FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - + col1 AS col0 FROM tab1 cor0
----
-10
-13
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-3085
SELECT + col2 DIV - 11 AS col2 FROM tab1 AS cor0
----
-4
-5
-8

skipif mysql # not compatible
query I rowsort label-3085
SELECT + col2 / - 11 AS col2 FROM tab1 AS cor0
----
-4
-5
-8

query I rowsort
SELECT DISTINCT + col0 * - 31 AS col1 FROM tab0 AS cor0
----
-1085
-2759
-744

query I rowsort
SELECT - col2 * + 45 * + ( - col1 ) AS col2 FROM tab2 AS cor0
----
29070
37665
69030

query I rowsort
SELECT DISTINCT col2 * - col2 AS col1 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT ALL - col0 + + col1 * + cor0.col2 AS col2 FROM tab1 AS cor0
----
1168
1401
506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - ( + col1 * col0 ) col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT ALL - - col2 * + col2 FROM tab2 AS cor0
----
1444
676
729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3092
SELECT ALL CAST( NULL AS SIGNED ) FROM tab2, tab0 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-3092
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab2, tab0 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT 11 * + col1 AS col1 FROM tab1 AS cor0
----
110
143
286

query I rowsort
SELECT DISTINCT + ( cor0.col2 ) * + col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + + 57 - cor0.col2 FROM tab2 AS cor0
----
19
30
31

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * + 39 * col2 col0 FROM tab1 AS cor0
----
142272
299520
6318

query I rowsort
SELECT 39 FROM tab1, tab1 cor0
----
9 values hashing to 5ecc4d3de68ae828a2d522dff8571cbf

query I rowsort
SELECT ALL col1 + 85 AS col2 FROM tab0
----
171
176
182

query I rowsort
SELECT - 81 * col0 + + col2 AS col1 FROM tab0 AS cor0
----
-1911
-2834
-7127

query I rowsort
SELECT - col2 * - 3 FROM tab1 AS cor0
----
162
171
288

query I rowsort
SELECT + col2 * - col0 * - col2 FROM tab2 cor0
----
114076
5103
52728

query I rowsort
SELECT ALL - + 30 AS col2 FROM tab0 AS cor0
----
-30
-30
-30

query I rowsort
SELECT 2 * cor0.col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT DISTINCT col1 * - col2 FROM tab2 cor0
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

query I rowsort
SELECT DISTINCT col1 * - col1 * 1 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT + col2 + + col2 * 94 FROM tab0 AS cor0
----
3135
7790
95

query I rowsort
SELECT DISTINCT 38 * - tab2.col0 FROM tab2
----
-266
-2964
-3002

query I rowsort
SELECT DISTINCT + - 45 + + col1 * - col2 FROM tab2 AS cor0
----
-1579
-691
-882

query IIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 WHERE NOT NULL >= - cor0.col0
----

query I rowsort
SELECT - col1 * cor0.col1 AS col0 FROM tab2 AS cor0
----
-289
-3481
-961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab1.col2 * - cor0.col0 col1 FROM tab1, tab2, tab1 AS cor0
----
9 values hashing to 1091576b2dabfc91057486e7b5f493ef

query I rowsort
SELECT - col1 + + col2 * col1 FROM tab2 cor0
----
1475
629
806

query I rowsort
SELECT DISTINCT + + col1 * + ( 31 ) AS col0 FROM tab1 cor0
----
310
403
806

query I rowsort
SELECT DISTINCT col2 * + tab1.col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT 62 AS col0 FROM tab2
----
62
62
62

query I rowsort
SELECT - 3 FROM tab2
----
-3
-3
-3

onlyif mysql # use DIV operator for integer division
query I rowsort label-3118
SELECT col2 * + col2 * + 78 + + col1 DIV - col1 AS col2 FROM tab2
----
112631
52727
56861

skipif mysql # not compatible
query I rowsort label-3118
SELECT col2 * + col2 * + 78 + + col1 / - col1 AS col2 FROM tab2
----
112631
52727
56861

query I rowsort
SELECT 76 AS col2 FROM tab0 AS cor0
----
76
76
76

query I rowsort
SELECT + - col1 * + col2 + + col0 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT ( - col1 ) AS col2 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT - + col2 - cor0.col1 * 36 FROM tab2 AS cor0
----
-1143
-2150
-650

query I rowsort
SELECT DISTINCT 60 - col1 * 91 FROM tab2
----
-1487
-2761
-5309

query I rowsort
SELECT + col2 * - cor0.col0 + - col0 * col1 FROM tab1 AS cor0
----
-240
-4288
-8720

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3125
SELECT ALL CAST( NULL AS SIGNED ) FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3125
SELECT ALL CAST ( NULL AS INTEGER ) FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - tab1.col0 * + col1 AS col1 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT cor0.col2 + col0 AS col1 FROM tab0 cor0
----
171
36
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor1.col0 col0 FROM tab0, tab1 AS cor0, tab2 cor1
----
-7
-78
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3129
SELECT CAST( NULL AS SIGNED ) FROM tab2, tab2 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3129
SELECT CAST ( NULL AS INTEGER ) FROM tab2, tab2 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + 34 FROM tab1 cor0
----
34
34
34

query I rowsort
SELECT + ( + col0 + - col1 ) AS col1 FROM tab1
----
-23
54
67

query I rowsort
SELECT - 45 * - col0 * + col1 AS col0 FROM tab1 AS cor0
----
28800
3510
46800

query I rowsort
SELECT col0 + 7 * col0 AS col0 FROM tab1 AS cor0
----
24
512
640

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 26 col2 FROM tab0 AS cor0
----
-26
-26
-26

query I rowsort
SELECT col2 * - 75 AS col0 FROM tab0 AS cor0
----
-2475
-6150
-75

query I rowsort
SELECT + 81 + - col1 AS col0 FROM tab0 AS cor0
----
-10
-16
-5

query I rowsort
SELECT ALL tab0.col1 * col2 AS col0 FROM tab0
----
2838
7462
97

query I rowsort
SELECT + 3 + + tab0.col1 FROM tab0
----
100
89
94

query I rowsort
SELECT ALL col0 * col0 AS col0 FROM tab0
----
1225
576
7921

query I rowsort
SELECT + + ( col2 ) AS col1 FROM tab1 cor0
----
54
57
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3141
SELECT ALL - - col0 * col0 + + cor0.col1 DIV + 42 AS col1 FROM tab0 AS cor0
----
1227
578
7923

skipif mysql # not compatible
query I rowsort label-3141
SELECT ALL - - col0 * col0 + + cor0.col1 / + 42 AS col1 FROM tab0 AS cor0
----
1227
578
7923

query I rowsort
SELECT ALL + 1 * + col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL - - cor0.col2 + - col2 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + - 54 * col1 FROM tab2 AS cor0
----
-1674
-3186
-918

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 * cor0.col0 col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + 49 AS col2 FROM tab2 cor0
----
49
49
49

query I rowsort
SELECT DISTINCT + + col0 - - col2 AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT 87 + - cor0.col1 FROM tab0 AS cor0
----
-10
-4
1

query I rowsort
SELECT DISTINCT + col2 * - col0 + 99 + - col1 FROM tab0 cor0
----
-33
-7290
-779

query I rowsort
SELECT 48 + - col0 * - col1 AS col0 FROM tab2 cor0
----
1391
265
4650

query I rowsort
SELECT DISTINCT 89 AS col0 FROM tab2 cor0
----
89

query I rowsort
SELECT ALL + + cor0.col1 * col2 AS col0 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT col2 * col1 AS col1 FROM tab2 cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-3154
SELECT - col1 DIV 97 AS col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3154
SELECT - col1 / 97 AS col2 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3155
SELECT + col0 DIV + 81 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3155
SELECT + col0 / + 81 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + col0 + - 59 AS col2 FROM tab0 AS cor0
----
-24
-35
30

onlyif mysql # use DIV operator for integer division
query I rowsort label-3157
SELECT DISTINCT - col1 DIV + col0 + 90 FROM tab0 AS cor0
----
87
88
89

skipif mysql # not compatible
query I rowsort label-3157
SELECT DISTINCT - col1 / + col0 + 90 FROM tab0 AS cor0
----
87
88
89

query I rowsort
SELECT ALL ( + col1 * col0 ) AS col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT col0 + 66 FROM tab1 AS cor0
----
130
146
69

query I rowsort
SELECT + col2 + 49 * 15 AS col2 FROM tab2 AS cor0
----
761
762
773

query I rowsort
SELECT DISTINCT cor0.col0 * 37 + cor0.col0 AS col2 FROM tab0 AS cor0
----
1330
3382
912

query I rowsort
SELECT DISTINCT - col0 + + col2 * 15 FROM tab2 AS cor0
----
312
398
491

query I rowsort
SELECT + + col2 + + 12 FROM tab1 AS cor0
----
108
66
69

query I rowsort
SELECT DISTINCT + cor0.col0 + + cor0.col1 * col0 AS col2 FROM tab2 cor0
----
1422
224
4680

query I rowsort
SELECT col1 * + ( col2 * tab2.col0 + col2 ) AS col2 FROM tab2
----
121186
51680
6696

query I rowsort
SELECT 41 FROM tab2, tab2 cor0
----
9 values hashing to 5b18986bb294412b3d9f07b7e6fc821e

query I rowsort
SELECT + + 86 AS col2 FROM tab1 AS cor0
----
86
86
86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3168
SELECT - + CAST( NULL AS SIGNED ) + col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3168
SELECT - + CAST ( NULL AS INTEGER ) + col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 24 AS col1 FROM tab2, tab1 AS cor0, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to dfdfceb3acab6f866df9d676c07043ad

query I rowsort
SELECT ALL + ( col0 ) + - col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + + 18 * col0 FROM tab1 AS cor0
----
1152
1440
54

query I rowsort
SELECT DISTINCT - 69 * col1 AS col2 FROM tab0 cor0
----
-5934
-6279
-6693

onlyif mysql # use DIV operator for integer division
query I rowsort label-3173
SELECT DISTINCT + col0 * col1 DIV col1 + - col2 FROM tab1 AS cor0
----
-16
-51
7

skipif mysql # not compatible
query I rowsort label-3173
SELECT DISTINCT + col0 * col1 / col1 + - col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT col0 - + col0 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - + 92 FROM tab1 AS cor0
----
-92
-92
-92

query I rowsort
SELECT ALL - 65 * + col0 AS col0 FROM tab1 AS cor0
----
-195
-4160
-5200

onlyif mysql # use DIV operator for integer division
query I rowsort label-3177
SELECT col0 + + col2 DIV cor0.col1 + - col1 AS col2 FROM tab2 AS cor0
----
-24
19
64

skipif mysql # not compatible
query I rowsort label-3177
SELECT col0 + + col2 / cor0.col1 + - col1 AS col2 FROM tab2 AS cor0
----
-24
19
64

query I rowsort
SELECT ALL - - 39 * - col1 FROM tab1 AS cor0
----
-1014
-390
-507

query I rowsort
SELECT DISTINCT + - 57 * cor0.col1 AS col0 FROM tab2 cor0
----
-1767
-3363
-969

query I rowsort
SELECT DISTINCT ( col1 ) + col2 * col1 FROM tab1 AS cor0
----
1261
1430
580

onlyif mysql # use DIV operator for integer division
query I rowsort label-3181
SELECT DISTINCT + col0 DIV - col2 + cor0.col2 * + cor0.col1 FROM tab1 AS cor0
----
1248
1404
569

skipif mysql # not compatible
query I rowsort label-3181
SELECT DISTINCT + col0 / - col2 + cor0.col2 * + cor0.col1 FROM tab1 AS cor0
----
1248
1404
569

query I rowsort
SELECT + - 49 AS col0 FROM tab2 AS cor0
----
-49
-49
-49

query I rowsort
SELECT ALL col2 - cor0.col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT ALL - + col0 + + cor0.col2 * col2 AS col1 FROM tab1 AS cor0
----
2913
3185
9136

query I rowsort
SELECT + - col1 - col1 * - col2 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT DISTINCT + - 81 + - cor0.col1 FROM tab1 AS cor0
----
-107
-91
-94

onlyif mysql # use DIV operator for integer division
query I rowsort label-3187
SELECT - col1 - + col2 DIV - col2 AS col1 FROM tab1 cor0
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-3187
SELECT - col1 - + col2 / - col2 AS col1 FROM tab1 cor0
----
-12
-25
-9

query I rowsort
SELECT DISTINCT ( col1 ) + col1 FROM tab2 cor0
----
118
34
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * col1 + + cor0.col0 col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT ALL cor0.col0 * + col0 AS col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT + ( - cor0.col0 ) + col2 AS col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT + - col0 * + col1 + col0 FROM tab1 cor0
----
-576
-75
-960

query I rowsort
SELECT DISTINCT - + 9 * + col1 + + col0 * + col2 FROM tab1 AS cor0
----
-72
3558
7563

query I rowsort
SELECT DISTINCT + - col1 * - col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT + + col2 + - col2 FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT - cor0.col1 * col0 AS col0 FROM tab0 cor0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor1.col2 col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT DISTINCT + col2 + tab2.col2 + + col2 * col2 AS col0 FROM tab2
----
1520
728
783

query I rowsort
SELECT ALL - 40 + 74 FROM tab1 AS cor0
----
34
34
34

query I rowsort
SELECT 31 + col2 * col0 AS col2 FROM tab2 AS cor0
----
2059
220
3033

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - 60 + - col0 * + col0 col0 FROM tab1 AS cor0
----
-4036
-6340
51

query I rowsort
SELECT ALL - - ( - 54 ) * + cor0.col1 + - col1 AS col1 FROM tab1 AS cor0
----
-1430
-550
-715

query I rowsort
SELECT ALL + col2 + - cor0.col0 AS col0 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT DISTINCT + 37 * col2 AS col2 FROM tab0 AS cor0
----
1221
3034
37

query I rowsort
SELECT cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab1, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT - ( col1 ) * col1 + + col0 AS col0 FROM tab0
----
-7372
-8192
-9374

query I rowsort
SELECT ( ( col2 ) ) - col1 AS col1 FROM tab2
----
-33
-4
21

query I rowsort
SELECT ( 93 ) + col0 AS col2 FROM tab2
----
100
171
172

query I rowsort
SELECT col1 + col1 - tab0.col1 AS col2 FROM tab0
----
86
91
97

query I rowsort
SELECT ALL - ( tab1.col1 + - tab1.col0 ) FROM tab1
----
-23
54
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + 47 * 93 - - col2 * col0 col2 FROM tab0 AS cor0
----
-3579
-4336
2927

query I rowsort
SELECT ALL + - col0 * col2 + + col0 FROM tab2 AS cor0
----
-182
-1950
-2923

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( col0 AS REAL ) col0 FROM tab2
----
7
78
79

query IIIIII rowsort
SELECT * FROM tab2 cor0 CROSS JOIN tab0 WHERE NULL > NULL
----

query I rowsort
SELECT + col0 * + col2 + - col1 * + tab0.col2 FROM tab0
----
-164
-2046
-62

query I rowsort
SELECT ALL - col0 + col1 FROM tab2 AS cor0 WHERE col1 / col1 NOT IN ( - col2 )
----
-19
-62
24

query I rowsort
SELECT DISTINCT tab1.col0 * tab1.col0 AS col2 FROM tab0 AS cor0 CROSS JOIN tab1
----
4096
6400
9

query I rowsort
SELECT col1 * + col2 + - tab0.col1 * + col1 FROM tab0
----
-4558
-819
-9312

query I rowsort
SELECT col0 * col0 * - col1 + - tab2.col2 AS col0 FROM tab2
----
-106135
-1546
-358982

query I rowsort
SELECT ALL + tab1.col1 + col2 * col1 AS col1 FROM tab1
----
1261
1430
580

query I rowsort
SELECT ALL - col2 * + col2 AS col2 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT + col1 + - col0 * col1 FROM tab1
----
-1027
-52
-630

query I rowsort
SELECT DISTINCT - cor0.col2 AS col2 FROM tab2, tab2 AS cor0
----
-26
-27
-38

query III rowsort
SELECT DISTINCT * FROM tab2 AS cor0 WHERE NOT + col2 * col1 IN ( col2 * + col1 - + col0 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT DISTINCT - col0 - + col2 AS col2 FROM tab1 AS cor0
----
-121
-176
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + - col0 * col2 col1 FROM tab2
----
-2087
-220
-3019

query I rowsort
SELECT + col1 + + col0 + col2 AS col1 FROM tab0 AS cor0
----
133
143
262

query I rowsort
SELECT tab2.col2 * + col2 AS col1 FROM tab2
----
1444
676
729

query I rowsort
SELECT DISTINCT + - col0 + + col0 FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3230
SELECT ALL - col1 DIV - cor0.col2 - - col2 AS col1 FROM tab0 AS cor0
----
35
83
98

skipif mysql # not compatible
query I rowsort label-3230
SELECT ALL - col1 / - cor0.col2 - - col2 AS col1 FROM tab0 AS cor0
----
35
83
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3231
SELECT DISTINCT + col2 DIV col1 FROM tab0 cor0
----
0

skipif mysql # not compatible
query I rowsort label-3231
SELECT DISTINCT + col2 / col1 FROM tab0 cor0
----
0

query I rowsort
SELECT DISTINCT + - col0 * - col0 - + col1 FROM tab2 AS cor0
----
18
6025
6224

query I rowsort
SELECT ALL + - col2 + - cor0.col0 AS col1 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT ALL - - col0 * col2 - cor0.col0 * + col2 * col1 AS col0 FROM tab0 cor0
----
-3360
-656820
-67320

query I rowsort
SELECT ALL - col1 * + col1 + + col1 AS col2 FROM tab2
----
-272
-3422
-930

query I rowsort
SELECT + cor0.col1 * - cor0.col2 * col1 FROM tab0 AS cor0
----
-244068
-679042
-9409

query I rowsort
SELECT DISTINCT + col1 * col2 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT - + col0 * ( col2 ) * + cor0.col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( + col1 ) col1 FROM tab2 AS cor0
----
17
31
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3240
SELECT - CAST( 80 AS SIGNED ) * col1 AS col1 FROM tab1 AS cor0
----
-1040
-2080
-800

skipif mysql # not compatible
query I rowsort label-3240
SELECT - CAST ( 80 AS INTEGER ) * col1 AS col1 FROM tab1 AS cor0
----
-1040
-2080
-800

query I rowsort
SELECT ALL + + ( - col0 ) * col1 AS col0 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT col1 * + col0 + + col0 * + col1 FROM tab2
----
2686
434
9204

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3243
SELECT ALL + CAST( NULL AS DECIMAL ) + + 97 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3243
SELECT ALL + CAST ( NULL AS REAL ) + + 97 FROM tab1
----
NULL
NULL
NULL

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0, tab0 AS cor0, tab2 AS cor1
----
972 values hashing to d41be7437523f0dba2158c7f0439f329

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 38 col2 FROM tab0, tab1 AS cor0
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

onlyif mysql # use DIV operator for integer division
query I rowsort label-3246
SELECT - col0 DIV col2 + col1 * + col2 AS col0 FROM tab0
----
2838
62
7461

skipif mysql # not compatible
query I rowsort label-3246
SELECT - col0 / col2 + col1 * + col2 AS col0 FROM tab0
----
2838
62
7461

query I rowsort
SELECT + - ( + col0 ) FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT + 29 + + col1 FROM tab0 AS cor0
----
115
120
126

query I rowsort
SELECT ALL 14 AS col2 FROM tab0, tab0 cor0
----
9 values hashing to 83e5779d2487d12495e7d816c797264f

query I rowsort
SELECT ALL - col2 * + ( col1 * col0 ) AS col2 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT DISTINCT - 77 * + col2 AS col2 FROM tab2
----
-2002
-2079
-2926

query I rowsort
SELECT ALL - col2 * 52 AS col2 FROM tab2
----
-1352
-1404
-1976

query I rowsort
SELECT + 7 * + 59 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 0cc4049b771da504022505d57c3378ab

query I rowsort
SELECT cor0.col0 + 81 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to eb7e09d56aeb6b294bc773efb05e889c

query I rowsort
SELECT - col1 * + col2 * 79 AS col2 FROM tab2 AS cor0
----
-121186
-51034
-66123

query I rowsort
SELECT - - cor0.col2 * + col0 + col2 AS col0 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT 39 AS col0 FROM tab1 cor0
----
39
39
39

query I rowsort
SELECT ALL - col2 * + col0 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT + + 48 + + col1 * - ( 32 ) * col1 FROM tab1 AS cor0
----
-21584
-3152
-5360

query I rowsort
SELECT - - col1 + cor0.col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT + 72 AS col2 FROM tab1 AS cor0
----
72
72
72

query I rowsort
SELECT 71 * col2 AS col1 FROM tab2
----
1846
1917
2698

query I rowsort
SELECT ALL - 60 AS col0 FROM tab1
----
-60
-60
-60

query I rowsort
SELECT DISTINCT + 61 AS col1 FROM tab1
----
61

query I rowsort
SELECT ( col0 ) * col0 + col0 AS col2 FROM tab2
----
56
6162
6320

query I rowsort
SELECT ALL + col2 + + 74 AS col1 FROM tab1 AS cor0
----
128
131
170

query I rowsort
SELECT DISTINCT - col2 + - 86 FROM tab2 AS cor0
----
-112
-113
-124

query I rowsort
SELECT DISTINCT - 15 AS col1 FROM tab1
----
-15

query I rowsort
SELECT DISTINCT 58 * tab2.col2 AS col1 FROM tab2
----
1508
1566
2204

query I rowsort
SELECT - 71 * col0 * + tab2.col2 FROM tab2
----
-13419
-143988
-213142

query I rowsort
SELECT 28 * + col0 AS col2 FROM tab0 AS cor0
----
2492
672
980

query I rowsort
SELECT 50 + col0 AS col0 FROM tab0
----
139
74
85

query I rowsort
SELECT + col1 + - tab1.col1 * col1 AS col2 FROM tab1
----
-156
-650
-90

query I rowsort
SELECT ALL + 79 + - col1 * + tab0.col0 + - col0 AS col0 FROM tab0
----
-2009
-3351
-8109

skipif mysql # not compatible
query I rowsort
SELECT + col1 * + CAST ( - col2 + - col1 AS REAL ) FROM tab2 AS cor0
----
-1798
-5015
-935

query I rowsort
SELECT + - col2 + col1 * 57 AS col2 FROM tab0 AS cor0
----
4869
5105
5528

query I rowsort
SELECT - col0 * 77 + - cor0.col1 FROM tab2 cor0
----
-570
-6065
-6100

query I rowsort
SELECT DISTINCT - + col2 + col0 * + cor0.col2 FROM tab1 AS cor0
----
108
3591
7584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + - col1 * + 1 - - col1 col0 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT - cor0.col2 + + ( col1 ) * - col1 AS col1 FROM tab0 cor0
----
-7429
-8363
-9410

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 + - col2 col1 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT + col2 + + col1 * + col2 AS col1 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT - - ( - col1 ) * - col0 + + cor0.col1 AS col0 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT - col2 - - col1 * col2 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT - + col1 * + col2 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - 50 * - col1 + col0 + - col1 AS col1 FROM tab2 AS cor0
----
1526
2969
912

onlyif mysql # use DIV operator for integer division
query I rowsort label-3287
SELECT + col0 DIV + cor0.col0 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3287
SELECT + col0 / + cor0.col0 FROM tab1 cor0
----
1
1
1

query I rowsort
SELECT + ( - col1 ) + + cor0.col0 * + col2 FROM tab0 AS cor0
----
-62
706
7207

query I rowsort
SELECT cor0.col1 + + col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL + col0 + col0 * + col0 AS col1 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT + - col0 + cor0.col0 AS col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - ( col1 + - tab2.col2 ) * 88 * ( col0 * col0 ) AS col2 FROM tab2
----
-17248
-17667936
11533368

onlyif mysql # use DIV operator for integer division
query I rowsort label-3293
SELECT DISTINCT + col2 DIV + cor0.col0 AS col2 FROM tab2 cor0
----
0
3

skipif mysql # not compatible
query I rowsort label-3293
SELECT DISTINCT + col2 / + cor0.col0 AS col2 FROM tab2 cor0
----
0
3

query I rowsort
SELECT + + col2 + + col1 + cor0.col2 AS col0 FROM tab2 AS cor0
----
111
85
93

query I rowsort
SELECT DISTINCT + ( ( col0 ) ) FROM tab2
----
7
78
79

query I rowsort
SELECT ALL ( 44 ) FROM tab2
----
44
44
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 43 col1 FROM tab1
----
43
43
43

onlyif mysql # use DIV operator for integer division
query I rowsort label-3298
SELECT + 28 DIV + tab1.col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 95c9c05d889679454926776a124029bb

skipif mysql # not compatible
query I rowsort label-3298
SELECT + 28 / + tab1.col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 95c9c05d889679454926776a124029bb

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3299
SELECT ALL + tab0.col0 * ( col1 + CAST( - 26 AS SIGNED ) ) * col2 AS col1 FROM tab0
----
2485
474370
47520

skipif mysql # not compatible
query I rowsort label-3299
SELECT ALL + tab0.col0 * ( col1 + CAST ( - 26 AS INTEGER ) ) * col2 AS col1 FROM tab0
----
2485
474370
47520

query I rowsort
SELECT DISTINCT + ( + col0 ) * col0 * + col0 FROM tab1
----
262144
27
512000

query I rowsort
SELECT 98 * + 65 + + col1 * - col0 AS col2 FROM tab0
----
-1729
2975
4306

query I rowsort
SELECT DISTINCT ( + 51 ) AS col2 FROM tab1 AS cor0
----
51

query I rowsort
SELECT - + col1 + col1 * col2 FROM tab0 cor0
----
0
2752
7371

query I rowsort
SELECT DISTINCT + + col2 * + ( col2 * 17 ) FROM tab1 cor0
----
156672
49572
55233

onlyif mysql # use DIV operator for integer division
query I rowsort label-3305
SELECT DISTINCT - 9 DIV + col0 col1 FROM tab2 AS cor0
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3305
SELECT DISTINCT - 9 / + col0 col1 FROM tab2 AS cor0
----
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3306
SELECT + 51 DIV + col2 AS col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3306
SELECT + 51 / + col2 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 72 FROM tab1 AS cor0
----
72
72
72

query I rowsort
SELECT ALL - - 37 * + col2 + col0 FROM tab1 AS cor0
----
2001
2173
3632

query I rowsort
SELECT DISTINCT + 7 * - col0 FROM tab0 AS cor0
----
-168
-245
-623

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 + - col0 * col0 + + 57 col1 FROM tab2 AS cor0
----
-5949
-6105
15

query I rowsort
SELECT col1 + col1 * + col0 AS col2 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT ALL col2 * col2 + - col1 - + ( col2 ) FROM tab2 AS cor0
----
1389
591
671

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + + col1 col0 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT + 87 AS col1 FROM tab2 AS cor0
----
87
87
87

query I rowsort
SELECT + 0 + + col0 * col0 AS col1 FROM tab1 AS cor0
----
4096
6400
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-3316
SELECT DISTINCT + ( cor0.col1 ) DIV cor0.col1 + + col0 FROM tab2 AS cor0
----
79
8
80

skipif mysql # not compatible
query I rowsort label-3316
SELECT DISTINCT + ( cor0.col1 ) / cor0.col1 + + col0 FROM tab2 AS cor0
----
79
8
80

query I rowsort
SELECT + + col1 * + col0 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT + ( col0 ) * col1 AS col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL + col0 * col0 + col0 * - 39 AS col1 FROM tab2 AS cor0
----
-224
3042
3160

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 10 * + col1 col2 FROM tab1 AS cor0
----
-100
-130
-260

query I rowsort
SELECT ALL - - ( col1 ) * - col2 + + 27 FROM tab2 cor0
----
-1507
-619
-810

query I rowsort
SELECT DISTINCT 66 AS col1 FROM tab0 AS cor0
----
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * col1 + col0 + 86 col0 FROM tab1 AS cor0
----
1206
167
790

query I rowsort
SELECT + col2 * + 0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT col0 + ( col0 ) AS col2 FROM tab1 AS cor0
----
128
160
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-3326
SELECT + - col2 + + cor0.col1 DIV + col1 + col0 FROM tab2 AS cor0
----
-19
42
53

skipif mysql # not compatible
query I rowsort label-3326
SELECT + - col2 + + cor0.col1 / + col1 + col0 FROM tab2 AS cor0
----
-19
42
53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3327
SELECT ALL + - col0 + - CAST( + col0 AS SIGNED ) FROM tab0 AS cor0
----
-178
-48
-70

skipif mysql # not compatible
query I rowsort label-3327
SELECT ALL + - col0 + - CAST ( + col0 AS INTEGER ) FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT + col1 * - col1 + - col1 AS col2 FROM tab0 AS cor0
----
-7482
-8372
-9506

onlyif mysql # use DIV operator for integer division
query I rowsort label-3329
SELECT + col1 * cor0.col1 DIV + col0 FROM tab0 cor0
----
268
308
93

skipif mysql # not compatible
query I rowsort label-3329
SELECT + col1 * cor0.col1 / + col0 FROM tab0 cor0
----
268
308
93

query I rowsort
SELECT col0 + col2 * 4 + - col2 FROM tab2 AS cor0
----
156
193
88

query I rowsort
SELECT ALL + cor0.col1 * 97 FROM tab1 cor0
----
1261
2522
970

query I rowsort
SELECT ALL + - 68 - - col2 FROM tab2 cor0
----
-30
-41
-42

onlyif mysql # use DIV operator for integer division
query I rowsort label-3333
SELECT DISTINCT - cor0.col0 + col2 * col1 DIV col1 FROM tab2 cor0
----
-41
-52
20

skipif mysql # not compatible
query I rowsort label-3333
SELECT DISTINCT - cor0.col0 + col2 * col1 / col1 FROM tab2 cor0
----
-41
-52
20

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3334
SELECT DISTINCT CAST( NULL AS DECIMAL ) - - col2 AS col0 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3334
SELECT DISTINCT CAST ( NULL AS REAL ) - - col2 AS col0 FROM tab2 cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3335
SELECT ALL - CAST( + 67 AS SIGNED ) - col0 FROM tab1 AS cor0
----
-131
-147
-70

skipif mysql # not compatible
query I rowsort label-3335
SELECT ALL - CAST ( + 67 AS INTEGER ) - col0 FROM tab1 AS cor0
----
-131
-147
-70

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab0 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab0 AS cor2, tab0 AS cor3
----
3645 values hashing to 48366b93fe9110d617672483a489e89c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 71 col0 FROM tab2 AS cor0
----
71
71
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-3338
SELECT - col1 DIV + ( col2 ) FROM tab0 AS cor0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-3338
SELECT - col1 / + ( col2 ) FROM tab0 AS cor0
----
-1
-2
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3339
SELECT + + 0 DIV cor0.col1 AS col0 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3339
SELECT + + 0 / cor0.col1 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - ( + 61 ) + col1 FROM tab2 AS cor0
----
-2
-30
-44

query I rowsort
SELECT + col1 + 80 * - col1 FROM tab2
----
-1343
-2449
-4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-3342
SELECT CAST( - col1 AS SIGNED ) DIV col0 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-3342
SELECT CAST ( - col1 AS INTEGER ) / col0 FROM tab0 AS cor0
----
-1
-2
-3

onlyif mysql # use DIV operator for integer division
query I rowsort label-3343
SELECT - 15 DIV 87 AS col1 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3343
SELECT - 15 / 87 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - col2 + col1 * + col1 FROM tab0 AS cor0
----
7363
8199
9408

query I rowsort
SELECT - 88 + 17 FROM tab1
----
-71
-71
-71

onlyif mysql # use DIV operator for integer division
query I rowsort label-3346
SELECT - col0 * col0 + col1 DIV col1 FROM tab1 AS cor0
----
-4095
-6399
-8

skipif mysql # not compatible
query I rowsort label-3346
SELECT - col0 * col0 + col1 / col1 FROM tab1 AS cor0
----
-4095
-6399
-8

query I rowsort
SELECT + 55 AS col1 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 832128adb1ddc65c3105e29cc2c8b3a3

query I rowsort
SELECT - col2 + - 59 FROM tab2 AS cor0
----
-85
-86
-97

query I rowsort
SELECT ALL tab0.col1 * 38 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 84ad71c6d02c194cabb6d219a204bcb2

query I rowsort
SELECT + col1 * + 83 AS col0 FROM tab2
----
1411
2573
4897

onlyif mysql # use DIV operator for integer division
query I rowsort label-3351
SELECT ALL + col2 DIV 53 col0 FROM tab2
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3351
SELECT ALL + col2 / 53 col0 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT col0 + 94 * col1 FROM tab1 cor0
----
1004
1302
2447

query I rowsort
SELECT ALL col2 + 44 * + col0 AS col1 FROM tab2 AS cor0
----
335
3458
3514

query I rowsort
SELECT - 90 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to f6f26b9a04da14807208b93d507095c5

query I rowsort
SELECT ( + 69 ) AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

onlyif mysql # use DIV operator for integer division
query I rowsort label-3356
SELECT - - col2 + + col1 DIV col1 FROM tab2 AS cor0
----
27
28
39

skipif mysql # not compatible
query I rowsort label-3356
SELECT - - col2 + + col1 / col1 FROM tab2 AS cor0
----
27
28
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col1 + + ( col2 ) col2 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT + + col0 + col2 AS col0 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT 82 * col1 AS col0 FROM tab1 AS cor0
----
1066
2132
820

query I rowsort
SELECT DISTINCT 53 AS col2 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
53

query I rowsort
SELECT ALL - 41 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 4ba0c102091f9cbc9fe9439b04584e70

query I rowsort
SELECT ALL + 61 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 07149905a72bd87553381f34d19ed290

query I rowsort
SELECT DISTINCT - col1 - col2 * + col2 * col2 FROM tab0 AS cor0
----
-36023
-551459
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 + - col0 col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + cor0.col0 * - 87 * col0 + col2 AS col0 FROM tab1 AS cor0
----
-356295
-556704
-729

query I rowsort
SELECT ALL - 73 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 2931474b870c05694e446771031a6949

query I rowsort
SELECT ALL - + cor0.col0 * - 24 FROM tab1 cor0
----
1536
1920
72

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 cor0, tab2 cor1, tab0 AS cor2
----
972 values hashing to e4c748f267e8d2a0e6d563281e1fb975

query I rowsort
SELECT + col2 - col0 * col2 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT col0 * col1 * col0 FROM tab1 AS cor0
----
234
40960
83200

query I rowsort
SELECT DISTINCT 23 - - col2 FROM tab1
----
119
77
80

query I rowsort
SELECT + col0 * + 94 AS col1 FROM tab1
----
282
6016
7520

query I rowsort
SELECT - + 61 * col2 - col0 FROM tab1 AS cor0
----
-3297
-3541
-5936

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + col0 col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT - col2 * - 73 - - col1 FROM tab0 AS cor0
----
170
2495
6077

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3376
SELECT ALL + 5 + - col0 * CAST( NULL AS DECIMAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3376
SELECT ALL + 5 + - col0 * CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3377
SELECT DISTINCT + CAST( - col2 AS SIGNED ) FROM tab0
----
-1
-33
-82

skipif mysql # not compatible
query I rowsort label-3377
SELECT DISTINCT + CAST ( - col2 AS INTEGER ) FROM tab0
----
-1
-33
-82

query I rowsort
SELECT ALL col1 * ( + col0 ) * 23 AS col1 FROM tab2
----
105846
30889
4991

query I rowsort
SELECT + col0 + - cor0.col1 * col1 + - 7 FROM tab1 AS cor0
----
-43
-680
-96

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab0, tab0 AS cor0, tab0 cor1
----
-86
-91
-97

query I rowsort
SELECT DISTINCT 8 + col0 FROM tab2 cor0
----
15
86
87

query I rowsort
SELECT ( - col1 ) + col1 * col0 AS col0 FROM tab2 AS cor0
----
1326
186
4543

onlyif mysql # use DIV operator for integer division
query I rowsort label-3383
SELECT DISTINCT - col2 - + col2 DIV - col0 FROM tab0 AS cor0
----
-1
-32
-82

skipif mysql # not compatible
query I rowsort label-3383
SELECT DISTINCT - col2 - + col2 / - col0 FROM tab0 AS cor0
----
-1
-32
-82

query I rowsort
SELECT DISTINCT - col0 + col2 AS col2 FROM tab0 cor0
----
-34
-7
9

query I rowsort
SELECT ALL - + col0 * + col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT cor0.col0 * 87 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 913046721d00a3bdd3e9c7887da83af4

query I rowsort
SELECT ALL 0 * col2 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - ( - col0 ) * col1 AS col2 FROM tab2
----
1343
217
4602

query I rowsort
SELECT + col0 * 5 FROM tab2
----
35
390
395

query I rowsort
SELECT - col0 + + tab2.col1 AS col2 FROM tab2
----
-19
-62
24

query I rowsort
SELECT + col2 + col0 * - tab2.col2 + - col1 FROM tab2
----
-193
-2061
-2981

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3392
SELECT col2 + - col0 * - CAST( NULL AS SIGNED ) - col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3392
SELECT col2 + - col0 * - CAST ( NULL AS INTEGER ) - col2 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3393
SELECT DISTINCT - col1 * col0 + + ( - tab2.col0 ) DIV col1 + col2 col1 FROM tab2
----
-1309
-190
-4577

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3393
SELECT DISTINCT - col1 * col0 + + ( - tab2.col0 ) / col1 + col2 col1 FROM tab2
----
-1309
-190
-4577

query I rowsort
SELECT ALL ( tab0.col1 ) * - col2 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT 39 * + cor0.col0 FROM tab0, tab2, tab1 AS cor0
----
117
2496
3120

query I rowsort
SELECT DISTINCT tab1.col2 + + col0 + - col1 FROM tab1
----
111
163
31

query I rowsort
SELECT DISTINCT 71 + - col2 FROM tab2
----
33
44
45

query I rowsort
SELECT + 3 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 3e22859a313d85a6146c6df5f23d77cf

query I rowsort
SELECT ALL 31 + col0 AS col1 FROM tab1
----
111
34
95

query I rowsort
SELECT col2 * - col0 + + col1 * col1 AS col1 FROM tab2
----
-2713
1453
772

query I rowsort
SELECT + col1 * - col1 + col1 AS col0 FROM tab0
----
-7310
-8190
-9312

query I rowsort
SELECT ALL 63 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 38764a6e696d1a6b5095e29ef84959c0

query I rowsort
SELECT - - 57 AS col2 FROM tab1, tab2, tab0 AS cor0, tab0
----
81 values hashing to 23b62d6905061dab566f3a9e15667302

query I rowsort
SELECT DISTINCT + 44 * col0 AS col2 FROM tab1 cor0
----
132
2816
3520

query I rowsort
SELECT ALL - - col2 + + col2 + + cor0.col1 * col2 AS col1 FROM tab1 AS cor0
----
1440
1512
684

query I rowsort
SELECT DISTINCT - col1 * - 4 FROM tab1 AS cor0
----
104
40
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( 14 ) - + col0 col2 FROM tab2 AS cor0
----
-21
-92
-93

query I rowsort
SELECT ALL - - col0 * + col2 AS col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL - - col2 * ( col0 ) - col1 FROM tab0 AS cor0
----
-62
706
7207

query I rowsort
SELECT ALL col1 + + col1 AS col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT ALL col1 * 60 - + cor0.col2 FROM tab2 AS cor0
----
1833
3514
982

query I rowsort
SELECT DISTINCT + 70 AS col1 FROM tab2 AS cor0
----
70

query I rowsort
SELECT DISTINCT + 41 + - cor0.col1 * + col1 AS col0 FROM tab2 AS cor0
----
-248
-3440
-920

query I rowsort
SELECT - ( cor0.col2 ) AS col2 FROM tab2 AS cor0
----
-26
-27
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 49 col2 FROM tab2 cor0
----
49
49
49

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab1, tab2, tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT 67 AS col2 FROM tab0
----
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-3418
SELECT ALL col0 DIV + col2 + col2 * - col0 FROM tab0 AS cor0
----
-7297
-792
0

skipif mysql # not compatible
query I rowsort label-3418
SELECT ALL col0 / + col2 + col2 * - col0 FROM tab0 AS cor0
----
-7297
-792
0

query I rowsort
SELECT col1 + + 91 FROM tab2 AS cor0
----
108
122
150

query I rowsort
SELECT ALL col0 * + col1 * col2 FROM tab0
----
3395
664118
68112

query I rowsort
SELECT ALL 97 * + col2 * col1 AS col2 FROM tab1
----
121056
136188
55290

query I rowsort
SELECT - 49 + + 77 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab2 cor2
----
81 values hashing to 423726553d33e100432ebde49ddd31b5

query I rowsort
SELECT DISTINCT + col0 * col2 * col0 + + col1 FROM tab0 AS cor0
----
1322
19094
649613

onlyif mysql # use DIV operator for integer division
query I rowsort label-3424
SELECT DISTINCT - col2 DIV 53 FROM tab2 cor0
----
0

skipif mysql # not compatible
query I rowsort label-3424
SELECT DISTINCT - col2 / 53 FROM tab2 cor0
----
0

query I rowsort
SELECT ALL + + cor0.col1 * - 98 - col0 AS col0 FROM tab1 AS cor0
----
-1044
-1354
-2551

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * 63 * ( col1 ) + ( col2 * + col2 + col0 * 7 ) col1 FROM tab2 AS cor0
----
14449
291148
86606

onlyif mysql # use DIV operator for integer division
query I rowsort label-3427
SELECT DISTINCT - col1 * 61 + + 50 * cor0.col2 DIV 39 FROM tab0 AS cor0
----
-5204
-5446
-5916

skipif mysql # not compatible
query I rowsort label-3427
SELECT DISTINCT - col1 * 61 + + 50 * cor0.col2 / 39 FROM tab0 AS cor0
----
-5204
-5446
-5916

query I rowsort
SELECT ALL - - cor0.col2 * ( - col1 ) + col0 * col1 * col2 FROM tab2 AS cor0
----
118118
5022
50388

query I rowsort
SELECT DISTINCT - col1 * + 26 + ( + col1 ) AS col2 FROM tab0 AS cor0
----
-2150
-2275
-2425

query I rowsort
SELECT ALL + col1 - - cor0.col2 * + col2 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT ALL + col2 + - 9 AS col1 FROM tab0
----
-8
24
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-3432
SELECT col2 DIV + 42 + col1 * col0 + + col0 FROM tab0
----
2088
3430
8189

skipif mysql # not compatible
query I rowsort label-3432
SELECT col2 / + 42 + col1 * col0 + + col0 FROM tab0
----
2088
3430
8189

onlyif mysql # use DIV operator for integer division
query I rowsort label-3433
SELECT col0 * + col2 DIV + col2 + 68 + cor0.col2 AS col2 FROM tab0 cor0
----
104
125
239

skipif mysql # not compatible
query I rowsort label-3433
SELECT col0 * + col2 / + col2 + 68 + cor0.col2 AS col2 FROM tab0 cor0
----
104
125
239

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + col0 * - col1 col2 FROM tab2 cor0
----
-1264
-210
-4524

query I rowsort
SELECT + 70 * - col1 AS col2 FROM tab0 AS cor0
----
-6020
-6370
-6790

query I rowsort
SELECT + ( - cor0.col1 ) * - col2 AS col2 FROM tab2 AS cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 8 * col1 col1 FROM tab0 AS cor0
----
-688
-728
-776

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3438
SELECT + - 86 * - col2 - + col2 * - CAST( col0 AS SIGNED ) FROM tab2 AS cor0
----
2511
4264
6270

skipif mysql # not compatible
query I rowsort label-3438
SELECT + - 86 * - col2 - + col2 * - CAST ( col0 AS INTEGER ) FROM tab2 AS cor0
----
2511
4264
6270

query I rowsort
SELECT ALL 83 AS col2 FROM tab1 cor0
----
83
83
83

query I rowsort
SELECT col0 + - 4 * - col2 * col2 FROM tab0 AS cor0
----
26985
39
4380

query I rowsort
SELECT DISTINCT - col0 * col2 + + col1 * + col2 AS col2 FROM tab1 AS cor0
----
-3078
-6432
1242

query I rowsort
SELECT DISTINCT - 46 + + col0 FROM tab2
----
-39
32
33

query I rowsort
SELECT + col1 * - 9 AS col1 FROM tab0 AS cor0
----
-774
-819
-873

query I rowsort
SELECT ALL + + ( + ( col2 ) ) FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT + col0 * 46 * - col1 FROM tab2 AS cor0
----
-211692
-61778
-9982

query I rowsort
SELECT ALL + col2 * + col0 + - 21 * col0 FROM tab1 AS cor0
----
2304
6000
99

query I rowsort
SELECT ALL col2 * cor0.col2 + - 34 + col2 AS col2 FROM tab0 AS cor0
----
-32
1088
6772

query I rowsort
SELECT + + col1 * col1 + col1 FROM tab2 AS cor0
----
306
3540
992

query I rowsort
SELECT ALL - + col0 + col0 + 30 AS col1 FROM tab1 AS cor0
----
30
30
30

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3450
SELECT ALL + CAST( NULL AS SIGNED ) + + col2 + col1 / - 27 AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3450
SELECT ALL + CAST ( NULL AS INTEGER ) + + col2 + col1 / - 27 AS col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col1 * - col1 + - col0 AS col0 FROM tab1 AS cor0
----
36
673
89

query I rowsort
SELECT DISTINCT - col0 + col1 * + col1 AS col0 FROM tab0 AS cor0
----
7372
8192
9374

onlyif mysql # use DIV operator for integer division
query I rowsort label-3453
SELECT + - 72 DIV col2 + + 94 FROM tab1 AS cor0
----
93
93
94

skipif mysql # not compatible
query I rowsort label-3453
SELECT + - 72 / col2 + + 94 FROM tab1 AS cor0
----
93
93
94

query I rowsort
SELECT cor0.col1 + col0 * 89 AS col0 FROM tab2 AS cor0
----
654
7001
7048

query I rowsort
SELECT DISTINCT col0 + + col2 * - col0 AS col2 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT + col2 * + col1 * cor0.col0 + + 15 AS col1 FROM tab1 AS cor0
----
36495
4227
99855

query I rowsort
SELECT ALL + + 57 * col0 FROM tab0 AS cor0
----
1368
1995
5073

query I rowsort
SELECT ( - col0 ) + + col1 + col1 * - cor0.col1 FROM tab1 AS cor0
----
-154
-236
-653

query I rowsort
SELECT ALL + cor0.col0 * + cor0.col1 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL + cor0.col2 * col2 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT - col2 * col0 - + col0 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT 17 FROM tab2, tab0 AS cor0
----
9 values hashing to 43298e43365fccb5146ea32003753c92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - 80 ) col2 FROM tab1, tab2 cor0
----
9 values hashing to 878f012d707aab113cedaf56e6c52e94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3464
SELECT 21 * col2 * + CAST( col0 AS SIGNED ) FROM tab1
----
161280
3402
76608

skipif mysql # not compatible
query I rowsort label-3464
SELECT 21 * col2 * + CAST ( col0 AS INTEGER ) FROM tab1
----
161280
3402
76608

query I rowsort
SELECT + col2 * + cor0.col1 AS col1 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - - col0 * - ( - col1 ) FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT + 17 * - 84 * - col1 AS col2 FROM tab2 cor0
----
24276
44268
84252

query I rowsort
SELECT DISTINCT 54 AS col2 FROM tab1, tab0 AS cor0
----
54

query I rowsort
SELECT ALL cor0.col1 * col1 + - col0 AS col1 FROM tab0 AS cor0
----
7372
8192
9374

query I rowsort
SELECT tab0.col2 + - 98 FROM tab0
----
-16
-65
-97

query I rowsort
SELECT 49 AS col1 FROM tab2 AS cor0
----
49
49
49

query I rowsort
SELECT - 34 * col1 AS col0 FROM tab2 AS cor0
----
-1054
-2006
-578

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col0 + - 71 + - cor0.col0 col2 FROM tab2 AS cor0
----
-127
-6233
-6391

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3474
SELECT ALL + ( + col1 ) * + col2 / CAST( NULL AS SIGNED ) + - cor0.col1 * cor0.col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3474
SELECT ALL + ( + col1 ) * + col2 / CAST ( NULL AS INTEGER ) + - cor0.col1 * cor0.col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 27 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

query I rowsort
SELECT 63 - + col2 FROM tab2 AS cor0
----
25
36
37

query I rowsort
SELECT DISTINCT col1 * - col2 + + col2 * + tab0.col2 FROM tab0
----
-1749
-738
-96

query I rowsort
SELECT ALL col0 * - tab1.col1 * tab1.col1 + col0 * - col0 + col1 * col0 AS col0 FROM tab1
----
-18880
-1959
-9856

onlyif mysql # use DIV operator for integer division
query I rowsort label-3479
SELECT - ( col1 + + col0 ) DIV col0 FROM tab0
----
-2
-3
-4

skipif mysql # not compatible
query I rowsort label-3479
SELECT - ( col1 + + col0 ) / col0 FROM tab0
----
-2
-3
-4

query I rowsort
SELECT 99 + - col2 FROM tab0 AS cor0
----
17
66
98

query I rowsort
SELECT DISTINCT - 36 FROM tab2 AS cor0 CROSS JOIN tab1 cor1
----
-36

query I rowsort
SELECT ALL + col0 * col2 AS col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT DISTINCT tab0.col1 * - 14 - 7 AS col2 FROM tab0
----
-1211
-1281
-1365

query I rowsort
SELECT + col2 * 60 AS col2 FROM tab1
----
3240
3420
5760

query I rowsort
SELECT tab1.col0 * 64 FROM tab1
----
192
4096
5120

query I rowsort
SELECT + 85 AS col1 FROM tab1 AS cor0
----
85
85
85

query I rowsort
SELECT cor1.col1 AS col2 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT 61 + + col1 FROM tab1
----
71
74
87

query I rowsort
SELECT + col1 - + 15 FROM tab2
----
16
2
44

query I rowsort
SELECT DISTINCT 71 AS col2 FROM tab2 AS cor0
----
71

query I rowsort
SELECT - - cor0.col0 + col2 * - col2 AS col1 FROM tab2 AS cor0
----
-1365
-598
-722

query I rowsort
SELECT col1 + - cor0.col0 * - ( - cor0.col2 ) AS col0 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT DISTINCT + 7 * col1 AS col1 FROM tab0
----
602
637
679

onlyif mysql # use DIV operator for integer division
query I rowsort label-3494
SELECT + col2 DIV col0 col1 FROM tab1 AS cor0
----
0
1
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3494
SELECT + col2 / col0 col1 FROM tab1 AS cor0
----
0
1
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-3495
SELECT - + 47 DIV col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3495
SELECT - + 47 / col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - - col2 + - 89 * - col2 * cor0.col1 AS col2 FROM tab2 AS cor0
----
136552
57532
74520

onlyif mysql # use DIV operator for integer division
query I rowsort label-3497
SELECT - col0 * ( col0 ) DIV col0 + ( col2 ) * col0 FROM tab1 AS cor0
----
159
3584
7600

skipif mysql # not compatible
query I rowsort label-3497
SELECT - col0 * ( col0 ) / col0 + ( col2 ) * col0 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT col1 + col1 * col0 AS col0 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT col2 * ( - col0 ) AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT col1 - - 24 * col0 FROM tab1 cor0
----
1546
1933
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3501
SELECT DISTINCT col0 + col1 DIV - col0 AS col2 FROM tab0
----
21
33
88

skipif mysql # not compatible
query I rowsort label-3501
SELECT DISTINCT col0 + col1 / - col0 AS col2 FROM tab0
----
21
33
88

query I rowsort
SELECT - 98 AS col2 FROM tab1
----
-98
-98
-98

query I rowsort
SELECT + + col1 * col0 * + col1 - + col1 AS col0 FROM tab0 AS cor0
----
177418
329218
736918

query I rowsort
SELECT DISTINCT + col1 + + col1 * + tab2.col2 AS col1 FROM tab2
----
1593
663
868

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * 34 col1 FROM tab1 AS cor0
----
340
442
884

query I rowsort
SELECT - col1 + 63 * ( - col1 ) * + 57 AS col2 FROM tab0 AS cor0
----
-308912
-326872
-348424

query I rowsort
SELECT ALL + col0 * - ( - col2 * - col2 ) FROM tab1 AS cor0
----
-207936
-737280
-8748

query I rowsort
SELECT DISTINCT + + cor0.col2 * + col1 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + col2 * 18 FROM tab0
----
1476
18
594

onlyif mysql # use DIV operator for integer division
query I rowsort label-3510
SELECT tab2.col1 DIV - ( - col1 ) AS col2 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3510
SELECT tab2.col1 / - ( - col1 ) AS col2 FROM tab2
----
1
1
1

query I rowsort
SELECT ALL col0 * + col0 * + col0 AS col1 FROM tab1
----
262144
27
512000

query I rowsort
SELECT DISTINCT - + col0 + + col1 * col2 AS col2 FROM tab2 AS cor0
----
1456
567
830

query I rowsort
SELECT + col1 * col2 + - col0 FROM tab0 cor0
----
2814
62
7373

query I rowsort
SELECT - + col2 + - ( col1 ) * + col0 AS col1 FROM tab0 AS cor0
----
-2097
-3396
-8181

query I rowsort
SELECT DISTINCT - + col1 * col1 AS col1 FROM tab2 cor0
----
-289
-3481
-961

onlyif mysql # use DIV operator for integer division
query I rowsort label-3516
SELECT ALL + - 80 DIV col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3516
SELECT ALL + - 80 / col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + - ( - col0 ) * col0 AS col1 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT ALL - ( - 75 ) * - cor0.col1 AS col0 FROM tab1 AS cor0
----
-1950
-750
-975

query I rowsort
SELECT + 50 + + 47 FROM tab1 AS cor0
----
97
97
97

query I rowsort
SELECT ALL + col0 * col1 * + col2 AS col1 FROM tab0 AS cor0
----
3395
664118
68112

onlyif mysql # use DIV operator for integer division
query I rowsort label-3521
SELECT ALL - col2 + + col2 DIV col0 FROM tab0 AS cor0
----
-1
-32
-82

skipif mysql # not compatible
query I rowsort label-3521
SELECT ALL - col2 + + col2 / col0 FROM tab0 AS cor0
----
-1
-32
-82

query I rowsort
SELECT - col1 * 47 FROM tab1 AS cor0
----
-1222
-470
-611

query I rowsort
SELECT DISTINCT - - 14 * + col0 FROM tab1 AS cor0
----
1120
42
896

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 76 col0 FROM tab1 AS cor0
----
76
76
76

query I rowsort
SELECT ALL col2 + col0 * - col1 - col0 AS col2 FROM tab1
----
-1024
-27
-647

query I rowsort
SELECT DISTINCT - col1 * col2 - tab2.col2 FROM tab2
----
-1560
-684
-864

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3527
SELECT col2 + + CAST( NULL AS SIGNED ) - - col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3527
SELECT col2 + + CAST ( NULL AS INTEGER ) - - col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col0 * ( col0 * - col1 ) FROM tab0
----
-118825
-49536
-720811

query I rowsort
SELECT 38 FROM tab0, tab0 AS cor0
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - ( - col2 ) col2 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT - + col2 + col1 * - 33 FROM tab2 AS cor0
----
-1050
-1973
-599

query I rowsort
SELECT DISTINCT + ( cor0.col2 ) + - col2 AS col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT + 18 AS col1 FROM tab2 AS cor0
----
18
18
18

query I rowsort
SELECT - 54 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 4ecdb0f1b85f0d4fdc3a826efd9f2342

query I rowsort
SELECT DISTINCT - col2 + + 51 * col2 AS col0 FROM tab0 AS cor0
----
1650
4100
50

query I rowsort
SELECT + 16 * + col2 FROM tab1 AS cor0
----
1536
864
912

query I rowsort
SELECT + 98 * + tab2.col2 FROM tab2
----
2548
2646
3724

onlyif mysql # use DIV operator for integer division
query I rowsort label-3538
SELECT DISTINCT + ( 10 ) DIV + col0 FROM tab0 cor0
----
0

skipif mysql # not compatible
query I rowsort label-3538
SELECT DISTINCT + ( 10 ) / + col0 FROM tab0 cor0
----
0

query I rowsort
SELECT 62 + - cor0.col2 AS col0 FROM tab1 cor0
----
-34
5
8

query I rowsort
SELECT + 97 + col1 AS col0 FROM tab0 AS cor0
----
183
188
194

query I rowsort
SELECT col1 * col1 * + ( + col1 ) AS col1 FROM tab1
----
1000
17576
2197

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3542
SELECT ALL + CAST( NULL AS SIGNED ) * col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3542
SELECT ALL + CAST ( NULL AS INTEGER ) * col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + ( + 73 ) AS col1 FROM tab0 AS cor0
----
73
73
73

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 88 * col2 + col2 + - col0 col2 FROM tab0 AS cor0
----
2913
54
7209

onlyif mysql # use DIV operator for integer division
query I rowsort label-3545
SELECT + tab1.col1 * 49 DIV + col0 - + col1 AS col0 FROM tab1
----
-3
-6
398

skipif mysql # not compatible
query I rowsort label-3545
SELECT + tab1.col1 * 49 / + col0 - + col1 AS col0 FROM tab1
----
-3
-6
398

query I rowsort
SELECT 22 + - col2 FROM tab2
----
-16
-4
-5

query I rowsort
SELECT + 93 + - ( + col2 ) AS col2 FROM tab1
----
-3
36
39

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3548
SELECT + CAST( NULL AS SIGNED ) + + col1 AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3548
SELECT + CAST ( NULL AS INTEGER ) + + col1 AS col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 * col0 + + cor0.col2 + col0 FROM tab1 cor0
----
4217
6576
66

onlyif mysql # use DIV operator for integer division
query I rowsort label-3550
SELECT col0 + - cor0.col0 DIV cor0.col1 AS col0 FROM tab1 AS cor0
----
3
58
74

skipif mysql # not compatible
query I rowsort label-3550
SELECT col0 + - cor0.col0 / cor0.col1 AS col0 FROM tab1 AS cor0
----
3
58
74

query I rowsort
SELECT ALL - 47 AS col0 FROM tab1
----
-47
-47
-47

query I rowsort
SELECT ALL - ( tab2.col0 + - tab2.col2 ) * + col2 AS col0 FROM tab2
----
-1352
-1558
540

query I rowsort
SELECT cor0.col2 AS col2 FROM tab2, tab1 cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT 1 + - 32 AS col1 FROM tab1
----
-31
-31
-31

query I rowsort
SELECT + col1 * col0 * - 33 AS col1 FROM tab2 AS cor0
----
-151866
-44319
-7161

query I rowsort
SELECT ALL col2 * - ( 5 + + col1 ) FROM tab0 AS cor0
----
-102
-3003
-7872

query I rowsort
SELECT + col0 - + col2 FROM tab0 cor0
----
-9
34
7

query I rowsort
SELECT - col1 + + ( + 56 ) * col2 * + col1 + col1 AS col0 FROM tab0 AS cor0
----
158928
417872
5432

query I rowsort
SELECT tab0.col2 * - col1 AS col0 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT ALL + - col1 + col2 * + col0 AS col1 FROM tab0 cor0
----
-62
706
7207

query I rowsort
SELECT + col0 - - 11 FROM tab2 AS cor0
----
18
89
90

query I rowsort
SELECT ALL col0 + ( + ( + cor0.col2 ) ) FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT col0 - + col1 * col2 AS col0 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT ALL - col1 * col1 + + col2 + col1 AS col2 FROM tab0 AS cor0
----
-7277
-8108
-9311

query I rowsort
SELECT ALL 96 AS col0 FROM tab0
----
96
96
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3566
SELECT ALL col1 + - col0 DIV col2 + - tab0.col0 AS col0 FROM tab0
----
1
27
62

skipif mysql # not compatible
query I rowsort label-3566
SELECT ALL col1 + - col0 / col2 + - tab0.col0 AS col0 FROM tab0
----
1
27
62

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab0 AS cor2
----
972 values hashing to 8b4fcda7f1ca76bad7c7d728f54a51e0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + - 8 * + col1 col1 FROM tab2 AS cor0
----
-221
-446
-98

query I rowsort
SELECT ALL + - col0 * ( + cor0.col1 ) AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - + col1 + + col0 AS col1 FROM tab2 AS cor0
----
-24
19
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + ( ( + col0 ) ) + col1 col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT DISTINCT + - col2 * 41 + - cor0.col1 FROM tab1 AS cor0
----
-2240
-2347
-3949

query I rowsort
SELECT DISTINCT - col2 * + 53 + col2 AS col1 FROM tab2 AS cor0
----
-1352
-1404
-1976

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * - 66 + - 47 col0 FROM tab2 AS cor0
----
-509
-5195
-5261

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3575
SELECT + tab0.col0 + CAST( NULL AS SIGNED ) AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3575
SELECT + tab0.col0 + CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 - 72 AS col2 FROM tab1 AS cor0
----
-69
-8
8

query I rowsort
SELECT DISTINCT + col2 * col0 * ( + col1 ) AS col2 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT DISTINCT col1 * col1 + col2 * col2 FROM tab0 cor0
----
15005
8485
9410

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3579
SELECT + col1 + CAST( + ( - col2 ) AS SIGNED ) * col0 AS col0 FROM tab2 AS cor0
----
-158
-1969
-2985

skipif mysql # not compatible
query I rowsort label-3579
SELECT + col1 + CAST ( + ( - col2 ) AS INTEGER ) * col0 AS col0 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT + col1 + col0 * col2 * + col2 AS col1 FROM tab1
----
207946
737293
8774

query I rowsort
SELECT DISTINCT col2 + - col1 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT col2 * col0 + + tab1.col0 FROM tab1
----
165
3712
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-3583
SELECT DISTINCT col0 DIV col1 + + tab1.col1 FROM tab1
----
16
19
26

skipif mysql # not compatible
query I rowsort label-3583
SELECT DISTINCT col0 / col1 + + tab1.col1 FROM tab1
----
16
19
26

query I rowsort
SELECT - + col0 + col2 * col2 AS col0 FROM tab1 AS cor0
----
2913
3185
9136

query I rowsort
SELECT + col0 + col2 + tab1.col2 * col2 AS col1 FROM tab1
----
2973
3370
9392

query I rowsort
SELECT ALL col0 + - tab2.col2 * - col1 FROM tab2
----
1612
725
844

onlyif mysql # use DIV operator for integer division
query I rowsort label-3587
SELECT + col1 * col0 DIV + col1 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3587
SELECT + col1 * col0 / + col1 FROM tab0
----
24
35
89

query I rowsort
SELECT ALL col1 + + col1 AS col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT - col0 / - col0 FROM tab0 WHERE NOT + col0 * col0 - - col0 * + col0 > - col1 * col1
----

query I rowsort
SELECT - col2 * col0 + + col1 AS col0 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT + col2 + col1 * - col1 AS col0 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT - - cor0.col1 * + col1 AS col2 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT + 58 AS col1 FROM tab1 AS cor0
----
58
58
58

query I rowsort
SELECT ALL + cor0.col1 * - col2 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT col0 + - col0 * col1 AS col2 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT DISTINCT 59 + cor0.col2 * col1 FROM tab2 AS cor0
----
1593
705
896

query I rowsort
SELECT ALL + + 86 + col1 AS col1 FROM tab1 cor0
----
112
96
99

query I rowsort
SELECT + cor0.col1 * + col0 + + col1 AS col0 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT + - 72 - - cor0.col0 * 67 AS col2 FROM tab1 AS cor0
----
129
4216
5288

query I rowsort
SELECT DISTINCT - - ( + cor0.col0 ) FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL - - col0 * - col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT - 70 + - col0 FROM tab1 AS cor0
----
-134
-150
-73

query I rowsort
SELECT - - col0 - - col1 AS col2 FROM tab1 cor0
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 92 col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 1af709a79a3e56281ffdce4d931d5965

query I rowsort
SELECT DISTINCT - + 18 + + tab0.col2 FROM tab0, tab2, tab0 AS cor0
----
-17
15
64

query I rowsort
SELECT DISTINCT + tab2.col2 AS col0 FROM tab2, tab2 AS cor0
----
26
27
38

query I rowsort
SELECT + cor0.col2 * cor0.col2 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT DISTINCT 87 * col1 FROM tab2
----
1479
2697
5133

query I rowsort
SELECT DISTINCT + col0 * - tab2.col1 AS col2 FROM tab2
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-3610
SELECT + col0 DIV - tab0.col2 FROM tab0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-3610
SELECT + col0 / - tab0.col2 FROM tab0
----
-1
-35
0

query I rowsort
SELECT ALL col0 * - 16 FROM tab0 cor0
----
-1424
-384
-560

query I rowsort
SELECT ALL 92 - - col1 AS col0 FROM tab1
----
102
105
118

query I rowsort
SELECT - - col0 - col2 AS col0 FROM tab0 AS cor0
----
-9
34
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3614
SELECT 51 / col2 + - CAST( NULL AS SIGNED ) * col2 / col2 + col2 AS col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3614
SELECT 51 / col2 + - CAST ( NULL AS INTEGER ) * col2 / col2 + col2 AS col0 FROM tab1
----
NULL
NULL
NULL

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0, tab0, tab2 cor1
----
972 values hashing to e486ce227b61d9db6f8414f9d6361094

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 CROSS JOIN tab2, tab2 AS cor1, tab0 AS cor2
----
972 values hashing to 63ccb67e72ebac679a0221202c067b9e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 91 col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 5748627ef5fd86a21cd559fd278d7277

query I rowsort
SELECT DISTINCT + + col1 - + col1 AS col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - cor0.col0 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query I rowsort
SELECT ALL + ( col1 ) * col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL ( 83 ) FROM tab2
----
83
83
83

query I rowsort
SELECT + 64 * col1 + tab1.col1 FROM tab1
----
1690
650
845

query I rowsort
SELECT col2 * col0 + - col1 FROM tab0
----
-62
706
7207

query I rowsort
SELECT - 87 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 84bcab58a965cc8ae97b39d2d01b3d23

query I rowsort
SELECT + 89 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT DISTINCT + 12 FROM tab2
----
12

query I rowsort
SELECT ALL + ( col1 ) AS col0 FROM tab2
----
17
31
59

query I rowsort
SELECT + cor0.col0 + + col0 AS col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT - + col2 + - 20 AS col0 FROM tab1 AS cor0
----
-116
-74
-77

query I rowsort
SELECT DISTINCT 53 FROM tab1, tab1 AS cor0
----
53

query I rowsort
SELECT ( - tab1.col0 ) + - col1 * 88 AS col0 FROM tab1
----
-1224
-2291
-944

query I rowsort
SELECT col1 + - 34 AS col2 FROM tab0
----
52
57
63

query I rowsort
SELECT ALL + 50 FROM tab2, tab1 cor0
----
9 values hashing to dea2d1b74e0cdf67806af8c417324f52

query I rowsort
SELECT + + 46 * col1 AS col2 FROM tab0 AS cor0
----
3956
4186
4462

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 41 AS col0 FROM tab1 cor0
----
41
41
41

query I rowsort
SELECT + 83 * + col2 AS col0 FROM tab0 AS cor0
----
2739
6806
83

query I rowsort
SELECT ALL + - col0 + - col1 * - col0 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT - 63 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 5a7845ef6e239561caf9a17a28e274b5

query I rowsort
SELECT ALL cor0.col2 + - col1 * - col1 AS col1 FROM tab2 cor0
----
327
3507
988

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3641
SELECT DISTINCT + + col1 * - col1 + + CAST( + col0 * + col1 AS SIGNED ) col2 FROM tab0 AS cor0
----
-182
-5332
-6014

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3641
SELECT DISTINCT + + col1 * - col1 + + CAST ( + col0 * + col1 AS INTEGER ) col2 FROM tab0 AS cor0
----
-182
-5332
-6014

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( 22 ) + cor0.col1 col2 FROM tab0, tab0 AS cor0
----
108
113
119

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col0 col2 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab0, tab2, tab1 cor0, tab1 AS cor1
----
-54
-57
-96

query I rowsort
SELECT 27 + - col1 * + col2 AS col1 FROM tab2
----
-1507
-619
-810

query I rowsort
SELECT ALL + col1 * cor0.col0 + + col2 AS col2 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT ALL - 13 * col1 AS col2 FROM tab2 AS cor0
----
-221
-403
-767

query I rowsort
SELECT DISTINCT - 0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT - - col1 * - col2 * 92 FROM tab2 cor0
----
-141128
-59432
-77004

onlyif mysql # use DIV operator for integer division
query I rowsort label-3650
SELECT ALL col0 DIV col2 - - col1 DIV col1 AS col1 FROM tab1 AS cor0
----
1
1
2

skipif mysql # not compatible
query I rowsort label-3650
SELECT ALL col0 / col2 - - col1 / col1 AS col1 FROM tab1 AS cor0
----
1
1
2

query I rowsort
SELECT ALL + cor0.col2 + + cor0.col2 * + ( col2 ) * col0 AS col0 FROM tab2 cor0
----
114114
5130
52754

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3652
SELECT DISTINCT - - 94 * col0 + + CAST( NULL AS DECIMAL ) AS col0 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3652
SELECT DISTINCT - - 94 * col0 + + CAST ( NULL AS REAL ) AS col0 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - col0 + col1 * - cor0.col0 FROM tab0 cor0
----
-2088
-3430
-8188

query I rowsort
SELECT col0 * 42 * 46 FROM tab1
----
123648
154560
5796

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + + col0 col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT DISTINCT col0 + 28 * col1 FROM tab2
----
1730
555
875

query I rowsort
SELECT DISTINCT col2 + 42 AS col0 FROM tab0
----
124
43
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + 7 col2 FROM tab2
----
14
85
86

query I rowsort
SELECT + tab1.col2 * ( - 4 ) + tab1.col2 FROM tab1
----
-162
-171
-288

query I rowsort
SELECT DISTINCT - col1 + cor0.col0 * - col1 FROM tab1 cor0
----
-104
-1053
-650

query I rowsort
SELECT + - col1 + 60 + col2 AS col1 FROM tab2 AS cor0
----
27
56
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-3662
SELECT ALL + col2 DIV - ( ( + col0 ) ) FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-3662
SELECT ALL + col2 / - ( ( + col0 ) ) FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT ALL - col1 * + ( + col2 ) AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT col0 * cor0.col2 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT - 22 * + col0 + + cor0.col2 - col1 FROM tab2 AS cor0
----
-158
-1717
-1749

query I rowsort
SELECT ALL + 64 * - 66 + col0 FROM tab1 cor0
----
-4144
-4160
-4221

onlyif mysql # use DIV operator for integer division
query I rowsort label-3667
SELECT ALL - col2 DIV col1 + + col0 * 62 AS col0 FROM tab0 AS cor0
----
1488
2170
5518

skipif mysql # not compatible
query I rowsort label-3667
SELECT ALL - col2 / col1 + + col0 * 62 AS col0 FROM tab0 AS cor0
----
1488
2170
5518

query I rowsort
SELECT DISTINCT - cor0.col1 * col2 * col2 + col0 - 62 FROM tab2 AS cor0
----
-22654
-24531
-39868

query I rowsort
SELECT - ( col2 ) + cor0.col1 * col1 * - cor0.col0 FROM tab1 AS cor0
----
-13616
-2082
-6457

onlyif mysql # use DIV operator for integer division
query I rowsort label-3670
SELECT ALL ( - col0 ) DIV - col2 + col0 AS col2 FROM tab0 AS cor0
----
24
70
90

skipif mysql # not compatible
query I rowsort label-3670
SELECT ALL ( - col0 ) / - col2 + col0 AS col2 FROM tab0 AS cor0
----
24
70
90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3671
SELECT DISTINCT CAST( - col2 AS SIGNED ) * + cor0.col0 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-3671
SELECT DISTINCT CAST ( - col2 AS INTEGER ) * + cor0.col0 AS col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT - ( + col1 ) * + col0 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + 41 * col0 + col1 FROM tab2 AS cor0
----
318
3256
3257

query I rowsort
SELECT - col2 * + col2 AS col2 FROM tab1 cor0
----
-2916
-3249
-9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col1 + - col0 col1 FROM tab1
----
-54
-67
23

query I rowsort
SELECT DISTINCT - tab2.col2 * - ( 61 ) + col0 * + col1 FROM tab2
----
1864
3661
6188

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - 69 * col0 - col0 col2 FROM tab0
----
-2450
-503651
-54672

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3678
SELECT + col2 + - CAST( NULL AS SIGNED ) AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3678
SELECT + col2 + - CAST ( NULL AS INTEGER ) AS col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT col2 * col2 - + col2 * tab1.col0 * + col2 FROM tab1
----
-204687
-5832
-728064

query I rowsort
SELECT ALL ( col1 ) AS col0 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT col2 * - 10 + col2 * + col1 FROM tab0 AS cor0
----
2508
6642
87

query I rowsort
SELECT DISTINCT - col0 * col1 + + col0 - + 85 AS col0 FROM tab1 AS cor0
----
-1045
-160
-661

query I rowsort
SELECT DISTINCT + + col1 * 19 FROM tab0 AS cor0
----
1634
1729
1843

query I rowsort
SELECT DISTINCT col0 * tab2.col1 + 73 + + tab2.col2 FROM tab2
----
1454
317
4701

query I rowsort
SELECT DISTINCT + col2 * - col2 AS col1 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT cor0.col1 + + ( col0 ) * - col1 FROM tab2 AS cor0
----
-1326
-186
-4543

onlyif mysql # use DIV operator for integer division
query I rowsort label-3687
SELECT + col1 + col1 DIV - col0 col0 FROM tab1 AS cor0
----
10
13
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3687
SELECT + col1 + col1 / - col0 col0 FROM tab1 AS cor0
----
10
13
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-3688
SELECT ALL + col2 DIV + col1 col0 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3688
SELECT ALL + col2 / + col1 col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col1 + - 21 AS col0 FROM tab0 AS cor0
----
-107
-112
-118

query I rowsort
SELECT ALL + col2 + col0 * col0 AS col1 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT DISTINCT - + cor0.col2 + + col2 FROM tab2 AS cor0
----
0

query I rowsort
SELECT cor0.col0 * - ( + 92 ) AS col1 FROM tab0 AS cor0
----
-2208
-3220
-8188

query I rowsort
SELECT + ( col2 ) + + col1 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT + + col0 + + col1 FROM tab0 cor0
----
110
132
180

query I rowsort
SELECT ALL - col1 * col0 * + cor0.col0 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT 14 * - ( - col2 ) + col0 + col2 FROM tab2 cor0
----
412
468
649

query I rowsort
SELECT DISTINCT + 60 FROM tab1 cor0
----
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * col2 + - col1 col2 FROM tab1 AS cor0
----
-188
-3658
-7693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col2 col2 FROM tab2, tab2 cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT 29 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 4c56285992bcb76e1aac22e6d23d1318

onlyif mysql # use DIV operator for integer division
query I rowsort label-3701
SELECT + col2 * - 66 + + col1 DIV + cor0.col1 FROM tab2 AS cor0
----
-1715
-1781
-2507

skipif mysql # not compatible
query I rowsort label-3701
SELECT + col2 * - 66 + + col1 / + cor0.col1 FROM tab2 AS cor0
----
-1715
-1781
-2507

query I rowsort
SELECT - ( + col1 ) + + col2 FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3703
SELECT - col1 DIV + tab0.col2 FROM tab0
----
-1
-2
-97

skipif mysql # not compatible
query I rowsort label-3703
SELECT - col1 / + tab0.col2 FROM tab0
----
-1
-2
-97

query I rowsort
SELECT col2 + col1 * - col1 + col2 AS col0 FROM tab2
----
-213
-3429
-907

query I rowsort
SELECT ALL - 27 AS col0 FROM tab2 AS cor0
----
-27
-27
-27

onlyif mysql # use DIV operator for integer division
query I rowsort label-3706
SELECT + col0 DIV - col1 AS col2 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3706
SELECT + col0 / - col1 AS col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + - col2 + - col1 * - ( col1 + col0 ) * + col0 FROM tab2 AS cor0
----
128890
630448
8219

onlyif mysql # use DIV operator for integer division
query I rowsort label-3708
SELECT DISTINCT - col2 DIV - col2 FROM tab1 cor0
----
1

skipif mysql # not compatible
query I rowsort label-3708
SELECT DISTINCT - col2 / - col2 FROM tab1 cor0
----
1

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 ALL 44 AS col0 FROM tab0 AS cor0
----
44
44
44

query I rowsort
SELECT + + ( - col1 ) * col0 AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-3712
SELECT - 99 + + col1 DIV col1 FROM tab0 AS cor0
----
-98
-98
-98

skipif mysql # not compatible
query I rowsort label-3712
SELECT - 99 + + col1 / col1 FROM tab0 AS cor0
----
-98
-98
-98

query I rowsort
SELECT ALL 63 * + col1 AS col1 FROM tab1 AS cor0
----
1638
630
819

query I rowsort
SELECT + + 12 FROM tab0 AS cor0
----
12
12
12

query I rowsort
SELECT DISTINCT - + col0 * col0 + + col1 * + 64 AS col1 FROM tab1 AS cor0
----
-3456
-5568
1655

query I rowsort
SELECT ALL + - ( - col1 ) FROM tab0 AS cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3717
SELECT ALL - - col0 DIV col1 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3717
SELECT ALL - - col0 / col1 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL 19 + - col2 FROM tab0 AS cor0
----
-14
-63
18

query I rowsort
SELECT ALL + - col2 + col2 + col2 AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT - col0 + + col1 * + col1 FROM tab2 AS cor0
----
210
3403
954

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 15 col0 FROM tab0 cor0
----
15
15
15

query I rowsort
SELECT - 46 * + col2 AS col2 FROM tab2 AS cor0
----
-1196
-1242
-1748

query I rowsort
SELECT ALL - - cor0.col0 * col1 + 83 FROM tab0 AS cor0
----
2147
3478
8182

query I rowsort
SELECT cor1.col1 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

onlyif mysql # use DIV operator for integer division
query I rowsort label-3725
SELECT ALL col0 DIV col0 AS col2 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3725
SELECT ALL col0 / col0 AS col2 FROM tab0
----
1
1
1

query I rowsort
SELECT tab2.col1 + 55 FROM tab2, tab2 cor0
----
9 values hashing to bcf346291241327f0570698dc447a27e

onlyif mysql # use DIV operator for integer division
query I rowsort label-3727
SELECT col1 DIV 63 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3727
SELECT col1 / 63 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3728
SELECT ALL + + col2 + CAST( + col0 AS SIGNED ) * - col1 FROM tab2 cor0
----
-1305
-190
-4576

skipif mysql # not compatible
query I rowsort label-3728
SELECT ALL + + col2 + CAST ( + col0 AS INTEGER ) * - col1 FROM tab2 cor0
----
-1305
-190
-4576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 + col1 col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT + 68 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
68

query I rowsort
SELECT + 23 + col1 AS col2 FROM tab2
----
40
54
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-3732
SELECT + col2 DIV col1 + 28 AS col1 FROM tab2 cor0
----
28
28
30

skipif mysql # not compatible
query I rowsort label-3732
SELECT + col2 / col1 + 28 AS col1 FROM tab2 cor0
----
28
28
30

query I rowsort
SELECT cor0.col0 + + 52 FROM tab2, tab1 AS cor0 CROSS JOIN tab0
----
27 values hashing to ddc89e985607596d9bfffabf52312e76

query I rowsort
SELECT ALL col1 * - tab1.col1 AS col1 FROM tab1
----
-100
-169
-676

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 CROSS JOIN tab0, tab1, tab1 cor1 WHERE NOT ( NULL ) NOT IN ( cor1.col0 )
----

query I rowsort
SELECT DISTINCT - ( - ( + col2 ) ) FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT + cor0.col1 * col0 * + col1 + + col2 AS col0 FROM tab1 AS cor0
----
13616
2082
6457

query I rowsort
SELECT - - 84 FROM tab0 AS cor0
----
84
84
84

query I rowsort
SELECT DISTINCT - 13 * ( col1 ) AS col0 FROM tab1 cor0
----
-130
-169
-338

query I rowsort
SELECT - 57 * + col1 AS col0 FROM tab0
----
-4902
-5187
-5529

query I rowsort
SELECT DISTINCT 97 + col1 AS col1 FROM tab2 AS cor0
----
114
128
156

query I rowsort
SELECT + col0 * col2 * col2 + - 83 FROM tab1 AS cor0
----
207853
737197
8665

query I rowsort
SELECT + tab0.col1 + + col2 FROM tab0 WHERE ( NULL ) NOT IN ( col1 )
----

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL IN ( - col0 )
----

query I rowsort
SELECT ALL + col0 + - col1 AS col1 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT tab1.col0 + col1 AS col0 FROM tab1
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-3747
SELECT DISTINCT tab0.col0 DIV col0 + + col0 FROM tab0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-3747
SELECT DISTINCT tab0.col0 / col0 + + col0 FROM tab0
----
25
36
90

query I rowsort
SELECT - col0 + + col0 + + col0 * col1 FROM tab0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * - col2 col0 FROM tab0 WHERE NOT NULL NOT BETWEEN - col2 * col2 AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + col2 col0 FROM tab0
----
119
173
98

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL IN ( + col1 + - col2 + - tab2.col2 )
----

query I rowsort
SELECT col1 - - col1 AS col1 FROM tab0
----
172
182
194

query III rowsort
SELECT * FROM tab0 WHERE NOT col1 * - col0 * col1 BETWEEN NULL AND NULL
----

query I rowsort
SELECT DISTINCT tab1.col0 + col2 FROM tab1
----
121
176
57

query I rowsort
SELECT tab0.col1 * - col1 AS col2 FROM tab0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT - col2 * tab2.col1 + + col0 AS col0 FROM tab2
----
-1456
-567
-830

query I rowsort
SELECT DISTINCT tab2.col0 + - col0 * col2 FROM tab2
----
-182
-1950
-2923

query III rowsort
SELECT * FROM tab0 WHERE NOT col2 / + col1 BETWEEN NULL AND NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3759
SELECT ALL - + 75 DIV cor0.col1 + ( col1 ) * - col0 - + col2 AS col2 FROM tab0 AS cor0
----
-2097
-3396
-8181

skipif mysql # not compatible
query I rowsort label-3759
SELECT ALL - + 75 / cor0.col1 + ( col1 ) * - col0 - + col2 AS col2 FROM tab0 AS cor0
----
-2097
-3396
-8181

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + cor0.col2 * + col0 col1 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT ALL + - col0 * - col0 AS col2 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT col2 + tab2.col2 + col2 FROM tab2
----
114
78
81

query III rowsort
SELECT * FROM tab0 WHERE col1 >= col1
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

onlyif mysql # use DIV operator for integer division
query I rowsort label-3764
SELECT col1 + - col2 DIV col2 FROM tab1
----
12
25
9

skipif mysql # not compatible
query I rowsort label-3764
SELECT col1 + - col2 / col2 FROM tab1
----
12
25
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + col2 col0 FROM tab2
----
55
58
85

query I rowsort
SELECT col0 + - col1 + col1 * + tab0.col0 AS col0 FROM tab0
----
2002
3333
8097

query I rowsort
SELECT ALL col2 FROM tab2 WHERE NULL = col0 * col0
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT col2 * col2 NOT IN ( + col2 )
----

query I rowsort
SELECT DISTINCT - col2 + col0 AS col2 FROM tab2
----
-20
41
52

query I rowsort
SELECT + col2 - + col0 * col2 * col2 FROM tab2
----
-114038
-5076
-52702

query I rowsort
SELECT ALL - col1 * col1 + col2 AS col2 FROM tab0
----
-7363
-8199
-9408

query I rowsort
SELECT col1 * - col0 + col1 AS col1 FROM tab1
----
-1027
-52
-630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + + col0 col1 FROM tab1
----
121
176
57

query I rowsort
SELECT col2 + - col2 * - tab1.col1 AS col0 FROM tab1
----
1344
1458
627

query I rowsort
SELECT DISTINCT - col2 * + col0 * + col0 AS col1 FROM tab0
----
-1225
-19008
-649522

query I rowsort
SELECT col2 / - cor0.col2 AS col1 FROM tab2 AS cor0 WHERE ( col2 ) BETWEEN NULL AND NULL
----

query III rowsort
SELECT * FROM tab2 cor0 WHERE NOT ( NULL ) IN ( col0 * + cor0.col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-3778
SELECT col0 + col1 DIV - tab1.col1 FROM tab1
----
2
63
79

skipif mysql # not compatible
query I rowsort label-3778
SELECT col0 + col1 / - tab1.col1 FROM tab1
----
2
63
79

query I rowsort
SELECT ALL + tab2.col0 + col1 FROM tab2
----
137
38
96

query I rowsort
SELECT ALL col1 * col2 * col2 AS col2 FROM tab1
----
119808
32490
75816

query I rowsort
SELECT - ( col2 ) * col1 + ( col1 + col2 ) FROM tab2 AS cor0
----
-1449
-591
-779

query I rowsort
SELECT DISTINCT - ( - col0 ) AS col0 FROM tab1 AS cor0
----
3
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3783
SELECT - CAST( NULL AS SIGNED ) * col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3783
SELECT - CAST ( NULL AS INTEGER ) * col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 25 * col2 + col2 + col0 AS col0 FROM tab0 AS cor0
----
2221
61
882

query I rowsort
SELECT DISTINCT - col2 * 10 + + col2 AS col1 FROM tab2 AS cor0
----
-234
-243
-342

onlyif mysql # use DIV operator for integer division
query I rowsort label-3786
SELECT col2 + + 96 * col1 DIV 50 FROM tab1 AS cor0
----
103
120
76

skipif mysql # not compatible
query I rowsort label-3786
SELECT col2 + + 96 * col1 / 50 FROM tab1 AS cor0
----
103
120
76

query I rowsort
SELECT DISTINCT + col2 * - col1 + cor0.col1 * ( 57 ) AS col1 FROM tab2 AS cor0
----
1829
323
930

onlyif mysql # use DIV operator for integer division
query I rowsort label-3788
SELECT DISTINCT col0 * 73 + + col2 DIV + col0 FROM tab2
----
514
5694
5767

skipif mysql # not compatible
query I rowsort label-3788
SELECT DISTINCT col0 * 73 + + col2 / + col0 FROM tab2
----
514
5694
5767

query I rowsort
SELECT DISTINCT 58 AS col0 FROM tab1, tab2 AS cor0
----
58

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 cor0, tab0, tab1 AS cor1
----
972 values hashing to 465d072d2d9eababbfc8e88b82707474

query I rowsort
SELECT col0 * col2 + col0 AS col1 FROM tab0
----
70
7387
816

query I rowsort
SELECT ALL ( + 23 ) * col0 FROM tab2
----
161
1794
1817

onlyif mysql # use DIV operator for integer division
query I rowsort label-3793
SELECT ALL + 67 DIV + col2 AS col2 FROM tab0
----
0
2
67

skipif mysql # not compatible
query I rowsort label-3793
SELECT ALL + 67 / + col2 AS col2 FROM tab0
----
0
2
67

query I rowsort
SELECT ALL + ( + col1 * - tab0.col1 ) AS col1 FROM tab0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL - 49 * ( + tab0.col0 ) FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to d108f3bdef1d4b5a496a51e39b16742e

query I rowsort
SELECT ALL col1 * + col0 AS col2 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT 50 + - ( col1 ) * col0 * - col2 AS col0 FROM tab2 AS cor0
----
119702
51084
5909

query I rowsort
SELECT cor0.col1 * col1 + col2 AS col0 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT ALL - 78 AS col1 FROM tab1 AS cor0
----
-78
-78
-78

query I rowsort
SELECT 97 + col0 * col1 FROM tab2
----
1440
314
4699

query I rowsort
SELECT ALL 40 + + cor0.col0 AS col0 FROM tab1 AS cor0
----
104
120
43

query I rowsort
SELECT ALL col0 - - col2 AS col1 FROM tab1
----
121
176
57

query I rowsort
SELECT ALL - col1 * - col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT col0 * cor0.col2 * ( + cor0.col2 ) AS col1 FROM tab0 AS cor0
----
26136
35
598436

query I rowsort
SELECT ( col0 ) - col1 AS col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT 32 + col1 AS col0 FROM tab2
----
49
63
91

query I rowsort
SELECT col1 - col0 * col1 * + col0 FROM tab2 AS cor0
----
-106080
-1488
-358897

query I rowsort
SELECT DISTINCT - col0 * col0 + - col1 * - col0 * + 90 AS col2 FROM tab2 AS cor0
----
114629
19481
408096

query I rowsort
SELECT + - cor0.col2 * + 78 + col1 * - col0 FROM tab0 AS cor0
----
-14495
-3473
-4638

query I rowsort
SELECT - col2 + - 96 * + cor0.col2 FROM tab2 AS cor0
----
-2522
-2619
-3686

query I rowsort
SELECT DISTINCT - - cor0.col1 + col2 * 27 AS col0 FROM tab1 AS cor0
----
1484
1549
2605

query I rowsort
SELECT ALL + col0 + col0 AS col2 FROM tab1 cor0
----
128
160
6

query I rowsort
SELECT + + cor0.col1 * col2 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT cor0.col1 + - col0 * cor0.col1 * - col1 AS col1 FROM tab2 AS cor0
----
22848
271577
6758

onlyif mysql # use DIV operator for integer division
query I rowsort label-3815
SELECT + col0 DIV + col0 - - col0 * col1 AS col0 FROM tab2 AS cor0
----
1344
218
4603

skipif mysql # not compatible
query I rowsort label-3815
SELECT + col0 / + col0 - - col0 * col1 AS col0 FROM tab2 AS cor0
----
1344
218
4603

query I rowsort
SELECT ALL + col0 * - 4 + col0 AS col2 FROM tab1 cor0
----
-192
-240
-9

query I rowsort
SELECT DISTINCT + cor0.col0 * + ( ( + col1 ) ) - + 2 AS col1 FROM tab0 cor0
----
2062
3393
8097

query I rowsort
SELECT DISTINCT - + col2 * col1 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3819
SELECT ALL + - cor0.col2 + CAST( col0 AS SIGNED ) FROM tab2 AS cor0
----
-20
41
52

skipif mysql # not compatible
query I rowsort label-3819
SELECT ALL + - cor0.col2 + CAST ( col0 AS INTEGER ) FROM tab2 AS cor0
----
-20
41
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * 70 col0 FROM tab1 AS cor0
----
210
4480
5600

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3821
SELECT ALL + + cor0.col0 * CAST( - col1 AS SIGNED ) - col2 FROM tab2 cor0
----
-1381
-244
-4628

skipif mysql # not compatible
query I rowsort label-3821
SELECT ALL + + cor0.col0 * CAST ( - col1 AS INTEGER ) - col2 FROM tab2 cor0
----
-1381
-244
-4628

query I rowsort
SELECT - col2 * cor0.col2 + col2 * - col0 FROM tab0 AS cor0
----
-14022
-1881
-36

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3823
SELECT DISTINCT + col0 * + CAST( col1 AS SIGNED ) FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-3823
SELECT DISTINCT + col0 * + CAST ( col1 AS INTEGER ) FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT col1 + + ( - col0 ) FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT ALL - col0 * + 66 + col1 AS col0 FROM tab1 cor0
----
-172
-4214
-5267

onlyif mysql # use DIV operator for integer division
query I rowsort label-3826
SELECT DISTINCT + col2 DIV - col0 AS col2 FROM tab2 AS cor0
----
-3
0

skipif mysql # not compatible
query I rowsort label-3826
SELECT DISTINCT + col2 / - col0 AS col2 FROM tab2 AS cor0
----
-3
0

query I rowsort
SELECT + 43 FROM tab0, tab2 AS cor0
----
9 values hashing to 199105619049271147956de52e7f5ed4

query I rowsort
SELECT ALL - 59 FROM tab1, tab0 cor0 CROSS JOIN tab1 cor1
----
27 values hashing to 582c5aa5e5b4fc3f2ea27e7637992d1f

query I rowsort
SELECT - ( col0 + 97 ) * + col2 * col0 AS col0 FROM tab1
----
-1359360
-16200
-587328

query I rowsort
SELECT + cor0.col2 + + col2 AS col1 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT DISTINCT col2 + - col2 * ( + col1 ) AS col1 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT DISTINCT col2 + + col1 * cor0.col2 FROM tab0 AS cor0
----
2871
7544
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab2.col0 col2 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
7
78
79

query I rowsort
SELECT - 93 + + 50 FROM tab1, tab2 AS cor0
----
9 values hashing to ab0c314d2b589ccedb9a875beeb1f86a

query I rowsort
SELECT col0 + - 52 FROM tab2 AS cor0
----
-45
26
27

query I rowsort
SELECT DISTINCT col1 * + col1 AS col2 FROM tab0 cor0
----
7396
8281
9409

query I rowsort
SELECT ALL - + col2 * - 40 * cor0.col1 FROM tab1 AS cor0
----
22800
49920
56160

query I rowsort
SELECT ALL + ( - ( - cor0.col2 ) ) FROM tab0, tab1 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT ALL + cor0.col2 * + ( - 34 ) AS col1 FROM tab2 AS cor0
----
-1292
-884
-918

onlyif mysql # use DIV operator for integer division
query I rowsort label-3840
SELECT ALL col1 DIV 4 FROM tab0 AS cor0
----
21
22
24

skipif mysql # not compatible
query I rowsort label-3840
SELECT ALL col1 / 4 FROM tab0 AS cor0
----
21
22
24

query I rowsort
SELECT ( - col2 ) * col2 FROM tab2 cor0
----
-1444
-676
-729

query I rowsort
SELECT + col1 * col2 + col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT DISTINCT - + col0 + - col0 + - col0 * col0 FROM tab1 AS cor0
----
-15
-4224
-6560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3844
SELECT ALL + - CAST( col1 AS SIGNED ) * + col0 AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

skipif mysql # not compatible
query I rowsort label-3844
SELECT ALL + - CAST ( col1 AS INTEGER ) * + col0 AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL col1 + col0 * col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT DISTINCT - - col1 - + col0 FROM tab0 AS cor0
----
2
62

query I rowsort
SELECT ALL + + 90 FROM tab0 cor0
----
90
90
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - ( + col0 ) col0 FROM tab0 AS cor0
----
-178
-48
-70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - col0 ) + col2 col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL - ( cor0.col1 ) + col2 AS col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT col2 * + ( 1 ) * - col0 AS col2 FROM tab2
----
-189
-2028
-3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3852
SELECT CAST( NULL AS SIGNED ) + - ( + col2 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3852
SELECT CAST ( NULL AS INTEGER ) + - ( + col2 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 92 FROM tab2 cor0
----
92
92
92

query I rowsort
SELECT + cor0.col2 + + col1 * col2 AS col0 FROM tab1 AS cor0
----
1344
1458
627

query I rowsort
SELECT DISTINCT - 82 FROM tab0
----
-82

query I rowsort
SELECT DISTINCT col0 * 18 FROM tab1
----
1152
1440
54

query I rowsort
SELECT + ( - col2 ) * col0 * - col2 FROM tab2
----
114076
5103
52728

onlyif mysql # use DIV operator for integer division
query I rowsort label-3858
SELECT DISTINCT - col0 DIV + 31 FROM tab1
----
-2
0

skipif mysql # not compatible
query I rowsort label-3858
SELECT DISTINCT - col0 / + 31 FROM tab1
----
-2
0

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0, tab2 AS cor0, tab0 cor1
----
972 values hashing to 86dbd337f00ab84c613ad03d6fc06e28

query I rowsort
SELECT cor2.col1 FROM tab2, tab0 AS cor0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to a5b6acb471910ea4ad7f31cae3b818f7

query I rowsort
SELECT - col0 + + cor0.col2 FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT + col2 * col1 FROM tab1 cor0
----
1248
1404
570

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0, tab0 cor1, tab2 cor2
----
972 values hashing to 89714dd446b7a97f8787d5744bdbf323

query I rowsort
SELECT ALL - - col2 + + col1 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT ALL - 1 * - col2 * cor0.col0 - + col2 AS col1 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT - + col0 + + col2 * col2 FROM tab2 AS cor0
----
1365
598
722

query I rowsort
SELECT - - col1 * - col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT - + 37 AS col0 FROM tab2 AS cor0
----
-37
-37
-37

query I rowsort
SELECT DISTINCT - ( tab0.col1 ) * + tab0.col1 FROM tab0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL ( - col2 ) * col1 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT + 11 AS col1 FROM tab1
----
11
11
11

query I rowsort
SELECT + - col1 * cor0.col0 - - ( - col0 ) FROM tab1 AS cor0
----
-1120
-704
-81

query I rowsort
SELECT DISTINCT col0 * - ( + col1 ) AS col1 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT + col2 * - 26 * col0 AS col0 FROM tab1 AS cor0
----
-199680
-4212
-94848

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3875
SELECT tab0.col1 + + CAST( NULL AS SIGNED ) * - 35 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3875
SELECT tab0.col1 + + CAST ( NULL AS INTEGER ) * - 35 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT tab1.col2 * col1 + col1 AS col2 FROM tab1
----
1261
1430
580

query I rowsort
SELECT + - col1 * - col0 + 18 + cor0.col2 * 13 * col2 AS col1 FROM tab1 AS cor0
----
120866
38004
42895

query I rowsort
SELECT ( + tab0.col2 ) * col2 * col0 FROM tab0
----
26136
35
598436

query I rowsort
SELECT - col2 * col2 + + col1 + col0 FROM tab1 AS cor0
----
-2887
-3175
-9123

query I rowsort
SELECT col0 * + ( - 27 ) * col1 + - col0 AS col2 FROM tab0
----
-218762
-55752
-91700

query I rowsort
SELECT - 54 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 4ecdb0f1b85f0d4fdc3a826efd9f2342

query I rowsort
SELECT ALL col2 + + 62 * + col2 AS col1 FROM tab1 AS cor0
----
3402
3591
6048

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3883
SELECT CAST( NULL AS SIGNED ) * + cor0.col2 FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3883
SELECT CAST ( NULL AS INTEGER ) * + cor0.col2 FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT 48 + + col0 FROM tab1
----
112
128
51

query I rowsort
SELECT ALL + col2 * col1 AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + cor0.col1 + - 63 FROM tab1 AS cor0
----
-37
-50
-53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3887
SELECT ALL - - col1 * CAST( - col0 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

skipif mysql # not compatible
query I rowsort label-3887
SELECT ALL - - col1 * CAST ( - col0 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL + 72 + - col0 AS col0 FROM tab0
----
-17
37
48

query I rowsort
SELECT - 48 * + col1 AS col1 FROM tab1
----
-1248
-480
-624

query I rowsort
SELECT - + cor0.col2 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT 93 * col0 AS col2 FROM tab2
----
651
7254
7347

onlyif mysql # use DIV operator for integer division
query I rowsort label-3892
SELECT DISTINCT + tab0.col1 + + col2 DIV + 24 AS col2 FROM tab0
----
87
94
97

skipif mysql # not compatible
query I rowsort label-3892
SELECT DISTINCT + tab0.col1 + + col2 / + 24 AS col2 FROM tab0
----
87
94
97

query I rowsort
SELECT DISTINCT 10 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
10

query I rowsort
SELECT - col1 * 60 AS col2 FROM tab0 AS cor0
----
-5160
-5460
-5820

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 22 col1 FROM tab1, tab2 AS cor0
----
9 values hashing to c55ee7433d8d39a59b1de2aadd9538c9

query I rowsort
SELECT - col1 + - col0 AS col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT ALL - + col2 + + col2 + + ( + col2 ) AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT + col0 + - 41 * - col1 * col0 FROM tab2 AS cor0
----
188760
55142
8904

query I rowsort
SELECT DISTINCT - col1 * 7 * col0 AS col0 FROM tab0 cor0
----
-14448
-23765
-56693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 * ( col0 ) + - col0 * + col0 col1 FROM tab0 AS cor0
----
-1152
-15842
-2450

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 + ( col2 ) col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL col1 * 32 + col0 AS col0 FROM tab0 AS cor0
----
2776
3001
3139

query I rowsort
SELECT DISTINCT + + col0 * + 18 AS col2 FROM tab0 cor0
----
1602
432
630

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3904
SELECT CAST( NULL AS SIGNED ) / col1 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3904
SELECT CAST ( NULL AS INTEGER ) / col1 AS col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col0 * 17 * + col1 FROM tab2 AS cor0
----
22831
3689
78234

query I rowsort
SELECT + ( - 77 ) - col0 FROM tab1 AS cor0
----
-141
-157
-80

query I rowsort
SELECT - + col1 * 28 - - col0 FROM tab2 AS cor0
----
-1574
-397
-861

query I rowsort
SELECT + + 49 AS col0 FROM tab0 AS cor0
----
49
49
49

query I rowsort
SELECT col2 + col0 * cor0.col1 AS col2 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT - 80 * ( + col2 ) AS col2 FROM tab0 AS cor0
----
-2640
-6560
-80

query I rowsort
SELECT + + col0 * - cor0.col2 AS col2 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - 60 + cor0.col0 AS col2 FROM tab1 AS cor0
----
-57
20
4

query I rowsort
SELECT - col2 * cor0.col1 * - col1 AS col0 FROM tab0 cor0
----
244068
679042
9409

query I rowsort
SELECT - 15 + - col1 + + col0 FROM tab2 AS cor0
----
-39
4
47

query I rowsort
SELECT DISTINCT col1 * 20 AS col0 FROM tab1
----
200
260
520

query I rowsort
SELECT DISTINCT + + ( col2 ) AS col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL + + col0 + - col2 AS col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ( - col1 ) + + 69 + - 5 FROM tab2 AS cor0
----
33
47
5

query I rowsort
SELECT DISTINCT 64 * col1 * + 37 AS col0 FROM tab1 AS cor0
----
23680
30784
61568

query I rowsort
SELECT col2 + + cor0.col2 * ( 78 ) FROM tab1 AS cor0
----
4266
4503
7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-3921
SELECT ALL + col1 * cor0.col2 DIV col0 FROM tab2 AS cor0
----
119
19
8

skipif mysql # not compatible
query I rowsort label-3921
SELECT ALL + col1 * cor0.col2 / col0 FROM tab2 AS cor0
----
119
19
8

query I rowsort
SELECT DISTINCT + ( + cor0.col2 ) AS col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL + + col0 * cor0.col0 FROM tab2 AS cor0
----
49
6084
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 17 col1 FROM tab1 AS cor0
----
-17
-17
-17

query I rowsort
SELECT - col1 * + col2 + ( - 83 ) FROM tab1 AS cor0
----
-1331
-1487
-653

query I rowsort
SELECT DISTINCT + 19 + col0 * col0 FROM tab2 cor0
----
6103
6260
68

query I rowsort
SELECT DISTINCT col1 * - col0 AS col1 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT + - col1 + cor0.col0 + + cor0.col1 * 39 AS col0 FROM tab1 cor0
----
444
574
991

query I rowsort
SELECT - cor0.col0 * - col0 AS col0 FROM tab2 AS cor0
----
49
6084
6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-3930
SELECT ( 87 ) DIV - tab0.col2 - ( col0 ) FROM tab0
----
-122
-26
-90

skipif mysql # not compatible
query I rowsort label-3930
SELECT ( 87 ) / - tab0.col2 - ( col0 ) FROM tab0
----
-122
-26
-90

query I rowsort
SELECT cor0.col1 + col0 + - col1 AS col1 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL - col0 + col2 AS col1 FROM tab1 cor0
----
-7
16
51

query I rowsort
SELECT - + cor0.col1 * + col1 FROM tab1 AS cor0
----
-100
-169
-676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + col2 col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT DISTINCT 43 * col1 FROM tab2 AS cor0
----
1333
2537
731

query I rowsort
SELECT ALL - - col2 + + col1 * - 82 AS col2 FROM tab1 AS cor0
----
-2078
-763
-970

query I rowsort
SELECT + - col1 + - col0 + col2 AS col0 FROM tab1 cor0
----
-17
25
3

query I rowsort
SELECT + col2 * cor0.col0 + + col2 AS col1 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT ALL + col2 * 98 * + col0 FROM tab2 AS cor0
----
18522
198744
294196

query I rowsort
SELECT - col0 * - 36 + col0 + cor0.col0 FROM tab2 AS cor0
----
266
2964
3002

query I rowsort
SELECT ALL - - col0 + ( col0 ) FROM tab1 AS cor0
----
128
160
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-3942
SELECT DISTINCT - col2 DIV + 79 AS col2 FROM tab0 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-3942
SELECT DISTINCT - col2 / + 79 AS col2 FROM tab0 AS cor0
----
-1
0

query I rowsort
SELECT ALL + - cor0.col1 * - col0 + + cor0.col2 * col1 FROM tab2 cor0
----
1054
1989
6136

query I rowsort
SELECT ALL + cor0.col1 * - 69 + col1 + + ( col1 ) * cor0.col2 FROM tab1 AS cor0
----
-110
-364
364

query I rowsort
SELECT DISTINCT - 98 FROM tab0 cor0
----
-98

query I rowsort
SELECT DISTINCT - - col1 * - cor0.col2 + + col1 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT ALL + + col1 * + 34 FROM tab2 AS cor0
----
1054
2006
578

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3948
SELECT + CAST( NULL AS DECIMAL ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3948
SELECT + CAST ( NULL AS REAL ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3949
SELECT ALL - col0 DIV - col2 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3949
SELECT ALL - col0 / - col2 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT - 38 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to e571541ae40cb0ddaca16e11f4359507

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-3952
SELECT ALL - col0 - col0 DIV col1 FROM tab2
----
-7
-79
-83

skipif mysql # not compatible
query I rowsort label-3952
SELECT ALL - col0 - col0 / col1 FROM tab2
----
-7
-79
-83

query I rowsort
SELECT col1 + + tab0.col1 * col0 * 72 AS col1 FROM tab0
----
148694
244537
583219

query I rowsort
SELECT col1 * tab1.col1 + - tab1.col0 FROM tab1
----
36
673
89

query I rowsort
SELECT ALL col2 - col0 AS col0 FROM tab1
----
-7
16
51

query I rowsort
SELECT DISTINCT - - col1 * - 72 FROM tab1 AS cor0
----
-1872
-720
-936

onlyif mysql # use DIV operator for integer division
query I rowsort label-3957
SELECT DISTINCT cor0.col2 * 48 DIV - col1 + cor0.col2 FROM tab0 AS cor0
----
1
15
39

skipif mysql # not compatible
query I rowsort label-3957
SELECT DISTINCT cor0.col2 * 48 / - col1 + cor0.col2 FROM tab0 AS cor0
----
1
15
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 30 col2 FROM tab2, tab0 AS cor0
----
9 values hashing to da5de0c411a2c0f445400f1b63ea9f89

query I rowsort
SELECT DISTINCT ( col1 ) * - col1 + - ( - ( cor0.col2 ) ) + + 61 * col0 AS col0 FROM tab0 AS cor0
----
-2770
-5899
-7273

onlyif mysql # use DIV operator for integer division
query I rowsort label-3960
SELECT DISTINCT - - col2 DIV + 77 + + 86 FROM tab2 cor0
----
86

skipif mysql # not compatible
query I rowsort label-3960
SELECT DISTINCT - - col2 / + 77 + + 86 FROM tab2 cor0
----
86

query I rowsort
SELECT - cor0.col2 + 68 AS col2 FROM tab1 AS cor0
----
-28
11
14

query I rowsort
SELECT DISTINCT - + col0 * - col1 + col1 AS col2 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT DISTINCT cor0.col0 * - col1 * - col1 FROM tab2 AS cor0
----
22831
271518
6727

query I rowsort
SELECT ALL + col1 * 66 AS col0 FROM tab0
----
5676
6006
6402

query I rowsort
SELECT 39 AS col0 FROM tab2, tab1, tab2 AS cor0, tab1 AS cor1
----
81 values hashing to 9c9fbbb9cf0068f5900dff6ceb1046eb

onlyif mysql # use DIV operator for integer division
query I rowsort label-3966
SELECT DISTINCT col2 DIV + ( 68 * col0 ) FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-3966
SELECT DISTINCT col2 / + ( 68 * col0 ) FROM tab1
----
0

query I rowsort
SELECT ALL + col2 + 53 FROM tab0 cor0
----
135
54
86

query I rowsort
SELECT DISTINCT col0 * + 69 + col0 FROM tab0 AS cor0
----
1680
2450
6230

query I rowsort
SELECT DISTINCT col2 * 80 * - 82 FROM tab2
----
-170560
-177120
-249280

query I rowsort
SELECT DISTINCT - col0 * + tab0.col2 FROM tab0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-3971
SELECT DISTINCT col2 DIV + tab2.col0 FROM tab2
----
0
3

skipif mysql # not compatible
query I rowsort label-3971
SELECT DISTINCT col2 / + tab2.col0 FROM tab2
----
0
3

query I rowsort
SELECT DISTINCT - 54 * 89 FROM tab0, tab1 AS cor0
----
-4806

query I rowsort
SELECT ALL + 5 + - ( + col0 ) FROM tab1
----
-59
-75
2

query I rowsort
SELECT DISTINCT 98 AS col1 FROM tab1, tab2 AS cor0
----
98

query I rowsort
SELECT 27 + - col1 FROM tab0
----
-59
-64
-70

query I rowsort
SELECT - - cor0.col0 + + cor0.col2 AS col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT - 66 * + col2 FROM tab1 AS cor0
----
-3564
-3762
-6336

onlyif mysql # use DIV operator for integer division
query I rowsort label-3978
SELECT - CAST( col2 AS SIGNED ) DIV tab2.col1 - 79 AS col1 FROM tab2
----
-79
-79
-81

skipif mysql # not compatible
query I rowsort label-3978
SELECT - CAST ( col2 AS INTEGER ) / tab2.col1 - 79 AS col1 FROM tab2
----
-79
-79
-81

query I rowsort
SELECT 62 * col0 AS col2 FROM tab0
----
1488
2170
5518

query I rowsort
SELECT + 53 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to fede6033dee346dbd272085c05724fda

onlyif mysql # use DIV operator for integer division
query I rowsort label-3981
SELECT + CAST( + col1 AS SIGNED ) * - col1 + col1 DIV 27 col1 FROM tab0
----
-7393
-8278
-9406

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3981
SELECT + CAST ( + col1 AS INTEGER ) * - col1 + col1 / 27 col1 FROM tab0
----
-7393
-8278
-9406

query I rowsort
SELECT 89 * 51 FROM tab0
----
4539
4539
4539

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3983
SELECT DISTINCT - CAST( col1 AS SIGNED ) + - col0 * + col1 * - 95 FROM tab1
----
60790
7384
98787

skipif mysql # not compatible
query I rowsort label-3983
SELECT DISTINCT - CAST ( col1 AS INTEGER ) + - col0 * + col1 * - 95 FROM tab1
----
60790
7384
98787

query I rowsort
SELECT ALL col2 + + col1 AS col2 FROM tab2
----
55
58
85

query I rowsort
SELECT 25 FROM tab1
----
25
25
25

query I rowsort
SELECT DISTINCT + - col2 * cor0.col2 FROM tab2 AS cor0
----
-1444
-676
-729

onlyif mysql # use DIV operator for integer division
query I rowsort label-3987
SELECT + - 48 DIV + col1 FROM tab2 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-3987
SELECT + - 48 / + col1 FROM tab2 AS cor0
----
-1
-2
0

query I rowsort
SELECT - + 14 FROM tab1 AS cor0
----
-14
-14
-14

query I rowsort
SELECT ALL 28 * col2 AS col1 FROM tab1 AS cor0
----
1512
1596
2688

query I rowsort
SELECT ALL + ( col2 ) * + col0 + + 51 AS col1 FROM tab0 AS cor0
----
7349
843
86

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col2 col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 - cor0.col0 col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL + col1 * + cor0.col0 AS col1 FROM tab0 cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 * - col0 * + col2 col0 FROM tab1 AS cor0
----
-233472
-486
-614400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + cor0.col0 + + col1 * + col2 col2 FROM tab2 AS cor0
----
1054
1989
6136

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 10 * col0 * - col0 + - col0 col1 FROM tab2 cor0
----
-497
-60918
-62489

query I rowsort
SELECT DISTINCT - - cor0.col0 * col0 * + col2 FROM tab2 cor0
----
1323
158184
237158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + - cor0.col1 col0 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT + + cor0.col1 * + col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - + col2 * cor0.col0 AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - - ( + col0 ) * ( - 34 ) * col1 + - cor0.col0 * 98 AS col1 FROM tab0 AS cor0
----
-118860
-284088
-72528

query I rowsort
SELECT ALL - col0 + - col1 AS col0 FROM tab2 AS cor0
----
-137
-38
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 97 col2 FROM tab0 AS cor0
----
97
97
97

query I rowsort
SELECT + + cor0.col0 FROM tab2, tab1, tab2 cor0
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + col1 col1 FROM tab1 AS cor0
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + cor0.col2 ) col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

query I rowsort
SELECT + + col0 + + cor0.col0 FROM tab2 AS cor0
----
14
156
158

skipif mysql # not compatible
query I rowsort
SELECT ALL + + 55 * - cor0.col0 - CAST ( - col1 AS REAL ) AS col0 FROM tab1 AS cor0
----
-139
-3510
-4387

query I rowsort
SELECT - + col0 + - ( col1 ) AS col2 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT + col0 + - 61 AS col2 FROM tab2 AS cor0
----
-54
17
18

query I rowsort
SELECT + + col2 * 12 FROM tab1 AS cor0
----
1152
648
684

query I rowsort
SELECT + col2 + col2 * - cor0.col2 FROM tab2 AS cor0
----
-1406
-650
-702

query I rowsort
SELECT - 67 * + col2 AS col2 FROM tab0 AS cor0
----
-2211
-5494
-67

query I rowsort
SELECT DISTINCT - 71 * 68 - - col0 FROM tab1 AS cor0
----
-4748
-4764
-4825

query I rowsort
SELECT DISTINCT - ( - 40 ) AS col0 FROM tab2 AS cor0
----
40

query I rowsort
SELECT ALL + + 39 * + col1 FROM tab2 AS cor0
----
1209
2301
663

query I rowsort
SELECT + - cor0.col0 + + col0 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - - 0 * - col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - CAST ( col0 AS REAL ) FROM tab2 AS cor0
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * cor0.col1 * + col2 + col2 col0 FROM tab1 AS cor0
----
16320
36558
5757

query I rowsort
SELECT - + col2 * - col0 * col0 AS col0 FROM tab0 AS cor0
----
1225
19008
649522

onlyif mysql # use DIV operator for integer division
query I rowsort label-4022
SELECT - 79 DIV cor0.col2 AS col2 FROM tab1 AS cor0
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-4022
SELECT - 79 / cor0.col2 AS col2 FROM tab1 AS cor0
----
-1
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4023
SELECT - - 4 DIV col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4023
SELECT - - 4 / col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + col0 * col1 * col1 AS col2 FROM tab1 cor0
----
13520
2028
6400

query I rowsort
SELECT - 98 + ( col0 ) AS col2 FROM tab2 AS cor0
----
-19
-20
-91

onlyif mysql # use DIV operator for integer division
query I rowsort label-4026
SELECT - col0 DIV col1 AS col0 FROM tab1 AS cor0
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-4026
SELECT - col0 / col1 AS col0 FROM tab1 AS cor0
----
-6
-6
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4027
SELECT + tab0.col2 DIV - ( col1 * + col1 + col0 ) AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4027
SELECT + tab0.col2 / - ( col1 * + col1 + col0 ) AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( - tab2.col2 AS REAL ) + tab2.col2 * - col2 AS col2 FROM tab2
----
-1482
-702
-756

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4029
SELECT ( - tab1.col0 ) * - CAST( NULL AS SIGNED ) FROM tab1, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4029
SELECT ( - tab1.col0 ) * - CAST ( NULL AS INTEGER ) FROM tab1, tab0 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-4030
SELECT DISTINCT + col2 DIV ( - col0 ) FROM tab2 AS cor0
----
-3
0

skipif mysql # not compatible
query I rowsort label-4030
SELECT DISTINCT + col2 / ( - col0 ) FROM tab2 AS cor0
----
-3
0

query I rowsort
SELECT 82 + 12 FROM tab0 AS cor0
----
94
94
94

query I rowsort
SELECT DISTINCT col1 * 68 FROM tab1 AS cor0
----
1768
680
884

query I rowsort
SELECT tab1.col2 * + 44 FROM tab1
----
2376
2508
4224

query I rowsort
SELECT ALL 46 * + col0 + - col1 FROM tab1 AS cor0
----
112
2934
3667

query I rowsort
SELECT DISTINCT + col1 - + cor0.col2 FROM tab0 AS cor0
----
53
9
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4036
SELECT DISTINCT - - CAST( + col1 AS SIGNED ) FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-4036
SELECT DISTINCT - - CAST ( + col1 AS INTEGER ) FROM tab0 AS cor0
----
86
91
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4037
SELECT - CAST( NULL AS SIGNED ) * cor0.col1 - col2 / - 89 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4037
SELECT - CAST ( NULL AS INTEGER ) * cor0.col1 - col2 / - 89 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 18 * + 41 + col0 * col0 AS col2 FROM tab0 AS cor0
----
1314
1963
8659

query I rowsort
SELECT - ( + col1 ) AS col1 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT ALL + + ( col1 ) FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL - col1 + - 70 * col0 FROM tab1 AS cor0
----
-236
-4490
-5613

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1, tab2, tab2 AS cor0
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-4043
SELECT ALL col2 - col1 DIV 65 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-4043
SELECT ALL col2 - col1 / 65 FROM tab1
----
54
57
96

query I rowsort
SELECT DISTINCT col2 * + col2 * tab2.col2 - tab2.col0 * + col0 FROM tab2
----
11492
19634
48631

query I rowsort
SELECT ALL col2 - + col1 * - col2 * tab2.col2 AS col2 FROM tab2
----
22626
24586
39910

query I rowsort
SELECT 63 AS col1 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 38764a6e696d1a6b5095e29ef84959c0

query I rowsort
SELECT ALL col2 * col2 + - col0 FROM tab0
----
-34
1065
6635

query I rowsort
SELECT + 17 + + ( - col0 + col2 ) AS col1 FROM tab0 AS cor0
----
-17
10
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + + col2 * - cor0.col1 col2 FROM tab0 cor0
----
-2752
-7371
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4050
SELECT ALL - 33 DIV 3 FROM tab0 AS cor0
----
-11
-11
-11

skipif mysql # not compatible
query I rowsort label-4050
SELECT ALL - 33 / 3 FROM tab0 AS cor0
----
-11
-11
-11

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4051
SELECT + CAST( NULL AS SIGNED ) + + 69 + col2 * col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4051
SELECT + CAST ( NULL AS INTEGER ) + + 69 + col2 * col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 87 + - cor0.col0 * ( col1 ) * col2 AS col2 FROM tab1 AS cor0
----
-36567
-4299
-99927

query I rowsort
SELECT - cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

skipif mysql # not compatible
query I rowsort
SELECT + cor0.col2 - CAST ( + col2 AS REAL ) / col2 AS col1 FROM tab1 cor0
----
53
56
95

query I rowsort
SELECT - col1 + + ( col0 ) FROM tab0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT - col0 * + col2 - + col2 * col2 FROM tab0
----
-14022
-1881
-36

query I rowsort
SELECT + col1 * + col1 - - 46 FROM tab0 AS cor0
----
7442
8327
9455

query I rowsort
SELECT DISTINCT - col2 * + 1 * col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT 76 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
76

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0 AS cor0, tab2 AS cor1, tab0 cor2
----
972 values hashing to 9345325155d9f4d7dc4986690c631cb9

query I rowsort
SELECT col0 + 58 AS col2 FROM tab1
----
122
138
61

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab0 AS cor2, tab1 AS cor3
----
3645 values hashing to 25b7fe296c05e1a753085cc7e649d673

query I rowsort
SELECT DISTINCT + col2 * - 46 FROM tab1
----
-2484
-2622
-4416

query I rowsort
SELECT DISTINCT - col2 * ( + col0 ) AS col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - col2 * - 20 FROM tab0 AS cor0
----
1640
20
660

query I rowsort
SELECT ALL + + cor0.col2 * col0 * + col2 AS col1 FROM tab1 AS cor0
----
207936
737280
8748

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + col0 col2 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL + cor0.col2 * 86 FROM tab2 AS cor0
----
2236
2322
3268

query I rowsort
SELECT ALL col2 + - col0 - col1 FROM tab2 AS cor0
----
-11
-111
-58

query I rowsort
SELECT + col2 + - cor0.col1 AS col0 FROM tab2 AS cor0
----
-33
-4
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-4071
SELECT ALL + + col2 + + col0 DIV col0 FROM tab1 cor0
----
55
58
97

skipif mysql # not compatible
query I rowsort label-4071
SELECT ALL + + col2 + + col0 / col0 FROM tab1 cor0
----
55
58
97

query I rowsort
SELECT - + col2 * - ( - cor0.col0 * col2 ) AS col1 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT DISTINCT + ( cor0.col2 ) * + cor0.col2 FROM tab1 AS cor0
----
2916
3249
9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * 42 col2 FROM tab2 AS cor0
----
1302
2478
714

query I rowsort
SELECT ALL + + 35 AS col2 FROM tab1 cor0
----
35
35
35

query I rowsort
SELECT ALL + col1 + - col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + 74 AS col1 FROM tab2 AS cor0
----
74
74
74

query I rowsort
SELECT + ( + 80 ) FROM tab1 cor0
----
80
80
80

query I rowsort
SELECT - 45 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 71160abf09589695379a70558726f0ba

query I rowsort
SELECT DISTINCT col2 - - ( col2 ) * - col2 FROM tab1
----
-2862
-3192
-9120

query I rowsort
SELECT ALL - col0 + col1 AS col0 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT ALL 22 AS col1 FROM tab2 AS cor0
----
22
22
22

query I rowsort
SELECT + 47 * + col0 AS col0 FROM tab1 AS cor0
----
141
3008
3760

query I rowsort
SELECT + col0 + + col1 * - col2 AS col0 FROM tab1 AS cor0
----
-1168
-1401
-506

onlyif mysql # use DIV operator for integer division
query I rowsort label-4085
SELECT + + col1 DIV col0 AS col2 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-4085
SELECT + + col1 / col0 AS col2 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT - + cor0.col1 + col1 AS col2 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4087
SELECT DISTINCT - 30 DIV - col0 FROM tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-4087
SELECT DISTINCT - 30 / - col0 FROM tab0 AS cor0
----
0
1

query I rowsort
SELECT + 57 + col0 AS col1 FROM tab0 AS cor0
----
146
81
92

query I rowsort
SELECT ALL + 32 + col2 FROM tab1 AS cor0
----
128
86
89

query I rowsort
SELECT DISTINCT + - 42 FROM tab0 AS cor0
----
-42

query I rowsort
SELECT ALL 47 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 3f991632e9c7c5142e1d80857cd10a2d

query I rowsort
SELECT DISTINCT + ( + 89 ) AS col1 FROM tab0, tab0 AS cor0, tab0 cor1
----
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4093
SELECT - + col1 * CAST( NULL AS DECIMAL ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4093
SELECT - + col1 * CAST ( NULL AS REAL ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort
SELECT - col0 * - CAST ( + ( - col0 ) * col0 AS REAL ) AS col0 FROM tab1 AS cor0
----
-262144
-27
-512000

query I rowsort
SELECT DISTINCT + - col2 * + ( col0 ) AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4096
SELECT DISTINCT + + col2 + CAST( - col2 AS SIGNED ) * - col0 FROM tab1 AS cor0
----
216
3705
7776

skipif mysql # not compatible
query I rowsort label-4096
SELECT DISTINCT + + col2 + CAST ( - col2 AS INTEGER ) * - col0 FROM tab1 AS cor0
----
216
3705
7776

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4097
SELECT ALL - cor0.col0 / CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4097
SELECT ALL - cor0.col0 / CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col1 + + 18 FROM tab1 AS cor0
----
28
31
44

query I rowsort
SELECT 12 * - col2 AS col2 FROM tab0 AS cor0
----
-12
-396
-984

query I rowsort
SELECT DISTINCT 67 * col0 + + 45 AS col0 FROM tab2 AS cor0
----
514
5271
5338

query I rowsort
SELECT - + col1 * - col0 + col0 * + col1 AS col0 FROM tab0 AS cor0
----
16198
4128
6790

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * col1 + - ( - col1 ) col2 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT + 7 + 78 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to aafa8e5cfb9e02cea8717833e7581f7b

query I rowsort
SELECT + 70 * + col1 + col2 FROM tab2 AS cor0
----
1228
2197
4156

query I rowsort
SELECT ALL + + 46 + col0 AS col0 FROM tab0 AS cor0
----
135
70
81

query I rowsort
SELECT DISTINCT - col0 + cor0.col0 * col0 AS col2 FROM tab0 cor0
----
1190
552
7832

onlyif mysql # use DIV operator for integer division
query I rowsort label-4107
SELECT ALL 65 * col1 DIV col0 - - col1 col2 FROM tab0 AS cor0
----
157
277
318

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4107
SELECT ALL 65 * col1 / col0 - - col1 col2 FROM tab0 AS cor0
----
157
277
318

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * + col0 + + col1 col0 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT + + col0 * col2 + cor0.col1 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT - + col0 * col2 * + 88 FROM tab1 AS cor0
----
-14256
-321024
-675840

query I rowsort
SELECT col0 * + 97 + cor0.col0 AS col1 FROM tab0 cor0
----
2352
3430
8722

query I rowsort
SELECT + col0 * tab0.col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT - 54 * + 34 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to b3d969d80e4c64f3aa5dd1df1348643a

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4114
SELECT ALL CAST( col2 AS SIGNED ) + col0 * + ( col0 ) FROM tab2 AS cor0
----
6110
6279
76

skipif mysql # not compatible
query I rowsort label-4114
SELECT ALL CAST ( col2 AS INTEGER ) + col0 * + ( col0 ) FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT ALL - cor0.col0 * 61 * + 47 FROM tab2, tab2 AS cor0
----
9 values hashing to ece3249fabab9d83b5ff9b394a36e929

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 42 * - cor0.col1 col0 FROM tab2 AS cor0
----
1302
2478
714

query I rowsort
SELECT ( + col2 ) - col0 AS col1 FROM tab0 cor0
----
-34
-7
9

query I rowsort
SELECT DISTINCT + 40 * - col2 AS col2 FROM tab1 AS cor0
----
-2160
-2280
-3840

query I rowsort
SELECT DISTINCT - ( col0 ) + col2 * ( + col2 ) AS col2 FROM tab2 AS cor0
----
1365
598
722

query I rowsort
SELECT ALL + col0 + - ( col1 ) FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT ALL 68 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

query I rowsort
SELECT - col0 * 96 + - col1 AS col2 FROM tab2 AS cor0
----
-703
-7547
-7601

query I rowsort
SELECT + tab2.col2 + col2 FROM tab2
----
52
54
76

query I rowsort
SELECT 69 FROM tab2, tab2 AS cor0
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

onlyif mysql # use DIV operator for integer division
query I rowsort label-4125
SELECT - 54 DIV col0 + col0 * - 10 + - col0 FROM tab0
----
-266
-386
-979

skipif mysql # not compatible
query I rowsort label-4125
SELECT - 54 / col0 + col0 * - 10 + - col0 FROM tab0
----
-266
-386
-979

onlyif mysql # use DIV operator for integer division
query I rowsort label-4126
SELECT - ( - 62 ) DIV + tab0.col0 AS col1 FROM tab0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-4126
SELECT - ( - 62 ) / + tab0.col0 AS col1 FROM tab0
----
0
1
2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4127
SELECT - col2 * - col1 * + CAST( NULL AS DECIMAL ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4127
SELECT - col2 * - col1 * + CAST ( NULL AS REAL ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 - + cor0.col0 col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT - col1 + + col1 FROM tab1
----
0

query I rowsort
SELECT DISTINCT ( - tab1.col2 ) * col1 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT ALL + 75 FROM tab1, tab0 AS cor0
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4132
SELECT DISTINCT - CAST( + 48 AS SIGNED ) FROM tab1
----
-48

skipif mysql # not compatible
query I rowsort label-4132
SELECT DISTINCT - CAST ( + 48 AS INTEGER ) FROM tab1
----
-48

query I rowsort
SELECT - - col1 * - 77 * cor0.col1 - - col0 FROM tab0 cor0
----
-569468
-637548
-724458

query I rowsort
SELECT DISTINCT - 86 FROM tab1, tab0 cor0
----
-86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4135
SELECT DISTINCT CAST( NULL AS SIGNED ) + - 11 AS col1 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-4135
SELECT DISTINCT CAST ( NULL AS INTEGER ) + - 11 AS col1 FROM tab0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4136
SELECT ALL - 20 + 55 DIV + col0 AS col2 FROM tab1
----
-2
-20
-20

skipif mysql # not compatible
query I rowsort label-4136
SELECT ALL - 20 + 55 / + col0 AS col2 FROM tab1
----
-2
-20
-20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 + col0 col2 FROM tab0
----
178
48
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 94 * col2 col1 FROM tab0
----
3102
7708
94

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + col1 col2 FROM tab1 AS cor0
----
-54
-67
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 79 - col2 * 89 col2 FROM tab2 AS cor0
----
-2235
-2324
-3303

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 CROSS JOIN tab2, tab0, tab2 AS cor1
----
3645 values hashing to 59ca7c96f3955e014bebd08b5442edff

onlyif mysql # use DIV operator for integer division
query I rowsort label-4143
SELECT ALL - 59 DIV col1 + col2 col1 FROM tab1
----
52
52
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4143
SELECT ALL - 59 / col1 + col2 col1 FROM tab1
----
52
52
92

query I rowsort
SELECT 80 AS col0 FROM tab0
----
80
80
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-4145
SELECT DISTINCT col0 * - col0 DIV col0 FROM tab1
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-4145
SELECT DISTINCT col0 * - col0 / col0 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT - 8 FROM tab2, tab2 cor0
----
9 values hashing to 47f43f23dcd23959d97d8e3b0aab692e

query I rowsort
SELECT + - col2 * col2 * - col0 + cor0.col2 + col1 AS col0 FROM tab2 AS cor0
----
114131
5161
52813

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + cor0.col0 * + col1 col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL col0 * + col2 + + ( - col2 ) AS col0 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT - + col1 + + cor0.col0 AS col1 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT - + 46 FROM tab1 AS cor0
----
-46
-46
-46

query I rowsort
SELECT - - ( - col0 ) * col1 AS col2 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + col0 * + 32 FROM tab1 AS cor0
----
2048
2560
96

query I rowsort
SELECT + col1 + - 97 * cor0.col1 FROM tab1 AS cor0
----
-1248
-2496
-960

query I rowsort
SELECT + col1 * - col1 + + col0 FROM tab2 AS cor0
----
-210
-3403
-954

query I rowsort
SELECT + - col2 * + cor0.col2 AS col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT - + 32 * col0 FROM tab1 AS cor0
----
-2048
-2560
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4158
SELECT col1 * col2 DIV cor0.col1 FROM tab2 cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-4158
SELECT col1 * col2 / cor0.col1 FROM tab2 cor0
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-4159
SELECT + col2 DIV col1 - + col0 FROM tab2
----
-7
-77
-78

skipif mysql # not compatible
query I rowsort label-4159
SELECT + col2 / col1 - + col0 FROM tab2
----
-7
-77
-78

query I rowsort
SELECT DISTINCT tab2.col1 * col1 FROM tab2
----
289
3481
961

onlyif mysql # use DIV operator for integer division
query I rowsort label-4161
SELECT col0 DIV tab2.col1 - + col1 AS col1 FROM tab2
----
-13
-31
-58

skipif mysql # not compatible
query I rowsort label-4161
SELECT col0 / tab2.col1 - + col1 AS col1 FROM tab2
----
-13
-31
-58

onlyif mysql # use DIV operator for integer division
query I rowsort label-4162
SELECT DISTINCT + col0 DIV col1 FROM tab1 AS cor0
----
0
6

skipif mysql # not compatible
query I rowsort label-4162
SELECT DISTINCT + col0 / col1 FROM tab1 AS cor0
----
0
6

query III rowsort
SELECT ALL * FROM tab1 AS cor0 WHERE + col1 NOT IN ( col1 + + col0 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT ALL + col0 - cor0.col0 FROM tab0 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4165
SELECT ALL col1 DIV col1 - col0 * - col0 * col2 col1 FROM tab2 cor0
----
1324
158185
237159

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4165
SELECT ALL col1 / col1 - col0 * - col0 * col2 col1 FROM tab2 cor0
----
1324
158185
237159

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * col1 + col1 * tab1.col1 col0 FROM tab1
----
1209
740
754

query I rowsort
SELECT ALL col1 + - col0 * tab0.col2 FROM tab0
----
-706
-7207
62

query I rowsort
SELECT ALL + col0 * col0 + + col1 AS col1 FROM tab1
----
35
4106
6413

query III rowsort
SELECT * FROM tab0 WHERE - col1 BETWEEN - tab0.col2 + + col0 AND NULL
----

query I rowsort
SELECT ALL tab0.col2 + col1 AS col1 FROM tab0
----
119
173
98

query I rowsort
SELECT DISTINCT - col0 FROM tab2 WHERE NOT ( NULL ) > - col0 * + col1 + - col2
----

query I rowsort
SELECT + col0 * - col0 FROM tab0 WHERE NOT col0 - col1 <> NULL
----

query I rowsort
SELECT + col0 * + tab0.col1 * col0 AS col2 FROM tab0
----
118825
49536
720811

query I rowsort
SELECT ALL col0 * - col2 + tab1.col0 * - col1 + col2 AS col2 FROM tab1
----
-186
-4231
-8624

onlyif mysql # use DIV operator for integer division
query I rowsort label-4175
SELECT DISTINCT - col2 DIV col0 AS col0 FROM tab2
----
-3
0

skipif mysql # not compatible
query I rowsort label-4175
SELECT DISTINCT - col2 / col0 AS col0 FROM tab2
----
-3
0

query I rowsort
SELECT DISTINCT - col0 + col2 + + col1 * col2 AS col1 FROM tab2
----
1482
605
857

query I rowsort
SELECT ALL col0 + tab1.col0 * + col0 + col1 FROM tab1
----
38
4170
6493

onlyif mysql # use DIV operator for integer division
query I rowsort label-4178
SELECT ALL + col0 DIV + tab2.col0 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4178
SELECT ALL + col0 / + tab2.col0 FROM tab2
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4179
SELECT DISTINCT - col0 DIV col2 FROM tab1
----
-1
0

skipif mysql # not compatible
query I rowsort label-4179
SELECT DISTINCT - col0 / col2 FROM tab1
----
-1
0

query I rowsort
SELECT - tab2.col2 * col1 + - col2 FROM tab2
----
-1560
-684
-864

onlyif mysql # use DIV operator for integer division
query I rowsort label-4181
SELECT DISTINCT - col0 DIV tab1.col2 AS col0 FROM tab1
----
-1
0

skipif mysql # not compatible
query I rowsort label-4181
SELECT DISTINCT - col0 / tab1.col2 AS col0 FROM tab1
----
-1
0

query I rowsort
SELECT ALL cor0.col2 * col1 + + col1 AS col1 FROM tab2 AS cor0
----
1593
663
868

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 + + col2 * col0 col1 FROM tab1 AS cor0
----
165
3712
7760

query I rowsort
SELECT ALL - + col1 * col0 AS col1 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL - - col0 * - cor0.col1 + col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-4186
SELECT DISTINCT - - col0 DIV + col0 + col0 FROM tab2 AS cor0
----
79
8
80

skipif mysql # not compatible
query I rowsort label-4186
SELECT DISTINCT - - col0 / + col0 + col0 FROM tab2 AS cor0
----
79
8
80

query I rowsort
SELECT ALL - - col2 * + cor0.col0 * - col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT ALL + col2 + - col1 AS col0 FROM tab0 AS cor0
----
-53
-9
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col1 * - cor0.col0 * cor0.col2 col1 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT col1 * + col0 * - tab2.col1 FROM tab2
----
-22831
-271518
-6727

query I rowsort
SELECT DISTINCT cor0.col1 + - col0 * - col0 FROM tab2 AS cor0
----
6143
6258
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-4192
SELECT ALL + col2 DIV - col0 FROM tab0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4192
SELECT ALL + col2 / - col0 FROM tab0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * + col1 col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT + tab2.col1 + tab2.col2 AS col1 FROM tab1, tab1 AS cor0 CROSS JOIN tab2
----
27 values hashing to 0a66faf44289070d88fd26bbc9bf34e3

query I rowsort
SELECT ALL + col1 * - col1 * - col1 AS col0 FROM tab1
----
1000
17576
2197

onlyif mysql # use DIV operator for integer division
query I rowsort label-4196
SELECT cor0.col0 + col0 DIV + col2 FROM tab0 AS cor0
----
24
70
90

skipif mysql # not compatible
query I rowsort label-4196
SELECT cor0.col0 + col0 / + col2 FROM tab0 AS cor0
----
24
70
90

query I rowsort
SELECT - col0 + + col2 * - tab0.col2 * + col2 AS col0 FROM tab0
----
-35961
-36
-551457

query I rowsort
SELECT + 47 AS col0 FROM tab1
----
47
47
47

query I rowsort
SELECT ALL col2 + - col1 FROM tab2 cor0
----
-33
-4
21

query I rowsort
SELECT ALL - + col1 + col1 AS col0 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4201
SELECT + cor0.col0 + CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4201
SELECT + cor0.col0 + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4202
SELECT ALL + col2 DIV - col0 AS col0 FROM tab1
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-4202
SELECT ALL + col2 / - col0 AS col0 FROM tab1
----
-1
-18
0

query I rowsort
SELECT DISTINCT + - col1 + - cor0.col1 AS col1 FROM tab0 AS cor0
----
-172
-182
-194

onlyif mysql # use DIV operator for integer division
query I rowsort label-4204
SELECT + + col1 + 15 * col2 DIV - cor0.col0 AS col0 FROM tab1 AS cor0
----
-244
-3
-5

skipif mysql # not compatible
query I rowsort label-4204
SELECT + + col1 + 15 * col2 / - cor0.col0 AS col0 FROM tab1 AS cor0
----
-244
-3
-5

query I rowsort
SELECT DISTINCT - col1 + + col0 * - ( - col1 ) * - 42 + cor0.col2 * - col2 FROM tab1 AS cor0
----
-30139
-52909
-6218

query I rowsort
SELECT ALL col2 * - col0 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT - + col1 * - 24 AS col2 FROM tab0 AS cor0
----
2064
2184
2328

query I rowsort
SELECT ALL - col2 * 37 FROM tab2 AS cor0
----
-1406
-962
-999

onlyif mysql # use DIV operator for integer division
query I rowsort label-4209
SELECT ALL col1 + ( col1 ) * col0 + + col2 DIV - col1 FROM tab2 cor0
----
1358
248
4661

skipif mysql # not compatible
query I rowsort label-4209
SELECT ALL col1 + ( col1 ) * col0 + + col2 / - col1 FROM tab2 cor0
----
1358
248
4661

query I rowsort
SELECT DISTINCT tab2.col0 * - tab2.col1 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT tab1.col1 * col2 AS col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT + col1 + + col2 * col0 + col2 AS col0 FROM tab1
----
242
3715
7789

query I rowsort
SELECT DISTINCT col0 * - col0 AS col1 FROM tab2
----
-49
-6084
-6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-4214
SELECT DISTINCT + col0 + col2 DIV col2 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-4214
SELECT DISTINCT + col0 + col2 / col2 FROM tab1
----
4
65
81

query I rowsort
SELECT col2 + col2 * col1 + - col1 FROM tab1
----
1331
1432
617

query I rowsort
SELECT DISTINCT col2 + + col0 * col1 + - col0 * - tab0.col1 AS col2 FROM tab0
----
16280
4161
6791

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * + col1 col1 FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT - col1 FROM tab1 WHERE NOT NULL IN ( + col2 )
----

query I rowsort
SELECT ALL col0 + + tab0.col2 + + col0 * col0 FROM tab0
----
1261
633
8092

query I rowsort
SELECT ALL + col1 + - col0 FROM tab0
----
2
62
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-4221
SELECT DISTINCT col0 DIV tab0.col2 + tab0.col1 AS col2 FROM tab0
----
132
86
92

skipif mysql # not compatible
query I rowsort label-4221
SELECT DISTINCT col0 / tab0.col2 + tab0.col1 AS col2 FROM tab0
----
132
86
92

query I rowsort
SELECT tab0.col0 * col1 - + col2 FROM tab0
----
2031
3394
8017

query I rowsort
SELECT - col1 + - col0 FROM tab1 WHERE NULL NOT IN ( col0 / col1 )
----

query I rowsort
SELECT - col1 + col1 * + col2 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT DISTINCT + cor0.col0 * col2 FROM tab0 cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-4226
SELECT + cor0.col1 + col2 DIV col2 FROM tab1 cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-4226
SELECT + cor0.col1 + col2 / col2 FROM tab1 cor0
----
11
14
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-4227
SELECT DISTINCT + ( cor0.col1 ) DIV 56 + - col1 AS col0 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-4227
SELECT DISTINCT + ( cor0.col1 ) / 56 + - col1 AS col0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT 35 * + col0 FROM tab1 AS cor0
----
105
2240
2800

query I rowsort
SELECT ALL + col0 * + col1 + cor0.col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT DISTINCT tab2.col2 * - col0 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT col0 + + col2 + col1 * - col2 FROM tab2
----
-1430
-529
-803

query I rowsort
SELECT - 13 + col1 AS col0 FROM tab0 AS cor0
----
73
78
84

query I rowsort
SELECT DISTINCT - ( - col0 ) * col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL - 7 * col2 * ( 42 ) + cor0.col1 * - 49 * 36 FROM tab2 AS cor0
----
-111720
-41160
-62622

onlyif mysql # use DIV operator for integer division
query I rowsort label-4235
SELECT DISTINCT 59 DIV + cor0.col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4235
SELECT DISTINCT 59 / + cor0.col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL + col1 * cor0.col1 + 55 * + col0 AS col1 FROM tab2 AS cor0
----
1346
4634
7771

query I rowsort
SELECT ALL - tab0.col1 * + 16 * + 53 + col1 AS col1 FROM tab0
----
-72842
-77077
-82159

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab1 AS cor2, tab2 AS cor3
----
3645 values hashing to 577401eb866f52e8954d694a867c38d2

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1
----
86
91
97

query I rowsort
SELECT col0 - col1 * col2 * - col2 AS col0 FROM tab1 cor0
----
119888
32554
75819

query I rowsort
SELECT DISTINCT col0 + col2 AS col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT + cor0.col2 * col0 + col1 - + col0 FROM tab0 cor0
----
7300
854
97

query I rowsort
SELECT - col0 + 22 AS col1 FROM tab2 AS cor0
----
-56
-57
15

query I rowsort
SELECT ALL + col1 + 10 * + col1 FROM tab1 AS cor0
----
110
143
286

query I rowsort
SELECT DISTINCT + cor0.col2 + - 93 AS col2 FROM tab2 AS cor0
----
-55
-66
-67

query I rowsort
SELECT col0 * + col0 - + col0 AS col1 FROM tab1 cor0
----
4032
6
6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-4247
SELECT DISTINCT col2 + + col2 DIV + col0 AS col1 FROM tab0 AS cor0
----
1
34
82

skipif mysql # not compatible
query I rowsort label-4247
SELECT DISTINCT col2 + + col2 / + col0 AS col1 FROM tab0 AS cor0
----
1
34
82

query I rowsort
SELECT ALL + + col0 * col1 * 38 AS col0 FROM tab0 AS cor0
----
129010
307762
78432

onlyif mysql # use DIV operator for integer division
query I rowsort label-4249
SELECT DISTINCT + - col2 - - ( - col2 ) DIV - col0 FROM tab2 AS cor0
----
-24
-26
-38

skipif mysql # not compatible
query I rowsort label-4249
SELECT DISTINCT + - col2 - - ( - col2 ) / - col0 FROM tab2 AS cor0
----
-24
-26
-38

query I rowsort
SELECT ALL - + col2 + - ( - cor0.col1 ) * - col2 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT - ( 47 ) FROM tab2 AS cor0
----
-47
-47
-47

query I rowsort
SELECT + ( + col2 ) * col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - ( 21 ) FROM tab0 AS cor0
----
-21
-21
-21

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4254
SELECT DISTINCT + CAST( NULL AS SIGNED ) / col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4254
SELECT DISTINCT + CAST ( NULL AS INTEGER ) / col0 FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4255
SELECT + + col1 + + col0 DIV + col0 AS col1 FROM tab2 AS cor0
----
18
32
60

skipif mysql # not compatible
query I rowsort label-4255
SELECT + + col1 + + col0 / + col0 AS col1 FROM tab2 AS cor0
----
18
32
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col1 * 48 + - col0 * + ( - 88 ) col2 FROM tab2 AS cor0
----
2104
7768
9696

query I rowsort
SELECT ALL - - 98 AS col0 FROM tab2 AS cor0
----
98
98
98

query I rowsort
SELECT DISTINCT + cor0.col2 * + col2 + cor0.col0 * col2 + - col2 AS col1 FROM tab1 AS cor0
----
16800
3024
6840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 + - cor0.col1 * col1 col1 FROM tab0 AS cor0
----
-7429
-8363
-9410

query I rowsort
SELECT ALL - 32 + + col1 FROM tab2 AS cor0
----
-1
-15
27

query I rowsort
SELECT - - cor0.col2 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT ALL + 65 - + cor1.col0 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 392d14787114a3b84387d3dc39c76776

query I rowsort
SELECT DISTINCT + - col1 - col1 AS col0 FROM tab0 cor0
----
-172
-182
-194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 51 col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 02a7de94365b8cb5b5cb92c4b1d1e7c5

query I rowsort
SELECT - - 85 + + col0 AS col1 FROM tab2 AS cor0
----
163
164
92

query I rowsort
SELECT col1 + 46 AS col2 FROM tab2 AS cor0
----
105
63
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-4267
SELECT + + col2 DIV + ( col0 ) AS col1 FROM tab2 AS cor0
----
0
0
3

skipif mysql # not compatible
query I rowsort label-4267
SELECT + + col2 / + ( col0 ) AS col1 FROM tab2 AS cor0
----
0
0
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4268
SELECT col2 * CAST( col1 AS SIGNED ) FROM tab2 cor0
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-4268
SELECT col2 * CAST ( col1 AS INTEGER ) FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT col0 + + col2 * + col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT + cor0.col2 * + 9 + - cor0.col0 AS col1 FROM tab0 AS cor0
----
-26
273
649

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 14 col1 FROM tab2
----
-14
-14
-14

query I rowsort
SELECT DISTINCT + 43 FROM tab1, tab1 AS cor0, tab2 cor1
----
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab2.col1 col2 FROM tab2, tab1, tab0 AS cor0
----
-17
-31
-59

query I rowsort
SELECT ALL + 35 AS col2 FROM tab0
----
35
35
35

query I rowsort
SELECT ALL - 10 FROM tab0, tab2 AS cor0
----
9 values hashing to f68f33032846e21ee6b2c668fc10355e

query I rowsort
SELECT DISTINCT + 61 FROM tab2, tab0 AS cor0, tab2 cor1
----
61

query I rowsort
SELECT - col0 * 28 FROM tab2 AS cor0
----
-196
-2184
-2212

query I rowsort
SELECT col0 * + 38 AS col2 FROM tab1 cor0
----
114
2432
3040

query I rowsort
SELECT cor0.col0 + + col2 AS col0 FROM tab2 AS cor0
----
104
117
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 23 col1 FROM tab0, tab2 cor0
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

query I rowsort
SELECT - + col2 + + ( col0 * - ( col2 ) ) FROM tab1 AS cor0
----
-216
-3705
-7776

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4282
SELECT DISTINCT - - CAST( NULL AS SIGNED ) * + 52 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4282
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) * + 52 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + col1 + ( + col1 ) FROM tab2 AS cor0
----
118
34
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 * col1 col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT - col1 * + col0 - + col0 FROM tab2 AS cor0
----
-1422
-224
-4680

query I rowsort
SELECT DISTINCT + - 47 AS col1 FROM tab1 AS cor0
----
-47

query I rowsort
SELECT 28 + col2 * - col1 AS col1 FROM tab2
----
-1506
-618
-809

query I rowsort
SELECT - 92 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 1af709a79a3e56281ffdce4d931d5965

query I rowsort
SELECT + - ( + col0 ) AS col0 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT 43 FROM tab2 AS cor0
----
43
43
43

query I rowsort
SELECT - 34 + - col0 * - col1 AS col0 FROM tab1 AS cor0
----
1006
44
606

query I rowsort
SELECT - 17 + - col1 FROM tab0 AS cor0
----
-103
-108
-114

query I rowsort
SELECT cor0.col0 + + cor0.col2 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT - 36 * + cor0.col2 AS col1 FROM tab1 cor0
----
-1944
-2052
-3456

query I rowsort
SELECT + col0 + cor0.col2 * 49 AS col0 FROM tab0 AS cor0
----
1641
4107
84

query I rowsort
SELECT DISTINCT ( - col2 ) AS col1 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT DISTINCT + 39 * - col0 FROM tab2
----
-273
-3042
-3081

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 45 * col0 + col1 * + col0 col0 FROM tab0
----
12104
3144
4970

query I rowsort
SELECT ALL + - 99 - col1 AS col0 FROM tab2 AS cor0
----
-116
-130
-158

query I rowsort
SELECT 47 + 66 FROM tab1 AS cor0
----
113
113
113

query I rowsort
SELECT ALL - 18 FROM tab0 AS cor0
----
-18
-18
-18

query I rowsort
SELECT + + col0 * 82 AS col0 FROM tab1 AS cor0
----
246
5248
6560

query I rowsort
SELECT DISTINCT 31 + - col1 FROM tab2 AS cor0
----
-28
0
14

query I rowsort
SELECT DISTINCT - + cor0.col2 * col2 + - col1 AS col2 FROM tab0 cor0
----
-1175
-6815
-98

query I rowsort
SELECT + - 38 FROM tab1 AS cor0
----
-38
-38
-38

query I rowsort
SELECT ALL + ( - col2 ) * col0 + - 8 FROM tab2 cor0
----
-197
-2036
-3010

onlyif mysql # use DIV operator for integer division
query I rowsort label-4307
SELECT DISTINCT + - col1 - col1 DIV cor0.col2 FROM tab0 AS cor0
----
-194
-88
-92

skipif mysql # not compatible
query I rowsort label-4307
SELECT DISTINCT + - col1 - col1 / cor0.col2 FROM tab0 AS cor0
----
-194
-88
-92

query I rowsort
SELECT ALL - + col2 * + col1 FROM tab0 AS cor0
----
-2838
-7462
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + col0 * + 35 + + 13 col0 FROM tab0 AS cor0
----
1273
3217
877

query I rowsort
SELECT DISTINCT - cor1.col2 - + cor1.col0 AS col0 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
-121
-176
-57

query I rowsort
SELECT - 18 FROM tab2
----
-18
-18
-18

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4312
SELECT - 42 * + col2 - col0 * CAST( NULL AS SIGNED ) * + 73 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4312
SELECT - 42 * + col2 - col0 * CAST ( NULL AS INTEGER ) * + 73 AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 - col0 AS col2 FROM tab1
----
-7
16
51

query I rowsort
SELECT DISTINCT + 64 * col0 AS col0 FROM tab2 AS cor0
----
448
4992
5056

query I rowsort
SELECT ALL + + col0 * + col1 * ( 9 ) FROM tab0 AS cor0
----
18576
30555
72891

onlyif mysql # use DIV operator for integer division
query I rowsort label-4316
SELECT DISTINCT - col1 + col2 DIV CAST( + 44 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-86
-90
-97

skipif mysql # not compatible
query I rowsort label-4316
SELECT DISTINCT - col1 + col2 / CAST ( + 44 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-86
-90
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4317
SELECT DISTINCT - + col0 * - col2 + - cor0.col1 DIV - col1 AS col2 FROM tab1 AS cor0
----
163
3649
7681

skipif mysql # not compatible
query I rowsort label-4317
SELECT DISTINCT - + col0 * - col2 + - cor0.col1 / - col1 AS col2 FROM tab1 AS cor0
----
163
3649
7681

query I rowsort
SELECT DISTINCT + cor0.col0 - + col0 AS col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT + + col0 + + 52 * - col1 * col1 + 32 FROM tab0 AS cor0
----
-384536
-430491
-489201

query I rowsort
SELECT + cor0.col2 * - 66 FROM tab0 AS cor0
----
-2178
-5412
-66

query I rowsort
SELECT + col2 + + col0 * ( + cor0.col0 ) FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT + col1 * + col2 + - col1 * + col2 + + 54 FROM tab0 AS cor0
----
54
54
54

query I rowsort
SELECT col1 + - col2 + col1 * col0 FROM tab2 AS cor0
----
1322
221
4635

query I rowsort
SELECT col2 + - col2 * col1 + cor0.col2 FROM tab1 cor0
----
-1056
-1296
-456

onlyif mysql # use DIV operator for integer division
query I rowsort label-4325
SELECT DISTINCT + - col2 DIV ( ( col0 ) ) FROM tab2 AS cor0
----
-3
0

skipif mysql # not compatible
query I rowsort label-4325
SELECT DISTINCT + - col2 / ( ( col0 ) ) FROM tab2 AS cor0
----
-3
0

query I rowsort
SELECT col2 + col2 * 89 AS col1 FROM tab2 AS cor0
----
2340
2430
3420

query I rowsort
SELECT col2 + + 8 AS col1 FROM tab2 cor0
----
34
35
46

query I rowsort
SELECT DISTINCT - - col1 + + col1 * - cor0.col0 * + cor0.col0 FROM tab0 AS cor0
----
-118728
-49450
-720720

query I rowsort
SELECT + col1 * + 74 + col1 + - cor0.col0 * - cor0.col0 AS col1 FROM tab1 cor0
----
1959
4846
7375

onlyif mysql # use DIV operator for integer division
query I rowsort label-4330
SELECT ALL + col2 DIV + 60 AS col0 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4330
SELECT ALL + col2 / + 60 AS col0 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT - col2 * + col2 + col2 FROM tab2 AS cor0
----
-1406
-650
-702

query I rowsort
SELECT - + 2 AS col0 FROM tab2 AS cor0
----
-2
-2
-2

query I rowsort
SELECT col1 + 16 + col0 AS col1 FROM tab2 AS cor0
----
112
153
54

query I rowsort
SELECT - col2 * col0 * 74 AS col2 FROM tab2
----
-13986
-150072
-222148

query I rowsort
SELECT ALL - 39 * + 9 FROM tab1, tab2 AS cor0
----
9 values hashing to a43a5de77a8284c782ec070b6bcd68d7

query I rowsort
SELECT ALL + + ( col0 ) AS col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT - 32 + 1 * - col2 FROM tab0 AS cor0
----
-114
-33
-65

query I rowsort
SELECT DISTINCT - - 28 AS col1 FROM tab2 AS cor0
----
28

query I rowsort
SELECT - col0 + - col2 FROM tab0 cor0
----
-171
-36
-57

query I rowsort
SELECT - + col1 + - col1 AS col0 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT DISTINCT - col2 * + 6 + + cor0.col2 * + col0 * ( - cor0.col1 + - 71 ) AS col0 FROM tab2 AS cor0
----
-19440
-263796
-264404

query I rowsort
SELECT ALL 4 FROM tab0 AS cor0
----
4
4
4

query I rowsort
SELECT - col2 * 78 AS col1 FROM tab2 AS cor0
----
-2028
-2106
-2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-4344
SELECT - + 88 DIV + col1 FROM tab2 AS cor0
----
-1
-2
-5

skipif mysql # not compatible
query I rowsort label-4344
SELECT - + 88 / + col1 FROM tab2 AS cor0
----
-1
-2
-5

query I rowsort
SELECT ALL - 33 * - col2 + col0 AS col0 FROM tab1 AS cor0
----
1785
1945
3248

onlyif mysql # use DIV operator for integer division
query I rowsort label-4346
SELECT col2 DIV + 33 FROM tab0 cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-4346
SELECT col2 / + 33 FROM tab0 cor0
----
0
1
2

query I rowsort
SELECT ALL - col1 + - 52 * col0 * ( col2 ) AS col1 FROM tab2 AS cor0
----
-105515
-156121
-9859

query I rowsort
SELECT + ( col1 ) + - col1 * col1 AS col0 FROM tab1 AS cor0
----
-156
-650
-90

query I rowsort
SELECT col2 + 31 * col2 AS col1 FROM tab0 AS cor0
----
1056
2624
32

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( + col0 ) col0 FROM tab0 AS cor0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 36 col0 FROM tab2 AS cor0
----
-36
-36
-36

onlyif mysql # use DIV operator for integer division
query I rowsort label-4352
SELECT - col0 + CAST( col0 AS SIGNED ) - col2 DIV ( col1 ) FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4352
SELECT - col0 + CAST ( col0 AS INTEGER ) - col2 / ( col1 ) FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + ( + tab1.col2 + col1 ) col2 FROM tab1
----
29
3
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-4354
SELECT ( col2 ) DIV - col2 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4354
SELECT ( col2 ) / - col2 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + - 63 + 57 + + cor0.col2 FROM tab1 AS cor0
----
48
51
90

query I rowsort
SELECT DISTINCT + col2 + - 75 + col1 AS col0 FROM tab2
----
-17
-20
10

query I rowsort
SELECT ALL col0 + + col2 * - tab2.col2 FROM tab2
----
-1365
-598
-722

onlyif mysql # use DIV operator for integer division
query I rowsort label-4358
SELECT DISTINCT col1 DIV col2 + + col1 * tab0.col2 FROM tab0
----
194
2840
7463

skipif mysql # not compatible
query I rowsort label-4358
SELECT DISTINCT col1 / col2 + + col1 * tab0.col2 FROM tab0
----
194
2840
7463

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - 64 AS REAL ) + tab1.col2 FROM tab1
----
-10
-7
32

query I rowsort
SELECT ALL + 33 FROM tab0, tab2 AS cor0
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor1.col1 col1 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT - + ( + col0 ) + col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - ( - cor0.col0 ) AS col2 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL - 9 FROM tab1, tab0 AS cor0, tab2 cor1
----
27 values hashing to 3dfe689e16ce3a87877d40f349e6c7b5

query I rowsort
SELECT tab2.col1 + col1 - col2 FROM tab2
----
-4
35
92

query I rowsort
SELECT 23 AS col0 FROM tab0, tab2 cor0
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

query I rowsort
SELECT DISTINCT - + col1 * cor0.col2 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4368
SELECT ALL + 79 + + col2 * - 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-4368
SELECT ALL + 79 + + col2 * - CAST ( NULL AS INTEGER ) col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT 19 * + 23 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 715c77e9e50292ea224288a61883a5af

query I rowsort
SELECT col2 + + ( col1 ) + col2 FROM tab0
----
152
255
99

query I rowsort
SELECT - col0 + ( + col0 ) FROM tab0
----
0
0
0

query I rowsort
SELECT - col0 + 74 * 82 + col1 * col1 FROM tab1
----
6104
6157
6741

query I rowsort
SELECT + col0 * + 63 FROM tab2
----
441
4914
4977

onlyif mysql # use DIV operator for integer division
query I rowsort label-4374
SELECT DISTINCT - col2 DIV + col2 + col0 FROM tab1 AS cor0
----
2
63
79

skipif mysql # not compatible
query I rowsort label-4374
SELECT DISTINCT - col2 / + col2 + col0 FROM tab1 AS cor0
----
2
63
79

query I rowsort
SELECT col1 + - 30 * col1 FROM tab2 AS cor0
----
-1711
-493
-899

onlyif mysql # use DIV operator for integer division
query I rowsort label-4376
SELECT - col1 + - ( col2 ) DIV + col0 AS col2 FROM tab1 AS cor0
----
-10
-14
-44

skipif mysql # not compatible
query I rowsort label-4376
SELECT - col1 + - ( col2 ) / + col0 AS col2 FROM tab1 AS cor0
----
-10
-14
-44

query I rowsort
SELECT DISTINCT - 59 AS col0 FROM tab0, tab1 AS cor0, tab0 cor1
----
-59

query I rowsort
SELECT DISTINCT + cor0.col0 * col1 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - 59 AS col0 FROM tab1
----
-59
-59
-59

query I rowsort
SELECT ALL 96 * - col1 FROM tab1
----
-1248
-2496
-960

onlyif mysql # use DIV operator for integer division
query I rowsort label-4381
SELECT DISTINCT + col1 * col1 DIV col1 AS col0 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-4381
SELECT DISTINCT + col1 * col1 / col1 AS col0 FROM tab0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( col2 * - col2 ) col0 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT ALL 55 * col2 FROM tab2
----
1430
1485
2090

query I rowsort
SELECT ALL - ( + col2 + - col1 * tab2.col0 ) FROM tab2
----
1305
190
4576

query I rowsort
SELECT ALL col2 * 95 FROM tab1
----
5130
5415
9120

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4386
SELECT ALL CAST( - col1 * col1 AS SIGNED ) FROM tab2
----
-289
-3481
-961

skipif mysql # not compatible
query I rowsort label-4386
SELECT ALL CAST ( - col1 * col1 AS INTEGER ) FROM tab2
----
-289
-3481
-961

onlyif mysql # use DIV operator for integer division
query I rowsort label-4387
SELECT 19 DIV col2 FROM tab0 cor0
----
0
0
19

skipif mysql # not compatible
query I rowsort label-4387
SELECT 19 / col2 FROM tab0 cor0
----
0
0
19

query I rowsort
SELECT - - 60 * + col1 FROM tab1 AS cor0
----
1560
600
780

query I rowsort
SELECT - cor0.col2 * - col2 AS col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT - ( - col0 ) * + 10 FROM tab2 AS cor0
----
70
780
790

query I rowsort
SELECT - col0 + col1 * col2 AS col0 FROM tab1
----
1168
1401
506

query I rowsort
SELECT cor0.col1 + cor0.col0 AS col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT ALL - cor0.col1 * + col2 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT DISTINCT + col1 + 45 AS col1 FROM tab1 AS cor0
----
55
58
71

query I rowsort
SELECT + ( 22 ) FROM tab0, tab1 AS cor0
----
9 values hashing to c55ee7433d8d39a59b1de2aadd9538c9

query I rowsort
SELECT DISTINCT - 11 * - col2 AS col2 FROM tab2 AS cor0
----
286
297
418

query I rowsort
SELECT + - col1 * + col0 + - col1 AS col1 FROM tab2 cor0
----
-1360
-248
-4661

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 18 ) * + col0 col2 FROM tab0 AS cor0
----
-1602
-432
-630

query I rowsort
SELECT ( - col1 ) AS col0 FROM tab0 cor0
----
-86
-91
-97

query I rowsort
SELECT - 33 * - 85 AS col1 FROM tab0 AS cor0
----
2805
2805
2805

onlyif mysql # use DIV operator for integer division
query I rowsort label-4401
SELECT 3 DIV 75 + col0 FROM tab0 cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-4401
SELECT 3 / 75 + col0 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT + - 64 FROM tab2 AS cor0
----
-64
-64
-64

query I rowsort
SELECT ALL + col0 + - cor0.col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL + - col2 * col0 + - ( 31 ) * + col1 FROM tab0 AS cor0
----
-10119
-3042
-3458

query I rowsort
SELECT ALL + + col1 + + col2 + 42 AS col2 FROM tab0 AS cor0
----
140
161
215

query I rowsort
SELECT DISTINCT 59 * + cor0.col0 AS col0 FROM tab2 AS cor0
----
413
4602
4661

query I rowsort
SELECT ALL - 63 * col0 + - 17 AS col1 FROM tab1 AS cor0
----
-206
-4049
-5057

query I rowsort
SELECT - 44 * col1 AS col2 FROM tab2 AS cor0
----
-1364
-2596
-748

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * - col2 * col1 col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-4410
SELECT col2 + ( col0 ) DIV + col2 AS col2 FROM tab0 AS cor0
----
33
36
83

skipif mysql # not compatible
query I rowsort label-4410
SELECT col2 + ( col0 ) / + col2 AS col2 FROM tab0 AS cor0
----
33
36
83

query I rowsort
SELECT - col0 * + col2 * col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT col1 + 22 FROM tab2 AS cor0
----
39
53
81

query I rowsort
SELECT ALL ( - 1 ) AS col0 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + + ( + col2 ) * col0 AS col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - col0 * - col0 + col0 + - col0 AS col1 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT + ( + 36 ) * - col2 FROM tab1 cor0
----
-1944
-2052
-3456

onlyif mysql # use DIV operator for integer division
query I rowsort label-4417
SELECT DISTINCT - ( col2 ) DIV - col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-4417
SELECT DISTINCT - ( col2 ) / - col1 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT ALL 43 * + cor1.col0 AS col0 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to fd9e4d7fa173954e648d0b9de8c21c65

query I rowsort
SELECT + 24 FROM tab0, tab2 cor0
----
9 values hashing to b0d834ef9e4346801b6aaa0e74b2c8ef

query I rowsort
SELECT - ( 81 ) * col2 AS col1 FROM tab1 AS cor0
----
-4374
-4617
-7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-4421
SELECT col1 * + 22 + col0 DIV col1 FROM tab0 cor0
----
1892
2002
2134

skipif mysql # not compatible
query I rowsort label-4421
SELECT col1 * + 22 + col0 / col1 FROM tab0 cor0
----
1892
2002
2134

query I rowsort
SELECT + 15 * ( cor0.col0 ) AS col0 FROM tab1 AS cor0
----
1200
45
960

query I rowsort
SELECT DISTINCT + cor0.col2 * col2 AS col0 FROM tab0 AS cor0
----
1
1089
6724

query I rowsort
SELECT - tab1.col0 * - col0 * - col0 AS col0 FROM tab1
----
-262144
-27
-512000

query I rowsort
SELECT + 33 AS col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 76da8bc7cae18ecf856438f872430c80

query I rowsort
SELECT ALL + + col2 + + col2 AS col0 FROM tab0 AS cor0
----
164
2
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 + col0 col2 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT + + col0 * - ( + col2 ) + col2 AS col0 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT ALL col1 + - col2 AS col2 FROM tab2 AS cor0
----
-21
33
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-4430
SELECT ALL + col1 DIV + col1 col2 FROM tab0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4430
SELECT ALL + col1 / + col1 col2 FROM tab0
----
1
1
1

query I rowsort
SELECT - col0 * ( + col0 ) AS col0 FROM tab1
----
-4096
-6400
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + tab0.col0 col0 FROM tab0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * - col1 col2 FROM tab0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4434
SELECT DISTINCT col2 * CAST( NULL AS DECIMAL ) AS col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-4434
SELECT DISTINCT col2 * CAST ( NULL AS REAL ) AS col1 FROM tab1
----
NULL

query I rowsort
SELECT DISTINCT + - cor0.col2 AS col0 FROM tab0 AS cor0
----
-1
-33
-82

onlyif mysql # use DIV operator for integer division
query I rowsort label-4436
SELECT - col1 DIV 2 AS col1 FROM tab2 AS cor0
----
-15
-29
-8

skipif mysql # not compatible
query I rowsort label-4436
SELECT - col1 / 2 AS col1 FROM tab2 AS cor0
----
-15
-29
-8

query I rowsort
SELECT - col0 * + 90 + + 44 * col2 FROM tab2 AS cor0
----
-5438
-5876
558

query I rowsort
SELECT ALL - col1 * + col1 * col1 AS col0 FROM tab0 AS cor0
----
-636056
-753571
-912673

query I rowsort
SELECT ALL col0 * 29 AS col0 FROM tab1 AS cor0
----
1856
2320
87

query I rowsort
SELECT DISTINCT 89 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
89

query I rowsort
SELECT col0 + col2 + col1 AS col0 FROM tab1
----
131
189
83

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4442
SELECT ALL CAST( + 47 AS SIGNED ) FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 3f991632e9c7c5142e1d80857cd10a2d

skipif mysql # not compatible
query I rowsort label-4442
SELECT ALL CAST ( + 47 AS INTEGER ) FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 3f991632e9c7c5142e1d80857cd10a2d

query I rowsort
SELECT ALL ( + tab1.col2 ) * + col2 * 47 - + 84 FROM tab1
----
136968
152619
433068

query I rowsort
SELECT 87 FROM tab0, tab2 AS cor0
----
9 values hashing to fa0cdd86483844cda3bb806e032d5c64

query I rowsort
SELECT + col0 - 3 FROM tab2 cor0
----
4
75
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-4446
SELECT DISTINCT ( + col0 ) DIV - col1 + + 24 FROM tab0
----
24

skipif mysql # not compatible
query I rowsort label-4446
SELECT DISTINCT ( + col0 ) / - col1 + + 24 FROM tab0
----
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 - + 98 * col0 col2 FROM tab1 AS cor0
----
-240
-6215
-7744

query I rowsort
SELECT ALL - col1 + + col1 * col2 AS col2 FROM tab1
----
1235
1378
560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4449
SELECT + CAST( - col2 AS SIGNED ) + col0 col1 FROM tab1 AS cor0
----
-16
-51
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4449
SELECT + CAST ( - col2 AS INTEGER ) + col0 col1 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ALL + cor0.col0 + + col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT DISTINCT + 45 * col2 * - col1 FROM tab2 AS cor0
----
-29070
-37665
-69030

onlyif mysql # use DIV operator for integer division
query I rowsort label-4452
SELECT ALL col1 + - col0 DIV + ( + col0 + col2 ) FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-4452
SELECT ALL col1 + - col0 / + ( + col0 + col2 ) FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT + 99 + + col1 FROM tab2 cor0
----
116
130
158

query I rowsort
SELECT ALL - 98 + - col0 * + col2 FROM tab0 cor0
----
-133
-7396
-890

query I rowsort
SELECT DISTINCT + 99 + col0 FROM tab1 AS cor0
----
102
163
179

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4456
SELECT 64 + col2 * - CAST( col1 AS SIGNED ) FROM tab0 AS cor0
----
-2774
-33
-7398

skipif mysql # not compatible
query I rowsort label-4456
SELECT 64 + col2 * - CAST ( col1 AS INTEGER ) FROM tab0 AS cor0
----
-2774
-33
-7398

query I rowsort
SELECT DISTINCT ( cor0.col1 ) + - 30 FROM tab2 AS cor0
----
-13
1
29

onlyif mysql # use DIV operator for integer division
query I rowsort label-4458
SELECT DISTINCT - + col1 - - col0 DIV + col1 FROM tab2 AS cor0
----
-13
-31
-58

skipif mysql # not compatible
query I rowsort label-4458
SELECT DISTINCT - + col1 - - col0 / + col1 FROM tab2 AS cor0
----
-13
-31
-58

query I rowsort
SELECT ALL 89 FROM tab2 AS cor0
----
89
89
89

query I rowsort
SELECT - col0 * + col1 + + cor0.col0 AS col2 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT - col1 * col2 + + col2 - cor0.col2 * - col2 AS col1 FROM tab1 AS cor0
----
1566
2736
8064

query I rowsort
SELECT DISTINCT + - col0 * col2 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - col0 * - col1 + - col1 + ( col1 ) * - 64 AS col1 FROM tab1 AS cor0
----
-10
-1612
195

query I rowsort
SELECT DISTINCT - col2 * col1 + 74 AS col0 FROM tab2 cor0
----
-1460
-572
-763

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4465
SELECT + - col1 * col2 + + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4465
SELECT + - col1 * col2 + + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4466
SELECT DISTINCT + 55 DIV + col1 FROM tab2 AS cor0
----
0
1
3

skipif mysql # not compatible
query I rowsort label-4466
SELECT DISTINCT + 55 / + col1 FROM tab2 AS cor0
----
0
1
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-4467
SELECT - col2 DIV - col1 AS col0 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-4467
SELECT - col2 / - col1 AS col0 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT + 25 * + col2 * 97 + - col1 + col1 AS col1 FROM tab2 AS cor0
----
63050
65475
92150

query I rowsort
SELECT ALL + - 8 + + col0 FROM tab1 AS cor0
----
-5
56
72

query I rowsort
SELECT DISTINCT 52 * col1 + col1 FROM tab2 AS cor0
----
1643
3127
901

query I rowsort
SELECT - - col2 + cor0.col0 * cor0.col2 AS col0 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT DISTINCT + col1 * - cor0.col2 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT col2 * - col0 + col0 AS col0 FROM tab0
----
-7209
-768
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + col1 + - col2 col0 FROM tab0
----
131
77
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-4475
SELECT + col1 * col1 DIV - col0 + ( col1 ) AS col0 FROM tab0
----
-171
-2
-222

skipif mysql # not compatible
query I rowsort label-4475
SELECT + col1 * col1 / - col0 + ( col1 ) AS col0 FROM tab0
----
-171
-2
-222

query I rowsort
SELECT + col1 + - cor0.col2 * 53 AS col1 FROM tab0 cor0
----
-1663
-4255
44

query I rowsort
SELECT DISTINCT 14 * - cor0.col1 + - ( + 82 ) * - col0 - - col1 FROM tab0 AS cor0
----
1609
6115
850

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 42 col0 FROM tab1 AS cor0
----
42
42
42

query I rowsort
SELECT - - col1 + cor0.col2 * col1 FROM tab1 AS cor0
----
1261
1430
580

onlyif mysql # use DIV operator for integer division
query I rowsort label-4480
SELECT - col0 * - ( col0 ) DIV col0 + ( 87 ) * col2 * + col2 FROM tab0 cor0
----
122
585077
94767

skipif mysql # not compatible
query I rowsort label-4480
SELECT - col0 * - ( col0 ) / col0 + ( 87 ) * col2 * + col2 FROM tab0 cor0
----
122
585077
94767

query I rowsort
SELECT col0 * ( 63 ) + col2 * - 12 AS col2 FROM tab2 cor0
----
117
4521
4602

query I rowsort
SELECT ALL + cor0.col1 * col0 AS col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - col1 * ( col1 ) + col2 * + cor0.col2 * col0 FROM tab1 AS cor0
----
207836
737111
8072

query I rowsort
SELECT DISTINCT - col1 + + cor0.col2 FROM tab0 AS cor0
----
-53
-9
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4485
SELECT ALL + + col0 * + CAST( NULL AS SIGNED ) - - 43 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4485
SELECT ALL + + col0 * + CAST ( NULL AS INTEGER ) - - 43 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col0 * 39 + 13 FROM tab1 AS cor0
----
130
2509
3133

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4487
SELECT DISTINCT + col1 / + col1 + CAST( NULL AS SIGNED ) * col2 col1 FROM tab2
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4487
SELECT DISTINCT + col1 / + col1 + CAST ( NULL AS INTEGER ) * col2 col1 FROM tab2
----
NULL

query I rowsort
SELECT DISTINCT 54 + col2 * - col0 FROM tab2
----
-135
-1974
-2948

query I rowsort
SELECT + 38 * - col1 AS col2 FROM tab0
----
-3268
-3458
-3686

query I rowsort
SELECT 21 + col0 AS col2 FROM tab1
----
101
24
85

query I rowsort
SELECT + col0 + + col0 * + col1 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT 31 * + col0 FROM tab0
----
1085
2759
744

query I rowsort
SELECT ALL + ( col0 ) * col2 AS col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ( + col1 ) AS col0 FROM tab0 cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4495
SELECT ALL + col2 + - cor0.col2 DIV cor0.col0 FROM tab0 AS cor0
----
1
32
82

skipif mysql # not compatible
query I rowsort label-4495
SELECT ALL + col2 + - cor0.col2 / cor0.col0 FROM tab0 AS cor0
----
1
32
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + + col0 col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT - 39 * - col1 FROM tab0 AS cor0
----
3354
3549
3783

query I rowsort
SELECT + + 92 * - 24 AS col1 FROM tab0 AS cor0
----
-2208
-2208
-2208

query I rowsort
SELECT DISTINCT - ( + 10 ) AS col1 FROM tab2 AS cor0
----
-10

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4500
SELECT ALL - - cor0.col2 + + col1 * col1 * CAST( NULL AS DECIMAL ) col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4500
SELECT ALL - - cor0.col2 + + col1 * col1 * CAST ( NULL AS REAL ) col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4501
SELECT + - CAST( NULL AS SIGNED ) * + col2 * - 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-4501
SELECT + - CAST ( NULL AS INTEGER ) * + col2 * - col0 col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + + ( 54 ) FROM tab0 AS cor0
----
54
54
54

query I rowsort
SELECT - col1 * col0 + + col1 * + col2 FROM tab2
----
-3068
-697
620

query I rowsort
SELECT + col2 - - tab0.col0 AS col2 FROM tab0
----
171
36
57

query I rowsort
SELECT 61 FROM tab0, tab2 AS cor0
----
9 values hashing to 07149905a72bd87553381f34d19ed290

query I rowsort
SELECT DISTINCT col1 * - ( 90 ) AS col0 FROM tab2
----
-1530
-2790
-5310

query I rowsort
SELECT - + 73 FROM tab2 AS cor0
----
-73
-73
-73

query I rowsort
SELECT ALL - - col2 * col2 * - col0 AS col1 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT DISTINCT + + col1 - 89 AS col0 FROM tab0 AS cor0
----
-3
2
8

query I rowsort
SELECT DISTINCT - + 44 AS col1 FROM tab0 AS cor0
----
-44

query I rowsort
SELECT ALL col1 + + col1 * - col1 FROM tab2 cor0
----
-272
-3422
-930

query I rowsort
SELECT ALL 74 - - tab2.col2 * + col0 * col1 FROM tab2
----
119726
51108
5933

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4513
SELECT CAST( NULL AS DECIMAL ) * - col1 + col1 AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4513
SELECT CAST ( NULL AS REAL ) * - col1 + col1 AS col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - 56 AS col1 FROM tab0 AS cor0
----
-56
-56
-56

query I rowsort
SELECT ALL col0 * tab1.col0 * col2 AS col0 FROM tab1
----
233472
486
614400

query I rowsort
SELECT ALL + 17 FROM tab2, tab0 AS cor0
----
9 values hashing to 43298e43365fccb5146ea32003753c92

query I rowsort
SELECT - col1 * - 38 AS col1 FROM tab2 AS cor0
----
1178
2242
646

query I rowsort
SELECT + col0 * - 84 AS col2 FROM tab2 AS cor0
----
-588
-6552
-6636

query I rowsort
SELECT DISTINCT - 98 * 66 FROM tab0, tab1 AS cor0
----
-6468

query I rowsort
SELECT - - cor0.col2 * col0 AS col2 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-4521
SELECT + col2 * ( + col1 ) DIV - col1 + col0 * col2 * col1 FROM tab2 AS cor0
----
119626
50996
5832

skipif mysql # not compatible
query I rowsort label-4521
SELECT + col2 * ( + col1 ) / - col1 + col0 * col2 * col1 FROM tab2 AS cor0
----
119626
50996
5832

query I rowsort
SELECT + - col0 + - col0 * col1 FROM tab2 AS cor0
----
-1422
-224
-4680

query I rowsort
SELECT tab1.col2 + - ( col0 ) AS col2 FROM tab1
----
-7
16
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 col0 FROM tab2, tab1 cor0, tab2 cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT DISTINCT 0 AS col1 FROM tab0, tab0 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4526
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col2 FROM tab0, tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4526
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col2 FROM tab0, tab2 AS cor0
----
NULL

query I rowsort
SELECT + 94 * + cor0.col2 + 74 FROM tab2 AS cor0
----
2518
2612
3646

query I rowsort
SELECT - ( + 85 ) FROM tab0, tab2 AS cor0
----
9 values hashing to 8ebc8ffafb1517ea04e3a6fc4059d88a

query I rowsort
SELECT ALL 56 FROM tab1, tab2 AS cor0
----
9 values hashing to 9c4523312174730bbc525b9977aa99fa

query I rowsort
SELECT ALL col1 * 29 + - col1 AS col0 FROM tab1
----
280
364
728

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 col2 FROM tab2, tab2 AS cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT 27 AS col1 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 1a3cef5c33b8f87ffeded378fd207753

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 col1 FROM tab1, tab0 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT ALL - 79 AS col0 FROM tab2
----
-79
-79
-79

query I rowsort
SELECT ALL 24 AS col2 FROM tab0 AS cor0
----
24
24
24

query I rowsort
SELECT 6 FROM tab1, tab0 cor0
----
9 values hashing to 5d1cb90ed58fa7573895d2f95b211821

query I rowsort
SELECT DISTINCT - 6 + + col1 FROM tab2 AS cor0
----
11
25
53

query I rowsort
SELECT 25 * col2 AS col2 FROM tab2
----
650
675
950

query I rowsort
SELECT ALL + ( col1 * + 82 ) AS col1 FROM tab1
----
1066
2132
820

query I rowsort
SELECT ALL col1 * tab2.col2 AS col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT cor0.col0 + + col2 * + col0 FROM tab1 AS cor0
----
165
3712
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-4542
SELECT + + col1 * col1 + - col0 DIV col0 AS col0 FROM tab0 cor0
----
7395
8280
9408

skipif mysql # not compatible
query I rowsort label-4542
SELECT + + col1 * col1 + - col0 / col0 AS col0 FROM tab0 cor0
----
7395
8280
9408

query I rowsort
SELECT ALL cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT - - col1 * col2 + col2 * + cor0.col0 FROM tab0 cor0
----
132
14760
3630

query I rowsort
SELECT + 40 - col0 FROM tab2
----
-38
-39
33

query I rowsort
SELECT ( tab2.col2 + - col0 ) * tab2.col1 FROM tab2
----
-3068
-697
620

query I rowsort
SELECT DISTINCT - col2 + + col0 * col1 AS col0 FROM tab1
----
24
583
944

query I rowsort
SELECT + col1 + + col1 * + cor0.col1 FROM tab1 cor0
----
110
182
702

onlyif mysql # use DIV operator for integer division
query I rowsort label-4549
SELECT tab1.col0 + + col2 DIV col2 AS col0 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-4549
SELECT tab1.col0 + + col2 / col2 AS col0 FROM tab1
----
4
65
81

query I rowsort
SELECT DISTINCT - col2 + - col1 AS col0 FROM tab1
----
-109
-67
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - tab1.col0 + col0 col1 FROM tab1
----
165
3712
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-4552
SELECT DISTINCT - col0 * - col1 + + col1 DIV col2 FROM tab0
----
2066
3492
8100

skipif mysql # not compatible
query I rowsort label-4552
SELECT DISTINCT - col0 * - col1 + + col1 / col2 FROM tab0
----
2066
3492
8100

query I rowsort
SELECT - col2 * col2 - col0 AS col0 FROM tab2
----
-1523
-736
-754

query I rowsort
SELECT - col2 * col0 + + col1 * + col2 FROM tab1 AS cor0
----
-3078
-6432
1242

query I rowsort
SELECT DISTINCT col2 + + col0 * cor0.col1 AS col1 FROM tab1 AS cor0
----
1136
132
697

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4556
SELECT ALL - CAST( col1 AS SIGNED ) AS col0 FROM tab0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-4556
SELECT ALL - CAST ( col1 AS INTEGER ) AS col0 FROM tab0
----
-86
-91
-97

query I rowsort
SELECT 99 * - col0 FROM tab1
----
-297
-6336
-7920

query I rowsort
SELECT DISTINCT + - cor0.col2 AS col1 FROM tab0, tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT + + ( + ( - col1 ) ) * + col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT - 12 + - col1 * - col1 * col1 FROM tab0 cor0
----
636044
753559
912661

query I rowsort
SELECT col1 * col2 + col0 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT + ( col1 ) * - col0 * + col1 + + col0 * + col1 AS col1 FROM tab1 AS cor0
----
-12480
-1950
-5760

query I rowsort
SELECT - col0 + - col2 * col1 * - col2 FROM tab1 cor0
----
119728
32426
75813

query I rowsort
SELECT DISTINCT - tab2.col1 + - col0 * tab2.col2 FROM tab2
----
-2087
-220
-3019

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4565
SELECT CAST( NULL AS SIGNED ) / - 30 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4565
SELECT CAST ( NULL AS INTEGER ) / - 30 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4566
SELECT DISTINCT + CAST( + col2 AS SIGNED ) AS col0 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-4566
SELECT DISTINCT + CAST ( + col2 AS INTEGER ) AS col0 FROM tab2
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-4567
SELECT - ( col2 + col0 ) DIV - col1 AS col1 FROM tab0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4567
SELECT - ( col2 + col0 ) / - col1 AS col1 FROM tab0
----
0
0
1

query I rowsort
SELECT - 23 - col0 FROM tab2 AS cor0
----
-101
-102
-30

query I rowsort
SELECT ALL - col2 * + col2 + col2 * + cor0.col2 + + cor0.col1 * cor0.col2 AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT col2 * - col2 + + col2 AS col1 FROM tab1
----
-2862
-3192
-9120

query I rowsort
SELECT ALL + col2 + + col1 AS col1 FROM tab1
----
109
67
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4572
SELECT - CAST( NULL AS SIGNED ) * + col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4572
SELECT - CAST ( NULL AS INTEGER ) * + col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 + - ( + col1 ) + - col2 * col2 * + col2 FROM tab0 cor0
----
-195
-36109
-551550

query I rowsort
SELECT ALL + col0 * - col2 * - col1 AS col1 FROM tab1 AS cor0
----
36480
4212
99840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * col1 col1 FROM tab2
----
289
3481
961

query I rowsort
SELECT - col1 + 14 - + col0 AS col0 FROM tab2
----
-123
-24
-82

query I rowsort
SELECT DISTINCT - - 38 FROM tab0 AS cor0
----
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4578
SELECT ALL - CAST( + 43 AS SIGNED ) + col2 * CAST( NULL AS SIGNED ) AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4578
SELECT ALL - CAST ( + 43 AS INTEGER ) + col2 * CAST ( NULL AS INTEGER ) AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 * - col1 AS col0 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT - tab1.col0 FROM tab1, tab1 cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

query I rowsort
SELECT DISTINCT col0 + + 70 + col0 FROM tab0
----
118
140
248

query I rowsort
SELECT col1 + col2 * + col0 FROM tab2
----
2087
220
3019

query I rowsort
SELECT + col0 + - col0 AS col1 FROM tab0
----
0
0
0

query I rowsort
SELECT + ( tab0.col0 ) + col0 + + 89 AS col0 FROM tab0
----
137
159
267

query I rowsort
SELECT + col2 + + col2 * + tab2.col0 FROM tab2
----
2054
216
3040

query I rowsort
SELECT ALL + 75 + - col2 AS col0 FROM tab2
----
37
48
49

query I rowsort
SELECT - col2 * + 30 FROM tab0 cor0
----
-2460
-30
-990

query I rowsort
SELECT + ( - col0 ) + tab2.col0 FROM tab2
----
0
0
0

query I rowsort
SELECT + 59 * 85 FROM tab0
----
5015
5015
5015

query I rowsort
SELECT - col2 + 65 AS col1 FROM tab0
----
-17
32
64

query I rowsort
SELECT DISTINCT 95 AS col2 FROM tab0
----
95

query I rowsort
SELECT ALL 37 AS col2 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to c023509f63faa044d654943e6df55ca2

query I rowsort
SELECT DISTINCT 70 AS col1 FROM tab1
----
70

query I rowsort
SELECT DISTINCT + - col2 * + cor0.col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT col1 + - col0 * + cor0.col2 AS col0 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT ALL + col0 + - col0 * - 82 AS col2 FROM tab2 AS cor0
----
581
6474
6557

query I rowsort
SELECT + col1 - - col2 FROM tab1
----
109
67
80

query I rowsort
SELECT ALL - col0 + + col1 AS col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT - + col0 * + ( + cor0.col1 ) AS col1 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT + col2 + - col1 - - col2 AS col0 FROM tab0
----
-20
-95
73

query I rowsort
SELECT + tab2.col1 * col0 AS col2 FROM tab2
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-4602
SELECT DISTINCT col0 DIV + 13 + 76 * col0 * - col0 - + 2 * col1 AS col0 FROM tab1
----
-311312
-486420
-736

skipif mysql # not compatible
query I rowsort label-4602
SELECT DISTINCT col0 / + 13 + 76 * col0 * - col0 - + 2 * col1 AS col0 FROM tab1
----
-311312
-486420
-736

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + + col2 - + col1 col1 FROM tab2
----
-7
23
59

query I rowsort
SELECT col1 + 50 * 6 + col1 FROM tab2
----
334
362
418

query I rowsort
SELECT - - col0 * + ( + col1 ) AS col2 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL - col2 * 78 + col2 AS col1 FROM tab2 AS cor0
----
-2002
-2079
-2926

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4607
SELECT ALL cor0.col1 + - CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4607
SELECT ALL cor0.col1 + - CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * + cor0.col0 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-4609
SELECT ALL - + col2 * col2 + + cor0.col1 DIV - col1 FROM tab2 AS cor0
----
-1445
-677
-730

skipif mysql # not compatible
query I rowsort label-4609
SELECT ALL - + col2 * col2 + + cor0.col1 / - col1 FROM tab2 AS cor0
----
-1445
-677
-730

query I rowsort
SELECT + + col0 + - col0 * + col2 FROM tab2 AS cor0
----
-182
-1950
-2923

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4611
SELECT - + col0 + CAST( - col2 AS SIGNED ) + - cor0.col0 FROM tab0 AS cor0
----
-260
-71
-81

skipif mysql # not compatible
query I rowsort label-4611
SELECT - + col0 + CAST ( - col2 AS INTEGER ) + - cor0.col0 FROM tab0 AS cor0
----
-260
-71
-81

query I rowsort
SELECT + col1 + + col2 * - col0 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT ( - cor0.col1 ) AS col0 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

query I rowsort
SELECT DISTINCT - + col1 * col0 + col2 * + col1 AS col0 FROM tab0 cor0
----
-3298
-637
774

query I rowsort
SELECT ALL - col1 - + col2 AS col1 FROM tab1 cor0
----
-109
-67
-80

query I rowsort
SELECT ALL + - col0 + + 52 FROM tab0 AS cor0
----
-37
17
28

query I rowsort
SELECT + col1 + - ( - col2 + col0 ) * + 22 FROM tab1
----
-144
1148
365

onlyif mysql # use DIV operator for integer division
query I rowsort label-4618
SELECT DISTINCT col0 DIV - 77 AS col1 FROM tab2 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-4618
SELECT DISTINCT col0 / - 77 AS col1 FROM tab2 AS cor0
----
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 7 + 78 col2 FROM tab1 cor0
----
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + + col2 * cor0.col1 col0 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT + ( - cor0.col1 ) - - col1 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT ALL - 6 + - 68 * col1 FROM tab1 AS cor0
----
-1774
-686
-890

query I rowsort
SELECT - - col1 + - col2 AS col0 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT col1 - - 79 FROM tab1 AS cor0
----
105
89
92

query I rowsort
SELECT DISTINCT ( + col0 ) + cor0.col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT + 8 + - col0 FROM tab2 AS cor0
----
-70
-71
1

query I rowsort
SELECT ALL + 12 - - cor0.col1 AS col2 FROM tab1 AS cor0
----
22
25
38

query I rowsort
SELECT + ( + col2 ) + col1 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT ALL - col1 * - cor0.col0 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT + col0 * + col0 + col0 * + 27 + 79 FROM tab1 AS cor0
----
169
5903
8639

onlyif mysql # use DIV operator for integer division
query I rowsort label-4631
SELECT + col2 * - 0 DIV + col0 AS col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4631
SELECT + col2 * - 0 / + col0 AS col1 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4632
SELECT 42 DIV + 90 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4632
SELECT 42 / + 90 FROM tab2
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4633
SELECT ALL CAST( + col0 AS SIGNED ) * col1 AS col1 FROM tab2 AS cor0
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-4633
SELECT ALL CAST ( + col0 AS INTEGER ) * col1 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT ALL ( col2 ) * col1 + 59 + + 31 * col2 AS col1 FROM tab0 AS cor0
----
10063
187
3920

query I rowsort
SELECT - ( 63 ) + cor0.col0 FROM tab1 AS cor0
----
-60
1
17

query I rowsort
SELECT - 28 * + col0 - + col1 * ( col1 ) * - col2 FROM tab1 AS cor0
----
13984
36420
3908

onlyif mysql # use DIV operator for integer division
query I rowsort label-4637
SELECT DISTINCT - + ( cor0.col1 ) DIV - cor0.col1 col0 FROM tab1 AS cor0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4637
SELECT DISTINCT - + ( cor0.col1 ) / - cor0.col1 col0 FROM tab1 AS cor0
----
1

query I rowsort
SELECT ALL col0 * cor0.col1 AS col2 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - + col0 - - col1 AS col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT ( - 80 ) * cor0.col2 + 80 * + col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT col2 * col1 + - col0 AS col1 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT col0 - - 6 AS col0 FROM tab2 AS cor0
----
13
84
85

query I rowsort
SELECT ALL 25 * - cor1.col0 AS col2 FROM tab0 cor0 CROSS JOIN tab1 cor1
----
9 values hashing to e355f1314e550ddd0c7740ff16769d7e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + - col2 * - col1 * col1 col2 FROM tab0 cor0
----
244092
679131
9444

query I rowsort
SELECT DISTINCT ( col2 ) * col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + - col0 * - col1 * - col1 FROM tab1 AS cor0
----
-13520
-2028
-6400

onlyif mysql # use DIV operator for integer division
query I rowsort label-4647
SELECT ALL + col2 + col2 * col1 DIV col2 FROM tab1 AS cor0
----
109
67
80

skipif mysql # not compatible
query I rowsort label-4647
SELECT ALL + col2 + col2 * col1 / col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL + 70 * col0 AS col0 FROM tab0 AS cor0
----
1680
2450
6230

onlyif mysql # use DIV operator for integer division
query I rowsort label-4649
SELECT ALL + col1 - col0 DIV ( col1 ) FROM tab1 AS cor0
----
26
4
7

skipif mysql # not compatible
query I rowsort label-4649
SELECT ALL + col1 - col0 / ( col1 ) FROM tab1 AS cor0
----
26
4
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4650
SELECT - 82 + col1 * + CAST( col0 AS SIGNED ) FROM tab2 AS cor0
----
1261
135
4520

skipif mysql # not compatible
query I rowsort label-4650
SELECT - 82 + col1 * + CAST ( col0 AS INTEGER ) FROM tab2 AS cor0
----
1261
135
4520

query I rowsort
SELECT DISTINCT + col0 * col0 AS col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT 87 + + col1 FROM tab0 AS cor0
----
173
178
184

onlyif mysql # use DIV operator for integer division
query I rowsort label-4653
SELECT DISTINCT + - 9 DIV col0 AS col1 FROM tab2 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-4653
SELECT DISTINCT + - 9 / col0 AS col1 FROM tab2 AS cor0
----
-1
0

query I rowsort
SELECT DISTINCT + + col2 * col1 AS col0 FROM tab0 AS cor0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * + cor0.col2 + 15 col1 FROM tab0 AS cor0
----
50
7313
807

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4656
SELECT + 1 + - col0 / CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4656
SELECT + 1 + - col0 / CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - col2 * col0 - + 75 AS col1 FROM tab1 AS cor0
----
-237
-3723
-7755

query I rowsort
SELECT DISTINCT col0 * + col2 * + col0 + col0 FROM tab0 AS cor0
----
1260
19032
649611

onlyif mysql # use DIV operator for integer division
query I rowsort label-4659
SELECT ALL 86 DIV col0 FROM tab0 AS cor0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-4659
SELECT ALL 86 / col0 FROM tab0 AS cor0
----
0
2
3

query I rowsort
SELECT ALL + 6 AS col1 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to f1e8f0199f3714ee8fcc24ce0cc3ea04

query I rowsort
SELECT ALL - col2 * cor0.col0 + cor0.col2 FROM tab1 cor0
----
-108
-3591
-7584

query I rowsort
SELECT + - col2 + - 30 FROM tab1 AS cor0
----
-126
-84
-87

query I rowsort
SELECT DISTINCT + cor0.col1 - col2 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT ALL cor1.col1 * + cor0.col0 * 29 FROM tab2, tab2 AS cor0, tab0 cor1
----
27 values hashing to 116c614c9da884b5f718476d0b49aa49

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4665
SELECT ALL col2 + CAST( NULL AS SIGNED ) * cor0.col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4665
SELECT ALL col2 + CAST ( NULL AS INTEGER ) * cor0.col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + 83 AS col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
-83

query I rowsort
SELECT + cor0.col0 + col0 AS col0 FROM tab1 cor0
----
128
160
6

query I rowsort
SELECT ALL - 47 AS col2 FROM tab0
----
-47
-47
-47

query I rowsort
SELECT 13 AS col1 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to a90d0f37cec603ae1bc0a60dc7fbaeed

query I rowsort
SELECT - tab2.col2 FROM tab1, tab0, tab1 AS cor0, tab2
----
81 values hashing to c569638e8a09ff819458d62ddbde994c

query I rowsort
SELECT 1 * tab2.col2 FROM tab2
----
26
27
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4672
SELECT + - cor0.col2 * col2 + CAST( NULL AS SIGNED ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4672
SELECT + - cor0.col2 * col2 + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col2 * col0 + - col2 FROM tab2
----
162
2002
2964

query I rowsort
SELECT - + col1 * + col0 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT + col2 + 82 AS col2 FROM tab2 AS cor0
----
108
109
120

query I rowsort
SELECT + ( + col1 * - ( col0 ) ) AS col2 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT + col2 * col0 + - col1 AS col0 FROM tab2 AS cor0
----
158
1969
2985

query I rowsort
SELECT + col1 + - 40 AS col2 FROM tab0 AS cor0
----
46
51
57

query I rowsort
SELECT - col0 + col0 * ( + col2 ) AS col2 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT cor0.col1 * - col0 * 63 FROM tab0 cor0
----
-130032
-213885
-510237

onlyif mysql # use DIV operator for integer division
query I rowsort label-4681
SELECT DISTINCT - - col1 DIV - cor0.col2 AS col0 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4681
SELECT DISTINCT - - col1 / - cor0.col2 AS col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL - 85 AS col1 FROM tab2 AS cor0
----
-85
-85
-85

query I rowsort
SELECT + - cor0.col1 + 23 FROM tab0 AS cor0
----
-63
-68
-74

query I rowsort
SELECT + ( - col1 ) * col0 AS col2 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL 75 FROM tab1, tab2 cor0 CROSS JOIN tab0
----
27 values hashing to e61b59795204c348103a58c0a8e4ce16

query I rowsort
SELECT ALL - 33 * col2 * + col0 AS col2 FROM tab1 AS cor0
----
-120384
-253440
-5346

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + + col2 * col1 col1 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT + - cor0.col2 * col0 + - 39 * 94 AS col2 FROM tab2 AS cor0
----
-3855
-5694
-6668

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 87 col2 FROM tab2 cor0
----
87
87
87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4690
SELECT 1 * - col2 + - CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4690
SELECT 1 * - col2 + - CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 73 + - tab1.col1 FROM tab1, tab0 AS cor0
----
47
60
63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 13 * - cor0.col1 col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 9ee612aae72ee403dc7807f4390c8529

query I rowsort
SELECT - + cor0.col2 + - col1 * col2 FROM tab1 cor0
----
-1344
-1458
-627

onlyif mysql # use DIV operator for integer division
query I rowsort label-4694
SELECT + 86 + col2 DIV 49 AS col2 FROM tab0 AS cor0
----
86
86
87

skipif mysql # not compatible
query I rowsort label-4694
SELECT + 86 + col2 / 49 AS col2 FROM tab0 AS cor0
----
86
86
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 66 - - col0 col1 FROM tab0 AS cor0
----
-31
-42
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - col0 ) col0 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT 8 AS col2 FROM tab0
----
8
8
8

query I rowsort
SELECT DISTINCT ( - tab2.col1 ) * + col0 FROM tab2
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-4699
SELECT + - col2 DIV - col0 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4699
SELECT + - col2 / - col0 FROM tab0 AS cor0
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 * col0 col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - + 87 * - cor0.col2 AS col0 FROM tab1 cor0
----
4698
4959
8352

query I rowsort
SELECT DISTINCT + - col2 * col0 AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT + + col1 * col1 * + col2 AS col1 FROM tab1 AS cor0
----
16224
36504
5700

query I rowsort
SELECT DISTINCT + ( col0 ) * - col2 + + col2 AS col1 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT DISTINCT + col2 * - col2 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT - col1 * tab0.col2 AS col0 FROM tab0
----
-2838
-7462
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4707
SELECT + - CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4707
SELECT + - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-4708
SELECT ALL - col1 DIV - col0 + + col1 * col2 * + 76 FROM tab1 AS cor0
----
106712
43320
94848

skipif mysql # not compatible
query I rowsort label-4708
SELECT ALL - col1 / - col0 + + col1 * col2 * + 76 FROM tab1 AS cor0
----
106712
43320
94848

query I rowsort
SELECT DISTINCT - col1 - + col0 FROM tab1 cor0
----
-29
-74
-93

query I rowsort
SELECT ALL 16 + col0 * col0 FROM tab1 AS cor0
----
25
4112
6416

onlyif mysql # use DIV operator for integer division
query I rowsort label-4711
SELECT + + col0 DIV col1 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-4711
SELECT + + col0 / col1 FROM tab2 AS cor0
----
0
1
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4712
SELECT ALL + + CAST( NULL AS SIGNED ) * + col2 + col2 * 78 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4712
SELECT ALL + + CAST ( NULL AS INTEGER ) * + col2 + col2 * 78 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4713
SELECT ALL - CAST( NULL AS SIGNED ) * col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4713
SELECT ALL - CAST ( NULL AS INTEGER ) * col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 22 FROM tab0
----
22

query I rowsort
SELECT DISTINCT + 24 * 4 FROM tab1
----
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-4716
SELECT - + ( - 72 ) DIV col0 FROM tab2 AS cor0
----
0
0
10

skipif mysql # not compatible
query I rowsort label-4716
SELECT - + ( - 72 ) / col0 FROM tab2 AS cor0
----
0
0
10

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0, tab0 cor1, tab2 AS cor2
----
972 values hashing to 42e69ecdafb3c81046bc5cb4c98b1666

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab0, tab2 AS cor0, tab2 cor1, tab1, tab2 AS cor2
----
7
78
79

query IIIIIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0 AS cor0 CROSS JOIN tab1, tab2 cor1, tab0, tab1 cor2, tab0 AS cor3
----
13122 values hashing to fc99c53a02e2202c816fcf73541bfe3e

query I rowsort
SELECT + col0 + 69 + + 22 AS col2 FROM tab2
----
169
170
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-4721
SELECT - col2 + 29 + + 36 DIV + col1 AS col0 FROM tab2
----
-7
3
3

skipif mysql # not compatible
query I rowsort label-4721
SELECT - col2 + 29 + + 36 / + col1 AS col0 FROM tab2
----
-7
3
3

query I rowsort
SELECT - 15 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 1172c9a62bdad7db0def9205c06ee1f2

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab2 AS cor2, tab0 AS cor3
----
3645 values hashing to 93ed44f621cc970f32b0cc9543b45262

onlyif mysql # use DIV operator for integer division
query I rowsort label-4724
SELECT DISTINCT + col0 DIV - 55 + - col2 FROM tab2 AS cor0
----
-27
-39

skipif mysql # not compatible
query I rowsort label-4724
SELECT DISTINCT + col0 / - 55 + - col2 FROM tab2 AS cor0
----
-27
-39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * cor0.col0 col0 FROM tab2 AS cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + col0 col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ALL - - col2 * + cor0.col2 - - col2 FROM tab1 AS cor0
----
2970
3306
9312

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4728
SELECT + - col2 + - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4728
SELECT + - col2 + - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - - col1 * col2 - + col0 * - col2 FROM tab2 AS cor0
----
1026
3562
3648

query I rowsort
SELECT DISTINCT - + col2 * col1 + col0 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT DISTINCT - col0 * col1 - col2 AS col0 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT DISTINCT + col2 * + cor0.col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL + + cor0.col2 * ( - col2 ) AS col0 FROM tab1 AS cor0
----
-2916
-3249
-9216

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4734
SELECT ALL - CAST( - col2 AS SIGNED ) FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-4734
SELECT ALL - CAST ( - col2 AS INTEGER ) FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT col2 * ( + col1 ) + + col2 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT - col0 * + cor0.col2 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL 63 + 3 AS col0 FROM tab0 cor0
----
66
66
66

query I rowsort
SELECT DISTINCT - col1 + - col0 AS col1 FROM tab0 AS cor0
----
-110
-132
-180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col2 col2 FROM tab2 AS cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col1 ) col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT + col2 + col0 * col2 - + col2 AS col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT + 86 * + col0 + cor0.col2 FROM tab0 AS cor0
----
2097
3011
7736

query I rowsort
SELECT ALL + + ( col1 ) AS col0 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT - 50 + col2 AS col2 FROM tab2 AS cor0
----
-12
-23
-24

query I rowsort
SELECT DISTINCT - col1 + col0 * col0 FROM tab1 AS cor0
----
-17
4086
6387

query I rowsort
SELECT 0 * col1 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT ALL - 3 FROM tab1 AS cor0
----
-3
-3
-3

onlyif mysql # use DIV operator for integer division
query I rowsort label-4748
SELECT DISTINCT + + 86 * col1 - 61 DIV cor0.col0 FROM tab1 AS cor0
----
1118
2216
860

skipif mysql # not compatible
query I rowsort label-4748
SELECT DISTINCT + + 86 * col1 - 61 / cor0.col0 FROM tab1 AS cor0
----
1118
2216
860

query I rowsort
SELECT DISTINCT 80 FROM tab1, tab1 AS cor0
----
80

query I rowsort
SELECT DISTINCT - col0 + + col1 * ( col0 ) AS col0 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT ALL + cor0.col2 * - col1 + - 8 FROM tab0 cor0
----
-105
-2846
-7470

onlyif mysql # use DIV operator for integer division
query I rowsort label-4752
SELECT ALL col1 DIV + col2 AS col2 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-4752
SELECT ALL col1 / + col2 AS col2 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
-10
-13
-26

query I rowsort
SELECT DISTINCT - + col1 * - col0 + + cor0.col2 FROM tab0 AS cor0
----
2097
3396
8181

query I rowsort
SELECT DISTINCT + - col1 + + col2 + - ( + col1 ) FROM tab1 AS cor0
----
2
37
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4756
SELECT ALL - col0 / CAST( NULL AS SIGNED ) - 96 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4756
SELECT ALL - col0 / CAST ( NULL AS INTEGER ) - 96 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - col1 + 7 FROM tab1 AS cor0
----
-19
-3
-6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 * 82 - col0 col2 FROM tab0 AS cor0
----
2682
47
6635

query I rowsort
SELECT DISTINCT col2 * + tab2.col1 AS col0 FROM tab2
----
1534
646
837

query I rowsort
SELECT DISTINCT + 61 AS col2 FROM tab1
----
61

query I rowsort
SELECT - col0 * - 2 AS col2 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT 69 AS col2 FROM tab2
----
69
69
69

query I rowsort
SELECT ALL + col2 * col1 * - 48 FROM tab1
----
-27360
-59904
-67392

query I rowsort
SELECT ALL 38 AS col2 FROM tab0, tab1 cor0
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

query I rowsort
SELECT - col2 + - 71 AS col2 FROM tab1
----
-125
-128
-167

query I rowsort
SELECT - col2 + col0 * col1 AS col1 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT - cor0.col0 + - col0 * - cor0.col2 FROM tab1 AS cor0
----
159
3584
7600

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + 86 ) col0 FROM tab0, tab1 AS cor0
----
86

query I rowsort
SELECT + col2 + + col2 * col2 * col0 AS col1 FROM tab0 AS cor0
----
26169
36
598518

query I rowsort
SELECT col0 + tab0.col2 * col2 AS col2 FROM tab0
----
1113
36
6813

query I rowsort
SELECT - col1 + 35 AS col0 FROM tab2
----
-24
18
4

query I rowsort
SELECT + col2 + - 65 + + col1 AS col1 FROM tab2
----
-10
-7
20

query I rowsort
SELECT + 3 + col2 * col2 * ( + 70 + col2 ) FROM tab1
----
1529859
361587
412626

onlyif mysql # use DIV operator for integer division
query I rowsort label-4774
SELECT - col1 DIV - 52 AS col1 FROM tab2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-4774
SELECT - col1 / - 52 AS col1 FROM tab2
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4775
SELECT ALL + 57 DIV - 68 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4775
SELECT ALL + 57 / - 68 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 85 + - 93 * col2 AS col2 FROM tab1
----
-4937
-5216
-8843

query I rowsort
SELECT + - 55 + + col2 FROM tab0 AS cor0
----
-22
-54
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-4778
SELECT - - col1 DIV col2 + col0 AS col0 FROM tab0 AS cor0
----
132
26
90

skipif mysql # not compatible
query I rowsort label-4778
SELECT - - col1 / col2 + col0 AS col0 FROM tab0 AS cor0
----
132
26
90

query I rowsort
SELECT DISTINCT - 4 + col0 AS col0 FROM tab1 AS cor0
----
-1
60
76

query I rowsort
SELECT DISTINCT + + cor0.col1 * + col0 + + col0 AS col1 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT cor0.col1 + + col1 AS col0 FROM tab2 cor0
----
118
34
62

query I rowsort
SELECT DISTINCT - - 32 * - col0 + - col2 AS col0 FROM tab0 cor0
----
-1121
-2930
-801

query I rowsort
SELECT DISTINCT - - cor0.col0 + - col1 FROM tab1 AS cor0
----
-23
54
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 79 + - cor0.col0 * col2 col1 FROM tab1 AS cor0
----
-241
-3727
-7759

query I rowsort
SELECT col0 + cor0.col1 * - 14 AS col2 FROM tab0 AS cor0
----
-1180
-1185
-1323

query I rowsort
SELECT col0 + 80 FROM tab0
----
104
115
169

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * 75 * col1 col0 FROM tab2
----
21675
261075
72075

query I rowsort
SELECT ALL ( 68 ) FROM tab1, tab1 AS cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * 23 col2 FROM tab0
----
-1886
-23
-759

onlyif mysql # use DIV operator for integer division
query I rowsort label-4790
SELECT col2 DIV + CAST( col0 AS SIGNED ) AS col2 FROM tab2
----
0
0
3

skipif mysql # not compatible
query I rowsort label-4790
SELECT col2 / + CAST ( col0 AS INTEGER ) AS col2 FROM tab2
----
0
0
3

query I rowsort
SELECT ALL - col2 * col1 * 33 FROM tab1
----
-18810
-41184
-46332

onlyif mysql # use DIV operator for integer division
query I rowsort label-4792
SELECT + tab2.col2 DIV 6 FROM tab2
----
4
4
6

skipif mysql # not compatible
query I rowsort label-4792
SELECT + tab2.col2 / 6 FROM tab2
----
4
4
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-4793
SELECT ALL + col1 DIV col1 AS col1 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4793
SELECT ALL + col1 / col1 AS col1 FROM tab2
----
1
1
1

query I rowsort
SELECT + 53 * col1 + col0 AS col1 FROM tab2 AS cor0
----
1650
3205
980

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4795
SELECT - ( + col2 ) + + col2 * CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4795
SELECT - ( + col2 ) + + col2 * CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 + + col2 + col0 FROM tab0 cor0
----
253
37
90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4797
SELECT ( - col1 ) + + cor0.col1 + CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4797
SELECT ( - col1 ) + + cor0.col1 + CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 * ( + col1 ) col2 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT - cor0.col1 + + col0 * col1 AS col1 FROM tab0 AS cor0
----
1978
3298
8008

query I rowsort
SELECT - 79 * + 29 + col2 - col1 FROM tab0 cor0
----
-2300
-2344
-2387

query I rowsort
SELECT + col0 + col1 + col2 AS col1 FROM tab2 AS cor0
----
134
163
65

query I rowsort
SELECT ALL 44 AS col0 FROM tab2
----
44
44
44

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT ALL + ( col1 ) * + ( + 13 * - col1 ) AS col1 FROM tab1 cor0
----
-1300
-2197
-8788

query I rowsort
SELECT DISTINCT - col0 * + col0 + + ( - col0 + + col2 ) FROM tab1 AS cor0
----
-4103
-6384
42

query I rowsort
SELECT cor0.col1 + + col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT + + col2 + col1 AS col2 FROM tab2 cor0
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 77 * col2 col0 FROM tab2 AS cor0
----
2002
2079
2926

query I rowsort
SELECT - - 28 * col0 FROM tab1 cor0
----
1792
2240
84

query I rowsort
SELECT DISTINCT col2 * - col2 + 7 * - cor0.col2 * + col0 AS col1 FROM tab2 AS cor0
----
-14872
-2052
-22458

query I rowsort
SELECT ALL - col1 + - col1 AS col1 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT + 77 AS col1 FROM tab1
----
77
77
77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4813
SELECT DISTINCT - CAST( + 29 AS SIGNED ) FROM tab1 cor0 CROSS JOIN tab1 AS cor1
----
-29

skipif mysql # not compatible
query I rowsort label-4813
SELECT DISTINCT - CAST ( + 29 AS INTEGER ) FROM tab1 cor0 CROSS JOIN tab1 AS cor1
----
-29

query I rowsort
SELECT + - cor0.col2 * + col1 AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT col1 * 68 + - col1 AS col2 FROM tab0 AS cor0
----
5762
6097
6499

query I rowsort
SELECT col2 + + 99 AS col2 FROM tab1
----
153
156
195

query I rowsort
SELECT ALL - col0 * col1 + - 29 FROM tab0 AS cor0
----
-2093
-3424
-8128

query I rowsort
SELECT DISTINCT + col0 - cor0.col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL col1 - col1 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * + col2 + - col1 + - col0 col2 FROM tab1 AS cor0
----
133
3574
7587

query I rowsort
SELECT DISTINCT + col1 * 49 AS col1 FROM tab0 AS cor0
----
4214
4459
4753

query I rowsort
SELECT col1 * col1 + col2 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT cor0.col1 + - 48 AS col1 FROM tab2 AS cor0
----
-17
-31
11

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4824
SELECT DISTINCT + CAST( - col0 AS SIGNED ) col1 FROM tab1 cor0
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4824
SELECT DISTINCT + CAST ( - col0 AS INTEGER ) col1 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT ALL cor1.col0 + + cor1.col2 AS col0 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 651bd87d0835272922fb073806a0b5a0

query I rowsort
SELECT ALL col0 * + ( col1 ) FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + - 18 AS col0 FROM tab2 AS cor0
----
-18
-18
-18

query I rowsort
SELECT DISTINCT - ( + col0 ) * + col1 - ( - col2 ) * col2 FROM tab2 AS cor0
----
-3926
101
512

query I rowsort
SELECT ALL 60 FROM tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to 1ef27a1d2784b3ab642571630db70349

query I rowsort
SELECT - col0 * 85 * 10 - - tab1.col1 FROM tab1
----
-2524
-54390
-67987

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab2 AS cor2
----
972 values hashing to d41be7437523f0dba2158c7f0439f329

query I rowsort
SELECT - col0 + + col2 AS col0 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT - col1 * col0 + + ( - cor0.col2 * + col0 ) AS col0 FROM tab1 AS cor0
----
-240
-4288
-8720

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab1, tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
54
57
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4835
SELECT CAST( NULL AS SIGNED ) * ( col0 ) * - 31 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4835
SELECT CAST ( NULL AS INTEGER ) * ( col0 ) * - 31 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + tab2.col2 * col1 * tab2.col1 AS col1 FROM tab2
----
10982
25947
90506

query I rowsort
SELECT col0 * col1 + - col1 * - col0 FROM tab0 AS cor0
----
16198
4128
6790

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 25 col1 FROM tab2
----
25
25
25

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4839
SELECT col0 * col2 * + CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4839
SELECT col0 * col2 * + CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + ( + col1 ) + + col0 AS col1 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT - 66 + col1 AS col2 FROM tab2 AS cor0
----
-35
-49
-7

query I rowsort
SELECT ALL - ( col0 ) + + col1 + + col1 * col1 * - col2 AS col0 FROM tab1 cor0
----
-16291
-36481
-5754

query I rowsort
SELECT ALL - cor0.col0 + col2 * + col2 AS col2 FROM tab0 AS cor0
----
-34
1065
6635

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 + - col1 col2 FROM tab2 AS cor0
----
-118
-34
-62

onlyif mysql # use DIV operator for integer division
query I rowsort label-4845
SELECT ALL col0 * col0 + + ( - col2 ) DIV + cor0.col0 AS col1 FROM tab2 AS cor0
----
46
6084
6241

skipif mysql # not compatible
query I rowsort label-4845
SELECT ALL col0 * col0 + + ( - col2 ) / + cor0.col0 AS col1 FROM tab2 AS cor0
----
46
6084
6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-4846
SELECT - 37 DIV col1 AS col0 FROM tab2 AS cor0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-4846
SELECT - 37 / col1 AS col0 FROM tab2 AS cor0
----
-1
-2
0

query I rowsort
SELECT ALL - + 33 + col2 AS col2 FROM tab2 AS cor0
----
-6
-7
5

query I rowsort
SELECT ALL - + 96 + col2 FROM tab0 AS cor0
----
-14
-63
-95

query I rowsort
SELECT tab1.col1 * 91 FROM tab1
----
1183
2366
910

query I rowsort
SELECT - tab2.col2 + - col0 FROM tab2
----
-104
-117
-34

query I rowsort
SELECT + col1 * 30 FROM tab0 AS cor0
----
2580
2730
2910

query I rowsort
SELECT DISTINCT + col1 + col1 AS col0 FROM tab0
----
172
182
194

query I rowsort
SELECT DISTINCT col0 + 1 AS col0 FROM tab1
----
4
65
81

query I rowsort
SELECT ALL + col0 * ( - col1 ) + - cor0.col2 + + ( + col1 ) AS col0 FROM tab1 AS cor0
----
-106
-1123
-687

query I rowsort
SELECT DISTINCT + col1 * ( 98 ) FROM tab1 cor0
----
1274
2548
980

query I rowsort
SELECT ( 67 ) AS col0 FROM tab2 AS cor0
----
67
67
67

query I rowsort
SELECT ALL + + cor0.col2 + + col0 + col2 FROM tab1 cor0
----
111
178
272

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + col1 * - col0 * col1 col1 FROM tab2 AS cor0
----
-22848
-271577
-6758

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4859
SELECT ALL + + CAST( NULL AS DECIMAL ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4859
SELECT ALL + + CAST ( NULL AS REAL ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + cor0.col1 * - 88 + - col1 FROM tab2 AS cor0
----
1479
2697
5133

query I rowsort
SELECT DISTINCT 62 + cor0.col0 * - col2 FROM tab1 AS cor0
----
-100
-3586
-7618

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4862
SELECT DISTINCT + cor0.col2 / ( + cor0.col2 * + CAST( NULL AS SIGNED ) ) + + 31 col1 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4862
SELECT DISTINCT + cor0.col2 / ( + cor0.col2 * + CAST ( NULL AS INTEGER ) ) + + 31 col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + col2 + col1 + + col1 * ( + cor0.col0 ) AS col0 FROM tab2 AS cor0
----
1398
275
4687

query I rowsort
SELECT col0 + + ( + col0 ) AS col0 FROM tab0 AS cor0
----
178
48
70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4865
SELECT DISTINCT + CAST( + col2 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-4865
SELECT DISTINCT + CAST ( + col2 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT DISTINCT + col0 * 96 - + col1 FROM tab1 AS cor0
----
262
6134
7667

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4867
SELECT DISTINCT - CAST( NULL AS SIGNED ) AS col2 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4867
SELECT DISTINCT - CAST ( NULL AS INTEGER ) AS col2 FROM tab0 cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4868
SELECT - CAST( NULL AS SIGNED ) * - col0 * + col1 col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4868
SELECT - CAST ( NULL AS INTEGER ) * - col0 * + col1 col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 55 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 1626bd3008abd9f18cc88cdecf7b64d0

query I rowsort
SELECT ALL + - 95 + - col0 FROM tab0 AS cor0
----
-119
-130
-184

query I rowsort
SELECT - 44 + col1 AS col1 FROM tab1 AS cor0
----
-18
-31
-34

query I rowsort
SELECT + col1 * 56 + col0 + col0 AS col1 FROM tab1 AS cor0
----
1462
688
888

query I rowsort
SELECT DISTINCT - 47 * 91 AS col2 FROM tab0 AS cor0
----
-4277

query I rowsort
SELECT + - col2 + col2 * + col2 AS col1 FROM tab0 AS cor0
----
0
1056
6642

query I rowsort
SELECT + - col1 + + ( col0 ) * + col0 FROM tab0 cor0
----
1128
490
7830

query I rowsort
SELECT ALL - 25 AS col1 FROM tab2, tab0 cor0
----
9 values hashing to 40ac8fd000b2e49317aed2411077839e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 col0 FROM tab0, tab0 cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT - 7 AS col0 FROM tab0 AS cor0
----
-7
-7
-7

query I rowsort
SELECT + col2 * - col0 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + col1 + 23 * + col0 FROM tab2
----
1834
1853
192

query I rowsort
SELECT col0 + 6 FROM tab1
----
70
86
9

query I rowsort
SELECT cor0.col1 * - col1 AS col0 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT + - ( col0 ) * 24 * - col1 AS col1 FROM tab1 AS cor0
----
15360
1872
24960

query I rowsort
SELECT ALL ( + col1 * + col1 ) AS col0 FROM tab1
----
100
169
676

query I rowsort
SELECT ALL + col1 * tab1.col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT DISTINCT + 1 AS col0 FROM tab0, tab1 AS cor0
----
1

query I rowsort
SELECT 43 AS col2 FROM tab1
----
43
43
43

query I rowsort
SELECT + cor0.col2 + + col2 AS col0 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT col1 + + cor0.col0 FROM tab1 cor0
----
29
74
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4890
SELECT - col0 * CAST( NULL AS SIGNED ) * col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4890
SELECT - col0 * CAST ( NULL AS INTEGER ) * col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + - col2 * + 71 FROM tab0 AS cor0
----
-2343
-5822
-71

query I rowsort
SELECT col1 * + ( + col2 + + cor0.col0 * col2 ) AS col2 FROM tab2 cor0
----
121186
51680
6696

query I rowsort
SELECT + col2 - 30 FROM tab0 AS cor0
----
-29
3
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-4894
SELECT ALL col0 DIV - ( + 5 ) FROM tab2 AS cor0
----
-1
-15
-15

skipif mysql # not compatible
query I rowsort label-4894
SELECT ALL col0 / - ( + 5 ) FROM tab2 AS cor0
----
-1
-15
-15

query I rowsort
SELECT DISTINCT - cor0.col0 * - 40 + ( col1 ) FROM tab0 AS cor0
----
1046
1497
3651

query I rowsort
SELECT - col2 * - col1 * + col0 + - col2 + 26 AS col1 FROM tab1 AS cor0
----
36449
4184
99770

onlyif mysql # use DIV operator for integer division
query I rowsort label-4897
SELECT DISTINCT - col2 * col0 - CAST( + col0 AS SIGNED ) DIV tab1.col1 AS col0 FROM tab1
----
-162
-3654
-7686

skipif mysql # not compatible
query I rowsort label-4897
SELECT DISTINCT - col2 * col0 - CAST ( + col0 AS INTEGER ) / tab1.col1 AS col0 FROM tab1
----
-162
-3654
-7686

query I rowsort
SELECT ALL col0 * - col0 - - 31 * col0 AS col1 FROM tab0
----
-140
-5162
168

query I rowsort
SELECT ALL + col1 * - col0 - + col2 AS col2 FROM tab2
----
-1381
-244
-4628

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4900
SELECT ALL col0 + CAST( NULL AS SIGNED ) + ( tab2.col2 ) AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4900
SELECT ALL col0 + CAST ( NULL AS INTEGER ) + ( tab2.col2 ) AS col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - 61 FROM tab0, tab0 cor0
----
9 values hashing to 51f53697966a79d306a4570537cd91a1

query I rowsort
SELECT ALL + col1 + + ( - col1 ) + col2 FROM tab0
----
1
33
82

query I rowsort
SELECT + tab0.col0 * col1 + + col0 * tab0.col1 + 19 FROM tab0
----
16217
4147
6809

query I rowsort
SELECT ALL - col0 + - 22 + 11 FROM tab2
----
-18
-89
-90

query I rowsort
SELECT DISTINCT 22 * 61 FROM tab2, tab2 cor0
----
1342

query I rowsort
SELECT DISTINCT - cor0.col2 * - col2 AS col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL - cor0.col2 + - cor0.col2 AS col1 FROM tab2 AS cor0
----
-52
-54
-76

onlyif mysql # use DIV operator for integer division
query I rowsort label-4908
SELECT ALL - cor0.col1 + + col0 DIV - col2 FROM tab0 AS cor0
----
-132
-86
-92

skipif mysql # not compatible
query I rowsort label-4908
SELECT ALL - cor0.col1 + + col0 / - col2 FROM tab0 AS cor0
----
-132
-86
-92

query I rowsort
SELECT col1 * - 87 FROM tab2 AS cor0
----
-1479
-2697
-5133

query I rowsort
SELECT + - col2 + + 77 + col0 * col1 AS col0 FROM tab1 AS cor0
----
101
1021
660

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + - col0 * col1 col1 FROM tab1 AS cor0
----
-104
-1053
-650

query I rowsort
SELECT + col0 - col2 * - ( - col1 ) FROM tab0 cor0
----
-2814
-62
-7373

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col2 col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT - col2 * + col1 + 20 + col0 FROM tab1 AS cor0
----
-1148
-1381
-486

query I rowsort
SELECT ALL - col2 + cor0.col2 AS col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4916
SELECT + col1 + col0 DIV + col1 FROM tab1
----
16
19
26

skipif mysql # not compatible
query I rowsort label-4916
SELECT + col1 + col0 / + col1 FROM tab1
----
16
19
26

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
243 values hashing to 7e12d99d8ab63d9fd10e95cef9d78998

query I rowsort
SELECT 50 FROM tab0, tab1 cor0, tab0 AS cor1
----
27 values hashing to 314aace40e704c20a6be06204a329f80

query I rowsort
SELECT DISTINCT - + 2 * col2 - + 90 FROM tab1 AS cor0
----
-198
-204
-282

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 63 col0 FROM tab1
----
-63
-63
-63

onlyif mysql # use DIV operator for integer division
query I rowsort label-4921
SELECT - col1 DIV - tab0.col1 AS col1 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4921
SELECT - col1 / - tab0.col1 AS col1 FROM tab0
----
1
1
1

query I rowsort
SELECT - - col1 * 2 * + 56 + - cor0.col2 FROM tab1 AS cor0
----
1063
1360
2858

query I rowsort
SELECT ALL + col2 + 60 + col0 * - col0 AS col2 FROM tab2 AS cor0
----
-5998
-6143
38

query I rowsort
SELECT DISTINCT col0 + + col1 * - col2 FROM tab0 cor0
----
-2814
-62
-7373

query I rowsort
SELECT ALL + col0 - - col2 * 43 FROM tab1 AS cor0
----
2325
2515
4208

query I rowsort
SELECT + tab0.col2 - + tab0.col2 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4927
SELECT + 91 * col2 DIV - ( tab0.col0 ) + + col2 DIV - col2 AS col2 FROM tab0
----
-126
-3
-84

skipif mysql # not compatible
query I rowsort label-4927
SELECT + 91 * col2 / - ( tab0.col0 ) + + col2 / - col2 AS col2 FROM tab0
----
-126
-3
-84

query I rowsort
SELECT DISTINCT - 55 FROM tab1
----
-55

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4929
SELECT + CAST( - col1 AS SIGNED ) * + col0 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort label-4929
SELECT + CAST ( - col1 AS INTEGER ) * + col0 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT + col1 * ( + col2 ) FROM tab2
----
1534
646
837

query I rowsort
SELECT - cor0.col0 * col0 + col0 FROM tab1 AS cor0
----
-4032
-6
-6320

query I rowsort
SELECT - col2 + + ( ( + tab2.col0 ) ) AS col2 FROM tab2
----
-20
41
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-4933
SELECT 48 DIV col0 FROM tab2 AS cor0
----
0
0
6

skipif mysql # not compatible
query I rowsort label-4933
SELECT 48 / col0 FROM tab2 AS cor0
----
0
0
6

query I rowsort
SELECT - 34 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 5b88331e40da4796cc4826c442aa45f7

query I rowsort
SELECT 50 FROM tab0, tab1 AS cor0, tab1 cor1
----
27 values hashing to 314aace40e704c20a6be06204a329f80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4936
SELECT ALL CAST( 50 AS SIGNED ) * col1 FROM tab2
----
1550
2950
850

skipif mysql # not compatible
query I rowsort label-4936
SELECT ALL CAST ( 50 AS INTEGER ) * col1 FROM tab2
----
1550
2950
850

query I rowsort
SELECT + + cor1.col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

onlyif mysql # use DIV operator for integer division
query I rowsort label-4938
SELECT + + ( + col1 ) + col0 DIV 80 AS col2 FROM tab1 AS cor0
----
10
14
26

skipif mysql # not compatible
query I rowsort label-4938
SELECT + + ( + col1 ) + col0 / 80 AS col2 FROM tab1 AS cor0
----
10
14
26

query I rowsort
SELECT 27 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

onlyif mysql # use DIV operator for integer division
query I rowsort label-4940
SELECT ALL col1 DIV - col2 + - col2 AS col0 FROM tab0
----
-35
-83
-98

skipif mysql # not compatible
query I rowsort label-4940
SELECT ALL col1 / - col2 + - col2 AS col0 FROM tab0
----
-35
-83
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-4941
SELECT DISTINCT 44 DIV + col2 AS col1 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4941
SELECT DISTINCT 44 / + col2 AS col1 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL - + 98 * + col0 + + col0 AS col1 FROM tab2 AS cor0
----
-679
-7566
-7663

query I rowsort
SELECT + col1 + cor0.col1 * col0 * col1 FROM tab0 AS cor0
----
177590
329412
737100

query I rowsort
SELECT ALL + col1 * - col1 * + col1 FROM tab1
----
-1000
-17576
-2197

onlyif mysql # use DIV operator for integer division
query I rowsort label-4945
SELECT ALL ( 15 ) DIV tab1.col2 col1 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4945
SELECT ALL ( 15 ) / tab1.col2 col1 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL - 74 - + tab1.col1 FROM tab1, tab0 cor0
----
9 values hashing to b2fdfad128b66258748030df37005d20

query I rowsort
SELECT ALL 27 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

query I rowsort
SELECT ALL 91 + + tab2.col2 + + col1 FROM tab2
----
146
149
176

query I rowsort
SELECT DISTINCT ( + col0 ) * + col2 + col0 FROM tab2
----
196
2106
3081

query I rowsort
SELECT 98 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

query I rowsort
SELECT col0 * 42 FROM tab0
----
1008
1470
3738

query I rowsort
SELECT DISTINCT col1 * - col2 + - col1 FROM tab1
----
-1261
-1430
-580

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4953
SELECT + CAST( + 82 * col1 AS SIGNED ) AS col0 FROM tab2
----
1394
2542
4838

skipif mysql # not compatible
query I rowsort label-4953
SELECT + CAST ( + 82 * col1 AS INTEGER ) AS col0 FROM tab2
----
1394
2542
4838

query I rowsort
SELECT ( - 37 ) + col2 AS col2 FROM tab0
----
-36
-4
45

query I rowsort
SELECT 61 FROM tab2 cor0
----
61
61
61

query I rowsort
SELECT + + 36 * - col0 FROM tab1 cor0
----
-108
-2304
-2880

query I rowsort
SELECT - - 53 AS col2 FROM tab0 AS cor0
----
53
53
53

query I rowsort
SELECT DISTINCT + + 48 * col1 + + cor0.col2 AS col2 FROM tab0 cor0
----
4161
4450
4657

query I rowsort
SELECT - col2 * + col1 * + col2 FROM tab0 AS cor0
----
-611884
-93654
-97

query I rowsort
SELECT - col1 - - col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT + col1 * col2 * - col0 FROM tab2
----
-119652
-51034
-5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-4962
SELECT ALL col1 DIV col1 AS col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4962
SELECT ALL col1 / col1 AS col1 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT - 98 * col0 AS col2 FROM tab1 AS cor0
----
-294
-6272
-7840

query I rowsort
SELECT - - col0 * + col1 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT 76 FROM tab1 AS cor0
----
76

query I rowsort
SELECT ALL + col2 + col1 * col2 FROM tab0 cor0
----
2871
7544
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-4967
SELECT ALL - col1 DIV + col0 + col2 * + cor0.col0 FROM tab0 AS cor0
----
33
7297
789

skipif mysql # not compatible
query I rowsort label-4967
SELECT ALL - col1 / + col0 + col2 * + cor0.col0 FROM tab0 AS cor0
----
33
7297
789

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 88 + col0 * + col0 col2 FROM tab0 cor0
----
1313
664
8009

query I rowsort
SELECT + col0 * 20 AS col1 FROM tab0 AS cor0
----
1780
480
700

query I rowsort
SELECT cor0.col2 + 18 AS col1 FROM tab0 AS cor0
----
100
19
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4971
SELECT col2 * CAST( ( col2 ) AS SIGNED ) FROM tab0
----
1
1089
6724

skipif mysql # not compatible
query I rowsort label-4971
SELECT col2 * CAST ( ( col2 ) AS INTEGER ) FROM tab0
----
1
1089
6724

query I rowsort
SELECT + col1 + col1 * 83 - col1 AS col1 FROM tab0
----
7138
7553
8051

query I rowsort
SELECT - - col1 - + 43 * ( col2 ) FROM tab2 cor0
----
-1059
-1130
-1617

onlyif mysql # use DIV operator for integer division
query I rowsort label-4974
SELECT + - col0 DIV col2 + col0 DIV col0 AS col1 FROM tab1 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-4974
SELECT + - col0 / col2 + col0 / col0 AS col1 FROM tab1 AS cor0
----
0
1
1

query I rowsort
SELECT DISTINCT - col0 + 4 AS col0 FROM tab0 cor0
----
-20
-31
-85

query I rowsort
SELECT cor0.col0 * - col1 * col1 - + col1 FROM tab1 AS cor0
----
-13533
-2054
-6410

query I rowsort
SELECT + col1 * - 30 + 77 FROM tab2 AS cor0
----
-1693
-433
-853

query I rowsort
SELECT + + col2 + - col1 AS col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT - col0 + ( - col1 ) AS col1 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT - col0 * - col2 AS col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL + 59 + 49 FROM tab2 AS cor0
----
108
108
108

query I rowsort
SELECT ALL - 62 + col0 * col2 AS col1 FROM tab0 cor0
----
-27
7236
730

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4983
SELECT + col2 * + CAST( + 63 AS SIGNED ) FROM tab0
----
2079
5166
63

skipif mysql # not compatible
query I rowsort label-4983
SELECT + col2 * + CAST ( + 63 AS INTEGER ) FROM tab0
----
2079
5166
63

query I rowsort
SELECT DISTINCT 31 FROM tab0, tab2 cor0
----
31

query I rowsort
SELECT DISTINCT ( - 10 ) * + col1 + cor0.col0 AS col1 FROM tab2 cor0
----
-303
-512
-91

query I rowsort
SELECT + cor0.col1 * col2 + - cor0.col1 FROM tab2 AS cor0
----
1475
629
806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 + col1 col2 FROM tab0 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4988
SELECT DISTINCT - col2 * CAST( - col1 AS SIGNED ) FROM tab1 AS cor0
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-4988
SELECT DISTINCT - col2 * CAST ( - col1 AS INTEGER ) FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT - col0 * col0 + + col2 * col1 FROM tab2 AS cor0
----
-4550
-5595
788

query I rowsort
SELECT col0 * - col2 * ( col0 ) + - 87 FROM tab2 AS cor0
----
-1410
-158271
-237245

onlyif mysql # use DIV operator for integer division
query I rowsort label-4991
SELECT ALL - + col1 DIV 6 + - cor0.col0 FROM tab2 AS cor0
----
-12
-81
-87

skipif mysql # not compatible
query I rowsort label-4991
SELECT ALL - + col1 / 6 + - cor0.col0 FROM tab2 AS cor0
----
-12
-81
-87

query I rowsort
SELECT ALL + + col0 * + col1 - + ( col2 + col1 ) FROM tab2 AS cor0
----
1288
159
4517

query I rowsort
SELECT ALL + col1 * + 81 * cor0.col1 AS col2 FROM tab1 AS cor0
----
13689
54756
8100

onlyif mysql # use DIV operator for integer division
query I rowsort label-4994
SELECT DISTINCT cor0.col0 DIV 28 FROM tab1 AS cor0
----
0
2

skipif mysql # not compatible
query I rowsort label-4994
SELECT DISTINCT cor0.col0 / 28 FROM tab1 AS cor0
----
0
2

query I rowsort
SELECT ALL - cor0.col0 + - cor0.col1 * col0 FROM tab2 cor0
----
-1422
-224
-4680

query I rowsort
SELECT DISTINCT col0 + + tab2.col0 AS col1 FROM tab2
----
14
156
158

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + col0 * ( + tab1.col1 ) col2 FROM tab1
----
104
1053
650

query I rowsort
SELECT + + col2 * + col1 AS col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL col1 + tab0.col2 * + col0 FROM tab0
----
132
7389
878

onlyif mysql # use DIV operator for integer division
query I rowsort label-5000
SELECT ALL col0 + - 64 DIV col0 FROM tab2 AS cor0
----
-2
78
79

skipif mysql # not compatible
query I rowsort label-5000
SELECT ALL col0 + - 64 / col0 FROM tab2 AS cor0
----
-2
78
79

query I rowsort
SELECT DISTINCT + + col0 + - 98 AS col0 FROM tab0 AS cor0
----
-63
-74
-9

query I rowsort
SELECT col2 * ( col0 + - col0 ) * 75 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col0 - col1 AS col1 FROM tab1 AS cor0
----
-23
54
67

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab0 cor2, tab1 AS cor3
----
3645 values hashing to 8bda8b9cf32f196464e0ee0b41a5162d

query I rowsort
SELECT 79 FROM tab2, tab0 AS cor0
----
9 values hashing to 40a2261caa2c5cdbfd80965d7df1231f

query I rowsort
SELECT - tab0.col0 + - tab0.col0 AS col0 FROM tab0
----
-178
-48
-70

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5007
SELECT DISTINCT - CAST( NULL AS SIGNED ) FROM tab1, tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5007
SELECT DISTINCT - CAST ( NULL AS INTEGER ) FROM tab1, tab1 cor0
----
NULL

query I rowsort
SELECT + col1 + col0 * + 40 AS col2 FROM tab2 AS cor0
----
311
3177
3179

query I rowsort
SELECT ALL + 53 * - col0 AS col2 FROM tab0
----
-1272
-1855
-4717

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 cor0 CROSS JOIN tab0, tab1 cor1
----
972 values hashing to 5621675b1bd32b061d284d0444c76601

query I rowsort
SELECT DISTINCT 6 - + col1 AS col2 FROM tab2
----
-11
-25
-53

query I rowsort
SELECT - 96 * - col1 * + col2 FROM tab0
----
272448
716352
9312

query I rowsort
SELECT + col0 * col1 + col0 + - col1 * col0 FROM tab1
----
3
64
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-5014
SELECT + col1 DIV 33 AS col0 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5014
SELECT + col1 / 33 AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT + ( tab1.col1 ) FROM tab1, tab1 cor0, tab1 cor1
----
10
13
26

query I rowsort
SELECT ALL - tab1.col1 * + col2 + 67 * col2 + col1 AS col0 FROM tab1
----
2240
3259
5197

query I rowsort
SELECT - col1 + + col2 * + ( col1 ) * col2 + col1 AS col0 FROM tab2
----
22599
24548
39884

query I rowsort
SELECT ALL ( col1 ) + + col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL + + 68 AS col2 FROM tab1 AS cor0
----
68
68
68

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 67 col0 FROM tab2 AS cor0
----
-67

query I rowsort
SELECT col0 * - tab2.col0 AS col0 FROM tab2
----
-49
-6084
-6241

query I rowsort
SELECT ALL - col2 * + col0 + 42 FROM tab1 AS cor0
----
-120
-3606
-7638

query I rowsort
SELECT DISTINCT - 58 AS col2 FROM tab0 cor0
----
-58

query I rowsort
SELECT - + 44 * - col2 AS col0 FROM tab1 AS cor0
----
2376
2508
4224

query I rowsort
SELECT DISTINCT - + 36 * + col0 AS col0 FROM tab1 AS cor0
----
-108
-2304
-2880

query I rowsort
SELECT DISTINCT cor0.col1 * + col2 + - col2 * col2 AS col2 FROM tab2 AS cor0
----
-798
108
858

query I rowsort
SELECT + - col0 + cor0.col1 + col2 * + col1 AS col2 FROM tab0 AS cor0
----
159
2900
7464

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 17 - col0 * cor0.col0 col0 FROM tab0 AS cor0
----
-1208
-559
-7904

query I rowsort
SELECT + col2 * col2 + - col2 + + cor0.col2 * cor0.col0 FROM tab1 cor0
----
16800
3024
6840

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT - + col1 * cor0.col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT 79 * col1 * ( + col0 ) FROM tab2 cor0
----
106097
17143
363558

query I rowsort
SELECT ALL + 23 FROM tab0 AS cor0
----
23
23
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-5034
SELECT + - 20 * - col2 + 57 DIV col0 FROM tab0 AS cor0
----
1640
21
662

skipif mysql # not compatible
query I rowsort label-5034
SELECT + - 20 * - col2 + 57 / col0 FROM tab0 AS cor0
----
1640
21
662

query I rowsort
SELECT DISTINCT - 31 * - col0 FROM tab2 AS cor0
----
217
2418
2449

onlyif mysql # use DIV operator for integer division
query I rowsort label-5036
SELECT 74 DIV + col2 FROM tab0
----
0
2
74

skipif mysql # not compatible
query I rowsort label-5036
SELECT 74 / + col2 FROM tab0
----
0
2
74

query I rowsort
SELECT DISTINCT + col1 * col2 + - 2 AS col0 FROM tab2 cor0
----
1532
644
835

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab2, tab2 AS cor0, tab2 AS cor1, tab0 AS cor2
----
7
78
79

query I rowsort
SELECT ALL - col1 * + ( 22 ) FROM tab0
----
-1892
-2002
-2134

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-5041
SELECT - col1 DIV - 94 AS col1 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5041
SELECT - col1 / - 94 AS col1 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT - - cor0.col0 * - col2 + + col1 * col0 AS col0 FROM tab0 AS cor0
----
1272
3360
801

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + 99 * col0 col2 FROM tab1 AS cor0
----
323
6346
7933

query I rowsort
SELECT DISTINCT 14 FROM tab1, tab0 AS cor0
----
14

query I rowsort
SELECT + - 0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + - cor0.col0 + - col1 + col1 * - col2 FROM tab2 cor0
----
-1671
-742
-875

query I rowsort
SELECT DISTINCT + - 97 * col1 - col2 FROM tab2 AS cor0
----
-1687
-3034
-5749

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5048
SELECT ALL CAST( NULL AS DECIMAL ) AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5048
SELECT ALL CAST ( NULL AS REAL ) AS col1 FROM tab0
----
NULL
NULL
NULL

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0, tab2 AS cor1, tab0 cor2
----
972 values hashing to e4c748f267e8d2a0e6d563281e1fb975

query I rowsort
SELECT + 17 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 43298e43365fccb5146ea32003753c92

query I rowsort
SELECT ALL + col1 + - cor0.col1 AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - - col2 + 2 AS col1 FROM tab2 AS cor0
----
28
29
40

query I rowsort
SELECT + 99 * col2 AS col2 FROM tab0 cor0
----
3267
8118
99

query I rowsort
SELECT - - ( - col1 ) * col0 - col1 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT ALL ( + ( + col1 ) ) FROM tab2
----
17
31
59

query I rowsort
SELECT ALL 89 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT 71 + col0 * col1 AS col2 FROM tab1 AS cor0
----
1111
149
711

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 cor0, tab0 AS cor1, tab1 AS cor2
----
972 values hashing to 0a9194f200a4220e419d35c461f9fcfe

query I rowsort
SELECT ( col1 * - col0 ) AS col1 FROM tab2
----
-1343
-217
-4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5060
SELECT - 60 * - ( col2 ) + CAST( NULL AS SIGNED ) * 1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5060
SELECT - 60 * - ( col2 ) + CAST ( NULL AS INTEGER ) * 1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 57 + col2 * - col2 FROM tab1 AS cor0
----
-2859
-3192
-9159

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5062
SELECT - + col1 * - col2 + + CAST( NULL AS SIGNED ) * cor0.col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5062
SELECT - + col1 * - col2 + + CAST ( NULL AS INTEGER ) * cor0.col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 99 + col0 FROM tab1 cor0
----
102
163
179

query I rowsort
SELECT ALL + col1 - col2 FROM tab2 cor0
----
-21
33
4

query I rowsort
SELECT - col0 * - ( col0 ) AS col0 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT cor0.col2 + col2 + + col2 AS col0 FROM tab1 AS cor0
----
162
171
288

query I rowsort
SELECT - col1 + - ( ( col2 ) ) AS col1 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT + col2 * - ( - col2 ) + - col1 * col2 AS col1 FROM tab0 AS cor0
----
-1749
-738
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-5069
SELECT + - col2 DIV - col2 + ( cor0.col0 ) + col1 AS col2 FROM tab1 AS cor0
----
30
75
94

skipif mysql # not compatible
query I rowsort label-5069
SELECT + - col2 / - col2 + ( cor0.col0 ) + col1 AS col2 FROM tab1 AS cor0
----
30
75
94

onlyif mysql # use DIV operator for integer division
query I rowsort label-5070
SELECT - col1 DIV + tab1.col0 FROM tab1
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-5070
SELECT - col1 / + tab1.col0 FROM tab1
----
-8
0
0

query I rowsort
SELECT + ( - col0 ) * 1 FROM tab2
----
-7
-78
-79

query I rowsort
SELECT DISTINCT 41 + - col1 + col0 FROM tab0
----
-21
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab1.col0 + col2 col1 FROM tab1
----
121
176
57

query I rowsort
SELECT ALL 53 * 50 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 8f7e6cbc76f0a66a887906ec2381c5a5

query I rowsort
SELECT ALL - 91 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 6ec4feac5c635ab8e5da71006896acab

query I rowsort
SELECT - col2 * 77 * 95 FROM tab1
----
-395010
-416955
-702240

query I rowsort
SELECT - - cor0.col2 + 49 AS col1 FROM tab2 AS cor0
----
75
76
87

query I rowsort
SELECT - 30 FROM tab1, tab0 AS cor0, tab2 AS cor1, tab2 cor2
----
81 values hashing to 6993f5c634597e63319c949df6b4733d

query I rowsort
SELECT ALL - col0 * col1 + - 22 AS col2 FROM tab0 AS cor0
----
-2086
-3417
-8121

query I rowsort
SELECT DISTINCT - + col1 - ( + ( - col0 ) + + col0 ) AS col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT - col2 * - ( - 23 ) FROM tab2
----
-598
-621
-874

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5082
SELECT - 76 + 55 + col2 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5082
SELECT - 76 + 55 + col2 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( - col2 ) + - col2 AS col1 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT - 42 + col0 + + col0 AS col2 FROM tab1 AS cor0
----
-36
118
86

query I rowsort
SELECT DISTINCT 27 * 27 AS col1 FROM tab0 cor0
----
729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + + col1 + col0 col1 FROM tab0 AS cor0
----
196
229
271

query I rowsort
SELECT + tab0.col1 * - 42 * 0 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( col0 AS REAL ) + + cor0.col0 col2 FROM tab0 AS cor0
----
178
48
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 36 col2 FROM tab0 AS cor0
----
-36

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5090
SELECT ALL - CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5090
SELECT ALL - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + cor0.col1 col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT + col0 * 3 + col0 + col2 * - col1 AS col1 FROM tab0 AS cor0
----
-2742
-7106
43

query I rowsort
SELECT ALL col1 * - 25 FROM tab1 AS cor0
----
-250
-325
-650

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5094
SELECT ALL - - CAST( NULL AS SIGNED ) * col2 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5094
SELECT ALL - - CAST ( NULL AS INTEGER ) * col2 AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + ( - col0 ) AS col1 FROM tab1 cor0
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 83 col2 FROM tab2, tab2 AS cor0
----
-83

query I rowsort
SELECT DISTINCT + ( ( - col0 ) ) AS col1 FROM tab0
----
-24
-35
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-5098
SELECT col2 DIV col1 + col1 AS col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-5098
SELECT col2 / col1 + col1 AS col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT - + ( col2 ) + cor0.col2 AS col1 FROM tab1 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5100
SELECT ALL - + CAST( 26 AS SIGNED ) DIV col2 AS col2 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5100
SELECT ALL - + CAST ( 26 AS INTEGER ) / col2 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + - 76 + + col1 FROM tab2 AS cor0
----
-17
-45
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * + col0 + col2 * 33 col2 FROM tab2 AS cor0
----
1108
2597
5460

query I rowsort
SELECT - col0 * - 87 + + col0 FROM tab2 AS cor0
----
616
6864
6952

onlyif mysql # use DIV operator for integer division
query I rowsort label-5104
SELECT col2 DIV + cor0.col2 col2 FROM tab0 cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5104
SELECT col2 / + cor0.col2 col2 FROM tab0 cor0
----
1
1
1

query I rowsort
SELECT + ( col2 ) FROM tab2 cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col2 - col0 col0 FROM tab2
----
-41
-52
20

query I rowsort
SELECT DISTINCT - cor0.col0 * 69 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
-207
-4416
-5520

query I rowsort
SELECT DISTINCT cor0.col0 AS col0 FROM tab1, tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL + tab1.col2 + col1 AS col0 FROM tab1
----
109
67
80

query I rowsort
SELECT col2 + + ( col1 ) - tab0.col0 AS col0 FROM tab0
----
63
84
95

query I rowsort
SELECT - + col2 * - col1 - col2 AS col2 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT col1 * col0 * + 59 FROM tab1 AS cor0
----
37760
4602
61360

query I rowsort
SELECT DISTINCT - col0 + cor0.col2 * - 48 FROM tab2 AS cor0
----
-1303
-1326
-1903

query I rowsort
SELECT + col2 + - col0 + + cor0.col2 AS col2 FROM tab2 AS cor0
----
-26
-3
47

query I rowsort
SELECT + + col1 + + 42 + + cor0.col2 FROM tab0 AS cor0
----
140
161
215

onlyif mysql # use DIV operator for integer division
query I rowsort label-5116
SELECT DISTINCT - cor0.col0 + + col2 DIV col0 FROM tab2 AS cor0
----
-4
-78
-79

skipif mysql # not compatible
query I rowsort label-5116
SELECT DISTINCT - cor0.col0 + + col2 / col0 FROM tab2 AS cor0
----
-4
-78
-79

query I rowsort
SELECT DISTINCT + - col1 * - col1 + - col1 FROM tab2 AS cor0
----
272
3422
930

query I rowsort
SELECT - col1 * cor0.col2 AS col2 FROM tab0 AS cor0
----
-2838
-7462
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 * cor0.col2 - + col1 col2 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT + + col1 * + col1 AS col2 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT DISTINCT - col1 * + col1 + col2 * - col2 AS col1 FROM tab0
----
-15005
-8485
-9410

query I rowsort
SELECT + cor0.col2 + col0 * col1 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT DISTINCT + col2 + - cor0.col1 * col1 AS col0 FROM tab1 AS cor0
----
-43
-622
-73

query I rowsort
SELECT ALL + - cor0.col0 + col1 * col1 FROM tab1 AS cor0
----
36
673
89

query I rowsort
SELECT ALL + - col1 + col1 * cor0.col0 AS col0 FROM tab0 AS cor0
----
1978
3298
8008

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * + col1 - - cor0.col1 col0 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT ALL - + cor0.col1 * + col2 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - col0 - col2 * col1 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT ALL col0 - + col2 AS col2 FROM tab2
----
-20
41
52

query I rowsort
SELECT ALL col2 * - tab0.col2 - - col2 FROM tab0
----
-1056
-6642
0

query I rowsort
SELECT DISTINCT + cor0.col2 + col0 * col0 FROM tab1 AS cor0
----
4153
63
6496

query I rowsort
SELECT cor0.col2 + cor0.col0 * col0 AS col1 FROM tab2 AS cor0
----
6110
6279
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col1 - - col1 col1 FROM tab0 AS cor0
----
7482
8372
9506

onlyif mysql # use DIV operator for integer division
query I rowsort label-5134
SELECT + cor0.col2 + + col2 DIV col0 FROM tab1 AS cor0
----
57
72
97

skipif mysql # not compatible
query I rowsort label-5134
SELECT + cor0.col2 + + col2 / col0 FROM tab1 AS cor0
----
57
72
97

query I rowsort
SELECT ALL + col2 * col2 + - col0 FROM tab0 AS cor0
----
-34
1065
6635

query I rowsort
SELECT ALL - col2 + cor0.col2 * col2 * - col1 FROM tab0 AS cor0
----
-611966
-93687
-98

query I rowsort
SELECT DISTINCT col2 + + col2 AS col2 FROM tab2
----
52
54
76

query I rowsort
SELECT tab1.col0 * tab1.col0 AS col0 FROM tab1
----
4096
6400
9

query I rowsort
SELECT col0 + + col2 + - col2 * + col0 * + col0 AS col1 FROM tab0
----
-1189
-18951
-649351

query I rowsort
SELECT + col0 AS col0 FROM tab0 cor0 WHERE NULL <= ( NULL )
----

query I rowsort
SELECT ALL col2 * col2 + col1 * + col0 * col0 AS col2 FROM tab2
----
107541
2248
359632

query I rowsort
SELECT DISTINCT col0 + col0 * - col2 FROM tab2
----
-182
-1950
-2923

query I rowsort
SELECT DISTINCT + - col0 * col2 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - + col2 + + col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT - col0 * + cor0.col0 * col2 AS col2 FROM tab1 cor0
----
-233472
-486
-614400

query I rowsort
SELECT ALL + + col2 * - col2 + + col1 * - cor0.col1 FROM tab2 AS cor0
----
-1690
-1733
-4157

query I rowsort
SELECT DISTINCT col1 * + col2 - col0 FROM tab2
----
1456
567
830

query I rowsort
SELECT ALL col0 - col0 AS col2 FROM tab2
----
0
0
0

query I rowsort
SELECT - col2 + col0 + col2 FROM tab1
----
3
64
80

query I rowsort
SELECT col0 + col0 * col1 + - col2 FROM tab2
----
1384
197
4654

query I rowsort
SELECT ALL + col0 * + col0 + + col1 - - col1 FROM tab0
----
1419
748
8103

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col2 * col1 * col1 col1 FROM tab0 cor0
----
244101
679124
9410

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 * col1 + col0 col2 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT - - col2 * cor0.col1 AS col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT + col1 - + col0 FROM tab0 AS cor0
----
2
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + col0 * col0 col1 FROM tab2 AS cor0
----
18
6025
6224

query I rowsort
SELECT - col0 * col0 * cor0.col2 AS col1 FROM tab2 cor0
----
-1323
-158184
-237158

query I rowsort
SELECT ALL col2 * - col2 + tab1.col2 * + col1 * - col2 FROM tab1
----
-129024
-35739
-78732

query I rowsort
SELECT DISTINCT - tab1.col0 FROM tab1, tab2, tab2 AS cor0
----
-3
-64
-80

query I rowsort
SELECT DISTINCT col2 + tab2.col1 AS col0 FROM tab2
----
55
58
85

query I rowsort
SELECT col1 + col1 - col1 * - col0 FROM tab2
----
1377
279
4720

query I rowsort
SELECT - tab1.col1 * col0 AS col1 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT - + col0 + + col2 * col2 FROM tab0 AS cor0
----
-34
1065
6635

query III rowsort
SELECT * FROM tab0 WHERE NULL <= col0
----

query I rowsort
SELECT col1 FROM tab2 WHERE col2 IN ( - tab2.col2 + col0 )
----

query I rowsort
SELECT DISTINCT col0 + - col2 AS col1 FROM tab1
----
-16
-51
7

query I rowsort
SELECT ALL tab1.col0 FROM tab1 WHERE + col1 IN ( - col2 * + col2 * - col1 + col0 * col0 )
----

query I rowsort
SELECT ALL col1 AS col0 FROM tab2 WHERE NOT ( NULL ) IN ( - col0 * - col0 )
----

query I rowsort
SELECT DISTINCT col1 * - col2 + + col0 * col0 FROM tab2 WHERE NOT NULL = col2
----

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0, tab2 cor0, tab0 AS cor1
----
972 values hashing to 86dbd337f00ab84c613ad03d6fc06e28

query I rowsort
SELECT + col2 * + col2 AS col2 FROM tab2
----
1444
676
729

query I rowsort
SELECT DISTINCT 76 AS col2 FROM tab1
----
76

query I rowsort
SELECT + col1 + + col0 * col2 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT DISTINCT + col2 * col2 + 75 FROM tab1 AS cor0
----
2991
3324
9291

query I rowsort
SELECT - + col1 - + col0 * + col1 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT ALL col2 * col1 + - col2 AS col1 FROM tab1
----
1152
1350
513

query I rowsort
SELECT DISTINCT col2 * - col0 + col1 FROM tab0
----
-706
-7207
62

query I rowsort
SELECT DISTINCT col0 + col1 * + tab2.col1 FROM tab2
----
3559
368
968

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + col0 col1 FROM tab1
----
4096
6400
9

query I rowsort
SELECT ALL - col2 - col1 AS col1 FROM tab2
----
-55
-58
-85

query I rowsort
SELECT tab0.col0 * tab0.col2 * + col2 + - col1 AS col1 FROM tab0
----
-62
26050
598345

query I rowsort
SELECT + col0 AS col1 FROM tab1 WHERE + col0 < NULL
----

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NULL NOT IN ( - col2 * col1 - col2 * - col1 * cor0.col2 )
----

query III rowsort
SELECT * FROM tab1 AS cor0 WHERE NULL > NULL
----

query I rowsort
SELECT col2 + - col0 * col1 FROM tab1 AS cor0
----
-24
-583
-944

onlyif mysql # use DIV operator for integer division
query I rowsort label-5186
SELECT + tab0.col0 - - col0 DIV - col0 FROM tab0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-5186
SELECT + tab0.col0 - - col0 / - col0 FROM tab0
----
23
34
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + tab1.col2 col2 FROM tab1
----
109
67
80

query I rowsort
SELECT DISTINCT col1 FROM tab0 AS cor0 WHERE NOT NULL = col2
----

query I rowsort
SELECT ALL - col2 + - col2 AS col2 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT + col0 FROM tab1 WHERE ( NULL ) <> + col1 * col0
----

query I rowsort
SELECT ALL - col2 FROM tab1 WHERE col2 / + col2 < NULL
----

query I rowsort
SELECT col0 + - col0 * col1 FROM tab2
----
-1264
-210
-4524

query III rowsort
SELECT ALL * FROM tab2 WHERE - col1 NOT IN ( + col2 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT - col1 - - col2 AS col2 FROM tab2
----
-33
-4
21

query I rowsort
SELECT DISTINCT col0 + col1 * tab0.col1 AS col0 FROM tab0
----
7420
8370
9444

query I rowsort
SELECT ALL col0 + - col2 AS col1 FROM tab2
----
-20
41
52

query I rowsort
SELECT + col0 * tab2.col0 AS col0 FROM tab2
----
49
6084
6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-5198
SELECT col2 + col1 DIV - col1 FROM tab1
----
53
56
95

skipif mysql # not compatible
query I rowsort label-5198
SELECT col2 + col1 / - col1 FROM tab1
----
53
56
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-5199
SELECT + col1 DIV + col1 AS col0 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5199
SELECT + col1 / + col1 AS col0 FROM tab2
----
1
1
1

query I rowsort
SELECT ALL col1 + - col0 * tab2.col0 * - col0 FROM tab2
----
374
474611
493056

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col0 col2 FROM tab2 WHERE tab2.col0 NOT IN ( col1 + - col2 + + col1 * col1 )
----
7
78
79

query III rowsort
SELECT ALL * FROM tab0 WHERE ( NULL ) <= + col1
----

query I rowsort
SELECT DISTINCT 33 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
33

query I rowsort
SELECT ALL col2 + + col2 AS col0 FROM tab0 cor0
----
164
2
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 14 * col2 col1 FROM tab0 AS cor0
----
1148
14
462

query I rowsort
SELECT + 11 * + col1 + + col1 FROM tab0 AS cor0
----
1032
1092
1164

query I rowsort
SELECT DISTINCT col2 * 25 + col2 FROM tab1
----
1404
1482
2496

query I rowsort
SELECT DISTINCT col2 + col1 * + col1 AS col1 FROM tab0
----
7429
8363
9410

query I rowsort
SELECT col1 * ( col2 ) AS col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - col1 + - col0 * + col2 + + col2 AS col2 FROM tab0
----
-131
-7307
-845

onlyif mysql # use DIV operator for integer division
query I rowsort label-5211
SELECT - tab2.col2 + col0 DIV + col1 FROM tab2
----
-25
-27
-34

skipif mysql # not compatible
query I rowsort label-5211
SELECT - tab2.col2 + col0 / + col1 FROM tab2
----
-25
-27
-34

query I rowsort
SELECT - col0 * col2 + 40 * - col1 * 23 AS col1 FROM tab1 AS cor0
----
-12848
-19640
-24082

onlyif mysql # use DIV operator for integer division
query I rowsort label-5213
SELECT tab1.col2 DIV 88 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5213
SELECT tab1.col2 / 88 FROM tab1
----
0
0
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab0.col1 col1 FROM tab0
----
86
91
97

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab2, tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL cor1.col2 FROM tab0, tab2 cor0, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5217
SELECT cor0.col1 + col1 - + CAST( 33 * + col0 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-2755
-620
-961

skipif mysql # not compatible
query I rowsort label-5217
SELECT cor0.col1 + col1 - + CAST ( 33 * + col0 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-2755
-620
-961

query I rowsort
SELECT - col0 * col1 * - 46 + + col1 + col1 * - col0 FROM tab1 AS cor0
----
28810
3536
46813

query I rowsort
SELECT - ( 32 ) * + col2 * tab1.col1 FROM tab1
----
-18240
-39936
-44928

query I rowsort
SELECT + col1 * + col1 + col0 FROM tab1 AS cor0
----
164
249
679

onlyif mysql # use DIV operator for integer division
query I rowsort label-5221
SELECT ALL + cor0.col0 + - col2 + - col2 * cor0.col1 DIV - col2 FROM tab1 AS cor0
----
-25
-3
17

skipif mysql # not compatible
query I rowsort label-5221
SELECT ALL + cor0.col0 + - col2 + - col2 * cor0.col1 / - col2 FROM tab1 AS cor0
----
-25
-3
17

query I rowsort
SELECT ALL + 17 * 42 + + col1 AS col2 FROM tab1
----
724
727
740

query I rowsort
SELECT - - col0 + - col2 * + 39 FROM tab1 AS cor0
----
-2103
-2159
-3664

query I rowsort
SELECT + + col1 * - col1 - - col2 FROM tab0 AS cor0
----
-7363
-8199
-9408

query I rowsort
SELECT col2 * col0 - - col1 FROM tab2 AS cor0
----
2087
220
3019

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 - col2 col0 FROM tab2 AS cor0
----
-20
41
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + - col2 - ( + col0 ) col0 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT ALL - 78 AS col2 FROM tab0 AS cor0
----
-78
-78
-78

query I rowsort
SELECT - - cor0.col0 - col2 * + col0 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT ( + col0 ) * + col0 + + 27 + + tab0.col1 FROM tab0
----
1349
689
8039

query I rowsort
SELECT DISTINCT - 48 + col2 FROM tab0
----
-15
-47
34

query I rowsort
SELECT ALL - 30 + cor0.col2 * 85 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 67b40d734f35ddd544547eb8447d9fb5

query I rowsort
SELECT ALL - - col1 * + col1 + 71 * col1 AS col1 FROM tab2 cor0
----
1496
3162
7670

query I rowsort
SELECT ALL - 17 * col2 + col1 * 71 FROM tab2 AS cor0
----
1742
3747
561

query I rowsort
SELECT DISTINCT cor0.col1 * col2 + + 33 FROM tab2 AS cor0
----
1567
679
870

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5236
SELECT DISTINCT col2 / CAST( NULL AS SIGNED ) AS col2 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5236
SELECT DISTINCT col2 / CAST ( NULL AS INTEGER ) AS col2 FROM tab2 cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5237
SELECT - col0 DIV 63 + - col0 col2 FROM tab2 AS cor0
----
-7
-79
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5237
SELECT - col0 / 63 + - col0 col2 FROM tab2 AS cor0
----
-7
-79
-80

query I rowsort
SELECT ALL + col0 * + col0 + - col2 * + col0 FROM tab0 AS cor0
----
-216
1190
623

onlyif mysql # use DIV operator for integer division
query I rowsort label-5239
SELECT cor0.col1 DIV ( col0 ) - + col1 AS col2 FROM tab0 AS cor0
----
-83
-90
-95

skipif mysql # not compatible
query I rowsort label-5239
SELECT cor0.col1 / ( col0 ) - + col1 AS col2 FROM tab0 AS cor0
----
-83
-90
-95

query I rowsort
SELECT ALL col2 + ( + col1 ) * cor0.col2 * col0 FROM tab1 AS cor0
----
36537
4266
99936

onlyif mysql # use DIV operator for integer division
query I rowsort label-5241
SELECT DISTINCT + - col2 - - 4 DIV 46 AS col1 FROM tab2 cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-5241
SELECT DISTINCT + - col2 - - 4 / 46 AS col1 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT - cor1.col0 FROM tab2, tab2 AS cor0, tab0 cor1
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

query I rowsort
SELECT col2 + col1 * 24 FROM tab2 AS cor0
----
1442
446
771

query I rowsort
SELECT ALL col0 * ( - 87 ) * col1 + - ( cor0.col0 + + cor0.col1 ) FROM tab1 AS cor0
----
-55754
-6815
-90573

query I rowsort
SELECT - cor0.col2 * + col1 + col1 AS col1 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT ALL - col1 + col0 AS col0 FROM tab0 cor0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT + - col1 + 71 * col0 FROM tab0 AS cor0
----
1618
2388
6228

query I rowsort
SELECT - cor0.col0 - + ( + col2 ) * col2 FROM tab0 AS cor0
----
-1113
-36
-6813

query I rowsort
SELECT ALL + cor0.col1 * ( col0 ) + col1 AS col0 FROM tab1 AS cor0
----
104
1053
650

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col2 - col2 col2 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL - col1 - + col0 AS col1 FROM tab1
----
-29
-74
-93

query I rowsort
SELECT DISTINCT + 96 FROM tab1, tab0, tab2 AS cor0
----
96

query I rowsort
SELECT ALL col1 - + tab2.col0 FROM tab2
----
-19
-62
24

query I rowsort
SELECT ALL + col2 * tab0.col1 - tab0.col1 * col2 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT + col0 * 35 FROM tab2 AS cor0
----
245
2730
2765

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5256
SELECT DISTINCT - CAST( - col2 AS SIGNED ) * + col1 FROM tab2 cor0
----
1534
646
837

skipif mysql # not compatible
query I rowsort label-5256
SELECT DISTINCT - CAST ( - col2 AS INTEGER ) * + col1 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT ALL 70 + + cor0.col2 * col0 FROM tab1 AS cor0
----
232
3718
7750

query I rowsort
SELECT DISTINCT - col1 * + 86 + col2 FROM tab0 AS cor0
----
-7363
-7744
-8341

query I rowsort
SELECT ALL - ( - col1 ) AS col0 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT + 41 + - col2 * + col2 FROM tab0 AS cor0
----
-1048
-6683
40

query I rowsort
SELECT ALL - cor0.col1 - col2 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT DISTINCT col0 * + col2 AS col1 FROM tab2 cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5263
SELECT ALL - - CAST( + col0 AS SIGNED ) * col1 FROM tab0 AS cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-5263
SELECT ALL - - CAST ( + col0 AS INTEGER ) * col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + cor0.col2 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
1
33
82

query I rowsort
SELECT + + ( col1 ) + col2 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT DISTINCT ( - 2 ) * col2 FROM tab0
----
-164
-2
-66

onlyif mysql # use DIV operator for integer division
query I rowsort label-5267
SELECT ALL col2 DIV - col1 AS col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5267
SELECT ALL col2 / - col1 AS col1 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL col1 * + col1 + 40 - - col0 AS col2 FROM tab2
----
1008
3599
408

query I rowsort
SELECT ALL col1 * tab0.col1 - - col1 FROM tab0
----
7482
8372
9506

onlyif mysql # use DIV operator for integer division
query I rowsort label-5270
SELECT DISTINCT - cor0.col2 DIV 68 + + ( + col0 * col0 ) AS col2 FROM tab1 AS cor0
----
4096
6399
9

skipif mysql # not compatible
query I rowsort label-5270
SELECT DISTINCT - cor0.col2 / 68 + + ( + col0 * col0 ) AS col2 FROM tab1 AS cor0
----
4096
6399
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 * - col2 * + 8 col2 FROM tab1 AS cor0
----
1296
29184
61440

query I rowsort
SELECT + col2 * + cor0.col0 AS col1 FROM tab0 AS cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort
SELECT ALL col2 * + CAST ( cor0.col1 AS REAL ) AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT col0 * col0 * + col1 + + col2 + col1 FROM tab2 AS cor0
----
106152
1577
359041

query I rowsort
SELECT ALL - + ( - col1 ) * - col1 AS col1 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT + - col0 - 36 AS col1 FROM tab2 AS cor0
----
-114
-115
-43

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5277
SELECT DISTINCT + + CAST( NULL AS SIGNED ) / col2 col1 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5277
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) / col2 col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT - col1 * + col1 + + col2 + + col2 * col2 AS col1 FROM tab1 AS cor0
----
2294
3206
9143

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5279
SELECT ALL + - CAST( NULL AS SIGNED ) * - col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5279
SELECT ALL + - CAST ( NULL AS INTEGER ) * - col0 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5280
SELECT col2 DIV col2 + - col2 FROM tab1 AS cor0
----
-53
-56
-95

skipif mysql # not compatible
query I rowsort label-5280
SELECT col2 / col2 + - col2 FROM tab1 AS cor0
----
-53
-56
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 17 * + col0 col1 FROM tab2 AS cor0
----
119
1326
1343

query I rowsort
SELECT DISTINCT - ( + ( col0 ) ) AS col0 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT + + cor0.col0 * col2 AS col1 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-5284
SELECT ALL - - cor0.col2 DIV cor0.col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5284
SELECT ALL - - cor0.col2 / cor0.col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - 83 * col0 FROM tab1 AS cor0
----
-249
-5312
-6640

query I rowsort
SELECT + col0 + + col1 + - col2 FROM tab1 AS cor0
----
-25
-3
17

query I rowsort
SELECT DISTINCT - 72 * col1 FROM tab2 AS cor0
----
-1224
-2232
-4248

query I rowsort
SELECT - + col2 - + col2 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT ALL - - cor0.col0 + - col2 * col0 - + col2 FROM tab1 AS cor0
----
-213
-3641
-7696

query I rowsort
SELECT DISTINCT - - col2 AS col0 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT ALL - col0 * - col1 + - cor0.col0 * col0 FROM tab2 AS cor0
----
-1482
-4898
168

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col0 * col2 + ( + col2 ) col2 FROM tab0 AS cor0
----
-34
-7216
-759

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * col2 - ( col0 ) col0 FROM tab0 AS cor0
----
-1113
-36
-6813

query I rowsort
SELECT - 14 * + 71 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 939a6cfa0a7c248d27079b641b3a9dcb

query I rowsort
SELECT DISTINCT 21 FROM tab0 AS cor0
----
21

query I rowsort
SELECT DISTINCT + + ( - col2 ) * 58 + col1 FROM tab0 AS cor0
----
-1828
-4665
39

query I rowsort
SELECT ALL + + col1 * col1 + + 55 FROM tab0 cor0
----
7451
8336
9464

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5298
SELECT + col0 * col2 + - CAST( NULL AS SIGNED ) * - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5298
SELECT + col0 * col2 + - CAST ( NULL AS INTEGER ) * - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col0 + col2 * col1 AS col1 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT ALL - - col0 * + col1 + - 57 FROM tab2 AS cor0
----
1286
160
4545

query I rowsort
SELECT DISTINCT - - 99 + cor0.col0 * col1 * + ( - col2 ) - + col2 * + col1 AS col1 FROM tab0 AS cor0
----
-3393
-671481
-70851

query I rowsort
SELECT - + 82 + - col2 * + 41 FROM tab2 AS cor0
----
-1148
-1189
-1640

query I rowsort
SELECT DISTINCT + 34 + col2 AS col0 FROM tab1 cor0
----
130
88
91

query I rowsort
SELECT ALL + - 27 * + cor0.col1 + + 28 * 9 * col1 FROM tab2 AS cor0
----
13275
3825
6975

query I rowsort
SELECT ALL col2 + 71 AS col2 FROM tab0 AS cor0
----
104
153
72

skipif mysql # not compatible
query I rowsort
SELECT - cor0.col0 * + CAST ( - 40 + - col0 AS REAL ) AS col0 FROM tab0 AS cor0
----
11481
1536
2625

query I rowsort
SELECT DISTINCT + col0 + 17 * 93 FROM tab1 AS cor0
----
1584
1645
1661

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5308
SELECT DISTINCT CAST( + 27 AS SIGNED ) AS col2 FROM tab0, tab0 AS cor0
----
27

skipif mysql # not compatible
query I rowsort label-5308
SELECT DISTINCT CAST ( + 27 AS INTEGER ) AS col2 FROM tab0, tab0 AS cor0
----
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * - 5 col1 FROM tab1 AS cor0
----
-130
-50
-65

query I rowsort
SELECT - ( - 89 ) FROM tab0 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT ALL + ( - col2 * ( tab0.col1 ) ) FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT col1 + col2 * + 75 FROM tab2 AS cor0
----
2009
2056
2867

query I rowsort
SELECT + - col1 * + col2 AS col0 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL - + col1 * - col1 + col0 AS col1 FROM tab0 AS cor0
----
7420
8370
9444

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5315
SELECT ALL + col1 + - CAST( NULL AS DECIMAL ) 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-5315
SELECT ALL + col1 + - CAST ( NULL AS REAL ) col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 13 + 37 AS col0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 314aace40e704c20a6be06204a329f80

query I rowsort
SELECT DISTINCT - 43 AS col0 FROM tab0
----
-43

query I rowsort
SELECT ALL + 77 FROM tab1
----
77
77
77

query I rowsort
SELECT + cor0.col2 + + 11 FROM tab0 AS cor0
----
12
44
93

query I rowsort
SELECT + + col1 * + 81 FROM tab2 AS cor0
----
1377
2511
4779

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab0 cor2
----
972 values hashing to e84152c0bf436177d3b3d80e42832d4f

query I rowsort
SELECT + - cor0.col2 * + col2 AS col2 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT cor0.col1 AS col2 FROM tab1 cor0 CROSS JOIN tab0, tab2 AS cor1
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT - - 25 + - col0 AS col0 FROM tab1 AS cor0
----
-39
-55
22

query I rowsort
SELECT col0 * col2 * - col1 + + 40 * + col1 + + ( + col2 ) FROM tab2 AS cor0
----
-117266
-4592
-50316

query I rowsort
SELECT DISTINCT - 37 AS col0 FROM tab1 cor0
----
-37

query I rowsort
SELECT + + col2 + + col2 AS col1 FROM tab0 AS cor0
----
164
2
66

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0, tab0 cor1, tab2, tab0 AS cor2
----
3645 values hashing to 283f1c907a0999dbd972d3bd45746c06

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col2 ) * col0 col0 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT - + ( col1 ) + col1 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 col2 FROM tab1 AS cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * - cor0.col1 col0 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT DISTINCT + ( - col2 ) * - col1 * 86 FROM tab1 AS cor0
----
107328
120744
49020

query I rowsort
SELECT cor1.col0 AS col0 FROM tab2, tab0 AS cor0, tab1 cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT - + 90 + - 25 + - col0 FROM tab0 AS cor0
----
-139
-150
-204

query I rowsort
SELECT DISTINCT + tab1.col1 * col2 AS col0 FROM tab1
----
1248
1404
570

query I rowsort
SELECT ALL - tab2.col1 - col0 * col2 AS col0 FROM tab2
----
-2087
-220
-3019

query I rowsort
SELECT + 1 + - col0 AS col1 FROM tab1 AS cor0
----
-2
-63
-79

query I rowsort
SELECT - col1 + 36 * cor0.col0 AS col2 FROM tab2 AS cor0
----
221
2749
2827

query I rowsort
SELECT + - 26 + col0 AS col1 FROM tab1 AS cor0
----
-23
38
54

query I rowsort
SELECT ALL col2 + + col0 - col1 * - tab1.col0 AS col1 FROM tab1
----
1216
135
761

query I rowsort
SELECT + + col0 * - 43 AS col0 FROM tab1 AS cor0
----
-129
-2752
-3440

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 87 col0 FROM tab0
----
87
87
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 53 col0 FROM tab2
----
-53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5345
SELECT ALL + + col0 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5345
SELECT ALL + + col0 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 63 * col0 AS col0 FROM tab0 AS cor0
----
1512
2205
5607

onlyif mysql # use DIV operator for integer division
query I rowsort label-5347
SELECT + + col1 DIV - 64 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5347
SELECT + + col1 / - 64 FROM tab1 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5348
SELECT col0 DIV 24 AS col1 FROM tab1 AS cor0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-5348
SELECT col0 / 24 AS col1 FROM tab1 AS cor0
----
0
2
3

query I rowsort
SELECT + 59 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to a9b9966d749d1b2ce5955ed12394f9bc

onlyif mysql # use DIV operator for integer division
query I rowsort label-5350
SELECT + cor0.col2 DIV - cor0.col0 FROM tab2 AS cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-5350
SELECT + cor0.col2 / - cor0.col0 FROM tab2 AS cor0
----
-3
0
0

query I rowsort
SELECT tab1.col2 * + 14 FROM tab1, tab0 AS cor0
----
9 values hashing to d8b39284e767e0071868a83e461c2814

query I rowsort
SELECT col0 - - 93 * col0 * col1 AS col1 FROM tab1
----
59584
7257
96800

query I rowsort
SELECT col0 * - 41 + tab0.col2 AS col1 FROM tab0
----
-1434
-3567
-951

query I rowsort
SELECT ALL - col1 + - 89 FROM tab0 AS cor0
----
-175
-180
-186

query I rowsort
SELECT ALL + - cor0.col1 + + col2 * - col0 FROM tab2 AS cor0
----
-2087
-220
-3019

query I rowsort
SELECT ALL - + col2 + + col1 * col2 AS col1 FROM tab2 AS cor0
----
1508
608
810

query I rowsort
SELECT DISTINCT - ( - col0 ) * cor0.col1 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-5358
SELECT DISTINCT - ( - col1 ) DIV col0 + - col2 * col1 FROM tab1 AS cor0
----
-1248
-1396
-570

skipif mysql # not compatible
query I rowsort label-5358
SELECT DISTINCT - ( - col1 ) / col0 + - col2 * col1 FROM tab1 AS cor0
----
-1248
-1396
-570

query I rowsort
SELECT ALL + + col0 * col0 + col0 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT DISTINCT - + 38 + col0 AS col2 FROM tab1 AS cor0
----
-35
26
42

query I rowsort
SELECT ALL - 53 + - col2 * col1 FROM tab1 AS cor0
----
-1301
-1457
-623

query I rowsort
SELECT - 70 * col0 AS col1 FROM tab0 AS cor0
----
-1680
-2450
-6230

query I rowsort
SELECT DISTINCT + ( - col2 ) * + col1 + col1 * col1 * col1 FROM tab1 AS cor0
----
16172
430
949

query I rowsort
SELECT DISTINCT - ( - col0 ) + + col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT DISTINCT + col2 * - col1 AS col1 FROM tab1
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-5366
SELECT DISTINCT col0 DIV - 67 AS col2 FROM tab1
----
-1
0

skipif mysql # not compatible
query I rowsort label-5366
SELECT DISTINCT col0 / - 67 AS col2 FROM tab1
----
-1
0

query I rowsort
SELECT col2 + + ( - 80 ) FROM tab2
----
-42
-53
-54

query I rowsort
SELECT DISTINCT ( - col1 ) + col2 * + 94 FROM tab0 AS cor0
----
-3
3016
7617

query I rowsort
SELECT ALL + + ( 2 ) * - col2 + - cor0.col0 AS col0 FROM tab1 AS cor0
----
-111
-178
-272

query I rowsort
SELECT DISTINCT - col2 * 54 AS col1 FROM tab2 cor0
----
-1404
-1458
-2052

query I rowsort
SELECT 29 AS col2 FROM tab2 AS cor0
----
29
29
29

query I rowsort
SELECT - + col0 + col2 * 76 AS col2 FROM tab0 AS cor0
----
2484
41
6143

query I rowsort
SELECT ALL 90 + col2 + + col2 FROM tab2 AS cor0
----
142
144
166

query I rowsort
SELECT ALL + col1 * col1 AS col2 FROM tab2 cor0
----
289
3481
961

query I rowsort
SELECT + + 77 + cor0.col2 AS col2 FROM tab1 AS cor0
----
131
134
173

query I rowsort
SELECT - 37 + col1 AS col1 FROM tab2 AS cor0
----
-20
-6
22

query I rowsort
SELECT - ( + col1 ) + col0 + - col2 * col2 AS col2 FROM tab0 AS cor0
----
-1151
-63
-6726

query I rowsort
SELECT - cor0.col2 + + col1 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT ALL + col1 + - 27 AS col2 FROM tab0 AS cor0
----
59
64
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - col1 + col2 * cor0.col1 * - col2 col0 FROM tab2 AS cor0
----
-23436
-25194
-41418

query I rowsort
SELECT ALL + ( + col0 ) * col1 + + ( col0 * 74 ) FROM tab1
----
300
5376
6960

query I rowsort
SELECT - tab0.col1 FROM tab0, tab2 cor0
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + + col0 col2 FROM tab2
----
14
156
158

query I rowsort
SELECT 55 * - col2 AS col2 FROM tab1 AS cor0
----
-2970
-3135
-5280

query I rowsort
SELECT ( - col1 ) * - col0 - 66 FROM tab0
----
1998
3329
8033

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col2 * - col1 col1 FROM tab0
----
2838
7462
97

query I rowsort
SELECT ( col0 ) + - col2 FROM tab1
----
-16
-51
7

query I rowsort
SELECT ALL - ( + cor0.col0 ) FROM tab1 AS cor0
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 23 * + col1 col1 FROM tab1 AS cor0
----
230
299
598

query I rowsort
SELECT + ( + col1 ) * - col2 FROM tab1 cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL + 31 * + col2 * tab1.col2 FROM tab1
----
100719
285696
90396

query I rowsort
SELECT DISTINCT - 78 FROM tab2
----
-78

query I rowsort
SELECT ALL 7 FROM tab1, tab2 AS cor0
----
9 values hashing to 3362c0cb2b2c663037159d0699d46b76

query I rowsort
SELECT - cor0.col0 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 4ec304b8ce935f2226e7548d72c2b2f0

query I rowsort
SELECT ALL col1 * + col1 AS col0 FROM tab1
----
100
169
676

query I rowsort
SELECT ALL - cor1.col0 * + cor1.col1 + cor1.col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to c9ea3df6c2326d53330e531b495d4c54

query I rowsort
SELECT - tab1.col1 * + 55 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to 3396b6e3a9a33a8501d0661305be581c

query I rowsort
SELECT col1 * col0 + tab2.col0 FROM tab2
----
1422
224
4680

query I rowsort
SELECT ALL + cor0.col1 + - col1 * 50 FROM tab1 AS cor0
----
-1274
-490
-637

query I rowsort
SELECT + 91 * col0 FROM tab1 AS cor0
----
273
5824
7280

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5401
SELECT ALL + ( col2 ) * - CAST( 92 AS SIGNED ) + + col0 FROM tab1 AS cor0
----
-4965
-5180
-8752

skipif mysql # not compatible
query I rowsort label-5401
SELECT ALL + ( col2 ) * - CAST ( 92 AS INTEGER ) + + col0 FROM tab1 AS cor0
----
-4965
-5180
-8752

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5402
SELECT - - col2 * col1 / - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5402
SELECT - - col2 * col1 / - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + cor0.col2 + - col1 col1 FROM tab2 AS cor0
----
-55
-58
-85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5404
SELECT col1 + CAST( NULL AS SIGNED ) + + col0 * - col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5404
SELECT col1 + CAST ( NULL AS INTEGER ) + + col0 * - col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * + 66 + 52 AS col2 FROM tab0
----
-5624
-5954
-6350

query I rowsort
SELECT DISTINCT col2 * 34 AS col0 FROM tab1 AS cor0
----
1836
1938
3264

onlyif mysql # use DIV operator for integer division
query I rowsort label-5407
SELECT DISTINCT + + col0 DIV col2 + - col2 col0 FROM tab1 cor0
----
-54
-56
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5407
SELECT DISTINCT + + col0 / col2 + - col2 col0 FROM tab1 cor0
----
-54
-56
-96

query I rowsort
SELECT - - col1 + cor0.col0 * col1 FROM tab0 AS cor0
----
2150
3492
8190

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5409
SELECT col2 + CAST( NULL AS SIGNED ) + col1 / + col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5409
SELECT col2 + CAST ( NULL AS INTEGER ) + col1 / + col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 + - cor0.col1 AS col0 FROM tab0 AS cor0
----
-2
-62
-62

query I rowsort
SELECT DISTINCT + col1 + + ( - 56 ) FROM tab1 AS cor0
----
-30
-43
-46

onlyif mysql # use DIV operator for integer division
query I rowsort label-5412
SELECT DISTINCT + col1 DIV col0 + + col0 AS col1 FROM tab0 AS cor0
----
27
37
90

skipif mysql # not compatible
query I rowsort label-5412
SELECT DISTINCT + col1 / col0 + + col0 AS col1 FROM tab0 AS cor0
----
27
37
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-5413
SELECT ALL + col2 DIV + 20 FROM tab0 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-5413
SELECT ALL + col2 / + 20 FROM tab0 AS cor0
----
0
1
4

query I rowsort
SELECT 6 FROM tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab1 AS cor2, tab0 AS cor3
----
243 values hashing to b406364371011938300d901d81088d18

query I rowsort
SELECT ALL + - col2 + + col2 * 77 FROM tab0 AS cor0
----
2508
6232
76

query I rowsort
SELECT - + col0 * 47 + 19 FROM tab2 AS cor0
----
-310
-3647
-3694

query I rowsort
SELECT ALL 16 + + col1 * col2 AS col0 FROM tab1 AS cor0
----
1264
1420
586

onlyif mysql # use DIV operator for integer division
query I rowsort label-5418
SELECT ALL + cor0.col0 DIV - ( col1 + 58 ) AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5418
SELECT ALL + cor0.col0 / - ( col1 + 58 ) AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - + col0 * - col1 * + col1 AS col0 FROM tab0 AS cor0
----
177504
329315
737009

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5420
SELECT DISTINCT + CAST( - 60 AS SIGNED ) * + col0 FROM tab1 AS cor0
----
-180
-3840
-4800

skipif mysql # not compatible
query I rowsort label-5420
SELECT DISTINCT + CAST ( - 60 AS INTEGER ) * + col0 FROM tab1 AS cor0
----
-180
-3840
-4800

query I rowsort
SELECT DISTINCT + - 50 * cor0.col0 FROM tab2 cor0
----
-350
-3900
-3950

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5422
SELECT ALL + CAST( - col2 AS SIGNED ) + + col0 FROM tab0 AS cor0
----
-9
34
7

skipif mysql # not compatible
query I rowsort label-5422
SELECT ALL + CAST ( - col2 AS INTEGER ) + + col0 FROM tab0 AS cor0
----
-9
34
7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5423
SELECT - + CAST( col1 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-5423
SELECT - + CAST ( col1 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
-10
-13
-26

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 cor0, tab1 cor1, tab1 AS cor2
----
972 values hashing to fe55095fff3a5ecc2f113d14a8c6f823

query I rowsort
SELECT DISTINCT - cor0.col1 + + 84 FROM tab0 AS cor0
----
-13
-2
-7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5426
SELECT CAST( col2 AS SIGNED ) * cor0.col0 + + 96 FROM tab1 cor0
----
258
3744
7776

skipif mysql # not compatible
query I rowsort label-5426
SELECT CAST ( col2 AS INTEGER ) * cor0.col0 + + 96 FROM tab1 cor0
----
258
3744
7776

query I rowsort
SELECT ALL - tab0.col2 * ( 25 ) + + col0 * col1 + - col0 FROM tab0
----
1215
3335
5960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5428
SELECT DISTINCT - - CAST( NULL AS SIGNED ) + 65 AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5428
SELECT DISTINCT - - CAST ( NULL AS INTEGER ) + 65 AS col1 FROM tab1 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5429
SELECT DISTINCT + + col0 DIV + col1 + + col2 AS col1 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-5429
SELECT DISTINCT + + col0 / + col1 + + col2 AS col1 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT - ( + 42 ) FROM tab1 AS cor0
----
-42
-42
-42

query I rowsort
SELECT ALL 47 * + col0 AS col2 FROM tab0 AS cor0
----
1128
1645
4183

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5432
SELECT ALL - + ( - 89 ) * + col1 + + CAST( 12 + col1 AS SIGNED ) * ( col2 ) AS col0 FROM tab1 cor0
----
2144
3557
4366

skipif mysql # not compatible
query I rowsort label-5432
SELECT ALL - + ( - 89 ) * + col1 + + CAST ( 12 + col1 AS INTEGER ) * ( col2 ) AS col0 FROM tab1 cor0
----
2144
3557
4366

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5433
SELECT CAST( 0 AS SIGNED ) FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5433
SELECT CAST ( 0 AS INTEGER ) FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - - 56 * + col0 AS col1 FROM tab2 cor0
----
392
4368
4424

query I rowsort
SELECT + cor0.col1 + - col1 AS col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT ALL - col2 + + cor0.col0 * + col2 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT DISTINCT col1 - 65 AS col0 FROM tab0 AS cor0
----
21
26
32

query I rowsort
SELECT - cor0.col0 + 16 FROM tab0 AS cor0
----
-19
-73
-8

query I rowsort
SELECT - col1 + + col2 * col0 FROM tab0 cor0
----
-62
706
7207

query I rowsort
SELECT - + 86 * + col2 FROM tab1 AS cor0
----
-4644
-4902
-8256

query I rowsort
SELECT - 12 FROM tab1, tab2 AS cor0
----
9 values hashing to e698dd57d3aac30af14ce35da434bb45

query I rowsort
SELECT col1 * + ( + col1 + + col1 ) AS col1 FROM tab1 cor0
----
1352
200
338

query I rowsort
SELECT col0 * + col0 * + col2 FROM tab2 AS cor0
----
1323
158184
237158

query I rowsort
SELECT DISTINCT + cor0.col1 - - col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT ALL - cor0.col1 + ( - ( + col0 ) ) * 72 * + col1 AS col0 FROM tab2 cor0
----
-15655
-331403
-96713

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5446
SELECT - col0 * + CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5446
SELECT - col0 * + CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 9 + col0 * col0 FROM tab2
----
58
6093
6250

query I rowsort
SELECT + + col0 * ( + col0 ) + + col0 FROM tab0 cor0
----
1260
600
8010

query I rowsort
SELECT + ( + col1 ) + - col0 FROM tab0 AS cor0
----
2
62
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * 85 + col0 col0 FROM tab2 AS cor0
----
2288
2302
3309

query I rowsort
SELECT DISTINCT - col1 * - ( col2 ) + tab0.col1 AS col2 FROM tab0
----
194
2924
7553

onlyif mysql # use DIV operator for integer division
query I rowsort label-5452
SELECT ALL col0 DIV col2 + col2 * col1 DIV - 19 AS col1 FROM tab0
----
-149
-391
30

skipif mysql # not compatible
query I rowsort label-5452
SELECT ALL col0 / col2 + col2 * col1 / - 19 AS col1 FROM tab0
----
-149
-391
30

query I rowsort
SELECT + tab0.col2 AS col1 FROM tab0, tab2 cor0, tab2 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT DISTINCT + tab2.col2 * 37 AS col0 FROM tab2, tab1 AS cor0
----
1406
962
999

query I rowsort
SELECT DISTINCT + col1 * col1 - - 10 FROM tab2 AS cor0
----
299
3491
971

query I rowsort
SELECT DISTINCT col0 * ( - col0 * - col1 ) + col2 AS col2 FROM tab0
----
118826
49569
720893

query I rowsort
SELECT DISTINCT - col0 + + col2 * col0 FROM tab1
----
159
3584
7600

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * ( col1 ) col1 FROM tab2
----
289
3481
961

onlyif mysql # use DIV operator for integer division
query I rowsort label-5459
SELECT + col1 DIV 48 AS col1 FROM tab0
----
1
1
2

skipif mysql # not compatible
query I rowsort label-5459
SELECT + col1 / 48 AS col1 FROM tab0
----
1
1
2

query I rowsort
SELECT col2 * ( - col1 ) FROM tab2
----
-1534
-646
-837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5461
SELECT DISTINCT col1 * CAST( NULL AS SIGNED ) AS col2 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5461
SELECT DISTINCT col1 * CAST ( NULL AS INTEGER ) AS col2 FROM tab0 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 * 90 + 27 * + col0 col0 FROM tab0 AS cor0
----
-5787
-7092
-7785

query I rowsort
SELECT col1 * + col1 * cor0.col2 AS col2 FROM tab0 AS cor0
----
244068
679042
9409

query I rowsort
SELECT ALL - - col0 * - col0 * + cor0.col1 FROM tab2 AS cor0
----
-106097
-1519
-358956

query I rowsort
SELECT ALL + + col2 + + 10 FROM tab2 cor0
----
36
37
48

query I rowsort
SELECT col2 + + col0 * + 58 AS col1 FROM tab0 AS cor0
----
1425
2031
5244

query I rowsort
SELECT DISTINCT + 21 + col1 FROM tab0 AS cor0
----
107
112
118

query I rowsort
SELECT + + 70 - + 43 AS col2 FROM tab1 AS cor0
----
27
27
27

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( - col0 AS REAL ) * + col2 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT - col1 * 62 AS col0 FROM tab2 AS cor0
----
-1054
-1922
-3658

query I rowsort
SELECT ( - col1 ) + + col1 * - 62 FROM tab1 AS cor0
----
-1638
-630
-819

query I rowsort
SELECT DISTINCT + 86 FROM tab0 AS cor0
----
86

query I rowsort
SELECT + 30 * - col2 FROM tab2 AS cor0
----
-1140
-780
-810

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5474
SELECT ALL CAST( NULL AS SIGNED ) * - col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5474
SELECT ALL CAST ( NULL AS INTEGER ) * - col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 * + col1 * + 57 AS col2 FROM tab0
----
-421572
-472017
-536313

query I rowsort
SELECT ALL 86 * + cor0.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cfe76ccbd8b21643445457f1fb4ed9c8

query I rowsort
SELECT - - 27 + col0 AS col0 FROM tab0 AS cor0
----
116
51
62

query I rowsort
SELECT ( - col1 ) * + col0 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL - - cor0.col0 + 57 FROM tab0, tab2 AS cor0
----
9 values hashing to 68fc57f79052f34eea43db6d4374dae0

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE ( NULL ) NOT BETWEEN + col0 AND NULL
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT - col1 <> col1
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 * + cor0.col1 col2 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5483
SELECT ALL + - ( + col0 ) DIV cor0.col1 AS col1 FROM tab1 AS cor0
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-5483
SELECT ALL + - ( + col0 ) / cor0.col1 AS col1 FROM tab1 AS cor0
----
-6
-6
0

query I rowsort
SELECT ALL + + tab1.col1 * cor0.col2 AS col1 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to b875995d19e2a126dd81a380aa7231ba

query I rowsort
SELECT DISTINCT - cor0.col1 + ( col1 ) * col1 FROM tab0 AS cor0
----
7310
8190
9312

query I rowsort
SELECT DISTINCT + ( - col1 ) + + col2 FROM tab2
----
-33
-4
21

query I rowsort
SELECT DISTINCT + 29 * + cor0.col0 + + cor1.col1 AS col1 FROM tab0, tab1 cor0, tab0 AS cor1
----
9 values hashing to 0f27d734a841f41a5c84eaa406917344

query I rowsort
SELECT DISTINCT col2 * col2 * + col0 AS col2 FROM tab1
----
207936
737280
8748

query I rowsort
SELECT DISTINCT tab2.col2 + + col2 AS col1 FROM tab2
----
52
54
76

query I rowsort
SELECT + + col1 + - 8 FROM tab2 AS cor0
----
23
51
9

query I rowsort
SELECT - cor1.col2 * + cor0.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to e9c9a5d5cefe83eb1c091d89114ff7df

query I rowsort
SELECT DISTINCT - - col1 * col1 AS col2 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT - 93 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 38f445d95788c7dc754ff688a62df03b

query I rowsort
SELECT 38 * cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 89301248ff14439a1d2bfadb5d37337e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 44 + col2 + - 84 col2 FROM tab0
----
-39
-7
42

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5496
SELECT + col2 * col2 - CAST( NULL AS SIGNED ) col2 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5496
SELECT + col2 * col2 - CAST ( NULL AS INTEGER ) col2 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5497
SELECT - col0 * tab1.col1 * + col2 + col0 * + CAST( NULL AS SIGNED ) AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5497
SELECT - col0 * tab1.col1 * + col2 + col0 * + CAST ( NULL AS INTEGER ) AS col2 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 * - ( col2 ) - - col1 * - col0 FROM tab1
----
-10256
-2994
-3889

onlyif mysql # use DIV operator for integer division
query I rowsort label-5499
SELECT + col0 DIV CAST( + col0 AS SIGNED ) + + col1 * - 44 AS col1 FROM tab2
----
-1363
-2595
-747

skipif mysql # not compatible
query I rowsort label-5499
SELECT + col0 / CAST ( + col0 AS INTEGER ) + + col1 * - 44 AS col1 FROM tab2
----
-1363
-2595
-747

query I rowsort
SELECT col2 + 75 FROM tab1
----
129
132
171

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * cor0.col0 col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL - col1 * col0 - + 16 AS col1 FROM tab0 AS cor0
----
-2080
-3411
-8115

query I rowsort
SELECT col2 * + col1 * col0 FROM tab0 AS cor0
----
3395
664118
68112

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 AS cor0, tab2 cor1, tab2, tab2 AS cor2
----
3645 values hashing to db428ec66bce13149e3129b417b0fe94

query I rowsort
SELECT ALL - col0 * ( col1 ) - col2 * 50 FROM tab2
----
-1567
-3243
-5902

query I rowsort
SELECT 76 - col2 FROM tab2 AS cor0
----
38
49
50

query I rowsort
SELECT + col1 * + col2 * + col2 FROM tab2
----
22599
24548
39884

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5508
SELECT DISTINCT - cor0.col1 + + cor0.col1 * - CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5508
SELECT DISTINCT - cor0.col1 + + cor0.col1 * - CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 48 col1 FROM tab2 AS cor0
----
-48
-48
-48

onlyif mysql # use DIV operator for integer division
query I rowsort label-5510
SELECT DISTINCT 25 * cor0.col1 DIV - ( col1 ) AS col1 FROM tab2 AS cor0
----
-25

skipif mysql # not compatible
query I rowsort label-5510
SELECT DISTINCT 25 * cor0.col1 / - ( col1 ) AS col1 FROM tab2 AS cor0
----
-25

query I rowsort
SELECT + col1 + - col2 * 86 * col1 + - col1 FROM tab2 AS cor0
----
-131924
-55556
-71982

query I rowsort
SELECT ALL col2 + col1 * ( + col1 ) FROM tab1 cor0
----
157
265
730

onlyif mysql # use DIV operator for integer division
query I rowsort label-5513
SELECT - + cor0.col1 DIV col2 + col1 + + col0 DIV col0 FROM tab0 AS cor0
----
1
85
91

skipif mysql # not compatible
query I rowsort label-5513
SELECT - + cor0.col1 / col2 + col1 + + col0 / col0 FROM tab0 AS cor0
----
1
85
91

query I rowsort
SELECT DISTINCT + 67 + col0 AS col0 FROM tab0 AS cor0
----
102
156
91

query I rowsort
SELECT 90 AS col0 FROM tab2 AS cor0
----
90
90
90

query I rowsort
SELECT ALL + + 38 * col2 AS col2 FROM tab2 AS cor0
----
1026
1444
988

query I rowsort
SELECT DISTINCT col2 + + col1 * cor0.col0 + 30 * - col2 FROM tab2 AS cor0
----
-566
241
3848

query I rowsort
SELECT DISTINCT + 6 AS col0 FROM tab1 AS cor0
----
6

query I rowsort
SELECT ALL + col1 * col0 + + col0 * - col2 + - col2 AS col2 FROM tab1 cor0
----
-138
-3065
-6736

query I rowsort
SELECT ALL - 65 + + col1 FROM tab2 AS cor0
----
-34
-48
-6

query I rowsort
SELECT - cor0.col1 * col0 + 10 AS col0 FROM tab0 AS cor0
----
-2054
-3385
-8089

query I rowsort
SELECT ALL + col1 + col1 AS col0 FROM tab2 AS cor0
----
118
34
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-5523
SELECT ALL - - cor0.col1 * cor0.col0 * + col1 + - col2 DIV col1 + + col1 AS col1 FROM tab1 cor0
----
13526
2052
6405

skipif mysql # not compatible
query I rowsort label-5523
SELECT ALL - - cor0.col1 * cor0.col0 * + col1 + - col2 / col1 + + col1 AS col1 FROM tab1 cor0
----
13526
2052
6405

query I rowsort
SELECT DISTINCT + - col1 * col1 * + col2 + - col0 + + col1 * col1 AS col0 FROM tab2 AS cor0
----
-10772
-24993
-87103

query I rowsort
SELECT + col0 + col0 * - col2 + cor0.col0 FROM tab0 AS cor0
----
-7120
-744
35

query I rowsort
SELECT - + col2 * + cor0.col0 + + col1 + col1 AS col2 FROM tab1 AS cor0
----
-110
-3628
-7654

query I rowsort
SELECT 27 - + col2 FROM tab0
----
-55
-6
26

query I rowsort
SELECT - col1 + col2 * - col1 AS col0 FROM tab1
----
-1261
-1430
-580

query I rowsort
SELECT - 15 + - col0 FROM tab0 AS cor0
----
-104
-39
-50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 - + col1 col1 FROM tab2
----
-33
-4
21

query I rowsort
SELECT - 66 * col0 FROM tab1 AS cor0
----
-198
-4224
-5280

query I rowsort
SELECT DISTINCT - - 59 - + col2 FROM tab1 AS cor0
----
-37
2
5

query I rowsort
SELECT 66 + - col1 AS col1 FROM tab0 AS cor0
----
-20
-25
-31

query I rowsort
SELECT ALL - col2 * + col1 * - col1 AS col2 FROM tab2 cor0
----
10982
25947
90506

query I rowsort
SELECT ( - col2 ) AS col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT + col1 * col0 + + col0 AS col1 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT DISTINCT - 30 * col0 + col1 FROM tab0 AS cor0
----
-2579
-634
-953

query I rowsort
SELECT ALL + + col2 AS col2 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT DISTINCT cor0.col2 + + cor0.col1 AS col0 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL 20 - col2 AS col1 FROM tab1 AS cor0
----
-34
-37
-76

query I rowsort
SELECT col0 + - col1 * + col0 AS col1 FROM tab0 AS cor0
----
-2040
-3360
-8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-5542
SELECT ALL col2 + col1 + col2 * col2 DIV col1 col2 FROM tab1
----
192
391
817

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5542
SELECT ALL col2 + col1 + col2 * col2 / col1 col2 FROM tab1
----
192
391
817

query I rowsort
SELECT 73 * 89 AS col0 FROM tab1
----
6497
6497
6497

onlyif mysql # use DIV operator for integer division
query I rowsort label-5544
SELECT + col0 + - tab0.col0 DIV + col2 FROM tab0
----
0
24
88

skipif mysql # not compatible
query I rowsort label-5544
SELECT + col0 + - tab0.col0 / + col2 FROM tab0
----
0
24
88

query I rowsort
SELECT - col1 * col1 + col0 FROM tab0 AS cor0
----
-7372
-8192
-9374

query I rowsort
SELECT ALL + cor0.col2 + - col1 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT DISTINCT col0 * - col2 AS col1 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT ALL - 2 * + col0 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT - + col2 + col2 + - col2 * - col2 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL + col1 * - col1 * col1 AS col0 FROM tab0 AS cor0
----
-636056
-753571
-912673

query I rowsort
SELECT - - 53 + cor0.col2 AS col1 FROM tab0 AS cor0
----
135
54
86

query I rowsort
SELECT - - col0 + - col1 * - col2 AS col0 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT ALL cor0.col2 + col2 * col2 AS col1 FROM tab2 AS cor0
----
1482
702
756

query I rowsort
SELECT ALL + cor0.col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT DISTINCT + ( col2 ) * cor0.col1 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT - col0 * + col0 + col2 AS col1 FROM tab2 AS cor0
----
-22
-6058
-6203

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col1 col0 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT col1 + col1 * col1 FROM tab0
----
7482
8372
9506

onlyif mysql # use DIV operator for integer division
query I rowsort label-5559
SELECT + col2 DIV col1 - - col1 AS col0 FROM tab1
----
15
20
28

skipif mysql # not compatible
query I rowsort label-5559
SELECT + col2 / col1 - - col1 AS col0 FROM tab1
----
15
20
28

query I rowsort
SELECT DISTINCT + tab0.col0 - + col1 AS col1 FROM tab0
----
-2
-62

query I rowsort
SELECT DISTINCT + col2 AS col2 FROM tab2 WHERE - col2 < + col1
----
26
27
38

query I rowsort
SELECT DISTINCT tab2.col1 + col1 AS col0 FROM tab2
----
118
34
62

query I rowsort
SELECT ALL col0 * + col1 FROM tab0 WHERE + col1 + - col1 * + col1 + col0 = NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5564
SELECT + col2 DIV - col0 + - col2 * col2 AS col2 FROM tab2
----
-1444
-676
-732

skipif mysql # not compatible
query I rowsort label-5564
SELECT + col2 / - col0 + - col2 * col2 AS col2 FROM tab2
----
-1444
-676
-732

query I rowsort
SELECT ALL - col1 * tab1.col2 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT + col2 AS col2 FROM tab2 WHERE NOT NULL BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL + col0 + - col0 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL col1 * col2 - col1 * + col1 FROM tab2
----
-124
-1947
357

query I rowsort
SELECT col2 * - col0 + col0 FROM tab1
----
-159
-3584
-7600

query I rowsort
SELECT + col1 - + col0 AS col2 FROM tab0
----
2
62
62

query I rowsort
SELECT - col0 * tab0.col1 * col1 + + col0 FROM tab0
----
-177480
-329280
-736920

query I rowsort
SELECT col1 * col0 + - col2 AS col1 FROM tab0
----
2031
3394
8017

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + + col0 col2 FROM tab2
----
137
38
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + tab1.col2 col0 FROM tab1
----
121
176
57

query I rowsort
SELECT DISTINCT + col2 * - col0 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - tab2.col1 * + col1 FROM tab2
----
-289
-3481
-961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * + col2 + + col1 + col0 col0 FROM tab0
----
167
7478
902

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col2 col0 FROM tab0
----
1
33
82

query III rowsort
SELECT * FROM tab0 WHERE - col0 * col2 = col0 * - col0
----

query I rowsort
SELECT + col2 * col2 + + col2 * - tab0.col1 AS col0 FROM tab0
----
-1749
-738
-96

query I rowsort
SELECT DISTINCT - col1 + col2 * col2 + - col2 AS col0 FROM tab2
----
1389
591
671

query I rowsort
SELECT + col2 * col2 * tab0.col2 AS col0 FROM tab0
----
1
35937
551368

query I rowsort
SELECT + col2 * col1 AS col1 FROM tab2
----
1534
646
837

query I rowsort
SELECT ALL + col1 * col2 * - col1 FROM tab0
----
-244068
-679042
-9409

query I rowsort
SELECT ALL + col0 + col2 + - col1 AS col2 FROM tab1
----
111
163
31

query I rowsort
SELECT col2 * col0 - + col0 FROM tab2
----
182
1950
2923

onlyif mysql # use DIV operator for integer division
query I rowsort label-5587
SELECT ALL tab1.col1 DIV + col1 + col1 * col0 + - col2 FROM tab1
----
25
584
945

skipif mysql # not compatible
query I rowsort label-5587
SELECT ALL tab1.col1 / + col1 + col1 * col0 + - col2 FROM tab1
----
25
584
945

query I rowsort
SELECT ALL col1 + tab0.col2 * + col0 + col0 FROM tab0
----
167
7478
902

query I rowsort
SELECT DISTINCT - col1 * - col1 AS col0 FROM tab2 WHERE NOT NULL <> ( col1 )
----

query I rowsort
SELECT col2 * tab1.col2 - col1 * - col2 FROM tab1
----
10464
3819
4320

query I rowsort
SELECT - col2 * - col1 * col1 AS col2 FROM tab1
----
16224
36504
5700

query I rowsort
SELECT DISTINCT - col1 * col0 + + col0 * col1 + - col1 AS col0 FROM tab1
----
-10
-13
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-5593
SELECT DISTINCT - tab1.col1 DIV col2 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-5593
SELECT DISTINCT - tab1.col1 / col2 FROM tab1
----
0

query I rowsort
SELECT col1 + col0 * + col1 AS col2 FROM tab2
----
1360
248
4661

query I rowsort
SELECT ALL tab0.col1 * tab0.col1 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT - col0 * + col0 - col1 * col1 AS col2 FROM tab2 AS cor0
----
-1010
-6530
-9565

query III rowsort
SELECT * FROM tab2 WHERE NOT + col2 NOT IN ( + col1 - - col0 * tab2.col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5598
SELECT DISTINCT + col0 DIV col1 AS col1 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-5598
SELECT DISTINCT + col0 / col1 AS col1 FROM tab2 AS cor0
----
0
1
4

query I rowsort
SELECT - col0 - cor0.col1 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT col2 - col1 AS col0 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT col2 * + cor0.col2 AS col0 FROM tab1 AS cor0
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-5602
SELECT col2 DIV - cor0.col0 AS col0 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-5602
SELECT col2 / - cor0.col0 AS col0 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT ( + 51 ) FROM tab1 AS cor0
----
51
51
51

query I rowsort
SELECT - col0 + cor0.col1 * - col1 FROM tab1 AS cor0
----
-164
-249
-679

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5605
SELECT ALL - CAST( NULL AS SIGNED ) + ( + col0 ) AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5605
SELECT ALL - CAST ( NULL AS INTEGER ) + ( + col0 ) AS col0 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - cor0.col0 ) + col2 col1 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT - - 51 * - col1 * cor0.col1 FROM tab2 AS cor0
----
-14739
-177531
-49011

query I rowsort
SELECT ALL - col2 * col1 * tab1.col0 FROM tab1
----
-36480
-4212
-99840

onlyif mysql # use DIV operator for integer division
query I rowsort label-5609
SELECT ALL - + col1 DIV col0 + col1 AS col0 FROM tab1 AS cor0
----
10
13
18

skipif mysql # not compatible
query I rowsort label-5609
SELECT ALL - + col1 / col0 + col1 AS col0 FROM tab1 AS cor0
----
10
13
18

onlyif mysql # use DIV operator for integer division
query I rowsort label-5610
SELECT cor0.col2 DIV - 86 AS col1 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to a46f44f30b2183508f32c16a79479cd9

skipif mysql # not compatible
query I rowsort label-5610
SELECT cor0.col2 / - 86 AS col1 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to a46f44f30b2183508f32c16a79479cd9

onlyif mysql # use DIV operator for integer division
query I rowsort label-5611
SELECT DISTINCT - + col0 DIV - col0 + cor0.col1 AS col0 FROM tab2 AS cor0
----
18
32
60

skipif mysql # not compatible
query I rowsort label-5611
SELECT DISTINCT - + col0 / - col0 + cor0.col1 AS col0 FROM tab2 AS cor0
----
18
32
60

query I rowsort
SELECT + 73 AS col0 FROM tab2 cor0
----
73
73
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-5613
SELECT DISTINCT + col1 DIV - cor0.col2 + - cor0.col0 + col0 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5613
SELECT DISTINCT + col1 / - cor0.col2 + - cor0.col0 + col0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT - 60 * col0 AS col0 FROM tab1 cor0
----
-180
-3840
-4800

query I rowsort
SELECT ALL - 97 * + col0 + - col0 AS col1 FROM tab0 AS cor0
----
-2352
-3430
-8722

query I rowsort
SELECT - col0 + col2 * 53 AS col2 FROM tab1 AS cor0
----
2859
2957
5008

query I rowsort
SELECT DISTINCT - - col1 + - col0 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT 57 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 61da70c624ad60604a668f7f8f29392a

onlyif mysql # use DIV operator for integer division
query I rowsort label-5619
SELECT - cor0.col2 DIV 74 + + col0 AS col0 FROM tab0 AS cor0
----
24
35
88

skipif mysql # not compatible
query I rowsort label-5619
SELECT - cor0.col2 / 74 + + col0 AS col0 FROM tab0 AS cor0
----
24
35
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-5620
SELECT ALL - col1 DIV col0 + cor0.col1 AS col0 FROM tab1 AS cor0
----
10
13
18

skipif mysql # not compatible
query I rowsort label-5620
SELECT ALL - col1 / col0 + cor0.col1 AS col0 FROM tab1 AS cor0
----
10
13
18

query I rowsort
SELECT + + cor0.col1 * + 44 AS col1 FROM tab0 AS cor0
----
3784
4004
4268

query I rowsort
SELECT + + col0 + cor0.col1 AS col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT DISTINCT - + col0 * - cor0.col2 AS col1 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5624
SELECT ALL 29 * col2 / col1 + CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5624
SELECT ALL 29 * col2 / col1 + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL col1 * - 73 * col1 + ( col1 ) AS col0 FROM tab2 AS cor0
----
-21080
-254054
-70122

query I rowsort
SELECT DISTINCT ( - ( cor0.col1 ) ) * - 5 AS col1 FROM tab1 AS cor0
----
130
50
65

query I rowsort
SELECT + - ( cor0.col2 ) * - col2 + + col1 FROM tab1 AS cor0
----
2942
3259
9229

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 4 * - 34 + col2 col1 FROM tab0 cor0
----
137
169
218

query I rowsort
SELECT ( - 80 ) FROM tab2 AS cor0
----
-80
-80
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 64 col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 60ab040e931c5c85db7ba19364eacc8e

query I rowsort
SELECT ALL + 0 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT DISTINCT + ( + 55 ) * col1 + ( - ( col0 ) ) * - col1 + 93 AS col2 FROM tab2 AS cor0
----
2015
2371
7940

query I rowsort
SELECT DISTINCT - cor0.col1 + - cor0.col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT + cor0.col2 * col0 * col1 FROM tab2 AS cor0
----
119652
51034
5859

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 * - cor0.col1 col2 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT ALL - 47 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 6942a0d9558277afd0d00408d65cf5aa

query I rowsort
SELECT 29 * col2 FROM tab1 AS cor0
----
1566
1653
2784

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 28 col1 FROM tab0, tab0 cor0, tab0 AS cor1, tab0 AS cor2
----
81 values hashing to 70e92c218433163922867899a16e1269

query I rowsort
SELECT ALL + 84 * + col2 AS col0 FROM tab1 cor0
----
4536
4788
8064

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 48 col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 31c94943c073954e4ca20b170ab61f8c

query I rowsort
SELECT ALL - ( + col0 ) FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT - col1 + cor0.col2 * col1 FROM tab0 AS cor0
----
0
2752
7371

query I rowsort
SELECT ALL + + 82 AS col0 FROM tab0 cor0 CROSS JOIN tab2 cor1
----
9 values hashing to f318fd9dac2de7af4b82cc7574bbca2c

onlyif mysql # use DIV operator for integer division
query I rowsort label-5644
SELECT ALL 1 DIV col0 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5644
SELECT ALL 1 / col0 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - 49 + col0 AS col2 FROM tab1
----
-46
15
31

onlyif mysql # use DIV operator for integer division
query I rowsort label-5646
SELECT 2 DIV col0 + + col1 AS col1 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-5646
SELECT 2 / col0 + + col1 AS col1 FROM tab2
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-5647
SELECT DISTINCT col1 + + col0 DIV + col0 AS col2 FROM tab0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-5647
SELECT DISTINCT col1 + + col0 / + col0 AS col2 FROM tab0
----
87
92
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-5648
SELECT ALL - col0 + + col2 DIV col2 FROM tab1
----
-2
-63
-79

skipif mysql # not compatible
query I rowsort label-5648
SELECT ALL - col0 + + col2 / col2 FROM tab1
----
-2
-63
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-5649
SELECT + ( - col1 ) DIV + col0 + + ( col1 ) * col2 AS col0 FROM tab0
----
2835
7461
95

skipif mysql # not compatible
query I rowsort label-5649
SELECT + ( - col1 ) / + col0 + + ( col1 ) * col2 AS col0 FROM tab0
----
2835
7461
95

query I rowsort
SELECT 30 AS col2 FROM tab2
----
30
30
30

query I rowsort
SELECT DISTINCT 11 * + col1 + col0 AS col0 FROM tab1
----
174
223
289

query I rowsort
SELECT col1 + + 28 * + col0 FROM tab0
----
1077
2583
758

query IIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0 WHERE - tab1.col2 NOT BETWEEN NULL AND ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + - 42 * + col2 col2 FROM tab2
----
-1141
-1170
-1675

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5655
SELECT - CAST( NULL AS SIGNED ) + 59 * + col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5655
SELECT - CAST ( NULL AS INTEGER ) + 59 * + col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + 88 AS col1 FROM tab2
----
88
88
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + - 56 col2 FROM tab1 AS cor0
----
-66
-69
-82

query I rowsort
SELECT ALL + + col2 + + col0 * col0 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT - col1 + 77 * - col2 FROM tab1 AS cor0
----
-4184
-4399
-7405

query I rowsort
SELECT DISTINCT 55 FROM tab0
----
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 50 col2 FROM tab2
----
50
50
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + col0 + tab2.col1 col1 FROM tab2
----
175
215
45

query I rowsort
SELECT + col2 * 17 + - 23 * + col2 + + 72 * + col1 AS col0 FROM tab0
----
5994
6060
6978

query I rowsort
SELECT col0 + ( + 81 ) - + col0 AS col0 FROM tab0 AS cor0
----
81
81
81

query I rowsort
SELECT DISTINCT + - col0 + + col0 * - col0 AS col2 FROM tab2 AS cor0
----
-56
-6162
-6320

onlyif mysql # use DIV operator for integer division
query I rowsort label-5666
SELECT ALL - cor0.col2 DIV - 2 FROM tab2 AS cor0
----
13
13
19

skipif mysql # not compatible
query I rowsort label-5666
SELECT ALL - cor0.col2 / - 2 FROM tab2 AS cor0
----
13
13
19

query I rowsort
SELECT - + col0 + col2 * + col2 * - col2 FROM tab2 AS cor0
----
-17654
-19690
-54951

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col2 + + col2 * col1 col2 FROM tab1 AS cor0
----
1140
2496
2808

skipif mysql # not compatible
query I rowsort
SELECT + - col1 * CAST ( col1 AS REAL ) FROM tab1 cor0
----
-100
-169
-676

query I rowsort
SELECT col1 - - col0 * + 81 FROM tab2 AS cor0
----
598
6377
6416

query I rowsort
SELECT + col2 * - ( col2 ) * col2 FROM tab0 AS cor0
----
-1
-35937
-551368

query I rowsort
SELECT cor0.col0 - - 9 * col0 AS col1 FROM tab2 AS cor0
----
70
780
790

query I rowsort
SELECT - + col0 * col2 - 74 FROM tab1 AS cor0
----
-236
-3722
-7754

query I rowsort
SELECT DISTINCT col1 * + col1 + - col0 + col0 * col0 AS col0 FROM tab0
----
10599
16113
7948

query I rowsort
SELECT + col2 + col0 * col1 FROM tab0
----
2097
3396
8181

query I rowsort
SELECT + - col2 * col2 AS col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT + 51 - col1 AS col1 FROM tab2 AS cor0
----
-8
20
34

query I rowsort
SELECT ALL - - col0 - - col2 AS col0 FROM tab1 cor0
----
121
176
57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5679
SELECT cor0.col2 + + CAST( NULL AS SIGNED ) / + col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5679
SELECT cor0.col2 + + CAST ( NULL AS INTEGER ) / + col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5680
SELECT DISTINCT + - col2 * CAST( NULL AS SIGNED ) * + col1 col2 FROM tab1 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5680
SELECT DISTINCT + - col2 * CAST ( NULL AS INTEGER ) * + col1 col2 FROM tab1 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5681
SELECT DISTINCT - - col2 DIV - 43 AS col0 FROM tab0 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-5681
SELECT DISTINCT - - col2 / - 43 AS col0 FROM tab0 AS cor0
----
-1
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5682
SELECT + col0 DIV CAST( col2 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5682
SELECT + col0 / CAST ( col2 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT col2 * 37 FROM tab2 AS cor0
----
1406
962
999

query I rowsort
SELECT - + cor0.col2 * + col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT + col1 + + col2 AS col2 FROM tab2
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col1 col0 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT 80 * col1 + col0 + + ( col1 * ( 85 ) ) FROM tab1
----
1714
2225
4293

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5688
SELECT DISTINCT + CAST( NULL AS SIGNED ) * + col1 - cor0.col1 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5688
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * + col1 - cor0.col1 FROM tab1 cor0
----
NULL

query I rowsort
SELECT ALL - + 22 AS col2 FROM tab1 AS cor0
----
-22
-22
-22

query I rowsort
SELECT DISTINCT 67 * 46 - + col1 AS col0 FROM tab0 AS cor0
----
2985
2991
2996

query I rowsort
SELECT DISTINCT + col2 + + col2 * col1 AS col0 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT col1 * + col1 * - col1 FROM tab1 AS cor0
----
-1000
-17576
-2197

query I rowsort
SELECT 39 + ( cor0.col1 ) AS col2 FROM tab0 AS cor0
----
125
130
136

query I rowsort
SELECT DISTINCT - + ( 21 ) + + col2 + + 38 * col0 AS col2 FROM tab2 cor0
----
272
2969
3019

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 - col0 col1 FROM tab1 cor0
----
-128
-160
-6

query I rowsort
SELECT ALL - 83 + + 38 * - col1 * + col2 AS col1 FROM tab0 AS cor0
----
-107927
-283639
-3769

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5697
SELECT ALL + + col0 * 70 + - col1 / + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5697
SELECT ALL + + col0 * 70 + - col1 / + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 + ( + cor0.col1 ) AS col2 FROM tab0 AS cor0
----
53
9
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 68 col0 FROM tab1 cor0
----
68

onlyif mysql # use DIV operator for integer division
query I rowsort label-5700
SELECT ALL - 7 DIV 63 + col1 + - col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5700
SELECT ALL - 7 / 63 + col1 + - col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + 36 + 68 FROM tab2 AS cor0
----
104
104
104

query I rowsort
SELECT ALL - 43 FROM tab0 AS cor0
----
-43
-43
-43

query I rowsort
SELECT - + 21 + - col1 * - col2 AS col0 FROM tab1 AS cor0
----
1227
1383
549

query I rowsort
SELECT ALL + col2 * - cor0.col0 AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - col1 + cor0.col0 * col0 FROM tab0 cor0
----
1128
490
7830

query I rowsort
SELECT - cor0.col2 * - 7 FROM tab1 AS cor0
----
378
399
672

query I rowsort
SELECT DISTINCT - 48 AS col2 FROM tab0, tab1 AS cor0
----
-48

query I rowsort
SELECT ( col1 ) + + col0 AS col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT + - ( - col0 ) * + 3 AS col1 FROM tab2 AS cor0
----
21
234
237

query I rowsort
SELECT DISTINCT - 78 + cor0.col2 FROM tab2, tab2 AS cor0
----
-40
-51
-52

query I rowsort
SELECT col0 * cor0.col1 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - col2 + + col1 * col2 FROM tab0 cor0
----
2805
7380
96

query I rowsort
SELECT ( col0 ) * col1 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT + col1 + - col2 * col0 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT + col0 * - cor0.col2 + + ( + 48 ) AS col0 FROM tab2 AS cor0
----
-141
-1980
-2954

query I rowsort
SELECT ALL 33 AS col1 FROM tab2
----
33
33
33

query I rowsort
SELECT DISTINCT col1 * - 26 FROM tab2
----
-1534
-442
-806

query I rowsort
SELECT 93 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 85ef191bf1b307f300b3fd49992fcae7

query I rowsort
SELECT ALL tab2.col0 * + 41 FROM tab2
----
287
3198
3239

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + - col2 col0 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT ALL + - 26 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 47d0574274146de273829785364ada39

query I rowsort
SELECT DISTINCT - cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab2, tab1 AS cor1
----
-10
-13
-26

query I rowsort
SELECT ALL + 94 * 64 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to b5b039528dbf8066b378ac73c2be2b4f

query I rowsort
SELECT DISTINCT - cor0.col1 + - ( + col0 ) AS col0 FROM tab2 AS cor0
----
-137
-38
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col0 * + cor0.col2 + cor0.col0 col0 FROM tab1 cor0
----
165
3712
7760

query I rowsort
SELECT DISTINCT 89 FROM tab1
----
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5728
SELECT DISTINCT - CAST( - col0 * + col0 AS SIGNED ) FROM tab0
----
1225
576
7921

skipif mysql # not compatible
query I rowsort label-5728
SELECT DISTINCT - CAST ( - col0 * + col0 AS INTEGER ) FROM tab0
----
1225
576
7921

query I rowsort
SELECT DISTINCT ( - 13 ) FROM tab1
----
-13

onlyif mysql # use DIV operator for integer division
query I rowsort label-5730
SELECT + col1 + + col1 DIV cor0.col2 AS col1 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-5730
SELECT + col1 + + col1 / cor0.col2 AS col1 FROM tab1 AS cor0
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5731
SELECT DISTINCT + + col2 * + col2 * + 94 + + cor0.col1 * CAST( NULL AS SIGNED ) AS col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5731
SELECT DISTINCT + + col2 * + col2 * + 94 + + cor0.col1 * CAST ( NULL AS INTEGER ) AS col2 FROM tab0 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5732
SELECT DISTINCT col2 + col2 DIV - col0 + - col0 AS col0 FROM tab1 AS cor0
----
-7
15
33

skipif mysql # not compatible
query I rowsort label-5732
SELECT DISTINCT col2 + col2 / - col0 + - col0 AS col0 FROM tab1 AS cor0
----
-7
15
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 - - col2 col0 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT - col1 + + 51 FROM tab0 AS cor0
----
-35
-40
-46

onlyif mysql # use DIV operator for integer division
query I rowsort label-5735
SELECT + 26 DIV + tab1.col0 AS col2 FROM tab1
----
0
0
8

skipif mysql # not compatible
query I rowsort label-5735
SELECT + 26 / + tab1.col0 AS col2 FROM tab1
----
0
0
8

query I rowsort
SELECT ALL + tab0.col2 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

query I rowsort
SELECT - - cor0.col1 + 29 AS col2 FROM tab1 AS cor0
----
39
42
55

query I rowsort
SELECT ALL + col0 * + col2 + col1 + col2 FROM tab0 AS cor0
----
133
7471
911

query I rowsort
SELECT DISTINCT col2 + - col0 * + col0 AS col1 FROM tab1 AS cor0
----
-4039
-6304
45

query I rowsort
SELECT + cor0.col2 + col2 AS col2 FROM tab0 AS cor0
----
164
2
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + 33 col1 FROM tab1 AS cor0
----
43
46
59

query I rowsort
SELECT col1 * col2 - col2 FROM tab1
----
1152
1350
513

query I rowsort
SELECT ALL col2 + - col1 - 7 FROM tab1
----
21
40
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-5744
SELECT ALL col0 - - col0 DIV + ( - col1 ) FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-5744
SELECT ALL col0 - - col0 / + ( - col1 ) FROM tab0
----
24
35
89

query I rowsort
SELECT DISTINCT + ( col0 ) * ( - 37 ) FROM tab1
----
-111
-2368
-2960

query I rowsort
SELECT col2 * - col1 * - 72 AS col0 FROM tab0
----
204336
537264
6984

query I rowsort
SELECT ALL + tab0.col2 + - col0 FROM tab0
----
-34
-7
9

query I rowsort
SELECT - 4 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 5784540a5af6ca2be84399d314acd2fd

query I rowsort
SELECT DISTINCT col0 + 9 FROM tab0
----
33
44
98

query I rowsort
SELECT ALL + tab1.col2 + - 42 FROM tab1
----
12
15
54

query I rowsort
SELECT - - col0 * + col0 + - col2 * col2 * ( 86 * cor0.col0 ) FROM tab1 AS cor0
----
-17878400
-63399680
-752319

onlyif mysql # use DIV operator for integer division
query I rowsort label-5752
SELECT - col1 + - CAST( col0 * col1 AS SIGNED ) + + 78 * col2 DIV col0 AS col1 FROM tab0 AS cor0
----
-2043
-3490
-8119

skipif mysql # not compatible
query I rowsort label-5752
SELECT - col1 + - CAST ( col0 * col1 AS INTEGER ) + + 78 * col2 / col0 AS col1 FROM tab0 AS cor0
----
-2043
-3490
-8119

query I rowsort
SELECT ALL - col1 + + cor0.col1 * - col0 AS col2 FROM tab1 AS cor0
----
-104
-1053
-650

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - cor0.col0 col1 FROM tab0 AS cor0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + 75 col0 FROM tab2 cor0
----
37
48
49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 + + 91 * + 79 + + col1 col2 FROM tab0 AS cor0
----
7361
7371
7383

query I rowsort
SELECT + ( tab0.col1 ) FROM tab0, tab2 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT 61 FROM tab2, tab1 AS cor0
----
9 values hashing to 07149905a72bd87553381f34d19ed290

query I rowsort
SELECT ALL + 61 * + col2 AS col2 FROM tab2
----
1586
1647
2318

query I rowsort
SELECT 9 FROM tab0 AS cor0
----
9
9
9

query I rowsort
SELECT - + col2 * - 38 + + col0 AS col0 FROM tab0 AS cor0
----
1278
3205
73

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
972 values hashing to 49c8bf3e931a898ba7af63d0e377eb79

query I rowsort
SELECT ALL - col1 + - tab1.col2 * - col2 AS col1 FROM tab1
----
2890
3239
9203

query I rowsort
SELECT ALL - col2 + + col0 * - ( - 4 ) FROM tab2 AS cor0
----
1
278
286

onlyif mysql # use DIV operator for integer division
query I rowsort label-5765
SELECT col2 * - cor0.col2 + + ( + col0 ) DIV col0 AS col2 FROM tab0 AS cor0
----
-1088
-6723
0

skipif mysql # not compatible
query I rowsort label-5765
SELECT col2 * - cor0.col2 + + ( + col0 ) / col0 AS col2 FROM tab0 AS cor0
----
-1088
-6723
0

query I rowsort
SELECT - cor0.col1 - - col2 * 47 FROM tab2 AS cor0
----
1163
1238
1769

query I rowsort
SELECT + cor0.col1 * cor0.col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT + - col0 + col1 * + col0 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT ALL 10 AS col1 FROM tab2 AS cor0
----
10
10
10

query I rowsort
SELECT DISTINCT + 93 FROM tab0 AS cor0
----
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-5771
SELECT ALL col0 DIV + tab2.col0 + tab2.col1 + col0 AS col0 FROM tab2
----
138
39
97

skipif mysql # not compatible
query I rowsort label-5771
SELECT ALL col0 / + tab2.col0 + tab2.col1 + col0 AS col0 FROM tab2
----
138
39
97

query I rowsort
SELECT - col2 + col1 + - ( + 19 ) * - col2 FROM tab2
----
517
527
701

query I rowsort
SELECT + col1 + col2 + tab1.col0 * - 26 AS col2 FROM tab1
----
-1597
-1971
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-5774
SELECT 21 DIV + col2 AS col1 FROM tab0
----
0
0
21

skipif mysql # not compatible
query I rowsort label-5774
SELECT 21 / + col2 AS col1 FROM tab0
----
0
0
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-5775
SELECT DISTINCT - col0 + - col2 DIV col1 + - col2 * + col2 AS col1 FROM tab0
----
-1113
-36
-6813

skipif mysql # not compatible
query I rowsort label-5775
SELECT DISTINCT - col0 + - col2 / col1 + - col2 * + col2 AS col1 FROM tab0
----
-1113
-36
-6813

query I rowsort
SELECT DISTINCT + - 68 * - col0 - + col1 * col1 AS col0 FROM tab1 AS cor0
----
-472
4252
5271

onlyif mysql # use DIV operator for integer division
query I rowsort label-5777
SELECT DISTINCT ( - col0 ) DIV + col1 FROM tab2 AS cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-5777
SELECT DISTINCT ( - col0 ) / + col1 FROM tab2 AS cor0
----
-1
-4
0

query I rowsort
SELECT ALL + 20 + + col0 FROM tab2 AS cor0
----
27
98
99

query I rowsort
SELECT ALL + col1 * col0 + + 32 FROM tab0 cor0
----
2096
3427
8131

query I rowsort
SELECT + 89 AS col0 FROM tab2 AS cor0
----
89
89
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col0 + ( - 67 ) col1 FROM tab0 AS cor0
----
-32
-43
22

query I rowsort
SELECT ALL 47 FROM tab2, tab2 cor0, tab0 AS cor1
----
27 values hashing to 3f991632e9c7c5142e1d80857cd10a2d

query I rowsort
SELECT ALL - col1 + - col0 * - col2 AS col1 FROM tab0 AS cor0
----
-62
706
7207

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 cor0, tab2, tab2 AS cor1
----
972 values hashing to 64ce0e736818e884f0a9ecd075da5eb7

query I rowsort
SELECT col0 * 80 + + cor0.col1 + + col1 FROM tab1 AS cor0
----
292
5140
6426

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + col1 ) * + col0 + + col1 col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT ALL cor0.col2 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT DISTINCT - col0 + col0 * - col2 FROM tab1 cor0
----
-165
-3712
-7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-5789
SELECT ALL - col1 DIV + cor0.col1 + + col0 * - ( 54 ) - - col0 DIV col1 FROM tab1 AS cor0
----
-163
-3451
-4315

skipif mysql # not compatible
query I rowsort label-5789
SELECT ALL - col1 / + cor0.col1 + + col0 * - ( 54 ) - - col0 / col1 FROM tab1 AS cor0
----
-163
-3451
-4315

onlyif mysql # use DIV operator for integer division
query I rowsort label-5790
SELECT DISTINCT + cor0.col0 DIV - col2 FROM tab1 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-5790
SELECT DISTINCT + cor0.col0 / - col2 FROM tab1 AS cor0
----
-1
0

query I rowsort
SELECT + col0 * + col2 AS col1 FROM tab1
----
162
3648
7680

query I rowsort
SELECT DISTINCT + 5 FROM tab1, tab0 AS cor0
----
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-5793
SELECT ALL + - 57 * - col2 * - col0 + col1 DIV col1 FROM tab1 AS cor0
----
-207935
-437759
-9233

skipif mysql # not compatible
query I rowsort label-5793
SELECT ALL + - 57 * - col2 * - col0 + col1 / col1 FROM tab1 AS cor0
----
-207935
-437759
-9233

query I rowsort
SELECT DISTINCT 94 - cor0.col0 FROM tab2 AS cor0
----
15
16
87

query I rowsort
SELECT - ( col2 ) + 4 FROM tab2 cor0
----
-22
-23
-34

query I rowsort
SELECT col0 - + col2 AS col1 FROM tab0
----
-9
34
7

query I rowsort
SELECT col0 - + tab0.col0 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL + - col2 + + col0 AS col0 FROM tab1 AS cor0
----
-16
-51
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( + col1 ) + + 62 col2 FROM tab0 AS cor0
----
148
153
159

query I rowsort
SELECT + ( + col0 ) + cor0.col0 * 57 * + col2 FROM tab2 AS cor0
----
10780
115674
171193

query I rowsort
SELECT - cor0.col2 + - col2 * + cor0.col0 * col2 FROM tab2 AS cor0
----
-114114
-5130
-52754

query I rowsort
SELECT ALL - + 54 AS col2 FROM tab1 AS cor0
----
-54
-54
-54

query I rowsort
SELECT DISTINCT + 91 + + col0 FROM tab2 AS cor0
----
169
170
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-5804
SELECT - - col0 DIV - col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5804
SELECT - - col0 / - col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - 61 * + col0 * col0 FROM tab2 AS cor0
----
-2989
-371124
-380701

query I rowsort
SELECT DISTINCT ( col0 ) + - col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL ( - 80 + col1 * + 84 ) FROM tab1
----
1012
2104
760

query I rowsort
SELECT ALL + 39 FROM tab2
----
39
39
39

onlyif mysql # use DIV operator for integer division
query I rowsort label-5809
SELECT - tab0.col1 DIV + col1 + col2 AS col1 FROM tab0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-5809
SELECT - tab0.col1 / + col1 + col2 AS col1 FROM tab0
----
0
32
81

query I rowsort
SELECT + 37 * + col2 - col0 * 24 FROM tab2
----
-490
-910
831

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5811
SELECT + col1 + + CAST( NULL AS DECIMAL ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5811
SELECT + col1 + + CAST ( NULL AS REAL ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - 24 + cor0.col1 AS col0 FROM tab2 cor0
----
-7
35
7

query I rowsort
SELECT ALL + 62 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5814
SELECT DISTINCT - 63 * - cor0.col0 + CAST( 63 AS SIGNED ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
1575
2268
5670

skipif mysql # not compatible
query I rowsort label-5814
SELECT DISTINCT - 63 * - cor0.col0 + CAST ( 63 AS INTEGER ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
1575
2268
5670

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 80 col1 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 26dbcc98d4b4e864ffa31be685a5dfbd

query I rowsort
SELECT ALL - col1 * - ( col2 ) FROM tab1 AS cor0
----
1248
1404
570

onlyif mysql # use DIV operator for integer division
query I rowsort label-5817
SELECT + ( col0 + col2 ) DIV - 41 AS col2 FROM tab2
----
-2
-2
0

skipif mysql # not compatible
query I rowsort label-5817
SELECT + ( col0 + col2 ) / - 41 AS col2 FROM tab2
----
-2
-2
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col0 ) * col0 col0 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT 42 + + col1 FROM tab1 cor0
----
52
55
68

query I rowsort
SELECT ALL + + ( ( col0 ) ) AS col0 FROM tab0 cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-5821
SELECT col2 DIV + col2 - col1 FROM tab1 AS cor0
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-5821
SELECT col2 / + col2 - col1 FROM tab1 AS cor0
----
-12
-25
-9

query I rowsort
SELECT ALL - 65 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 744531575c1b6461ed2916d4940e4d23

query I rowsort
SELECT - 27 * 51 FROM tab1 AS cor0
----
-1377
-1377
-1377

query I rowsort
SELECT DISTINCT + col0 * + cor0.col0 AS col2 FROM tab0 AS cor0
----
1225
576
7921

onlyif mysql # use DIV operator for integer division
query I rowsort label-5825
SELECT col1 DIV + col0 + col2 FROM tab1
----
57
62
96

skipif mysql # not compatible
query I rowsort label-5825
SELECT col1 / + col0 + col2 FROM tab1
----
57
62
96

query I rowsort
SELECT DISTINCT + 29 * + col2 * + ( - col2 + - col1 * + 19 ) AS col2 FROM tab2
----
-397822
-482328
-864838

query I rowsort
SELECT ALL col0 * col0 * - ( col0 ) AS col0 FROM tab1
----
-262144
-27
-512000

query I rowsort
SELECT - ( col1 ) + col0 AS col0 FROM tab1
----
-23
54
67

query I rowsort
SELECT DISTINCT cor0.col1 * - col2 + + col1 + col0 FROM tab1 AS cor0
----
-1155
-1375
-496

query I rowsort
SELECT - cor0.col0 * - col2 AS col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL + cor0.col1 * col2 + col1 * - col1 FROM tab2 AS cor0
----
-124
-1947
357

query I rowsort
SELECT ALL + 67 FROM tab0 cor0
----
67
67
67

query I rowsort
SELECT - + col0 * 67 FROM tab0 AS cor0
----
-1608
-2345
-5963

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col0 * - cor0.col1 col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-5835
SELECT ALL col1 DIV - ( 14 ) FROM tab2 AS cor0
----
-1
-2
-4

skipif mysql # not compatible
query I rowsort label-5835
SELECT ALL col1 / - ( 14 ) FROM tab2 AS cor0
----
-1
-2
-4

query I rowsort
SELECT col0 * 12 * + col1 AS col1 FROM tab1 AS cor0
----
12480
7680
936

query I rowsort
SELECT - col2 + cor0.col2 AS col2 FROM tab2 cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5838
SELECT + + col0 + + col1 DIV 46 FROM tab0 AS cor0
----
25
37
90

skipif mysql # not compatible
query I rowsort label-5838
SELECT + + col0 + + col1 / 46 FROM tab0 AS cor0
----
25
37
90

query I rowsort
SELECT col1 * ( col2 + - col0 ) * + col0 FROM tab0 AS cor0
----
-115430
-56693
18576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 7 col0 FROM tab2, tab1, tab0 AS cor0
----
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-5841
SELECT col0 + col1 DIV ( col1 * - ( col1 ) ) FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-5841
SELECT col0 + col1 / ( col1 * - ( col1 ) ) FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT - col1 * 95 + ( + tab0.col1 + 97 ) * - tab0.col1 AS col1 FROM tab0
----
-23908
-25753
-28033

onlyif mysql # use DIV operator for integer division
query I rowsort label-5843
SELECT DISTINCT - col1 * col1 DIV 95 AS col2 FROM tab0
----
-77
-87
-99

skipif mysql # not compatible
query I rowsort label-5843
SELECT DISTINCT - col1 * col1 / 95 AS col2 FROM tab0
----
-77
-87
-99

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5844
SELECT + col0 + CAST( - 78 AS SIGNED ) * - col2 FROM tab0 AS cor0
----
113
2598
6485

skipif mysql # not compatible
query I rowsort label-5844
SELECT + col0 + CAST ( - 78 AS INTEGER ) * - col2 FROM tab0 AS cor0
----
113
2598
6485

query I rowsort
SELECT + col0 * + 34 + - cor0.col0 * col0 FROM tab0 AS cor0
----
-35
-4895
240

query I rowsort
SELECT + cor0.col0 + col1 AS col2 FROM tab1 cor0
----
29
74
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5847
SELECT CAST( NULL AS SIGNED ) * ( col0 ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5847
SELECT CAST ( NULL AS INTEGER ) * ( col0 ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + 87 FROM tab0 AS cor0
----
87

query I rowsort
SELECT ALL - col0 * col0 * - col0 + col1 FROM tab1 AS cor0
----
262154
512013
53

query I rowsort
SELECT - + ( - ( - col2 ) ) FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT + col2 * - col0 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT - - 58 * - col0 AS col0 FROM tab1 AS cor0
----
-174
-3712
-4640

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5853
SELECT + col0 * - cor0.col0 * - CAST( - 71 * col0 AS SIGNED ) + - 42 * col0 AS col2 FROM tab1 AS cor0
----
-18614912
-2043
-36355360

skipif mysql # not compatible
query I rowsort label-5853
SELECT + col0 * - cor0.col0 * - CAST ( - 71 * col0 AS INTEGER ) + - 42 * col0 AS col2 FROM tab1 AS cor0
----
-18614912
-2043
-36355360

query I rowsort
SELECT - 17 + col1 FROM tab2 AS cor0
----
0
14
42

query I rowsort
SELECT + 14 FROM tab0
----
14
14
14

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * + col0 + col2 * 91 col2 FROM tab2
----
2268
338
456

query I rowsort
SELECT - 71 * + col2 AS col0 FROM tab2 AS cor0
----
-1846
-1917
-2698

query I rowsort
SELECT - col0 * + col1 + col1 * + ( - ( + col1 ) ) FROM tab0 AS cor0
----
-12804
-16380
-9460

query I rowsort
SELECT DISTINCT - col2 * col0 - + cor0.col2 AS col0 FROM tab0 AS cor0
----
-36
-7380
-825

query I rowsort
SELECT ALL - col2 * col1 * + cor0.col0 + - 75 * 10 FROM tab0 AS cor0
----
-4145
-664868
-68862

query I rowsort
SELECT + - 68 AS col1 FROM tab1 AS cor0
----
-68
-68
-68

query I rowsort
SELECT ALL - 72 AS col0 FROM tab1 AS cor0
----
-72
-72
-72

onlyif mysql # use DIV operator for integer division
query I rowsort label-5863
SELECT + cor0.col1 DIV col2 - - col2 FROM tab0 AS cor0
----
35
83
98

skipif mysql # not compatible
query I rowsort label-5863
SELECT + cor0.col1 / col2 - - col2 FROM tab0 AS cor0
----
35
83
98

query I rowsort
SELECT + 68 - col1 FROM tab1 AS cor0
----
42
55
58

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5865
SELECT CAST( NULL AS DECIMAL ) * col1 + + col2 * cor0.col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5865
SELECT CAST ( NULL AS REAL ) * col1 + + col2 * cor0.col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ( 27 ) + + col0 FROM tab1 AS cor0
----
107
30
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-5867
SELECT - col1 DIV CAST( - col1 AS SIGNED ) FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5867
SELECT - col1 / CAST ( - col1 AS INTEGER ) FROM tab1
----
1
1
1

query I rowsort
SELECT DISTINCT - col2 * tab0.col1 AS col2 FROM tab0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5869
SELECT DISTINCT col0 DIV - col0 AS col1 FROM tab1
----
-1

skipif mysql # not compatible
query I rowsort label-5869
SELECT DISTINCT col0 / - col0 AS col1 FROM tab1
----
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5870
SELECT ALL CAST( col0 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-5870
SELECT ALL CAST ( col0 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT ( - col2 ) + col0 - - 15 AS col2 FROM tab0 AS cor0
----
22
49
6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5872
SELECT DISTINCT - CAST( NULL AS SIGNED ) * - 1 + cor0.col0 * col2 * cor0.col0 AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5872
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * - 1 + cor0.col0 * col2 * cor0.col0 AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - 91 + 1 AS col1 FROM tab2 AS cor0
----
-90

query I rowsort
SELECT - ( col0 ) + + col2 FROM tab0 AS cor0
----
-34
-7
9

query I rowsort
SELECT - col2 * - cor0.col1 - + col1 * + 96 AS col2 FROM tab0 AS cor0
----
-1274
-5418
-9215

query I rowsort
SELECT - 98 + + col1 AS col0 FROM tab1 AS cor0
----
-72
-85
-88

query I rowsort
SELECT ALL - ( + col1 ) AS col2 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ALL - col2 * 43 FROM tab0 AS cor0
----
-1419
-3526
-43

query I rowsort
SELECT DISTINCT + + 46 + - col1 AS col0 FROM tab0 AS cor0
----
-40
-45
-51

query I rowsort
SELECT - col0 + + col2 * + cor0.col2 AS col2 FROM tab2 AS cor0
----
1365
598
722

skipif mysql # not compatible
query I rowsort
SELECT col0 * - col0 + + CAST ( - 4 + + col2 AS REAL ) FROM tab0 AS cor0
----
-1228
-547
-7843

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 cor0 CROSS JOIN tab1, tab2 AS cor1
----
972 values hashing to 49c8bf3e931a898ba7af63d0e377eb79

onlyif mysql # use DIV operator for integer division
query I rowsort label-5883
SELECT DISTINCT + col0 DIV - tab1.col2 + col1 + 76 FROM tab1
----
102
85
89

skipif mysql # not compatible
query I rowsort label-5883
SELECT DISTINCT + col0 / - tab1.col2 + col1 + 76 FROM tab1
----
102
85
89

query I rowsort
SELECT - ( + col0 ) + cor0.col1 * - col2 * ( col2 ) AS col1 FROM tab2 AS cor0
----
-22606
-24627
-39962

query I rowsort
SELECT + col0 * - col1 + cor0.col1 * col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 39 * col1 - + col0 * col1 AS col1 FROM tab0
----
-4550
1290
388

query I rowsort
SELECT col1 * + ( - col0 ) AS col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT + cor0.col2 * - ( - 9 ) FROM tab0 AS cor0
----
297
738
9

query I rowsort
SELECT ALL col2 - 35 FROM tab0 AS cor0
----
-2
-34
47

query I rowsort
SELECT ALL - col2 - + 85 * col2 * + col2 FROM tab2 AS cor0
----
-122778
-57486
-61992

query I rowsort
SELECT ALL - cor0.col0 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query I rowsort
SELECT 4 AS col2 FROM tab2
----
4
4
4

query I rowsort
SELECT col1 * - col0 * + tab1.col2 + + tab1.col0 FROM tab1
----
-36416
-4209
-99760

query I rowsort
SELECT ALL 32 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to d30a2acbf33c88274474306936d3227b

query I rowsort
SELECT + col1 * - 78 * - col1 FROM tab0 AS cor0
----
576888
645918
733902

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + - 49 * + col2 col0 FROM tab0 AS cor0
----
-1584
-3936
-48

query I rowsort
SELECT - - col0 * + ( + 43 ) AS col0 FROM tab2 AS cor0
----
301
3354
3397

query I rowsort
SELECT ALL + col2 + col0 AS col0 FROM tab1 cor0
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 + + col0 col2 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-5900
SELECT + 1 DIV + cor0.col0 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif mysql # not compatible
query I rowsort label-5900
SELECT + 1 / + cor0.col0 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor1.col1 col0 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT 13 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 184e52d7aa5aa66591291e39c67a3dfb

query I rowsort
SELECT ALL - - ( 89 ) AS col0 FROM tab0 AS cor0
----
89
89
89

query I rowsort
SELECT - 79 - cor0.col1 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 1d321c3071de003c4f621154ccca5d46

query I rowsort
SELECT + - col2 * - col2 AS col1 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT ALL - col1 + 41 AS col1 FROM tab0
----
-45
-50
-56

query I rowsort
SELECT col2 * 63 + - col1 * - col2 FROM tab2
----
2538
3040
3172

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5908
SELECT ALL + CAST( + col2 AS SIGNED ) * - col1 AS col1 FROM tab0
----
-2838
-7462
-97

skipif mysql # not compatible
query I rowsort label-5908
SELECT ALL + CAST ( + col2 AS INTEGER ) * - col1 AS col1 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT - col1 * - col2 + col2 FROM tab0
----
2871
7544
98

query I rowsort
SELECT ALL col2 + + cor0.col1 + + col1 AS col2 FROM tab0 AS cor0
----
195
205
264

query I rowsort
SELECT + - 35 AS col1 FROM tab2 cor0
----
-35
-35
-35

query I rowsort
SELECT ALL - + 92 + + cor0.col2 FROM tab0 AS cor0
----
-10
-59
-91

onlyif mysql # use DIV operator for integer division
query I rowsort label-5913
SELECT + 5 DIV cor0.col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5913
SELECT + 5 / cor0.col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + + col0 * col2 * col0 AS col1 FROM tab2 AS cor0
----
1323
158184
237158

query I rowsort
SELECT DISTINCT - cor0.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-5916
SELECT + - CAST( NULL AS SIGNED ) / 11 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5916
SELECT + - CAST ( NULL AS INTEGER ) / 11 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col1 * cor0.col2 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT 90 * + 58 FROM tab0 AS cor0
----
5220

query I rowsort
SELECT 17 * - 83 FROM tab2 AS cor0
----
-1411
-1411
-1411

onlyif mysql # use DIV operator for integer division
query I rowsort label-5920
SELECT + - col2 DIV + 91 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-5920
SELECT + - col2 / + 91 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT + - 55 + col2 AS col2 FROM tab2 AS cor0
----
-17
-28
-29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 44 + + col2 col2 FROM tab0
----
126
45
77

query I rowsort
SELECT - 19 * - col2 + col2 AS col1 FROM tab1
----
1080
1140
1920

query I rowsort
SELECT col0 + + col2 + ( + tab2.col2 ) FROM tab2
----
130
155
61

query I rowsort
SELECT - 92 AS col2 FROM tab1 AS cor0
----
-92
-92
-92

onlyif mysql # use DIV operator for integer division
query I rowsort label-5926
SELECT DISTINCT col1 + col1 + col0 DIV col1 AS col0 FROM tab0
----
172
182
194

skipif mysql # not compatible
query I rowsort label-5926
SELECT DISTINCT col1 + col1 + col0 / col1 AS col0 FROM tab0
----
172
182
194

query I rowsort
SELECT DISTINCT col1 + + col0 AS col0 FROM tab2
----
137
38
96

query I rowsort
SELECT DISTINCT + tab0.col0 * col1 + 38 AS col1 FROM tab0
----
2102
3433
8137

query I rowsort
SELECT DISTINCT - + col1 + + cor0.col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL + 23 + cor0.col1 * + cor0.col0 FROM tab1, tab0 AS cor0
----
9 values hashing to b9c40b6612976b33b4cb4aa09dc1fe12

query I rowsort
SELECT ALL + - 85 * col2 + - 57 AS col2 FROM tab0 cor0
----
-142
-2862
-7027

query I rowsort
SELECT ALL - 38 AS col0 FROM tab0, tab1 cor0, tab1 cor1
----
27 values hashing to e8c064543bf0f2e57329db1bb0a411e3

query I rowsort
SELECT ALL - col0 + - col1 * - cor0.col0 FROM tab2 AS cor0
----
1264
210
4524

onlyif mysql # use DIV operator for integer division
query I rowsort label-5934
SELECT ALL + col0 DIV + col1 AS col0 FROM tab1 AS cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-5934
SELECT ALL + col0 / + col1 AS col0 FROM tab1 AS cor0
----
0
6
6

query I rowsort
SELECT + ( - col1 ) FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL col1 + col0 * 2 FROM tab2 AS cor0
----
175
215
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col1 col1 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT col2 * 41 + col0 AS col1 FROM tab2 AS cor0
----
1114
1144
1637

query I rowsort
SELECT - cor0.col0 + + cor0.col2 FROM tab1 AS cor0
----
-7
16
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-5940
SELECT ALL + col2 DIV 70 AS col0 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5940
SELECT ALL + col2 / 70 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - col1 * + 39 AS col1 FROM tab2 AS cor0
----
-1209
-2301
-663

query I rowsort
SELECT + + col0 + cor0.col1 * + cor0.col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT - - col2 * + ( cor0.col0 ) AS col1 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL + col2 * col0 + + col1 FROM tab0
----
132
7389
878

query I rowsort
SELECT ALL - col2 * col0 + col0 * col2 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT 79 * col2 + col0 FROM tab2
----
2132
2140
3081

query I rowsort
SELECT col2 * + col2 - col2 AS col0 FROM tab2
----
1406
650
702

onlyif mysql # use DIV operator for integer division
query I rowsort label-5948
SELECT - ( - col0 ) DIV col0 + + tab0.col0 * col1 AS col1 FROM tab0
----
2065
3396
8100

skipif mysql # not compatible
query I rowsort label-5948
SELECT - ( - col0 ) / col0 + + tab0.col0 * col1 AS col1 FROM tab0
----
2065
3396
8100

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5949
SELECT DISTINCT + col2 + + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5949
SELECT DISTINCT + col2 + + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + ( + tab1.col2 ) + ( - 71 ) FROM tab1
----
-14
-17
25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 3 * col1 col1 FROM tab1 AS cor0
----
30
39
78

query I rowsort
SELECT 21 * + cor0.col0 FROM tab0 AS cor0
----
1869
504
735

query I rowsort
SELECT tab2.col0 * col1 + + col1 FROM tab2
----
1360
248
4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-5954
SELECT DISTINCT col2 DIV - ( + col1 ) col1 FROM tab2
----
-2
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5954
SELECT DISTINCT col2 / - ( + col1 ) col1 FROM tab2
----
-2
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5955
SELECT col0 * CAST( NULL AS DECIMAL ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5955
SELECT col0 * CAST ( NULL AS REAL ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 + ( tab2.col2 ) + + col0 FROM tab2
----
134
163
65

query I rowsort
SELECT ALL ( - 68 ) + + tab2.col0 AS col2 FROM tab2, tab1 cor0
----
9 values hashing to 7b0b6d99397753168e63bbac8313c729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5958
SELECT ALL CAST( NULL AS SIGNED ) col1 FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5958
SELECT ALL CAST ( NULL AS INTEGER ) col1 FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL + - 30 AS col1 FROM tab0 AS cor0
----
-30
-30
-30

query I rowsort
SELECT DISTINCT - 57 + - cor0.col0 * cor0.col2 FROM tab0 cor0
----
-7355
-849
-92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5961
SELECT ALL ( + col2 ) * cor0.col0 * + ( + col1 + col1 * - CAST( col2 AS SIGNED ) ) FROM tab0 AS cor0
----
-2179584
-53793558
0

skipif mysql # not compatible
query I rowsort label-5961
SELECT ALL ( + col2 ) * cor0.col0 * + ( + col1 + col1 * - CAST ( col2 AS INTEGER ) ) FROM tab0 AS cor0
----
-2179584
-53793558
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5962
SELECT 92 DIV + col1 + - col1 FROM tab2
----
-12
-29
-58

skipif mysql # not compatible
query I rowsort label-5962
SELECT 92 / + col1 + - col1 FROM tab2
----
-12
-29
-58

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT CAST ( col2 AS REAL ) col2 FROM tab1
----
54
57
96

query I rowsort
SELECT + 38 FROM tab0, tab0 AS cor0
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

onlyif mysql # use DIV operator for integer division
query I rowsort label-5965
SELECT cor0.col1 DIV + col1 AS col2 FROM tab2 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5965
SELECT cor0.col1 / + col1 AS col2 FROM tab2 cor0
----
1
1
1

query I rowsort
SELECT ALL - + 87 * - col2 * col1 FROM tab0 AS cor0
----
246906
649194
8439

query I rowsort
SELECT + col2 + col1 + col2 * + 78 * + 27 FROM tab0 AS cor0
----
172865
2204
69617

query I rowsort
SELECT ( + 23 ) FROM tab0 AS cor0
----
23
23
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-5969
SELECT ALL - - ( cor0.col0 ) DIV + col0 FROM tab2 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5969
SELECT ALL - - ( cor0.col0 ) / + col0 FROM tab2 AS cor0
----
1
1
1

query I rowsort
SELECT - - col2 * - col2 + col2 AS col1 FROM tab0 AS cor0
----
-1056
-6642
0

query I rowsort
SELECT DISTINCT - ( - ( col1 ) ) FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT + + 33 * 80 AS col2 FROM tab2 AS cor0
----
2640

onlyif mysql # use DIV operator for integer division
query I rowsort label-5973
SELECT - + col0 DIV + col1 FROM tab2 cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-5973
SELECT - + col0 / + col1 FROM tab2 cor0
----
-1
-4
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5974
SELECT ALL - + CAST( NULL AS DECIMAL ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5974
SELECT ALL - + CAST ( NULL AS REAL ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - 43 + - cor0.col0 FROM tab1 AS cor0
----
-107
-123
-46

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5976
SELECT ALL - CAST( + col1 AS SIGNED ) + + col2 * - col1 AS col0 FROM tab2 AS cor0
----
-1593
-663
-868

skipif mysql # not compatible
query I rowsort label-5976
SELECT ALL - CAST ( + col1 AS INTEGER ) + + col2 * - col1 AS col0 FROM tab2 AS cor0
----
-1593
-663
-868

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( + col1 ) * col0 * 39 col2 FROM tab2 AS cor0
----
-179478
-52377
-8463

onlyif mysql # use DIV operator for integer division
query I rowsort label-5978
SELECT ALL 80 DIV - ( - col1 ) FROM tab2
----
1
2
4

skipif mysql # not compatible
query I rowsort label-5978
SELECT ALL 80 / - ( - col1 ) FROM tab2
----
1
2
4

query I rowsort
SELECT - 57 * + 81 AS col2 FROM tab2
----
-4617
-4617
-4617

query I rowsort
SELECT - - cor0.col0 * col2 AS col2 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT - cor0.col2 + - cor0.col0 FROM tab1 AS cor0
----
-121
-176
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * - cor0.col2 col1 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT - col1 * + col1 AS col2 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT ALL + cor0.col1 AS col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT ( 10 ) AS col2 FROM tab2
----
10
10
10

query I rowsort
SELECT + col0 * cor0.col2 + - 32 AS col2 FROM tab1 AS cor0
----
130
3616
7648

onlyif mysql # use DIV operator for integer division
query I rowsort label-5987
SELECT 11 DIV col0 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5987
SELECT 11 / col0 AS col0 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5988
SELECT ( cor0.col2 ) + CAST( - col1 + col1 AS SIGNED ) FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-5988
SELECT ( cor0.col2 ) + CAST ( - col1 + col1 AS INTEGER ) FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL - + col0 * 80 + - col2 FROM tab1 AS cor0
----
-294
-5177
-6496

query I rowsort
SELECT + - col0 + + col0 * col2 AS col2 FROM tab2 AS cor0
----
182
1950
2923

onlyif mysql # use DIV operator for integer division
query I rowsort label-5991
SELECT - col1 DIV - ( col1 + - col0 ) AS col1 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5991
SELECT - col1 / - ( col1 + - col0 ) AS col1 FROM tab1
----
0
0
1

query I rowsort
SELECT col2 + 41 FROM tab1 AS cor0
----
137
95
98

query I rowsort
SELECT col1 * - 31 + col1 FROM tab1 AS cor0
----
-300
-390
-780

query I rowsort
SELECT + col2 + - col1 * cor0.col1 * col1 FROM tab2 AS cor0
----
-205353
-29764
-4875

onlyif mysql # use DIV operator for integer division
query I rowsort label-5995
SELECT - ( + ( col0 ) ) + col2 DIV col0 AS col1 FROM tab1 AS cor0
----
-64
-79
15

skipif mysql # not compatible
query I rowsort label-5995
SELECT - ( + ( col0 ) ) + col2 / col0 AS col1 FROM tab1 AS cor0
----
-64
-79
15

onlyif mysql # use DIV operator for integer division
query I rowsort label-5996
SELECT col2 DIV 97 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5996
SELECT col2 / 97 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT - tab0.col2 + 33 AS col1 FROM tab0
----
-49
0
32

query I rowsort
SELECT col1 * + col0 * col0 FROM tab2
----
106097
1519
358956

query I rowsort
SELECT DISTINCT cor0.col1 + 7 FROM tab2 AS cor0 CROSS JOIN tab2, tab0 AS cor1
----
24
38
66

query I rowsort
SELECT ALL - col2 * - 54 * tab2.col0 AS col2 FROM tab2
----
10206
109512
162108

onlyif mysql # use DIV operator for integer division
query I rowsort label-6001
SELECT col0 DIV col2 + + col0 col2 FROM tab1
----
3
65
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6001
SELECT col0 / col2 + + col0 col2 FROM tab1
----
3
65
80

query I rowsort
SELECT DISTINCT - col0 + ( - 21 + - cor0.col1 ) AS col1 FROM tab0 AS cor0
----
-131
-153
-201

query I rowsort
SELECT 67 AS col2 FROM tab1, tab1 AS cor0
----
9 values hashing to b56f8a4f1fcebc9802481256df61e97c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6004
SELECT + cor0.col2 * + CAST( - 68 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-2244
-5576
-68

skipif mysql # not compatible
query I rowsort label-6004
SELECT + cor0.col2 * + CAST ( - 68 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-2244
-5576
-68

query I rowsort
SELECT DISTINCT + - col1 * cor0.col1 * + col0 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT ALL - + col0 + ( col2 + + col2 ) FROM tab0 AS cor0
----
-33
42
75

query I rowsort
SELECT DISTINCT + cor0.col1 * + 99 + + col1 * - cor0.col2 AS col2 FROM tab0 AS cor0
----
1547
5676
9506

query I rowsort
SELECT - col0 * col1 + col1 FROM tab0 AS cor0
----
-1978
-3298
-8008

query I rowsort
SELECT + + 78 + + col0 * - col0 FROM tab1 AS cor0
----
-4018
-6322
69

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6010
SELECT DISTINCT - CAST( NULL AS SIGNED ) * + col1 AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6010
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * + col1 AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT ALL + col0 + 41 FROM tab0 AS cor0
----
130
65
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-6012
SELECT + - col1 DIV + col1 + col2 AS col1 FROM tab2 AS cor0
----
25
26
37

skipif mysql # not compatible
query I rowsort label-6012
SELECT + - col1 / + col1 + col2 AS col1 FROM tab2 AS cor0
----
25
26
37

query I rowsort
SELECT DISTINCT cor0.col0 * col0 AS col2 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT ALL col0 * 53 FROM tab2 AS cor0
----
371
4134
4187

query I rowsort
SELECT + - 79 + + col2 AS col0 FROM tab0 cor0
----
-46
-78
3

query I rowsort
SELECT DISTINCT ( - col0 ) + cor0.col0 * - 3 * 44 AS col1 FROM tab2 AS cor0
----
-10374
-10507
-931

query I rowsort
SELECT DISTINCT - ( 44 ) * - col0 FROM tab0 AS cor0
----
1056
1540
3916

query I rowsort
SELECT + - 78 * 36 FROM tab0 AS cor0
----
-2808
-2808
-2808

query I rowsort
SELECT DISTINCT + + col2 + ( - col0 ) AS col1 FROM tab2 AS cor0
----
-41
-52
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-6020
SELECT col2 + cor0.col0 DIV - col2 FROM tab0 AS cor0
----
-34
33
81

skipif mysql # not compatible
query I rowsort label-6020
SELECT col2 + cor0.col0 / - col2 FROM tab0 AS cor0
----
-34
33
81

query I rowsort
SELECT ( + col1 ) + 24 AS col1 FROM tab1 AS cor0
----
34
37
50

query I rowsort
SELECT DISTINCT + 88 + + col1 * 11 FROM tab2 cor0
----
275
429
737

query I rowsort
SELECT ALL - - 86 AS col1 FROM tab2 AS cor0
----
86
86
86

query I rowsort
SELECT - col0 * - cor0.col0 * 45 + col2 FROM tab1 cor0
----
184377
288096
459

query I rowsort
SELECT DISTINCT + - col2 + col0 * - col1 AS col0 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT ALL 37 - - cor0.col0 * - 4 AS col2 FROM tab0 AS cor0
----
-103
-319
-59

query I rowsort
SELECT 22 * col1 AS col2 FROM tab2 AS cor0
----
1298
374
682

query I rowsort
SELECT DISTINCT + col1 + col0 AS col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL - 40 * col1 + col2 * 45 FROM tab0 AS cor0
----
-1955
-3835
50

query I rowsort
SELECT DISTINCT col1 * col1 + 3 FROM tab2 AS cor0
----
292
3484
964

query I rowsort
SELECT 42 + cor0.col0 FROM tab1 cor0
----
106
122
45

query I rowsort
SELECT ALL + col1 + + col2 + - col1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - 1 + col1 AS col1 FROM tab2 AS cor0
----
16
30
58

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6034
SELECT DISTINCT + cor0.col1 - - col1 * CAST( NULL AS SIGNED ) col2 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6034
SELECT DISTINCT + cor0.col1 - - col1 * CAST ( NULL AS INTEGER ) col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT 35 * col1 + ( 67 ) * col2 FROM tab2 AS cor0
----
2894
3141
3807

query I rowsort
SELECT ALL + - col0 * col0 AS col0 FROM tab2 AS cor0
----
-49
-6084
-6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-6037
SELECT ALL - col0 + col0 + col2 DIV - col1 col0 FROM tab2 cor0
----
-2
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6037
SELECT ALL - col0 + col0 + col2 / - col1 col0 FROM tab2 cor0
----
-2
0
0

query I rowsort
SELECT ALL - col2 * + ( col0 ) + col2 FROM tab0 AS cor0
----
-34
-7216
-759

query I rowsort
SELECT DISTINCT - 67 AS col0 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
-67

query I rowsort
SELECT + col0 * - 87 AS col1 FROM tab2 cor0
----
-609
-6786
-6873

query I rowsort
SELECT ALL + + cor0.col2 * + 33 AS col0 FROM tab1 AS cor0
----
1782
1881
3168

onlyif mysql # use DIV operator for integer division
query I rowsort label-6042
SELECT DISTINCT + cor0.col2 * 21 + + 60 DIV col2 FROM tab1 AS cor0
----
1135
1198
2016

skipif mysql # not compatible
query I rowsort label-6042
SELECT DISTINCT + cor0.col2 * 21 + + 60 / col2 FROM tab1 AS cor0
----
1135
1198
2016

query I rowsort
SELECT ALL col1 + ( col0 * + col0 ) AS col0 FROM tab2 cor0
----
6143
6258
80

query I rowsort
SELECT ALL - + col1 + + 16 FROM tab2 AS cor0
----
-1
-15
-43

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6045
SELECT ALL + col2 * + CAST( 43 AS SIGNED ) FROM tab1 AS cor0
----
2322
2451
4128

skipif mysql # not compatible
query I rowsort label-6045
SELECT ALL + col2 * + CAST ( 43 AS INTEGER ) FROM tab1 AS cor0
----
2322
2451
4128

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6046
SELECT DISTINCT - cor0.col2 + CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6046
SELECT DISTINCT - cor0.col2 + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT col0 + ( 6 * col0 ) FROM tab1 cor0
----
21
448
560

query I rowsort
SELECT - - col0 * ( + col0 ) + + col2 AS col2 FROM tab2 cor0
----
6110
6279
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col1 col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT ALL + - cor0.col1 + - 98 FROM tab2 AS cor0
----
-115
-129
-157

query I rowsort
SELECT - col2 + col0 * cor0.col2 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT DISTINCT - - col1 + 26 * + 17 AS col2 FROM tab2 AS cor0
----
459
473
501

onlyif mysql # use DIV operator for integer division
query I rowsort label-6053
SELECT ALL - col0 DIV col2 + - tab1.col1 AS col2 FROM tab1
----
-11
-13
-26

skipif mysql # not compatible
query I rowsort label-6053
SELECT ALL - col0 / col2 + - tab1.col1 AS col2 FROM tab1
----
-11
-13
-26

query I rowsort
SELECT DISTINCT col0 + col2 * col1 AS col2 FROM tab2
----
1612
725
844

onlyif mysql # use DIV operator for integer division
query I rowsort label-6055
SELECT ALL - 38 + + col1 DIV col2 FROM tab1
----
-38
-38
-38

skipif mysql # not compatible
query I rowsort label-6055
SELECT ALL - 38 + + col1 / col2 FROM tab1
----
-38
-38
-38

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 cor0, tab0 AS cor1, tab1, tab0 AS cor2
----
3645 values hashing to 9046c86f4ecdb3416770671e3173d46c

query I rowsort
SELECT DISTINCT - + 73 * + cor0.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
-2409
-5986
-73

onlyif mysql # use DIV operator for integer division
query I rowsort label-6058
SELECT DISTINCT cor0.col1 + - ( 80 ) DIV col1 - + ( cor0.col1 * cor0.col1 ) AS col2 FROM tab0 AS cor0
----
-7310
-8190
-9312

skipif mysql # not compatible
query I rowsort label-6058
SELECT DISTINCT cor0.col1 + - ( 80 ) / col1 - + ( cor0.col1 * cor0.col1 ) AS col2 FROM tab0 AS cor0
----
-7310
-8190
-9312

query I rowsort
SELECT 81 + + tab1.col0 FROM tab1, tab1 AS cor0
----
9 values hashing to eb3eedc88e79149d67c3f64bba8542d4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6060
SELECT DISTINCT cor0.col1 + + CAST( NULL AS SIGNED ) / 8 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6060
SELECT DISTINCT cor0.col1 + + CAST ( NULL AS INTEGER ) / 8 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT ALL - cor0.col1 - col1 AS col1 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT DISTINCT - cor1.col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
-26
-27
-38

query I rowsort
SELECT + cor0.col1 * col1 + + col0 AS col2 FROM tab1 AS cor0
----
164
249
679

query I rowsort
SELECT - col1 * + 81 FROM tab0
----
-6966
-7371
-7857

query I rowsort
SELECT ALL + + 59 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to e29fef8cdec1ee45a71d213f16d2f1d3

query I rowsort
SELECT 25 * + tab2.col1 * col1 FROM tab2
----
24025
7225
87025

query I rowsort
SELECT DISTINCT ( tab0.col1 + + col0 ) FROM tab0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col0 - - col1 col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT 58 + - col0 AS col0 FROM tab0
----
-31
23
34

query I rowsort
SELECT DISTINCT - col0 + + tab0.col2 AS col2 FROM tab0
----
-34
-7
9

query I rowsort
SELECT tab1.col2 * - tab1.col0 AS col1 FROM tab1
----
-162
-3648
-7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6072
SELECT DISTINCT - col0 + col0 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6072
SELECT DISTINCT - col0 + col0 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT - + col2 + col2 + col1 * 42 AS col2 FROM tab2 AS cor0
----
1302
2478
714

query I rowsort
SELECT DISTINCT col0 + col2 AS col1 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT + - cor0.col1 AS col0 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT + + 4 + col2 AS col0 FROM tab0 AS cor0
----
37
5
86

query I rowsort
SELECT ALL + 50 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 314aace40e704c20a6be06204a329f80

query I rowsort
SELECT ALL + 56 * + col0 FROM tab2 AS cor0
----
392
4368
4424

query I rowsort
SELECT DISTINCT + + col0 * - col2 + col0 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT - 25 AS col2 FROM tab2
----
-25
-25
-25

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 52 col2 FROM tab1 AS cor0
----
52
52
52

query I rowsort
SELECT DISTINCT 45 * - col2 + + col1 * ( cor0.col0 ) AS col1 FROM tab2 AS cor0
----
-367
-998
3432

onlyif mysql # use DIV operator for integer division
query I rowsort label-6083
SELECT - col1 + ( col0 ) DIV ( col1 ) FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-6083
SELECT - col1 + ( col0 ) / ( col1 ) FROM tab0 AS cor0
----
-86
-91
-97

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 cor0 CROSS JOIN tab1, tab0 AS cor1
----
972 values hashing to 909b7ebab62aff8f69dc42ccbb5c2eae

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6085
SELECT + + CAST( + col1 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-6085
SELECT + + CAST ( + col1 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT - 34 * + col0 FROM tab2 AS cor0
----
-238
-2652
-2686

query I rowsort
SELECT ALL - + col0 + + col2 * col2 FROM tab2 AS cor0
----
1365
598
722

query I rowsort
SELECT - - ( + cor0.col0 ) + cor0.col0 * - col0 AS col2 FROM tab2 AS cor0
----
-42
-6006
-6162

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6089
SELECT + - CAST( - 80 AS SIGNED ) AS col2 FROM tab0 cor0
----
80
80
80

skipif mysql # not compatible
query I rowsort label-6089
SELECT + - CAST ( - 80 AS INTEGER ) AS col2 FROM tab0 cor0
----
80
80
80

query I rowsort
SELECT + ( 8 ) FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 33069adc3c1142d31511ec88fcfa40af

query I rowsort
SELECT DISTINCT - ( + cor1.col1 ) FROM tab1, tab2 AS cor0, tab2 AS cor1
----
-17
-31
-59

query I rowsort
SELECT tab1.col1 - tab1.col1 * ( - cor1.col1 ) AS col2 FROM tab1, tab1 AS cor0, tab1 cor1
----
27 values hashing to a44f59801dbc26843e145670efa4f7ea

query I rowsort
SELECT + + col0 * - col1 AS col2 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - col0 - col2 * col2 * cor0.col1 FROM tab2 AS cor0
----
-22606
-24627
-39962

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * + col0 + col2 + - col1 * ( cor0.col0 ) col1 FROM tab2 AS cor0
----
-379
-4307
-6604

query I rowsort
SELECT - col2 * 28 AS col2 FROM tab0 AS cor0
----
-2296
-28
-924

query I rowsort
SELECT DISTINCT col1 * - col1 - - ( col0 ) * - col0 FROM tab1
----
-4196
-6569
-685

query I rowsort
SELECT ALL + tab1.col2 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT DISTINCT - col0 + + col0 AS col0 FROM tab0
----
0

query I rowsort
SELECT DISTINCT + - cor0.col2 AS col1 FROM tab2, tab0, tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT + col0 + col1 * + 96 + tab0.col0 AS col2 FROM tab0
----
8304
8914
9382

query I rowsort
SELECT DISTINCT + cor0.col2 - col0 FROM tab2 cor0
----
-41
-52
20

onlyif mysql # use DIV operator for integer division
query I rowsort label-6103
SELECT + col2 DIV - col2 AS col0 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6103
SELECT + col2 / - col2 AS col0 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT ALL 7 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 3362c0cb2b2c663037159d0699d46b76

onlyif mysql # use DIV operator for integer division
query I rowsort label-6105
SELECT - col1 * col1 DIV - col2 FROM tab0
----
100
224
9409

skipif mysql # not compatible
query I rowsort label-6105
SELECT - col1 * col1 / - col2 FROM tab0
----
100
224
9409

query I rowsort
SELECT DISTINCT + cor0.col1 * col0 + - col0 FROM tab1 AS cor0
----
576
75
960

query I rowsort
SELECT ALL + 75 * + 24 * + col2 FROM tab1 AS cor0
----
102600
172800
97200

query I rowsort
SELECT DISTINCT + - col2 * col1 + col0 FROM tab2 AS cor0
----
-1456
-567
-830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + + 98 col1 FROM tab2 AS cor0
----
105
176
177

query I rowsort
SELECT - + 2 AS col0 FROM tab1 AS cor0
----
-2
-2
-2

query I rowsort
SELECT - col2 * cor0.col1 + col1 * + ( 65 ) AS col2 FROM tab2 AS cor0
----
1178
2301
459

skipif mysql # not compatible
query I rowsort
SELECT CAST ( - col2 AS REAL ) * col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab2, tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - + ( 9 ) * + col2 + + cor0.col1 AS col0 FROM tab1 AS cor0
----
-460
-503
-851

query I rowsort
SELECT DISTINCT - cor0.col0 * - cor1.col0 FROM tab1, tab1 AS cor0, tab0 AS cor1
----
9 values hashing to 0b16310ac77048604e55565ebe234145

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( - col0 AS REAL ) + + tab2.col2 * + col0 / col0 FROM tab2
----
-41
-52
20

query I rowsort
SELECT ALL cor0.col0 + - 28 AS col2 FROM tab1, tab2, tab1 AS cor0, tab2 AS cor1
----
81 values hashing to 4989f61b1f7c861ce0824cb765602957

query I rowsort
SELECT DISTINCT + 58 AS col1 FROM tab1, tab2, tab0 AS cor0
----
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 33 col1 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 76da8bc7cae18ecf856438f872430c80

query I rowsort
SELECT ALL - + col1 * 7 FROM tab0 AS cor0
----
-602
-637
-679

query I rowsort
SELECT DISTINCT - col2 + 46 FROM tab0 AS cor0
----
-36
13
45

query I rowsort
SELECT - 61 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to c91d7b51e91f33d302e697913fb438b6

query I rowsort
SELECT ALL + 8 * tab0.col0 AS col0 FROM tab0
----
192
280
712

query I rowsort
SELECT DISTINCT - tab2.col1 * col2 AS col0 FROM tab2
----
-1534
-646
-837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6125
SELECT ALL + tab1.col0 * + CAST( NULL AS SIGNED ) + 45 FROM tab1, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-6125
SELECT ALL + tab1.col0 * + CAST ( NULL AS INTEGER ) + 45 FROM tab1, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL + tab0.col0 * - col1 FROM tab0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-6127
SELECT DISTINCT tab1.col0 DIV tab1.col1 FROM tab1
----
0
6

skipif mysql # not compatible
query I rowsort label-6127
SELECT DISTINCT tab1.col0 / tab1.col1 FROM tab1
----
0
6

query I rowsort
SELECT ALL + tab2.col1 * col1 FROM tab2
----
289
3481
961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6129
SELECT - + col2 + ( col2 ) * - cor0.col1 * CAST( - col2 AS SIGNED ) col1 FROM tab0 AS cor0
----
611802
93621
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6129
SELECT - + col2 + ( col2 ) * - cor0.col1 * CAST ( - col2 AS INTEGER ) col1 FROM tab0 AS cor0
----
611802
93621
96

query I rowsort
SELECT + cor0.col0 * 36 FROM tab0 AS cor0
----
1260
3204
864

query I rowsort
SELECT - col0 + + cor0.col1 * - 22 FROM tab1 AS cor0
----
-284
-366
-575

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6132
SELECT col2 + CAST( NULL AS SIGNED ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6132
SELECT col2 + CAST ( NULL AS INTEGER ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * col1 * + col0 AS col0 FROM tab0 AS cor0
----
-177504
-329315
-737009

query I rowsort
SELECT + col2 * - 95 AS col0 FROM tab1 AS cor0
----
-5130
-5415
-9120

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6135
SELECT ALL - CAST( NULL AS SIGNED ) + tab1.col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6135
SELECT ALL - CAST ( NULL AS INTEGER ) + tab1.col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 * ( tab1.col1 ) * - ( + 0 ) + col2 * col0 + col1 FROM tab1
----
188
3658
7693

query I rowsort
SELECT ALL - col0 * cor0.col0 + col0 * - col2 * col2 FROM tab2 AS cor0
----
-120317
-5152
-58812

onlyif mysql # use DIV operator for integer division
query I rowsort label-6138
SELECT + - col2 + col1 DIV 37 AS col1 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-6138
SELECT + - col2 + col1 / 37 AS col1 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT DISTINCT + - col0 + + col0 * + ( - col1 ) FROM tab0 AS cor0
----
-2088
-3430
-8188

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6140
SELECT + CAST( col2 AS SIGNED ) AS col2 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-6140
SELECT + CAST ( col2 AS INTEGER ) AS col2 FROM tab1
----
54
57
96

query I rowsort
SELECT col1 * 78 AS col0 FROM tab0
----
6708
7098
7566

query I rowsort
SELECT col0 * + tab2.col1 - - col0 FROM tab2
----
1422
224
4680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6143
SELECT - CAST( - col0 * - col0 AS SIGNED ) FROM tab0
----
-1225
-576
-7921

skipif mysql # not compatible
query I rowsort label-6143
SELECT - CAST ( - col0 * - col0 AS INTEGER ) FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT ALL - col1 + tab1.col2 * - col2 * col0 AS col2 FROM tab1
----
-207946
-737293
-8774

query I rowsort
SELECT DISTINCT - col0 + + col0 + col1 AS col0 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort
SELECT ALL + - col1 + col2 * - CAST ( + col1 * + cor0.col2 AS REAL ) FROM tab1 AS cor0
----
-119821
-32500
-75842

query I rowsort
SELECT + 54 AS col1 FROM tab0
----
54
54
54

query I rowsort
SELECT - col0 + + col1 * - col0 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT ALL 32 * + col1 FROM tab1 AS cor0
----
320
416
832

query I rowsort
SELECT col0 * cor0.col0 AS col1 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT + ( col0 ) * col1 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT + 86 * col0 AS col2 FROM tab1 AS cor0
----
258
5504
6880

query I rowsort
SELECT DISTINCT 71 + + col0 FROM tab1 AS cor0
----
135
151
74

query I rowsort
SELECT ALL + - col0 + col0 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - 56 * col0 AS col1 FROM tab0 AS cor0
----
-1344
-1960
-4984

onlyif mysql # use DIV operator for integer division
query I rowsort label-6156
SELECT ALL + col1 + - ( 62 ) DIV - col0 AS col0 FROM tab1
----
10
13
46

skipif mysql # not compatible
query I rowsort label-6156
SELECT ALL + col1 + - ( 62 ) / - col0 AS col0 FROM tab1
----
10
13
46

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + - 63 + + col1 * tab0.col0 col1 FROM tab0
----
2087
3429
8127

onlyif mysql # use DIV operator for integer division
query I rowsort label-6158
SELECT col0 DIV - tab1.col0 col2 FROM tab1
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6158
SELECT col0 / - tab1.col0 col2 FROM tab1
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-6159
SELECT col1 DIV - ( + col1 ) + - col2 FROM tab0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-6159
SELECT col1 / - ( + col1 ) + - col2 FROM tab0
----
-2
-34
-83

query I rowsort
SELECT - col2 * + ( col0 ) FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL + col1 + 4 FROM tab1 AS cor0
----
14
17
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col0 + - col1 col1 FROM tab1 AS cor0
----
-23
54
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * 21 - - col2 col0 FROM tab0 AS cor0
----
1804
22
726

onlyif mysql # use DIV operator for integer division
query I rowsort label-6164
SELECT - col0 + col1 DIV col2 FROM tab0 AS cor0
----
-22
-88
62

skipif mysql # not compatible
query I rowsort label-6164
SELECT - col0 + col1 / col2 FROM tab0 AS cor0
----
-22
-88
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 + cor0.col0 col1 FROM tab2 cor0
----
14
156
158

query I rowsort
SELECT + col2 + col1 * 34 FROM tab0 AS cor0
----
2957
3176
3299

query I rowsort
SELECT ALL 7 AS col0 FROM tab0 AS cor0
----
7
7
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6168
SELECT col1 + - col0 DIV cor0.col2 FROM tab0 AS cor0
----
62
86
90

skipif mysql # not compatible
query I rowsort label-6168
SELECT col1 + - col0 / cor0.col2 FROM tab0 AS cor0
----
62
86
90

query I rowsort
SELECT ALL + 93 AS col1 FROM tab2 AS cor0
----
93
93
93

query I rowsort
SELECT + ( + col1 ) + cor0.col0 * - 40 FROM tab1 AS cor0
----
-2550
-3187
-94

query I rowsort
SELECT ALL tab0.col2 * 79 FROM tab0, tab0 AS cor0
----
9 values hashing to 0351101cf0b00edc13cdaa144db558f9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col2 * 53 - - col0 col0 FROM tab0 AS cor0
----
-1725
-18
-4257

query I rowsort
SELECT DISTINCT - + col0 * + ( col1 ) FROM tab1 AS cor0
----
-1040
-640
-78

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6174
SELECT ALL - CAST( NULL AS SIGNED ) * col2 + col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6174
SELECT ALL - CAST ( NULL AS INTEGER ) * col2 + col1 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 64 + - col1 col2 FROM tab2 AS cor0
----
33
47
5

query I rowsort
SELECT ALL + - col0 + + 92 FROM tab1 AS cor0
----
12
28
89

query I rowsort
SELECT DISTINCT + col0 * col2 * col1 AS col0 FROM tab1 cor0
----
36480
4212
99840

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6178
SELECT ALL + CAST( ( col0 ) AS SIGNED ) + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6178
SELECT ALL + CAST ( ( col0 ) AS INTEGER ) + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6179
SELECT DISTINCT CAST( - col2 AS SIGNED ) * col2 + + col0 AS col2 FROM tab1 AS cor0
----
-2913
-3185
-9136

skipif mysql # not compatible
query I rowsort label-6179
SELECT DISTINCT CAST ( - col2 AS INTEGER ) * col2 + + col0 AS col2 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT ALL + col1 * + col1 - col0 AS col0 FROM tab1 AS cor0
----
36
673
89

query I rowsort
SELECT - 75 * col0 + + col1 AS col0 FROM tab0 AS cor0
----
-1714
-2528
-6584

query I rowsort
SELECT DISTINCT - - col0 + - 30 AS col1 FROM tab2 cor0
----
-23
48
49

query I rowsort
SELECT + - ( + ( col0 ) ) * col1 + col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT ALL - + col1 - col0 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT ( - cor0.col2 ) + - col0 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT ( col0 ) - col0 * 34 AS col0 FROM tab2 AS cor0
----
-231
-2574
-2607

query I rowsort
SELECT DISTINCT cor0.col0 + col2 AS col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL - cor0.col1 * - col2 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT - + ( ( - col2 ) ) * ( + cor0.col0 ) - + col2 FROM tab1 AS cor0
----
108
3591
7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-6190
SELECT + - col2 DIV cor0.col1 + + col2 AS col2 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-6190
SELECT + - col2 / cor0.col1 + + col2 AS col2 FROM tab0 AS cor0
----
1
33
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6191
SELECT ALL - - CAST( + col0 AS SIGNED ) + + col0 * col2 * col1 FROM tab0 AS cor0
----
3430
664207
68136

skipif mysql # not compatible
query I rowsort label-6191
SELECT ALL - - CAST ( + col0 AS INTEGER ) + + col0 * col2 * col1 FROM tab0 AS cor0
----
3430
664207
68136

query I rowsort
SELECT - 83 * - col0 - col1 * + 42 FROM tab2 cor0
----
-721
3996
5843

query I rowsort
SELECT DISTINCT + + ( + col1 ) + col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT - + 79 + + col0 AS col0 FROM tab2 AS cor0
----
-1
-72
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6195
SELECT ALL ( - col1 ) * - col0 * + CAST( NULL AS DECIMAL ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6195
SELECT ALL ( - col1 ) * - col0 * + CAST ( NULL AS REAL ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 + col2 * 23 + + 78 FROM tab1 AS cor0
----
1323
1453
2366

query I rowsort
SELECT ALL col1 + - col0 AS col1 FROM tab2
----
-19
-62
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + ( col2 ) * ( 7 ) + + col0 col2 FROM tab0
----
139
341
754

query I rowsort
SELECT DISTINCT - col0 * + 98 AS col2 FROM tab1 AS cor0
----
-294
-6272
-7840

query I rowsort
SELECT DISTINCT - cor0.col2 * + col0 - col1 * col1 FROM tab1 AS cor0
----
-3748
-7849
-838

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6201
SELECT + col0 + CAST( col2 AS SIGNED ) FROM tab1 AS cor0
----
121
176
57

skipif mysql # not compatible
query I rowsort label-6201
SELECT + col0 + CAST ( col2 AS INTEGER ) FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL col2 * + 48 + col1 FROM tab0 AS cor0
----
145
1670
4027

query I rowsort
SELECT ALL + + col1 * 99 AS col1 FROM tab1 cor0
----
1287
2574
990

query I rowsort
SELECT cor0.col1 + 86 AS col2 FROM tab1 AS cor0
----
112
96
99

query I rowsort
SELECT ALL + - col1 * - ( col1 ) + col0 * 46 + + 16 AS col0 FROM tab2 AS cor0
----
1299
3939
7085

query I rowsort
SELECT + 15 AS col2 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 71dda9a71fc978ea7b0ac5d8cd2ef1f0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6207
SELECT DISTINCT - 81 * col0 * + CAST( + 53 AS SIGNED ) AS col0 FROM tab1
----
-12879
-274752
-343440

skipif mysql # not compatible
query I rowsort label-6207
SELECT DISTINCT - 81 * col0 * + CAST ( + 53 AS INTEGER ) AS col0 FROM tab1
----
-12879
-274752
-343440

query I rowsort
SELECT - col0 + + ( + 24 ) FROM tab2
----
-54
-55
17

query I rowsort
SELECT ALL cor0.col1 * + 72 AS col1 FROM tab0 AS cor0
----
6192
6552
6984

query I rowsort
SELECT ALL - col0 * + col2 * col1 AS col2 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT - col2 * + ( - col1 ) + - col2 AS col1 FROM tab0 AS cor0
----
2805
7380
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6212
SELECT ALL + col1 + CAST( NULL AS SIGNED ) / col1 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6212
SELECT ALL + col1 + CAST ( NULL AS INTEGER ) / col1 AS col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * - 69 FROM tab0
----
5934
6279
6693

query I rowsort
SELECT col0 + col0 + - 55 AS col0 FROM tab0
----
-7
123
15

query I rowsort
SELECT - - col1 * cor0.col2 - 93 * col2 FROM tab1 cor0
----
-3618
-4731
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 * - col1 col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + col1 - - col2 * + cor0.col1 AS col1 FROM tab0 AS cor0
----
194
2924
7553

onlyif mysql # use DIV operator for integer division
query I rowsort label-6218
SELECT ALL - col2 DIV - col2 AS col2 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6218
SELECT ALL - col2 / - col2 AS col2 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT - cor0.col1 * - col1 + + col1 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT DISTINCT col1 * + col2 + 35 AS col0 FROM tab1 AS cor0
----
1283
1439
605

query I rowsort
SELECT ALL + 93 AS col1 FROM tab2 cor0
----
93
93
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-6222
SELECT - - col0 - - col2 * ( col2 + + cor0.col1 ) DIV 12 col2 FROM tab0 cor0
----
1271
351
43

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6222
SELECT - - col0 - - col2 * ( col2 + + cor0.col1 ) / 12 col2 FROM tab0 cor0
----
1271
351
43

query I rowsort
SELECT + - ( col1 ) + 89 * col1 FROM tab0 AS cor0
----
7568
8008
8536

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6224
SELECT + CAST( NULL AS SIGNED ) - - cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-6224
SELECT + CAST ( NULL AS INTEGER ) - - cor1.col1 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-6225
SELECT ALL col2 DIV tab1.col2 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6225
SELECT ALL col2 / tab1.col2 FROM tab1
----
1
1
1

query I rowsort
SELECT ALL - 32 * + col1 + - col1 + + tab0.col0 AS col1 FROM tab0
----
-2814
-2914
-3166

query I rowsort
SELECT + 57 AS col2 FROM tab0 AS cor0
----
57
57
57

query I rowsort
SELECT DISTINCT - cor1.col1 AS col2 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
-86
-91
-97

query I rowsort
SELECT ALL + ( - col2 ) + - col0 AS col1 FROM tab2 AS cor0
----
-104
-117
-34

onlyif mysql # use DIV operator for integer division
query I rowsort label-6230
SELECT ALL ( - col0 ) DIV col1 AS col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6230
SELECT ALL ( - col0 ) / col1 AS col1 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * col2 col1 FROM tab2 AS cor0
----
-1534
-646
-837

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0, tab2 AS cor1, tab1 cor2
----
972 values hashing to 4c0813b2179303fdf58f082d81d6d03c

query I rowsort
SELECT ALL + 58 * col1 + + col0 FROM tab1 AS cor0
----
1511
644
834

query I rowsort
SELECT ALL + 94 + 84 FROM tab0 AS cor0
----
178
178
178

query I rowsort
SELECT DISTINCT - + 67 * - col0 AS col2 FROM tab2 AS cor0
----
469
5226
5293

onlyif mysql # use DIV operator for integer division
query I rowsort label-6236
SELECT + col1 - - col2 DIV 83 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-6236
SELECT + col1 - - col2 / 83 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT + col2 + col1 + - col2 * col1 FROM tab0 AS cor0
----
-2719
-7289
1

query I rowsort
SELECT col0 + - col2 * ( - ( col1 ) ) FROM tab1 cor0
----
1328
1407
634

query I rowsort
SELECT + + col0 + col1 AS col0 FROM tab2 AS cor0
----
137
38
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6240
SELECT 69 + col1 * col2 DIV col1 AS col1 FROM tab0 cor0
----
102
151
70

skipif mysql # not compatible
query I rowsort label-6240
SELECT 69 + col1 * col2 / col1 AS col1 FROM tab0 cor0
----
102
151
70

query I rowsort
SELECT 72 + - col2 AS col1 FROM tab0 AS cor0
----
-10
39
71

query I rowsort
SELECT - ( + col2 * + col0 ) AS col2 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT 38 AS col2 FROM tab2 AS cor0
----
38

query I rowsort
SELECT - - 7 FROM tab1 cor0
----
7
7
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6245
SELECT ALL col2 DIV cor0.col2 - + cor0.col1 AS col0 FROM tab1 AS cor0
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-6245
SELECT ALL col2 / cor0.col2 - + cor0.col1 AS col0 FROM tab1 AS cor0
----
-12
-25
-9

query I rowsort
SELECT cor0.col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT DISTINCT - + col2 + cor0.col1 * - 0 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT - 52 * - col0 FROM tab2
----
364
4056
4108

query I rowsort
SELECT DISTINCT + cor0.col2 + col1 AS col1 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL - col2 * cor0.col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT + - col0 + + col2 - - col2 AS col0 FROM tab2 cor0
----
-26
-3
47

query I rowsort
SELECT ALL cor0.col2 * ( ( col1 ) ) AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + ( - 24 ) * - col0 + - col2 FROM tab2 cor0
----
141
1846
1858

skipif mysql # not compatible
query I rowsort
SELECT ALL col0 * - CAST ( 29 AS REAL ) AS col1 FROM tab1
----
-1856
-2320
-87

query I rowsort
SELECT + 91 FROM tab2 AS cor0
----
91
91
91

query I rowsort
SELECT - + col2 * + 14 + col2 FROM tab1 AS cor0
----
-1248
-702
-741

onlyif mysql # use DIV operator for integer division
query I rowsort label-6257
SELECT 34 DIV 96 + + col1 AS col2 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-6257
SELECT 34 / 96 + + col1 AS col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - 75 + cor0.col2 FROM tab0 AS cor0
----
-42
-74
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6259
SELECT ALL - col2 DIV CAST( + col0 AS SIGNED ) AS col2 FROM tab0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-6259
SELECT ALL - col2 / CAST ( + col0 AS INTEGER ) AS col2 FROM tab0
----
-1
0
0

query I rowsort
SELECT + 73 AS col0 FROM tab2, tab2 cor0
----
9 values hashing to e5fbf5d129b181bacd6113bbc8732496

query I rowsort
SELECT ALL tab1.col2 * - 7 AS col0 FROM tab1
----
-378
-399
-672

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 cor0, tab2, tab2 AS cor1
----
972 values hashing to a47a9db07c7de4927c7c28efb4cd13f2

query I rowsort
SELECT ALL cor0.col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT + col2 + - col1 * + col0 FROM tab1 AS cor0
----
-24
-583
-944

query I rowsort
SELECT - 74 + - col0 * col2 * 24 AS col1 FROM tab2 AS cor0
----
-4610
-48746
-72122

query I rowsort
SELECT + - col2 + + col2 * col0 FROM tab1 AS cor0
----
108
3591
7584

query I rowsort
SELECT DISTINCT - col0 + ( - 32 ) * - col1 AS col0 FROM tab0 AS cor0
----
2728
2823
3069

query I rowsort
SELECT DISTINCT + 97 FROM tab1, tab0 AS cor0
----
97

query I rowsort
SELECT DISTINCT + cor0.col0 * 62 FROM tab0 AS cor0
----
1488
2170
5518

onlyif mysql # use DIV operator for integer division
query I rowsort label-6270
SELECT DISTINCT col1 DIV col0 AS col2 FROM tab2 AS cor0
----
0
4

skipif mysql # not compatible
query I rowsort label-6270
SELECT DISTINCT col1 / col0 AS col2 FROM tab2 AS cor0
----
0
4

query I rowsort
SELECT DISTINCT + col1 * ( col2 ) AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL - cor0.col1 * col0 * col2 + col2 * + cor0.col0 AS col1 FROM tab0 AS cor0
----
-3360
-656820
-67320

query I rowsort
SELECT col0 + col0 * + col1 - col1 * tab2.col0 FROM tab2
----
7
78
79

query I rowsort
SELECT ALL - col1 + - 93 AS col0 FROM tab2 AS cor0
----
-110
-124
-152

query I rowsort
SELECT DISTINCT 86 AS col2 FROM tab0, tab2 cor0
----
86

query I rowsort
SELECT - 99 * - col1 AS col1 FROM tab2
----
1683
3069
5841

query I rowsort
SELECT ALL + col2 + - 57 * - 30 FROM tab2 AS cor0
----
1736
1737
1748

query I rowsort
SELECT ALL - col2 + 67 + - col2 * col2 FROM tab1
----
-2903
-3239
-9245

query I rowsort
SELECT col1 * - tab2.col1 AS col0 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT tab2.col2 * - 71 FROM tab2
----
-1846
-1917
-2698

query I rowsort
SELECT col0 * col1 * + tab0.col1 FROM tab0
----
177504
329315
737009

query I rowsort
SELECT ALL + - col0 * + col1 + col0 AS col0 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT - - 50 + - cor0.col2 * + col1 FROM tab1 AS cor0
----
-1198
-1354
-520

query I rowsort
SELECT ALL + col2 + ( tab0.col2 ) FROM tab0
----
164
2
66

query I rowsort
SELECT DISTINCT - col2 + 45 FROM tab1
----
-12
-51
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-6286
SELECT + col1 + - col1 + + 77 DIV + col2 AS col1 FROM tab0
----
0
2
77

skipif mysql # not compatible
query I rowsort label-6286
SELECT + col1 + - col1 + + 77 / + col2 AS col1 FROM tab0
----
0
2
77

onlyif mysql # use DIV operator for integer division
query I rowsort label-6287
SELECT DISTINCT col0 DIV - col1 + + col1 FROM tab2 AS cor0
----
13
31
58

skipif mysql # not compatible
query I rowsort label-6287
SELECT DISTINCT col0 / - col1 + + col1 FROM tab2 AS cor0
----
13
31
58

query I rowsort
SELECT DISTINCT tab2.col0 + + col2 FROM tab2
----
104
117
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-6289
SELECT ALL - col0 + col1 DIV col2 AS col1 FROM tab0
----
-22
-88
62

skipif mysql # not compatible
query I rowsort label-6289
SELECT ALL - col0 + col1 / col2 AS col1 FROM tab0
----
-22
-88
62

query I rowsort
SELECT + tab2.col1 + - col1 FROM tab2
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6291
SELECT cor0.col1 * CAST( NULL AS SIGNED ) FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-6291
SELECT cor0.col1 * CAST ( NULL AS INTEGER ) FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + - col1 * col1 col2 FROM tab2 AS cor0
----
-306
-3540
-992

query I rowsort
SELECT ALL + 37 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to a10b03e72860b949bdff53827700a9a8

query I rowsort
SELECT + + ( - col2 ) AS col0 FROM tab1 AS cor0
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6295
SELECT - - col1 DIV + col1 AS col1 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6295
SELECT - - col1 / + col1 AS col1 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT DISTINCT + 64 * - col0 AS col1 FROM tab2 AS cor0
----
-448
-4992
-5056

onlyif mysql # use DIV operator for integer division
query I rowsort label-6297
SELECT tab2.col0 - tab2.col0 DIV col0 FROM tab2
----
6
77
78

skipif mysql # not compatible
query I rowsort label-6297
SELECT tab2.col0 - tab2.col0 / col0 FROM tab2
----
6
77
78

query I rowsort
SELECT - col2 - - 61 FROM tab0
----
-21
28
60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6299
SELECT col2 * tab2.col2 + - col2 * CAST( NULL AS SIGNED ) * ( - col1 ) AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6299
SELECT col2 * tab2.col2 + - col2 * CAST ( NULL AS INTEGER ) * ( - col1 ) AS col0 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6300
SELECT CAST( - col2 AS SIGNED ) + - col0 AS col1 FROM tab2
----
-104
-117
-34

skipif mysql # not compatible
query I rowsort label-6300
SELECT CAST ( - col2 AS INTEGER ) + - col0 AS col1 FROM tab2
----
-104
-117
-34

query I rowsort
SELECT DISTINCT - tab0.col2 + tab0.col0 FROM tab0
----
-9
34
7

query I rowsort
SELECT DISTINCT col0 + + cor0.col1 AS col0 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6303
SELECT ALL - col0 * - cor0.col0 - CAST( - 59 AS SIGNED ) * + col0 FROM tab1 AS cor0
----
11120
186
7872

skipif mysql # not compatible
query I rowsort label-6303
SELECT ALL - col0 * - cor0.col0 - CAST ( - 59 AS INTEGER ) * + col0 FROM tab1 AS cor0
----
11120
186
7872

onlyif mysql # use DIV operator for integer division
query I rowsort label-6304
SELECT ALL - col2 DIV col1 - - col1 * col0 * col2 AS col0 FROM tab2 AS cor0
----
119652
51032
5859

skipif mysql # not compatible
query I rowsort label-6304
SELECT ALL - col2 / col1 - - col1 * col0 * col2 AS col0 FROM tab2 AS cor0
----
119652
51032
5859

query I rowsort
SELECT - cor0.col1 * col2 + - col1 AS col0 FROM tab0 cor0
----
-194
-2924
-7553

query I rowsort
SELECT ALL + col2 + - col1 * - col2 FROM tab0 AS cor0
----
2871
7544
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6307
SELECT ALL - col1 + col2 * ( col0 + col2 ) * - CAST( - 83 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
1402355
255448
572441

skipif mysql # not compatible
query I rowsort label-6307
SELECT ALL - col1 + col2 * ( col0 + col2 ) * - CAST ( - 83 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
1402355
255448
572441

query I rowsort
SELECT - + cor0.col1 * + col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT + col0 - col2 AS col1 FROM tab0 cor0
----
-9
34
7

query I rowsort
SELECT DISTINCT - + cor0.col1 - col2 FROM tab2 cor0
----
-55
-58
-85

query I rowsort
SELECT + ( cor0.col2 ) * col1 + + 61 FROM tab2 AS cor0
----
1595
707
898

query I rowsort
SELECT + col0 + + col0 * 16 AS col1 FROM tab1 AS cor0
----
1088
1360
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-6313
SELECT ALL + 79 DIV tab0.col2 + col0 AS col2 FROM tab0
----
114
26
89

skipif mysql # not compatible
query I rowsort label-6313
SELECT ALL + 79 / tab0.col2 + col0 AS col2 FROM tab0
----
114
26
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-6314
SELECT ALL col1 + col2 * col1 DIV + 83 FROM tab0
----
120
180
98

skipif mysql # not compatible
query I rowsort label-6314
SELECT ALL col1 + col2 * col1 / + 83 FROM tab0
----
120
180
98

query I rowsort
SELECT ALL + ( col2 ) + ( col0 ) AS col0 FROM tab1
----
121
176
57

query I rowsort
SELECT DISTINCT ( + col0 ) + + 22 - col1 * tab1.col2 AS col0 FROM tab1
----
-1146
-1379
-484

query I rowsort
SELECT ALL 55 - tab0.col1 * col2 * 43 FROM tab0
----
-121979
-320811
-4116

query I rowsort
SELECT 5 * tab2.col1 FROM tab2
----
155
295
85

query I rowsort
SELECT col1 * + col2 + + ( + col0 * col1 ) AS col0 FROM tab1
----
1210
1482
2288

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6320
SELECT + col1 + col2 * CAST( col1 + col1 AS SIGNED ) * + col2 AS col1 FROM tab0 cor0
----
1223859
187394
291

skipif mysql # not compatible
query I rowsort label-6320
SELECT + col1 + col2 * CAST ( col1 + col1 AS INTEGER ) * + col2 AS col1 FROM tab0 cor0
----
1223859
187394
291

query I rowsort
SELECT ALL 52 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 76100d10f51995d20efdeb657e444d3c

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 cor0, tab2 AS cor1, tab0, tab2 AS cor2
----
3645 values hashing to fcae6e4467f798ac88c869b8e38c6b23

query I rowsort
SELECT ALL + col0 * col1 * col2 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT ALL - - cor0.col2 * - 73 * + 7 AS col0 FROM tab2 AS cor0
----
-13286
-13797
-19418

query I rowsort
SELECT ALL - col0 * + col0 - + 35 FROM tab1 AS cor0
----
-4131
-44
-6435

query I rowsort
SELECT - cor0.col2 * 99 + 39 AS col2 FROM tab2 AS cor0
----
-2535
-2634
-3723

query I rowsort
SELECT DISTINCT - - col2 * col1 + col1 + - col1 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT ALL - col1 + 63 FROM tab2 cor0
----
32
4
46

query I rowsort
SELECT - - cor0.col1 * col0 FROM tab1 cor0
----
1040
640
78

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 - cor0.col0 + - 77 * 34 FROM tab0 AS cor0
----
-2642
-2653
-2707

query I rowsort
SELECT - col1 - - 75 * col1 AS col2 FROM tab2 AS cor0
----
1258
2294
4366

onlyif mysql # use DIV operator for integer division
query I rowsort label-6333
SELECT + col1 DIV col2 AS col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6333
SELECT + col1 / col2 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT + cor0.col1 * - col2 * ( + col1 ) AS col2 FROM tab1 cor0
----
-16224
-36504
-5700

query I rowsort
SELECT - col2 + col2 * col1 AS col1 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT + + cor0.col1 - col0 FROM tab2 AS cor0
----
-19
-62
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 29 * - col0 col1 FROM tab0
----
-1015
-2581
-696

onlyif mysql # use DIV operator for integer division
query I rowsort label-6338
SELECT ALL - col1 DIV - col1 col0 FROM tab0 AS cor0
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6338
SELECT ALL - col1 / - col1 col0 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT 28 * cor0.col0 * cor0.col1 AS col2 FROM tab0 AS cor0
----
226772
57792
95060

query I rowsort
SELECT DISTINCT - 54 AS col2 FROM tab2 AS cor0
----
-54

query I rowsort
SELECT cor1.col0 * cor0.col0 FROM tab1, tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
27 values hashing to f7a7d834ef74d0b2fff83e6a8f658dd5

query I rowsort
SELECT ALL tab0.col1 * col0 * - col0 AS col0 FROM tab0
----
-118825
-49536
-720811

query I rowsort
SELECT ALL 29 FROM tab1 AS cor0
----
29
29
29

query I rowsort
SELECT + + cor0.col0 * col1 + col1 FROM tab0 AS cor0
----
2150
3492
8190

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6345
SELECT DISTINCT + CAST( col2 AS SIGNED ) + col2 * col0 FROM tab1 AS cor0
----
216
3705
7776

skipif mysql # not compatible
query I rowsort label-6345
SELECT DISTINCT + CAST ( col2 AS INTEGER ) + col2 * col0 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT + 50 * + col1 + - col1 * + 2 AS col1 FROM tab0 cor0
----
4128
4368
4656

query I rowsort
SELECT ALL - + 54 * + col0 + col0 FROM tab0 AS cor0
----
-1272
-1855
-4717

query I rowsort
SELECT ALL cor0.col2 * col1 + col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT + 65 FROM tab0 cor0
----
65
65
65

query I rowsort
SELECT ALL - ( 48 ) * col0 FROM tab1 cor0
----
-144
-3072
-3840

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 * col1 col2 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6352
SELECT ALL - + CAST( NULL AS SIGNED ) * col0 * + col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6352
SELECT ALL - + CAST ( NULL AS INTEGER ) * col0 * + col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6353
SELECT - + col1 DIV + 81 AS col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6353
SELECT - + col1 / + 81 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + + col1 * + col0 + + col0 AS col1 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT ALL - + cor0.col0 + col0 * col2 AS col0 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT - 53 + 75 FROM tab0 AS cor0
----
22
22
22

query I rowsort
SELECT DISTINCT - ( col2 ) * col2 + + cor0.col0 FROM tab0 AS cor0
----
-1065
-6635
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-6358
SELECT ALL + cor0.col2 DIV col1 AS col0 FROM tab2 cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-6358
SELECT ALL + cor0.col2 / col1 AS col0 FROM tab2 cor0
----
0
0
2

query I rowsort
SELECT ALL - - 38 AS col1 FROM tab0 AS cor0
----
38
38
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col2 * - col2 col1 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL + 34 + col0 * - ( ( + col2 ) ) AS col0 FROM tab1 AS cor0
----
-128
-3614
-7646

query I rowsort
SELECT ALL + col1 + + col2 * - ( col0 ) + col1 FROM tab1 AS cor0
----
-110
-3628
-7654

query I rowsort
SELECT DISTINCT + col0 * + col0 * + cor0.col1 AS col1 FROM tab1 AS cor0
----
234
40960
83200

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 38 col1 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
-38

query I rowsort
SELECT + - 84 AS col2 FROM tab2 AS cor0
----
-84
-84
-84

query I rowsort
SELECT ( - 13 ) FROM tab0 AS cor0
----
-13
-13
-13

query I rowsort
SELECT - 72 * col2 FROM tab0 cor0
----
-2376
-5904
-72

query I rowsort
SELECT col0 + - ( + col0 ) * - cor0.col2 AS col1 FROM tab2 cor0
----
196
2106
3081

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6369
SELECT + CAST( NULL AS SIGNED ) + col0 * + col2 * + ( col0 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6369
SELECT + CAST ( NULL AS INTEGER ) + col0 * + col2 * + ( col0 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 62 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
62

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0 CROSS JOIN tab0, tab0 cor1, tab0 cor2
----
3645 values hashing to 04ab51615fd2c7e492de6a59e98226e1

query I rowsort
SELECT - + 17 - col0 FROM tab0 AS cor0
----
-106
-41
-52

query I rowsort
SELECT DISTINCT + + cor0.col1 * col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + col0 * col1 + col0 AS col1 FROM tab1 AS cor0
----
1120
704
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col0 * col1 col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL + col0 + - ( - col1 ) FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT cor1.col2 FROM tab2, tab1 AS cor0, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to e938777ebffc2e3e9c0cdfaa4f732c05

query I rowsort
SELECT - 91 AS col2 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 6ec4feac5c635ab8e5da71006896acab

query I rowsort
SELECT 94 AS col0 FROM tab0, tab0 cor0, tab2 AS cor1
----
27 values hashing to a4d239626cf0546ac1b2f57bb8407089

query I rowsort
SELECT - - col0 * - col2 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 + + col1 col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL + + tab2.col2 AS col0 FROM tab2, tab0 AS cor0, tab0, tab0 cor1
----
81 values hashing to c4e6b1f1d28e731664a15a6f7cda4da9

onlyif mysql # use DIV operator for integer division
query I rowsort label-6383
SELECT - col1 DIV 31 FROM tab0 AS cor0
----
-2
-2
-3

skipif mysql # not compatible
query I rowsort label-6383
SELECT - col1 / 31 FROM tab0 AS cor0
----
-2
-2
-3

query I rowsort
SELECT + cor0.col1 + + 62 FROM tab2 cor0
----
121
79
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-6385
SELECT + + col1 DIV ( + col1 * - col0 ) FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6385
SELECT + + col1 / ( + col1 * - col0 ) FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ( col0 ) * cor0.col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - ( + tab2.col2 ) * - col2 + - col0 AS col1 FROM tab2
----
1365
598
722

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6388
SELECT CAST( NULL AS SIGNED ) * col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6388
SELECT CAST ( NULL AS INTEGER ) * col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col1 ) * col1 col1 FROM tab1 AS cor0
----
100
169
676

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - ( 2 ) col2 FROM tab1 AS cor0
----
2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6391
SELECT DISTINCT + - CAST( 3 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
-3

skipif mysql # not compatible
query I rowsort label-6391
SELECT DISTINCT + - CAST ( 3 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-3

query I rowsort
SELECT ALL 61 AS col1 FROM tab1 AS cor0
----
61
61
61

onlyif mysql # use DIV operator for integer division
query I rowsort label-6393
SELECT + - col1 DIV cor0.col1 AS col0 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6393
SELECT + - col1 / cor0.col1 AS col0 FROM tab2 AS cor0
----
-1
-1
-1

query IIIIIIIII rowsort
SELECT * FROM tab2, tab1, tab1 AS cor0 WHERE NULL <> ( NULL )
----

query I rowsort
SELECT ALL 23 + + col0 FROM tab0
----
112
47
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + + col2 * + tab1.col2 col0 FROM tab1
----
2919
3313
9296

query I rowsort
SELECT - cor0.col0 * + cor0.col2 AS col1 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6398
SELECT DISTINCT - CAST( + 97 AS SIGNED ) AS col2 FROM tab0, tab1 AS cor0
----
-97

skipif mysql # not compatible
query I rowsort label-6398
SELECT DISTINCT - CAST ( + 97 AS INTEGER ) AS col2 FROM tab0, tab1 AS cor0
----
-97

query I rowsort
SELECT + 33 * cor0.col0 FROM tab1 AS cor0
----
2112
2640
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + + col0 * col2 col0 FROM tab1 AS cor0
----
108
3591
7584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + 68 col2 FROM tab0 AS cor0
----
103
157
92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6402
SELECT ALL - + col2 * CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6402
SELECT ALL - + col2 * CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + col1 col2 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT ALL - col2 * + 38 + col0 FROM tab2 AS cor0
----
-1019
-1365
-910

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * col1 + col1 col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT col1 * 31 AS col2 FROM tab1 AS cor0
----
310
403
806

query I rowsort
SELECT ALL - cor0.col1 AS col1 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT - - col1 + - col0 AS col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL + 50 FROM tab1
----
50
50
50

query I rowsort
SELECT ALL 78 AS col0 FROM tab2
----
78
78
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-6411
SELECT ALL - col0 DIV - col1 AS col2 FROM tab2
----
0
1
4

skipif mysql # not compatible
query I rowsort label-6411
SELECT ALL - col0 / - col1 AS col2 FROM tab2
----
0
1
4

query I rowsort
SELECT DISTINCT + - 85 + + col0 * ( + col0 ) FROM tab0 cor0
----
1140
491
7836

query I rowsort
SELECT + 61 + - col1 + + 56 AS col2 FROM tab0
----
20
26
31

query I rowsort
SELECT DISTINCT - col0 * + col1 + + col2 FROM tab0
----
-2031
-3394
-8017

query I rowsort
SELECT - cor0.col1 - + cor0.col2 * 28 FROM tab0, tab0 AS cor0
----
9 values hashing to 835948eab6cdf6bfaf6a10eb72664403

query I rowsort
SELECT DISTINCT 15 AS col1 FROM tab0 AS cor0
----
15

query I rowsort
SELECT ALL - col0 * cor0.col2 * col2 AS col2 FROM tab2 cor0
----
-114076
-5103
-52728

query I rowsort
SELECT ALL + 45 * - col1 + col2 FROM tab0 AS cor0
----
-3837
-4013
-4364

query I rowsort
SELECT ALL - + ( col2 ) + ( col1 ) AS col0 FROM tab2 cor0
----
-21
33
4

query I rowsort
SELECT DISTINCT - 89 + + cor0.col2 * 61 FROM tab0 AS cor0
----
-28
1924
4913

query I rowsort
SELECT - 2 + + col0 AS col1 FROM tab2 AS cor0
----
5
76
77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6422
SELECT - - cor0.col0 + - CAST( NULL AS SIGNED ) + + cor0.col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6422
SELECT - - cor0.col0 + - CAST ( NULL AS INTEGER ) + + cor0.col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort
SELECT + - col2 + CAST ( + col1 AS REAL ) AS col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT - col0 * + col1 + - col1 * + cor0.col0 + cor0.col1 AS col0 FROM tab1 AS cor0
----
-1270
-130
-2067

query I rowsort
SELECT ALL + cor0.col0 + - col2 AS col0 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT ALL + - col0 * + 85 FROM tab1 AS cor0
----
-255
-5440
-6800

query I rowsort
SELECT + cor0.col1 + col2 AS col1 FROM tab0 cor0
----
119
173
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6428
SELECT + + col2 + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6428
SELECT + + col2 + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col0 + 33 FROM tab2 AS cor0
----
111
112
40

query I rowsort
SELECT DISTINCT + col2 * - col1 + col1 AS col0 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT - cor0.col2 + - col0 * - 3 * col2 - 82 FROM tab1 AS cor0
----
10805
22862
350

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6432
SELECT ALL - col1 + CAST( + col2 AS SIGNED ) * - col2 FROM tab0 cor0
----
-1175
-6815
-98

skipif mysql # not compatible
query I rowsort label-6432
SELECT ALL - col1 + CAST ( + col2 AS INTEGER ) * - col2 FROM tab0 cor0
----
-1175
-6815
-98

query I rowsort
SELECT DISTINCT - col2 * - col0 - - col0 AS col1 FROM tab2
----
196
2106
3081

query I rowsort
SELECT ALL ( col1 ) - - tab0.col1 FROM tab0
----
172
182
194

query I rowsort
SELECT ALL tab2.col0 * + col2 - - ( 64 + col2 ) FROM tab2
----
2118
280
3104

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6436
SELECT + tab0.col1 * CAST( NULL AS DECIMAL ) FROM tab0, tab2 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-6436
SELECT + tab0.col1 * CAST ( NULL AS REAL ) FROM tab0, tab2 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT col1 * col1 + + col1 FROM tab0
----
7482
8372
9506

query I rowsort
SELECT DISTINCT - col2 * col0 + col2 * col0 AS col2 FROM tab2
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6439
SELECT ALL tab0.col0 * - col0 + - col1 DIV col0 FROM tab0
----
-1227
-579
-7922

skipif mysql # not compatible
query I rowsort label-6439
SELECT ALL tab0.col0 * - col0 + - col1 / col0 FROM tab0
----
-1227
-579
-7922

query I rowsort
SELECT col2 - + col0 * col2 * + col0 FROM tab1
----
-233415
-432
-614304

onlyif mysql # use DIV operator for integer division
query I rowsort label-6441
SELECT DISTINCT + col0 DIV col2 + - col0 FROM tab1
----
-3
-63
-80

skipif mysql # not compatible
query I rowsort label-6441
SELECT DISTINCT + col0 / col2 + - col0 FROM tab1
----
-3
-63
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col0 col2 FROM tab0
----
171
36
57

query I rowsort
SELECT + col2 + - col1 * col0 AS col0 FROM tab0
----
-2031
-3394
-8017

query I rowsort
SELECT ALL + tab0.col2 + col2 * - col0 FROM tab0
----
-34
-7216
-759

onlyif mysql # use DIV operator for integer division
query I rowsort label-6445
SELECT col1 + - tab1.col2 DIV col0 FROM tab1
----
10
12
8

skipif mysql # not compatible
query I rowsort label-6445
SELECT col1 + - tab1.col2 / col0 FROM tab1
----
10
12
8

query III rowsort
SELECT * FROM tab0 WHERE - col1 NOT IN ( - tab0.col1 * col2 + - col0 / + col0 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT ALL - tab2.col0 + + col1 * - col0 FROM tab2
----
-1422
-224
-4680

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT NULL NOT IN ( + col2 )
----

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT col0 NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT - tab0.col0 + - col1 AS col1 FROM tab0
----
-110
-132
-180

query I rowsort
SELECT col2 AS col1 FROM tab2 WHERE col1 NOT BETWEEN ( col0 + col1 / col0 ) AND - col2 + col0
----
26
27
38

query I rowsort
SELECT ALL col2 * + col2 + col1 * - tab1.col0 * - tab1.col2 AS col2 FROM tab1 WHERE NOT col1 IN ( col0 )
----
109056
39729
7128

query I rowsort
SELECT tab2.col0 + col1 AS col1 FROM tab2
----
137
38
96

query I rowsort
SELECT DISTINCT + col1 * - col2 + - col2 FROM tab1
----
-1344
-1458
-627

query I rowsort
SELECT ALL col0 FROM tab0 WHERE NULL NOT IN ( + col2 * - col2 + col2 )
----

query I rowsort
SELECT DISTINCT - tab1.col0 * col0 + - col2 FROM tab1
----
-4153
-63
-6496

query I rowsort
SELECT col0 * + col2 FROM tab1 WHERE NULL NOT BETWEEN + col0 AND NULL
----

query I rowsort
SELECT ALL + col2 FROM tab2 WHERE NOT col1 IN ( col1 )
----

query I rowsort
SELECT ALL - col2 + tab0.col2 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT - col2 + tab2.col0 FROM tab2
----
-20
41
52

query I rowsort
SELECT ALL - col2 * - col1 + col1 FROM tab1
----
1261
1430
580

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT + col2 NOT BETWEEN NULL AND + col2
----

query I rowsort
SELECT + tab2.col1 * col1 + col2 + col0 * - col2 AS col1 FROM tab2
----
-2675
1479
799

query I rowsort
SELECT + 57 - 84 * col2 AS col0 FROM tab0
----
-27
-2715
-6831

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6465
SELECT CAST( + col1 AS SIGNED ) + col0 FROM tab1
----
29
74
93

skipif mysql # not compatible
query I rowsort label-6465
SELECT CAST ( + col1 AS INTEGER ) + col0 FROM tab1
----
29
74
93

query I rowsort
SELECT + cor0.col2 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT - 21 + cor0.col1 FROM tab0 AS cor0
----
65
70
76

query I rowsort
SELECT ALL + ( + 3 ) FROM tab0
----
3
3
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-6469
SELECT - 76 DIV - col2 + - tab0.col2 * - ( col1 ) * + col1 FROM tab0
----
244070
679042
9485

skipif mysql # not compatible
query I rowsort label-6469
SELECT - 76 / - col2 + - tab0.col2 * - ( col1 ) * + col1 FROM tab0
----
244070
679042
9485

query I rowsort
SELECT + col2 * tab2.col0 + tab2.col1 AS col1 FROM tab2
----
2087
220
3019

query I rowsort
SELECT DISTINCT - cor1.col2 AS col2 FROM tab0, tab2 cor0, tab0 AS cor1
----
-1
-33
-82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6472
SELECT - CAST( NULL AS DECIMAL ) + cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-6472
SELECT - CAST ( NULL AS REAL ) + cor0.col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT + 0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
0

query I rowsort
SELECT ALL - 96 FROM tab1 AS cor0
----
-96
-96
-96

query I rowsort
SELECT col1 * col1 * 32 FROM tab2 AS cor0
----
111392
30752
9248

query I rowsort
SELECT - col1 * cor0.col2 AS col1 FROM tab2 AS cor0
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 6 col2 FROM tab1 AS cor0
----
6

query I rowsort
SELECT ALL - + col1 * - cor0.col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT 83 + col0 AS col0 FROM tab2 AS cor0
----
161
162
90

query I rowsort
SELECT - 69 * col0 FROM tab2 AS cor0
----
-483
-5382
-5451

query I rowsort
SELECT DISTINCT + col1 * - col1 + - ( col2 ) + col2 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT 92 * col0 FROM tab1 cor0
----
276
5888
7360

query I rowsort
SELECT ALL - + col2 * + col0 - col0 FROM tab2 cor0
----
-196
-2106
-3081

query I rowsort
SELECT ALL + col2 * + ( col0 ) + col1 FROM tab1
----
188
3658
7693

query I rowsort
SELECT ALL + col1 * + ( - tab0.col0 ) + col0 + 79 AS col1 FROM tab0
----
-1961
-3281
-7931

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 88 col1 FROM tab2, tab0 AS cor0
----
88

query I rowsort
SELECT ALL + col0 + + col1 * - col0 + + col0 AS col2 FROM tab0 AS cor0
----
-2016
-3325
-7921

query I rowsort
SELECT ALL - col0 + 82 AS col2 FROM tab1 AS cor0
----
18
2
79

query I rowsort
SELECT + + col0 + 58 * col2 + col0 FROM tab0 cor0
----
128
1962
4934

query I rowsort
SELECT DISTINCT + col1 * ( + col1 ) + col2 AS col0 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT DISTINCT - col2 * 34 + - ( cor0.col1 ) FROM tab0 AS cor0
----
-1208
-131
-2879

query I rowsort
SELECT ALL col2 * col0 + - col2 + - 24 AS col2 FROM tab0 AS cor0
----
10
7192
735

query I rowsort
SELECT DISTINCT + 15 - - 27 AS col1 FROM tab0 cor0
----
42

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6494
SELECT DISTINCT + CAST( NULL AS SIGNED ) * - col2 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6494
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * - col2 FROM tab0 cor0
----
NULL

query I rowsort
SELECT 72 * cor0.col2 FROM tab0 AS cor0
----
2376
5904
72

query I rowsort
SELECT ALL + - col1 * col2 + - col0 FROM tab1 AS cor0
----
-1328
-1407
-634

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1 cor0, tab0 AS cor1, tab2 AS cor2
----
972 values hashing to a9068b700464993db9fae6f630605fde

query I rowsort
SELECT - 20 AS col0 FROM tab0 AS cor0
----
-20
-20
-20

query I rowsort
SELECT - - ( + col0 ) FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT DISTINCT - ( - col0 ) FROM tab0 AS cor0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - ( + col2 ) col1 FROM tab2 AS cor0
----
-26
-27
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 16 + + col1 col0 FROM tab2 AS cor0
----
33
47
75

query I rowsort
SELECT ALL col2 - - col2 AS col2 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT - - ( + col0 ) * cor0.col2 AS col2 FROM tab1 AS cor0
----
162
3648
7680

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 - ( + col2 ) * col1 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT + col2 * col1 + - col1 FROM tab0 cor0
----
0
2752
7371

query I rowsort
SELECT - ( col2 ) AS col2 FROM tab2
----
-26
-27
-38

query I rowsort
SELECT DISTINCT cor0.col2 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
1
33
82

query I rowsort
SELECT 3 FROM tab1, tab2 AS cor0
----
9 values hashing to 3cf1e377a943589897b8d431a834f1ba

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 69 col2 FROM tab1 AS cor0
----
69
69
69

query I rowsort
SELECT - col1 * ( - col1 ) + col2 AS col0 FROM tab1 cor0
----
157
265
730

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 + cor0.col0 col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL cor0.col0 FROM tab1, tab1 cor0, tab2 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT + col1 * + col2 * col0 AS col2 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT 25 * - col0 AS col1 FROM tab2 AS cor0
----
-175
-1950
-1975

query I rowsort
SELECT - - col2 + + col0 AS col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL col2 * + 79 AS col1 FROM tab1
----
4266
4503
7584

query I rowsort
SELECT ALL - col0 + + 95 * col2 FROM tab2
----
2392
2558
3531

query I rowsort
SELECT DISTINCT - ( 73 + tab2.col2 ) FROM tab2
----
-100
-111
-99

query I rowsort
SELECT + ( - 24 ) FROM tab2
----
-24
-24
-24

query I rowsort
SELECT ( - 36 ) FROM tab0
----
-36
-36
-36

query I rowsort
SELECT DISTINCT 40 AS col0 FROM tab0, tab0 cor0
----
40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor1.col1 col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT + col1 + 44 FROM tab2 AS cor0
----
103
61
75

query I rowsort
SELECT + col0 * 28 + col2 FROM tab2 AS cor0
----
2210
223
2250

query I rowsort
SELECT ALL ( col0 ) AS col1 FROM tab0
----
24
35
89

query III rowsort
SELECT ALL * FROM tab1 WHERE + col2 / col1 NOT BETWEEN ( col0 * col2 ) AND NULL
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

query I rowsort
SELECT DISTINCT col2 * + tab2.col1 FROM tab2
----
1534
646
837

query IIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab0 WHERE NOT cor0.col2 <= NULL
----

query I rowsort
SELECT DISTINCT + cor0.col1 * col0 * - col1 FROM tab2 cor0
----
-22831
-271518
-6727

query I rowsort
SELECT col1 FROM tab2 AS cor0 WHERE NOT NULL NOT BETWEEN + col0 AND NULL
----

query I rowsort
SELECT col0 + col2 * + col2 FROM tab0 cor0
----
1113
36
6813

onlyif mysql # use DIV operator for integer division
query I rowsort label-6534
SELECT DISTINCT - tab1.col1 + - col2 DIV - col2 AS col1 FROM tab1
----
-12
-25
-9

skipif mysql # not compatible
query I rowsort label-6534
SELECT DISTINCT - tab1.col1 + - col2 / - col2 AS col1 FROM tab1
----
-12
-25
-9

query I rowsort
SELECT + col0 + + col2 AS col2 FROM tab1
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-6536
SELECT cor0.col2 * col0 + col1 + col2 DIV + col1 FROM tab1 AS cor0
----
190
3663
7700

skipif mysql # not compatible
query I rowsort label-6536
SELECT cor0.col2 * col0 + col1 + col2 / + col1 FROM tab1 AS cor0
----
190
3663
7700

query I rowsort
SELECT ALL col0 * + col1 FROM tab1 WHERE + col0 IN ( col2 )
----

query I rowsort
SELECT + col0 + - col0 - col0 * - tab1.col1 FROM tab1
----
1040
640
78

query I rowsort
SELECT DISTINCT col1 * col0 + + col0 * col1 AS col2 FROM tab1
----
1280
156
2080

query I rowsort
SELECT - col2 * col0 + - col2 + + tab0.col1 * col1 * + col2 AS col2 FROM tab0
----
243243
671662
9373

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT ( NULL ) IN ( col0 * col1 * + col0 )
----

query III rowsort
SELECT * FROM tab0 WHERE ( NULL ) IN ( + col1 + tab0.col2 )
----

query I rowsort
SELECT - tab0.col2 * col1 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT DISTINCT - col1 FROM tab1 WHERE NOT ( NULL ) NOT IN ( col2 * col2 * col2 )
----

query I rowsort
SELECT DISTINCT col0 + + col2 * tab2.col1 * + col1 FROM tab2
----
11061
25954
90584

query III rowsort
SELECT * FROM tab2 WHERE NULL IN ( - tab2.col1 + col1 )
----

query I rowsort
SELECT col2 - col2 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT tab0.col2 * col2 + col2 FROM tab0
----
1122
2
6806

query I rowsort
SELECT + tab2.col1 * - tab2.col2 AS col1 FROM tab2
----
-1534
-646
-837

query I rowsort
SELECT - col0 + col2 * - col2 FROM tab0 cor0
----
-1113
-36
-6813

query III rowsort
SELECT ALL * FROM tab1 AS cor0 WHERE NOT - col2 * + col1 NOT IN ( col2 * - col0 * - col0 - col1 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6552
SELECT col1 DIV - col1 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6552
SELECT col1 / - col1 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT + col0 * - tab1.col1 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab2, tab1, tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT DISTINCT col0 + - col0 * + col0 - col0 FROM tab2
----
-49
-6084
-6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-6556
SELECT col2 DIV + col0 col2 FROM tab1
----
0
1
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6556
SELECT col2 / + col0 col2 FROM tab1
----
0
1
18

query I rowsort
SELECT + col0 * cor0.col2 AS col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - + col0 * cor0.col0 FROM tab2 AS cor0
----
-49
-6084
-6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-6559
SELECT + col2 DIV col1 - col1 * col1 FROM tab1 cor0
----
-162
-674
-95

skipif mysql # not compatible
query I rowsort label-6559
SELECT + col2 / col1 - col1 * col1 FROM tab1 cor0
----
-162
-674
-95

query I rowsort
SELECT col1 * col2 + col2 + cor0.col1 AS col0 FROM tab2 AS cor0
----
1619
701
895

query I rowsort
SELECT cor0.col1 * cor0.col2 * + col1 + col0 FROM tab1 cor0
----
16304
36507
5764

query I rowsort
SELECT + cor0.col2 * - col2 FROM tab0 cor0
----
-1
-1089
-6724

query I rowsort
SELECT + col2 + col0 + col2 * + col0 FROM tab1 AS cor0
----
219
3769
7856

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * tab1.col2 * - col0 col1 FROM tab1
----
-207936
-737280
-8748

onlyif mysql # use DIV operator for integer division
query I rowsort label-6565
SELECT DISTINCT + col0 DIV + col0 AS col0 FROM tab2
----
1

skipif mysql # not compatible
query I rowsort label-6565
SELECT DISTINCT + col0 / + col0 AS col0 FROM tab2
----
1

query I rowsort
SELECT DISTINCT - col2 * - col1 AS col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT + col0 + col2 * + col0 AS col2 FROM tab0 AS cor0
----
70
7387
816

onlyif mysql # use DIV operator for integer division
query I rowsort label-6568
SELECT ALL - col1 + + col1 DIV - cor0.col1 AS col2 FROM tab0 AS cor0
----
-87
-92
-98

skipif mysql # not compatible
query I rowsort label-6568
SELECT ALL - col1 + + col1 / - cor0.col1 AS col2 FROM tab0 AS cor0
----
-87
-92
-98

query I rowsort
SELECT - - col0 * - col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT - 43 + 22 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 631fbd1fd929405aba54a22c2a06c757

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6571
SELECT ALL CAST( NULL AS SIGNED ) col2 FROM tab2, tab2 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6571
SELECT ALL CAST ( NULL AS INTEGER ) col2 FROM tab2, tab2 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT + - col2 + + ( + col1 ) * cor0.col1 FROM tab2 AS cor0
----
251
3455
934

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6573
SELECT + + col1 + CAST( - col0 AS SIGNED ) * - col0 FROM tab0 AS cor0
----
1322
662
8012

skipif mysql # not compatible
query I rowsort label-6573
SELECT + + col1 + CAST ( - col0 AS INTEGER ) * - col0 FROM tab0 AS cor0
----
1322
662
8012

onlyif mysql # use DIV operator for integer division
query I rowsort label-6574
SELECT ALL + - col0 * 41 DIV cor0.col0 FROM tab0 AS cor0
----
-41
-41
-41

skipif mysql # not compatible
query I rowsort label-6574
SELECT ALL + - col0 * 41 / cor0.col0 FROM tab0 AS cor0
----
-41
-41
-41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * + col1 col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT + col1 - - 80 FROM tab2 AS cor0
----
111
139
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6577
SELECT DISTINCT - + cor0.col0 DIV - col0 + + col0 - - col0 AS col1 FROM tab0 AS cor0
----
179
49
71

skipif mysql # not compatible
query I rowsort label-6577
SELECT DISTINCT - + cor0.col0 / - col0 + + col0 - - col0 AS col1 FROM tab0 AS cor0
----
179
49
71

query I rowsort
SELECT ALL + col0 + - ( - col0 ) FROM tab2
----
14
156
158

query I rowsort
SELECT - 28 + col1 * tab0.col0 * ( col1 ) FROM tab0
----
177476
329287
736981

query I rowsort
SELECT + tab2.col0 * 12 FROM tab2
----
84
936
948

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 - cor0.col0 col1 FROM tab2 AS cor0
----
-14
-156
-158

skipif mysql # not compatible
query I rowsort
SELECT ALL - - CAST ( col1 AS REAL ) AS col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT ( col0 ) + - col2 AS col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT ALL 57 AS col1 FROM tab2 AS cor0
----
57
57
57

query I rowsort
SELECT DISTINCT - col0 * col1 - col0 AS col1 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT ALL - - ( ( - col0 ) ) AS col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT - 45 * col0 + - 56 AS col2 FROM tab0
----
-1136
-1631
-4061

query I rowsort
SELECT ALL + col0 * col1 + col1 FROM tab1
----
104
1053
650

query I rowsort
SELECT ALL + tab2.col1 * col0 + 93 + + col0 AS col0 FROM tab2
----
1515
317
4773

onlyif mysql # use DIV operator for integer division
query I rowsort label-6590
SELECT ALL - + col2 + col1 DIV col1 FROM tab2 AS cor0
----
-25
-26
-37

skipif mysql # not compatible
query I rowsort label-6590
SELECT ALL - + col2 + col1 / col1 FROM tab2 AS cor0
----
-25
-26
-37

query I rowsort
SELECT ALL + cor0.col2 * col0 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-6592
SELECT - col0 + col1 DIV + cor0.col2 AS col0 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-6592
SELECT - col0 + col1 / + cor0.col2 AS col0 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT ALL + 45 FROM tab2 AS cor0
----
45
45
45

query I rowsort
SELECT DISTINCT + 78 + col1 AS col1 FROM tab1 AS cor0
----
104
88
91

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6595
SELECT - + col0 + CAST( col1 AS SIGNED ) FROM tab2 AS cor0
----
-19
-62
24

skipif mysql # not compatible
query I rowsort label-6595
SELECT - + col0 + CAST ( col1 AS INTEGER ) FROM tab2 AS cor0
----
-19
-62
24

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * col2 * + cor0.col0 + - cor0.col2 col0 FROM tab1 cor0
----
233415
432
614304

query I rowsort
SELECT + col2 + col1 * - col0 * col1 FROM tab0 AS cor0
----
-177471
-329314
-736927

query I rowsort
SELECT ALL - col0 * ( - col0 ) FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT ALL + col1 * 34 AS col1 FROM tab2 AS cor0
----
1054
2006
578

query I rowsort
SELECT + col2 + + cor0.col1 AS col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT col1 * - 11 FROM tab2 cor0
----
-187
-341
-649

query I rowsort
SELECT DISTINCT - - col1 + - col1 AS col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL - + col1 * + col0 AS col2 FROM tab1 AS cor0
----
-1040
-640
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + - ( 97 ) + col2 col0 FROM tab2 AS cor0
----
-12
-39
-42

query I rowsort
SELECT - col0 * - ( 57 ) FROM tab0 AS cor0
----
1368
1995
5073

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - col2 + + col1 col1 FROM tab2 AS cor0
----
-1427
-617
-698

onlyif mysql # use DIV operator for integer division
query I rowsort label-6607
SELECT ALL + col1 + - col1 DIV cor0.col2 FROM tab0 AS cor0
----
0
84
90

skipif mysql # not compatible
query I rowsort label-6607
SELECT ALL + col1 + - col1 / cor0.col2 FROM tab0 AS cor0
----
0
84
90

query I rowsort
SELECT 31 AS col2 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to c3c6f92f0ca72d71793339f88a57e336

query I rowsort
SELECT - tab1.col2 + 66 FROM tab1
----
-30
12
9

query I rowsort
SELECT ALL tab0.col0 AS col1 FROM tab0, tab1, tab1 cor0
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT - 67 * + 59 AS col1 FROM tab1 AS cor0
----
-3953
-3953
-3953

query I rowsort
SELECT + - ( + 24 ) AS col0 FROM tab0 AS cor0
----
-24
-24
-24

onlyif mysql # use DIV operator for integer division
query I rowsort label-6613
SELECT DISTINCT - col0 DIV 74 FROM tab0
----
-1
0

skipif mysql # not compatible
query I rowsort label-6613
SELECT DISTINCT - col0 / 74 FROM tab0
----
-1
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6614
SELECT DISTINCT - col2 * - CAST( NULL AS SIGNED ) FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-6614
SELECT DISTINCT - col2 * - CAST ( NULL AS INTEGER ) FROM tab2
----
NULL

query I rowsort
SELECT - col2 * 10 FROM tab1
----
-540
-570
-960

query I rowsort
SELECT - col0 + col0 * col0 FROM tab1 AS cor0
----
4032
6
6320

query I rowsort
SELECT 18 * - col0 - + col0 * - col1 AS col1 FROM tab2 AS cor0
----
-79
3198
91

query I rowsort
SELECT + + col1 + col2 AS col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL + 71 * - col1 + col2 * - col0 FROM tab2 AS cor0
----
-2390
-4209
-6217

query I rowsort
SELECT ( + cor0.col0 ) * - 36 AS col2 FROM tab0 AS cor0
----
-1260
-3204
-864

query I rowsort
SELECT DISTINCT - col2 - col1 * cor0.col0 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT + col0 + col0 FROM tab2 cor0
----
14
156
158

query I rowsort
SELECT ALL - - col2 - col1 FROM tab0 cor0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6624
SELECT ALL + 62 + col0 DIV col2 FROM tab0 AS cor0
----
62
63
97

skipif mysql # not compatible
query I rowsort label-6624
SELECT ALL + 62 + col0 / col2 FROM tab0 AS cor0
----
62
63
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6625
SELECT DISTINCT col1 + col1 DIV col2 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-6625
SELECT DISTINCT col1 + col1 / col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - col1 * + cor0.col2 + ( 43 ) * + cor0.col2 FROM tab0 AS cor0
----
-1419
-3936
-54

query I rowsort
SELECT DISTINCT + + cor0.col1 * col1 - col0 * - col1 FROM tab2 AS cor0
----
1178
1632
8083

query I rowsort
SELECT ALL - tab0.col0 - 47 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 88cd8ff1055c79667bb55af16b8c4432

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6629
SELECT + CAST( + 50 AS SIGNED ) + col1 * + col2 * - col1 + col1 * - 61 FROM tab0
----
-15276
-249264
-684543

skipif mysql # not compatible
query I rowsort label-6629
SELECT + CAST ( + 50 AS INTEGER ) + col1 * + col2 * - col1 + col1 * - 61 FROM tab0
----
-15276
-249264
-684543

query I rowsort
SELECT ( + tab2.col2 ) - - col0 AS col0 FROM tab2
----
104
117
34

query I rowsort
SELECT ALL + 45 * - col1 - + col2 AS col2 FROM tab0
----
-3903
-4177
-4366

query I rowsort
SELECT DISTINCT + 72 * col2 + col0 AS col1 FROM tab1
----
3891
4168
6992

query I rowsort
SELECT + 12 + col2 AS col0 FROM tab0 AS cor0
----
13
45
94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6634
SELECT ALL + col0 * - col1 + - CAST( col1 AS SIGNED ) FROM tab2 AS cor0
----
-1360
-248
-4661

skipif mysql # not compatible
query I rowsort label-6634
SELECT ALL + col0 * - col1 + - CAST ( col1 AS INTEGER ) FROM tab2 AS cor0
----
-1360
-248
-4661

onlyif mysql # use DIV operator for integer division
query I rowsort label-6635
SELECT DISTINCT - + col2 DIV cor0.col1 + + 70 DIV ( + col2 ) FROM tab0 AS cor0
----
0
2
70

skipif mysql # not compatible
query I rowsort label-6635
SELECT DISTINCT - + col2 / cor0.col1 + + 70 / ( + col2 ) FROM tab0 AS cor0
----
0
2
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( + col1 ) - - 97 col1 FROM tab0 AS cor0
----
0
11
6

query I rowsort
SELECT ALL + 68 FROM tab0
----
68
68
68

query I rowsort
SELECT - - col2 + col1 AS col0 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL - 18 AS col0 FROM tab0 AS cor0
----
-18
-18
-18

query I rowsort
SELECT DISTINCT + col1 * - col2 + - cor0.col2 FROM tab0 AS cor0
----
-2871
-7544
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor1.col1 col1 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * 59 col2 FROM tab1
----
1534
590
767

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 + 70 col0 FROM tab2, tab2 AS cor0
----
9 values hashing to f4f0561b6a3809ce19aa7925ed3fd26e

query I rowsort
SELECT ( - col1 ) + - col2 AS col1 FROM tab2 AS cor0
----
-55
-58
-85

query I rowsort
SELECT ALL + col2 * - col2 + col1 FROM tab2
----
-1427
-617
-698

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 27 col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

query I rowsort
SELECT DISTINCT - 20 FROM tab0, tab1, tab1 AS cor0
----
-20

query I rowsort
SELECT - 18 * + 51 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 05967df4d1708762b74836d0a167b451

query I rowsort
SELECT + ( col0 ) * 85 AS col1 FROM tab1 AS cor0
----
255
5440
6800

query I rowsort
SELECT + + 88 + col1 FROM tab2 cor0
----
105
119
147

query I rowsort
SELECT ALL - - col0 * col2 * col1 AS col1 FROM tab1 cor0
----
36480
4212
99840

query I rowsort
SELECT + - 63 + - col0 * + ( col2 * col0 ) FROM tab0 AS cor0
----
-1288
-19071
-649585

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col2 col1 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT 57 * + col2 + - col0 FROM tab1 AS cor0
----
3075
3185
5392

onlyif mysql # use DIV operator for integer division
query I rowsort label-6655
SELECT col0 DIV 8 + - col1 AS col0 FROM tab1 AS cor0
----
-2
-26
-3

skipif mysql # not compatible
query I rowsort label-6655
SELECT col0 / 8 + - col1 AS col0 FROM tab1 AS cor0
----
-2
-26
-3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor1.col1 col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT + + col1 - + ( - col1 ) FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT cor0.col2 - ( 98 ) FROM tab0 AS cor0
----
-16
-65
-97

query I rowsort
SELECT + + col2 * - 65 + + cor0.col0 AS col0 FROM tab1 AS cor0
----
-3507
-3641
-6160

query I rowsort
SELECT - col0 + - col1 + + 90 FROM tab2 cor0
----
-47
-6
52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + 75 + - col0 col0 FROM tab1 AS cor0
----
75
75
75

query I rowsort
SELECT + 69 + 76 * col2 FROM tab0 AS cor0
----
145
2577
6301

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0, tab0 AS cor1, tab2, tab0 AS cor2
----
3645 values hashing to 93ed44f621cc970f32b0cc9543b45262

query I rowsort
SELECT + col0 * col0 + col1 * col2 * cor0.col2 + + col0 FROM tab1 AS cor0
----
126288
36650
75828

query I rowsort
SELECT + cor0.col2 + - col0 AS col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT + 78 FROM tab1 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

query I rowsort
SELECT + - 48 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 31c94943c073954e4ca20b170ab61f8c

query I rowsort
SELECT ALL + + 78 * - col1 + col1 - col2 AS col0 FROM tab0 AS cor0
----
-6655
-7089
-7470

query I rowsort
SELECT + col0 + - 29 FROM tab1 cor0
----
-26
35
51

query I rowsort
SELECT ( + 76 ) * + col2 + ( col2 ) - col0 FROM tab1 AS cor0
----
4155
4325
7312

query I rowsort
SELECT ALL - - 89 * + col2 AS col2 FROM tab0 AS cor0
----
2937
7298
89

query I rowsort
SELECT ALL - col0 * 85 AS col0 FROM tab1 AS cor0
----
-255
-5440
-6800

query I rowsort
SELECT - ( col0 ) + - cor0.col1 + + 65 FROM tab0 AS cor0
----
-115
-45
-67

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6674
SELECT col1 * 47 - + col2 * + CAST( col0 + - cor0.col2 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
3703
4339
4525

skipif mysql # not compatible
query I rowsort label-6674
SELECT col1 * 47 - + col2 * + CAST ( col0 + - cor0.col2 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
3703
4339
4525

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( 15 ) * + col2 * + 65 + cor0.col2 col1 FROM tab1 AS cor0
----
52704
55632
93696

query I rowsort
SELECT 25 - col2 FROM tab1 AS cor0
----
-29
-32
-71

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6677
SELECT ALL + ( ( + col2 ) ) / - CAST( NULL AS SIGNED ) + + 23 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6677
SELECT ALL + ( ( + col2 ) ) / - CAST ( NULL AS INTEGER ) + + 23 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6678
SELECT - col2 * 54 DIV - 97 AS col1 FROM tab2
----
14
15
21

skipif mysql # not compatible
query I rowsort label-6678
SELECT - col2 * 54 / - 97 AS col1 FROM tab2
----
14
15
21

query I rowsort
SELECT + + col2 * - col1 * col1 + 21 * col2 AS col0 FROM tab1 AS cor0
----
-14208
-35370
-4503

query I rowsort
SELECT DISTINCT 97 * 52 FROM tab0 AS cor0
----
5044

query I rowsort
SELECT DISTINCT - cor0.col1 * - col1 + + col2 AS col2 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT 86 + + 19 FROM tab0 AS cor0
----
105
105
105

query I rowsort
SELECT + 82 + col2 * - col0 FROM tab0 AS cor0
----
-710
-7216
47

query I rowsort
SELECT ALL - + 65 + + col1 FROM tab1 AS cor0
----
-39
-52
-55

query I rowsort
SELECT ALL + - col0 * - col1 + - col0 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT - 14 FROM tab0, tab1 AS cor0
----
9 values hashing to d321461994ba49c3a70fa6373032fc94

query I rowsort
SELECT DISTINCT col0 * - 69 + col1 - - col2 * + 40 AS col1 FROM tab2
----
-3914
-4283
628

query I rowsort
SELECT DISTINCT 11 + col1 AS col0 FROM tab1 cor0
----
21
24
37

query I rowsort
SELECT DISTINCT - ( col0 ) + + 42 AS col0 FROM tab2 AS cor0
----
-36
-37
35

query I rowsort
SELECT - 86 + - col0 FROM tab1 AS cor0
----
-150
-166
-89

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab2, tab1 AS cor0, tab1 cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

onlyif mysql # use DIV operator for integer division
query I rowsort label-6692
SELECT - col0 DIV col2 - + col2 FROM tab1
----
-54
-58
-96

skipif mysql # not compatible
query I rowsort label-6692
SELECT - col0 / col2 - + col2 FROM tab1
----
-54
-58
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 * - ( + 28 ) col2 FROM tab0 cor0
----
2296
28
924

query I rowsort
SELECT ALL + 62 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

query I rowsort
SELECT col1 * + col1 * + ( col1 * + ( - 10 ) ) - col2 FROM tab0
----
-6360593
-7535792
-9126731

query I rowsort
SELECT + col1 + 24 AS col2 FROM tab1
----
34
37
50

query I rowsort
SELECT col2 * - col2 * + col2 FROM tab2
----
-17576
-19683
-54872

query I rowsort
SELECT DISTINCT - col0 * col1 AS col2 FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT ALL col1 * - col0 + + ( 45 ) - - cor0.col1 AS col1 FROM tab0 AS cor0
----
-1933
-3253
-7963

query I rowsort
SELECT + 72 * col1 FROM tab0 AS cor0
----
6192
6552
6984

query I rowsort
SELECT ALL + 64 * + col1 FROM tab2 AS cor0
----
1088
1984
3776

query I rowsort
SELECT ALL ( + tab2.col0 * - col0 ) + col2 FROM tab2
----
-22
-6058
-6203

onlyif mysql # use DIV operator for integer division
query I rowsort label-6703
SELECT col1 DIV + 33 - + tab0.col2 AS col0 FROM tab0
----
-31
-80
1

skipif mysql # not compatible
query I rowsort label-6703
SELECT col1 / + 33 - + tab0.col2 AS col0 FROM tab0
----
-31
-80
1

query I rowsort
SELECT - 95 * col2 + col0 FROM tab2
----
-2392
-2558
-3531

query I rowsort
SELECT + ( col2 ) + + col1 AS col2 FROM tab1
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-6706
SELECT col0 * - col2 DIV col2 + col2 DIV - col2 FROM tab1
----
-4
-65
-81

skipif mysql # not compatible
query I rowsort label-6706
SELECT col0 * - col2 / col2 + col2 / - col2 FROM tab1
----
-4
-65
-81

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ALL + 47 * + col1 * - CAST ( 65 AS REAL ) + + col0 col2 FROM tab2 AS cor0
----
-180167
-51856
-94698

query I rowsort
SELECT DISTINCT col1 - - col2 AS col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT DISTINCT + + col2 * col2 * 74 + - 25 * col2 FROM tab2 AS cor0
----
105906
49374
53271

query I rowsort
SELECT 2 AS col0 FROM tab2 AS cor0
----
2
2
2

query I rowsort
SELECT ALL - - col2 * - col0 + col1 * - cor0.col1 FROM tab0 AS cor0
----
-15579
-8188
-9444

query IIIIIIIII rowsort
SELECT * FROM tab2, tab0, tab0 cor0 WHERE NOT NULL > ( NULL )
----

query I rowsort
SELECT DISTINCT 17 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
17

onlyif mysql # use DIV operator for integer division
query I rowsort label-6714
SELECT ALL - col2 - + col2 DIV col2 FROM tab1
----
-55
-58
-97

skipif mysql # not compatible
query I rowsort label-6714
SELECT ALL - col2 - + col2 / col2 FROM tab1
----
-55
-58
-97

query I rowsort
SELECT ALL + col0 + + 63 - + col1 * tab2.col1 * + 35 FROM tab2
----
-121694
-33565
-9973

onlyif mysql # use DIV operator for integer division
query I rowsort label-6716
SELECT - col1 DIV 94 - col2 col2 FROM tab1 AS cor0
----
-54
-57
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6716
SELECT - col1 / 94 - col2 col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT ALL col2 + - ( - 53 + cor0.col2 * + 33 ) FROM tab1 AS cor0
----
-1675
-1771
-3019

query I rowsort
SELECT ALL - tab2.col2 + + tab2.col2 + col0 FROM tab2
----
7
78
79

query I rowsort
SELECT ALL - - ( 56 ) AS col1 FROM tab0 AS cor0
----
56
56
56

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - ( + cor0.col1 ) ) col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT - + col0 + + 67 FROM tab1 AS cor0
----
-13
3
64

query I rowsort
SELECT DISTINCT col0 + 14 AS col1 FROM tab2 cor0
----
21
92
93

query I rowsort
SELECT ALL - ( cor0.col2 ) - col2 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT + col2 * - col1 + col2 FROM tab0 cor0
----
-2805
-7380
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6725
SELECT ALL - + ( 10 ) * col1 DIV col0 - + 60 col2 FROM tab0 AS cor0
----
-70
-87
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6725
SELECT ALL - + ( 10 ) * col1 / col0 - + 60 col2 FROM tab0 AS cor0
----
-70
-87
-95

query I rowsort
SELECT col1 + col1 * - col1 AS col2 FROM tab2 AS cor0
----
-272
-3422
-930

query I rowsort
SELECT ALL + cor0.col2 FROM tab2, tab2 AS cor0, tab1, tab0 AS cor1
----
81 values hashing to c4e6b1f1d28e731664a15a6f7cda4da9

query I rowsort
SELECT + col2 + - ( + col0 ) * + col2 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT + col2 + + 16 FROM tab1 AS cor0
----
112
70
73

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6730
SELECT - + CAST( NULL AS SIGNED ) + + ( + col2 * ( col2 ) ) + - col1 * - 8 * col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6730
SELECT - + CAST ( NULL AS INTEGER ) + + ( + col2 * ( col2 ) ) + - col1 * - 8 * col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col1 * - 36 AS col0 FROM tab0 AS cor0
----
-3096
-3276
-3492

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col1 col2 FROM tab2 cor0
----
-17
-31
-59

onlyif mysql # use DIV operator for integer division
query I rowsort label-6733
SELECT + + col0 DIV cor0.col1 + col1 + ( 41 ) FROM tab1 AS cor0
----
57
60
67

skipif mysql # not compatible
query I rowsort label-6733
SELECT + + col0 / cor0.col1 + col1 + ( 41 ) FROM tab1 AS cor0
----
57
60
67

query I rowsort
SELECT DISTINCT - - cor0.col1 * col1 + col1 + - col2 FROM tab1 AS cor0
----
53
648
86

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6735
SELECT DISTINCT CAST( NULL AS SIGNED ) + + col0 col1 FROM tab2 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6735
SELECT DISTINCT CAST ( NULL AS INTEGER ) + + col0 col1 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + - col2 * + 28 FROM tab2 cor0
----
-1064
-728
-756

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6737
SELECT - - CAST( NULL AS DECIMAL ) AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6737
SELECT - - CAST ( NULL AS REAL ) AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6738
SELECT - tab1.col0 DIV + col2 AS col2 FROM tab1
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-6738
SELECT - tab1.col0 / + col2 AS col2 FROM tab1
----
-1
0
0

query I rowsort
SELECT - 67 AS col0 FROM tab1
----
-67
-67
-67

query I rowsort
SELECT DISTINCT - 19 AS col0 FROM tab2
----
-19

onlyif mysql # use DIV operator for integer division
query I rowsort label-6741
SELECT ALL - 27 + - col2 DIV + col1 + - col1 FROM tab1
----
-42
-47
-55

skipif mysql # not compatible
query I rowsort label-6741
SELECT ALL - 27 + - col2 / + col1 + - col1 FROM tab1
----
-42
-47
-55

query I rowsort
SELECT col1 + - 23 FROM tab2
----
-6
36
8

query I rowsort
SELECT - 85 * col0 FROM tab0 cor0
----
-2040
-2975
-7565

query I rowsort
SELECT DISTINCT ( 61 ) * + col2 FROM tab2 AS cor0
----
1586
1647
2318

query I rowsort
SELECT ALL + + 69 AS col2 FROM tab0 AS cor0
----
69
69
69

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 + + 36 * 13 AS col2 FROM tab0 cor0
----
468
468
468

query I rowsort
SELECT ALL - cor0.col2 * - cor0.col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT + 85 * col2 FROM tab1 AS cor0
----
4590
4845
8160

query I rowsort
SELECT DISTINCT - - 99 AS col2 FROM tab0 AS cor0
----
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-6751
SELECT - col0 + col0 DIV cor0.col0 + + col1 FROM tab2 AS cor0
----
-18
-61
25

skipif mysql # not compatible
query I rowsort label-6751
SELECT - col0 + col0 / cor0.col0 + + col1 FROM tab2 AS cor0
----
-18
-61
25

query I rowsort
SELECT DISTINCT - - col2 + + cor0.col0 * - col2 AS col2 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT - - 82 + col1 AS col0 FROM tab1 AS cor0
----
108
92
95

query I rowsort
SELECT ALL + + col0 * + cor0.col2 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT ALL - col1 + - tab0.col0 * + col1 AS col1 FROM tab0
----
-2150
-3492
-8190

query I rowsort
SELECT ALL - 64 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 100c625e45715c20368551989514ba64

query I rowsort
SELECT tab2.col2 * col1 * col0 AS col0 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT + + 52 + - col0 FROM tab0 cor0
----
-37
17
28

query I rowsort
SELECT ALL 26 + 55 * col2 AS col0 FROM tab1
----
2996
3161
5306

query I rowsort
SELECT ALL + cor0.col0 - + col0 FROM tab2 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * col2 col0 FROM tab2 cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-6762
SELECT DISTINCT - cor0.col2 DIV + 94 + col1 AS col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-6762
SELECT DISTINCT - cor0.col2 / + 94 + col1 AS col1 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6763
SELECT - col0 + - 36 DIV 73 col2 FROM tab1 AS cor0
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6763
SELECT - col0 + - 36 / 73 col2 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-6764
SELECT ALL - cor0.col2 DIV ( - col0 ) FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-6764
SELECT ALL - cor0.col2 / ( - col0 ) FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT DISTINCT + col2 * - cor0.col1 + 26 AS col2 FROM tab1 AS cor0
----
-1222
-1378
-544

query I rowsort
SELECT DISTINCT + col0 * - col1 + 17 FROM tab0 AS cor0
----
-2047
-3378
-8082

query I rowsort
SELECT DISTINCT - col0 * + col0 FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT ALL - col0 + + col1 * + 68 FROM tab0 AS cor0
----
5824
6099
6561

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6769
SELECT ALL - col1 + CAST( NULL AS DECIMAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6769
SELECT ALL - col1 + CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 * cor0.col0 AS col1 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + col0 + - col1 * - cor0.col2 FROM tab0 AS cor0
----
132
2862
7551

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * col2 - + tab1.col1 col1 FROM tab1
----
136
3638
7667

query I rowsort
SELECT DISTINCT + col0 + 43 + 57 FROM tab1
----
103
164
180

query I rowsort
SELECT + ( - col2 ) + col1 AS col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT - col2 + col2 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT 58 * - ( col0 * + col1 ) + 38 FROM tab2 AS cor0
----
-12548
-266878
-77856

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT ALL 72 FROM tab0 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

query I rowsort
SELECT DISTINCT + cor1.col1 FROM tab2 AS cor0 CROSS JOIN tab0, tab2 AS cor1
----
17
31
59

query I rowsort
SELECT 8 + - col2 + col2 FROM tab2
----
8
8
8

query I rowsort
SELECT DISTINCT - 96 AS col2 FROM tab0
----
-96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 + + 11 * + col2 col2 FROM tab2 AS cor0
----
208
290
339

query I rowsort
SELECT + col2 * + ( + col1 ) AS col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + ( - col0 ) + - 76 AS col2 FROM tab1
----
-140
-156
-79

query I rowsort
SELECT DISTINCT + + col2 * + 81 FROM tab0 cor0
----
2673
6642
81

query I rowsort
SELECT ALL ( - col0 ) * tab1.col0 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT - tab2.col1 + + 27 * 73 FROM tab2, tab1 AS cor0
----
1912
1940
1954

onlyif mysql # use DIV operator for integer division
query I rowsort label-6788
SELECT - 69 DIV col0 AS col1 FROM tab0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-6788
SELECT - 69 / col0 AS col1 FROM tab0
----
-1
-2
0

query I rowsort
SELECT DISTINCT + 1 * + col2 AS col1 FROM tab1
----
54
57
96

query I rowsort
SELECT 2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab0 AS cor2
----
81 values hashing to 6d1be3904d6870ba21bc766b979d1110

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6791
SELECT + col0 + CAST( NULL AS DECIMAL ) col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6791
SELECT + col0 + CAST ( NULL AS REAL ) col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 * 88 * + col2 + - cor0.col1 AS col1 FROM tab1 AS cor0
----
256582
285902
810995

query I rowsort
SELECT - + cor0.col2 * + col0 + col1 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT col2 * 45 FROM tab1 AS cor0
----
2430
2565
4320

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 AS cor0 CROSS JOIN tab1, tab1 cor1
----
972 values hashing to a8481bfbfcb330825976c5896e54bc19

query I rowsort
SELECT + + 91 + col0 * - col0 FROM tab2 AS cor0
----
-5993
-6150
42

query I rowsort
SELECT + ( - 15 ) * col1 FROM tab1 AS cor0
----
-150
-195
-390

query I rowsort
SELECT 35 * col0 FROM tab2 AS cor0
----
245
2730
2765

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6799
SELECT ALL CAST( NULL AS SIGNED ) + + col1 * - col2 AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6799
SELECT ALL CAST ( NULL AS INTEGER ) + + col1 * - col2 AS col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 52 AS col0 FROM tab1 AS cor0
----
-52

query I rowsort
SELECT DISTINCT + cor0.col1 + 9 AS col1 FROM tab1 AS cor0
----
19
22
35

query I rowsort
SELECT 51 * - col2 AS col0 FROM tab2 AS cor0
----
-1326
-1377
-1938

query I rowsort
SELECT ALL cor0.col0 * + col2 AS col0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT - 35 * 66 AS col2 FROM tab1 AS cor0
----
-2310
-2310
-2310

query I rowsort
SELECT ALL - + 84 FROM tab1 AS cor0
----
-84
-84
-84

query I rowsort
SELECT 86 + cor0.col2 * - cor0.col0 FROM tab2 cor0
----
-103
-1942
-2916

query I rowsort
SELECT - tab1.col0 + col0 * col2 FROM tab1
----
159
3584
7600

query I rowsort
SELECT - + col2 * - col2 FROM tab1 AS cor0
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-6809
SELECT - + col0 DIV + col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6809
SELECT - + col0 / + col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - 2 + + col0 FROM tab1
----
1
62
78

query I rowsort
SELECT DISTINCT - + col0 * - col1 + cor0.col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT DISTINCT + + col0 + + col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT DISTINCT - col0 * + col0 + col1 * 36 AS col0 FROM tab2 AS cor0
----
-3960
-5629
1067

onlyif mysql # use DIV operator for integer division
query I rowsort label-6814
SELECT ALL + cor0.col2 DIV + col1 AS col0 FROM tab1 cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-6814
SELECT ALL + cor0.col2 / + col1 AS col0 FROM tab1 cor0
----
2
5
7

query I rowsort
SELECT 95 AS col1 FROM tab0 AS cor0
----
95
95
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-6816
SELECT cor0.col2 DIV + col2 AS col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6816
SELECT cor0.col2 / + col2 AS col1 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT - col2 + - col0 * - 34 FROM tab1 AS cor0
----
2119
2624
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col2 + - col0 col1 FROM tab1 cor0
----
-7
16
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-6819
SELECT + col1 DIV + col2 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-6819
SELECT + col1 / + col2 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT ALL 0 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT DISTINCT + col0 + col1 * col0 AS col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT - + col2 + + cor0.col2 + col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL - + col2 * col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT DISTINCT - + col1 * - col2 AS col0 FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-6825
SELECT DISTINCT col0 DIV 48 FROM tab1 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-6825
SELECT DISTINCT col0 / 48 FROM tab1 AS cor0
----
0
1

query I rowsort
SELECT ALL - col2 * 88 AS col2 FROM tab1 AS cor0
----
-4752
-5016
-8448

query I rowsort
SELECT DISTINCT col0 + 7 FROM tab2 AS cor0
----
14
85
86

query I rowsort
SELECT - col2 * - 99 + + col2 + - col1 * - 65 FROM tab0 AS cor0
----
14115
6405
8890

query I rowsort
SELECT ALL - col1 * col2 + + 61 * col0 FROM tab2 AS cor0
----
-410
3224
4173

query I rowsort
SELECT DISTINCT + 74 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
74

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6831
SELECT - col0 * CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6831
SELECT - col0 * CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 99 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

query I rowsort
SELECT ALL + - col2 + - ( + col1 * col0 ) + col1 FROM tab1 AS cor0
----
-106
-1123
-687

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6834
SELECT DISTINCT CAST( NULL AS SIGNED ) FROM tab2, tab0 AS cor0, tab1 AS cor1, tab2 AS cor2
----
NULL

skipif mysql # not compatible
query I rowsort label-6834
SELECT DISTINCT CAST ( NULL AS INTEGER ) FROM tab2, tab0 AS cor0, tab1 AS cor1, tab2 AS cor2
----
NULL

query I rowsort
SELECT ALL - - col2 * + cor0.col1 + col0 FROM tab0 AS cor0
----
132
2862
7551

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 29 col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
29

query I rowsort
SELECT 6 + cor0.col2 * + tab0.col0 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to 408a283196f7bae2da43f6263e1296a8

query I rowsort
SELECT DISTINCT + - 12 + + col1 AS col0 FROM tab0 AS cor0
----
74
79
85

query I rowsort
SELECT + - col0 + col2 AS col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT ALL 26 FROM tab0, tab0 AS cor0
----
9 values hashing to 2d1c3129ed17fd721d4876b21c035584

query I rowsort
SELECT ALL + + cor0.col0 * - col1 * col1 FROM tab1 cor0
----
-13520
-2028
-6400

query I rowsort
SELECT - 96 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to c89b545346f99713888a7934e4caa539

query I rowsort
SELECT ( col1 ) - col1 FROM tab1
----
0
0
0

query I rowsort
SELECT col2 * col1 * + col1 + 52 FROM tab0
----
244120
679094
9461

query I rowsort
SELECT + - 5 FROM tab2 AS cor0
----
-5
-5
-5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6846
SELECT DISTINCT - CAST( - col0 + tab1.col0 AS SIGNED ) FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-6846
SELECT DISTINCT - CAST ( - col0 + tab1.col0 AS INTEGER ) FROM tab1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( + col2 ) col1 FROM tab2
----
26
27
38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6848
SELECT + CAST( NULL AS SIGNED ) - + col0 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6848
SELECT + CAST ( NULL AS INTEGER ) - + col0 AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT 86 + - tab2.col2 FROM tab2
----
48
59
60

query I rowsort
SELECT ALL col1 * + tab1.col0 + tab1.col0 * + col0 AS col2 FROM tab1
----
4736
7440
87

query I rowsort
SELECT ALL - col1 + + tab1.col0 * - col0 AS col1 FROM tab1
----
-35
-4106
-6413

query I rowsort
SELECT col2 + + col1 AS col2 FROM tab1
----
109
67
80

query I rowsort
SELECT DISTINCT - col2 + tab1.col1 * - col2 FROM tab1
----
-1344
-1458
-627

onlyif mysql # use DIV operator for integer division
query I rowsort label-6854
SELECT col0 * col2 + - col0 DIV col0 col2 FROM tab2
----
188
2027
3001

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6854
SELECT col0 * col2 + - col0 / col0 col2 FROM tab2
----
188
2027
3001

query I rowsort
SELECT ALL + col1 * + col1 * col1 + + col2 * col1 AS col0 FROM tab1
----
1570
18980
3445

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT ( col1 * - col0 + - col2 - col1 ) <> NULL
----

query I rowsort
SELECT - tab1.col0 * col2 * - col0 FROM tab1
----
233472
486
614400

query I rowsort
SELECT col2 * - col0 + col0 + - col2 AS col2 FROM tab2
----
-1976
-209
-2961

query I rowsort
SELECT DISTINCT col2 + + col1 + - col1 * + col2 AS col1 FROM tab1
----
-1139
-1324
-503

query I rowsort
SELECT DISTINCT + tab1.col0 + col1 AS col0 FROM tab1
----
29
74
93

query I rowsort
SELECT col1 * col2 - + col2 FROM tab1
----
1152
1350
513

query I rowsort
SELECT DISTINCT + col1 * - cor0.col1 AS col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL + cor0.col1 + col0 AS col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT - + 95 AS col2 FROM tab0 AS cor0
----
-95
-95
-95

query I rowsort
SELECT ALL col0 * - col2 * - col0 AS col1 FROM tab0
----
1225
19008
649522

query I rowsort
SELECT ALL col2 + - col0 * + col1 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT + col2 * col2 - + col0 FROM tab0
----
-34
1065
6635

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL IN ( col0 * tab2.col0 )
----

query I rowsort
SELECT ALL col2 * - col0 * - col0 FROM tab0
----
1225
19008
649522

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab2.col0 * + col1 * tab2.col2 col1 FROM tab2
----
119652
51034
5859

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + col2 col0 FROM tab1
----
108
114
192

query I rowsort
SELECT + col2 * + col2 + - col0 FROM tab1
----
2913
3185
9136

query I rowsort
SELECT ALL col2 * + col1 - + cor0.col1 AS col2 FROM tab2 AS cor0
----
1475
629
806

query I rowsort
SELECT col1 - col2 AS col0 FROM tab1 cor0
----
-28
-47
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col1 FROM tab0 AS cor0 WHERE col1 < NULL
----

query I rowsort
SELECT ALL + cor0.col2 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT DISTINCT + col0 AS col2 FROM tab2 AS cor0 WHERE NOT NULL IN ( + col2 / col2 - col1 )
----

query I rowsort
SELECT col1 * - col1 - tab2.col2 * tab2.col2 FROM tab2
----
-1690
-1733
-4157

query I rowsort
SELECT ALL + col1 * tab1.col0 + - col0 + - col0 AS col0 FROM tab1
----
512
72
880

query I rowsort
SELECT + col1 + - col0 - + col2 AS col2 FROM tab2
----
-100
-3
-45

query I rowsort
SELECT DISTINCT col0 * + col1 * + col0 AS col2 FROM tab0
----
118825
49536
720811

query I rowsort
SELECT + col1 AS col0 FROM tab1 WHERE NULL <> ( + col0 )
----

query I rowsort
SELECT ALL - col2 * - col1 + - tab2.col0 + - tab2.col1 * + col2 AS col1 FROM tab2
----
-7
-78
-79

query I rowsort
SELECT ALL - tab2.col2 * + col2 + - col2 + + col2 * col2 FROM tab2
----
-26
-27
-38

onlyif mysql # use DIV operator for integer division
query I rowsort label-6885
SELECT ALL col0 DIV - col1 + col0 + tab1.col2 * col2 * tab1.col1 FROM tab1
----
119882
32548
75819

skipif mysql # not compatible
query I rowsort label-6885
SELECT ALL col0 / - col1 + col0 + tab1.col2 * col2 * tab1.col1 FROM tab1
----
119882
32548
75819

query I rowsort
SELECT - tab2.col0 + - col0 FROM tab2
----
-14
-156
-158

query III rowsort
SELECT ALL * FROM tab2 WHERE + col2 + - col1 IN ( - col0 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - col0 + col1 * tab0.col2 col1 FROM tab0
----
132
14760
3630

query I rowsort
SELECT + 43 AS col2 FROM tab2, tab0 cor0
----
9 values hashing to 199105619049271147956de52e7f5ed4

query I rowsort
SELECT - + ( + 20 ) * col0 + 74 FROM tab1 cor0
----
-1206
-1526
14

query I rowsort
SELECT ALL 2 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

query I rowsort
SELECT - cor1.col1 * - cor1.col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to ae5946db6904798b8afac35f5777bb79

query I rowsort
SELECT ( col0 + col0 ) AS col0 FROM tab1
----
128
160
6

query I rowsort
SELECT 41 * col1 FROM tab1
----
1066
410
533

query I rowsort
SELECT + 50 AS col1 FROM tab1
----
50
50
50

query I rowsort
SELECT cor0.col0 * col1 * + col1 FROM tab1 AS cor0
----
13520
2028
6400

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6897
SELECT DISTINCT CAST( - ( col2 ) AS SIGNED ) + col2 AS col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6897
SELECT DISTINCT CAST ( - ( col2 ) AS INTEGER ) + col2 AS col2 FROM tab1 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - ( col0 ) - col2 * col2 col2 FROM tab0 AS cor0
----
-1113
-36
-6813

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col1 + + col1 col0 FROM tab0
----
2150
3492
8190

query I rowsort
SELECT DISTINCT + col2 * - tab1.col1 AS col1 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT col1 + col1 * col1 * - 42 FROM tab2 AS cor0
----
-12121
-146143
-40331

query I rowsort
SELECT DISTINCT + - col1 + + col2 * col2 FROM tab0 cor0
----
-96
1003
6633

onlyif mysql # use DIV operator for integer division
query I rowsort label-6904
SELECT ALL + + col1 DIV 48 AS col0 FROM tab0 cor0
----
1
1
2

skipif mysql # not compatible
query I rowsort label-6904
SELECT ALL + + col1 / 48 AS col0 FROM tab0 cor0
----
1
1
2

query I rowsort
SELECT col2 * 42 AS col2 FROM tab2 cor0
----
1092
1134
1596

query I rowsort
SELECT + col2 * + 59 FROM tab0 AS cor0
----
1947
4838
59

query I rowsort
SELECT DISTINCT tab0.col0 * + tab0.col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT - - ( - col1 ) AS col1 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT ALL cor0.col0 FROM tab2, tab1 cor0, tab0 cor1, tab1 AS cor2
----
81 values hashing to e28bf7f922650ca423ade3642ce0285b

query I rowsort
SELECT DISTINCT - col0 * + 86 + col2 FROM tab1 AS cor0
----
-204
-5447
-6784

query I rowsort
SELECT ALL - - col2 + 99 AS col2 FROM tab1 cor0
----
153
156
195

query I rowsort
SELECT col0 + col2 * + col0 * - col0 FROM tab2 AS cor0
----
-1316
-158106
-237079

query I rowsort
SELECT ALL 83 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 18f405c31a0fb47ce3cc9f7effa8855c

query I rowsort
SELECT + cor0.col1 * - ( + col0 ) FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-6915
SELECT col2 DIV cor0.col2 AS col0 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6915
SELECT col2 / cor0.col2 AS col0 FROM tab1 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-6916
SELECT 58 DIV ( + col1 ) AS col2 FROM tab2
----
0
1
3

skipif mysql # not compatible
query I rowsort label-6916
SELECT 58 / ( + col1 ) AS col2 FROM tab2
----
0
1
3

query I rowsort
SELECT DISTINCT + cor0.col0 * + cor0.col2 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT ALL + 13 * col2 + + col0 * col2 FROM tab0 AS cor0
----
1221
48
8364

query I rowsort
SELECT - col1 * - col2 + col1 FROM tab1 AS cor0
----
1261
1430
580

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col2 col0 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT 34 + + cor0.col0 + col2 FROM tab2 AS cor0
----
138
151
68

query I rowsort
SELECT DISTINCT - ( col1 ) * col0 + col0 FROM tab1 AS cor0
----
-576
-75
-960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6923
SELECT + CAST( NULL AS SIGNED ) + 71 - col0 * tab0.col2 AS col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6923
SELECT + CAST ( NULL AS INTEGER ) + 71 - col0 * tab0.col2 AS col2 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6924
SELECT DISTINCT 65 * - col0 - col2 DIV - col1 FROM tab0
----
-1560
-2275
-5785

skipif mysql # not compatible
query I rowsort label-6924
SELECT DISTINCT 65 * - col0 - col2 / - col1 FROM tab0
----
-1560
-2275
-5785

query I rowsort
SELECT ALL - ( col2 ) - col0 FROM tab1
----
-121
-176
-57

query I rowsort
SELECT - col1 + - 99 AS col2 FROM tab1
----
-109
-112
-125

query I rowsort
SELECT + col2 - + col1 FROM tab0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6928
SELECT DISTINCT ( + ( + col0 ) ) DIV + tab1.col1 AS col1 FROM tab1
----
0
6

skipif mysql # not compatible
query I rowsort label-6928
SELECT DISTINCT ( + ( + col0 ) ) / + tab1.col1 AS col1 FROM tab1
----
0
6

query I rowsort
SELECT DISTINCT tab1.col2 * 44 * + col2 FROM tab1
----
128304
142956
405504

query I rowsort
SELECT - ( col0 + col1 ) * - col0 AS col2 FROM tab1
----
4736
7440
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col0 col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT ALL - col2 + ( col1 + cor0.col1 ) AS col1 FROM tab0 cor0
----
100
139
193

query I rowsort
SELECT col2 + - 7 FROM tab1 AS cor0
----
47
50
89

query I rowsort
SELECT + ( col0 + + ( 85 ) ) FROM tab1
----
149
165
88

query I rowsort
SELECT DISTINCT 2 AS col1 FROM tab1
----
2

query I rowsort
SELECT ALL - + cor0.col1 AS col2 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to c7890469eabb2c6fc81454b35d2333b6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * + 21 col1 FROM tab1
----
1134
1197
2016

query I rowsort
SELECT - + col1 + ( - col0 ) AS col0 FROM tab0 cor0
----
-110
-132
-180

query I rowsort
SELECT ALL col0 * - tab2.col2 + tab2.col1 AS col0 FROM tab2
----
-158
-1969
-2985

query I rowsort
SELECT ALL - col0 + + col0 AS col1 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6941
SELECT DISTINCT col1 + col1 DIV col1 FROM tab1
----
11
14
27

skipif mysql # not compatible
query I rowsort label-6941
SELECT DISTINCT col1 + col1 / col1 FROM tab1
----
11
14
27

onlyif mysql # use DIV operator for integer division
query I rowsort label-6942
SELECT DISTINCT + - col1 DIV - col2 + - col1 AS col2 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-6942
SELECT DISTINCT + - col1 / - col2 + - col1 AS col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT col2 - - col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL - col2 * - col1 * - col0 AS col1 FROM tab0 cor0
----
-3395
-664118
-68112

query I rowsort
SELECT + col0 * - col2 * + col1 FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT ALL + col2 * col2 AS col0 FROM tab1
----
2916
3249
9216

query I rowsort
SELECT col1 * - col0 * - col2 FROM tab2
----
119652
51034
5859

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 - + col2 col1 FROM tab0
----
53
9
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6949
SELECT DISTINCT + col0 + col2 DIV col1 AS col2 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-6949
SELECT DISTINCT + col0 + col2 / col1 AS col2 FROM tab0
----
24
35
89

query I rowsort
SELECT - + col0 * col1 * col1 FROM tab0 AS cor0
----
-177504
-329315
-737009

query I rowsort
SELECT ALL + col1 + - col0 * + col2 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT col1 * + col0 - col1 FROM tab0 AS cor0
----
1978
3298
8008

onlyif mysql # use DIV operator for integer division
query I rowsort label-6953
SELECT ALL - - col0 DIV + col1 + - col0 FROM tab0 cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-6953
SELECT ALL - - col0 / + col1 + - col0 FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT ALL - col0 * col0 AS col0 FROM tab1 cor0
----
-4096
-6400
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-6955
SELECT ALL - - col0 * col2 + - col1 DIV col0 col2 FROM tab1 AS cor0
----
154
3648
7680

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6955
SELECT ALL - - col0 * col2 + - col1 / col0 col2 FROM tab1 AS cor0
----
154
3648
7680

query I rowsort
SELECT DISTINCT col2 + + col1 * - col0 AS col1 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT ALL col1 * - col1 + - col0 AS col2 FROM tab0 cor0
----
-7420
-8370
-9444

query I rowsort
SELECT DISTINCT - + col1 - + col0 AS col1 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT ALL - col2 * + cor0.col2 + col0 * col1 AS col1 FROM tab1 AS cor0
----
-2609
-2838
-8176

query I rowsort
SELECT ALL col1 * col1 + col2 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT ALL + col2 + + cor0.col2 * + col2 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT DISTINCT - - col2 + - col2 * - col0 AS col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT DISTINCT tab2.col2 + - col0 * + col0 AS col2 FROM tab2
----
-22
-6058
-6203

query I rowsort
SELECT DISTINCT + 4 + tab1.col2 * + col1 AS col2 FROM tab1
----
1252
1408
574

query I rowsort
SELECT - col1 + - col1 AS col1 FROM tab2
----
-118
-34
-62

query I rowsort
SELECT DISTINCT col0 + - tab1.col2 + col1 AS col0 FROM tab1
----
-25
-3
17

query I rowsort
SELECT ALL - cor0.col2 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT - 58 + col1 FROM tab2
----
-27
-41
1

query I rowsort
SELECT + - col1 + col0 + + col2 FROM tab2 cor0
----
100
3
45

query I rowsort
SELECT - 87 - + col0 FROM tab1 AS cor0
----
-151
-167
-90

query I rowsort
SELECT - - col0 * + cor0.col0 AS col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT - + col1 * col1 + col1 FROM tab0 AS cor0
----
-7310
-8190
-9312

query I rowsort
SELECT - ( + cor0.col2 ) + cor0.col1 * col0 AS col2 FROM tab2 cor0
----
1305
190
4576

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - ( - cor0.col0 ) * - cor0.col1 col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL - col2 + col0 * - col0 AS col0 FROM tab0 AS cor0
----
-1226
-609
-8003

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 56 * + tab0.col2 col1 FROM tab0
----
-1848
-4592
-56

onlyif mysql # use DIV operator for integer division
query I rowsort label-6977
SELECT ALL - col1 + + col0 - + col0 DIV col1 FROM tab1 AS cor0
----
-23
48
61

skipif mysql # not compatible
query I rowsort label-6977
SELECT ALL - col1 + + col0 - + col0 / col1 FROM tab1 AS cor0
----
-23
48
61

query I rowsort
SELECT - 95 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 1c7934db0632c123332c43f17b661d6c

onlyif mysql # use DIV operator for integer division
query I rowsort label-6979
SELECT DISTINCT - 81 + - col0 + CAST( - col2 + col2 AS SIGNED ) DIV col2 FROM tab1
----
-145
-161
-84

skipif mysql # not compatible
query I rowsort label-6979
SELECT DISTINCT - 81 + - col0 + CAST ( - col2 + col2 AS INTEGER ) / col2 FROM tab1
----
-145
-161
-84

query I rowsort
SELECT col0 + - col0 * ( tab0.col1 ) + col0 AS col0 FROM tab0
----
-2016
-3325
-7921

query I rowsort
SELECT ALL - 58 * col0 + cor0.col0 * 25 FROM tab1 AS cor0
----
-2112
-2640
-99

query I rowsort
SELECT - - cor0.col0 * col1 * 82 AS col2 FROM tab2 cor0
----
110126
17794
377364

query I rowsort
SELECT DISTINCT + 3 FROM tab1 cor0
----
3

query I rowsort
SELECT DISTINCT - cor0.col2 + + col0 * - col1 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT ALL col2 + - col0 * - ( - 23 ) FROM tab0 AS cor0
----
-1965
-519
-804

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 85 * col1 col1 FROM tab2 cor0
----
-1445
-2635
-5015

query I rowsort
SELECT DISTINCT - ( col2 ) AS col0 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT - + col0 * + col2 * - col2 AS col1 FROM tab1 AS cor0
----
207936
737280
8748

query I rowsort
SELECT ALL - + 51 * col0 FROM tab0 AS cor0
----
-1224
-1785
-4539

query I rowsort
SELECT + col2 * cor0.col0 AS col1 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT ALL col2 * + cor0.col2 AS col1 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT - + col2 * + cor0.col2 * cor0.col0 AS col1 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT - col2 + + 81 FROM tab2 AS cor0
----
43
54
55

query I rowsort
SELECT DISTINCT + cor0.col0 + col0 * col2 AS col2 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT - + col1 * col2 AS col1 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6996
SELECT - col2 * tab2.col0 DIV + ( - col1 ) + col2 * ( - col2 ) + - col1 AS col1 FROM tab2
----
-1285
-701
-754

skipif mysql # not compatible
query I rowsort label-6996
SELECT - col2 * tab2.col0 / + ( - col1 ) + col2 * ( - col2 ) + - col1 AS col1 FROM tab2
----
-1285
-701
-754

query I rowsort
SELECT ALL + + 51 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to d8bf0a05c9c4d2a93812d106baae4752

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 52 + + col2 * - col1 col0 FROM tab2 AS cor0
----
-1482
-594
-785

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + col0 + + col0 col0 FROM tab1 AS cor0
----
1120
704
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7000
SELECT ALL CAST( col0 AS SIGNED ) FROM tab1 cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-7000
SELECT ALL CAST ( col0 AS INTEGER ) FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT - 95 FROM tab2, tab0 AS cor0
----
9 values hashing to 1c7934db0632c123332c43f17b661d6c

query I rowsort
SELECT - ( + cor0.col0 ) AS col1 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT ALL - 82 * - col1 FROM tab1 AS cor0
----
1066
2132
820

query I rowsort
SELECT ALL + - col1 + cor0.col0 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT - col1 + col2 AS col0 FROM tab1 AS cor0
----
28
47
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-7006
SELECT - - ( + cor0.col2 ) DIV - col0 FROM tab1 AS cor0
----
-1
-18
0

skipif mysql # not compatible
query I rowsort label-7006
SELECT - - ( + cor0.col2 ) / - col0 FROM tab1 AS cor0
----
-1
-18
0

query I rowsort
SELECT DISTINCT + 84 * + col2 + - col2 + + 52 * ( col2 ) FROM tab1 AS cor0
----
12960
7290
7695

query I rowsort
SELECT DISTINCT col0 + 95 * - col0 AS col1 FROM tab2 AS cor0
----
-658
-7332
-7426

query I rowsort
SELECT DISTINCT - ( + cor0.col1 ) FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT - + ( + col0 ) * - col1 AS col2 FROM tab1 AS cor0
----
1040
640
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 2 col1 FROM tab0 AS cor0
----
2
2
2

query I rowsort
SELECT DISTINCT col1 * 1 FROM tab2
----
17
31
59

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2, tab2 AS cor0, tab0 cor1
----
972 values hashing to deaaa983f771be544ffdc26f04a18657

query I rowsort
SELECT ALL 12 * + col1 AS col1 FROM tab0 AS cor0
----
1032
1092
1164

query I rowsort
SELECT ALL + - 23 AS col0 FROM tab2 AS cor0
----
-23
-23
-23

query I rowsort
SELECT ALL + cor0.col0 + + col2 * col0 AS col1 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT DISTINCT + + ( - col1 ) * + 82 FROM tab2 AS cor0
----
-1394
-2542
-4838

query I rowsort
SELECT ALL tab2.col0 * + ( col2 ) AS col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT + 15 + 92 AS col0 FROM tab2
----
107
107
107

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 0 col0 FROM tab0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - col0 col0 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT col1 * - 35 FROM tab0
----
-3010
-3185
-3395

query I rowsort
SELECT + 70 AS col2 FROM tab0 cor0
----
70
70
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col2 col2 FROM tab1 cor0
----
1248
1404
570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7025
SELECT ALL - CAST( NULL AS SIGNED ) * 60 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-7025
SELECT ALL - CAST ( NULL AS INTEGER ) * 60 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( tab1.col0 ) col2 FROM tab1
----
3
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7027
SELECT - CAST( 67 AS SIGNED ) FROM tab2
----
-67
-67
-67

skipif mysql # not compatible
query I rowsort label-7027
SELECT - CAST ( 67 AS INTEGER ) FROM tab2
----
-67
-67
-67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 60 col0 FROM tab0, tab2 AS cor0
----
9 values hashing to a97561e17ecaa618227c75a57b268f33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 17 col2 FROM tab1
----
17
17
17

query I rowsort
SELECT DISTINCT 96 * + col2 + 89 FROM tab0 AS cor0
----
185
3257
7961

query I rowsort
SELECT ALL - col0 - - col1 * 89 * col0 AS col0 FROM tab1 AS cor0
----
56896
6939
92480

onlyif mysql # use DIV operator for integer division
query I rowsort label-7032
SELECT ALL - col2 DIV + tab1.col1 FROM tab1
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-7032
SELECT ALL - col2 / + tab1.col1 FROM tab1
----
-2
-5
-7

query I rowsort
SELECT + col1 + + ( - 68 ) + col0 * - col2 AS col2 FROM tab0
----
-6
-7275
-774

query I rowsort
SELECT DISTINCT + 97 AS col2 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
97

query I rowsort
SELECT ALL - col1 * - 36 + + col0 * col2 + + 44 AS col2 FROM tab2
----
1349
3658
4196

query I rowsort
SELECT DISTINCT - col1 + 21 FROM tab0
----
-65
-70
-76

onlyif mysql # use DIV operator for integer division
query I rowsort label-7037
SELECT - ( col2 ) * + col1 + - col2 DIV - 68 FROM tab2 cor0
----
-1534
-646
-837

skipif mysql # not compatible
query I rowsort label-7037
SELECT - ( col2 ) * + col1 + - col2 / - 68 FROM tab2 cor0
----
-1534
-646
-837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7038
SELECT + CAST( - cor0.col2 AS SIGNED ) + col2 * - 56 FROM tab1 AS cor0
----
-3078
-3249
-5472

skipif mysql # not compatible
query I rowsort label-7038
SELECT + CAST ( - cor0.col2 AS INTEGER ) + col2 * - 56 FROM tab1 AS cor0
----
-3078
-3249
-5472

onlyif mysql # use DIV operator for integer division
query I rowsort label-7039
SELECT col0 DIV ( col0 ) AS col1 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7039
SELECT col0 / ( col0 ) AS col1 FROM tab0
----
1
1
1

query I rowsort
SELECT ALL 24 * + tab0.col0 AS col0 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 50b3b40b4cb4405611fb6a969c767f09

query I rowsort
SELECT DISTINCT - 8 AS col0 FROM tab0, tab2 AS cor0
----
-8

query I rowsort
SELECT ALL - - col1 + col1 + col1 AS col1 FROM tab2 cor0
----
177
51
93

query I rowsort
SELECT DISTINCT - col0 * + col0 + cor0.col1 * - cor0.col2 AS col2 FROM tab2 AS cor0
----
-6887
-7618
-886

query I rowsort
SELECT ALL - col2 * - 97 + - col0 FROM tab0 AS cor0
----
3177
62
7865

onlyif mysql # use DIV operator for integer division
query I rowsort label-7045
SELECT ALL + ( - 72 ) DIV - col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7045
SELECT ALL + ( - 72 ) / - col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + + 73 * col0 AS col0 FROM tab0 AS cor0
----
1752
2555
6497

query I rowsort
SELECT ALL + + col0 + col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT + 50 * + cor0.col0 AS col2 FROM tab2 AS cor0
----
350
3900
3950

query I rowsort
SELECT 79 + + cor0.col1 FROM tab0 AS cor0
----
165
170
176

query I rowsort
SELECT + cor0.col1 + col2 AS col2 FROM tab2 AS cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-7051
SELECT DISTINCT + - 11 DIV col1 + - col0 AS col1 FROM tab2 AS cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-7051
SELECT DISTINCT + - 11 / col1 + - col0 AS col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL - - 21 * + 83 + + col2 FROM tab0 AS cor0
----
1744
1776
1825

query I rowsort
SELECT DISTINCT - 11 * col2 + + col2 - col2 * col0 FROM tab1 AS cor0
----
-4218
-702
-8640

query I rowsort
SELECT - cor0.col1 + cor0.col2 FROM tab1, tab1 cor0, tab0 AS cor1
----
27 values hashing to d091f4383dddbc092261e593dd3c3dac

onlyif mysql # use DIV operator for integer division
query I rowsort label-7055
SELECT - col1 DIV - col1 AS col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7055
SELECT - col1 / - col1 AS col1 FROM tab0 AS cor0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-7056
SELECT - col0 DIV - ( + 99 ) AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7056
SELECT - col0 / - ( + 99 ) AS col2 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7057
SELECT - ( - cor0.col1 ) + col2 DIV col1 AS col1 FROM tab2 AS cor0
----
19
31
59

skipif mysql # not compatible
query I rowsort label-7057
SELECT - ( - cor0.col1 ) + col2 / col1 AS col1 FROM tab2 AS cor0
----
19
31
59

query I rowsort
SELECT DISTINCT - + 8 + col2 FROM tab2 AS cor0
----
18
19
30

query I rowsort
SELECT ALL + 18 AS col0 FROM tab2 AS cor0
----
18
18
18

query I rowsort
SELECT - + cor0.col0 + 27 AS col0 FROM tab2 cor0
----
-51
-52
20

query I rowsort
SELECT + - ( - col0 ) * col1 AS col1 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT - - 61 * - ( - col2 ) AS col1 FROM tab1 AS cor0
----
3294
3477
5856

query I rowsort
SELECT ALL - col1 * 42 * 36 AS col2 FROM tab0
----
-130032
-137592
-146664

query I rowsort
SELECT + + col1 + 92 * col0 FROM tab2 AS cor0
----
675
7235
7285

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - + CAST ( + col2 AS REAL ) * col1 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT ALL 38 FROM tab2, tab2 AS cor0, tab1 cor1
----
27 values hashing to a7827a79248ee7bf2cee915a631d02cb

query I rowsort
SELECT + col0 + + col1 * - col2 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT col0 * - col2 + col2 * + col2 AS col0 FROM tab1 AS cor0
----
-399
1536
2754

onlyif mysql # use DIV operator for integer division
query I rowsort label-7069
SELECT + col0 * col0 DIV col2 + - 31 + - cor0.col0 FROM tab1 AS cor0
----
-24
-34
-45

skipif mysql # not compatible
query I rowsort label-7069
SELECT + col0 * col0 / col2 + - 31 + - cor0.col0 FROM tab1 AS cor0
----
-24
-34
-45

query I rowsort
SELECT 92 * - cor0.col2 FROM tab1 AS cor0
----
-4968
-5244
-8832

query I rowsort
SELECT col0 * - col2 + 11 AS col2 FROM tab2 AS cor0
----
-178
-2017
-2991

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col0 ) + col0 col2 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT + col0 * - col0 AS col0 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab2, tab1, tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + 51 * - col2 + ( 86 ) AS col2 FROM tab0 cor0
----
-1597
-4096
35

query I rowsort
SELECT 70 AS col2 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to c76157a7a7ec18de56823b2058b49f32

query I rowsort
SELECT - col2 + - 57 FROM tab1 AS cor0
----
-111
-114
-153

query I rowsort
SELECT ALL - col0 + - 39 FROM tab2 cor0
----
-117
-118
-46

query I rowsort
SELECT DISTINCT + - 37 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
-37

onlyif mysql # use DIV operator for integer division
query I rowsort label-7080
SELECT col0 DIV - cor0.col0 + 7 FROM tab2 AS cor0
----
6
6
6

skipif mysql # not compatible
query I rowsort label-7080
SELECT col0 / - cor0.col0 + 7 FROM tab2 AS cor0
----
6
6
6

query I rowsort
SELECT ALL + + col2 + + col2 * col0 AS col0 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT + col2 + col1 * - col0 AS col1 FROM tab0 AS cor0
----
-2031
-3394
-8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-7083
SELECT DISTINCT + col1 DIV + 1 FROM tab0 cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-7083
SELECT DISTINCT + col1 / + 1 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT - 30 AS col2 FROM tab0
----
-30
-30
-30

query I rowsort
SELECT + cor0.col1 + + ( + 63 ) * - col2 FROM tab1 AS cor0
----
-3376
-3581
-6035

query I rowsort
SELECT ALL + col0 - - col2 AS col0 FROM tab0 cor0
----
171
36
57

query I rowsort
SELECT DISTINCT + col1 - + 30 FROM tab1 AS cor0
----
-17
-20
-4

query I rowsort
SELECT DISTINCT - col1 + - col2 * - col2 FROM tab2 AS cor0
----
1427
617
698

query I rowsort
SELECT - 68 AS col0 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 6fbba7db5bccb533a35aa5125a231f88

query I rowsort
SELECT ALL - tab1.col0 * + 20 FROM tab1, tab1 AS cor0
----
9 values hashing to ccfb9472d49e97d47978520fbdf5cbf1

query I rowsort
SELECT DISTINCT + 76 AS col2 FROM tab1
----
76

query I rowsort
SELECT 11 * col0 + tab1.col0 FROM tab1
----
36
768
960

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7093
SELECT tab0.col0 - CAST( NULL AS SIGNED ) FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-7093
SELECT tab0.col0 - CAST ( NULL AS INTEGER ) FROM tab0, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL - col0 + tab1.col1 * col0 AS col0 FROM tab1
----
576
75
960

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 cor0 CROSS JOIN tab1, tab1 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to 9044210e7dc2a764fe944d925f222728

query I rowsort
SELECT col2 * col0 + col1 * col2 FROM tab2
----
1026
3562
3648

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 cor0 CROSS JOIN tab2, tab2 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to b8435223668db186a5012e4112253f28

query I rowsort
SELECT - cor0.col1 + - col0 AS col2 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT + cor0.col0 * - col2 + 6 + cor0.col1 FROM tab0 AS cor0
----
-700
-7201
68

query I rowsort
SELECT + + col2 + + ( col0 * cor0.col1 ) FROM tab1 AS cor0
----
1136
132
697

query I rowsort
SELECT ALL - col1 * + 80 + cor0.col2 AS col1 FROM tab1 AS cor0
----
-2026
-743
-944

query I rowsort
SELECT ALL col2 * - ( 17 ) FROM tab1 AS cor0
----
-1632
-918
-969

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + 37 col1 FROM tab1 AS cor0
----
133
91
94

query I rowsort
SELECT ALL - 0 * + tab0.col1 AS col1 FROM tab0
----
0
0
0

query I rowsort
SELECT col1 * - col1 - + col0 * ( + col0 ) AS col1 FROM tab2
----
-1010
-6530
-9565

query I rowsort
SELECT + ( 1 ) * + col0 * col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT + 5 AS col0 FROM tab2 cor0
----
5
5
5

query I rowsort
SELECT - - col0 * col0 AS col1 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT + tab1.col1 * tab1.col2 AS col1 FROM tab1, tab2, tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT DISTINCT - 14 * + col2 FROM tab2 AS cor0
----
-364
-378
-532

query I rowsort
SELECT DISTINCT + - 45 FROM tab0 cor0
----
-45

query I rowsort
SELECT col2 + col2 AS col0 FROM tab1 cor0
----
108
114
192

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + col0 col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL col1 * + col1 * col0 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT + + col0 * - col0 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT ALL - + col1 * col2 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-7117
SELECT ALL - col1 * - cor0.col2 + col0 DIV - col0 FROM tab2 AS cor0
----
1533
645
836

skipif mysql # not compatible
query I rowsort label-7117
SELECT ALL - col1 * - cor0.col2 + col0 / - col0 FROM tab2 AS cor0
----
1533
645
836

query I rowsort
SELECT ALL 30 FROM tab0, tab1 AS cor0
----
9 values hashing to da5de0c411a2c0f445400f1b63ea9f89

query I rowsort
SELECT + - 53 AS col0 FROM tab0 AS cor0
----
-53
-53
-53

onlyif mysql # use DIV operator for integer division
query I rowsort label-7120
SELECT cor0.col2 DIV - 58 FROM tab2, tab0, tab1 cor0
----
27 values hashing to a46f44f30b2183508f32c16a79479cd9

skipif mysql # not compatible
query I rowsort label-7120
SELECT cor0.col2 / - 58 FROM tab2, tab0, tab1 cor0
----
27 values hashing to a46f44f30b2183508f32c16a79479cd9

query I rowsort
SELECT col0 * col2 * col0 + + col0 FROM tab0
----
1260
19032
649611

query IIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
243 values hashing to 021da207cdc2a046fb0a79bf7cfc38ae

query I rowsort
SELECT + 77 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 051bf10c50e061d74ad0a4d205a1c622

query I rowsort
SELECT DISTINCT - tab1.col0 + ( col2 ) FROM tab1
----
-7
16
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-7125
SELECT ALL cor0.col0 DIV cor0.col0 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

skipif mysql # not compatible
query I rowsort label-7125
SELECT ALL cor0.col0 / cor0.col0 AS col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT ALL + col2 * - col2 + col0 AS col1 FROM tab2 AS cor0
----
-1365
-598
-722

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 56 col1 FROM tab1 cor0
----
-56
-56
-56

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7128
SELECT ALL - CAST( NULL AS DECIMAL ) + - col0 * col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7128
SELECT ALL - CAST ( NULL AS REAL ) + - col0 * col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + 70 AS col1 FROM tab0 AS cor0
----
70
70
70

query I rowsort
SELECT ALL - - col1 + + cor0.col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL + ( + col0 ) AS col2 FROM tab0 AS cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-7132
SELECT + ( col0 ) DIV + col2 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7132
SELECT + ( col0 ) / + col2 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT DISTINCT 57 * 23 FROM tab2 AS cor0
----
1311

query I rowsort
SELECT ALL col1 + + col1 AS col2 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT DISTINCT - + cor0.col0 + + cor0.col1 * col0 AS col2 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT + - cor0.col1 + - col0 AS col2 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT DISTINCT - + col2 + ( + col1 ) FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT + 33 FROM tab1
----
33
33
33

query I rowsort
SELECT - col0 * - col2 * + 39 + + col0 AS col0 FROM tab2
----
117157
7378
79170

query I rowsort
SELECT ALL + tab0.col2 AS col0 FROM tab0, tab2 cor0
----
9 values hashing to c8f9fa9ef0f8702bd382e821378a96d8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7141
SELECT + col1 / col1 + + ( col1 * - col1 + - CAST( NULL AS SIGNED ) ) col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7141
SELECT + col1 / col1 + + ( col1 * - col1 + - CAST ( NULL AS INTEGER ) ) col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + col1 * - col2 FROM tab1 AS cor0
----
-1248
-1404
-570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col0 + cor0.col2 - col1 col1 FROM tab1 AS cor0
----
111
163
31

query I rowsort
SELECT + + 53 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to fede6033dee346dbd272085c05724fda

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7145
SELECT ALL - - col0 * - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7145
SELECT ALL - - col0 * - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col1 + - col1 AS col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT DISTINCT col2 + + 45 * + 35 AS col0 FROM tab1 AS cor0
----
1629
1632
1671

query I rowsort
SELECT - col2 * 48 * ( - col1 + + 24 ) FROM tab2 AS cor0
----
-12768
43680
9072

query I rowsort
SELECT DISTINCT - col2 + col1 * + col0 AS col2 FROM tab2 cor0
----
1305
190
4576

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7150
SELECT DISTINCT col0 + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7150
SELECT DISTINCT col0 + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0, tab1 cor1, tab0, tab1 AS cor2
----
3645 values hashing to b3ea820890445d59f3f7464a1521d42d

onlyif mysql # use DIV operator for integer division
query I rowsort label-7152
SELECT col1 + col2 DIV + col0 AS col0 FROM tab1 AS cor0
----
10
14
44

skipif mysql # not compatible
query I rowsort label-7152
SELECT col1 + col2 / + col0 AS col0 FROM tab1 AS cor0
----
10
14
44

query I rowsort
SELECT ALL - col0 + + ( cor0.col0 ) FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7154
SELECT + CAST( NULL AS SIGNED ) AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-7154
SELECT + CAST ( NULL AS INTEGER ) AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # use DIV operator for integer division
query I rowsort label-7155
SELECT ALL col1 + col1 DIV + 81 AS col1 FROM tab1 cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-7155
SELECT ALL col1 + col1 / + 81 AS col1 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT ALL - col1 * - col0 - cor0.col0 FROM tab2 cor0
----
1264
210
4524

query I rowsort
SELECT ALL 67 - - 46 FROM tab0, tab2 AS cor0
----
9 values hashing to e8b0720b8386c308e7f43eb0f4e6aee1

query I rowsort
SELECT DISTINCT - cor0.col1 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
-86
-91
-97

query I rowsort
SELECT ALL - 96 FROM tab1 cor0 CROSS JOIN tab1 cor1
----
9 values hashing to c89b545346f99713888a7934e4caa539

query I rowsort
SELECT ALL - col0 * + ( - col2 ) + - col0 * col0 AS col0 FROM tab1 AS cor0
----
-448
1280
153

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * - col0 col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT + col2 + - cor0.col1 FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT ALL - cor0.col2 + ( - 28 ) AS col2 FROM tab2 AS cor0
----
-54
-55
-66

onlyif mysql # use DIV operator for integer division
query I rowsort label-7164
SELECT - cor0.col0 + col0 DIV - 62 FROM tab2 AS cor0
----
-7
-79
-80

skipif mysql # not compatible
query I rowsort label-7164
SELECT - cor0.col0 + col0 / - 62 FROM tab2 AS cor0
----
-7
-79
-80

query I rowsort
SELECT - col0 * col1 * col0 + cor0.col1 FROM tab1 AS cor0
----
-208
-40950
-83187

query I rowsort
SELECT cor0.col2 + - col1 * 54 FROM tab1 AS cor0
----
-1350
-483
-606

query I rowsort
SELECT 2 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

query I rowsort
SELECT + + col1 + col1 AS col1 FROM tab2 AS cor0
----
118
34
62

query I rowsort
SELECT - + 95 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 1c7934db0632c123332c43f17b661d6c

query I rowsort
SELECT ALL 95 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to e57d8ed879dfd04d04aae87725c970d3

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab0 cor2, tab1 cor3
----
3645 values hashing to ea1a922b7fccb9d184b31eb4689e063b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 83 col0 FROM tab2 AS cor0
----
83
83
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col1 col0 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT ALL - - cor0.col2 * col2 + - 27 * + cor0.col1 + col1 AS col1 FROM tab2 cor0
----
-77
-858
1002

query I rowsort
SELECT DISTINCT ( 41 ) + col2 * col1 + col2 AS col1 FROM tab2
----
1601
725
905

onlyif mysql # use DIV operator for integer division
query I rowsort label-7176
SELECT + col1 + col2 DIV + 38 + - col0 FROM tab2 AS cor0
----
-19
-61
24

skipif mysql # not compatible
query I rowsort label-7176
SELECT + col1 + col2 / + 38 + - col0 FROM tab2 AS cor0
----
-19
-61
24

query I rowsort
SELECT ( tab2.col0 ) * col2 AS col2 FROM tab2
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-7178
SELECT + col2 + col2 * - cor0.col1 DIV + col1 + col2 DIV + col0 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7178
SELECT + col2 + col2 * - cor0.col1 / + col1 + col2 / + col0 FROM tab0 AS cor0
----
0
0
1

query I rowsort
SELECT - - 53 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 866ae1b4ab9e5b4043ac1bcfd413aaa6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor0.col2 col2 FROM tab0, tab2, tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT col1 * tab2.col2 AS col2 FROM tab2
----
1534
646
837

query I rowsort
SELECT ALL - 37 * col2 AS col2 FROM tab2
----
-1406
-962
-999

query I rowsort
SELECT 58 * col0 FROM tab1
----
174
3712
4640

query I rowsort
SELECT DISTINCT - col0 * col2 + + col1 AS col1 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT ALL col1 * - col2 + col1 + - cor0.col2 FROM tab1 AS cor0
----
-1331
-1432
-617

query I rowsort
SELECT ALL ( - tab2.col0 ) + + col1 * + col2 FROM tab2
----
1456
567
830

query I rowsort
SELECT - 68 * - tab0.col1 + - col2 AS col2 FROM tab0
----
5815
6106
6595

query I rowsort
SELECT ALL - ( tab0.col2 ) AS col1 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT + 71 FROM tab0, tab2, tab2 cor0
----
27 values hashing to 95a6ff35b7b8f00868fb58bcaa32d0c2

query I rowsort
SELECT ALL cor0.col0 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7191
SELECT + 81 * col2 + + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7191
SELECT + 81 * col2 + + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7192
SELECT DISTINCT + col0 + col2 DIV + col1 FROM tab1 AS cor0
----
5
69
87

skipif mysql # not compatible
query I rowsort label-7192
SELECT DISTINCT + col0 + col2 / + col1 FROM tab1 AS cor0
----
5
69
87

query I rowsort
SELECT + + col2 * col1 + - col2 * + 23 AS col0 FROM tab0 AS cor0
----
2079
5576
74

query I rowsort
SELECT DISTINCT col1 * 31 * - col1 + - col2 - ( col2 ) FROM tab0
----
-229342
-256875
-291681

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7195
SELECT DISTINCT col2 * + CAST( + col0 AS SIGNED ) AS col2 FROM tab2
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-7195
SELECT DISTINCT col2 * + CAST ( + col0 AS INTEGER ) AS col2 FROM tab2
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-7196
SELECT - col0 DIV - 85 AS col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7196
SELECT - col0 / - 85 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT - tab2.col2 * - col2 AS col0 FROM tab2
----
1444
676
729

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 - - ( - col0 ) col2 FROM tab1
----
0
0
0

query I rowsort
SELECT - col0 + ( tab0.col2 * col1 ) + tab0.col1 FROM tab0
----
159
2900
7464

query I rowsort
SELECT - + col0 - ( + ( + col1 ) ) * + col0 FROM tab1 cor0
----
-1120
-704
-81

query I rowsort
SELECT - col2 - + col1 * col0 AS col0 FROM tab0 AS cor0
----
-2097
-3396
-8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-7202
SELECT + col1 * - col1 DIV - cor0.col1 - + col1 * + 76 * - col2 FROM tab2 AS cor0
----
116643
49113
63643

skipif mysql # not compatible
query I rowsort label-7202
SELECT + col1 * - col1 / - cor0.col1 - + col1 * + 76 * - col2 FROM tab2 AS cor0
----
116643
49113
63643

query I rowsort
SELECT - - 51 * col2 + - col2 AS col0 FROM tab1 AS cor0
----
2700
2850
4800

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * 32 + + cor0.col2 * ( col2 ) col2 FROM tab1 AS cor0
----
12288
4644
5073

query I rowsort
SELECT + 27 + + col2 + + col2 * col0 * ( + col1 * col0 + - col1 ) FROM tab0 AS cor0
----
115458
1566636
58442493

query I rowsort
SELECT + ( col1 ) * cor0.col2 + + ( + col0 ) AS col1 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT - 72 + col2 AS col2 FROM tab1 AS cor0
----
-15
-18
24

query I rowsort
SELECT 49 * + col0 + - col2 FROM tab2 AS cor0
----
316
3796
3833

query I rowsort
SELECT - + col0 + col2 * col0 AS col2 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT DISTINCT col2 * - 79 FROM tab1
----
-4266
-4503
-7584

query I rowsort
SELECT + col0 * + 64 * + tab2.col2 FROM tab2
----
12096
129792
192128

onlyif mysql # use DIV operator for integer division
query I rowsort label-7212
SELECT ALL + ( 46 ) DIV col0 + cor0.col0 FROM tab2 AS cor0
----
13
78
79

skipif mysql # not compatible
query I rowsort label-7212
SELECT ALL + ( 46 ) / col0 + cor0.col0 FROM tab2 AS cor0
----
13
78
79

query I rowsort
SELECT DISTINCT + - 44 + - 72 * + col2 AS col2 FROM tab2 AS cor0
----
-1916
-1988
-2780

query I rowsort
SELECT ALL + col2 * - 83 AS col0 FROM tab0 AS cor0
----
-2739
-6806
-83

query I rowsort
SELECT - - ( 92 ) + col0 * col2 FROM tab2 AS cor0
----
2120
281
3094

query I rowsort
SELECT DISTINCT - col1 * + col1 * col1 AS col2 FROM tab2 AS cor0
----
-205379
-29791
-4913

query I rowsort
SELECT - 28 FROM tab2, tab1 AS cor0
----
9 values hashing to c3e7fa3d059fc708f03c60e9cef0c115

query I rowsort
SELECT 18 * 79 FROM tab2 cor0
----
1422
1422
1422

query I rowsort
SELECT + ( col1 ) * col1 - 94 AS col1 FROM tab0 AS cor0
----
7302
8187
9315

query I rowsort
SELECT - 86 * - col2 AS col2 FROM tab0 AS cor0
----
2838
7052
86

query I rowsort
SELECT DISTINCT - + col2 + + 80 * cor0.col0 AS col2 FROM tab0 cor0
----
1887
2799
7038

query I rowsort
SELECT DISTINCT + 90 * + col0 FROM tab2 AS cor0
----
630
7020
7110

query I rowsort
SELECT - 50 * col1 AS col2 FROM tab0 AS cor0
----
-4300
-4550
-4850

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 20 col0 FROM tab0 AS cor0
----
-20

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * col0 + - col1 - col2 col0 FROM tab1
----
3581
7571
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7226
SELECT - col2 * - col2 * - CAST( - col2 * col0 AS SIGNED ) + + col1 col2 FROM tab1 AS cor0
----
11852362
472418
70778893

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7226
SELECT - col2 * - col2 * - CAST ( - col2 * col0 AS INTEGER ) + + col1 col2 FROM tab1 AS cor0
----
11852362
472418
70778893

query I rowsort
SELECT - 20 + col1 FROM tab0 AS cor0
----
66
71
77

query I rowsort
SELECT DISTINCT + - cor0.col1 * + col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT - cor0.col1 + col2 + - col1 FROM tab1 AS cor0
----
2
37
70

query I rowsort
SELECT DISTINCT + + 17 + cor0.col0 FROM tab0 AS cor0
----
106
41
52

query I rowsort
SELECT DISTINCT 4 + 9 * - col2 AS col0 FROM tab2
----
-230
-239
-338

query I rowsort
SELECT ALL + tab0.col1 + col2 + + col0 FROM tab0
----
133
143
262

query I rowsort
SELECT ALL - col1 * col0 * + tab1.col2 + - col0 FROM tab1
----
-36544
-4215
-99920

query I rowsort
SELECT DISTINCT col1 - + col2 FROM tab2
----
-21
33
4

query I rowsort
SELECT - ( col1 ) - col0 AS col0 FROM tab0
----
-110
-132
-180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7236
SELECT + CAST( NULL AS SIGNED ) + 64 * + col1 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7236
SELECT + CAST ( NULL AS INTEGER ) + 64 * + col1 AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col2 - - col0 FROM tab2
----
-20
41
52

query I rowsort
SELECT ALL col2 * col0 * - cor0.col1 + col0 AS col1 FROM tab1 AS cor0
----
-36416
-4209
-99760

query I rowsort
SELECT - col2 + 13 AS col0 FROM tab1 AS cor0
----
-41
-44
-83

query I rowsort
SELECT + - col2 * - ( ( - col2 ) ) FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT ALL + col1 + col1 * - col1 AS col1 FROM tab1 AS cor0
----
-156
-650
-90

query I rowsort
SELECT DISTINCT + - col0 - cor0.col1 AS col2 FROM tab0 AS cor0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT + + col1 * - ( - col0 ) * col0 AS col2 FROM tab2 AS cor0
----
106097
1519
358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-7244
SELECT ALL - col2 DIV ( col0 ) AS col0 FROM tab0 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-7244
SELECT ALL - col2 / ( col0 ) AS col0 FROM tab0 AS cor0
----
-1
0
0

query I rowsort
SELECT - col0 + + 97 FROM tab2 AS cor0
----
18
19
90

query I rowsort
SELECT ALL + col1 + col2 * - ( col2 ) * - col1 AS col2 FROM tab2 AS cor0
----
22630
24565
39943

query I rowsort
SELECT - + cor0.col1 * - 48 FROM tab1 cor0
----
1248
480
624

query I rowsort
SELECT ALL - - col0 + + ( + col2 * col1 ) FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT DISTINCT + col2 * 79 FROM tab1 AS cor0
----
4266
4503
7584

query I rowsort
SELECT ALL + col0 * 75 + + col1 * - col1 FROM tab2 AS cor0
----
-436
2369
5636

onlyif mysql # use DIV operator for integer division
query I rowsort label-7251
SELECT DISTINCT 54 * col1 DIV ( - col1 ) FROM tab1
----
-54

skipif mysql # not compatible
query I rowsort label-7251
SELECT DISTINCT 54 * col1 / ( - col1 ) FROM tab1
----
-54

query I rowsort
SELECT DISTINCT - col2 * - 65 + + col0 - col2 * 54 FROM tab0 AS cor0
----
387
46
991

query I rowsort
SELECT + 32 AS col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to cf4f01ac97eb83445b1721f3ae28961a

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + CAST ( - 70 AS REAL ) * col0 FROM tab2 AS cor0
----
-490
-5460
-5530

query I rowsort
SELECT DISTINCT 77 AS col2 FROM tab0, tab0 cor0
----
77

query IIIIIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 cor0 CROSS JOIN tab1, tab0 AS cor1, tab2, tab2 AS cor2, tab0
----
13122 values hashing to 82c39dacd43aaf38a88ea54d69b13597

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab0 AS cor2
----
972 values hashing to 9345325155d9f4d7dc4986690c631cb9

query I rowsort
SELECT + 31 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab2 AS cor2
----
81 values hashing to 0bb6d1445d82a11417f7bb2ec248ca9c

query I rowsort
SELECT DISTINCT + - 47 - - col0 FROM tab1 AS cor0
----
-44
17
33

query I rowsort
SELECT ALL - col2 + + cor0.col1 * - col2 * + cor0.col2 AS col0 FROM tab1 AS cor0
----
-119904
-32547
-75870

query I rowsort
SELECT ALL + - 33 * + col0 + - col2 * - col1 + - col0 * + col2 AS col1 FROM tab1 AS cor0
----
-5190
-9072
1143

query I rowsort
SELECT DISTINCT - + 17 * col1 * + col2 FROM tab2 cor0
----
-10982
-14229
-26078

query I rowsort
SELECT DISTINCT col2 + col1 * cor0.col1 + 31 FROM tab2 AS cor0
----
1019
3538
358

query I rowsort
SELECT + col2 * + cor0.col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT + 59 AS col2 FROM tab2 AS cor0
----
59
59
59

query I rowsort
SELECT ALL col2 * cor0.col0 + ( + cor0.col1 + cor0.col2 ) AS col2 FROM tab1 AS cor0
----
242
3715
7789

query I rowsort
SELECT ALL - ( - cor0.col1 ) * - col0 * col1 + - col0 FROM tab2 cor0
----
-22910
-271596
-6734

query I rowsort
SELECT DISTINCT - + 37 * col2 AS col0 FROM tab1 AS cor0
----
-1998
-2109
-3552

query I rowsort
SELECT DISTINCT 92 + col2 AS col0 FROM tab0
----
125
174
93

query I rowsort
SELECT 23 + col1 AS col1 FROM tab0
----
109
114
120

query I rowsort
SELECT DISTINCT ( tab0.col2 ) + - col1 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT + 2 * - col1 FROM tab0 AS cor0
----
-172
-182
-194

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7273
SELECT ALL CAST( + col1 * + col0 AS SIGNED ) + - col2 AS col2 FROM tab2
----
1305
190
4576

skipif mysql # not compatible
query I rowsort label-7273
SELECT ALL CAST ( + col1 * + col0 AS INTEGER ) + - col2 AS col2 FROM tab2
----
1305
190
4576

query I rowsort
SELECT col0 * + col1 + col2 AS col0 FROM tab0 AS cor0
----
2097
3396
8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-7275
SELECT ALL col1 + col2 DIV col0 AS col2 FROM tab1 AS cor0
----
10
14
44

skipif mysql # not compatible
query I rowsort label-7275
SELECT ALL col1 + col2 / col0 AS col2 FROM tab1 AS cor0
----
10
14
44

query I rowsort
SELECT ALL tab1.col1 * - col2 * - col0 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT DISTINCT 56 * col2 FROM tab1
----
3024
3192
5376

query I rowsort
SELECT DISTINCT ( cor0.col1 ) * col2 AS col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT + - 72 * - col0 AS col2 FROM tab2 AS cor0
----
504
5616
5688

onlyif mysql # use DIV operator for integer division
query I rowsort label-7280
SELECT ALL col1 * - col2 + col0 * + col0 + - col2 DIV + col1 AS col0 FROM tab0 AS cor0
----
-2262
1128
459

skipif mysql # not compatible
query I rowsort label-7280
SELECT ALL col1 * - col2 + col0 * + col0 + - col2 / + col1 AS col0 FROM tab0 AS cor0
----
-2262
1128
459

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 11 col2 FROM tab1, tab1 AS cor0
----
-11

query I rowsort
SELECT DISTINCT + ( + 96 ) AS col1 FROM tab0
----
96

query I rowsort
SELECT DISTINCT + 47 FROM tab1
----
47

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7284
SELECT CAST( - ( - col0 ) AS SIGNED ) AS col1 FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort label-7284
SELECT CAST ( - ( - col0 ) AS INTEGER ) AS col1 FROM tab2
----
7
78
79

query I rowsort
SELECT 92 * + col2 AS col1 FROM tab0
----
3036
7544
92

query I rowsort
SELECT DISTINCT + col2 + + tab2.col2 * - col1 FROM tab2
----
-1508
-608
-810

query I rowsort
SELECT + ( ( - tab0.col2 ) ) + + 37 AS col1 FROM tab0
----
-45
36
4

query I rowsort
SELECT - ( col1 ) * - col2 + + col0 + + col0 * tab2.col0 FROM tab2
----
6966
7696
893

query I rowsort
SELECT ALL - + 17 FROM tab0 cor0
----
-17
-17
-17

query I rowsort
SELECT 55 * col0 AS col1 FROM tab2 AS cor0
----
385
4290
4345

query I rowsort
SELECT DISTINCT + ( col1 ) * col1 AS col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT - ( + ( col2 ) ) + col1 AS col0 FROM tab1 AS cor0
----
-28
-47
-83

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 cor0, tab2 AS cor1, tab0 AS cor2
----
972 values hashing to deaaa983f771be544ffdc26f04a18657

query I rowsort
SELECT DISTINCT + ( col1 ) + col0 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7295
SELECT + CAST( col1 AS SIGNED ) FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-7295
SELECT + CAST ( col1 AS INTEGER ) FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT ALL - col1 * + col2 * - col2 FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT DISTINCT - - col1 + col0 * - col0 AS col2 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT ALL + 90 * - col2 FROM tab0
----
-2970
-7380
-90

query I rowsort
SELECT - 52 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 9500afe5646d620d5e8943351a29d082

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7300
SELECT DISTINCT + CAST( NULL AS SIGNED ) * + 64 AS col2 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-7300
SELECT DISTINCT + CAST ( NULL AS INTEGER ) * + 64 AS col2 FROM tab1
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7301
SELECT + + ( - col2 ) + col1 DIV ( - cor0.col2 ) FROM tab0 AS cor0
----
-35
-83
-98

skipif mysql # not compatible
query I rowsort label-7301
SELECT + + ( - col2 ) + col1 / ( - cor0.col2 ) FROM tab0 AS cor0
----
-35
-83
-98

query I rowsort
SELECT ALL + ( 74 ) * + col0 * - col0 FROM tab0 cor0
----
-42624
-586154
-90650

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7303
SELECT DISTINCT + CAST( - col1 AS SIGNED ) AS col2 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-7303
SELECT DISTINCT + CAST ( - col1 AS INTEGER ) AS col2 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT + 39 + - 63 AS col2 FROM tab2 AS cor0
----
-24
-24
-24

onlyif mysql # use DIV operator for integer division
query I rowsort label-7305
SELECT - 16 + 33 + col2 DIV col2 FROM tab0 AS cor0
----
18
18
18

skipif mysql # not compatible
query I rowsort label-7305
SELECT - 16 + 33 + col2 / col2 FROM tab0 AS cor0
----
18
18
18

query I rowsort
SELECT + - 40 - + col1 FROM tab0 AS cor0
----
-126
-131
-137

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 82 col0 FROM tab2
----
-82
-82
-82

query I rowsort
SELECT + 95 AS col2 FROM tab0 AS cor0
----
95
95
95

query I rowsort
SELECT - - col2 * cor0.col1 AS col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT + cor1.col0 AS col1 FROM tab2, tab1 cor0, tab0 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT col1 + - cor0.col2 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT DISTINCT - col1 + - ( + col1 ) AS col2 FROM tab0 AS cor0
----
-172
-182
-194

onlyif mysql # use DIV operator for integer division
query I rowsort label-7313
SELECT DISTINCT - cor0.col0 DIV 41 + + col2 + - col2 FROM tab2 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-7313
SELECT DISTINCT - cor0.col0 / 41 + + col2 + - col2 FROM tab2 AS cor0
----
-1
0

query I rowsort
SELECT ALL + col0 * - col0 AS col0 FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT 56 FROM tab2, tab1 cor0, tab2 AS cor1
----
27 values hashing to b5ba4b44e3deadce1edb30e76df61200

query I rowsort
SELECT DISTINCT col2 * - 67 FROM tab2 AS cor0
----
-1742
-1809
-2546

query I rowsort
SELECT ALL col2 + ( - 16 ) FROM tab0 AS cor0
----
-15
17
66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7318
SELECT cor0.col1 * CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7318
SELECT cor0.col1 * 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-7319
SELECT - + col1 DIV col2 col1 FROM tab0 AS cor0
----
-1
-2
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7319
SELECT - + col1 / col2 col1 FROM tab0 AS cor0
----
-1
-2
-97

query I rowsort
SELECT - cor0.col1 * - col2 - col0 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT + - col0 * 1 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - ( ( + col2 ) ) - + 16 FROM tab2 AS cor0
----
-42
-43
-54

query I rowsort
SELECT - 51 - - ( col2 + + 44 ) * + cor0.col1 FROM tab0 cor0
----
11415
4314
6571

query I rowsort
SELECT + - 44 * col0 AS col0 FROM tab2 AS cor0
----
-308
-3432
-3476

query I rowsort
SELECT - 37 * col1 * col0 + 1 AS col0 FROM tab2 AS cor0
----
-170273
-49690
-8028

query I rowsort
SELECT - ( col0 ) * col0 FROM tab0 AS cor0
----
-1225
-576
-7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col2 + col0 col2 FROM tab0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-7328
SELECT col2 + - col0 DIV + 45 AS col1 FROM tab1 AS cor0
----
54
56
95

skipif mysql # not compatible
query I rowsort label-7328
SELECT col2 + - col0 / + 45 AS col1 FROM tab1 AS cor0
----
54
56
95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - col0 + - cor0.col1 col1 FROM tab2 cor0
----
-6143
-6258
-80

query I rowsort
SELECT DISTINCT + col1 + 66 AS col1 FROM tab1 AS cor0
----
76
79
92

query I rowsort
SELECT - col2 + 1 AS col1 FROM tab2 AS cor0
----
-25
-26
-37

query I rowsort
SELECT DISTINCT col2 + 88 FROM tab2 AS cor0
----
114
115
126

query I rowsort
SELECT - col1 * + col1 + ( col0 ) FROM tab0 AS cor0
----
-7372
-8192
-9374

query I rowsort
SELECT DISTINCT - 68 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
-68

query I rowsort
SELECT ALL - tab2.col1 * col0 * + ( tab2.col0 * col1 ) + tab2.col1 + - col2 FROM tab2
----
-1803670
-21178371
-47085

query I rowsort
SELECT ALL 66 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 29794915b585eea848ad670075452c88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 col2 FROM tab1 cor0
----
3
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7338
SELECT DISTINCT - 37 * col2 * CAST( + 38 AS SIGNED ) - col1 FROM tab2 AS cor0
----
-36615
-37993
-53445

skipif mysql # not compatible
query I rowsort label-7338
SELECT DISTINCT - 37 * col2 * CAST ( + 38 AS INTEGER ) - col1 FROM tab2 AS cor0
----
-36615
-37993
-53445

query I rowsort
SELECT ALL - 44 FROM tab0
----
-44
-44
-44

query I rowsort
SELECT DISTINCT + 77 FROM tab2, tab0 cor0
----
77

query I rowsort
SELECT + + 40 AS col1 FROM tab0 AS cor0
----
40
40
40

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( + ( - col0 ) + 53 AS REAL ) AS col0 FROM tab2
----
-46
25
26

query I rowsort
SELECT - col1 + cor0.col2 * col1 FROM tab1 AS cor0
----
1235
1378
560

query I rowsort
SELECT - 44 * + col1 + + col0 AS col1 FROM tab0 AS cor0
----
-3760
-3915
-4233

query I rowsort
SELECT + ( cor0.col1 ) FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT DISTINCT + cor0.col2 AS col2 FROM tab1, tab2 AS cor0
----
26
27
38

query I rowsort
SELECT col0 * + col1 + ( cor0.col1 ) FROM tab1 cor0
----
104
1053
650

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7348
SELECT ALL - - 66 + + col1 + CAST( + 58 * - col2 AS SIGNED ) FROM tab1 AS cor0
----
-3040
-3230
-5489

skipif mysql # not compatible
query I rowsort label-7348
SELECT ALL - - 66 + + col1 + CAST ( + 58 * - col2 AS INTEGER ) FROM tab1 AS cor0
----
-3040
-3230
-5489

query I rowsort
SELECT + + col2 + - cor0.col0 AS col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT 68 AS col1 FROM tab1 AS cor0
----
68
68
68

query I rowsort
SELECT - col0 + - col2 * col1 AS col1 FROM tab1
----
-1328
-1407
-634

query I rowsort
SELECT col2 * col2 + - 96 AS col0 FROM tab0
----
-95
6628
993

onlyif mysql # use DIV operator for integer division
query I rowsort label-7353
SELECT DISTINCT 0 DIV tab1.col1 AS col2 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-7353
SELECT DISTINCT 0 / tab1.col1 AS col2 FROM tab1
----
0

query I rowsort
SELECT + 57 AS col0 FROM tab0
----
57
57
57

query I rowsort
SELECT DISTINCT col2 * col2 * - col2 AS col0 FROM tab2
----
-17576
-19683
-54872

query I rowsort
SELECT ALL 85 * + col0 FROM tab1
----
255
5440
6800

query I rowsort
SELECT col0 * col0 + ( col0 ) AS col1 FROM tab1
----
12
4160
6480

query I rowsort
SELECT DISTINCT + col0 * col1 * col1 AS col0 FROM tab1
----
13520
2028
6400

onlyif mysql # use DIV operator for integer division
query I rowsort label-7359
SELECT DISTINCT + col2 DIV col1 FROM tab2 AS cor0
----
0
2

skipif mysql # not compatible
query I rowsort label-7359
SELECT DISTINCT + col2 / col1 FROM tab2 AS cor0
----
0
2

query I rowsort
SELECT 89 AS col0 FROM tab0
----
89
89
89

query I rowsort
SELECT - - col0 * - cor0.col2 AS col0 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT ( col2 ) * col1 AS col0 FROM tab0 AS cor0
----
2838
7462
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-7363
SELECT + col1 + col0 * col0 DIV col2 AS col0 FROM tab1 AS cor0
----
26
79
81

skipif mysql # not compatible
query I rowsort label-7363
SELECT + col1 + col0 * col0 / col2 AS col0 FROM tab1 AS cor0
----
26
79
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col0 * - col1 * + col2 col1 FROM tab2 AS cor0
----
-119574
-50955
-5852

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - cor0.col2 * cor0.col2 col0 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT - col1 * + 22 AS col1 FROM tab1 AS cor0
----
-220
-286
-572

query I rowsort
SELECT DISTINCT col2 * 66 FROM tab0 AS cor0
----
2178
5412
66

query I rowsort
SELECT DISTINCT - + col2 * ( col2 ) AS col0 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT + col2 * 94 - - col1 * col2 FROM tab0 AS cor0
----
15170
191
5940

query I rowsort
SELECT DISTINCT + + col1 * - 8 + col1 FROM tab1 AS cor0
----
-182
-70
-91

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab0, tab1 AS cor0, tab2 cor1
----
972 values hashing to f0b9665afa0b835e4e5097af17c51766

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 2 + col0 col0 FROM tab1
----
5
66
82

query I rowsort
SELECT + + col1 - - col2 AS col0 FROM tab1 AS cor0
----
109
67
80

onlyif mysql # use DIV operator for integer division
query I rowsort label-7374
SELECT ALL col0 * - col2 + col0 DIV col2 AS col2 FROM tab0 AS cor0
----
-7297
-792
0

skipif mysql # not compatible
query I rowsort label-7374
SELECT ALL col0 * - col2 + col0 / col2 AS col2 FROM tab0 AS cor0
----
-7297
-792
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7375
SELECT DISTINCT - col0 DIV - col0 + col0 * - col2 FROM tab0 AS cor0
----
-34
-7297
-791

skipif mysql # not compatible
query I rowsort label-7375
SELECT DISTINCT - col0 / - col0 + col0 * - col2 FROM tab0 AS cor0
----
-34
-7297
-791

query I rowsort
SELECT DISTINCT col0 * cor0.col2 - - col1 AS col1 FROM tab0 cor0
----
132
7389
878

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + 92 col2 FROM tab2 AS cor0
----
109
123
151

query I rowsort
SELECT - 78 AS col1 FROM tab0 cor0
----
-78
-78
-78

query I rowsort
SELECT ALL + ( + col2 ) * col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT + 41 + - col0 FROM tab0 AS cor0
----
-48
17
6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7381
SELECT CAST( col1 AS SIGNED ) + + col2 AS col0 FROM tab2 AS cor0
----
55
58
85

skipif mysql # not compatible
query I rowsort label-7381
SELECT CAST ( col1 AS INTEGER ) + + col2 AS col0 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL - ( + ( - col1 ) ) FROM tab2 AS cor0
----
17
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-7383
SELECT + cor0.col0 DIV col2 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-7383
SELECT + cor0.col0 / col2 FROM tab1 AS cor0
----
0
0
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7384
SELECT DISTINCT + - CAST( NULL AS SIGNED ) + - col1 * - col1 AS col1 FROM tab2 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-7384
SELECT DISTINCT + - CAST ( NULL AS INTEGER ) + - col1 * - col1 AS col1 FROM tab2 cor0
----
NULL

query I rowsort
SELECT DISTINCT + + ( 91 ) * col0 AS col0 FROM tab2 AS cor0
----
637
7098
7189

query I rowsort
SELECT ALL ( + col1 ) + col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT ALL + 31 FROM tab1, tab1 AS cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

query I rowsort
SELECT ALL - 60 + col2 * - col2 FROM tab1 AS cor0
----
-2976
-3309
-9276

query I rowsort
SELECT + col2 + + 4 FROM tab2 AS cor0
----
30
31
42

query I rowsort
SELECT ALL - - 35 * 57 AS col2 FROM tab0 cor0
----
1995
1995
1995

query I rowsort
SELECT DISTINCT - col1 + col0 AS col2 FROM tab0 AS cor0
----
-2
-62

query I rowsort
SELECT DISTINCT 94 FROM tab2 AS cor0
----
94

query I rowsort
SELECT 10 + cor0.col2 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to f61e00821209332259822747e9f86b3b

onlyif mysql # use DIV operator for integer division
query I rowsort label-7394
SELECT ALL - cor0.col1 DIV col1 AS col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7394
SELECT ALL - cor0.col1 / col1 AS col0 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL 84 * + col1 AS col1 FROM tab2 AS cor0
----
1428
2604
4956

query I rowsort
SELECT DISTINCT + 86 + + col2 AS col2 FROM tab1 AS cor0
----
140
143
182

query I rowsort
SELECT ALL - 37 AS col0 FROM tab0, tab0 AS cor0 CROSS JOIN tab2
----
27 values hashing to 395d44ccbce08828bc493e93ec3d9207

onlyif mysql # use DIV operator for integer division
query I rowsort label-7398
SELECT - col2 DIV 91 AS col2 FROM tab2
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7398
SELECT - col2 / 91 AS col2 FROM tab2
----
0
0
0

query I rowsort
SELECT 4 FROM tab0
----
4
4
4

query I rowsort
SELECT + 54 AS col0 FROM tab2
----
54
54
54

query I rowsort
SELECT ALL - 74 FROM tab1
----
-74
-74
-74

query I rowsort
SELECT + 4 FROM tab0, tab1, tab1 AS cor0
----
27 values hashing to 730dff78e83112374961ea711f98ebaa

query I rowsort
SELECT ALL + 48 * - col1 AS col0 FROM tab1 AS cor0
----
-1248
-480
-624

query I rowsort
SELECT DISTINCT - ( + 42 ) * - col2 + col0 * col2 * col1 FROM tab1 cor0
----
103872
38874
6480

query I rowsort
SELECT DISTINCT 6 AS col0 FROM tab1, tab2 AS cor0, tab0 AS cor1, tab2 cor2
----
6

query I rowsort
SELECT ALL + col0 * + 11 * col2 FROM tab1 AS cor0
----
1782
40128
84480

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 - + col2 * - col0 col2 FROM tab0 AS cor0
----
132
7389
878

query I rowsort
SELECT + 68 + col1 * col2 AS col2 FROM tab1 AS cor0
----
1316
1472
638

query I rowsort
SELECT 7 + cor0.col0 FROM tab1 AS cor0
----
10
71
87

query I rowsort
SELECT DISTINCT + col1 + col1 FROM tab1 cor0
----
20
26
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7411
SELECT ALL + ( - col2 ) - - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7411
SELECT ALL + ( - col2 ) - - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 32 + col1 FROM tab1 AS cor0
----
42
45
58

query I rowsort
SELECT ALL 18 + 98 AS col0 FROM tab1
----
116
116
116

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7414
SELECT ALL - CAST( NULL AS SIGNED ) + + col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7414
SELECT ALL - CAST ( NULL AS INTEGER ) + + col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT + 41 + - col0 * col0 FROM tab1
----
-4055
-6359
32

onlyif mysql # use DIV operator for integer division
query I rowsort label-7416
SELECT + ( + tab0.