sqllogictest
Artifact Content
Not logged in

Artifact 55da8a9ea04ea954cf48670bae8046ef77d7f8f2:


hash-threshold 8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-4
SELECT ( 68 ) DIV - col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4
SELECT ( 68 ) / - col1 FROM tab0 AS cor0
----
0
0
0

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

query I rowsort
SELECT + 11 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to f4d199584b44732f1a897e6691b4ea00

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 11 * + col0 col1 FROM tab0 AS cor0
----
-264
-385
-979

query I rowsort
SELECT ALL - cor0.col0 AS col2 FROM tab1, tab0 cor0
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

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

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

query I rowsort
SELECT - 90 + col0 * + col1 FROM tab2 AS cor0
----
1253
127
4512

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

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

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

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

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

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

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

query I rowsort
SELECT + 77 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 051bf10c50e061d74ad0a4d205a1c622

query I rowsort
SELECT + 86 AS col1 FROM tab0
----
86
86
86

query I rowsort
SELECT cor0.col2 + 78 * + cor0.col0 * col1 AS col0 FROM tab0 AS cor0
----
161025
264811
631804

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-22
SELECT - 74 DIV - ( col1 * col2 ) FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-22
SELECT - 74 / - ( col1 * col2 ) FROM tab1
----
0
0
0

query I rowsort
SELECT 37 * col1 FROM tab2
----
1147
2183
629

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

query I rowsort
SELECT 93 + col0 FROM tab2 AS cor0
----
100
171
172

query I rowsort
SELECT - - 89 * col0 * col0 FROM tab2 AS cor0
----
4361
541476
555449

onlyif mysql # use DIV operator for integer division
query I rowsort label-27
SELECT col0 * col1 + - col0 DIV cor0.col0 FROM tab0 AS cor0
----
2063
3394
8098

skipif mysql # not compatible
query I rowsort label-27
SELECT col0 * col1 + - col0 / cor0.col0 FROM tab0 AS cor0
----
2063
3394
8098

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

query I rowsort
SELECT 13 + col2 AS col2 FROM tab1 AS cor0
----
109
67
70

query I rowsort
SELECT - - 12 + col2 AS col1 FROM tab1 AS cor0
----
108
66
69

query I rowsort
SELECT ( 53 ) FROM tab1
----
53
53
53

onlyif mysql # use DIV operator for integer division
query I rowsort label-32
SELECT DISTINCT - col2 * col0 DIV - col0 AS col2 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-32
SELECT DISTINCT - col2 * col0 / - col0 AS col2 FROM tab2 AS cor0
----
26
27
38

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

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

query I rowsort
SELECT DISTINCT tab2.col1 * 59 AS col0 FROM tab2
----
1003
1829
3481

query III rowsort
SELECT ALL * FROM tab2 cor0 WHERE ( NULL ) NOT BETWEEN NULL AND col1 / + col2
----

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

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

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE ( NULL ) NOT IN ( + col1 )
----

query I rowsort
SELECT + col1 FROM tab0 WHERE NOT - col2 - col1 BETWEEN NULL AND - col2
----

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

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

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

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT ( NULL ) NOT IN ( - col1 )
----

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

query I rowsort
SELECT DISTINCT col2 FROM tab0 WHERE NOT ( - col2 ) = NULL
----

query I rowsort
SELECT ALL - col2 * col2 * col2 AS col1 FROM tab1
----
-157464
-185193
-884736

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-50
SELECT - col2 / - col0 FROM tab2
----
0
0
3

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-52
SELECT ALL col2 DIV - col1 + - tab1.col2 - col0 FROM tab1
----
-126
-183
-59

skipif mysql # not compatible
query I rowsort label-52
SELECT ALL col2 / - col1 + - tab1.col2 - col0 FROM tab1
----
-126
-183
-59

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

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

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

query I rowsort
SELECT col2 + col0 + col0 AS col1 FROM tab0
----
260
71
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-57
SELECT ALL - col0 DIV col1 + col2 * col1 - col0 FROM tab0 cor0
----
2814
62
7373

skipif mysql # not compatible
query I rowsort label-57
SELECT ALL - col0 / col1 + col2 * col1 - col0 FROM tab0 cor0
----
2814
62
7373

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

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

query I rowsort
SELECT + cor0.col1 * - col0 + + col2 * - col1 FROM tab1 cor0
----
-1210
-1482
-2288

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

query I rowsort
SELECT DISTINCT + col1 * col1 * col1 AS col0 FROM tab0 AS cor0
----
636056
753571
912673

query I rowsort
SELECT ALL + col2 * - tab2.col1 * tab2.col1 FROM tab2
----
-10982
-25947
-90506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * tab0.col0 * col2 col1 FROM tab0
----
-3395
-664118
-68112

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

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

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

query I rowsort
SELECT ALL col2 * + col1 + 55 * col0 FROM tab2
----
1222
4991
5824

query I rowsort
SELECT ALL col0 + - col2 * ( col0 ) AS col1 FROM tab0
----
-7209
-768
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + + 63 * col0 col2 FROM tab1
----
243
4089
5136

query I rowsort
SELECT ALL 73 FROM tab1, tab1 AS cor0
----
9 values hashing to e5fbf5d129b181bacd6113bbc8732496

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

query I rowsort
SELECT + col2 * 84 FROM tab1 cor0
----
4536
4788
8064

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-75
SELECT col0 DIV - 76 FROM tab2
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-75
SELECT col0 / - 76 FROM tab2
----
-1
-1
0

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-78
SELECT ALL - - 91 DIV - cor0.col1 AS col2 FROM tab2 cor0
----
-1
-2
-5

skipif mysql # not compatible
query I rowsort label-78
SELECT ALL - - 91 / - cor0.col1 AS col2 FROM tab2 cor0
----
-1
-2
-5

query I rowsort
SELECT - col2 * - col2 + + col1 + + 59 AS col1 FROM tab0 AS cor0
----
1234
157
6874

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

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

query I rowsort
SELECT DISTINCT ( col2 ) * + col2 * ( cor0.col2 ) FROM tab0 AS cor0
----
1
35937
551368

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

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

query I rowsort
SELECT 23 + 47 + col2 FROM tab0 AS cor0
----
103
152
71

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

query I rowsort
SELECT col1 * col0 - 4 AS col1 FROM tab0
----
2060
3391
8095

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

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

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

query I rowsort
SELECT + + 94 + col1 AS col1 FROM tab0 AS cor0
----
180
185
191

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - 76 + + col2 col2 FROM tab0 AS cor0
----
-43
-75
6

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-95
SELECT DISTINCT - CAST( + cor1.col1 AS SIGNED ) AS col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-95
SELECT DISTINCT - CAST ( + cor1.col1 AS INTEGER ) AS col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
-10
-13
-26

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * col0 * col0 + col1 col0 FROM tab1 AS cor0
----
260
40970
83213

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-101
SELECT ALL + col2 DIV col2 + - col2 * - col1 AS col1 FROM tab1 AS cor0
----
1249
1405
571

skipif mysql # not compatible
query I rowsort label-101
SELECT ALL + col2 / col2 + - col2 * - col1 AS col1 FROM tab1 AS cor0
----
1249
1405
571

query I rowsort
SELECT DISTINCT + col0 * col2 + 96 AS col2 FROM tab1 AS cor0
----
258
3744
7776

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

query I rowsort
SELECT ALL - ( col2 ) * ( + 34 ) + col2 FROM tab0 cor0
----
-1089
-2706
-33

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

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

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

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

query I rowsort
SELECT - + 50 + + col1 AS col2 FROM tab2 AS cor0
----
-19
-33
9

query I rowsort
SELECT + - col1 + - 41 FROM tab2 AS cor0
----
-100
-58
-72

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

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

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

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

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

query I rowsort
SELECT cor0.col2 * 73 AS col2 FROM tab0 AS cor0
----
2409
5986
73

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

query I rowsort
SELECT - col1 * + col0 * + 65 + 51 FROM tab0
----
-134109
-220624
-526384

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

query I rowsort
SELECT ( col2 ) * - col1 * tab0.col1 + + col2 AS col0 FROM tab0
----
-244035
-678960
-9408

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-121
SELECT ALL - tab1.col0 DIV 51 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to b2e225572af74ba853e10fb5414ea67f

skipif mysql # not compatible
query I rowsort label-121
SELECT ALL - tab1.col0 / 51 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to b2e225572af74ba853e10fb5414ea67f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 * - tab1.col1 col2 FROM tab1, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to cdbf9954e453a1941c206f2475a42809

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + - 8 col0 FROM tab2
----
18
19
30

onlyif mysql # use DIV operator for integer division
query I rowsort label-124
SELECT ALL col0 * + ( - col0 * + cor0.col1 ) + col1 DIV + col0 + col2 AS col0 FROM tab2 AS cor0
----
-106059
-1488
-358930

skipif mysql # not compatible
query I rowsort label-124
SELECT ALL col0 * + ( - col0 * + cor0.col1 ) + col1 / + col0 + col2 AS col0 FROM tab2 AS cor0
----
-106059
-1488
-358930

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-125
SELECT DISTINCT - col0 - - CAST( 3 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
-21
-32
-86

skipif mysql # not compatible
query I rowsort label-125
SELECT DISTINCT - col0 - - CAST ( 3 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
-21
-32
-86

query I rowsort
SELECT + 54 AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

query I rowsort
SELECT ( - col0 ) * - col0 + + 77 FROM tab0
----
1302
653
7998

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

query I rowsort
SELECT - 5 * cor0.col2 AS col2 FROM tab0 AS cor0
----
-165
-410
-5

query I rowsort
SELECT - 65 + col0 FROM tab0 AS cor0
----
-30
-41
24

query I rowsort
SELECT 38 AS col2 FROM tab1, tab1 AS cor0 CROSS JOIN tab0
----
27 values hashing to a7827a79248ee7bf2cee915a631d02cb

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 27 col2 FROM tab1
----
27
27
27

query I rowsort
SELECT DISTINCT - + 69 + - col2 FROM tab0 AS cor0
----
-102
-151
-70

query I rowsort
SELECT DISTINCT + ( 26 ) FROM tab2, tab2 AS cor0, tab1 AS cor1
----
26

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

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

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

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

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

skipif mysql # not compatible
query I rowsort label-139
SELECT ALL + 89 * - col1 * - CAST ( - col2 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-111072
-124956
-50730

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

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

query I rowsort
SELECT DISTINCT - 69 - col2 * - col1 FROM tab1 AS cor0
----
1179
1335
501

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-145
SELECT ALL + - col0 * col0 DIV col2 + + col2 * - cor0.col1 * + col1 AS col2 FROM tab1 AS cor0
----
-16290
-36504
-5771

skipif mysql # not compatible
query I rowsort label-145
SELECT ALL + - col0 * col0 / col2 + + col2 * - cor0.col1 * + col1 AS col2 FROM tab1 AS cor0
----
-16290
-36504
-5771

onlyif mysql # use DIV operator for integer division
query I rowsort label-146
SELECT + + cor0.col2 DIV col2 + col1 * col0 AS col1 FROM tab1 AS cor0
----
1041
641
79

skipif mysql # not compatible
query I rowsort label-146
SELECT + + cor0.col2 / col2 + col1 * col0 AS col1 FROM tab1 AS cor0
----
1041
641
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 * col0 + col0 col0 FROM tab2 cor0
----
196
2106
3081

query I rowsort
SELECT - - 54 - col1 FROM tab2 AS cor0
----
-5
23
37

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

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

query I rowsort
SELECT ALL + cor0.col0 + col0 * 82 * col0 FROM tab2 AS cor0
----
4025
498966
511841

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-152
SELECT ( 81 ) DIV - tab2.col0 AS col0 FROM tab2
----
-1
-1
-11

skipif mysql # not compatible
query I rowsort label-152
SELECT ( 81 ) / - tab2.col0 AS col0 FROM tab2
----
-1
-1
-11

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

query I rowsort
SELECT + + 31 + - col0 FROM tab0 AS cor0
----
-4
-58
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-155
SELECT DISTINCT + 33 DIV + 32 AS col0 FROM tab0, tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-155
SELECT DISTINCT + 33 / + 32 AS col0 FROM tab0, tab0 AS cor0
----
1

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

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

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

query I rowsort
SELECT col1 + 48 FROM tab0
----
134
139
145

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

query I rowsort
SELECT ALL - col2 * ( - 22 * col0 ) FROM tab1
----
168960
3564
80256

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

query I rowsort
SELECT ( ( + col2 ) ) + + ( col0 ) * col1 - - col1 * - col1 FROM tab1
----
-544
597
967

query I rowsort
SELECT - 65 * + 18 FROM tab2
----
-1170
-1170
-1170

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

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

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

query I rowsort
SELECT + - 72 * 20 AS col1 FROM tab0 AS cor0
----
-1440
-1440
-1440

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-170
SELECT ALL CAST( col2 AS SIGNED ) * - col2 FROM tab1
----
-2916
-3249
-9216

skipif mysql # not compatible
query I rowsort label-170
SELECT ALL CAST ( col2 AS INTEGER ) * - col2 FROM tab1
----
-2916
-3249
-9216

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

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

query I rowsort
SELECT - + 18 * col1 AS col0 FROM tab1 AS cor0
----
-180
-234
-468

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

query I rowsort
SELECT DISTINCT - + 34 * + cor0.col0 FROM tab1 AS cor0
----
-102
-2176
-2720

query I rowsort
SELECT ALL - 38 * + col1 AS col2 FROM tab1 cor0
----
-380
-494
-988

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

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

query I rowsort
SELECT - 20 * - col1 + ( 78 ) * col2 AS col0 FROM tab2 AS cor0
----
2726
3208
3304

query I rowsort
SELECT - col2 + - col0 * 99 AS col2 FROM tab2 AS cor0
----
-720
-7748
-7859

query I rowsort
SELECT ( + tab1.col2 ) FROM tab1, tab2, tab2 AS cor0, tab1 AS cor1
----
81 values hashing to 9d355f1f2edc347a359dad00d2d3f886

query I rowsort
SELECT cor1.col2 AS col1 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT col1 + 36 FROM tab0
----
122
127
133

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

query I rowsort
SELECT + col1 + col1 + + 32 * - col1 * col0 FROM tab2 AS cor0
----
-147146
-42942
-6882

query I rowsort
SELECT ALL + + col0 * - 72 + - col1 FROM tab2 AS cor0
----
-535
-5675
-5705

query I rowsort
SELECT - col1 * 64 + col2 AS col1 FROM tab0 AS cor0
----
-5471
-5742
-6207

query I rowsort
SELECT DISTINCT + + col2 * - 39 + ( col2 ) * - col0 FROM tab2 AS cor0
----
-1242
-3042
-4484

onlyif mysql # use DIV operator for integer division
query I rowsort label-188
SELECT ALL col2 DIV + 14 + col1 col2 FROM tab1 AS cor0
----
14
19
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-188
SELECT ALL col2 / + 14 + col1 col2 FROM tab1 AS cor0
----
14
19
29

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-192
SELECT ALL - 40 + cor0.col2 DIV col1 FROM tab1 AS cor0
----
-33
-35
-38

skipif mysql # not compatible
query I rowsort label-192
SELECT ALL - 40 + cor0.col2 / col1 FROM tab1 AS cor0
----
-33
-35
-38

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 41 * col2 col0 FROM tab1 AS cor0
----
-2214
-2337
-3936

query I rowsort
SELECT ALL - 33 * + col1 + col1 AS col1 FROM tab0 AS cor0
----
-2752
-2912
-3104

onlyif mysql # use DIV operator for integer division
query I rowsort label-196
SELECT DISTINCT + 44 DIV col0 FROM tab0 AS cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-196
SELECT DISTINCT + 44 / col0 FROM tab0 AS cor0
----
0
1

query I rowsort
SELECT col2 + 98 AS col1 FROM tab2 AS cor0
----
124
125
136

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - ( + 16 ) col2 FROM tab0 AS cor0
----
-16

query I rowsort
SELECT ALL col0 + + ( - col2 * + 94 ) FROM tab1 AS cor0
----
-5073
-5294
-8944

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-200
SELECT ALL 57 / col2 col1 FROM tab1 AS cor0
----
0
1
1

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-202
SELECT + CAST( 64 AS SIGNED ) DIV col0 col1 FROM tab0 AS cor0
----
0
1
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-202
SELECT + CAST ( 64 AS INTEGER ) / col0 col1 FROM tab0 AS cor0
----
0
1
2

query I rowsort
SELECT ALL - - ( 56 ) FROM tab0 AS cor0
----
56
56
56

query I rowsort
SELECT + ( 85 ) * col2 FROM tab1 AS cor0
----
4590
4845
8160

query I rowsort
SELECT ALL + 64 * + col0 + cor0.col0 AS col2 FROM tab0 AS cor0
----
1560
2275
5785

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

skipif mysql # not compatible
query I rowsort label-206
SELECT ALL - col2 / col1 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT - col1 + 22 FROM tab2 AS cor0
----
-37
-9
5

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

query I rowsort
SELECT ALL col0 * - 10 AS col0 FROM tab1
----
-30
-640
-800

query I rowsort
SELECT + tab2.col1 + ( + col0 * - col2 + - col0 ) FROM tab2
----
-165
-2047
-3064

query I rowsort
SELECT DISTINCT - col0 * 41 + - tab0.col0 FROM tab0
----
-1008
-1470
-3738

onlyif mysql # use DIV operator for integer division
query I rowsort label-212
SELECT ALL tab1.col2 DIV + 31 + - col0 AS col2 FROM tab1
----
-2
-63
-77

skipif mysql # not compatible
query I rowsort label-212
SELECT ALL tab1.col2 / + 31 + - col0 AS col2 FROM tab1
----
-2
-63
-77

query I rowsort
SELECT DISTINCT - col2 * - 81 + - 69 * - col1 FROM tab2 AS cor0
----
4251
4326
6177

query I rowsort
SELECT ALL - col1 + + 85 * - col1 - + cor0.col2 AS col0 FROM tab1 AS cor0
----
-1214
-2290
-917

query I rowsort
SELECT - + 43 * 54 * cor0.col1 AS col2 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 2213b5f17e07e4f0fac4051e25057006

query I rowsort
SELECT ALL - 27 * - 50 AS col1 FROM tab0
----
1350
1350
1350

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

query I rowsort
SELECT - ( 25 ) * col2 AS col1 FROM tab0 AS cor0
----
-2050
-25
-825

query I rowsort
SELECT DISTINCT 98 AS col0 FROM tab2 AS cor0
----
98

query I rowsort
SELECT + 65 * - cor0.col1 FROM tab1, tab0 AS cor0
----
9 values hashing to d19d651fdf56c3e54f2a946fd0aebb1b

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

query I rowsort
SELECT ALL - 3 FROM tab2 AS cor0
----
-3
-3
-3

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

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

query I rowsort
SELECT + col1 * - col1 * + 94 FROM tab2 cor0
----
-27166
-327214
-90334

query I rowsort
SELECT ALL + + col1 * - cor0.col1 + + 34 FROM tab1 AS cor0
----
-135
-642
-66

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

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

query I rowsort
SELECT + 67 * col2 FROM tab1 AS cor0
----
3618
3819
6432

query I rowsort
SELECT DISTINCT - - 98 * col2 AS col1 FROM tab2 AS cor0
----
2548
2646
3724

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

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

skipif mysql # not compatible
query I rowsort label-232
SELECT DISTINCT - 67 / col2 FROM tab1 cor0
----
-1
0

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

query I rowsort
SELECT - 67 + - col0 * - col2 FROM tab1 AS cor0
----
3581
7613
95

query I rowsort
SELECT ALL col2 * - ( col1 * col2 ) + + col0 AS col1 FROM tab0
----
-611795
-62
-93630

query I rowsort
SELECT - cor0.col2 * col1 * + col1 FROM tab2 cor0
----
-10982
-25947
-90506

query I rowsort
SELECT ALL - col1 + col2 + col2 FROM tab1 AS cor0
----
104
179
82

query I rowsort
SELECT 26 AS col2 FROM tab1 AS cor0
----
26
26
26

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( + tab0.col1 ) col0 FROM tab0
----
-86
-91
-97

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

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

query I rowsort
SELECT - + ( cor0.col1 ) + + 95 * - cor0.col0 AS col2 FROM tab1 AS cor0
----
-311
-6090
-7613

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

skipif mysql # not compatible
query I rowsort label-246
SELECT col2 + col0 / + 94 AS col2 FROM tab0 AS cor0
----
1
33
82

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

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

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

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

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

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab1, tab1 cor0, tab1 AS cor1
----
972 values hashing to 635619591835474e6aa6acdff4ab166c

query I rowsort
SELECT 99 AS col2 FROM tab1
----
99
99
99

query I rowsort
SELECT DISTINCT - col0 * - 87 AS col2 FROM tab2 AS cor0
----
609
6786
6873

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

query I rowsort
SELECT col1 + + 29 FROM tab2 AS cor0
----
46
60
88

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

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

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

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

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

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

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

query I rowsort
SELECT + ( + 85 ) * + col1 - - col0 * - 15 * + col1 AS col2 FROM tab1 AS cor0
----
-14495
-8750
1040

query I rowsort
SELECT DISTINCT 85 + + col2 FROM tab2 AS cor0
----
111
112
123

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

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

query I rowsort
SELECT + 25 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 2c77240b60ac01c717a5ed5d0165f450

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

query I rowsort
SELECT cor0.col1 + col2 * col2 FROM tab2 AS cor0
----
1461
735
760

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

query IIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 cor0, tab0 cor1, tab1 AS cor2
----
972 values hashing to 82e15d5967b272804e574774895a0222

query I rowsort
SELECT - col1 * + col1 + - col2 AS col1 FROM tab1 AS cor0
----
-157
-265
-730

onlyif mysql # use DIV operator for integer division
query I rowsort label-269
SELECT + col0 * col0 - col1 DIV - cor0.col2 AS col2 FROM tab0 AS cor0
----
1322
578
7922

skipif mysql # not compatible
query I rowsort label-269
SELECT + col0 * col0 - col1 / - cor0.col2 AS col2 FROM tab0 AS cor0
----
1322
578
7922

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

query I rowsort
SELECT col0 * ( - 22 ) FROM tab2 AS cor0
----
-154
-1716
-1738

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

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

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

query I rowsort
SELECT DISTINCT cor0.col2 * + 24 FROM tab1 AS cor0
----
1296
1368
2304

onlyif mysql # use DIV operator for integer division
query I rowsort label-275
SELECT ALL + + col1 * col2 * + col1 + col2 DIV + col0 AS col2 FROM tab2 AS cor0
----
10982
25950
90506

skipif mysql # not compatible
query I rowsort label-275
SELECT ALL + + col1 * col2 * + col1 + col2 / + col0 AS col2 FROM tab2 AS cor0
----
10982
25950
90506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 + - col2 col0 FROM tab1 AS cor0
----
-109
-67
-80

query I rowsort
SELECT DISTINCT + col0 * 97 AS col1 FROM tab2 AS cor0
----
679
7566
7663

query I rowsort
SELECT ALL + - col1 + col1 * col1 FROM tab2 cor0
----
272
3422
930

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 52 col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 9500afe5646d620d5e8943351a29d082

query I rowsort
SELECT ALL + ( - 38 ) + col1 AS col0 FROM tab0 AS cor0
----
48
53
59

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

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

query I rowsort
SELECT DISTINCT + col0 + 70 AS col0 FROM tab0 AS cor0
----
105
159
94

query I rowsort
SELECT DISTINCT - 32 * cor0.col2 + + cor0.col1 * 80 AS col1 FROM tab1 AS cor0
----
-1024
-2032
352

query I rowsort
SELECT - cor0.col2 * 58 + + cor0.col1 AS col0 FROM tab2 AS cor0
----
-1449
-1535
-2187

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

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

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
24
35
89

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

skipif mysql # not compatible
query I rowsort label-288
SELECT DISTINCT - col1 / + col2 FROM tab1
----
0

query I rowsort
SELECT ALL 38 FROM tab0, tab0 AS cor0
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

query I rowsort
SELECT ( 80 ) AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 878f012d707aab113cedaf56e6c52e94

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

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

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

query I rowsort
SELECT ALL - cor0.col2 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT ALL - 28 FROM tab1
----
-28
-28
-28

query I rowsort
SELECT ALL - 14 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to c2bf0e2420d22cd58d7ee3b30827afcc

query I rowsort
SELECT - col0 * - 4 AS col2 FROM tab1 AS cor0
----
12
256
320

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

query I rowsort
SELECT 19 * + tab0.col2 + - col2 FROM tab0
----
1476
18
594

query I rowsort
SELECT + ( + cor1.col0 ) * cor1.col1 AS col2 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 815fccd4c3d372b28d3f3fb103025775

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

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

query I rowsort
SELECT - col0 + ( - col0 + col1 ) FROM tab2
----
-141
-97
17

query I rowsort
SELECT DISTINCT + col0 - 6 AS col0 FROM tab0 AS cor0
----
18
29
83

query I rowsort
SELECT col2 * + col2 * + col0 + col1 FROM tab1
----
207946
737293
8774

query I rowsort
SELECT ALL - - col2 * - 96 AS col1 FROM tab1 AS cor0
----
-5184
-5472
-9216

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

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

skipif mysql # not compatible
query I rowsort label-307
SELECT ALL + col0 / col2 + tab0.col2 FROM tab0
----
33
36
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + + col2 * col0 * - 43 col1 FROM tab1
----
-156807
-330144
-6912

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

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

query I rowsort
SELECT - col2 + 60 FROM tab2 AS cor0
----
22
33
34

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-313
SELECT ALL col1 + col2 DIV ( 73 ) FROM tab0 AS cor0
----
86
92
97

skipif mysql # not compatible
query I rowsort label-313
SELECT ALL col1 + col2 / ( 73 ) FROM tab0 AS cor0
----
86
92
97

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

skipif mysql # not compatible
query I rowsort label-314
SELECT 18 / - col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - - 39 AS col1 FROM tab0 AS cor0
----
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 41 * col2 * - col2 + col0 * col2 col1 FROM tab2 cor0
----
29744
30078
62206

query I rowsort
SELECT ALL 99 AS col2 FROM tab1 AS cor0
----
99
99
99

query I rowsort
SELECT - 25 + - cor0.col0 AS col0 FROM tab0 cor0
----
-114
-49
-60

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

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

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

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

query I rowsort
SELECT - 88 * col0 + 56 FROM tab2 AS cor0
----
-560
-6808
-6896

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

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

query I rowsort
SELECT ALL - 13 + + col2 FROM tab1 cor0
----
41
44
83

query I rowsort
SELECT ALL col2 * ( + col2 * - 39 ) FROM tab1 AS cor0
----
-113724
-126711
-359424

query I rowsort
SELECT DISTINCT + col2 * 8 AS col1 FROM tab2 AS cor0
----
208
216
304

query I rowsort
SELECT DISTINCT - ( - ( col1 ) ) + + col1 FROM tab2 cor0
----
118
34
62

query I rowsort
SELECT ALL - cor1.col2 AS col2 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

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

query I rowsort
SELECT ALL - 74 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 5a567947d14593676e3825756f8e6130

query I rowsort
SELECT ALL ( + tab2.col1 ) FROM tab2
----
17
31
59

query I rowsort
SELECT ALL 52 AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 7f4ae30893ab330784829711032ae599

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

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

query I rowsort
SELECT DISTINCT 57 * tab1.col1 * 89 AS col2 FROM tab1, tab2 AS cor0
----
131898
50730
65949

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col1 * col1 + col0 col2 FROM tab1
----
16304
36507
5764

query I rowsort
SELECT ALL + tab1.col1 * tab1.col1 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to ae5946db6904798b8afac35f5777bb79

skipif mysql # not compatible
query I rowsort
SELECT col0 * col0 * CAST ( + col2 AS REAL ) - col2 AS col1 FROM tab0
----
1224
18975
649440

query I rowsort
SELECT + 80 FROM tab0, tab2, tab0 cor0
----
27 values hashing to 6dd5038be71dffa82f5ceba787caab91

query I rowsort
SELECT + col2 + 55 AS col0 FROM tab1 AS cor0
----
109
112
151

onlyif mysql # use DIV operator for integer division
query I rowsort label-343
SELECT - col2 * ( col2 ) * col0 + col0 DIV - col0 FROM tab0 AS cor0
----
-26137
-36
-598437

skipif mysql # not compatible
query I rowsort label-343
SELECT - col2 * ( col2 ) * col0 + col0 / - col0 FROM tab0 AS cor0
----
-26137
-36
-598437

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

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

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

query I rowsort
SELECT DISTINCT + col2 * col2 + + tab0.col1 AS col1 FROM tab0
----
1175
6815
98

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

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

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

query I rowsort
SELECT col1 + - 81 * + tab1.col2 AS col1 FROM tab1
----
-4348
-4607
-7763

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-353
SELECT + + col1 DIV - col1 + + col2 FROM tab0 AS cor0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-353
SELECT + + col1 / - col1 + + col2 FROM tab0 AS cor0
----
0
32
81

query I rowsort
SELECT DISTINCT + + col1 * - 76 - - col1 FROM tab1 AS cor0
----
-1950
-750
-975

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

query I rowsort
SELECT ALL + + col0 + - 60 AS col1 FROM tab0 AS cor0
----
-25
-36
29

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

query I rowsort
SELECT DISTINCT + + cor0.col2 + + 86 + + col1 AS col0 FROM tab1 AS cor0
----
153
166
195

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-360
SELECT DISTINCT - col0 DIV - col2 + 48 * cor0.col0 * + col0 FROM tab0 AS cor0
----
27648
380209
58835

skipif mysql # not compatible
query I rowsort label-360
SELECT DISTINCT - col0 / - col2 + 48 * cor0.col0 * + col0 FROM tab0 AS cor0
----
27648
380209
58835

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - col0 + + 94 * - col0 * + col1 - 46 col2 FROM tab1 AS cor0
----
-59566
-7300
-96766

query I rowsort
SELECT + col2 * 92 FROM tab2
----
2392
2484
3496

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

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

query I rowsort
SELECT col1 * + 25 * col1 AS col0 FROM tab2
----
24025
7225
87025

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

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

query I rowsort
SELECT + ( 41 ) FROM tab1, tab1 AS cor0
----
9 values hashing to 5b18986bb294412b3d9f07b7e6fc821e

query I rowsort
SELECT - tab1.col1 * ( - col1 ) * col1 AS col1 FROM tab1
----
1000
17576
2197

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

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

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

query I rowsort
SELECT + - col2 + - ( col1 ) + + 15 AS col1 FROM tab1 AS cor0
----
-52
-65
-94

onlyif mysql # use DIV operator for integer division
query I rowsort label-375
SELECT - 4 DIV - 53 + col0 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-375
SELECT - 4 / - 53 + col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT + ( + ( cor0.col2 ) ) * cor0.col2 * + ( cor0.col2 * col0 ) + + col1 * + col0 AS col1 FROM tab0 AS cor0
----
3430
49079851
864552

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-379
SELECT + col0 + col1 DIV + col1 col0 FROM tab2 AS cor0
----
79
8
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-379
SELECT + col0 + col1 / + col1 col0 FROM tab2 AS cor0
----
79
8
80

query I rowsort
SELECT + 65 * col1 * col1 AS col2 FROM tab2 AS cor0
----
18785
226265
62465

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

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

query I rowsort
SELECT + 98 * + col2 FROM tab0 AS cor0
----
3234
8036
98

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * 15 col1 FROM tab1 AS cor0
----
-1440
-810
-855

query I rowsort
SELECT + - col0 * 57 + col2 * + col2 + - 26 AS col0 FROM tab1 AS cor0
----
-425
2719
4630

onlyif mysql # use DIV operator for integer division
query I rowsort label-387
SELECT + col2 DIV - col1 + 37 + - col0 FROM tab1 AS cor0
----
-32
-50
32

skipif mysql # not compatible
query I rowsort label-387
SELECT + col2 / - col1 + 37 + - col0 FROM tab1 AS cor0
----
-32
-50
32

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

query I rowsort
SELECT + - col0 * + col0 + + cor0.col0 * - col1 AS col0 FROM tab2 AS cor0
----
-10686
-266
-7584

query I rowsort
SELECT - + col2 + 62 * - col1 - + col1 FROM tab1 cor0
----
-1692
-687
-915

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

query I rowsort
SELECT - + col1 * - col0 * - col1 AS col2 FROM tab1 AS cor0
----
-13520
-2028
-6400

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

query I rowsort
SELECT col0 * - col2 * - col2 AS col1 FROM tab2 AS cor0
----
114076
5103
52728

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

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

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

query I rowsort
SELECT DISTINCT 97 + col1 * col2 AS col2 FROM tab0 AS cor0
----
194
2935
7559

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

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

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

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

query I rowsort
SELECT + 44 * - col1 AS col1 FROM tab1 AS cor0
----
-1144
-440
-572

query I rowsort
SELECT ALL col2 + - col1 - col0 * col1 AS col1 FROM tab2 AS cor0
----
-1322
-221
-4635

query I rowsort
SELECT DISTINCT - + 29 FROM tab0 cor0
----
-29

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-406
SELECT ALL cor0.col2 / - cor0.col0 col1 FROM tab1 AS cor0
----
-1
-18
0

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col2 col0 FROM tab1 AS cor0
----
54
57
96

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

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

query I rowsort
SELECT - + col0 + cor0.col0 * - 82 FROM tab1 cor0
----
-249
-5312
-6640

query I rowsort
SELECT cor0.col1 + ( + ( + col0 ) + col1 ) * col2 AS col1 FROM tab0 AS cor0
----
14851
229
3716

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-416
SELECT + col2 + - 56 DIV - col1 FROM tab1 AS cor0
----
100
56
62

skipif mysql # not compatible
query I rowsort label-416
SELECT + col2 + - 56 / - col1 FROM tab1 AS cor0
----
100
56
62

query I rowsort
SELECT ALL col2 * + 64 AS col0 FROM tab0 AS cor0
----
2112
5248
64

onlyif mysql # use DIV operator for integer division
query I rowsort label-418
SELECT DISTINCT - cor0.col2 DIV col1 FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-418
SELECT DISTINCT - cor0.col2 / col1 FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( col0 AS REAL ) * + col0 FROM tab1 cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT + + 94 * cor0.col1 FROM tab2 AS cor0
----
1598
2914
5546

query I rowsort
SELECT ALL + + 60 + cor0.col2 FROM tab1 AS cor0
----
114
117
156

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-424
SELECT ALL - - cor0.col0 * cor0.col1 + col2 DIV cor0.col2 AS col2 FROM tab0 cor0
----
2065
3396
8100

skipif mysql # not compatible
query I rowsort label-424
SELECT ALL - - cor0.col0 * cor0.col1 + col2 / cor0.col2 AS col2 FROM tab0 cor0
----
2065
3396
8100

onlyif mysql # use DIV operator for integer division
query I rowsort label-425
SELECT DISTINCT - + col0 - col2 DIV col0 AS col1 FROM tab2 AS cor0
----
-10
-78
-79

skipif mysql # not compatible
query I rowsort label-425
SELECT DISTINCT - + col0 - col2 / col0 AS col1 FROM tab2 AS cor0
----
-10
-78
-79

query I rowsort
SELECT + col2 * col2 + + cor0.col2 * cor0.col1 AS col0 FROM tab1 AS cor0
----
10464
3819
4320

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

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

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

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

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

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

query I rowsort
SELECT DISTINCT col1 * col1 + col2 * col0 AS col2 FROM tab1
----
3748
7849
838

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

query I rowsort
SELECT col1 * col0 + tab0.col1 - col0 FROM tab0
----
2126
3457
8101

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

query I rowsort
SELECT DISTINCT + col1 * col0 + cor0.col2 * col1 AS col2 FROM tab2 AS cor0
----
1054
1989
6136

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

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

query III rowsort
SELECT ALL * FROM tab1 AS cor0 WHERE NOT - col1 * - col1 IN ( col1 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + + col2 col0 FROM tab2 AS cor0
----
104
117
34

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

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

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

query I rowsort
SELECT ALL - 4 * col1 - - col2 FROM tab1
----
-50
17
44

query I rowsort
SELECT tab0.col2 + - col0 + - col2 * + tab0.col1 AS col1 FROM tab0
----
-131
-2829
-7469

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col1 * col1 + - col1 col1 FROM tab0
----
-7482
-8372
-9506

onlyif mysql # use DIV operator for integer division
query I rowsort label-452
SELECT ALL + col2 * col0 DIV col2 + + col0 FROM tab0
----
178
48
70

skipif mysql # not compatible
query I rowsort label-452
SELECT ALL + col2 * col0 / col2 + + col0 FROM tab0
----
178
48
70

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

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

query I rowsort
SELECT DISTINCT - 68 * + 21 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
-1428

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

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

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

skipif mysql # not compatible
query I rowsort label-458
SELECT ALL col1 + + col0 / - col2 FROM tab1 cor0
----
13
26
9

query I rowsort
SELECT DISTINCT + 41 * + col2 FROM tab1 AS cor0
----
2214
2337
3936

query I rowsort
SELECT + 58 * col0 * - col1 + col0 AS col1 FROM tab2 AS cor0
----
-12579
-266838
-77815

onlyif mysql # use DIV operator for integer division
query I rowsort label-461
SELECT + + col1 + CAST( - ( + col1 ) AS SIGNED ) DIV + col0 AS col2 FROM tab2 cor0
----
17
27
59

skipif mysql # not compatible
query I rowsort label-461
SELECT + + col1 + CAST ( - ( + col1 ) AS INTEGER ) / + col0 AS col2 FROM tab2 cor0
----
17
27
59

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

query I rowsort
SELECT ALL - col2 * + 17 FROM tab2 AS cor0
----
-442
-459
-646

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

query I rowsort
SELECT + col0 + - col1 * - ( - col1 * col1 ) FROM tab1
----
-17573
-2117
-936

query I rowsort
SELECT DISTINCT - col2 * 20 FROM tab1 AS cor0
----
-1080
-1140
-1920

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

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

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

skipif mysql # not compatible
query I rowsort label-469
SELECT ALL 12 / - col2 FROM tab0
----
-12
0
0

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

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

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

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

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

query I rowsort
SELECT - 31 + col0 * + col1 * col1 + - col0 FROM tab1 AS cor0
----
13409
1994
6305

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-474
SELECT - CAST( NULL AS DECIMAL ) + 46 * + col0 * ( 69 ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-474
SELECT - CAST ( NULL AS REAL ) + 46 * + col0 * ( 69 ) FROM tab1
----
NULL
NULL
NULL

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

skipif mysql # not compatible
query I rowsort label-475
SELECT ALL CAST ( + col1 * col1 AS INTEGER ) + - tab0.col2 * col0 * col0 FROM tab0
----
-11612
-641241
8184

query I rowsort
SELECT - col1 * - cor0.col1 * col2 + - 7 + + col2 AS col2 FROM tab0 AS cor0
----
244094
679117
9403

query I rowsort
SELECT - cor0.col0 + col2 * - col1 + cor0.col1 AS col0 FROM tab0 AS cor0
----
-2776
-35
-7460

query I rowsort
SELECT 83 * col1 AS col1 FROM tab2
----
1411
2573
4897

query I rowsort
SELECT ALL + col1 + tab0.col0 + col2 * col2 FROM tab0
----
1199
133
6904

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

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

query I rowsort
SELECT 4 * 67 AS col0 FROM tab1
----
268
268
268

query I rowsort
SELECT DISTINCT + ( 21 ) * col0 + 6 * - 42 AS col0 FROM tab0
----
1617
252
483

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

query I rowsort
SELECT 43 + + cor0.col2 AS col1 FROM tab1 cor0
----
100
139
97

query I rowsort
SELECT + col2 * col2 * + col1 + 82 * col0 FROM tab0 AS cor0
----
2967
619182
95622

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-487
SELECT ( col2 ) DIV 26 + + cor0.col1 AS col2 FROM tab1 AS cor0
----
12
16
28

skipif mysql # not compatible
query I rowsort label-487
SELECT ( col2 ) / 26 + + cor0.col1 AS col2 FROM tab1 AS cor0
----
12
16
28

query I rowsort
SELECT DISTINCT 86 + cor0.col0 * - 52 AS col0 FROM tab0 AS cor0
----
-1162
-1734
-4542

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

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

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

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

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

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

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

query I rowsort
SELECT + tab2.col2 + - col2 + + col0 * - 77 AS col2 FROM tab2
----
-539
-6006
-6083

query I rowsort
SELECT DISTINCT tab2.col2 - col2 * - ( + col1 ) FROM tab2
----
1560
684
864

onlyif mysql # use DIV operator for integer division
query I rowsort label-496
SELECT DISTINCT - col2 * col0 + - tab1.col1 - 45 DIV - col1 FROM tab1
----
-187
-3654
-7690

skipif mysql # not compatible
query I rowsort label-496
SELECT DISTINCT - col2 * col0 + - tab1.col1 - 45 / - col1 FROM tab1
----
-187
-3654
-7690

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-498
SELECT + 58 DIV - col1 AS col0 FROM tab2
----
-1
-3
0

skipif mysql # not compatible
query I rowsort label-498
SELECT + 58 / - col1 AS col0 FROM tab2
----
-1
-3
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-499
SELECT DISTINCT col1 DIV + tab2.col0 - 93 * col0 AS col2 FROM tab2
----
-647
-7254
-7347

skipif mysql # not compatible
query I rowsort label-499
SELECT DISTINCT col1 / + tab2.col0 - 93 * col0 AS col2 FROM tab2
----
-647
-7254
-7347

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-501
SELECT col2 + CAST ( NULL AS REAL ) col2 FROM tab2
----
NULL
NULL
NULL

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

query I rowsort
SELECT - 46 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 491ad1fb79fec0b5715ea54949d1aa2d

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-504
SELECT DISTINCT + col1 * CAST( col0 AS SIGNED ) AS col2 FROM tab1
----
1040
640
78

skipif mysql # not compatible
query I rowsort label-504
SELECT DISTINCT + col1 * CAST ( col0 AS INTEGER ) AS col2 FROM tab1
----
1040
640
78

query I rowsort
SELECT 6 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 5d1cb90ed58fa7573895d2f95b211821

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * 50 col2 FROM tab2
----
350
3900
3950

query I rowsort
SELECT - + col2 * + 88 + col1 * - 77 * cor0.col1 AS col1 FROM tab1 AS cor0
----
-12716
-21461
-56804

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

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

skipif mysql # not compatible
query I rowsort label-513
SELECT ALL + CAST ( col0 AS INTEGER ) + col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT col1 * - 17 + - tab0.col1 AS col1 FROM tab0
----
-1548
-1638
-1746

onlyif mysql # use DIV operator for integer division
query I rowsort label-515
SELECT ALL - col1 DIV col1 + - 19 * col1 col2 FROM tab1
----
-191
-248
-495

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-515
SELECT ALL - col1 / col1 + - 19 * col1 col2 FROM tab1
----
-191
-248
-495

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

query I rowsort
SELECT col1 + - 83 FROM tab2
----
-24
-52
-66

query I rowsort
SELECT - col0 + - col2 * - col0 * - tab1.col2 + col2 FROM tab1
----
-207943
-737264
-8697

query I rowsort
SELECT ALL 44 * + col0 FROM tab1
----
132
2816
3520

query I rowsort
SELECT + - col1 + + 25 * + col2 AS col2 FROM tab0 AS cor0
----
-72
1959
739

query I rowsort
SELECT DISTINCT cor0.col2 - - ( - 7 ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
-6
26
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - CAST ( + tab0.col0 AS REAL ) col0 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT col1 + + 30 AS col0 FROM tab0
----
116
121
127

query I rowsort
SELECT ALL - 53 - + col0 AS col2 FROM tab2 AS cor0
----
-131
-132
-60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + cor0.col2 * + col0 col0 FROM tab2 AS cor0
----
196
2106
3081

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

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

query I rowsort
SELECT ALL + 11 * cor0.col1 - + col1 AS col0 FROM tab0 AS cor0
----
860
910
970

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 + col1 * col2 col2 FROM tab2 AS cor0
----
1508
608
810

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

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

query I rowsort
SELECT ALL - col0 * cor0.col0 * + col1 + - col2 FROM tab2 AS cor0
----
-106135
-1546
-358982

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + tab1.col0 - + col0 col0 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-533
SELECT + ( col2 ) - 44 DIV col0 FROM tab1 AS cor0
----
40
57
96

skipif mysql # not compatible
query I rowsort label-533
SELECT + ( col2 ) - 44 / col0 FROM tab1 AS cor0
----
40
57
96

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

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

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

query I rowsort
SELECT ALL cor0.col0 * 6 FROM tab1 AS cor0
----
18
384
480

query I rowsort
SELECT + + col1 + 78 AS col2 FROM tab0 cor0
----
164
169
175

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + - cor0.col0 * CAST ( - 38 AS REAL ) + + cor0.col1 * 32 * - col1 AS col2 FROM tab1 AS cor0
----
-21518
-2368
-768

query I rowsort
SELECT ALL col0 * + 52 + - cor0.col2 - cor0.col0 AS col0 FROM tab0 AS cor0
----
1191
1784
4457

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-543
SELECT DISTINCT + - col1 * - col2 + - col0 DIV + col0 FROM tab0 AS cor0
----
2837
7461
96

skipif mysql # not compatible
query I rowsort label-543
SELECT DISTINCT + - col1 * - col2 + - col0 / + col0 FROM tab0 AS cor0
----
2837
7461
96

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

query I rowsort
SELECT - col2 + 18 AS col0 FROM tab0
----
-15
-64
17

query I rowsort
SELECT DISTINCT + col0 + - 86 AS col1 FROM tab1
----
-22
-6
-83

query I rowsort
SELECT ALL - + col1 + 78 AS col0 FROM tab1 AS cor0
----
52
65
68

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

query I rowsort
SELECT ALL - col1 * 11 FROM tab0 AS cor0
----
-1001
-1067
-946

query I rowsort
SELECT + + col0 * 90 AS col1 FROM tab1 AS cor0
----
270
5760
7200

query I rowsort
SELECT + cor0.col0 + 6 FROM tab2 cor0
----
13
84
85

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

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

query I rowsort
SELECT DISTINCT + - col1 * 32 AS col2 FROM tab0 AS cor0
----
-2752
-2912
-3104

query I rowsort
SELECT DISTINCT - + col2 + 9 * + col0 AS col1 FROM tab1 cor0
----
-27
519
624

query I rowsort
SELECT - col0 * - col1 + ( - col2 ) * - ( + ( - col1 ) ) + cor0.col2 FROM tab0 AS cor0
----
-741
3299
719

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

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

query I rowsort
SELECT col2 + - 88 AS col0 FROM tab2 AS cor0
----
-50
-61
-62

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

query I rowsort
SELECT ALL + 52 * - col2 + col1 FROM tab2 AS cor0
----
-1293
-1373
-1959

query I rowsort
SELECT ALL 13 FROM tab1 cor0
----
13
13
13

query I rowsort
SELECT - 21 * col1 + + cor0.col0 * - col1 FROM tab2 AS cor0
----
-1700
-5841
-868

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 55 col2 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 832128adb1ddc65c3105e29cc2c8b3a3

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

skipif mysql # not compatible
query I rowsort label-565
SELECT ALL col2 / - 76 + col2 AS col0 FROM tab1
----
54
57
95

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

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

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

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

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

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

query I rowsort
SELECT ALL - - 43 * col2 AS col1 FROM tab0 AS cor0
----
1419
3526
43

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-573
SELECT DISTINCT - ( - col0 ) DIV - 38 - col1 col2 FROM tab0 AS cor0
----
-86
-93
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-573
SELECT DISTINCT - ( - col0 ) / - 38 - col1 col2 FROM tab0 AS cor0
----
-86
-93
-97

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

query I rowsort
SELECT ALL - 47 + + col0 * + 18 FROM tab2 AS cor0
----
1357
1375
79

query I rowsort
SELECT ( - col0 * - tab2.col0 ) FROM tab2
----
49
6084
6241

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

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

query I rowsort
SELECT col2 * - ( col1 ) - col1 * - col0 AS col1 FROM tab0 AS cor0
----
-774
3298
637

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

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

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

query I rowsort
SELECT - col1 * col0 + - col1 AS col0 FROM tab1
----
-104
-1053
-650

onlyif mysql # use DIV operator for integer division
query I rowsort label-584
SELECT DISTINCT - ( col1 ) DIV col1 FROM tab1
----
-1

skipif mysql # not compatible
query I rowsort label-584
SELECT DISTINCT - ( col1 ) / col1 FROM tab1
----
-1

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

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

skipif mysql # not compatible
query I rowsort label-586
SELECT - col1 / - col1 - - col2 AS col1 FROM tab0
----
2
34
83

query I rowsort
SELECT DISTINCT - col2 + col2 * - col2 * - col1 FROM tab0
----
611802
93621
96

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL NOT IN ( col2 + tab1.col1 )
----

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col1 * - col1 + - col1 * - col0 col1 FROM tab2
----
-21488
-266916
-6510

query I rowsort
SELECT - - 99 + - col2 AS col2 FROM tab1 AS cor0
----
3
42
45

query I rowsort
SELECT DISTINCT - col0 + - tab1.col0 + + col1 * col1 * - tab1.col1 FROM tab1
----
-1128
-17582
-2357

onlyif mysql # use DIV operator for integer division
query I rowsort label-594
SELECT col2 DIV - col1 + - col0 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-594
SELECT col2 / - col1 + - col0 FROM tab0
----
-24
-35
-89

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

query I rowsort
SELECT ALL + col2 + col1 - tab2.col0 AS col0 FROM tab2
----
-24
51
7

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

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

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

query I rowsort
SELECT col2 AS col1 FROM tab0 WHERE NOT ( col1 / col0 + col0 * col1 ) > NULL
----

query I rowsort
SELECT ALL + 74 * cor0.col2 FROM tab0 cor0
----
2442
6068
74

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

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

query I rowsort
SELECT - 95 + col0 * col2 * + col2 FROM tab2 cor0
----
113981
5008
52633

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

query I rowsort
SELECT DISTINCT - tab1.col1 * col1 - - col1 AS col1 FROM tab1
----
-156
-650
-90

query I rowsort
SELECT DISTINCT col1 + cor0.col0 * col1 + col2 * col2 * cor0.col0 FROM tab2 AS cor0
----
115436
5351
57389

query I rowsort
SELECT col0 + + col2 * + col1 FROM tab1
----
1328
1407
634

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

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

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

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

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

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

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

query I rowsort
SELECT ALL col1 FROM tab0 cor0 WHERE NOT col1 >= NULL
----

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-616
SELECT - col2 DIV + col1 AS col0 FROM tab1
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-616
SELECT - col2 / + col1 AS col0 FROM tab1
----
-2
-5
-7

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-619
SELECT - col0 DIV + col2 - - col0 FROM tab0
----
0
24
88

skipif mysql # not compatible
query I rowsort label-619
SELECT - col0 / + col2 - - col0 FROM tab0
----
0
24
88

query I rowsort
SELECT DISTINCT - col1 + - col1 AS col2 FROM tab2
----
-118
-34
-62

query I rowsort
SELECT tab2.col0 FROM tab2 WHERE ( NULL ) < NULL
----

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

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE ( NULL ) < - col0 * + col2 + col2 + col1 / + col1
----

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

query III rowsort
SELECT * FROM tab1 WHERE NOT - col0 IN ( - col2 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

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

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

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

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

query I rowsort
SELECT cor1.col1 * + 60 FROM tab0, tab1 cor0, tab2 AS cor1
----
27 values hashing to feecf3a1a326eaf3b4c9526c36d20e8e

onlyif mysql # use DIV operator for integer division
query I rowsort label-630
SELECT + col1 * col0 DIV col1 AS col2 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-630
SELECT + col1 * col0 / col1 AS col2 FROM tab0 AS cor0
----
24
35
89

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-631
SELECT - 8 / cor0.col1 col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col2 * col0 * 47 + col0 AS col0 FROM tab2 AS cor0
----
-141015
-8876
-95238

query I rowsort
SELECT - - col2 + - col1 + - col2 AS col2 FROM tab0 AS cor0
----
-86
-91
-97

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

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

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

query I rowsort
SELECT - cor0.col2 + col0 * + 10 + col0 AS col0 FROM tab2 AS cor0
----
50
831
832

query I rowsort
SELECT 61 * - col1 + + col2 * cor0.col0 + - col0 FROM tab2 AS cor0
----
-1649
-1709
1886

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-641
SELECT ALL 11 DIV + ( col1 ) FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-641
SELECT ALL 11 / + ( col1 ) FROM tab0
----
0
0
0

query I rowsort
SELECT ALL - 33 + + 53 FROM tab1, tab0, tab2 cor0
----
27 values hashing to 0a35fe98f3e7d5fc8ff2ae815bd20ef4

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

skipif mysql # not compatible
query I rowsort label-643
SELECT DISTINCT col0 / + ( - col1 ) FROM tab2
----
-1
-4
0

query I rowsort
SELECT + - col0 * 97 FROM tab0 AS cor0
----
-2328
-3395
-8633

query I rowsort
SELECT col1 + 82 AS col0 FROM tab2 AS cor0
----
113
141
99

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

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

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

query I rowsort
SELECT ALL ( - 81 ) FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to d0bfe8494f52235d9fcafb5ac5de3f81

query IIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab0, tab0 cor1
----
243 values hashing to 021da207cdc2a046fb0a79bf7cfc38ae

query I rowsort
SELECT ALL - col1 * col0 + col1 * - col0 FROM tab2 AS cor0
----
-2686
-434
-9204

query I rowsort
SELECT - col1 + 20 AS col2 FROM tab2 AS cor0
----
-11
-39
3

query I rowsort
SELECT - 63 FROM tab1 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 5a7845ef6e239561caf9a17a28e274b5

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-654
SELECT DISTINCT + + col2 DIV - col0 + col2 AS col0 FROM tab0 AS cor0
----
1
32
82

skipif mysql # not compatible
query I rowsort label-654
SELECT DISTINCT + + col2 / - col0 + col2 AS col0 FROM tab0 AS cor0
----
1
32
82

query I rowsort
SELECT DISTINCT + + 54 * col0 + col2 AS col1 FROM tab1 AS cor0
----
216
3513
4416

query I rowsort
SELECT ALL + + 94 * col2 AS col2 FROM tab0 AS cor0
----
3102
7708
94

query I rowsort
SELECT - col1 * + col2 + - col0 * cor0.col1 FROM tab1 AS cor0
----
-1210
-1482
-2288

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

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

query I rowsort
SELECT DISTINCT + ( col1 ) * 64 FROM tab1 AS cor0
----
1664
640
832

query I rowsort
SELECT DISTINCT + 80 * + col0 * - col2 AS col2 FROM tab2
----
-15120
-162240
-240160

query I rowsort
SELECT DISTINCT col1 * col1 + - col1 + - 68 AS col0 FROM tab0
----
7242
8122
9244

query I rowsort
SELECT DISTINCT col1 + + tab0.col0 * + ( col0 ) AS col1 FROM tab0
----
1322
662
8012

query I rowsort
SELECT DISTINCT - 83 + + col1 FROM tab1
----
-57
-70
-73

query I rowsort
SELECT DISTINCT cor0.col2 * col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ALL - + col2 * + ( 63 ) * col0 AS col0 FROM tab2 AS cor0
----
-11907
-127764
-189126

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-668
SELECT + col2 + + col1 DIV col0 FROM tab2 AS cor0
----
26
31
38

skipif mysql # not compatible
query I rowsort label-668
SELECT + col2 + + col1 / col0 FROM tab2 AS cor0
----
26
31
38

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

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

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

query I rowsort
SELECT ALL + col2 + col0 * ( - 93 ) FROM tab0
----
-2199
-3254
-8195

query I rowsort
SELECT col1 * - col0 + 59 FROM tab1
----
-19
-581
-981

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + + col0 * - col0 * + col2 col1 FROM tab2
----
-1296
-158158
-237120

query I rowsort
SELECT - 0 + col1 - 33 AS col0 FROM tab2
----
-16
-2
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-675
SELECT - 86 DIV cor0.col0 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 2e1e87b43f99fbc23330e60754c9adc8

skipif mysql # not compatible
query I rowsort label-675
SELECT - 86 / cor0.col0 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 2e1e87b43f99fbc23330e60754c9adc8

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

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

query I rowsort
SELECT DISTINCT 85 - col0 AS col1 FROM tab0 AS cor0
----
-4
50
61

query I rowsort
SELECT + 30 + cor0.col1 AS col1 FROM tab0 AS cor0
----
116
121
127

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

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

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

query I rowsort
SELECT ALL + ( 12 ) * col1 + 17 * col0 FROM tab0 cor0
----
1440
1759
2605

query I rowsort
SELECT DISTINCT + + 47 - cor0.col2 * - col1 AS col2 FROM tab0 AS cor0
----
144
2885
7509

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

query I rowsort
SELECT ALL 74 * + col2 AS col0 FROM tab1 AS cor0
----
3996
4218
7104

query I rowsort
SELECT + col2 * + col2 + cor0.col0 FROM tab0 AS cor0
----
1113
36
6813

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - tab0.col1 col0 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

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

query I rowsort
SELECT DISTINCT - - cor0.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
1
33
82

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

query I rowsort
SELECT 78 + col0 + - tab1.col2 FROM tab1
----
27
62
85

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

query I rowsort
SELECT - 85 * + cor0.col0 + - col2 FROM tab1 cor0
----
-309
-5497
-6896

query I rowsort
SELECT DISTINCT 2 AS col2 FROM tab0 cor0
----
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-695
SELECT + ( ( + col1 ) ) * col1 DIV + 20 FROM tab0
----
369
414
470

skipif mysql # not compatible
query I rowsort label-695
SELECT + ( ( + col1 ) ) * col1 / + 20 FROM tab0
----
369
414
470

query I rowsort
SELECT col2 + - 53 FROM tab1
----
1
4
43

query I rowsort
SELECT - 43 + - tab0.col0 FROM tab0
----
-132
-67
-78

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

query I rowsort
SELECT ALL - col2 + - col0 - + col0 FROM tab2 AS cor0
----
-182
-196
-41

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 30 - col0 col0 FROM tab0 AS cor0
----
-119
-54
-65

onlyif mysql # use DIV operator for integer division
query I rowsort label-702
SELECT ALL + col1 + col1 DIV - ( 29 ) FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-702
SELECT ALL + col1 + col1 / - ( 29 ) FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT - cor0.col0 + - col0 - 17 AS col1 FROM tab2 AS cor0
----
-173
-175
-31

skipif mysql # not compatible
query I rowsort
SELECT - col0 * + col0 + CAST ( col2 AS REAL ) AS col1 FROM tab0 AS cor0
----
-1224
-543
-7839

query I rowsort
SELECT DISTINCT 34 * + cor0.col0 + - 17 FROM tab0 AS cor0
----
1173
3009
799

query I rowsort
SELECT ALL - - 15 AS col0 FROM tab0 AS cor0
----
15
15
15

query I rowsort
SELECT + col0 * + col0 + 66 * ( col1 + col1 ) FROM tab2 AS cor0
----
13872
4141
8485

query I rowsort
SELECT DISTINCT col0 * col0 + - ( 98 ) FROM tab0
----
1127
478
7823

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

query I rowsort
SELECT 80 * col2 - - 7 FROM tab0 AS cor0
----
2647
6567
87

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

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

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

query I rowsort
SELECT ALL - + col2 + - col0 * - 23 * col0 FROM tab0 AS cor0
----
13215
182101
28174

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

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

query I rowsort
SELECT 81 * - col0 AS col1 FROM tab2 AS cor0
----
-567
-6318
-6399

query I rowsort
SELECT DISTINCT col2 + + col2 * col0 * col1 + col0 FROM tab0 AS cor0
----
3431
664289
68169

query I rowsort
SELECT + col2 + - 5 AS col2 FROM tab2 cor0
----
21
22
33

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * - 60 col2 FROM tab0 AS cor0
----
-1440
-2100
-5340

query I rowsort
SELECT ALL + col1 + 44 AS col0 FROM tab0 AS cor0
----
130
135
141

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-724
SELECT - cor0.col1 * ( ( col2 ) ) DIV ( cor0.col0 ) FROM tab2 AS cor0
----
-119
-19
-8

skipif mysql # not compatible
query I rowsort label-724
SELECT - cor0.col1 * ( ( col2 ) ) / ( cor0.col0 ) FROM tab2 AS cor0
----
-119
-19
-8

query I rowsort
SELECT ALL col1 + + 42 AS col1 FROM tab0 AS cor0
----
128
133
139

query I rowsort
SELECT + cor0.col2 + 66 * col2 FROM tab0 cor0
----
2211
5494
67

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

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

skipif mysql # not compatible
query I rowsort label-728
SELECT DISTINCT CAST ( NULL AS INTEGER ) * - 12 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT 36 * - 97 + + col0 AS col0 FROM tab0 AS cor0
----
-3403
-3457
-3468

query I rowsort
SELECT - 26 FROM tab0, tab2 AS cor0
----
9 values hashing to 47d0574274146de273829785364ada39

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

query I rowsort
SELECT + 57 * col1 + + col1 AS col2 FROM tab2 AS cor0
----
1798
3422
986

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-733
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

skipif mysql # not compatible
query I rowsort label-733
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to cb33c30d6f52bbb24338a293c740f29c

query I rowsort
SELECT ALL - + 63 * + 96 FROM tab2 cor0
----
-6048
-6048
-6048

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-735
SELECT DISTINCT CAST( NULL AS DECIMAL ) AS col0 FROM tab0, tab2 AS cor0, tab1 AS cor1, tab2 AS cor2
----
NULL

skipif mysql # not compatible
query I rowsort label-735
SELECT DISTINCT CAST ( NULL AS REAL ) AS col0 FROM tab0, tab2 AS cor0, tab1 AS cor1, tab2 AS cor2
----
NULL

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

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

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

query I rowsort
SELECT col0 * + 97 AS col2 FROM tab1 cor0
----
291
6208
7760

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

skipif mysql # not compatible
query I rowsort label-739
SELECT ALL col1 / col2 FROM tab1
----
0
0
0

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

query I rowsort
SELECT 63 + col2 * + col1 FROM tab0
----
160
2901
7525

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

query I rowsort
SELECT + ( + tab1.col1 ) + 9 AS col2 FROM tab1
----
19
22
35

query I rowsort
SELECT col0 + col1 + + col0 AS col1 FROM tab2 AS cor0
----
175
215
45

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

skipif mysql # not compatible
query I rowsort label-745
SELECT - col0 / + ( + col2 ) FROM tab0
----
-1
-35
0

query I rowsort
SELECT ALL tab1.col1 + - ( - col0 ) * - col0 + 5 AS col2 FROM tab1
----
-4081
-6382
22

query I rowsort
SELECT col0 * - 22 FROM tab0 AS cor0
----
-1958
-528
-770

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

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

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

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

query I rowsort
SELECT cor0.col0 + + 47 AS col2 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 385c0443a3e5bd054d740b843e1d60b8

onlyif mysql # use DIV operator for integer division
query I rowsort label-752
SELECT + 67 DIV col0 + + ( col2 ) FROM tab0 AS cor0
----
2
35
82

skipif mysql # not compatible
query I rowsort label-752
SELECT + 67 / col0 + + ( col2 ) FROM tab0 AS cor0
----
2
35
82

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

query I rowsort
SELECT - 76 FROM tab0, tab0 AS cor0
----
9 values hashing to f8b6589bc7503fc720ca5430e3569317

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 69 col1 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 2810c3097fe4771e273cfff903357b40

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

query I rowsort
SELECT + + 81 + + col0 FROM tab0 AS cor0
----
105
116
170

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

query I rowsort
SELECT DISTINCT 98 * col0 AS col0 FROM tab0
----
2352
3430
8722

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-760
SELECT - 60 + col1 * CAST( cor0.col0 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
1283
157
4542

skipif mysql # not compatible
query I rowsort label-760
SELECT - 60 + col1 * CAST ( cor0.col0 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
1283
157
4542

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

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

query I rowsort
SELECT col1 * 98 * - tab0.col0 + + col2 FROM tab0
----
-202239
-332709
-793620

query I rowsort
SELECT tab2.col0 + 59 * ( - col2 ) FROM tab2
----
-1456
-1586
-2163

query I rowsort
SELECT ALL + col0 + 26 AS col2 FROM tab1 AS cor0
----
106
29
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-766
SELECT ALL + col0 DIV 78 - 50 * col2 FROM tab0 AS cor0
----
-1650
-4099
-50

skipif mysql # not compatible
query I rowsort label-766
SELECT ALL + col0 / 78 - 50 * col2 FROM tab0 AS cor0
----
-1650
-4099
-50

query I rowsort
SELECT DISTINCT - col0 + - 26 AS col2 FROM tab2 AS cor0
----
-104
-105
-33

query I rowsort
SELECT DISTINCT - col2 * + 17 AS col2 FROM tab2 AS cor0
----
-442
-459
-646

query I rowsort
SELECT col0 * 90 FROM tab0 cor0
----
2160
3150
8010

query I rowsort
SELECT DISTINCT 41 - - col0 FROM tab2
----
119
120
48

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

skipif mysql # not compatible
query I rowsort label-771
SELECT + col0 + + col2 * col0 + + CAST ( col1 AS INTEGER ) AS col1 FROM tab1 cor0
----
191
3722
7773

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-774
SELECT 8 * 33 DIV - col0 col2 FROM tab2
----
-3
-3
-37

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-774
SELECT 8 * 33 / - col0 col2 FROM tab2
----
-3
-3
-37

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

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

query I rowsort
SELECT + 61 + 68 FROM tab1 AS cor0
----
129
129
129

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

query I rowsort
SELECT - + col0 * + cor0.col1 + - 91 * - cor0.col2 AS col1 FROM tab0 AS cor0
----
-3304
-637
939

query I rowsort
SELECT - - 71 + + col1 AS col0 FROM tab2 AS cor0
----
102
130
88

query I rowsort
SELECT + - 72 + + col1 AS col0 FROM tab2 AS cor0
----
-13
-41
-55

query I rowsort
SELECT + + col1 + + col0 * 43 AS col2 FROM tab2 AS cor0
----
332
3413
3414

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-786
SELECT col0 * col0 DIV - tab1.col2 AS col1 FROM tab1
----
-66
-71
0

skipif mysql # not compatible
query I rowsort label-786
SELECT col0 * col0 / - tab1.col2 AS col1 FROM tab1
----
-66
-71
0

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

skipif mysql # not compatible
query I rowsort label-787
SELECT + CAST ( + 31 AS INTEGER ) * + col2 AS col0 FROM tab2
----
1178
806
837

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

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

query I rowsort
SELECT DISTINCT col1 * 46 * 79 - - col2 AS col2 FROM tab0
----
312557
330776
352499

query I rowsort
SELECT - cor0.col2 + + cor0.col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to fe2aa4e2d3fac3ceeb710c1055a15bad

onlyif mysql # use DIV operator for integer division
query I rowsort label-792
SELECT DISTINCT col1 * 55 + 56 - col1 DIV - 49 col1 FROM tab2
----
1761
3302
991

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-792
SELECT DISTINCT col1 * 55 + 56 - col1 / - 49 col1 FROM tab2
----
1761
3302
991

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

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-796
SELECT col0 * - CAST( - col0 AS SIGNED ) + + col1 FROM tab2
----
6143
6258
80

skipif mysql # not compatible
query I rowsort label-796
SELECT col0 * - CAST ( - col0 AS INTEGER ) + + col1 FROM tab2
----
6143
6258
80

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

query I rowsort
SELECT ALL + col2 * 72 FROM tab0 AS cor0
----
2376
5904
72

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-801
SELECT - col2 + CAST ( - col0 AS INTEGER ) * - col2 col2 FROM tab1 AS cor0
----
108
3591
7584

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

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

query I rowsort
SELECT - 79 + cor0.col1 * + col2 AS col1 FROM tab2 AS cor0
----
1455
567
758

onlyif mysql # use DIV operator for integer division
query I rowsort label-805
SELECT 68 - 66 DIV cor0.col0 FROM tab1 AS cor0
----
46
67
68

skipif mysql # not compatible
query I rowsort label-805
SELECT 68 - 66 / cor0.col0 FROM tab1 AS cor0
----
46
67
68

query I rowsort
SELECT ALL 45 + 48 * cor0.col2 FROM tab0 AS cor0
----
1629
3981
93

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

skipif mysql # not compatible
query I rowsort label-807
SELECT ALL CAST ( col1 AS INTEGER ) * col2 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT + + cor0.col2 + col2 * - col1 + - col2 * 83 FROM tab1 AS cor0
----
-5244
-5832
-9120

query I rowsort
SELECT ALL - + 30 FROM tab0 cor0
----
-30
-30
-30

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

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

query I rowsort
SELECT DISTINCT - - ( + col0 ) + + col2 * + col2 FROM tab1 AS cor0
----
2919
3313
9296

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-814
SELECT + col1 DIV + col1 + col0 * + col2 + - col0 * + ( tab0.col2 ) AS col0 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-814
SELECT + col1 / + col1 + col0 * + col2 + - col0 * + ( tab0.col2 ) AS col0 FROM tab0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-815
SELECT DISTINCT - col2 DIV + col0 - + 64 AS col1 FROM tab2
----
-64
-67

skipif mysql # not compatible
query I rowsort label-815
SELECT DISTINCT - col2 / + col0 - + 64 AS col1 FROM tab2
----
-64
-67

query I rowsort
SELECT ALL - col1 - 61 FROM tab1
----
-71
-74
-87

query I rowsort
SELECT + col1 + tab2.col1 - ( - col0 ) * + 25 AS col1 FROM tab2
----
2009
2068
237

query I rowsort
SELECT col1 * + col1 + 56 * - col0 FROM tab1
----
-3484
-4311
508

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

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

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

query I rowsort
SELECT ALL - ( + col1 ) * + col1 + + col1 FROM tab1 AS cor0
----
-156
-650
-90

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

query I rowsort
SELECT ALL + col1 * 68 FROM tab1
----
1768
680
884

query I rowsort
SELECT ALL 77 * - col1 + cor0.col2 FROM tab0 AS cor0
----
-6589
-6925
-7468

query I rowsort
SELECT DISTINCT + 98 * col1 + + cor0.col1 FROM tab0 cor0
----
8514
9009
9603

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

skipif mysql # not compatible
query I rowsort label-827
SELECT DISTINCT col1 + + col2 - + cor0.col1 / col0 AS col2 FROM tab1 AS cor0
----
109
67
72

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

query I rowsort
SELECT - ( col1 ) * 6 AS col1 FROM tab0 AS cor0
----
-516
-546
-582

query I rowsort
SELECT DISTINCT 82 * - cor1.col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
-574
-6396
-6478

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

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

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

query I rowsort
SELECT ALL + - cor0.col0 + 55 AS col2 FROM tab0 AS cor0
----
-34
20
31

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

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

skipif mysql # not compatible
query I rowsort label-836
SELECT DISTINCT - col0 + ( - ( - col1 ) ) * CAST ( col2 AS INTEGER ) FROM tab2 AS cor0
----
1456
567
830

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * - 17 * - col0 col2 FROM tab0 AS cor0
----
134657
20825
9792

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + col0 * 95 * - col1 col1 FROM tab0
----
-196113
-322526
-769487

query I rowsort
SELECT ALL + col2 + 51 AS col2 FROM tab2 AS cor0
----
77
78
89

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

query I rowsort
SELECT ALL col0 + col2 * col0 * + col2 FROM tab0 AS cor0
----
26160
598525
70

query I rowsort
SELECT DISTINCT - col1 + cor0.col1 * - col1 * + col1 AS col1 FROM tab2 AS cor0
----
-205438
-29822
-4930

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

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

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

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

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

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

query I rowsort
SELECT - tab0.col1 + col0 * + 50 FROM tab0
----
1114
1653
4359

query I rowsort
SELECT + 45 * + col1 FROM tab0 AS cor0
----
3870
4095
4365

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * col0 + + col0 + col2 col1 FROM tab2 AS cor0
----
1460
251
4706

onlyif mysql # use DIV operator for integer division
query I rowsort label-856
SELECT DISTINCT - - 12 DIV + col0 - + col2 * + ( col1 ) AS col0 FROM tab1 AS cor0
----
-1248
-1400
-570

skipif mysql # not compatible
query I rowsort label-856
SELECT DISTINCT - - 12 / + col0 - + col2 * + ( col1 ) AS col0 FROM tab1 AS cor0
----
-1248
-1400
-570

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

query I rowsort
SELECT ALL + 71 * + col2 FROM tab2 AS cor0
----
1846
1917
2698

onlyif mysql # use DIV operator for integer division
query I rowsort label-859
SELECT ALL + - col0 DIV col0 + CAST( + col0 AS SIGNED ) FROM tab2 AS cor0
----
6
77
78

skipif mysql # not compatible
query I rowsort label-859
SELECT ALL + - col0 / col0 + CAST ( + col0 AS INTEGER ) FROM tab2 AS cor0
----
6
77
78

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

query I rowsort
SELECT DISTINCT + col0 + - 29 FROM tab0 cor0
----
-5
6
60

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

query I rowsort
SELECT + 43 * + col1 FROM tab2 AS cor0
----
1333
2537
731

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

skipif mysql # not compatible
query I rowsort label-864
SELECT ALL - col0 / - 91 + cor0.col2 FROM tab1 AS cor0
----
54
57
96

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

skipif mysql # not compatible
query I rowsort label-865
SELECT - + CAST ( col1 AS INTEGER ) * + col2 AS col2 FROM tab1 cor0
----
-1248
-1404
-570

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-869
SELECT DISTINCT + CAST ( + col1 AS INTEGER ) col1 FROM tab2 AS cor0
----
17
31
59

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

query I rowsort
SELECT - 80 + col0 FROM tab0 AS cor0
----
-45
-56
9

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

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

query I rowsort
SELECT - + 23 + - col2 FROM tab1 AS cor0
----
-119
-77
-80

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

query I rowsort
SELECT + 74 + cor0.col1 FROM tab2 AS cor0
----
105
133
91

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

query I rowsort
SELECT + col0 + 80 + col2 AS col0 FROM tab1 AS cor0
----
137
201
256

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

query I rowsort
SELECT ALL + 49 * tab1.col2 AS col0 FROM tab1
----
2646
2793
4704

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

query I rowsort
SELECT - col0 + col2 * - col2 FROM tab0 AS cor0
----
-1113
-36
-6813

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

query I rowsort
SELECT + + cor0.col1 * col2 + col0 FROM tab1 cor0
----
1328
1407
634

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

query I rowsort
SELECT ALL - col0 * 46 + 89 AS col0 FROM tab1 AS cor0
----
-2855
-3591
-49

query I rowsort
SELECT ALL - col2 + ( col1 + - col0 ) * col2 AS col0 FROM tab0 AS cor0
----
2013
61
82

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

query I rowsort
SELECT ALL - col1 + - col0 + - col1 AS col0 FROM tab0
----
-196
-229
-271

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

skipif mysql # not compatible
query I rowsort label-889
SELECT ALL - + col2 * + CAST ( + col1 + + col0 AS INTEGER ) FROM tab0 AS cor0
----
-132
-14760
-3630

query I rowsort
SELECT + col1 * + col2 + - col2 + - cor0.col1 * col0 FROM tab0 AS cor0
----
-3299
-719
741

query I rowsort
SELECT ALL + 60 - + 54 FROM tab0 cor0
----
6
6
6

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

query I rowsort
SELECT ALL + ( col2 ) - + col1 * 40 AS col0 FROM tab0 cor0
----
-3407
-3558
-3879

query I rowsort
SELECT DISTINCT + ( 10 ) + col0 FROM tab0 AS cor0
----
34
45
99

query I rowsort
SELECT ALL - col0 + cor0.col1 + - col1 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL + + ( - 94 ) * col0 AS col1 FROM tab2 AS cor0
----
-658
-7332
-7426

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

query I rowsort
SELECT - tab1.col2 * 52 * col1 AS col0 FROM tab1
----
-29640
-64896
-73008

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

skipif mysql # not compatible
query I rowsort label-899
SELECT ALL - ( col2 ) / - col2 + - col0 FROM tab0
----
-23
-34
-88

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

query I rowsort
SELECT + + 65 * + col1 + + col2 * col1 FROM tab2 AS cor0
----
1751
2852
5369

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

query I rowsort
SELECT ALL col1 + col1 * col1 AS col2 FROM tab1
----
110
182
702

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

query I rowsort
SELECT tab2.col0 + - col0 * col2 + - col1 AS col2 FROM tab2
----
-2009
-213
-2940

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-909
SELECT ALL + - 79 DIV col0 FROM tab2 AS cor0
----
-1
-1
-11

skipif mysql # not compatible
query I rowsort label-909
SELECT ALL + - 79 / col0 FROM tab2 AS cor0
----
-1
-1
-11

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

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

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

query I rowsort
SELECT - - col0 + + 70 AS col2 FROM tab2 AS cor0
----
148
149
77

query I rowsort
SELECT - col2 * 46 FROM tab2 AS cor0
----
-1196
-1242
-1748

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

query I rowsort
SELECT + col0 * - ( + col1 * - col0 ) + col0 * cor0.col0 FROM tab2 cor0
----
112338
1568
365040

query I rowsort
SELECT + - col2 - - ( 44 ) AS col2 FROM tab0 AS cor0
----
-38
11
43

onlyif mysql # use DIV operator for integer division
query I rowsort label-917
SELECT ALL - col2 DIV col1 + - col1 * col2 DIV col0 col0 FROM tab1
----
-13
-22
-470

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-917
SELECT ALL - col2 / col1 + - col1 * col2 / col0 col0 FROM tab1
----
-13
-22
-470

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

query I rowsort
SELECT - cor0.col1 * - 8 + - col0 FROM tab2 AS cor0
----
241
394
57

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

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

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

query I rowsort
SELECT ALL + col0 * + col0 - col1 * col1 FROM tab0 AS cor0
----
-360
-6820
-8184

query I rowsort
SELECT - col1 + 40 FROM tab1
----
14
27
30

query I rowsort
SELECT DISTINCT - cor0.col1 + 67 FROM tab0 AS cor0
----
-19
-24
-30

query I rowsort
SELECT ALL + - col1 - 54 FROM tab1 AS cor0
----
-64
-67
-80

query I rowsort
SELECT ALL - 13 * + 3 FROM tab1, tab1 AS cor0
----
9 values hashing to 504d14939d58aeb4a14f31c80de5b53e

query I rowsort
SELECT ALL - 57 + - col2 * + tab0.col2 + ( 22 ) FROM tab0
----
-1124
-36
-6759

onlyif mysql # use DIV operator for integer division
query I rowsort label-929
SELECT DISTINCT + 65 DIV + col0 + col2 AS col0 FROM tab0
----
2
35
82

skipif mysql # not compatible
query I rowsort label-929
SELECT DISTINCT + 65 / + col0 + col2 AS col0 FROM tab0
----
2
35
82

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

query I rowsort
SELECT ALL - 80 + col0 AS col0 FROM tab0 AS cor0
----
-45
-56
9

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

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

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

query I rowsort
SELECT ALL + cor0.col2 * - col0 + ( + 42 ) AS col1 FROM tab1 AS cor0
----
-120
-3606
-7638

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - 30 col0 FROM tab2
----
1140
780
810

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col0 col2 FROM tab1 cor0
----
-3
-64
-80

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

query I rowsort
SELECT DISTINCT - col0 + + col1 * 42 FROM tab0 AS cor0
----
3588
3733
4039

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

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

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

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

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

query I rowsort
SELECT + 96 + + col2 AS col0 FROM tab2 AS cor0
----
122
123
134

query I rowsort
SELECT ALL col2 + + col0 * + 34 AS col1 FROM tab1 AS cor0
----
156
2233
2816

query I rowsort
SELECT ALL 11 + col0 FROM tab2 AS cor0
----
18
89
90

query I rowsort
SELECT - - col1 * ( - 87 * col2 ) AS col2 FROM tab2 AS cor0
----
-133458
-56202
-72819

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

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

query I rowsort
SELECT - 86 + col0 * - col0 AS col0 FROM tab1
----
-4182
-6486
-95

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

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

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

query I rowsort
SELECT - 82 + cor0.col0 AS col2 FROM tab1 AS cor0
----
-18
-2
-79

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

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

query I rowsort
SELECT DISTINCT - + ( - col2 ) + col2 * 13 + - col1 AS col2 FROM tab1 AS cor0
----
1331
730
788

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

query I rowsort
SELECT - - col1 * col0 + - col1 AS col2 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT ALL + 71 + col0 FROM tab0 AS cor0
----
106
160
95

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-963
SELECT + col0 * + col0 + cor0.col1 - CAST ( col1 AS INTEGER ) col2 FROM tab0 AS cor0
----
1225
576
7921

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-965
SELECT - CAST( + col1 AS SIGNED ) DIV - col0 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-965
SELECT - CAST ( + col1 AS INTEGER ) / - col0 FROM tab0 AS cor0
----
1
2
3

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

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

query I rowsort
SELECT DISTINCT + - 89 + - 57 AS col1 FROM tab1 AS cor0
----
-146

query I rowsort
SELECT ALL + ( col1 ) + col1 * - col0 FROM tab1 AS cor0
----
-1027
-52
-630

onlyif mysql # use DIV operator for integer division
query I rowsort label-970
SELECT ALL + tab1.col0 DIV tab1.col2 - 4 AS col1 FROM tab1
----
-3
-4
-4

skipif mysql # not compatible
query I rowsort label-970
SELECT ALL + tab1.col0 / tab1.col2 - 4 AS col1 FROM tab1
----
-3
-4
-4

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

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

query I rowsort
SELECT - col1 + 81 + col0 FROM tab0
----
19
19
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-973
SELECT + col1 + 88 DIV tab1.col0 AS col0 FROM tab1
----
11
14
55

skipif mysql # not compatible
query I rowsort label-973
SELECT + col1 + 88 / tab1.col0 AS col0 FROM tab1
----
11
14
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * + tab2.col2 * 96 col0 FROM tab2
----
-147264
-62016
-80352

query I rowsort
SELECT + + 24 * - col0 AS col1 FROM tab2 AS cor0
----
-168
-1872
-1896

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

query I rowsort
SELECT 88 AS col0 FROM tab0, tab2 AS cor0 CROSS JOIN tab1
----
27 values hashing to c46e7cf9bf516fdfde88534336a28177

query I rowsort
SELECT ALL + 49 * 50 FROM tab1 AS cor0
----
2450
2450
2450

query I rowsort
SELECT - + 1 + - cor0.col0 FROM tab1 AS cor0
----
-4
-65
-81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 52 * col1 col0 FROM tab2 AS cor0
----
1612
3068
884

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-984
SELECT - col0 * + col0 * col1 + - col2 DIV + col1 FROM tab2
----
-106099
-1519
-358956

skipif mysql # not compatible
query I rowsort label-984
SELECT - col0 * + col0 * col1 + - col2 / + col1 FROM tab2
----
-106099
-1519
-358956

query I rowsort
SELECT - col0 AS col0 FROM tab2 WHERE NULL BETWEEN + col1 AND col1 * + col1
----

query III rowsort
SELECT * FROM tab1 WHERE + col1 IN ( - col2 - col1 )
----

query III rowsort
SELECT ALL * FROM tab2 WHERE col0 IN ( + col0 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT - col1 * col1 + - col2 FROM tab1
----
-157
-265
-730

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

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

query III rowsort
SELECT * FROM tab0 WHERE NOT ( NULL ) >= col1
----

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

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

query I rowsort
SELECT DISTINCT tab1.col1 * + col2 * - col0 FROM tab1
----
-36480
-4212
-99840

query I rowsort
SELECT + tab0.col2 * - col2 * col2 + + col0 FROM tab0
----
-35913
-551279
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-996
SELECT DISTINCT + col0 - col2 DIV col2 FROM tab0
----
23
34
88

skipif mysql # not compatible
query I rowsort label-996
SELECT DISTINCT + col0 - col2 / col2 FROM tab0
----
23
34
88

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

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

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

query I rowsort
SELECT + col2 + - col2 * + col1 AS col0 FROM tab2
----
-1508
-608
-810

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT col2 * - col2 + - col2 * + col2 IN ( col2 )
----
9 values hashing to 8d6692e6d41505c3ad42d919bd9ecd0d

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

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

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

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

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

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

query I rowsort
SELECT + - col2 * col2 * col0 AS col2 FROM tab1 cor0
----
-207936
-737280
-8748

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

query III rowsort
SELECT DISTINCT * FROM tab0 AS cor0 WHERE ( NULL ) IN ( + col1 + + col1 * col1 )
----

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

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL NOT BETWEEN ( NULL ) AND NULL
----

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

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

query I rowsort
SELECT DISTINCT col2 + tab1.col1 + tab1.col2 AS col0 FROM tab1
----
124
134
205

query I rowsort
SELECT + cor0.col2 * col2 + + col1 + col2 * col1 FROM tab2 AS cor0
----
1597
2107
2269

query I rowsort
SELECT - + col2 * + 13 FROM tab2 AS cor0
----
-338
-351
-494

query I rowsort
SELECT - col1 * + cor0.col1 - - 81 AS col0 FROM tab0 cor0
----
-7315
-8200
-9328

query I rowsort
SELECT col2 + + col0 - - 95 FROM tab2 AS cor0
----
129
199
212

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

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

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

query I rowsort
SELECT DISTINCT - cor0.col0 + col2 * col2 FROM tab1 AS cor0
----
2913
3185
9136

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

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

query I rowsort
SELECT ALL - + cor0.col1 * - 98 + col1 AS col1 FROM tab2 cor0
----
1683
3069
5841

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 + col2 * + 10 col1 FROM tab1 AS cor0
----
1056
594
627

query I rowsort
SELECT ALL - col0 * col0 + - ( + col2 ) FROM tab2 AS cor0
----
-6110
-6279
-76

onlyif mysql # use DIV operator for integer division
query I rowsort label-1026
SELECT DISTINCT + col1 DIV col1 + - 27 FROM tab0 AS cor0
----
-26

skipif mysql # not compatible
query I rowsort label-1026
SELECT DISTINCT + col1 / col1 + - 27 FROM tab0 AS cor0
----
-26

query I rowsort
SELECT DISTINCT - cor0.col0 + col2 * + col1 * - 82 FROM tab0 AS cor0
----
-232740
-611973
-7989

query I rowsort
SELECT + + 17 * 30 + - col1 AS col1 FROM tab2 AS cor0
----
451
479
493

query I rowsort
SELECT ALL - + col1 * + 29 * - cor0.col2 AS col0 FROM tab2 AS cor0
----
18734
24273
44486

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

skipif mysql # not compatible
query I rowsort label-1030
SELECT DISTINCT - - 71 / col0 FROM tab0 AS cor0
----
0
2

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

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

query I rowsort
SELECT - ( + col0 ) * + col0 + - 52 * - cor0.col2 * - col1 + + ( + col1 ) FROM tab0 AS cor0
----
-148066
-395854
-6172

query I rowsort
SELECT ALL - col0 - + tab0.col0 * 3 * col1 FROM tab0
----
-10220
-24386
-6216

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

query I rowsort
SELECT 55 + col0 AS col0 FROM tab1 AS cor0
----
119
135
58

onlyif mysql # use DIV operator for integer division
query I rowsort label-1036
SELECT DISTINCT + col2 * + col1 DIV + col1 - col1 * col1 FROM tab0
----
-7363
-8199
-9408

skipif mysql # not compatible
query I rowsort label-1036
SELECT DISTINCT + col2 * + col1 / + col1 - col1 * col1 FROM tab0
----
-7363
-8199
-9408

onlyif mysql # use DIV operator for integer division
query I rowsort label-1037
SELECT ALL - col1 * + col1 + col2 DIV - col0 col1 FROM tab0
----
-7397
-8281
-9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1037
SELECT ALL - col1 * + col1 + col2 / - col0 col1 FROM tab0
----
-7397
-8281
-9409

query III rowsort
SELECT * FROM tab0 WHERE NOT + col2 NOT IN ( - col1 * col2 + - col2 + - col1 )
----

query III rowsort
SELECT * FROM tab0 WHERE NULL <> + col2 * col0 + + col0 + tab0.col2
----

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

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

skipif mysql # not compatible
query I rowsort label-1041
SELECT DISTINCT - tab0.col2 / - col0 - - col1 FROM tab0
----
87
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-1042
SELECT DISTINCT + col0 * col0 DIV - col1 + col0 FROM tab2
----
-25
-288
6

skipif mysql # not compatible
query I rowsort label-1042
SELECT DISTINCT + col0 * col0 / - col1 + col0 FROM tab2
----
-25
-288
6

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

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

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

query I rowsort
SELECT ALL + 46 * - col0 + cor0.col0 FROM tab2 AS cor0
----
-315
-3510
-3555

onlyif mysql # use DIV operator for integer division
query I rowsort label-1047
SELECT DISTINCT + + 11 - cor0.col2 DIV + col0 col2 FROM tab1 AS cor0
----
-7
10
11

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

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

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

query I rowsort
SELECT ALL - - cor0.col0 + - 19 FROM tab2 AS cor0
----
-12
59
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-1051
SELECT DISTINCT - + 7 + 29 * col1 DIV 57 + col2 AS col1 FROM tab0 AS cor0
----
121
43
69

skipif mysql # not compatible
query I rowsort label-1051
SELECT DISTINCT - + 7 + 29 * col1 / 57 + col2 AS col1 FROM tab0 AS cor0
----
121
43
69

query I rowsort
SELECT ALL + + ( 76 ) + + col0 AS col1 FROM tab1 AS cor0
----
140
156
79

query I rowsort
SELECT DISTINCT - 97 * - 15 FROM tab0
----
1455

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0, tab0 cor0, tab1
----
972 values hashing to 5621675b1bd32b061d284d0444c76601

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 79 * + col2 col2 FROM tab2 AS cor0
----
2054
2133
3002

query I rowsort
SELECT col2 + col1 * - col1 + col1 AS col1 FROM tab1 cor0
----
-33
-596
-60

query I rowsort
SELECT DISTINCT - - 25 + + col2 AS col2 FROM tab0 cor0
----
107
26
58

query I rowsort
SELECT + tab0.col1 + 84 FROM tab0
----
170
175
181

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( col2 AS REAL ) FROM tab1
----
54
57
96

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

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

skipif mysql # not compatible
query I rowsort label-1062
SELECT ALL + 12 - - col1 * - CAST ( col0 AS INTEGER ) * tab0.col1 FROM tab0
----
-177492
-329303
-736997

query I rowsort
SELECT col0 + - col1 - col2 AS col1 FROM tab2
----
-51
-7
24

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1065
SELECT DISTINCT + - col1 * ( col1 ) + + cor0.col0 DIV ( 69 ) AS col1 FROM tab0 AS cor0
----
-7396
-8280
-9409

skipif mysql # not compatible
query I rowsort label-1065
SELECT DISTINCT + - col1 * ( col1 ) + + cor0.col0 / ( 69 ) AS col1 FROM tab0 AS cor0
----
-7396
-8280
-9409

query I rowsort
SELECT ALL cor0.col2 * + ( ( + col2 ) ) * ( - cor0.col0 ) FROM tab0 cor0
----
-26136
-35
-598436

query I rowsort
SELECT - - 56 AS col2 FROM tab2, tab0, tab1 cor0
----
27 values hashing to b5ba4b44e3deadce1edb30e76df61200

query I rowsort
SELECT + 62 * tab2.col0 + - col2 * - col1 AS col2 FROM tab2
----
1271
5544
6370

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1069
SELECT tab0.col0 * col1 + - CAST( + col1 AS SIGNED ) * - col2 * col1 + tab0.col2 AS col1 FROM tab0
----
12805
246165
687223

skipif mysql # not compatible
query I rowsort label-1069
SELECT tab0.col0 * col1 + - CAST ( + col1 AS INTEGER ) * - col2 * col1 + tab0.col2 AS col1 FROM tab0
----
12805
246165
687223

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

query I rowsort
SELECT DISTINCT col2 - + col2 * + col1 FROM tab1
----
-1152
-1350
-513

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

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

query I rowsort
SELECT ALL - col0 + + col2 + 40 * + col0 * ( 71 ) AS col1 FROM tab1 AS cor0
----
181753
227216
8571

query I rowsort
SELECT + col1 * - 37 AS col1 FROM tab1 AS cor0
----
-370
-481
-962

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

query I rowsort
SELECT - col1 + + 23 FROM tab2 AS cor0
----
-36
-8
6

query I rowsort
SELECT - col1 + 10 AS col1 FROM tab0 AS cor0
----
-76
-81
-87

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

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

query I rowsort
SELECT DISTINCT + - col1 * ( ( col1 ) ) * col1 AS col0 FROM tab1 AS cor0
----
-1000
-17576
-2197

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

skipif mysql # not compatible
query I rowsort label-1081
SELECT DISTINCT col0 + + CAST ( + col1 AS INTEGER ) * + cor0.col2 AS col1 FROM tab2 AS cor0
----
1612
725
844

onlyif mysql # use DIV operator for integer division
query I rowsort label-1082
SELECT - col0 DIV col0 + + col1 FROM tab0 AS cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-1082
SELECT - col0 / col0 + + col1 FROM tab0 AS cor0
----
85
90
96

query I rowsort
SELECT - col1 * - col1 * - 57 - col2 FROM tab0 cor0
----
-421605
-472099
-536314

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + 67 col0 FROM tab1 AS cor0
----
-13
3
64

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

query I rowsort
SELECT + col0 * - col2 + 8 FROM tab0 AS cor0
----
-27
-7290
-784

query I rowsort
SELECT DISTINCT + col0 + 60 AS col0 FROM tab0 AS cor0
----
149
84
95

query I rowsort
SELECT DISTINCT + tab1.col2 + col0 * col1 + + col0 FROM tab1
----
1216
135
761

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + 61 col0 FROM tab2
----
139
140
68

query I rowsort
SELECT col1 * - col2 + - 36 + - col0 FROM tab2
----
-1648
-761
-880

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

query I rowsort
SELECT DISTINCT - cor0.col2 * 91 AS col0 FROM tab0 AS cor0
----
-3003
-7462
-91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 99 col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

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

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

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

query I rowsort
SELECT ALL col2 * + 99 * - 64 AS col1 FROM tab2
----
-164736
-171072
-240768

query I rowsort
SELECT ALL tab0.col2 AS col0 FROM tab0, tab1, tab0 cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT + col1 - + 85 * - col2 FROM tab0 cor0
----
182
2891
7061

onlyif mysql # use DIV operator for integer division
query I rowsort label-1099
SELECT ALL - col1 DIV + ( 38 ) AS col0 FROM tab0 AS cor0
----
-2
-2
-2

skipif mysql # not compatible
query I rowsort label-1099
SELECT ALL - col1 / + ( 38 ) AS col0 FROM tab0 AS cor0
----
-2
-2
-2

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1101
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-1101
SELECT ALL CAST ( NULL AS INTEGER ) * - col2 col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

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

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

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

query I rowsort
SELECT ALL + ( + 29 ) * cor0.col1 AS col1 FROM tab0 AS cor0
----
2494
2639
2813

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

query I rowsort
SELECT DISTINCT - - 28 * + 82 + + col0 AS col2 FROM tab0 AS cor0
----
2320
2331
2385

query I rowsort
SELECT cor0.col1 * + col1 + col2 * - 96 + - 37 * col0 FROM tab1 AS cor0
----
-12007
-4619
-7740

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1108
SELECT + CAST( - col1 AS SIGNED ) + - cor0.col0 * 88 AS col1 FROM tab0 AS cor0
----
-2198
-3177
-7923

skipif mysql # not compatible
query I rowsort label-1108
SELECT + CAST ( - col1 AS INTEGER ) + - cor0.col0 * 88 AS col1 FROM tab0 AS cor0
----
-2198
-3177
-7923

onlyif mysql # use DIV operator for integer division
query I rowsort label-1109
SELECT DISTINCT + ( col1 ) * col2 DIV col1 FROM tab1 AS cor0
----
54
57
96

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

query I rowsort
SELECT ALL - 92 + + col0 FROM tab1 AS cor0
----
-12
-28
-89

query I rowsort
SELECT DISTINCT ( + col0 ) * 2 + cor0.col1 AS col1 FROM tab2 AS cor0
----
175
215
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-1112
SELECT - col2 DIV + col1 FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-1112
SELECT - col2 / + col1 FROM tab1 AS cor0
----
-2
-5
-7

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

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

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

skipif mysql # not compatible
query I rowsort
SELECT - col1 * col1 * CAST ( 21 AS REAL ) FROM tab1 AS cor0
----
-14196
-2100
-3549

query I rowsort
SELECT ALL + 60 + + col1 AS col1 FROM tab2 AS cor0
----
119
77
91

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1120
SELECT ALL + col1 * col2 DIV + 90 FROM tab2 AS cor0
----
17
7
9

skipif mysql # not compatible
query I rowsort label-1120
SELECT ALL + col1 * col2 / + 90 FROM tab2 AS cor0
----
17
7
9

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * col2 + + 42 * col1 col2 FROM tab1 AS cor0
----
-1824
-2829
-8670

query I rowsort
SELECT ALL 30 * col0 AS col0 FROM tab1 AS cor0
----
1920
2400
90

query I rowsort
SELECT + - 66 * col1 + ( col1 ) FROM tab1 AS cor0
----
-1690
-650
-845

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

query I rowsort
SELECT + - cor0.col0 * - 33 + - col2 + col1 FROM tab2 AS cor0
----
235
2586
2607

query I rowsort
SELECT 96 * - col2 + ( + col1 ) * + col2 + + 19 FROM tab2
----
-1736
-2983
-943

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1129
SELECT - cor0.col2 / - cor0.col1 + - col0 + + col1 * col2 / + col2 col1 FROM tab0 AS cor0
----
2
62
62

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

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

skipif mysql # not compatible
query I rowsort label-1131
SELECT DISTINCT + + col2 * col0 / - col0 AS col2 FROM tab2 cor0
----
-26
-27
-38

query I rowsort
SELECT + - col1 * col1 + + ( cor0.col2 * - col1 ) AS col1 FROM tab2 AS cor0
----
-1798
-5015
-935

query I rowsort
SELECT - col0 + + cor0.col0 * - col2 * + col1 + col2 AS col2 FROM tab0 AS cor0
----
-3429
-664125
-68103

query I rowsort
SELECT 70 AS col1 FROM tab1, tab0 cor0, tab1 AS cor1
----
27 values hashing to c76157a7a7ec18de56823b2058b49f32

onlyif mysql # use DIV operator for integer division
query I rowsort label-1135
SELECT ALL - 8 DIV col0 AS col1 FROM tab1
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-1135
SELECT ALL - 8 / col0 AS col1 FROM tab1
----
-2
0
0

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

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

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

query I rowsort
SELECT DISTINCT 28 + - ( col2 ) AS col0 FROM tab2
----
-10
1
2

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

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

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

query I rowsort
SELECT - 19 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 339c9d62143bf2f7566b89a1b56eeeb4

onlyif mysql # use DIV operator for integer division
query I rowsort label-1143
SELECT DISTINCT - col1 + + col1 DIV - col0 FROM tab2 AS cor0
----
-17
-35
-59

skipif mysql # not compatible
query I rowsort label-1143
SELECT DISTINCT - col1 + + col1 / - col0 FROM tab2 AS cor0
----
-17
-35
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * col0 + col0 col2 FROM tab2 AS cor0
----
56
6162
6320

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1146
SELECT DISTINCT col1 + - 41 DIV col2 AS col0 FROM tab0 AS cor0
----
56
85
91

skipif mysql # not compatible
query I rowsort label-1146
SELECT DISTINCT col1 + - 41 / col2 AS col0 FROM tab0 AS cor0
----
56
85
91

query I rowsort
SELECT - cor1.col1 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab1 cor2, tab0 AS cor3
----
243 values hashing to 7f0405f8197238fbd342972ef0bcee12

query I rowsort
SELECT ALL + col1 + + 95 FROM tab0 AS cor0
----
181
186
192

query I rowsort
SELECT DISTINCT - 35 - col2 FROM tab1 AS cor0
----
-131
-89
-92

query I rowsort
SELECT + 99 * + col2 * - col0 AS col1 FROM tab0 AS cor0
----
-3465
-722502
-78408

query I rowsort
SELECT - ( 51 ) FROM tab0 AS cor0
----
-51
-51
-51

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col2 + + 35 col1 FROM tab2 AS cor0
----
-3
8
9

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

query I rowsort
SELECT ALL 61 * - col1 AS col1 FROM tab1
----
-1586
-610
-793

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1158
SELECT DISTINCT - CAST( col0 AS SIGNED ) DIV col0 FROM tab1
----
-1

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

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

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

query I rowsort
SELECT + cor0.col2 * 49 FROM tab2 AS cor0
----
1274
1323
1862

query I rowsort
SELECT DISTINCT + 25 * col1 AS col2 FROM tab1 AS cor0
----
250
325
650

onlyif mysql # use DIV operator for integer division
query I rowsort label-1163
SELECT + 85 DIV + col2 + + 73 DIV 66 FROM tab0 AS cor0
----
2
3
86

skipif mysql # not compatible
query I rowsort label-1163
SELECT + 85 / + col2 + + 73 / 66 FROM tab0 AS cor0
----
2
3
86

query I rowsort
SELECT ALL 23 + col2 FROM tab2 cor0
----
49
50
61

query I rowsort
SELECT + col0 + 60 AS col1 FROM tab0 AS cor0
----
149
84
95

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 - col0 col1 FROM tab1 AS cor0
----
-128
-160
-6

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

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

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

query I rowsort
SELECT DISTINCT col2 * + ( col0 * - tab1.col0 ) FROM tab1
----
-233472
-486
-614400

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

query I rowsort
SELECT ALL 8 * - cor0.col1 AS col2 FROM tab1 AS cor0
----
-104
-208
-80

query I rowsort
SELECT DISTINCT 29 * + col0 AS col1 FROM tab2 AS cor0
----
203
2262
2291

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1175
SELECT DISTINCT - CAST( col0 AS SIGNED ) * + col1 * + ( 4 ) AS col2 FROM tab1 AS cor0
----
-2560
-312
-4160

skipif mysql # not compatible
query I rowsort label-1175
SELECT DISTINCT - CAST ( col0 AS INTEGER ) * + col1 * + ( 4 ) AS col2 FROM tab1 AS cor0
----
-2560
-312
-4160

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1177
SELECT DISTINCT col0 + col2 DIV 31 AS col2 FROM tab2
----
7
78
80

skipif mysql # not compatible
query I rowsort label-1177
SELECT DISTINCT col0 + col2 / 31 AS col2 FROM tab2
----
7
78
80

query I rowsort
SELECT ALL 31 * - col2 AS col1 FROM tab0 AS cor0
----
-1023
-2542
-31

query I rowsort
SELECT DISTINCT + + col2 + col2 * - 66 AS col1 FROM tab1 AS cor0
----
-3510
-3705
-6240

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

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

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

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

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

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

query I rowsort
SELECT ALL col0 * col0 + 93 AS col0 FROM tab2 AS cor0
----
142
6177
6334

query I rowsort
SELECT + + col0 + + col1 * + ( col1 ) + col2 FROM tab0 AS cor0
----
7453
8452
9445

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 58 + - cor0.col0 * col1 col2 FROM tab1 AS cor0
----
-20
-582
-982

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col0 * col1 - - cor0.col1 * - col1 col1 FROM tab0 AS cor0
----
-182
-5332
-6014

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

query I rowsort
SELECT - col2 + - col2 * + ( + col2 ) + col0 FROM tab1 AS cor0
----
-2967
-3242
-9232

query I rowsort
SELECT ALL - 98 * col1 AS col2 FROM tab0 AS cor0
----
-8428
-8918
-9506

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

query I rowsort
SELECT DISTINCT + col1 + 3 - - ( + cor0.col2 ) * 10 FROM tab0 AS cor0
----
110
419
914

query I rowsort
SELECT DISTINCT + + col0 + - col1 * 24 + + col2 FROM tab1 AS cor0
----
-119
-136
-567

query I rowsort
SELECT DISTINCT + col2 - 37 FROM tab0 AS cor0
----
-36
-4
45

query I rowsort
SELECT + col0 * 93 * - col0 + + col1 FROM tab1 AS cor0
----
-380918
-595187
-811

query I rowsort
SELECT ALL - col1 + ( 62 ) * - col2 AS col1 FROM tab0 AS cor0
----
-159
-2132
-5175

onlyif mysql # use DIV operator for integer division
query I rowsort label-1200
SELECT col0 DIV 91 + + ( col1 ) FROM tab0 cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-1200
SELECT col0 / 91 + + ( col1 ) FROM tab0 cor0
----
86
91
97

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

skipif mysql # not compatible
query I rowsort label-1201
SELECT DISTINCT - col1 * + CAST ( + 87 AS INTEGER ) + + col0 * ( col0 + col1 * col0 ) FROM tab1 cor0
----
-2019
44186
88469

query I rowsort
SELECT col1 + 34 FROM tab2 AS cor0
----
51
65
93

query I rowsort
SELECT + col2 + 65 AS col1 FROM tab1 AS cor0
----
119
122
161

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 3 col0 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 95b6b9b4aae5cc2d9545db9f8940b2dc

query I rowsort
SELECT col1 * + 80 FROM tab0 AS cor0
----
6880
7280
7760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 56 * + 85 col0 FROM tab1 AS cor0
----
4760

query I rowsort
SELECT DISTINCT + 50 * 32 + - col1 FROM tab2 AS cor0
----
1541
1569
1583

query I rowsort
SELECT ALL col0 * - 89 AS col2 FROM tab2 AS cor0
----
-623
-6942
-7031

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1210
SELECT + col0 DIV 20 FROM tab0
----
1
1
4

skipif mysql # not compatible
query I rowsort label-1210
SELECT + col0 / 20 FROM tab0
----
1
1
4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1211
SELECT DISTINCT - 81 * col2 - - col0 * CAST( col1 AS SIGNED ) FROM tab1
----
-3977
-4296
-6736

skipif mysql # not compatible
query I rowsort label-1211
SELECT DISTINCT - 81 * col2 - - col0 * CAST ( col1 AS INTEGER ) FROM tab1
----
-3977
-4296
-6736

onlyif mysql # use DIV operator for integer division
query I rowsort label-1212
SELECT - - col1 + col1 + col2 DIV + col0 AS col1 FROM tab2 AS cor0
----
118
34
65

skipif mysql # not compatible
query I rowsort label-1212
SELECT - - col1 + col1 + col2 / + col0 AS col1 FROM tab2 AS cor0
----
118
34
65

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

skipif mysql # not compatible
query I rowsort label-1213
SELECT - col0 * + col0 + - CAST ( col0 AS INTEGER ) AS col2 FROM tab0 cor0
----
-1260
-600
-8010

onlyif mysql # use DIV operator for integer division
query I rowsort label-1214
SELECT - tab0.col0 + 34 DIV + col2 FROM tab0
----
-1
-23
-89

skipif mysql # not compatible
query I rowsort label-1214
SELECT - tab0.col0 + 34 / + col2 FROM tab0
----
-1
-23
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1215
SELECT CAST( col2 AS SIGNED ) * col2 * 65 FROM tab2 AS cor0
----
43940
47385
93860

skipif mysql # not compatible
query I rowsort label-1215
SELECT CAST ( col2 AS INTEGER ) * col2 * 65 FROM tab2 AS cor0
----
43940
47385
93860

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

query I rowsort
SELECT + ( - col0 ) * - col0 AS col2 FROM tab2
----
49
6084
6241

query I rowsort
SELECT col1 * + col0 * - col2 + col2 + col0 * - col1 AS col2 FROM tab2
----
-124228
-52339
-6049

query I rowsort
SELECT + 72 FROM tab2, tab0 AS cor0
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

query I rowsort
SELECT + col1 + col2 * col2 AS col1 FROM tab0 AS cor0
----
1175
6815
98

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 cor0, tab1, tab0 cor1
----
972 values hashing to 5342fb4caf4767cb98bd21989bad099f

query I rowsort
SELECT - + cor1.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

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

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

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

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

query I rowsort
SELECT DISTINCT tab1.col1 + + tab1.col0 * - col0 + col1 FROM tab1
----
-4076
-6374
43

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

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

query I rowsort
SELECT ALL + 80 + + col2 * - col1 AS col0 FROM tab2
----
-1454
-566
-757

query I rowsort
SELECT DISTINCT 98 + - tab0.col0 AS col1 FROM tab0
----
63
74
9

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

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

query I rowsort
SELECT DISTINCT + 70 * col1 AS col2 FROM tab2 AS cor0
----
1190
2170
4130

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * cor0.col0 * - col1 col1 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT + cor0.col2 AS col1 FROM tab0, tab1 cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 67 + col0 col2 FROM tab1 cor0
----
-3
-64
13

query I rowsort
SELECT DISTINCT - 19 FROM tab1 AS cor0
----
-19

query I rowsort
SELECT 86 FROM tab1, tab1 AS cor0
----
9 values hashing to 2d8c3a0d19ea51447f83cd18b49fee19

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * 11 col2 FROM tab1 AS cor0
----
-33
-704
-880

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

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

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1241
SELECT + col1 * CAST( 48 AS SIGNED ) AS col0 FROM tab0
----
4128
4368
4656

skipif mysql # not compatible
query I rowsort label-1241
SELECT + col1 * CAST ( 48 AS INTEGER ) AS col0 FROM tab0
----
4128
4368
4656

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1242
SELECT DISTINCT - tab2.col1 * CAST( col1 AS SIGNED ) FROM tab2
----
-289
-3481
-961

skipif mysql # not compatible
query I rowsort label-1242
SELECT DISTINCT - tab2.col1 * CAST ( col1 AS INTEGER ) FROM tab2
----
-289
-3481
-961

onlyif mysql # use DIV operator for integer division
query I rowsort label-1243
SELECT DISTINCT + - col2 DIV 44 + - col1 FROM tab1 AS cor0
----
-11
-15
-27

skipif mysql # not compatible
query I rowsort label-1243
SELECT DISTINCT + - col2 / 44 + - col1 FROM tab1 AS cor0
----
-11
-15
-27

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

query I rowsort
SELECT cor0.col2 * + 54 + col2 FROM tab1 AS cor0
----
2970
3135
5280

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

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

query I rowsort
SELECT ALL - col1 * + col0 + cor0.col1 AS col0 FROM tab1 cor0
----
-1027
-52
-630

query I rowsort
SELECT ALL - + 92 - 40 FROM tab1 cor0
----
-132
-132
-132

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

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

query I rowsort
SELECT DISTINCT + cor1.col1 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
86
91
97

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

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

query I rowsort
SELECT ALL + 94 FROM tab2 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to b0ffb7527f4fbf44f30945e1ccb58c24

onlyif mysql # use DIV operator for integer division
query I rowsort label-1256
SELECT - col0 + - ( - 98 ) DIV col1 AS col1 FROM tab2 AS cor0
----
-4
-74
-77

skipif mysql # not compatible
query I rowsort label-1256
SELECT - col0 + - ( - 98 ) / col1 AS col1 FROM tab2 AS cor0
----
-4
-74
-77

query I rowsort
SELECT DISTINCT - + 72 * ( + col2 + + 70 ) * + col0 FROM tab1 AS cor0
----
-26784
-585216
-956160

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 + col1 * - col0 col0 FROM tab0 AS cor0
----
-2150
-3492
-8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-1259
SELECT DISTINCT col2 DIV + col0 + + col2 FROM tab2
----
26
30
38

skipif mysql # not compatible
query I rowsort label-1259
SELECT DISTINCT col2 / + col0 + + col2 FROM tab2
----
26
30
38

query I rowsort
SELECT ALL + - 32 AS col2 FROM tab0 AS cor0
----
-32
-32
-32

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + 57 ) + + cor0.col2 col2 FROM tab1 AS cor0
----
111
114
153

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

query I rowsort
SELECT DISTINCT - - 1 AS col2 FROM tab0 AS cor0
----
1

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

query I rowsort
SELECT DISTINCT - + 62 * + col0 + + col2 FROM tab0 AS cor0
----
-1455
-2169
-5436

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

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

query I rowsort
SELECT DISTINCT - tab1.col2 FROM tab1, tab0 cor0
----
-54
-57
-96

query I rowsort
SELECT ( + 72 ) AS col2 FROM tab0, tab1, tab2 AS cor0, tab0 AS cor1
----
81 values hashing to e1618abfe12be6a950cc575d695639b7

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

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

query I rowsort
SELECT + col2 * - col1 * col0 + + col1 * + col2 AS col1 FROM tab2 AS cor0
----
-118118
-5022
-50388

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

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

query I rowsort
SELECT col1 * + cor0.col1 * ( - cor0.col0 ) FROM tab0 cor0
----
-177504
-329315
-737009

query I rowsort
SELECT - 8 + + col1 * + ( + col2 + col2 ) FROM tab2 AS cor0
----
1284
1666
3060

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

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

skipif mysql # not compatible
query I rowsort label-1277
SELECT DISTINCT + CAST ( col0 * - col2 AS INTEGER ) AS col0 FROM tab1
----
-162
-3648
-7680

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

query I rowsort
SELECT ALL ( tab0.col2 ) AS col1 FROM tab0
----
1
33
82

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

query I rowsort
SELECT DISTINCT - 71 * col1 FROM tab2 AS cor0
----
-1207
-2201
-4189

query I rowsort
SELECT ALL 1 + col2 * ( - col1 ) AS col0 FROM tab2 AS cor0
----
-1533
-645
-836

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

query I rowsort
SELECT - + cor0.col1 * + col0 + - 2 FROM tab2 AS cor0
----
-1345
-219
-4604

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

query I rowsort
SELECT ALL - col1 + col2 + + col2 * col1 * + ( + col2 ) AS col0 FROM tab2 AS cor0
----
22595
24569
39851

onlyif mysql # use DIV operator for integer division
query I rowsort label-1287
SELECT ALL + - cor0.col1 + - ( cor0.col2 ) DIV - col2 + - col0 AS col2 FROM tab0 AS cor0
----
-109
-131
-179

skipif mysql # not compatible
query I rowsort label-1287
SELECT ALL + - cor0.col1 + - ( cor0.col2 ) / - col2 + - col0 AS col2 FROM tab0 AS cor0
----
-109
-131
-179

query I rowsort
SELECT DISTINCT + 34 + + tab0.col1 FROM tab0
----
120
125
131

query I rowsort
SELECT 25 - tab2.col2 AS col0 FROM tab2
----
-1
-13
-2

onlyif mysql # use DIV operator for integer division
query I rowsort label-1290
SELECT 34 * - col2 DIV + ( ( + col2 ) ) + + col2 * col1 FROM tab1
----
1214
1370
536

skipif mysql # not compatible
query I rowsort label-1290
SELECT 34 * - col2 / + ( ( + col2 ) ) + + col2 * col1 FROM tab1
----
1214
1370
536

onlyif mysql # use DIV operator for integer division
query I rowsort label-1291
SELECT ALL 74 DIV + tab0.col2 + + 41 AS col0 FROM tab0
----
115
41
43

skipif mysql # not compatible
query I rowsort label-1291
SELECT ALL 74 / + tab0.col2 + + 41 AS col0 FROM tab0
----
115
41
43

query I rowsort
SELECT DISTINCT + 68 + col1 * - 75 AS col1 FROM tab0
----
-6382
-6757
-7207

query I rowsort
SELECT DISTINCT - col1 * col0 + - 23 FROM tab0 AS cor0
----
-2087
-3418
-8122

query I rowsort
SELECT DISTINCT - + col1 * + 20 + + col2 FROM tab2 AS cor0
----
-1154
-302
-593

onlyif mysql # use DIV operator for integer division
query I rowsort label-1295
SELECT ALL - col0 * 11 DIV col0 AS col0 FROM tab2 AS cor0
----
-11
-11
-11

skipif mysql # not compatible
query I rowsort label-1295
SELECT ALL - col0 * 11 / col0 AS col0 FROM tab2 AS cor0
----
-11
-11
-11

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

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

query I rowsort
SELECT + - col1 + col2 * 39 FROM tab1 AS cor0
----
2080
2213
3731

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

query I rowsort
SELECT + cor0.col0 * + 23 * - cor0.col2 + col1 FROM tab1 AS cor0
----
-176627
-3700
-83894

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + 64 * + cor0.col2 col2 FROM tab1 AS cor0
----
3456
3648
6144

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

query I rowsort
SELECT 61 + - 30 + + col1 FROM tab0 AS cor0
----
117
122
128

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

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

query I rowsort
SELECT - col2 + - col2 + col1 * 75 FROM tab1
----
1842
636
783

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

query I rowsort
SELECT + 25 + 10 AS col2 FROM tab1, tab1 AS cor0, tab1 AS cor1, tab0, tab2 AS cor2
----
243 values hashing to a9053bbf61b7425d382ef55c8671ca7d

query I rowsort
SELECT ALL - 74 + + 9 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 4ca93c42a91c7dff917e7b7090ba9e57

query I rowsort
SELECT DISTINCT + + col0 * + col0 * + cor0.col1 - col2 FROM tab1 cor0
----
180
40903
83104

onlyif mysql # use DIV operator for integer division
query I rowsort label-1310
SELECT + 90 DIV col2 + + col0 AS col2 FROM tab0 cor0
----
125
26
90

skipif mysql # not compatible
query I rowsort label-1310
SELECT + 90 / col2 + + col0 AS col2 FROM tab0 cor0
----
125
26
90

query I rowsort
SELECT + - 13 * - cor0.col0 + col2 * 27 AS col0 FROM tab0 AS cor0
----
1203
3371
482

query I rowsort
SELECT + - cor0.col1 AS col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT 89 FROM tab0, tab1 AS cor0
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT ALL - - col1 * + ( 32 + + col0 * col0 ) AS col0 FROM tab0 AS cor0
----
121929
52288
723723

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

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

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

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

skipif mysql # not compatible
query I rowsort label-1318
SELECT DISTINCT col0 + + col1 / - col2 AS col0 FROM tab0 AS cor0
----
-62
22
88

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1323
SELECT DISTINCT + col0 + col2 * col1 DIV col1 AS col0 FROM tab0 AS cor0
----
171
36
57

skipif mysql # not compatible
query I rowsort label-1323
SELECT DISTINCT + col0 + col2 * col1 / col1 AS col0 FROM tab0 AS cor0
----
171
36
57

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 85 + cor0.col2 col0 FROM tab0 AS cor0
----
118
167
86

query I rowsort
SELECT + 62 * - col2 + + col2 * - col0 AS col0 FROM tab2 AS cor0
----
-1863
-3640
-5358

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

query I rowsort
SELECT ALL + cor0.col1 * tab1.col2 AS col2 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 6eca0fdf700a988d88ac850bac7633ab

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 73 col2 FROM tab2
----
-73
-73
-73

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

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

query I rowsort
SELECT ALL + 0 + cor0.col1 * ( + col2 * col1 ) FROM tab2 AS cor0
----
10982
25947
90506

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

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

query I rowsort
SELECT ALL col2 * col1 + col0 * col2 * + col0 FROM tab0 AS cor0
----
1322
21846
656984

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

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

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1338
SELECT DISTINCT + col1 + - ( + 32 ) * cor0.col0 DIV col2 FROM tab1 cor0
----
-13
-25
25

skipif mysql # not compatible
query I rowsort label-1338
SELECT DISTINCT + col1 + - ( + 32 ) * cor0.col0 / col2 FROM tab1 cor0
----
-13
-25
25

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

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

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

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

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

query I rowsort
SELECT ALL + cor0.col2 * + col0 + + 52 * col2 - col2 * - col2 * + col0 AS col0 FROM tab0 AS cor0
----
122
28644
609998

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

query I rowsort
SELECT + col1 * ( col1 ) FROM tab0 cor0
----
7396
8281
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-1345
SELECT ALL + 5 DIV + tab1.col0 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-1345
SELECT ALL + 5 / + tab1.col0 FROM tab1
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-1346
SELECT DISTINCT - col2 + - cor0.col2 * cor0.col2 DIV + col1 FROM tab0 AS cor0
----
-1
-155
-45

skipif mysql # not compatible
query I rowsort label-1346
SELECT DISTINCT - col2 + - cor0.col2 * cor0.col2 / + col1 FROM tab0 AS cor0
----
-1
-155
-45

query I rowsort
SELECT - - col1 * + col1 + col2 FROM tab1 AS cor0
----
157
265
730

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

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

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

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

query I rowsort
SELECT - 63 + tab1.col0 * - col1 FROM tab1
----
-1103
-141
-703

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

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

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

query III rowsort
SELECT ALL * FROM tab1 AS cor0 WHERE col2 * col1 + - col1 <= ( + col1 ) OR NULL NOT BETWEEN col1 * col0 AND - cor0.col2 + col1
----

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

skipif mysql # not compatible
query I rowsort label-1356
SELECT col2 + + col0 / + col0 AS col0 FROM tab2 AS cor0
----
27
28
39

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

query I rowsort
SELECT - ( + tab0.col2 * col2 ) + col1 FROM tab0
----
-1003
-6633
96

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( 21 ) * col1 + col0 col1 FROM tab1
----
274
353
549

query I rowsort
SELECT col2 * - ( - col0 + - col2 ) AS col1 FROM tab2
----
2704
4446
918

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1364
SELECT + col2 * col2 * col0 + col1 * col2 DIV - col0 FROM tab1 cor0
----
207928
737265
8280

skipif mysql # not compatible
query I rowsort label-1364
SELECT + col2 * col2 * col0 + col1 * col2 / - col0 FROM tab1 cor0
----
207928
737265
8280

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

query I rowsort
SELECT + ( + col2 ) * - col2 + col0 AS col1 FROM tab1 AS cor0
----
-2913
-3185
-9136

query I rowsort
SELECT DISTINCT ( col2 ) + col1 FROM tab0
----
119
173
98

skipif mysql # not compatible
query I rowsort
SELECT ALL CAST ( col0 AS REAL ) * + tab0.col2 + col0 AS col1 FROM tab0
----
70
7387
816

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

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

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

skipif mysql # not compatible
query I rowsort label-1371
SELECT ALL col0 / - col2 + tab0.col0 / + col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( + col0 * + col1 AS REAL ) + - col1 * - col1 + + col1 FROM tab1
----
1222
750
780

query I rowsort
SELECT 66 AS col2 FROM tab0
----
66
66
66

query I rowsort
SELECT DISTINCT - cor1.col1 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
-10
-13
-26

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

query I rowsort
SELECT + - 19 + col0 AS col0 FROM tab1 AS cor0
----
-16
45
61

query I rowsort
SELECT - - 34 * col0 + + col0 AS col1 FROM tab2 AS cor0
----
245
2730
2765

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1379
SELECT - 99 DIV - cor0.col0 FROM tab0 AS cor0
----
1
2
4

skipif mysql # not compatible
query I rowsort label-1379
SELECT - 99 / - cor0.col0 FROM tab0 AS cor0
----
1
2
4

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

query I rowsort
SELECT - 93 * col2 AS col0 FROM tab2 AS cor0
----
-2418
-2511
-3534

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 52 * col1 + + cor0.col2 col0 FROM tab1 AS cor0
----
1406
577
772

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

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

query I rowsort
SELECT ALL - 42 + 42 AS col0 FROM tab0, tab1 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to 1f117f467f45d8c6b7553e2e3c842942

query I rowsort
SELECT cor1.col2 * - 34 AS col0 FROM tab0, tab2 cor0, tab1 AS cor1
----
27 values hashing to f900182aaf559d5b9914a69b8e551ed3

query I rowsort
SELECT - - 21 + col2 * col0 * + col0 AS col0 FROM tab2 AS cor0
----
1344
158205
237179

query I rowsort
SELECT - + 61 * + col0 AS col2 FROM tab2 AS cor0
----
-427
-4758
-4819

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

query I rowsort
SELECT + 55 AS col1 FROM tab0 AS cor0
----
55
55
55

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1391
SELECT DISTINCT CAST( 66 AS SIGNED ) FROM tab2
----
66

skipif mysql # not compatible
query I rowsort label-1391
SELECT DISTINCT CAST ( 66 AS INTEGER ) FROM tab2
----
66

query I rowsort
SELECT + col1 + col2 * 68 AS col2 FROM tab2 AS cor0
----
1827
1867
2601

query I rowsort
SELECT col2 + + ( 68 ) + - col0 FROM tab2 AS cor0
----
16
27
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + ( col2 * + cor0.col2 ) col0 FROM tab0 AS cor0
----
1122
2
6806

query I rowsort
SELECT - col0 * - col1 + cor0.col2 * col2 FROM tab0 cor0
----
14823
3153
3396

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

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

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

query I rowsort
SELECT - col0 * + ( col2 ) + col2 + + cor0.col1 FROM tab2 AS cor0
----
-131
-1943
-2947

query I rowsort
SELECT DISTINCT + 65 + + tab1.col2 * + ( tab1.col2 * - col1 ) AS col0 FROM tab1
----
-119743
-32425
-75751

query I rowsort
SELECT - col1 + 88 FROM tab0 AS cor0
----
-3
-9
2

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

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0, tab2 cor1, tab1 cor2
----
972 values hashing to 263f0eb7d5dfd4076c74918bc141bd9b

query I rowsort
SELECT - - ( + col1 ) + col0 * 83 AS col0 FROM tab0 AS cor0
----
2078
3002
7478

query I rowsort
SELECT - + 77 * - ( cor0.col1 ) + + col1 FROM tab2 AS cor0
----
1326
2418
4602

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

query I rowsort
SELECT DISTINCT ( ( cor0.col0 ) ) AS col1 FROM tab2 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab2 AS cor2
----
7
78
79

query I rowsort
SELECT DISTINCT - - 93 + col1 FROM tab0 AS cor0
----
179
184
190

onlyif mysql # use DIV operator for integer division
query I rowsort label-1408
SELECT 90 DIV col2 FROM tab1 cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-1408
SELECT 90 / col2 FROM tab1 cor0
----
0
1
1

query I rowsort
SELECT DISTINCT ( 10 ) * + col0 + - col1 FROM tab2 AS cor0
----
39
721
773

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

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

query I rowsort
SELECT ( 13 ) + col1 FROM tab1 AS cor0
----
23
26
39

onlyif mysql # use DIV operator for integer division
query I rowsort label-1413
SELECT DISTINCT 59 DIV col1 + cor0.col0 AS col0 FROM tab2 cor0
----
79
8
82

skipif mysql # not compatible
query I rowsort label-1413
SELECT DISTINCT 59 / col1 + cor0.col0 AS col0 FROM tab2 cor0
----
79
8
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-1414
SELECT - + 95 DIV cor0.col1 FROM tab1 cor0
----
-3
-7
-9

skipif mysql # not compatible
query I rowsort label-1414
SELECT - + 95 / cor0.col1 FROM tab1 cor0
----
-3
-7
-9

query I rowsort
SELECT - - col0 + + col1 + col0 FROM tab2 AS cor0
----
175
215
45

onlyif mysql # use DIV operator for integer division
query I rowsort label-1416
SELECT DISTINCT - - col2 * col2 DIV col1 FROM tab1 AS cor0
----
112
324
708

skipif mysql # not compatible
query I rowsort label-1416
SELECT DISTINCT - - col2 * col2 / col1 FROM tab1 AS cor0
----
112
324
708

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

query I rowsort
SELECT DISTINCT + col0 * + 75 AS col2 FROM tab2
----
525
5850
5925

query I rowsort
SELECT + col1 * 67 + - col0 FROM tab2 AS cor0
----
1060
2070
3875

query I rowsort
SELECT ALL + + ( + 45 ) + col0 AS col2 FROM tab2 AS cor0
----
123
124
52

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 26 + + cor0.col2 col1 FROM tab2 AS cor0
----
0
1
12

query I rowsort
SELECT DISTINCT col0 + col1 * col0 FROM tab1
----
1120
704
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-1426
SELECT + ( 18 ) * col0 + + col2 DIV - col2 FROM tab1
----
1151
1439
53

skipif mysql # not compatible
query I rowsort label-1426
SELECT + ( 18 ) * col0 + + col2 / - col2 FROM tab1
----
1151
1439
53

query I rowsort
SELECT + - col1 + - 9 AS col1 FROM tab1 AS cor0
----
-19
-22
-35

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

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

query I rowsort
SELECT col1 - 91 AS col2 FROM tab0
----
-5
0
6

query I rowsort
SELECT col0 * tab0.col1 * - col0 - + col0 FROM tab0
----
-118860
-49560
-720900

query I rowsort
SELECT ALL - col0 - - col0 AS col0 FROM tab2
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1433
SELECT DISTINCT - col2 DIV col0 - 38 FROM tab0
----
-38
-39

skipif mysql # not compatible
query I rowsort label-1433
SELECT DISTINCT - col2 / col0 - 38 FROM tab0
----
-38
-39

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

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

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 cor0, tab1 AS cor1, tab0 cor2
----
972 values hashing to 9b91cf9fcc064ee1c13074a678b72ac7

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

query I rowsort
SELECT - col1 * col2 + - 15 * - col0 FROM tab1 AS cor0
----
-1359
-48
390

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

query I rowsort
SELECT DISTINCT col0 * 24 AS col2 FROM tab0 AS cor0
----
2136
576
840

query I rowsort
SELECT DISTINCT + col1 + + 93 FROM tab0 AS cor0
----
179
184
190

query I rowsort
SELECT col2 * - 6 + col1 FROM tab0 AS cor0
----
-112
-401
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-1442
SELECT ALL col2 DIV + col1 FROM tab1 cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-1442
SELECT ALL col2 / + col1 FROM tab1 cor0
----
2
5
7

query I rowsort
SELECT DISTINCT + 16 AS col2 FROM tab0
----
16

query I rowsort
SELECT ALL tab2.col1 * 24 AS col2 FROM tab2
----
1416
408
744

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

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

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

query I rowsort
SELECT ALL + col2 * col2 + + 9 FROM tab2 AS cor0
----
1453
685
738

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1450
SELECT DISTINCT - col2 * col1 DIV cor0.col0 FROM tab0 AS cor0
----
-118
-2
-83

skipif mysql # not compatible
query I rowsort label-1450
SELECT DISTINCT - col2 * col1 / cor0.col0 FROM tab0 AS cor0
----
-118
-2
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-1451
SELECT ALL - col2 + + col1 DIV col0 AS col0 FROM tab2 AS cor0
----
-23
-26
-38

skipif mysql # not compatible
query I rowsort label-1451
SELECT ALL - col2 + + col1 / col0 AS col0 FROM tab2 AS cor0
----
-23
-26
-38

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

query I rowsort
SELECT - 42 + + col1 * cor0.col1 FROM tab2 AS cor0
----
247
3439
919

query I rowsort
SELECT + ( 57 ) + col2 * + cor0.col0 * col2 FROM tab0 AS cor0
----
26193
598493
92

query I rowsort
SELECT + ( 61 ) + col2 * + tab1.col0 FROM tab1
----
223
3709
7741

query I rowsort
SELECT ALL ( + col2 ) * - col1 + - col1 * tab2.col2 FROM tab2
----
-1292
-1674
-3068

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

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

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

query I rowsort
SELECT + - 35 * col1 + 49 AS col1 FROM tab1 AS cor0
----
-301
-406
-861

skipif mysql # not compatible
query I rowsort
SELECT + col1 + - col0 * CAST ( - col0 AS REAL ) AS col0 FROM tab1
----
35
4106
6413

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

query I rowsort
SELECT ALL + - col1 - + col2 * - 11 AS col1 FROM tab2 AS cor0
----
227
266
401

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

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

query I rowsort
SELECT ALL col0 * cor0.col2 * - 0 + ( - col1 ) - + ( col1 + + cor0.col1 ) * + col1 * col0 AS col2 FROM tab0 AS cor0
----
-1474109
-355094
-658727

query I rowsort
SELECT ALL + col1 * col1 - col2 FROM tab2 AS cor0
----
251
3455
934

query I rowsort
SELECT DISTINCT - 39 * col0 AS col1 FROM tab2 cor0
----
-273
-3042
-3081

query I rowsort
SELECT ALL - 54 FROM tab1, tab1 AS cor0, tab1 cor1
----
27 values hashing to 71e27a12767d3a987ce05e4d6edad211

onlyif mysql # use DIV operator for integer division
query I rowsort label-1469
SELECT DISTINCT col0 + - col0 DIV - cor0.col1 + col0 FROM tab2 AS cor0
----
14
157
162

skipif mysql # not compatible
query I rowsort label-1469
SELECT DISTINCT col0 + - col0 / - cor0.col1 + col0 FROM tab2 AS cor0
----
14
157
162

query I rowsort
SELECT DISTINCT col0 * + col1 - + 3 * 93 FROM tab0 AS cor0
----
1785
3116
7820

query I rowsort
SELECT 46 + + cor0.col2 AS col2 FROM tab2 AS cor0
----
72
73
84

query I rowsort
SELECT ALL + 3 * + col0 AS col0 FROM tab1 cor0
----
192
240
9

query I rowsort
SELECT + 20 + - col2 * cor0.col0 FROM tab1 cor0
----
-142
-3628
-7660

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

query I rowsort
SELECT - 51 * - cor0.col0 FROM tab1 cor0
----
153
3264
4080

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 + col0 * 64 + + cor0.col1 col0 FROM tab1 AS cor0
----
244
4116
5146

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

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

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

skipif mysql # not compatible
query I rowsort
SELECT cor0.col2 * + CAST ( + col2 AS REAL ) * + col2 AS col0 FROM tab1 AS cor0
----
157464
185193
884736

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

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

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

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

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

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

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

query I rowsort
SELECT ALL ( col0 ) AS col2 FROM tab1
----
3
64
80

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

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

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

query I rowsort
SELECT col0 + - col0 * 89 AS col0 FROM tab0 AS cor0
----
-2112
-3080
-7832

query I rowsort
SELECT + tab1.col0 + 24 AS col1 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to bdb87b63ab8aa777b785628535b9c12a

query I rowsort
SELECT DISTINCT 2 + + col1 * + col1 AS col2 FROM tab2
----
291
3483
963

query I rowsort
SELECT DISTINCT - 56 * 17 + + col1 FROM tab2
----
-893
-921
-935

onlyif mysql # use DIV operator for integer division
query I rowsort label-1496
SELECT col0 + - cor0.col0 DIV - 78 AS col1 FROM tab0 AS cor0
----
24
35
90

skipif mysql # not compatible
query I rowsort label-1496
SELECT col0 + - cor0.col0 / - 78 AS col1 FROM tab0 AS cor0
----
24
35
90

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

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

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

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

query I rowsort
SELECT + ( + 96 * - tab2.col0 ) FROM tab2
----
-672
-7488
-7584

query I rowsort
SELECT DISTINCT - tab2.col1 * + 55 * col1 AS col1 FROM tab2
----
-15895
-191455
-52855

query I rowsort
SELECT DISTINCT 46 FROM tab1, tab1 AS cor0
----
46

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

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

query I rowsort
SELECT DISTINCT - + cor0.col1 - 38 * tab2.col2 FROM tab2, tab0, tab2 AS cor0, tab1
----
9 values hashing to 6566d2878fad684047086679841ebab2

query IIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0 WHERE NOT NULL NOT IN ( cor0.col2 )
----

query I rowsort
SELECT - 92 * - cor0.col1 AS col2 FROM tab0 AS cor0
----
7912
8372
8924

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 55 col2 FROM tab1
----
-55
-55
-55

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1509
SELECT + col0 - - CAST( col1 AS SIGNED ) AS col1 FROM tab2 cor0
----
137
38
96

skipif mysql # not compatible
query I rowsort label-1509
SELECT + col0 - - CAST ( col1 AS INTEGER ) AS col1 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT - - col1 * 43 + col0 * col1 * + col1 AS col2 FROM tab0 AS cor0
----
181202
333486
740922

query I rowsort
SELECT + col1 * col1 - + col1 FROM tab1 AS cor0
----
156
650
90

onlyif mysql # use DIV operator for integer division
query I rowsort label-1512
SELECT - col2 * - col2 + col2 DIV - col0 FROM tab0 AS cor0
----
1
1088
6724

skipif mysql # not compatible
query I rowsort label-1512
SELECT - col2 * - col2 + col2 / - col0 FROM tab0 AS cor0
----
1
1088
6724

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

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

onlyif mysql # use DIV operator for integer division
query I rowsort label-1515
SELECT + col2 - col2 DIV + cor0.col1 col1 FROM tab2 AS cor0
----
26
27
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1515
SELECT + col2 - col2 / + cor0.col1 col1 FROM tab2 AS cor0
----
26
27
36

query I rowsort
SELECT - - col0 * - 62 FROM tab2 cor0
----
-434
-4836
-4898

query I rowsort
SELECT tab0.col0 * - ( 10 ) * tab0.col0 FROM tab0, tab2 cor0
----
9 values hashing to 7916479350078b7971ab5f63db7fd404

query I rowsort
SELECT + col2 * ( 22 ) - cor0.col1 FROM tab2 AS cor0
----
513
563
819

query I rowsort
SELECT + col2 + + 54 FROM tab0 AS cor0
----
136
55
87

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

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

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

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

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

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

skipif mysql # not compatible
query I rowsort
SELECT - col1 + - CAST ( col2 AS REAL ) * col1 + 77 * - tab2.col1 AS col1 FROM tab2
----
-1972
-3255
-6136

query I rowsort
SELECT col1 + ( - col1 ) * - col0 FROM tab1
----
104
1053
650

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

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

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

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

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

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

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

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( + col2 ) + col1 * ( - 65 ) col2 FROM tab2 AS cor0
----
-1067
-1988
-3809

onlyif mysql # use DIV operator for integer division
query I rowsort label-1531
SELECT ALL - + col1 DIV col2 - col1 col0 FROM tab0 AS cor0
----
-194
-88
-92

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1531
SELECT ALL - + col1 / col2 - col1 col0 FROM tab0 AS cor0
----
-194
-88
-92

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

query I rowsort
SELECT + 79 - + 49 FROM tab2 AS cor0
----
30
30
30

query I rowsort
SELECT + + col0 + - 67 * + col0 FROM tab1 AS cor0
----
-198
-4224
-5280

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + cor0.col1 + - cor0.col0 * - cor0.col0 col1 FROM tab0 AS cor0
----
1128
490
7830

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

query I rowsort
SELECT ALL + - 23 AS col1 FROM tab0 AS cor0
----
-23
-23
-23

query I rowsort
SELECT DISTINCT + cor0.col2 + col2 FROM tab1 cor0
----
108
114
192

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

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

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

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

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

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

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

query I rowsort
SELECT cor0.col2 + 15 * col2 FROM tab1 AS cor0
----
1536
864
912

query I rowsort
SELECT ALL tab2.col1 - + ( + col2 ) AS col0 FROM tab2
----
-21
33
4

query I rowsort
SELECT DISTINCT 65 - - 86 * - col2 AS col2 FROM tab2 AS cor0
----
-2171
-2257
-3203

query I rowsort
SELECT - col2 + 78 * + cor0.col2 FROM tab1 AS cor0
----
4158
4389
7392

query I rowsort
SELECT ALL - 5 AS col1 FROM tab2 AS cor0
----
-5
-5
-5

query I rowsort
SELECT 84 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

query I rowsort
SELECT + 95 * + col2 FROM tab1 AS cor0
----
5130
5415
9120

onlyif mysql # use DIV operator for integer division
query I rowsort label-1551
SELECT - col0 DIV cor0.col2 AS col0 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-1551
SELECT - col0 / cor0.col2 AS col0 FROM tab1 AS cor0
----
-1
0
0

query I rowsort
SELECT DISTINCT + - col2 * cor0.col2 AS col0 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT - + 88 * + col0 * 65 AS col0 FROM tab2 cor0
----
-40040
-446160
-451880

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col1 ) col1 FROM tab0
----
86
91
97

query I rowsort
SELECT ALL + 96 FROM tab1 AS cor0
----
96
96
96

query I rowsort
SELECT DISTINCT + 52 * col0 FROM tab1 AS cor0
----
156
3328
4160

onlyif mysql # use DIV operator for integer division
query I rowsort label-1557
SELECT DISTINCT + 55 + col0 DIV - col1 AS col0 FROM tab0 AS cor0
----
55

skipif mysql # not compatible
query I rowsort label-1557
SELECT DISTINCT + 55 + col0 / - col1 AS col0 FROM tab0 AS cor0
----
55

onlyif mysql # use DIV operator for integer division
query I rowsort label-1558
SELECT col0 DIV - cor0.col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1558
SELECT col0 / - cor0.col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - col2 * + col1 * col2 AS col0 FROM tab0 AS cor0
----
-611884
-93654
-97

query I rowsort
SELECT ALL + col0 * col0 + + col1 FROM tab2 AS cor0
----
6143
6258
80

query I rowsort
SELECT DISTINCT 11 * - col1 FROM tab1
----
-110
-143
-286

query I rowsort
SELECT DISTINCT - col2 * col1 + - col1 * col0 AS col2 FROM tab2 AS cor0
----
-1054
-1989
-6136

query I rowsort
SELECT DISTINCT - + 13 * - col2 + col0 AS col1 FROM tab0 AS cor0
----
1155
453
48

query I rowsort
SELECT ALL - + col0 * col0 AS col1 FROM tab0 AS cor0
----
-1225
-576
-7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 * - 92 col0 FROM tab1 AS cor0
----
-276
-5888
-7360

query I rowsort
SELECT col0 + - col2 * + col0 AS col2 FROM tab2 AS cor0
----
-182
-1950
-2923

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( col1 AS REAL ) * - cor0.col1 AS col1 FROM tab0 cor0
----
-7396
-8281
-9409

query I rowsort
SELECT DISTINCT + 6 + - ( col2 ) * + 48 FROM tab1 AS cor0
----
-2586
-2730
-4602

query I rowsort
SELECT DISTINCT 45 - + cor0.col2 FROM tab1, tab0 AS cor0
----
-37
12
44

query I rowsort
SELECT DISTINCT + - 69 FROM tab0 AS cor0
----
-69

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1571
SELECT - CAST( col0 AS SIGNED ) col2 FROM tab2 AS cor0
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1571
SELECT - CAST ( col0 AS INTEGER ) col2 FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT ALL + col2 + - col2 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col2 + col2 col1 FROM tab0 cor0
----
2871
7544
98

query I rowsort
SELECT ALL 79 * + 73 AS col2 FROM tab2 AS cor0
----
5767
5767
5767

query I rowsort
SELECT DISTINCT - ( 53 ) AS col1 FROM tab1 AS cor0
----
-53

query I rowsort
SELECT ALL 78 FROM tab2, tab1 AS cor0
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

query I rowsort
SELECT col2 + col1 - - col1 AS col0 FROM tab0
----
195
205
264

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1578
SELECT col0 - + CAST( + 57 AS SIGNED ) * col1 AS col2 FROM tab0
----
-4878
-5098
-5494

skipif mysql # not compatible
query I rowsort label-1578
SELECT col0 - + CAST ( + 57 AS INTEGER ) * col1 AS col2 FROM tab0
----
-4878
-5098
-5494

onlyif mysql # use DIV operator for integer division
query I rowsort label-1579
SELECT DISTINCT + col2 DIV - tab1.col0 + + col1 AS col0 FROM tab1
----
10
12
8

skipif mysql # not compatible
query I rowsort label-1579
SELECT DISTINCT + col2 / - tab1.col0 + + col1 AS col0 FROM tab1
----
10
12
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-1580
SELECT col0 + + col2 DIV - col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-1580
SELECT col0 + + col2 / - col1 FROM tab0 AS cor0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1581
SELECT - CAST( col1 AS SIGNED ) * + col2 AS col0 FROM tab0 AS cor0
----
-2838
-7462
-97

skipif mysql # not compatible
query I rowsort label-1581
SELECT - CAST ( col1 AS INTEGER ) * + col2 AS col0 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + + 22 AS col1 FROM tab1 AS cor0
----
22
22
22

query I rowsort
SELECT - + 89 AS col2 FROM tab2 AS cor0
----
-89
-89
-89

query I rowsort
SELECT ALL cor1.col2 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT ALL + 78 FROM tab2, tab2 AS cor0
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1586
SELECT CAST( + 64 AS SIGNED ) * col2 * col2 + - col1 FROM tab1
----
186598
207926
589811

skipif mysql # not compatible
query I rowsort label-1586
SELECT CAST ( + 64 AS INTEGER ) * col2 * col2 + - col1 FROM tab1
----
186598
207926
589811

query I rowsort
SELECT + 35 AS col0 FROM tab1
----
35
35
35

onlyif mysql # use DIV operator for integer division
query I rowsort label-1588
SELECT - - col1 DIV + ( + col0 ) + + cor0.col0 AS col0 FROM tab1 AS cor0
----
11
64
80

skipif mysql # not compatible
query I rowsort label-1588
SELECT - - col1 / + ( + col0 ) + + cor0.col0 AS col0 FROM tab1 AS cor0
----
11
64
80

query I rowsort
SELECT - - col2 * 94 - + col2 * + col0 FROM tab0 AS cor0
----
2310
410
59

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0, tab0 cor1, tab0, tab2 AS cor2
----
3645 values hashing to 61c64d7c972af4105004f57e1913df08

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1591
SELECT + + col0 * - CAST( - 96 AS SIGNED ) + col0 * - col1 - col0 AS col0 FROM tab2 AS cor0
----
2808
448
6162

skipif mysql # not compatible
query I rowsort label-1591
SELECT + + col0 * - CAST ( - 96 AS INTEGER ) + col0 * - col1 - col0 AS col0 FROM tab2 AS cor0
----
2808
448
6162

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col2 + 95 * col1 col1 FROM tab0 AS cor0
----
8203
8727
9216

query I rowsort
SELECT DISTINCT - col1 + 31 AS col1 FROM tab1 AS cor0
----
18
21
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-1594
SELECT ALL col2 - col1 DIV - ( 10 ) FROM tab2
----
30
31
39

skipif mysql # not compatible
query I rowsort label-1594
SELECT ALL col2 - col1 / - ( 10 ) FROM tab2
----
30
31
39

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1595
SELECT ALL + col1 + + CAST( NULL AS SIGNED ) AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1595
SELECT ALL + col1 + + CAST ( NULL AS INTEGER ) AS col0 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-1596
SELECT DISTINCT col0 + col0 DIV - col2 FROM tab1
----
3
63
80

skipif mysql # not compatible
query I rowsort label-1596
SELECT DISTINCT col0 + col0 / - col2 FROM tab1
----
3
63
80

query I rowsort
SELECT DISTINCT tab2.col0 + + tab2.col1 * col1 FROM tab2
----
3559
368
968

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1598
SELECT DISTINCT col2 * - CAST( NULL AS SIGNED ) + col2 AS col0 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-1598
SELECT DISTINCT col2 * - CAST ( NULL AS INTEGER ) + col2 AS col0 FROM tab1
----
NULL

query I rowsort
SELECT DISTINCT + col0 + ( - 7 * + col1 ) FROM tab0
----
-548
-578
-644

query I rowsort
SELECT ALL + + col2 + ( cor0.col1 ) FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT col1 + ( + cor0.col2 ) * col1 FROM tab1 cor0
----
1261
1430
580

query I rowsort
SELECT ALL - 24 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to f2e40f6e5cdbc2877843191cb261975f

query I rowsort
SELECT ALL - cor0.col2 * col2 + col0 FROM tab2 AS cor0
----
-1365
-598
-722

query I rowsort
SELECT - 65 * + 57 FROM tab0, tab2 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to f7f4f4158d936b4a8886e338b0782402

query I rowsort
SELECT + 31 FROM tab0, tab0 AS cor0
----
9 values hashing to d1ebd1cea4a9773069af34fbf8ea3540

query I rowsort
SELECT DISTINCT ( 75 ) AS col2 FROM tab2, tab2 AS cor0
----
75

query I rowsort
SELECT ALL + cor0.col0 + + 69 * col2 AS col2 FROM tab1 AS cor0
----
3729
3997
6704

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * 59 + col0 * - col0 col0 FROM tab2 AS cor0
----
-1482
-1580
364

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - 99 ) * col1 col2 FROM tab2 AS cor0
----
-1683
-3069
-5841

query I rowsort
SELECT ALL - - col2 + - ( - col1 * + cor0.col2 + + col1 ) FROM tab0 AS cor0
----
1
2785
7453

query I rowsort
SELECT - ( 18 ) * col0 + - col0 FROM tab2 cor0
----
-133
-1482
-1501

query I rowsort
SELECT col1 * - 68 * - col2 FROM tab2
----
104312
43928
56916

query I rowsort
SELECT ALL - - tab1.col0 AS col1 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( - col1 * - col1 AS REAL ) AS col2 FROM tab2
----
289
3481
961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1615
SELECT - - col2 + - col0 * - col1 * CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1615
SELECT - - col2 + - col0 * - col1 * CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 14 - - ( col0 ) AS col1 FROM tab2 cor0
----
-7
64
65

query I rowsort
SELECT DISTINCT 48 + - cor0.col2 AS col0 FROM tab2, tab2 cor0
----
10
21
22

query I rowsort
SELECT - ( - col0 ) + + cor0.col1 AS col2 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT DISTINCT cor0.col1 AS col2 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
17
31
59

query I rowsort
SELECT col0 + - col0 * col2 AS col1 FROM tab0 cor0
----
-7209
-768
0

query I rowsort
SELECT DISTINCT 80 FROM tab1 cor0
----
80

query I rowsort
SELECT - ( col2 ) + 22 * 77 * col2 FROM tab1
----
162528
91422
96501

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0, tab2 AS cor1, tab0, tab2 AS cor2
----
3645 values hashing to fcae6e4467f798ac88c869b8e38c6b23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * - cor0.col0 col0 FROM tab1 AS cor0
----
4096
6400
9

onlyif mysql # use DIV operator for integer division
query I rowsort label-1625
SELECT ALL - + ( col1 ) DIV + 22 AS col2 FROM tab0 AS cor0
----
-3
-4
-4

skipif mysql # not compatible
query I rowsort label-1625
SELECT ALL - + ( col1 ) / + 22 AS col2 FROM tab0 AS cor0
----
-3
-4
-4

query I rowsort
SELECT - + col2 * - ( ( - col0 ) ) * 45 AS col0 FROM tab2 AS cor0
----
-135090
-8505
-91260

query I rowsort
SELECT ALL + col1 * - col1 + col2 AS col0 FROM tab2 AS cor0
----
-251
-3455
-934

query I rowsort
SELECT col2 * col0 + - ( + col2 + + 61 ) FROM tab1 cor0
----
3530
47
7523

query I rowsort
SELECT DISTINCT - col0 * + 4 - cor0.col0 AS col1 FROM tab1 AS cor0
----
-15
-320
-400

query I rowsort
SELECT ALL - - col0 + 65 * cor0.col0 AS col0 FROM tab2 AS cor0
----
462
5148
5214

query I rowsort
SELECT ALL - 67 FROM tab1
----
-67
-67
-67

query I rowsort
SELECT + 0 FROM tab0, tab1, tab0 AS cor0
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT DISTINCT + 23 * col0 AS col0 FROM tab0
----
2047
552
805

query I rowsort
SELECT + 72 + - cor0.col1 + 71 FROM tab0 AS cor0
----
46
52
57

query I rowsort
SELECT - col1 + col0 * + 57 + 74 FROM tab2 AS cor0
----
442
4461
4560

onlyif mysql # use DIV operator for integer division
query I rowsort label-1636
SELECT + col1 + col0 + col2 DIV + 85 AS col1 FROM tab0 AS cor0
----
110
132
180

skipif mysql # not compatible
query I rowsort label-1636
SELECT + col1 + col0 + col2 / + 85 AS col1 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1637
SELECT DISTINCT - CAST( col0 AS SIGNED ) col0 FROM tab0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1637
SELECT DISTINCT - CAST ( col0 AS INTEGER ) col0 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT + + col0 * + col1 * + 17 FROM tab0 AS cor0
----
137683
35088
57715

query I rowsort
SELECT ALL 78 + - col2 * + col2 + 20 FROM tab0 AS cor0
----
-6626
-991
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * + col0 col1 FROM tab0 cor0
----
-2064
-3395
-8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1641
SELECT col0 * - col2 / - CAST( NULL AS SIGNED ) AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1641
SELECT col0 * - col2 / - CAST ( NULL AS INTEGER ) AS col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT tab1.col2 FROM tab1, tab2 AS cor0, tab2 cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT ALL 10 * + col2 FROM tab0
----
10
330
820

query I rowsort
SELECT col2 * 50 FROM tab0 AS cor0
----
1650
4100
50

query I rowsort
SELECT - cor0.col0 + + ( col2 ) FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT ALL + 98 * - tab1.col1 AS col1 FROM tab1
----
-1274
-2548
-980

query I rowsort
SELECT DISTINCT col1 * - col0 - + 62 FROM tab1
----
-1102
-140
-702

query I rowsort
SELECT DISTINCT + col1 - col2 AS col1 FROM tab0
----
53
9
96

onlyif mysql # use DIV operator for integer division
query I rowsort label-1649
SELECT DISTINCT - col1 * col0 DIV ( col1 ) FROM tab2
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-1649
SELECT DISTINCT - col1 * col0 / ( col1 ) FROM tab2
----
-7
-78
-79

query I rowsort
SELECT 32 * + col2 - 30 * col2 FROM tab0
----
164
2
66

query I rowsort
SELECT DISTINCT + 97 + + col2 - col1 FROM tab2
----
118
64
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1652
SELECT DISTINCT CAST( - 47 AS SIGNED ) col2 FROM tab1, tab1 AS cor0
----
-47

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1652
SELECT DISTINCT CAST ( - 47 AS INTEGER ) col2 FROM tab1, tab1 AS cor0
----
-47

query I rowsort
SELECT 31 * + 15 AS col2 FROM tab2 AS cor0
----
465
465
465

onlyif mysql # use DIV operator for integer division
query I rowsort label-1654
SELECT DISTINCT tab1.col0 DIV - 67 AS col2 FROM tab1
----
-1
0

skipif mysql # not compatible
query I rowsort label-1654
SELECT DISTINCT tab1.col0 / - 67 AS col2 FROM tab1
----
-1
0

query I rowsort
SELECT + tab0.col2 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 66 col2 FROM tab0 AS cor0
----
-66
-66
-66

query I rowsort
SELECT + col1 + + ( col2 ) FROM tab2 AS cor0
----
55
58
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1658
SELECT - CAST( 83 AS SIGNED ) + col0 FROM tab1 AS cor0
----
-19
-3
-80

skipif mysql # not compatible
query I rowsort label-1658
SELECT - CAST ( 83 AS INTEGER ) + col0 FROM tab1 AS cor0
----
-19
-3
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - col2 ) col2 FROM tab0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 79 col0 FROM tab2
----
79
79
79

query I rowsort
SELECT ALL col0 * 0 AS col2 FROM tab1
----
0
0
0

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0, tab2 cor1, tab1 AS cor2
----
972 values hashing to 75a813ebd5ec5ec2e67a66d0593ff763

query I rowsort
SELECT DISTINCT 27 FROM tab1, tab1 AS cor0
----
27

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1664
SELECT ALL - CAST( - col1 AS SIGNED ) AS col2 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-1664
SELECT ALL - CAST ( - col1 AS INTEGER ) AS col2 FROM tab1
----
10
13
26

query I rowsort
SELECT ALL + - col0 + + col2 * 37 AS col0 FROM tab0 AS cor0
----
1197
2
2945

query I rowsort
SELECT DISTINCT cor0.col2 + col1 + - col0 * - cor0.col0 FROM tab1 cor0
----
4163
6509
89

query I rowsort
SELECT 79 + col0 AS col0 FROM tab2 AS cor0
----
157
158
86

query I rowsort
SELECT ALL - col2 * + col2 + - col1 AS col1 FROM tab1 AS cor0
----
-2942
-3259
-9229

query I rowsort
SELECT ALL 24 + + col0 AS col0 FROM tab0
----
113
48
59

query I rowsort
SELECT - 51 AS col1 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 08d3853e39924d3c636260a6dd856837

query I rowsort
SELECT DISTINCT 17 AS col0 FROM tab2 AS cor0
----
17

query I rowsort
SELECT ALL 44 * + col0 * col1 + 23 AS col0 FROM tab2 AS cor0
----
202511
59115
9571

onlyif mysql # use DIV operator for integer division
query I rowsort label-1673
SELECT DISTINCT - col0 DIV + cor0.col0 AS col2 FROM tab1 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-1673
SELECT DISTINCT - col0 / + cor0.col0 AS col2 FROM tab1 AS cor0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col0 * col0 col2 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT ( col2 ) + - 56 AS col0 FROM tab2 AS cor0
----
-18
-29
-30

query I rowsort
SELECT ALL + 47 + + 17 FROM tab1, tab0, tab1 cor0
----
27 values hashing to c8b19f4c3ff38700cd2bb8a077bf29b9

query I rowsort
SELECT DISTINCT ( - col2 ) + 71 * col1 AS col1 FROM tab1 cor0
----
1792
653
827

query I rowsort
SELECT ALL col1 * col0 + ( - col0 ) * col0 - - col0 * + col1 FROM tab2 AS cor0
----
-3555
3120
385

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 77 - col2 col2 FROM tab1 AS cor0
----
-19
20
23

query I rowsort
SELECT DISTINCT 83 AS col1 FROM tab0 AS cor0
----
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-1681
SELECT - col0 DIV - 5 AS col2 FROM tab0 AS cor0
----
17
4
7

skipif mysql # not compatible
query I rowsort label-1681
SELECT - col0 / - 5 AS col2 FROM tab0 AS cor0
----
17
4
7

query I rowsort
SELECT ALL col0 + - 34 * col1 FROM tab1 AS cor0
----
-276
-362
-881

query I rowsort
SELECT DISTINCT col0 * col0 + + col1 * col2 FROM tab0 cor0
----
1322
15383
3414

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col2 + col0 * + col0 col1 FROM tab0 AS cor0
----
1226
609
8003

query I rowsort
SELECT col2 * 26 + col0 + col1 * - col1 FROM tab2 AS cor0
----
-252
-2727
778

query I rowsort
SELECT DISTINCT col1 * - 89 + - ( - col1 + cor0.col2 ) FROM tab1 AS cor0
----
-1240
-2342
-937

onlyif mysql # use DIV operator for integer division
query I rowsort label-1687
SELECT + + col0 DIV cor0.col2 AS col0 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-1687
SELECT + + col0 / cor0.col2 AS col0 FROM tab0 AS cor0
----
0
1
35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1688
SELECT ALL + - CAST( col1 AS SIGNED ) - col1 * ( col0 + + col0 ) AS col1 FROM tab1 AS cor0
----
-1290
-182
-2093

skipif mysql # not compatible
query I rowsort label-1688
SELECT ALL + - CAST ( col1 AS INTEGER ) - col1 * ( col0 + + col0 ) AS col1 FROM tab1 AS cor0
----
-1290
-182
-2093

query I rowsort
SELECT DISTINCT - col2 + 41 * + col1 AS col1 FROM tab1 cor0
----
1012
353
437

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 * + col0 col2 FROM tab0 cor0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 73 + - 91 * - col1 col0 FROM tab0 AS cor0
----
7899
8354
8900

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * - 66 - col1 col2 FROM tab2 AS cor0
----
1105
2015
3835

query I rowsort
SELECT DISTINCT + 75 AS col2 FROM tab1, tab1 AS cor0, tab2 cor1
----
75

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 cor0 CROSS JOIN tab0, tab2 AS cor1, tab0 cor2
----
972 values hashing to 380241bbc503a31e70494611a87ffd99

onlyif mysql # use DIV operator for integer division
query I rowsort label-1695
SELECT col0 DIV - tab2.col1 + ( - ( col2 ) ) * col2 + col1 col1 FROM tab2
----
-1431
-618
-698

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1695
SELECT col0 / - tab2.col1 + ( - ( col2 ) ) * col2 + col1 col1 FROM tab2
----
-1431
-618
-698

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 + col0 col2 FROM tab0 AS cor0
----
178
48
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 36 * cor0.col2 * - cor0.col2 + cor0.col2 + - col0 col0 FROM tab2 AS cor0
----
24284
26264
51943

query I rowsort
SELECT + 59 AS col1 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to e29fef8cdec1ee45a71d213f16d2f1d3

query I rowsort
SELECT DISTINCT - + 62 + + col0 AS col1 FROM tab2 AS cor0
----
-55
16
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - cor0.col2 + - cor0.col2 col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT - - col1 + - col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT ALL - + col1 + - cor0.col2 + col0 * + col0 FROM tab2 AS cor0
----
-9
5999
6186

query I rowsort
SELECT DISTINCT + col1 + 81 FROM tab2 AS cor0
----
112
140
98

query I rowsort
SELECT col1 * col2 * + 78 + + col2 FROM tab0 AS cor0
----
221397
582118
7567

query I rowsort
SELECT ALL + col2 + ( - col1 ) AS col2 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT col0 - + 31 AS col2 FROM tab1 AS cor0
----
-28
33
49

onlyif mysql # use DIV operator for integer division
query I rowsort label-1707
SELECT + col0 DIV + ( col0 ) + col1 + col0 AS col2 FROM tab0 AS cor0
----
111
133
181

skipif mysql # not compatible
query I rowsort label-1707
SELECT + col0 / + ( col0 ) + col1 + col0 AS col2 FROM tab0 AS cor0
----
111
133
181

query I rowsort
SELECT ALL col2 * col2 + + 42 FROM tab2 AS cor0
----
1486
718
771

query I rowsort
SELECT DISTINCT 64 + - col2 AS col2 FROM tab1
----
-32
10
7

query I rowsort
SELECT - col2 + + col0 + col0 * col2 AS col2 FROM tab0
----
69
7305
783

query I rowsort
SELECT DISTINCT col2 + + tab1.col0 * + ( - 17 * - col0 ) FROM tab1
----
108896
207
69689

query I rowsort
SELECT + 80 * tab0.col1 FROM tab0
----
6880
7280
7760

query I rowsort
SELECT + - col1 + 96 AS col2 FROM tab0 AS cor0
----
-1
10
5

query I rowsort
SELECT + col2 + col2 * - col0 FROM tab2 AS cor0
----
-162
-2002
-2964

query I rowsort
SELECT col2 * - col2 + col1 FROM tab0 AS cor0
----
-1003
-6633
96

query I rowsort
SELECT DISTINCT + - 88 - col0 FROM tab1 AS cor0
----
-152
-168
-91

query I rowsort
SELECT col0 * + 44 FROM tab0 AS cor0
----
1056
1540
3916

query I rowsort
SELECT DISTINCT - ( - 87 ) * col1 * col1 FROM tab2 AS cor0
----
25143
302847
83607

query I rowsort
SELECT DISTINCT - col1 * + 94 FROM tab2 cor0
----
-1598
-2914
-5546

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 84 col1 FROM tab0 AS cor0
----
-84
-84
-84

query I rowsort
SELECT + 18 * col0 AS col2 FROM tab1 AS cor0
----
1152
1440
54

query I rowsort
SELECT 65 FROM tab2, tab1 AS cor0 CROSS JOIN tab1
----
27 values hashing to 1c9d0bf96cd3361942fadad668138b9c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 26 * + cor0.col1 col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 5c0a5491ba5889db5c6fbe57eb19a7d3

query I rowsort
SELECT ALL + - 61 + col0 AS col2 FROM tab2 AS cor0
----
-54
17
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + + col0 col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL ( + 41 ) + + cor0.col2 - 60 AS col0 FROM tab2 AS cor0
----
19
7
8

query I rowsort
SELECT DISTINCT + + 57 * col2 FROM tab0 AS cor0
----
1881
4674
57

query I rowsort
SELECT DISTINCT + - ( + col1 ) * + cor0.col2 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1729
SELECT ALL + CAST( NULL AS SIGNED ) + - 30 / + cor0.col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1729
SELECT ALL + CAST ( NULL AS INTEGER ) + - 30 / + cor0.col1 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + 16 * ( cor0.col0 ) AS col1 FROM tab2 AS cor0
----
-112
-1248
-1264

onlyif mysql # use DIV operator for integer division
query I rowsort label-1731
SELECT DISTINCT + + cor0.col0 DIV + col1 AS col2 FROM tab1 AS cor0
----
0
6

skipif mysql # not compatible
query I rowsort label-1731
SELECT DISTINCT + + cor0.col0 / + col1 AS col2 FROM tab1 AS cor0
----
0
6

query I rowsort
SELECT + - col1 + col0 * cor0.col1 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT ALL - + 13 AS col0 FROM tab0 AS cor0
----
-13
-13
-13

query I rowsort
SELECT DISTINCT + 60 * 41 FROM tab1 AS cor0
----
2460

query I rowsort
SELECT ALL 64 * + col1 FROM tab1 AS cor0
----
1664
640
832

query I rowsort
SELECT ALL - ( col1 ) * 31 AS col2 FROM tab0 AS cor0
----
-2666
-2821
-3007

query I rowsort
SELECT DISTINCT + - 93 AS col1 FROM tab2 AS cor0
----
-93

query I rowsort
SELECT col1 * col1 + col0 FROM tab2
----
3559
368
968

query I rowsort
SELECT + + col2 + + col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT - + 11 FROM tab2 AS cor0
----
-11
-11
-11

query I rowsort
SELECT - col1 + cor0.col0 * col1 FROM tab1 AS cor0
----
1027
52
630

query I rowsort
SELECT 39 * - tab1.col2 + + col2 AS col1 FROM tab1
----
-2052
-2166
-3648

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 9 col0 FROM tab1
----
9

query I rowsort
SELECT - col0 * - cor0.col2 AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ( ( - col1 ) ) FROM tab0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT - col1 + - col2 * col1 FROM tab2
----
-1593
-663
-868

query I rowsort
SELECT - col2 + col0 + - col2 FROM tab1 AS cor0
----
-105
-112
-50

query I rowsort
SELECT + 68 AS col2 FROM tab1
----
68
68
68

query I rowsort
SELECT ALL + col1 + col2 * col2 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT ALL + 90 * - col2 + col2 AS col1 FROM tab0 cor0
----
-2937
-7298
-89

query I rowsort
SELECT + 33 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

query IIIIIIIII rowsort
SELECT ALL * FROM tab0 cor0 CROSS JOIN tab1, tab0 cor1
----
243 values hashing to 74e36edda45186a5c45856859d8e21f0

query I rowsort
SELECT ( 84 ) FROM tab2 AS cor0
----
84
84
84

query I rowsort
SELECT + + 51 * + col1 AS col0 FROM tab0 AS cor0
----
4386
4641
4947

query I rowsort
SELECT DISTINCT + 99 FROM tab2, tab1 AS cor0
----
99

onlyif mysql # use DIV operator for integer division
query I rowsort label-1756
SELECT DISTINCT col2 * 71 DIV col0 FROM tab2
----
23
273
34

skipif mysql # not compatible
query I rowsort label-1756
SELECT DISTINCT col2 * 71 / col0 FROM tab2
----
23
273
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-1757
SELECT DISTINCT 22 DIV + col0 AS col2 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-1757
SELECT DISTINCT 22 / + col0 AS col2 FROM tab0
----
0

query I rowsort
SELECT DISTINCT - tab2.col2 * + col2 AS col1 FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT + ( - cor0.col0 ) FROM tab1, tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - col0 * - 86 FROM tab1 AS cor0
----
258
5504
6880

onlyif mysql # use DIV operator for integer division
query I rowsort label-1761
SELECT DISTINCT - + cor0.col0 * 30 * - cor0.col2 + - col2 DIV + col1 AS col0 FROM tab1 AS cor0
----
109435
230393
4858

skipif mysql # not compatible
query I rowsort label-1761
SELECT DISTINCT - + cor0.col0 * 30 * - cor0.col2 + - col2 / + col1 AS col0 FROM tab1 AS cor0
----
109435
230393
4858

query I rowsort
SELECT ALL + 31 + col1 AS col1 FROM tab0 cor0
----
117
122
128

onlyif mysql # use DIV operator for integer division
query I rowsort label-1763
SELECT tab0.col2 + - ( - col2 ) DIV - col2 AS col1 FROM tab0
----
0
32
81

skipif mysql # not compatible
query I rowsort label-1763
SELECT tab0.col2 + - ( - col2 ) / - col2 AS col1 FROM tab0
----
0
32
81

query I rowsort
SELECT col0 * - 75 AS col2 FROM tab2 AS cor0
----
-525
-5850
-5925

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + + cor0.col0 col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - cor0.col0 + + col0 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + ( col1 ) * + col0 + + 74 AS col2 FROM tab2 AS cor0
----
1417
291
4676

query I rowsort
SELECT - ( - col0 ) FROM tab2 cor0
----
7
78
79

query I rowsort
SELECT DISTINCT + ( + tab0.col0 ) AS col0 FROM tab0, tab2 AS cor0
----
24
35
89

query IIIIIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 cor0 CROSS JOIN tab0, tab1 AS cor1, tab2, tab0 AS cor2, tab2 AS cor3
----
13122 values hashing to caae6e2bf2a2d41ed69375a26060a692

query I rowsort
SELECT DISTINCT col1 * + ( + col2 ) FROM tab0
----
2838
7462
97

query I rowsort
SELECT DISTINCT + + col1 * col2 + + col0 * cor0.col1 AS col2 FROM tab2 AS cor0
----
1054
1989
6136

query I rowsort
SELECT DISTINCT 3 AS col0 FROM tab1, tab0 AS cor0, tab1 AS cor1, tab0 cor2
----
3

query I rowsort
SELECT + ( + col1 ) * col2 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - 57 + col0 AS col2 FROM tab0 AS cor0
----
-22
-33
32

query I rowsort
SELECT + 66 + col2 FROM tab0 AS cor0
----
148
67
99

query I rowsort
SELECT DISTINCT ( 54 ) AS col1 FROM tab0, tab2 AS cor0
----
54

query I rowsort
SELECT + 97 AS col2 FROM tab1
----
97
97
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * cor0.col1 col0 FROM tab0 cor0
----
-7396
-8281
-9409

query I rowsort
SELECT ALL 58 * + col0 AS col2 FROM tab2
----
406
4524
4582

query I rowsort
SELECT DISTINCT + 12 AS col2 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
12

onlyif mysql # use DIV operator for integer division
query I rowsort label-1782
SELECT + col1 + 11 DIV + 87 FROM tab2 AS cor0
----
17
31
59

skipif mysql # not compatible
query I rowsort label-1782
SELECT + col1 + 11 / + 87 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL col2 * cor0.col0 + 19 * + col1 FROM tab1 AS cor0
----
3838
656
7927

query I rowsort
SELECT DISTINCT - col1 + col1 * + col2 * col1 AS col2 FROM tab1 AS cor0
----
16211
36478
5690

query I rowsort
SELECT col2 * + ( + col1 ) FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL 65 * - col0 FROM tab1
----
-195
-4160
-5200

query I rowsort
SELECT DISTINCT + col0 * + col2 FROM tab1
----
162
3648
7680

query I rowsort
SELECT - ( col2 ) + - col0 FROM tab0
----
-171
-36
-57

query I rowsort
SELECT DISTINCT col1 + - col1 + - ( + 80 ) * col2 AS col2 FROM tab1
----
-4320
-4560
-7680

query I rowsort
SELECT DISTINCT 6 AS col1 FROM tab0
----
6

query I rowsort
SELECT DISTINCT 47 * col2 AS col1 FROM tab0
----
1551
3854
47

query I rowsort
SELECT col2 + 22 FROM tab0 AS cor0
----
104
23
55

onlyif mysql # use DIV operator for integer division
query I rowsort label-1793
SELECT DISTINCT - col1 DIV 88 + col1 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-1793
SELECT DISTINCT - col1 / 88 + col1 FROM tab1 AS cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * col1 + col1 * + col1 col1 FROM tab0 AS cor0
----
12804
16380
9460

query I rowsort
SELECT - + col0 + + 2 FROM tab1 cor0
----
-1
-62
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 + cor0.col0 * - col1 col2 FROM tab2 AS cor0
----
-1422
-224
-4680

query I rowsort
SELECT ALL col2 * tab2.col0 + + 19 * col2 FROM tab2
----
2522
3724
702

query I rowsort
SELECT - col1 + - cor0.col0 * col1 AS col2 FROM tab1 AS cor0
----
-104
-1053
-650

query I rowsort
SELECT ALL cor0.col2 AS col2 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT ALL + tab1.col0 * + col0 AS col0 FROM tab1
----
4096
6400
9

query I rowsort
SELECT ALL col1 * - 66 AS col0 FROM tab0
----
-5676
-6006
-6402

query I rowsort
SELECT ALL - col2 + 34 + + col2 * col1 FROM tab0 AS cor0
----
130
2839
7414

onlyif mysql # use DIV operator for integer division
query I rowsort label-1803
SELECT col0 + - col2 DIV col1 AS col1 FROM tab2 AS cor0
----
7
77
78

skipif mysql # not compatible
query I rowsort label-1803
SELECT col0 + - col2 / col1 AS col1 FROM tab2 AS cor0
----
7
77
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-1804
SELECT DISTINCT - tab1.col2 DIV tab1.col2 AS col2 FROM tab1
----
-1

skipif mysql # not compatible
query I rowsort label-1804
SELECT DISTINCT - tab1.col2 / tab1.col2 AS col2 FROM tab1
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - ( + col0 ) * 13 - + col0 col0 FROM tab0 AS cor0
----
1068
288
420

query I rowsort
SELECT ALL + - col2 * + col0 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-1807
SELECT + col0 DIV - tab0.col2 - - col2 DIV col1 AS col2 FROM tab0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-1807
SELECT + col0 / - tab0.col2 - - col2 / col1 AS col2 FROM tab0
----
-1
-35
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1808
SELECT col2 * col2 DIV + col0 FROM tab1
----
115
50
972

skipif mysql # not compatible
query I rowsort label-1808
SELECT col2 * col2 / + col0 FROM tab1
----
115
50
972

query I rowsort
SELECT + - ( - col1 ) - cor0.col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL ( 47 ) - - tab0.col2 FROM tab0
----
129
48
80

query I rowsort
SELECT DISTINCT tab1.col2 * col2 - col1 AS col1 FROM tab1
----
2890
3239
9203

query I rowsort
SELECT DISTINCT 3 * - col1 - - col0 * + col0 AS col2 FROM tab1
----
-69
4066
6361

onlyif mysql # use DIV operator for integer division
query I rowsort label-1813
SELECT - ( + col0 ) + + tab0.col1 DIV ( col2 ) + - col0 * - CAST( col1 AS SIGNED ) * col0 AS col0 FROM tab0
----
118887
49514
720723

skipif mysql # not compatible
query I rowsort label-1813
SELECT - ( + col0 ) + + tab0.col1 / ( col2 ) + - col0 * - CAST ( col1 AS INTEGER ) * col0 AS col0 FROM tab0
----
118887
49514
720723

query I rowsort
SELECT 43 + col1 FROM tab2 AS cor0
----
102
60
74

query I rowsort
SELECT DISTINCT col0 + col2 * - col2 AS col0 FROM tab2
----
-1365
-598
-722

onlyif mysql # use DIV operator for integer division
query I rowsort label-1816
SELECT ALL - col1 + - col0 DIV + tab0.col0 AS col0 FROM tab0
----
-87
-92
-98

skipif mysql # not compatible
query I rowsort label-1816
SELECT ALL - col1 + - col0 / + tab0.col0 AS col0 FROM tab0
----
-87
-92
-98

query I rowsort
SELECT DISTINCT + 20 * col1 AS col2 FROM tab1 AS cor0
----
200
260
520

query I rowsort
SELECT 60 + + col0 * + col2 FROM tab1 AS cor0
----
222
3708
7740

query I rowsort
SELECT DISTINCT + col1 * - col2 - - 82 FROM tab0 AS cor0
----
-15
-2756
-7380

query I rowsort
SELECT ALL - 27 + - col2 * + cor0.col2 FROM tab2 AS cor0
----
-1471
-703
-756

query I rowsort
SELECT + - ( - col0 ) + + ( + cor0.col1 ) * + cor0.col1 FROM tab0 AS cor0
----
7420
8370
9444

onlyif mysql # use DIV operator for integer division
query I rowsort label-1822
SELECT ALL - - col1 DIV col1 + + col0 AS col2 FROM tab0 AS cor0
----
25
36
90

skipif mysql # not compatible
query I rowsort label-1822
SELECT ALL - - col1 / col1 + + col0 AS col2 FROM tab0 AS cor0
----
25
36
90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1823
SELECT ALL + cor0.col1 * + col1 + CAST( col1 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
110
182
702

skipif mysql # not compatible
query I rowsort label-1823
SELECT ALL + cor0.col1 * + col1 + CAST ( col1 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
110
182
702

query I rowsort
SELECT - col0 * - col1 + + 43 - 68 AS col1 FROM tab2 cor0
----
1318
192
4577

query I rowsort
SELECT ( + col0 ) + col1 FROM tab1
----
29
74
93

query I rowsort
SELECT + col1 + + tab1.col0 FROM tab1
----
29
74
93

query I rowsort
SELECT + 85 AS col1 FROM tab2
----
85
85
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1828
SELECT CAST( NULL AS DECIMAL ) + - 66 col2 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1828
SELECT CAST ( NULL AS REAL ) + - 66 col2 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + col0 * - col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + col0 * - col1 + - 87 FROM tab1 AS cor0
----
-1127
-165
-727

query I rowsort
SELECT ALL - - col2 + + col0 * 89 + col0 FROM tab2 AS cor0
----
657
7046
7148

query I rowsort
SELECT + + col2 * col0 * col1 - col2 FROM tab1 cor0
----
36423
4158
99744

query I rowsort
SELECT - cor0.col2 * - col2 - col2 * + col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col1 + col1 + col0 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT - - cor0.col2 + + col0 * col1 AS col0 FROM tab1 AS cor0
----
1136
132
697

onlyif mysql # use DIV operator for integer division
query I rowsort label-1836
SELECT col2 + - cor0.col0 DIV + col1 AS col2 FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-1836
SELECT col2 + - cor0.col0 / + col1 AS col2 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT DISTINCT + + col1 + + col1 * col0 FROM tab0 cor0
----
2150
3492
8190

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * cor0.col1 col2 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT - col1 * - col0 + - col1 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT - col1 + ( - col2 ) * col2 * + 99 AS col1 FROM tab2 AS cor0
----
-142973
-66983
-72202

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 + + 31 col0 FROM tab2 AS cor0
----
-7
4
5

query I rowsort
SELECT ALL + + cor0.col1 + + col2 * - col1 AS col1 FROM tab1 AS cor0
----
-1235
-1378
-560

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col0 * - col2 + 34 col2 FROM tab2 AS cor0
----
-155
-1994
-2968

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT col1 + + CAST ( col0 AS REAL ) * - col1 AS col1 FROM tab1 AS cor0
----
-1027
-52
-630

query I rowsort
SELECT + col0 + col1 * - col2 FROM tab2 AS cor0
----
-1456
-567
-830

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1846
SELECT ALL - - col0 * CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1846
SELECT ALL - - col0 * CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 76 * - col2 FROM tab1 AS cor0
----
-4104
-4332
-7296

query I rowsort
SELECT ALL - cor0.col0 AS col0 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

query I rowsort
SELECT ALL - - 99 FROM tab1 AS cor0
----
99
99
99

query I rowsort
SELECT col2 * 68 FROM tab2 AS cor0
----
1768
1836
2584

query I rowsort
SELECT DISTINCT ( cor0.col1 ) * col0 + col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT - - 84 AS col2 FROM tab0 cor0
----
84

query I rowsort
SELECT DISTINCT 35 + + cor0.col2 * - col2 * - ( 15 * + col0 ) FROM tab2 AS cor0
----
1711175
76580
790955

query I rowsort
SELECT DISTINCT 59 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
59

query I rowsort
SELECT ALL + 96 + ( col0 ) AS col2 FROM tab2 AS cor0
----
103
174
175

query I rowsort
SELECT + - 3 FROM tab1 AS cor0
----
-3
-3
-3

query I rowsort
SELECT ALL - ( col1 ) + col2 * - 23 AS col1 FROM tab1 AS cor0
----
-1268
-1321
-2221

query I rowsort
SELECT + ( ( - cor0.col0 ) ) * + 14 AS col0 FROM tab1 AS cor0
----
-1120
-42
-896

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 86 col0 FROM tab2, tab1 AS cor0
----
86

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0 CROSS JOIN tab1, tab0 AS cor1
----
972 values hashing to 5342fb4caf4767cb98bd21989bad099f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1861
SELECT - + CAST( NULL AS SIGNED ) * + ( col2 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1861
SELECT - + CAST ( NULL AS INTEGER ) * + ( col2 ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 + + cor0.col2 * col1 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT + cor0.col2 + col1 * + col1 AS col0 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT - col1 * + 45 AS col1 FROM tab0 AS cor0
----
-3870
-4095
-4365

query I rowsort
SELECT cor1.col2 * - cor0.col2 FROM tab1, tab1 AS cor0, tab2 cor1
----
27 values hashing to 5bcee6a8ffbd87f0429551bc7e631cdb

query I rowsort
SELECT ALL + col1 * col0 * col0 AS col2 FROM tab1
----
234
40960
83200

query I rowsort
SELECT + col2 + 74 FROM tab0 AS cor0
----
107
156
75

query I rowsort
SELECT col2 + + ( col2 + + col1 ) * col0 * - 44 FROM tab1 AS cor0
----
-10506
-188615
-383584

onlyif mysql # use DIV operator for integer division
query I rowsort label-1869
SELECT - col1 + 10 DIV - col1 AS col1 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-1869
SELECT - col1 + 10 / - col1 AS col1 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ALL cor0.col1 + col0 * col2 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT ALL col1 * ( + 62 ) FROM tab1 AS cor0
----
1612
620
806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - col1 + - col0 col2 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT ALL 88 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 6be17b82ecb3e8b268fcb4ba610ddb37

onlyif mysql # use DIV operator for integer division
query I rowsort label-1874
SELECT - col0 + + col0 + ( + col1 ) DIV - tab2.col0 FROM tab2
----
-4
0
0

skipif mysql # not compatible
query I rowsort label-1874
SELECT - col0 + + col0 + ( + col1 ) / - tab2.col0 FROM tab2
----
-4
0
0

query I rowsort
SELECT DISTINCT 48 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
48

onlyif mysql # use DIV operator for integer division
query I rowsort label-1876
SELECT + cor1.col2 DIV 50 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to da8a72a7967c0c73d91239275230aed9

skipif mysql # not compatible
query I rowsort label-1876
SELECT + cor1.col2 / 50 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to da8a72a7967c0c73d91239275230aed9

query I rowsort
SELECT - + 33 + - 76 AS col2 FROM tab1 AS cor0
----
-109
-109
-109

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1, tab2 cor0, tab2 AS cor1
----
972 values hashing to f9adf26f20dc8fcc43c2de18a5fd4859

query I rowsort
SELECT ALL - col1 * ( + col1 ) FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT col0 * 50 FROM tab0
----
1200
1750
4450

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1881
SELECT - col2 * + CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1881
SELECT - col2 * + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 AS col1 FROM tab2 WHERE NOT + col0 <= NULL
----

query I rowsort
SELECT ALL - col1 + + col1 * + col0 AS col1 FROM tab2
----
1326
186
4543

query I rowsort
SELECT DISTINCT - col0 + - col0 FROM tab0
----
-178
-48
-70

query IIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0 WHERE ( NULL ) >= + cor0.col0
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-1886
SELECT + col1 + - col0 + - col2 * tab2.col0 DIV - col1 FROM tab2
----
114
15
30

skipif mysql # not compatible
query I rowsort label-1886
SELECT + col1 + - col0 + - col2 * tab2.col0 / - col1 FROM tab2
----
114
15
30

query I rowsort
SELECT ALL col1 + + col0 + tab0.col0 FROM tab0 WHERE NULL IN ( col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - col1 col2 FROM tab0
----
-7396
-8281
-9409

query I rowsort
SELECT cor0.col2 AS col0 FROM tab2, tab1 cor0
----
9 values hashing to 80ca0a1cc337a7714a8990a764cfdb17

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT ( col2 * + col0 ) = NULL
----

query I rowsort
SELECT ALL - col0 - + cor0.col2 * - col0 AS col2 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT DISTINCT col0 * col2 * + col0 - col2 FROM tab1
----
233415
432
614304

query I rowsort
SELECT col1 * col0 + col0 AS col2 FROM tab1 AS cor0
----
1120
704
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-1894
SELECT - col1 DIV + col0 col2 FROM tab2
----
-4
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1894
SELECT - col1 / + col0 col2 FROM tab2
----
-4
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1895
SELECT + col0 DIV - col0 AS col1 FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-1895
SELECT + col0 / - col0 AS col1 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT col2 + + col1 + - col2 * + col1 FROM tab2 AS cor0
----
-1449
-591
-779

query I rowsort
SELECT ALL - - col0 + - col0 * - col2 AS col0 FROM tab0 AS cor0
----
70
7387
816

query I rowsort
SELECT + col0 * col1 + + col2 * col2 AS col2 FROM tab2 AS cor0
----
2787
5278
946

query I rowsort
SELECT DISTINCT + cor0.col0 + - col0 FROM tab1 cor0
----
0

query I rowsort
SELECT ALL + col0 + - col0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-1901
SELECT col0 + col0 DIV col1 AS col2 FROM tab1 AS cor0
----
3
70
86

skipif mysql # not compatible
query I rowsort label-1901
SELECT col0 + col0 / col1 AS col2 FROM tab1 AS cor0
----
3
70
86

query I rowsort
SELECT col0 * col1 + + col1 AS col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT ALL - + cor0.col0 * cor0.col2 + col1 - cor0.col0 AS col2 FROM tab2 AS cor0
----
-165
-2047
-3064

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1904
SELECT DISTINCT + ( - col1 ) * CAST( - col2 AS SIGNED ) FROM tab1 AS cor0
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-1904
SELECT DISTINCT + ( - col1 ) * CAST ( - col2 AS INTEGER ) FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL - tab0.col0 FROM tab0, tab2, tab0 cor0
----
27 values hashing to c3ebf1695ca74567bdc173dbe15186a8

query I rowsort
SELECT + 96 * - col1 AS col2 FROM tab1 AS cor0
----
-1248
-2496
-960

query I rowsort
SELECT - 91 * + col0 + 46 + col2 AS col1 FROM tab1 cor0
----
-173
-5721
-7138

query I rowsort
SELECT DISTINCT - 41 * + col2 + cor0.col1 FROM tab1 AS cor0
----
-2188
-2327
-3923

query I rowsort
SELECT - col0 * col1 + + 7 + + col0 AS col0 FROM tab0 AS cor0
----
-2033
-3353
-8003

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + col1 * - col0 * col2 col0 FROM tab2
----
-119626
-50996
-5832

query I rowsort
SELECT + col1 - col1 AS col0 FROM tab2 WHERE NOT ( NULL ) < col1
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-1912
SELECT DISTINCT - col1 * col0 + col2 DIV col0 AS col1 FROM tab0
----
-2063
-3395
-8099

skipif mysql # not compatible
query I rowsort label-1912
SELECT DISTINCT - col1 * col0 + col2 / col0 AS col1 FROM tab0
----
-2063
-3395
-8099

query I rowsort
SELECT ALL + col0 + + col1 * + col2 AS col1 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT ALL - col1 * cor0.col0 AS col0 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT col0 + + col1 * - 91 FROM tab1 AS cor0
----
-1103
-2363
-846

onlyif mysql # use DIV operator for integer division
query I rowsort label-1916
SELECT DISTINCT ( - col1 ) * - 80 + 98 DIV + col0 AS col0 FROM tab0
----
6884
7281
7762

skipif mysql # not compatible
query I rowsort label-1916
SELECT DISTINCT ( - col1 ) * - 80 + 98 / + col0 AS col0 FROM tab0
----
6884
7281
7762

query I rowsort
SELECT DISTINCT + 57 + - col1 * - col2 FROM tab1
----
1305
1461
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-1918
SELECT + - col2 DIV - 31 + 72 FROM tab1 AS cor0
----
73
73
75

skipif mysql # not compatible
query I rowsort label-1918
SELECT + - col2 / - 31 + 72 FROM tab1 AS cor0
----
73
73
75

onlyif mysql # use DIV operator for integer division
query I rowsort label-1919
SELECT DISTINCT + - col1 + + col0 DIV - col0 FROM tab1 cor0
----
-11
-14
-27

skipif mysql # not compatible
query I rowsort label-1919
SELECT DISTINCT + - col1 + + col0 / - col0 FROM tab1 cor0
----
-11
-14
-27

query I rowsort
SELECT DISTINCT - + col0 * 44 - - ( + col2 ) * ( col1 ) FROM tab1 cor0
----
-2246
-2272
1272

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1921
SELECT + + col0 * + CAST( - col1 AS SIGNED ) + col1 * + col0 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-1921
SELECT + + col0 * + CAST ( - col1 AS INTEGER ) + col1 * + col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT col1 + col1 * ( tab1.col2 ) FROM tab1
----
1261
1430
580

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT 13 + col1 * CAST ( - 58 AS REAL ) * + col0 AS col2 FROM tab0
----
-119699
-196897
-469729

query I rowsort
SELECT DISTINCT 16 + col0 FROM tab2
----
23
94
95

query I rowsort
SELECT col2 * + col1 + + col0 * col1 AS col1 FROM tab0
----
15561
3492
4902

query I rowsort
SELECT ALL + col2 * col1 + + 91 + + col1 * col2 AS col0 FROM tab0
----
15015
285
5767

query I rowsort
SELECT col2 + col2 * + col2 AS col1 FROM tab2
----
1482
702
756

query III rowsort
SELECT * FROM tab0 WHERE ( NULL ) BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL + col2 * - col0 - - col1 FROM tab1
----
-136
-3638
-7667

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col0 * tab1.col1 col0 FROM tab1
----
576
75
960

query I rowsort
SELECT ALL col0 + col2 AS col2 FROM tab0 WHERE NOT NULL IN ( tab0.col1 )
----

query I rowsort
SELECT - col1 + + tab0.col1 * col1 AS col2 FROM tab0
----
7310
8190
9312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + - tab1.col0 + - col1 col2 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT col1 + col2 + - col2 AS col1 FROM tab1
----
10
13
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-1935
SELECT DISTINCT col1 DIV col0 AS col0 FROM tab1
----
0
8

skipif mysql # not compatible
query I rowsort label-1935
SELECT DISTINCT col1 / col0 AS col0 FROM tab1
----
0
8

onlyif mysql # use DIV operator for integer division
query I rowsort label-1936
SELECT col2 * col1 DIV - col0 FROM tab1
----
-15
-468
-8

skipif mysql # not compatible
query I rowsort label-1936
SELECT col2 * col1 / - col0 FROM tab1
----
-15
-468
-8

query I rowsort
SELECT col0 + col0 FROM tab0 WHERE NOT NULL NOT IN ( col1 * col1 )
----

query I rowsort
SELECT - col1 * col1 + - col1 FROM tab1
----
-110
-182
-702

query I rowsort
SELECT DISTINCT col1 * - col2 * - col2 + col2 FROM tab1
----
119904
32547
75870

query I rowsort
SELECT DISTINCT + col1 * tab1.col2 + col1 + + tab1.col1 FROM tab1
----
1274
1456
590

onlyif mysql # use DIV operator for integer division
query I rowsort label-1941
SELECT ALL col2 DIV + col1 AS col1 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-1941
SELECT ALL col2 / + col1 AS col1 FROM tab1
----
2
5
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-1942
SELECT ALL tab2.col2 DIV tab2.col0 FROM tab2
----
0
0
3

skipif mysql # not compatible
query I rowsort label-1942
SELECT ALL tab2.col2 / tab2.col0 FROM tab2
----
0
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col2 * + col2 col1 FROM tab2
----
1444
676
729

query I rowsort
SELECT ALL - col2 + col1 * col1 + + col0 AS col0 FROM tab0
----
7387
8288
9443

query I rowsort
SELECT col1 + col1 * col2 FROM tab0
----
194
2924
7553

query III rowsort
SELECT DISTINCT * FROM tab1 WHERE ( NULL ) > ( NULL )
----

query I rowsort
SELECT DISTINCT + col2 * col2 + + tab0.col1 * + col1 AS col2 FROM tab0
----
15005
8485
9410

onlyif mysql # use DIV operator for integer division
query I rowsort label-1948
SELECT ALL col2 * - col2 DIV + col2 FROM tab1
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-1948
SELECT ALL col2 * - col2 / + col2 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT ALL - col1 + - col2 + - col1 FROM tab0
----
-195
-205
-264

query I rowsort
SELECT DISTINCT + col1 * col1 * col2 + + col1 * + col2 - - col2 AS col2 FROM tab2
----
11666
26811
92066

query I rowsort
SELECT DISTINCT - tab1.col2 * tab1.col2 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT - col1 * col1 + - col1 FROM tab2
----
-306
-3540
-992

query I rowsort
SELECT DISTINCT col2 * - col1 AS col0 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-1954
SELECT - col0 DIV col2 AS col1 FROM tab1 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-1954
SELECT - col0 / col2 AS col1 FROM tab1 AS cor0
----
-1
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 + - col2 + + col2 * - col2 col2 FROM tab1 AS cor0
----
-2967
-3242
-9232

query I rowsort
SELECT DISTINCT col0 + ( 6 ) - col0 FROM tab0 AS cor0
----
6

query I rowsort
SELECT + cor1.col2 AS col0 FROM tab0, tab0 cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT + col2 * - col1 + + col1 * 12 * col2 FROM tab2
----
16874
7106
9207

query I rowsort
SELECT DISTINCT - 44 FROM tab1, tab0 AS cor0, tab0 AS cor1
----
-44

query I rowsort
SELECT ALL - tab0.col1 AS col1 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

query I rowsort
SELECT - cor0.col2 + - col1 * + col0 AS col1 FROM tab1 AS cor0
----
-1136
-132
-697

query I rowsort
SELECT - col1 * 56 AS col0 FROM tab0 cor0
----
-4816
-5096
-5432

query I rowsort
SELECT + ( + col1 ) * col1 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT - col2 + 44 AS col0 FROM tab2
----
17
18
6

query I rowsort
SELECT col1 * - col1 + + 18 FROM tab1 cor0
----
-151
-658
-82

query I rowsort
SELECT - 78 - - tab1.col1 FROM tab1
----
-52
-65
-68

query I rowsort
SELECT - cor0.col0 + col0 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT col1 * - col0 + col2 AS col2 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT ALL col2 + + 34 * col0 FROM tab1
----
156
2233
2816

onlyif mysql # use DIV operator for integer division
query I rowsort label-1970
SELECT ( + col0 ) + col0 DIV - 61 AS col2 FROM tab1
----
3
63
79

skipif mysql # not compatible
query I rowsort label-1970
SELECT ( + col0 ) + col0 / - 61 AS col2 FROM tab1
----
3
63
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * - col1 + + col2 + col2 * + ( - col0 ) col2 FROM tab0
----
2079
246
63

query I rowsort
SELECT - 19 + 4 * + col0 FROM tab0
----
121
337
77

query I rowsort
SELECT DISTINCT col0 + 33 + tab0.col2 * - col1 FROM tab0
----
-2781
-29
-7340

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1974
SELECT + CAST( NULL AS DECIMAL ) AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1974
SELECT + CAST ( NULL AS REAL ) AS col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT col2 * + col2 + - tab1.col1 FROM tab1
----
2890
3239
9203

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 76 * col0 col0 FROM tab2
----
532
5928
6004

onlyif mysql # use DIV operator for integer division
query I rowsort label-1977
SELECT - 7 DIV - col2 col0 FROM tab1 cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-1977
SELECT - 7 / - col2 col0 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT - 67 * - cor0.col0 AS col2 FROM tab1 AS cor0
----
201
4288
5360

onlyif mysql # use DIV operator for integer division
query I rowsort label-1979
SELECT - col1 + - col0 DIV col0 AS col0 FROM tab0 AS cor0
----
-87
-92
-98

skipif mysql # not compatible
query I rowsort label-1979
SELECT - col1 + - col0 / col0 AS col0 FROM tab0 AS cor0
----
-87
-92
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 + col2 * cor0.col0 col1 FROM tab1 cor0
----
188
3658
7693

onlyif mysql # use DIV operator for integer division
query I rowsort label-1981
SELECT DISTINCT - col0 DIV + col1 + 64 * col0 AS col1 FROM tab2 AS cor0
----
448
4991
5052

skipif mysql # not compatible
query I rowsort label-1981
SELECT DISTINCT - col0 / + col1 + 64 * col0 AS col1 FROM tab2 AS cor0
----
448
4991
5052

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1982
SELECT + - 8 * + cor0.col2 + CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-1982
SELECT + - 8 * + cor0.col2 + CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - 72 FROM tab2 cor0
----
-72
-72
-72

query I rowsort
SELECT DISTINCT - col1 * col1 * ( - cor0.col2 ) AS col2 FROM tab1 AS cor0
----
16224
36504
5700

query I rowsort
SELECT 43 * col1 AS col0 FROM tab2 AS cor0
----
1333
2537
731

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-1986
SELECT ALL cor0.col0 / + CAST( NULL AS SIGNED ) AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-1986
SELECT ALL cor0.col0 / + CAST ( NULL AS INTEGER ) AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + 34 * - tab1.col2 AS col1 FROM tab1
----
-1836
-1938
-3264

query I rowsort
SELECT ALL - - col2 * col1 + - col0 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT ALL tab2.col1 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT - col0 * 1 AS col0 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT - + col0 * ( + cor0.col0 ) AS col1 FROM tab0 AS cor0
----
-1225
-576
-7921

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col1 * 26 col0 FROM tab2 AS cor0
----
1534
442
806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + 29 col1 FROM tab1 AS cor0
----
-35
-51
26

onlyif mysql # use DIV operator for integer division
query I rowsort label-1994
SELECT + - col1 * + 61 + 36 DIV - col1 FROM tab2 AS cor0
----
-1039
-1892
-3599

skipif mysql # not compatible
query I rowsort label-1994
SELECT + - col1 * + 61 + 36 / - col1 FROM tab2 AS cor0
----
-1039
-1892
-3599

onlyif mysql # use DIV operator for integer division
query I rowsort label-1995
SELECT + col0 * + col1 - - col0 DIV ( - col0 + - col2 * 92 ) FROM tab0 cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-1995
SELECT + col0 * + col1 - - col0 / ( - col0 + - col2 * 92 ) FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT ALL + col2 + + 7 FROM tab0 cor0
----
40
8
89

query I rowsort
SELECT DISTINCT - cor0.col2 - - col0 * - col2 FROM tab0 AS cor0
----
-36
-7380
-825

query I rowsort
SELECT + col2 + - cor0.col0 * col1 FROM tab0 cor0
----
-2031
-3394
-8017

query I rowsort
SELECT col0 + + 84 FROM tab2 AS cor0
----
162
163
91

query I rowsort
SELECT - ( col1 ) * cor0.col1 FROM tab0 cor0
----
-7396
-8281
-9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-2001
SELECT - - cor0.col0 DIV - col1 + + cor0.col0 FROM tab2 AS cor0
----
7
75
77

skipif mysql # not compatible
query I rowsort label-2001
SELECT - - cor0.col0 / - col1 + + cor0.col0 FROM tab2 AS cor0
----
7
75
77

query I rowsort
SELECT col0 * col2 - - col0 AS col1 FROM tab2 AS cor0
----
196
2106
3081

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( col1 AS REAL ) - cor0.col2 FROM tab0 cor0
----
53
9
96

query I rowsort
SELECT DISTINCT - + col0 * + 33 + - col1 AS col0 FROM tab2 cor0
----
-262
-2624
-2633

query I rowsort
SELECT ALL + col2 * + 98 FROM tab2 AS cor0
----
2548
2646
3724

query I rowsort
SELECT - cor0.col1 * - ( cor0.col0 ) + 55 AS col0 FROM tab2 AS cor0
----
1398
272
4657

onlyif mysql # use DIV operator for integer division
query I rowsort label-2007
SELECT - col1 DIV + col1 + - col0 * - col1 FROM tab0 AS cor0
----
2063
3394
8098

skipif mysql # not compatible
query I rowsort label-2007
SELECT - col1 / + col1 + - col0 * - col1 FROM tab0 AS cor0
----
2063
3394
8098

onlyif mysql # use DIV operator for integer division
query I rowsort label-2008
SELECT col1 + col0 DIV col0 FROM tab1 AS cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-2008
SELECT col1 + col0 / col0 FROM tab1 AS cor0
----
11
14
27

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( + ( col2 ) ) col0 FROM tab2 cor0
----
26
27
38

query I rowsort
SELECT DISTINCT + + col1 * col2 AS col1 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT ALL - - 31 FROM tab0 AS cor0
----
31
31
31

query I rowsort
SELECT + + 60 + + 96 AS col2 FROM tab2 AS cor0
----
156
156
156

query I rowsort
SELECT ALL 20 AS col0 FROM tab1 AS cor0
----
20
20
20

query I rowsort
SELECT DISTINCT - 35 AS col2 FROM tab2 cor0
----
-35

onlyif mysql # use DIV operator for integer division
query I rowsort label-2015
SELECT - 41 DIV - col1 + col0 * + cor0.col1 FROM tab0 cor0
----
2064
3395
8099

skipif mysql # not compatible
query I rowsort label-2015
SELECT - 41 / - col1 + col0 * + cor0.col1 FROM tab0 cor0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-2016
SELECT col1 + - col0 DIV + col1 AS col2 FROM tab2 AS cor0
----
13
31
58

skipif mysql # not compatible
query I rowsort label-2016
SELECT col1 + - col0 / + col1 AS col2 FROM tab2 AS cor0
----
13
31
58

query I rowsort
SELECT ALL - cor0.col2 + + 95 FROM tab1 cor0
----
-1
38
41

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2018
SELECT + + CAST( NULL AS SIGNED ) + 37 * - col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2018
SELECT + + CAST ( NULL AS INTEGER ) + 37 * - col0 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( - col2 ) * col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL + ( col0 ) + col0 * 37 FROM tab2 AS cor0
----
266
2964
3002

query I rowsort
SELECT DISTINCT - 75 + 0 + cor0.col2 AS col1 FROM tab2, tab2 AS cor0
----
-37
-48
-49

query I rowsort
SELECT DISTINCT 17 AS col2 FROM tab0, tab1, tab0 AS cor0, tab1 AS cor1
----
17

query I rowsort
SELECT ALL ( - 13 ) + - cor0.col0 FROM tab1, tab1 cor0
----
9 values hashing to fd35d1f86fa2d220513a122808d7a421

query I rowsort
SELECT DISTINCT + col2 * 8 AS col1 FROM tab0
----
264
656
8

query I rowsort
SELECT ALL - 16 * col1 FROM tab0 AS cor0
----
-1376
-1456
-1552

onlyif mysql # use DIV operator for integer division
query I rowsort label-2026
SELECT DISTINCT + col1 DIV + col0 AS col1 FROM tab1 AS cor0
----
0
8

skipif mysql # not compatible
query I rowsort label-2026
SELECT DISTINCT + col1 / + col0 AS col1 FROM tab1 AS cor0
----
0
8

query I rowsort
SELECT 80 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 6dd5038be71dffa82f5ceba787caab91

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2028
SELECT DISTINCT + + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2028
SELECT DISTINCT + + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2029
SELECT ALL col2 * + CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2029
SELECT ALL col2 * + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ( + tab2.col1 ) FROM tab2, tab2 AS cor0, tab0, tab2 AS cor1
----
81 values hashing to a5b6acb471910ea4ad7f31cae3b818f7

query I rowsort
SELECT ALL - col0 + + col0 * - col1 FROM tab0
----
-2088
-3430
-8188

query I rowsort
SELECT ALL + 76 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 30b8941a700cffd5b983116383bd42d5

query I rowsort
SELECT ALL + ( + 13 ) AS col1 FROM tab0
----
13
13
13

query I rowsort
SELECT ALL 65 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 8bef2ea1f05f3514633f851312bdd805

query I rowsort
SELECT - 1 + col0 * - col2 FROM tab2
----
-190
-2029
-3003

onlyif mysql # use DIV operator for integer division
query I rowsort label-2036
SELECT ( + ( + col0 ) ) + - col2 * + cor0.col1 DIV - cor0.col1 FROM tab1 AS cor0
----
121
176
57

skipif mysql # not compatible
query I rowsort label-2036
SELECT ( + ( + col0 ) ) + - col2 * + cor0.col1 / - cor0.col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT col2 + cor0.col0 AS col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT + 18 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
18

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - col0 + col1 col1 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT - col0 * - 60 + col1 FROM tab1 AS cor0
----
206
3850
4813

query I rowsort
SELECT col1 * - ( - 80 ) + - col2 - - col0 FROM tab0
----
6871
7287
7794

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2042
SELECT - - col2 + - CAST( NULL AS SIGNED ) * - cor0.col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2042
SELECT - - col2 + - CAST ( NULL AS INTEGER ) * - cor0.col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 85 + + 65 FROM tab2, tab0 AS cor0
----
9 values hashing to 3be1163443bad1a5685b4d7d207b1d61

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2044
SELECT DISTINCT - col2 - CAST( + 73 * col2 + + CAST( NULL AS SIGNED ) AS SIGNED ) FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-2044
SELECT DISTINCT - col2 - CAST ( + 73 * col2 + + CAST ( NULL AS INTEGER ) AS INTEGER ) FROM tab0
----
NULL

query I rowsort
SELECT DISTINCT tab2.col0 * + 41 * + col2 - + col0 FROM tab2
----
123003
7742
83070

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * + 98 + - col2 col1 FROM tab2 cor0
----
659
7618
7704

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2047
SELECT DISTINCT + + col0 + - CAST( col2 AS SIGNED ) * - col1 col2 FROM tab2 AS cor0
----
1612
725
844

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2047
SELECT DISTINCT + + col0 + - CAST ( col2 AS INTEGER ) * - col1 col2 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT 90 FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1, tab1 AS cor2, tab2 AS cor3
----
243 values hashing to fab53aad9716f1e35030c90a50184bfc

query I rowsort
SELECT ALL 6 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 5d1cb90ed58fa7573895d2f95b211821

query I rowsort
SELECT ALL + col2 * ( + col2 ) + col2 AS col2 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT ALL + + cor0.col0 + + cor0.col1 - + 59 AS col1 FROM tab2 cor0
----
-21
37
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + - cor0.col2 col2 FROM tab1 cor0
----
-109
-67
-80

query I rowsort
SELECT ALL + col1 * - col1 + col2 FROM tab0 AS cor0
----
-7363
-8199
-9408

onlyif mysql # use DIV operator for integer division
query I rowsort label-2054
SELECT DISTINCT + col1 - ( ( cor0.col1 ) ) DIV + col0 AS col0 FROM tab0 AS cor0
----
83
90
95

skipif mysql # not compatible
query I rowsort label-2054
SELECT DISTINCT + col1 - ( ( cor0.col1 ) ) / + col0 AS col0 FROM tab0 AS cor0
----
83
90
95

query I rowsort
SELECT DISTINCT col0 - + col0 * cor0.col2 AS col1 FROM tab2 cor0
----
-182
-1950
-2923

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + cor0.col0 col2 FROM tab1 AS cor0
----
-3
-64
-80

query I rowsort
SELECT + - col2 * + col0 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT ALL 58 + - 5 FROM tab1 AS cor0
----
53
53
53

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2059
SELECT DISTINCT + - CAST( col1 AS SIGNED ) + + col0 AS col2 FROM tab1 AS cor0
----
-23
54
67

skipif mysql # not compatible
query I rowsort label-2059
SELECT DISTINCT + - CAST ( col1 AS INTEGER ) + + col0 AS col2 FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT + 92 * - col0 + + col0 FROM tab2 AS cor0
----
-637
-7098
-7189

query I rowsort
SELECT ALL + col2 + + col0 * col2 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT ALL - + col2 * 41 + - col0 AS col2 FROM tab0 AS cor0
----
-1377
-3451
-76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 8 + - col0 col1 FROM tab1 AS cor0
----
-56
-72
5

query I rowsort
SELECT ALL + + col1 * 3 + + cor0.col2 AS col2 FROM tab0 AS cor0
----
291
292
355

onlyif mysql # use DIV operator for integer division
query I rowsort label-2065
SELECT col1 + col1 DIV col0 FROM tab2 AS cor0
----
17
35
59

skipif mysql # not compatible
query I rowsort label-2065
SELECT col1 + col1 / col0 FROM tab2 AS cor0
----
17
35
59

query I rowsort
SELECT - + 88 * + col1 FROM tab0 AS cor0
----
-7568
-8008
-8536

query I rowsort
SELECT DISTINCT + col1 * - col1 + col2 AS col1 FROM tab0 cor0
----
-7363
-8199
-9408

query I rowsort
SELECT ALL 64 * col1 AS col0 FROM tab0 AS cor0
----
5504
5824
6208

query I rowsort
SELECT ALL 38 * + col1 * + col1 FROM tab0
----
281048
314678
357542

query I rowsort
SELECT + + 10 + col2 FROM tab2 AS cor0
----
36
37
48

query I rowsort
SELECT ALL - + 76 * col0 AS col0 FROM tab1 AS cor0
----
-228
-4864
-6080

query I rowsort
SELECT ALL + col2 - + col0 FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT 42 AS col1 FROM tab1, tab0 AS cor0, tab0 cor1, tab0 AS cor2
----
81 values hashing to 4d49d5ffe533e92cf06d98cb59a19b10

query I rowsort
SELECT DISTINCT + - 39 * - col0 FROM tab2 AS cor0
----
273
3042
3081

query I rowsort
SELECT + col2 + - ( 35 ) * + col1 FROM tab1 AS cor0
----
-293
-359
-856

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2076
SELECT DISTINCT + col0 + + CAST( NULL AS SIGNED ) / col2 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2076
SELECT DISTINCT + col0 + + CAST ( NULL AS INTEGER ) / col2 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ALL col2 + CAST ( - 59 AS REAL ) col0 FROM tab0 cor0
----
-26
-58
23

query I rowsort
SELECT DISTINCT cor0.col1 + cor0.col2 + - col2 AS col2 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT + 30 AS col0 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
30

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2080
SELECT ALL + col1 + CAST( col1 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
172
182
194

skipif mysql # not compatible
query I rowsort label-2080
SELECT ALL + col1 + CAST ( col1 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
172
182
194

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2081
SELECT - col2 * CAST( 85 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
-4590
-4845
-8160

skipif mysql # not compatible
query I rowsort label-2081
SELECT - col2 * CAST ( 85 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
-4590
-4845
-8160

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 * cor0.col2 * - col2 col0 FROM tab0 AS cor0
----
1
35937
551368

onlyif mysql # use DIV operator for integer division
query I rowsort label-2083
SELECT DISTINCT - cor0.col2 DIV + col2 AS col1 FROM tab0 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-2083
SELECT DISTINCT - cor0.col2 / + col2 AS col1 FROM tab0 AS cor0
----
-1

query I rowsort
SELECT DISTINCT col2 * 4 AS col1 FROM tab2 AS cor0
----
104
108
152

query I rowsort
SELECT cor0.col2 + col0 * col1 * + cor0.col1 AS col0 FROM tab1 AS cor0
----
13616
2082
6457

query I rowsort
SELECT + col1 * tab1.col2 - col1 AS col1 FROM tab1
----
1235
1378
560

query I rowsort
SELECT col1 * - col2 * col1 AS col1 FROM tab2
----
-10982
-25947
-90506

query I rowsort
SELECT - cor0.col1 * 65 AS col0 FROM tab2 AS cor0
----
-1105
-2015
-3835

query I rowsort
SELECT col0 * - col0 + col1 AS col1 FROM tab2 AS cor0
----
-18
-6025
-6224

query I rowsort
SELECT DISTINCT + - 76 + col1 * - col1 AS col2 FROM tab0 AS cor0
----
-7472
-8357
-9485

query I rowsort
SELECT DISTINCT - + col2 + col2 * - col1 AS col1 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT DISTINCT 42 * 72 + - col2 * 47 AS col2 FROM tab2 AS cor0
----
1238
1755
1802

query I rowsort
SELECT ALL + + col1 * col1 - col2 FROM tab2 cor0
----
251
3455
934

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2094
SELECT + CAST( - 34 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-34
-34
-34

skipif mysql # not compatible
query I rowsort label-2094
SELECT + CAST ( - 34 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-34
-34
-34

query I rowsort
SELECT ALL + 6 AS col0 FROM tab0
----
6
6
6

query I rowsort
SELECT + - 14 + - cor0.col1 AS col1 FROM tab1 AS cor0
----
-24
-27
-40

query I rowsort
SELECT + 30 + ( + col2 ) AS col0 FROM tab2 AS cor0
----
56
57
68

query I rowsort
SELECT 18 + - col0 * - cor0.col2 + + 30 * + col2 FROM tab2 AS cor0
----
1017
2826
4160

query I rowsort
SELECT 85 + + 20 FROM tab1 AS cor0
----
105
105
105

query I rowsort
SELECT ALL - col1 + - cor0.col0 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT ALL + - 14 AS col0 FROM tab2 cor0
----
-14
-14
-14

query I rowsort
SELECT + cor0.col2 AS col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT + 84 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

query I rowsort
SELECT DISTINCT - - ( - ( col1 ) ) * col0 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT - 62 * col2 AS col2 FROM tab1 AS cor0
----
-3348
-3534
-5952

query I rowsort
SELECT + + 96 AS col1 FROM tab0 AS cor0
----
96
96
96

query I rowsort
SELECT - - 83 + - col0 * - 99 FROM tab0 cor0
----
2459
3548
8894

query I rowsort
SELECT 20 * + col2 FROM tab2 AS cor0
----
520
540
760

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2109
SELECT - CAST( NULL AS SIGNED ) + + col1 * - col0 * - ( 75 ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2109
SELECT - CAST ( NULL AS INTEGER ) + + col1 * - col0 * - ( 75 ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col2 AS col1 FROM tab2, tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT ALL 27 * - col0 FROM tab2
----
-189
-2106
-2133

query I rowsort
SELECT + + col1 + ( + col2 ) FROM tab0 AS cor0
----
119
173
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 * - col1 + + cor0.col0 col0 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT - col1 + + 96 * - col1 FROM tab0 AS cor0
----
-8342
-8827
-9409

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2115
SELECT ALL + cor0.col1 + CAST( + cor0.col2 AS SIGNED ) AS col1 FROM tab0 cor0
----
119
173
98

skipif mysql # not compatible
query I rowsort label-2115
SELECT ALL + cor0.col1 + CAST ( + cor0.col2 AS INTEGER ) AS col1 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT col2 - ( - 36 ) FROM tab2 AS cor0
----
62
63
74

query I rowsort
SELECT DISTINCT - - col0 * col2 * col1 AS col1 FROM tab1 cor0
----
36480
4212
99840

query I rowsort
SELECT col0 + - col1 + - tab1.col0 FROM tab1
----
-10
-13
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-2119
SELECT - col0 DIV - col2 + col2 col0 FROM tab0
----
33
36
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2119
SELECT - col0 / - col2 + col2 col0 FROM tab0
----
33
36
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 21 + col0 - + col1 col0 FROM tab1
----
-2
75
88

query I rowsort
SELECT ALL - col1 + + col1 - - tab1.col2 FROM tab1
----
54
57
96

query I rowsort
SELECT + cor0.col2 - 38 AS col2 FROM tab2 AS cor0
----
-11
-12
0

query IIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab1, tab0 cor1, tab2 AS cor2
----
972 values hashing to 9600bdf5bac0caec3229e87170cc40b3

query I rowsort
SELECT DISTINCT - + col2 * + cor0.col2 * - 71 AS col2 FROM tab2 AS cor0
----
102524
47996
51759

onlyif mysql # use DIV operator for integer division
query I rowsort label-2125
SELECT DISTINCT col0 DIV ( cor0.col0 ) FROM tab0 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-2125
SELECT DISTINCT col0 / ( cor0.col0 ) FROM tab0 AS cor0
----
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + + col0 col0 FROM tab0 AS cor0
----
-9
34
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-2127
SELECT - col0 + - col0 * col2 + col0 DIV col0 FROM tab1 AS cor0
----
-164
-3711
-7759

skipif mysql # not compatible
query I rowsort label-2127
SELECT - col0 + - col0 * col2 + col0 / col0 FROM tab1 AS cor0
----
-164
-3711
-7759

query I rowsort
SELECT ALL col0 * - col2 + + col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT - col2 * + ( col1 ) + - col0 + + 43 AS col0 FROM tab2 AS cor0
----
-1569
-682
-801

query I rowsort
SELECT DISTINCT + col1 + + ( - 86 ) * + col2 AS col2 FROM tab2
----
-2177
-2291
-3251

onlyif mysql # use DIV operator for integer division
query I rowsort label-2131
SELECT - - ( 31 ) * col1 + + col2 + + col0 DIV col2 AS col2 FROM tab1 AS cor0
----
368
499
860

skipif mysql # not compatible
query I rowsort label-2131
SELECT - - ( 31 ) * col1 + + col2 + + col0 / col2 AS col2 FROM tab1 AS cor0
----
368
499
860

query I rowsort
SELECT col2 * + 47 FROM tab2
----
1222
1269
1786

query I rowsort
SELECT + + 6 * - 54 + - col0 FROM tab1 AS cor0
----
-327
-388
-404

query I rowsort
SELECT 57 + cor0.col1 FROM tab1 AS cor0
----
67
70
83

query I rowsort
SELECT + ( cor0.col1 ) * + col2 + 48 AS col0 FROM tab0 AS cor0
----
145
2886
7510

query I rowsort
SELECT + 27 + col1 - - col1 AS col1 FROM tab0 AS cor0
----
199
209
221

query I rowsort
SELECT DISTINCT col1 * ( + col0 ) + col0 + + col2 * tab2.col2 * col2 FROM tab2
----
19907
22256
56294

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2138
SELECT - CAST( 9 AS SIGNED ) AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to caf28657beb43049740febe1fa9ded5a

skipif mysql # not compatible
query I rowsort label-2138
SELECT - CAST ( 9 AS INTEGER ) AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to caf28657beb43049740febe1fa9ded5a

query I rowsort
SELECT tab1.col2 * ( + col1 ) AS col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT - - cor0.col1 - + col1 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2141
SELECT - CAST( NULL AS DECIMAL ) / col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2141
SELECT - CAST ( NULL AS REAL ) / col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 76 + 93 AS col0 FROM tab1 AS cor0
----
169
169
169

query I rowsort
SELECT DISTINCT - 93 * - col2 FROM tab0 AS cor0
----
3069
7626
93

query I rowsort
SELECT ( - col2 ) * + col2 AS col0 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT ALL - 94 * col0 + 22 + - col1 AS col0 FROM tab1 AS cor0
----
-286
-6004
-7511

query I rowsort
SELECT - col2 * col2 AS col1 FROM tab1 cor0
----
-2916
-3249
-9216

query I rowsort
SELECT ALL + 95 + col2 FROM tab1 AS cor0
----
149
152
191

query I rowsort
SELECT + - 45 AS col1 FROM tab2 AS cor0
----
-45
-45
-45

query I rowsort
SELECT DISTINCT col0 - col2 FROM tab0 cor0
----
-9
34
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-2150
SELECT col1 DIV + col0 + - col0 FROM tab0
----
-21
-33
-88

skipif mysql # not compatible
query I rowsort label-2150
SELECT col1 / + col0 + - col0 FROM tab0
----
-21
-33
-88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2151
SELECT col1 * - CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2151
SELECT col1 * - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 + - 49 * - col2 AS col0 FROM tab0 AS cor0
----
1641
4107
84

query I rowsort
SELECT - + 84 + col2 FROM tab2 AS cor0
----
-46
-57
-58

query I rowsort
SELECT - col2 * + col1 + col2 * - ( - col1 ) AS col1 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - col0 * - col2 + 45 AS col0 FROM tab1 cor0
----
207
3693
7725

query I rowsort
SELECT - col0 + col1 * + col0 + col2 FROM tab2 AS cor0
----
1302
237
4550

query I rowsort
SELECT - col0 - + col1 AS col1 FROM tab2 AS cor0
----
-137
-38
-96

query I rowsort
SELECT ALL col0 + + col1 AS col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT - 75 AS col2 FROM tab2 AS cor0
----
-75

query I rowsort
SELECT 31 AS col0 FROM tab0
----
31
31
31

query I rowsort
SELECT + + cor0.col0 - + col2 FROM tab1 cor0
----
-16
-51
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( col0 ) * col2 * + 52 col0 FROM tab1 AS cor0
----
-189696
-399360
-8424

query I rowsort
SELECT DISTINCT - + 94 FROM tab1 AS cor0
----
-94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( col2 ) + - col0 * + col0 * + col2 col2 FROM tab1 cor0
----
-233415
-432
-614304

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 + - col0 col0 FROM tab2 cor0
----
-19
-62
24

query I rowsort
SELECT DISTINCT + cor0.col2 + ( 87 ) * + col1 + - ( col0 ) * + col2 FROM tab2 AS cor0
----
-1485
2535
3131

query I rowsort
SELECT ALL - col2 + + 79 FROM tab1 AS cor0
----
-17
22
25

query I rowsort
SELECT ALL col0 - col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT - + col2 + 86 * cor0.col1 AS col2 FROM tab0 AS cor0
----
7363
7744
8341

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 * + col0 col0 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT 25 + + col0 * + ( - col0 ) AS col0 FROM tab0
----
-1200
-551
-7896

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2172
SELECT ( + tab0.col1 * - CAST( NULL AS SIGNED ) ) - + col0 / + tab0.col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2172
SELECT ( + tab0.col1 * - CAST ( NULL AS INTEGER ) ) - + col0 / + tab0.col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - ( col1 ) + - col1 AS col1 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT - col2 + + col1 * + cor0.col0 AS col2 FROM tab1 AS cor0
----
24
583
944

query I rowsort
SELECT DISTINCT + ( - col0 ) AS col1 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2176
SELECT ALL cor0.col1 * CAST( NULL AS SIGNED ) AS col1 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-2176
SELECT ALL cor0.col1 * CAST ( NULL AS INTEGER ) AS col1 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 72 col1 FROM tab2 AS cor0
----
-72
-72
-72

query I rowsort
SELECT - 61 * cor0.col2 FROM tab2, tab1 cor0, tab1, tab1 AS cor1
----
81 values hashing to 3dc2f1f5b154e33fed32071773f0969b

query I rowsort
SELECT 84 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2180
SELECT DISTINCT - CAST( - col2 + + col2 AS SIGNED ) * CAST( NULL AS SIGNED ) * col1 AS col0 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-2180
SELECT DISTINCT - CAST ( - col2 + + col2 AS INTEGER ) * CAST ( NULL AS INTEGER ) * col1 AS col0 FROM tab1
----
NULL

query I rowsort
SELECT ALL 69 * + 53 AS col0 FROM tab2
----
3657
3657
3657

query I rowsort
SELECT DISTINCT - 9 AS col0 FROM tab0
----
-9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 col1 FROM tab2, tab1 AS cor0
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2184
SELECT + - col1 + - ( cor0.col2 ) DIV - col1 AS col0 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-2184
SELECT + - col1 + - ( cor0.col2 ) / - col1 AS col0 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ALL + tab1.col0 * - 40 FROM tab1
----
-120
-2560
-3200

query I rowsort
SELECT 16 + tab0.col2 AS col0 FROM tab0
----
17
49
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2187
SELECT - CAST( NULL AS SIGNED ) + + col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2187
SELECT - CAST ( NULL AS INTEGER ) + + col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT 56 - col2 FROM tab0
----
-26
23
55

query I rowsort
SELECT + - col2 * col2 + - 53 FROM tab0 cor0
----
-1142
-54
-6777

onlyif mysql # use DIV operator for integer division
query I rowsort label-2190
SELECT DISTINCT - + col2 DIV - col1 AS col1 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-2190
SELECT DISTINCT - + col2 / - col1 AS col1 FROM tab1 AS cor0
----
2
5
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-2191
SELECT ALL - col2 DIV col1 + + ( col0 ) AS col0 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-2191
SELECT ALL - col2 / col1 + + ( col0 ) AS col0 FROM tab0 AS cor0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * col0 col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT + ( - col0 ) - col2 FROM tab0
----
-171
-36
-57

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0 CROSS JOIN tab1, tab2, tab0 cor1
----
3645 values hashing to ca4c79a162f92454e0544707b897521a

query I rowsort
SELECT - ( 13 ) FROM tab0
----
-13
-13
-13

query I rowsort
SELECT DISTINCT + cor1.col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
26
27
38

query I rowsort
SELECT - 40 + - col2 AS col2 FROM tab2
----
-66
-67
-78

query I rowsort
SELECT ALL cor1.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT 27 FROM tab1, tab0 AS cor0 CROSS JOIN tab2
----
27 values hashing to 1a3cef5c33b8f87ffeded378fd207753

query I rowsort
SELECT DISTINCT - cor0.col2 * cor0.col0 + - cor0.col2 FROM tab0 AS cor0
----
-36
-7380
-825

query I rowsort
SELECT ALL tab1.col0 - col1 FROM tab1
----
-23
54
67

query I rowsort
SELECT DISTINCT cor0.col2 * col0 + - ( col1 ) * + col1 * - col0 FROM tab1 AS cor0
----
10048
21200
2190

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * cor0.col1 + + cor0.col1 * col2 col0 FROM tab0 AS cor0
----
-4558
-819
-9312

onlyif mysql # use DIV operator for integer division
query I rowsort label-2204
SELECT ALL + - col2 DIV + col1 FROM tab2 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-2204
SELECT ALL + - col2 / + col1 FROM tab2 AS cor0
----
-2
0
0

query I rowsort
SELECT DISTINCT + - col2 * col2 AS col0 FROM tab2 AS cor0
----
-1444
-676
-729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2206
SELECT ALL CAST( NULL AS SIGNED ) * - ( cor0.col0 ) col2 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-2206
SELECT ALL CAST ( NULL AS INTEGER ) * - ( cor0.col0 ) col2 FROM tab0, tab0 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT - cor0.col0 * + col1 AS col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL - 20 * col2 FROM tab1 AS cor0
----
-1080
-1140
-1920

query I rowsort
SELECT ALL - - cor0.col2 FROM tab2, tab0, tab2 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2210
SELECT - col0 + CAST( NULL AS SIGNED ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2210
SELECT - col0 + CAST ( NULL AS INTEGER ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT - - cor0.col2 * + 73 + - col1 * col0 FROM tab0 AS cor0
----
-2113
-3322
345

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col0 + 74 col2 FROM tab2 AS cor0
----
-115
-1954
-2928

query I rowsort
SELECT - - col2 * - cor0.col0 + + col2 AS col0 FROM tab2 AS cor0
----
-162
-2002
-2964

onlyif mysql # use DIV operator for integer division
query I rowsort label-2214
SELECT ALL - + col1 DIV col1 + col1 FROM tab1 AS cor0
----
12
25
9

skipif mysql # not compatible
query I rowsort label-2214
SELECT ALL - + col1 / col1 + col1 FROM tab1 AS cor0
----
12
25
9

query I rowsort
SELECT ALL 27 * + col2 AS col1 FROM tab1 AS cor0
----
1458
1539
2592

onlyif mysql # use DIV operator for integer division
query I rowsort label-2216
SELECT ALL - - col0 DIV - col0 + + cor0.col1 * col0 + col2 col1 FROM tab0 cor0
----
2096
3395
8180

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2216
SELECT ALL - - col0 / - col0 + + cor0.col1 * col0 + col2 col1 FROM tab0 cor0
----
2096
3395
8180

query I rowsort
SELECT + - 37 FROM tab0 cor0
----
-37
-37
-37

query I rowsort
SELECT DISTINCT - col2 + col2 * col0 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT - col2 + 41 AS col1 FROM tab0 AS cor0
----
-41
40
8

query I rowsort
SELECT ALL col1 + 28 FROM tab0 AS cor0
----
114
119
125

query I rowsort
SELECT - 96 * + cor0.col2 FROM tab1 AS cor0
----
-5184
-5472
-9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-2222
SELECT ALL - ( col2 ) - - cor0.col1 DIV - col1 AS col0 FROM tab0 AS cor0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-2222
SELECT ALL - ( col2 ) - - cor0.col1 / - col1 AS col0 FROM tab0 AS cor0
----
-2
-34
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-2223
SELECT ALL + 74 + cor0.col0 DIV col2 AS col2 FROM tab0 cor0
----
109
74
75

skipif mysql # not compatible
query I rowsort label-2223
SELECT ALL + 74 + cor0.col0 / col2 AS col2 FROM tab0 cor0
----
109
74
75

query I rowsort
SELECT + col0 + 79 * - col2 FROM tab1 AS cor0
----
-4263
-4439
-7504

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + ( col2 ) - col2 col1 FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2226
SELECT ALL - col2 * - col0 * + ( col0 ) + - 18 DIV tab0.col1 AS col2 FROM tab0
----
1225
19008
649522

skipif mysql # not compatible
query I rowsort label-2226
SELECT ALL - col2 * - col0 * + ( col0 ) + - 18 / tab0.col1 AS col2 FROM tab0
----
1225
19008
649522

onlyif mysql # use DIV operator for integer division
query I rowsort label-2227
SELECT - col1 DIV + col0 + col2 AS col0 FROM tab0 AS cor0
----
-1
30
81

skipif mysql # not compatible
query I rowsort label-2227
SELECT - col1 / + col0 + col2 AS col0 FROM tab0 AS cor0
----
-1
30
81

query I rowsort
SELECT DISTINCT 0 + + cor0.col1 * col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL 18 + + 46 * col2 AS col1 FROM tab2 AS cor0
----
1214
1260
1766

query I rowsort
SELECT ( col0 ) * col0 + - cor0.col0 AS col0 FROM tab0 AS cor0
----
1190
552
7832

query I rowsort
SELECT ALL + col1 + 62 FROM tab1 AS cor0
----
72
75
88

query I rowsort
SELECT ALL - col2 * - 48 + + 38 * - col0 FROM tab2
----
-1178
-1716
1030

query I rowsort
SELECT DISTINCT 98 AS col0 FROM tab0, tab0 AS cor0
----
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2234
SELECT DISTINCT cor0.col1 * - CAST( - 36 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
360
468
936

skipif mysql # not compatible
query I rowsort label-2234
SELECT DISTINCT cor0.col1 * - CAST ( - 36 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
360
468
936

query I rowsort
SELECT - + col0 - ( - ( col2 ) ) * - col0 AS col1 FROM tab2 AS cor0
----
-196
-2106
-3081

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2236
SELECT DISTINCT col2 * + CAST( col0 AS SIGNED ) + cor0.col2 AS col1 FROM tab1 AS cor0
----
216
3705
7776

skipif mysql # not compatible
query I rowsort label-2236
SELECT DISTINCT col2 * + CAST ( col0 AS INTEGER ) + cor0.col2 AS col1 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT ALL 55 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 1626bd3008abd9f18cc88cdecf7b64d0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( - 79 ) col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 1b7b0b34fe3431fb409719624d12791f

query I rowsort
SELECT ( + 43 + + col2 ) * col0 AS col0 FROM tab1
----
11120
291
6400

onlyif mysql # use DIV operator for integer division
query I rowsort label-2240
SELECT + + 37 DIV + cor0.col0 FROM tab2 AS cor0
----
0
0
5

skipif mysql # not compatible
query I rowsort label-2240
SELECT + + 37 / + cor0.col0 FROM tab2 AS cor0
----
0
0
5

query I rowsort
SELECT ( cor0.col2 ) + cor0.col2 AS col1 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL - 86 * + col0 FROM tab0 AS cor0
----
-2064
-3010
-7654

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 7 col2 FROM tab1, tab0 AS cor0
----
9 values hashing to ba940cd66e21e94e95aada5f28e1faf5

query I rowsort
SELECT - ( - col1 ) * - col1 AS col0 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT + ( col1 ) * col1 + + ( - col1 + - col1 ) * col2 AS col1 FROM tab1 AS cor0
----
-1040
-2132
-2327

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + - ( - col2 ) col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT - 66 + 87 FROM tab1 AS cor0
----
21
21
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col2 * - tab0.col1 col1 FROM tab0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 81 col0 FROM tab0
----
-81
-81
-81

query I rowsort
SELECT col0 * - col2 + 13 FROM tab0
----
-22
-7285
-779

query I rowsort
SELECT DISTINCT col1 * col1 - - col2 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT ALL - col2 * + col1 + 0 * 70 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT + ( col2 ) + + col0 AS col1 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT + col2 * cor0.col1 + col1 AS col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT - col1 * - col0 + 26 + + col1 AS col2 FROM tab0 AS cor0
----
2176
3518
8216

query I rowsort
SELECT - col1 + ( col0 * - col2 ) FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT - col0 - col2 * col2 FROM tab1 AS cor0
----
-2919
-3313
-9296

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col2 col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT + col2 * + col0 + - 59 FROM tab2 AS cor0
----
130
1969
2943

onlyif mysql # use DIV operator for integer division
query I rowsort label-2260
SELECT DISTINCT + + cor0.col0 DIV + cor0.col1 + col1 FROM tab1 AS cor0
----
16
19
26

skipif mysql # not compatible
query I rowsort label-2260
SELECT DISTINCT + + cor0.col0 / + cor0.col1 + col1 FROM tab1 AS cor0
----
16
19
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 - - col1 * col2 col0 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT ALL 4 AS col0 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 730dff78e83112374961ea711f98ebaa

query I rowsort
SELECT ALL 80 FROM tab1, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 6dd5038be71dffa82f5ceba787caab91

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 * 78 col1 FROM tab0 cor0
----
2574
6396
78

query I rowsort
SELECT DISTINCT 95 AS col1 FROM tab2, tab0 AS cor0
----
95

query I rowsort
SELECT + - col2 + col2 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2267
SELECT DISTINCT - - CAST( - col2 AS SIGNED ) * col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

skipif mysql # not compatible
query I rowsort label-2267
SELECT DISTINCT - - CAST ( - col2 AS INTEGER ) * col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT - + 18 * - ( col0 ) FROM tab1 AS cor0
----
1152
1440
54

query I rowsort
SELECT DISTINCT + col1 * + 13 + + col1 * 57 AS col0 FROM tab2 AS cor0
----
1190
2170
4130

query I rowsort
SELECT - 47 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 6942a0d9558277afd0d00408d65cf5aa

query I rowsort
SELECT - - col1 * col1 + col2 * - 61 FROM tab0 AS cor0
----
3279
5383
9348

query I rowsort
SELECT ALL + col2 * 74 FROM tab0 AS cor0
----
2442
6068
74

query I rowsort
SELECT - - 31 AS col2 FROM tab0 AS cor0
----
31
31
31

query I rowsort
SELECT - col2 + col2 * + col1 AS col2 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT 56 + col2 * + col0 FROM tab1 AS cor0
----
218
3704
7736

onlyif mysql # use DIV operator for integer division
query I rowsort label-2276
SELECT - - col0 + col2 DIV col1 FROM tab2 cor0
----
7
78
81

skipif mysql # not compatible
query I rowsort label-2276
SELECT - - col0 + col2 / col1 FROM tab2 cor0
----
7
78
81

query I rowsort
SELECT ALL col1 * - 18 AS col0 FROM tab2
----
-1062
-306
-558

query I rowsort
SELECT 3 * tab2.col1 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 1df77a959b97e808dec5206239125e74

query I rowsort
SELECT DISTINCT - 72 FROM tab2, tab1 AS cor0
----
-72

query I rowsort
SELECT ALL - 71 AS col1 FROM tab1
----
-71
-71
-71

query I rowsort
SELECT - ( col0 ) AS col1 FROM tab1
----
-3
-64
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-2282
SELECT ALL - tab2.col0 DIV col0 AS col2 FROM tab2
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2282
SELECT ALL - tab2.col0 / col0 AS col2 FROM tab2
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-2283
SELECT + col0 - col1 DIV col0 AS col0 FROM tab0
----
21
33
88

skipif mysql # not compatible
query I rowsort label-2283
SELECT + col0 - col1 / col0 AS col0 FROM tab0
----
21
33
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-2284
SELECT - col2 + col2 DIV col0 FROM tab1 AS cor0
----
-36
-57
-95

skipif mysql # not compatible
query I rowsort label-2284
SELECT - col2 + col2 / col0 FROM tab1 AS cor0
----
-36
-57
-95

query I rowsort
SELECT ALL + - col1 + - col2 * cor0.col0 AS col2 FROM tab0 AS cor0
----
-132
-7389
-878

query I rowsort
SELECT col0 * + col2 * - col2 AS col2 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT ALL - col0 + - col2 * - col2 AS col0 FROM tab2
----
1365
598
722

query I rowsort
SELECT DISTINCT - col2 * col0 + col1 AS col0 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT ALL + + col2 * col0 * cor0.col1 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT DISTINCT + - col2 + + col1 * + col2 AS col0 FROM tab2 AS cor0
----
1508
608
810

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * + col1 col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - + col1 * + col2 AS col0 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT DISTINCT + + col1 * col0 * + cor0.col0 AS col1 FROM tab1 AS cor0
----
234
40960
83200

query I rowsort
SELECT - + 10 AS col0 FROM tab2 AS cor0
----
-10
-10
-10

query I rowsort
SELECT + 11 + cor0.col0 FROM tab0 AS cor0
----
100
35
46

query I rowsort
SELECT ALL - 52 + col2 * col0 * - col0 AS col2 FROM tab2
----
-1375
-158236
-237210

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 41 * - col0 col2 FROM tab0 AS cor0
----
1435
3649
984

query I rowsort
SELECT DISTINCT + 44 - - col0 AS col1 FROM tab1 AS cor0
----
108
124
47

query I rowsort
SELECT DISTINCT - + col0 + col2 * col0 * + col2 FROM tab0 AS cor0
----
0
26112
598347

onlyif mysql # use DIV operator for integer division
query I rowsort label-2300
SELECT ALL + - col2 DIV - col2 AS col1 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2300
SELECT ALL + - col2 / - col2 AS col1 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT + - cor0.col2 + col0 AS col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT col2 * col1 + col1 * - cor0.col0 FROM tab2 AS cor0
----
-3068
-697
620

query I rowsort
SELECT + + ( + col2 ) * + cor0.col2 + + col1 * - col1 * col1 FROM tab1 AS cor0
----
-14660
2249
7019

query I rowsort
SELECT DISTINCT col0 + - cor0.col2 * col0 AS col2 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT ALL - col0 * + col2 * - cor0.col0 FROM tab1 cor0
----
233472
486
614400

query I rowsort
SELECT ALL + - col1 - col0 * + col2 AS col0 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT ALL + cor0.col2 + - col1 * col2 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT DISTINCT + - col0 - - cor0.col1 AS col0 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT + - col2 * col2 * + col0 AS col2 FROM tab1 cor0
----
-207936
-737280
-8748

query I rowsort
SELECT ALL + col1 + - col1 FROM tab0
----
0
0
0

query I rowsort
SELECT + + cor0.col0 + cor0.col2 AS col2 FROM tab0 AS cor0
----
171
36
57

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT NULL NOT BETWEEN NULL AND + col2 * col0
----

query I rowsort
SELECT ALL + col0 - - col0 FROM tab0
----
178
48
70

query I rowsort
SELECT col2 * + col1 - col0 AS col2 FROM tab1
----
1168
1401
506

query I rowsort
SELECT DISTINCT col1 * + col2 * - col1 AS col1 FROM tab0
----
-244068
-679042
-9409

query I rowsort
SELECT + col1 * + col1 + + col2 * + tab1.col0 AS col2 FROM tab1
----
3748
7849
838

query I rowsort
SELECT col1 + - col2 * - col1 * + col0 AS col2 FROM tab1
----
36490
4238
99853

query I rowsort
SELECT col2 + - col0 + col1 FROM tab2
----
-24
51
7

query I rowsort
SELECT DISTINCT - col1 FROM tab1 WHERE NOT ( NULL ) NOT IN ( col0 * - col1 + tab1.col2 * - col2 )
----

query I rowsort
SELECT DISTINCT - tab2.col1 + col2 AS col2 FROM tab2
----
-33
-4
21

query I rowsort
SELECT - tab2.col0 + col2 * col0 AS col2 FROM tab2
----
182
1950
2923

query I rowsort
SELECT 59 * - col0 FROM tab0 AS cor0
----
-1416
-2065
-5251

query I rowsort
SELECT DISTINCT col2 FROM tab2 WHERE - col0 * - tab2.col0 NOT BETWEEN ( - col0 ) AND col2
----
26
27
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-2324
SELECT ALL + tab2.col0 + - col2 DIV col0 FROM tab2
----
4
78
79

skipif mysql # not compatible
query I rowsort label-2324
SELECT ALL + tab2.col0 + - col2 / col0 FROM tab2
----
4
78
79

query I rowsort
SELECT - col2 + tab0.col2 AS col2 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT tab0.col2 col2 FROM tab0 WHERE NOT NULL IN ( col2 * - col0 + col0 )
----

query I rowsort
SELECT DISTINCT + col2 + col1 * + col0 FROM tab0
----
2097
3396
8181

query I rowsort
SELECT ALL - tab2.col1 + - col2 AS col1 FROM tab2
----
-55
-58
-85

query I rowsort
SELECT col2 FROM tab1 WHERE ( NULL ) NOT IN ( col2 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-2330
SELECT ALL col2 DIV - col0 col0 FROM tab2 AS cor0
----
-3
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2330
SELECT ALL col2 / - col0 col0 FROM tab2 AS cor0
----
-3
0
0

query I rowsort
SELECT DISTINCT col1 * + col2 - col0 AS col0 FROM tab1
----
1168
1401
506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * - col2 * cor0.col2 col2 FROM tab2 AS cor0
----
17576
19683
54872

query I rowsort
SELECT col1 + + col0 + + col1 FROM tab1
----
106
55
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-2334
SELECT col1 + + col0 + + col0 DIV - col2 FROM tab0 AS cor0
----
110
179
97

skipif mysql # not compatible
query I rowsort label-2334
SELECT col1 + + col0 + + col0 / - col2 FROM tab0 AS cor0
----
110
179
97

query I rowsort
SELECT ALL - col1 AS col1 FROM tab1 AS cor0 WHERE NOT NULL NOT BETWEEN NULL AND ( col2 )
----

query I rowsort
SELECT DISTINCT + col0 * col2 * col2 FROM tab1 AS cor0
----
207936
737280
8748

query III rowsort
SELECT ALL * FROM tab0 AS cor0 WHERE NOT NULL = col2 * + col0 * col1
----

query I rowsort
SELECT col0 + + col2 * col1 FROM tab2 AS cor0
----
1612
725
844

onlyif mysql # use DIV operator for integer division
query I rowsort label-2339
SELECT + col1 + col1 + + col1 * col2 DIV col0 FROM tab2
----
137
181
42

skipif mysql # not compatible
query I rowsort label-2339
SELECT + col1 + col1 + + col1 * col2 / col0 FROM tab2
----
137
181
42

query I rowsort
SELECT + cor0.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab2
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

onlyif mysql # use DIV operator for integer division
query I rowsort label-2341
SELECT - col0 + + col1 * + col1 + col2 DIV col2 AS col0 FROM tab0
----
7373
8193
9375

skipif mysql # not compatible
query I rowsort label-2341
SELECT - col0 + + col1 * + col1 + col2 / col2 AS col0 FROM tab0
----
7373
8193
9375

query I rowsort
SELECT DISTINCT tab0.col0 + col2 - - col1 FROM tab0
----
133
143
262

query I rowsort
SELECT + col2 * col0 * col0 + - tab0.col2 - - col1 FROM tab0
----
1321
19061
649531

query I rowsort
SELECT ALL - col2 - + col1 AS col1 FROM tab1
----
-109
-67
-80

query I rowsort
SELECT DISTINCT + col0 - - col1 AS col2 FROM tab1
----
29
74
93

query I rowsort
SELECT - col1 * - tab1.col1 + - col1 FROM tab1
----
156
650
90

query III rowsort
SELECT ALL * FROM tab1 WHERE NULL IN ( col1 * + col2 )
----

query I rowsort
SELECT col2 * col1 FROM tab2 WHERE NOT NULL NOT IN ( + col1 )
----

query I rowsort
SELECT DISTINCT col2 * - tab1.col0 * - col0 AS col2 FROM tab1
----
233472
486
614400

onlyif mysql # use DIV operator for integer division
query I rowsort label-2350
SELECT + col2 DIV tab1.col1 AS col0 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-2350
SELECT + col2 / tab1.col1 AS col0 FROM tab1
----
2
5
7

query I rowsort
SELECT col1 * + col2 + col0 FROM tab0 WHERE NOT NULL NOT IN ( col0 - col1 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * tab0.col2 col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT ALL col0 * - tab2.col2 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT - col2 * col0 * - col2 FROM tab2 AS cor0
----
114076
5103
52728

query I rowsort
SELECT ALL - tab1.col0 FROM tab1 WHERE NULL IN ( col0 )
----

query I rowsort
SELECT - 95 * col1 AS col1 FROM tab2 AS cor0
----
-1615
-2945
-5605

query I rowsort
SELECT ( col0 ) * 59 FROM tab1 cor0
----
177
3776
4720

query I rowsort
SELECT + + cor0.col0 + - col2 FROM tab2 AS cor0
----
-20
41
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-2359
SELECT ALL - col1 DIV + col1 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2359
SELECT ALL - col1 / + col1 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab1, tab0, tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT 70 * + col1 AS col0 FROM tab2
----
1190
2170
4130

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 25 * - col2 * + col2 col0 FROM tab1
----
-230400
-72900
-81225

onlyif mysql # use DIV operator for integer division
query I rowsort label-2363
SELECT + col2 DIV + col1 + + col2 * col1 * - col0 + - cor0.col2 FROM tab1 AS cor0
----
-36532
-4264
-99929

skipif mysql # not compatible
query I rowsort label-2363
SELECT + col2 / + col1 + + col2 * col1 * - col0 + - cor0.col2 FROM tab1 AS cor0
----
-36532
-4264
-99929

query I rowsort
SELECT ALL ( - col2 ) * - 19 FROM tab0 AS cor0
----
1558
19
627

query I rowsort
SELECT - col1 + 7 AS col1 FROM tab2
----
-10
-24
-52

onlyif mysql # use DIV operator for integer division
query I rowsort label-2366
SELECT DISTINCT col2 + - 70 DIV cor0.col1 AS col0 FROM tab1 cor0
----
50
52
91

skipif mysql # not compatible
query I rowsort label-2366
SELECT DISTINCT col2 + - 70 / cor0.col1 AS col0 FROM tab1 cor0
----
50
52
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-2367
SELECT DISTINCT - + col2 DIV 68 + col0 AS col2 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-2367
SELECT DISTINCT - + col2 / 68 + col0 AS col2 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - + col2 * col1 + col1 AS col1 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT ALL + cor0.col2 * - col1 + ( col1 ) AS col2 FROM tab1 cor0
----
-1235
-1378
-560

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2370
SELECT CAST( col0 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-2370
SELECT CAST ( col0 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL - + ( 20 ) * col1 AS col2 FROM tab1 AS cor0
----
-200
-260
-520

onlyif mysql # use DIV operator for integer division
query I rowsort label-2372
SELECT CAST( 74 AS SIGNED ) DIV + col0 AS col1 FROM tab1 AS cor0
----
0
1
24

skipif mysql # not compatible
query I rowsort label-2372
SELECT CAST ( 74 AS INTEGER ) / + col0 AS col1 FROM tab1 AS cor0
----
0
1
24

query I rowsort
SELECT DISTINCT - 40 AS col2 FROM tab1 AS cor0
----
-40

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 15 col0 FROM tab1 AS cor0
----
-15

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * cor0.col1 col1 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT - col1 * + col0 + - cor0.col1 * - col1 FROM tab2 AS cor0
----
-1054
-1121
744

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2377
SELECT + + CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2377
SELECT + + CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 88 + - col2 * col0 FROM tab2 AS cor0
----
-101
-1940
-2914

onlyif mysql # use DIV operator for integer division
query I rowsort label-2379
SELECT DISTINCT cor0.col2 DIV col0 FROM tab2 cor0
----
0
3

skipif mysql # not compatible
query I rowsort label-2379
SELECT DISTINCT cor0.col2 / col0 FROM tab2 cor0
----
0
3

query I rowsort
SELECT - col2 * 2 AS col1 FROM tab1 AS cor0
----
-108
-114
-192

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2381
SELECT ALL - + CAST( NULL AS DECIMAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2381
SELECT ALL - + CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 15 * col0 FROM tab0 cor0
----
1335
360
525

query I rowsort
SELECT ( + 95 + + col2 ) AS col2 FROM tab1
----
149
152
191

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col0 ) col0 FROM tab1
----
3
64
80

query I rowsort
SELECT ALL - cor0.col2 AS col0 FROM tab0, tab0 AS cor0, tab0 cor1
----
27 values hashing to 6a43e7f15194af73fe1c83385e6ebebc

query I rowsort
SELECT 23 * col2 + col2 AS col1 FROM tab0 cor0
----
1968
24
792

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0, tab2 cor1, tab0 AS cor2
----
972 values hashing to 63ccb67e72ebac679a0221202c067b9e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * col2 + - col0 col0 FROM tab1 AS cor0
----
2913
3185
9136

query I rowsort
SELECT + col1 * col1 + col1 AS col0 FROM tab1 AS cor0
----
110
182
702

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * col0 col2 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT + 89 FROM tab2
----
89

query I rowsort
SELECT DISTINCT ( col1 ) * ( 77 ) + col1 AS col0 FROM tab1 AS cor0
----
1014
2028
780

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col1 * + cor0.col2 col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT 4 * cor0.col2 FROM tab0 cor0
----
132
328
4

query I rowsort
SELECT DISTINCT - col2 * + col2 + ( col1 * + col2 ) FROM tab0 AS cor0
----
1749
738
96

query I rowsort
SELECT DISTINCT cor0.col2 * - col0 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - col2 + 11 * col2 AS col2 FROM tab2 AS cor0
----
260
270
380

query I rowsort
SELECT col2 * col2 + + 17 AS col1 FROM tab1 AS cor0
----
2933
3266
9233

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - cor0.col2 + - 91 col0 FROM tab0 AS cor0
----
-38
-82
5

query I rowsort
SELECT - col2 + - 56 FROM tab2 AS cor0
----
-82
-83
-94

query I rowsort
SELECT cor0.col1 + 75 - - 94 FROM tab2 AS cor0
----
186
200
228

query I rowsort
SELECT col1 * - 37 + col2 + col2 AS col2 FROM tab0 cor0
----
-3116
-3203
-3587

query I rowsort
SELECT DISTINCT 88 + - col2 + - col0 FROM tab1
----
-33
-88
31

query I rowsort
SELECT + 6 * - col2 FROM tab1
----
-324
-342
-576

query I rowsort
SELECT col2 * + 29 AS col0 FROM tab0 AS cor0
----
2378
29
957

query I rowsort
SELECT ALL - + cor0.col1 * + 28 FROM tab1 AS cor0
----
-280
-364
-728

query I rowsort
SELECT DISTINCT - - col1 + 40 AS col0 FROM tab1 AS cor0
----
50
53
66

query I rowsort
SELECT DISTINCT + col2 + - cor0.col0 * col1 + col0 FROM tab1 AS cor0
----
-21
-519
-864

query I rowsort
SELECT ALL - - col0 + + 97 * + col2 FROM tab1 AS cor0
----
5241
5593
9392

query I rowsort
SELECT + 87 + - col2 FROM tab1
----
-9
30
33

onlyif mysql # use DIV operator for integer division
query I rowsort label-2411
SELECT DISTINCT tab0.col1 * col0 DIV + col2 AS col1 FROM tab0
----
3395
62
98

skipif mysql # not compatible
query I rowsort label-2411
SELECT DISTINCT tab0.col1 * col0 / + col2 AS col1 FROM tab0
----
3395
62
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-2412
SELECT DISTINCT col0 * tab0.col1 + col0 + - col0 DIV + col2 FROM tab0
----
2088
3395
8187

skipif mysql # not compatible
query I rowsort label-2412
SELECT DISTINCT col0 * tab0.col1 + col0 + - col0 / + col2 FROM tab0
----
2088
3395
8187

query I rowsort
SELECT DISTINCT + - col0 * col0 AS col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT - - col2 * ( - 4 ) FROM tab2 cor0
----
-104
-108
-152

query I rowsort
SELECT DISTINCT - col1 * + col2 + 29 AS col1 FROM tab2 AS cor0
----
-1505
-617
-808

query I rowsort
SELECT ALL col2 * 10 FROM tab1 AS cor0
----
540
570
960

query I rowsort
SELECT DISTINCT - col1 * 45 AS col0 FROM tab2 AS cor0
----
-1395
-2655
-765

query I rowsort
SELECT ALL cor0.col2 + - ( 4 ) + col0 * - col0 FROM tab2 AS cor0
----
-26
-6062
-6207

query I rowsort
SELECT - col2 * 33 FROM tab2 AS cor0
----
-1254
-858
-891

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2420
SELECT ( - col1 ) * - col2 + - CAST( NULL AS SIGNED ) * 65 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2420
SELECT ( - col1 ) * - col2 + - CAST ( NULL AS INTEGER ) * 65 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2421
SELECT - col0 DIV 56 - col0 * col2 AS col0 FROM tab0 AS cor0
----
-35
-7299
-792

skipif mysql # not compatible
query I rowsort label-2421
SELECT - col0 / 56 - col0 * col2 AS col0 FROM tab0 AS cor0
----
-35
-7299
-792

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2422
SELECT ALL + CAST( NULL AS DECIMAL ) * col1 * col0 - + col2 AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2422
SELECT ALL + CAST ( NULL AS REAL ) * col1 * col0 - + col2 AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT + + col0 * + col0 + - col1 * cor0.col0 AS col2 FROM tab0 AS cor0
----
-1488
-178
-2170

query I rowsort
SELECT + tab1.col2 + - col1 * - col0 AS col0 FROM tab1
----
1136
132
697

query I rowsort
SELECT - 46 AS col2 FROM tab1 AS cor0
----
-46
-46
-46

query I rowsort
SELECT ALL - + cor0.col2 * col1 + cor0.col1 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT DISTINCT 69 + - col1 * col1 AS col1 FROM tab2 AS cor0
----
-220
-3412
-892

query I rowsort
SELECT - col2 + - col0 * col2 + col0 * + col1 AS col1 FROM tab1 AS cor0
----
-138
-3065
-6736

query I rowsort
SELECT ALL - + ( - cor0.col0 ) AS col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT - - col0 + - col0 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col0 + + col2 + - ( col0 * cor0.col2 ) AS col1 FROM tab2 cor0
----
-155
-1924
-2885

query I rowsort
SELECT ALL + 42 * - col2 FROM tab0 AS cor0
----
-1386
-3444
-42

query I rowsort
SELECT ALL + - col0 * col0 + ( col1 * - col0 ) AS col0 FROM tab0 AS cor0
----
-16020
-2640
-4620

onlyif mysql # use DIV operator for integer division
query I rowsort label-2434
SELECT DISTINCT - col1 DIV + col0 AS col1 FROM tab2 AS cor0
----
-4
0

skipif mysql # not compatible
query I rowsort label-2434
SELECT DISTINCT - col1 / + col0 AS col1 FROM tab2 AS cor0
----
-4
0

query I rowsort
SELECT DISTINCT + + 64 * - cor0.col2 AS col0 FROM tab0 AS cor0
----
-2112
-5248
-64

query I rowsort
SELECT ALL + - 3 + + col2 AS col1 FROM tab0 AS cor0
----
-2
30
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-2437
SELECT - - col0 * + col2 DIV col2 + col0 AS col0 FROM tab0 AS cor0
----
178
48
70

skipif mysql # not compatible
query I rowsort label-2437
SELECT - - col0 * + col2 / col2 + col0 AS col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT ALL - + col0 + col1 AS col2 FROM tab2 cor0
----
-19
-62
24

query I rowsort
SELECT + 31 + col0 FROM tab1 AS cor0
----
111
34
95

query I rowsort
SELECT ALL - col0 * cor0.col2 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - cor0.col1 - col2 AS col0 FROM tab2 AS cor0
----
-55
-58
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-2442
SELECT DISTINCT - col2 + - col1 + col1 DIV + col0 FROM tab0 AS cor0
----
-116
-172
-96

skipif mysql # not compatible
query I rowsort label-2442
SELECT DISTINCT - col2 + - col1 + col1 / + col0 FROM tab0 AS cor0
----
-116
-172
-96

query I rowsort
SELECT ALL - 23 * col2 + cor0.col2 FROM tab1 AS cor0
----
-1188
-1254
-2112

query I rowsort
SELECT + cor0.col1 * + col1 + 35 AS col1 FROM tab0 AS cor0
----
7431
8316
9444

onlyif mysql # use DIV operator for integer division
query I rowsort label-2445
SELECT ALL + col0 * col2 * CAST( 16 AS SIGNED ) + col2 DIV - ( - col0 ) col2 FROM tab2 cor0
----
3027
32448
48032

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2445
SELECT ALL + col0 * col2 * CAST ( 16 AS INTEGER ) + col2 / - ( - col0 ) col2 FROM tab2 cor0
----
3027
32448
48032

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 + + cor0.col1 - - 10 col0 FROM tab0 AS cor0
----
120
142
190

query I rowsort
SELECT DISTINCT + cor0.col2 - - col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - + col0 * - 41 - + 98 * + col2 * col1 FROM tab0 AS cor0
----
-277140
-727627
-8071

query I rowsort
SELECT + + cor0.col2 * - 61 + - col2 AS col0 FROM tab0 cor0
----
-2046
-5084
-62

query I rowsort
SELECT DISTINCT - col2 + - cor0.col0 * - col1 FROM tab2 AS cor0
----
1305
190
4576

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0, tab2 cor1, tab1 AS cor2
----
972 values hashing to 4c0813b2179303fdf58f082d81d6d03c

onlyif mysql # use DIV operator for integer division
query I rowsort label-2452
SELECT + ( + cor0.col0 ) DIV col0 AS col0 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2452
SELECT + ( + cor0.col0 ) / col0 AS col0 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT 19 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to 39241ace4c29d5a55052e1665aa36823

onlyif mysql # use DIV operator for integer division
query I rowsort label-2454
SELECT DISTINCT - + col1 DIV + col1 AS col2 FROM tab0 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-2454
SELECT DISTINCT - + col1 / + col1 AS col2 FROM tab0 AS cor0
----
-1

query I rowsort
SELECT + + 21 AS col1 FROM tab0 AS cor0
----
21
21
21

query I rowsort
SELECT DISTINCT 23 * col2 FROM tab0 AS cor0
----
1886
23
759

query I rowsort
SELECT ( 54 ) AS col2 FROM tab2
----
54
54
54

query I rowsort
SELECT ALL + col1 - 16 FROM tab0
----
70
75
81

query I rowsort
SELECT ALL ( - 54 ) + col1 - ( col1 ) * + col0 AS col2 FROM tab2
----
-1380
-240
-4597

query I rowsort
SELECT - col0 + col2 AS col0 FROM tab2
----
-41
-52
20

query I rowsort
SELECT + 44 * col0 AS col0 FROM tab1
----
132
2816
3520

query I rowsort
SELECT + ( col1 ) * + col2 AS col2 FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-2463
SELECT + 47 DIV tab0.col0 AS col1 FROM tab0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-2463
SELECT + 47 / tab0.col0 AS col1 FROM tab0
----
0
1
1

query I rowsort
SELECT 79 + + tab2.col2 FROM tab2
----
105
106
117

query I rowsort
SELECT - cor1.col1 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT - - col0 + 80 AS col1 FROM tab0 AS cor0
----
104
115
169

query I rowsort
SELECT + - cor0.col2 + ( - 60 ) FROM tab2 cor0
----
-86
-87
-98

query I rowsort
SELECT - col2 * 10 AS col1 FROM tab1 cor0
----
-540
-570
-960

query I rowsort
SELECT 85 + + col2 AS col0 FROM tab1 cor0
----
139
142
181

query I rowsort
SELECT + - 30 * col0 FROM tab2 AS cor0
----
-210
-2340
-2370

query I rowsort
SELECT + 35 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to d9b103f79c4e8f0de4b7c1c821783a29

query I rowsort
SELECT col2 + col1 + ( col2 * col1 + - ( ( + col2 ) ) ) FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT ALL + col0 + col1 * col2 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT 82 AS col2 FROM tab0 AS cor0
----
82
82
82

query I rowsort
SELECT ALL - ( + col0 ) * + col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT ALL + tab1.col0 * + tab1.col1 FROM tab1
----
1040
640
78

query I rowsort
SELECT DISTINCT + tab1.col1 FROM tab1, tab2, tab0 AS cor0, tab0 AS cor1
----
10
13
26

query I rowsort
SELECT ALL ( col0 + 14 ) * + col2 AS col2 FROM tab0
----
1254
49
8446

query I rowsort
SELECT - + col1 + - col0 * - col2 * + col2 FROM tab0 AS cor0
----
-62
26050
598345

query I rowsort
SELECT DISTINCT col2 + - 21 AS col2 FROM tab2 AS cor0
----
17
5
6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2481
SELECT + cor0.col0 / CAST( NULL AS SIGNED ) FROM tab1, tab2 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2481
SELECT + cor0.col0 / CAST ( NULL AS INTEGER ) FROM tab1, tab2 cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL - + cor0.col2 AS col2 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT tab0.col0 * + tab0.col1 + + col2 FROM tab0
----
2097
3396
8181

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 - 22 col1 FROM tab0
----
-21
11
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-2485
SELECT DISTINCT + col2 + ( col0 ) * + col1 * 66 + col0 DIV + col0 FROM tab2
----
14350
303759
88677

skipif mysql # not compatible
query I rowsort label-2485
SELECT DISTINCT + col2 + ( col0 ) * + col1 * 66 + col0 / + col0 FROM tab2
----
14350
303759
88677

query I rowsort
SELECT ALL col0 * - col1 + 63 * col1 FROM tab2
----
-272
-885
1736

query I rowsort
SELECT 56 FROM tab1, tab2 AS cor0
----
9 values hashing to 9c4523312174730bbc525b9977aa99fa

query I rowsort
SELECT DISTINCT + col1 * + col1 AS col0 FROM tab1
----
100
169
676

query I rowsort
SELECT col1 + + ( col1 ) FROM tab0 AS cor0
----
172
182
194

query I rowsort
SELECT ALL + col0 * + ( col2 ) + + col2 FROM tab0
----
36
7380
825

query I rowsort
SELECT + + col0 * + col2 AS col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT - ( ( col0 ) ) FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort
SELECT - CAST ( + col1 AS REAL ) FROM tab2
----
-17
-31
-59

query I rowsort
SELECT cor1.col0 AS col1 FROM tab0, tab1 cor0, tab0 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT - 20 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to f1cccb95c90889319e7a51e4ae9475bb

query I rowsort
SELECT + + col2 + cor0.col2 * - col2 * cor0.col2 FROM tab2 cor0
----
-17550
-19656
-54834

query I rowsort
SELECT - col0 * cor0.col0 + cor0.col1 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT DISTINCT - 77 + col2 FROM tab1 AS cor0
----
-20
-23
19

query I rowsort
SELECT + col2 * - col2 - 87 * col1 FROM tab2 cor0
----
-2923
-3426
-5809

query I rowsort
SELECT ALL col0 * col0 + + 94 FROM tab0 cor0
----
1319
670
8015

query I rowsort
SELECT 96 * 42 FROM tab2
----
4032
4032
4032

onlyif mysql # use DIV operator for integer division
query I rowsort label-2502
SELECT DISTINCT ( - tab0.col2 ) + - col0 DIV - CAST( - col2 AS SIGNED ) FROM tab0
----
-33
-36
-83

skipif mysql # not compatible
query I rowsort label-2502
SELECT DISTINCT ( - tab0.col2 ) + - col0 / - CAST ( - col2 AS INTEGER ) FROM tab0
----
-33
-36
-83

query I rowsort
SELECT col0 + + col0 * 39 AS col1 FROM tab2 AS cor0
----
280
3120
3160

query I rowsort
SELECT + 73 AS col1 FROM tab0 AS cor0
----
73
73
73

query I rowsort
SELECT + col0 * + cor0.col0 + - col1 AS col1 FROM tab2 AS cor0
----
18
6025
6224

onlyif mysql # use DIV operator for integer division
query I rowsort label-2506
SELECT - col2 * cor0.col2 DIV + 28 FROM tab2 cor0
----
-24
-26
-51

skipif mysql # not compatible
query I rowsort label-2506
SELECT - col2 * cor0.col2 / + 28 FROM tab2 cor0
----
-24
-26
-51

query I rowsort
SELECT DISTINCT - + 40 AS col0 FROM tab2 cor0
----
-40

query I rowsort
SELECT - ( col0 ) * - col1 + 57 FROM tab1 AS cor0
----
1097
135
697

query I rowsort
SELECT + cor0.col0 AS col1 FROM tab2, tab1 AS cor0, tab1 AS cor1, tab0, tab2 AS cor2
----
243 values hashing to 63f734facb33901524f6f2c799118db4

query I rowsort
SELECT ALL col1 + + col2 AS col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL + 2 * col0 + col0 + col1 AS col2 FROM tab2 AS cor0
----
254
293
52

query I rowsort
SELECT ALL + + 27 * + col1 FROM tab2 AS cor0
----
1593
459
837

query I rowsort
SELECT DISTINCT - - col0 - col0 * + col1 FROM tab2 AS cor0
----
-1264
-210
-4524

onlyif mysql # use DIV operator for integer division
query I rowsort label-2514
SELECT - col1 DIV 29 AS col1 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2514
SELECT - col1 / 29 AS col1 FROM tab1
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2515
SELECT ALL col2 DIV col1 + + col1 FROM tab2 AS cor0
----
19
31
59

skipif mysql # not compatible
query I rowsort label-2515
SELECT ALL col2 / col1 + + col1 FROM tab2 AS cor0
----
19
31
59

query I rowsort
SELECT DISTINCT + - col0 * col1 - col0 FROM tab2 AS cor0
----
-1422
-224
-4680

onlyif mysql # use DIV operator for integer division
query I rowsort label-2517
SELECT DISTINCT 7 DIV + col1 + - col0 + ( col2 ) FROM tab1 AS cor0
----
-7
16
51

skipif mysql # not compatible
query I rowsort label-2517
SELECT DISTINCT 7 / + col1 + - col0 + ( col2 ) FROM tab1 AS cor0
----
-7
16
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-2518
SELECT ALL - col2 DIV - col1 - 72 AS col0 FROM tab2 AS cor0
----
-70
-72
-72

skipif mysql # not compatible
query I rowsort label-2518
SELECT ALL - col2 / - col1 - 72 AS col0 FROM tab2 AS cor0
----
-70
-72
-72

query I rowsort
SELECT DISTINCT - - cor0.col2 * col2 AS col0 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT + 2 FROM tab2
----
2
2
2

query I rowsort
SELECT + col0 - ( + col0 ) AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL - cor0.col2 * col0 * col0 FROM tab1 AS cor0
----
-233472
-486
-614400

query I rowsort
SELECT 4 FROM tab1 cor0
----
4
4
4

query I rowsort
SELECT DISTINCT col0 + - col1 * + col0 AS col2 FROM tab2 AS cor0
----
-1264
-210
-4524

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2525
SELECT ALL + ( col2 ) * - col1 + ( col0 ) * + CAST( NULL AS SIGNED ) - + 18 * col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2525
SELECT ALL + ( col2 ) * - col1 + ( col0 ) * + CAST ( NULL AS INTEGER ) - + 18 * col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2526
SELECT ALL - 2 * + cor0.col2 + + ( col0 + + col0 ) DIV col1 FROM tab1 AS cor0
----
-102
-108
-180

skipif mysql # not compatible
query I rowsort label-2526
SELECT ALL - 2 * + cor0.col2 + + ( col0 + + col0 ) / col1 FROM tab1 AS cor0
----
-102
-108
-180

query I rowsort
SELECT DISTINCT col1 * + cor0.col2 + col0 FROM tab0 cor0
----
132
2862
7551

query I rowsort
SELECT DISTINCT col1 * - 72 + - tab0.col1 FROM tab0
----
-6278
-6643
-7081

query I rowsort
SELECT tab2.col0 * col1 + col0 FROM tab2
----
1422
224
4680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2530
SELECT CAST( NULL AS SIGNED ) + + 62 * col0 * 83 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2530
SELECT CAST ( NULL AS INTEGER ) + + 62 * col0 * 83 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2531
SELECT col1 - - 8 DIV + col2 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-2531
SELECT col1 - - 8 / + col2 FROM tab1
----
10
13
26

query I rowsort
SELECT DISTINCT - col2 * - 5 + - cor0.col0 FROM tab0 AS cor0
----
-30
141
321

query I rowsort
SELECT ALL - col1 * + col2 + - col1 AS col0 FROM tab1 AS cor0
----
-1261
-1430
-580

query I rowsort
SELECT col2 * + 34 AS col2 FROM tab0 AS cor0
----
1122
2788
34

query I rowsort
SELECT + col1 * 64 FROM tab0 AS cor0
----
5504
5824
6208

query I rowsort
SELECT ALL - col0 * - 84 FROM tab0 AS cor0
----
2016
2940
7476

query I rowsort
SELECT + - col0 + 55 * col0 FROM tab1 AS cor0
----
162
3456
4320

query I rowsort
SELECT + col2 - 79 AS col0 FROM tab0 AS cor0
----
-46
-78
3

query I rowsort
SELECT col2 * + 29 FROM tab0 AS cor0
----
2378
29
957

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab2, tab2 AS cor1, tab0 cor2
----
972 values hashing to 63ccb67e72ebac679a0221202c067b9e

query I rowsort
SELECT ALL col0 + ( col1 ) AS col1 FROM tab0
----
110
132
180

query I rowsort
SELECT + cor0.col2 + col1 + + 30 FROM tab1 AS cor0
----
110
139
97

query I rowsort
SELECT DISTINCT col1 + 33 * - tab0.col0 * - col1 FROM tab0
----
112132
267358
68198

query I rowsort
SELECT + col1 * col0 - - col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT ALL - col0 - - 9 FROM tab2
----
-69
-70
2

query I rowsort
SELECT ALL + tab0.col0 * ( - col2 ) - col1 FROM tab0
----
-132
-7389
-878

query I rowsort
SELECT 46 + + col1 * + col2 + - col0 FROM tab0 AS cor0
----
108
2860
7419

query I rowsort
SELECT - ( - 36 ) * - col0 + + cor0.col2 + col1 AS col2 FROM tab1 AS cor0
----
-2237
-2771
-28

query I rowsort
SELECT + + col1 * col1 + + col2 * col0 FROM tab0 AS cor0
----
15579
8188
9444

query I rowsort
SELECT ALL + col1 - 44 AS col2 FROM tab0
----
42
47
53

query I rowsort
SELECT DISTINCT - + col0 * - col0 + col1 FROM tab2 AS cor0
----
6143
6258
80

query I rowsort
SELECT 58 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to ef6e63aeed2581a168f07646d258f666

query I rowsort
SELECT DISTINCT col0 * + 66 FROM tab0
----
1584
2310
5874

query I rowsort
SELECT - + cor1.col0 + - 95 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 9d9d56850792aea030727061926495b2

onlyif mysql # use DIV operator for integer division
query I rowsort label-2555
SELECT + cor0.col0 - col2 DIV + col1 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-2555
SELECT + cor0.col0 - col2 / + col1 FROM tab0 AS cor0
----
24
35
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-2556
SELECT DISTINCT - - col1 * + col0 + + col2 DIV ( - cor0.col1 ) FROM tab1 AS cor0
----
1033
635
76

skipif mysql # not compatible
query I rowsort label-2556
SELECT DISTINCT - - col1 * + col0 + + col2 / ( - cor0.col1 ) FROM tab1 AS cor0
----
1033
635
76

query I rowsort
SELECT DISTINCT 2 * - col1 AS col0 FROM tab1 AS cor0
----
-20
-26
-52

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 66 * col2 col1 FROM tab0
----
-2178
-5412
-66

onlyif mysql # use DIV operator for integer division
query I rowsort label-2559
SELECT DISTINCT + 87 DIV 35 AS col1 FROM tab0 cor0
----
2

skipif mysql # not compatible
query I rowsort label-2559
SELECT DISTINCT + 87 / 35 AS col1 FROM tab0 cor0
----
2

query I rowsort
SELECT + col1 * - col1 + + cor0.col1 * col1 - col2 FROM tab0 AS cor0
----
-1
-33
-82

query I rowsort
SELECT + 85 + + col0 + col2 FROM tab1 cor0
----
142
206
261

onlyif mysql # use DIV operator for integer division
query I rowsort label-2562
SELECT ALL - cor0.col2 DIV cor0.col0 FROM tab2 cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-2562
SELECT ALL - cor0.col2 / cor0.col0 FROM tab2 cor0
----
-3
0
0

query I rowsort
SELECT DISTINCT + + cor0.col1 * + 70 + + col1 FROM tab2 AS cor0
----
1207
2201
4189

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2564
SELECT ALL - CAST( - col0 AS SIGNED ) FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-2564
SELECT ALL - CAST ( - col0 AS INTEGER ) FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT + cor0.col1 + + col0 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT col1 - + col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - + 82 + ( cor0.col0 ) * - ( - col1 ) AS col0 FROM tab2 AS cor0
----
1261
135
4520

query I rowsort
SELECT 18 * cor0.col2 FROM tab0 AS cor0
----
1476
18
594

query I rowsort
SELECT DISTINCT + + col0 * + ( + col2 ) + + 85 * - cor0.col0 FROM tab2 AS cor0
----
-3713
-406
-4602

query I rowsort
SELECT - - 96 + col2 AS col2 FROM tab2 cor0
----
122
123
134

query I rowsort
SELECT DISTINCT col2 + cor0.col2 AS col0 FROM tab0 AS cor0
----
164
2
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 62 col2 FROM tab1 AS cor0
----
62
62
62

query I rowsort
SELECT DISTINCT + col1 + + col1 * col0 * + col0 + col2 AS col0 FROM tab1 AS cor0
----
314
41027
83309

onlyif mysql # use DIV operator for integer division
query I rowsort label-2574
SELECT ALL + 47 DIV + col2 AS col0 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2574
SELECT ALL + 47 / + col2 AS col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 73 AS col1 FROM tab0 AS cor0
----
73

onlyif mysql # use DIV operator for integer division
query I rowsort label-2576
SELECT DISTINCT + col2 DIV + col0 FROM tab2 AS cor0
----
0
3

skipif mysql # not compatible
query I rowsort label-2576
SELECT DISTINCT + col2 / + col0 FROM tab2 AS cor0
----
0
3

query I rowsort
SELECT + 67 * col0 + 43 FROM tab2 cor0
----
512
5269
5336

query I rowsort
SELECT ALL + 72 * - cor0.col1 + 99 AS col1 FROM tab0 AS cor0
----
-6093
-6453
-6885

query I rowsort
SELECT DISTINCT - col2 + col1 AS col2 FROM tab1 cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT + ( - col0 ) + 62 AS col1 FROM tab2 AS cor0
----
-16
-17
55

query I rowsort
SELECT ALL - col0 * + col1 * col2 AS col1 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT ALL - + col1 + ( + 92 + + col1 ) AS col1 FROM tab1 AS cor0
----
92
92
92

query I rowsort
SELECT DISTINCT + col1 + col2 * col0 FROM tab2 AS cor0
----
2087
220
3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-2584
SELECT + col1 * 90 DIV col0 AS col2 FROM tab2 cor0
----
19
398
68

skipif mysql # not compatible
query I rowsort label-2584
SELECT + col1 * 90 / col0 AS col2 FROM tab2 cor0
----
19
398
68

query I rowsort
SELECT - - col1 * ( - 64 ) FROM tab0 AS cor0
----
-5504
-5824
-6208

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 cor0, tab1, tab2 cor1
----
972 values hashing to 49c8bf3e931a898ba7af63d0e377eb79

query I rowsort
SELECT DISTINCT - cor1.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
-3
-64
-80

query I rowsort
SELECT - col0 * col1 + col2 AS col1 FROM tab2 cor0
----
-1305
-190
-4576

query I rowsort
SELECT + + col1 * - col2 + + col2 FROM tab1 AS cor0
----
-1152
-1350
-513

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - ( ( cor0.col2 ) ) col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT - + col1 * col2 + - col0 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT ALL 84 AS col2 FROM tab0, tab0 AS cor0 CROSS JOIN tab1
----
27 values hashing to e8cd683fe8cea77b4326d9b80f21c74a

query I rowsort
SELECT ALL + + 78 AS col0 FROM tab1 cor0
----
78
78
78

query I rowsort
SELECT - - col0 * ( col1 ) + col2 AS col1 FROM tab2 cor0
----
1381
244
4628

query I rowsort
SELECT DISTINCT + 55 + - col1 AS col1 FROM tab1 cor0
----
29
42
45

query I rowsort
SELECT - + 56 + + col1 AS col2 FROM tab0 AS cor0
----
30
35
41

onlyif mysql # use DIV operator for integer division
query I rowsort label-2597
SELECT col2 * col1 DIV + col2 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-2597
SELECT col2 * col1 / + col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL + 72 * + cor0.col2 + - cor0.col1 FROM tab2 AS cor0
----
1813
1913
2719

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 99 col1 FROM tab0 AS cor0
----
99
99
99

query I rowsort
SELECT 72 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

onlyif mysql # use DIV operator for integer division
query I rowsort label-2601
SELECT col0 * col1 DIV ( ( - col1 ) ) + col2 + col1 AS col2 FROM tab2 AS cor0
----
-24
51
7

skipif mysql # not compatible
query I rowsort label-2601
SELECT col0 * col1 / ( ( - col1 ) ) + col2 + col1 AS col2 FROM tab2 AS cor0
----
-24
51
7

query I rowsort
SELECT DISTINCT + 81 FROM tab2, tab1 AS cor0, tab0 AS cor1, tab0, tab2 AS cor2
----
81

query I rowsort
SELECT DISTINCT + cor0.col2 + + 2 FROM tab0, tab0 AS cor0
----
3
35
84

query I rowsort
SELECT DISTINCT + + col2 * 72 FROM tab1 AS cor0
----
3888
4104
6912

query I rowsort
SELECT ALL + col2 * - 9 + + col1 * cor0.col1 + ( 9 + - col1 ) AS col1 FROM tab1 AS cor0
----
-414
-699
173

query I rowsort
SELECT DISTINCT + col1 * ( col1 * - col1 + col2 ) AS col1 FROM tab2 AS cor0
----
-203845
-28954
-4267

query I rowsort
SELECT ALL + cor0.col2 + 2 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to ab9d8558abdf26c9e5dd2217e34e60fc

query I rowsort
SELECT DISTINCT cor0.col2 FROM tab1, tab0 cor0, tab2 AS cor1
----
1
33
82

query I rowsort
SELECT DISTINCT + cor0.col1 * 23 AS col2 FROM tab2, tab0 AS cor0
----
1978
2093
2231

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2610
SELECT col2 + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2610
SELECT col2 + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2611
SELECT + - col0 / + ( col1 ) + - col1 + CAST( NULL AS SIGNED ) AS col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2611
SELECT + - col0 / + ( col1 ) + - col1 + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 + + ( col2 ) FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + - col2 + - 59 FROM tab2 AS cor0
----
-85
-86
-97

query I rowsort
SELECT 74 + - 37 AS col0 FROM tab1 AS cor0
----
37
37
37

query I rowsort
SELECT DISTINCT + col2 + + col0 * col0 FROM tab2
----
6110
6279
76

query I rowsort
SELECT + + ( col0 ) + + col0 AS col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT + col2 + + cor0.col2 * - col1 AS col0 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT ALL - col0 + + col1 AS col1 FROM tab1
----
-54
-67
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + col1 col1 FROM tab0
----
110
132
180

query I rowsort
SELECT DISTINCT - tab2.col2 * + col2 + col1 AS col2 FROM tab2
----
-1427
-617
-698

query I rowsort
SELECT ALL + 61 AS col2 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 8d4dfe649433a599fc4b10830cc7ce55

onlyif mysql # use DIV operator for integer division
query I rowsort label-2622
SELECT - col2 DIV - col2 AS col1 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-2622
SELECT - col2 / - col2 AS col1 FROM tab0
----
1
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2623
SELECT DISTINCT col1 + CAST( NULL AS SIGNED ) * col1 AS col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-2623
SELECT DISTINCT col1 + CAST ( NULL AS INTEGER ) * col1 AS col0 FROM tab0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + col1 + + col1 col2 FROM tab2 cor0
----
-45
40
55

query I rowsort
SELECT + + col1 + + col0 * col0 FROM tab0 AS cor0
----
1322
662
8012

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2626
SELECT DISTINCT col1 * + CAST( NULL AS SIGNED ) FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-2626
SELECT DISTINCT col1 * + CAST ( NULL AS INTEGER ) FROM tab0
----
NULL

query I rowsort
SELECT ALL - tab1.col0 * ( col0 ) AS col2 FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT ALL ( 65 * col2 ) AS col2 FROM tab0
----
2145
5330
65

query I rowsort
SELECT - + 73 FROM tab0 AS cor0
----
-73
-73
-73

query I rowsort
SELECT DISTINCT - 18 * + col0 + + cor0.col2 FROM tab0 AS cor0
----
-1520
-399
-629

query I rowsort
SELECT ALL - ( col1 ) * - tab0.col0 AS col2 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT + 32 * col2 - + col1 * col0 AS col0 FROM tab2
----
-127
-3770
647

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 45 * cor0.col1 * col2 col1 FROM tab0 AS cor0
----
-127710
-335790
-4365

query I rowsort
SELECT - col1 + - 11 * col2 - - col0 * col1 FROM tab0
----
1615
3287
7106

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 43 col1 FROM tab2
----
43
43
43

query I rowsort
SELECT DISTINCT + 79 FROM tab1
----
79

query I rowsort
SELECT ALL 55 AS col0 FROM tab2
----
55
55
55

query I rowsort
SELECT col2 + - col0 * + col2 AS col1 FROM tab1
----
-108
-3591
-7584

query I rowsort
SELECT col1 * 5 AS col2 FROM tab2 AS cor0
----
155
295
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-2640
SELECT ALL tab1.col0 DIV ( + col1 ) AS col1 FROM tab1
----
0
6
6

skipif mysql # not compatible
query I rowsort label-2640
SELECT ALL tab1.col0 / ( + col1 ) AS col1 FROM tab1
----
0
6
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-2641
SELECT cor0.col1 DIV cor0.col0 AS col2 FROM tab2 cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-2641
SELECT cor0.col1 / cor0.col0 AS col2 FROM tab2 cor0
----
0
0
4

query I rowsort
SELECT - col0 + + 35 FROM tab0 AS cor0
----
-54
0
11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col2 col1 FROM tab0 AS cor0
----
-1
-1089
-6724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2644
SELECT - + col0 * - CAST( NULL AS DECIMAL ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2644
SELECT - + col0 * - CAST ( NULL AS REAL ) FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col2 * 23 FROM tab0 AS cor0
----
1886
23
759

query I rowsort
SELECT col2 * col1 * - 82 + - col2 AS col1 FROM tab1
----
-102432
-115182
-46797

query I rowsort
SELECT DISTINCT 34 * col0 + col2 FROM tab0
----
1191
3108
849

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2648
SELECT DISTINCT ( col1 ) + CAST( NULL AS SIGNED ) FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-2648
SELECT DISTINCT ( col1 ) + CAST ( NULL AS INTEGER ) FROM tab2
----
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2649
SELECT col2 + - col2 + CAST( NULL AS SIGNED ) * + ( col1 ) AS col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2649
SELECT col2 + - col2 + CAST ( NULL AS INTEGER ) * + ( col1 ) AS col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 * + col0 - col2 * - col1 AS col2 FROM tab2
----
1026
3562
3648

query I rowsort
SELECT DISTINCT + 23 - - col1 FROM tab0
----
109
114
120

query I rowsort
SELECT + tab2.col0 * 31 * 27 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to f146b42f26df981b7153ba85fec36f5d

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2653
SELECT + ( col0 ) * - CAST( NULL AS SIGNED ) + - cor0.col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2653
SELECT + ( col0 ) * - CAST ( NULL AS INTEGER ) + - cor0.col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2654
SELECT ALL - col2 * - col1 + - 8 DIV 39 AS col2 FROM tab0 AS cor0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-2654
SELECT ALL - col2 * - col1 + - 8 / 39 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT + 75 AS col0 FROM tab0 AS cor0
----
75
75
75

query I rowsort
SELECT - + ( cor0.col1 ) * + 2 + col2 * + col2 AS col1 FROM tab1 AS cor0
----
2864
3229
9190

query I rowsort
SELECT DISTINCT + 69 AS col1 FROM tab0 AS cor0
----
69

query I rowsort
SELECT ALL + cor0.col0 * + col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT - col0 + 51 FROM tab2 AS cor0
----
-27
-28
44

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2660
SELECT - col0 * + CAST( - col0 AS SIGNED ) + - col2 FROM tab1 AS cor0
----
-45
4039
6304

skipif mysql # not compatible
query I rowsort label-2660
SELECT - col0 * + CAST ( - col0 AS INTEGER ) + - col2 FROM tab1 AS cor0
----
-45
4039
6304

query I rowsort
SELECT DISTINCT col1 + + 38 FROM tab2 AS cor0
----
55
69
97

query I rowsort
SELECT - col0 * - 26 - - col1 FROM tab1 AS cor0
----
104
1674
2093

onlyif mysql # use DIV operator for integer division
query I rowsort label-2663
SELECT ALL col0 DIV - cor0.col0 FROM tab2 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-2663
SELECT ALL col0 / - cor0.col0 FROM tab2 AS cor0
----
-1
-1
-1

query I rowsort
SELECT - col1 * ( col2 ) + + col1 AS col1 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT DISTINCT - + col2 * col0 + - col0 * + col2 * col1 AS col2 FROM tab1 AS cor0
----
-107520
-40128
-4374

query I rowsort
SELECT ALL + col2 + + col1 AS col0 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT DISTINCT + col2 * + 28 - - col1 * + col1 AS col0 FROM tab2 AS cor0
----
1353
1717
4209

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 * ( ( + col0 ) ) + - col0 * + cor0.col2 col0 FROM tab1 AS cor0
----
-240
-4288
-8720

query I rowsort
SELECT ALL - tab1.col0 FROM tab1, tab2, tab2 AS cor0
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query I rowsort
SELECT - col1 + - col0 + col1 * + tab1.col0 FROM tab1
----
49
566
947

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2671
SELECT DISTINCT + - col0 + CAST( col2 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
-7
16
51

skipif mysql # not compatible
query I rowsort label-2671
SELECT DISTINCT + - col0 + CAST ( col2 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
-7
16
51

onlyif mysql # use DIV operator for integer division
query I rowsort label-2672
SELECT cor0.col0 DIV col0 + - col0 FROM tab2 cor0
----
-6
-77
-78

skipif mysql # not compatible
query I rowsort label-2672
SELECT cor0.col0 / col0 + - col0 FROM tab2 cor0
----
-6
-77
-78

query I rowsort
SELECT 57 * col1 AS col2 FROM tab1 cor0
----
1482
570
741

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2674
SELECT ALL + + CAST( NULL AS SIGNED ) AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2674
SELECT ALL + + CAST ( NULL AS INTEGER ) AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col0 + + col2 * col0 FROM tab1 AS cor0
----
165
3712
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-2676
SELECT DISTINCT + - col2 + - col2 DIV col0 + col2 AS col0 FROM tab0 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-2676
SELECT DISTINCT + - col2 + - col2 / col0 + col2 AS col0 FROM tab0 AS cor0
----
-1
0

query I rowsort
SELECT + + cor0.col0 * - col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT + + col0 * col1 * - col1 FROM tab0 AS cor0
----
-177504
-329315
-737009

query I rowsort
SELECT 95 * + col1 * + col1 FROM tab1 AS cor0
----
16055
64220
9500

query I rowsort
SELECT - col2 + + 65 * col0 FROM tab1 cor0
----
141
4103
5104

onlyif mysql # use DIV operator for integer division
query I rowsort label-2681
SELECT ALL ( - col2 ) DIV col1 AS col2 FROM tab2 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-2681
SELECT ALL ( - col2 ) / col1 AS col2 FROM tab2 AS cor0
----
-2
0
0

query I rowsort
SELECT - cor0.col0 + - col2 * + col0 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT ALL - col0 * + ( col1 ) FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT ALL col0 * col2 * 59 AS col2 FROM tab0
----
2065
430582
46728

query I rowsort
SELECT 76 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 30b8941a700cffd5b983116383bd42d5

query I rowsort
SELECT DISTINCT - col1 * + col2 AS col2 FROM tab1
----
-1248
-1404
-570

query I rowsort
SELECT - - 68 FROM tab0 AS cor0
----
68
68
68

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2688
SELECT DISTINCT col0 * - cor0.col1 * cor0.col0 + - CAST( 20 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
-254
-40980
-83220

skipif mysql # not compatible
query I rowsort label-2688
SELECT DISTINCT col0 * - cor0.col1 * cor0.col0 + - CAST ( 20 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-254
-40980
-83220

query I rowsort
SELECT ALL - col2 * cor0.col1 AS col0 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2690
SELECT - - CAST( - cor0.col2 AS SIGNED ) * + col2 AS col1 FROM tab1 AS cor0
----
-2916
-3249
-9216

skipif mysql # not compatible
query I rowsort label-2690
SELECT - - CAST ( - cor0.col2 AS INTEGER ) * + col2 AS col1 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT ALL cor0.col2 + col1 AS col2 FROM tab1 AS cor0
----
109
67
80

query I rowsort
SELECT col0 + 87 FROM tab2
----
165
166
94

query I rowsort
SELECT 15 * 56 * col1 - col2 FROM tab0
----
72207
76358
81479

query I rowsort
SELECT + ( + cor0.col2 ) * ( 98 ) AS col2 FROM tab0 AS cor0
----
3234
8036
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-2695
SELECT - 91 DIV - col0 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-2695
SELECT - 91 / - col0 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT - col1 * col1 * + col2 AS col2 FROM tab2 AS cor0
----
-10982
-25947
-90506

query I rowsort
SELECT - 20 AS col2 FROM tab1 AS cor0
----
-20
-20
-20

query I rowsort
SELECT DISTINCT - col1 * + cor0.col0 + - cor0.col2 AS col2 FROM tab0 AS cor0
----
-2097
-3396
-8181

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2699
SELECT ALL - col2 * col1 + + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2699
SELECT ALL - col2 * col1 + + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + col2 * + col0 * 2 FROM tab2 AS cor0
----
378
4056
6004

query I rowsort
SELECT + + cor0.col0 * col0 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT ALL ( - col0 ) FROM tab0 cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT - col1 + col0 + col0 FROM tab0 AS cor0
----
-27
-38
87

onlyif mysql # use DIV operator for integer division
query I rowsort label-2704
SELECT DISTINCT 24 DIV + col0 col2 FROM tab2
----
0
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2704
SELECT DISTINCT 24 / + col0 col2 FROM tab2
----
0
3

query I rowsort
SELECT ALL col2 * + ( col0 ) FROM tab1
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2706
SELECT ALL CAST( 79 AS SIGNED ) FROM tab2
----
79
79
79

skipif mysql # not compatible
query I rowsort label-2706
SELECT ALL CAST ( 79 AS INTEGER ) FROM tab2
----
79
79
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-2707
SELECT - col0 + + col0 DIV - col2 AS col0 FROM tab0
----
-24
-70
-90

skipif mysql # not compatible
query I rowsort label-2707
SELECT - col0 + + col0 / - col2 AS col0 FROM tab0
----
-24
-70
-90

query I rowsort
SELECT 64 + + ( col1 ) FROM tab1
----
74
77
90

query I rowsort
SELECT DISTINCT col1 * + col0 + 29 - col1 FROM tab0
----
2007
3327
8037

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + col1 + col2 col2 FROM tab2 cor0
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 17 * col1 col0 FROM tab0 cor0
----
-1462
-1547
-1649

onlyif mysql # use DIV operator for integer division
query I rowsort label-2712
SELECT DISTINCT ( + col2 ) DIV + col0 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-2712
SELECT DISTINCT ( + col2 ) / + col0 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT + 24 AS col2 FROM tab0 AS cor0
----
24
24
24

query I rowsort
SELECT DISTINCT + col2 + - col1 * - cor0.col1 FROM tab1 AS cor0
----
157
265
730

query I rowsort
SELECT ALL 61 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 07149905a72bd87553381f34d19ed290

query I rowsort
SELECT ALL 58 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to ef6e63aeed2581a168f07646d258f666

query I rowsort
SELECT ALL - - 66 AS col2 FROM tab1, tab0 cor0, tab0, tab1 AS cor1
----
81 values hashing to dc112f70fecc29a6e605a39541192f43

query I rowsort
SELECT 62 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 51dd2771d516ceb935483eded78a5fa0

query I rowsort
SELECT ALL - col0 * - 74 + col0 AS col0 FROM tab1
----
225
4800
6000

query I rowsort
SELECT ALL col0 + 10 FROM tab0
----
34
45
99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( 40 ) + col0 col2 FROM tab0 AS cor0
----
129
64
75

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2722
SELECT ALL col0 * CAST( col1 AS SIGNED ) + + col1 AS col2 FROM tab0
----
2150
3492
8190

skipif mysql # not compatible
query I rowsort label-2722
SELECT ALL col0 * CAST ( col1 AS INTEGER ) + + col1 AS col2 FROM tab0
----
2150
3492
8190

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - tab0.col1 col1 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
-86
-91
-97

query I rowsort
SELECT DISTINCT + col0 * col2 FROM tab1 cor0
----
162
3648
7680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2725
SELECT col0 + - CAST( NULL AS SIGNED ) * col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2725
SELECT col0 + - CAST ( NULL AS INTEGER ) * col0 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * 92 FROM tab2 cor0
----
-1564
-2852
-5428

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2727
SELECT - col1 * CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2727
SELECT - col1 * CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col0 + - ( + col1 ) FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT DISTINCT + col0 * 36 AS col1 FROM tab2 AS cor0
----
252
2808
2844

query I rowsort
SELECT - 90 AS col0 FROM tab2 AS cor0
----
-90
-90
-90

query I rowsort
SELECT + 68 FROM tab0, tab1 AS cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

onlyif mysql # use DIV operator for integer division
query I rowsort label-2732
SELECT DISTINCT + col2 + - col1 + cor0.col0 DIV - ( + col1 ) FROM tab0 AS cor0
----
-53
-9
-96

skipif mysql # not compatible
query I rowsort label-2732
SELECT DISTINCT + col2 + - col1 + cor0.col0 / - ( + col1 ) FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT + ( - col0 ) + col0 * col1 FROM tab2 AS cor0
----
1264
210
4524

query I rowsort
SELECT DISTINCT + col2 + - 95 * + col0 * + col0 AS col2 FROM tab2 AS cor0
----
-4628
-577954
-592857

query I rowsort
SELECT ALL 0 AS col2 FROM tab2
----
0
0
0

query I rowsort
SELECT ALL + ( + col0 ) * col0 + col0 FROM tab0 cor0
----
1260
600
8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 62 col2 FROM tab2 AS cor0
----
62
62
62

query I rowsort
SELECT + + 20 AS col1 FROM tab2 AS cor0
----
20
20
20

query I rowsort
SELECT ALL - + 27 + - col0 AS col1 FROM tab0 AS cor0
----
-116
-51
-62

query I rowsort
SELECT col2 * + col2 + - col2 * 33 + + col2 AS col2 FROM tab2 cor0
----
-135
-156
228

query I rowsort
SELECT DISTINCT + col0 + + tab2.col0 * col1 + - col1 FROM tab2
----
1405
193
4621

query I rowsort
SELECT + - ( - ( - col0 ) ) * - col1 + 67 AS col0 FROM tab1 AS cor0
----
1107
145
707

query I rowsort
SELECT - 55 AS col2 FROM tab0, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to b90e74bece5521b514096c5b6e105fde

onlyif mysql # use DIV operator for integer division
query I rowsort label-2744
SELECT col0 DIV + 84 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2744
SELECT col0 / + 84 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT - col2 * col1 * 7 FROM tab0
----
-19866
-52234
-679

onlyif mysql # use DIV operator for integer division
query I rowsort label-2746
SELECT col2 * col0 DIV col0 col1 FROM tab1
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2746
SELECT col2 * col0 / col0 col1 FROM tab1
----
54
57
96

query I rowsort
SELECT DISTINCT 26 AS col0 FROM tab1
----
26

query I rowsort
SELECT DISTINCT 77 FROM tab2
----
77

query I rowsort
SELECT - + col2 * col1 + + col1 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT + ( col0 ) * col1 + + col0 AS col1 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT col2 * + ( col0 ) - - col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT - ( - 79 ) + col0 AS col2 FROM tab1 AS cor0
----
143
159
82

query I rowsort
SELECT col0 + - col2 * + tab0.col0 FROM tab0
----
-7209
-768
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + cor0.col1 * col1 col0 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT ALL - col0 * - col2 AS col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT ALL - 30 * - col1 * + 9 + + 97 FROM tab0 AS cor0
----
23317
24667
26287

query I rowsort
SELECT DISTINCT + col0 + + cor0.col1 FROM tab0 AS cor0
----
110
132
180

onlyif mysql # use DIV operator for integer division
query I rowsort label-2758
SELECT + col1 DIV 77 FROM tab2 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2758
SELECT + col1 / 77 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT 2 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

query I rowsort
SELECT col1 - ( col2 ) FROM tab1
----
-28
-47
-83

query I rowsort
SELECT ALL + + col0 * 14 FROM tab1 AS cor0
----
1120
42
896

query I rowsort
SELECT + + cor0.col0 * + ( col0 ) AS col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT + cor0.col0 * - 71 FROM tab2 AS cor0
----
-497
-5538
-5609

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2764
SELECT - CAST( col0 AS SIGNED ) + col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2764
SELECT - CAST ( col0 AS INTEGER ) + col0 FROM tab0 AS cor0
----
0
0
0

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab1 cor0, tab1 AS cor1, tab0 cor2
----
972 values hashing to 909b7ebab62aff8f69dc42ccbb5c2eae

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2766
SELECT DISTINCT - - CAST( col2 AS SIGNED ) FROM tab0 cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-2766
SELECT DISTINCT - - CAST ( col2 AS INTEGER ) FROM tab0 cor0
----
1
33
82

query I rowsort
SELECT ALL - col1 * 77 * - col2 + 84 FROM tab2 cor0
----
118202
49826
64533

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * + ( col1 * - 42 ) + col2 * col1 col2 FROM tab0 AS cor0
----
-142493
-332696
-83850

onlyif mysql # use DIV operator for integer division
query I rowsort label-2769
SELECT col0 + - cor0.col1 DIV + col1 FROM tab2 cor0
----
6
77
78

skipif mysql # not compatible
query I rowsort label-2769
SELECT col0 + - cor0.col1 / + col1 FROM tab2 cor0
----
6
77
78

query I rowsort
SELECT ALL ( - 14 ) FROM tab2, tab2 AS cor0
----
9 values hashing to d321461994ba49c3a70fa6373032fc94

query I rowsort
SELECT - - col0 + - col2 + - col1 * - col1 AS col1 FROM tab0 AS cor0
----
7387
8288
9443

query I rowsort
SELECT col2 + + 15 FROM tab1 cor0
----
111
69
72

query I rowsort
SELECT DISTINCT 50 FROM tab1, tab2 AS cor0
----
50

query I rowsort
SELECT DISTINCT col0 + tab1.col2 AS col2 FROM tab1
----
121
176
57

query I rowsort
SELECT - 12 + + col2 FROM tab1 AS cor0
----
42
45
84

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2776
SELECT CAST( NULL AS DECIMAL ) * + col1 * - col0 + - col2 / + col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2776
SELECT CAST ( NULL AS REAL ) * + col1 * - col0 + - col2 / + col1 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-2777
SELECT DISTINCT - + col1 DIV - col1 AS col1 FROM tab1 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-2777
SELECT DISTINCT - + col1 / - col1 AS col1 FROM tab1 AS cor0
----
1

query I rowsort
SELECT DISTINCT + - cor0.col0 * - col2 + ( - 69 ) - + col0 * + ( + 6 ) AS col0 FROM tab1 AS cor0
----
3195
7131
75

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab0.col0 col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

query I rowsort
SELECT DISTINCT - - col2 + 93 FROM tab0 AS cor0
----
126
175
94

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2781
SELECT - cor0.col1 * CAST( + col2 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

skipif mysql # not compatible
query I rowsort label-2781
SELECT - cor0.col1 * CAST ( + col2 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-2782
SELECT DISTINCT col2 DIV col2 + ( + col2 * col0 ) + - ( - col0 ) FROM tab1 AS cor0
----
166
3713
7761

skipif mysql # not compatible
query I rowsort label-2782
SELECT DISTINCT col2 / col2 + ( + col2 * col0 ) + - ( - col0 ) FROM tab1 AS cor0
----
166
3713
7761

onlyif mysql # use DIV operator for integer division
query I rowsort label-2783
SELECT DISTINCT + col1 * 72 + + 77 * col0 DIV 67 col1 FROM tab2 AS cor0
----
1314
2240
4337

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2783
SELECT DISTINCT + col1 * 72 + + 77 * col0 / 67 col1 FROM tab2 AS cor0
----
1314
2240
4337

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + 67 col2 FROM tab0 AS cor0
----
-5762
-6097
-6499

query I rowsort
SELECT ALL - col1 - 88 AS col2 FROM tab2 AS cor0
----
-105
-119
-147

query I rowsort
SELECT + col0 * + 84 * + col1 FROM tab0 cor0
----
173376
285180
680316

query I rowsort
SELECT DISTINCT 81 AS col1 FROM tab0
----
81

query I rowsort
SELECT tab1.col0 + - tab1.col2 FROM tab1, tab1 cor0
----
9 values hashing to 1c0f12b2ac8c8b522b92205460500f94

query I rowsort
SELECT tab1.col0 - + col0 * - col0 FROM tab1
----
12
4160
6480

onlyif mysql # use DIV operator for integer division
query I rowsort label-2790
SELECT DISTINCT + col2 DIV col0 FROM tab0
----
0
1

skipif mysql # not compatible
query I rowsort label-2790
SELECT DISTINCT + col2 / col0 FROM tab0
----
0
1

query I rowsort
SELECT col2 * col0 + - col2 + col1 FROM tab1
----
134
3601
7597

query I rowsort
SELECT - - 32 FROM tab2, tab0, tab0 AS cor0
----
27 values hashing to cf4f01ac97eb83445b1721f3ae28961a

onlyif mysql # use DIV operator for integer division
query I rowsort label-2793
SELECT + 40 + col2 + 47 DIV 16 FROM tab2
----
68
69
80

skipif mysql # not compatible
query I rowsort label-2793
SELECT + 40 + col2 + 47 / 16 FROM tab2
----
68
69
80

query I rowsort
SELECT DISTINCT + col2 + + col1 + 21 AS col1 FROM tab0
----
119
140
194

query I rowsort
SELECT DISTINCT - col2 + + tab0.col2 * - ( - tab0.col0 ) AS col2 FROM tab0
----
34
7216
759

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 8 col1 FROM tab2 cor0
----
-8
-8
-8

query I rowsort
SELECT ALL - 18 * + col2 FROM tab1 AS cor0
----
-1026
-1728
-972

query I rowsort
SELECT ALL - col0 + col2 * col0 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT DISTINCT - col0 + + col0 FROM tab2
----
0

query I rowsort
SELECT DISTINCT col1 + 10 AS col1 FROM tab1
----
20
23
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * 62 - - 10 col2 FROM tab0
----
2056
5094
72

query I rowsort
SELECT 3 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 3cf1e377a943589897b8d431a834f1ba

query I rowsort
SELECT - col0 * 34 AS col0 FROM tab0
----
-1190
-3026
-816

query I rowsort
SELECT DISTINCT col0 * + tab0.col1 + + tab0.col0 FROM tab0
----
2088
3430
8188

query I rowsort
SELECT ALL + col0 + - ( + 50 ) AS col1 FROM tab0 AS cor0
----
-15
-26
39

query I rowsort
SELECT col2 * + col1 + + col2 + - col0 AS col0 FROM tab0 AS cor0
----
2847
63
7455

query I rowsort
SELECT - 67 AS col2 FROM tab0 AS cor0
----
-67
-67
-67

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2808
SELECT ALL CAST( + ( col1 ) AS SIGNED ) FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-2808
SELECT ALL CAST ( + ( col1 ) AS INTEGER ) FROM tab0 AS cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-2809
SELECT ALL - col1 * - col1 DIV - cor0.col1 + col1 * - 73 + - col0 * col1 FROM tab1 AS cor0
----
-1380
-2002
-2002

skipif mysql # not compatible
query I rowsort label-2809
SELECT ALL - col1 * - col1 / - cor0.col1 + col1 * - 73 + - col0 * col1 FROM tab1 AS cor0
----
-1380
-2002
-2002

onlyif mysql # use DIV operator for integer division
query I rowsort label-2810
SELECT DISTINCT + 83 DIV - 54 + + col2 * - col2 FROM tab0 AS cor0
----
-1090
-2
-6725

skipif mysql # not compatible
query I rowsort label-2810
SELECT DISTINCT + 83 / - 54 + + col2 * - col2 FROM tab0 AS cor0
----
-1090
-2
-6725

query I rowsort
SELECT - col1 * 58 FROM tab0 AS cor0
----
-4988
-5278
-5626

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 59 col2 FROM tab1 cor0
----
-59
-59
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - col0 col2 FROM tab1 AS cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-2814
SELECT DISTINCT - cor0.col0 DIV col0 + + col1 col0 FROM tab2 cor0
----
16
30
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2814
SELECT DISTINCT - cor0.col0 / col0 + + col1 col0 FROM tab2 cor0
----
16
30
58

query I rowsort
SELECT + 10 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 0fe3e45a9ecd49584c2ab442100d5176

onlyif mysql # use DIV operator for integer division
query I rowsort label-2816
SELECT ALL + col1 + + tab1.col0 * - ( col0 ) + col2 DIV - 14 FROM tab1
----
-4090
-6393
14

skipif mysql # not compatible
query I rowsort label-2816
SELECT ALL + col1 + + tab1.col0 * - ( col0 ) + col2 / - 14 FROM tab1
----
-4090
-6393
14

query I rowsort
SELECT ALL - 90 + - col2 AS col0 FROM tab0 AS cor0
----
-123
-172
-91

query I rowsort
SELECT ALL - col1 * + 39 AS col1 FROM tab0 AS cor0
----
-3354
-3549
-3783

query I rowsort
SELECT 95 + - col1 * + cor0.col1 + - cor0.col0 AS col0 FROM tab0 AS cor0
----
-7325
-8275
-9349

query I rowsort
SELECT DISTINCT ( - col2 ) + - col0 * col1 FROM tab1 AS cor0
----
-1136
-132
-697

query I rowsort
SELECT ALL - + 35 + cor0.col0 FROM tab2 cor0
----
-28
43
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + ( + col2 ) - col2 col2 FROM tab2 AS cor0
----
-52
-54
-76

onlyif mysql # use DIV operator for integer division
query I rowsort label-2823
SELECT col0 + col0 DIV + col2 col1 FROM tab1 AS cor0
----
3
65
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2823
SELECT col0 + col0 / + col2 col1 FROM tab1 AS cor0
----
3
65
80

query I rowsort
SELECT DISTINCT - 58 * + col0 FROM tab1 AS cor0
----
-174
-3712
-4640

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 74 ) + cor0.col0 col1 FROM tab2 AS cor0
----
-67
4
5

query I rowsort
SELECT ALL + 21 AS col0 FROM tab1
----
21
21
21

query I rowsort
SELECT DISTINCT + ( tab1.col0 ) AS col2 FROM tab1
----
3
64
80

query I rowsort
SELECT ( cor0.col2 ) * - col0 + + col0 AS col1 FROM tab2 AS cor0
----
-182
-1950
-2923

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2 cor0, tab1 AS cor1, tab1 cor2
----
972 values hashing to cee640567b2a4ba7d97109d5025bf4d9

query I rowsort
SELECT 66 + 24 FROM tab2 AS cor0
----
90
90
90

query I rowsort
SELECT ALL - - 47 * + cor0.col2 + - col2 * - 80 FROM tab1 AS cor0
----
12192
6858
7239

query I rowsort
SELECT - ( col0 ) * cor0.col1 + 73 * + col2 FROM tab1 AS cor0
----
3521
3864
5968

query I rowsort
SELECT - ( + col1 ) * + col2 + cor0.col0 AS col2 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT DISTINCT + col2 + 0 FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT + ( col2 ) * + 36 AS col2 FROM tab0 AS cor0
----
1188
2952
36

query I rowsort
SELECT - - col0 + - col1 AS col2 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT + - col2 + col1 * 6 FROM tab1 AS cor0
----
-18
102
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2838
SELECT ALL - col0 * - CAST( + col2 AS SIGNED ) * + col1 col1 FROM tab2 AS cor0
----
119652
51034
5859

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2838
SELECT ALL - col0 * - CAST ( + col2 AS INTEGER ) * + col1 col1 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT - - cor0.col0 + + cor0.col2 + 58 AS col2 FROM tab1 AS cor0
----
115
179
234

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT ALL col1 * CAST ( - col2 + - col1 AS REAL ) col2 FROM tab0 AS cor0
----
-10234
-15743
-9506

query I rowsort
SELECT + + cor0.col2 - + 53 * + col2 FROM tab1 cor0
----
-2808
-2964
-4992

query I rowsort
SELECT ALL + col1 * - 30 FROM tab1 AS cor0
----
-300
-390
-780

query I rowsort
SELECT + col0 * - col0 * - cor0.col0 + + col0 + col1 * col1 FROM tab1 AS cor0
----
262308
512249
706

query I rowsort
SELECT - col1 * + 51 FROM tab0 AS cor0
----
-4386
-4641
-4947

query I rowsort
SELECT ALL - 6 - col2 FROM tab1
----
-102
-60
-63

query I rowsort
SELECT col1 * col0 * - ( col0 * tab0.col0 ) + col0 FROM tab0
----
-1188840
-4158840
-64152090

query I rowsort
SELECT ALL col1 - - col1 * col1 FROM tab2
----
306
3540
992

query I rowsort
SELECT - col1 - col2 AS col2 FROM tab1 AS cor0
----
-109
-67
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2849
SELECT - + col2 + CAST( col2 AS SIGNED ) AS col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2849
SELECT - + col2 + CAST ( col2 AS INTEGER ) AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - col2 * - 2 + + col2 FROM tab2 AS cor0
----
114
78
81

query I rowsort
SELECT DISTINCT + - 61 * - cor0.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
5246
5551
5917

query I rowsort
SELECT cor0.col1 FROM tab2 AS cor0 CROSS JOIN tab2, tab2 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

onlyif mysql # use DIV operator for integer division
query I rowsort label-2853
SELECT DISTINCT col0 + - col0 DIV + 38 FROM tab0 cor0
----
24
35
87

skipif mysql # not compatible
query I rowsort label-2853
SELECT DISTINCT col0 + - col0 / + 38 FROM tab0 cor0
----
24
35
87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2854
SELECT - col1 * 46 + col1 * cor0.col2 * CAST( NULL AS SIGNED ) col1 FROM tab1 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2854
SELECT - col1 * 46 + col1 * cor0.col2 * CAST ( NULL AS INTEGER ) col1 FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 26 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 2d1c3129ed17fd721d4876b21c035584

query I rowsort
SELECT - 74 * + col1 AS col0 FROM tab1 AS cor0
----
-1924
-740
-962

query I rowsort
SELECT DISTINCT + cor0.col0 AS col2 FROM tab0 cor0 CROSS JOIN tab0 AS cor1
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * cor0.col0 col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT ALL - cor0.col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT - 40 * - 72 AS col1 FROM tab1 AS cor0
----
2880
2880
2880

query I rowsort
SELECT DISTINCT + col0 * tab2.col1 * - col0 FROM tab2
----
-106097
-1519
-358956

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2862
SELECT + col1 + - CAST( NULL AS SIGNED ) AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2862
SELECT + col1 + - CAST ( NULL AS INTEGER ) AS col2 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 13 col0 FROM tab0
----
13
13
13

query I rowsort
SELECT DISTINCT + 40 * col2 AS col1 FROM tab1
----
2160
2280
3840

query I rowsort
SELECT - + cor0.col1 * 46 * - col1 AS col1 FROM tab1 AS cor0
----
31096
4600
7774

onlyif mysql # use DIV operator for integer division
query I rowsort label-2866
SELECT ALL - + ( col1 ) DIV + col0 FROM tab1 AS cor0
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-2866
SELECT ALL - + ( col1 ) / + col0 FROM tab1 AS cor0
----
-8
0
0

query I rowsort
SELECT DISTINCT + 30 FROM tab2, tab2 AS cor0
----
30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - col1 ) + col2 + col1 col0 FROM tab1
----
106
122
77

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab0 cor0, tab2, tab1 AS cor1
----
972 values hashing to 92235dbc382d83baa93d6546ed489b0c

query I rowsort
SELECT - 45 * 2 AS col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to c0d96679aba507520916e8654e5a6618

query I rowsort
SELECT ALL + 0 * col0 AS col2 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2872
SELECT ALL 35 DIV - col1 AS col0 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2872
SELECT ALL 35 / - col1 AS col0 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT col0 + - cor0.col0 * + 90 FROM tab2 AS cor0
----
-623
-6942
-7031

onlyif mysql # use DIV operator for integer division
query I rowsort label-2874
SELECT - col1 + cor0.col0 DIV col1 AS col0 FROM tab0 AS cor0
----
-86
-91
-97

skipif mysql # not compatible
query I rowsort label-2874
SELECT - col1 + cor0.col0 / col1 AS col0 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT - + col1 * col0 AS col0 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT + - col2 + cor0.col0 * + col1 AS col2 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT + + col1 + - 64 * - col2 FROM tab0 cor0
----
161
2198
5339

query I rowsort
SELECT ALL tab0.col0 * col2 - col1 FROM tab0
----
-62
706
7207

query I rowsort
SELECT col2 + + col1 * ( col2 + 84 ) AS col1 FROM tab0 AS cor0
----
10095
15188
8246

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + cor0.col1 col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT + col0 * 75 + + col1 AS col2 FROM tab1 AS cor0
----
251
4810
6013

query I rowsort
SELECT + col1 * - col2 + + col1 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT ALL + + col2 * - 24 + - cor0.col1 AS col2 FROM tab1 AS cor0
----
-1322
-1378
-2317

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col1 + 8 * col2 col0 FROM tab1 AS cor0
----
406
446
755

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2885
SELECT DISTINCT CAST( NULL AS SIGNED ) + - col2 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-2885
SELECT DISTINCT CAST ( NULL AS INTEGER ) + - col2 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - - col1 - col0 FROM tab2 cor0
----
-19
-62
24

query I rowsort
SELECT - col0 + 18 FROM tab0 cor0
----
-17
-6
-71

query I rowsort
SELECT ALL - + 51 + - 28 FROM tab2 AS cor0
----
-79
-79
-79

query I rowsort
SELECT col0 * - 96 + + col2 * 65 AS col0 FROM tab2 cor0
----
-5114
-5798
1083

query I rowsort
SELECT + ( - ( col0 ) ) + - cor0.col0 * ( - col0 ) FROM tab2 AS cor0
----
42
6006
6162

onlyif mysql # use DIV operator for integer division
query I rowsort label-2891
SELECT col1 DIV col2 + + col1 * 94 * col1 AS col1 FROM tab0 AS cor0
----
695226
778415
884543

skipif mysql # not compatible
query I rowsort label-2891
SELECT col1 / col2 + + col1 * 94 * col1 AS col1 FROM tab0 AS cor0
----
695226
778415
884543

query I rowsort
SELECT ALL - ( + cor0.col0 ) FROM tab2 AS cor0
----
-7
-78
-79

query I rowsort
SELECT - 82 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to ce62f59690969f4492d78eb57c3181f0

query I rowsort
SELECT DISTINCT col1 + + col1 * - cor0.col0 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT DISTINCT - + col1 * + col1 FROM tab2 cor0
----
-289
-3481
-961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * ( - ( col0 ) * + col0 + cor0.col1 ) col0 FROM tab1 AS cor0
----
-442
40860
83031

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2897
SELECT ALL + col1 + + CAST( - col2 AS SIGNED ) * col0 FROM tab1 AS cor0
----
-136
-3638
-7667

skipif mysql # not compatible
query I rowsort label-2897
SELECT ALL + col1 + + CAST ( - col2 AS INTEGER ) * col0 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT + cor0.col1 * + col0 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2899
SELECT col2 * CAST( col1 * col0 + col2 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
109056
39729
7128

skipif mysql # not compatible
query I rowsort label-2899
SELECT col2 * CAST ( col1 * col0 + col2 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
109056
39729
7128

query I rowsort
SELECT ALL 60 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 1d2ab302ae60f95b15e68cf89083b162

query I rowsort
SELECT - cor0.col2 + - col2 AS col0 FROM tab2 AS cor0
----
-52
-54
-76

query I rowsort
SELECT ALL 21 + col1 FROM tab1
----
31
34
47

query I rowsort
SELECT ALL + 65 * + ( cor1.col1 ) AS col1 FROM tab0 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 39013cbc2b01c7afe2a236f2b862e670

query I rowsort
SELECT DISTINCT col0 * - tab0.col2 AS col1 FROM tab0
----
-35
-7298
-792

query I rowsort
SELECT ALL + col2 + cor0.col2 * - col1 + col0 AS col0 FROM tab2 AS cor0
----
-1430
-529
-803

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 - - ( col1 ) col1 FROM tab0 cor0
----
172
182
194

query I rowsort
SELECT 73 * cor0.col1 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 4ab751d3e3fdb06af24c057b0ef085e2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + 47 col1 FROM tab0 cor0
----
129
48
80

query I rowsort
SELECT + 62 AS col0 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 4911b1417a3797d23dd8f38b6ed05c1b

query I rowsort
SELECT col0 * col1 + col2 * col2 AS col2 FROM tab0
----
14823
3153
3396

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - col1 + - col2 + col1 col0 FROM tab1 AS cor0
----
-147
-252
-704

query I rowsort
SELECT - 38 * - col0 * 58 + + 54 FROM tab2 AS cor0
----
15482
171966
174170

query I rowsort
SELECT 68 AS col2 FROM tab2, tab2 cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

query I rowsort
SELECT + 84 FROM tab2, tab2 AS cor0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2915
SELECT CAST( NULL AS DECIMAL ) * - col0 + + col1 AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2915
SELECT CAST ( NULL AS REAL ) * - col0 + + col1 AS col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - ( col2 ) * col2 FROM tab1
----
-2916
-3249
-9216

query I rowsort
SELECT DISTINCT cor0.col0 * 55 AS col1 FROM tab2, tab1 cor0
----
165
3520
4400

onlyif mysql # use DIV operator for integer division
query I rowsort label-2918
SELECT - 5 DIV - col0 + col0 * col0 FROM tab2
----
49
6084
6241

skipif mysql # not compatible
query I rowsort label-2918
SELECT - 5 / - col0 + col0 * col0 FROM tab2
----
49
6084
6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-2919
SELECT + - 60 DIV + col2 AS col1 FROM tab0 AS cor0
----
-1
-60
0

skipif mysql # not compatible
query I rowsort label-2919
SELECT + - 60 / + col2 AS col1 FROM tab0 AS cor0
----
-1
-60
0

query I rowsort
SELECT DISTINCT - col0 + + tab2.col1 * + ( 79 * + col1 ) AS col2 FROM tab2
----
22752
274921
75912

query I rowsort
SELECT ALL 93 * - col1 FROM tab1 AS cor0
----
-1209
-2418
-930

onlyif mysql # use DIV operator for integer division
query I rowsort label-2922
SELECT + col2 DIV col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-2922
SELECT + col2 / col1 AS col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + ( + col1 ) * - 56 FROM tab0 AS cor0
----
-4816
-5096
-5432

query I rowsort
SELECT DISTINCT + col0 + + cor0.col0 * col0 * col0 AS col0 FROM tab1 AS cor0
----
262208
30
512080

onlyif mysql # use DIV operator for integer division
query I rowsort label-2925
SELECT ALL + col2 + col1 DIV + ( + col0 ) FROM tab2 AS cor0
----
26
31
38

skipif mysql # not compatible
query I rowsort label-2925
SELECT ALL + col2 + col1 / + ( + col0 ) FROM tab2 AS cor0
----
26
31
38

query I rowsort
SELECT ALL 20 FROM tab1 AS cor0
----
20
20
20

query I rowsort
SELECT + col0 * col0 + col1 * col1 AS col1 FROM tab1 cor0
----
4196
6569
685

query I rowsort
SELECT DISTINCT + 66 + - cor0.col1 FROM tab0 AS cor0
----
-20
-25
-31

query I rowsort
SELECT - 47 * cor0.col1 FROM tab1 AS cor0
----
-1222
-470
-611

onlyif mysql # use DIV operator for integer division
query I rowsort label-2930
SELECT DISTINCT cor0.col1 DIV col2 AS col0 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-2930
SELECT DISTINCT cor0.col1 / col2 AS col0 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT ALL + col0 * col2 AS col1 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT ALL + 55 + col1 FROM tab1
----
65
68
81

query I rowsort
SELECT - 49 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to adfccb10c9468825d9961e3613140f89

query I rowsort
SELECT DISTINCT ( + col2 ) + col1 FROM tab2
----
55
58
85

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab2, tab0 cor0, tab0 AS cor1
----
972 values hashing to 09b120a8ff13ebafea7af10c2152241b

query I rowsort
SELECT DISTINCT col0 + - col2 * - tab0.col2 AS col2 FROM tab0
----
1113
36
6813

query I rowsort
SELECT - ( col1 ) * 41 AS col1 FROM tab2 AS cor0
----
-1271
-2419
-697

query I rowsort
SELECT ALL - col2 * - cor0.col1 + + ( + 28 ) * col1 AS col1 FROM tab1 AS cor0
----
1612
2132
850

query I rowsort
SELECT DISTINCT 85 * + col2 AS col0 FROM tab1
----
4590
4845
8160

query I rowsort
SELECT ALL + 4 + - 87 FROM tab0, tab1 AS cor0, tab1 cor1
----
27 values hashing to 77a48ad722db122f51d5ef36604ad843

query I rowsort
SELECT + + col0 + col0 * + col0 FROM tab0 AS cor0
----
1260
600
8010

query I rowsort
SELECT ALL - ( - col0 ) * + col0 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT DISTINCT col0 + ( 40 ) + + col0 AS col0 FROM tab0 AS cor0
----
110
218
88

query I rowsort
SELECT + col2 + - 8 AS col1 FROM tab2 AS cor0
----
18
19
30

query I rowsort
SELECT ALL 68 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 599bee15ac4cc39b859854e07dfe7990

onlyif mysql # use DIV operator for integer division
query I rowsort label-2946
SELECT col1 + col2 DIV 26 col2 FROM tab0 AS cor0
----
87
94
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-2946
SELECT col1 + col2 / 26 col2 FROM tab0 AS cor0
----
87
94
97

query I rowsort
SELECT ALL + - col1 * + ( + col1 ) FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT DISTINCT col0 * cor0.col1 + + 0 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-2949
SELECT DISTINCT + + col0 + 72 DIV 81 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-2949
SELECT DISTINCT + + col0 + 72 / 81 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL + 40 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to e4d10f7d6c34a281f524e45e82ebd2a0

query I rowsort
SELECT col2 * - col0 + - 34 AS col0 FROM tab2
----
-2062
-223
-3036

query I rowsort
SELECT col0 * 4 + 68 * col1 AS col0 FROM tab0 AS cor0
----
5944
6544
6736

query I rowsort
SELECT + + col0 * + col1 + - 34 FROM tab2 AS cor0
----
1309
183
4568

onlyif mysql # use DIV operator for integer division
query I rowsort label-2954
SELECT - col0 * CAST( - col0 AS SIGNED ) DIV cor0.col2 FROM tab0 AS cor0
----
1225
17
96

skipif mysql # not compatible
query I rowsort label-2954
SELECT - col0 * CAST ( - col0 AS INTEGER ) / cor0.col2 FROM tab0 AS cor0
----
1225
17
96

query I rowsort
SELECT - cor0.col1 * col1 * col0 FROM tab2 AS cor0
----
-22831
-271518
-6727

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2956
SELECT ALL - + CAST( NULL AS SIGNED ) * 79 * + col2 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-2956
SELECT ALL - + CAST ( NULL AS INTEGER ) * 79 * + col2 col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 35 FROM tab0, tab1 AS cor0
----
9 values hashing to c12e8bdd687c9040a5600dab3b6adf5b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col1 + + cor0.col0 col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL + - cor0.col1 + ( col2 ) * - cor0.col1 * + ( col1 ) AS col2 FROM tab2 AS cor0
----
-10999
-25978
-90565

query I rowsort
SELECT DISTINCT + col2 + 44 - + col1 FROM tab0 AS cor0
----
-52
-9
35

query I rowsort
SELECT DISTINCT - 10 + col0 FROM tab1 AS cor0
----
-7
54
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-2962
SELECT ALL col2 DIV + col0 + col2 + ( col2 ) * + col0 FROM tab1 AS cor0
----
234
3705
7777

skipif mysql # not compatible
query I rowsort label-2962
SELECT ALL col2 / + col0 + col2 + ( col2 ) * + col0 FROM tab1 AS cor0
----
234
3705
7777

query I rowsort
SELECT - 32 * - col1 FROM tab0 AS cor0
----
2752
2912
3104

query I rowsort
SELECT ALL - col1 + col2 + col1 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - + col2 * 35 AS col0 FROM tab2 cor0
----
-1330
-910
-945

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2966
SELECT ALL - CAST( NULL AS SIGNED ) + col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2966
SELECT ALL - CAST ( NULL AS INTEGER ) + col1 AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 * - cor0.col2 + - ( 34 ) FROM tab1 AS cor0
----
2882
3215
9182

query I rowsort
SELECT - - cor0.col0 * col0 + - 86 FROM tab2 AS cor0
----
-37
5998
6155

query I rowsort
SELECT - col0 * 65 AS col2 FROM tab0
----
-1560
-2275
-5785

query I rowsort
SELECT ALL col0 + + cor0.col1 * - ( + col0 ) FROM tab2 cor0
----
-1264
-210
-4524

query I rowsort
SELECT + col2 * col0 + col2 AS col2 FROM tab2 AS cor0
----
2054
216
3040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 * col2 + cor0.col0 col0 FROM tab0 AS cor0
----
1113
36
6813

query I rowsort
SELECT ALL - ( + tab2.col0 ) FROM tab2
----
-7
-78
-79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2974
SELECT DISTINCT - CAST( NULL AS DECIMAL ) * + tab1.col0 * col0 - ( + ( col1 ) + - CAST( NULL AS DECIMAL ) ) * 90 / col1 AS col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-2974
SELECT DISTINCT - CAST ( NULL AS REAL ) * + tab1.col0 * col0 - ( + ( col1 ) + - CAST ( NULL AS REAL ) ) * 90 / col1 AS col1 FROM tab1
----
NULL

query I rowsort
SELECT + col2 + + col1 + + col1 * ( 85 ) AS col2 FROM tab0
----
7429
7908
8343

query I rowsort
SELECT + col1 - - 15 * + col0 AS col0 FROM tab0
----
1426
446
622

query I rowsort
SELECT DISTINCT + 55 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
55

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2978
SELECT + col1 + CAST( NULL AS SIGNED ) * + col0 + col2 * + 39 * col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-2978
SELECT + col1 + CAST ( NULL AS INTEGER ) * + col0 + col2 * + 39 * col2 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT 47 AS col0 FROM tab0 AS cor0
----
47
47
47

query I rowsort
SELECT + 75 AS col1 FROM tab0 AS cor0
----
75
75
75

onlyif mysql # use DIV operator for integer division
query I rowsort label-2981
SELECT cor0.col0 DIV + 36 AS col1 FROM tab0 AS cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-2981
SELECT cor0.col0 / + 36 AS col1 FROM tab0 AS cor0
----
0
0
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + col2 * col0 col0 FROM tab1 AS cor0
----
216
3705
7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-2983
SELECT - - ( + col0 ) DIV - col1 AS col1 FROM tab1 AS cor0
----
-6
-6
0

skipif mysql # not compatible
query I rowsort label-2983
SELECT - - ( + col0 ) / - col1 AS col1 FROM tab1 AS cor0
----
-6
-6
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-2984
SELECT + + col1 DIV - 85 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-2984
SELECT + + col1 / - 85 col1 FROM tab0 AS cor0
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * - col0 * col0 col1 FROM tab0 AS cor0
----
-1225
-19008
-649522

query I rowsort
SELECT - ( - tab1.col1 ) FROM tab1, tab2 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT ALL col2 + - col1 AS col2 FROM tab1 cor0
----
28
47
83

query I rowsort
SELECT ALL - + 49 + + col2 AS col2 FROM tab1 AS cor0
----
47
5
8

query I rowsort
SELECT + - cor0.col0 * ( + cor0.col0 ) FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT 76 * - col1 + - ( - col2 ) * + col2 FROM tab0 cor0
----
-192
-5447
-7371

onlyif mysql # use DIV operator for integer division
query I rowsort label-2991
SELECT + + col2 + cor0.col1 DIV CAST( + col0 * col0 + CAST( col2 AS SIGNED ) AS SIGNED ) FROM tab0 AS cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-2991
SELECT + + col2 + cor0.col1 / CAST ( + col0 * col0 + CAST ( col2 AS INTEGER ) AS INTEGER ) FROM tab0 AS cor0
----
1
33
82

query I rowsort
SELECT ( - cor0.col2 ) * 21 + - 18 AS col0 FROM tab2 AS cor0
----
-564
-585
-816

query I rowsort
SELECT ( col0 + col2 ) * col2 * col0 FROM tab0
----
1247958
1260
45144

query I rowsort
SELECT + ( + col0 ) + - col0 + col2 AS col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT - col2 * col0 + + col0 AS col2 FROM tab0 AS cor0
----
-7209
-768
0

query I rowsort
SELECT - + col1 + - col1 * col0 AS col2 FROM tab2 AS cor0
----
-1360
-248
-4661

query I rowsort
SELECT - + cor1.col2 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-2998
SELECT CAST( NULL AS SIGNED ) + 17 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-2998
SELECT CAST ( NULL AS INTEGER ) + 17 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 67 col2 FROM tab2, tab2 AS cor0
----
9 values hashing to fbe03b15d6b951410b38f7e98895006f

query I rowsort
SELECT ALL - col0 * 14 * 36 AS col1 FROM tab2 AS cor0
----
-3528
-39312
-39816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - 79 col2 FROM tab1 AS cor0
----
-1027
-2054
-790

onlyif mysql # use DIV operator for integer division
query I rowsort label-3002
SELECT DISTINCT + col0 * 66 DIV + col2 FROM tab1 cor0
----
3
55
74

skipif mysql # not compatible
query I rowsort label-3002
SELECT DISTINCT + col0 * 66 / + col2 FROM tab1 cor0
----
3
55
74

query I rowsort
SELECT + col0 + col0 + cor0.col0 * + cor0.col1 AS col2 FROM tab2 AS cor0
----
1501
231
4758

query I rowsort
SELECT + col2 * 71 * col2 + col1 + cor0.col2 AS col1 FROM tab1 AS cor0
----
207116
230746
654445

query I rowsort
SELECT ALL + - col2 + ( col0 ) - + col0 AS col1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT + col1 + - cor0.col2 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT + + col1 + - 50 FROM tab2 AS cor0
----
-19
-33
9

query I rowsort
SELECT DISTINCT col0 * + 80 FROM tab2 cor0
----
560
6240
6320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 82 col2 FROM tab1
----
82
82
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3010
SELECT ALL + col1 * CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3010
SELECT ALL + col1 * CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 + + 72 + + ( + col2 ) AS col0 FROM tab1 AS cor0
----
123
65
88

query I rowsort
SELECT DISTINCT + - col2 * col2 * col2 FROM tab2 AS cor0
----
-17576
-19683
-54872

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3013
SELECT tab2.col0 - - CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3013
SELECT tab2.col0 - - CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT 48 AS col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 8b09cc2c99c2102036162d063e0e5a4b

query I rowsort
SELECT - ( 85 ) FROM tab2 AS cor0
----
-85
-85
-85

query I rowsort
SELECT ALL - 26 AS col0 FROM tab0 AS cor0
----
-26
-26
-26

query I rowsort
SELECT - cor0.col2 * 12 + + col1 FROM tab0 cor0
----
-310
-893
85

query I rowsort
SELECT ALL - col0 + - ( col2 + - col2 ) FROM tab2
----
-7
-78
-79

query I rowsort
SELECT col1 + col1 * col1 * + col1 FROM tab1
----
1010
17602
2210

query I rowsort
SELECT tab1.col1 + col1 * ( tab1.col2 ) * - col2 AS col0 FROM tab1
----
-119795
-32480
-75790

query I rowsort
SELECT DISTINCT col1 + + 27 FROM tab0
----
113
118
124

query I rowsort
SELECT ALL + 73 * col0 FROM tab2 cor0
----
511
5694
5767

query I rowsort
SELECT DISTINCT - + ( + cor0.col0 ) FROM tab1 AS cor0
----
-3
-64
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 * + col1 col1 FROM tab2 cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 14 col2 FROM tab1, tab0 AS cor0
----
14

query I rowsort
SELECT ALL 80 FROM tab0, tab1 AS cor0 CROSS JOIN tab2
----
27 values hashing to 6dd5038be71dffa82f5ceba787caab91

query I rowsort
SELECT 83 - + col1 FROM tab1
----
57
70
73

query I rowsort
SELECT DISTINCT + 8 + + col2 * - ( + col2 ) AS col1 FROM tab2
----
-1436
-668
-721

query I rowsort
SELECT col1 * - col2 - + ( + col0 ) * col0 AS col2 FROM tab2
----
-6887
-7618
-886

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( + col1 ) + col0 + - tab1.col2 col0 FROM tab1
----
-25
-3
17

query I rowsort
SELECT + ( col0 ) * ( - col2 + col0 ) FROM tab2
----
-140
3239
4056

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 65 * - col1 col0 FROM tab0 AS cor0
----
-5590
-5915
-6305

query I rowsort
SELECT col0 + cor0.col1 * col2 * + 68 FROM tab1 AS cor0
----
38824
84944
95475

query I rowsort
SELECT DISTINCT - 69 * - col2 AS col0 FROM tab1 AS cor0
----
3726
3933
6624

query I rowsort
SELECT - 50 * col2 AS col1 FROM tab2 AS cor0
----
-1300
-1350
-1900

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + + col1 * + col1 + + col0 * + col2 col1 FROM tab0 AS cor0
----
15661
8221
9445

query I rowsort
SELECT DISTINCT - 31 * col0 * + ( + col1 ) FROM tab2 AS cor0
----
-142662
-41633
-6727

query I rowsort
SELECT DISTINCT - - col2 * - cor0.col0 + - col1 AS col1 FROM tab0 AS cor0
----
-132
-7389
-878

query I rowsort
SELECT ALL - col2 + col0 * col1 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT DISTINCT col2 * - 8 FROM tab0 AS cor0
----
-264
-656
-8

query I rowsort
SELECT DISTINCT + 15 * col2 * col2 + - 27 FROM tab1 AS cor0
----
138213
43713
48708

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3042
SELECT + CAST( - col1 AS SIGNED ) + col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3042
SELECT + CAST ( - col1 AS INTEGER ) + col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + ( cor0.col2 ) + col0 AS col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL + col0 * + ( - col1 ) AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT DISTINCT - + col2 * 59 FROM tab2 AS cor0
----
-1534
-1593
-2242

onlyif mysql # use DIV operator for integer division
query I rowsort label-3046
SELECT DISTINCT - 11 DIV + 7 FROM tab0 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-3046
SELECT DISTINCT - 11 / + 7 FROM tab0 AS cor0
----
-1

query I rowsort
SELECT ALL + col0 * ( + cor0.col0 ) + - 43 AS col0 FROM tab0 AS cor0
----
1182
533
7878

query I rowsort
SELECT ALL - + col1 + - 72 FROM tab1 cor0
----
-82
-85
-98

query I rowsort
SELECT + - 64 + - 87 AS col0 FROM tab0 AS cor0
----
-151
-151
-151

onlyif mysql # use DIV operator for integer division
query I rowsort label-3050
SELECT DISTINCT + 14 + 56 * col1 DIV + ( + col2 ) AS col1 FROM tab1 AS cor0
----
21
23
40

skipif mysql # not compatible
query I rowsort label-3050
SELECT DISTINCT + 14 + 56 * col1 / + ( + col2 ) AS col1 FROM tab1 AS cor0
----
21
23
40

query I rowsort
SELECT DISTINCT + 34 AS col0 FROM tab2 cor0
----
34

query I rowsort
SELECT ALL - col2 - - 43 AS col0 FROM tab2 AS cor0
----
16
17
5

query I rowsort
SELECT 44 + col2 FROM tab0 AS cor0
----
126
45
77

query I rowsort
SELECT ALL + - 76 - col0 AS col2 FROM tab0 AS cor0
----
-100
-111
-165

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - col1 + - col1 col0 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + ( + 70 ) AS col0 FROM tab2 AS cor0
----
70
70
70

query I rowsort
SELECT DISTINCT + col1 + + col2 * col2 + col0 FROM tab1 AS cor0
----
2945
3323
9309

query I rowsort
SELECT ALL - ( + 2 ) FROM tab0 AS cor0
----
-2
-2
-2

query I rowsort
SELECT + + ( + 68 ) * - cor0.col2 + - col2 AS col1 FROM tab1 cor0
----
-3726
-3933
-6624

onlyif mysql # use DIV operator for integer division
query I rowsort label-3060
SELECT ALL - - ( - 31 ) DIV col1 + ( - ( col1 ) ) * col1 FROM tab1 AS cor0
----
-103
-171
-677

skipif mysql # not compatible
query I rowsort label-3060
SELECT ALL - - ( - 31 ) / col1 + ( - ( col1 ) ) * col1 FROM tab1 AS cor0
----
-103
-171
-677

query I rowsort
SELECT - - col0 + - col0 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT col0 * col1 + + cor0.col2 AS col1 FROM tab0 AS cor0
----
2097
3396
8181

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 20 col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 0a35fe98f3e7d5fc8ff2ae815bd20ef4

query I rowsort
SELECT DISTINCT + col2 * + col1 + ( - col1 + - col2 ) FROM tab0 AS cor0
----
-1
2719
7289

query I rowsort
SELECT - + col2 + + col2 AS col2 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col1 * col0 + - col1 + col2 FROM tab1 cor0
----
106
1123
687

query I rowsort
SELECT DISTINCT + + col1 * + cor0.col0 AS col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT - 31 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
-31

query I rowsort
SELECT ALL col0 + + 6 AS col1 FROM tab0
----
30
41
95

query I rowsort
SELECT ALL + cor1.col2 FROM tab0, tab0 AS cor0, tab2 cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT DISTINCT col2 + 84 AS col0 FROM tab2 AS cor0
----
110
111
122

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col2 + + cor0.col2 - col2 col1 FROM tab2 AS cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col1 * 64 - + 8 col0 FROM tab1 cor0
----
1656
632
824

query I rowsort
SELECT ALL - col0 * col2 * - col0 + col2 AS col1 FROM tab1 AS cor0
----
233529
540
614496

query I rowsort
SELECT + 98 * - tab2.col0 + col0 * + col1 * col2 FROM tab2
----
112008
43292
5173

query I rowsort
SELECT ( - cor1.col2 ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT ALL - + col0 * col0 AS col0 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT + + col1 + + cor0.col2 AS col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL col0 * tab0.col1 - - 24 * tab0.col0 * tab0.col2 FROM tab0
----
183251
21072
4235

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 - ( col1 * col0 ) col2 FROM tab2
----
-1305
-190
-4576

query I rowsort
SELECT + col1 * + ( col0 ) + col1 * col2 * - ( col0 ) - + col2 AS col1 FROM tab2
----
-115076
-49729
-5669

query I rowsort
SELECT DISTINCT - col1 * + col1 AS col0 FROM tab0 AS cor0
----
-7396
-8281
-9409

query I rowsort
SELECT + ( + col2 ) * + col0 - col1 * + col0 AS col2 FROM tab0 AS cor0
----
-1272
-3360
-801

query I rowsort
SELECT - cor0.col2 AS col2 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to f9d4bb8677db7b98c7ed89d06e6e8cd6

query I rowsort
SELECT col0 * ( tab1.col1 * col0 ) FROM tab1
----
234
40960
83200

query I rowsort
SELECT col2 * - ( col2 + tab2.col0 ) FROM tab2
----
-2704
-4446
-918

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3087
SELECT DISTINCT + col2 * CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3087
SELECT DISTINCT + col2 * CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT 30 AS col0 FROM tab1, tab1 AS cor0
----
30

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3089
SELECT DISTINCT + col1 + - CAST( + ( col0 ) AS SIGNED ) FROM tab1
----
-54
-67
23

skipif mysql # not compatible
query I rowsort label-3089
SELECT DISTINCT + col1 + - CAST ( + ( col0 ) AS INTEGER ) FROM tab1
----
-54
-67
23

query I rowsort
SELECT col2 + ( + 55 ) * col2 FROM tab0
----
1848
4592
56

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3091
SELECT DISTINCT + col2 + CAST( 92 AS SIGNED ) * col1 AS col0 FROM tab0
----
7945
8454
8925

skipif mysql # not compatible
query I rowsort label-3091
SELECT DISTINCT + col2 + CAST ( 92 AS INTEGER ) * col1 AS col0 FROM tab0
----
7945
8454
8925

query I rowsort
SELECT col1 * 1 + + col2 AS col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT 41 AS col1 FROM tab1 AS cor0
----
41
41
41

query I rowsort
SELECT - + 54 * col0 AS col2 FROM tab2 AS cor0
----
-378
-4212
-4266

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col0 + cor0.col0 * + cor0.col0 col2 FROM tab0, tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT - col1 + 73 * col0 FROM tab1 cor0
----
193
4662
5827

query I rowsort
SELECT DISTINCT col0 * + 80 FROM tab0
----
1920
2800
7120

onlyif mysql # use DIV operator for integer division
query I rowsort label-3098
SELECT CAST( - col2 AS SIGNED ) DIV + tab0.col2 AS col2 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3098
SELECT CAST ( - col2 AS INTEGER ) / + tab0.col2 AS col2 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT col0 * tab0.col1 * tab0.col1 + - tab0.col0 FROM tab0
----
177480
329280
736920

query I rowsort
SELECT col0 + + 90 * + col1 FROM tab2
----
1609
2797
5388

query I rowsort
SELECT + col1 * 38 + - col1 FROM tab2 AS cor0
----
1147
2183
629

query I rowsort
SELECT DISTINCT - - col0 * - 13 + + col1 + col1 AS col2 FROM tab2 AS cor0
----
-29
-896
-993

query I rowsort
SELECT - - col0 * 5 FROM tab2 AS cor0
----
35
390
395

query I rowsort
SELECT cor0.col0 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

onlyif mysql # use DIV operator for integer division
query I rowsort label-3105
SELECT CAST( - col1 + col2 AS SIGNED ) DIV + col1 FROM tab2
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3105
SELECT CAST ( - col1 + col2 AS INTEGER ) / + col1 FROM tab2
----
0
0
1

query I rowsort
SELECT - 85 AS col0 FROM tab0, tab0 cor0
----
9 values hashing to 8ebc8ffafb1517ea04e3a6fc4059d88a

query I rowsort
SELECT ALL - ( 15 ) FROM tab2 cor0
----
-15
-15
-15

query I rowsort
SELECT - tab2.col1 + - tab2.col2 FROM tab2, tab0 AS cor0
----
9 values hashing to a464155f1f6cb07f325fb0d7a4ec61f2

query I rowsort
SELECT 4 * - col2 * + col0 + + tab1.col2 AS col1 FROM tab1
----
-14535
-30624
-594

query I rowsort
SELECT ALL - 36 * col2 FROM tab0
----
-1188
-2952
-36

query I rowsort
SELECT + 78 * - cor0.col2 FROM tab0 AS cor0
----
-2574
-6396
-78

query I rowsort
SELECT DISTINCT - col2 + col0 AS col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT + col2 * ( - cor0.col2 ) AS col0 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT ALL + col2 + - col0 + col0 * - col0 AS col0 FROM tab0 AS cor0
----
-1259
-567
-7928

onlyif mysql # use DIV operator for integer division
query I rowsort label-3115
SELECT ALL + cor0.col1 DIV col0 AS col0 FROM tab2 AS cor0
----
0
0
4

skipif mysql # not compatible
query I rowsort label-3115
SELECT ALL + cor0.col1 / col0 AS col0 FROM tab2 AS cor0
----
0
0
4

query I rowsort
SELECT 61 + cor0.col0 AS col2 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 10a7e6ebd82f4bb4c9f8a1371786b92a

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-3118
SELECT + col2 * CAST( col0 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-3118
SELECT + col2 * CAST ( col0 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-3119
SELECT ALL - col2 + - 65 DIV 2 AS col0 FROM tab0 AS cor0
----
-114
-33
-65

skipif mysql # not compatible
query I rowsort label-3119
SELECT ALL - col2 + - 65 / 2 AS col0 FROM tab0 AS cor0
----
-114
-33
-65

onlyif mysql # use DIV operator for integer division
query I rowsort label-3120
SELECT ALL + 73 DIV + col0 FROM tab0
----
0
2
3

skipif mysql # not compatible
query I rowsort label-3120
SELECT ALL + 73 / + col0 FROM tab0
----
0
2
3

query I rowsort
SELECT DISTINCT - col1 * + ( col1 ) + + cor0.col0 AS col2 FROM tab0 cor0
----
-7372
-8192
-9374

query I rowsort
SELECT ALL - - col1 * + 52 AS col1 FROM tab0 AS cor0
----
4472
4732
5044

query I rowsort
SELECT + - col1 + ( - 87 ) * col2 AS col2 FROM tab1 AS cor0
----
-4724
-4969
-8365

onlyif mysql # use DIV operator for integer division
query I rowsort label-3124
SELECT ALL + col2 DIV + col2 AS col2 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3124
SELECT ALL + col2 / + col2 AS col2 FROM tab0
----
1
1
1

query I rowsort
SELECT ALL + 20 * - col2 AS col1 FROM tab2
----
-520
-540
-760

onlyif mysql # use DIV operator for integer division
query I rowsort label-3126
SELECT + col2 DIV 29 AS col0 FROM tab0 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-3126
SELECT + col2 / 29 AS col0 FROM tab0 AS cor0
----
0
1
2

onlyif mysql # use DIV operator for integer division
query I rowsort label-3127
SELECT col2 * col0 DIV + col2 FROM tab0 AS cor0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3127
SELECT col2 * col0 / + col2 FROM tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL col1 * + 1 FROM tab1
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * - ( + col1 ) col1 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT + col0 + + ( - col2 ) AS col1 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT - col0 * - 35 FROM tab1 cor0
----
105
2240
2800

query I rowsort
SELECT + col2 * - tab0.col1 + - col1 * col0 AS col0 FROM tab0
----
-15561
-3492
-4902

query I rowsort
SELECT ALL - col0 * - col2 + - col2 AS col2 FROM tab2
----
162
2002
2964

query I rowsort
SELECT - tab2.col0 * col0 + col2 FROM tab2
----
-22
-6058
-6203

query I rowsort
SELECT DISTINCT col0 - + col0 * tab0.col1 FROM tab0
----
-2040
-3360
-8010

query I rowsort
SELECT ALL col1 - col2 * tab0.col1 AS col1 FROM tab0
----
-2752
-7371
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3137
SELECT DISTINCT + col1 DIV - tab2.col0 FROM tab2
----
-4
0

skipif mysql # not compatible
query I rowsort label-3137
SELECT DISTINCT + col1 / - tab2.col0 FROM tab2
----
-4
0

query I rowsort
SELECT + col0 * - col1 + col2 AS col1 FROM tab1
----
-24
-583
-944

onlyif mysql # use DIV operator for integer division
query I rowsort label-3139
SELECT DISTINCT + col2 DIV tab1.col2 AS col2 FROM tab1
----
1

skipif mysql # not compatible
query I rowsort label-3139
SELECT DISTINCT + col2 / tab1.col2 AS col2 FROM tab1
----
1

query I rowsort
SELECT - col2 + - col0 AS col2 FROM tab1
----
-121
-176
-57

query I rowsort
SELECT tab1.col1 * col1 + - col2 AS col0 FROM tab1
----
43
622
73

query I rowsort
SELECT - col2 + col1 + col0 * col1 * col0 AS col2 FROM tab1
----
206
40913
83117

onlyif mysql # use DIV operator for integer division
query I rowsort label-3143
SELECT ALL col0 + - col1 DIV col1 + col0 * col2 AS col2 FROM tab0
----
69
7386
815

skipif mysql # not compatible
query I rowsort label-3143
SELECT ALL col0 + - col1 / col1 + col0 * col2 AS col2 FROM tab0
----
69
7386
815

query III rowsort
SELECT * FROM tab1 WHERE col2 * col0 - - col2 IN ( + col1 - col2 )
----

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL NOT IN ( - col2 )
----

query I rowsort
SELECT ALL cor0.col2 AS col0 FROM tab1, tab2 cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT - col2 * - col1 + col1 AS col1 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT - col0 + + col1 * ( 75 ) * col2 FROM tab1 AS cor0
----
105297
42686
93520

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3149
SELECT - col0 + col0 * - CAST( 83 * col0 AS SIGNED ) FROM tab0 AS cor0
----
-101710
-47832
-657532

skipif mysql # not compatible
query I rowsort label-3149
SELECT - col0 + col0 * - CAST ( 83 * col0 AS INTEGER ) FROM tab0 AS cor0
----
-101710
-47832
-657532

query I rowsort
SELECT ALL col1 * + col1 * col2 FROM tab2
----
10982
25947
90506

query I rowsort
SELECT ALL - col0 * col0 - col2 * + tab1.col0 AS col1 FROM tab1
----
-14080
-171
-7744

query I rowsort
SELECT DISTINCT + col1 * col2 + + col1 FROM tab0
----
194
2924
7553

query I rowsort
SELECT col0 * tab2.col0 + col0 * col2 FROM tab2
----
238
8112
9243

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 - col0 col2 FROM tab2 WHERE NULL <= ( NULL )
----

query I rowsort
SELECT - 33 * col0 + col0 AS col2 FROM tab1 cor0
----
-2048
-2560
-96

query I rowsort
SELECT col2 - cor0.col0 AS col0 FROM tab0 cor0
----
-34
-7
9

query I rowsort
SELECT - 36 + col0 * col2 AS col2 FROM tab1 cor0
----
126
3612
7644

query I rowsort
SELECT + + col0 + col1 AS col1 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT - - col2 + cor0.col1 AS col0 FROM tab2 AS cor0
----
55
58
85

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + col1 + - col1 col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT ALL - col0 + + col1 * - cor0.col0 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT DISTINCT + - cor0.col2 * + col1 * - col1 AS col1 FROM tab1 AS cor0
----
16224
36504
5700

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 * col1 + col1 col1 FROM tab2 AS cor0
----
-272
-3422
-930

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 * + col0 col0 FROM tab0 cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-3165
SELECT col2 * 8 DIV col1 AS col0 FROM tab2
----
17
3
6

skipif mysql # not compatible
query I rowsort label-3165
SELECT col2 * 8 / col1 AS col0 FROM tab2
----
17
3
6

query I rowsort
SELECT DISTINCT + + col2 * col2 AS col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT + + 97 + + col2 FROM tab1 AS cor0
----
151
154
193

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * - col1 * col1 col0 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT + col1 - col2 * 16 FROM tab1 AS cor0
----
-1523
-838
-902

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3170
SELECT DISTINCT + - col1 * + col1 + CAST( col2 AS SIGNED ) FROM tab2 cor0
----
-251
-3455
-934

skipif mysql # not compatible
query I rowsort label-3170
SELECT DISTINCT + - col1 * + col1 + CAST ( col2 AS INTEGER ) FROM tab2 cor0
----
-251
-3455
-934

query I rowsort
SELECT DISTINCT col1 + col1 * 48 * + col0 AS col0 FROM tab2 AS cor0
----
10447
220955
64481

query I rowsort
SELECT + 44 * + col2 + col0 AS col0 FROM tab2 AS cor0
----
1195
1222
1751

onlyif mysql # use DIV operator for integer division
query I rowsort label-3173
SELECT ALL col2 DIV + cor0.col0 AS col0 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-3173
SELECT ALL col2 / + cor0.col0 AS col0 FROM tab1 AS cor0
----
0
1
18

query I rowsort
SELECT DISTINCT - col1 + 97 AS col2 FROM tab0 AS cor0
----
0
11
6

query I rowsort
SELECT - tab2.col0 FROM tab2, tab0 AS cor0, tab0 cor1
----
27 values hashing to c82df1de3cb666224690a83f3d790d79

onlyif mysql # use DIV operator for integer division
query I rowsort label-3176
SELECT cor0.col2 DIV cor1.col2 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to bbec2c96ace11072d5841e73ddcda6e3

skipif mysql # not compatible
query I rowsort label-3176
SELECT cor0.col2 / cor1.col2 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to bbec2c96ace11072d5841e73ddcda6e3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3177
SELECT ALL - cor0.col0 * 37 + + col0 + + col1 * - CAST( NULL AS DECIMAL ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3177
SELECT ALL - cor0.col0 * 37 + + col0 + + col1 * - CAST ( NULL AS REAL ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + col1 * + col1 + + 29 FROM tab1 AS cor0
----
129
198
705

query I rowsort
SELECT DISTINCT - col2 + - ( col2 ) AS col2 FROM tab0 AS cor0
----
-164
-2
-66

query I rowsort
SELECT col0 + ( - ( cor0.col1 ) ) AS col0 FROM tab1 AS cor0
----
-23
54
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-3181
SELECT + + col0 DIV - 4 + ( cor0.col0 ) FROM tab0 AS cor0
----
18
27
67

skipif mysql # not compatible
query I rowsort label-3181
SELECT + + col0 / - 4 + ( cor0.col0 ) FROM tab0 AS cor0
----
18
27
67

query I rowsort
SELECT DISTINCT + + col0 * - col2 - col0 AS col2 FROM tab2 cor0
----
-196
-2106
-3081

query I rowsort
SELECT - 33 * + cor0.col0 AS col0 FROM tab1 AS cor0
----
-2112
-2640
-99

query I rowsort
SELECT + + col1 * 6 AS col0 FROM tab2 AS cor0
----
102
186
354

query I rowsort
SELECT ALL ( col0 ) FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT ALL 46 * + cor0.col1 FROM tab0, tab1 AS cor0
----
9 values hashing to e810b482e25d4249cd83335ba190c89b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3187
SELECT - CAST( NULL AS DECIMAL ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3187
SELECT - CAST ( NULL AS REAL ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + cor0.col2 col0 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
1
33
82

query IIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab1, tab0 cor1
----
243 values hashing to 3a953203ced079e372111d61dbd9e35f

query I rowsort
SELECT DISTINCT - + 49 FROM tab1 AS cor0
----
-49

query I rowsort
SELECT + 92 * 55 FROM tab2
----
5060
5060
5060

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3192
SELECT DISTINCT CAST( - col0 AS SIGNED ) AS col2 FROM tab0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-3192
SELECT DISTINCT CAST ( - col0 AS INTEGER ) AS col2 FROM tab0
----
-24
-35
-89

query I rowsort
SELECT ( - 26 ) FROM tab1
----
-26
-26
-26

query I rowsort
SELECT ALL + 94 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to b0ffb7527f4fbf44f30945e1ccb58c24

query I rowsort
SELECT 33 FROM tab1, tab1 AS cor0
----
9 values hashing to 620d384286e82d1c6c8b1b2b109a7da5

onlyif mysql # use DIV operator for integer division
query I rowsort label-3196
SELECT + col2 DIV - col2 col1 FROM tab1
----
-1
-1
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3196
SELECT + col2 / - col2 col1 FROM tab1
----
-1
-1
-1

query I rowsort
SELECT - col2 + + cor0.col1 AS col0 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT DISTINCT - + col2 + - col0 * col0 * - cor0.col1 AS col1 FROM tab1 AS cor0
----
180
40903
83104

query I rowsort
SELECT ALL - - col0 + col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT - cor0.col2 * col2 + - cor0.col1 AS col1 FROM tab0 AS cor0
----
-1175
-6815
-98

query I rowsort
SELECT ALL - col1 + col1 * col1 * + col2 AS col2 FROM tab0
----
243982
678951
9312

query I rowsort
SELECT col1 + + col2 * col2 - - col1 FROM tab0 AS cor0
----
1261
195
6906

onlyif mysql # use DIV operator for integer division
query I rowsort label-3203
SELECT 23 * + col0 DIV col0 FROM tab1
----
23
23
23

skipif mysql # not compatible
query I rowsort label-3203
SELECT 23 * + col0 / col0 FROM tab1
----
23
23
23

query I rowsort
SELECT col2 * + col0 + + col2 AS col0 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT ALL - 21 AS col0 FROM tab0
----
-21
-21
-21

query I rowsort
SELECT ALL 74 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

query I rowsort
SELECT + 92 AS col2 FROM tab0 cor0
----
92
92
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-3208
SELECT DISTINCT + col0 + 3 DIV - cor0.col1 AS col2 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-3208
SELECT DISTINCT + col0 + 3 / - cor0.col1 AS col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT ALL - 61 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 51f53697966a79d306a4570537cd91a1

query I rowsort
SELECT ALL + 9 * + col0 AS col0 FROM tab0 AS cor0
----
216
315
801

query I rowsort
SELECT ALL col1 - + 4 * col0 AS col1 FROM tab2 AS cor0
----
-253
-299
3

query I rowsort
SELECT ALL - 86 * + col0 * col1 AS col2 FROM tab2 cor0
----
-115498
-18662
-395772

query I rowsort
SELECT ALL - 56 + col0 AS col1 FROM tab1 cor0
----
-53
24
8

query I rowsort
SELECT - + 7 + col0 AS col1 FROM tab0 AS cor0
----
17
28
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-3215
SELECT ALL - 28 * col2 * cor0.col1 + - col1 DIV col0 FROM tab2 cor0
----
-18088
-23440
-42952

skipif mysql # not compatible
query I rowsort label-3215
SELECT ALL - 28 * col2 * cor0.col1 + - col1 / col0 FROM tab2 cor0
----
-18088
-23440
-42952

query I rowsort
SELECT + col1 * col2 + + cor0.col2 AS col0 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT DISTINCT + 59 - + col1 * + col2 AS col1 FROM tab0 AS cor0
----
-2779
-38
-7403

query I rowsort
SELECT DISTINCT - 28 + - col2 * col0 FROM tab2 AS cor0
----
-2056
-217
-3030

query I rowsort
SELECT DISTINCT + 59 FROM tab0 AS cor0
----
59

query I rowsort
SELECT ALL + - cor0.col1 * cor0.col2 + col1 AS col0 FROM tab0 cor0
----
-2752
-7371
0

query I rowsort
SELECT ALL - col0 + + col1 + col1 AS col0 FROM tab2 AS cor0
----
-45
40
55

query I rowsort
SELECT - 18 + col0 * tab0.col2 FROM tab0
----
17
7280
774

query I rowsort
SELECT ALL + 20 AS col2 FROM tab0
----
20
20
20

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3224
SELECT - CAST( NULL AS SIGNED ) + + col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3224
SELECT - CAST ( NULL AS INTEGER ) + + col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT col0 + col1 * - col1 FROM tab0
----
-7372
-8192
-9374

query I rowsort
SELECT + 77 - col0 AS col2 FROM tab1
----
-3
13
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-3227
SELECT DISTINCT CAST( 98 AS SIGNED ) DIV + col2 FROM tab1
----
1

skipif mysql # not compatible
query I rowsort label-3227
SELECT DISTINCT CAST ( 98 AS INTEGER ) / + col2 FROM tab1
----
1

query I rowsort
SELECT ALL + 30 AS col0 FROM tab2
----
30
30
30

query I rowsort
SELECT DISTINCT col2 + col2 + col2 FROM tab0 AS cor0
----
246
3
99

query III rowsort
SELECT * FROM tab2 cor0 WHERE col1 / col1 BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT col1 * cor0.col1 AS col2 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT cor0.col0 - col1 * col0 AS col1 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT col0 + + col2 * + col0 AS col1 FROM tab1
----
165
3712
7760

query III rowsort
SELECT * FROM tab2 AS cor0 WHERE NOT cor0.col2 * col0 = col2
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query III rowsort
SELECT DISTINCT * FROM tab1 cor0 WHERE NULL BETWEEN ( - col0 + + col2 * + col1 ) AND cor0.col2 * - col1
----

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE + col1 * - col2 > ( col1 * col1 )
----

query III rowsort
SELECT * FROM tab0 WHERE NULL IN ( col1 )
----

query I rowsort
SELECT DISTINCT col0 - - col2 * + col0 AS col2 FROM tab2
----
196
2106
3081

query I rowsort
SELECT - tab0.col2 * - col2 AS col0 FROM tab0
----
1
1089
6724

query I rowsort
SELECT DISTINCT - col0 * col1 - col1 FROM tab2
----
-1360
-248
-4661

query I rowsort
SELECT + tab1.col1 FROM tab1 WHERE ( + col2 ) IN ( - col2 / - col1 + tab1.col1 )
----

query I rowsort
SELECT col1 - + tab0.col2 * col1 * - col2 FROM tab0 WHERE col0 IN ( + col0 )
----
194
611975
93740

query I rowsort
SELECT - tab2.col1 * + tab2.col1 FROM tab2
----
-289
-3481
-961

query I rowsort
SELECT + col1 * + col1 + col0 FROM tab1
----
164
249
679

onlyif mysql # use DIV operator for integer division
query I rowsort label-3245
SELECT - col1 + - col2 * col1 - + col0 DIV tab1.col2 col2 FROM tab1
----
-1261
-1430
-581

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3245
SELECT - col1 + - col2 * col1 - + col0 / tab1.col2 col2 FROM tab1
----
-1261
-1430
-581

query I rowsort
SELECT - col2 + + col2 * - col2 FROM tab0
----
-1122
-2
-6806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + col2 col2 FROM tab2
----
104
117
34

query I rowsort
SELECT + col1 * - col2 * col0 + tab1.col2 AS col2 FROM tab1
----
-36423
-4158
-99744

onlyif mysql # use DIV operator for integer division
query I rowsort label-3249
SELECT DISTINCT col0 DIV + col1 + - col0 * col0 + col1 FROM tab0
----
-1128
-490
-7830

skipif mysql # not compatible
query I rowsort label-3249
SELECT DISTINCT col0 / + col1 + - col0 * col0 + col1 FROM tab0
----
-1128
-490
-7830

query I rowsort
SELECT + col1 * + col0 * - col1 AS col1 FROM tab1
----
-13520
-2028
-6400

query I rowsort
SELECT - col1 + - col0 * + col1 * + col1 FROM tab2
----
-22848
-271577
-6758

query I rowsort
SELECT DISTINCT + tab2.col0 + - tab2.col1 AS col1 FROM tab2
----
-24
19
62

query I rowsort
SELECT ALL col2 * - col0 * col2 AS col0 FROM tab0
----
-26136
-35
-598436

query I rowsort
SELECT DISTINCT + col2 * col2 * col1 FROM tab2
----
22599
24548
39884

query I rowsort
SELECT ALL col2 + - col1 FROM tab2 WHERE NOT ( NULL ) IN ( col2 )
----

query I rowsort
SELECT ALL + + cor0.col1 - - col0 * - col2 FROM tab1 AS cor0
----
-136
-3638
-7667

query I rowsort
SELECT + col1 + col2 AS col1 FROM tab1 cor0
----
109
67
80

query I rowsort
SELECT cor0.col0 + col0 * - cor0.col0 FROM tab0 AS cor0
----
-1190
-552
-7832

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 * col0 * col0 + col2 * - col0 col0 FROM tab1 AS cor0
----
-396
-44608
-90880

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + col2 * - col1 col2 FROM tab2 AS cor0
----
-1456
-567
-830

query I rowsort
SELECT - col0 * + col2 + + cor0.col0 FROM tab1 cor0
----
-159
-3584
-7600

query I rowsort
SELECT ALL col0 * col1 - col1 FROM tab2 AS cor0
----
1326
186
4543

query I rowsort
SELECT DISTINCT col1 * - cor0.col1 FROM tab2 cor0
----
-289
-3481
-961

query I rowsort
SELECT + ( + col0 ) + - col2 AS col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT + cor2.col1 AS col1 FROM tab2, tab1 AS cor0, tab2 AS cor1, tab2 AS cor2
----
81 values hashing to a5b6acb471910ea4ad7f31cae3b818f7

onlyif mysql # use DIV operator for integer division
query I rowsort label-3266
SELECT + + ( ( + col2 ) ) DIV - col0 + + col2 AS col0 FROM tab1 AS cor0
----
36
57
95

skipif mysql # not compatible
query I rowsort label-3266
SELECT + + ( ( + col2 ) ) / - col0 + + col2 AS col0 FROM tab1 AS cor0
----
36
57
95

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab2, tab0 AS cor1, tab0 cor2
----
972 values hashing to 3a31dab513390ca6bd05c71a3d9c50f0

query I rowsort
SELECT col0 + col1 + + col2 FROM tab1 cor0
----
131
189
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-3269
SELECT ALL col2 DIV - 17 col1 FROM tab0
----
-1
-4
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3269
SELECT ALL col2 / - 17 col1 FROM tab0
----
-1
-4
0

query I rowsort
SELECT DISTINCT 1 * col0 FROM tab1 cor0
----
3
64
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 82 * col1 col2 FROM tab0
----
-7052
-7462
-7954

query I rowsort
SELECT DISTINCT + ( tab2.col1 * - col1 ) + + 64 FROM tab2
----
-225
-3417
-897

query I rowsort
SELECT DISTINCT tab1.col0 + 85 AS col1 FROM tab1
----
149
165
88

query I rowsort
SELECT + - col0 * + col2 + col0 AS col1 FROM tab2 AS cor0
----
-182
-1950
-2923

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3275
SELECT CAST( - col1 AS SIGNED ) + + col2 AS col0 FROM tab0
----
-53
-9
-96

skipif mysql # not compatible
query I rowsort label-3275
SELECT CAST ( - col1 AS INTEGER ) + + col2 AS col0 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT - 74 AS col0 FROM tab1, tab0 cor0, tab0 AS cor1
----
27 values hashing to 5a477330c946251f814fbbfd08e77c28

query I rowsort
SELECT - - col0 * + 36 AS col0 FROM tab2 AS cor0
----
252
2808
2844

query I rowsort
SELECT col0 * 24 FROM tab0 AS cor0
----
2136
576
840

query I rowsort
SELECT cor0.col0 * + ( - col2 ) AS col2 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-3280
SELECT DISTINCT + col1 DIV ( + col0 + col0 ) AS col1 FROM tab1 AS cor0
----
0
4

skipif mysql # not compatible
query I rowsort label-3280
SELECT DISTINCT + col1 / ( + col0 + col0 ) AS col1 FROM tab1 AS cor0
----
0
4

query I rowsort
SELECT ALL - + 96 AS col1 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to a7b3e5dd01c8929180b7ffda67f79798

query I rowsort
SELECT DISTINCT 47 FROM tab1
----
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 col0 FROM tab2, tab0, tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT col1 + col1 * ( col1 + - col1 ) AS col1 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3285
SELECT + + col1 * ( - col0 ) DIV + cor0.col1 AS col1 FROM tab2 cor0
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-3285
SELECT + + col1 * ( - col0 ) / + cor0.col1 AS col1 FROM tab2 cor0
----
-7
-78
-79

query I rowsort
SELECT col1 * 5 AS col1 FROM tab0 AS cor0
----
430
455
485

query I rowsort
SELECT ALL col0 * col1 * 31 AS col2 FROM tab1
----
19840
2418
32240

query I rowsort
SELECT DISTINCT col2 * - ( + tab0.col0 ) AS col1 FROM tab0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-3289
SELECT ALL + - col2 DIV 36 FROM tab0 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-3289
SELECT ALL + - col2 / 36 FROM tab0 AS cor0
----
-2
0
0

query I rowsort
SELECT - - ( - col0 ) - + col0 FROM tab1 AS cor0
----
-128
-160
-6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3291
SELECT - CAST( NULL AS SIGNED ) - 6 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3291
SELECT - CAST ( NULL AS INTEGER ) - 6 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 81 FROM tab1 cor0
----
81

query I rowsort
SELECT ALL cor0.col1 * col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT - col0 * col0 + cor0.col1 + col2 AS col0 FROM tab1 AS cor0
----
-4029
-6291
71

onlyif mysql # use DIV operator for integer division
query I rowsort label-3295
SELECT - - 89 DIV - col1 - col1 AS col2 FROM tab0 AS cor0
----
-87
-91
-97

skipif mysql # not compatible
query I rowsort label-3295
SELECT - - 89 / - col1 - col1 AS col2 FROM tab0 AS cor0
----
-87
-91
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + cor0.col1 col2 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT - cor0.col0 + - col1 * - col1 * ( col0 * - cor0.col0 ) FROM tab2 cor0
----
-1803728
-21178482
-47096

query I rowsort
SELECT DISTINCT + 67 AS col1 FROM tab2 AS cor0
----
67

query I rowsort
SELECT DISTINCT + 72 AS col2 FROM tab1 AS cor0
----
72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3300
SELECT - CAST( col0 AS SIGNED ) + - col0 FROM tab1 AS cor0
----
-128
-160
-6

skipif mysql # not compatible
query I rowsort label-3300
SELECT - CAST ( col0 AS INTEGER ) + - col0 FROM tab1 AS cor0
----
-128
-160
-6

query I rowsort
SELECT DISTINCT - ( col2 ) + col2 AS col0 FROM tab2 AS cor0
----
0

query I rowsort
SELECT - - col2 + col2 * + cor0.col2 * col2 FROM tab0 AS cor0
----
2
35970
551450

query I rowsort
SELECT - - col1 + - cor0.col1 + col0 AS col2 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - + col2 - ( col0 ) FROM tab2 AS cor0
----
-104
-117
-34

onlyif mysql # use DIV operator for integer division
query I rowsort label-3305
SELECT DISTINCT - + col2 DIV cor0.col0 AS col0 FROM tab2 AS cor0
----
-3
0

skipif mysql # not compatible
query I rowsort label-3305
SELECT DISTINCT - + col2 / cor0.col0 AS col0 FROM tab2 AS cor0
----
-3
0

query I rowsort
SELECT ALL + ( + col2 ) * cor0.col1 + 56 * - col0 AS col0 FROM tab2 AS cor0
----
-2834
-3778
445

query I rowsort
SELECT ALL + - 13 + col1 * cor0.col1 FROM tab2 AS cor0
----
276
3468
948

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3308
SELECT cor0.col2 + - col2 * + CAST( NULL AS SIGNED ) / + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3308
SELECT cor0.col2 + - col2 * + CAST ( NULL AS INTEGER ) / + col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3309
SELECT CAST( 4 AS SIGNED ) AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

skipif mysql # not compatible
query I rowsort label-3309
SELECT CAST ( 4 AS INTEGER ) AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 6fec965b60b9885c4af73e85422cfd9b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 90 + col1 + - ( 45 + - col2 ) col2 FROM tab1 AS cor0
----
-26
-55
-68

onlyif mysql # use DIV operator for integer division
query I rowsort label-3311
SELECT DISTINCT + col2 * col0 + col0 * + col1 DIV col1 + col1 AS col0 FROM tab0 AS cor0
----
167
7478
902

skipif mysql # not compatible
query I rowsort label-3311
SELECT DISTINCT + col2 * col0 + col0 * + col1 / col1 + col1 AS col0 FROM tab0 AS cor0
----
167
7478
902

query I rowsort
SELECT ALL - col2 * - col0 + col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT ALL + - col0 + cor0.col1 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT + 16 + col2 AS col2 FROM tab2 AS cor0
----
42
43
54

query I rowsort
SELECT ALL - 4 + col1 FROM tab0 AS cor0
----
82
87
93

query I rowsort
SELECT col1 * - col2 + - ( col2 ) AS col1 FROM tab1 AS cor0
----
-1344
-1458
-627

query I rowsort
SELECT - ( col0 ) * - col1 + col2 FROM tab2 AS cor0
----
1381
244
4628

query I rowsort
SELECT ALL - - 80 - - col2 * col2 FROM tab0 cor0
----
1169
6804
81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3319
SELECT ALL - CAST( NULL AS SIGNED ) AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3319
SELECT ALL - CAST ( NULL AS INTEGER ) AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT ALL + cor0.col0 * - col2 * ( cor0.col2 + - cor0.col1 ) AS col1 FROM tab0 AS cor0
----
3360
41976
65682

onlyif mysql # use DIV operator for integer division
query I rowsort label-3321
SELECT - col2 + + 50 DIV 67 AS col2 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-3321
SELECT - col2 + + 50 / 67 AS col2 FROM tab1 AS cor0
----
-54
-57
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3322
SELECT col2 DIV ( col2 ) 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-3322
SELECT col2 / ( col2 ) col0 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT 20 FROM tab0, tab2 AS cor0
----
9 values hashing to 2fdd942fe0307a6ff66b63004ef102c4

query I rowsort
SELECT DISTINCT cor0.col2 + col0 * + col1 * + col1 AS col0 FROM tab1 AS cor0
----
13616
2082
6457

query I rowsort
SELECT - col1 + 93 * - ( col2 ) FROM tab1 AS cor0
----
-5048
-5311
-8941

onlyif mysql # use DIV operator for integer division
query I rowsort label-3326
SELECT - - col0 DIV ( + ( col2 ) ) FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-3326
SELECT - - col0 / ( + ( col2 ) ) FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT ( - col2 * + CAST ( - 31 AS REAL ) + tab2.col2 ) AS col2 FROM tab2
----
1216
832
864

query I rowsort
SELECT + 25 * col1 AS col2 FROM tab0 AS cor0
----
2150
2275
2425

onlyif mysql # use DIV operator for integer division
query I rowsort label-3329
SELECT DISTINCT - + 53 DIV - col1 AS col0 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-3329
SELECT DISTINCT - + 53 / - col1 AS col0 FROM tab0 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3330
SELECT DISTINCT col2 - - col1 DIV - cor0.col1 FROM tab2 AS cor0
----
25
26
37

skipif mysql # not compatible
query I rowsort label-3330
SELECT DISTINCT col2 - - col1 / - cor0.col1 FROM tab2 AS cor0
----
25
26
37

query I rowsort
SELECT 29 * col2 + + cor0.col1 FROM tab2 AS cor0
----
1119
813
814

onlyif mysql # use DIV operator for integer division
query I rowsort label-3332
SELECT DISTINCT - - 36 DIV + col0 + CAST( col1 AS SIGNED ) + col1 AS col0 FROM tab0 AS cor0
----
173
182
195

skipif mysql # not compatible
query I rowsort label-3332
SELECT DISTINCT - - 36 / + col0 + CAST ( col1 AS INTEGER ) + col1 AS col0 FROM tab0 AS cor0
----
173
182
195

onlyif mysql # use DIV operator for integer division
query I rowsort label-3333
SELECT ALL - + 74 DIV col1 + 19 AS col0 FROM tab2 AS cor0
----
15
17
18

skipif mysql # not compatible
query I rowsort label-3333
SELECT ALL - + 74 / col1 + 19 AS col0 FROM tab2 AS cor0
----
15
17
18

query I rowsort
SELECT DISTINCT cor0.col2 - col1 * col2 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT ALL col0 * cor0.col0 AS col1 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT - col1 * - col2 * + ( - 79 ) FROM tab0 AS cor0
----
-224202
-589498
-7663

query I rowsort
SELECT - 14 AS col1 FROM tab1 AS cor0
----
-14
-14
-14

query I rowsort
SELECT 55 AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 1626bd3008abd9f18cc88cdecf7b64d0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3339
SELECT DISTINCT - + CAST( NULL AS SIGNED ) * + 84 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-3339
SELECT DISTINCT - + CAST ( NULL AS INTEGER ) * + 84 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3340
SELECT tab1.col2 DIV col1 AS col2 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-3340
SELECT tab1.col2 / col1 AS col2 FROM tab1
----
2
5
7

query I rowsort
SELECT + 97 FROM tab0 cor0
----
97
97
97

query I rowsort
SELECT ALL - + col0 * col1 + - col0 AS col1 FROM tab0 AS cor0
----
-2088
-3430
-8188

query I rowsort
SELECT ALL + cor0.col0 * col2 + cor0.col2 AS col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT ALL - col2 + tab1.col2 AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL - cor0.col2 AS col2 FROM tab1, tab1 cor0
----
9 values hashing to 0dc9bbe392d52df93d2a115d7f622dba

query I rowsort
SELECT - col0 * 67 + - col2 FROM tab0 AS cor0
----
-1641
-2346
-6045

query I rowsort
SELECT + - 40 * cor1.col2 + - cor0.col1 * 82 FROM tab0 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
27 values hashing to 39e2eb342889160a4132c649492a7492

query I rowsort
SELECT ALL col1 + - col0 AS col0 FROM tab2
----
-19
-62
24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3349
SELECT DISTINCT - tab0.col2 * - CAST( NULL AS SIGNED ) AS col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-3349
SELECT DISTINCT - tab0.col2 * - CAST ( NULL AS INTEGER ) AS col0 FROM tab0
----
NULL

query I rowsort
SELECT DISTINCT + - col2 * 94 AS col1 FROM tab2 AS cor0
----
-2444
-2538
-3572

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3351
SELECT col2 + - CAST( col0 AS SIGNED ) col1 FROM tab2 cor0
----
-41
-52
20

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3351
SELECT col2 + - CAST ( col0 AS INTEGER ) col1 FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT ALL - 80 * col0 AS col2 FROM tab2 AS cor0
----
-560
-6240
-6320

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3353
SELECT ALL + CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3353
SELECT ALL + CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( - ( + col0 ) ) AS col2 FROM tab2
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - ( col0 ) col0 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT + col2 + - cor0.col2 AS col2 FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT - + 72 * 70 AS col2 FROM tab2 AS cor0
----
-5040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 36 col2 FROM tab0 AS cor0
----
36
36
36

query I rowsort
SELECT - + cor0.col0 + col1 FROM tab2 AS cor0
----
-19
-62
24

query I rowsort
SELECT ALL + 68 FROM tab1 AS cor0
----
68
68
68

query I rowsort
SELECT + - 63 * cor0.col1 + col2 AS col1 FROM tab0 AS cor0
----
-5385
-5651
-6110

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3362
SELECT + - CAST( NULL AS SIGNED ) + 91 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3362
SELECT + - CAST ( NULL AS INTEGER ) + 91 FROM tab2 AS cor0
----
NULL
NULL
NULL

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab0 cor2
----
3645 values hashing to 04ab51615fd2c7e492de6a59e98226e1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3364
SELECT DISTINCT - ( col2 ) / - cor0.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-3364
SELECT DISTINCT - ( col2 ) / - cor0.col1 - - CAST ( NULL AS INTEGER ) col2 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + col2 * + 91 FROM tab2 cor0
----
2366
2457
3458

query I rowsort
SELECT + - 69 * + col1 FROM tab1 AS cor0
----
-1794
-690
-897

query I rowsort
SELECT ALL - col2 + 18 AS col1 FROM tab1 AS cor0
----
-36
-39
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-3368
SELECT ALL ( - col1 ) DIV - col2 AS col2 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3368
SELECT ALL ( - col1 ) / - col2 AS col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT + col1 * + 82 + col2 FROM tab1 AS cor0
----
1162
2186
877

query I rowsort
SELECT ALL + + 63 * - col1 + - col0 FROM tab2 AS cor0
----
-1150
-1960
-3795

query I rowsort
SELECT - - ( + col2 ) * 59 FROM tab0 AS cor0
----
1947
4838
59

query I rowsort
SELECT 96 * col2 FROM tab2 AS cor0
----
2496
2592
3648

query I rowsort
SELECT ALL ( + tab0.col2 * col0 ) AS col2 FROM tab0
----
35
7298
792

query I rowsort
SELECT DISTINCT + col0 + - ( 38 ) * + cor0.col1 FROM tab2 AS cor0
----
-1171
-2164
-567

query I rowsort
SELECT - tab0.col0 + tab0.col1 AS col0 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 81d3107020f8e1cd31edca99c0a5480a

query I rowsort
SELECT DISTINCT + col1 * col2 - col1 FROM tab2
----
1475
629
806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 96 col2 FROM tab1, tab2 AS cor0
----
9 values hashing to c89b545346f99713888a7934e4caa539

query I rowsort
SELECT + col1 + - 95 AS col1 FROM tab0 AS cor0
----
-4
-9
2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3379
SELECT + CAST( cor0.col1 AS SIGNED ) * + col0 + ( + col1 ) * + cor0.col1 FROM tab1 AS cor0
----
1209
740
754

skipif mysql # not compatible
query I rowsort label-3379
SELECT + CAST ( cor0.col1 AS INTEGER ) * + col0 + ( + col1 ) * + cor0.col1 FROM tab1 AS cor0
----
1209
740
754

onlyif mysql # use DIV operator for integer division
query I rowsort label-3380
SELECT + + col1 + 28 * + col0 DIV col0 AS col1 FROM tab1 AS cor0
----
38
41
54

skipif mysql # not compatible
query I rowsort label-3380
SELECT + + col1 + 28 * + col0 / col0 AS col1 FROM tab1 AS cor0
----
38
41
54

query I rowsort
SELECT 35 + - col2 * + col0 AS col1 FROM tab1 AS cor0
----
-127
-3613
-7645

query I rowsort
SELECT col2 * + 24 AS col0 FROM tab1
----
1296
1368
2304

query I rowsort
SELECT col1 + - 24 + col1 * + tab1.col1 AS col0 FROM tab1
----
158
678
86

query I rowsort
SELECT DISTINCT tab2.col1 + + ( 76 ) FROM tab2
----
107
135
93

query I rowsort
SELECT ALL ( + col2 ) AS col1 FROM tab0
----
1
33
82

query I rowsort
SELECT ALL + 3 + cor0.col1 * col1 FROM tab0 AS cor0
----
7399
8284
9412

query I rowsort
SELECT ALL + col0 * col2 + - 7 FROM tab0 AS cor0
----
28
7291
785

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - 38 col2 FROM tab1 AS cor0
----
-38
-38
-38

query I rowsort
SELECT 0 AS col1 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to e2568b01dd411b5a206068697d0ed0d2

query I rowsort
SELECT ALL - col0 * col0 * + col0 + col0 * col2 * + col2 AS col2 FROM tab1 cor0
----
-54208
225280
8721

query I rowsort
SELECT + cor0.col1 + - 26 AS col2 FROM tab0 AS cor0
----
60
65
71

query I rowsort
SELECT ALL + col0 + 8 AS col1 FROM tab0 AS cor0
----
32
43
97

query I rowsort
SELECT col2 * + 5 + - 43 AS col0 FROM tab2 AS cor0
----
147
87
92

query I rowsort
SELECT - tab2.col0 - - 19 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 6712926d15f95cfd71715b6e28046604

query I rowsort
SELECT - + col2 * col1 + + col2 FROM tab1 AS cor0
----
-1152
-1350
-513

onlyif mysql # use DIV operator for integer division
query I rowsort label-3396
SELECT + + col0 DIV ( 13 ) + col1 AS col1 FROM tab0 AS cor0
----
87
97
99

skipif mysql # not compatible
query I rowsort label-3396
SELECT + + col0 / ( 13 ) + col1 AS col1 FROM tab0 AS cor0
----
87
97
99

query I rowsort
SELECT - col0 * 49 + 10 * + col2 FROM tab2 cor0
----
-3491
-3562
-73

query I rowsort
SELECT DISTINCT - col0 + col1 * col2 * col0 AS col2 FROM tab0 AS cor0
----
3360
664029
68088

query I rowsort
SELECT ALL + - col2 + + col1 + - col0 FROM tab0 AS cor0
----
-80
29
61

query I rowsort
SELECT 46 * + 60 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to e6a77760c59afc69e0adf3bb150749d7

onlyif mysql # use DIV operator for integer division
query I rowsort label-3401
SELECT ( col1 ) DIV ( - col1 ) FROM tab1
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3401
SELECT ( col1 ) / ( - col1 ) FROM tab1
----
-1
-1
-1

query I rowsort
SELECT DISTINCT + 59 * + tab2.col1 AS col1 FROM tab2
----
1003
1829
3481

query I rowsort
SELECT + 22 + + 20 * col0 FROM tab2 AS cor0
----
1582
1602
162

query I rowsort
SELECT + - 52 * col1 FROM tab0 AS cor0
----
-4472
-4732
-5044

query I rowsort
SELECT - ( + cor0.col2 ) * col2 * ( col0 + col0 ) AS col2 FROM tab2 AS cor0
----
-10206
-105456
-228152

query I rowsort
SELECT + - 47 + col1 * + col0 AS col2 FROM tab2 AS cor0
----
1296
170
4555

query I rowsort
SELECT 92 * - 31 AS col0 FROM tab0 AS cor0
----
-2852
-2852
-2852

skipif mysql # not compatible
query I rowsort
SELECT ALL + col0 * CAST ( col2 AS REAL ) FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT 9 AS col1 FROM tab0, tab1 AS cor0
----
9

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 65 col0 FROM tab0, tab1 AS cor0
----
9 values hashing to 744531575c1b6461ed2916d4940e4d23

query I rowsort
SELECT + + 34 + 14 FROM tab0 AS cor0
----
48
48
48

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 33 * + col2 col1 FROM tab1
----
1782
1881
3168

query I rowsort
SELECT DISTINCT tab2.col0 FROM tab1, tab1 AS cor0 CROSS JOIN tab2
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * - col2 col2 FROM tab1 cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-3415
SELECT DISTINCT - 88 DIV - col1 FROM tab2
----
1
2
5

skipif mysql # not compatible
query I rowsort label-3415
SELECT DISTINCT - 88 / - col1 FROM tab2
----
1
2
5

query I rowsort
SELECT ALL + col0 * + cor0.col2 FROM tab2 cor0
----
189
2028
3002

query I rowsort
SELECT + + col1 * - col1 AS col2 FROM tab2 AS cor0
----
-289
-3481
-961

onlyif mysql # use DIV operator for integer division
query I rowsort label-3418
SELECT DISTINCT 4 * col0 DIV - 80 FROM tab2 AS cor0
----
-3
0

skipif mysql # not compatible
query I rowsort label-3418
SELECT DISTINCT 4 * col0 / - 80 FROM tab2 AS cor0
----
-3
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3419
SELECT col2 + col2 DIV + tab1.col0 AS col2 FROM tab1
----
57
72
97

skipif mysql # not compatible
query I rowsort label-3419
SELECT col2 + col2 / + tab1.col0 AS col2 FROM tab1
----
57
72
97

query I rowsort
SELECT - col2 + - 96 FROM tab0
----
-129
-178
-97

query I rowsort
SELECT DISTINCT col0 + ( + col2 ) AS col0 FROM tab1
----
121
176
57

query I rowsort
SELECT DISTINCT + ( - tab2.col0 ) * tab2.col1 + + col2 * col1 + col0 FROM tab2
----
-2990
-618
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-3423
SELECT DISTINCT col2 DIV col1 + + col0 AS col2 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-3423
SELECT DISTINCT col2 / col1 + + col0 AS col2 FROM tab0
----
24
35
89

query I rowsort
SELECT ( col2 ) + - tab1.col1 * 7 AS col2 FROM tab1
----
-128
-13
5

query I rowsort
SELECT 57 FROM tab1, tab1 AS cor0
----
9 values hashing to 61da70c624ad60604a668f7f8f29392a

query I rowsort
SELECT DISTINCT col2 * col2 * - col0 FROM tab1
----
-207936
-737280
-8748

query I rowsort
SELECT ALL - 46 * + col1 - 23 AS col0 FROM tab1 AS cor0
----
-1219
-483
-621

query I rowsort
SELECT DISTINCT + - 86 AS col1 FROM tab0 AS cor0
----
-86

query I rowsort
SELECT + + col2 * + col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL - + col2 + + col1 AS col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT + - 10 AS col1 FROM tab2 AS cor0
----
-10
-10
-10

query I rowsort
SELECT DISTINCT - - 74 + col0 AS col1 FROM tab0 AS cor0
----
109
163
98

query I rowsort
SELECT DISTINCT + ( - col1 ) + - ( col2 ) * col2 FROM tab1 AS cor0
----
-2942
-3259
-9229

query I rowsort
SELECT + 91 + col0 FROM tab2 AS cor0
----
169
170
98

query I rowsort
SELECT DISTINCT + cor0.col2 * - tab1.col0 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 6e956995b57dab53690e9e5feefd0b3a

query I rowsort
SELECT - + cor0.col1 + + col2 AS col1 FROM tab0 cor0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3437
SELECT cor0.col1 + - ( col0 ) DIV col2 AS col1 FROM tab1 AS cor0
----
13
26
9

skipif mysql # not compatible
query I rowsort label-3437
SELECT cor0.col1 + - ( col0 ) / col2 AS col1 FROM tab1 AS cor0
----
13
26
9

query I rowsort
SELECT col1 + 46 - col0 FROM tab2 AS cor0
----
-16
27
70

query I rowsort
SELECT col0 + + col0 * - col2 AS col2 FROM tab1
----
-159
-3584
-7600

query I rowsort
SELECT DISTINCT - col1 + - col0 AS col0 FROM tab2
----
-137
-38
-96

query I rowsort
SELECT - - 20 + - ( - col0 ) AS col1 FROM tab1 AS cor0
----
100
23
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-3442
SELECT ALL + 75 + ( col2 ) DIV col1 col0 FROM tab1 AS cor0
----
77
80
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3442
SELECT ALL + 75 + ( col2 ) / col1 col0 FROM tab1 AS cor0
----
77
80
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + + col1 col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL ( col1 ) * + col0 + - col2 AS col0 FROM tab2 AS cor0
----
1305
190
4576

onlyif mysql # use DIV operator for integer division
query I rowsort label-3445
SELECT cor0.col1 + + 77 DIV col1 col0 FROM tab1 AS cor0
----
17
18
28

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3445
SELECT cor0.col1 + + 77 / col1 col0 FROM tab1 AS cor0
----
17
18
28

onlyif mysql # use DIV operator for integer division
query I rowsort label-3446
SELECT - col2 DIV 88 AS col0 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3446
SELECT - col2 / 88 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - 98 FROM tab2, tab0 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to b6a3c9eea26c3759e6417d75f38258d1

query I rowsort
SELECT + ( - cor0.col2 ) * - cor0.col2 + + cor0.col1 * + col2 AS col2 FROM tab2 AS cor0
----
1566
2090
2210

onlyif mysql # use DIV operator for integer division
query I rowsort label-3449
SELECT DISTINCT + col0 + + col1 DIV - col2 FROM tab1 cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-3449
SELECT DISTINCT + col0 + + col1 / - col2 FROM tab1 cor0
----
3
64
80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3450
SELECT ALL - CAST( 27 AS SIGNED ) + col0 AS col1 FROM tab1 cor0
----
-24
37
53

skipif mysql # not compatible
query I rowsort label-3450
SELECT ALL - CAST ( 27 AS INTEGER ) + col0 AS col1 FROM tab1 cor0
----
-24
37
53

query I rowsort
SELECT ALL - - cor0.col2 - 31 FROM tab2 AS cor0
----
-4
-5
7

query I rowsort
SELECT - - col1 * - col1 + + cor0.col2 * - col0 FROM tab1 AS cor0
----
-3748
-7849
-838

query I rowsort
SELECT ALL - col0 * 96 + + 53 FROM tab0 AS cor0
----
-2251
-3307
-8491

query I rowsort
SELECT ALL + - col0 + - col2 * col2 AS col0 FROM tab1 cor0
----
-2919
-3313
-9296

query I rowsort
SELECT + - col1 + 60 FROM tab0 AS cor0
----
-26
-31
-37

query I rowsort
SELECT ALL col0 + - 45 AS col1 FROM tab1 AS cor0
----
-42
19
35

query I rowsort
SELECT - col1 + + 62 FROM tab2 AS cor0
----
3
31
45

query I rowsort
SELECT + + col2 + 37 AS col1 FROM tab0 cor0
----
119
38
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + tab1.col2 col0 FROM tab1
----
-7
16
51

query I rowsort
SELECT DISTINCT col0 * - 8 AS col1 FROM tab0 AS cor0
----
-192
-280
-712

query I rowsort
SELECT ALL + - col2 * col0 + 96 * cor0.col1 AS col1 FROM tab1 AS cor0
----
-2688
-6432
2334

query I rowsort
SELECT 11 + - cor0.col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 577f38bdbad56499f0d0f56a458a6c46

query I rowsort
SELECT DISTINCT - + ( + col0 ) FROM tab0 AS cor0
----
-24
-35
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3464
SELECT DISTINCT + ( + col2 ) * - CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3464
SELECT DISTINCT + ( + col2 ) * - CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + ( + col2 ) - col1 AS col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT ALL + 78 + - col1 FROM tab0 AS cor0
----
-13
-19
-8

query I rowsort
SELECT ( col2 ) + col2 + col0 FROM tab2
----
130
155
61

onlyif mysql # use DIV operator for integer division
query I rowsort label-3468
SELECT + ( tab1.col1 + col1 ) DIV col0 AS col2 FROM tab1
----
0
0
17

skipif mysql # not compatible
query I rowsort label-3468
SELECT + ( tab1.col1 + col1 ) / col0 AS col2 FROM tab1
----
0
0
17

query I rowsort
SELECT - col1 + + col0 * + 26 FROM tab2
----
151
1969
2037

query I rowsort
SELECT DISTINCT + col2 + + col1 * col2 + - col2 FROM tab1
----
1248
1404
570

query I rowsort
SELECT DISTINCT 12 + col1 AS col1 FROM tab1
----
22
25
38

query I rowsort
SELECT 33 * + col2 + col2 AS col0 FROM tab0
----
1122
2788
34

query I rowsort
SELECT ALL + col1 + tab1.col2 AS col1 FROM tab1
----
109
67
80

query I rowsort
SELECT 21 + + col0 * col2 + + col0 FROM tab2
----
2127
217
3102

query I rowsort
SELECT + col0 + col1 * + col1 FROM tab0 cor0
----
7420
8370
9444

query I rowsort
SELECT ALL + + ( + col2 ) * + cor0.col2 AS col0 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT DISTINCT - ( cor0.col2 ) + 62 * + col0 - - col2 AS col0 FROM tab0 AS cor0
----
1488
2170
5518

query I rowsort
SELECT DISTINCT + ( - col1 ) * 14 + ( - col2 ) FROM tab2 cor0
----
-276
-461
-852

query I rowsort
SELECT + col2 * col1 + + ( + col1 ) * col0 + + 89 FROM tab2
----
1143
2078
6225

query I rowsort
SELECT + 13 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 184e52d7aa5aa66591291e39c67a3dfb

query I rowsort
SELECT - col1 + col0 * + 54 AS col0 FROM tab2 AS cor0
----
347
4153
4249

query I rowsort
SELECT - ( cor0.col2 ) * - col2 + col2 FROM tab2 AS cor0
----
1482
702
756

query I rowsort
SELECT ALL - + col1 * + 38 FROM tab0 cor0
----
-3268
-3458
-3686

onlyif mysql # use DIV operator for integer division
query I rowsort label-3484
SELECT - + col2 + - cor0.col1 DIV - col0 AS col1 FROM tab2 AS cor0
----
-23
-26
-38

skipif mysql # not compatible
query I rowsort label-3484
SELECT - + col2 + - cor0.col1 / - col0 AS col1 FROM tab2 AS cor0
----
-23
-26
-38

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3485
SELECT col0 + - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3485
SELECT col0 + - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 - ( + 65 ) col0 FROM tab1 AS cor0
----
-1
-62
15

query I rowsort
SELECT + + col0 * 78 + + col0 AS col0 FROM tab1 AS cor0
----
237
5056
6320

query I rowsort
SELECT ALL - 77 * + tab1.col1 AS col2 FROM tab1
----
-1001
-2002
-770

query I rowsort
SELECT ( 12 ) + - col0 * col2 FROM tab0 AS cor0
----
-23
-7286
-780

query I rowsort
SELECT ALL - ( 76 ) * col2 FROM tab2 AS cor0
----
-1976
-2052
-2888

query I rowsort
SELECT - + col1 * - 99 AS col2 FROM tab1 AS cor0
----
1287
2574
990

query I rowsort
SELECT + 35 * + cor0.col1 * + cor0.col0 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to f11f368742a1416ae16f4339e6d89841

query I rowsort
SELECT DISTINCT - col1 * 9 - col0 FROM tab2 AS cor0
----
-232
-286
-609

query I rowsort
SELECT ALL ( col0 ) * col0 AS col2 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT + + col0 + + col2 + ( col2 * col0 ) AS col1 FROM tab1 AS cor0
----
219
3769
7856

query I rowsort
SELECT - col0 + - col1 - col0 AS col1 FROM tab2 cor0
----
-175
-215
-45

query I rowsort
SELECT ALL - - 1 + - col0 * col2 AS col2 FROM tab2 AS cor0
----
-188
-2027
-3001

query I rowsort
SELECT DISTINCT 3 * col2 AS col2 FROM tab1
----
162
171
288

query I rowsort
SELECT - col1 * col0 - ( + col1 ) AS col0 FROM tab0 AS cor0
----
-2150
-3492
-8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-3500
SELECT + col0 DIV - col0 + + ( col1 ) FROM tab1 AS cor0
----
12
25
9

skipif mysql # not compatible
query I rowsort label-3500
SELECT + col0 / - col0 + + ( col1 ) FROM tab1 AS cor0
----
12
25
9

query I rowsort
SELECT + col1 - + col1 * + ( - col0 ) FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT ALL - col1 + - col1 AS col0 FROM tab0
----
-172
-182
-194

query I rowsort
SELECT tab1.col1 + + col0 * - col0 FROM tab1
----
-4086
-6387
17

onlyif mysql # use DIV operator for integer division
query I rowsort label-3504
SELECT col2 + - col2 DIV col1 AS col2 FROM tab0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-3504
SELECT col2 + - col2 / col1 AS col2 FROM tab0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-3505
SELECT + col2 DIV col0 AS col0 FROM tab2
----
0
0
3

skipif mysql # not compatible
query I rowsort label-3505
SELECT + col2 / col0 AS col0 FROM tab2
----
0
0
3

query I rowsort
SELECT DISTINCT + col0 + + col0 * col1 AS col2 FROM tab1
----
1120
704
81

query I rowsort
SELECT - col0 - + col2 AS col2 FROM tab2
----
-104
-117
-34

query I rowsort
SELECT col1 AS col0 FROM tab2 WHERE NULL >= - col2
----

query I rowsort
SELECT DISTINCT tab1.col2 + - tab1.col2 FROM tab1
----
0

query I rowsort
SELECT DISTINCT - col0 AS col2 FROM tab1 WHERE NOT NULL < NULL
----

query I rowsort
SELECT tab1.col0 + + col0 FROM tab1 WHERE NOT ( col1 ) NOT IN ( + col2 )
----

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL NOT BETWEEN - col2 AND ( - col2 )
----

query I rowsort
SELECT tab0.col2 - col1 * col1 AS col2 FROM tab0
----
-7363
-8199
-9408

query I rowsort
SELECT ALL col0 * + col2 AS col1 FROM tab1 WHERE NOT NULL NOT IN ( col0 + - tab1.col1 - col2 )
----

query III rowsort
SELECT * FROM tab2 WHERE NULL IN ( + col0 * + col2 )
----

query I rowsort
SELECT + tab2.col2 + - col0 AS col0 FROM tab2
----
-41
-52
20

query I rowsort
SELECT DISTINCT + col0 * - col2 - + col1 FROM tab1
----
-188
-3658
-7693

query I rowsort
SELECT ALL - ( col0 ) * - col1 * + 69 AS col1 FROM tab2
----
14973
317538
92667

query I rowsort
SELECT 89 FROM tab2 cor0
----
89
89
89

query I rowsort
SELECT - ( - cor0.col1 ) FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT DISTINCT - 45 AS col2 FROM tab0 cor0
----
-45

query I rowsort
SELECT col2 * + tab0.col1 * + col0 + col2 * col1 + col1 FROM tab0
----
3589
671671
71036

query III rowsort
SELECT * FROM tab0 AS cor0 WHERE NOT ( - cor0.col2 * col2 ) IN ( col1 + + cor0.col2 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT DISTINCT col2 * + col2 - + col1 * + col1 FROM tab0 AS cor0 WHERE NOT ( NULL ) = col2
----

query I rowsort
SELECT DISTINCT + col1 * - col0 + col0 - - col1 AS col2 FROM tab1
----
-49
-566
-947

query I rowsort
SELECT col2 * + col1 - - col0 AS col1 FROM tab0 WHERE NOT NULL > col1
----

query I rowsort
SELECT - col1 * tab0.col2 + + tab0.col0 * col2 AS col2 FROM tab0
----
-164
-2046
-62

query I rowsort
SELECT - col1 FROM tab0 WHERE NULL BETWEEN col1 AND col2
----

query I rowsort
SELECT DISTINCT - col2 + + col1 FROM tab1
----
-28
-47
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col0 col1 FROM tab0
----
-35
-7298
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * - col0 col1 FROM tab1
----
162
3648
7680

query I rowsort
SELECT DISTINCT + col0 + col0 * - col1 FROM tab1
----
-576
-75
-960

query III rowsort
SELECT * FROM tab2 WHERE - col1 * + col1 NOT IN ( col2 + + col0 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT col0 IN ( - col0 )
----
9 values hashing to 38a1673e2e09d694c8cec45c797034a7

query I rowsort
SELECT DISTINCT col2 * + col0 - col2 FROM tab0
----
34
7216
759

query I rowsort
SELECT + tab1.col1 * col1 * - col2 - + tab1.col1 FROM tab1
----
-16237
-36530
-5710

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 69 * + col2 + + cor0.col2 col1 FROM tab1 cor0
----
-3672
-3876
-6528

query I rowsort
SELECT col0 * cor0.col2 + col0 * - 1 AS col0 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT - 9 + - col0 FROM tab1 AS cor0
----
-12
-73
-89

onlyif mysql # use DIV operator for integer division
query I rowsort label-3540
SELECT cor1.col2 DIV 42 AS col0 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 953562d3ce2a62a1679a1ae0451294c6

skipif mysql # not compatible
query I rowsort label-3540
SELECT cor1.col2 / 42 AS col0 FROM tab2, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 953562d3ce2a62a1679a1ae0451294c6

query I rowsort
SELECT ALL 63 * - cor0.col1 AS col2 FROM tab1 cor0
----
-1638
-630
-819

query I rowsort
SELECT DISTINCT 56 * 43 + - col1 + col0 FROM tab1 AS cor0
----
2385
2462
2475

query I rowsort
SELECT DISTINCT + 92 AS col0 FROM tab0 AS cor0
----
92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3544
SELECT ALL + CAST( + col2 AS SIGNED ) + col2 AS col2 FROM tab0 AS cor0
----
164
2
66

skipif mysql # not compatible
query I rowsort label-3544
SELECT ALL + CAST ( + col2 AS INTEGER ) + col2 AS col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT ALL - - cor0.col2 * col0 - cor0.col1 FROM tab1 AS cor0
----
136
3638
7667

onlyif mysql # use DIV operator for integer division
query I rowsort label-3546
SELECT ALL + cor0.col1 DIV col1 - - col2 FROM tab1 AS cor0
----
55
58
97

skipif mysql # not compatible
query I rowsort label-3546
SELECT ALL + cor0.col1 / col1 - - col2 FROM tab1 AS cor0
----
55
58
97

query I rowsort
SELECT DISTINCT 36 + 19 AS col0 FROM tab0
----
55

query I rowsort
SELECT ALL col1 + - col1 AS col1 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col2 * + col0 AS col1 FROM tab0 cor0
----
-35
-7298
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 84 + col0 col2 FROM tab2 AS cor0
----
162
163
91

onlyif mysql # use DIV operator for integer division
query I rowsort label-3551
SELECT DISTINCT - col1 + + col1 * col1 DIV - ( - 37 ) FROM tab0
----
113
132
157

skipif mysql # not compatible
query I rowsort label-3551
SELECT DISTINCT - col1 + + col1 * col1 / - ( - 37 ) FROM tab0
----
113
132
157

query I rowsort
SELECT - 44 * 22 AS col2 FROM tab2
----
-968
-968
-968

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + tab0.col0 col2 FROM tab0, tab2 AS cor0
----
24
35
89

query I rowsort
SELECT + col0 + ( col0 ) * 70 FROM tab1
----
213
4544
5680

query I rowsort
SELECT col0 * 86 * col2 FROM tab1
----
13932
313728
660480

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3556
SELECT CAST( col2 AS SIGNED ) * tab2.col0 + 46 FROM tab2
----
2074
235
3048

skipif mysql # not compatible
query I rowsort label-3556
SELECT CAST ( col2 AS INTEGER ) * tab2.col0 + 46 FROM tab2
----
2074
235
3048

query I rowsort
SELECT DISTINCT - col0 - - 31 AS col2 FROM tab1 AS cor0
----
-33
-49
28

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3558
SELECT - col2 * - CAST( col0 AS SIGNED ) - + col0 FROM tab2 AS cor0
----
182
1950
2923

skipif mysql # not compatible
query I rowsort label-3558
SELECT - col2 * - CAST ( col0 AS INTEGER ) - + col0 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT ALL cor0.col2 + col1 * + 98 FROM tab1 AS cor0
----
1037
1370
2602

query I rowsort
SELECT - - col0 + 9 FROM tab2 AS cor0
----
16
87
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col0 + - 81 col0 FROM tab2 AS cor0
----
-2
-3
-74

query I rowsort
SELECT + col1 + - 68 AS col1 FROM tab0 AS cor0
----
18
23
29

query I rowsort
SELECT ALL - col2 + - col2 * 43 AS col2 FROM tab0 AS cor0
----
-1452
-3608
-44

query I rowsort
SELECT col0 + - ( + 8 ) FROM tab1 AS cor0
----
-5
56
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-3565
SELECT ALL + col0 - col2 DIV - 58 AS col0 FROM tab0 AS cor0
----
24
35
90

skipif mysql # not compatible
query I rowsort label-3565
SELECT ALL + col0 - col2 / - 58 AS col0 FROM tab0 AS cor0
----
24
35
90

query I rowsort
SELECT DISTINCT + + col0 + + col0 * col0 - - cor0.col2 * col0 AS col2 FROM tab1 AS cor0
----
14160
174
7808

query I rowsort
SELECT + col2 - + col2 * + col2 * col1 FROM tab0 AS cor0
----
-611802
-93621
-96

query I rowsort
SELECT + col1 * ( 12 ) FROM tab1 AS cor0
----
120
156
312

onlyif mysql # use DIV operator for integer division
query I rowsort label-3569
SELECT ALL - col2 DIV col1 FROM tab2 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-3569
SELECT ALL - col2 / col1 FROM tab2 AS cor0
----
-2
0
0

query I rowsort
SELECT DISTINCT - + col2 * ( - col2 ) * cor0.col0 + col1 AS col2 FROM tab0 AS cor0
----
132
26222
598527

query I rowsort
SELECT col0 - - ( col1 ) * col0 AS col2 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT 63 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 38764a6e696d1a6b5095e29ef84959c0

query I rowsort
SELECT ALL + col2 * - col1 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT cor0.col1 FROM tab1, tab2, tab2 cor0
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

query I rowsort
SELECT + 30 AS col0 FROM tab1
----
30
30
30

query IIIIIIIIIIII rowsort
SELECT * FROM tab0 cor0 CROSS JOIN tab2, tab2 AS cor1, tab0 AS cor2
----
972 values hashing to deaaa983f771be544ffdc26f04a18657

query I rowsort
SELECT col0 + - 43 FROM tab1
----
-40
21
37

query I rowsort
SELECT col2 * - col0 - - 85 AS col1 FROM tab1
----
-3563
-7595
-77

query I rowsort
SELECT - cor0.col0 * + 4 - 66 AS col1 FROM tab1 AS cor0
----
-322
-386
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-3580
SELECT DISTINCT - cor0.col0 DIV ( + col1 + col0 ) AS col2 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-3580
SELECT DISTINCT - cor0.col0 / ( + col1 + col0 ) AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL - cor0.col0 * 42 + + cor0.col0 AS col1 FROM tab1 AS cor0
----
-123
-2624
-3280

query I rowsort
SELECT + col2 * - col0 + + col1 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT + tab2.col1 + + 33 FROM tab2
----
50
64
92

query I rowsort
SELECT DISTINCT + 36 + ( + col0 ) FROM tab1
----
100
116
39

onlyif mysql # use DIV operator for integer division
query I rowsort label-3585
SELECT 73 + + col1 DIV col2 FROM tab1
----
73
73
73

skipif mysql # not compatible
query I rowsort label-3585
SELECT 73 + + col1 / col2 FROM tab1
----
73
73
73

query I rowsort
SELECT DISTINCT + col1 * + 20 + col1 FROM tab2
----
1239
357
651

query I rowsort
SELECT + col2 * + tab0.col0 AS col0 FROM tab0
----
35
7298
792

query I rowsort
SELECT 37 + col1 AS col0 FROM tab1 AS cor0
----
47
50
63

query I rowsort
SELECT DISTINCT + cor0.col1 * - col1 * + col2 FROM tab0 AS cor0
----
-244068
-679042
-9409

query I rowsort
SELECT DISTINCT + 47 * col1 FROM tab0 AS cor0
----
4042
4277
4559

query I rowsort
SELECT + col2 + - col2 * col1 FROM tab0 AS cor0
----
-2805
-7380
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3592
SELECT + col2 * col0 DIV + col0 FROM tab2 AS cor0
----
26
27
38

skipif mysql # not compatible
query I rowsort label-3592
SELECT + col2 * col0 / + col0 FROM tab2 AS cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col0 col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT + 45 AS col2 FROM tab1
----
45
45
45

query I rowsort
SELECT DISTINCT + 76 AS col2 FROM tab1 AS cor0
----
76

query I rowsort
SELECT + col2 * cor0.col1 + col0 AS col2 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT ALL - ( col2 ) + cor0.col2 AS col0 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3598
SELECT col0 + col0 DIV + col1 FROM tab1 AS cor0
----
3
70
86

skipif mysql # not compatible
query I rowsort label-3598
SELECT col0 + col0 / + col1 FROM tab1 AS cor0
----
3
70
86

query I rowsort
SELECT + 44 * + col0 AS col0 FROM tab2
----
308
3432
3476

query I rowsort
SELECT + col2 + + 86 FROM tab2
----
112
113
124

onlyif mysql # use DIV operator for integer division
query I rowsort label-3601
SELECT - ( - col0 ) * col1 DIV col0 + - tab2.col0 * - col1 + col2 FROM tab2
----
1398
275
4687

skipif mysql # not compatible
query I rowsort label-3601
SELECT - ( - col0 ) * col1 / col0 + - tab2.col0 * - col1 + col2 FROM tab2
----
1398
275
4687

query I rowsort
SELECT DISTINCT + ( - col2 ) + + col2 * col0 + + col0 FROM tab0
----
69
7305
783

query I rowsort
SELECT - col1 * - cor0.col0 + col0 AS col0 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT ALL - cor0.col1 * + 9 + + 46 AS col1 FROM tab0 AS cor0
----
-728
-773
-827

query I rowsort
SELECT ALL + col0 + + 42 FROM tab2 AS cor0
----
120
121
49

query I rowsort
SELECT col1 * ( 37 ) AS col0 FROM tab0 AS cor0
----
3182
3367
3589

query I rowsort
SELECT ALL - - col0 * + col2 + + col2 * + col0 FROM tab0 AS cor0
----
14596
1584
70

query I rowsort
SELECT - 94 FROM tab1, tab2 cor0
----
9 values hashing to a95bfa539191d3f72f6548147d7efb9e

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3609
SELECT ALL + col1 - CAST( col2 AS SIGNED ) * - col2 FROM tab2 AS cor0
----
1461
735
760

skipif mysql # not compatible
query I rowsort label-3609
SELECT ALL + col1 - CAST ( col2 AS INTEGER ) * - col2 FROM tab2 AS cor0
----
1461
735
760

query I rowsort
SELECT + + cor0.col2 * - ( col0 ) AS col2 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT - col1 + - cor0.col1 FROM tab2 cor0
----
-118
-34
-62

query I rowsort
SELECT - col2 * + 46 + - ( + col2 ) FROM tab1 AS cor0
----
-2538
-2679
-4512

onlyif mysql # use DIV operator for integer division
query I rowsort label-3613
SELECT - + col0 * col0 DIV col1 AS col1 FROM tab2 AS cor0
----
-1
-103
-367

skipif mysql # not compatible
query I rowsort label-3613
SELECT - + col0 * col0 / col1 AS col1 FROM tab2 AS cor0
----
-1
-103
-367

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - cor0.col2 * + 20 col1 FROM tab0 AS cor0
----
-1640
-20
-660

query I rowsort
SELECT DISTINCT + col0 * 32 + col0 * col1 AS col0 FROM tab1 AS cor0
----
174
2688
3600

query I rowsort
SELECT + col2 * + 55 AS col0 FROM tab1 cor0
----
2970
3135
5280

query I rowsort
SELECT DISTINCT - cor0.col1 + col2 * 74 + - col0 AS col0 FROM tab1 AS cor0
----
3967
4144
7011

query I rowsort
SELECT col2 + 31 * col0 AS col0 FROM tab2 AS cor0
----
244
2444
2487

query I rowsort
SELECT ( col1 ) + col2 * col2 AS col1 FROM tab0 AS cor0
----
1175
6815
98

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3620
SELECT + CAST( NULL AS DECIMAL ) - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3620
SELECT + CAST ( NULL AS REAL ) - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + + 43 + - col0 col0 FROM tab1
----
36
59
94

query I rowsort
SELECT + col0 * - 76 FROM tab2
----
-532
-5928
-6004

query I rowsort
SELECT col0 * col0 + - col1 AS col2 FROM tab2 AS cor0
----
18
6025
6224

query I rowsort
SELECT - col2 * - 48 AS col1 FROM tab2 AS cor0
----
1248
1296
1824

onlyif mysql # use DIV operator for integer division
query I rowsort label-3625
SELECT col0 DIV + ( tab0.col0 ) FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3625
SELECT col0 / + ( tab0.col0 ) FROM tab0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-3626
SELECT DISTINCT - col0 + - col1 DIV 52 FROM tab1
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-3626
SELECT DISTINCT - col0 + - col1 / 52 FROM tab1
----
-3
-64
-80

query I rowsort
SELECT + - col1 * - col1 AS col2 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT col0 * + col1 * col2 - + col2 FROM tab1 AS cor0
----
36423
4158
99744

query I rowsort
SELECT - col2 * col0 - + cor0.col1 FROM tab2 AS cor0
----
-2087
-220
-3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-3630
SELECT - col0 + col0 DIV col2 FROM tab1 AS cor0
----
-3
-63
-80

skipif mysql # not compatible
query I rowsort label-3630
SELECT - col0 + col0 / col2 FROM tab1 AS cor0
----
-3
-63
-80

query IIIIIIIII rowsort
SELECT ALL * FROM tab1, tab0, tab0 cor0 WHERE NOT NULL > NULL
----

query I rowsort
SELECT - + col1 * + cor0.col1 * col2 AS col0 FROM tab1 cor0
----
-16224
-36504
-5700

query I rowsort
SELECT - col2 + cor0.col0 * cor0.col1 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT col2 - cor0.col1 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT DISTINCT cor0.col0 + + cor0.col0 AS col2 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT DISTINCT + col2 + col2 * - col0 + col2 FROM tab2 AS cor0
----
-135
-1976
-2926

query I rowsort
SELECT + col0 + - col2 * + col0 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT - col1 * col2 + - col0 * col1 FROM tab2 AS cor0
----
-1054
-1989
-6136

query III rowsort
SELECT ALL * FROM tab1 WHERE NOT col2 NOT BETWEEN NULL AND col1 * + col2
----

query I rowsort
SELECT ALL col0 * + col1 FROM tab1 WHERE NOT - col0 + - col0 > NULL
----

query I rowsort
SELECT DISTINCT tab1.col2 * col0 * + col2 FROM tab1
----
207936
737280
8748

query I rowsort
SELECT 40 * + col2 FROM tab0
----
1320
3280
40

query I rowsort
SELECT col0 * + col2 + + col2 * col1 FROM tab0
----
132
14760
3630

query I rowsort
SELECT DISTINCT - col0 * col1 * col2 AS col0 FROM tab0
----
-3395
-664118
-68112

query I rowsort
SELECT cor0.col0 * - cor0.col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + col0 + ( ( cor0.col0 ) ) * - ( cor0.col1 ) AS col1 FROM tab0 AS cor0
----
-2040
-3360
-8010

query I rowsort
SELECT ALL col1 - + col2 * - col0 AS col1 FROM tab1 AS cor0
----
188
3658
7693

query I rowsort
SELECT - col2 - 39 AS col0 FROM tab0
----
-121
-40
-72

query I rowsort
SELECT DISTINCT col1 + 34 FROM tab1
----
44
47
60

query I rowsort
SELECT col0 + + 48 AS col2 FROM tab0 AS cor0
----
137
72
83

query I rowsort
SELECT ALL + col0 * ( - 0 ) AS col1 FROM tab0
----
0
0
0

query I rowsort
SELECT tab1.col2 * - col2 + - col1 * col2 FROM tab1
----
-10464
-3819
-4320

query I rowsort
SELECT - 41 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 4ba0c102091f9cbc9fe9439b04584e70

query I rowsort
SELECT 12 * - tab1.col1 AS col2 FROM tab1
----
-120
-156
-312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - 81 col2 FROM tab1
----
-4374
-4617
-7776

query I rowsort
SELECT - 25 * 27 * col0 AS col0 FROM tab0
----
-16200
-23625
-60075

query I rowsort
SELECT - - ( - col1 ) + + col0 * - 0 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT DISTINCT cor0.col1 FROM tab1, tab0 cor0, tab0 AS cor1, tab2, tab0 AS cor2
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-3659
SELECT DISTINCT col0 DIV - 22 FROM tab0
----
-1
-4

skipif mysql # not compatible
query I rowsort label-3659
SELECT DISTINCT col0 / - 22 FROM tab0
----
-1
-4

query I rowsort
SELECT ALL - 21 - - col2 * col2 AS col1 FROM tab2
----
1423
655
708

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 - + tab2.col1 col2 FROM tab2
----
-55
-58
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-3662
SELECT col0 DIV col1 FROM tab2 cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-3662
SELECT col0 / col1 FROM tab2 cor0
----
0
1
4

query I rowsort
SELECT - col2 * col1 + ( 63 ) * cor0.col2 + + col1 AS col2 FROM tab0 AS cor0
----
-2205
-673
63

query I rowsort
SELECT - - col1 + col0 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT - 10 FROM tab0 AS cor0 CROSS JOIN tab2 cor1
----
9 values hashing to f68f33032846e21ee6b2c668fc10355e

query I rowsort
SELECT DISTINCT - 72 FROM tab2 cor0
----
-72

query I rowsort
SELECT ALL 60 * - col1 + 48 * col0 FROM tab2 AS cor0
----
-1524
204
2772

query I rowsort
SELECT - 10 + - col1 FROM tab2 AS cor0
----
-27
-41
-69

query I rowsort
SELECT col2 + col2 + cor0.col1 * + 29 * - col2 FROM tab0 AS cor0
----
-216234
-2811
-82236

query I rowsort
SELECT - + col2 + col1 * + col0 FROM tab2 cor0
----
1305
190
4576

query I rowsort
SELECT + col0 * - col2 * - col1 + ( + col0 ) + - 10 FROM tab2 AS cor0
----
119720
51103
5856

query I rowsort
SELECT tab1.col1 + 87 AS col2 FROM tab1, tab2, tab2 AS cor0, tab0
----
81 values hashing to a66176e030c5a549b6a6d6e380e3f427

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col0 + col0 - - col0 col2 FROM tab1
----
1200
768
84

query I rowsort
SELECT ALL - - 2 FROM tab1 cor0
----
2
2
2

query I rowsort
SELECT - col0 + - cor0.col2 + - cor0.col0 * - col1 FROM tab1 AS cor0
----
21
519
864

query I rowsort
SELECT ALL col0 + 24 AS col1 FROM tab1 AS cor0
----
104
27
88

onlyif mysql # use DIV operator for integer division
query I rowsort label-3677
SELECT - cor0.col2 DIV - 11 FROM tab1 AS cor0
----
4
5
8

skipif mysql # not compatible
query I rowsort label-3677
SELECT - cor0.col2 / - 11 FROM tab1 AS cor0
----
4
5
8

query I rowsort
SELECT ALL + - col2 * col0 AS col2 FROM tab1 AS cor0
----
-162
-3648
-7680

query I rowsort
SELECT DISTINCT col0 + - col1 AS col0 FROM tab1 cor0
----
-23
54
67

onlyif mysql # use DIV operator for integer division
query I rowsort label-3680
SELECT DISTINCT col1 * cor0.col2 DIV + col2 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-3680
SELECT DISTINCT col1 * cor0.col2 / + col2 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT - col1 * - col0 + + col0 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT + col0 + - 63 AS col0 FROM tab2 cor0
----
-56
15
16

query I rowsort
SELECT ALL + cor0.col2 * + col0 + 0 FROM tab2 AS cor0
----
189
2028
3002

query I rowsort
SELECT DISTINCT + col2 * - 67 FROM tab2 AS cor0
----
-1742
-1809
-2546

query I rowsort
SELECT ALL + - col2 + 6 AS col1 FROM tab2 AS cor0
----
-20
-21
-32

query I rowsort
SELECT DISTINCT - col0 * - ( - col2 ) FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - cor0.col2 * 5 + 6 * - col2 AS col2 FROM tab2 cor0
----
-286
-297
-418

query I rowsort
SELECT + 8 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 33069adc3c1142d31511ec88fcfa40af

query I rowsort
SELECT DISTINCT col1 + - col0 * + col0 FROM tab0 AS cor0
----
-1128
-490
-7830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + col1 + - col2 * - ( 60 ) col1 FROM tab0 cor0
----
192
2090
5100

query I rowsort
SELECT ALL + ( col0 ) + col0 FROM tab1 cor0
----
128
160
6

query I rowsort
SELECT ALL - + col1 - + 88 AS col2 FROM tab1 AS cor0
----
-101
-114
-98

query I rowsort
SELECT DISTINCT 22 * 64 AS col2 FROM tab1 AS cor0
----
1408

query I rowsort
SELECT ALL col2 * col1 + + col0 * - 70 AS col1 FROM tab0 cor0
----
-2353
1158
1232

query I rowsort
SELECT ALL - col2 + col1 + col0 AS col1 FROM tab0 AS cor0
----
131
77
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3696
SELECT ALL - cor0.col1 DIV 4 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to ca16689ea46bfd68d97858815731df87

skipif mysql # not compatible
query I rowsort label-3696
SELECT ALL - cor0.col1 / 4 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to ca16689ea46bfd68d97858815731df87

query I rowsort
SELECT + - 45 + 32 * col2 FROM tab1 AS cor0
----
1683
1779
3027

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 67 col1 FROM tab0 AS cor0
----
67
67
67

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3699
SELECT ALL CAST( NULL AS SIGNED ) + - cor0.col1 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-3699
SELECT ALL CAST ( NULL AS INTEGER ) + - cor0.col1 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3700
SELECT DISTINCT col1 * + col2 * - col0 - - CAST( NULL AS DECIMAL ) AS col1 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3700
SELECT DISTINCT col1 * + col2 * - col0 - - CAST ( NULL AS REAL ) AS col1 FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + 11 * col1 AS col2 FROM tab1 AS cor0
----
110
143
286

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 + - 50 * - col2 col1 FROM tab2 AS cor0
----
1222
1343
1821

query I rowsort
SELECT DISTINCT - col0 + col0 + col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT - 10 * col2 AS col1 FROM tab2 AS cor0
----
-260
-270
-380

query I rowsort
SELECT ALL - 65 AS col1 FROM tab0
----
-65
-65
-65

query I rowsort
SELECT DISTINCT - cor1.col0 * - cor1.col1 AS col0 FROM tab1, tab1 cor0, tab1 AS cor1
----
1040
640
78

query I rowsort
SELECT DISTINCT - col1 * - col0 + - 60 FROM tab1 AS cor0
----
18
580
980

query I rowsort
SELECT DISTINCT + cor0.col2 + tab2.col1 FROM tab2, tab1 AS cor0
----
113
116
127
155
71
74
85
88

query I rowsort
SELECT + 62 AS col1 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 4911b1417a3797d23dd8f38b6ed05c1b

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( col2 AS REAL ) * - col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL 78 * - 32 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to cf769f41f14ae4e16356853006ad55c1

query I rowsort
SELECT - col0 + + 29 * + col0 + col0 AS col0 FROM tab2
----
203
2262
2291

query I rowsort
SELECT DISTINCT col0 * col2 + tab1.col0 + + col1 FROM tab1
----
191
3722
7773

query I rowsort
SELECT - col0 + + 97 * - col1 + + col0 AS col0 FROM tab0 AS cor0
----
-8342
-8827
-9409

query I rowsort
SELECT ALL + + 33 + - 13 * - col0 FROM tab2 AS cor0
----
1047
1060
124

query I rowsort
SELECT + ( + 46 + col1 ) AS col2 FROM tab0
----
132
137
143

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3717
SELECT + - CAST( cor0.col1 AS SIGNED ) + - col1 FROM tab0 AS cor0
----
-172
-182
-194

skipif mysql # not compatible
query I rowsort label-3717
SELECT + - CAST ( cor0.col1 AS INTEGER ) + - col1 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT - col1 + 79 FROM tab2 AS cor0
----
20
48
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-3719
SELECT DISTINCT col0 DIV cor0.col1 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-3719
SELECT DISTINCT col0 / cor0.col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL + 84 * + col1 FROM tab0 cor0
----
7224
7644
8148

query I rowsort
SELECT DISTINCT col0 + + col0 * col1 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT + 19 * col0 + - col2 AS col0 FROM tab2 AS cor0
----
106
1456
1463

query I rowsort
SELECT col1 * cor0.col2 + + col2 + - ( + col2 ) AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT cor0.col0 * - cor0.col1 FROM tab2 AS cor0
----
-1343
-217
-4602

query I rowsort
SELECT ALL + cor0.col0 + + col0 * + col0 FROM tab0 cor0
----
1260
600
8010

query I rowsort
SELECT ALL - cor0.col0 * col1 AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col0 FROM tab2, tab0 AS cor0
----
24
35
89

query I rowsort
SELECT 83 AS col1 FROM tab1
----
83
83
83

query I rowsort
SELECT - - cor0.col1 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT ALL col2 * - col2 + col1 FROM tab0 AS cor0
----
-1003
-6633
96

query I rowsort
SELECT ALL - 21 AS col0 FROM tab0 cor0
----
-21
-21
-21

query I rowsort
SELECT DISTINCT + - 3 FROM tab1 AS cor0
----
-3

query I rowsort
SELECT ALL - cor0.col2 + + col2 + - 70 FROM tab0 AS cor0
----
-70
-70
-70

query I rowsort
SELECT DISTINCT - - 57 FROM tab1 AS cor0
----
57

query I rowsort
SELECT ALL + 46 + col2 * col1 * col1 FROM tab2 AS cor0
----
11028
25993
90552

query I rowsort
SELECT ALL + 44 + col1 AS col0 FROM tab1 AS cor0
----
54
57
70

query I rowsort
SELECT DISTINCT + col0 * col0 AS col0 FROM tab2 cor0
----
49
6084
6241

query I rowsort
SELECT ALL - 47 FROM tab0, tab0 AS cor0
----
9 values hashing to 6942a0d9558277afd0d00408d65cf5aa

query I rowsort
SELECT + 94 FROM tab0, tab0 cor0, tab0 AS cor1
----
27 values hashing to a4d239626cf0546ac1b2f57bb8407089

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * ( 75 ) col2 FROM tab1 AS cor0
----
-225
-4800
-6000

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2, tab2 AS cor0, tab0 AS cor1, tab1, tab0 cor2
----
3645 values hashing to 2566f3fa788816c8bfc482e730aaed74

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3742
SELECT DISTINCT + col1 + - CAST( NULL AS SIGNED ) * col0 AS col0 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-3742
SELECT DISTINCT + col1 + - CAST ( NULL AS INTEGER ) * col0 AS col0 FROM tab0 cor0
----
NULL

query I rowsort
SELECT - cor0.col1 + col2 * ( + col0 + col2 * col1 ) AS col1 FROM tab2 cor0
----
22757
27533
41853

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 + 21 col0 FROM tab0 AS cor0
----
103
22
54

onlyif mysql # use DIV operator for integer division
query I rowsort label-3745
SELECT DISTINCT - tab0.col0 DIV - col1 AS col0 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-3745
SELECT DISTINCT - tab0.col0 / - col1 AS col0 FROM tab0
----
0

query I rowsort
SELECT ( + cor0.col0 ) FROM tab1, tab0 AS cor0
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

query I rowsort
SELECT - + cor0.col1 * - 88 AS col1 FROM tab0 AS cor0
----
7568
8008
8536

query I rowsort
SELECT + ( col2 ) * col2 AS col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT - 50 * + 66 FROM tab1 AS cor0
----
-3300
-3300
-3300

onlyif mysql # use DIV operator for integer division
query I rowsort label-3750
SELECT - - col2 DIV ( col2 ) AS col2 FROM tab1 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3750
SELECT - - col2 / ( col2 ) AS col2 FROM tab1 AS cor0
----
1
1
1

query I rowsort
SELECT + col0 + - col0 * - col1 FROM tab0 AS cor0
----
2088
3430
8188

onlyif mysql # use DIV operator for integer division
query I rowsort label-3752
SELECT col2 DIV + cor0.col2 + + 10 DIV col0 AS col2 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-3752
SELECT col2 / + cor0.col2 + + 10 / col0 AS col2 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT ALL - col2 * col2 + col1 + col1 AS col2 FROM tab0 AS cor0
----
-6542
-917
193

query IIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0 WHERE NOT NULL = NULL
----

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3755
SELECT ALL CAST( 77 AS SIGNED ) + tab1.col2 FROM tab1
----
131
134
173

skipif mysql # not compatible
query I rowsort label-3755
SELECT ALL CAST ( 77 AS INTEGER ) + tab1.col2 FROM tab1
----
131
134
173

query I rowsort
SELECT 74 + - col1 * col0 FROM tab1
----
-4
-566
-966

query I rowsort
SELECT 20 AS col2 FROM tab2, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 0a35fe98f3e7d5fc8ff2ae815bd20ef4

query I rowsort
SELECT ALL 99 AS col0 FROM tab0
----
99
99
99

query I rowsort
SELECT ALL - tab1.col0 * + col0 * ( - col2 ) FROM tab1
----
233472
486
614400

onlyif mysql # use DIV operator for integer division
query I rowsort label-3760
SELECT - col0 + - col1 DIV + 82 FROM tab0 AS cor0
----
-25
-36
-90

skipif mysql # not compatible
query I rowsort label-3760
SELECT - col0 + - col1 / + 82 FROM tab0 AS cor0
----
-25
-36
-90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( + tab0.col1 * - col1 + - tab0.col1 ) col2 FROM tab0
----
-7482
-8372
-9506

query I rowsort
SELECT - + 46 + - 17 FROM tab0 AS cor0
----
-63
-63
-63

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 21 col1 FROM tab0 AS cor0
----
21

query I rowsort
SELECT ALL 15 + - ( - col2 * + ( col0 ) ) AS col1 FROM tab1 AS cor0
----
177
3663
7695

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( 3 ) * cor0.col2 + + col2 col0 FROM tab2 AS cor0
----
-52
-54
-76

onlyif mysql # use DIV operator for integer division
query I rowsort label-3766
SELECT ALL - 11 DIV + col0 + + col1 AS col2 FROM tab0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-3766
SELECT ALL - 11 / + col0 + + col1 AS col2 FROM tab0
----
86
91
97

query I rowsort
SELECT - + ( + cor0.col0 ) + col0 AS col0 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT - col1 * col1 + col1 AS col1 FROM tab0 AS cor0
----
-7310
-8190
-9312

query I rowsort
SELECT DISTINCT col2 + - col2 FROM tab2 AS cor0
----
0

query I rowsort
SELECT DISTINCT - - col0 - - ( + col2 * + cor0.col1 + - 97 ) FROM tab1 AS cor0
----
1231
1310
537

query I rowsort
SELECT col1 * + cor0.col1 - - col2 AS col0 FROM tab2 AS cor0
----
327
3507
988

query I rowsort
SELECT DISTINCT col1 * - 5 * - col0 + col2 * - col0 AS col1 FROM tab1 AS cor0
----
-2480
-448
228

query I rowsort
SELECT DISTINCT + col0 * - col0 + - col0 * ( - ( cor0.col0 ) * col2 ) AS col2 FROM tab2 AS cor0
----
1274
152100
230917

query I rowsort
SELECT - 68 + 46 FROM tab2, tab0 AS cor0
----
9 values hashing to fae46f8148b02964f7145eb6ed5819f9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3775
SELECT DISTINCT CAST( - col1 AS SIGNED ) FROM tab2 cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort label-3775
SELECT DISTINCT CAST ( - col1 AS INTEGER ) FROM tab2 cor0
----
-17
-31
-59

query I rowsort
SELECT ALL - - col0 * cor0.col0 + col1 FROM tab2 AS cor0
----
6143
6258
80

query I rowsort
SELECT DISTINCT + + col0 + - 38 * col2 * col0 FROM tab2 cor0
----
-113997
-7175
-76986

query I rowsort
SELECT ALL - + 96 FROM tab2 AS cor0
----
-96
-96
-96

query I rowsort
SELECT - 37 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 395d44ccbce08828bc493e93ec3d9207

query I rowsort
SELECT - col1 * + cor0.col1 * col1 + col0 * cor0.col1 FROM tab0 AS cor0
----
-633992
-745472
-909278

query I rowsort
SELECT DISTINCT - - 55 FROM tab1 AS cor0
----
55

query I rowsort
SELECT col0 * - 3 AS col1 FROM tab2
----
-21
-234
-237

query I rowsort
SELECT DISTINCT + col0 + + 52 AS col0 FROM tab2 AS cor0
----
130
131
59

query I rowsort
SELECT ALL - - cor0.col0 + 48 * - col1 FROM tab1 AS cor0
----
-1245
-416
-544

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3785
SELECT DISTINCT col0 * - CAST( col2 AS SIGNED ) FROM tab2 AS cor0
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-3785
SELECT DISTINCT col0 * - CAST ( col2 AS INTEGER ) FROM tab2 AS cor0
----
-189
-2028
-3002

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab1 AS cor0, tab1 AS cor1, tab1, tab1 AS cor2
----
3645 values hashing to 0a3bf4d9642f43f11aad64de0d046e6b

query I rowsort
SELECT + cor0.col2 * col2 + 98 AS col2 FROM tab1 cor0
----
3014
3347
9314

query I rowsort
SELECT DISTINCT - col1 * col2 * ( - tab0.col1 + col1 * - col0 ) AS col1 FROM tab0
----
338724
6101700
61113780

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0, tab1 AS cor1, tab2, tab1 cor2
----
3645 values hashing to db56d052e81a1ceebb4c3aea124670be

query I rowsort
SELECT col1 * + 19 * tab1.col0 AS col2 FROM tab1
----
12160
1482
19760

query I rowsort
SELECT ALL 86 FROM tab2, tab2 AS cor0
----
9 values hashing to 2d8c3a0d19ea51447f83cd18b49fee19

query I rowsort
SELECT + col2 * - tab0.col1 AS col0 FROM tab0
----
-2838
-7462
-97

query I rowsort
SELECT + col2 + ( - tab1.col1 + + col2 ) FROM tab1
----
104
179
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab0.col2 * col2 col2 FROM tab0
----
1
1089
6724

query I rowsort
SELECT ALL - 12 AS col1 FROM tab1, tab2 cor0
----
9 values hashing to e698dd57d3aac30af14ce35da434bb45

query I rowsort
SELECT DISTINCT ( col1 ) + + col0 AS col0 FROM tab0
----
110
132
180

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3797
SELECT DISTINCT - CAST( - col2 AS SIGNED ) + - col1 AS col1 FROM tab0
----
-53
-9
-96

skipif mysql # not compatible
query I rowsort label-3797
SELECT DISTINCT - CAST ( - col2 AS INTEGER ) + - col1 AS col1 FROM tab0
----
-53
-9
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-3798
SELECT - 46 DIV + 12 FROM tab1
----
-3
-3
-3

skipif mysql # not compatible
query I rowsort label-3798
SELECT - 46 / + 12 FROM tab1
----
-3
-3
-3

query I rowsort
SELECT + 10 * tab2.col0 AS col1 FROM tab2
----
70
780
790

query I rowsort
SELECT ALL col2 * 22 AS col2 FROM tab0 cor0
----
1804
22
726

query I rowsort
SELECT ALL 4 * ( col2 ) + col1 FROM tab2
----
139
163
169

query I rowsort
SELECT ALL - 83 + col2 AS col2 FROM tab2 AS cor0
----
-45
-56
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + + col0 * + col2 * 32 col2 FROM tab1 AS cor0
----
116726
245747
5158

query I rowsort
SELECT ALL - - 8 + - col2 * - col2 FROM tab0 cor0
----
1097
6732
9

query I rowsort
SELECT col1 + col2 * + col1 * col0 AS col1 FROM tab2 AS cor0
----
119711
51051
5890

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( - col1 AS REAL ) AS col2 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT col0 + col2 * col2 * 89 AS col2 FROM tab0
----
124
598525
96945

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * col2 + - col2 * ( col2 * col1 + - col2 ) col2 FROM tab2
----
-21141
-21660
-38532

query I rowsort
SELECT DISTINCT col1 + tab0.col2 AS col0 FROM tab0
----
119
173
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-3810
SELECT - col1 * tab0.col1 + - col1 DIV - col2 FROM tab0
----
-7394
-8280
-9312

skipif mysql # not compatible
query I rowsort label-3810
SELECT - col1 * tab0.col1 + - col1 / - col2 FROM tab0
----
-7394
-8280
-9312

query I rowsort
SELECT DISTINCT + col1 * col1 + ( - col2 + col0 ) FROM tab1 AS cor0
----
107
153
625

query I rowsort
SELECT DISTINCT - 77 * + col2 FROM tab2
----
-2002
-2079
-2926

query I rowsort
SELECT - + ( + col2 ) * + ( 62 * + col1 ) + cor0.col0 AS col0 FROM tab2 AS cor0
----
-39973
-51887
-95030

query I rowsort
SELECT - 73 AS col2 FROM tab0, tab2 cor0
----
9 values hashing to 84ab9db5468b4a1781bd8d5c8e0e77fc

query I rowsort
SELECT ALL - col0 * - 56 AS col0 FROM tab0 AS cor0
----
1344
1960
4984

query I rowsort
SELECT ALL col2 + - cor0.col2 * col1 FROM tab1 AS cor0
----
-1152
-1350
-513

query I rowsort
SELECT 73 * + 79 AS col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 17795659c5a80e209cfc433d0cc8a08e

query I rowsort
SELECT + col2 + - col1 * ( cor0.col0 + - col1 ) FROM tab1 AS cor0
----
-483
-775
652

query I rowsort
SELECT ALL col0 * col1 + - col0 AS col2 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT col2 + 23 FROM tab2 cor0
----
49
50
61

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 * cor0.col2 * + cor0.col2 col0 FROM tab0 AS cor0
----
26136
35
598436

query I rowsort
SELECT ALL - col1 + + ( - col1 ) * + col0 AS col0 FROM tab0 cor0
----
-2150
-3492
-8190

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 + ( - col0 ) * col2 col1 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT + col1 * + col0 + - 87 FROM tab2 AS cor0
----
1256
130
4515

onlyif mysql # use DIV operator for integer division
query I rowsort label-3825
SELECT DISTINCT + col2 DIV + 7 + - col2 * - cor0.col0 col0 FROM tab0 AS cor0
----
35
7309
796

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3825
SELECT DISTINCT + col2 / + 7 + - col2 * - cor0.col0 col0 FROM tab0 AS cor0
----
35
7309
796

query I rowsort
SELECT DISTINCT + 82 FROM tab0, tab2, tab1 AS cor0
----
82

query I rowsort
SELECT ALL - - col0 * - ( col0 + - col1 * + col0 ) FROM tab0 AS cor0
----
117600
48960
712890

query I rowsort
SELECT DISTINCT + cor0.col0 * col1 AS col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL + + 25 * col0 + - col2 AS col1 FROM tab1 AS cor0
----
1543
1904
21

query I rowsort
SELECT ALL + 24 AS col0 FROM tab0 AS cor0
----
24
24
24

query I rowsort
SELECT ALL 33 + col2 AS col0 FROM tab2 AS cor0
----
59
60
71

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col1 + col1 ) col2 FROM tab0
----
172
182
194

query I rowsort
SELECT - - col1 + + 47 - 77 AS col1 FROM tab0 AS cor0
----
56
61
67

query I rowsort
SELECT - col1 + + 72 + - cor0.col1 FROM tab0 AS cor0
----
-100
-110
-122

query I rowsort
SELECT - cor0.col0 * cor0.col1 + cor0.col2 + col0 * + 60 FROM tab2 cor0
----
104
230
3435

onlyif mysql # use DIV operator for integer division
query I rowsort label-3836
SELECT - col0 DIV col1 + - 99 AS col0 FROM tab2 AS cor0
----
-100
-103
-99

skipif mysql # not compatible
query I rowsort label-3836
SELECT - col0 / col1 + - 99 AS col0 FROM tab2 AS cor0
----
-100
-103
-99

query I rowsort
SELECT - + col1 * - ( - col2 + - cor0.col1 ) FROM tab0 AS cor0
----
-10234
-15743
-9506

query I rowsort
SELECT + col0 + col0 * col2 AS col1 FROM tab2
----
196
2106
3081

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + ( + col2 ) + - tab0.col2 * + col1 col1 FROM tab0
----
-132
-14760
-3630

query I rowsort
SELECT + col2 + ( + col2 ) FROM tab1
----
108
114
192

query I rowsort
SELECT col1 + ( - tab2.col1 * tab2.col0 ) FROM tab2
----
-1326
-186
-4543

query I rowsort
SELECT tab0.col0 * 36 AS col2 FROM tab0
----
1260
3204
864

onlyif mysql # use DIV operator for integer division
query I rowsort label-3843
SELECT 84 DIV + 55 FROM tab0, tab1 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

skipif mysql # not compatible
query I rowsort label-3843
SELECT 84 / + 55 FROM tab0, tab1 AS cor0
----
9 values hashing to 001554c2952f1a80506b182ee04686f5

query I rowsort
SELECT DISTINCT 29 AS col1 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
29

query I rowsort
SELECT DISTINCT tab2.col1 * 38 * col2 + col0 AS col2 FROM tab2
----
24627
31813
58370

query I rowsort
SELECT + 49 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to cb40783c0fff72e8802cdf0682e7cb55

query I rowsort
SELECT + - 84 AS col1 FROM tab0 cor0
----
-84
-84
-84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 85 col1 FROM tab2 AS cor0
----
85

query I rowsort
SELECT ALL - 88 + + col2 FROM tab1 cor0
----
-31
-34
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 * col2 col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL 40 * cor0.col1 * col1 FROM tab0 AS cor0
----
295840
331240
376360

query I rowsort
SELECT col1 + cor0.col1 * - cor0.col0 FROM tab0 cor0
----
-1978
-3298
-8008

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3853
SELECT ALL - CAST( col0 AS SIGNED ) * col2 col0 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3853
SELECT ALL - CAST ( col0 AS INTEGER ) * col2 col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL col1 * - ( - col0 ) FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT + + ( cor0.col0 ) FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT + + 48 FROM tab2, tab0, tab1 cor0
----
27 values hashing to 0ef571a8722ab7270aa7272c1174b88e

query I rowsort
SELECT DISTINCT + col0 * - col0 - - 87 * col2 FROM tab2 cor0
----
-2935
-3822
2300

query I rowsort
SELECT - 63 + - col0 * + col2 FROM tab1 AS cor0
----
-225
-3711
-7743

query I rowsort
SELECT DISTINCT + col2 + col2 AS col2 FROM tab0 cor0
----
164
2
66

query I rowsort
SELECT - ( + col2 ) AS col0 FROM tab1
----
-54
-57
-96

query I rowsort
SELECT - col1 + 6 FROM tab0
----
-80
-85
-91

query I rowsort
SELECT 29 AS col0 FROM tab2 AS cor0
----
29
29
29

query I rowsort
SELECT 10 AS col1 FROM tab2, tab0 cor0
----
9 values hashing to a47194429f3e0358a3aebffd5f050113

query I rowsort
SELECT + 63 * col2 AS col1 FROM tab2
----
1638
1701
2394

query I rowsort
SELECT ALL - 4 FROM tab0
----
-4
-4
-4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 61 col2 FROM tab2, tab1 cor0
----
-61

query I rowsort
SELECT ( + col2 ) + 1 AS col1 FROM tab1 AS cor0
----
55
58
97

query I rowsort
SELECT - col0 + col1 AS col0 FROM tab1 cor0
----
-54
-67
23

onlyif mysql # use DIV operator for integer division
query I rowsort label-3869
SELECT + col1 DIV - cor0.col2 col0 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-3869
SELECT + col1 / - cor0.col2 col0 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 74 col2 FROM tab0 AS cor0
----
74
74
74

query I rowsort
SELECT + col2 * + col2 + + cor0.col2 FROM tab1 cor0
----
2970
3306
9312

onlyif mysql # use DIV operator for integer division
query I rowsort label-3872
SELECT col1 * - col1 + cor0.col1 DIV - cor0.col1 AS col0 FROM tab0 AS cor0
----
-7397
-8282
-9410

skipif mysql # not compatible
query I rowsort label-3872
SELECT col1 * - col1 + cor0.col1 / - cor0.col1 AS col0 FROM tab0 AS cor0
----
-7397
-8282
-9410

query I rowsort
SELECT + col0 + col0 * - cor0.col2 AS col0 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT cor0.col2 + 76 FROM tab0 AS cor0
----
109
158
77

query I rowsort
SELECT DISTINCT - col2 + + col1 * cor0.col1 AS col0 FROM tab0 AS cor0
----
7363
8199
9408

query I rowsort
SELECT + col2 + 46 - col1 FROM tab2 AS cor0
----
13
42
67

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + + col0 col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT + + col1 * 61 + + cor0.col0 * col2 FROM tab2 AS cor0
----
2080
4039
5627

query I rowsort
SELECT - - col0 + - 11 AS col0 FROM tab0 AS cor0
----
13
24
78

query I rowsort
SELECT - - ( col1 ) AS col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT - col1 * 11 + - 42 FROM tab2
----
-229
-383
-691

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3882
SELECT + CAST( - col1 AS SIGNED ) + col0 + - ( + cor0.col0 * col2 ) AS col1 FROM tab2 AS cor0
----
-2009
-213
-2940

skipif mysql # not compatible
query I rowsort label-3882
SELECT + CAST ( - col1 AS INTEGER ) + col0 + - ( + cor0.col0 * col2 ) AS col1 FROM tab2 AS cor0
----
-2009
-213
-2940

onlyif mysql # use DIV operator for integer division
query I rowsort label-3883
SELECT - 34 + - col0 DIV - col1 FROM tab0 cor0
----
-34
-34
-34

skipif mysql # not compatible
query I rowsort label-3883
SELECT - 34 + - col0 / - col1 FROM tab0 cor0
----
-34
-34
-34

query I rowsort
SELECT 6 + col1 FROM tab1
----
16
19
32

query I rowsort
SELECT + 48 + col1 FROM tab0 AS cor0
----
134
139
145

query I rowsort
SELECT DISTINCT col0 * col2 * col1 FROM tab0 AS cor0
----
3395
664118
68112

query I rowsort
SELECT ALL + 95 * - col0 AS col0 FROM tab0 cor0
----
-2280
-3325
-8455

query I rowsort
SELECT - - 50 FROM tab2 AS cor0
----
50
50
50

query I rowsort
SELECT - - cor0.col0 + + ( - cor0.col0 ) FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT ALL col0 * ( col0 * - cor0.col2 ) FROM tab0 AS cor0
----
-1225
-19008
-649522

query I rowsort
SELECT col2 + ( 5 + + col0 ) AS col0 FROM tab2 cor0
----
109
122
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * col2 + - col1 col1 FROM tab0 AS cor0
----
-132
-7389
-878

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - cor0.col0 * + col2 col0 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT - + ( cor0.col1 ) FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT DISTINCT + - col0 * col1 * + 50 FROM tab0 AS cor0
----
-103200
-169750
-404950

query I rowsort
SELECT + + col1 + + 53 + ( - col0 * col2 ) AS col0 FROM tab2 AS cor0
----
-105
-1916
-2932

onlyif mysql # use DIV operator for integer division
query I rowsort label-3897
SELECT + + col2 * col0 + col0 DIV col0 + col2 FROM tab1 cor0
----
217
3706
7777

skipif mysql # not compatible
query I rowsort label-3897
SELECT + + col2 * col0 + col0 / col0 + col2 FROM tab1 cor0
----
217
3706
7777

query I rowsort
SELECT ALL 9 FROM tab0, tab1 AS cor0
----
9 values hashing to 03b93b53107e36cf7d524e48c509b17b

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col0 * col0 col1 FROM tab2 AS cor0
----
-49
-6084
-6241

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3900
SELECT - CAST( NULL AS SIGNED ) * col0 * + col2 + + 29 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3900
SELECT - CAST ( NULL AS INTEGER ) * col0 * + col2 + + 29 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3901
SELECT 58 DIV - col0 + + col2 AS col2 FROM tab0
----
0
31
82

skipif mysql # not compatible
query I rowsort label-3901
SELECT 58 / - col0 + + col2 AS col2 FROM tab0
----
0
31
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-3902
SELECT - - col0 * + 77 * cor0.col0 + - 97 DIV col1 AS col1 FROM tab1 AS cor0
----
315383
492793
690

skipif mysql # not compatible
query I rowsort label-3902
SELECT - - col0 * + 77 * cor0.col0 + - 97 / col1 AS col1 FROM tab1 AS cor0
----
315383
492793
690

onlyif mysql # use DIV operator for integer division
query I rowsort label-3903
SELECT ALL - cor0.col1 DIV cor0.col1 - + cor0.col1 * cor0.col0 AS col2 FROM tab1 AS cor0
----
-1041
-641
-79

skipif mysql # not compatible
query I rowsort label-3903
SELECT ALL - cor0.col1 / cor0.col1 - + cor0.col1 * cor0.col0 AS col2 FROM tab1 AS cor0
----
-1041
-641
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-3904
SELECT - - col2 DIV col1 AS col0 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-3904
SELECT - - col2 / col1 AS col0 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-3905
SELECT DISTINCT 5 DIV col0 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-3905
SELECT DISTINCT 5 / col0 FROM tab2 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 + + cor0.col2 col0 FROM tab2 AS cor0
----
-33
-4
21

query I rowsort
SELECT + - col1 * - col0 * + 9 AS col1 FROM tab2 AS cor0
----
12087
1953
41418

query I rowsort
SELECT ALL - col2 + col0 * + 11 AS col1 FROM tab0 AS cor0
----
231
384
897

query I rowsort
SELECT DISTINCT + col0 + col1 * + 26 AS col2 FROM tab1 AS cor0
----
324
418
679

query I rowsort
SELECT ( + col2 ) - + col0 FROM tab0
----
-34
-7
9

query I rowsort
SELECT ALL ( - tab0.col2 * - tab0.col1 ) FROM tab0
----
2838
7462
97

query I rowsort
SELECT + col2 + tab0.col1 AS col2 FROM tab0
----
119
173
98

query I rowsort
SELECT DISTINCT + tab1.col2 AS col1 FROM tab1, tab0 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT - col1 + - col1 * - col1 AS col1 FROM tab1 AS cor0
----
156
650
90

query I rowsort
SELECT DISTINCT + col2 * - col0 - col1 FROM tab2 cor0
----
-2087
-220
-3019

query I rowsort
SELECT DISTINCT 26 AS col2 FROM tab0 AS cor0
----
26

query I rowsort
SELECT 85 + col1 FROM tab1 AS cor0
----
111
95
98

query I rowsort
SELECT ALL + - 18 + col2 AS col0 FROM tab0 cor0
----
-17
15
64

query I rowsort
SELECT ALL - col2 - col0 FROM tab1 cor0
----
-121
-176
-57

query I rowsort
SELECT - 36 * col2 FROM tab1 cor0
----
-1944
-2052
-3456

query I rowsort
SELECT ALL - 81 * cor0.col0 + + 25 * - 12 AS col1 FROM tab0 cor0
----
-2244
-3135
-7509

query I rowsort
SELECT ALL + 88 + + col0 FROM tab1
----
152
168
91

query I rowsort
SELECT + col1 - col0 * + 20 FROM tab1
----
-1270
-1587
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 77 col1 FROM tab1
----
77
77
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 * - col1 col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL 45 * col0 AS col0 FROM tab1 AS cor0
----
135
2880
3600

query I rowsort
SELECT DISTINCT cor0.col1 + - cor0.col2 AS col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT - 99 + + col1 FROM tab2
----
-40
-68
-82

query I rowsort
SELECT ALL tab0.col2 FROM tab0, tab1, tab2 AS cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT DISTINCT - cor0.col0 FROM tab2, tab2 AS cor0, tab1 AS cor1
----
-7
-78
-79

query I rowsort
SELECT ALL 86 FROM tab2, tab0 cor0, tab0 AS cor1
----
27 values hashing to ed1a39c2752ca3723602e4a92c54bbc4

query I rowsort
SELECT ALL - col2 + col2 - col2 AS col0 FROM tab0
----
-1
-33
-82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * + col0 - + col1 * - 1 * ( col1 ) col0 FROM tab2 AS cor0
----
1010
6530
9565

query I rowsort
SELECT - - cor0.col2 + cor0.col2 AS col1 FROM tab0 AS cor0
----
164
2
66

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 38 + col0 col1 FROM tab1 AS cor0
----
102
118
41

onlyif mysql # use DIV operator for integer division
query I rowsort label-3936
SELECT DISTINCT + - col2 DIV - col0 + col1 * - col0 FROM tab1 AS cor0
----
-1039
-60
-640

skipif mysql # not compatible
query I rowsort label-3936
SELECT DISTINCT + - col2 / - col0 + col1 * - col0 FROM tab1 AS cor0
----
-1039
-60
-640

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 76 * - 41 * + cor0.col0 + + col0 * - cor0.col1 col0 FROM tab0 cor0
----
-112455
-285423
-76848

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3938
SELECT CAST( col0 AS SIGNED ) FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-3938
SELECT CAST ( col0 AS INTEGER ) FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL - + ( + 51 ) * + cor0.col2 AS col0 FROM tab0 AS cor0
----
-1683
-4182
-51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3940
SELECT DISTINCT col0 + CAST( NULL AS DECIMAL ) AS col1 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-3940
SELECT DISTINCT col0 + CAST ( NULL AS REAL ) AS col1 FROM tab0
----
NULL

query I rowsort
SELECT col1 + col2 * - col0 FROM tab0
----
-706
-7207
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + col1 + + col0 col2 FROM tab0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3943
SELECT col0 + + CAST( NULL AS DECIMAL ) / tab2.col0 + + col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3943
SELECT col0 + + CAST ( NULL AS REAL ) / tab2.col0 + + col2 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3944
SELECT ALL col2 + - CAST( NULL AS DECIMAL ) / 6 + col0 * - col1 AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3944
SELECT ALL col2 + - CAST ( NULL AS REAL ) / 6 + col0 * - col1 AS col1 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3945
SELECT - ( col2 ) * col1 / CAST( NULL AS SIGNED ) + + col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3945
SELECT - ( col2 ) * col1 / CAST ( NULL AS INTEGER ) + + col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 * col2 * - col1 AS col2 FROM tab0 AS cor0
----
244068
679042
9409

query I rowsort
SELECT DISTINCT - cor0.col2 + 54 * col0 AS col2 FROM tab2 AS cor0
----
351
4186
4228

query I rowsort
SELECT ALL - - 21 * 37 FROM tab0 cor0
----
777
777
777

query I rowsort
SELECT ALL + 15 + col1 * col0 * + ( + col2 + col0 ) FROM tab1
----
183055
4461
77455

query I rowsort
SELECT + col2 * + 50 AS col1 FROM tab1
----
2700
2850
4800

query I rowsort
SELECT - + ( col1 ) + - col1 AS col1 FROM tab0 AS cor0
----
-172
-182
-194

query I rowsort
SELECT DISTINCT ( 40 ) * col1 AS col1 FROM tab2 AS cor0
----
1240
2360
680

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 65 col0 FROM tab0 AS cor0
----
-65
-65
-65

query I rowsort
SELECT ALL + 82 * + col2 FROM tab0 AS cor0
----
2706
6724
82

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3955
SELECT - CAST( NULL AS DECIMAL ) + - cor0.col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3955
SELECT - CAST ( NULL AS REAL ) + - cor0.col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + 68 col1 FROM tab0 AS cor0
----
101
150
69

query I rowsort
SELECT DISTINCT ( - col1 ) * + col2 + col1 - - col0 FROM tab0 cor0
----
-2728
-7282
35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3958
SELECT - - CAST( NULL AS SIGNED ) + - 52 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3958
SELECT - - CAST ( NULL AS INTEGER ) + - 52 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 * - col0 + col1 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT - col1 * - col0 + col2 FROM tab0 AS cor0
----
2097
3396
8181

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3961
SELECT ALL + CAST( NULL AS SIGNED ) * + cor0.col1 * - col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3961
SELECT ALL + CAST ( NULL AS INTEGER ) * + cor0.col1 * - col1 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-3962
SELECT + col1 DIV - cor0.col2 + - col0 DIV + col0 AS col1 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-3962
SELECT + col1 / - cor0.col2 + - col0 / + col0 AS col1 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL - cor0.col1 * 24 AS col0 FROM tab1 AS cor0
----
-240
-312
-624

query I rowsort
SELECT + col1 + + 41 FROM tab0 AS cor0
----
127
132
138

query I rowsort
SELECT ALL col2 * 35 * - cor0.col1 + col1 AS col1 FROM tab2 cor0
----
-22593
-29264
-53631

query I rowsort
SELECT - + col1 * - 52 FROM tab1 AS cor0
----
1352
520
676

query I rowsort
SELECT + - cor0.col0 * - col1 + - col2 AS col0 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT ALL col0 + 10 * - 13 AS col1 FROM tab1 AS cor0
----
-127
-50
-66

onlyif mysql # use DIV operator for integer division
query I rowsort label-3969
SELECT DISTINCT + col2 * 89 + - ( col0 ) DIV cor0.col1 FROM tab0 AS cor0
----
2937
7298
89

skipif mysql # not compatible
query I rowsort label-3969
SELECT DISTINCT + col2 * 89 + - ( col0 ) / cor0.col1 FROM tab0 AS cor0
----
2937
7298
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3970
SELECT ALL cor0.col0 * - CAST( 33 AS SIGNED ) + col1 + + CAST( - col1 AS SIGNED ) AS col0 FROM tab2 cor0
----
-231
-2574
-2607

skipif mysql # not compatible
query I rowsort label-3970
SELECT ALL cor0.col0 * - CAST ( 33 AS INTEGER ) + col1 + + CAST ( - col1 AS INTEGER ) AS col0 FROM tab2 cor0
----
-231
-2574
-2607

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 18 col2 FROM tab2, tab2 cor0
----
9 values hashing to b95bafa733666df39c5d3f94760d010f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col2 * cor0.col0 col2 FROM tab0 AS cor0
----
35
7298
792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - 2 ) + + col1 * + 23 col2 FROM tab1 AS cor0
----
228
297
596

onlyif mysql # use DIV operator for integer division
query I rowsort label-3974
SELECT - 92 DIV + col0 FROM tab2 AS cor0
----
-1
-1
-13

skipif mysql # not compatible
query I rowsort label-3974
SELECT - 92 / + col0 FROM tab2 AS cor0
----
-1
-1
-13

query I rowsort
SELECT + - 4 + 57 * cor0.col2 AS col1 FROM tab2 AS cor0
----
1478
1535
2162

onlyif mysql # use DIV operator for integer division
query I rowsort label-3976
SELECT + CAST( - 44 AS SIGNED ) DIV - col0 AS col1 FROM tab2 AS cor0
----
0
0
6

skipif mysql # not compatible
query I rowsort label-3976
SELECT + CAST ( - 44 AS INTEGER ) / - col0 AS col1 FROM tab2 AS cor0
----
0
0
6

query I rowsort
SELECT DISTINCT - col0 * col2 * - ( - col2 ) FROM tab1
----
-207936
-737280
-8748

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3978
SELECT col1 + CAST( + tab0.col2 AS SIGNED ) * - col1 AS col0 FROM tab0
----
-2752
-7371
0

skipif mysql # not compatible
query I rowsort label-3978
SELECT col1 + CAST ( + tab0.col2 AS INTEGER ) * - col1 AS col0 FROM tab0
----
-2752
-7371
0

query I rowsort
SELECT DISTINCT + - 82 + col0 FROM tab1 AS cor0
----
-18
-2
-79

query I rowsort
SELECT - - col0 * - col0 + col2 FROM tab2 AS cor0
----
-22
-6058
-6203

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + cor0.col0 + col2 * CAST ( + col1 AS REAL ) AS col1 FROM tab2 cor0
----
1612
725
844

query I rowsort
SELECT 31 * + col1 + + ( + col0 ) AS col0 FROM tab1 AS cor0
----
374
483
809

query I rowsort
SELECT 0 + + col0 AS col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT col0 - col0 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT 71 AS col0 FROM tab1 AS cor0
----
71

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-3986
SELECT ALL + col2 + + col2 / CAST( NULL AS SIGNED ) FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-3986
SELECT ALL + col2 + + col2 / CAST ( NULL AS INTEGER ) FROM tab1 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 72 AS col2 FROM tab1 AS cor0
----
-72
-72
-72

query I rowsort
SELECT DISTINCT 16 * col0 + 44 AS col0 FROM tab2 cor0
----
1292
1308
156

query I rowsort
SELECT ALL + 37 * col0 * col2 FROM tab2 AS cor0
----
111074
6993
75036

query I rowsort
SELECT 20 + col1 AS col1 FROM tab1 cor0
----
30
33
46

query I rowsort
SELECT ALL + ( - col1 ) * - col1 * col1 + + col2 * + tab1.col1 AS col0 FROM tab1
----
1570
18980
3445

query I rowsort
SELECT - col1 + col2 * cor0.col2 * - cor0.col0 AS col0 FROM tab2 AS cor0
----
-114093
-5134
-52787

query I rowsort
SELECT ALL + 92 + col2 * 49 AS col2 FROM tab2
----
1366
1415
1954

query I rowsort
SELECT + - col0 * + 10 FROM tab0 AS cor0
----
-240
-350
-890

query I rowsort
SELECT + col1 * + 82 + - ( - col0 ) * - 65 AS col2 FROM tab2 cor0
----
-232
-3741
2087

query I rowsort
SELECT DISTINCT - 0 FROM tab0
----
0

query I rowsort
SELECT - col1 * + 59 + - cor0.col1 AS col0 FROM tab1 cor0
----
-1560
-600
-780

query I rowsort
SELECT col0 - - col0 AS col0 FROM tab0 AS cor0
----
178
48
70

query I rowsort
SELECT DISTINCT + col0 + - cor0.col0 * ( cor0.col0 ) FROM tab1 AS cor0
----
-4032
-6
-6320

query I rowsort
SELECT - + col2 + + col1 AS col0 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT + tab2.col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT + 75 FROM tab2, tab2 AS cor0
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

onlyif mysql # use DIV operator for integer division
query I rowsort label-4003
SELECT col1 DIV ( - col1 * - col1 ) + + col1 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-4003
SELECT col1 / ( - col1 * - col1 ) + + col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL col2 + - 61 AS col0 FROM tab0
----
-28
-60
21

query I rowsort
SELECT DISTINCT + ( + col0 + + tab1.col1 ) * col2 AS col0 FROM tab1
----
1566
4218
8928

query I rowsort
SELECT - ( col2 ) AS col2 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT ( cor0.col1 ) FROM tab0, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT ALL ( + col0 ) + col1 AS col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT - - 44 AS col2 FROM tab0 AS cor0
----
44
44
44

query I rowsort
SELECT ALL - 60 * 3 + - col2 FROM tab2 cor0
----
-206
-207
-218

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab2, tab0 AS cor0 CROSS JOIN tab1, tab0, tab0 AS cor1
----
3645 values hashing to 862fba9ac85fdf2cec88a0bec0808b7e

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 74 * cor0.col1 col2 FROM tab0 AS cor0
----
-6364
-6734
-7178

query I rowsort
SELECT col1 * - col1 + + ( ( col2 ) ) + ( + col2 ) * + col2 AS col0 FROM tab0 AS cor0
----
-1475
-6274
-9407

query I rowsort
SELECT + 46 * - cor0.col0 FROM tab2 AS cor0
----
-322
-3588
-3634

query I rowsort
SELECT ALL + - col2 - col1 FROM tab0 AS cor0
----
-119
-173
-98

query I rowsort
SELECT DISTINCT - 23 * col0 * + 88 FROM tab1 AS cor0
----
-129536
-161920
-6072

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4017
SELECT ALL - col2 * col1 * - CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4017
SELECT ALL - col2 * col1 * - CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - cor0.col2 * - col0 AS col0 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT ALL - + 61 FROM tab2 AS cor0
----
-61
-61
-61

onlyif mysql # use DIV operator for integer division
query I rowsort label-4020
SELECT ALL - - col2 + + col0 DIV 48 AS col0 FROM tab2 AS cor0
----
27
27
39

skipif mysql # not compatible
query I rowsort label-4020
SELECT ALL - - col2 + + col0 / 48 AS col0 FROM tab2 AS cor0
----
27
27
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + - 44 col0 FROM tab0
----
-11
-43
38

onlyif mysql # use DIV operator for integer division
query I rowsort label-4022
SELECT col0 DIV 2 + col1 FROM tab1
----
27
42
53

skipif mysql # not compatible
query I rowsort label-4022
SELECT col0 / 2 + col1 FROM tab1
----
27
42
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 24 col2 FROM tab0, tab0 AS cor0
----
24

query I rowsort
SELECT ALL + tab1.col0 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

onlyif mysql # use DIV operator for integer division
query I rowsort label-4025
SELECT ( tab2.col1 ) + + 55 DIV + col1 FROM tab2
----
20
32
59

skipif mysql # not compatible
query I rowsort label-4025
SELECT ( tab2.col1 ) + + 55 / + col1 FROM tab2
----
20
32
59

query I rowsort
SELECT + + col0 * - col1 * col2 AS col1 FROM tab1 AS cor0
----
-36480
-4212
-99840

query I rowsort
SELECT DISTINCT + cor0.col2 + - col1 AS col1 FROM tab2 AS cor0
----
-33
-4
21

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + 5 col2 FROM tab0 AS cor0
----
5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 * - col2 col0 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT + col0 + col2 * col1 AS col2 FROM tab2 cor0
----
1612
725
844

query I rowsort
SELECT DISTINCT ( col1 ) * col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT col1 + + col1 * + col1 AS col0 FROM tab1
----
110
182
702

query I rowsort
SELECT + + 76 AS col0 FROM tab0 AS cor0
----
76
76
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 56 * col2 + + col2 + cor0.col1 col2 FROM tab0 AS cor0
----
-1729
-4419
42

query I rowsort
SELECT DISTINCT col2 * - col1 - col1 * col1 * - col0 AS col0 FROM tab1 AS cor0
----
12272
5830
624

query I rowsort
SELECT ALL - 33 + col1 * - ( 31 ) AS col0 FROM tab1 AS cor0
----
-343
-436
-839

query I rowsort
SELECT DISTINCT + - 24 AS col2 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
-24

query I rowsort
SELECT - 65 AS col1 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 744531575c1b6461ed2916d4940e4d23

query I rowsort
SELECT + tab0.col2 AS col0 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT ALL 12 + col1 AS col2 FROM tab2 AS cor0
----
29
43
71

query I rowsort
SELECT DISTINCT col0 * - 72 AS col1 FROM tab2 AS cor0
----
-504
-5616
-5688

query I rowsort
SELECT DISTINCT + 36 + cor0.col2 AS col2 FROM tab1 AS cor0
----
132
90
93

query I rowsort
SELECT DISTINCT - col0 * 13 FROM tab1 AS cor0
----
-1040
-39
-832

query I rowsort
SELECT col2 + + col2 AS col0 FROM tab1 AS cor0
----
108
114
192

query I rowsort
SELECT ALL + ( 90 ) FROM tab0 AS cor0
----
90
90
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 52 * + col2 col2 FROM tab1 AS cor0
----
2808
2964
4992

query I rowsort
SELECT ( + col0 ) + cor0.col2 AS col0 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT ALL - - 94 + - cor0.col0 * - col1 FROM tab0 AS cor0
----
2158
3489
8193

onlyif mysql # use DIV operator for integer division
query I rowsort label-4049
SELECT DISTINCT - - col1 DIV + col1 + col1 FROM tab2 AS cor0
----
18
32
60

skipif mysql # not compatible
query I rowsort label-4049
SELECT DISTINCT - - col1 / + col1 + col1 FROM tab2 AS cor0
----
18
32
60

skipif mysql # not compatible
query I rowsort
SELECT CAST ( col0 AS REAL ) * - cor0.col0 + col0 AS col1 FROM tab0 AS cor0
----
-1190
-552
-7832

onlyif mysql # use DIV operator for integer division
query I rowsort label-4051
SELECT ALL CAST( - 8 AS SIGNED ) DIV + col1 col0 FROM tab1 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4051
SELECT ALL CAST ( - 8 AS INTEGER ) / + col1 col0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col2 + cor0.col2 * col2 AS col1 FROM tab0 AS cor0
----
0
1056
6642

query I rowsort
SELECT DISTINCT + 4 * col0 AS col1 FROM tab1 AS cor0
----
12
256
320

query I rowsort
SELECT + ( 30 ) + - cor0.col2 FROM tab0 AS cor0
----
-3
-52
29

query I rowsort
SELECT ALL - col1 + + 32 FROM tab1 cor0
----
19
22
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-4056
SELECT 55 + col1 DIV col2 FROM tab0 AS cor0
----
152
56
57

skipif mysql # not compatible
query I rowsort label-4056
SELECT 55 + col1 / col2 FROM tab0 AS cor0
----
152
56
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-4057
SELECT DISTINCT - col0 DIV - 44 + col2 AS col0 FROM tab2 AS cor0
----
27
39

skipif mysql # not compatible
query I rowsort label-4057
SELECT DISTINCT - col0 / - 44 + col2 AS col0 FROM tab2 AS cor0
----
27
39

onlyif mysql # use DIV operator for integer division
query I rowsort label-4058
SELECT ALL 48 DIV col0 AS col2 FROM tab0 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-4058
SELECT ALL 48 / col0 AS col2 FROM tab0 AS cor0
----
0
1
2

query I rowsort
SELECT 85 * col2 AS col0 FROM tab1 AS cor0
----
4590
4845
8160

query I rowsort
SELECT DISTINCT col0 * col2 + col1 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT col1 * - col1 + + col1 AS col0 FROM tab0 AS cor0
----
-7310
-8190
-9312

query I rowsort
SELECT + cor0.col1 + col0 * - col2 AS col1 FROM tab1 AS cor0
----
-136
-3638
-7667

onlyif mysql # use DIV operator for integer division
query I rowsort label-4063
SELECT DISTINCT + 5 DIV col0 AS col2 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4063
SELECT DISTINCT + 5 / col0 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - - col1 * col1 AS col2 FROM tab2 AS cor0
----
289
3481
961

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0 CROSS JOIN tab2, tab0, tab2 AS cor1
----
3645 values hashing to b050f98b2d07c1b092b73ecf6b5b347c

query I rowsort
SELECT 96 * + col0 AS col2 FROM tab0 AS cor0
----
2304
3360
8544

query I rowsort
SELECT col0 + - 58 FROM tab0 AS cor0
----
-23
-34
31

query I rowsort
SELECT - col2 * col0 * - col2 + col0 * col1 AS col0 FROM tab2 AS cor0
----
115419
5320
57330

query I rowsort
SELECT ALL col1 * + ( col2 ) AS col0 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT DISTINCT + col0 + 99 FROM tab0 AS cor0
----
123
134
188

onlyif mysql # use DIV operator for integer division
query I rowsort label-4071
SELECT ALL - col0 DIV + col0 + - col1 AS col2 FROM tab0 AS cor0
----
-87
-92
-98

skipif mysql # not compatible
query I rowsort label-4071
SELECT ALL - col0 / + col0 + - 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 ALL - col2 * - ( - 65 ) + col2 FROM tab2 AS cor0
----
-1664
-1728
-2432

query I rowsort
SELECT DISTINCT - col1 * col2 + - 98 + + cor0.col0 FROM tab0 AS cor0
----
-160
-2912
-7471

query I rowsort
SELECT - col2 + - 98 - + col2 AS col0 FROM tab0
----
-100
-164
-262

onlyif mysql # use DIV operator for integer division
query I rowsort label-4076
SELECT ALL - tab2.col1 * col1 DIV 16 + - col2 * - col2 AS col2 FROM tab2
----
1426
459
669

skipif mysql # not compatible
query I rowsort label-4076
SELECT ALL - tab2.col1 * col1 / 16 + - col2 * - col2 AS col2 FROM tab2
----
1426
459
669

query I rowsort
SELECT ALL + col1 + - 30 FROM tab2
----
-13
1
29

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - 32 * col2 + + cor0.col0 col1 FROM tab0 AS cor0
----
-1032
-2535
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-4079
SELECT - col1 DIV - col2 + - col1 * + col1 FROM tab0 cor0
----
-7394
-8280
-9312

skipif mysql # not compatible
query I rowsort label-4079
SELECT - col1 / - col2 + - col1 * + col1 FROM tab0 cor0
----
-7394
-8280
-9312

query I rowsort
SELECT - - cor0.col0 + ( + col1 ) * + 56 - col2 * col0 FROM tab0 AS cor0
----
-2113
4048
5432

query I rowsort
SELECT + col1 - + ( ( col2 ) ) FROM tab0
----
53
9
96

query I rowsort
SELECT col1 * - col0 - 92 AS col0 FROM tab1
----
-1132
-170
-732

query I rowsort
SELECT ALL + col1 + - 43 FROM tab2
----
-12
-26
16

query I rowsort
SELECT DISTINCT + col1 + - 16 AS col2 FROM tab2
----
1
15
43

query I rowsort
SELECT - col2 * 51 AS col0 FROM tab0
----
-1683
-4182
-51

query I rowsort
SELECT + col0 + + col2 + 19 AS col2 FROM tab2
----
123
136
53

query I rowsort
SELECT + col2 + - col1 AS col1 FROM tab2
----
-33
-4
21

query I rowsort
SELECT - col0 * tab1.col1 + ( col0 ) AS col2 FROM tab1
----
-576
-75
-960

query I rowsort
SELECT + col1 * col0 * ( col2 ) FROM tab2
----
119652
51034
5859

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4090
SELECT DISTINCT + + 62 * + col0 / + CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4090
SELECT DISTINCT + + 62 * + col0 / + CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT + 42 FROM tab1 cor0
----
42

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4092
SELECT ALL col0 + col2 * - CAST( NULL AS SIGNED ) * + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4092
SELECT ALL col0 + col2 * - CAST ( NULL AS INTEGER ) * + col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL ( col0 * ( - col0 ) ) FROM tab1
----
-4096
-6400
-9

query I rowsort
SELECT col2 + ( + 54 ) AS col0 FROM tab1 AS cor0
----
108
111
150

query I rowsort
SELECT - - col2 + + 50 + + col0 FROM tab0 AS cor0
----
107
221
86

onlyif mysql # use DIV operator for integer division
query I rowsort label-4096
SELECT - col2 * ( - col2 ) + + col0 DIV - col1 col1 FROM tab0 cor0
----
1
1089
6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4096
SELECT - col2 * ( - col2 ) + + col0 / - col1 col1 FROM tab0 cor0
----
1
1089
6724

query I rowsort
SELECT - + col0 + cor0.col0 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT ( + 73 ) FROM tab2
----
73

query I rowsort
SELECT DISTINCT + 89 AS col1 FROM tab0
----
89

query I rowsort
SELECT ( tab1.col2 * col2 ) AS col1 FROM tab1
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-4101
SELECT + 93 + - cor0.col0 DIV col2 FROM tab1 AS cor0
----
92
93
93

skipif mysql # not compatible
query I rowsort label-4101
SELECT + 93 + - cor0.col0 / col2 FROM tab1 AS cor0
----
92
93
93

query I rowsort
SELECT DISTINCT + - col0 * - ( + col1 * - col1 + col2 ) AS col2 FROM tab0 AS cor0
----
-176712
-329280
-729711

query I rowsort
SELECT ALL + + col0 * + col1 AS col1 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT - cor0.col0 - + col2 FROM tab1 AS cor0
----
-121
-176
-57

query I rowsort
SELECT - - 36 + + col2 * col1 * + col1 + + col2 * 39 FROM tab2 cor0
----
12500
27036
91556

onlyif mysql # use DIV operator for integer division
query I rowsort label-4106
SELECT + - col1 - + col1 DIV + 18 FROM tab0 AS cor0
----
-102
-90
-96

skipif mysql # not compatible
query I rowsort label-4106
SELECT + - col1 - + col1 / + 18 FROM tab0 AS cor0
----
-102
-90
-96

query I rowsort
SELECT + + col0 * + col2 - - cor0.col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT DISTINCT + 53 + cor0.col0 * col2 AS col2 FROM tab0 AS cor0
----
7351
845
88

query I rowsort
SELECT ALL + + col1 + col1 AS col1 FROM tab2 cor0
----
118
34
62

query I rowsort
SELECT ALL col0 + ( tab0.col0 ) + ( + col0 ) AS col2 FROM tab0
----
105
267
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-4111
SELECT ALL + 53 + + 50 DIV - col2 + - col1 DIV 28 FROM tab0
----
0
49
50

skipif mysql # not compatible
query I rowsort label-4111
SELECT ALL + 53 + + 50 / - col2 + - col1 / 28 FROM tab0
----
0
49
50

query I rowsort
SELECT + 15 - col0 * - col0 * col1 AS col2 FROM tab1 AS cor0
----
249
40975
83215

query I rowsort
SELECT + 67 + - col2 + - 80 FROM tab2 cor0
----
-39
-40
-51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * - col2 col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT 42 FROM tab0 AS cor0
----
42
42
42

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 cor0, tab2 cor1, tab2 AS cor2
----
972 values hashing to a698694a7dac245e42212ff0316bdf45

query I rowsort
SELECT ALL col0 - tab2.col1 FROM tab2
----
-24
19
62

query I rowsort
SELECT ALL 83 - col2 * col1 AS col1 FROM tab2
----
-1451
-563
-754

query I rowsort
SELECT ALL - col2 * col1 + 28 - tab0.col0 * - col2 AS col0 FROM tab0
----
-136
-2018
-34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 * + col1 * col2 + - col2 + col1 * col1 col2 FROM tab0 AS cor0
----
-603685
-86291
9311

query I rowsort
SELECT - 98 AS col1 FROM tab2 cor0
----
-98
-98
-98

query I rowsort
SELECT ALL + cor0.col2 AS col1 FROM tab1, tab2 cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT ALL + col1 * - col0 AS col2 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL - - col2 + cor0.col1 * - 18 AS col0 FROM tab2 AS cor0
----
-1036
-268
-531

query I rowsort
SELECT + col2 + - ( + 98 ) - - col0 AS col0 FROM tab1 AS cor0
----
-41
23
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * - col2 col1 FROM tab0 AS cor0
----
-1
-1089
-6724

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col1 + col1 * + col2 col0 FROM tab1 AS cor0
----
1261
1430
580

query I rowsort
SELECT ALL + + col1 + col2 * + col2 AS col1 FROM tab0 AS cor0
----
1175
6815
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 + - 82 * col0 col0 FROM tab2 AS cor0
----
-601
-6422
-6516

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4130
SELECT - col2 + CAST( NULL AS SIGNED ) col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4130
SELECT - col2 + CAST ( NULL AS INTEGER ) col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col0 * col2 + + 40 AS col2 FROM tab0 AS cor0
----
7338
75
832

query I rowsort
SELECT col0 * tab1.col0 AS col1 FROM tab1
----
4096
6400
9

query I rowsort
SELECT ALL 28 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 8a39580587f2831072e93c319ff94bbf

query I rowsort
SELECT col0 * + col0 * - col0 AS col0 FROM tab1
----
-262144
-27
-512000

query I rowsort
SELECT + 29 * col2 FROM tab0 AS cor0
----
2378
29
957

query I rowsort
SELECT + + 99 * col2 AS col1 FROM tab2 AS cor0
----
2574
2673
3762

query I rowsort
SELECT - 20 + + 3 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to 490d008f3fb5b70d3971cfc6d84503f4

query I rowsort
SELECT ALL - col0 * - col1 AS col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT - - col1 + 95 FROM tab2 AS cor0
----
112
126
154

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 col0 FROM tab1, tab2 AS cor0
----
17
31
59

query I rowsort
SELECT - + col2 + 42 * col1 AS col1 FROM tab2 AS cor0
----
1275
2452
676

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4142
SELECT DISTINCT + col0 + CAST( 59 AS SIGNED ) + + col1 FROM tab2 AS cor0
----
155
196
97

skipif mysql # not compatible
query I rowsort label-4142
SELECT DISTINCT + col0 + CAST ( 59 AS INTEGER ) + + col1 FROM tab2 AS cor0
----
155
196
97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4143
SELECT - col1 * CAST( + 40 AS SIGNED ) + + cor0.col0 AS col2 FROM tab1 AS cor0
----
-1037
-336
-440

skipif mysql # not compatible
query I rowsort label-4143
SELECT - col1 * CAST ( + 40 AS INTEGER ) + + cor0.col0 AS col2 FROM tab1 AS cor0
----
-1037
-336
-440

query I rowsort
SELECT ALL - col0 + + col2 * ( - col2 + + col0 ) FROM tab2 cor0
----
-547
1274
1479

query I rowsort
SELECT DISTINCT col0 + col0 * - col2 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT DISTINCT + - col0 - + 23 * + 66 * col0 AS col1 FROM tab0 AS cor0
----
-135191
-36456
-53165

query I rowsort
SELECT + col0 + - 41 AS col2 FROM tab2 AS cor0
----
-34
37
38

query I rowsort
SELECT ALL + - col1 + 70 AS col1 FROM tab1 AS cor0
----
44
57
60

query I rowsort
SELECT - col1 * + col0 + ( - col0 * + col1 ) FROM tab2 AS cor0
----
-2686
-434
-9204

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - cor0.col2 col2 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT ALL - col1 * - ( + col1 ) + + cor0.col0 FROM tab2 cor0
----
3559
368
968

query I rowsort
SELECT - col0 * 55 AS col1 FROM tab2 AS cor0
----
-385
-4290
-4345

query I rowsort
SELECT DISTINCT - - col1 * cor0.col0 * cor0.col0 + col1 + col2 AS col2 FROM tab1 AS cor0
----
314
41027
83309

query I rowsort
SELECT ALL + col0 + + col2 - cor0.col0 * cor0.col0 AS col2 FROM tab0 AS cor0
----
-1189
-519
-7750

query I rowsort
SELECT DISTINCT cor0.col0 + - col2 * - 17 AS col1 FROM tab1 AS cor0
----
1033
1712
921

query I rowsort
SELECT ALL + + col0 * - col2 - + col1 * - col2 * - 19 FROM tab2 AS cor0
----
-15276
-16092
-31174

query I rowsort
SELECT DISTINCT - col0 + 17 FROM tab2
----
-61
-62
10

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab0 cor2, tab0 AS cor3
----
3645 values hashing to 1713adaf687595322d888d4eeefdbbc8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4159
SELECT DISTINCT - CAST( NULL AS SIGNED ) + col1 / + cor0.col0 AS col0 FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4159
SELECT DISTINCT - CAST ( NULL AS INTEGER ) + col1 / + cor0.col0 AS col0 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + col1 * col0 + col2 FROM tab2 cor0
----
1381
244
4628

query I rowsort
SELECT ALL - 29 + + cor0.col0 AS col2 FROM tab2 cor0
----
-22
49
50

query I rowsort
SELECT ALL - 32 + - col0 * + col0 AS col1 FROM tab1 AS cor0
----
-41
-4128
-6432

query I rowsort
SELECT DISTINCT - 83 AS col0 FROM tab2, tab0 AS cor0
----
-83

query I rowsort
SELECT DISTINCT + tab2.col0 AS col0 FROM tab2, tab1 cor0
----
7
78
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-4165
SELECT - ( - col1 ) DIV col1 - CAST( + col0 AS SIGNED ) FROM tab1
----
-2
-63
-79

skipif mysql # not compatible
query I rowsort label-4165
SELECT - ( - col1 ) / col1 - CAST ( + col0 AS INTEGER ) FROM tab1
----
-2
-63
-79

query I rowsort
SELECT ALL col0 * - col0 * - ( 38 ) + + tab0.col0 FROM tab0
----
21912
301087
46585

onlyif mysql # use DIV operator for integer division
query I rowsort label-4167
SELECT - 98 - + col2 DIV col1 AS col0 FROM tab2
----
-100
-98
-98

skipif mysql # not compatible
query I rowsort label-4167
SELECT - 98 - + col2 / col1 AS col0 FROM tab2
----
-100
-98
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-4168
SELECT 26 + - col0 + - ( col0 ) DIV col2 AS col0 FROM tab1
----
-39
-54
23

skipif mysql # not compatible
query I rowsort label-4168
SELECT 26 + - col0 + - ( col0 ) / col2 AS col0 FROM tab1
----
-39
-54
23

query I rowsort
SELECT ALL - - 33 * cor0.col1 AS col0 FROM tab1 cor0
----
330
429
858

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4170
SELECT - col0 * - col0 + CAST( NULL AS DECIMAL ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4170
SELECT - col0 * - col0 + CAST ( NULL AS REAL ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4171
SELECT - 69 * col2 * - CAST( col0 * col1 AS SIGNED ) + col1 AS col2 FROM tab2 AS cor0
----
3521363
404302
8256047

skipif mysql # not compatible
query I rowsort label-4171
SELECT - 69 * col2 * - CAST ( col0 * col1 AS INTEGER ) + col1 AS col2 FROM tab2 AS cor0
----
3521363
404302
8256047

query I rowsort
SELECT 14 * col0 + + col0 + - col2 FROM tab1
----
-9
1104
903

query I rowsort
SELECT DISTINCT - cor1.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
-17
-31
-59

query I rowsort
SELECT + col0 + + col0 * + tab2.col1 AS col2 FROM tab2
----
1422
224
4680

query I rowsort
SELECT - 16 + - col0 AS col1 FROM tab0
----
-105
-40
-51

onlyif mysql # use DIV operator for integer division
query I rowsort label-4176
SELECT DISTINCT 0 DIV col2 FROM tab1 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4176
SELECT DISTINCT 0 / col2 FROM tab1 AS cor0
----
0

query I rowsort
SELECT ALL - col1 + + col1 * - 64 * 75 AS col0 FROM tab2 cor0
----
-148831
-283259
-81617

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4178
SELECT DISTINCT + - col0 * col0 + - CAST( NULL AS DECIMAL ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4178
SELECT DISTINCT + - col0 * col0 + - CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT 47 - - col2 AS col0 FROM tab1 AS cor0
----
101
104
143

query I rowsort
SELECT + - 47 - + col1 AS col1 FROM tab1 AS cor0
----
-57
-60
-73

query I rowsort
SELECT + col1 + col1 + - cor0.col1 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL + - col1 * col1 + ( - col2 ) AS col2 FROM tab0 AS cor0
----
-7429
-8363
-9410

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4183
SELECT DISTINCT + col1 * CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4183
SELECT DISTINCT + col1 * CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4184
SELECT ALL - col0 - col0 DIV col2 AS col2 FROM tab0 cor0
----
-24
-70
-90

skipif mysql # not compatible
query I rowsort label-4184
SELECT ALL - col0 - col0 / col2 AS col2 FROM tab0 cor0
----
-24
-70
-90

query I rowsort
SELECT DISTINCT + col2 + col1 * col2 AS col1 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT + cor0.col1 + 19 FROM tab1 AS cor0
----
29
32
45

query I rowsort
SELECT cor0.col2 * cor0.col2 + col2 + col0 FROM tab1 AS cor0
----
2973
3370
9392

query I rowsort
SELECT DISTINCT + - col0 * col1 * col2 AS col0 FROM tab2 AS cor0
----
-119652
-51034
-5859

query I rowsort
SELECT col2 * ( - col1 ) + col0 FROM tab0 AS cor0
----
-2814
-62
-7373

query I rowsort
SELECT + + ( + col1 ) * - col1 AS col0 FROM tab2 AS cor0
----
-289
-3481
-961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4191
SELECT DISTINCT - CAST( + col2 AS SIGNED ) * col1 + 59 AS col1 FROM tab2 cor0
----
-1475
-587
-778

skipif mysql # not compatible
query I rowsort label-4191
SELECT DISTINCT - CAST ( + col2 AS INTEGER ) * col1 + 59 AS col1 FROM tab2 cor0
----
-1475
-587
-778

query I rowsort
SELECT + - 75 + col0 * col2 FROM tab1 cor0
----
3573
7605
87

query I rowsort
SELECT 66 FROM tab0, tab0 AS cor0
----
9 values hashing to 29794915b585eea848ad670075452c88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * col0 + + col0 col0 FROM tab0 AS cor0
----
70
7387
816

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * + ( - col0 ) col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT DISTINCT + - col0 * col0 + - col0 - 10 FROM tab2 AS cor0
----
-6172
-6330
-66

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0, tab1 AS cor1, tab0 cor2
----
972 values hashing to 9b91cf9fcc064ee1c13074a678b72ac7

query I rowsort
SELECT DISTINCT - ( 91 ) FROM tab2 AS cor0
----
-91

query I rowsort
SELECT 72 FROM tab2, tab2 AS cor0
----
9 values hashing to 906b63c9adb7d9ac7355cab71a25fc49

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4200
SELECT ALL + col2 + - col0 + + col1 * CAST( NULL AS SIGNED ) * - 9 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4200
SELECT ALL + col2 + - col0 + + col1 * CAST ( NULL AS INTEGER ) * - 9 AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + cor0.col0 * col0 AS col1 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT ALL - - 80 * - cor0.col2 * - cor0.col2 FROM tab2 cor0
----
115520
54080
58320

query I rowsort
SELECT ALL - + col1 * cor0.col2 FROM tab1 AS cor0
----
-1248
-1404
-570

query I rowsort
SELECT - 23 * - col1 AS col1 FROM tab1 AS cor0
----
230
299
598

query I rowsort
SELECT DISTINCT - 1 * + cor0.col1 FROM tab1 AS cor0
----
-10
-13
-26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4206
SELECT DISTINCT - - cor0.col0 * col1 * + CAST( NULL AS SIGNED ) AS col0 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4206
SELECT DISTINCT - - cor0.col0 * col1 * + CAST ( NULL AS INTEGER ) AS col0 FROM tab0 cor0
----
NULL

query I rowsort
SELECT ALL + - col0 * col1 AS col0 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT tab0.col2 * + tab0.col0 + col1 * + tab0.col2 * col0 FROM tab0
----
3430
671416
68904

query I rowsort
SELECT - col2 * col0 * + cor0.col2 - - col2 FROM tab2 AS cor0
----
-114038
-5076
-52702

query I rowsort
SELECT - col0 + - col0 * cor0.col1 * + ( cor0.col0 ) FROM tab1 cor0
----
-237
-41024
-83280

query I rowsort
SELECT + - cor0.col2 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

onlyif mysql # use DIV operator for integer division
query I rowsort label-4212
SELECT - col1 DIV 37 AS col1 FROM tab2
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-4212
SELECT - col1 / 37 AS col1 FROM tab2
----
-1
0
0

query I rowsort
SELECT DISTINCT ( + cor0.col0 ) AS col2 FROM tab0, tab2 AS cor0
----
7
78
79

query I rowsort
SELECT DISTINCT + 39 FROM tab0, tab2 AS cor0
----
39

query I rowsort
SELECT + 34 * - tab1.col1 AS col1 FROM tab1
----
-340
-442
-884

onlyif mysql # use DIV operator for integer division
query I rowsort label-4216
SELECT DISTINCT 93 DIV + tab0.col0 FROM tab0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-4216
SELECT DISTINCT 93 / + tab0.col0 FROM tab0
----
1
2
3

query I rowsort
SELECT - 96 + + 82 FROM tab2, tab1, tab1 cor0
----
27 values hashing to c2bf0e2420d22cd58d7ee3b30827afcc

query I rowsort
SELECT ALL - - 88 + col0 AS col1 FROM tab2 AS cor0
----
166
167
95

query I rowsort
SELECT ALL + - 5 + col2 FROM tab1 cor0
----
49
52
91

query I rowsort
SELECT DISTINCT - ( - tab0.col1 ) * col1 * ( tab0.col2 ) FROM tab0
----
244068
679042
9409

query I rowsort
SELECT ALL 98 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to c758e8afbdfa6aae279045b0e9cbacc2

query I rowsort
SELECT ALL 61 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 8d4dfe649433a599fc4b10830cc7ce55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 * 44 col0 FROM tab0 cor0
----
1452
3608
44

query I rowsort
SELECT + 93 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 85ef191bf1b307f300b3fd49992fcae7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col2 col1 FROM tab2, tab0 cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT ALL - + 73 + - col0 FROM tab2 AS cor0
----
-151
-152
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-4227
SELECT col2 * + col2 DIV col2 AS col2 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-4227
SELECT col2 * + col2 / col2 AS col2 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL 78 * - col2 * - ( + tab2.col2 ) AS col2 FROM tab2
----
112632
52728
56862

query I rowsort
SELECT 74 * 94 FROM tab1, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 0e95dd4d402ddfc55b7f5cd5431dace7

query I rowsort
SELECT DISTINCT cor0.col1 * col2 + - cor0.col2 * col2 - - 45 FROM tab0 AS cor0
----
141
1794
783

query I rowsort
SELECT DISTINCT + col1 * 17 + + ( col1 ) * cor0.col0 FROM tab1 AS cor0
----
1261
520
810

query I rowsort
SELECT ALL col1 - + 22 * cor0.col2 * + col1 AS col2 FROM tab2 AS cor0
----
-14195
-18383
-33689

query I rowsort
SELECT ALL + col1 * - col1 * - col2 AS col0 FROM tab1 AS cor0
----
16224
36504
5700

query I rowsort
SELECT ALL 2 FROM tab0, tab0 AS cor0
----
9 values hashing to 84dbfaf9bc17dd097f15bc36b4186261

query I rowsort
SELECT + col1 * 89 FROM tab0 cor0
----
7654
8099
8633

query I rowsort
SELECT - - col0 + col0 * + col2 FROM tab1 AS cor0
----
165
3712
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-4237
SELECT col2 DIV col1 - 24 * - col2 * + 8 AS col2 FROM tab1
----
10370
10949
18439

skipif mysql # not compatible
query I rowsort label-4237
SELECT col2 / col1 - 24 * - col2 * + 8 AS col2 FROM tab1
----
10370
10949
18439

onlyif mysql # use DIV operator for integer division
query I rowsort label-4238
SELECT DISTINCT + col2 * ( + col0 ) DIV col2 FROM tab0
----
24
35
89

skipif mysql # not compatible
query I rowsort label-4238
SELECT DISTINCT + col2 * ( + col0 ) / col2 FROM tab0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4239
SELECT DISTINCT col2 * CAST( col0 AS SIGNED ) AS col0 FROM tab2
----
189
2028
3002

skipif mysql # not compatible
query I rowsort label-4239
SELECT DISTINCT col2 * CAST ( col0 AS INTEGER ) AS col0 FROM tab2
----
189
2028
3002

query I rowsort
SELECT ( 24 ) FROM tab0, tab0 AS cor0
----
9 values hashing to b0d834ef9e4346801b6aaa0e74b2c8ef

query I rowsort
SELECT - col1 * + 71 FROM tab0 cor0
----
-6106
-6461
-6887

query I rowsort
SELECT - 74 * - col1 AS col1 FROM tab2 AS cor0
----
1258
2294
4366

query I rowsort
SELECT + - 63 * - col2 AS col2 FROM tab1 cor0
----
3402
3591
6048

query I rowsort
SELECT - + ( + cor0.col0 ) * + cor0.col2 * + col2 AS col1 FROM tab1 AS cor0
----
-207936
-737280
-8748

onlyif mysql # use DIV operator for integer division
query I rowsort label-4245
SELECT 35 DIV + 50 AS col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4245
SELECT 35 / + 50 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - 39 AS col0 FROM tab1 AS cor0
----
-39

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4247
SELECT + CAST( + col2 AS SIGNED ) AS col0 FROM tab0 cor0
----
1
33
82

skipif mysql # not compatible
query I rowsort label-4247
SELECT + CAST ( + col2 AS INTEGER ) AS col0 FROM tab0 cor0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-4248
SELECT col1 + + col1 DIV + col2 AS col1 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-4248
SELECT col1 + + col1 / + col2 AS col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL + + ( col1 ) FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT col1 + + col2 + cor0.col0 FROM tab2 AS cor0
----
134
163
65

query I rowsort
SELECT + + 83 FROM tab0 AS cor0
----
83
83
83

query I rowsort
SELECT + 52 + col2 * - col1 AS col0 FROM tab1 AS cor0
----
-1196
-1352
-518

query I rowsort
SELECT tab2.col2 * + col2 AS col0 FROM tab2
----
1444
676
729

query I rowsort
SELECT + 99 AS col0 FROM tab2 AS cor0
----
99
99
99

query I rowsort
SELECT - - col2 + col2 AS col0 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT ( - col2 ) * 39 * - col2 FROM tab0
----
262236
39
42471

query I rowsort
SELECT ALL + 40 + 18 * col1 + col0 * + col0 FROM tab2
----
647
6587
7186

query I rowsort
SELECT DISTINCT + ( - tab2.col1 ) + + tab2.col2 FROM tab2
----
-33
-4
21

query I rowsort
SELECT ALL + col2 + - col2 + - col2 * col2 FROM tab2
----
-1444
-676
-729

onlyif mysql # use DIV operator for integer division
query I rowsort label-4260
SELECT ALL col2 + 44 DIV col1 FROM tab1
----
55
61
99

skipif mysql # not compatible
query I rowsort label-4260
SELECT ALL col2 + 44 / col1 FROM tab1
----
55
61
99

query I rowsort
SELECT DISTINCT + col0 * col0 + + col0 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT col2 * col1 + - col1 + - ( 22 ) FROM tab1 AS cor0
----
1213
1356
538

query I rowsort
SELECT ( 93 ) * col1 + 87 + - col2 AS col0 FROM tab2 AS cor0
----
1630
2943
5548

query I rowsort
SELECT ALL cor0.col2 * 40 AS col1 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 1c535466f43a2aa00d1f0a0cd0f8a4ae

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4265
SELECT ALL - CAST( col1 AS SIGNED ) * - col1 AS col2 FROM tab2 AS cor0
----
289
3481
961

skipif mysql # not compatible
query I rowsort label-4265
SELECT ALL - CAST ( col1 AS INTEGER ) * - col1 AS col2 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT DISTINCT col2 + - col0 * 25 * col2 FROM tab2 AS cor0
----
-4698
-50674
-75012

query I rowsort
SELECT - 85 * col0 AS col0 FROM tab1 AS cor0
----
-255
-5440
-6800

query I rowsort
SELECT ALL + cor0.col0 - + col0 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT + ( col2 ) * - cor0.col0 AS col1 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT ALL + col0 * col1 AS col1 FROM tab1 cor0
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-4271
SELECT DISTINCT + cor0.col0 * - col1 DIV col1 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-4271
SELECT DISTINCT + cor0.col0 * - col1 / col1 FROM tab0 AS cor0
----
-24
-35
-89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 80 * col0 col1 FROM tab2 AS cor0
----
560
6240
6320

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col0 * + cor0.col2 col2 FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-4274
SELECT 47 DIV + col0 FROM tab1 AS cor0
----
0
0
15

skipif mysql # not compatible
query I rowsort label-4274
SELECT 47 / + col0 FROM tab1 AS cor0
----
0
0
15

onlyif mysql # use DIV operator for integer division
query I rowsort label-4275
SELECT - 61 * col2 DIV + 15 FROM tab2 cor0
----
-105
-109
-154

skipif mysql # not compatible
query I rowsort label-4275
SELECT - 61 * col2 / + 15 FROM tab2 cor0
----
-105
-109
-154

query I rowsort
SELECT DISTINCT - + 39 AS col2 FROM tab0 AS cor0
----
-39

query I rowsort
SELECT DISTINCT + - 88 + col1 FROM tab1 AS cor0
----
-62
-75
-78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( + col0 ) - col0 * - cor0.col2 col2 FROM tab1 cor0
----
159
3584
7600

query I rowsort
SELECT - 61 + col0 * col1 AS col0 FROM tab2 AS cor0
----
1282
156
4541

query I rowsort
SELECT + col2 * + col2 * - ( - col2 ) + col2 FROM tab2 cor0
----
17602
19710
54910

query I rowsort
SELECT ALL - col0 - + 9 FROM tab0
----
-33
-44
-98

query I rowsort
SELECT DISTINCT ( + col2 ) * + tab0.col0 - + 5 AS col2 FROM tab0
----
30
7293
787

query I rowsort
SELECT ALL - col0 * 10 * + 73 FROM tab0 AS cor0
----
-17520
-25550
-64970

query I rowsort
SELECT + col1 * ( + 34 + col2 ) FROM tab1 AS cor0
----
1690
2288
910

onlyif mysql # use DIV operator for integer division
query I rowsort label-4285
SELECT DISTINCT col2 + col0 DIV col2 FROM tab0 AS cor0
----
33
36
83

skipif mysql # not compatible
query I rowsort label-4285
SELECT DISTINCT col2 + col0 / col2 FROM tab0 AS cor0
----
33
36
83

query I rowsort
SELECT DISTINCT + - col2 + + 52 AS col1 FROM tab1 AS cor0
----
-2
-44
-5

query I rowsort
SELECT col0 * - col1 AS col1 FROM tab2 cor0
----
-1343
-217
-4602

query I rowsort
SELECT - - cor0.col1 + + col1 * col0 FROM tab0 cor0
----
2150
3492
8190

onlyif mysql # use DIV operator for integer division
query I rowsort label-4289
SELECT DISTINCT - col1 DIV - CAST( - col0 * col1 AS SIGNED ) FROM tab1 cor0
----
0

skipif mysql # not compatible
query I rowsort label-4289
SELECT DISTINCT - col1 / - CAST ( - col0 * col1 AS INTEGER ) FROM tab1 cor0
----
0

query I rowsort
SELECT DISTINCT + col1 + col0 * 8 FROM tab0 AS cor0
----
278
377
803

query I rowsort
SELECT DISTINCT - col0 + cor0.col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT + + col1 + + 91 FROM tab0 AS cor0
----
177
182
188

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4293
SELECT ALL - cor0.col0 * - CAST( col2 * + cor0.col0 AS SIGNED ) FROM tab2 AS cor0
----
1323
158184
237158

skipif mysql # not compatible
query I rowsort label-4293
SELECT ALL - cor0.col0 * - CAST ( col2 * + cor0.col0 AS INTEGER ) FROM tab2 AS cor0
----
1323
158184
237158

query I rowsort
SELECT DISTINCT col1 * + ( + ( col1 ) ) FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT ALL col1 * 83 FROM tab2 AS cor0
----
1411
2573
4897

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 + 15 * - cor0.col1 * - col2 col0 FROM tab0 AS cor0
----
112019
1490
42594

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4297
SELECT ALL + col2 * col1 * + col1 + - CAST( NULL AS SIGNED ) + - col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4297
SELECT ALL + col2 * col1 * + col1 + - CAST ( NULL AS INTEGER ) + - col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 11 * - 55 AS col0 FROM tab1 AS cor0
----
-605
-605
-605

query I rowsort
SELECT DISTINCT - + col1 * - col0 AS col1 FROM tab2 AS cor0
----
1343
217
4602

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 79 col1 FROM tab1 AS cor0
----
-79
-79
-79

query I rowsort
SELECT DISTINCT - 55 FROM tab0 AS cor0
----
-55

onlyif mysql # use DIV operator for integer division
query I rowsort label-4302
SELECT + col0 * ( col2 ) DIV - col0 + col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4302
SELECT + col0 * ( col2 ) / - col0 + col2 FROM tab0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4303
SELECT DISTINCT 18 DIV col1 + col1 AS col0 FROM tab2
----
18
31
59

skipif mysql # not compatible
query I rowsort label-4303
SELECT DISTINCT 18 / col1 + col1 AS col0 FROM tab2
----
18
31
59

onlyif mysql # use DIV operator for integer division
query I rowsort label-4304
SELECT col1 DIV 62 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-4304
SELECT col1 / 62 FROM tab0
----
1
1
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-4305
SELECT DISTINCT - + 36 + 58 DIV + cor0.col2 FROM tab0 AS cor0
----
-35
-36
22

skipif mysql # not compatible
query I rowsort label-4305
SELECT DISTINCT - + 36 + 58 / + cor0.col2 FROM tab0 AS cor0
----
-35
-36
22

query I rowsort
SELECT DISTINCT - col0 * + col1 + col0 AS col1 FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT ALL - ( col2 ) * col0 - - 48 FROM tab2 AS cor0
----
-141
-1980
-2954

query I rowsort
SELECT - - 83 FROM tab0 AS cor0
----
83
83
83

query I rowsort
SELECT DISTINCT ( - col2 ) AS col1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT DISTINCT + 79 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
79

query I rowsort
SELECT - col0 * + cor0.col0 AS col1 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT + col0 * - ( - col0 ) AS col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL col1 + - col0 * - col2 * + col2 FROM tab1
----
207946
737293
8774

query I rowsort
SELECT + 84 - 42 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
9 values hashing to 64c29db9f1cd7ed4ddeb1735e3e0d442

query I rowsort
SELECT ALL 70 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to c76157a7a7ec18de56823b2058b49f32

query I rowsort
SELECT ALL + col0 * 28 + + col0 AS col2 FROM tab1 AS cor0
----
1856
2320
87

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4317
SELECT CAST( NULL AS SIGNED ) AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4317
SELECT CAST ( NULL AS INTEGER ) AS col1 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT + col1 * 5 FROM tab2 AS cor0
----
155
295
85

query I rowsort
SELECT + + col2 + + 19 FROM tab1 AS cor0
----
115
73
76

query I rowsort
SELECT DISTINCT + col0 * 17 AS col2 FROM tab2 AS cor0
----
119
1326
1343

query I rowsort
SELECT + cor0.col1 + cor0.col1 AS col1 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT ( + col0 ) AS col2 FROM tab0 cor0
----
24
35
89

query I rowsort
SELECT - cor2.col0 FROM tab2, tab1 cor0, tab0 AS cor1, tab2 AS cor2
----
81 values hashing to adaea38eae032c1639715f21831dd376

query I rowsort
SELECT - + col2 + + 78 + - col2 FROM tab2 AS cor0
----
2
24
26

query I rowsort
SELECT + - cor0.col0 + + 13 FROM tab1 AS cor0
----
-51
-67
10

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - col2 ) + + col0 + + 8 col0 FROM tab2 AS cor0
----
-12
49
60

query I rowsort
SELECT DISTINCT cor0.col2 AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
1
33
82

query I rowsort
SELECT + 64 + col2 FROM tab1 cor0
----
118
121
160

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 47 col2 FROM tab1, tab1 cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to 5c7a6f591fb2a38893dafe56c4b9b97f

query I rowsort
SELECT - - cor0.col0 FROM tab1, tab1 AS cor0
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT - 61 FROM tab2, tab2 AS cor0
----
9 values hashing to 51f53697966a79d306a4570537cd91a1

query I rowsort
SELECT ALL - + cor0.col0 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

query IIIIIIIIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0, tab2 cor1, tab0 cor2
----
972 values hashing to 86dbd337f00ab84c613ad03d6fc06e28

query I rowsort
SELECT 24 FROM tab0, tab1 AS cor0
----
9 values hashing to b0d834ef9e4346801b6aaa0e74b2c8ef

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 66 col0 FROM tab0
----
66
66
66

query I rowsort
SELECT DISTINCT - col2 * col0 * col2 FROM tab0
----
-26136
-35
-598436

query I rowsort
SELECT + + 80 AS col1 FROM tab1 AS cor0
----
80
80
80

query I rowsort
SELECT DISTINCT - ( + 50 ) FROM tab2
----
-50

query I rowsort
SELECT 97 AS col1 FROM tab1 cor0
----
97
97
97

query I rowsort
SELECT 86 AS col0 FROM tab1
----
86
86
86

query I rowsort
SELECT ALL 90 AS col2 FROM tab1
----
90
90
90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4342
SELECT ALL CAST( NULL AS SIGNED ) * 5 + - col1 * 37 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4342
SELECT ALL CAST ( NULL AS INTEGER ) * 5 + - col1 * 37 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT tab1.col1 - tab1.col2 FROM tab1, tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT ALL ( col2 + col2 ) FROM tab1
----
108
114
192

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4345
SELECT + cor0.col2 * + CAST( NULL AS SIGNED ) FROM tab2, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4345
SELECT + cor0.col2 * + CAST ( NULL AS INTEGER ) FROM tab2, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT 57 FROM tab2, tab2 AS cor0 CROSS JOIN tab1
----
27 values hashing to 220a93709e207779b34ef74b544764a5

query I rowsort
SELECT col2 - - tab0.col1 AS col1 FROM tab0
----
119
173
98

query I rowsort
SELECT 94 + col0 * ( col2 ) * col0 FROM tab2
----
1417
158278
237252

query I rowsort
SELECT col1 * + col1 + tab0.col1 FROM tab0
----
7482
8372
9506

query I rowsort
SELECT ALL - tab0.col2 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT ALL - tab2.col0 FROM tab2, tab1 AS cor0
----
9 values hashing to 3000337dd3f11e9cfd5a312b01ef3f8b

query I rowsort
SELECT + 13 FROM tab0, tab1 cor0, tab1 AS cor1
----
27 values hashing to a90d0f37cec603ae1bc0a60dc7fbaeed

query I rowsort
SELECT - col0 - tab1.col0 FROM tab1
----
-128
-160
-6

query I rowsort
SELECT + 39 - col2 * ( col0 ) AS col2 FROM tab0
----
-7259
-753
4

query I rowsort
SELECT col2 * col2 - tab2.col0 FROM tab2
----
1365
598
722

query I rowsort
SELECT DISTINCT + cor1.col2 AS col0 FROM tab2, tab2 cor0, tab0 AS cor1
----
1
33
82

query I rowsort
SELECT DISTINCT 57 AS col0 FROM tab2
----
57

query I rowsort
SELECT + 93 AS col1 FROM tab2 AS cor0
----
93
93
93

query I rowsort
SELECT cor1.col2 AS col0 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

onlyif mysql # use DIV operator for integer division
query I rowsort label-4360
SELECT - col2 DIV 7 AS col2 FROM tab2
----
-3
-3
-5

skipif mysql # not compatible
query I rowsort label-4360
SELECT - col2 / 7 AS col2 FROM tab2
----
-3
-3
-5

query I rowsort
SELECT ALL 93 FROM tab2, tab0 AS cor0
----
9 values hashing to e64105dfaa9fbd201adbb1f3f6968bde

query I rowsort
SELECT + col2 * col0 * col0 AS col0 FROM tab1
----
233472
486
614400

query I rowsort
SELECT - cor0.col2 * 5 FROM tab0 AS cor0
----
-165
-410
-5

query I rowsort
SELECT ALL - col2 * tab1.col2 - + col2 FROM tab1
----
-2970
-3306
-9312

query I rowsort
SELECT ALL - col0 - - col2 AS col1 FROM tab2
----
-41
-52
20

query I rowsort
SELECT 15 AS col1 FROM tab0 cor0
----
15
15
15

query I rowsort
SELECT col1 * + col2 - cor0.col2 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT + + cor0.col2 * 69 FROM tab2 AS cor0
----
1794
1863
2622

query I rowsort
SELECT + ( col0 ) + col0 AS col1 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT DISTINCT - - cor0.col1 * - col1 AS col0 FROM tab1 AS cor0
----
-100
-169
-676

query I rowsort
SELECT DISTINCT 74 * col2 AS col2 FROM tab2 AS cor0
----
1924
1998
2812

query I rowsort
SELECT + 59 * - ( cor0.col0 + - col1 ) AS col0 FROM tab2 AS cor0
----
-1121
-3658
1416

query I rowsort
SELECT ALL - ( ( - col2 ) ) FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT ALL col1 * ( + cor0.col0 + col2 ) FROM tab0 cor0
----
15561
3492
4902

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col2 + - col0 + col1 col1 FROM tab1
----
2939
3195
9149

query III rowsort
SELECT ALL * FROM tab1 WHERE NULL BETWEEN - col0 / + col2 + + col0 * col2 AND NULL
----

query I rowsort
SELECT col1 - col0 AS col2 FROM tab0
----
2
62
62

query III rowsort
SELECT * FROM tab1 WHERE NOT NULL NOT IN ( + col0 - + col2 * col1 )
----

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT NULL BETWEEN col2 + col2 + col2 AND NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * tab0.col0 col1 FROM tab0
----
35
7298
792

query I rowsort
SELECT ALL col2 * col0 + + col2 AS col0 FROM tab1
----
216
3705
7776

query I rowsort
SELECT + col2 * col2 * - col0 AS col2 FROM tab2
----
-114076
-5103
-52728

query I rowsort
SELECT DISTINCT + col2 * col0 + col1 FROM tab0
----
132
7389
878

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * col1 col2 FROM tab1
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-4385
SELECT - col0 * tab1.col2 + + col0 DIV - tab1.col0 col1 FROM tab1
----
-163
-3649
-7681

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4385
SELECT - col0 * tab1.col2 + + col0 / - tab1.col0 col1 FROM tab1
----
-163
-3649
-7681

query III rowsort
SELECT * FROM tab2 WHERE col2 + - col1 NOT IN ( tab2.col0 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 - + col2 col1 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT ALL col2 - col1 AS col1 FROM tab2
----
-33
-4
21

query I rowsort
SELECT col1 + + col0 * col0 FROM tab0
----
1322
662
8012

query I rowsort
SELECT DISTINCT - tab0.col1 * col1 * col1 + - tab0.col2 FROM tab0 WHERE NOT ( col1 ) > + col1 * col1
----
-636089
-753653
-912674

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab0.col2 * + col2 + - col1 col1 FROM tab0
----
-1175
-6815
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 + + cor0.col2 * + col0 col2 FROM tab0 cor0
----
34
7216
759

query I rowsort
SELECT ALL + col1 * tab1.col0 * - col1 AS col2 FROM tab1
----
-13520
-2028
-6400

query I rowsort
SELECT ALL - - col0 + cor0.col2 FROM tab0 AS cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-4395
SELECT + col1 DIV col2 + - col1 FROM tab1 AS cor0
----
-10
-13
-26

skipif mysql # not compatible
query I rowsort label-4395
SELECT + col1 / col2 + - col1 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT col1 * - col2 + - col0 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT + + col1 + cor0.col1 AS col2 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT DISTINCT col1 * col2 * col2 + - col0 FROM tab0 AS cor0
----
611795
62
93630

query I rowsort
SELECT - col1 * - col0 AS col2 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT cor0.col0 + + cor0.col2 FROM tab1 AS cor0
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + cor0.col1 col0 FROM tab1 AS cor0
----
-10
-13
-26

onlyif mysql # use DIV operator for integer division
query I rowsort label-4402
SELECT DISTINCT - col0 + col2 DIV - col2 FROM tab0 AS cor0 WHERE - col2 * + col0 + - col2 NOT IN ( + col0 * col2 )
----
-25
-36
-90

skipif mysql # not compatible
query I rowsort label-4402
SELECT DISTINCT - col0 + col2 / - col2 FROM tab0 AS cor0 WHERE - col2 * + col0 + - col2 NOT IN ( + col0 * col2 )
----
-25
-36
-90

query I rowsort
SELECT - cor0.col2 FROM tab1 AS cor0 WHERE NOT - col2 = ( col1 )
----
-54
-57
-96

query I rowsort
SELECT cor0.col1 * cor0.col2 + - col1 + col2 * 24 FROM tab0 AS cor0
----
24
3544
9339

query I rowsort
SELECT DISTINCT + col1 * 67 * col0 AS col1 FROM tab0 AS cor0
----
138288
227465
542633

query I rowsort
SELECT col0 + - 36 * - 73 AS col0 FROM tab1 AS cor0
----
2631
2692
2708

query I rowsort
SELECT DISTINCT + col2 + col1 * 2 * - col1 FROM tab1 AS cor0
----
-1298
-143
-242

onlyif mysql # use DIV operator for integer division
query I rowsort label-4408
SELECT - - col0 DIV - col1 col1 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4408
SELECT - - col0 / - col1 col1 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT ALL + col2 * - ( + col1 * col2 ) FROM tab2 AS cor0
----
-22599
-24548
-39884

query I rowsort
SELECT + col2 * ( - col2 + - col2 ) AS col2 FROM tab1 AS cor0
----
-18432
-5832
-6498

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4411
SELECT ALL + col0 * + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4411
SELECT ALL + col0 * + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4412
SELECT + col0 + + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4412
SELECT + col0 + + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 col2 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
7
78
79

query I rowsort
SELECT ALL + cor0.col1 + - col2 * ( col2 ) * + cor0.col1 FROM tab0 AS cor0
----
-611793
-93568
0

query I rowsort
SELECT - col0 * 51 FROM tab0 AS cor0
----
-1224
-1785
-4539

query I rowsort
SELECT cor0.col2 * cor0.col1 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to b2e5b025b1c725661248b0f29aaef908

onlyif mysql # use DIV operator for integer division
query I rowsort label-4417
SELECT + 31 DIV ( + col2 ) FROM tab0 cor0
----
0
0
31

skipif mysql # not compatible
query I rowsort label-4417
SELECT + 31 / ( + col2 ) FROM tab0 cor0
----
0
0
31

query I rowsort
SELECT col1 + + col1 * 75 AS col1 FROM tab1
----
1976
760
988

query I rowsort
SELECT - 54 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 4ecdb0f1b85f0d4fdc3a826efd9f2342

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2 AS cor0 CROSS JOIN tab0, tab0 AS cor1, tab2 AS cor2
----
972 values hashing to d41be7437523f0dba2158c7f0439f329

query I rowsort
SELECT col2 + - col1 AS col1 FROM tab0 cor0
----
-53
-9
-96

query I rowsort
SELECT DISTINCT + 41 - col1 AS col0 FROM tab1 AS cor0
----
15
28
31

query I rowsort
SELECT - ( col0 ) + + 93 AS col2 FROM tab2 AS cor0
----
14
15
86

query I rowsort
SELECT DISTINCT + col0 + col0 + col2 AS col0 FROM tab0
----
260
71
81

query I rowsort
SELECT + ( - cor0.col2 ) * + ( col2 ) + + cor0.col1 AS col2 FROM tab0 cor0
----
-1003
-6633
96

query I rowsort
SELECT DISTINCT + col1 * col1 AS col0 FROM tab1 WHERE NOT NULL >= ( NULL )
----

query I rowsort
SELECT col1 * - col0 * tab1.col0 FROM tab1
----
-234
-40960
-83200

query I rowsort
SELECT col2 * - col2 * - col0 + tab2.col0 * tab2.col2 FROM tab2
----
117078
5292
54756

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab1.col1 * col2 * - col1 col1 FROM tab1
----
-16224
-36504
-5700

query I rowsort
SELECT DISTINCT col0 + - col2 + col0 * col2 * col0 FROM tab0
----
1259
18999
649529

query I rowsort
SELECT ALL - tab2.col1 + + col0 - + col1 FROM tab2
----
-40
-55
45

query I rowsort
SELECT ALL col1 + col1 * - col1 * - col1 - col1 FROM tab0
----
636056
753571
912673

query I rowsort
SELECT - col2 - col1 AS col0 FROM tab1
----
-109
-67
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-4434
SELECT ALL + tab2.col1 DIV + col1 + tab2.col2 * + col2 + - col2 DIV col0 AS col1 FROM tab2
----
1445
677
727

skipif mysql # not compatible
query I rowsort label-4434
SELECT ALL + tab2.col1 / + col1 + tab2.col2 * + col2 + - col2 / col0 AS col1 FROM tab2
----
1445
677
727

onlyif mysql # use DIV operator for integer division
query I rowsort label-4435
SELECT - col2 DIV col1 + + col2 * tab0.col1 AS col2 FROM tab0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-4435
SELECT - col2 / col1 + + col2 * tab0.col1 AS col2 FROM tab0
----
2838
7462
97

query I rowsort
SELECT + col0 * + col1 * - col2 AS col0 FROM tab2
----
-119652
-51034
-5859

query I rowsort
SELECT col1 * tab0.col1 * col1 + + 56 AS col0 FROM tab0
----
636112
753627
912729

query I rowsort
SELECT col0 * col1 * + 41 FROM tab2
----
188682
55063
8897

query I rowsort
SELECT - 95 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to cf302b83f15b730fe35c19bdd9363c13

query I rowsort
SELECT ALL - col1 * col2 + - ( col0 ) * col1 AS col2 FROM tab2 AS cor0
----
-1054
-1989
-6136

query I rowsort
SELECT ALL 9 * - col2 + ( + col1 + col0 ) AS col0 FROM tab0 cor0
----
-187
-558
123

query I rowsort
SELECT DISTINCT cor0.col1 - - col0 AS col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT + 33 AS col2 FROM tab2
----
33
33
33

query I rowsort
SELECT - ( + cor0.col1 ) + col0 * - ( col0 ) FROM tab1 AS cor0
----
-35
-4106
-6413

query I rowsort
SELECT cor0.col2 * + cor0.col0 FROM tab1, tab0 cor0, tab2 AS cor1
----
27 values hashing to 421c686606be6ea267ac0dc7521bf659

query I rowsort
SELECT ALL col1 * - 58 AS col2 FROM tab2
----
-1798
-3422
-986

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4447
SELECT col0 * CAST( NULL AS SIGNED ) + 35 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4447
SELECT col0 * CAST ( NULL AS INTEGER ) + 35 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 * 3 AS col2 FROM tab1 AS cor0
----
-162
-171
-288

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4449
SELECT cor0.col2 / - CAST( NULL AS SIGNED ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4449
SELECT cor0.col2 / - CAST ( NULL AS INTEGER ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * 35 col0 FROM tab1 AS cor0
----
350
455
910

onlyif mysql # use DIV operator for integer division
query I rowsort label-4451
SELECT - cor0.col2 + ( - col0 ) * col1 DIV - col0 AS col1 FROM tab2 cor0
----
-21
33
4

skipif mysql # not compatible
query I rowsort label-4451
SELECT - cor0.col2 + ( - col0 ) * col1 / - col0 AS col1 FROM tab2 cor0
----
-21
33
4

query I rowsort
SELECT + ( + col0 ) AS col1 FROM tab0
----
24
35
89

query I rowsort
SELECT + 57 AS col1 FROM tab2 AS cor0
----
57
57
57

query I rowsort
SELECT 87 AS col0 FROM tab0, tab0 AS cor0
----
9 values hashing to fa0cdd86483844cda3bb806e032d5c64

query I rowsort
SELECT DISTINCT 34 AS col2 FROM tab2, tab1 AS cor0
----
34

query I rowsort
SELECT col0 * - col0 + - col2 FROM tab1 AS cor0
----
-4153
-63
-6496

query I rowsort
SELECT cor1.col2 FROM tab1, tab2 cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

query I rowsort
SELECT ALL ( - tab1.col1 ) AS col0 FROM tab1
----
-10
-13
-26

query I rowsort
SELECT + + col1 * col0 + ( + 90 ) AS col1 FROM tab0 AS cor0
----
2154
3485
8189

query I rowsort
SELECT - cor0.col2 * col2 * 13 + col0 FROM tab1 AS cor0
----
-119728
-37905
-42173

query I rowsort
SELECT - col1 * col1 + + col0 FROM tab0 AS cor0
----
-7372
-8192
-9374

onlyif mysql # use DIV operator for integer division
query I rowsort label-4462
SELECT - - col1 DIV 11 AS col2 FROM tab1 AS cor0
----
0
1
2

skipif mysql # not compatible
query I rowsort label-4462
SELECT - - col1 / 11 AS col2 FROM tab1 AS cor0
----
0
1
2

query I rowsort
SELECT DISTINCT + col2 + col2 + ( ( col0 ) ) * col2 FROM tab2
----
2080
243
3078

query I rowsort
SELECT + 51 AS col1 FROM tab2
----
51
51
51

query I rowsort
SELECT + 53 + tab0.col1 + col2 AS col2 FROM tab0
----
151
172
226

query IIIIII rowsort
SELECT ALL * FROM tab1, tab2 AS cor0 WHERE NOT ( NULL ) BETWEEN NULL AND ( NULL )
----

query I rowsort
SELECT - cor0.col0 * col0 * col1 + + col2 AS col1 FROM tab1 AS cor0
----
-180
-40903
-83104

onlyif mysql # use DIV operator for integer division
query I rowsort label-4468
SELECT + cor0.col1 * + cor0.col1 + col0 DIV col1 AS col1 FROM tab0 AS cor0
----
7396
8281
9409

skipif mysql # not compatible
query I rowsort label-4468
SELECT + cor0.col1 * + cor0.col1 + col0 / col1 AS col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT - - col0 + - col0 AS col1 FROM tab2 AS cor0
----
0

query I rowsort
SELECT col1 + + col0 AS col2 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT + - col2 + col0 * - col0 FROM tab1 AS cor0
----
-4153
-63
-6496

query I rowsort
SELECT ALL col2 * col0 + col1 FROM tab1 cor0
----
188
3658
7693

query I rowsort
SELECT DISTINCT col2 + - col0 * col0 * col1 AS col0 FROM tab0 AS cor0
----
-118824
-49503
-720729

query I rowsort
SELECT + + col0 - col2 FROM tab2 cor0
----
-20
41
52

query I rowsort
SELECT ALL - + col1 * + col1 + - col2 AS col2 FROM tab0 AS cor0
----
-7429
-8363
-9410

query I rowsort
SELECT - col2 * tab1.col0 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT ALL + col1 * + col0 * - col0 AS col1 FROM tab0
----
-118825
-49536
-720811

query I rowsort
SELECT + - col2 * - col1 + col1 FROM tab0 AS cor0
----
194
2924
7553

query I rowsort
SELECT DISTINCT + col0 * - col0 + col0 AS col1 FROM tab1 AS cor0
----
-4032
-6
-6320

query I rowsort
SELECT col0 * col2 + - col1 AS col0 FROM tab0 cor0
----
-62
706
7207

onlyif mysql # use DIV operator for integer division
query I rowsort label-4481
SELECT ALL + col2 DIV - col1 AS col2 FROM tab1
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-4481
SELECT ALL + col2 / - col1 AS col2 FROM tab1
----
-2
-5
-7

query I rowsort
SELECT DISTINCT col0 + col2 * + col0 AS col1 FROM tab1
----
165
3712
7760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + col0 col0 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL cor0.col1 AS col1 FROM tab1, tab2, tab1 AS cor0
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT - col2 * - tab2.col0 + + col0 FROM tab2
----
196
2106
3081

query I rowsort
SELECT col1 * - col1 * - col1 FROM tab0
----
636056
753571
912673

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - col1 * - col2 + - col2 * - col0 col2 FROM tab1 AS cor0
----
1566
4218
8928

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 61 * col0 col2 FROM tab2 AS cor0
----
427
4758
4819

query I rowsort
SELECT DISTINCT + col0 - + cor0.col0 * - col2 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT DISTINCT 1 * + col2 AS col0 FROM tab1
----
54
57
96

query I rowsort
SELECT 20 AS col2 FROM tab1
----
20
20
20

query I rowsort
SELECT ALL - col0 * - 88 FROM tab2
----
616
6864
6952

query I rowsort
SELECT - ( + col1 * - col0 ) FROM tab1
----
1040
640
78

onlyif mysql # use DIV operator for integer division
query I rowsort label-4494
SELECT 38 DIV - cor0.col0 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 1fcbd8e011d8d5d4cf6550695ff8e6e1

skipif mysql # not compatible
query I rowsort label-4494
SELECT 38 / - cor0.col0 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to 1fcbd8e011d8d5d4cf6550695ff8e6e1

query I rowsort
SELECT - + ( + col0 ) * - col1 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT col1 * col2 * col1 FROM tab2 AS cor0
----
10982
25947
90506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col1 ) col0 FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT - col0 * + col1 + col0 * col1 AS col2 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4499
SELECT - - cor0.col0 DIV cor0.col1 FROM tab2 cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-4499
SELECT - - cor0.col0 / cor0.col1 FROM tab2 cor0
----
0
1
4

query I rowsort
SELECT DISTINCT + col1 + col1 * + ( - col2 ) * - col1 FROM tab1 AS cor0
----
16237
36530
5710

query I rowsort
SELECT + cor0.col0 + - col2 * + col1 * + cor0.col2 AS col1 FROM tab0 AS cor0
----
-611795
-62
-93630

query I rowsort
SELECT DISTINCT - col2 + - col0 * + col1 FROM tab0 AS cor0
----
-2097
-3396
-8181

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4503
SELECT - CAST( NULL AS SIGNED ) - + 85 AS col2 FROM tab1, tab0 cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-4503
SELECT - CAST ( NULL AS INTEGER ) - + 85 AS col2 FROM tab1, tab0 cor0, tab0 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4504
SELECT DISTINCT + + 56 * col2 - + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4504
SELECT DISTINCT + + 56 * col2 - + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL

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 80ca0a1cc337a7714a8990a764cfdb17

query I rowsort
SELECT col1 + - col1 * - col2 * + ( col0 ) FROM tab1
----
36490
4238
99853

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4507
SELECT ALL + - cor0.col2 + + cor0.col2 * - CAST( NULL AS SIGNED ) / ( cor0.col1 + CAST( NULL AS SIGNED ) ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4507
SELECT ALL + - cor0.col2 + + cor0.col2 * - CAST ( NULL AS INTEGER ) / ( cor0.col1 + CAST ( NULL AS INTEGER ) ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 11 + 35 AS col2 FROM tab2, tab1 AS cor0 CROSS JOIN tab1
----
27 values hashing to 2f97924b57b73102233df7c9ce8ad602

query I rowsort
SELECT DISTINCT + 85 AS col1 FROM tab0
----
85

query I rowsort
SELECT + cor1.col2 FROM tab1, tab2, tab2 AS cor0, tab1 AS cor1
----
81 values hashing to 9d355f1f2edc347a359dad00d2d3f886

query I rowsort
SELECT + + 27 * cor0.col2 FROM tab0, tab2, tab2 AS cor0
----
27 values hashing to 9a01828d79644e590cb4604c0759c660

query I rowsort
SELECT - 58 + - col0 * + ( col0 ) AS col2 FROM tab1
----
-4154
-6458
-67

query I rowsort
SELECT DISTINCT - 70 + col1 AS col1 FROM tab0 AS cor0
----
16
21
27

query I rowsort
SELECT + + cor0.col0 AS col0 FROM tab1 cor0
----
3
64
80

query I rowsort
SELECT - 41 AS col2 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 47b9ef972839428f4f71d9f5b0944edf

query I rowsort
SELECT DISTINCT + cor0.col0 FROM tab1, tab0, tab0 AS cor0
----
24
35
89

query I rowsort
SELECT DISTINCT col1 * col1 - + col0 * col2 AS col0 FROM tab0
----
6604
9374
983

query I rowsort
SELECT ALL col2 + + ( col1 ) AS col0 FROM tab1
----
109
67
80

query I rowsort
SELECT ALL col1 * col2 + ( + tab0.col0 ) FROM tab0
----
132
2862
7551

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4520
SELECT DISTINCT + + CAST( ( + col1 ) AS SIGNED ) col2 FROM tab0 AS cor0
----
86
91
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4520
SELECT DISTINCT + + CAST ( ( + col1 ) AS INTEGER ) col2 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT + 1 + - col0 FROM tab0 AS cor0
----
-23
-34
-88

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 45 * - col2 col2 FROM tab0 cor0
----
-1485
-3690
-45

query I rowsort
SELECT col2 + 22 FROM tab2 AS cor0
----
48
49
60

query I rowsort
SELECT + ( + 28 ) + + col2 FROM tab0 AS cor0
----
110
29
61

query I rowsort
SELECT DISTINCT + 48 * + 58 FROM tab1 AS cor0
----
2784

query I rowsort
SELECT ALL col2 + ( - 9 + - col1 ) FROM tab0
----
-105
-18
-62

query I rowsort
SELECT + 79 + + col2 AS col0 FROM tab0 AS cor0
----
112
161
80

query I rowsort
SELECT DISTINCT - col0 * 87 + col0 AS col2 FROM tab2 AS cor0
----
-602
-6708
-6794

query I rowsort
SELECT DISTINCT col2 + + col0 + col0 * 54 AS col0 FROM tab1 AS cor0
----
219
3577
4496

query I rowsort
SELECT ALL 35 AS col1 FROM tab0
----
35
35
35

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab2 AS cor0 CROSS JOIN tab1, tab2 cor1
----
972 values hashing to bcf430f79386b43bc4077271fcd15cf0

query I rowsort
SELECT ALL 10 FROM tab1
----
10
10
10

query I rowsort
SELECT + - col2 * + 97 FROM tab0 AS cor0
----
-3201
-7954
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4534
SELECT DISTINCT + col0 * + col0 - col0 DIV - ( 84 + col2 * col0 ) FROM tab1 AS cor0
----
4096
6400
9

skipif mysql # not compatible
query I rowsort label-4534
SELECT DISTINCT + col0 * + col0 - col0 / - ( 84 + col2 * col0 ) FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT 6 * col2 FROM tab2 AS cor0
----
156
162
228

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 ALL - + 74 + 8 AS col0 FROM tab0 AS cor0
----
-66
-66
-66

query I rowsort
SELECT + - ( - 38 ) AS col1 FROM tab1 AS cor0
----
38
38
38

query I rowsort
SELECT ALL + 54 * + cor0.col2 - + col1 * + col0 FROM tab0 AS cor0
----
-282
-3341
-3671

query I rowsort
SELECT DISTINCT 3 FROM tab0 cor0
----
3

query I rowsort
SELECT ( - 80 ) FROM tab0 AS cor0
----
-80
-80
-80

query I rowsort
SELECT DISTINCT - col1 + col0 - - col0 FROM tab1 AS cor0
----
-20
118
147

query I rowsort
SELECT + - 79 * + ( + col2 ) + col0 FROM tab1 cor0
----
-4263
-4439
-7504

query I rowsort
SELECT ALL + 16 AS col1 FROM tab0 AS cor0
----
16
16
16

query I rowsort
SELECT ALL - + col2 + 76 * col2 AS col0 FROM tab1 AS cor0
----
4050
4275
7200

query I rowsort
SELECT DISTINCT - - 37 + cor0.col1 FROM tab2 AS cor0
----
54
68
96

query I rowsort
SELECT DISTINCT - col2 * + col2 + cor0.col2 AS col2 FROM tab0 AS cor0
----
-1056
-6642
0

query I rowsort
SELECT ALL - col1 * 35 + - col2 + cor0.col1 FROM tab0 AS cor0
----
-2957
-3176
-3299

query I rowsort
SELECT ALL + 33 * 68 * col1 + + col0 * 18 - + col1 * cor0.col1 FROM tab0 AS cor0
----
186020
197525
208889

query I rowsort
SELECT - - 82 AS col2 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 99920d9f7cd9cdccef99cfa459ae6944

query I rowsort
SELECT DISTINCT 30 * col2 + + tab0.col1 AS col1 FROM tab0
----
1076
127
2551

query I rowsort
SELECT col1 + - 35 AS col1 FROM tab1
----
-22
-25
-9

query I rowsort
SELECT - + col1 * - col2 + col1 * 82 AS col2 FROM tab2 cor0
----
2040
3379
6372

query I rowsort
SELECT DISTINCT - 98 AS col0 FROM tab0 AS cor0
----
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 * - col0 col1 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4556
SELECT - CAST( NULL AS SIGNED ) * + ( + col2 ) + 77 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4556
SELECT - CAST ( NULL AS INTEGER ) * + ( + col2 ) + 77 AS col0 FROM tab1 cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4557
SELECT DISTINCT - CAST( NULL AS SIGNED ) * 36 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-4557
SELECT DISTINCT - CAST ( NULL AS INTEGER ) * 36 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT - 17 + col1 FROM tab0 AS cor0
----
69
74
80

query I rowsort
SELECT DISTINCT ( - col0 ) + - col0 AS col1 FROM tab0 AS cor0
----
-178
-48
-70

onlyif mysql # use DIV operator for integer division
query I rowsort label-4560
SELECT - col0 DIV col0 + 83 * - col1 AS col2 FROM tab0 AS cor0
----
-7139
-7554
-8052

skipif mysql # not compatible
query I rowsort label-4560
SELECT - col0 / col0 + 83 * - col1 AS col2 FROM tab0 AS cor0
----
-7139
-7554
-8052

query I rowsort
SELECT DISTINCT tab2.col0 * col1 AS col2 FROM tab2
----
1343
217
4602

query I rowsort
SELECT + 31 * + col0 AS col1 FROM tab0 AS cor0
----
1085
2759
744

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 19 * - col0 col2 FROM tab2 AS cor0
----
-133
-1482
-1501

query I rowsort
SELECT - - 59 + + cor0.col2 FROM tab1 AS cor0
----
113
116
155

query I rowsort
SELECT 28 + + cor0.col2 AS col0 FROM tab2 cor0
----
54
55
66

query I rowsort
SELECT ALL + col0 * + 56 FROM tab2 AS cor0
----
392
4368
4424

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + ( - ( + col0 ) ) col1 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-4568
SELECT - - col0 DIV 38 col2 FROM tab2 AS cor0
----
0
2
2

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4568
SELECT - - col0 / 38 col2 FROM tab2 AS cor0
----
0
2
2

query I rowsort
SELECT - + col0 * + col0 + col2 * col2 FROM tab1 AS cor0
----
-847
2816
2907

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4570
SELECT DISTINCT col2 * CAST( - ( col0 ) AS SIGNED ) AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

skipif mysql # not compatible
query I rowsort label-4570
SELECT DISTINCT col2 * CAST ( - ( col0 ) AS INTEGER ) AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4571
SELECT + CAST( + col2 AS SIGNED ) + col2 AS col1 FROM tab2 AS cor0
----
52
54
76

skipif mysql # not compatible
query I rowsort label-4571
SELECT + CAST ( + col2 AS INTEGER ) + col2 AS col1 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT - 67 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to fbe03b15d6b951410b38f7e98895006f

query I rowsort
SELECT ALL + - cor0.col1 * col2 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4574
SELECT + CAST( NULL AS DECIMAL ) AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-4574
SELECT + CAST ( NULL AS REAL ) AS col0 FROM tab0, tab2 AS cor0
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT + cor1.col0 AS col0 FROM tab2 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab2 AS cor2
----
24
35
89

query I rowsort
SELECT ALL col0 + col1 + - col2 * - col1 * + col2 AS col2 FROM tab2
----
22637
24644
40021

query I rowsort
SELECT DISTINCT col0 * 74 + col0 + col2 AS col2 FROM tab0
----
1833
2626
6757

query I rowsort
SELECT - col2 * + col0 + - col2 FROM tab0 AS cor0
----
-36
-7380
-825

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * ( - cor0.col2 ) + + col0 col2 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT - - col2 * col2 + - 40 * + col1 FROM tab2 AS cor0
----
-1684
-511
764

query I rowsort
SELECT + col0 + - 24 AS col1 FROM tab2 AS cor0
----
-17
54
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - ( - col2 ) + - col0 col1 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT DISTINCT + ( cor0.col2 ) FROM tab1, tab2, tab2 AS cor0
----
26
27
38

query I rowsort
SELECT cor0.col1 + - 6 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 5610b43bf793ff81c81eed602f1c38f5

query I rowsort
SELECT ALL + 59 AS col0 FROM tab1, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to e29fef8cdec1ee45a71d213f16d2f1d3

query I rowsort
SELECT col0 - + 97 * col2 FROM tab1
----
-5235
-5465
-9232

query I rowsort
SELECT ALL - 95 FROM tab0, tab2 AS cor0
----
9 values hashing to 1c7934db0632c123332c43f17b661d6c

query I rowsort
SELECT col2 * 89 + + col1 FROM tab2 AS cor0
----
2373
2434
3399

query I rowsort
SELECT + col0 + 17 AS col1 FROM tab1 cor0
----
20
81
97

query I rowsort
SELECT DISTINCT cor1.col2 + + 22 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
104
23
55

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4591
SELECT ALL + ( tab0.col1 * + col0 + CAST( + col0 AS SIGNED ) ) AS col0 FROM tab0
----
2088
3430
8188

skipif mysql # not compatible
query I rowsort label-4591
SELECT ALL + ( tab0.col1 * + col0 + CAST ( + col0 AS INTEGER ) ) AS col0 FROM tab0
----
2088
3430
8188

query I rowsort
SELECT ALL + col1 * + col0 AS col1 FROM tab0
----
2064
3395
8099

query I rowsort
SELECT 96 + - col2 FROM tab0 AS cor0
----
14
63
95

query I rowsort
SELECT + - 64 * - cor0.col2 AS col0 FROM tab0 AS cor0
----
2112
5248
64

query I rowsort
SELECT col0 * - col2 + - ( tab2.col0 ) AS col2 FROM tab2
----
-196
-2106
-3081

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab2.col1 - col1 col1 FROM tab2
----
0
0
0

query I rowsort
SELECT 88 * cor0.col0 AS col1 FROM tab2 AS cor0
----
616
6864
6952

query I rowsort
SELECT ALL + ( cor0.col1 ) * + ( - 61 ) FROM tab0 AS cor0
----
-5246
-5551
-5917

query I rowsort
SELECT + col2 * + cor0.col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT ALL + col1 * ( - 64 ) FROM tab0 AS cor0
----
-5504
-5824
-6208

onlyif mysql # use DIV operator for integer division
query I rowsort label-4601
SELECT DISTINCT + col0 * - col2 + col1 DIV col0 FROM tab0 cor0
----
-33
-7297
-789

skipif mysql # not compatible
query I rowsort label-4601
SELECT DISTINCT + col0 * - col2 + col1 / col0 FROM tab0 cor0
----
-33
-7297
-789

query I rowsort
SELECT - - col1 - col1 FROM tab0 AS cor0
----
0
0
0

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 cor0, tab0 AS cor1, tab2, tab2 AS cor2
----
3645 values hashing to f8426cd4d01ba96a72d7348574fbbc8e

onlyif mysql # use DIV operator for integer division
query I rowsort label-4604
SELECT DISTINCT + + col2 DIV - ( - 64 ) + col0 AS col2 FROM tab0 AS cor0
----
24
35
90

skipif mysql # not compatible
query I rowsort label-4604
SELECT DISTINCT + + col2 / - ( - 64 ) + col0 AS col2 FROM tab0 AS cor0
----
24
35
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + 68 col1 FROM tab1 cor0
----
122
125
164

query I rowsort
SELECT + - col1 + col0 + + col0 AS col1 FROM tab0 AS cor0
----
-27
-38
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 * ( col0 ) col0 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-4608
SELECT DISTINCT + col1 DIV col0 col2 FROM tab0 cor0
----
1
2
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4608
SELECT DISTINCT + col1 / col0 col2 FROM tab0 cor0
----
1
2
3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4609
SELECT + + col0 + + CAST( NULL AS SIGNED ) + - col2 col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4609
SELECT + + col0 + + CAST ( NULL AS INTEGER ) + - col2 col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - + cor0.col0 * - col2 + + col1 FROM tab2 AS cor0
----
2087
220
3019

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * + ( + 65 ) + cor0.col2 col1 FROM tab1 AS cor0
----
1744
707
941

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + cor0.col1 + + 82 * - col2 col1 FROM tab0 AS cor0
----
-2596
-6544
50

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4613
SELECT + - CAST( - 85 AS SIGNED ) * col0 FROM tab2 cor0
----
595
6630
6715

skipif mysql # not compatible
query I rowsort label-4613
SELECT + - CAST ( - 85 AS INTEGER ) * col0 FROM tab2 cor0
----
595
6630
6715

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1, tab1 AS cor0, tab0 AS cor1, tab0 cor2
----
972 values hashing to b2fa3f9d060540fe1eb4ad1c0754e163

query I rowsort
SELECT DISTINCT 79 + - col2 AS col0 FROM tab1 AS cor0
----
-17
22
25

query I rowsort
SELECT DISTINCT + col1 * col0 * + col0 FROM tab2 AS cor0
----
106097
1519
358956

query I rowsort
SELECT ALL - 2 AS col1 FROM tab2 cor0
----
-2
-2
-2

query I rowsort
SELECT + col2 * - col2 + - col1 FROM tab2 AS cor0
----
-1461
-735
-760

query I rowsort
SELECT DISTINCT + 2 * + col0 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT 73 * + cor0.col0 FROM tab2 AS cor0
----
511
5694
5767

query I rowsort
SELECT DISTINCT col2 + + cor0.col2 * - col2 AS col1 FROM tab1 AS cor0
----
-2862
-3192
-9120

query I rowsort
SELECT ALL - 7 * - col2 AS col0 FROM tab2 cor0
----
182
189
266

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 7 + + cor0.col0 col0 FROM tab2 AS cor0
----
14
85
86

query I rowsort
SELECT + 42 - ( col2 ) AS col1 FROM tab1
----
-12
-15
-54

query I rowsort
SELECT - tab2.col1 * - ( + col0 ) + + col0 AS col1 FROM tab2
----
1422
224
4680

query I rowsort
SELECT DISTINCT + 98 * + col0 AS col0 FROM tab2
----
686
7644
7742

onlyif mysql # use DIV operator for integer division
query I rowsort label-4627
SELECT + + 61 DIV 36 AS col2 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to da8a72a7967c0c73d91239275230aed9

skipif mysql # not compatible
query I rowsort label-4627
SELECT + + 61 / 36 AS col2 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to da8a72a7967c0c73d91239275230aed9

query I rowsort
SELECT col2 + + 95 + - 27 FROM tab1 AS cor0
----
122
125
164

query I rowsort
SELECT ALL 10 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to a47194429f3e0358a3aebffd5f050113

query I rowsort
SELECT DISTINCT + 7 + - cor0.col1 * 57 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
-1760
-3356
-962

query I rowsort
SELECT + + col0 + - 70 FROM tab2 cor0
----
-63
8
9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4632
SELECT DISTINCT col2 + CAST( 27 AS SIGNED ) * + col2 * - 82 FROM tab1 AS cor0
----
-119502
-126141
-212448

skipif mysql # not compatible
query I rowsort label-4632
SELECT DISTINCT col2 + CAST ( 27 AS INTEGER ) * + col2 * - 82 FROM tab1 AS cor0
----
-119502
-126141
-212448

query I rowsort
SELECT col0 + + 8 FROM tab2 cor0
----
15
86
87

onlyif mysql # use DIV operator for integer division
query I rowsort label-4634
SELECT ALL col1 + - ( col0 ) DIV - cor0.col0 FROM tab1 cor0
----
11
14
27

skipif mysql # not compatible
query I rowsort label-4634
SELECT ALL col1 + - ( col0 ) / - cor0.col0 FROM tab1 cor0
----
11
14
27

query I rowsort
SELECT - 27 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 90b76caf54a4e48ee4a9784f52997a6a

query I rowsort
SELECT ALL + col0 * 22 * col2 FROM tab1 AS cor0
----
168960
3564
80256

query I rowsort
SELECT ALL + col1 + col2 * + ( - col2 * col0 ) AS col0 FROM tab1 AS cor0
----
-207926
-737267
-8722

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4638
SELECT DISTINCT - col2 + + CAST( col0 AS SIGNED ) FROM tab2 AS cor0
----
-20
41
52

skipif mysql # not compatible
query I rowsort label-4638
SELECT DISTINCT - 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 DISTINCT - + cor0.col2 * col0 + - col1 col2 FROM tab1 AS cor0
----
-188
-3658
-7693

query I rowsort
SELECT ALL - col0 + col2 AS col0 FROM tab0 cor0
----
-34
-7
9

query I rowsort
SELECT DISTINCT + col0 + + 51 FROM tab2
----
129
130
58

query I rowsort
SELECT ALL + col2 + + 48 * col0 * col0 FROM tab2
----
2379
292058
299606

query I rowsort
SELECT DISTINCT - 12 * 58 AS col1 FROM tab1 AS cor0
----
-696

query I rowsort
SELECT ALL - col0 + col1 * col0 * - col0 + - col1 AS col2 FROM tab2 AS cor0
----
-106193
-1557
-359093

query I rowsort
SELECT DISTINCT 25 FROM tab2 cor0
----
25

query I rowsort
SELECT DISTINCT col1 * col0 * - cor0.col0 FROM tab2 AS cor0
----
-106097
-1519
-358956

onlyif mysql # use DIV operator for integer division
query I rowsort label-4647
SELECT ALL col1 * + col2 + col2 DIV col1 FROM tab1 AS cor0
----
1255
1406
575

skipif mysql # not compatible
query I rowsort label-4647
SELECT ALL col1 * + col2 + col2 / col1 FROM tab1 AS cor0
----
1255
1406
575

query I rowsort
SELECT ALL + + cor0.col0 + 75 FROM tab1 AS cor0
----
139
155
78

query I rowsort
SELECT DISTINCT col0 + - ( - col0 ) + + col2 AS col1 FROM tab2
----
182
196
41

query I rowsort
SELECT tab2.col2 FROM tab2, tab2 cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

onlyif mysql # use DIV operator for integer division
query I rowsort label-4651
SELECT col1 DIV 35 + + col2 AS col2 FROM tab1
----
54
57
96

skipif mysql # not compatible
query I rowsort label-4651
SELECT col1 / 35 + + col2 AS col2 FROM tab1
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - tab2.col2 + cor0.col2 col2 FROM tab2, tab0 AS cor0
----
9 values hashing to f5a900b2f94b2c0349974e7b95e705a8

query I rowsort
SELECT + col1 * + col0 AS col0 FROM tab1
----
1040
640
78

query I rowsort
SELECT DISTINCT col0 + 73 + + ( - col2 ) AS col0 FROM tab0
----
107
64
80

query I rowsort
SELECT ALL + col1 + 27 AS col2 FROM tab1
----
37
40
53

query I rowsort
SELECT DISTINCT + col2 + col1 * cor0.col1 AS col2 FROM tab0 AS cor0
----
7429
8363
9410

query I rowsort
SELECT + + col1 + + col1 * cor0.col0 * col1 FROM tab2 AS cor0
----
22848
271577
6758

onlyif mysql # use DIV operator for integer division
query I rowsort label-4658
SELECT ALL + - col1 DIV col1 + col1 * - ( - col0 ) AS col2 FROM tab2 AS cor0
----
1342
216
4601

skipif mysql # not compatible
query I rowsort label-4658
SELECT ALL + - col1 / col1 + col1 * - ( - col0 ) AS col2 FROM tab2 AS cor0
----
1342
216
4601

query I rowsort
SELECT col2 * - col1 + ( + col2 + + col0 ) * - 10 AS col2 FROM tab0 AS cor0
----
-3408
-457
-9172

onlyif mysql # use DIV operator for integer division
query I rowsort label-4660
SELECT ALL ( col0 ) DIV - CAST( - col1 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-4660
SELECT ALL ( col0 ) / - CAST ( - col1 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
0
6
6

query I rowsort
SELECT DISTINCT + 40 AS col2 FROM tab1 AS cor0
----
40

onlyif mysql # use DIV operator for integer division
query I rowsort label-4662
SELECT + + col2 DIV col0 + - 91 AS col1 FROM tab2 cor0
----
-88
-91
-91

skipif mysql # not compatible
query I rowsort label-4662
SELECT + + col2 / col0 + - 91 AS col1 FROM tab2 cor0
----
-88
-91
-91

query I rowsort
SELECT DISTINCT - col1 + col2 * 59 * col2 FROM tab1 cor0
----
172018
191681
543731

query I rowsort
SELECT ( col2 ) * + cor0.col2 AS col0 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL cor0.col0 - - col1 AS col2 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4666
SELECT + - col1 * col1 + CAST( - cor0.col1 + - col1 AS SIGNED ) * col2 FROM tab0 AS cor0
----
-13072
-23205
-9603

skipif mysql # not compatible
query I rowsort label-4666
SELECT + - col1 * col1 + CAST ( - cor0.col1 + - col1 AS INTEGER ) * col2 FROM tab0 AS cor0
----
-13072
-23205
-9603

query I rowsort
SELECT ALL + 72 + col1 * + 33 AS col1 FROM tab2 AS cor0
----
1095
2019
633

query I rowsort
SELECT DISTINCT ( cor0.col1 ) * 68 + - cor0.col1 AS col2 FROM tab0 AS cor0
----
5762
6097
6499

query I rowsort
SELECT 65 * - col0 FROM tab2 AS cor0
----
-455
-5070
-5135

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4670
SELECT - col0 + + col1 - CAST( + col1 AS SIGNED ) AS col2 FROM tab1 AS cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-4670
SELECT - col0 + + col1 - CAST ( + col1 AS INTEGER ) AS col2 FROM tab1 AS cor0
----
-3
-64
-80

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4671
SELECT CAST( + col2 * - col2 AS SIGNED ) - 76 FROM tab2
----
-1520
-752
-805

skipif mysql # not compatible
query I rowsort label-4671
SELECT CAST ( + col2 * - col2 AS INTEGER ) - 76 FROM tab2
----
-1520
-752
-805

query I rowsort
SELECT ALL ( + ( - col1 ) ) AS col1 FROM tab2
----
-17
-31
-59

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 - - col2 col0 FROM tab0
----
164
2
66

query I rowsort
SELECT - - 77 AS col0 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 051bf10c50e061d74ad0a4d205a1c622

query I rowsort
SELECT col0 + + col2 * 83 AS col0 FROM tab1 AS cor0
----
4485
4795
8048

query I rowsort
SELECT DISTINCT - 66 * + col2 FROM tab1 AS cor0
----
-3564
-3762
-6336

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4677
SELECT - col0 * + col1 * CAST( NULL AS DECIMAL ) + col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4677
SELECT - col0 * + col1 * CAST ( NULL AS REAL ) + col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 58 + col1 AS col0 FROM tab0 AS cor0
----
144
149
155

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4679
SELECT ALL - + col2 * col2 + CAST( NULL AS SIGNED ) FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4679
SELECT ALL - + col2 * col2 + CAST ( NULL AS INTEGER ) FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 85 AS col0 FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
85

query I rowsort
SELECT DISTINCT - col0 + col1 AS col0 FROM tab2
----
-19
-62
24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4682
SELECT col1 * col1 - CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4682
SELECT col1 * col1 - CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4683
SELECT + + col2 DIV col0 + - col0 AS col2 FROM tab1 AS cor0
----
-64
-79
15

skipif mysql # not compatible
query I rowsort label-4683
SELECT + + col2 / col0 + - col0 AS col2 FROM tab1 AS cor0
----
-64
-79
15

query I rowsort
SELECT DISTINCT 38 + - col1 FROM tab0
----
-48
-53
-59

query I rowsort
SELECT - + col1 + + col2 * + col0 AS col1 FROM tab0 AS cor0
----
-62
706
7207

onlyif mysql # use DIV operator for integer division
query I rowsort label-4686
SELECT ALL - - col1 DIV - 9 + - col1 AS col2 FROM tab2 AS cor0
----
-18
-34
-65

skipif mysql # not compatible
query I rowsort label-4686
SELECT ALL - - col1 / - 9 + - col1 AS col2 FROM tab2 AS cor0
----
-18
-34
-65

query I rowsort
SELECT ALL + col2 * - col2 - + col0 FROM tab0 cor0
----
-1113
-36
-6813

query I rowsort
SELECT col2 + + col0 AS col1 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT DISTINCT + - col0 + + col2 * + 14 AS col2 FROM tab1 AS cor0
----
1264
734
753

query I rowsort
SELECT ALL - - col1 + + col2 * - col1 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT DISTINCT + col2 - ( - col2 ) * + col1 AS col0 FROM tab2 AS cor0
----
1560
684
864

query I rowsort
SELECT DISTINCT + 18 * + col1 FROM tab1
----
180
234
468

query I rowsort
SELECT 83 + + col0 * - col2 * col2 FROM tab1
----
-207853
-737197
-8665

query I rowsort
SELECT + ( ( col1 ) ) AS col1 FROM tab1
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4695
SELECT CAST( 17 AS SIGNED ) AS col2 FROM tab2
----
17
17
17

skipif mysql # not compatible
query I rowsort label-4695
SELECT CAST ( 17 AS INTEGER ) AS col2 FROM tab2
----
17
17
17

query I rowsort
SELECT ALL + + col2 * ( - col2 ) AS col1 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT ALL col1 * 5 AS col0 FROM tab1 AS cor0
----
130
50
65

query I rowsort
SELECT DISTINCT - - 34 * - cor0.col0 + col0 * + col1 AS col1 FROM tab2 AS cor0
----
-1343
-21
1950

query I rowsort
SELECT ALL col1 * cor0.col1 + - col1 AS col2 FROM tab2 AS cor0
----
272
3422
930

query I rowsort
SELECT col1 * - 73 FROM tab1 cor0
----
-1898
-730
-949

query I rowsort
SELECT - - col2 + cor0.col2 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT ALL + cor0.col2 FROM tab1, tab1 cor0, tab2 cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT ALL - 10 AS col0 FROM tab0 AS cor0
----
-10
-10
-10

query I rowsort
SELECT 96 FROM tab0 AS cor0
----
96
96
96

query I rowsort
SELECT DISTINCT + - col0 * - 84 FROM tab2 AS cor0
----
588
6552
6636

query I rowsort
SELECT ALL + - 19 * + cor0.col1 * + col2 AS col0 FROM tab2 cor0
----
-12274
-15903
-29146

query I rowsort
SELECT + + 61 * + col2 AS col1 FROM tab0 AS cor0
----
2013
5002
61

query I rowsort
SELECT + 91 + - col1 * col1 AS col2 FROM tab2 AS cor0
----
-198
-3390
-870

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 23 col2 FROM tab0 AS cor0
----
23
23
23

query I rowsort
SELECT - col1 + col2 - + cor0.col1 * + ( - 57 ) AS col0 FROM tab1 AS cor0
----
1510
617
824

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4711
SELECT ALL CAST( NULL AS SIGNED ) * col0 / col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4711
SELECT ALL CAST ( NULL AS INTEGER ) * col0 / col1 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-4712
SELECT ALL - col2 + cor0.col1 DIV - col0 FROM tab2 cor0
----
-26
-31
-38

skipif mysql # not compatible
query I rowsort label-4712
SELECT ALL - col2 + cor0.col1 / - col0 FROM tab2 cor0
----
-26
-31
-38

query I rowsort
SELECT DISTINCT + cor0.col0 + - col2 + + col0 * ( - cor0.col0 ) * 0 AS col1 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT ALL + col1 * - col0 + 2 * - 61 + col1 * col0 * col0 FROM tab1 AS cor0
----
34
40198
82038

query I rowsort
SELECT DISTINCT + - 2 AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 AS cor1
----
-2

query I rowsort
SELECT - 45 FROM tab2
----
-45
-45
-45

onlyif mysql # use DIV operator for integer division
query I rowsort label-4717
SELECT + 52 DIV + 10 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 6035628694bdea36f584f3649088551d

skipif mysql # not compatible
query I rowsort label-4717
SELECT + 52 / + 10 AS col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 6035628694bdea36f584f3649088551d

query I rowsort
SELECT ALL - + cor0.col0 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 09d8a912de1b8ab762e5ffbe028ce99e

onlyif mysql # use DIV operator for integer division
query I rowsort label-4719
SELECT DISTINCT - col0 DIV 30 AS col2 FROM tab2
----
-2
0

skipif mysql # not compatible
query I rowsort label-4719
SELECT DISTINCT - col0 / 30 AS col2 FROM tab2
----
-2
0

query I rowsort
SELECT + col2 * - 80 AS col1 FROM tab1 cor0
----
-4320
-4560
-7680

query I rowsort
SELECT DISTINCT col0 + 21 AS col2 FROM tab2 AS cor0
----
100
28
99

query I rowsort
SELECT + 90 * - col0 AS col0 FROM tab1 AS cor0
----
-270
-5760
-7200

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 + - col1 * - 43 col2 FROM tab2 AS cor0
----
1326
2459
652

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4724
SELECT + cor0.col1 * CAST( NULL AS DECIMAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4724
SELECT + cor0.col1 * CAST ( NULL AS REAL ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 87 * + 48 + col0 FROM tab0 AS cor0
----
4200
4211
4265

query I rowsort
SELECT DISTINCT 5 * cor0.col0 AS col1 FROM tab2 AS cor0
----
35
390
395

query I rowsort
SELECT DISTINCT + col2 - 82 FROM tab0 cor0
----
-49
-81
0

query I rowsort
SELECT ALL + 91 + + col0 AS col0 FROM tab2
----
169
170
98

query I rowsort
SELECT 26 - - tab2.col0 * + 3 * col1 FROM tab2
----
13832
4055
677

query I rowsort
SELECT DISTINCT + col2 + col1 * col1 + col0 * + col1 FROM tab2
----
1205
1670
8109

query I rowsort
SELECT - col2 + cor0.col2 * - col1 * col0 FROM tab2 cor0
----
-119678
-51072
-5886

query I rowsort
SELECT ALL + col0 + + col1 + - 62 * - col2 FROM tab2
----
1712
1749
2452

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + + col0 * 31 col0 FROM tab2 AS cor0
----
210
2340
2370

onlyif mysql # use DIV operator for integer division
query I rowsort label-4734
SELECT - - col2 + + col2 DIV 31 col0 FROM tab2 AS cor0
----
26
27
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4734
SELECT - - col2 + + col2 / 31 col0 FROM tab2 AS cor0
----
26
27
39

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - cor0.col0 * col2 + - ( - col1 ) * + col0 col1 FROM tab1 AS cor0
----
240
4288
8720

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4736
SELECT DISTINCT cor0.col2 * - CAST( col2 AS SIGNED ) + cor0.col1 FROM tab0 AS cor0
----
-1003
-6633
96

skipif mysql # not compatible
query I rowsort label-4736
SELECT DISTINCT cor0.col2 * - CAST ( col2 AS INTEGER ) + cor0.col1 FROM tab0 AS cor0
----
-1003
-6633
96

query I rowsort
SELECT ALL + + cor0.col0 - - col1 * cor0.col1 * + col0 FROM tab0 cor0
----
177528
329350
737098

query I rowsort
SELECT DISTINCT - + col1 * 86 AS col2 FROM tab1 AS cor0
----
-1118
-2236
-860

query I rowsort
SELECT ALL cor0.col0 - + cor0.col2 AS col0 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT DISTINCT - col2 * - cor0.col1 * + 44 FROM tab2 AS cor0
----
28424
36828
67496

query I rowsort
SELECT - - col0 + - col1 AS col0 FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT + col1 * col0 * col0 FROM tab2 AS cor0
----
106097
1519
358956

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * 66 col1 FROM tab0 cor0
----
-1584
-2310
-5874

query I rowsort
SELECT - col1 + 41 * col0 FROM tab0 AS cor0
----
1338
3558
898

query I rowsort
SELECT + col2 + 29 FROM tab2 AS cor0
----
55
56
67

query I rowsort
SELECT ALL + - col1 * col1 AS col0 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT DISTINCT + col2 + - tab0.col1 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT + tab1.col1 + + tab1.col1 * col2 FROM tab1
----
1261
1430
580

onlyif mysql # use DIV operator for integer division
query I rowsort label-4749
SELECT - col0 DIV col0 AS col2 FROM tab0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4749
SELECT - col0 / col0 AS col2 FROM tab0
----
-1
-1
-1

query I rowsort
SELECT - col1 AS col0 FROM tab1 WHERE NOT NULL NOT BETWEEN NULL AND NULL
----

query I rowsort
SELECT ALL - - cor0.col2 + + col1 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT col1 - + col2 AS col0 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT DISTINCT col0 * col1 FROM tab0 cor0
----
2064
3395
8099

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 * - col1 col1 FROM tab0 AS cor0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col1 + col2 col1 FROM tab1
----
28
47
83

query I rowsort
SELECT ALL - col2 * col0 * + col2 FROM tab1 AS cor0
----
-207936
-737280
-8748

onlyif mysql # use DIV operator for integer division
query I rowsort label-4757
SELECT DISTINCT col0 DIV + col0 - + col2 FROM tab2
----
-25
-26
-37

skipif mysql # not compatible
query I rowsort label-4757
SELECT DISTINCT col0 / + col0 - + col2 FROM tab2
----
-25
-26
-37

query I rowsort
SELECT + col0 * col1 * col1 + + col2 * + col0 AS col0 FROM tab1
----
10048
21200
2190

query I rowsort
SELECT col2 * col2 * - col0 + col2 FROM tab2
----
-114038
-5076
-52702

query I rowsort
SELECT col0 * + col1 - - col0 FROM tab2
----
1422
224
4680

query I rowsort
SELECT col0 * - col2 + col0 AS col0 FROM tab1 AS cor0
----
-159
-3584
-7600

query I rowsort
SELECT DISTINCT + cor0.col1 AS col1 FROM tab0, tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT - col2 + col2 AS col1 FROM tab1 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-4764
SELECT col2 DIV cor0.col0 + + col0 AS col1 FROM tab1 AS cor0
----
21
64
81

skipif mysql # not compatible
query I rowsort label-4764
SELECT col2 / cor0.col0 + + col0 AS col1 FROM tab1 AS cor0
----
21
64
81

query I rowsort
SELECT ALL - col2 * col2 - - col0 FROM tab0 AS cor0
----
-1065
-6635
34

onlyif mysql # use DIV operator for integer division
query I rowsort label-4766
SELECT ALL - col2 DIV cor0.col2 + - col2 FROM tab1 AS cor0
----
-55
-58
-97

skipif mysql # not compatible
query I rowsort label-4766
SELECT ALL - col2 / cor0.col2 + - col2 FROM tab1 AS cor0
----
-55
-58
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-4767
SELECT DISTINCT + col2 * col1 DIV + col2 AS col2 FROM tab1
----
10
13
26

skipif mysql # not compatible
query I rowsort label-4767
SELECT DISTINCT + col2 * col1 / + col2 AS col2 FROM tab1
----
10
13
26

query I rowsort
SELECT cor0.col2 AS col2 FROM tab2, tab1, tab0 cor0
----
27 values hashing to 7786718bd8042022537378d40ec87475

onlyif mysql # use DIV operator for integer division
query I rowsort label-4769
SELECT col1 + + col2 DIV col1 AS col2 FROM tab0 cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-4769
SELECT col1 + + col2 / col1 AS col2 FROM tab0 cor0
----
86
91
97

query I rowsort
SELECT DISTINCT + col1 + cor0.col2 AS col2 FROM tab0 cor0
----
119
173
98

query I rowsort
SELECT DISTINCT - - col0 - col2 FROM tab0 AS cor0
----
-9
34
7

query I rowsort
SELECT - col1 * col0 AS col0 FROM tab2 cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-4773
SELECT ALL + col2 + + col1 DIV - col2 AS col0 FROM tab0 AS cor0
----
-96
31
81

skipif mysql # not compatible
query I rowsort label-4773
SELECT ALL + col2 + + col1 / - col2 AS col0 FROM tab0 AS cor0
----
-96
31
81

query I rowsort
SELECT - col0 + col2 * - col1 AS col0 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT - col0 + + cor0.col0 * + cor0.col2 + col1 * col0 AS col2 FROM tab0 AS cor0
----
15308
2832
3395

query I rowsort
SELECT ALL - + col2 * col1 AS col0 FROM tab1 cor0
----
-1248
-1404
-570

onlyif mysql # use DIV operator for integer division
query I rowsort label-4777
SELECT + - col2 + + cor0.col1 DIV - col1 FROM tab0 cor0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-4777
SELECT + - col2 + + cor0.col1 / - col1 FROM tab0 cor0
----
-2
-34
-83

query I rowsort
SELECT DISTINCT - col2 * - col0 * col2 AS col0 FROM tab2
----
114076
5103
52728

query I rowsort
SELECT - col1 + + tab0.col1 * col0 AS col2 FROM tab0
----
1978
3298
8008

query I rowsort
SELECT + tab0.col1 + + col1 * col1 AS col2 FROM tab0
----
7482
8372
9506

query I rowsort
SELECT col0 - - col1 * col0 FROM tab0
----
2088
3430
8188

query I rowsort
SELECT col2 + + tab0.col2 AS col0 FROM tab0
----
164
2
66

query IIIIII rowsort
SELECT * FROM tab2, tab0 AS cor0 WHERE NOT NULL >= tab2.col2
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4784
SELECT DISTINCT tab1.col1 DIV + col1 FROM tab1
----
1

skipif mysql # not compatible
query I rowsort label-4784
SELECT DISTINCT tab1.col1 / + col1 FROM tab1
----
1

query I rowsort
SELECT DISTINCT col1 * + cor0.col0 + - col0 FROM tab2 AS cor0
----
1264
210
4524

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * tab0.col0 col1 FROM tab0 WHERE - col2 <> NULL
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-4787
SELECT + - col2 * col1 DIV col1 FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-4787
SELECT + - col2 * col1 / col1 FROM tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT ALL + tab1.col2 - + col2 * col0 AS col1 FROM tab1
----
-108
-3591
-7584

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4789
SELECT 99 * col1 / CAST( NULL AS SIGNED ) col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4789
SELECT 99 * col1 / CAST ( NULL AS INTEGER ) col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT col1 - 7 FROM tab2 AS cor0
----
10
24
52

query I rowsort
SELECT col1 - col0 * cor0.col0 AS col1 FROM tab1 AS cor0
----
-4086
-6387
17

query I rowsort
SELECT DISTINCT + 6 * + col0 FROM tab0
----
144
210
534

query I rowsort
SELECT DISTINCT 36 * + col0 * + col1 FROM tab1
----
23040
2808
37440

query I rowsort
SELECT DISTINCT tab0.col0 - col1 AS col2 FROM tab0
----
-2
-62

query I rowsort
SELECT ALL col0 * col1 + col2 AS col0 FROM tab0
----
2097
3396
8181

query I rowsort
SELECT col1 FROM tab0 WHERE NULL <> ( NULL )
----

query I rowsort
SELECT + col0 * col0 AS col2 FROM tab0 WHERE + col1 * - col1 + col1 * col0 >= ( NULL )
----

query I rowsort
SELECT DISTINCT col2 * + col1 - col1 FROM tab0
----
0
2752
7371

query I rowsort
SELECT col0 + + col0 + + col1 FROM tab0
----
134
167
269

query I rowsort
SELECT - col0 * col2 * + col1 - + col0 FROM tab1
----
-36544
-4215
-99920

query I rowsort
SELECT ALL col2 * + tab0.col1 FROM tab0 WHERE NULL IN ( - col2 )
----

query I rowsort
SELECT - col1 + + col2 AS col2 FROM tab2
----
-33
-4
21

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE NOT NULL IN ( col0 + col0 + - col0 * col2 )
----

query III rowsort
SELECT * FROM tab1 WHERE NULL NOT IN ( + col2 )
----

query I rowsort
SELECT col2 * col2 + + col2 FROM tab2
----
1482
702
756

query I rowsort
SELECT DISTINCT - col2 * col1 - tab0.col2 AS col2 FROM tab0
----
-2871
-7544
-98

query I rowsort
SELECT ALL tab2.col2 * col1 + - col0 FROM tab2
----
1456
567
830

query III rowsort
SELECT DISTINCT * FROM tab0 WHERE ( + col1 * col1 ) IN ( - col2 * col2 )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab0.col1 + + tab0.col1 col2 FROM tab0
----
172
182
194

query I rowsort
SELECT col0 + col2 * col1 AS col1 FROM tab0
----
132
2862
7551

query I rowsort
SELECT col0 + + tab0.col0 AS col0 FROM tab0
----
178
48
70

query I rowsort
SELECT ALL + col2 - tab1.col0 * - col0 * col2 AS col0 FROM tab1
----
233529
540
614496

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + + col1 * - col1 col1 FROM tab2
----
-327
-3507
-988

query I rowsort
SELECT DISTINCT col1 FROM tab0 WHERE + col1 * - col2 * col1 + - col0 BETWEEN ( NULL ) AND ( col1 * + col2 )
----

query I rowsort
SELECT col2 * tab1.col0 + col0 FROM tab1
----
165
3712
7760

query I rowsort
SELECT ALL - 88 FROM tab2, tab1, tab0 AS cor0
----
27 values hashing to eb8cbefa7d831e1a0183e919e2caef32

onlyif mysql # use DIV operator for integer division
query I rowsort label-4817
SELECT DISTINCT - 64 DIV col1 AS col1 FROM tab2
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-4817
SELECT DISTINCT - 64 / col1 AS col1 FROM tab2
----
-1
-2
-3

query I rowsort
SELECT col0 * col0 * + col2 + 0 AS col1 FROM tab1
----
233472
486
614400

query I rowsort
SELECT ALL 13 * - col1 AS col2 FROM tab0
----
-1118
-1183
-1261

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * col1 col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT - + col2 * col2 * col2 FROM tab1 AS cor0
----
-157464
-185193
-884736

query I rowsort
SELECT 5 - + col2 FROM tab0
----
-28
-77
4

query I rowsort
SELECT col0 + - col0 * ( cor0.col1 ) FROM tab1 AS cor0
----
-576
-75
-960

query I rowsort
SELECT col1 * ( col1 ) AS col1 FROM tab2 AS cor0
----
289
3481
961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - cor0.col1 col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT + col0 * + col1 AS col0 FROM tab0 cor0
----
2064
3395
8099

query I rowsort
SELECT + col0 + - cor0.col1 AS col2 FROM tab2 AS cor0
----
-24
19
62

skipif mysql # not compatible
query I rowsort
SELECT ALL col1 + - CAST ( cor0.col2 AS REAL ) - col2 * - col0 FROM tab2 cor0
----
193
2061
2981

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 - col0 col1 FROM tab2 cor0
----
0

query I rowsort
SELECT col2 * 83 AS col0 FROM tab0 AS cor0
----
2739
6806
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-4831
SELECT - col2 DIV - col0 + col0 FROM tab1 AS cor0
----
21
64
81

skipif mysql # not compatible
query I rowsort label-4831
SELECT - col2 / - col0 + col0 FROM tab1 AS cor0
----
21
64
81

query I rowsort
SELECT + - 49 AS col0 FROM tab1 AS cor0
----
-49
-49
-49

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( - col1 ) + + col0 col2 FROM tab0 cor0
----
-2
-62
-62

query I rowsort
SELECT - ( 19 ) + - col0 FROM tab1 AS cor0
----
-22
-83
-99

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + ( col0 ) col2 FROM tab0 AS cor0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( - cor0.col0 ) + cor0.col1 col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT DISTINCT - col1 + - cor0.col1 AS col2 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT DISTINCT - 80 * 65 AS col2 FROM tab1
----
-5200

query I rowsort
SELECT DISTINCT + col2 + + col0 * col2 AS col2 FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT 62 + - col0 AS col1 FROM tab1 AS cor0
----
-18
-2
59

query I rowsort
SELECT ALL + + 96 + cor0.col2 AS col0 FROM tab2 AS cor0
----
122
123
134

query I rowsort
SELECT ALL + col1 + + col2 * + col2 + - cor0.col2 * col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - + 23 * col0 AS col1 FROM tab2 AS cor0
----
-161
-1794
-1817

query I rowsort
SELECT DISTINCT - col0 + col1 * - col2 FROM tab0 AS cor0
----
-132
-2862
-7551

query I rowsort
SELECT DISTINCT - col2 * - col1 AS col1 FROM tab0 cor0
----
2838
7462
97

query I rowsort
SELECT + 82 * - col1 AS col0 FROM tab2 AS cor0
----
-1394
-2542
-4838

query I rowsort
SELECT 73 * - cor0.col2 + col1 + col2 * col2 * - col1 AS col0 FROM tab2 AS cor0
----
-24539
-27305
-41723

query I rowsort
SELECT DISTINCT - 26 * - col0 AS col2 FROM tab1 AS cor0
----
1664
2080
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 * cor0.col1 + + cor0.col0 col2 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT ALL - col2 * - cor0.col2 FROM tab2 cor0
----
1444
676
729

query I rowsort
SELECT ALL - col1 * col2 + col0 AS col1 FROM tab1 AS cor0
----
-1168
-1401
-506

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-4853
SELECT ALL + 62 DIV + tab1.col0 + + col2 FROM tab1
----
57
74
96

skipif mysql # not compatible
query I rowsort label-4853
SELECT ALL + 62 / + tab1.col0 + + col2 FROM tab1
----
57
74
96

query I rowsort
SELECT ALL - col1 + + 81 FROM tab1
----
55
68
71

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4855
SELECT CAST( NULL AS SIGNED ) * - tab2.col0 AS col0 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4855
SELECT CAST ( NULL AS INTEGER ) * - tab2.col0 AS col0 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col2 * col0 col0 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT + col2 * col2 * cor0.col2 FROM tab2 AS cor0
----
17576
19683
54872

query I rowsort
SELECT ALL col2 * + col2 + - col2 FROM tab0 AS cor0
----
0
1056
6642

query I rowsort
SELECT DISTINCT 93 FROM tab1 AS cor0
----
93

query I rowsort
SELECT + tab2.col0 * + col0 AS col0 FROM tab2
----
49
6084
6241

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4861
SELECT ALL CAST( NULL AS SIGNED ) / - ( col2 ) FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4861
SELECT ALL CAST ( NULL AS INTEGER ) / - ( col2 ) FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT - ( + col1 ) + col0 AS col0 FROM tab0
----
-2
-62
-62

query I rowsort
SELECT + col1 + col2 * col0 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT ALL - + col2 + col2 AS col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - cor0.col2 FROM tab1, tab0 cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT - col1 + - col1 * col0 AS col1 FROM tab0 AS cor0
----
-2150
-3492
-8190

query I rowsort
SELECT + col1 * col2 + cor0.col0 AS col1 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT ( col1 ) + col0 * col2 AS col0 FROM tab1 AS cor0
----
188
3658
7693

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 15 * cor0.col0 - - col1 col2 FROM tab2 cor0
----
-1111
-1168
-74

onlyif mysql # use DIV operator for integer division
query I rowsort label-4870
SELECT ALL col0 * col1 DIV - col1 - - col2 FROM tab1 AS cor0
----
-7
16
51

skipif mysql # not compatible
query I rowsort label-4870
SELECT ALL col0 * col1 / - col1 - - col2 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ALL col1 + - cor0.col2 AS col0 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT ALL + ( + ( + cor0.col1 ) ) AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4873
SELECT - col1 / - CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4873
SELECT - col1 / - CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 * - 31 * tab1.col2 + col1 FROM tab1
----
113098
238093
5048

query I rowsort
SELECT + col1 * ( - col2 * + col1 ) AS col0 FROM tab0 AS cor0
----
-244068
-679042
-9409

query I rowsort
SELECT - 23 + col2 + cor0.col0 AS col1 FROM tab1 cor0
----
153
34
98

query I rowsort
SELECT - ( - tab2.col2 ) * col0 - col2 FROM tab2
----
162
2002
2964

query I rowsort
SELECT ALL + 94 + col2 * + col2 FROM tab0
----
1183
6818
95

query I rowsort
SELECT ALL + col2 * col2 + col0 FROM tab1 AS cor0
----
2919
3313
9296

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 52 + col1 col2 FROM tab1 AS cor0
----
-26
-39
-42

query I rowsort
SELECT ALL + cor0.col2 * + col1 * - col2 + + col1 FROM tab2 AS cor0
----
-22568
-24531
-39825

query I rowsort
SELECT DISTINCT 37 + - 49 FROM tab1 AS cor0
----
-12

query I rowsort
SELECT cor0.col2 AS col2 FROM tab2, tab2 cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4884
SELECT CAST( - col2 AS SIGNED ) + cor0.col0 AS col2 FROM tab0 AS cor0
----
-9
34
7

skipif mysql # not compatible
query I rowsort label-4884
SELECT CAST ( - col2 AS INTEGER ) + cor0.col0 AS col2 FROM tab0 AS cor0
----
-9
34
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-4885
SELECT ALL - col0 DIV - 54 FROM tab1 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-4885
SELECT ALL - col0 / - 54 FROM tab1 AS cor0
----
0
1
1

query I rowsort
SELECT DISTINCT tab2.col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
7
78
79

query I rowsort
SELECT 66 * - col0 FROM tab1
----
-198
-4224
-5280

query I rowsort
SELECT DISTINCT col0 + col2 * col2 FROM tab0
----
1113
36
6813

query I rowsort
SELECT ALL + cor0.col0 + - 35 FROM tab0, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 82609e53ac5d97790ef64a5ce88b23da

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + - cor0.col0 * - col0 + + col0 col0 FROM tab2 AS cor0
----
56
6162
6320

query I rowsort
SELECT - 53 AS col2 FROM tab0 AS cor0
----
-53
-53
-53

query I rowsort
SELECT + - ( + ( - col0 ) ) AS col0 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( + 62 AS REAL ) FROM tab0, tab0 cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to 0bc652564a158b9c0f7952026f90b60a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + tab2.col0 col1 FROM tab2, tab1, tab1 AS cor0, tab0
----
81 values hashing to adaea38eae032c1639715f21831dd376

query I rowsort
SELECT ALL 13 * 46 AS col2 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to fd4286e43aeb7d2dd3bcf1130f8397d2

query I rowsort
SELECT DISTINCT col2 + + col2 * - col2 FROM tab2
----
-1406
-650
-702

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 57 col0 FROM tab1
----
57
57
57

query I rowsort
SELECT + 5 AS col2 FROM tab1, tab0 AS cor0, tab0 cor1
----
27 values hashing to 6797d40099023779b89feb627d94a3e7

query I rowsort
SELECT 28 * tab2.col2 + + tab2.col2 FROM tab2
----
1102
754
783

query I rowsort
SELECT - 70 * + col1 FROM tab0
----
-6020
-6370
-6790

query I rowsort
SELECT col1 * + col1 + - col1 * col1 AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT + col2 * 17 FROM tab1 AS cor0
----
1632
918
969

query I rowsort
SELECT ALL cor0.col0 * - 45 + - col0 AS col2 FROM tab1 AS cor0
----
-138
-2944
-3680

query I rowsort
SELECT col1 * col0 + col2 AS col1 FROM tab1 cor0
----
1136
132
697

onlyif mysql # use DIV operator for integer division
query I rowsort label-4905
SELECT DISTINCT + cor0.col1 - cor0.col1 * col0 DIV cor0.col0 AS col2 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-4905
SELECT DISTINCT + cor0.col1 - cor0.col1 * col0 / cor0.col0 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL + - col0 * + col1 AS col1 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + col1 * ( + 12 ) AS col2 FROM tab0 AS cor0
----
1032
1092
1164

onlyif mysql # use DIV operator for integer division
query I rowsort label-4908
SELECT DISTINCT + col1 DIV col1 AS col0 FROM tab0 cor0
----
1

skipif mysql # not compatible
query I rowsort label-4908
SELECT DISTINCT + col1 / col1 AS col0 FROM tab0 cor0
----
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4909
SELECT ALL - col0 + CAST( col2 AS SIGNED ) + - col1 AS col0 FROM tab1 AS cor0
----
-17
25
3

skipif mysql # not compatible
query I rowsort label-4909
SELECT ALL - col0 + CAST ( col2 AS INTEGER ) + - col1 AS col0 FROM tab1 AS cor0
----
-17
25
3

query I rowsort
SELECT DISTINCT - col1 + - 95 FROM tab1 AS cor0
----
-105
-108
-121

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4911
SELECT ALL col0 * - 37 + 50 * col2 * + CAST( col1 + cor0.col0 * - 99 AS SIGNED ) FROM tab0 AS cor0
----
-169695
-35755293
-3779388

skipif mysql # not compatible
query I rowsort label-4911
SELECT ALL col0 * - 37 + 50 * col2 * + CAST ( col1 + cor0.col0 * - 99 AS INTEGER ) FROM tab0 AS cor0
----
-169695
-35755293
-3779388

query I rowsort
SELECT DISTINCT - + col1 - col2 FROM tab1 AS cor0
----
-109
-67
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + - 42 * col0 col0 FROM tab2 AS cor0
----
-267
-3250
-3280

query I rowsort
SELECT DISTINCT col1 * - col2 + col2 * - col1 FROM tab1 AS cor0
----
-1140
-2496
-2808

query I rowsort
SELECT DISTINCT - + tab2.col2 + ( - 80 ) FROM tab2, tab0, tab1 AS cor0
----
-106
-107
-118

query I rowsort
SELECT ( 47 ) - tab0.col1 FROM tab0, tab0 cor0
----
9 values hashing to 6a596eedf2b7457ae18824a4e3569913

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4917
SELECT ALL col0 + + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4917
SELECT ALL col0 + + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col2 * 54 * cor0.col0 AS col0 FROM tab0 AS cor0
----
-1890
-394092
-42768

query I rowsort
SELECT ALL 74 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to 2ccf8ef3f477e1a1a3e30c8b8154ff31

query I rowsort
SELECT 68 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 10aa25f1c6b97582c34521ac6452e0b4

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4921
SELECT ALL - col1 * - CAST( - col2 AS SIGNED ) AS col0 FROM tab2
----
-1534
-646
-837

skipif mysql # not compatible
query I rowsort label-4921
SELECT ALL - col1 * - CAST ( - col2 AS INTEGER ) AS col0 FROM tab2
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-4922
SELECT ALL col1 DIV - 89 AS col0 FROM tab1
----
0
0
0

skipif mysql # not compatible
query I rowsort label-4922
SELECT ALL col1 / - 89 AS col0 FROM tab1
----
0
0
0

query I rowsort
SELECT + col2 + 12 FROM tab2 cor0
----
38
39
50

query I rowsort
SELECT - col0 * col0 + - cor0.col2 FROM tab2 AS cor0
----
-6110
-6279
-76

query I rowsort
SELECT ( col0 ) + col1 * - col2 * + 47 AS col1 FROM tab0 AS cor0
----
-133362
-350625
-4524

query I rowsort
SELECT - + 78 AS col1 FROM tab0 AS cor0
----
-78
-78
-78

query I rowsort
SELECT col1 + - ( - col0 ) FROM tab2
----
137
38
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 57 col1 FROM tab2, tab2 cor0
----
9 values hashing to 520dc393896969e02a72ab6c5d92126b

query I rowsort
SELECT DISTINCT col2 * 41 * col1 FROM tab1
----
23370
51168
57564

query I rowsort
SELECT + ( - col2 ) * col1 + - 72 * cor0.col1 AS col2 FROM tab0 AS cor0
----
-14014
-7081
-9030

query I rowsort
SELECT - 32 + cor0.col1 * + 35 FROM tab1 AS cor0
----
318
423
878

query I rowsort
SELECT ALL - + cor0.col0 * col1 + - ( - ( - col2 ) ) * + col2 FROM tab1 AS cor0
----
-10256
-2994
-3889

query I rowsort
SELECT DISTINCT - ( - col1 ) FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT DISTINCT - cor0.col2 + - col0 * 37 * col2 AS col0 FROM tab1 AS cor0
----
-135033
-284256
-6048

query I rowsort
SELECT ALL + ( + col1 ) * - col2 + + col1 FROM tab1 AS cor0
----
-1235
-1378
-560

query I rowsort
SELECT ALL - 22 * col2 + 86 AS col0 FROM tab0 AS cor0
----
-1718
-640
64

query I rowsort
SELECT - cor0.col0 + - col1 - - ( - 92 * + col2 ) FROM tab1 AS cor0
----
-4997
-5318
-8925

onlyif mysql # use DIV operator for integer division
query I rowsort label-4938
SELECT + cor0.col0 DIV - col0 AS col0 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-4938
SELECT + cor0.col0 / - col0 AS col0 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT 67 * + col1 + tab2.col0 AS col2 FROM tab2
----
1218
2084
4031

onlyif mysql # use DIV operator for integer division
query I rowsort label-4940
SELECT CAST( + 49 AS SIGNED ) DIV col1 FROM tab1
----
1
3
4

skipif mysql # not compatible
query I rowsort label-4940
SELECT CAST ( + 49 AS INTEGER ) / col1 FROM tab1
----
1
3
4

query I rowsort
SELECT DISTINCT - col2 + tab2.col1 AS col2 FROM tab2
----
-21
33
4

query I rowsort
SELECT ( + tab1.col1 ) * col1 FROM tab1
----
100
169
676

query I rowsort
SELECT DISTINCT + + 56 * col0 + col1 AS col0 FROM tab2 AS cor0
----
423
4427
4441

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4944
SELECT + + ( - col1 ) + + CAST( NULL AS SIGNED ) FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4944
SELECT + + ( - col1 ) + + CAST ( NULL AS INTEGER ) FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - cor0.col1 * - col1 AS col0 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT ALL + 78 FROM tab0, tab1 AS cor0
----
9 values hashing to 2aff42d3e015022a738905090a20dfd4

query I rowsort
SELECT + cor0.col0 * cor0.col2 AS col2 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-4948
SELECT ALL - col2 DIV + col2 - ( + col0 ) * col1 DIV col1 AS col2 FROM tab0 AS cor0
----
-25
-36
-90

skipif mysql # not compatible
query I rowsort label-4948
SELECT ALL - col2 / + col2 - ( + col0 ) * col1 / col1 AS col2 FROM tab0 AS cor0
----
-25
-36
-90

onlyif mysql # use DIV operator for integer division
query I rowsort label-4949
SELECT DISTINCT + col1 DIV col0 AS col2 FROM tab2 cor0
----
0
4

skipif mysql # not compatible
query I rowsort label-4949
SELECT DISTINCT + col1 / col0 AS col2 FROM tab2 cor0
----
0
4

query I rowsort
SELECT DISTINCT ( 88 ) * col0 AS col1 FROM tab2
----
616
6864
6952

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 34 col0 FROM tab1, tab0, tab1 AS cor0
----
34

query I rowsort
SELECT + col2 * 91 AS col2 FROM tab1
----
4914
5187
8736

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + - 26 col2 FROM tab0
----
-25
56
7

query I rowsort
SELECT ALL 29 * + col1 AS col1 FROM tab0
----
2494
2639
2813

query I rowsort
SELECT + - col1 * col0 AS col1 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT - 51 + - col0 AS col1 FROM tab1 AS cor0
----
-115
-131
-54

query I rowsort
SELECT ALL 5 + + col1 * 10 * 87 AS col1 FROM tab1 AS cor0
----
11315
22625
8705

query I rowsort
SELECT + - col2 * + col1 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + 10 + col1 AS col1 FROM tab2 AS cor0
----
27
41
69

query I rowsort
SELECT - 16 AS col1 FROM tab1 cor0
----
-16
-16
-16

query I rowsort
SELECT ALL - cor0.col0 + + 20 * + col2 AS col2 FROM tab2 AS cor0
----
442
533
681

query I rowsort
SELECT - col0 * - 46 - - col2 AS col2 FROM tab0 AS cor0
----
1137
1611
4176

query I rowsort
SELECT cor0.col2 * col0 AS col1 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-4964
SELECT - col0 - + ( col2 ) DIV col1 AS col2 FROM tab0 AS cor0
----
-24
-35
-89

skipif mysql # not compatible
query I rowsort label-4964
SELECT - col0 - + ( col2 ) / col1 AS col2 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT + col2 * - ( cor0.col2 + - col2 ) AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + col0 + ( - cor0.col1 + - col1 ) AS col1 FROM tab0 AS cor0
----
-148
-159
-93

query I rowsort
SELECT - col0 + col0 + + col1 FROM tab2 cor0
----
17
31
59

query I rowsort
SELECT - 12 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to e698dd57d3aac30af14ce35da434bb45

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4969
SELECT - CAST( - col2 AS SIGNED ) + col1 * + col1 AS col0 FROM tab2 AS cor0
----
327
3507
988

skipif mysql # not compatible
query I rowsort label-4969
SELECT - CAST ( - col2 AS INTEGER ) + col1 * + col1 AS col0 FROM tab2 AS cor0
----
327
3507
988

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 16 col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 3fdb08ec2e3d4b642dd4594778cca8b3

query I rowsort
SELECT + - 32 * cor0.col1 + - col1 + - col1 AS col0 FROM tab0 cor0
----
-2924
-3094
-3298

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4972
SELECT - CAST( - col1 AS SIGNED ) + col1 * 64 FROM tab1 AS cor0
----
1690
650
845

skipif mysql # not compatible
query I rowsort label-4972
SELECT - CAST ( - col1 AS INTEGER ) + col1 * 64 FROM tab1 AS cor0
----
1690
650
845

onlyif mysql # use DIV operator for integer division
query I rowsort label-4973
SELECT DISTINCT - 47 DIV - col0 - - col0 AS col2 FROM tab1 AS cor0
----
18
64
80

skipif mysql # not compatible
query I rowsort label-4973
SELECT DISTINCT - 47 / - col0 - - col0 AS col2 FROM tab1 AS cor0
----
18
64
80

query I rowsort
SELECT DISTINCT - col2 + tab0.col0 * tab0.col1 FROM tab0
----
2031
3394
8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-4975
SELECT + 97 * col2 DIV col0 + - col0 + col1 FROM tab1 AS cor0
----
1769
32
49

skipif mysql # not compatible
query I rowsort label-4975
SELECT + 97 * col2 / col0 + - col0 + col1 FROM tab1 AS cor0
----
1769
32
49

query I rowsort
SELECT ALL + + col2 + - cor0.col1 + + col1 FROM tab0 AS cor0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - CAST ( col1 AS REAL ) col2 FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT ALL ( - 12 ) FROM tab1 AS cor0
----
-12
-12
-12

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * col1 col2 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT - col1 * col2 * col1 + - col0 * + col2 * col0 AS col1 FROM tab2 AS cor0
----
-248140
-248690
-27270

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + + ( - col0 ) * col1 * - cor0.col2 col2 FROM tab2 AS cor0
----
119652
51034
5859

query I rowsort
SELECT ALL - 59 * + col2 AS col1 FROM tab2 AS cor0
----
-1534
-1593
-2242

query I rowsort
SELECT DISTINCT ( 14 ) AS col1 FROM tab1 AS cor0
----
14

query I rowsort
SELECT - - cor0.col2 * - cor0.col2 FROM tab2 AS cor0
----
-1444
-676
-729

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-4985
SELECT ALL - + 2 - col0 * CAST( NULL AS SIGNED ) AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-4985
SELECT ALL - + 2 - col0 * CAST ( NULL AS INTEGER ) AS col1 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 63 - col1 FROM tab2 AS cor0
----
32
4
46

query I rowsort
SELECT - cor0.col1 + - cor0.col1 * + cor0.col2 FROM tab2 AS cor0
----
-1593
-663
-868

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col2 + col0 * - col1 col1 FROM tab0 AS cor0
----
-2097
-3396
-8181

onlyif mysql # use DIV operator for integer division
query I rowsort label-4989
SELECT DISTINCT + col2 DIV - col1 + ( - col0 + + col0 ) AS col0 FROM tab2 cor0
----
-2
0

skipif mysql # not compatible
query I rowsort label-4989
SELECT DISTINCT + col2 / - col1 + ( - col0 + + col0 ) AS col0 FROM tab2 cor0
----
-2
0

query I rowsort
SELECT col1 + - col0 FROM tab0 cor0
----
2
62
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-4991
SELECT DISTINCT + col2 + 62 DIV - col1 col2 FROM tab0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-4991
SELECT DISTINCT + col2 + 62 / - col1 col2 FROM tab0
----
1
33
82

query I rowsort
SELECT DISTINCT tab0.col1 + - col1 AS col2 FROM tab0
----
0

query I rowsort
SELECT ALL - + col1 * - 42 + col2 AS col2 FROM tab0 AS cor0
----
3645
3904
4075

query I rowsort
SELECT DISTINCT col1 * col1 + col1 AS col2 FROM tab2 AS cor0
----
306
3540
992

query I rowsort
SELECT - col2 * + 80 * + col1 AS col2 FROM tab1 cor0
----
-112320
-45600
-99840

query I rowsort
SELECT ALL - - col2 * + 43 FROM tab1 AS cor0
----
2322
2451
4128

query I rowsort
SELECT ALL - cor0.col1 * 29 * col2 FROM tab1 AS cor0
----
-16530
-36192
-40716

onlyif mysql # use DIV operator for integer division
query I rowsort label-4998
SELECT ALL + col2 DIV - cor0.col1 AS col0 FROM tab2 AS cor0
----
-2
0
0

skipif mysql # not compatible
query I rowsort label-4998
SELECT ALL + col2 / - cor0.col1 AS col0 FROM tab2 AS cor0
----
-2
0
0

query I rowsort
SELECT + col2 + col0 * - col1 - + col1 * - col0 FROM tab2
----
26
27
38

query I rowsort
SELECT col0 - 37 FROM tab2
----
-30
41
42

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5001
SELECT + tab2.col1 * + CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5001
SELECT + tab2.col1 * + CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 - - 64 AS col1 FROM tab2
----
33
47
5

query I rowsort
SELECT ALL - tab1.col0 + + 98 * - 20 - col1 FROM tab1
----
-1989
-2034
-2053

query I rowsort
SELECT ALL - col1 + - col1 + + col0 AS col0 FROM tab2 AS cor0
----
-40
-55
45

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 94 col0 FROM tab0 AS cor0
----
-94

query I rowsort
SELECT DISTINCT - + 34 AS col2 FROM tab0 AS cor0
----
-34

query I rowsort
SELECT ALL col1 + - col2 * 44 AS col0 FROM tab0 AS cor0
----
-1366
-3517
53

query I rowsort
SELECT ALL col1 + + cor0.col2 * col2 AS col1 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT ALL + col2 + - col2 + col2 * - cor0.col1 FROM tab2 AS cor0
----
-1534
-646
-837

onlyif mysql # use DIV operator for integer division
query I rowsort label-5010
SELECT DISTINCT col1 * col0 DIV col1 FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort label-5010
SELECT DISTINCT col1 * col0 / col1 FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort
SELECT ALL - 95 + col0 * + CAST ( col0 AS REAL ) FROM tab0 AS cor0
----
1130
481
7826

query I rowsort
SELECT ALL + + 63 AS col0 FROM tab0 AS cor0
----
63
63
63

query I rowsort
SELECT DISTINCT + cor0.col2 * col2 FROM tab1 cor0
----
2916
3249
9216

query I rowsort
SELECT col1 * col2 + col1 * + 89 + + col1 FROM tab2 AS cor0
----
2176
3627
6844

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 43 col0 FROM tab1 AS cor0
----
-43
-43
-43

query I rowsort
SELECT DISTINCT - 64 AS col0 FROM tab2 AS cor0
----
-64

query I rowsort
SELECT ALL cor0.col1 + + col1 * 73 AS col1 FROM tab1 AS cor0
----
1924
740
962

query I rowsort
SELECT + - 81 * col0 FROM tab0 cor0
----
-1944
-2835
-7209

query I rowsort
SELECT cor0.col0 * + ( col0 ) AS col0 FROM tab0 AS cor0
----
1225
576
7921

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0, tab0 cor1, tab2, tab1 AS cor2
----
3645 values hashing to 7ccb6e2515d95809a8c30b73a5cf5f46

query I rowsort
SELECT + col2 * + col2 + ( 72 ) FROM tab0
----
1161
6796
73

query I rowsort
SELECT + - col0 - col2 FROM tab0 cor0
----
-171
-36
-57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 87 + 92 col1 FROM tab2 cor0
----
5
5
5

query I rowsort
SELECT - col1 * - col1 + - col0 AS col1 FROM tab0 AS cor0
----
7372
8192
9374

query I rowsort
SELECT ALL 74 * col2 + col2 FROM tab2 AS cor0
----
1950
2025
2850

query I rowsort
SELECT col1 + - col0 * ( col1 ) + + 14 FROM tab0
----
-1964
-3284
-7994

query I rowsort
SELECT DISTINCT + ( col2 * col0 ) AS col0 FROM tab1
----
162
3648
7680

query I rowsort
SELECT col1 * ( tab1.col2 ) AS col1 FROM tab1
----
1248
1404
570

query I rowsort
SELECT + 61 - + col1 AS col2 FROM tab0
----
-25
-30
-36

query I rowsort
SELECT DISTINCT - ( 87 ) FROM tab0
----
-87

query I rowsort
SELECT DISTINCT + col1 * + col2 + cor0.col2 AS col1 FROM tab1 cor0
----
1344
1458
627

query I rowsort
SELECT ALL ( - 32 ) * col1 FROM tab1 AS cor0
----
-320
-416
-832

query I rowsort
SELECT + ( ( - col1 ) ) + - col1 AS col0 FROM tab0 cor0
----
-172
-182
-194

query I rowsort
SELECT ALL col2 * 33 AS col2 FROM tab2 AS cor0
----
1254
858
891

query I rowsort
SELECT DISTINCT + col0 * + col1 + + cor0.col1 AS col0 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT ALL - 34 + ( cor0.col1 ) FROM tab2 AS cor0
----
-17
-3
25

query I rowsort
SELECT + 23 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to d94fadcc1c8cc4fc51b78b83e04795f2

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5038
SELECT CAST( NULL AS SIGNED ) * - col2 * - col2 + + col2 / + col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5038
SELECT CAST ( NULL AS INTEGER ) * - col2 * - col2 + + col2 / + col1 FROM tab0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5039
SELECT + 95 / col0 + CAST( NULL AS DECIMAL ) col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5039
SELECT + 95 / col0 + CAST ( NULL AS REAL ) col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 + col1 * + col0 FROM tab1 AS cor0
----
1027
52
630

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 70 col2 FROM tab1
----
70
70
70

query I rowsort
SELECT ALL 69 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 85d9b90a03b9def161891b13085271f7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col0 col1 FROM tab0, tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT - 9 + + cor1.col0 AS col2 FROM tab1, tab1 cor0, tab1 AS cor1, tab0, tab0 cor2
----
243 values hashing to bf2b7f702f9f0d5cb5b61411eb4d59f3

query I rowsort
SELECT col0 * + col0 * + col1 FROM tab2 AS cor0
----
106097
1519
358956

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5046
SELECT + - col0 + col2 + + CAST( - col1 + - col0 AS SIGNED ) * 30 FROM tab2 AS cor0
----
-1120
-2921
-4162

skipif mysql # not compatible
query I rowsort label-5046
SELECT + - col0 + col2 + + CAST ( - col1 + - col0 AS INTEGER ) * 30 FROM tab2 AS cor0
----
-1120
-2921
-4162

query I rowsort
SELECT + ( - 45 ) FROM tab0, tab1 AS cor0
----
9 values hashing to 71160abf09589695379a70558726f0ba

query I rowsort
SELECT ALL col1 + 60 * 56 AS col0 FROM tab1
----
3370
3373
3386

onlyif mysql # use DIV operator for integer division
query I rowsort label-5049
SELECT DISTINCT + col2 DIV + col0 FROM tab1 AS cor0
----
0
1
18

skipif mysql # not compatible
query I rowsort label-5049
SELECT DISTINCT + col2 / + col0 FROM tab1 AS cor0
----
0
1
18

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5050
SELECT - + col2 * CAST( NULL AS SIGNED ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5050
SELECT - + col2 * CAST ( NULL AS INTEGER ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - - col1 * cor0.col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT DISTINCT tab1.col1 FROM tab1, tab1 AS cor0
----
10
13
26

query I rowsort
SELECT ALL + col2 * 94 AS col1 FROM tab1 AS cor0
----
5076
5358
9024

query I rowsort
SELECT DISTINCT + - col2 * + col0 * + col2 + col0 FROM tab1 AS cor0
----
-207872
-737200
-8745

query I rowsort
SELECT - + col1 * col2 * col1 AS col0 FROM tab0 AS cor0
----
-244068
-679042
-9409

query I rowsort
SELECT - - col0 + - cor0.col2 * - cor0.col1 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT - - ( 86 ) FROM tab1 AS cor0
----
86
86
86

query I rowsort
SELECT - 22 * + col1 + - col0 AS col1 FROM tab1 AS cor0
----
-284
-366
-575

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 * col2 col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT + - 22 + cor0.col1 FROM tab0 AS cor0
----
64
69
75

query I rowsort
SELECT DISTINCT + - col2 * - col1 - cor0.col2 * col0 * - col1 AS col0 FROM tab1 AS cor0
----
101088
37050
5616

query I rowsort
SELECT ALL - 10 AS col2 FROM tab1 AS cor0
----
-10
-10
-10

query I rowsort
SELECT - 47 * + col2 - - col0 * 24 FROM tab2 cor0
----
-1101
110
650

query I rowsort
SELECT DISTINCT - 6 + + col2 FROM tab1 cor0
----
48
51
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 89 * col1 * cor0.col2 col1 FROM tab2 AS cor0
----
136526
57494
74493

query I rowsort
SELECT col1 + col0 * - col2 * 71 AS col0 FROM tab1 AS cor0
----
-11476
-258998
-545267

query I rowsort
SELECT + ( + 0 ) + col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT col2 * col2 + + cor0.col1 FROM tab0 cor0
----
1175
6815
98

query I rowsort
SELECT - col1 * tab1.col0 * - col1 FROM tab1
----
13520
2028
6400

query I rowsort
SELECT ALL col1 + col1 * + 23 AS col1 FROM tab2
----
1416
408
744

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5071
SELECT ALL - col1 * CAST( NULL AS SIGNED ) * 36 + - tab0.col0 AS col1 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5071
SELECT ALL - col1 * CAST ( NULL AS INTEGER ) * 36 + - tab0.col0 AS col1 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT 72 + + cor0.col0 FROM tab1 AS cor0
----
136
152
75

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5073
SELECT - cor0.col2 * 29 - - cor0.col2 * + CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5073
SELECT - cor0.col2 * 29 - - cor0.col2 * + CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5074
SELECT DISTINCT col1 * - CAST( - col0 AS SIGNED ) + - col2 AS col0 FROM tab2 AS cor0
----
1305
190
4576

skipif mysql # not compatible
query I rowsort label-5074
SELECT DISTINCT col1 * - CAST ( - col0 AS INTEGER ) + - col2 AS col0 FROM tab2 AS cor0
----
1305
190
4576

query I rowsort
SELECT DISTINCT + col2 + + cor0.col2 AS col0 FROM tab0 cor0
----
164
2
66

query I rowsort
SELECT + col0 + 49 AS col2 FROM tab1 cor0
----
113
129
52

query I rowsort
SELECT col0 + 65 FROM tab0 AS cor0
----
100
154
89

query I rowsort
SELECT + 19 AS col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 3dac30dc82c9e5acbbd3a5c5d1aeee11

onlyif mysql # use DIV operator for integer division
query I rowsort label-5079
SELECT cor0.col1 DIV + col1 + 80 AS col1 FROM tab2 AS cor0
----
81
81
81

skipif mysql # not compatible
query I rowsort label-5079
SELECT cor0.col1 / + col1 + 80 AS col1 FROM tab2 AS cor0
----
81
81
81

query I rowsort
SELECT DISTINCT + col2 * ( col0 ) AS col2 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT col2 * 5 AS col0 FROM tab1
----
270
285
480

query I rowsort
SELECT ALL + col0 + 20 FROM tab0 AS cor0
----
109
44
55

onlyif mysql # use DIV operator for integer division
query I rowsort label-5083
SELECT DISTINCT 54 DIV + col2 FROM tab1 cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-5083
SELECT DISTINCT 54 / + col2 FROM tab1 cor0
----
0
1

query I rowsort
SELECT ALL - 46 AS col1 FROM tab1 AS cor0
----
-46
-46
-46

query I rowsort
SELECT + ( cor0.col0 ) * col1 AS col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT 58 AS col0 FROM tab0, tab1 AS cor0
----
9 values hashing to ef6e63aeed2581a168f07646d258f666

query I rowsort
SELECT ALL col1 * 20 * + col0 FROM tab2
----
26860
4340
92040

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 * - 47 + col0 col0 FROM tab2 AS cor0
----
-1144
-1262
-1707

query I rowsort
SELECT ALL col0 + 91 FROM tab2
----
169
170
98

query I rowsort
SELECT ALL - col0 * - 55 * 24 + tab1.col1 FROM tab1
----
105613
3986
84490

query I rowsort
SELECT ALL tab0.col1 * - ( + 82 ) + col2 * + col1 + col0 AS col1 FROM tab0
----
-4190
-7822
89

onlyif mysql # use DIV operator for integer division
query I rowsort label-5092
SELECT ALL col0 + ( + col2 ) DIV col0 AS col2 FROM tab0
----
25
35
89

skipif mysql # not compatible
query I rowsort label-5092
SELECT ALL col0 + ( + col2 ) / col0 AS col2 FROM tab0
----
25
35
89

query I rowsort
SELECT ALL col1 * - col1 + col1 * - col2 * col0 FROM tab2 AS cor0
----
-123133
-51323
-6820

query I rowsort
SELECT + + cor0.col1 + col0 AS col0 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL 80 + + col0 FROM tab2 AS cor0
----
158
159
87

query I rowsort
SELECT DISTINCT cor0.col2 + + col1 + + col2 AS col2 FROM tab2 AS cor0
----
111
85
93

query I rowsort
SELECT ALL 72 FROM tab1 cor0
----
72
72
72

onlyif mysql # use DIV operator for integer division
query I rowsort label-5098
SELECT ALL - - ( + col1 ) DIV 5 + + col0 FROM tab0 cor0
----
107
41
54

skipif mysql # not compatible
query I rowsort label-5098
SELECT ALL - - ( + col1 ) / 5 + + col0 FROM tab0 cor0
----
107
41
54

query I rowsort
SELECT DISTINCT - cor0.col2 FROM tab0, tab2, tab2 AS cor0
----
-26
-27
-38

query I rowsort
SELECT ( 13 * - col0 + tab1.col2 ) FROM tab1
----
-775
-944
15

query I rowsort
SELECT DISTINCT 72 AS col1 FROM tab0, tab1 AS cor0
----
72

query I rowsort
SELECT ALL + tab2.col2 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 5911bac51441f4ff640b2a2b721ea8e3

query I rowsort
SELECT 68 * + 69 AS col1 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 67f625b70debf8de11d13599811b5514

onlyif mysql # use DIV operator for integer division
query I rowsort label-5104
SELECT + cor0.col2 * col2 DIV - cor0.col2 + 30 FROM tab0 AS cor0
----
-3
-52
29

skipif mysql # not compatible
query I rowsort label-5104
SELECT + cor0.col2 * col2 / - cor0.col2 + 30 FROM tab0 AS cor0
----
-3
-52
29

query I rowsort
SELECT + col2 + - col0 - 31 FROM tab2 AS cor0
----
-11
-72
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-5106
SELECT + + 57 DIV - col1 AS col2 FROM tab1 cor0
----
-2
-4
-5

skipif mysql # not compatible
query I rowsort label-5106
SELECT + + 57 / - col1 AS col2 FROM tab1 cor0
----
-2
-4
-5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + col0 - - col2 col0 FROM tab2 AS cor0
----
130
155
61

query I rowsort
SELECT col2 - + tab1.col2 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT - + col1 + col0 * col0 FROM tab2 AS cor0
----
18
6025
6224

query I rowsort
SELECT ALL - col0 + + ( cor0.col1 ) AS col0 FROM tab1 cor0
----
-54
-67
23

query I rowsort
SELECT DISTINCT - + col0 + ( 9 ) AS col0 FROM tab1 AS cor0
----
-55
-71
6

query I rowsort
SELECT col1 * - col2 + col1 FROM tab0
----
-2752
-7371
0

query I rowsort
SELECT + ( + col0 ) + + ( - col0 ) * col1 FROM tab1
----
-576
-75
-960

query I rowsort
SELECT DISTINCT - + 76 AS col1 FROM tab1, tab2, tab2 AS cor0
----
-76

query I rowsort
SELECT ALL - + col2 * col1 + - 29 - col0 AS col0 FROM tab0 AS cor0
----
-161
-2891
-7580

query I rowsort
SELECT ALL + 30 + + col0 - + ( 22 ) FROM tab1 AS cor0
----
11
72
88

query I rowsort
SELECT DISTINCT 12 * - tab1.col2 FROM tab1, tab0, tab0 AS cor0
----
-1152
-648
-684

query I rowsort
SELECT ALL - - col1 * + col1 + ( col1 * - col2 ) FROM tab2 AS cor0
----
-357
124
1947

query I rowsort
SELECT col2 * - col1 - col0 AS col2 FROM tab2 AS cor0
----
-1612
-725
-844

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * ( col2 ) col2 FROM tab2 AS cor0
----
189
2028
3002

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5121
SELECT DISTINCT cor0.col0 * + CAST( NULL AS SIGNED ) - ( - cor0.col2 * + CAST( NULL AS SIGNED ) ) AS col1 FROM tab0 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5121
SELECT DISTINCT cor0.col0 * + CAST ( NULL AS INTEGER ) - ( - cor0.col2 * + CAST ( NULL AS INTEGER ) ) AS col1 FROM tab0 cor0
----
NULL

query I rowsort
SELECT + - col0 + 92 * - 77 AS col2 FROM tab2 AS cor0
----
-7091
-7162
-7163

onlyif mysql # use DIV operator for integer division
query I rowsort label-5123
SELECT DISTINCT - cor0.col1 + 77 DIV + col2 FROM tab0 AS cor0
----
-20
-84
-91

skipif mysql # not compatible
query I rowsort label-5123
SELECT DISTINCT - cor0.col1 + 77 / + col2 FROM tab0 AS cor0
----
-20
-84
-91

query I rowsort
SELECT ALL - cor0.col1 * 97 + col2 AS col0 FROM tab1 AS cor0
----
-1165
-2468
-913

query I rowsort
SELECT ALL col0 * col2 * + 58 + col2 FROM tab2
----
10989
117650
174154

query I rowsort
SELECT ALL - - col0 + - 58 * col1 FROM tab2 AS cor0
----
-1791
-3344
-907

query I rowsort
SELECT + col0 * - ( 31 ) FROM tab2 AS cor0
----
-217
-2418
-2449

query I rowsort
SELECT DISTINCT col0 * col2 + + 37 FROM tab1 AS cor0
----
199
3685
7717

query I rowsort
SELECT DISTINCT + + col0 * 88 * + 17 + cor0.col2 FROM tab2 AS cor0
----
10499
116714
118222

query I rowsort
SELECT ALL - - cor0.col0 + col2 * + col2 * + col0 - ( - col2 ) * - col1 AS col0 FROM tab0 AS cor0
----
-27
23322
591063

query I rowsort
SELECT DISTINCT col0 * col1 + cor0.col2 FROM tab0 AS cor0
----
2097
3396
8181

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5132
SELECT + + col0 * - CAST( 56 AS SIGNED ) + cor0.col0 FROM tab1 cor0
----
-165
-3520
-4400

skipif mysql # not compatible
query I rowsort label-5132
SELECT + + col0 * - CAST ( 56 AS INTEGER ) + cor0.col0 FROM tab1 cor0
----
-165
-3520
-4400

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5133
SELECT ALL - col1 + CAST( NULL AS SIGNED ) * - col0 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5133
SELECT ALL - col1 + 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 ALL + - cor0.col1 col0 FROM tab1 AS cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT - + col2 * + col2 + col1 FROM tab1 AS cor0
----
-2890
-3239
-9203

query I rowsort
SELECT DISTINCT + - col2 * + ( + col2 * - col0 ) FROM tab0 AS cor0
----
26136
35
598436

onlyif mysql # use DIV operator for integer division
query I rowsort label-5137
SELECT + 81 DIV col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5137
SELECT + 81 / col1 AS col2 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5138
SELECT - + CAST( NULL AS SIGNED ) + col1 * col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5138
SELECT - + CAST ( NULL AS INTEGER ) + col1 * col2 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5139
SELECT ALL col1 DIV 30 FROM tab2 AS cor0
----
0
1
1

skipif mysql # not compatible
query I rowsort label-5139
SELECT ALL col1 / 30 FROM tab2 AS cor0
----
0
1
1

query I rowsort
SELECT ALL - ( - 72 ) + - col1 * - ( col0 ) FROM tab0 AS cor0
----
2136
3467
8171

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 18 * col2 col1 FROM tab0 AS cor0
----
-1476
-18
-594

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + - cor0.col0 * + cor0.col1 * - 44 col1 FROM tab2 AS cor0
----
202514
59130
9575

query I rowsort
SELECT DISTINCT + 36 FROM tab1 cor0
----
36

query I rowsort
SELECT DISTINCT - ( - cor0.col2 ) * - cor0.col2 AS col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT + - 3 AS col2 FROM tab0 AS cor0
----
-3

query I rowsort
SELECT cor0.col0 * + 69 FROM tab1 AS cor0
----
207
4416
5520

query I rowsort
SELECT + col1 * + col0 + col2 * - 16 * col0 AS col0 FROM tab1 AS cor0
----
-121840
-2514
-57728

query I rowsort
SELECT DISTINCT + cor0.col1 AS col0 FROM tab1 cor0
----
10
13
26

query I rowsort
SELECT DISTINCT + 61 FROM tab1 AS cor0
----
61

query I rowsort
SELECT DISTINCT - - cor0.col0 + + col0 FROM tab1 AS cor0
----
128
160
6

query I rowsort
SELECT ALL + 86 FROM tab1 cor0
----
86
86
86

query I rowsort
SELECT ALL + + cor0.col0 * col0 AS col2 FROM tab0 AS cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT - - col0 * - col0 AS col0 FROM tab2 cor0
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT col1 * - col1 AS col1 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT - cor1.col1 FROM tab2 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 44 * cor0.col1 * col0 col2 FROM tab1 AS cor0
----
28160
3432
45760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * 12 col2 FROM tab0 AS cor0
----
-1032
-1092
-1164

onlyif mysql # use DIV operator for integer division
query I rowsort label-5158
SELECT ALL + col1 DIV + cor0.col0 - col0 * col1 AS col0 FROM tab2 AS cor0
----
-1343
-213
-4602

skipif mysql # not compatible
query I rowsort label-5158
SELECT ALL + col1 / + cor0.col0 - col0 * col1 AS col0 FROM tab2 AS cor0
----
-1343
-213
-4602

query I rowsort
SELECT DISTINCT - + cor0.col0 * - 46 AS col1 FROM tab1 AS cor0
----
138
2944
3680

onlyif mysql # use DIV operator for integer division
query I rowsort label-5160
SELECT ALL + col2 DIV 69 AS col1 FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5160
SELECT ALL + col2 / 69 AS col1 FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT + col1 * 48 + - col2 FROM tab0 cor0
----
4095
4286
4655

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5162
SELECT ALL + col0 * CAST( - col1 AS SIGNED ) FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort label-5162
SELECT ALL + col0 * CAST ( - col1 AS INTEGER ) FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + - col1 + 78 FROM tab1 AS cor0
----
52
65
68

query I rowsort
SELECT DISTINCT - - col1 + + 23 FROM tab0 AS cor0
----
109
114
120

query I rowsort
SELECT + col2 * - col2 * + cor0.col0 FROM tab0 AS cor0
----
-26136
-35
-598436

onlyif mysql # use DIV operator for integer division
query I rowsort label-5166
SELECT DISTINCT col0 DIV - ( col1 ) col1 FROM tab0 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5166
SELECT DISTINCT col0 / - ( col1 ) col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - col1 + 8 AS col1 FROM tab1 cor0
----
-18
-2
-5

query I rowsort
SELECT ALL + col2 * + 58 + 27 FROM tab0 AS cor0
----
1941
4783
85

query I rowsort
SELECT + col1 * col0 * col1 + cor0.col2 FROM tab0 cor0
----
177537
329316
737091

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5170
SELECT - col0 + CAST( cor0.col1 AS SIGNED ) * col1 FROM tab1 AS cor0
----
36
673
89

skipif mysql # not compatible
query I rowsort label-5170
SELECT - col0 + CAST ( cor0.col1 AS INTEGER ) * col1 FROM tab1 AS cor0
----
36
673
89

query I rowsort
SELECT - col1 + + ( col0 ) FROM tab1 AS cor0
----
-23
54
67

query I rowsort
SELECT + 34 * + col2 * + col0 AS col2 FROM tab1 AS cor0
----
124032
261120
5508

query I rowsort
SELECT - ( - 40 ) FROM tab0 AS cor0
----
40
40
40

query I rowsort
SELECT + cor1.col1 * - 55 AS col2 FROM tab1, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 82e9cc8424132ae9204076ba86a854db

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 + col1 * - 35 col0 FROM tab2 AS cor0
----
-1054
-2006
-578

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col2 ) * 80 + - col2 col2 FROM tab2 AS cor0
----
2054
2133
3002

query I rowsort
SELECT + 67 * col1 FROM tab2 AS cor0
----
1139
2077
3953

query I rowsort
SELECT - col2 + - col0 * ( col0 + col1 ) * 18 AS col2 FROM tab0 AS cor0
----
-288442
-47553
-83161

query I rowsort
SELECT DISTINCT col1 * + cor0.col1 AS col1 FROM tab0 AS cor0
----
7396
8281
9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-5180
SELECT + cor0.col0 DIV + col2 AS col1 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-5180
SELECT + cor0.col0 / + col2 AS col1 FROM tab0 AS cor0
----
0
1
35

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - - 90 + - col1 * 85 col1 FROM tab2 cor0
----
-1355
-2545
-4925

query I rowsort
SELECT + - 87 * + col2 FROM tab1 cor0
----
-4698
-4959
-8352

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col0 + col1 col0 FROM tab0
----
110
132
180

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - tab2.col2 + col1 + + 81 * - ( col1 ) col2 FROM tab2
----
-1398
-2507
-4746

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5185
SELECT - + col0 / - CAST( NULL AS SIGNED ) + + col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5185
SELECT - + col0 / - CAST ( NULL AS INTEGER ) + + col1 AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5186
SELECT ALL + col2 DIV tab1.col2 + + col1 * 32 + tab1.col2 col0 FROM tab1
----
378
513
887

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5186
SELECT ALL + col2 / tab1.col2 + + col1 * 32 + tab1.col2 col0 FROM tab1
----
378
513
887

query I rowsort
SELECT DISTINCT col1 + - col2 * 49 AS col2 FROM tab0
----
-1531
-3927
48

query I rowsort
SELECT ALL + col2 + col2 + - ( 87 ) FROM tab1
----
105
21
27

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5189
SELECT col0 * CAST( - col1 * col2 AS SIGNED ) + 45 * - col2 * col1 FROM tab2 AS cor0
----
-188682
-43524
-80104

skipif mysql # not compatible
query I rowsort label-5189
SELECT col0 * CAST ( - col1 * col2 AS INTEGER ) + 45 * - col2 * col1 FROM tab2 AS cor0
----
-188682
-43524
-80104

onlyif mysql # use DIV operator for integer division
query I rowsort label-5190
SELECT col2 * + col2 + + col1 - col1 DIV - col0 AS col2 FROM tab1 cor0
----
2950
3259
9229

skipif mysql # not compatible
query I rowsort label-5190
SELECT col2 * + col2 + + col1 - col1 / - col0 AS col2 FROM tab1 cor0
----
2950
3259
9229

query I rowsort
SELECT 12 AS col1 FROM tab0, tab1 cor0, tab1 cor1
----
27 values hashing to 702478c53caf2f7ebb9fff96d800f5a6

onlyif mysql # use DIV operator for integer division
query I rowsort label-5192
SELECT - 74 * col2 DIV 44 AS col2 FROM tab2
----
-43
-45
-63

skipif mysql # not compatible
query I rowsort label-5192
SELECT - 74 * col2 / 44 AS col2 FROM tab2
----
-43
-45
-63

query I rowsort
SELECT tab2.col2 * - ( + col0 ) FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT col2 * - ( + tab1.col0 ) FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT ALL + 63 * - cor0.col0 AS col0 FROM tab1, tab2 AS cor0
----
9 values hashing to 9ff438b4f4c3a7e57469937cc083b088

onlyif mysql # use DIV operator for integer division
query I rowsort label-5196
SELECT DISTINCT col2 DIV 15 FROM tab1
----
3
6

skipif mysql # not compatible
query I rowsort label-5196
SELECT DISTINCT col2 / 15 FROM tab1
----
3
6

query I rowsort
SELECT ALL - col0 * - tab1.col1 * col2 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT ( + 78 ) * + col0 + tab0.col1 FROM tab0
----
1958
2827
7033

query I rowsort
SELECT ALL + col1 * - cor0.col1 * + col2 FROM tab0 AS cor0
----
-244068
-679042
-9409

query I rowsort
SELECT DISTINCT - cor0.col2 * col1 - col0 FROM tab0 AS cor0
----
-132
-2862
-7551

query I rowsort
SELECT ALL 43 FROM tab1
----
43
43
43

query I rowsort
SELECT + - col1 + col2 * col0 FROM tab1 AS cor0
----
136
3638
7667

query I rowsort
SELECT col2 * - col1 + 88 * col0 FROM tab2 AS cor0
----
-221
5330
6306

query I rowsort
SELECT + ( - col2 ) * col1 AS col2 FROM tab1 AS cor0
----
-1248
-1404
-570

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5205
SELECT ALL + + col1 + col0 / - CAST( NULL AS DECIMAL ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5205
SELECT ALL + + col1 + col0 / - CAST ( NULL AS REAL ) AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * + 17 col0 FROM tab1 AS cor0
----
170
221
442

query I rowsort
SELECT DISTINCT col1 * + col2 - - col0 AS col0 FROM tab2
----
1612
725
844

onlyif mysql # use DIV operator for integer division
query I rowsort label-5208
SELECT DISTINCT - + 89 * col1 DIV col2 FROM tab0 AS cor0
----
-231
-8633
-98

skipif mysql # not compatible
query I rowsort label-5208
SELECT DISTINCT - + 89 * col1 / col2 FROM tab0 AS cor0
----
-231
-8633
-98

query I rowsort
SELECT ALL + + 97 * ( col0 ) AS col0 FROM tab2 cor0
----
679
7566
7663

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * col2 col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

query I rowsort
SELECT + col1 + - col0 * + col2 FROM tab0 AS cor0
----
-706
-7207
62

query I rowsort
SELECT - col1 + col2 * 20 * - 98 + col2 FROM tab1 AS cor0
----
-105812
-111673
-188077

query I rowsort
SELECT + 67 + col1 + col0 AS col1 FROM tab0 AS cor0
----
177
199
247

query I rowsort
SELECT DISTINCT + - col0 + - col0 FROM tab1 cor0
----
-128
-160
-6

query I rowsort
SELECT ALL - - col1 + col0 AS col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT - + col1 + + col0 + - 16 * col1 * - cor0.col1 FROM tab1 AS cor0
----
10793
1654
2771

query I rowsort
SELECT DISTINCT - 96 * col2 AS col2 FROM tab1 cor0
----
-5184
-5472
-9216

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col0 - + col1 col1 FROM tab1 AS cor0
----
-23
54
67

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT CAST ( col2 + col2 AS REAL ) FROM tab0
----
164
2
66

query I rowsort
SELECT DISTINCT - col0 * col0 - + col1 FROM tab1
----
-35
-4106
-6413

query I rowsort
SELECT col1 - - 49 * - col0 FROM tab1
----
-121
-3126
-3907

query I rowsort
SELECT DISTINCT - 43 AS col0 FROM tab2
----
-43

query I rowsort
SELECT - ( 50 + - col2 ) * col0 * + 15 FROM tab0
----
-25725
-6120
42720

query I rowsort
SELECT ALL 56 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to 9c4523312174730bbc525b9977aa99fa

query I rowsort
SELECT DISTINCT col2 * 63 AS col2 FROM tab2
----
1638
1701
2394

query I rowsort
SELECT + 33 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to 76da8bc7cae18ecf856438f872430c80

query I rowsort
SELECT ALL + col1 + - 13 FROM tab0 AS cor0
----
73
78
84

query I rowsort
SELECT DISTINCT - ( + col0 ) * + ( col1 ) FROM tab1
----
-1040
-640
-78

query I rowsort
SELECT ALL - col1 * - 23 AS col1 FROM tab0 AS cor0
----
1978
2093
2231

query I rowsort
SELECT ALL tab2.col1 FROM tab2, tab1 cor0, tab0 AS cor1
----
27 values hashing to 7599b480125de521efed71b5b2413c7d

onlyif mysql # use DIV operator for integer division
query I rowsort label-5231
SELECT + - cor0.col0 DIV col1 FROM tab2 AS cor0
----
-1
-4
0

skipif mysql # not compatible
query I rowsort label-5231
SELECT + - cor0.col0 / col1 FROM tab2 AS cor0
----
-1
-4
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5232
SELECT ALL - col0 DIV + ( - col0 ) AS col1 FROM tab2
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5232
SELECT ALL - col0 / + ( - col0 ) AS col1 FROM tab2
----
1
1
1

query I rowsort
SELECT DISTINCT 90 - col2 FROM tab1 AS cor0
----
-6
33
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 12 col0 FROM tab2 AS cor0
----
12
12
12

query I rowsort
SELECT DISTINCT + - col0 * cor0.col1 + + col0 FROM tab1 cor0
----
-576
-75
-960

query I rowsort
SELECT DISTINCT 95 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
95

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5237
SELECT ALL - col1 * - CAST( + col1 AS SIGNED ) AS col2 FROM tab1
----
100
169
676

skipif mysql # not compatible
query I rowsort label-5237
SELECT ALL - col1 * - CAST ( + col1 AS INTEGER ) AS col2 FROM tab1
----
100
169
676

onlyif mysql # use DIV operator for integer division
query I rowsort label-5238
SELECT ALL + col0 DIV - col0 + + col2 AS col0 FROM tab2 cor0
----
25
26
37

skipif mysql # not compatible
query I rowsort label-5238
SELECT ALL + col0 / - col0 + + col2 AS col0 FROM tab2 cor0
----
25
26
37

query I rowsort
SELECT DISTINCT - 34 + + ( - col2 ) FROM tab2 AS cor0
----
-60
-61
-72

query I rowsort
SELECT ALL - 42 * ( + col0 ) + cor0.col2 AS col2 FROM tab1 cor0
----
-2631
-3264
-72

query I rowsort
SELECT ALL + - 20 * col2 FROM tab0 AS cor0
----
-1640
-20
-660

query I rowsort
SELECT DISTINCT - 39 * col0 FROM tab2 AS cor0
----
-273
-3042
-3081

skipif mysql # not compatible
query I rowsort
SELECT CAST ( + ( + col2 ) AS REAL ) + col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT col1 + + col2 * - 6 * + col0 AS col2 FROM tab1
----
-21878
-46067
-946

query I rowsort
SELECT - 10 AS col0 FROM tab2, tab2 AS cor0
----
9 values hashing to f68f33032846e21ee6b2c668fc10355e

query I rowsort
SELECT 32 * - cor0.col0 AS col2 FROM tab0, tab0 AS cor0
----
9 values hashing to f47532f5ec797870d70f0ae11e382976

query I rowsort
SELECT ALL - - col0 * col1 + + col2 * - col0 FROM tab1 AS cor0
----
-3008
-6640
-84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( - cor0.col2 ) col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT col2 * + cor0.col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT 22 * 40 FROM tab0 AS cor0
----
880
880
880

query I rowsort
SELECT DISTINCT - + 83 * col1 FROM tab2 AS cor0
----
-1411
-2573
-4897

query I rowsort
SELECT ALL + col0 * - col1 * - col1 + + col2 * - col2 FROM tab2 AS cor0
----
21387
270842
5998

query I rowsort
SELECT + + 80 * - col1 AS col1 FROM tab2 AS cor0
----
-1360
-2480
-4720

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 25 + - cor0.col1 * col1 col1 FROM tab0 AS cor0
----
-7421
-8306
-9434

query I rowsort
SELECT DISTINCT + ( ( + col0 ) ) AS col1 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT - 64 + col1 AS col2 FROM tab2 AS cor0
----
-33
-47
-5

query I rowsort
SELECT DISTINCT - - ( col0 ) * col0 + - ( cor0.col2 ) FROM tab2 AS cor0
----
22
6058
6203

onlyif mysql # use DIV operator for integer division
query I rowsort label-5258
SELECT + 4 + + col2 DIV col2 FROM tab1 AS cor0
----
5
5
5

skipif mysql # not compatible
query I rowsort label-5258
SELECT + 4 + + col2 / col2 FROM tab1 AS cor0
----
5
5
5

onlyif mysql # use DIV operator for integer division
query I rowsort label-5259
SELECT DISTINCT + - col0 + 66 DIV - col0 AS col1 FROM tab2 AS cor0
----
-16
-78
-79

skipif mysql # not compatible
query I rowsort label-5259
SELECT DISTINCT + - col0 + 66 / - col0 AS col1 FROM tab2 AS cor0
----
-16
-78
-79

query I rowsort
SELECT DISTINCT + col0 * col1 * col0 AS col0 FROM tab0 AS cor0
----
118825
49536
720811

query I rowsort
SELECT DISTINCT 99 + col2 * - col1 FROM tab0
----
-2739
-7363
2

query I rowsort
SELECT + 15 AS col1 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to d1d280d38bf9c2d5d5ec90dd43aeaffd

query I rowsort
SELECT - col0 + col2 - 55 FROM tab2 AS cor0
----
-107
-35
-96

query I rowsort
SELECT 77 * - col2 + - 66 AS col1 FROM tab1
----
-4224
-4455
-7458

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col2 * cor0.col0 col0 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT + col0 * - col2 + col2 FROM tab1
----
-108
-3591
-7584

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + tab0.col1 col0 FROM tab0
----
110
132
180

query I rowsort
SELECT - col1 * col1 + - cor0.col2 FROM tab1 AS cor0
----
-157
-265
-730

query I rowsort
SELECT + cor0.col2 * - 89 * col2 + - col1 AS col0 FROM tab2 AS cor0
----
-128533
-60223
-64912

query I rowsort
SELECT DISTINCT + col1 + + 80 FROM tab0 AS cor0
----
166
171
177

query I rowsort
SELECT ALL - + col0 * - 19 - ( + col0 ) AS col1 FROM tab1 AS cor0
----
1152
1440
54

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5272
SELECT col0 * CAST( col0 AS SIGNED ) + + col1 FROM tab0 AS cor0
----
1322
662
8012

skipif mysql # not compatible
query I rowsort label-5272
SELECT col0 * CAST ( col0 AS INTEGER ) + + col1 FROM tab0 AS cor0
----
1322
662
8012

onlyif mysql # use DIV operator for integer division
query I rowsort label-5273
SELECT - col2 DIV col1 + ( + col0 ) FROM tab1 cor0
----
1
59
73

skipif mysql # not compatible
query I rowsort label-5273
SELECT - col2 / col1 + ( + col0 ) FROM tab1 cor0
----
1
59
73

query I rowsort
SELECT DISTINCT col0 + 70 FROM tab2 cor0
----
148
149
77

query I rowsort
SELECT ALL tab2.col0 + + col2 AS col0 FROM tab2
----
104
117
34

query I rowsort
SELECT col1 * - col2 + ( col0 ) FROM tab0
----
-2814
-62
-7373

query I rowsort
SELECT - col2 + 39 * col0 FROM tab0 cor0
----
1364
3389
903

query I rowsort
SELECT col1 + - 12 FROM tab1 cor0
----
-2
1
14

query I rowsort
SELECT ALL - col0 * - col1 + col2 * + 51 FROM tab2
----
1594
3281
5928

skipif mysql # not compatible
query I rowsort
SELECT ALL col0 * col2 + + CAST ( - 31 AS REAL ) AS col2 FROM tab2
----
158
1997
2971

query I rowsort
SELECT col2 + - col2 AS col0 FROM tab0 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5282
SELECT ALL - col2 / CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5282
SELECT ALL - col2 / CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 27 col1 FROM tab1, tab1 AS cor0
----
9 values hashing to 701bf12d86392cb1585d9e4f3c72e9a8

query I rowsort
SELECT - + col2 * - 39 + ( col2 ) * ( col1 ) AS col1 FROM tab1 AS cor0
----
2793
3510
4992

query I rowsort
SELECT col1 - - col2 * col1 * col1 FROM tab0 AS cor0
----
244154
679133
9506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col0 * + 77 + col0 * col0 * col0 col0 FROM tab1 AS cor0
----
258
267072
518160

query I rowsort
SELECT DISTINCT - col2 + col2 * col2 FROM tab1 AS cor0
----
2862
3192
9120

query I rowsort
SELECT + + col0 * - col1 FROM tab0 cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT + col0 + - col2 AS col0 FROM tab0 AS cor0
----
-9
34
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-5290
SELECT DISTINCT col2 * cor0.col0 DIV 37 AS col2 FROM tab0 AS cor0
----
0
197
21

skipif mysql # not compatible
query I rowsort label-5290
SELECT DISTINCT col2 * cor0.col0 / 37 AS col2 FROM tab0 AS cor0
----
0
197
21

query I rowsort
SELECT + col1 - 1 * 72 AS col0 FROM tab1 AS cor0
----
-46
-59
-62

query I rowsort
SELECT ALL cor0.col0 * - ( cor0.col2 ) FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT + col2 + 76 * - col0 AS col0 FROM tab0 AS cor0
----
-1791
-2659
-6682

query I rowsort
SELECT - 96 AS col1 FROM tab1
----
-96
-96
-96

query I rowsort
SELECT DISTINCT + 57 * + tab0.col1 FROM tab0
----
4902
5187
5529

query I rowsort
SELECT ALL + - ( + col1 ) + col2 * 33 FROM tab2 AS cor0
----
1237
799
860

query I rowsort
SELECT DISTINCT - col2 - col0 * + col1 FROM tab2 AS cor0
----
-1381
-244
-4628

query I rowsort
SELECT ALL + col2 * + col0 + - col2 AS col1 FROM tab2 AS cor0
----
162
2002
2964

query I rowsort
SELECT DISTINCT + 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-5300
SELECT ALL + CAST( + col1 AS SIGNED ) - col1 AS col1 FROM tab1 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5300
SELECT ALL + CAST ( + col1 AS INTEGER ) - col1 AS col1 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT - col1 * - 30 FROM tab2 AS cor0
----
1770
510
930

query I rowsort
SELECT DISTINCT - col1 + + col2 - col0 FROM tab2 AS cor0
----
-11
-111
-58

onlyif mysql # use DIV operator for integer division
query I rowsort label-5303
SELECT DISTINCT + col2 * + col2 * - col2 + col0 DIV - col1 FROM tab2 AS cor0
----
-17577
-19683
-54876

skipif mysql # not compatible
query I rowsort label-5303
SELECT DISTINCT + col2 * + col2 * - col2 + col0 / - col1 FROM tab2 AS cor0
----
-17577
-19683
-54876

query I rowsort
SELECT ALL + cor0.col2 * col1 + col0 FROM tab2 AS cor0
----
1612
725
844

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - ( + col2 ) + - cor0.col0 * CAST ( col0 AS REAL ) + - col2 * 50 AS col2 FROM tab1 AS cor0
----
-11296
-2763
-7003

query I rowsort
SELECT ALL - col2 * col2 + col1 FROM tab0 AS cor0
----
-1003
-6633
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + cor0.col0 col1 FROM tab2 cor0
----
14
156
158

onlyif mysql # use DIV operator for integer division
query I rowsort label-5308
SELECT DISTINCT + - col0 DIV + cor0.col1 + col2 FROM tab2 AS cor0
----
25
27
34

skipif mysql # not compatible
query I rowsort label-5308
SELECT DISTINCT + - col0 / + cor0.col1 + col2 FROM tab2 AS cor0
----
25
27
34

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * + col0 * + ( - col1 ) col2 FROM tab0 AS cor0
----
177504
329315
737009

query I rowsort
SELECT - col2 + cor0.col0 * ( - 59 ) AS col2 FROM tab2 AS cor0
----
-440
-4628
-4699

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 68 * - col2 col0 FROM tab1 AS cor0
----
-3672
-3876
-6528

query I rowsort
SELECT - ( col0 ) + - 99 * ( - col2 + + 38 ) AS col2 FROM tab1 AS cor0
----
1581
1817
5662

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 21 col1 FROM tab1 AS cor0
----
-21
-21
-21

query I rowsort
SELECT + + col0 * + ( col1 + col1 ) FROM tab1 AS cor0
----
1280
156
2080

query I rowsort
SELECT ALL + + col1 * col1 * col2 AS col0 FROM tab1 AS cor0
----
16224
36504
5700

onlyif mysql # use DIV operator for integer division
query I rowsort label-5316
SELECT + col2 DIV + cor0.col2 + col1 DIV - col1 FROM tab1 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5316
SELECT + col2 / + cor0.col2 + col1 / - col1 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - col2 * - 72 + col1 AS col2 FROM tab1 AS cor0
----
3914
4114
6925

query I rowsort
SELECT + + 61 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 07149905a72bd87553381f34d19ed290

query I rowsort
SELECT 21 AS col2 FROM tab2 AS cor0
----
21
21
21

query I rowsort
SELECT + - col1 * - col0 + col1 AS col0 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT - col0 + 58 FROM tab0 AS cor0
----
-31
23
34

query I rowsort
SELECT - cor0.col1 * - 45 FROM tab0 AS cor0
----
3870
4095
4365

query I rowsort
SELECT tab1.col1 * 12 + col2 FROM tab1
----
177
252
366

query I rowsort
SELECT - col0 + cor0.col1 * col0 FROM tab0 AS cor0
----
2040
3360
8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 32 col0 FROM tab1 AS cor0
----
32
32
32

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5326
SELECT CAST( NULL AS SIGNED ) / 9 + - col0 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5326
SELECT CAST ( NULL AS INTEGER ) / 9 + - col0 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + + 96 * + col1 FROM tab0 AS cor0
----
8256
8736
9312

query I rowsort
SELECT DISTINCT 82 AS col1 FROM tab1, tab1 AS cor0
----
82

query I rowsort
SELECT ALL - col1 * 68 * - col0 AS col2 FROM tab2
----
14756
312936
91324

query I rowsort
SELECT ALL 8 AS col2 FROM tab1
----
8
8
8

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor1.col0 col0 FROM tab0, tab2 AS cor0, tab2 cor1
----
-7
-78
-79

query I rowsort
SELECT DISTINCT 48 AS col1 FROM tab2, tab2 AS cor0
----
48

query I rowsort
SELECT ALL tab2.col1 * ( + 97 ) FROM tab2
----
1649
3007
5723

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 61 * + cor0.col0 col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 04c39039b4048d900af1c8e9b7691776

onlyif mysql # use DIV operator for integer division
query I rowsort label-5335
SELECT ALL 69 + - col0 DIV col1 FROM tab2 AS cor0
----
65
68
69

skipif mysql # not compatible
query I rowsort label-5335
SELECT ALL 69 + - col0 / col1 FROM tab2 AS cor0
----
65
68
69

query IIIIIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab1, tab1 AS cor1, tab2 AS cor2, tab0 AS cor3
----
3645 values hashing to fb1fb273a543ea33958edfcaa2e7ed26

query I rowsort
SELECT + 75 FROM tab2, tab1 AS cor0
----
9 values hashing to 22042bfd4d787415457a42bb93d48eea

query I rowsort
SELECT DISTINCT + 62 FROM tab1
----
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + col1 ) + - tab1.col0 col0 FROM tab1
----
-54
-67
23

query I rowsort
SELECT ALL + + 28 AS col0 FROM tab0 AS cor0
----
28
28
28

query I rowsort
SELECT DISTINCT - + col0 * 17 FROM tab2 AS cor0
----
-119
-1326
-1343

query I rowsort
SELECT DISTINCT - col2 * cor0.col1 FROM tab0 cor0
----
-2838
-7462
-97

query I rowsort
SELECT ALL cor0.col0 * cor0.col2 AS col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT DISTINCT - + ( + cor0.col1 ) AS col0 FROM tab0 AS cor0
----
-86
-91
-97

query I rowsort
SELECT ALL cor1.col2 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to 7786718bd8042022537378d40ec87475

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 + + col0 col0 FROM tab2
----
-20
41
52

query I rowsort
SELECT ALL col1 + - col2 * + 65 AS col2 FROM tab1
----
-3484
-3695
-6227

query I rowsort
SELECT 95 * + col1 + 66 FROM tab1 AS cor0
----
1016
1301
2536

query I rowsort
SELECT - col0 + cor0.col1 AS col0 FROM tab2 cor0
----
-19
-62
24

onlyif mysql # use DIV operator for integer division
query I rowsort label-5350
SELECT - 5 DIV + cor0.col1 + - 82 * col2 col1 FROM tab2 AS cor0
----
-2132
-2214
-3116

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5350
SELECT - 5 / + cor0.col1 + - 82 * col2 col1 FROM tab2 AS cor0
----
-2132
-2214
-3116

onlyif mysql # use DIV operator for integer division
query I rowsort label-5351
SELECT DISTINCT cor0.col0 + 71 DIV + col2 AS col2 FROM tab1 AS cor0
----
4
65
80

skipif mysql # not compatible
query I rowsort label-5351
SELECT DISTINCT cor0.col0 + 71 / + col2 AS col2 FROM tab1 AS cor0
----
4
65
80

query I rowsort
SELECT + col2 * 56 + 52 FROM tab2 AS cor0
----
1508
1564
2180

query I rowsort
SELECT ALL + + col1 * - 52 AS col2 FROM tab2 AS cor0
----
-1612
-3068
-884

query I rowsort
SELECT ALL + col0 * 44 * 48 FROM tab2 AS cor0
----
14784
164736
166848

query I rowsort
SELECT DISTINCT col2 * + ( 79 ) + + col1 FROM tab2 AS cor0
----
2113
2164
3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-5356
SELECT ALL cor0.col1 DIV + col2 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-5356
SELECT ALL cor0.col1 / + col2 FROM tab0 AS cor0
----
1
2
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5357
SELECT - col2 DIV col0 + col1 AS col2 FROM tab0 AS cor0
----
85
91
97

skipif mysql # not compatible
query I rowsort label-5357
SELECT - col2 / col0 + col1 AS col2 FROM tab0 AS cor0
----
85
91
97

query I rowsort
SELECT DISTINCT - col2 + cor0.col1 * + col2 FROM tab2 AS cor0
----
1508
608
810

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5359
SELECT col2 * CAST( + ( + cor0.col2 ) AS SIGNED ) + cor0.col2 FROM tab1 AS cor0
----
2970
3306
9312

skipif mysql # not compatible
query I rowsort label-5359
SELECT col2 * CAST ( + ( + cor0.col2 ) AS INTEGER ) + cor0.col2 FROM tab1 AS cor0
----
2970
3306
9312

query I rowsort
SELECT DISTINCT - + cor0.col0 + - col1 AS col2 FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT cor0.col2 + col1 * cor0.col1 * + col0 AS col0 FROM tab0 AS cor0
----
177537
329316
737091

query I rowsort
SELECT - col1 + - ( col0 ) FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT + cor0.col1 FROM tab2, tab0, tab1 AS cor0
----
27 values hashing to d671a064e2da709ca4cdfea317b8e892

query I rowsort
SELECT DISTINCT tab1.col1 FROM tab1, tab0, tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT + col0 * col1 AS col2 FROM tab0
----
2064
3395
8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-5366
SELECT ALL - col1 + - cor0.col0 DIV - col2 FROM tab1 cor0
----
-13
-26
-9

skipif mysql # not compatible
query I rowsort label-5366
SELECT ALL - col1 + - cor0.col0 / - col2 FROM tab1 cor0
----
-13
-26
-9

query I rowsort
SELECT ALL - col0 + ( - col1 ) FROM tab1 AS cor0
----
-29
-74
-93

query I rowsort
SELECT + col1 + col0 * 61 FROM tab0 AS cor0
----
1550
2232
5520

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col0 * - 22 + cor0.col2 col1 FROM tab0 cor0
----
2040
561
771

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5370
SELECT - col1 * - CAST( NULL AS SIGNED ) + col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5370
SELECT - col1 * - CAST ( NULL AS INTEGER ) + col0 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + 32 * col1 FROM tab0 AS cor0
----
2752
2912
3104

query I rowsort
SELECT ALL - 39 AS col1 FROM tab2 AS cor0
----
-39
-39
-39

query I rowsort
SELECT DISTINCT - col2 * - cor0.col2 AS col1 FROM tab2 AS cor0
----
1444
676
729

query I rowsort
SELECT ALL - ( + 11 ) * - col2 AS col2 FROM tab2 AS cor0
----
286
297
418

query I rowsort
SELECT col0 * ( - col0 ) AS col1 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT DISTINCT + tab2.col0 * + col2 AS col1 FROM tab2
----
189
2028
3002

query I rowsort
SELECT col0 * 88 + + col2 * + col2 AS col2 FROM tab2
----
1345
7540
8396

query I rowsort
SELECT DISTINCT - - ( col0 ) + - 89 + + cor0.col2 FROM tab1 AS cor0
----
-32
32
87

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + 86 - + cor0.col1 col0 FROM tab1 cor0
----
-112
-96
-99

query I rowsort
SELECT + 79 * - col0 - - cor0.col1 AS col0 FROM tab0 AS cor0
----
-1810
-2668
-6940

query I rowsort
SELECT DISTINCT + col1 * col2 + + col1 FROM tab0 cor0
----
194
2924
7553

onlyif mysql # use DIV operator for integer division
query I rowsort label-5382
SELECT - cor0.col0 * - col0 + + 61 DIV + ( - col1 ) AS col2 FROM tab2 cor0
----
48
6083
6238

skipif mysql # not compatible
query I rowsort label-5382
SELECT - cor0.col0 * - col0 + + 61 / + ( - col1 ) AS col2 FROM tab2 cor0
----
48
6083
6238

query I rowsort
SELECT ALL + - col0 * + col1 FROM tab0 AS cor0
----
-2064
-3395
-8099

onlyif mysql # use DIV operator for integer division
query I rowsort label-5384
SELECT + cor0.col2 * col1 DIV + 64 + - cor0.col2 * + col2 FROM tab0 AS cor0
----
-1045
-6608
0

skipif mysql # not compatible
query I rowsort label-5384
SELECT + cor0.col2 * col1 / + 64 + - cor0.col2 * + col2 FROM tab0 AS cor0
----
-1045
-6608
0

query I rowsort
SELECT - ( - col0 ) * + cor0.col0 - col2 AS col1 FROM tab0 AS cor0
----
1224
543
7839

query I rowsort
SELECT DISTINCT + cor0.col0 AS col1 FROM tab0 cor0
----
24
35
89

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 0 col0 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5388
SELECT ALL 69 * + col1 + CAST( NULL AS SIGNED ) * + col1 + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5388
SELECT ALL 69 * + col1 + CAST ( NULL AS INTEGER ) * + col1 + col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col2 * - col2 AS col2 FROM tab1 AS cor0
----
-2916
-3249
-9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-5390
SELECT + + col2 DIV cor0.col0 - + col0 col0 FROM tab2 AS cor0
----
-4
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5390
SELECT + + col2 / cor0.col0 - + col0 col0 FROM tab2 AS cor0
----
-4
-78
-79

query I rowsort
SELECT DISTINCT 7 - tab0.col0 * + col0 AS col0 FROM tab0
----
-1218
-569
-7914

query I rowsort
SELECT DISTINCT col0 + col2 - + col1 * + col2 AS col1 FROM tab1
----
-1072
-1347
-449

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( col1 ) col2 FROM tab1
----
10
13
26

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5394
SELECT + CAST( NULL AS SIGNED ) * - col0 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5394
SELECT + CAST ( NULL AS INTEGER ) * - col0 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 31 + col2 AS col0 FROM tab2
----
57
58
69

query I rowsort
SELECT - 20 AS col0 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to f1cccb95c90889319e7a51e4ae9475bb

query I rowsort
SELECT 11 + col1 AS col2 FROM tab0 cor0
----
102
108
97

query I rowsort
SELECT + cor0.col1 + + cor0.col0 AS col2 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT - - 41 FROM tab2 AS cor0
----
41

query I rowsort
SELECT DISTINCT 72 + + col0 FROM tab1
----
136
152
75

query I rowsort
SELECT + 87 + col1 FROM tab2
----
104
118
146

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5402
SELECT - - CAST( - 26 AS SIGNED ) + - col1 * - CAST( + col0 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
2038
3369
8073

skipif mysql # not compatible
query I rowsort label-5402
SELECT - - CAST ( - 26 AS INTEGER ) + - col1 * - CAST ( + col0 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
2038
3369
8073

query I rowsort
SELECT ALL - 38 * + cor0.col0 AS col2 FROM tab0 AS cor0
----
-1330
-3382
-912

query I rowsort
SELECT ( ( + col2 ) ) * col2 FROM tab1 AS cor0
----
2916
3249
9216

query I rowsort
SELECT col2 + 54 AS col1 FROM tab0
----
136
55
87

query I rowsort
SELECT - 8 * col0 AS col1 FROM tab0 AS cor0
----
-192
-280
-712

onlyif mysql # use DIV operator for integer division
query I rowsort label-5407
SELECT col1 DIV 64 AS col2 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5407
SELECT col1 / 64 AS col2 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + col2 * + ( 68 ) AS col1 FROM tab0
----
2244
5576
68

onlyif mysql # use DIV operator for integer division
query I rowsort label-5409
SELECT ALL + col2 DIV col2 AS col0 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-5409
SELECT ALL + col2 / col2 AS col0 FROM tab0
----
1
1
1

query I rowsort
SELECT DISTINCT - col1 * col1 AS col1 FROM tab1 cor0
----
-100
-169
-676

query I rowsort
SELECT + + ( col1 ) * col1 AS col2 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT DISTINCT + + col0 * col0 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT ALL 81 * col2 AS col1 FROM tab1 AS cor0
----
4374
4617
7776

query I rowsort
SELECT + col1 * col1 + tab0.col0 FROM tab0
----
7420
8370
9444

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5415
SELECT + + CAST( NULL AS SIGNED ) FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-5415
SELECT + + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT col1 + col0 * col2 AS col0 FROM tab2
----
2087
220
3019

query I rowsort
SELECT ALL - ( - col0 ) + col0 * col2 AS col2 FROM tab1 AS cor0
----
165
3712
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-5418
SELECT ALL - - col1 * + 77 - - col2 DIV + cor0.col1 FROM tab1 AS cor0
----
1008
2004
775

skipif mysql # not compatible
query I rowsort label-5418
SELECT ALL - - col1 * + 77 - - col2 / + cor0.col1 FROM tab1 AS cor0
----
1008
2004
775

query I rowsort
SELECT - 28 AS col1 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to eac00a95d734c7071360ed392c3f39bc

onlyif mysql # use DIV operator for integer division
query I rowsort label-5420
SELECT ALL - + col2 + - 54 * col1 DIV col1 FROM tab2 AS cor0
----
-80
-81
-92

skipif mysql # not compatible
query I rowsort label-5420
SELECT ALL - + col2 + - 54 * col1 / col1 FROM tab2 AS cor0
----
-80
-81
-92

query I rowsort
SELECT DISTINCT col0 + col1 * 74 FROM tab0 cor0
----
6388
6823
7213

query I rowsort
SELECT - col2 * + cor0.col2 + 2 FROM tab0 AS cor0
----
-1087
-6722
1

query I rowsort
SELECT 56 + - cor0.col1 * cor0.col0 * - 1 FROM tab1, tab1 AS cor0
----
9 values hashing to 8ac4fcc1968a658281b6824a6a2d075a

query I rowsort
SELECT ALL - col0 + ( + col1 ) * col0 AS col2 FROM tab2 AS cor0
----
1264
210
4524

onlyif mysql # use DIV operator for integer division
query I rowsort label-5425
SELECT ALL - cor0.col0 DIV + 3 AS col2 FROM tab0 AS cor0
----
-11
-29
-8

skipif mysql # not compatible
query I rowsort label-5425
SELECT ALL - cor0.col0 / + 3 AS col2 FROM tab0 AS cor0
----
-11
-29
-8

query I rowsort
SELECT ALL - 90 FROM tab0, tab1 AS cor0, tab0 AS cor1
----
27 values hashing to c0d96679aba507520916e8654e5a6618

onlyif mysql # use DIV operator for integer division
query I rowsort label-5427
SELECT ALL + cor0.col2 DIV + 73 + + 27 * col2 AS col2 FROM tab2 AS cor0
----
1026
702
729

skipif mysql # not compatible
query I rowsort label-5427
SELECT ALL + cor0.col2 / + 73 + + 27 * col2 AS col2 FROM tab2 AS cor0
----
1026
702
729

onlyif mysql # use DIV operator for integer division
query I rowsort label-5428
SELECT + col2 * - col2 * - cor0.col1 + cor0.col2 DIV - col0 AS col0 FROM tab1 AS cor0
----
119807
32490
75798

skipif mysql # not compatible
query I rowsort label-5428
SELECT + col2 * - col2 * - cor0.col1 + cor0.col2 / - col0 AS col0 FROM tab1 AS cor0
----
119807
32490
75798

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5429
SELECT - + col2 * - CAST( col0 AS SIGNED ) AS col2 FROM tab0 cor0
----
35
7298
792

skipif mysql # not compatible
query I rowsort label-5429
SELECT - + col2 * - CAST ( col0 AS INTEGER ) AS col2 FROM tab0 cor0
----
35
7298
792

query I rowsort
SELECT ALL - col1 * ( col2 + + col1 ) * + col0 FROM tab2 AS cor0
----
-12586
-391170
-73865

query I rowsort
SELECT DISTINCT - cor0.col1 + ( col0 ) FROM tab2 AS cor0
----
-24
19
62

query I rowsort
SELECT + + 96 AS col2 FROM tab2 AS cor0
----
96
96
96

query I rowsort
SELECT + 27 * cor0.col1 + + col1 * col1 AS col2 FROM tab2 AS cor0
----
1798
5074
748

query I rowsort
SELECT + ( col0 ) * + cor0.col1 FROM tab2 AS cor0
----
1343
217
4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-5435
SELECT + - col0 + + col1 DIV - 15 FROM tab2 AS cor0
----
-80
-81
-9

skipif mysql # not compatible
query I rowsort label-5435
SELECT + - col0 + + col1 / - 15 FROM tab2 AS cor0
----
-80
-81
-9

query I rowsort
SELECT + 57 + col0 * 16 FROM tab2 cor0
----
1305
1321
169

query IIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0 WHERE ( NULL ) <= ( NULL )
----

query I rowsort
SELECT + col0 * + col0 * - ( - cor0.col2 ) + col0 AS col2 FROM tab0 AS cor0
----
1260
19032
649611

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5439
SELECT - col0 * CAST( + 65 AS SIGNED ) FROM tab1 AS cor0
----
-195
-4160
-5200

skipif mysql # not compatible
query I rowsort label-5439
SELECT - col0 * CAST ( + 65 AS INTEGER ) FROM tab1 AS cor0
----
-195
-4160
-5200

query I rowsort
SELECT col0 * 40 FROM tab0 AS cor0
----
1400
3560
960

query I rowsort
SELECT + col1 * + 71 * 51 AS col1 FROM tab2 AS cor0
----
112251
213639
61557

query I rowsort
SELECT - col1 + + col1 * 67 FROM tab1 AS cor0
----
1716
660
858

query I rowsort
SELECT DISTINCT 84 * + col2 FROM tab2
----
2184
2268
3192

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5444
SELECT 12 * col2 * - CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5444
SELECT 12 * col2 * - CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT 26 * col1 + col0 FROM tab0
----
2260
2455
2557

query I rowsort
SELECT ALL col1 + col1 - + ( col0 * + cor0.col2 ) FROM tab0 cor0
----
-620
-7116
159

query I rowsort
SELECT DISTINCT ( tab0.col1 + + col1 ) FROM tab0
----
172
182
194

query I rowsort
SELECT + + col1 * col2 + ( + 19 + + cor0.col2 ) FROM tab1 AS cor0
----
1363
1477
646

query I rowsort
SELECT DISTINCT + col1 + col0 * ( cor0.col2 ) + col2 FROM tab0 AS cor0
----
133
7471
911

query I rowsort
SELECT + cor1.col1 * 88 FROM tab2 cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 954f91ff7152437761ac30591b71cbe4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + col2 col1 FROM tab2
----
-33
-4
21

query I rowsort
SELECT col2 + col2 * col1 AS col1 FROM tab0
----
2871
7544
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab0.col1 * col0 * col0 + col2 * - col1 col1 FROM tab0
----
118728
46698
713349

onlyif mysql # use DIV operator for integer division
query I rowsort label-5454
SELECT ALL - col2 DIV + col1 col1 FROM tab0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5454
SELECT ALL - col2 / + col1 col1 FROM tab0
----
0
0
0

query I rowsort
SELECT col2 + - col1 + col2 * + ( - col0 ) AS col0 FROM tab1 AS cor0
----
-134
-3601
-7597

query I rowsort
SELECT + col1 * - col2 * - 62 AS col0 FROM tab0 AS cor0
----
175956
462644
6014

query I rowsort
SELECT - 45 * - col2 AS col1 FROM tab0 AS cor0
----
1485
3690
45

query I rowsort
SELECT + 52 + col0 AS col0 FROM tab1
----
116
132
55

query I rowsort
SELECT + 82 + - cor0.col1 AS col2 FROM tab1, tab2, tab0 cor0
----
27 values hashing to 4e84f3458f4e25401209cc2d8c42483e

query I rowsort
SELECT + col2 * 68 AS col2 FROM tab2
----
1768
1836
2584

query I rowsort
SELECT DISTINCT - col0 * - 56 AS col1 FROM tab0
----
1344
1960
4984

query I rowsort
SELECT - col2 * 64 AS col0 FROM tab2
----
-1664
-1728
-2432

query I rowsort
SELECT + tab2.col1 + - col2 FROM tab2
----
-21
33
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-5464
SELECT DISTINCT + col0 - ( col2 ) * col1 DIV + col1 AS col1 FROM tab0
----
-9
34
7

skipif mysql # not compatible
query I rowsort label-5464
SELECT DISTINCT + col0 - ( col2 ) * col1 / + col1 AS col1 FROM tab0
----
-9
34
7

query I rowsort
SELECT - + col2 * ( cor0.col0 ) AS col2 FROM tab2 AS cor0
----
-189
-2028
-3002

query I rowsort
SELECT - - col2 + 54 * col1 FROM tab0 AS cor0
----
4677
4996
5239

query IIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 cor0 CROSS JOIN tab2 AS cor1
----
243 values hashing to ea21cea53be47edd19229592e3d26141

query I rowsort
SELECT DISTINCT ( - 69 ) FROM tab1 cor0
----
-69

query I rowsort
SELECT ALL + + col0 + 23 * col0 AS col2 FROM tab1 cor0
----
1536
1920
72

query I rowsort
SELECT cor0.col1 + 50 FROM tab2 cor0
----
109
67
81

query I rowsort
SELECT DISTINCT ( col2 ) * - col1 + - 13 FROM tab0 AS cor0
----
-110
-2851
-7475

query I rowsort
SELECT ALL + 83 + 70 AS col2 FROM tab2 AS cor0
----
153
153
153

query I rowsort
SELECT DISTINCT - 83 * - col2 FROM tab2 AS cor0
----
2158
2241
3154

query I rowsort
SELECT - ( col0 ) + - tab0.col1 + 34 * tab0.col0 * + col2 AS col0 FROM tab0
----
1058
247952
26818

onlyif mysql # use DIV operator for integer division
query I rowsort label-5475
SELECT ALL col0 + tab1.col1 DIV - col1 FROM tab1
----
2
63
79

skipif mysql # not compatible
query I rowsort label-5475
SELECT ALL col0 + tab1.col1 / - col1 FROM tab1
----
2
63
79

onlyif mysql # use DIV operator for integer division
query I rowsort label-5476
SELECT col0 * + 85 + col0 DIV col2 AS col0 FROM tab1 AS cor0
----
255
5441
6800

skipif mysql # not compatible
query I rowsort label-5476
SELECT col0 * + 85 + col0 / col2 AS col0 FROM tab1 AS cor0
----
255
5441
6800

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 82 * ( - cor2.col1 ) col0 FROM tab2, tab2 AS cor0, tab2 AS cor1, tab0 AS cor2
----
81 values hashing to 58f6772d51296b97666af17d199c96ce

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 + 5 col2 FROM tab0 AS cor0
----
-28
-77
4

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 63 + 25 * + col2 col1 FROM tab1 AS cor0
----
1413
1488
2463

query I rowsort
SELECT DISTINCT cor0.col1 * col1 * - col1 + + col0 FROM tab1 AS cor0
----
-17573
-2117
-936

onlyif mysql # use DIV operator for integer division
query I rowsort label-5481
SELECT - col1 DIV - 75 + col1 AS col0 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-5481
SELECT - col1 / - 75 + col1 AS col0 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT 97 * 65 + + col2 * col0 FROM tab0 AS cor0
----
13603
6340
7097

query I rowsort
SELECT DISTINCT - col2 + + col0 AS col1 FROM tab1 cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT + - col1 * + cor0.col2 + col1 AS col1 FROM tab0 cor0
----
-2752
-7371
0

query I rowsort
SELECT ALL - - cor0.col2 * - col2 AS col2 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT + col0 + + col1 * col2 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT - - col2 * col2 + - col0 * - 85 AS col0 FROM tab1 AS cor0
----
16016
3171
8689

query I rowsort
SELECT ALL - + 15 * col1 + 73 * - 45 FROM tab0 cor0
----
-4575
-4650
-4740

onlyif mysql # use DIV operator for integer division
query I rowsort label-5489
SELECT DISTINCT - col0 * - col0 + + 18 - col2 DIV col2 FROM tab1 AS cor0
----
26
4113
6417

skipif mysql # not compatible
query I rowsort label-5489
SELECT DISTINCT - col0 * - col0 + + 18 - col2 / col2 FROM tab1 AS cor0
----
26
4113
6417

query I rowsort
SELECT 88 + + col0 FROM tab2 AS cor0
----
166
167
95

query I rowsort
SELECT DISTINCT + 1 + col2 FROM tab2 AS cor0
----
27
28
39

query I rowsort
SELECT + - col0 * - col2 + 8 * - col2 * + col1 FROM tab1 AS cor0
----
-11070
-2304
-912

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * - col1 * col1 col0 FROM tab1
----
-13520
-2028
-6400

query I rowsort
SELECT col0 + - col2 * col0 AS col0 FROM tab2 AS cor0
----
-182
-1950
-2923

query I rowsort
SELECT DISTINCT + + 94 AS col1 FROM tab1 AS cor0
----
94

query I rowsort
SELECT - + 17 + col2 AS col0 FROM tab1 AS cor0
----
37
40
79

query I rowsort
SELECT ALL col2 + ( col0 * + col2 ) FROM tab2 AS cor0
----
2054
216
3040

query I rowsort
SELECT ALL - col0 * - col2 + - col0 * col1 AS col0 FROM tab1 AS cor0
----
3008
6640
84

query I rowsort
SELECT DISTINCT - + col1 * - ( - col2 ) * - col2 FROM tab1 AS cor0
----
119808
32490
75816

query I rowsort
SELECT DISTINCT + + col0 * + ( 17 ) FROM tab0 AS cor0
----
1513
408
595

onlyif mysql # use DIV operator for integer division
query I rowsort label-5501
SELECT + col0 + ( - col2 ) DIV - col1 AS col0 FROM tab2 AS cor0
----
7
78
81

skipif mysql # not compatible
query I rowsort label-5501
SELECT + col0 + ( - col2 ) / - col1 AS col0 FROM tab2 AS cor0
----
7
78
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-5502
SELECT DISTINCT + col0 + col0 DIV col2 FROM tab1 AS cor0
----
3
65
80

skipif mysql # not compatible
query I rowsort label-5502
SELECT DISTINCT + col0 + col0 / col2 FROM tab1 AS cor0
----
3
65
80

query I rowsort
SELECT DISTINCT + - col0 * + ( + col0 + col1 ) FROM tab1 cor0
----
-4736
-7440
-87

query I rowsort
SELECT - col0 * 26 AS col0 FROM tab0 AS cor0
----
-2314
-624
-910

query I rowsort
SELECT ALL 47 * + col1 AS col0 FROM tab1
----
1222
470
611

onlyif mysql # use DIV operator for integer division
query I rowsort label-5506
SELECT ALL - 60 DIV tab1.col2 FROM tab1
----
-1
-1
0

skipif mysql # not compatible
query I rowsort label-5506
SELECT ALL - 60 / tab1.col2 FROM tab1
----
-1
-1
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col1 col1 FROM tab2 cor0
----
1534
646
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col0 * 39 col1 FROM tab0 AS cor0
----
1365
3471
936

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + - col1 + 84 * + col0 col2 FROM tab2 cor0
----
557
6493
6619

onlyif mysql # use DIV operator for integer division
query I rowsort label-5510
SELECT DISTINCT + col1 DIV 24 FROM tab1 cor0
----
0
1

skipif mysql # not compatible
query I rowsort label-5510
SELECT DISTINCT + col1 / 24 FROM tab1 cor0
----
0
1

query I rowsort
SELECT col1 + + cor0.col2 * - col1 AS col2 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT 56 * - tab0.col1 AS col1 FROM tab0, tab0 cor0
----
9 values hashing to 6b6d17dff1ae7902886628df5ec4a270

onlyif mysql # use DIV operator for integer division
query I rowsort label-5513
SELECT 46 + - 67 DIV + cor0.col2 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to c4209542f63158fd8a12e079250c798c

skipif mysql # not compatible
query I rowsort label-5513
SELECT 46 + - 67 / + cor0.col2 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to c4209542f63158fd8a12e079250c798c

query I rowsort
SELECT + + cor0.col0 * col1 - + col2 AS col0 FROM tab0 AS cor0
----
2031
3394
8017

query I rowsort
SELECT - cor0.col1 + - 87 + - cor0.col2 * cor0.col0 * col2 AS col0 FROM tab1 AS cor0
----
-208033
-737380
-8861

query I rowsort
SELECT DISTINCT + + 69 + + col0 * cor0.col0 FROM tab1 AS cor0
----
4165
6469
78

query I rowsort
SELECT col1 + col0 + + col0 AS col1 FROM tab1
----
138
173
32

query I rowsort
SELECT - 25 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 2e7a33467ee3a4d9570560d60302b35a

query I rowsort
SELECT DISTINCT cor0.col2 + - cor0.col0 AS col1 FROM tab0, tab1 AS cor0
----
-7
16
51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 63 col1 FROM tab2 cor0
----
63

query I rowsort
SELECT DISTINCT 98 FROM tab0, tab2 cor0, tab1 AS cor1
----
98

query I rowsort
SELECT cor1.col2 FROM tab1, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT col0 * + ( 25 ) + col0 FROM tab2 cor0
----
182
2028
2054

query I rowsort
SELECT - - col2 + + 78 AS col1 FROM tab0 AS cor0
----
111
160
79

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5525
SELECT + - col0 * - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5525
SELECT + - col0 * - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 + + ( + col2 ) FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT + - col1 + - 94 * cor0.col2 AS col0 FROM tab2 AS cor0
----
-2503
-2569
-3589

query I rowsort
SELECT - col1 * col1 * col2 + col2 - ( - col1 + - col0 ) FROM tab0 AS cor0
----
-243925
-678780
-9276

query I rowsort
SELECT ALL col1 + + 51 * - col0 AS col0 FROM tab0 AS cor0
----
-1138
-1688
-4448

onlyif mysql # use DIV operator for integer division
query I rowsort label-5530
SELECT ( col0 ) + col0 DIV + col2 FROM tab1 AS cor0
----
3
65
80

skipif mysql # not compatible
query I rowsort label-5530
SELECT ( col0 ) + col0 / + col2 FROM tab1 AS cor0
----
3
65
80

query I rowsort
SELECT - 87 + col2 + + col1 * ( + col1 ) * + col2 AS col1 FROM tab0 AS cor0
----
244014
679037
9323

query I rowsort
SELECT - - col1 + - cor0.col1 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT 76 + + col2 * - cor0.col0 AS col0 FROM tab0 AS cor0
----
-716
-7222
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 24 * 75 col1 FROM tab2 cor0
----
1800

query I rowsort
SELECT 19 * + col2 FROM tab0 AS cor0
----
1558
19
627

onlyif mysql # use DIV operator for integer division
query I rowsort label-5536
SELECT DISTINCT - col2 DIV + 60 AS col1 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-5536
SELECT DISTINCT - col2 / + 60 AS col1 FROM tab2 AS cor0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 + cor0.col2 col1 FROM tab1 AS cor0
----
28
47
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + + col2 col1 FROM tab1
----
-7
16
51

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5539
SELECT DISTINCT CAST( NULL AS DECIMAL ) / tab1.col0 FROM tab1, tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5539
SELECT DISTINCT CAST ( NULL AS REAL ) / tab1.col0 FROM tab1, tab2 AS cor0
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5540
SELECT ALL col0 + 95 DIV ( tab2.col1 ) col2 FROM tab2
----
10
79
84

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5540
SELECT ALL col0 + 95 / ( tab2.col1 ) col2 FROM tab2
----
10
79
84

onlyif mysql # use DIV operator for integer division
query I rowsort label-5541
SELECT + 81 + + ( + col2 ) DIV - col0 AS col2 FROM tab1 AS cor0
----
63
80
81

skipif mysql # not compatible
query I rowsort label-5541
SELECT + 81 + + ( + col2 ) / - col0 AS col2 FROM tab1 AS cor0
----
63
80
81

query I rowsort
SELECT + + ( - col2 ) FROM tab2 AS cor0
----
-26
-27
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - col1 * - col2 + + col2 col0 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT + col1 + - col2 * col1 AS col2 FROM tab2 AS cor0
----
-1475
-629
-806

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - ( col1 + tab1.col0 ) * + 77 col0 FROM tab1
----
-2233
-5698
-7161

query I rowsort
SELECT + col0 * col1 + col1 * col1 FROM tab1 cor0
----
1209
740
754

onlyif mysql # use DIV operator for integer division
query I rowsort label-5547
SELECT cor0.col1 DIV - col0 AS col2 FROM tab1 cor0
----
-8
0
0

skipif mysql # not compatible
query I rowsort label-5547
SELECT cor0.col1 / - col0 AS col2 FROM tab1 cor0
----
-8
0
0

query I rowsort
SELECT - 37 * - cor0.col2 AS col0 FROM tab0 AS cor0
----
1221
3034
37

onlyif mysql # use DIV operator for integer division
query I rowsort label-5549
SELECT - + col0 DIV col0 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5549
SELECT - + col0 / col0 FROM tab1 AS cor0
----
-1
-1
-1

onlyif mysql # use DIV operator for integer division
query I rowsort label-5550
SELECT 55 DIV col1 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5550
SELECT 55 / col1 FROM tab0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5551
SELECT + CAST( col0 + + col2 * + 59 AS SIGNED ) FROM tab0
----
1971
4927
94

skipif mysql # not compatible
query I rowsort label-5551
SELECT + CAST ( col0 + + col2 * + 59 AS INTEGER ) FROM tab0
----
1971
4927
94

query I rowsort
SELECT ALL ( + col0 ) * col1 AS col0 FROM tab2
----
1343
217
4602

query I rowsort
SELECT 65 + col2 AS col1 FROM tab1
----
119
122
161

query I rowsort
SELECT DISTINCT tab2.col0 * - 35 AS col2 FROM tab2
----
-245
-2730
-2765

query I rowsort
SELECT ALL + col1 * col2 * col2 FROM tab2
----
22599
24548
39884

query I rowsort
SELECT ALL - 32 AS col0 FROM tab1
----
-32
-32
-32

query I rowsort
SELECT ALL - 42 FROM tab2
----
-42
-42
-42

query I rowsort
SELECT + 96 + col1 FROM tab1 AS cor0
----
106
109
122

query I rowsort
SELECT + col1 + + col1 * - 42 * + col1 AS col0 FROM tab2 AS cor0
----
-12121
-146143
-40331

query I rowsort
SELECT DISTINCT col0 + col0 * + col1 FROM tab2
----
1422
224
4680

onlyif mysql # use DIV operator for integer division
query I rowsort label-5561
SELECT + col2 + col1 DIV cor0.col0 FROM tab2 AS cor0
----
26
31
38

skipif mysql # not compatible
query I rowsort label-5561
SELECT + col2 + col1 / cor0.col0 FROM tab2 AS cor0
----
26
31
38

query I rowsort
SELECT DISTINCT 79 FROM tab1, tab0 AS cor0
----
79

query I rowsort
SELECT DISTINCT col1 * + 36 AS col0 FROM tab2
----
1116
2124
612

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5564
SELECT ALL + col1 * CAST( NULL AS SIGNED ) * col2 + col1 AS col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5564
SELECT ALL + col1 * CAST ( NULL AS INTEGER ) * col2 + col1 AS col1 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5565
SELECT tab0.col0 DIV - col2 AS col0 FROM tab0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-5565
SELECT tab0.col0 / - col2 AS col0 FROM tab0
----
-1
-35
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5566
SELECT DISTINCT - + col0 + CAST( 1 AS SIGNED ) + col2 FROM tab0 cor0
----
-33
-6
10

skipif mysql # not compatible
query I rowsort label-5566
SELECT DISTINCT - + col0 + CAST ( 1 AS INTEGER ) + col2 FROM tab0 cor0
----
-33
-6
10

query I rowsort
SELECT + ( - col0 ) * col1 AS col0 FROM tab1
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-5568
SELECT DISTINCT 49 DIV 88 - - col0 * ( tab2.col1 ) FROM tab2
----
1343
217
4602

skipif mysql # not compatible
query I rowsort label-5568
SELECT DISTINCT 49 / 88 - - col0 * ( tab2.col1 ) FROM tab2
----
1343
217
4602

query I rowsort
SELECT ALL ( 55 ) - + col1 AS col2 FROM tab0
----
-31
-36
-42

query I rowsort
SELECT DISTINCT + 41 - + col1 AS col2 FROM tab0
----
-45
-50
-56

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5571
SELECT - CAST( + col1 AS SIGNED ) * + col1 + CAST( - ( col0 ) AS SIGNED ) - 52 FROM tab2 AS cor0
----
-1020
-3611
-420

skipif mysql # not compatible
query I rowsort label-5571
SELECT - CAST ( + col1 AS INTEGER ) * + col1 + CAST ( - ( col0 ) AS INTEGER ) - 52 FROM tab2 AS cor0
----
-1020
-3611
-420

query I rowsort
SELECT - col2 + ( col0 ) FROM tab0 AS cor0
----
-9
34
7

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + ( col2 ) + + col2 col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT + - 11 * col1 * col2 + - col1 AS col1 FROM tab1 AS cor0
----
-13741
-15470
-6280

query I rowsort
SELECT - col2 * - col1 + col1 + + cor0.col1 FROM tab2 AS cor0
----
1652
680
899

query I rowsort
SELECT - - col0 + 22 AS col1 FROM tab2 AS cor0
----
100
101
29

query I rowsort
SELECT DISTINCT + + cor0.col2 + 98 * + col2 FROM tab2 AS cor0
----
2574
2673
3762

query I rowsort
SELECT DISTINCT - col0 + ( - col2 ) AS col2 FROM tab1 cor0
----
-121
-176
-57

query I rowsort
SELECT DISTINCT + col1 + ( + col2 ) * - col0 AS col0 FROM tab2 AS cor0
----
-158
-1969
-2985

query I rowsort
SELECT ALL + col1 + col0 * - 65 * col2 - + 64 AS col0 FROM tab2 AS cor0
----
-12318
-131825
-195177

onlyif mysql # use DIV operator for integer division
query I rowsort label-5581
SELECT - - col0 * + cor0.col0 - ( col0 ) DIV 56 AS col2 FROM tab2 AS cor0
----
49
6083
6240

skipif mysql # not compatible
query I rowsort label-5581
SELECT - - col0 * + cor0.col0 - ( col0 ) / 56 AS col2 FROM tab2 AS cor0
----
49
6083
6240

query I rowsort
SELECT DISTINCT - + col2 * col1 + col1 AS col0 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT - - col1 * + col1 * - col1 AS col0 FROM tab2 AS cor0
----
-205379
-29791
-4913

query I rowsort
SELECT ALL + - cor0.col1 * cor0.col2 AS col2 FROM tab2 cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL - + cor0.col1 + 34 * - col2 AS col1 FROM tab1 AS cor0
----
-1862
-1948
-3277

query I rowsort
SELECT DISTINCT - - col1 * col1 + + 37 * col1 FROM tab0 cor0
----
10578
11648
12998

query I rowsort
SELECT - 46 FROM tab2, tab0 AS cor0
----
9 values hashing to 491ad1fb79fec0b5715ea54949d1aa2d

query I rowsort
SELECT - + col2 * col2 * col2 FROM tab0 AS cor0
----
-1
-35937
-551368

query I rowsort
SELECT cor1.col1 FROM tab0, tab0 AS cor0, tab0 cor1
----
27 values hashing to 2d6d3031dfe90e0c02db13aa63993bfd

query I rowsort
SELECT ALL - + 75 + - col2 AS col0 FROM tab0 cor0
----
-108
-157
-76

query I rowsort
SELECT DISTINCT + 2 * cor0.col2 - + col2 AS col0 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT + + col1 + 24 FROM tab1 AS cor0
----
34
37
50

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5593
SELECT DISTINCT tab1.col1 + - CAST( col0 AS SIGNED ) FROM tab1
----
-54
-67
23

skipif mysql # not compatible
query I rowsort label-5593
SELECT DISTINCT tab1.col1 + - CAST ( col0 AS INTEGER ) FROM tab1
----
-54
-67
23

query I rowsort
SELECT DISTINCT tab0.col2 + col2 * col0 FROM tab0
----
36
7380
825

query I rowsort
SELECT DISTINCT col1 + 29 AS col1 FROM tab1
----
39
42
55

onlyif mysql # use DIV operator for integer division
query I rowsort label-5596
SELECT - - 57 + cor0.col0 DIV cor0.col2 col1 FROM tab1 cor0
----
57
57
58

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5596
SELECT - - 57 + cor0.col0 / cor0.col2 col1 FROM tab1 cor0
----
57
57
58

query I rowsort
SELECT ALL - + col0 + col0 AS col2 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5598
SELECT CAST( NULL AS SIGNED ) AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

skipif mysql # not compatible
query I rowsort label-5598
SELECT CAST ( NULL AS INTEGER ) AS col0 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 16be8868a1e6f4e8850509f9327afe90

query I rowsort
SELECT - 33 FROM tab2
----
-33
-33
-33

query I rowsort
SELECT - tab1.col1 * tab1.col1 + 11 + tab1.col0 FROM tab1
----
-25
-662
-78

query I rowsort
SELECT + col0 * col2 * 22 AS col0 FROM tab2
----
4158
44616
66044

query I rowsort
SELECT 9 * col1 * - tab1.col0 AS col2 FROM tab1
----
-5760
-702
-9360

query I rowsort
SELECT - tab0.col2 FROM tab0, tab2 cor0
----
9 values hashing to b5a4102107e5ebd26e341538f4fede1e

query I rowsort
SELECT DISTINCT ( col0 * - 85 ) + col0 - col2 FROM tab0
----
-2049
-2941
-7558

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 + col2 col2 FROM tab0
----
171
36
57

query I rowsort
SELECT DISTINCT - col1 - - col1 AS col2 FROM tab0
----
0

query I rowsort
SELECT - 77 * + cor0.col1 FROM tab2 AS cor0
----
-1309
-2387
-4543

query I rowsort
SELECT - tab0.col1 + + col2 FROM tab0
----
-53
-9
-96

query I rowsort
SELECT ALL + col2 - col1 * + col1 AS col0 FROM tab2
----
-251
-3455
-934

query I rowsort
SELECT 12 FROM tab1, tab0, tab2 AS cor0
----
27 values hashing to 702478c53caf2f7ebb9fff96d800f5a6

onlyif mysql # use DIV operator for integer division
query I rowsort label-5611
SELECT ALL - 64 DIV + tab0.col0 AS col1 FROM tab0
----
-1
-2
0

skipif mysql # not compatible
query I rowsort label-5611
SELECT ALL - 64 / + tab0.col0 AS col1 FROM tab0
----
-1
-2
0

query I rowsort
SELECT ALL - - cor0.col1 AS col2 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col2 * - cor0.col1 col1 FROM tab2, tab1 AS cor0
----
9 values hashing to e4fd9d16116443b7eee5ff68e1d13137

skipif mysql # not compatible
query I rowsort
SELECT ALL - col2 + + CAST ( 54 AS REAL ) FROM tab0
----
-28
21
53

onlyif mysql # use DIV operator for integer division
query I rowsort label-5615
SELECT ALL - col2 * - col0 + tab1.col2 + + col1 DIV 95 AS col2 FROM tab1
----
216
3705
7776

skipif mysql # not compatible
query I rowsort label-5615
SELECT ALL - col2 * - col0 + tab1.col2 + + col1 / 95 AS col2 FROM tab1
----
216
3705
7776

query I rowsort
SELECT ALL - tab1.col1 * 57 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to b3c8b5d59b492d1f7afa6ee176eab00d

query I rowsort
SELECT - col0 + + 75 FROM tab1 AS cor0
----
-5
11
72

query I rowsort
SELECT DISTINCT col2 * - ( col1 * + col1 ) FROM tab1 cor0
----
-16224
-36504
-5700

query I rowsort
SELECT col1 * - col1 + - 12 + col1 FROM tab1 AS cor0
----
-102
-168
-662

query I rowsort
SELECT DISTINCT cor0.col0 * cor0.col1 AS col0 FROM tab2 AS cor0
----
1343
217
4602

query I rowsort
SELECT + + col2 + ( - col2 ) * cor0.col0 AS col1 FROM tab1 AS cor0
----
-108
-3591
-7584

query I rowsort
SELECT col2 + 76 * - col0 FROM tab2 AS cor0
----
-505
-5902
-5966

query I rowsort
SELECT - 50 * col1 AS col1 FROM tab0
----
-4300
-4550
-4850

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5624
SELECT CAST( - col0 AS SIGNED ) * + col0 + CAST( NULL AS SIGNED ) FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5624
SELECT CAST ( - col0 AS INTEGER ) * + col0 + CAST ( NULL AS INTEGER ) FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - ( - col2 ) AS col2 FROM tab2
----
26
27
38

query I rowsort
SELECT ALL ( ( + col2 ) ) FROM tab0
----
1
33
82

query I rowsort
SELECT - - col2 * - col0 * col2 + - ( + col1 ) AS col1 FROM tab0 AS cor0
----
-132
-26222
-598527

query I rowsort
SELECT ALL + col0 * + 69 + - col1 * cor0.col2 AS col2 FROM tab0 cor0
----
-1182
-1321
2318

query I rowsort
SELECT ALL + + col0 * + cor0.col1 + - col2 AS col2 FROM tab2 AS cor0
----
1305
190
4576

query I rowsort
SELECT DISTINCT - col1 * - ( - col1 ) AS col2 FROM tab2
----
-289
-3481
-961

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 0 * col1 col1 FROM tab1
----
0
0
0

query I rowsort
SELECT DISTINCT + col1 + + 94 AS col0 FROM tab2 AS cor0
----
111
125
153

query I rowsort
SELECT ALL cor0.col0 * - col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT DISTINCT + col1 + - col1 AS col1 FROM tab0 cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5635
SELECT DISTINCT - 77 DIV + col2 + - 69 + col1 FROM tab1 AS cor0
----
-44
-56
-60

skipif mysql # not compatible
query I rowsort label-5635
SELECT DISTINCT - 77 / + col2 + - 69 + col1 FROM tab1 AS cor0
----
-44
-56
-60

query I rowsort
SELECT ALL - 42 * - col1 * + ( + 17 ) FROM tab1 AS cor0
----
18564
7140
9282

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 77 col1 FROM tab0 AS cor0
----
77
77
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 64 * + col0 - 18 col1 FROM tab2 AS cor0
----
430
4974
5038

query I rowsort
SELECT - 96 + col2 AS col1 FROM tab2 AS cor0
----
-58
-69
-70

query I rowsort
SELECT DISTINCT col2 * - col1 + - 85 * + col1 FROM tab0 AS cor0
----
-10148
-15197
-8342

query I rowsort
SELECT DISTINCT + - ( - col1 ) + ( + col1 ) FROM tab0 AS cor0
----
172
182
194

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 51 col1 FROM tab0 cor0
----
-51

query I rowsort
SELECT ALL + - col2 + col1 AS col1 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT - + cor0.col0 + col1 FROM tab1 AS cor0
----
-54
-67
23

query I rowsort
SELECT ALL col0 * col0 + + col0 AS col1 FROM tab2 cor0
----
56
6162
6320

query I rowsort
SELECT ALL - + col2 - - cor0.col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT DISTINCT + 2 * - col1 AS col0 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT 69 * + cor0.col0 FROM tab1 AS cor0
----
207
4416
5520

query I rowsort
SELECT ALL cor0.col2 * + col2 - + col2 * 15 FROM tab1 AS cor0
----
2106
2394
7776

onlyif mysql # use DIV operator for integer division
query I rowsort label-5650
SELECT DISTINCT + col1 + + col1 DIV - cor0.col1 col0 FROM tab0 cor0
----
85
90
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5650
SELECT DISTINCT + col1 + + col1 / - cor0.col1 col0 FROM tab0 cor0
----
85
90
96

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT - 59 + col1 * CAST ( - col1 + - col2 AS REAL ) * col0 FROM tab0 AS cor0
----
-1401186
-245675
-332769

query I rowsort
SELECT - col2 + tab0.col2 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL col2 * - col1 + - col2 * - col1 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT - col1 + col1 * + col1 * col2 FROM tab0 AS cor0
----
243982
678951
9312

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * tab2.col1 col2 FROM tab2
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-5656
SELECT ALL + - col0 + - col2 * col2 DIV + col1 - - col2 FROM tab0 cor0
----
-3
-34
-80

skipif mysql # not compatible
query I rowsort label-5656
SELECT ALL + - col0 + - col2 * col2 / + col1 - - col2 FROM tab0 cor0
----
-3
-34
-80

query I rowsort
SELECT DISTINCT + col2 * col0 + col0 * col1 FROM tab1 AS cor0
----
240
4288
8720

query I rowsort
SELECT - col2 + - col2 * + col1 FROM tab2 cor0
----
-1560
-684
-864

query I rowsort
SELECT col1 * col2 + + col2 FROM tab0 AS cor0
----
2871
7544
98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col0 * col0 + cor0.col1 + - cor0.col1 col1 FROM tab2 AS cor0
----
49
6084
6241

query I rowsort
SELECT ALL + + 74 + - col1 FROM tab0 AS cor0
----
-12
-17
-23

query I rowsort
SELECT + col0 * col2 + col1 * col1 + cor0.col0 FROM tab0 AS cor0
----
15668
8212
9479

query I rowsort
SELECT ALL + 70 + cor0.col0 FROM tab2 AS cor0
----
148
149
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col2 col0 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT - - 88 * col1 AS col2 FROM tab2 AS cor0
----
1496
2728
5192

query I rowsort
SELECT + col1 - cor0.col1 * cor0.col2 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT - col1 + col1 * col0 * col0 AS col0 FROM tab2 AS cor0
----
106080
1488
358897

query I rowsort
SELECT ALL - col2 * col0 - col2 * - col1 * col2 FROM tab2 AS cor0
----
21546
22410
37856

onlyif mysql # use DIV operator for integer division
query I rowsort label-5669
SELECT + col0 DIV + cor0.col0 + + col2 AS col1 FROM tab2 AS cor0
----
27
28
39

skipif mysql # not compatible
query I rowsort label-5669
SELECT + col0 / + cor0.col0 + + col2 AS col1 FROM tab2 AS cor0
----
27
28
39

query I rowsort
SELECT - cor0.col2 * col0 + - col1 FROM tab2 AS cor0
----
-2087
-220
-3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-5671
SELECT - col0 * col0 + + tab0.col1 DIV col2 col1 FROM tab0
----
-1128
-574
-7920

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5671
SELECT - col0 * col0 + + tab0.col1 / col2 col1 FROM tab0
----
-1128
-574
-7920

query I rowsort
SELECT ALL col1 + tab2.col0 * - tab2.col2 AS col2 FROM tab2
----
-158
-1969
-2985

query I rowsort
SELECT DISTINCT - col0 + + col0 * col1 * + col0 FROM tab0
----
118790
49512
720722

query I rowsort
SELECT col0 - - col1 AS col0 FROM tab1
----
29
74
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-5675
SELECT DISTINCT col1 * col0 DIV col0 FROM tab2
----
17
31
59

skipif mysql # not compatible
query I rowsort label-5675
SELECT DISTINCT col1 * col0 / col0 FROM tab2
----
17
31
59

query I rowsort
SELECT DISTINCT + tab1.col0 + + col0 - col1 * - col2 AS col2 FROM tab1
----
1408
1410
698

query I rowsort
SELECT col2 * tab1.col0 * + col1 AS col2 FROM tab1
----
36480
4212
99840

query I rowsort
SELECT ALL col0 AS col0 FROM tab2 WHERE NOT NULL NOT IN ( col2 )
----

query I rowsort
SELECT ALL col0 * col2 + col2 * col0 - - col0 * + col0 FROM tab1
----
11392
21760
333

onlyif mysql # use DIV operator for integer division
query I rowsort label-5680
SELECT ALL tab0.col0 DIV col1 AS col2 FROM tab0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5680
SELECT ALL tab0.col0 / col1 AS col2 FROM tab0
----
0
0
0

query I rowsort
SELECT ALL + col1 + + col2 + + col0 FROM tab1
----
131
189
83

onlyif mysql # use DIV operator for integer division
query I rowsort label-5682
SELECT DISTINCT - tab0.col2 DIV - col1 FROM tab0
----
0

skipif mysql # not compatible
query I rowsort label-5682
SELECT DISTINCT - tab0.col2 / - col1 FROM tab0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5683
SELECT ALL tab2.col0 * tab2.col2 DIV col0 FROM tab2
----
26
27
38

skipif mysql # not compatible
query I rowsort label-5683
SELECT ALL tab2.col0 * tab2.col2 / col0 FROM tab2
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * + col2 col0 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT DISTINCT + col2 * col1 AS col1 FROM tab1 WHERE NULL < ( col0 * - col0 )
----

query I rowsort
SELECT col0 + col0 * col1 AS col2 FROM tab0 WHERE NOT col2 + - col2 NOT BETWEEN - col1 AND NULL
----

query I rowsort
SELECT DISTINCT - tab2.col1 + + tab2.col0 * col2 * - col1 + + tab2.col2 FROM tab2
----
-119685
-51013
-5863

query I rowsort
SELECT DISTINCT tab2.col1 AS col1 FROM tab2 WHERE NOT NULL >= ( NULL )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5689
SELECT ALL - col0 + col1 DIV + col0 AS col2 FROM tab1
----
-64
-80
5

skipif mysql # not compatible
query I rowsort label-5689
SELECT ALL - col0 + col1 / + col0 AS col2 FROM tab1
----
-64
-80
5

query III rowsort
SELECT * FROM tab0 WHERE NULL IN ( col0 )
----

query III rowsort
SELECT * FROM tab2 WHERE NOT NULL NOT BETWEEN col0 + col0 AND + col0 * tab2.col1 * col0
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-5692
SELECT col1 - - tab0.col2 DIV col2 FROM tab0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-5692
SELECT col1 - - tab0.col2 / col2 FROM tab0
----
87
92
98

onlyif mysql # use DIV operator for integer division
query I rowsort label-5693
SELECT DISTINCT col1 DIV + col0 + tab2.col1 * - col2 FROM tab2
----
-1534
-646
-833

skipif mysql # not compatible
query I rowsort label-5693
SELECT DISTINCT col1 / + col0 + tab2.col1 * - col2 FROM tab2
----
-1534
-646
-833

onlyif mysql # use DIV operator for integer division
query I rowsort label-5694
SELECT ALL col2 DIV + col2 + col0 AS col1 FROM tab1
----
4
65
81

skipif mysql # not compatible
query I rowsort label-5694
SELECT ALL col2 / + col2 + col0 AS col1 FROM tab1
----
4
65
81

onlyif mysql # use DIV operator for integer division
query I rowsort label-5695
SELECT DISTINCT + cor0.col1 DIV col1 FROM tab1 cor0
----
1

skipif mysql # not compatible
query I rowsort label-5695
SELECT DISTINCT + cor0.col1 / col1 FROM tab1 cor0
----
1

query I rowsort
SELECT - 50 + - col2 FROM tab2 cor0
----
-76
-77
-88

query I rowsort
SELECT + col0 * col2 * - col2 + col2 AS col2 FROM tab2 cor0
----
-114038
-5076
-52702

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 * + col2 + - col1 * col1 col0 FROM tab2
----
-1150
-3291
-5509

query I rowsort
SELECT DISTINCT + - 70 * col0 AS col1 FROM tab1 AS cor0
----
-210
-4480
-5600

onlyif mysql # use DIV operator for integer division
query I rowsort label-5700
SELECT DISTINCT col1 DIV - col0 AS col2 FROM tab0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-5700
SELECT DISTINCT col1 / - col0 AS col2 FROM tab0
----
-1
-2
-3

onlyif mysql # use DIV operator for integer division
query I rowsort label-5701
SELECT DISTINCT - col2 DIV - col1 FROM tab2
----
0
2

skipif mysql # not compatible
query I rowsort label-5701
SELECT DISTINCT - col2 / - col1 FROM tab2
----
0
2

query I rowsort
SELECT ALL col1 + col0 * - tab1.col1 FROM tab1
----
-1027
-52
-630

onlyif mysql # use DIV operator for integer division
query I rowsort label-5703
SELECT ALL col2 DIV col0 AS col1 FROM tab0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5703
SELECT ALL col2 / col0 AS col1 FROM tab0
----
0
0
1

query I rowsort
SELECT DISTINCT - col0 + col1 + + col0 AS col0 FROM tab1
----
10
13
26

query I rowsort
SELECT ALL - col0 - col0 * + col1 AS col2 FROM tab2 WHERE NOT NULL <> col1 * col2
----

query I rowsort
SELECT col1 FROM tab0 WHERE NOT - col1 * + col2 = ( + col0 )
----
86
91
97

query I rowsort
SELECT ALL col2 FROM tab2 AS cor0 WHERE NULL > NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 col1 FROM tab1 AS cor0 WHERE col1 < col1 - col0 * col1
----

query I rowsort
SELECT col2 FROM tab1 WHERE NULL BETWEEN ( NULL ) AND ( + col2 )
----

query I rowsort
SELECT ALL col1 * + col1 AS col1 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT + col0 - col2 AS col1 FROM tab0
----
-9
34
7

query I rowsort
SELECT ALL - col2 AS col0 FROM tab1 WHERE NULL < NULL
----

query III rowsort
SELECT ALL * FROM tab2 WHERE NOT - col0 IN ( + col1 )
----
9 values hashing to ad05b5942400d5e7a21b323b3da65a45

query I rowsort
SELECT - col1 * + cor0.col1 * + col0 AS col2 FROM tab1 AS cor0
----
-13520
-2028
-6400

query I rowsort
SELECT col2 FROM tab0 WHERE ( NULL ) < + col1 + + col1 * + tab0.col0
----

query III rowsort
SELECT ALL * FROM tab2 AS cor0 WHERE - col1 - cor0.col0 > NULL
----

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL >= NULL
----

query I rowsort
SELECT + cor0.col0 FROM tab0 cor0 CROSS JOIN tab2 cor1
----
9 values hashing to 8b49799942a9e353a3d279cf64ef3f63

onlyif mysql # use DIV operator for integer division
query I rowsort label-5719
SELECT ALL - 50 DIV - 26 - + col0 FROM tab1
----
-2
-63
-79

skipif mysql # not compatible
query I rowsort label-5719
SELECT ALL - 50 / - 26 - + col0 FROM tab1
----
-2
-63
-79

query I rowsort
SELECT - ( col1 ) * - col1 AS col1 FROM tab2 AS cor0
----
289
3481
961

query I rowsort
SELECT DISTINCT + + col0 - cor0.col2 AS col2 FROM tab2 AS cor0
----
-20
41
52

query I rowsort
SELECT ALL + col0 * col1 + - col1 AS col2 FROM tab2 AS cor0
----
1326
186
4543

onlyif mysql # use DIV operator for integer division
query I rowsort label-5723
SELECT DISTINCT ( 15 ) DIV col0 + 33 FROM tab2 AS cor0
----
33
35

skipif mysql # not compatible
query I rowsort label-5723
SELECT DISTINCT ( 15 ) / col0 + 33 FROM tab2 AS cor0
----
33
35

query I rowsort
SELECT ALL + - col1 * + col1 * - col0 + col1 AS col2 FROM tab0 AS cor0
----
177590
329412
737100

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col2 - col1 col2 FROM tab2 AS cor0
----
-55
-58
-85

onlyif mysql # use DIV operator for integer division
query I rowsort label-5726
SELECT + + ( - col1 ) + 65 DIV col0 FROM tab0 AS cor0
----
-84
-91
-96

skipif mysql # not compatible
query I rowsort label-5726
SELECT + + ( - col1 ) + 65 / col0 FROM tab0 AS cor0
----
-84
-91
-96

query I rowsort
SELECT DISTINCT - 56 * col1 + + col1 + col0 FROM tab1 AS cor0
----
-1427
-486
-635

query I rowsort
SELECT ALL 32 * - 24 AS col2 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 8d7578db89ce5c2ce4a79d7f85e4fe09

onlyif mysql # use DIV operator for integer division
query I rowsort label-5729
SELECT ALL - + col1 DIV col2 + + ( + 10 * col2 ) AS col2 FROM tab0 AS cor0
----
-87
328
819

skipif mysql # not compatible
query I rowsort label-5729
SELECT ALL - + col1 / col2 + + ( + 10 * col2 ) AS col2 FROM tab0 AS cor0
----
-87
328
819

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0, tab0 AS cor1, tab1, tab2 cor2
----
3645 values hashing to df00d19f178a708f636b036dcb6c6f87

query I rowsort
SELECT + col2 * - col1 + - 61 * + col0 FROM tab2 AS cor0
----
-1264
-5465
-6292

query I rowsort
SELECT DISTINCT cor0.col2 + + col0 AS col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT col2 * - cor0.col1 + + 69 * - col0 AS col0 FROM tab0 AS cor0
----
-13603
-2512
-4494

query I rowsort
SELECT ALL + col0 * col1 + - 53 * 38 FROM tab2 AS cor0
----
-1797
-671
2588

query I rowsort
SELECT DISTINCT - + 41 FROM tab0 AS cor0
----
-41

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5736
SELECT ALL - 61 * + col0 + CAST( - col0 AS SIGNED ) FROM tab0 AS cor0
----
-1488
-2170
-5518

skipif mysql # not compatible
query I rowsort label-5736
SELECT ALL - 61 * + col0 + CAST ( - col0 AS INTEGER ) FROM tab0 AS cor0
----
-1488
-2170
-5518

query I rowsort
SELECT DISTINCT - col1 * - tab1.col2 AS col1 FROM tab1
----
1248
1404
570

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + 33 col2 FROM tab2 AS cor0
----
1254
858
891

query I rowsort
SELECT ALL - col1 * + ( col1 ) AS col0 FROM tab2 AS cor0
----
-289
-3481
-961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5740
SELECT - col1 * CAST( col0 AS SIGNED ) AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

skipif mysql # not compatible
query I rowsort label-5740
SELECT - col1 * CAST ( col0 AS INTEGER ) AS col0 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT DISTINCT - col0 + + col0 * - 38 AS col1 FROM tab0 AS cor0
----
-1365
-3471
-936

skipif mysql # not compatible
query I rowsort
SELECT ALL - CAST ( - col2 AS REAL ) * + col1 AS col1 FROM tab2 AS cor0
----
1534
646
837

onlyif mysql # use DIV operator for integer division
query I rowsort label-5743
SELECT ALL col1 DIV - 42 FROM tab2 AS cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-5743
SELECT ALL col1 / - 42 FROM tab2 AS cor0
----
-1
0
0

query I rowsort
SELECT ALL - + cor0.col1 FROM tab1, tab2, tab0 AS cor0
----
27 values hashing to d4c673b7444eb9927ec63175b43c6b84

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col1 FROM tab1, tab0 cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT ALL - col2 * + 13 + col1 - - col1 AS col0 FROM tab0 cor0
----
-257
-884
181

query I rowsort
SELECT ALL + + 87 * - col1 AS col1 FROM tab1 AS cor0
----
-1131
-2262
-870

query I rowsort
SELECT DISTINCT - 57 - col0 FROM tab2 AS cor0
----
-135
-136
-64

query I rowsort
SELECT ALL - - 97 * col1 AS col0 FROM tab0 AS cor0
----
8342
8827
9409

query I rowsort
SELECT DISTINCT + - ( + col1 ) + + col1 * - 22 FROM tab1 AS cor0
----
-230
-299
-598

query I rowsort
SELECT DISTINCT - tab0.col2 * col2 FROM tab0
----
-1
-1089
-6724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5752
SELECT - col0 + CAST( NULL AS DECIMAL ) / + 55 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5752
SELECT - col0 + CAST ( NULL AS REAL ) / + 55 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT 48 * - 50 FROM tab2, tab0 AS cor0
----
9 values hashing to 7b27d06952be68a896df1788c6960a78

onlyif mysql # use DIV operator for integer division
query I rowsort label-5754
SELECT + tab2.col1 DIV col1 - - col0 * + col0 AS col1 FROM tab2
----
50
6085
6242

skipif mysql # not compatible
query I rowsort label-5754
SELECT + tab2.col1 / col1 - - col0 * + col0 AS col1 FROM tab2
----
50
6085
6242

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( col2 ) + col2 col1 FROM tab0 AS cor0
----
164
2
66

query I rowsort
SELECT ALL + 86 + - 94 + col0 FROM tab1 AS cor0
----
-5
56
72

query I rowsort
SELECT ALL col2 + + col0 * + col0 FROM tab2 AS cor0
----
6110
6279
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-5758
SELECT DISTINCT + col2 DIV - col2 AS col1 FROM tab0 cor0
----
-1

skipif mysql # not compatible
query I rowsort label-5758
SELECT DISTINCT + col2 / - col2 AS col1 FROM tab0 cor0
----
-1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5759
SELECT ALL + CAST( NULL AS SIGNED ) * + 91 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5759
SELECT ALL + CAST ( NULL AS INTEGER ) * + 91 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 93 AS col0 FROM tab1, tab1 AS cor0
----
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-5761
SELECT + 22 + + tab0.col2 DIV col1 FROM tab0
----
22
22
22

skipif mysql # not compatible
query I rowsort label-5761
SELECT + 22 + + tab0.col2 / col1 FROM tab0
----
22
22
22

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5762
SELECT + CAST( NULL AS SIGNED ) * + col1 + col1 col0 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5762
SELECT + CAST ( NULL AS INTEGER ) * + col1 + col1 col0 FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT - ( + 63 ) * col0 - + col0 AS col2 FROM tab1
----
-192
-4096
-5120

query I rowsort
SELECT col1 * - tab1.col1 + col0 AS col0 FROM tab1
----
-36
-673
-89

query I rowsort
SELECT cor1.col2 AS col0 FROM tab0, tab1 AS cor0, tab2 cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

query I rowsort
SELECT DISTINCT 82 * 52 AS col1 FROM tab1 cor0
----
4264

query I rowsort
SELECT DISTINCT - col0 * + col1 AS col1 FROM tab0
----
-2064
-3395
-8099

query I rowsort
SELECT + 25 AS col2 FROM tab2
----
25
25
25

query I rowsort
SELECT col2 + + col2 * col0 * + col1 FROM tab1
----
36537
4266
99936

query I rowsort
SELECT DISTINCT - cor0.col1 + ( col1 ) FROM tab1 AS cor0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5771
SELECT col1 DIV + col2 + - col2 AS col0 FROM tab0 AS cor0
----
-31
-81
96

skipif mysql # not compatible
query I rowsort label-5771
SELECT col1 / + col2 + - col2 AS col0 FROM tab0 AS cor0
----
-31
-81
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5772
SELECT - col0 * CAST( NULL AS DECIMAL ) + - ( col2 ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5772
SELECT - col0 * CAST ( NULL AS REAL ) + - ( col2 ) AS col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + col0 * + col0 * + 56 FROM tab0 cor0
----
32256
443576
68600

query I rowsort
SELECT DISTINCT col1 * col1 + - col0 + + cor0.col1 AS col0 FROM tab0 cor0
----
7458
8283
9471

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 + + 32 col0 FROM tab2 AS cor0
----
-27
1
15

query I rowsort
SELECT 3 * + col1 FROM tab0
----
258
273
291

query I rowsort
SELECT ALL tab1.col0 * col1 + - 44 AS col0 FROM tab1
----
34
596
996

query I rowsort
SELECT DISTINCT 88 + col2 * - col1 FROM tab2
----
-1446
-558
-749

onlyif mysql # use DIV operator for integer division
query I rowsort label-5779
SELECT ALL col1 DIV - tab0.col1 + col1 FROM tab0
----
85
90
96

skipif mysql # not compatible
query I rowsort label-5779
SELECT ALL col1 / - tab0.col1 + col1 FROM tab0
----
85
90
96

query I rowsort
SELECT ALL + col2 + col0 + col1 * + col0 * col2 FROM tab0
----
3431
664289
68169

onlyif mysql # use DIV operator for integer division
query I rowsort label-5781
SELECT ALL 20 DIV - col1 + col1 * + 95 FROM tab1
----
1234
2470
948

skipif mysql # not compatible
query I rowsort label-5781
SELECT ALL 20 / - col1 + col1 * + 95 FROM tab1
----
1234
2470
948

query I rowsort
SELECT ALL col1 * col0 * - 51 + + cor0.col0 AS col1 FROM tab1 AS cor0
----
-32576
-3975
-52960

query I rowsort
SELECT DISTINCT col1 + - col1 + - 75 FROM tab2 AS cor0
----
-75

query I rowsort
SELECT ALL tab0.col2 * + 64 FROM tab0
----
2112
5248
64

query I rowsort
SELECT DISTINCT - + cor0.col0 AS col0 FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT DISTINCT + col0 * + col1 + + cor0.col2 FROM tab0 cor0
----
2097
3396
8181

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5787
SELECT ALL - col0 * CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5787
SELECT ALL - col0 * CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 + - 74 + + col2 FROM tab0 AS cor0
----
-127
-170
-83

onlyif mysql # use DIV operator for integer division
query I rowsort label-5789
SELECT col1 * - col0 + - cor0.col1 DIV col1 FROM tab2 AS cor0
----
-1344
-218
-4603

skipif mysql # not compatible
query I rowsort label-5789
SELECT col1 * - col0 + - cor0.col1 / col1 FROM tab2 AS cor0
----
-1344
-218
-4603

query I rowsort
SELECT DISTINCT + - col1 + - col0 FROM tab0 cor0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT + col0 * col1 + + ( - col2 ) AS col2 FROM tab0 cor0
----
2031
3394
8017

query I rowsort
SELECT + - col2 + cor0.col1 AS col1 FROM tab0 AS cor0
----
53
9
96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5793
SELECT DISTINCT col0 + - CAST( + 84 AS SIGNED ) FROM tab1 AS cor0
----
-20
-4
-81

skipif mysql # not compatible
query I rowsort label-5793
SELECT DISTINCT col0 + - CAST ( + 84 AS INTEGER ) FROM tab1 AS cor0
----
-20
-4
-81

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5794
SELECT - + col1 * 19 + col1 + - col2 * + CAST( NULL AS DECIMAL ) AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5794
SELECT - + col1 * 19 + col1 + - col2 * + CAST ( NULL AS REAL ) AS col2 FROM tab0 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 * col2 * - ( + col1 ) + col1 + cor0.col0 AS col0 FROM tab0 cor0
----
3527
664298
68222

onlyif mysql # use DIV operator for integer division
query I rowsort label-5796
SELECT ( + col2 ) DIV + 9 AS col0 FROM tab1
----
10
6
6

skipif mysql # not compatible
query I rowsort label-5796
SELECT ( + col2 ) / + 9 AS col0 FROM tab1
----
10
6
6

query I rowsort
SELECT cor0.col2 * + 69 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 60e1093bab3fc24376a4c46b8dd98612

query I rowsort
SELECT 40 FROM tab1, tab2 cor0
----
9 values hashing to b1e8ffeef334b4a2b01b2f91e649c2d3

query I rowsort
SELECT col0 * - 90 AS col0 FROM tab2
----
-630
-7020
-7110

query I rowsort
SELECT ALL 94 AS col1 FROM tab2, tab2 AS cor0
----
9 values hashing to b0ffb7527f4fbf44f30945e1ccb58c24

query I rowsort
SELECT 57 AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 61da70c624ad60604a668f7f8f29392a

onlyif mysql # use DIV operator for integer division
query I rowsort label-5802
SELECT - col1 * col0 DIV + col2 + col0 AS col0 FROM tab0 AS cor0
----
-3360
-38
-9

skipif mysql # not compatible
query I rowsort label-5802
SELECT - col1 * col0 / + col2 + col0 AS col0 FROM tab0 AS cor0
----
-3360
-38
-9

query I rowsort
SELECT + col0 * 16 AS col0 FROM tab1 cor0
----
1024
1280
48

onlyif mysql # use DIV operator for integer division
query I rowsort label-5804
SELECT DISTINCT - col1 DIV - tab1.col2 AS col2 FROM tab1
----
0

skipif mysql # not compatible
query I rowsort label-5804
SELECT DISTINCT - col1 / - tab1.col2 AS col2 FROM tab1
----
0

query I rowsort
SELECT DISTINCT - col2 * tab1.col1 AS col0 FROM tab1
----
-1248
-1404
-570

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( col0 * - col1 AS REAL ) FROM tab1
----
-1040
-640
-78

onlyif mysql # use DIV operator for integer division
query I rowsort label-5807
SELECT col1 + - col1 * 8 DIV - col2 AS col0 FROM tab1 cor0
----
11
14
29

skipif mysql # not compatible
query I rowsort label-5807
SELECT col1 + - col1 * 8 / - col2 AS col0 FROM tab1 cor0
----
11
14
29

query I rowsort
SELECT - - cor0.col0 * col2 * col2 AS col2 FROM tab1 AS cor0
----
207936
737280
8748

query I rowsort
SELECT ALL + + ( + col1 ) + col2 FROM tab0 AS cor0
----
119
173
98

query I rowsort
SELECT ALL + 17 AS col0 FROM tab1, tab0 AS cor0, tab2 AS cor1, tab1 AS cor2
----
81 values hashing to 71801088bb30ca6eac036729ebfbbace

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5811
SELECT + CAST( - col0 AS SIGNED ) FROM tab2
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-5811
SELECT + CAST ( - col0 AS INTEGER ) FROM tab2
----
-7
-78
-79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 + + cor0.col2 col1 FROM tab1 AS cor0
----
121
176
57

query I rowsort
SELECT - - 77 FROM tab2 AS cor0
----
77
77
77

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5814
SELECT DISTINCT - - col2 + col1 + - CAST( NULL AS SIGNED ) * ( - col0 ) FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5814
SELECT DISTINCT - - col2 + col1 + - CAST ( NULL AS INTEGER ) * ( - col0 ) FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT ALL ( col0 ) + ( - col1 ) FROM tab2 AS cor0
----
-24
19
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-5816
SELECT DISTINCT col2 DIV col1 AS col1 FROM tab1
----
2
5
7

skipif mysql # not compatible
query I rowsort label-5816
SELECT DISTINCT col2 / col1 AS col1 FROM tab1
----
2
5
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-5817
SELECT - col0 DIV cor0.col0 AS col2 FROM tab1 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-5817
SELECT - col0 / cor0.col0 AS col2 FROM tab1 AS cor0
----
-1
-1
-1

query I rowsort
SELECT + + col2 * + col1 + + 40 FROM tab1 AS cor0
----
1288
1444
610

query I rowsort
SELECT ALL - 59 AS col2 FROM tab0
----
-59
-59
-59

query I rowsort
SELECT ALL - 80 AS col0 FROM tab1
----
-80
-80
-80

query I rowsort
SELECT DISTINCT 68 AS col2 FROM tab1
----
68

query I rowsort
SELECT tab1.col1 + col2 * + col1 AS col2 FROM tab1
----
1261
1430
580

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab2 AS cor0, tab1 AS cor1, tab0, tab2 cor2
----
3645 values hashing to d6a6e32c6adcc8525ed3eb7827781237

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5824
SELECT DISTINCT col2 - + CAST( NULL AS SIGNED ) AS col0 FROM tab1 cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-5824
SELECT DISTINCT col2 - + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 cor0
----
NULL

query I rowsort
SELECT + + col1 + col1 * + col2 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT DISTINCT + + col0 * 32 + + cor0.col2 FROM tab1 AS cor0
----
150
2105
2656

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * ( col0 ) + - col0 col1 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT DISTINCT - - cor0.col2 + col0 AS col0 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT ALL - col0 * col2 + ( col1 * - 2 ) - col2 AS col1 FROM tab0 AS cor0
----
-230
-7562
-997

query I rowsort
SELECT DISTINCT - cor0.col0 + - ( col0 ) FROM tab0 AS cor0
----
-178
-48
-70

query I rowsort
SELECT - col2 + - ( cor0.col2 ) FROM tab1 AS cor0
----
-108
-114
-192

query I rowsort
SELECT ALL col0 * col1 - - 29 AS col1 FROM tab0 AS cor0
----
2093
3424
8128

query I rowsort
SELECT + 53 * col2 * - col0 FROM tab2 AS cor0
----
-10017
-107484
-159106

query I rowsort
SELECT - + cor0.col2 + + 31 AS col0 FROM tab2 AS cor0
----
-7
4
5

query IIIIIIIIIIII rowsort
SELECT * FROM tab1, tab0 AS cor0, tab0, tab1 cor1
----
972 values hashing to 9af67d6f98010464af5d560bf949d487

query I rowsort
SELECT + ( - col0 ) * col2 + - col2 FROM tab0 AS cor0
----
-36
-7380
-825

query I rowsort
SELECT + col2 * 87 + col1 FROM tab0 AS cor0
----
184
2957
7225

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5838
SELECT - CAST( NULL AS SIGNED ) + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5838
SELECT - CAST ( NULL AS INTEGER ) + col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5839
SELECT 33 * col1 DIV col2 + col1 FROM tab0 cor0
----
127
172
3298

skipif mysql # not compatible
query I rowsort label-5839
SELECT 33 * col1 / col2 + col1 FROM tab0 cor0
----
127
172
3298

onlyif mysql # use DIV operator for integer division
query I rowsort label-5840
SELECT + + ( + cor0.col2 ) DIV col0 AS col0 FROM tab0 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-5840
SELECT + + ( + cor0.col2 ) / col0 AS col0 FROM tab0 AS cor0
----
0
0
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-5841
SELECT - col2 + 29 DIV - col2 AS col2 FROM tab0 AS cor0
----
-30
-33
-82

skipif mysql # not compatible
query I rowsort label-5841
SELECT - col2 + 29 / - col2 AS col2 FROM tab0 AS cor0
----
-30
-33
-82

query I rowsort
SELECT + 95 FROM tab2, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 14faa6dda52e3dfe1f5db2579c274a7e

query I rowsort
SELECT cor1.col1 FROM tab0 cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT + + col0 * cor0.col2 AS col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT col2 * + col2 + + col0 AS col2 FROM tab1 cor0
----
2919
3313
9296

query IIIIIIIII rowsort
SELECT * FROM tab1, tab2 AS cor0 CROSS JOIN tab2 WHERE NOT NULL NOT BETWEEN + tab1.col0 AND NULL
----

query I rowsort
SELECT ALL + + ( + col0 ) * - cor0.col0 + ( cor0.col2 ) AS col0 FROM tab0 AS cor0
----
-1224
-543
-7839

onlyif mysql # use DIV operator for integer division
query I rowsort label-5848
SELECT DISTINCT - col2 DIV + col1 AS col0 FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-5848
SELECT DISTINCT - col2 / + col1 AS col0 FROM tab1 AS cor0
----
-2
-5
-7

onlyif mysql # use DIV operator for integer division
query I rowsort label-5849
SELECT ALL cor0.col2 DIV + col1 FROM tab2 cor0
----
0
0
2

skipif mysql # not compatible
query I rowsort label-5849
SELECT ALL cor0.col2 / + col1 FROM tab2 cor0
----
0
0
2

query I rowsort
SELECT DISTINCT ( + ( cor0.col1 ) ) FROM tab2 AS cor0
----
17
31
59

query I rowsort
SELECT ALL + - 9 * + col2 FROM tab0 AS cor0
----
-297
-738
-9

query I rowsort
SELECT ALL - ( + col1 ) + + col2 FROM tab1 AS cor0
----
28
47
83

query I rowsort
SELECT + - 45 * 24 AS col0 FROM tab0 AS cor0
----
-1080
-1080
-1080

query I rowsort
SELECT ALL + cor0.col2 * - col1 AS col2 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL col1 * + 86 FROM tab1
----
1118
2236
860

query I rowsort
SELECT ALL - col1 * - 20 AS col1 FROM tab2
----
1180
340
620

query I rowsort
SELECT col0 * col0 + col0 * ( 20 ) AS col0 FROM tab1
----
5376
69
8000

query I rowsort
SELECT ALL + col0 * + col2 AS col1 FROM tab0
----
35
7298
792

query I rowsort
SELECT DISTINCT - col0 * 50 + + col1 FROM tab2 AS cor0
----
-319
-3841
-3933

onlyif mysql # use DIV operator for integer division
query I rowsort label-5860
SELECT DISTINCT + cor0.col1 DIV - col0 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-5860
SELECT DISTINCT + cor0.col1 / - col0 FROM tab0 AS cor0
----
-1
-2
-3

query I rowsort
SELECT - col1 * 70 AS col1 FROM tab2 AS cor0
----
-1190
-2170
-4130

query I rowsort
SELECT ALL + col2 + + ( cor0.col0 ) AS col2 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT ( - 31 ) * - col2 AS col0 FROM tab1 AS cor0
----
1674
1767
2976

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5864
SELECT ALL + CAST( NULL AS DECIMAL ) * 89 + col2 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5864
SELECT ALL + CAST ( NULL AS REAL ) * 89 + col2 AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT cor0.col2 + 82 * - cor0.col0 FROM tab2 AS cor0
----
-547
-6370
-6440

query I rowsort
SELECT DISTINCT ( - col0 ) * - col2 AS col1 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + col0 * + 18 AS col0 FROM tab0 AS cor0
----
1602
432
630

query I rowsort
SELECT ALL + - col1 * cor0.col1 + cor0.col1 AS col2 FROM tab2 AS cor0
----
-272
-3422
-930

query I rowsort
SELECT DISTINCT - - col2 * 91 FROM tab2 AS cor0
----
2366
2457
3458

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + 45 ) * col1 col1 FROM tab1 AS cor0
----
1170
450
585

onlyif mysql # use DIV operator for integer division
query I rowsort label-5871
SELECT ALL - 24 DIV + 35 AS col0 FROM tab2 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-5871
SELECT ALL - 24 / + 35 AS col0 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-5872
SELECT DISTINCT + - 61 DIV + cor0.col1 + cor0.col1 FROM tab0 AS cor0
----
86
91
97

skipif mysql # not compatible
query I rowsort label-5872
SELECT DISTINCT + - 61 / + cor0.col1 + cor0.col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT tab1.col1 + col0 * ( col2 ) FROM tab1
----
188
3658
7693

query I rowsort
SELECT col1 + col1 * 90 AS col1 FROM tab0 cor0
----
7826
8281
8827

query I rowsort
SELECT + - col0 * col0 + + col2 AS col0 FROM tab1 AS cor0
----
-4039
-6304
45

query I rowsort
SELECT DISTINCT 3 AS col0 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
3

onlyif mysql # use DIV operator for integer division
query I rowsort label-5877
SELECT DISTINCT - + col2 DIV - col2 + + ( col2 ) * - 55 * ( + col2 ) + - 90 FROM tab1 cor0
----
-160469
-178784
-506969

skipif mysql # not compatible
query I rowsort label-5877
SELECT DISTINCT - + col2 / - col2 + + ( col2 ) * - 55 * ( + col2 ) + - 90 FROM tab1 cor0
----
-160469
-178784
-506969

query I rowsort
SELECT ALL - col0 + cor0.col2 * + col1 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT ALL + - col2 + ( - col0 * - col2 ) AS col2 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT + 25 AS col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 525a55d5ed224a62da65df36731881a7

query I rowsort
SELECT col0 * - ( + 0 ) FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + + col1 + + 49 * col0 FROM tab0 cor0
----
1262
1812
4452

query I rowsort
SELECT DISTINCT col0 + ( col2 ) - col1 * + col1 AS col0 FROM tab2 AS cor0
----
-172
-3377
-927

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 - + ( + 58 ) col1 FROM tab2 AS cor0
----
-84
-85
-96

query I rowsort
SELECT DISTINCT - 15 FROM tab1, tab1 AS cor0
----
-15

query I rowsort
SELECT ( + 59 ) AS col1 FROM tab0 AS cor0 CROSS JOIN tab1, tab0 cor1
----
27 values hashing to e29fef8cdec1ee45a71d213f16d2f1d3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 + + ( col1 ) * + col2 col0 FROM tab0 AS cor0
----
2871
7544
98

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0 AS cor0 CROSS JOIN tab0, tab2 AS cor1, tab2, tab0 AS cor2
----
3645 values hashing to 52c9380a39df7a744b9f2f2c5bf55dd5

query I rowsort
SELECT ALL col2 + - cor0.col1 FROM tab2 AS cor0
----
-33
-4
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-5890
SELECT ALL - col1 * ( 71 ) DIV + cor0.col2 + - col2 AS col1 FROM tab1 AS cor0
----
-105
-69
-88

skipif mysql # not compatible
query I rowsort label-5890
SELECT ALL - col1 * ( 71 ) / + cor0.col2 + - col2 AS col1 FROM tab1 AS cor0
----
-105
-69
-88

query I rowsort
SELECT + col2 * + col1 + + col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT DISTINCT - col2 * + ( col2 ) AS col0 FROM tab0 AS cor0
----
-1
-1089
-6724

query I rowsort
SELECT 36 FROM tab1 cor0
----
36
36
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 38 col1 FROM tab0, tab2 cor0
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

query I rowsort
SELECT + - col0 * col2 + + col2 + + 37 * - col0 AS col0 FROM tab0 AS cor0
----
-10509
-1329
-1647

query I rowsort
SELECT DISTINCT 27 * col1 FROM tab1 AS cor0
----
270
351
702

query I rowsort
SELECT DISTINCT col0 + col2 * col1 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT ALL + col0 * col1 * - col0 AS col1 FROM tab2 cor0
----
-106097
-1519
-358956

query I rowsort
SELECT ALL + col2 * col2 + ( - col0 ) FROM tab0 AS cor0
----
-34
1065
6635

query I rowsort
SELECT 0 - - col0 * + 33 FROM tab2 cor0
----
231
2574
2607

onlyif mysql # use DIV operator for integer division
query I rowsort label-5901
SELECT - col0 DIV col2 AS col0 FROM tab0
----
-1
-35
0

skipif mysql # not compatible
query I rowsort label-5901
SELECT - col0 / col2 AS col0 FROM tab0
----
-1
-35
0

query I rowsort
SELECT col0 - col0 * - col0 FROM tab2
----
56
6162
6320

query I rowsort
SELECT ALL - + col0 * - col0 AS col1 FROM tab2 cor0
----
49
6084
6241

onlyif mysql # use DIV operator for integer division
query I rowsort label-5904
SELECT - 24 DIV col1 + tab0.col1 + ( + col2 * col0 ) AS col1 FROM tab0
----
132
7389
878

skipif mysql # not compatible
query I rowsort label-5904
SELECT - 24 / col1 + tab0.col1 + ( + col2 * col0 ) AS col1 FROM tab0
----
132
7389
878

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 + + col2 * - col1 col0 FROM tab0
----
-2805
-7380
-96

query I rowsort
SELECT + col0 * - col1 + - ( - col2 ) AS col1 FROM tab2 AS cor0
----
-1305
-190
-4576

query I rowsort
SELECT col2 + col2 * 43 AS col2 FROM tab0 cor0
----
1452
3608
44

onlyif mysql # use DIV operator for integer division
query I rowsort label-5908
SELECT ALL + tab0.col1 DIV + col0 + - col0 FROM tab0
----
-21
-33
-88

skipif mysql # not compatible
query I rowsort label-5908
SELECT ALL + tab0.col1 / + col0 + - col0 FROM tab0
----
-21
-33
-88

query I rowsort
SELECT DISTINCT - col1 + + col2 * + 24 FROM tab1
----
1270
1358
2291

skipif mysql # not compatible
query I rowsort
SELECT - + CAST ( - col2 AS REAL ) FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT ALL cor0.col0 + 12 FROM tab1, tab0 cor0, tab2 AS cor1
----
27 values hashing to 233dfb4e8be0140e4983585890e70046

query I rowsort
SELECT + - col2 * - col0 FROM tab0 cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-5913
SELECT - col2 DIV cor0.col0 AS col0 FROM tab2 AS cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-5913
SELECT - col2 / cor0.col0 AS col0 FROM tab2 AS cor0
----
-3
0
0

query I rowsort
SELECT ALL + + col0 * cor0.col0 AS col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT - 51 FROM tab1, tab0 AS cor0
----
-51

query I rowsort
SELECT - 33 FROM tab2 AS cor0 CROSS JOIN tab1, tab2 AS cor1
----
27 values hashing to bbc05afe7eb6fed16e9d75f7f74d1948

query I rowsort
SELECT - - cor0.col1 - - col0 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT 43 + + cor0.col0 FROM tab1 cor0
----
107
123
46

query I rowsort
SELECT - + cor0.col1 + col1 + - col1 FROM tab1 cor0
----
-10
-13
-26

query I rowsort
SELECT DISTINCT 26 AS col0 FROM tab0
----
26

query I rowsort
SELECT ALL + ( 79 ) AS col2 FROM tab2
----
79
79
79

query I rowsort
SELECT + 84 FROM tab1, tab1 AS cor0
----
9 values hashing to cadd876c26338fc58b9297e74fc324d8

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5923
SELECT ALL CAST( NULL AS SIGNED ) + - tab0.col2 col2 FROM tab0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5923
SELECT ALL CAST ( NULL AS INTEGER ) + - tab0.col2 col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT 1 - 71 AS col1 FROM tab2, tab1, tab2 AS cor0
----
-70

query I rowsort
SELECT col1 * ( col2 * - col2 ) FROM tab1 AS cor0
----
-119808
-32490
-75816

query I rowsort
SELECT + cor0.col0 + col0 AS col1 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT col1 * ( - 48 ) AS col0 FROM tab2 AS cor0
----
-1488
-2832
-816

query I rowsort
SELECT - - col2 + col1 + 43 * col0 AS col2 FROM tab2 AS cor0
----
3439
3452
359

query I rowsort
SELECT - - col2 + + col0 * col2 FROM tab1 AS cor0
----
216
3705
7776

query I rowsort
SELECT DISTINCT - 83 * col0 FROM tab2
----
-581
-6474
-6557

query I rowsort
SELECT DISTINCT + 50 * - col0 FROM tab2
----
-350
-3900
-3950

query I rowsort
SELECT 30 * - col2 * + col1 + + tab1.col2 AS col2 FROM tab1
----
-17043
-37344
-42066

query I rowsort
SELECT - tab1.col0 + col2 * 86 FROM tab1
----
4641
4838
8176

onlyif mysql # use DIV operator for integer division
query I rowsort label-5934
SELECT ALL col1 DIV + 20 AS col0 FROM tab0
----
4
4
4

skipif mysql # not compatible
query I rowsort label-5934
SELECT ALL col1 / + 20 AS col0 FROM tab0
----
4
4
4

query I rowsort
SELECT col1 * - col2 * - 54 + + col2 + 64 AS col0 FROM tab1 AS cor0
----
30901
67552
75934

query I rowsort
SELECT ALL - col2 * 46 FROM tab2 AS cor0
----
-1196
-1242
-1748

onlyif mysql # use DIV operator for integer division
query I rowsort label-5937
SELECT DISTINCT cor0.col2 + - 59 DIV ( col0 ) + + ( cor0.col2 ) AS col2 FROM tab0 AS cor0
----
1
164
64

skipif mysql # not compatible
query I rowsort label-5937
SELECT DISTINCT cor0.col2 + - 59 / ( col0 ) + + ( cor0.col2 ) AS col2 FROM tab0 AS cor0
----
1
164
64

query I rowsort
SELECT DISTINCT 70 AS col0 FROM tab2, tab0 AS cor0
----
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-5939
SELECT DISTINCT + col2 * cor0.col2 + - col1 DIV - col1 FROM tab2 AS cor0
----
1445
677
730

skipif mysql # not compatible
query I rowsort label-5939
SELECT DISTINCT + col2 * cor0.col2 + - col1 / - col1 FROM tab2 AS cor0
----
1445
677
730

onlyif mysql # use DIV operator for integer division
query I rowsort label-5940
SELECT - + 70 * - col0 DIV col0 FROM tab0 AS cor0
----
70
70
70

skipif mysql # not compatible
query I rowsort label-5940
SELECT - + 70 * - col0 / col0 FROM tab0 AS cor0
----
70
70
70

query I rowsort
SELECT + - col2 + ( - cor0.col2 ) * + ( + 40 ) FROM tab1 AS cor0
----
-2214
-2337
-3936

query I rowsort
SELECT ALL - + 81 AS col2 FROM tab0 cor0
----
-81
-81
-81

query I rowsort
SELECT + cor0.col1 * + cor0.col0 + + 15 * col2 AS col2 FROM tab0 AS cor0
----
2559
3410
9329

onlyif mysql # use DIV operator for integer division
query I rowsort label-5944
SELECT - col2 + cor0.col2 DIV + col2 col0 FROM tab0 AS cor0
----
-32
-81
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-5944
SELECT - col2 + cor0.col2 / + col2 col0 FROM tab0 AS cor0
----
-32
-81
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5945
SELECT CAST( NULL AS SIGNED ) + col0 / cor0.col1 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5945
SELECT CAST ( NULL AS INTEGER ) + col0 / cor0.col1 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - + ( + col0 ) * - cor0.col0 * ( 82 ) AS col1 FROM tab0 cor0
----
100450
47232
649522

query I rowsort
SELECT DISTINCT + ( + col1 ) AS col1 FROM tab0 AS cor0
----
86
91
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-5948
SELECT - col2 * ( + col0 ) DIV - col0 FROM tab1 cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-5948
SELECT - col2 * ( + col0 ) / - col0 FROM tab1 cor0
----
54
57
96

query I rowsort
SELECT ALL - + cor0.col1 FROM tab1 AS cor0 CROSS JOIN tab0 cor1
----
9 values hashing to b234798d4706314ba14eaad539d0aa88

query I rowsort
SELECT ALL - 56 * - 34 FROM tab1 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to 689b81a334f639e8f886d0d0cd852e6c

query I rowsort
SELECT ALL + 2 AS col2 FROM tab2
----
2
2
2

query I rowsort
SELECT + + cor0.col1 * + cor0.col2 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - cor0.col0 - cor0.col2 AS col2 FROM tab1 cor0
----
-121
-176
-57

query I rowsort
SELECT ALL + tab1.col2 - - col0 AS col0 FROM tab1
----
121
176
57

query I rowsort
SELECT - + 28 + col1 * + 62 FROM tab0 AS cor0
----
5304
5614
5986

onlyif mysql # use DIV operator for integer division
query I rowsort label-5956
SELECT - + cor0.col0 DIV cor0.col0 - + 88 AS col1 FROM tab2 AS cor0
----
-89
-89
-89

skipif mysql # not compatible
query I rowsort label-5956
SELECT - + cor0.col0 / cor0.col0 - + 88 AS col1 FROM tab2 AS cor0
----
-89
-89
-89

query I rowsort
SELECT + 30 + col2 * 24 FROM tab0 AS cor0
----
1998
54
822

onlyif mysql # use DIV operator for integer division
query I rowsort label-5958
SELECT + - col1 + + col2 DIV 23 AS col2 FROM tab0 AS cor0
----
-85
-88
-97

skipif mysql # not compatible
query I rowsort label-5958
SELECT + - col1 + + col2 / 23 AS col2 FROM tab0 AS cor0
----
-85
-88
-97

query I rowsort
SELECT - col0 * cor0.col2 + - col1 * + col2 FROM tab1 AS cor0
----
-1566
-4218
-8928

query I rowsort
SELECT ALL - col1 * col2 * ( 62 * - col2 ) FROM tab2 cor0
----
1401138
1521976
2472808

query I rowsort
SELECT + ( - col0 ) * + col2 + 39 AS col1 FROM tab0 AS cor0
----
-7259
-753
4

query I rowsort
SELECT DISTINCT - - 74 FROM tab0 AS cor0
----
74

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5963
SELECT ( col2 ) * CAST( NULL AS DECIMAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5963
SELECT ( col2 ) * CAST ( NULL AS REAL ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 85 * col0 FROM tab2 cor0
----
595
6630
6715

query I rowsort
SELECT ALL - 22 * col2 FROM tab0 AS cor0
----
-1804
-22
-726

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 28 * col1 col2 FROM tab2 AS cor0
----
1652
476
868

query I rowsort
SELECT DISTINCT 77 + + col2 + col0 AS col2 FROM tab0
----
113
134
248

query I rowsort
SELECT ( - 44 ) * tab2.col1 AS col0 FROM tab2
----
-1364
-2596
-748

query I rowsort
SELECT 18 + 73 FROM tab0, tab2, tab1 AS cor0
----
27 values hashing to deebbcfb9c7803a34dca6bd860849afe

query I rowsort
SELECT ALL + tab1.col0 * - col2 + col0 FROM tab1
----
-159
-3584
-7600

query I rowsort
SELECT ( col0 ) * cor0.col2 * 0 + + col1 FROM tab0 AS cor0
----
86
91
97

query I rowsort
SELECT DISTINCT - 37 * - cor0.col2 + + ( 42 * cor0.col0 ) FROM tab2 AS cor0
----
1293
4238
4724

query I rowsort
SELECT ALL + col2 + - col0 AS col0 FROM tab2 cor0
----
-41
-52
20

query I rowsort
SELECT ( cor0.col1 ) AS col2 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT - 75 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 258bc565c64924d905a55eaaa6e57547

query I rowsort
SELECT ALL - 14 AS col1 FROM tab2 cor0
----
-14
-14
-14

query I rowsort
SELECT ALL + + col2 * col1 + - cor0.col0 FROM tab2 AS cor0
----
1456
567
830

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5978
SELECT col1 + - col1 * col0 * CAST( 67 AS SIGNED ) FROM tab1 AS cor0
----
-42870
-5200
-69667

skipif mysql # not compatible
query I rowsort label-5978
SELECT col1 + - col1 * col0 * CAST ( 67 AS INTEGER ) FROM tab1 AS cor0
----
-42870
-5200
-69667

query I rowsort
SELECT ALL cor0.col0 * col0 + + col2 FROM tab2 AS cor0
----
6110
6279
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 11 + 59 col1 FROM tab1
----
70
70
70

query I rowsort
SELECT 35 - - col0 FROM tab0
----
124
59
70

query I rowsort
SELECT ALL 51 + + 62 AS col0 FROM tab0, tab2, tab0 AS cor0
----
27 values hashing to ece70480e55244469a16ed2f016bf62b

query I rowsort
SELECT ALL + ( 26 ) * col0 * 80 + - tab2.col1 * - col2 AS col1 FROM tab2
----
15397
163774
164966

query I rowsort
SELECT + 36 + + ( col2 ) FROM tab2 AS cor0
----
62
63
74

query I rowsort
SELECT + ( + 28 ) + - col2 AS col2 FROM tab1 AS cor0
----
-26
-29
-68

query I rowsort
SELECT DISTINCT - + 21 AS col1 FROM tab2 cor0
----
-21

query I rowsort
SELECT ALL cor1.col2 * - 7 AS col1 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 89ab6a32a2cc304260335e313943b041

query I rowsort
SELECT ALL + col1 * - 65 AS col2 FROM tab1 AS cor0
----
-1690
-650
-845

query I rowsort
SELECT - + 26 * + col1 + col2 FROM tab2 AS cor0
----
-1508
-404
-779

query I rowsort
SELECT DISTINCT col1 + 79 FROM tab1 AS cor0
----
105
89
92

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * + col2 + col1 col0 FROM tab1
----
1261
1430
580

query I rowsort
SELECT - cor0.col1 AS col1 FROM tab0 cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 58ed467a9a332e4d7bfaa9abdbbd063f

query I rowsort
SELECT DISTINCT ( + cor0.col1 ) + + col2 FROM tab2 cor0
----
55
58
85

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-5994
SELECT ALL - col1 * ( col2 + + CAST( NULL AS SIGNED ) ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-5994
SELECT ALL - col1 * ( col2 + + CAST ( NULL AS INTEGER ) ) AS col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-5995
SELECT - CAST( 59 AS SIGNED ) - - cor0.col1 DIV + 2 AS col0 FROM tab1 cor0
----
-46
-53
-54

skipif mysql # not compatible
query I rowsort label-5995
SELECT - CAST ( 59 AS INTEGER ) - - cor0.col1 / + 2 AS col0 FROM tab1 cor0
----
-46
-53
-54

onlyif mysql # use DIV operator for integer division
query I rowsort label-5996
SELECT ALL 98 DIV + cor0.col1 FROM tab1 AS cor0
----
3
7
9

skipif mysql # not compatible
query I rowsort label-5996
SELECT ALL 98 / + cor0.col1 FROM tab1 AS cor0
----
3
7
9

query I rowsort
SELECT DISTINCT + col2 * col1 + + col2 + col0 AS col0 FROM tab1 AS cor0
----
1424
1461
691

query I rowsort
SELECT col0 * cor0.col2 + - col1 AS col0 FROM tab0 AS cor0
----
-62
706
7207

query I rowsort
SELECT ALL + + 48 AS col0 FROM tab0 AS cor0
----
48
48
48

query I rowsort
SELECT - cor0.col2 * + col2 - + col2 FROM tab1 AS cor0
----
-2970
-3306
-9312

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6001
SELECT - CAST( NULL AS SIGNED ) + - ( + tab2.col2 ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6001
SELECT - CAST ( NULL AS INTEGER ) + - ( + tab2.col2 ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 25 * col1 * - col0 AS col0 FROM tab0 AS cor0
----
202475
51600
84875

query I rowsort
SELECT ALL - + 32 AS col1 FROM tab1 AS cor0
----
-32
-32
-32

query I rowsort
SELECT ALL + - 98 + col0 AS col0 FROM tab1 AS cor0
----
-18
-34
-95

query I rowsort
SELECT - 73 AS col0 FROM tab1
----
-73
-73
-73

query I rowsort
SELECT + 28 * + 89 FROM tab1, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to acf8685dfe815ae49b0c5a88f5662f96

query I rowsort
SELECT ALL ( col1 ) * 62 + + col1 FROM tab2 cor0
----
1071
1953
3717

query I rowsort
SELECT - - col2 * - col0 * ( + ( - col1 ) * - col2 ) AS col1 FROM tab0 AS cor0
----
-2247696
-3395
-54457676

query I rowsort
SELECT + col2 * cor0.col0 + + cor0.col1 AS col1 FROM tab1 cor0
----
188
3658
7693

query I rowsort
SELECT col0 * col0 + col2 AS col2 FROM tab0 AS cor0
----
1226
609
8003

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6011
SELECT DISTINCT + ( col2 ) + - CAST( NULL AS SIGNED ) FROM tab1 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6011
SELECT DISTINCT + ( col2 ) + - CAST ( NULL AS INTEGER ) FROM tab1 AS cor0
----
NULL

query I rowsort
SELECT + 60 * - col0 + - 12 FROM tab0 AS cor0
----
-1452
-2112
-5352

query I rowsort
SELECT DISTINCT - + col2 + col2 AS col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - + cor0.col0 * - col0 + + col2 FROM tab2 AS cor0
----
6110
6279
76

onlyif mysql # use DIV operator for integer division
query I rowsort label-6015
SELECT DISTINCT + col1 DIV + col1 FROM tab1 cor0
----
1

skipif mysql # not compatible
query I rowsort label-6015
SELECT DISTINCT + col1 / + col1 FROM tab1 cor0
----
1

query I rowsort
SELECT ALL col1 * ( col0 ) AS col2 FROM tab0 AS cor0
----
2064
3395
8099

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6017
SELECT DISTINCT - + col1 * + CAST( 28 AS SIGNED ) FROM tab1 AS cor0
----
-280
-364
-728

skipif mysql # not compatible
query I rowsort label-6017
SELECT DISTINCT - + col1 * + CAST ( 28 AS INTEGER ) FROM tab1 AS cor0
----
-280
-364
-728

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6018
SELECT col0 * - CAST( ( col2 ) AS SIGNED ) FROM tab0 AS cor0
----
-35
-7298
-792

skipif mysql # not compatible
query I rowsort label-6018
SELECT col0 * - CAST ( ( col2 ) AS INTEGER ) FROM tab0 AS cor0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-6019
SELECT ALL - col1 DIV + 15 FROM tab0 AS cor0
----
-5
-6
-6

skipif mysql # not compatible
query I rowsort label-6019
SELECT ALL - col1 / + 15 FROM tab0 AS cor0
----
-5
-6
-6

query I rowsort
SELECT ALL - col1 + 82 * - col1 FROM tab0 cor0
----
-7138
-7553
-8051

query I rowsort
SELECT DISTINCT - col1 + col1 AS col2 FROM tab2 cor0
----
0

query I rowsort
SELECT DISTINCT 39 * + cor0.col2 AS col0 FROM tab0 AS cor0
----
1287
3198
39

query I rowsort
SELECT + 25 * col1 FROM tab0 AS cor0
----
2150
2275
2425

query I rowsort
SELECT + + col0 * 36 - - col1 FROM tab0 cor0
----
1357
3295
950

query I rowsort
SELECT DISTINCT + ( col1 ) * - col0 + + 90 FROM tab2 AS cor0
----
-1253
-127
-4512

query I rowsort
SELECT ALL ( - col0 ) * col2 AS col0 FROM tab1 AS cor0
----
-162
-3648
-7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-6027
SELECT ALL - col1 DIV + 76 + + col2 - col1 FROM tab0 AS cor0
----
-10
-54
-97

skipif mysql # not compatible
query I rowsort label-6027
SELECT ALL - col1 / + 76 + + col2 - col1 FROM tab0 AS cor0
----
-10
-54
-97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 44 + col1 col2 FROM tab1 AS cor0
----
54
57
70

onlyif mysql # use DIV operator for integer division
query I rowsort label-6029
SELECT DISTINCT - + col1 DIV - cor0.col0 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-6029
SELECT DISTINCT - + col1 / - cor0.col0 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT ALL 29 + col0 FROM tab1 AS cor0
----
109
32
93

query I rowsort
SELECT + col0 * col1 + - col0 AS col1 FROM tab0 AS cor0
----
2040
3360
8010

query I rowsort
SELECT ALL ( - 69 ) + col2 AS col0 FROM tab0 AS cor0
----
-36
-68
13

query I rowsort
SELECT + col2 * - cor0.col1 * col1 AS col0 FROM tab2 AS cor0
----
-10982
-25947
-90506

query I rowsort
SELECT - - 17 FROM tab2 AS cor0
----
17
17
17

query I rowsort
SELECT - col1 + col0 * 11 FROM tab0
----
178
288
888

query I rowsort
SELECT - tab2.col2 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

onlyif mysql # use DIV operator for integer division
query I rowsort label-6037
SELECT + col2 + - col2 DIV - col0 AS col1 FROM tab1 AS cor0
----
57
72
97

skipif mysql # not compatible
query I rowsort label-6037
SELECT + col2 + - col2 / - col0 AS col1 FROM tab1 AS cor0
----
57
72
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6038
SELECT + 48 DIV col2 + col2 AS col1 FROM tab0 AS cor0
----
34
49
82

skipif mysql # not compatible
query I rowsort label-6038
SELECT + 48 / col2 + col2 AS col1 FROM tab0 AS cor0
----
34
49
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 78 col0 FROM tab2 AS cor0
----
78
78
78

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * + cor0.col1 col0 FROM tab2 AS cor0
----
1534
646
837

query I rowsort
SELECT - col0 + - col2 AS col2 FROM tab2 cor0
----
-104
-117
-34

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 ALL - cor0.col1 + col0 * col0 FROM tab2 AS cor0
----
18
6025
6224

query I rowsort
SELECT ALL - ( - col0 + tab0.col2 * - tab0.col0 ) FROM tab0
----
70
7387
816

query I rowsort
SELECT + - col1 * + col1 FROM tab2 cor0
----
-289
-3481
-961

query I rowsort
SELECT + 14 + col0 FROM tab0 cor0
----
103
38
49

query I rowsort
SELECT DISTINCT + ( col0 ) + col1 FROM tab1 AS cor0
----
29
74
93

query I rowsort
SELECT DISTINCT + - col0 + col2 AS col0 FROM tab1 AS cor0
----
-7
16
51

query I rowsort
SELECT ( cor0.col1 ) * col2 + - col0 AS col1 FROM tab1 AS cor0
----
1168
1401
506

query I rowsort
SELECT tab1.col2 + - tab1.col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 8b75136b2b51c77345c03804ec1cda5c

query I rowsort
SELECT - 18 AS col1 FROM tab2, tab1 AS cor0
----
9 values hashing to 09afafec657a5e9f082beb6a16ec85de

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 44 * col0 col2 FROM tab0
----
1056
1540
3916

query I rowsort
SELECT DISTINCT - 63 AS col1 FROM tab1, tab1 AS cor0
----
-63

query I rowsort
SELECT + col1 * 26 * col0 FROM tab2
----
119652
34918
5642

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6055
SELECT - + CAST( + col0 AS SIGNED ) - - col1 AS col1 FROM tab2 AS cor0
----
-19
-62
24

skipif mysql # not compatible
query I rowsort label-6055
SELECT - + CAST ( + col0 AS INTEGER ) - - col1 AS col1 FROM tab2 AS cor0
----
-19
-62
24

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6056
SELECT + + CAST( 88 AS SIGNED ) - col1 * - col2 FROM tab2 AS cor0
----
1622
734
925

skipif mysql # not compatible
query I rowsort label-6056
SELECT + + CAST ( 88 AS INTEGER ) - col1 * - col2 FROM tab2 AS cor0
----
1622
734
925

query I rowsort
SELECT + 1 - + 38 FROM tab1 AS cor0
----
-37
-37
-37

query I rowsort
SELECT col2 + col0 + - cor0.col2 AS col1 FROM tab0 AS cor0
----
24
35
89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6059
SELECT DISTINCT + CAST( ( col0 ) AS SIGNED ) AS col1 FROM tab2
----
7
78
79

skipif mysql # not compatible
query I rowsort label-6059
SELECT DISTINCT + CAST ( ( col0 ) AS INTEGER ) AS col1 FROM tab2
----
7
78
79

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 + col1 col1 FROM tab0 AS cor0
----
2
62
62

query I rowsort
SELECT col2 * col0 * tab1.col0 FROM tab1
----
233472
486
614400

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 27 * 51 col0 FROM tab1
----
1377
1377
1377

query I rowsort
SELECT ( col0 + col1 ) * col2 AS col0 FROM tab0
----
132
14760
3630

query I rowsort
SELECT + col1 * col1 + - col1 AS col2 FROM tab1 AS cor0
----
156
650
90

query I rowsort
SELECT ALL + col1 * cor0.col2 AS col2 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT cor0.col0 + col0 * col1 FROM tab0 AS cor0
----
2088
3430
8188

query I rowsort
SELECT DISTINCT - col0 * col1 * + col0 FROM tab2 AS cor0
----
-106097
-1519
-358956

query III rowsort
SELECT ALL * FROM tab2 AS cor0 WHERE - col1 / + col1 - + col1 BETWEEN NULL AND col0
----

query I rowsort
SELECT col2 + + col0 * col1 - col2 FROM tab2 cor0
----
1343
217
4602

query I rowsort
SELECT DISTINCT col2 FROM tab0 WHERE NOT - col2 + - col0 + col1 * col1 <> NULL
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col0 + col2 col1 FROM tab2
----
104
117
34

query I rowsort
SELECT DISTINCT col2 FROM tab1 WHERE NOT ( - col0 ) NOT IN ( + col0 * + col0 )
----

onlyif mysql # use DIV operator for integer division
query I rowsort label-6073
SELECT DISTINCT + col1 DIV col0 + + col1 FROM tab2
----
17
35
59

skipif mysql # not compatible
query I rowsort label-6073
SELECT DISTINCT + col1 / col0 + + col1 FROM tab2
----
17
35
59

query III rowsort
SELECT ALL * FROM tab2 WHERE ( col2 ) IN ( + tab2.col2 * - col1 + + col2 + - col2 )
----

query I rowsort
SELECT ALL col0 * tab1.col1 * col2 AS col0 FROM tab1
----
36480
4212
99840

query III rowsort
SELECT ALL * FROM tab0 WHERE NOT NULL NOT BETWEEN ( NULL ) AND NULL
----

query I rowsort
SELECT ALL + col1 * + col2 * col0 FROM tab2
----
119652
51034
5859

query I rowsort
SELECT + tab0.col0 * col2 + col0 FROM tab0
----
70
7387
816

onlyif mysql # use DIV operator for integer division
query I rowsort label-6079
SELECT ALL col2 + tab1.col0 DIV + col2 + - col2 FROM tab1
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6079
SELECT ALL col2 + tab1.col0 / + col2 + - col2 FROM tab1
----
0
0
1

query I rowsort
SELECT ALL col2 * col2 * + col2 FROM tab1
----
157464
185193
884736

query I rowsort
SELECT ALL - cor0.col1 * col0 AS col0 FROM tab1 AS cor0
----
-1040
-640
-78

query I rowsort
SELECT ALL + + col0 + col0 * col0 AS col2 FROM tab0 AS cor0
----
1260
600
8010

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col0 + - col0 col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT + col2 - + col2 * - col0 FROM tab2 AS cor0
----
2054
216
3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-6085
SELECT ALL - - col2 DIV + col2 AS col2 FROM tab0 AS cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6085
SELECT ALL - - col2 / + col2 AS col2 FROM tab0 AS cor0
----
1
1
1

query I rowsort
SELECT ALL tab2.col0 * + col1 * tab2.col0 FROM tab2
----
106097
1519
358956

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT tab1.col1 col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT DISTINCT col0 - - tab0.col1 AS col2 FROM tab0
----
110
132
180

query I rowsort
SELECT ALL tab2.col1 - col0 AS col1 FROM tab2
----
-19
-62
24

query I rowsort
SELECT + + col0 - col1 FROM tab2 AS cor0
----
-24
19
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-6091
SELECT + - col0 * col2 * + col2 + + cor0.col2 + - col2 DIV - col1 AS col1 FROM tab2 cor0
----
-114036
-5076
-52702

skipif mysql # not compatible
query I rowsort label-6091
SELECT + - col0 * col2 * + col2 + + cor0.col2 + - col2 / - col1 AS col1 FROM tab2 cor0
----
-114036
-5076
-52702

onlyif mysql # use DIV operator for integer division
query I rowsort label-6092
SELECT - col2 + ( - col1 ) DIV col1 FROM tab0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-6092
SELECT - col2 + ( - col1 ) / col1 FROM tab0
----
-2
-34
-83

query I rowsort
SELECT DISTINCT col1 + + 27 AS col1 FROM tab0
----
113
118
124

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL tab2.col0 col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 95b96ca1dbe2e39a0fa78f50d374f51a

query I rowsort
SELECT DISTINCT - 8 * - 34 AS col2 FROM tab1, tab2 AS cor0
----
272

query I rowsort
SELECT - col0 * - 21 + 34 FROM tab0
----
1903
538
769

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col2 + + ( col2 + col0 ) col2 FROM tab2
----
130
155
61

query I rowsort
SELECT - + col1 + + 31 FROM tab1 AS cor0
----
18
21
5

query I rowsort
SELECT DISTINCT + + col1 + - col2 * - col1 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT ALL + col1 * col2 + + col0 FROM tab1 AS cor0
----
1328
1407
634

onlyif mysql # use DIV operator for integer division
query I rowsort label-6101
SELECT col2 + - ( 58 ) DIV - cor0.col2 FROM tab0 cor0
----
34
59
82

skipif mysql # not compatible
query I rowsort label-6101
SELECT col2 + - ( 58 ) / - cor0.col2 FROM tab0 cor0
----
34
59
82

query I rowsort
SELECT DISTINCT - col0 * 8 FROM tab1 cor0
----
-24
-512
-640

query I rowsort
SELECT ALL - + col0 + ( col0 ) AS col2 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6104
SELECT - col2 DIV col0 + - col1 DIV col1 FROM tab2 AS cor0
----
-1
-1
-4

skipif mysql # not compatible
query I rowsort label-6104
SELECT - col2 / col0 + - col1 / col1 FROM tab2 AS cor0
----
-1
-1
-4

query I rowsort
SELECT DISTINCT col1 + 22 FROM tab1 AS cor0
----
32
35
48

query I rowsort
SELECT ALL + ( col1 ) + + col0 + - col2 AS col1 FROM tab2 AS cor0
----
11
111
58

query I rowsort
SELECT + col0 + ( cor0.col2 ) FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT ALL + + ( + col1 ) + - col2 AS col2 FROM tab1 AS cor0
----
-28
-47
-83

query I rowsort
SELECT DISTINCT - ( col0 ) - col0 * ( + col1 ) FROM tab2 AS cor0
----
-1422
-224
-4680

query I rowsort
SELECT + + 14 * + ( + col0 ) FROM tab1 AS cor0
----
1120
42
896

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT DISTINCT ( + col2 ) * - col0 * CAST ( col2 AS REAL ) col2 FROM tab1 AS cor0
----
-207936
-737280
-8748

query I rowsort
SELECT DISTINCT + 51 * - col1 AS col2 FROM tab2 AS cor0
----
-1581
-3009
-867

query I rowsort
SELECT DISTINCT col0 + col1 * + col2 * col0 FROM tab2 AS cor0
----
119730
51113
5866

query I rowsort
SELECT - ( col2 ) * - col1 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT - 49 * + 55 + - col0 * col2 + col2 AS col0 FROM tab0 cor0
----
-2729
-3454
-9911

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 1 * + ( col2 ) col2 FROM tab2 AS cor0
----
26
27
38

query I rowsort
SELECT + - cor0.col1 * 70 + - col1 AS col0 FROM tab2 cor0
----
-1207
-2201
-4189

query I rowsort
SELECT DISTINCT + col1 + col0 * col2 FROM tab0
----
132
7389
878

onlyif mysql # use DIV operator for integer division
query I rowsort label-6119
SELECT ALL + 6 * 97 DIV + tab2.col0 + + ( 14 ) AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 41b9a1e067b99ea982c5e2a4f6240617

skipif mysql # not compatible
query I rowsort label-6119
SELECT ALL + 6 * 97 / + tab2.col0 + + ( 14 ) AS col0 FROM tab2, tab0 AS cor0
----
9 values hashing to 41b9a1e067b99ea982c5e2a4f6240617

query I rowsort
SELECT ALL tab1.col0 + + col1 AS col2 FROM tab1
----
29
74
93

query I rowsort
SELECT + col0 * tab2.col0 * col0 + - col0 - col0 * col1 FROM tab2
----
119
469872
491617

query I rowsort
SELECT ALL + 67 * - 78 FROM tab0 cor0
----
-5226
-5226
-5226

onlyif mysql # use DIV operator for integer division
query I rowsort label-6123
SELECT ALL + 37 + col1 * col2 DIV + col2 + col1 * - col2 AS col2 FROM tab1 AS cor0
----
-1198
-1341
-523

skipif mysql # not compatible
query I rowsort label-6123
SELECT ALL + 37 + col1 * col2 / + col2 + col1 * - col2 AS col2 FROM tab1 AS cor0
----
-1198
-1341
-523

query I rowsort
SELECT + - col2 + + col2 * col0 FROM tab0 AS cor0
----
34
7216
759

query I rowsort
SELECT - ( 4 ) + col2 AS col0 FROM tab2 AS cor0
----
22
23
34

query I rowsort
SELECT DISTINCT 45 FROM tab0 AS cor0
----
45

query I rowsort
SELECT + 13 * + col0 AS col0 FROM tab2 cor0
----
1014
1027
91

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6128
SELECT ALL - - col1 + col2 * CAST( - 13 AS SIGNED ) FROM tab1 AS cor0
----
-1235
-676
-731

skipif mysql # not compatible
query I rowsort label-6128
SELECT ALL - - col1 + col2 * CAST ( - 13 AS INTEGER ) FROM tab1 AS cor0
----
-1235
-676
-731

onlyif mysql # use DIV operator for integer division
query I rowsort label-6129
SELECT DISTINCT - + cor0.col2 DIV + col1 FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-6129
SELECT DISTINCT - + cor0.col2 / + col1 FROM tab1 AS cor0
----
-2
-5
-7

query I rowsort
SELECT ALL - 31 FROM tab2 AS cor0
----
-31
-31
-31

query I rowsort
SELECT DISTINCT 27 + col0 AS col0 FROM tab0 AS cor0
----
116
51
62

query I rowsort
SELECT + cor0.col1 * cor0.col2 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT + col0 * + col0 FROM tab1 cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT + + ( - col0 ) FROM tab0 cor0
----
-24
-35
-89

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6135
SELECT ( + col0 ) * CAST( col2 AS SIGNED ) AS col0 FROM tab1 AS cor0
----
162
3648
7680

skipif mysql # not compatible
query I rowsort label-6135
SELECT ( + col0 ) * CAST ( col2 AS INTEGER ) AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT DISTINCT + col0 * - cor0.col2 FROM tab0 AS cor0
----
-35
-7298
-792

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 29 * + col2 col0 FROM tab0 AS cor0
----
-2378
-29
-957

onlyif mysql # use DIV operator for integer division
query I rowsort label-6138
SELECT ALL + col0 DIV + cor0.col2 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-6138
SELECT ALL + col0 / + cor0.col2 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT + cor0.col2 * - col2 FROM tab2 cor0
----
-1444
-676
-729

query I rowsort
SELECT DISTINCT col0 - col0 AS col1 FROM tab0
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6141
SELECT - - col0 DIV + col2 - col1 AS col1 FROM tab1 AS cor0
----
-13
-26
-9

skipif mysql # not compatible
query I rowsort label-6141
SELECT - - col0 / + col2 - col1 AS col1 FROM tab1 AS cor0
----
-13
-26
-9

query I rowsort
SELECT ALL cor2.col1 FROM tab1, tab0 AS cor0, tab1 AS cor1, tab1 AS cor2
----
81 values hashing to d7d3fabcafbed14f0d6ffd37195c971c

query I rowsort
SELECT DISTINCT + col0 + + 19 AS col1 FROM tab2 AS cor0
----
26
97
98

query I rowsort
SELECT DISTINCT col2 + + 16 AS col0 FROM tab1 AS cor0
----
112
70
73

query I rowsort
SELECT - cor0.col1 + 4 FROM tab2 cor0
----
-13
-27
-55

query I rowsort
SELECT DISTINCT + - col2 * - 15 + - col0 AS col2 FROM tab2 AS cor0
----
312
398
491

query I rowsort
SELECT ALL col2 - + col2 AS col0 FROM tab2 AS cor0
----
0
0
0

query I rowsort
SELECT col2 * col1 + - 21 FROM tab1 AS cor0
----
1227
1383
549

query I rowsort
SELECT ALL - col2 + + col1 - - col2 * col1 FROM tab1
----
1165
1376
523

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6150
SELECT - - col1 + - CAST( NULL AS DECIMAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6150
SELECT - - col1 + - CAST ( NULL AS REAL ) FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + col1 + ( 98 ) * col2 * cor0.col1 FROM tab0 cor0
----
278210
731367
9603

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6152
SELECT col1 / + CAST( NULL AS SIGNED ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6152
SELECT col1 / + CAST ( NULL AS INTEGER ) col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 27 + - col1 AS col2 FROM tab1
----
-37
-40
-53

onlyif mysql # use DIV operator for integer division
query I rowsort label-6154
SELECT + - col1 DIV - 99 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6154
SELECT + - col1 / - 99 AS col1 FROM tab0 AS cor0
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * col2 col1 FROM tab2 cor0
----
1534
646
837

query I rowsort
SELECT DISTINCT - tab1.col1 * - col1 FROM tab1
----
100
169
676

query I rowsort
SELECT DISTINCT col0 + + col0 * col1 AS col1 FROM tab2
----
1422
224
4680

query I rowsort
SELECT - col1 + 61 AS col0 FROM tab2
----
2
30
44

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col1 * + col0 + - col2 col1 FROM tab0 cor0
----
2031
3394
8017

onlyif mysql # use DIV operator for integer division
query I rowsort label-6160
SELECT + col1 DIV cor0.col2 + + 26 + col1 FROM tab1 AS cor0
----
36
39
52

skipif mysql # not compatible
query I rowsort label-6160
SELECT + col1 / cor0.col2 + + 26 + col1 FROM tab1 AS cor0
----
36
39
52

query I rowsort
SELECT DISTINCT + + col1 * 73 - + 89 AS col0 FROM tab0 AS cor0
----
6189
6554
6992

query I rowsort
SELECT DISTINCT col2 * + 13 FROM tab0 AS cor0
----
1066
13
429

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 - - cor0.col1 col2 FROM tab1 AS cor0
----
20
26
52

onlyif mysql # use DIV operator for integer division
query I rowsort label-6164
SELECT ALL + + cor0.col2 DIV ( - 33 ) + - col1 FROM tab0 AS cor0
----
-87
-93
-97

skipif mysql # not compatible
query I rowsort label-6164
SELECT ALL + + cor0.col2 / ( - 33 ) + - col1 FROM tab0 AS cor0
----
-87
-93
-97

query I rowsort
SELECT DISTINCT + 55 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
55

query I rowsort
SELECT ALL - 96 * col0 FROM tab2
----
-672
-7488
-7584

onlyif mysql # use DIV operator for integer division
query I rowsort label-6167
SELECT - cor0.col0 + + col2 DIV ( col1 ) AS col1 FROM tab2 AS cor0
----
-7
-77
-78

skipif mysql # not compatible
query I rowsort label-6167
SELECT - cor0.col0 + + col2 / ( col1 ) AS col1 FROM tab2 AS cor0
----
-7
-77
-78

query I rowsort
SELECT ( col2 ) + col1 * col0 AS col0 FROM tab2
----
1381
244
4628

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor1.col0 col1 FROM tab0 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

onlyif mysql # use DIV operator for integer division
query I rowsort label-6170
SELECT ALL + 90 DIV - col1 AS col1 FROM tab0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-6170
SELECT ALL + 90 / - col1 AS col1 FROM tab0
----
-1
0
0

query I rowsort
SELECT ALL col2 + col0 * col0 + col2 AS col2 FROM tab0 AS cor0
----
1227
642
8085

onlyif mysql # use DIV operator for integer division
query I rowsort label-6172
SELECT DISTINCT - ( - col1 ) DIV 65 FROM tab2
----
0

skipif mysql # not compatible
query I rowsort label-6172
SELECT DISTINCT - ( - col1 ) / 65 FROM tab2
----
0

query I rowsort
SELECT ALL + + 16 FROM tab0 AS cor0
----
16
16
16

onlyif mysql # use DIV operator for integer division
query I rowsort label-6174
SELECT ( col1 ) DIV cor0.col2 AS col1 FROM tab0 AS cor0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-6174
SELECT ( col1 ) / cor0.col2 AS col1 FROM tab0 AS cor0
----
1
2
97

query I rowsort
SELECT ALL + 96 + col1 FROM tab2 AS cor0
----
113
127
155

query I rowsort
SELECT DISTINCT + - col0 + - cor0.col2 FROM tab2 AS cor0
----
-104
-117
-34

query I rowsort
SELECT DISTINCT + 98 * - col1 FROM tab0 AS cor0
----
-8428
-8918
-9506

query I rowsort
SELECT DISTINCT col1 * col2 + + col2 + ( col2 ) * col2 * - col2 FROM tab2 AS cor0
----
-16016
-18819
-54188

query I rowsort
SELECT col1 + col2 + col0 FROM tab1 AS cor0
----
131
189
83

query I rowsort
SELECT - col2 * + col0 * - ( + col0 + col2 ) FROM tab0 cor0
----
1247958
1260
45144

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6181
SELECT - CAST( NULL AS SIGNED ) * + col1 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6181
SELECT - CAST ( NULL AS INTEGER ) * + col1 AS col2 FROM tab2
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col1 col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

query I rowsort
SELECT ALL 50 * + col0 * ( col2 * - col1 ) FROM tab0
----
-169750
-33205900
-3405600

query I rowsort
SELECT ALL 1 - - tab1.col2 FROM tab1, tab0, tab0 AS cor0
----
27 values hashing to 2410632ede73fb50ca521a58579c1c68

query I rowsort
SELECT DISTINCT - 11 AS col2 FROM tab1, tab2 cor0, tab0 AS cor1
----
-11

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col2 + + col0 col0 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT - col2 + col1 AS col2 FROM tab2 cor0
----
-21
33
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-6188
SELECT col1 DIV 75 FROM tab0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6188
SELECT col1 / 75 FROM tab0
----
1
1
1

query I rowsort
SELECT ALL - col2 * + col0 * tab1.col1 + col1 AS col2 FROM tab1
----
-36470
-4186
-99827

query I rowsort
SELECT DISTINCT 95 FROM tab2, tab0 AS cor0, tab1 cor1
----
95

query I rowsort
SELECT DISTINCT - 43 AS col1 FROM tab0, tab0 AS cor0, tab1 AS cor1
----
-43

query I rowsort
SELECT - 93 FROM tab2, tab0 AS cor0
----
9 values hashing to 38f445d95788c7dc754ff688a62df03b

query I rowsort
SELECT col0 * 27 AS col2 FROM tab0 AS cor0
----
2403
648
945

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - col1 + col1 col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col0 + col2 * - col0 FROM tab0 AS cor0
----
-70
-7387
-816

query I rowsort
SELECT - - col0 * + col2 - cor0.col0 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT - - ( - 78 ) + + col2 * + ( col2 ) * col1 FROM tab2 AS cor0
----
22521
24470
39806

onlyif mysql # use DIV operator for integer division
query I rowsort label-6198
SELECT ALL + ( col2 ) DIV + col1 AS col2 FROM tab1 AS cor0
----
2
5
7

skipif mysql # not compatible
query I rowsort label-6198
SELECT ALL + ( col2 ) / + col1 AS col2 FROM tab1 AS cor0
----
2
5
7

query I rowsort
SELECT + + 14 + col0 FROM tab0 AS cor0
----
103
38
49

query I rowsort
SELECT - + ( + 43 ) + col2 AS col0 FROM tab2 AS cor0
----
-16
-17
-5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 + col1 col1 FROM tab1 AS cor0
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ( + cor0.col2 ) - col2 * col2 col1 FROM tab0 AS cor0
----
-1056
-6642
0

query I rowsort
SELECT col0 + 65 AS col2 FROM tab2 cor0
----
143
144
72

query I rowsort
SELECT - col1 * cor0.col1 * - cor0.col2 + + col1 * col1 FROM tab1 AS cor0
----
16393
37180
5800

query I rowsort
SELECT DISTINCT + 52 - col2 AS col0 FROM tab1
----
-2
-44
-5

query I rowsort
SELECT col1 + - col1 - + col2 AS col1 FROM tab0
----
-1
-33
-82

query I rowsort
SELECT + 62 * col1 + col1 * - col2 - - ( + col2 ) AS col0 FROM tab1
----
-346
107
262

query I rowsort
SELECT DISTINCT + + ( + col2 ) * col2 + ( cor0.col0 ) * + col2 FROM tab0 AS cor0
----
14022
1881
36

query I rowsort
SELECT ALL + + col2 * col0 * + cor0.col2 FROM tab0 AS cor0
----
26136
35
598436

query I rowsort
SELECT - cor1.col0 * - 70 FROM tab0, tab2 AS cor0, tab0 AS cor1
----
27 values hashing to 963edc74d08bc32ddfae6b2cf6e07ebe

query I rowsort
SELECT + cor0.col1 * col1 + - ( 40 + - col0 * + ( col2 ) ) FROM tab1 AS cor0
----
3708
7809
798

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 57 * + col0 * 75 + 48 * - col1 * - ( col2 ) + col2 col1 FROM tab1 AS cor0
----
301017
402000
80271

query I rowsort
SELECT ALL - 59 - - cor0.col2 FROM tab1 AS cor0
----
-2
-5
37

onlyif mysql # use DIV operator for integer division
query I rowsort label-6214
SELECT + + col2 + col0 DIV cor0.col0 AS col2 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-6214
SELECT + + col2 + col0 / cor0.col0 AS col2 FROM tab0 AS cor0
----
2
34
83

query I rowsort
SELECT ALL + col1 + cor0.col0 * cor0.col1 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT DISTINCT + + cor0.col2 - col1 * col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT DISTINCT 70 * + col1 FROM tab2 AS cor0
----
1190
2170
4130

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL ( + col1 ) * 51 col0 FROM tab1 AS cor0
----
1326
510
663

query I rowsort
SELECT ALL - - 29 FROM tab1 AS cor0
----
29
29
29

query I rowsort
SELECT - 4 + + col0 FROM tab1 AS cor0
----
-1
60
76

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - cor0.col1 + cor0.col1 col2 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT DISTINCT + + 94 + - cor0.col0 FROM tab1 AS cor0
----
14
30
91

query I rowsort
SELECT - 55 - + col1 FROM tab1
----
-65
-68
-81

query I rowsort
SELECT - tab0.col1 - ( + col2 ) FROM tab0
----
-119
-173
-98

query I rowsort
SELECT 5 AS col1 FROM tab2, tab0 cor0
----
9 values hashing to 6035628694bdea36f584f3649088551d

query I rowsort
SELECT + 58 * col0 AS col1 FROM tab0
----
1392
2030
5162

query I rowsort
SELECT - 26 FROM tab0, tab2, tab2 AS cor0, tab1
----
81 values hashing to 92c9dcf04a06d25c174ffa715aa22fcf

query I rowsort
SELECT - 75 FROM tab2
----
-75
-75
-75

query I rowsort
SELECT ALL + col2 * + tab2.col1 * - col0 AS col2 FROM tab2
----
-119652
-51034
-5859

onlyif mysql # use DIV operator for integer division
query I rowsort label-6230
SELECT DISTINCT - - col2 * + 0 DIV + col2 AS col0 FROM tab0 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-6230
SELECT DISTINCT - - col2 * + 0 / + col2 AS col0 FROM tab0 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6231
SELECT ALL col1 * + CAST( col1 AS SIGNED ) FROM tab0 AS cor0
----
7396
8281
9409

skipif mysql # not compatible
query I rowsort label-6231
SELECT ALL col1 * + CAST ( col1 AS INTEGER ) FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT + col1 * col0 + + cor0.col1 FROM tab2 AS cor0
----
1360
248
4661

query I rowsort
SELECT DISTINCT + 57 FROM tab1, tab2 cor0
----
57

query I rowsort
SELECT DISTINCT - col0 * col2 * col1 + col0 * col2 AS col0 FROM tab0 AS cor0
----
-3360
-656820
-67320

query I rowsort
SELECT ALL - - col1 * col2 + - cor0.col0 + ( + 34 * col1 ) FROM tab0 AS cor0
----
10467
3360
5738

query I rowsort
SELECT - 6 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
9 values hashing to e92b2679faac7be63701967e3f0c0934

query I rowsort
SELECT col1 * ( - col2 ) AS col0 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT - col2 * 1 FROM tab1 cor0
----
-54
-57
-96

query I rowsort
SELECT - 1 FROM tab0, tab1 AS cor0, tab2 AS cor1
----
27 values hashing to 84da757b1b7b0069ce25607f39bc08d9

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab1 AS cor0 CROSS JOIN tab1, tab1 cor1, tab2 AS cor2
----
972 values hashing to 72eb3d4d523f5d0c69d1b855edd18f4a

query I rowsort
SELECT DISTINCT col2 * + col2 - ( ( - col1 ) ) * 87 FROM tab0
----
14641
8440
8571

query I rowsort
SELECT ( col1 ) * - col0 FROM tab2
----
-1343
-217
-4602

query I rowsort
SELECT DISTINCT + col2 + col1 - 96 FROM tab0
----
2
23
77

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort
SELECT col1 + col1 + + CAST ( 25 AS REAL ) col0 FROM tab1
----
45
51
77

query I rowsort
SELECT + 42 - + col1 * - col0 FROM tab2
----
1385
259
4644

query I rowsort
SELECT ALL + col2 + + cor0.col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT - tab0.col0 * tab0.col0 + + col1 AS col0 FROM tab0
----
-1128
-490
-7830

query I rowsort
SELECT col2 * tab0.col1 + + 51 FROM tab0
----
148
2889
7513

query I rowsort
SELECT DISTINCT - - col0 + - 20 FROM tab1 AS cor0
----
-17
44
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + cor0.col0 + col2 col2 FROM tab0 AS cor0
----
171
36
57

query I rowsort
SELECT DISTINCT + + col2 * + 37 + col1 * cor0.col1 * cor0.col1 AS col1 FROM tab2 AS cor0
----
206341
30790
6319

onlyif mysql # use DIV operator for integer division
query I rowsort label-6252
SELECT + + cor0.col1 * + ( + col0 ) - cor0.col0 DIV 67 AS col1 FROM tab2 AS cor0
----
1342
217
4601

skipif mysql # not compatible
query I rowsort label-6252
SELECT + + cor0.col1 * + ( + col0 ) - cor0.col0 / 67 AS col1 FROM tab2 AS cor0
----
1342
217
4601

onlyif mysql # use DIV operator for integer division
query I rowsort label-6253
SELECT col0 + col1 - 86 DIV col0 AS col0 FROM tab1 AS cor0
----
1
73
92

skipif mysql # not compatible
query I rowsort label-6253
SELECT col0 + col1 - 86 / col0 AS col0 FROM tab1 AS cor0
----
1
73
92

query I rowsort
SELECT DISTINCT + col0 + col0 + col2 FROM tab1 AS cor0
----
185
256
60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6255
SELECT - col1 + - CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6255
SELECT - col1 + - CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col0 * - 68 - col1 AS col0 FROM tab2 cor0
----
445
5245
5355

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6257
SELECT ALL - col0 + + CAST( col1 AS SIGNED ) AS col1 FROM tab1 cor0
----
-54
-67
23

skipif mysql # not compatible
query I rowsort label-6257
SELECT ALL - col0 + + CAST ( col1 AS INTEGER ) AS col1 FROM tab1 cor0
----
-54
-67
23

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col0 * - cor0.col1 col2 FROM tab0 AS cor0
----
-2064
-3395
-8099

query I rowsort
SELECT + + col0 + col1 - col2 FROM tab2 AS cor0
----
11
111
58

skipif mysql # not compatible
query I rowsort
SELECT - col0 * + CAST ( col0 AS REAL ) + cor0.col0 AS col1 FROM tab1 cor0
----
-4032
-6
-6320

query I rowsort
SELECT DISTINCT - col1 + 71 FROM tab2 AS cor0
----
12
40
54

query I rowsort
SELECT DISTINCT + - col0 + + col2 FROM tab2 AS cor0
----
-41
-52
20

query I rowsort
SELECT + col1 * + col2 + + col0 AS col0 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT ALL - - col0 + + 67 * 97 + - col2 AS col0 FROM tab2 AS cor0
----
6479
6540
6551

query I rowsort
SELECT DISTINCT + + col1 * col1 * - col0 + col2 AS col1 FROM tab2 AS cor0
----
-22793
-271492
-6700

query I rowsort
SELECT - col1 - col1 AS col2 FROM tab2
----
-118
-34
-62

query I rowsort
SELECT ALL col1 * + col0 + col2 AS col2 FROM tab2
----
1381
244
4628

query III rowsort
SELECT * FROM tab0 WHERE - col2 IN ( col1 * - col1 + col2 )
----

query I rowsort
SELECT tab2.col2 * - tab2.col2 AS col1 FROM tab2
----
-1444
-676
-729

query I rowsort
SELECT ALL col0 FROM tab0 WHERE NOT NULL NOT BETWEEN col0 AND ( + col2 )
----

query I rowsort
SELECT ALL + col2 + col0 * col0 * + col2 FROM tab2
----
1350
158210
237196

query I rowsort
SELECT - col2 + col1 AS col0 FROM tab1
----
-28
-47
-83

query I rowsort
SELECT DISTINCT col0 * - col1 + - tab2.col0 * + col1 FROM tab2
----
-2686
-434
-9204

query I rowsort
SELECT ALL + tab0.col0 - - col0 FROM tab0
----
178
48
70

query I rowsort
SELECT col0 + col2 * col0 * col0 FROM tab1
----
233536
489
614480

query I rowsort
SELECT + col0 + - col1 * - col0 FROM tab2
----
1422
224
4680

query I rowsort
SELECT tab0.col1 * - col0 - + tab0.col0 FROM tab0
----
-2088
-3430
-8188

query I rowsort
SELECT DISTINCT - col0 - - tab2.col1 FROM tab2
----
-19
-62
24

query I rowsort
SELECT + cor1.col0 AS col1 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 9fc1dcd76feaf43e5c5dc060a02014cd

query I rowsort
SELECT - 5 AS col1 FROM tab1 AS cor0
----
-5
-5
-5

query I rowsort
SELECT ALL + cor0.col1 * col1 + 43 AS col0 FROM tab1 AS cor0
----
143
212
719

query I rowsort
SELECT ALL - - col0 * col2 + col1 + col0 AS col0 FROM tab1 AS cor0
----
191
3722
7773

query I rowsort
SELECT ALL + 37 AS col0 FROM tab1 AS cor0
----
37
37
37

query I rowsort
SELECT DISTINCT ( col1 ) FROM tab1 cor0
----
10
13
26

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col0 + col1 col2 FROM tab0
----
2
62

query I rowsort
SELECT DISTINCT col2 * + col0 + col1 FROM tab1 WHERE NULL >= col0
----

query I rowsort
SELECT DISTINCT + + 24 + + cor0.col1 FROM tab1 cor0
----
34
37
50

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col1 col1 FROM tab1, tab0 AS cor0
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT DISTINCT cor0.col0 AS col2 FROM tab0, tab0 AS cor0
----
24
35
89

query I rowsort
SELECT ALL - col0 * col0 * + col0 + - col2 * col2 AS col2 FROM tab0
----
-14913
-42876
-711693

query I rowsort
SELECT col2 + + col2 * col2 AS col0 FROM tab1
----
2970
3306
9312

query I rowsort
SELECT ALL + col1 + tab0.col2 * + col2 FROM tab0
----
1175
6815
98

query III rowsort
SELECT * FROM tab0 WHERE NOT NULL NOT IN ( col2 + col0 )
----

query I rowsort
SELECT ALL + col0 * + col2 * 6 AS col0 FROM tab1 AS cor0
----
21888
46080
972

query I rowsort
SELECT DISTINCT + + col1 + col0 AS col0 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT - - ( - col0 ) + 98 * col0 FROM tab1 AS cor0
----
291
6208
7760

onlyif mysql # use DIV operator for integer division
query I rowsort label-6297
SELECT DISTINCT - col2 + - col0 DIV col0 FROM tab0 AS cor0
----
-2
-34
-83

skipif mysql # not compatible
query I rowsort label-6297
SELECT DISTINCT - col2 + - col0 / col0 FROM tab0 AS cor0
----
-2
-34
-83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col0 + - cor0.col0 - - ( + col1 ) * - col2 col1 FROM tab2 AS cor0
----
-1534
-646
-837

query I rowsort
SELECT ALL - 25 - cor0.col0 AS col2 FROM tab0 AS cor0
----
-114
-49
-60

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6300
SELECT ALL + 25 + col0 * CAST( cor0.col1 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
2089
3420
8124

skipif mysql # not compatible
query I rowsort label-6300
SELECT ALL + 25 + col0 * CAST ( cor0.col1 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
2089
3420
8124

onlyif mysql # use DIV operator for integer division
query I rowsort label-6301
SELECT col2 DIV cor0.col1 AS col2 FROM tab0 AS cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6301
SELECT col2 / cor0.col1 AS col2 FROM tab0 AS cor0
----
0
0
0

query I rowsort
SELECT + 94 * - col1 AS col0 FROM tab1 AS cor0
----
-1222
-2444
-940

query I rowsort
SELECT 62 AS col0 FROM tab2, tab0 AS cor0, tab1 AS cor1
----
27 values hashing to 4911b1417a3797d23dd8f38b6ed05c1b

query IIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0 WHERE ( NULL ) < NULL
----

query I rowsort
SELECT ALL + col2 * col0 * col0 AS col2 FROM tab1
----
233472
486
614400

query I rowsort
SELECT - 86 * - ( + cor0.col1 ) + + 8 FROM tab1 AS cor0
----
1126
2244
868

query I rowsort
SELECT + - 23 + cor0.col0 * + col1 FROM tab0 AS cor0
----
2041
3372
8076

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 79 col0 FROM tab2 AS cor0
----
79

query I rowsort
SELECT + 20 FROM tab2
----
20
20
20

query I rowsort
SELECT DISTINCT - col0 * + 47 * col2 AS col0 FROM tab0
----
-1645
-343006
-37224

query I rowsort
SELECT + ( col2 ) * - col2 FROM tab0
----
-1
-1089
-6724

query I rowsort
SELECT 71 + ( - tab2.col0 + + col0 ) FROM tab2
----
71
71
71

query I rowsort
SELECT ALL + 31 + + 86 * + col1 FROM tab2 AS cor0
----
1493
2697
5105

query I rowsort
SELECT DISTINCT - - ( - cor0.col1 ) + - cor0.col1 AS col1 FROM tab2 AS cor0
----
-118
-34
-62

query I rowsort
SELECT + - col0 * + 84 AS col2 FROM tab0 AS cor0
----
-2016
-2940
-7476

query I rowsort
SELECT - col0 + 62 * - col0 AS col2 FROM tab0 AS cor0
----
-1512
-2205
-5607

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6317
SELECT + ( - col0 ) + col1 * CAST( 7 AS SIGNED ) FROM tab2 AS cor0
----
210
335
40

skipif mysql # not compatible
query I rowsort label-6317
SELECT + ( - col0 ) + col1 * CAST ( 7 AS INTEGER ) FROM tab2 AS cor0
----
210
335
40

query I rowsort
SELECT DISTINCT + + 3 AS col1 FROM tab0 AS cor0
----
3

query I rowsort
SELECT + col2 * 84 AS col2 FROM tab1
----
4536
4788
8064

query I rowsort
SELECT + ( col2 ) * + col0 FROM tab2
----
189
2028
3002

onlyif mysql # use DIV operator for integer division
query I rowsort label-6321
SELECT col2 DIV - ( + 9 ) + col2 FROM tab1 AS cor0
----
48
51
86

skipif mysql # not compatible
query I rowsort label-6321
SELECT col2 / - ( + 9 ) + col2 FROM tab1 AS cor0
----
48
51
86

query I rowsort
SELECT + - col0 * - 27 + - col0 FROM tab2 AS cor0
----
182
2028
2054

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + cor0.col0 - 91 col2 FROM tab1 cor0
----
-11
-27
-88

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 + 80 FROM tab0, tab2 AS cor0
----
9 values hashing to 878f012d707aab113cedaf56e6c52e94

query I rowsort
SELECT - 84 + + 54 * cor0.col2 FROM tab2 cor0
----
1320
1374
1968

query I rowsort
SELECT DISTINCT + + 90 * cor0.col2 * col0 + - ( + 85 ) AS col0 FROM tab0 AS cor0
----
3065
656735
71195

query I rowsort
SELECT DISTINCT + ( col0 ) + + cor0.col0 * cor0.col0 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT DISTINCT + cor0.col0 + 58 * col2 + + ( col1 ) FROM tab0 AS cor0
----
190
2024
4936

query I rowsort
SELECT ( + col2 ) + + col2 FROM tab1 AS cor0
----
108
114
192

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6331
SELECT ALL + col0 - CAST( NULL AS DECIMAL ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6331
SELECT ALL + col0 - CAST ( NULL AS REAL ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT ALL 73 * + 60 FROM tab2
----
4380
4380
4380

query I rowsort
SELECT ALL + - 68 FROM tab2, tab2 cor0, tab0, tab1 cor1
----
81 values hashing to 3a5c3d9872a8a4148ab98ed0ab0a6c62

query I rowsort
SELECT ALL 7 AS col0 FROM tab0, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 4e72e9e33dacac757f48d0ce46094607

query I rowsort
SELECT DISTINCT tab2.col1 AS col2 FROM tab2, tab0, tab2 cor0
----
17
31
59

query I rowsort
SELECT 62 * + col1 AS col1 FROM tab1 AS cor0
----
1612
620
806

query I rowsort
SELECT DISTINCT - 31 AS col1 FROM tab1
----
-31

query I rowsort
SELECT + col1 + - col0 * + 60 * + col1 FROM tab0 AS cor0
----
-123754
-203603
-485849

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6339
SELECT ALL - + col2 + CAST( NULL AS DECIMAL ) * - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6339
SELECT ALL - + col2 + CAST ( NULL AS REAL ) * - col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 78 AS col1 FROM tab2 AS cor0 CROSS JOIN tab0 AS cor1
----
78

query I rowsort
SELECT DISTINCT 96 * col2 FROM tab1
----
5184
5472
9216

query I rowsort
SELECT DISTINCT + + 97 * 11 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
1067

query I rowsort
SELECT col1 + col1 * - col2 FROM tab1
----
-1235
-1378
-560

query I rowsort
SELECT - ( + tab2.col2 ) AS col2 FROM tab2, tab1 AS cor0
----
9 values hashing to 7b5938124253798426fbf09c18e1fd75

query I rowsort
SELECT + col0 * - col1 * col2 - - col0 AS col0 FROM tab1
----
-36416
-4209
-99760

onlyif mysql # use DIV operator for integer division
query I rowsort label-6346
SELECT col1 + col1 DIV + col1 AS col1 FROM tab0
----
87
92
98

skipif mysql # not compatible
query I rowsort label-6346
SELECT col1 + col1 / + col1 AS col1 FROM tab0
----
87
92
98

query I rowsort
SELECT ALL - + col1 + + col0 * - col2 AS col2 FROM tab0 cor0
----
-132
-7389
-878

query I rowsort
SELECT DISTINCT col2 * + 83 AS col0 FROM tab2 AS cor0
----
2158
2241
3154

query I rowsort
SELECT ALL - + col0 + 50 * col2 FROM tab1 AS cor0
----
2697
2786
4720

query I rowsort
SELECT + - col0 * + 96 FROM tab0 AS cor0
----
-2304
-3360
-8544

query I rowsort
SELECT ALL + col1 * - col2 + col0 FROM tab2
----
-1456
-567
-830

query I rowsort
SELECT ALL + 59 + 68 * col1 FROM tab2
----
1215
2167
4071

query I rowsort
SELECT ALL col2 + - 12 FROM tab0
----
-11
21
70

query I rowsort
SELECT - cor0.col2 * - col0 + col1 FROM tab2 AS cor0
----
2087
220
3019

onlyif mysql # use DIV operator for integer division
query I rowsort label-6355
SELECT - col2 * + 31 + col2 DIV + col1 AS col2 FROM tab1 cor0
----
-1672
-1762
-2969

skipif mysql # not compatible
query I rowsort label-6355
SELECT - col2 * + 31 + col2 / + col1 AS col2 FROM tab1 cor0
----
-1672
-1762
-2969

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6356
SELECT + - CAST( NULL AS SIGNED ) / cor0.col0 + col1 col1 FROM tab2 cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6356
SELECT + - CAST ( NULL AS INTEGER ) / cor0.col0 + col1 col1 FROM tab2 cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 + + cor0.col2 * col2 FROM tab1 cor0
----
2890
3239
9203

query I rowsort
SELECT DISTINCT - 44 * + col2 AS col0 FROM tab2 AS cor0
----
-1144
-1188
-1672

query I rowsort
SELECT ALL - 39 AS col0 FROM tab2 AS cor0
----
-39
-39
-39

onlyif mysql # use DIV operator for integer division
query I rowsort label-6360
SELECT ALL + cor0.col0 DIV + cor0.col1 + + col1 col2 FROM tab2 AS cor0
----
21
31
60

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6360
SELECT ALL + cor0.col0 / + cor0.col1 + + col1 col2 FROM tab2 AS cor0
----
21
31
60

query I rowsort
SELECT ALL - 23 * col2 + ( 21 ) * col0 FROM tab0 AS cor0
----
-17
-255
712

query I rowsort
SELECT - - 88 * - col1 AS col0 FROM tab1 AS cor0
----
-1144
-2288
-880

query I rowsort
SELECT + + cor0.col0 * col2 AS col0 FROM tab2 cor0
----
189
2028
3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 32 * col2 col1 FROM tab2 AS cor0
----
1216
832
864

query I rowsort
SELECT + tab1.col1 * tab1.col2 * - col2 AS col0 FROM tab1
----
-119808
-32490
-75816

query I rowsort
SELECT DISTINCT col0 + col2 * + ( - cor0.col1 ) AS col2 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT - 28 + col0 FROM tab0 AS cor0
----
-4
61
7

onlyif mysql # use DIV operator for integer division
query I rowsort label-6368
SELECT DISTINCT + col2 + - col2 - - col1 DIV + col1 FROM tab2 AS cor0
----
1

skipif mysql # not compatible
query I rowsort label-6368
SELECT DISTINCT + col2 + - col2 - - col1 / + col1 FROM tab2 AS cor0
----
1

query I rowsort
SELECT ALL col0 * col2 + ( - 3 ) FROM tab0 AS cor0
----
32
7295
789

query I rowsort
SELECT + 2 * 36 AS col0 FROM tab0 cor0
----
72
72
72

query I rowsort
SELECT DISTINCT - + 88 AS col0 FROM tab2 AS cor0
----
-88

query I rowsort
SELECT ALL ( + 87 ) FROM tab2 AS cor0
----
87
87
87

query IIIIII rowsort
SELECT ALL * FROM tab2, tab2 AS cor0 WHERE NULL = NULL
----

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab1 AS cor2
----
972 values hashing to cee640567b2a4ba7d97109d5025bf4d9

query I rowsort
SELECT ALL + 4 FROM tab0, tab2 cor0, tab2 cor1
----
27 values hashing to 730dff78e83112374961ea711f98ebaa

query I rowsort
SELECT DISTINCT + col0 * - 59 AS col0 FROM tab0
----
-1416
-2065
-5251

onlyif mysql # use DIV operator for integer division
query I rowsort label-6377
SELECT + col0 DIV col2 + + col1 FROM tab1
----
11
13
26

skipif mysql # not compatible
query I rowsort label-6377
SELECT + col0 / col2 + + col1 FROM tab1
----
11
13
26

query I rowsort
SELECT - cor0.col2 FROM tab2, tab1, tab1 AS cor0
----
27 values hashing to 44fdcd7cd603352d4d127811d164cc1e

query I rowsort
SELECT - cor0.col0 * + col0 AS col1 FROM tab2 AS cor0
----
-49
-6084
-6241

query I rowsort
SELECT col2 * col1 + col0 AS col1 FROM tab1 AS cor0
----
1328
1407
634

query I rowsort
SELECT 87 * - 48 + + col2 * ( col2 ) AS col2 FROM tab1
----
-1260
-927
5040

query I rowsort
SELECT - 31 + + col2 * 14 AS col2 FROM tab0
----
-17
1117
431

query I rowsort
SELECT + col2 + - col0 * col0 AS col1 FROM tab2 AS cor0
----
-22
-6058
-6203

query I rowsort
SELECT col0 * - 60 AS col2 FROM tab0 AS cor0
----
-1440
-2100
-5340

query I rowsort
SELECT ALL - cor0.col0 + col0 * col2 FROM tab2 AS cor0
----
182
1950
2923

query I rowsort
SELECT + + col1 + - ( - col1 ) * + col0 FROM tab1 AS cor0
----
104
1053
650

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6387
SELECT + col1 * + CAST( NULL AS DECIMAL ) col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6387
SELECT + col1 * + CAST ( NULL AS REAL ) col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6388
SELECT DISTINCT + col0 * col1 + - CAST( NULL AS SIGNED ) + - 35 / + col0 FROM tab0
----
NULL

skipif mysql # not compatible
query I rowsort label-6388
SELECT DISTINCT + col0 * col1 + - CAST ( NULL AS INTEGER ) + - 35 / + col0 FROM tab0
----
NULL

query I rowsort
SELECT DISTINCT col0 * + col2 * - tab2.col2 AS col0 FROM tab2
----
-114076
-5103
-52728

query I rowsort
SELECT + col2 * + 81 + 19 FROM tab1
----
4393
4636
7795

query I rowsort
SELECT DISTINCT + + col2 * + col1 AS col2 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT ALL + col1 + ( cor0.col1 ) * col2 AS col2 FROM tab2 AS cor0
----
1593
663
868

query I rowsort
SELECT DISTINCT col1 + - 40 FROM tab0 cor0
----
46
51
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col0 * col2 * + col2 col1 FROM tab0 AS cor0
----
-26136
-35
-598436

query I rowsort
SELECT DISTINCT + col1 + + cor0.col0 AS col2 FROM tab1 AS cor0
----
29
74
93

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6396
SELECT DISTINCT + - col2 * + CAST( NULL AS SIGNED ) col1 FROM tab0 AS cor0
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6396
SELECT DISTINCT + - col2 * + CAST ( NULL AS INTEGER ) col1 FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT DISTINCT - col0 * + col0 * 7 AS col2 FROM tab1 AS cor0
----
-28672
-44800
-63

query I rowsort
SELECT + cor0.col0 + col1 * - 73 AS col1 FROM tab2 AS cor0
----
-1162
-2256
-4229

query I rowsort
SELECT col1 + ( - 88 ) * + col1 AS col2 FROM tab0 AS cor0
----
-7482
-7917
-8439

query I rowsort
SELECT ALL + - col1 + cor0.col2 FROM tab2 AS cor0
----
-33
-4
21

onlyif mysql # use DIV operator for integer division
query I rowsort label-6401
SELECT + - col0 DIV + ( - col0 ) AS col0 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6401
SELECT + - col0 / + ( - col0 ) AS col0 FROM tab1 cor0
----
1
1
1

query I rowsort
SELECT tab1.col2 * - 58 FROM tab1
----
-3132
-3306
-5568

onlyif mysql # use DIV operator for integer division
query I rowsort label-6403
SELECT DISTINCT + col1 DIV + ( + 76 ) col1 FROM tab1
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6403
SELECT DISTINCT + col1 / + ( + 76 ) col1 FROM tab1
----
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6404
SELECT + col2 DIV ( col1 ) + col2 * col1 col0 FROM tab2
----
1534
648
837

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6404
SELECT + col2 / ( col1 ) + col2 * col1 col0 FROM tab2
----
1534
648
837

query I rowsort
SELECT - 1 FROM tab2, tab0 AS cor0
----
9 values hashing to 60fdd6924bb763d6aca00ba74935ef4b

query I rowsort
SELECT col1 + 62 FROM tab2
----
121
79
93

onlyif mysql # use DIV operator for integer division
query I rowsort label-6407
SELECT DISTINCT + col0 DIV col2 + + col0 * - col0 FROM tab0 AS cor0
----
-1190
-576
-7920

skipif mysql # not compatible
query I rowsort label-6407
SELECT DISTINCT + col0 / col2 + + col0 * - col0 FROM tab0 AS cor0
----
-1190
-576
-7920

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6408
SELECT ALL col1 * + CAST( NULL AS SIGNED ) + - col2 * col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6408
SELECT ALL col1 * + CAST ( NULL AS INTEGER ) + - col2 * col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + cor0.col0 + cor0.col0 AS col2 FROM tab2 AS cor0
----
14
156
158

query I rowsort
SELECT DISTINCT + 18 + ( - col0 ) * col0 * + cor0.col0 FROM tab1 AS cor0
----
-262126
-511982
-9

onlyif mysql # use DIV operator for integer division
query I rowsort label-6411
SELECT + ( cor0.col1 ) DIV + col0 AS col1 FROM tab0 AS cor0
----
1
2
3

skipif mysql # not compatible
query I rowsort label-6411
SELECT + ( cor0.col1 ) / + col0 AS col1 FROM tab0 AS cor0
----
1
2
3

query I rowsort
SELECT ALL col0 * col0 * - tab0.col1 FROM tab0
----
-118825
-49536
-720811

query I rowsort
SELECT DISTINCT - 57 * - 93 FROM tab0 AS cor0
----
5301

query I rowsort
SELECT - ( col0 ) * col1 FROM tab2 AS cor0
----
-1343
-217
-4602

onlyif mysql # use DIV operator for integer division
query I rowsort label-6415
SELECT ALL + col1 DIV - ( col0 ) AS col0 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-6415
SELECT ALL + col1 / - ( col0 ) AS col0 FROM tab0 AS cor0
----
-1
-2
-3

query I rowsort
SELECT + + 7 * + col1 FROM tab2 AS cor0
----
119
217
413

query I rowsort
SELECT - 61 + cor0.col0 FROM tab0 AS cor0
----
-26
-37
28

query I rowsort
SELECT + tab2.col0 * 17 AS col0 FROM tab2
----
119
1326
1343

query I rowsort
SELECT col0 * 2 * + col2 + - col2 * col1 FROM tab0 AS cor0
----
-1254
-27
7134

query I rowsort
SELECT ALL - col1 * col0 + cor0.col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT DISTINCT 60 * col0 AS col1 FROM tab2 AS cor0
----
420
4680
4740

query I rowsort
SELECT DISTINCT 22 AS col0 FROM tab1 AS cor0
----
22

query I rowsort
SELECT + 45 + col2 AS col2 FROM tab2 AS cor0
----
71
72
83

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + col1 - col2 * col2 * + col2 col1 FROM tab2 AS cor0
----
-17635
-19714
-54889

query I rowsort
SELECT - cor0.col0 + + col2 * - 22 AS col0 FROM tab2 AS cor0
----
-601
-650
-915

query I rowsort
SELECT ALL + + cor0.col0 * col0 AS col1 FROM tab2 AS cor0
----
49
6084
6241

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + - ( - col0 ) - 76 * col1 col1 FROM tab1 AS cor0
----
-1973
-696
-908

query I rowsort
SELECT 27 + col0 FROM tab2 AS cor0
----
105
106
34

query I rowsort
SELECT DISTINCT col1 * col1 + + 37 * col2 AS col0 FROM tab0 AS cor0
----
11315
8617
9446

query I rowsort
SELECT DISTINCT + - ( + col1 ) + + col0 * col0 - - col1 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT DISTINCT + col0 - - col2 AS col2 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT DISTINCT col2 * col0 * col1 + - 44 * cor0.col2 FROM tab0 AS cor0
----
3351
660510
66660

query I rowsort
SELECT + - col0 * - 37 - col1 FROM tab2 AS cor0
----
228
2827
2906

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6434
SELECT + - col0 * - CAST( 41 AS SIGNED ) + - col2 * CAST( NULL AS SIGNED ) + - cor0.col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6434
SELECT + - col0 * - CAST ( 41 AS INTEGER ) + - col2 * CAST ( NULL AS INTEGER ) + - cor0.col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + col1 + col2 * col2 FROM tab2
----
1461
735
760

query I rowsort
SELECT - col2 * col2 + - cor0.col1 AS col1 FROM tab0 AS cor0
----
-1175
-6815
-98

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 col1 FROM tab1 cor0
----
-54
-57
-96

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6438
SELECT - - CAST( NULL AS SIGNED ) * + ( + col2 + + 73 ) * cor0.col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6438
SELECT - - CAST ( NULL AS INTEGER ) * + ( + col2 + + 73 ) * cor0.col2 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + - 21 * col1 + 41 FROM tab2 AS cor0
----
-1198
-316
-610

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col1 - + col1 col0 FROM tab0 AS cor0
----
-172
-182
-194

onlyif mysql # use DIV operator for integer division
query I rowsort label-6441
SELECT - col0 DIV + col0 - col1 FROM tab2 cor0
----
-18
-32
-60

skipif mysql # not compatible
query I rowsort label-6441
SELECT - col0 / + col0 - col1 FROM tab2 cor0
----
-18
-32
-60

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col2 * col1 + col2 col0 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT DISTINCT col1 - - col1 AS col2 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT DISTINCT + 60 AS col2 FROM tab0
----
60

onlyif mysql # use DIV operator for integer division
query I rowsort label-6445
SELECT + col0 * - 47 + col0 DIV + col2 AS col0 FROM tab1 AS cor0
----
-141
-3007
-3760

skipif mysql # not compatible
query I rowsort label-6445
SELECT + col0 * - 47 + col0 / + col2 AS col0 FROM tab1 AS cor0
----
-141
-3007
-3760

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + 96 col2 FROM tab0 AS cor0
----
182
187
193

query I rowsort
SELECT DISTINCT 71 AS col1 FROM tab2, tab2 cor0
----
71

skipif mysql # not compatible
query I rowsort
SELECT - + CAST ( 34 AS REAL ) FROM tab2 AS cor0
----
-34
-34
-34

query I rowsort
SELECT DISTINCT - col0 + - 80 + ( - col1 ) * ( + 66 ) FROM tab2 AS cor0
----
-1281
-2133
-4052

query I rowsort
SELECT ALL - - col2 - + 19 FROM tab0 AS cor0
----
-18
14
63

query I rowsort
SELECT DISTINCT + 80 FROM tab0, tab2 cor0
----
80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col2 col1 FROM tab2, tab1 AS cor0, tab1 AS cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT DISTINCT + cor0.col0 + + 42 FROM tab0 AS cor0
----
131
66
77

query I rowsort
SELECT ALL + 83 * - cor0.col0 FROM tab1 AS cor0
----
-249
-5312
-6640

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6455
SELECT DISTINCT + col2 + - CAST( + col0 AS SIGNED ) * - col0 FROM tab2
----
6110
6279
76

skipif mysql # not compatible
query I rowsort label-6455
SELECT DISTINCT + col2 + - CAST ( + col0 AS INTEGER ) * - col0 FROM tab2
----
6110
6279
76

skipif mysql # not compatible
query I rowsort
SELECT ALL col0 * - CAST ( col0 AS REAL ) FROM tab0
----
-1225
-576
-7921

query I rowsort
SELECT - col1 * - ( cor0.col1 ) AS col2 FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT DISTINCT - ( col2 ) * col1 FROM tab0 AS cor0
----
-2838
-7462
-97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6459
SELECT - + col2 * + ( + col1 ) DIV col1 AS col2 FROM tab2 AS cor0
----
-26
-27
-38

skipif mysql # not compatible
query I rowsort label-6459
SELECT - + col2 * + ( + col1 ) / col1 AS col2 FROM tab2 AS cor0
----
-26
-27
-38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col2 * - col0 col2 FROM tab2
----
-189
-2028
-3002

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * col1 col2 FROM tab1
----
-100
-169
-676

query I rowsort
SELECT col1 + col2 * - col1 AS col0 FROM tab2 AS cor0
----
-1475
-629
-806

query I rowsort
SELECT - - 54 FROM tab2, tab2 cor0
----
9 values hashing to d2364c4ffc09ac2cf1f6fa4d767d8b09

query I rowsort
SELECT + + ( col0 ) * - col1 + col0 AS col2 FROM tab2 AS cor0
----
-1264
-210
-4524

query I rowsort
SELECT - 49 * col2 + - tab0.col0 * + col0 * - col1 FROM tab0
----
118776
47919
716793

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - col2 col1 FROM tab0
----
0
0
0

query I rowsort
SELECT DISTINCT tab1.col0 - col0 AS col0 FROM tab1
----
0

query I rowsort
SELECT ALL + col2 - - col0 AS col0 FROM tab2
----
104
117
34

query I rowsort
SELECT col0 * 28 AS col2 FROM tab2 cor0
----
196
2184
2212

query I rowsort
SELECT + + col2 + - col2 * - col1 AS col0 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT tab2.col1 * - tab2.col0 * + tab2.col1 FROM tab2
----
-22831
-271518
-6727

query I rowsort
SELECT + cor0.col0 + cor0.col2 * col1 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT ALL + col0 * - col0 AS col0 FROM tab0 AS cor0
----
-1225
-576
-7921

query I rowsort
SELECT ALL + cor0.col2 + ( col1 ) AS col2 FROM tab2 AS cor0
----
55
58
85

query I rowsort
SELECT ALL - + col1 * ( col0 ) - col0 FROM tab2 AS cor0
----
-1422
-224
-4680

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6476
SELECT col1 + - CAST( NULL AS DECIMAL ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6476
SELECT col1 + - CAST ( NULL AS REAL ) AS col2 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + cor0.col0 * cor0.col0 * 17 + col0 AS col0 FROM tab0 cor0
----
134746
20860
9816

query I rowsort
SELECT ALL - cor0.col1 + - col2 FROM tab0 cor0
----
-119
-173
-98

query I rowsort
SELECT DISTINCT - + col2 - - cor0.col2 AS col2 FROM tab1 cor0
----
0

query I rowsort
SELECT DISTINCT col2 * col0 + + col1 AS col2 FROM tab2 AS cor0
----
2087
220
3019

query I rowsort
SELECT + col1 * - cor0.col1 + - col2 FROM tab2 cor0
----
-327
-3507
-988

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6482
SELECT DISTINCT CAST( NULL AS DECIMAL ) FROM tab0, tab2 AS cor0, tab2 AS cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-6482
SELECT DISTINCT CAST ( NULL AS REAL ) FROM tab0, tab2 AS cor0, tab2 AS cor1
----
NULL

query I rowsort
SELECT DISTINCT + - col2 - cor0.col0 FROM tab1 AS cor0
----
-121
-176
-57

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6484
SELECT + ( col2 * CAST( NULL AS SIGNED ) ) AS col2 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6484
SELECT + ( col2 * CAST ( NULL AS INTEGER ) ) AS col2 FROM tab1
----
NULL
NULL
NULL

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6485
SELECT 5 + col2 * + CAST( NULL AS SIGNED ) AS col1 FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6485
SELECT 5 + col2 * + CAST ( NULL AS INTEGER ) AS col1 FROM tab2
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6486
SELECT col0 DIV + col1 + col0 AS col1 FROM tab2 cor0
----
7
79
83

skipif mysql # not compatible
query I rowsort label-6486
SELECT col0 / + col1 + col0 AS col1 FROM tab2 cor0
----
7
79
83

query I rowsort
SELECT - 66 * - col1 FROM tab0 AS cor0
----
5676
6006
6402

onlyif mysql # use DIV operator for integer division
query I rowsort label-6488
SELECT ALL + + col2 DIV - col0 AS col0 FROM tab2 cor0
----
-3
0
0

skipif mysql # not compatible
query I rowsort label-6488
SELECT ALL + + col2 / - col0 AS col0 FROM tab2 cor0
----
-3
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6489
SELECT DISTINCT + col0 * cor0.col0 DIV ( col1 ) FROM tab2 AS cor0
----
1
103
367

skipif mysql # not compatible
query I rowsort label-6489
SELECT DISTINCT + col0 * cor0.col0 / ( col1 ) FROM tab2 AS cor0
----
1
103
367

query I rowsort
SELECT 81 + - col0 * + col2 FROM tab1 AS cor0
----
-3567
-7599
-81

query I rowsort
SELECT ALL 17 FROM tab2
----
17
17
17

query I rowsort
SELECT ALL - - col1 + - col2 AS col1 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 + col1 + + ( - 88 ) FROM tab1 AS cor0
----
-62
-75
-78

query I rowsort
SELECT DISTINCT col0 * cor0.col2 FROM tab0 AS cor0
----
35
7298
792

query I rowsort
SELECT ALL + - col1 + - col2 + 39 AS col0 FROM tab1 cor0
----
-28
-41
-70

query I rowsort
SELECT DISTINCT col1 * col1 + 69 AS col1 FROM tab1 AS cor0
----
169
238
745

query I rowsort
SELECT - 37 * col0 + - col2 FROM tab1
----
-165
-2425
-3056

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-6500
SELECT DISTINCT + 87 DIV - cor0.col1 AS col1 FROM tab0 AS cor0
----
-1
0

skipif mysql # not compatible
query I rowsort label-6500
SELECT DISTINCT + 87 / - cor0.col1 AS col1 FROM tab0 AS cor0
----
-1
0

query I rowsort
SELECT + ( 68 ) + + col0 * 70 * + cor0.col2 FROM tab0 AS cor0
----
2518
510928
55508

query I rowsort
SELECT DISTINCT - cor0.col0 * col0 AS col0 FROM tab1 AS cor0
----
-4096
-6400
-9

query I rowsort
SELECT DISTINCT - + 75 AS col0 FROM tab1 AS cor0
----
-75

query I rowsort
SELECT col0 - 43 AS col1 FROM tab0 AS cor0
----
-19
-8
46

query I rowsort
SELECT 94 - ( col0 ) FROM tab1 AS cor0
----
14
30
91

query I rowsort
SELECT ALL + 81 + cor0.col0 FROM tab0 AS cor0
----
105
116
170

query I rowsort
SELECT DISTINCT - + col2 * col0 * col0 AS col0 FROM tab1 AS cor0
----
-233472
-486
-614400

onlyif mysql # use DIV operator for integer division
query I rowsort label-6508
SELECT - 96 DIV + col0 + + col0 - + col2 DIV ( + cor0.col1 ) AS col0 FROM tab1 AS cor0
----
-31
58
72

skipif mysql # not compatible
query I rowsort label-6508
SELECT - 96 / + col0 + + col0 - + col2 / ( + cor0.col1 ) AS col0 FROM tab1 AS cor0
----
-31
58
72

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6509
SELECT CAST( NULL AS SIGNED ) + 72 / 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-6509
SELECT CAST ( NULL AS INTEGER ) + 72 / col1 col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort
SELECT col2 * 46 * + tab0.col0 + col1 - CAST ( 46 AS REAL ) AS col2 FROM tab0
----
1661
335753
36472

query I rowsort
SELECT DISTINCT tab2.col0 + + col1 - col2 AS col1 FROM tab2
----
11
111
58

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6512
SELECT DISTINCT - col1 - - CAST( NULL AS SIGNED ) * - col1 FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-6512
SELECT DISTINCT - col1 - - CAST ( NULL AS INTEGER ) * - col1 FROM tab1
----
NULL

query I rowsort
SELECT - col1 + cor0.col0 AS col0 FROM tab0 AS cor0
----
-2
-62
-62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT ( - cor0.col2 ) * col2 col1 FROM tab2 AS cor0
----
-1444
-676
-729

query I rowsort
SELECT + 2 * 26 FROM tab0 AS cor0
----
52
52
52

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6516
SELECT ALL - + CAST( NULL AS SIGNED ) / - cor0.col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6516
SELECT ALL - + CAST ( NULL AS INTEGER ) / - cor0.col1 AS col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6517
SELECT ALL + col0 DIV + ( 62 ) FROM tab1
----
0
1
1

skipif mysql # not compatible
query I rowsort label-6517
SELECT ALL + col0 / + ( 62 ) FROM tab1
----
0
1
1

query I rowsort
SELECT DISTINCT + tab2.col1 * + tab2.col2 - + 21 AS col0 FROM tab2
----
1513
625
816

query I rowsort
SELECT DISTINCT - 74 + - col0 AS col2 FROM tab2
----
-152
-153
-81

query I rowsort
SELECT DISTINCT col0 + + 39 FROM tab0
----
128
63
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-6521
SELECT + + col1 DIV col1 FROM tab1 cor0
----
1
1
1

skipif mysql # not compatible
query I rowsort label-6521
SELECT + + col1 / col1 FROM tab1 cor0
----
1
1
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6522
SELECT ALL - CAST( NULL AS SIGNED ) * cor0.col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6522
SELECT ALL - CAST ( NULL AS INTEGER ) * cor0.col0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - ( - ( + col2 ) ) FROM tab1 AS cor0
----
54
57
96

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + ( - col1 ) + + col1 + - col2 * col1 col0 FROM tab0 AS cor0
----
-2666
-7280
97

query I rowsort
SELECT ALL - 15 + col0 - col1 FROM tab1 cor0
----
-38
39
52

query I rowsort
SELECT - 61 + - col2 AS col0 FROM tab1
----
-115
-118
-157

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6527
SELECT DISTINCT CAST( NULL AS SIGNED ) + col1 * col1 col0 FROM tab1
----
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6527
SELECT DISTINCT CAST ( NULL AS INTEGER ) + col1 * col1 col0 FROM tab1
----
NULL

query I rowsort
SELECT ALL + 55 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to 1626bd3008abd9f18cc88cdecf7b64d0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - ( - col1 ) + col0 * ( - col2 ) col0 FROM tab0
----
-706
-7207
62

query I rowsort
SELECT + + cor0.col2 + col1 * col1 AS col0 FROM tab2 AS cor0
----
327
3507
988

onlyif mysql # use DIV operator for integer division
query I rowsort label-6531
SELECT + 69 DIV cor0.col2 FROM tab0 AS cor0
----
0
2
69

skipif mysql # not compatible
query I rowsort label-6531
SELECT + 69 / cor0.col2 FROM tab0 AS cor0
----
0
2
69

onlyif mysql # use DIV operator for integer division
query I rowsort label-6532
SELECT - 63 DIV col0 + col1 - col0 * - col2 FROM tab2 cor0
----
2087
211
3019

skipif mysql # not compatible
query I rowsort label-6532
SELECT - 63 / col0 + col1 - col0 * - col2 FROM tab2 cor0
----
2087
211
3019

query I rowsort
SELECT - - 20 + col2 FROM tab1 AS cor0
----
116
74
77

query I rowsort
SELECT ALL - ( 91 ) FROM tab0
----
-91
-91
-91

query I rowsort
SELECT - ( + cor0.col0 ) + 79 FROM tab2 cor0
----
0
1
72

query I rowsort
SELECT + col1 * cor0.col1 + - col1 AS col1 FROM tab0 AS cor0
----
7310
8190
9312

query I rowsort
SELECT + + 49 + col2 FROM tab2 cor0
----
75
76
87

query I rowsort
SELECT DISTINCT - 0 * - col0 AS col0 FROM tab0 AS cor0
----
0

query I rowsort
SELECT - 44 AS col1 FROM tab0 AS cor0
----
-44
-44
-44

query I rowsort
SELECT 98 AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to f9dee8c21116f1aed64ac5160e190809

query I rowsort
SELECT DISTINCT - col1 * 14 FROM tab2 AS cor0
----
-238
-434
-826

query I rowsort
SELECT ALL - + col0 + col2 + - 10 FROM tab2 AS cor0
----
-51
-62
10

query I rowsort
SELECT ALL - cor0.col0 + + 39 AS col2 FROM tab1 AS cor0
----
-25
-41
36

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + + col2 + - 36 col1 FROM tab2 AS cor0
----
-10
-9
2

query I rowsort
SELECT ALL - col2 * col0 + 37 FROM tab1 AS cor0
----
-125
-3611
-7643

query I rowsort
SELECT DISTINCT + + col1 * + col2 - col1 * col2 FROM tab0 AS cor0
----
0

query I rowsort
SELECT DISTINCT - col1 * + cor0.col1 - 0 FROM tab2 AS cor0
----
-289
-3481
-961

query I rowsort
SELECT ALL - col1 * cor0.col1 + - 54 FROM tab1 cor0
----
-154
-223
-730

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 - + col2 col0 FROM tab2 AS cor0
----
-21
33
4

query I rowsort
SELECT ALL 33 * - col2 AS col1 FROM tab2 AS cor0
----
-1254
-858
-891

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6551
SELECT ALL + CAST( - col2 AS SIGNED ) + col1 AS col2 FROM tab0 AS cor0
----
53
9
96

skipif mysql # not compatible
query I rowsort label-6551
SELECT ALL + CAST ( - col2 AS INTEGER ) + col1 AS col2 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT DISTINCT - 45 FROM tab1 cor0
----
-45

query I rowsort
SELECT DISTINCT + 52 * col2 AS col1 FROM tab2 AS cor0
----
1352
1404
1976

query I rowsort
SELECT - + 3 * ( col0 ) FROM tab1 AS cor0
----
-192
-240
-9

query I rowsort
SELECT ALL + ( - 49 ) AS col0 FROM tab0 AS cor0
----
-49
-49
-49

query I rowsort
SELECT ALL + cor0.col1 AS col2 FROM tab1, tab2 cor0
----
9 values hashing to c61d27a0022e6d022371dc58819ab272

query I rowsort
SELECT - col2 * + col1 + + col2 * col2 AS col2 FROM tab0 AS cor0
----
-1749
-738
-96

query I rowsort
SELECT DISTINCT 35 AS col1 FROM tab0, tab2 cor0
----
35

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6559
SELECT + CAST( NULL AS SIGNED ) + - cor0.col0 AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6559
SELECT + CAST ( NULL AS INTEGER ) + - cor0.col0 AS col0 FROM tab2 cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6560
SELECT ALL + col2 * col1 DIV col0 FROM tab0
----
118
2
83

skipif mysql # not compatible
query I rowsort label-6560
SELECT ALL + col2 * col1 / col0 FROM tab0
----
118
2
83

query I rowsort
SELECT DISTINCT - 13 AS col0 FROM tab0 AS cor0
----
-13

onlyif mysql # use DIV operator for integer division
query I rowsort label-6562
SELECT ALL 99 + - col2 DIV - col1 FROM tab0 AS cor0
----
99
99
99

skipif mysql # not compatible
query I rowsort label-6562
SELECT ALL 99 + - col2 / - col1 FROM tab0 AS cor0
----
99
99
99

query I rowsort
SELECT DISTINCT 39 * + ( - col2 ) FROM tab2 AS cor0
----
-1014
-1053
-1482

onlyif mysql # use DIV operator for integer division
query I rowsort label-6564
SELECT DISTINCT + col0 * - col1 DIV col1 AS col0 FROM tab2
----
-7
-78
-79

skipif mysql # not compatible
query I rowsort label-6564
SELECT DISTINCT + col0 * - col1 / col1 AS col0 FROM tab2
----
-7
-78
-79

query I rowsort
SELECT + col2 * 83 AS col2 FROM tab2
----
2158
2241
3154

query I rowsort
SELECT ALL tab0.col0 + col1 * col2 FROM tab0
----
132
2862
7551

query I rowsort
SELECT ALL tab1.col2 * + 30 AS col0 FROM tab1, tab0, tab1 AS cor0
----
27 values hashing to 3b0c4deff159c1c1fc551c8e238b5f78

query I rowsort
SELECT + - col0 * + 2 FROM tab2 AS cor0
----
-14
-156
-158

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6569
SELECT CAST( col1 AS SIGNED ) * col2 AS col2 FROM tab1 cor0
----
1248
1404
570

skipif mysql # not compatible
query I rowsort label-6569
SELECT CAST ( col1 AS INTEGER ) * col2 AS col2 FROM tab1 cor0
----
1248
1404
570

query I rowsort
SELECT - + 88 + 19 * cor0.col0 FROM tab0 AS cor0
----
1603
368
577

query I rowsort
SELECT 32 * - cor0.col0 AS col1 FROM tab2 AS cor0
----
-224
-2496
-2528

onlyif mysql # use DIV operator for integer division
query I rowsort label-6572
SELECT ALL - - ( col0 ) DIV col2 AS col1 FROM tab1 cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6572
SELECT ALL - - ( col0 ) / col2 AS col1 FROM tab1 cor0
----
0
0
1

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6573
SELECT ALL - col2 * col2 + cor0.col0 + CAST( NULL AS SIGNED ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6573
SELECT ALL - col2 * col2 + cor0.col0 + CAST ( NULL AS INTEGER ) AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - 22 * col2 FROM tab0 AS cor0
----
-1804
-22
-726

query I rowsort
SELECT ALL col2 * - col1 * + 22 FROM tab0
----
-164164
-2134
-62436

query I rowsort
SELECT - col0 * col2 * - col0 FROM tab0
----
1225
19008
649522

query I rowsort
SELECT + 99 + + col2 AS col0 FROM tab2 AS cor0
----
125
126
137

query I rowsort
SELECT - col2 * cor0.col1 + + col2 AS col2 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT - 62 * + col2 + - cor0.col1 AS col0 FROM tab2 cor0
----
-1671
-1705
-2373

query I rowsort
SELECT - col0 - + col1 * - cor0.col1 AS col1 FROM tab0 cor0
----
7372
8192
9374

query I rowsort
SELECT DISTINCT - 13 FROM tab1, tab2 AS cor0
----
-13

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + cor0.col1 + 3 * + cor0.col0 col2 FROM tab0 AS cor0
----
158
202
358

query I rowsort
SELECT DISTINCT + col2 + ( 86 ) * + col2 FROM tab0 cor0
----
2871
7134
87

query I rowsort
SELECT cor0.col1 + col0 AS col0 FROM tab1 AS cor0
----
29
74
93

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + col2 * cor0.col2 + 78 col1 FROM tab0 AS cor0
----
1167
6802
79

query I rowsort
SELECT ALL + col1 * - 33 AS col2 FROM tab2 AS cor0
----
-1023
-1947
-561

onlyif mysql # use DIV operator for integer division
query I rowsort label-6587
SELECT ALL + col0 * - col0 - ( + col2 ) DIV + ( + cor0.col0 ) AS col1 FROM tab1 AS cor0
----
-27
-4096
-6401

skipif mysql # not compatible
query I rowsort label-6587
SELECT ALL + col0 * - col0 - ( + col2 ) / + ( + cor0.col0 ) AS col1 FROM tab1 AS cor0
----
-27
-4096
-6401

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * tab2.col0 + + col0 col1 FROM tab2
----
1422
224
4680

query I rowsort
SELECT ALL - col0 * + col2 * + cor0.col2 AS col2 FROM tab2 AS cor0
----
-114076
-5103
-52728

query I rowsort
SELECT + cor0.col2 + + col2 FROM tab2 AS cor0
----
52
54
76

query I rowsort
SELECT ALL + - col0 * - 23 AS col1 FROM tab0 AS cor0
----
2047
552
805

query I rowsort
SELECT + + col0 * + col0 + - col1 + col2 FROM tab0 cor0
----
1129
523
7912

query I rowsort
SELECT DISTINCT col1 * 2 FROM tab2 cor0
----
118
34
62

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6594
SELECT ALL - col0 / CAST( NULL AS SIGNED ) + 0 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6594
SELECT ALL - col0 / CAST ( NULL AS INTEGER ) + 0 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL - col1 * ( 76 ) - + col0 FROM tab1 AS cor0
----
-1068
-1979
-824

query I rowsort
SELECT DISTINCT - + col0 * + 60 AS col0 FROM tab2 AS cor0
----
-420
-4680
-4740

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 * col1 - col0 col0 FROM tab0 AS cor0
----
2814
62
7373

query I rowsort
SELECT ALL + + col1 * + 61 * ( + col1 ) + col1 AS col0 FROM tab2 AS cor0
----
17646
212400
58652

query I rowsort
SELECT ALL - 21 * col0 AS col0 FROM tab1 AS cor0
----
-1344
-1680
-63

query I rowsort
SELECT ALL col0 * + cor0.col2 + - col0 FROM tab1 AS cor0
----
159
3584
7600

query I rowsort
SELECT DISTINCT - + col1 + 72 FROM tab0 AS cor0
----
-14
-19
-25

onlyif mysql # use DIV operator for integer division
query I rowsort label-6602
SELECT ALL - 65 DIV - col2 - col0 FROM tab1 AS cor0
----
-2
-63
-80

skipif mysql # not compatible
query I rowsort label-6602
SELECT ALL - 65 / - col2 - col0 FROM tab1 AS cor0
----
-2
-63
-80

onlyif mysql # use DIV operator for integer division
query I rowsort label-6603
SELECT + col2 DIV + 71 FROM tab2 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-6603
SELECT + col2 / + 71 FROM tab2 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT - col0 + + col0 * col2 FROM tab0 AS cor0
----
0
7209
768

query I rowsort
SELECT 83 AS col0 FROM tab1, tab0 AS cor0
----
9 values hashing to 18f405c31a0fb47ce3cc9f7effa8855c

query I rowsort
SELECT - + col0 + - 0 * + col1 + col1 * - 20 FROM tab0 AS cor0
----
-1744
-1909
-1975

query I rowsort
SELECT DISTINCT col1 * col2 + 72 FROM tab1 AS cor0
----
1320
1476
642

query I rowsort
SELECT - + col2 + col0 * col0 AS col1 FROM tab1 cor0
----
-45
4039
6304

query I rowsort
SELECT + - 34 * col2 AS col1 FROM tab2 AS cor0
----
-1292
-884
-918

onlyif mysql # use DIV operator for integer division
query I rowsort label-6610
SELECT DISTINCT - 83 DIV col1 AS col1 FROM tab1 AS cor0
----
-3
-6
-8

skipif mysql # not compatible
query I rowsort label-6610
SELECT DISTINCT - 83 / col1 AS col1 FROM tab1 AS cor0
----
-3
-6
-8

query I rowsort
SELECT - - col1 * - col2 + + col1 * + col1 + cor0.col2 AS col2 FROM tab2 AS cor0
----
-319
151
1973

query I rowsort
SELECT ALL + + cor0.col2 * col1 * col0 FROM tab1 AS cor0
----
36480
4212
99840

query I rowsort
SELECT - - col1 * + col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT DISTINCT cor0.col1 + col0 FROM tab2 cor0
----
137
38
96

query I rowsort
SELECT ALL + col0 * 14 FROM tab0
----
1246
336
490

query I rowsort
SELECT + col1 + + col0 + - col2 FROM tab1
----
-25
-3
17

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + 97 + 32 col2 FROM tab1, tab0 AS cor0, tab1 cor1
----
27 values hashing to 6e22c0ac8c36876eca9404c607330984

query I rowsort
SELECT DISTINCT - ( col2 ) - col1 AS col2 FROM tab1
----
-109
-67
-80

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - cor0.col1 + 0 - + 48 col0 FROM tab0, tab2 AS cor0
----
9 values hashing to 75082a23f2cd42e272b5f2b453220109

query I rowsort
SELECT DISTINCT col2 * tab1.col0 + ( col2 ) * col1 + col2 AS col2 FROM tab1
----
1620
4275
9024

query I rowsort
SELECT DISTINCT + col2 - tab0.col2 AS col2 FROM tab0
----
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 + - col1 * col0 col1 FROM tab0
----
-1978
-3298
-8008

query I rowsort
SELECT - tab2.col0 - + col1 FROM tab2
----
-137
-38
-96

onlyif mysql # use DIV operator for integer division
query I rowsort label-6624
SELECT 46 + + col2 * ( 35 ) DIV - col2 + - ( col2 + col0 ) * - col1 AS col0 FROM tab0
----
15572
3503
4913

skipif mysql # not compatible
query I rowsort label-6624
SELECT 46 + + col2 * ( 35 ) / - col2 + - ( col2 + col0 ) * - col1 AS col0 FROM tab0
----
15572
3503
4913

query I rowsort
SELECT ALL col0 * + col0 * col0 FROM tab2
----
343
474552
493039

query I rowsort
SELECT ALL col2 * + tab0.col1 * - col2 FROM tab0
----
-611884
-93654
-97

query III rowsort
SELECT * FROM tab2 WHERE NOT ( NULL ) <> ( NULL )
----

query I rowsort
SELECT DISTINCT col1 * tab2.col2 * + col1 AS col1 FROM tab2
----
10982
25947
90506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * + col0 col2 FROM tab2
----
1343
217
4602

query I rowsort
SELECT - col0 * col2 * + tab0.col1 FROM tab0
----
-3395
-664118
-68112

query I rowsort
SELECT tab1.col2 * + tab1.col0 * - col2 FROM tab1
----
-207936
-737280
-8748

query I rowsort
SELECT DISTINCT - col2 + - col0 AS col0 FROM tab1
----
-121
-176
-57

query III rowsort
SELECT * FROM tab1 WHERE NOT ( NULL ) > ( NULL )
----

query I rowsort
SELECT ALL col2 * col0 FROM tab2 WHERE ( NULL ) NOT BETWEEN ( - col2 ) AND NULL
----

query I rowsort
SELECT DISTINCT col1 * col2 * + col1 AS col0 FROM tab0
----
244068
679042
9409

query I rowsort
SELECT - tab0.col0 + - col0 * col2 * col1 AS col1 FROM tab0
----
-3430
-664207
-68136

query I rowsort
SELECT ALL + tab0.col1 * col0 AS col2 FROM tab0 WHERE NOT ( col0 + + tab0.col1 + col0 ) NOT BETWEEN col2 AND ( col2 )
----

query I rowsort
SELECT DISTINCT col0 - col0 * col0 FROM tab1
----
-4032
-6
-6320

query I rowsort
SELECT ALL col1 + col1 * - col2 FROM tab0
----
-2752
-7371
0

query I rowsort
SELECT ALL - ( cor0.col1 ) FROM tab0 AS cor0
----
-86
-91
-97

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6641
SELECT - col0 * cor0.col0 + CAST( NULL AS SIGNED ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6641
SELECT - col0 * cor0.col0 + CAST ( NULL AS INTEGER ) AS col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 3 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to 3cf1e377a943589897b8d431a834f1ba

query I rowsort
SELECT DISTINCT - 98 FROM tab0
----
-98

query I rowsort
SELECT - 50 * col2 AS col2 FROM tab2
----
-1300
-1350
-1900

query I rowsort
SELECT + 2 + col0 AS col2 FROM tab1 AS cor0
----
5
66
82

query I rowsort
SELECT + 61 + cor0.col0 FROM tab2 AS cor0
----
139
140
68

onlyif mysql # use DIV operator for integer division
query I rowsort label-6647
SELECT cor1.col2 DIV cor1.col0 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 0a35ad941cb1878fb87082ac21ea8241

skipif mysql # not compatible
query I rowsort label-6647
SELECT cor1.col2 / cor1.col0 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 0a35ad941cb1878fb87082ac21ea8241

query I rowsort
SELECT - 92 + - col0 AS col0 FROM tab2 AS cor0
----
-170
-171
-99

query I rowsort
SELECT + col0 + + col1 * - col0 FROM tab2
----
-1264
-210
-4524

query I rowsort
SELECT DISTINCT col1 * col1 * - tab0.col2 - - col2 FROM tab0
----
-244035
-678960
-9408

onlyif mysql # use DIV operator for integer division
query I rowsort label-6651
SELECT ALL + col2 * tab0.col2 DIV col0 + - col1 AS col2 FROM tab0
----
-16
-41
-97

skipif mysql # not compatible
query I rowsort label-6651
SELECT ALL + col2 * tab0.col2 / col0 + - col1 AS col2 FROM tab0
----
-16
-41
-97

query III rowsort
SELECT * FROM tab0 WHERE NULL IN ( + tab0.col0 )
----

query I rowsort
SELECT - col1 * - cor0.col1 FROM tab2 AS cor0 WHERE NULL NOT IN ( + col2 )
----

query IIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0 WHERE NULL = ( NULL )
----

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - col2 + - col2 + col1 col1 FROM tab0
----
-73
20
95

onlyif mysql # use DIV operator for integer division
query I rowsort label-6656
SELECT col2 * col2 DIV col2 col0 FROM tab0
----
1
33
82

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6656
SELECT col2 * col2 / col2 col0 FROM tab0
----
1
33
82

onlyif mysql # use DIV operator for integer division
query I rowsort label-6657
SELECT col2 DIV col2 + + col2 * + col0 AS col1 FROM tab1
----
163
3649
7681

skipif mysql # not compatible
query I rowsort label-6657
SELECT col2 / col2 + + col2 * + col0 AS col1 FROM tab1
----
163
3649
7681

onlyif mysql # use DIV operator for integer division
query I rowsort label-6658
SELECT + tab1.col0 - col2 * col2 DIV col0 AS col2 FROM tab1
----
-35
-969
14

skipif mysql # not compatible
query I rowsort label-6658
SELECT + tab1.col0 - col2 * col2 / col0 AS col2 FROM tab1
----
-35
-969
14

query I rowsort
SELECT - col0 - col2 * col0 AS col0 FROM tab2
----
-196
-2106
-3081

onlyif mysql # use DIV operator for integer division
query I rowsort label-6660
SELECT ALL - col0 DIV + col2 - - col0 FROM tab0
----
0
24
88

skipif mysql # not compatible
query I rowsort label-6660
SELECT ALL - col0 / + col2 - - col0 FROM tab0
----
0
24
88

query III rowsort
SELECT DISTINCT * FROM tab2 WHERE NOT NULL NOT IN ( + tab2.col2 )
----

query I rowsort
SELECT + col1 * + col0 + + col2 + col1 * col1 * col2 FROM tab2
----
12363
26191
95134

query I rowsort
SELECT ALL - tab0.col2 + - col2 + col0 FROM tab0
----
-42
-75
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT cor0.col0 col1 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 1e1f10953eb8effe9b20e746f8a7fd83

query I rowsort
SELECT 75 * 33 FROM tab2 AS cor0
----
2475
2475
2475

query I rowsort
SELECT ALL + 94 FROM tab0, tab2 AS cor0
----
9 values hashing to b0ffb7527f4fbf44f30945e1ccb58c24

query I rowsort
SELECT - - 92 * col1 + + col2 AS col1 FROM tab0 AS cor0
----
7945
8454
8925

query I rowsort
SELECT - - col2 * + cor0.col0 + col2 AS col1 FROM tab0 AS cor0
----
36
7380
825

query I rowsort
SELECT col2 + + 66 * tab2.col2 + col2 FROM tab2
----
1768
1836
2584

query I rowsort
SELECT 73 - col1 * col0 FROM tab1 AS cor0
----
-5
-567
-967

query I rowsort
SELECT - ( - col0 ) + - col0 * col1 AS col2 FROM tab0 cor0
----
-2040
-3360
-8010

query I rowsort
SELECT + col2 * cor0.col1 + col2 * - col0 * - col1 FROM tab1 AS cor0
----
101088
37050
5616

query I rowsort
SELECT DISTINCT col1 * col1 * + col2 FROM tab1
----
16224
36504
5700

query I rowsort
SELECT DISTINCT 67 + - cor0.col0 AS col2 FROM tab0, tab0 AS cor0
----
-22
32
43

query I rowsort
SELECT + cor0.col0 * col0 * cor0.col2 + + col2 FROM tab2 AS cor0
----
1350
158210
237196

query I rowsort
SELECT ALL - col0 * col2 * - col0 FROM tab1
----
233472
486
614400

query I rowsort
SELECT - 53 * tab1.col0 FROM tab1
----
-159
-3392
-4240

query I rowsort
SELECT DISTINCT + ( tab0.col1 + + col2 ) AS col0 FROM tab0
----
119
173
98

query I rowsort
SELECT DISTINCT - cor0.col0 AS col1 FROM tab0, tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT ALL col2 * + 50 * tab1.col1 AS col1 FROM tab1
----
28500
62400
70200

query I rowsort
SELECT ALL + tab2.col0 * - 77 FROM tab2
----
-539
-6006
-6083

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6682
SELECT - col2 * + CAST( NULL AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6682
SELECT - col2 * + CAST ( NULL AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6683
SELECT ALL + col2 DIV - col1 AS col1 FROM tab1 AS cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-6683
SELECT ALL + col2 / - col1 AS col1 FROM tab1 AS cor0
----
-2
-5
-7

query I rowsort
SELECT - - col1 * - 20 AS col1 FROM tab1 AS cor0
----
-200
-260
-520

onlyif mysql # use DIV operator for integer division
query I rowsort label-6685
SELECT ALL - + col1 DIV 49 AS col2 FROM tab2 cor0
----
-1
0
0

skipif mysql # not compatible
query I rowsort label-6685
SELECT ALL - + col1 / 49 AS col2 FROM tab2 cor0
----
-1
0
0

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab2 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab2 cor2
----
972 values hashing to 9600bdf5bac0caec3229e87170cc40b3

query I rowsort
SELECT DISTINCT + + col2 + 66 FROM tab2 AS cor0
----
104
92
93

query I rowsort
SELECT DISTINCT - + col2 * ( + col1 ) FROM tab2 AS cor0
----
-1534
-646
-837

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 col1 FROM tab2 cor0
----
26
27
38

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 * col1 * - 33 col2 FROM tab1 AS cor0
----
-22308
-3300
-5577

query I rowsort
SELECT + + col0 + col0 AS col2 FROM tab0 AS cor0
----
178
48
70

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL 41 col0 FROM tab1 AS cor0
----
41
41
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 47 col2 FROM tab2 AS cor0
----
47

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * - cor0.col2 col1 FROM tab0 cor0
----
-35
-7298
-792

query I rowsort
SELECT - + col1 + + col2 * 87 FROM tab1 AS cor0
----
4672
4949
8339

query I rowsort
SELECT + + 23 * + col1 AS col0 FROM tab1 AS cor0
----
230
299
598

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6697
SELECT CAST( NULL AS SIGNED ) * col2 / col1 FROM tab1
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6697
SELECT CAST ( NULL AS INTEGER ) * col2 / col1 FROM tab1
----
NULL
NULL
NULL

query I rowsort
SELECT ALL + 97 FROM tab2
----
97
97
97

onlyif mysql # use DIV operator for integer division
query I rowsort label-6699
SELECT DISTINCT ( ( col2 ) ) DIV CAST( + col0 AS SIGNED ) FROM tab1
----
0
1
18

skipif mysql # not compatible
query I rowsort label-6699
SELECT DISTINCT ( ( col2 ) ) / CAST ( + col0 AS INTEGER ) FROM tab1
----
0
1
18

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab0, tab1 AS cor0, tab1, tab1 cor1
----
972 values hashing to 635619591835474e6aa6acdff4ab166c

query I rowsort
SELECT + col0 + + col1 * - ( + col1 ) FROM tab1 cor0
----
-36
-673
-89

query I rowsort
SELECT - + 60 + col2 AS col1 FROM tab2 AS cor0
----
-22
-33
-34

onlyif mysql # use DIV operator for integer division
query I rowsort label-6703
SELECT - ( + col0 ) + 38 DIV + 73 FROM tab1 cor0
----
-3
-64
-80

skipif mysql # not compatible
query I rowsort label-6703
SELECT - ( + col0 ) + 38 / + 73 FROM tab1 cor0
----
-3
-64
-80

query I rowsort
SELECT 93 * - 98 FROM tab0 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to 0022ce134ab95eda82078157a1d74e30

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - 0 + + col1 col2 FROM tab2
----
17
31
59

query I rowsort
SELECT DISTINCT - cor0.col0 AS col0 FROM tab0 AS cor0 CROSS JOIN tab0 AS cor1
----
-24
-35
-89

query I rowsort
SELECT - 92 FROM tab0, tab0 AS cor0
----
9 values hashing to 1af709a79a3e56281ffdce4d931d5965

query I rowsort
SELECT ALL - col0 * 52 AS col0 FROM tab2 AS cor0
----
-364
-4056
-4108

query I rowsort
SELECT ALL - col0 + - col1 + - col2 * + col0 AS col2 FROM tab1
----
-191
-3722
-7773

query I rowsort
SELECT cor1.col0 AS col0 FROM tab1 AS cor0 CROSS JOIN tab0, tab1 AS cor1
----
27 values hashing to 778b50575a9b91448119ee0ee1a9c44f

query I rowsort
SELECT - cor0.col0 * - ( - cor0.col1 ) + + 12 FROM tab1 AS cor0
----
-1028
-628
-66

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6712
SELECT DISTINCT - CAST( NULL AS DECIMAL ) * 49 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-6712
SELECT DISTINCT - CAST ( NULL AS REAL ) * 49 FROM tab2
----
NULL

query I rowsort
SELECT + ( + col1 ) - col1 AS col2 FROM tab2
----
0
0
0

query I rowsort
SELECT DISTINCT ( + tab1.col1 ) - col0 * - ( col0 ) FROM tab1
----
35
4106
6413

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6715
SELECT CAST( - col1 AS SIGNED ) - - col0 AS col1 FROM tab1
----
-23
54
67

skipif mysql # not compatible
query I rowsort label-6715
SELECT CAST ( - col1 AS INTEGER ) - - col0 AS col1 FROM tab1
----
-23
54
67

query I rowsort
SELECT - 26 AS col2 FROM tab1, tab2 AS cor0
----
9 values hashing to 47d0574274146de273829785364ada39

onlyif mysql # use DIV operator for integer division
query I rowsort label-6717
SELECT DISTINCT col1 + col2 - - col1 DIV 15 col0 FROM tab2
----
56
60
88

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6717
SELECT DISTINCT col1 + col2 - - col1 / 15 col0 FROM tab2
----
56
60
88

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6718
SELECT - - CAST( NULL AS SIGNED ) + 8 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6718
SELECT - - CAST ( NULL AS INTEGER ) + 8 FROM tab1 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT + + 15 * - col0 + + col1 AS col1 FROM tab0 AS cor0
----
-1244
-274
-428

query I rowsort
SELECT ALL + col0 * 66 - + col2 AS col0 FROM tab2
----
435
5122
5176

query I rowsort
SELECT ALL 18 AS col1 FROM tab0, tab0 AS cor0
----
9 values hashing to b95bafa733666df39c5d3f94760d010f

query I rowsort
SELECT DISTINCT + + col1 + - col2 FROM tab0 AS cor0
----
53
9
96

query I rowsort
SELECT ALL - + col1 - col1 FROM tab1 AS cor0
----
-20
-26
-52

query I rowsort
SELECT + col0 + + col2 * col0 AS col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT ALL col1 - + col2 * col2 AS col2 FROM tab2 AS cor0
----
-1427
-617
-698

query I rowsort
SELECT - col0 * 5 AS col2 FROM tab2 AS cor0
----
-35
-390
-395

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6727
SELECT ALL - + 67 * col2 + cor0.col1 * + CAST( col1 AS SIGNED ) AS col1 FROM tab0 AS cor0
----
2787
5185
9342

skipif mysql # not compatible
query I rowsort label-6727
SELECT ALL - + 67 * col2 + cor0.col1 * + CAST ( col1 AS INTEGER ) AS col1 FROM tab0 AS cor0
----
2787
5185
9342

query I rowsort
SELECT DISTINCT - col2 * cor0.col2 + col2 - - ( - 72 ) FROM tab1 AS cor0
----
-2934
-3264
-9192

query I rowsort
SELECT 96 * col1 + cor0.col0 FROM tab2 AS cor0
----
1711
2983
5742

query I rowsort
SELECT DISTINCT + - 11 + - col2 FROM tab2 AS cor0
----
-37
-38
-49

query I rowsort
SELECT - - col1 - + cor0.col1 AS col1 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6732
SELECT + ( + col0 ) DIV col2 FROM tab0 AS cor0
----
0
1
35

skipif mysql # not compatible
query I rowsort label-6732
SELECT + ( + col0 ) / col2 FROM tab0 AS cor0
----
0
1
35

query I rowsort
SELECT DISTINCT - cor0.col1 AS col1 FROM tab1, tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT ALL + + col1 * - col2 + - 84 FROM tab2 cor0
----
-1618
-730
-921

query I rowsort
SELECT ALL cor0.col0 FROM tab2, tab2 AS cor0, tab2 AS cor1, tab0, tab2 AS cor2
----
243 values hashing to 455e4df3bf7b0fa681c56e89df1a761f

query I rowsort
SELECT ALL - col1 * col0 + cor0.col2 AS col1 FROM tab0 AS cor0
----
-2031
-3394
-8017

query I rowsort
SELECT + col0 * - col2 + col2 * 84 FROM tab1 AS cor0
----
1140
384
4374

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 50 col0 FROM tab0, tab1 AS cor0, tab2 cor1
----
27 values hashing to 314aace40e704c20a6be06204a329f80

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab0 AS cor0, tab0 AS cor1, tab1, tab2 cor2
----
3645 values hashing to d6394df0309139ffe20e7d96c77e26ee

query I rowsort
SELECT col2 + + 45 AS col1 FROM tab2
----
71
72
83

query I rowsort
SELECT ALL col2 * 95 * + tab0.col0 FROM tab0
----
3325
693310
75240

query I rowsort
SELECT DISTINCT - - col2 + col0 FROM tab2 cor0
----
104
117
34

query I rowsort
SELECT - col1 + + col0 FROM tab1 cor0
----
-23
54
67

query I rowsort
SELECT DISTINCT - col0 * 0 FROM tab1 AS cor0
----
0

query I rowsort
SELECT + col0 + + 9 * - 46 FROM tab2 AS cor0
----
-335
-336
-407

query I rowsort
SELECT ALL - col0 * ( - col2 ) FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-6747
SELECT ALL - - 60 DIV + cor0.col1 + - col2 AS col1 FROM tab2 AS cor0
----
-25
-26
-35

skipif mysql # not compatible
query I rowsort label-6747
SELECT ALL - - 60 / + cor0.col1 + - col2 AS col1 FROM tab2 AS cor0
----
-25
-26
-35

query I rowsort
SELECT ALL + col1 + 16 AS col0 FROM tab0 AS cor0
----
102
107
113

query I rowsort
SELECT ALL cor0.col2 + col0 * col1 + ( col2 ) FROM tab2 AS cor0
----
1419
271
4654

query I rowsort
SELECT ALL - 16 + - 84 FROM tab0 AS cor0
----
-100
-100
-100

query I rowsort
SELECT DISTINCT + col1 + - col0 * cor0.col0 FROM tab0 cor0
----
-1128
-490
-7830

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 97 col2 FROM tab2, tab1 AS cor0
----
97

query I rowsort
SELECT + col2 + + col0 + + col2 * col2 AS col0 FROM tab0 AS cor0
----
1146
37
6895

query I rowsort
SELECT ALL 25 * - col1 FROM tab0
----
-2150
-2275
-2425

query I rowsort
SELECT + col0 * col0 * + 96 + col1 + col1 FROM tab0 AS cor0
----
117794
55468
760598

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - + col1 * - 87 - 84 col2 FROM tab1 cor0
----
1047
2178
786

query I rowsort
SELECT col0 * - col0 * col1 AS col1 FROM tab2
----
-106097
-1519
-358956

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0, tab2 cor0, tab2 AS cor1
----
972 values hashing to 617c9545df26d6d983e3967864e8e9e4

onlyif mysql # use DIV operator for integer division
query I rowsort label-6759
SELECT ALL + col0 + ( + tab0.col0 ) DIV col2 FROM tab0
----
24
70
90

skipif mysql # not compatible
query I rowsort label-6759
SELECT ALL + col0 + ( + tab0.col0 ) / col2 FROM tab0
----
24
70
90

query I rowsort
SELECT col2 + - ( + cor0.col2 ) + col2 * + 0 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT ALL - col2 * - 96 FROM tab2 AS cor0
----
2496
2592
3648

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col0 + - cor0.col2 col1 FROM tab1 cor0
----
-121
-176
-57

query I rowsort
SELECT DISTINCT + col0 * - 35 FROM tab0
----
-1225
-3115
-840

skipif mysql # not compatible
query I rowsort
SELECT DISTINCT + cor0.col2 + - CAST ( cor0.col2 AS REAL ) AS col1 FROM tab0 AS cor0
----
0

query I rowsort
SELECT ALL - cor0.col1 + - 88 AS col2 FROM tab2 AS cor0
----
-105
-119
-147

query I rowsort
SELECT ALL cor0.col2 AS col1 FROM tab2, tab1, tab2 AS cor0
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6767
SELECT ALL - CAST( + 44 AS SIGNED ) FROM tab2
----
-44
-44
-44

skipif mysql # not compatible
query I rowsort label-6767
SELECT ALL - CAST ( + 44 AS INTEGER ) FROM tab2
----
-44
-44
-44

query I rowsort
SELECT ALL ( + col0 ) * - col2 AS col2 FROM tab1
----
-162
-3648
-7680

query I rowsort
SELECT - col1 + - col2 * col0 AS col1 FROM tab2
----
-2087
-220
-3019

query I rowsort
SELECT ALL - 23 FROM tab2, tab0 AS cor0
----
9 values hashing to ce60bf4b0647d0fcb18a0562e351c52d

query I rowsort
SELECT - col2 * 24 + col1 FROM tab2 AS cor0
----
-565
-617
-895

query I rowsort
SELECT DISTINCT ( - 14 ) * col2 - + col2 FROM tab1 AS cor0
----
-1440
-810
-855

query I rowsort
SELECT col0 * - 91 FROM tab2 AS cor0
----
-637
-7098
-7189

onlyif mysql # use DIV operator for integer division
query I rowsort label-6774
SELECT ALL - col1 DIV + col0 FROM tab0 AS cor0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-6774
SELECT ALL - col1 / + col0 FROM tab0 AS cor0
----
-1
-2
-3

query I rowsort
SELECT - 56 AS col0 FROM tab0 AS cor0
----
-56
-56
-56

query I rowsort
SELECT 53 AS col2 FROM tab2, tab0 AS cor0
----
9 values hashing to fede6033dee346dbd272085c05724fda

query I rowsort
SELECT DISTINCT - 48 + - col2 FROM tab2 AS cor0
----
-74
-75
-86

onlyif mysql # use DIV operator for integer division
query I rowsort label-6778
SELECT + + 99 DIV col0 col2 FROM tab1 cor0
----
1
1
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6778
SELECT + + 99 / col0 col2 FROM tab1 cor0
----
1
1
33

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 79 * + col2 col1 FROM tab1 AS cor0
----
-4266
-4503
-7584

query I rowsort
SELECT ALL - + 38 * col2 FROM tab1 AS cor0
----
-2052
-2166
-3648

query I rowsort
SELECT ALL + - 99 * col2 FROM tab1 AS cor0
----
-5346
-5643
-9504

onlyif mysql # use DIV operator for integer division
query I rowsort label-6782
SELECT + col2 DIV - col2 FROM tab1 cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6782
SELECT + col2 / - col2 FROM tab1 cor0
----
-1
-1
-1

query I rowsort
SELECT ALL - + 62 * col1 AS col2 FROM tab0 AS cor0
----
-5332
-5642
-6014

query I rowsort
SELECT ALL - col1 * col2 + ( - col2 ) FROM tab0 cor0
----
-2871
-7544
-98

onlyif mysql # use DIV operator for integer division
query I rowsort label-6785
SELECT ALL ( col0 ) DIV col1 AS col2 FROM tab1 AS cor0
----
0
6
6

skipif mysql # not compatible
query I rowsort label-6785
SELECT ALL ( col0 ) / col1 AS col2 FROM tab1 AS cor0
----
0
6
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-6786
SELECT ALL - ( + col0 ) DIV - col1 AS col2 FROM tab2 AS cor0
----
0
1
4

skipif mysql # not compatible
query I rowsort label-6786
SELECT ALL - ( + col0 ) / - col1 AS col2 FROM tab2 AS cor0
----
0
1
4

onlyif mysql # use DIV operator for integer division
query I rowsort label-6787
SELECT col1 + - col1 DIV cor0.col2 AS col1 FROM tab0 AS cor0
----
0
84
90

skipif mysql # not compatible
query I rowsort label-6787
SELECT col1 + - col1 / cor0.col2 AS col1 FROM tab0 AS cor0
----
0
84
90

query I rowsort
SELECT DISTINCT 25 + col2 FROM tab1 AS cor0
----
121
79
82

query I rowsort
SELECT ALL - - cor0.col1 * cor0.col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT DISTINCT col1 + + col1 AS col0 FROM tab1 AS cor0
----
20
26
52

query I rowsort
SELECT DISTINCT col2 * col2 + + col1 AS col1 FROM tab1 AS cor0
----
2942
3259
9229

query I rowsort
SELECT DISTINCT + tab0.col1 AS col0 FROM tab0, tab1 AS cor0
----
86
91
97

query I rowsort
SELECT ALL + 81 FROM tab0, tab2 AS cor0, tab0 AS cor1, tab1 AS cor2
----
81 values hashing to 50d500b1082f81e0b02096b2afac91cd

query I rowsort
SELECT 80 + col0 * + 41 * col1 FROM tab2 AS cor0
----
188762
55143
8977

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 AS cor0, tab2 AS cor1, tab1, tab1 cor2
----
3645 values hashing to 6156c969b7e054b8a333fdb86aee82f2

query I rowsort
SELECT 89 * - col2 + 37 AS col2 FROM tab0 cor0
----
-2900
-52
-7261

query I rowsort
SELECT + col2 + col0 * + col1 AS col0 FROM tab0 cor0
----
2097
3396
8181

query I rowsort
SELECT - col0 * - col1 + + col1 FROM tab1 cor0
----
104
1053
650

query I rowsort
SELECT + - col2 + col1 * col0 AS col2 FROM tab2 AS cor0
----
1305
190
4576

query I rowsort
SELECT + col1 + + col0 * 92 AS col0 FROM tab0
----
2294
3317
8279

query I rowsort
SELECT 60 + col0 FROM tab1 AS cor0
----
124
140
63

query I rowsort
SELECT + ( - 6 ) + cor0.col1 FROM tab2 AS cor0
----
11
25
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 13 col0 FROM tab0 AS cor0
----
13
13
13

query I rowsort
SELECT ALL - cor0.col0 + + ( cor0.col0 ) * 42 FROM tab2 AS cor0
----
287
3198
3239

onlyif mysql # use DIV operator for integer division
query I rowsort label-6805
SELECT ALL - ( + col2 ) DIV + col2 AS col0 FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-6805
SELECT ALL - ( + col2 ) / + col2 AS col0 FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT ALL ( - cor0.col2 ) + col2 AS col2 FROM tab1 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-6807
SELECT col0 * 16 + col1 DIV - col1 FROM tab2 AS cor0
----
111
1247
1263

skipif mysql # not compatible
query I rowsort label-6807
SELECT col0 * 16 + col1 / - col1 FROM tab2 AS cor0
----
111
1247
1263

query I rowsort
SELECT DISTINCT + ( + col2 ) * cor0.col0 + col0 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT DISTINCT cor0.col2 - - 38 AS col2 FROM tab2 AS cor0
----
64
65
76

query I rowsort
SELECT cor0.col0 + ( + col0 ) + + col2 AS col1 FROM tab1 AS cor0
----
185
256
60

query I rowsort
SELECT DISTINCT col2 + + 35 FROM tab2
----
61
62
73

query I rowsort
SELECT ALL - col0 + + ( - 63 ) AS col0 FROM tab0
----
-152
-87
-98

query I rowsort
SELECT ALL + col1 + + col1 * col1 AS col1 FROM tab1
----
110
182
702

query I rowsort
SELECT - - ( 12 ) AS col2 FROM tab2 AS cor0
----
12
12
12

onlyif mysql # use DIV operator for integer division
query I rowsort label-6815
SELECT - 76 DIV 58 + - col0 * CAST( 21 AS SIGNED ) AS col1 FROM tab2 AS cor0
----
-148
-1639
-1660

skipif mysql # not compatible
query I rowsort label-6815
SELECT - 76 / 58 + - col0 * CAST ( 21 AS INTEGER ) AS col1 FROM tab2 AS cor0
----
-148
-1639
-1660

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT + 55 col2 FROM tab1
----
55

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 57 + - col2 col2 FROM tab2
----
-83
-84
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col1 + + col0 * + 95 col2 FROM tab0 AS cor0
----
2366
3422
8546

query I rowsort
SELECT DISTINCT 63 AS col2 FROM tab0
----
63

query I rowsort
SELECT 38 FROM tab2, tab0 AS cor0
----
9 values hashing to afaddad0a4e3a1683a1c8cbe6eb522a7

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6821
SELECT + col1 * + CAST( NULL AS SIGNED ) + col1 / col2 FROM tab0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6821
SELECT + col1 * + CAST ( NULL AS INTEGER ) + col1 / col2 FROM tab0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col2 - tab2.col1 AS col2 FROM tab2
----
-33
-4
21

query I rowsort
SELECT DISTINCT col0 * ( col1 ) * col2 - + col1 * + col0 FROM tab0
----
0
656019
66048

query I rowsort
SELECT - tab0.col1 * + 23 + - col0 FROM tab0
----
-2002
-2182
-2266

query I rowsort
SELECT - tab0.col2 + - tab0.col1 * ( col1 ) - - 20 * - col2 FROM tab0
----
-10003
-8089
-9430

query I rowsort
SELECT cor0.col0 * col0 + ( col0 ) AS col1 FROM tab1 AS cor0
----
12
4160
6480

query I rowsort
SELECT ALL col1 + - 51 * + col0 * - col2 AS col0 FROM tab2 cor0
----
103487
153119
9670

query I rowsort
SELECT DISTINCT - 60 FROM tab0, tab1 AS cor0
----
-60

query I rowsort
SELECT DISTINCT 39 AS col1 FROM tab2, tab2 cor0
----
39

onlyif mysql # use DIV operator for integer division
query I rowsort label-6830
SELECT + + col2 DIV + cor0.col0 + - col2 col1 FROM tab1 AS cor0
----
-36
-57
-95

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6830
SELECT + + col2 / + cor0.col0 + - col2 col1 FROM tab1 AS cor0
----
-36
-57
-95

query I rowsort
SELECT DISTINCT - col0 + - 81 * col1 AS col1 FROM tab1 AS cor0
----
-1133
-2109
-874

query I rowsort
SELECT - 19 + - col0 * col1 AS col2 FROM tab0 AS cor0
----
-2083
-3414
-8118

query I rowsort
SELECT - 46 * - col1 * col1 FROM tab0 AS cor0
----
340216
380926
432814

query I rowsort
SELECT DISTINCT + col2 * 38 + col1 FROM tab2 AS cor0
----
1047
1057
1461

query I rowsort
SELECT ALL 87 + col1 FROM tab0 AS cor0
----
173
178
184

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6836
SELECT + - CAST( - col1 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
10
13
26

skipif mysql # not compatible
query I rowsort label-6836
SELECT + - CAST ( - col1 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
10
13
26

query I rowsort
SELECT DISTINCT + col0 - - ( + col0 ) AS col2 FROM tab1 cor0
----
128
160
6

query I rowsort
SELECT 56 * col0 * col2 FROM tab1 AS cor0
----
204288
430080
9072

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6839
SELECT ALL + cor0.col2 * + col2 + + col1 * + CAST( NULL AS SIGNED ) + - col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6839
SELECT ALL + cor0.col2 * + col2 + + col1 * + CAST ( NULL AS INTEGER ) + - col2 FROM tab1 AS cor0
----
NULL
NULL
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-6840
SELECT col1 + tab0.col1 * col2 + col2 * + col1 DIV + ( col1 ) AS col2 FROM tab0
----
195
2957
7635

skipif mysql # not compatible
query I rowsort label-6840
SELECT col1 + tab0.col1 * col2 + col2 * + col1 / + ( col1 ) AS col2 FROM tab0
----
195
2957
7635

query I rowsort
SELECT col2 * 58 + + col1 + + col0 FROM tab0
----
190
2024
4936

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 89 col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 5c8428e9f1e7de3d09cb0814b4cc1743

query I rowsort
SELECT ALL col0 * cor0.col0 AS col1 FROM tab0 cor0
----
1225
576
7921

query I rowsort
SELECT DISTINCT - col2 * + cor0.col1 + col2 FROM tab2 cor0
----
-1508
-608
-810

query I rowsort
SELECT - - 59 * cor0.col0 AS col2 FROM tab0 AS cor0
----
1416
2065
5251

query I rowsort
SELECT + + 15 + + cor0.col0 FROM tab2 AS cor0
----
22
93
94

query I rowsort
SELECT - ( + col0 * col2 ) AS col1 FROM tab2
----
-189
-2028
-3002

query I rowsort
SELECT DISTINCT + ( col1 ) * col1 FROM tab0
----
7396
8281
9409

query I rowsort
SELECT - - ( + col0 ) * col1 AS col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT ALL col1 + + col1 * col0 FROM tab0 AS cor0
----
2150
3492
8190

query I rowsort
SELECT DISTINCT + col1 * - col1 - 9 FROM tab0 AS cor0
----
-7405
-8290
-9418

query I rowsort
SELECT DISTINCT + col2 * col2 * + 36 AS col0 FROM tab2 cor0
----
24336
26244
51984

query I rowsort
SELECT ALL - col0 + - 53 * - 89 FROM tab0 AS cor0
----
4628
4682
4693

query I rowsort
SELECT + + 95 FROM tab2 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to e57d8ed879dfd04d04aae87725c970d3

query I rowsort
SELECT DISTINCT col2 + + col0 FROM tab2 AS cor0
----
104
117
34

query I rowsort
SELECT cor0.col1 * col0 AS col1 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT ALL - col1 + + 57 - + 67 AS col1 FROM tab2 AS cor0
----
-27
-41
-69

query I rowsort
SELECT col1 * cor0.col2 * + col1 FROM tab2 AS cor0
----
10982
25947
90506

query I rowsort
SELECT DISTINCT cor0.col0 * + 83 FROM tab2 AS cor0
----
581
6474
6557

onlyif mysql # use DIV operator for integer division
query I rowsort label-6860
SELECT - - col0 DIV ( col2 ) FROM tab1 AS cor0
----
0
0
1

skipif mysql # not compatible
query I rowsort label-6860
SELECT - - col0 / ( col2 ) FROM tab1 AS cor0
----
0
0
1

query I rowsort
SELECT DISTINCT + + cor0.col2 * 84 + 21 FROM tab0 AS cor0
----
105
2793
6909

query I rowsort
SELECT ALL - col0 * 56 FROM tab1 cor0
----
-168
-3584
-4480

query I rowsort
SELECT DISTINCT cor0.col1 * col1 - - col2 AS col2 FROM tab0 AS cor0
----
7429
8363
9410

onlyif mysql # use DIV operator for integer division
query I rowsort label-6864
SELECT DISTINCT - cor0.col1 DIV col1 AS col0 FROM tab1 AS cor0
----
-1

skipif mysql # not compatible
query I rowsort label-6864
SELECT DISTINCT - cor0.col1 / col1 AS col0 FROM tab1 AS cor0
----
-1

query I rowsort
SELECT + 40 AS col1 FROM tab2
----
40
40
40

query I rowsort
SELECT ALL 42 FROM tab2 AS cor0 CROSS JOIN tab1 AS cor1
----
9 values hashing to 64c29db9f1cd7ed4ddeb1735e3e0d442

query I rowsort
SELECT DISTINCT + col2 + col0 * col1 FROM tab2 cor0
----
1381
244
4628

query I rowsort
SELECT col2 * col2 + col0 AS col1 FROM tab1 AS cor0
----
2919
3313
9296

query I rowsort
SELECT DISTINCT + + col2 * + col0 + col1 FROM tab1 AS cor0
----
188
3658
7693

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab0, tab2 AS cor0 CROSS JOIN tab1, tab0 AS cor1, tab1 AS cor2
----
3645 values hashing to f3ede863c793df0de5c26c654290b3b7

query I rowsort
SELECT - 61 * + tab0.col0 AS col2 FROM tab0
----
-1464
-2135
-5429

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab1, tab1 cor0 CROSS JOIN tab2, tab0, tab1 AS cor1
----
3645 values hashing to 77ce60d8d42550cc1b5a38c7d1dc5d13

onlyif mysql # use DIV operator for integer division
query I rowsort label-6873
SELECT + CAST( + col2 AS SIGNED ) + - col1 DIV col2 AS col1 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-6873
SELECT + CAST ( + col2 AS INTEGER ) + - col1 / col2 AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT 21 * ( col1 ) FROM tab1 AS cor0
----
210
273
546

query I rowsort
SELECT DISTINCT - + 77 - col0 * col1 AS col2 FROM tab1 cor0
----
-1117
-155
-717

query I rowsort
SELECT DISTINCT 15 * - 21 + + col1 + col1 FROM tab2
----
-197
-253
-281

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col0 * col2 col0 FROM tab2 cor0
----
-189
-2028
-3002

query I rowsort
SELECT - ( col0 ) + col0 + + col0 * col1 FROM tab1 cor0
----
1040
640
78

query I rowsort
SELECT ALL - + 89 + - col2 * - col0 AS col2 FROM tab2 AS cor0
----
100
1939
2913

query I rowsort
SELECT ALL - - 48 AS col2 FROM tab1 AS cor0
----
48
48
48

query I rowsort
SELECT + ( col0 ) * - col1 FROM tab1 cor0
----
-1040
-640
-78

query I rowsort
SELECT - + col2 + col2 * col1 + + 68 AS col1 FROM tab0 AS cor0
----
164
2873
7448

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col1 * + cor0.col2 col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - col2 + ( col0 ) AS col2 FROM tab1 AS cor0
----
-16
-51
7

query I rowsort
SELECT ALL - col0 + + col2 + col1 AS col0 FROM tab0 AS cor0
----
63
84
95

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6886
SELECT DISTINCT + CAST( NULL AS DECIMAL ) * col2 + col2 / + 67 FROM tab2 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6886
SELECT DISTINCT + CAST ( NULL AS REAL ) * col2 + col2 / + 67 FROM tab2 AS cor0
----
NULL

query I rowsort
SELECT + + 62 AS col2 FROM tab1 AS cor0
----
62
62
62

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - + 78 * 77 + - col2 * col2 col1 FROM tab0 AS cor0
----
-12730
-6007
-7095

query I rowsort
SELECT DISTINCT + ( - ( + col1 ) ) + col2 AS col2 FROM tab0 AS cor0
----
-53
-9
-96

query I rowsort
SELECT - + 78 * col0 FROM tab1 AS cor0
----
-234
-4992
-6240

query I rowsort
SELECT ALL col2 * + cor0.col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - - 47 * col1 AS col1 FROM tab0 AS cor0
----
4042
4277
4559

query I rowsort
SELECT - 78 FROM tab1, tab0 AS cor0 CROSS JOIN tab0
----
27 values hashing to c4f3c63f98c3c08f2848f46850a476d4

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 cor0, tab2 AS cor1, tab1, tab0 AS cor2
----
3645 values hashing to 825c5bff5308aeedb3a0a28713da0683

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - 16 col2 FROM tab1, tab0 AS cor0 CROSS JOIN tab0
----
27 values hashing to 71c8b08964ab47ce12158975c0ee1fd9

query I rowsort
SELECT ALL 67 AS col0 FROM tab1
----
67
67
67

query I rowsort
SELECT - + col0 + + 14 FROM tab0 AS cor0
----
-10
-21
-75

query I rowsort
SELECT col0 + col1 * + 49 AS col0 FROM tab0 cor0
----
4238
4548
4788

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6899
SELECT col1 + + CAST( NULL AS SIGNED ) * - col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6899
SELECT col1 + + CAST ( NULL AS INTEGER ) * - col1 FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - col1 + 47 FROM tab2 AS cor0
----
-12
16
30

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6901
SELECT DISTINCT + CAST( NULL AS SIGNED ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
NULL

skipif mysql # not compatible
query I rowsort label-6901
SELECT DISTINCT + CAST ( NULL AS INTEGER ) AS col1 FROM tab1 AS cor0 CROSS JOIN tab1 cor1
----
NULL

query I rowsort
SELECT ALL tab2.col1 * - tab2.col0 FROM tab2, tab0 AS cor0, tab0 cor1
----
27 values hashing to a95320dbb4fb4aa98e2920d866f19abe

query I rowsort
SELECT col0 * ( + col0 * + col0 ) FROM tab0
----
13824
42875
704969

onlyif mysql # use DIV operator for integer division
query I rowsort label-6904
SELECT + col1 DIV col0 + col1 AS col1 FROM tab2
----
17
35
59

skipif mysql # not compatible
query I rowsort label-6904
SELECT + col1 / col0 + col1 AS col1 FROM tab2
----
17
35
59

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6905
SELECT ALL CAST( cor0.col1 AS SIGNED ) FROM tab1, tab1 cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

skipif mysql # not compatible
query I rowsort label-6905
SELECT ALL CAST ( cor0.col1 AS INTEGER ) FROM tab1, tab1 cor0
----
9 values hashing to 366ec539af0f37bd1519bc568f3d6775

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6906
SELECT + col0 + CAST( NULL AS SIGNED ) FROM tab2
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6906
SELECT + col0 + CAST ( NULL AS INTEGER ) FROM tab2
----
NULL
NULL
NULL

query I rowsort
SELECT 14 AS col0 FROM tab2, tab1, tab0 cor0, tab0
----
81 values hashing to 742ac5d81e64168a26fbd2bc8c808eff

query I rowsort
SELECT ALL tab2.col0 * ( + col0 + - col2 * col0 ) AS col1 FROM tab2
----
-1274
-152100
-230917

query I rowsort
SELECT DISTINCT + cor0.col1 * ( col1 ) AS col1 FROM tab2 AS cor0
----
289
3481
961

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6910
SELECT DISTINCT - cor0.col2 * - CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL

skipif mysql # not compatible
query I rowsort label-6910
SELECT DISTINCT - cor0.col2 * - CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL

query I rowsort
SELECT + + col1 + col0 AS col2 FROM tab2 AS cor0
----
137
38
96

query I rowsort
SELECT ALL - + col2 * - cor0.col1 + col2 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT DISTINCT - cor0.col2 AS col0 FROM tab2, tab1, tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT - col2 * - 6 FROM tab0
----
198
492
6

query I rowsort
SELECT ALL 17 AS col2 FROM tab0, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to e0dd9155e4d67132637a04c18ef46b2a

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6916
SELECT + 32 * + 57 * col1 + CAST( NULL AS SIGNED ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6916
SELECT + 32 * + 57 * col1 + CAST ( NULL AS INTEGER ) AS col2 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 79 col1 FROM tab1, tab2 AS cor0
----
9 values hashing to 1b7b0b34fe3431fb409719624d12791f

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6918
SELECT ( - 39 ) + col1 * - CAST( + 59 * col0 + + CAST( NULL AS SIGNED ) * ( cor0.col0 ) AS SIGNED ) FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-6918
SELECT ( - 39 ) + col1 * - CAST ( + 59 * col0 + + CAST ( NULL AS INTEGER ) * ( cor0.col0 ) AS INTEGER ) FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT - 84 + - cor0.col1 AS col0 FROM tab2 AS cor0
----
-101
-115
-143

query I rowsort
SELECT - 96 + col0 FROM tab0 AS cor0
----
-61
-7
-72

query I rowsort
SELECT - ( col2 * col2 ) AS col0 FROM tab0
----
-1
-1089
-6724

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-6922
SELECT + CAST( 17 AS SIGNED ) FROM tab2
----
17
17
17

skipif mysql # not compatible
query I rowsort label-6922
SELECT + CAST ( 17 AS INTEGER ) FROM tab2
----
17
17
17

query I rowsort
SELECT + - 16 * - cor0.col2 FROM tab1 AS cor0
----
1536
864
912

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + col0 * col1 + cor0.col0 col2 FROM tab2 AS cor0
----
1422
224
4680

query I rowsort
SELECT ALL - 44 * + col1 AS col0 FROM tab2
----
-1364
-2596
-748

onlyif mysql # use DIV operator for integer division
query I rowsort label-6926
SELECT ALL 86 + + col0 DIV col2 AS col0 FROM tab0
----
121
86
87

skipif mysql # not compatible
query I rowsort label-6926
SELECT ALL 86 + + col0 / col2 AS col0 FROM tab0
----
121
86
87

onlyif mysql # use DIV operator for integer division
query I rowsort label-6927
SELECT ALL + col2 * col1 * col2 + col1 DIV col1 FROM tab1
----
119809
32491
75817

skipif mysql # not compatible
query I rowsort label-6927
SELECT ALL + col2 * col1 * col2 + col1 / col1 FROM tab1
----
119809
32491
75817

query I rowsort
SELECT + 8 * col1 * - col2 + col1 FROM tab2 AS cor0
----
-12213
-5151
-6665

query I rowsort
SELECT 2 + col0 FROM tab1 AS cor0
----
5
66
82

query I rowsort
SELECT DISTINCT - - col1 * cor0.col0 FROM tab0 AS cor0
----
2064
3395
8099

query I rowsort
SELECT + col0 - 25 FROM tab0 AS cor0
----
-1
10
64

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col1 * - col2 + - cor0.col0 col2 FROM tab1 AS cor0
----
-1328
-1407
-634

query I rowsort
SELECT - cor0.col2 + + col0 * col1 FROM tab1 cor0
----
24
583
944

onlyif mysql # use DIV operator for integer division
query I rowsort label-6934
SELECT col2 + col0 DIV ( col0 ) AS col1 FROM tab0 AS cor0
----
2
34
83

skipif mysql # not compatible
query I rowsort label-6934
SELECT col2 + col0 / ( col0 ) AS col1 FROM tab0 AS cor0
----
2
34
83

query I rowsort
SELECT cor0.col1 * - cor0.col0 AS col1 FROM tab2, tab0 AS cor0
----
9 values hashing to 75a608bf2ba236d24f146ac4aff9ec52

query I rowsort
SELECT - col2 * - 81 + + 36 FROM tab1 AS cor0
----
4410
4653
7812

query I rowsort
SELECT + col0 * ( - 76 ) + col1 * - 37 AS col0 FROM tab0 AS cor0
----
-10131
-5006
-6249

query I rowsort
SELECT DISTINCT 51 * + col2 AS col1 FROM tab1
----
2754
2907
4896

query I rowsort
SELECT ALL 30 AS col1 FROM tab0
----
30
30
30

query I rowsort
SELECT cor1.col2 AS col0 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 40fd8cc0de92ea68d73634c2d8f75bf5

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - 64 col2 FROM tab0 AS cor0
----
-64
-64
-64

query I rowsort
SELECT - 0 * - col2 AS col2 FROM tab1 AS cor0
----
0
0
0

query I rowsort
SELECT - - cor0.col2 + - col2 * col1 + - col1 * + col2 * col2 AS col2 FROM tab1 AS cor0
----
-120960
-33003
-77166

onlyif mysql # use DIV operator for integer division
query I rowsort label-6944
SELECT col2 * cor0.col2 + col0 * + col2 - - col1 DIV + col0 FROM tab2 AS cor0
----
2704
4446
922

skipif mysql # not compatible
query I rowsort label-6944
SELECT col2 * cor0.col2 + col0 * + col2 - - col1 / + col0 FROM tab2 AS cor0
----
2704
4446
922

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 9 + - col1 - col2 col0 FROM tab1 AS cor0
----
-100
-58
-71

query I rowsort
SELECT DISTINCT 75 * col2 AS col1 FROM tab2 AS cor0
----
1950
2025
2850

query I rowsort
SELECT + + ( col2 ) + - col0 + - col0 AS col0 FROM tab1 AS cor0
----
-64
-71
48

query I rowsort
SELECT - col1 - - col0 AS col2 FROM tab0 cor0
----
-2
-62
-62

query I rowsort
SELECT + col0 * col2 + - cor0.col0 - + col0 AS col2 FROM tab2 AS cor0
----
175
1872
2844

query I rowsort
SELECT DISTINCT + + col1 * col0 * col0 + col0 * + cor0.col0 AS col0 FROM tab0 AS cor0
----
120050
50112
728732

query I rowsort
SELECT ( 52 * col0 ) FROM tab2
----
364
4056
4108

query I rowsort
SELECT ALL ( - col2 * col0 ) FROM tab0
----
-35
-7298
-792

onlyif mysql # use DIV operator for integer division
query I rowsort label-6953
SELECT ALL + - col2 * - col0 + col0 DIV col2 AS col0 FROM tab1 AS cor0
----
162
3649
7680

skipif mysql # not compatible
query I rowsort label-6953
SELECT ALL + - col2 * - col0 + col0 / col2 AS col0 FROM tab1 AS cor0
----
162
3649
7680

query I rowsort
SELECT DISTINCT col1 * - col1 * col1 FROM tab1 AS cor0
----
-1000
-17576
-2197

query I rowsort
SELECT cor0.col1 + col1 * + col1 FROM tab0 AS cor0
----
7482
8372
9506

query I rowsort
SELECT DISTINCT 35 + col2 * - col0 AS col2 FROM tab1 AS cor0
----
-127
-3613
-7645

query I rowsort
SELECT col2 * 31 + - cor0.col1 FROM tab2 cor0
----
1161
747
806

query I rowsort
SELECT + col1 * 33 AS col1 FROM tab0 cor0
----
2838
3003
3201

query I rowsort
SELECT - col2 * col2 + - 78 AS col2 FROM tab0
----
-1167
-6802
-79

onlyif mysql # use DIV operator for integer division
query I rowsort label-6960
SELECT col2 - 80 DIV - col0 FROM tab0
----
3
36
82

skipif mysql # not compatible
query I rowsort label-6960
SELECT col2 - 80 / - col0 FROM tab0
----
3
36
82

query I rowsort
SELECT col1 + - 76 AS col0 FROM tab2 AS cor0
----
-17
-45
-59

query I rowsort
SELECT - - cor0.col0 + ( + col2 ) * + col1 AS col2 FROM tab0 cor0
----
132
2862
7551

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col1 * - ( + col1 ) col2 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT - + col0 * + ( + cor0.col1 ) * - col1 AS col1 FROM tab2 AS cor0
----
22831
271518
6727

query I rowsort
SELECT ALL + - ( + col1 ) * + col1 * col2 FROM tab2 AS cor0
----
-10982
-25947
-90506

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 73 * - cor0.col2 col1 FROM tab0, tab2 AS cor0
----
9 values hashing to 8e247c14ba1d3ae3f51ae81f322c3a51

query I rowsort
SELECT + col0 * + col2 * + col1 AS col1 FROM tab2 AS cor0
----
119652
51034
5859

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - col2 * cor0.col0 col1 FROM tab1 cor0
----
-162
-3648
-7680

query I rowsort
SELECT + cor0.col2 FROM tab1, tab1 AS cor0, tab2 cor1
----
27 values hashing to 7f4a9bf24d64833706dfbdd0baf49d79

query I rowsort
SELECT tab1.col1 * + 6 AS col0 FROM tab1, tab1 AS cor0
----
9 values hashing to 0481a09faeb522b0e8329193c1c64a7d

query I rowsort
SELECT ALL + col1 * col0 + col1 * col1 AS col1 FROM tab1 AS cor0
----
1209
740
754

query I rowsort
SELECT DISTINCT + - col1 - col0 AS col0 FROM tab0 cor0
----
-110
-132
-180

query I rowsort
SELECT DISTINCT - col2 * - cor0.col2 - cor0.col1 AS col0 FROM tab2 AS cor0
----
1427
617
698

query I rowsort
SELECT - + col0 + - col0 * col0 AS col1 FROM tab1 cor0
----
-12
-4160
-6480

query I rowsort
SELECT DISTINCT cor0.col2 + + col1 AS col1 FROM tab2 cor0
----
55
58
85

onlyif mysql # use DIV operator for integer division
query I rowsort label-6976
SELECT ALL - cor0.col2 DIV col2 + cor0.col1 * - col0 FROM tab1 AS cor0
----
-1041
-641
-79

skipif mysql # not compatible
query I rowsort label-6976
SELECT ALL - cor0.col2 / col2 + cor0.col1 * - col0 FROM tab1 AS cor0
----
-1041
-641
-79

query I rowsort
SELECT DISTINCT col0 + cor0.col1 AS col1 FROM tab0 AS cor0
----
110
132
180

query I rowsort
SELECT ALL + + col0 * + col1 + col0 FROM tab1 AS cor0
----
1120
704
81

query I rowsort
SELECT - - col2 * col1 + cor0.col2 AS col0 FROM tab0 AS cor0
----
2871
7544
98

query I rowsort
SELECT ALL col0 + - col1 * - col2 AS col2 FROM tab2 AS cor0
----
1612
725
844

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + col0 * cor0.col0 + - col1 * cor0.col2 col2 FROM tab2 AS cor0
----
-788
4550
5595

onlyif mysql # use DIV operator for integer division
query I rowsort label-6982
SELECT ALL + col1 * + col0 + col0 + tab1.col0 DIV - col2 FROM tab1
----
1120
703
81

skipif mysql # not compatible
query I rowsort label-6982
SELECT ALL + col1 * + col0 + col0 + tab1.col0 / - col2 FROM tab1
----
1120
703
81

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT col2 + + col0 col1 FROM tab1
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-6984
SELECT ALL col2 * + tab2.col0 + col1 DIV - col0 + + col0 FROM tab2
----
192
2106
3081

skipif mysql # not compatible
query I rowsort label-6984
SELECT ALL col2 * + tab2.col0 + col1 / - col0 + + col0 FROM tab2
----
192
2106
3081

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor0.col1 * + col0 col0 FROM tab1 AS cor0
----
1040
640
78

query I rowsort
SELECT col1 * - cor0.col1 AS col0 FROM tab0 cor0
----
-7396
-8281
-9409

onlyif mysql # use DIV operator for integer division
query I rowsort label-6987
SELECT + col1 DIV tab0.col0 - col2 col1 FROM tab0
----
-30
-81
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6987
SELECT + col1 / tab0.col0 - col2 col1 FROM tab0
----
-30
-81
1

query I rowsort
SELECT cor0.col1 AS col2 FROM tab0 AS cor0 CROSS JOIN tab2
----
9 values hashing to 585a41a52c0c6c0d697b5d39265b74dc

query I rowsort
SELECT DISTINCT col0 FROM tab1 WHERE NULL < ( col1 )
----

query I rowsort
SELECT col2 * - col1 + + col0 FROM tab1 AS cor0
----
-1168
-1401
-506

query I rowsort
SELECT tab1.col0 FROM tab0 AS cor0 CROSS JOIN tab1
----
9 values hashing to dd18b93263a6cd425fc7cc84d9137870

query I rowsort
SELECT - col0 + + cor0.col2 + + col1 FROM tab1 AS cor0
----
29
3
77

query I rowsort
SELECT DISTINCT col2 * col0 + + cor0.col2 AS col1 FROM tab2 AS cor0
----
2054
216
3040

onlyif mysql # use DIV operator for integer division
query I rowsort label-6994
SELECT - - col2 * - col2 + cor0.col0 DIV + col0 col1 FROM tab1 AS cor0
----
-2915
-3248
-9215

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-6994
SELECT - - col2 * - col2 + cor0.col0 / + col0 col1 FROM tab1 AS cor0
----
-2915
-3248
-9215

query I rowsort
SELECT ALL - - col2 * col1 + + cor0.col2 * cor0.col2 + - col0 FROM tab1 AS cor0
----
10384
3755
4317

query I rowsort
SELECT ALL - col1 * + col1 + col2 FROM tab2 cor0
----
-251
-3455
-934

query I rowsort
SELECT DISTINCT - - col0 + + col1 * - col1 AS col0 FROM tab1 AS cor0
----
-36
-673
-89

query I rowsort
SELECT ALL - tab2.col2 * - col1 + tab2.col0 * + col1 AS col0 FROM tab2
----
1054
1989
6136

onlyif mysql # use DIV operator for integer division
query I rowsort label-6999
SELECT col0 + + col2 DIV col0 FROM tab2
----
10
78
79

skipif mysql # not compatible
query I rowsort label-6999
SELECT col0 + + col2 / col0 FROM tab2
----
10
78
79

query I rowsort
SELECT + col1 + - tab1.col1 AS col1 FROM tab1
----
0
0
0

query I rowsort
SELECT ALL - tab2.col2 * col0 + + col1 FROM tab2
----
-158
-1969
-2985

query I rowsort
SELECT - col1 * + col2 * cor0.col0 + col0 + + col2 AS col2 FROM tab2 AS cor0
----
-119548
-50917
-5825

query I rowsort
SELECT - - col2 + cor0.col0 FROM tab0 cor0
----
171
36
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-7004
SELECT DISTINCT + col1 + - col2 DIV + cor0.col1 + - col1 AS col0 FROM tab1 cor0
----
-2
-5
-7

skipif mysql # not compatible
query I rowsort label-7004
SELECT DISTINCT + col1 + - col2 / + cor0.col1 + - col1 AS col0 FROM tab1 cor0
----
-2
-5
-7

query I rowsort
SELECT DISTINCT + col2 - + col2 * 9 FROM tab2 AS cor0
----
-208
-216
-304

skipif mysql # not compatible
query I rowsort
SELECT ALL + 81 * col1 * ( - ( + col0 ) ) - - CAST ( 48 AS REAL ) FROM tab0 AS cor0
----
-167136
-274947
-655971

query I rowsort
SELECT + - col1 * - col1 + + 56 * cor0.col1 * cor0.col0 AS col0 FROM tab1 AS cor0
----
35940
5044
58409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT 63 + - col0 col1 FROM tab0 AS cor0
----
-26
28
39

query I rowsort
SELECT ALL - col2 + col0 + col2 * - col0 FROM tab0 AS cor0
----
-1
-7291
-801

query I rowsort
SELECT ALL + 20 + col2 FROM tab1 AS cor0
----
116
74
77

query I rowsort
SELECT DISTINCT + - col0 * cor0.col0 + ( cor0.col1 ) * col1 + 94 FROM tab0 AS cor0
----
454
6914
8278

onlyif mysql # use DIV operator for integer division
query I rowsort label-7012
SELECT + col1 DIV 25 FROM tab0 AS cor0
----
3
3
3

skipif mysql # not compatible
query I rowsort label-7012
SELECT + col1 / 25 FROM tab0 AS cor0
----
3
3
3

query I rowsort
SELECT ALL + - col0 * + ( - col2 ) * + col2 + col1 FROM tab1 cor0
----
207946
737293
8774

query I rowsort
SELECT - cor0.col2 * + cor0.col2 FROM tab0, tab2 AS cor0
----
9 values hashing to 309d8ba6d1ea89e6795c82dda466e1ce

query IIIIIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab2, tab0 cor0, tab2 cor1, tab1, tab2 cor2
----
3645 values hashing to 3a186ad492d315801f56fb30a5e89dbb

query IIIIIIIIIIII rowsort
SELECT DISTINCT * FROM tab0, tab2 cor0, tab2, tab0 cor1
----
972 values hashing to deaaa983f771be544ffdc26f04a18657

query I rowsort
SELECT col1 + col2 * col2 AS col0 FROM tab2
----
1461
735
760

query I rowsort
SELECT - 16 AS col2 FROM tab0
----
-16
-16
-16

query I rowsort
SELECT + col2 + + ( - col1 + + 62 * + col0 ) AS col2 FROM tab2 cor0
----
430
4803
4919

query I rowsort
SELECT - + ( + col1 ) FROM tab2 AS cor0
----
-17
-31
-59

query I rowsort
SELECT DISTINCT + cor0.col1 + - 91 AS col2 FROM tab0 cor0
----
-5
0
6

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 34 * cor0.col1 col2 FROM tab2, tab2 AS cor0
----
9 values hashing to 415ebb5288da4ad39bce2a37614e97c7

query I rowsort
SELECT ALL col0 + col2 * + col1 FROM tab0 AS cor0
----
132
2862
7551

query I rowsort
SELECT + cor0.col1 * - 43 AS col0 FROM tab0 AS cor0
----
-3698
-3913
-4171

query I rowsort
SELECT + 22 * + col1 + cor0.col2 FROM tab0 AS cor0
----
1925
2084
2135

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 27 - col1 col2 FROM tab2 AS cor0
----
-32
-4
10

query I rowsort
SELECT + ( col1 ) * - cor0.col0 + - 73 AS col2 FROM tab2 AS cor0
----
-1416
-290
-4675

onlyif mysql # use DIV operator for integer division
query I rowsort label-7028
SELECT DISTINCT - col2 * + tab1.col0 + - col2 DIV col2 - + col2 FROM tab1
----
-217
-3706
-7777

skipif mysql # not compatible
query I rowsort label-7028
SELECT DISTINCT - col2 * + tab1.col0 + - col2 / col2 - + col2 FROM tab1
----
-217
-3706
-7777

query I rowsort
SELECT ALL + + 59 * - cor0.col0 + + col0 AS col1 FROM tab2 cor0
----
-406
-4524
-4582

query I rowsort
SELECT + 56 + - col0 * col1 FROM tab2 AS cor0
----
-1287
-161
-4546

query I rowsort
SELECT + col2 - + col1 * + col2 FROM tab0 AS cor0
----
-2805
-7380
-96

query I rowsort
SELECT ALL 64 * col1 + - col2 * col0 FROM tab2
----
-1914
1748
1795

query I rowsort
SELECT + 71 + - col0 AS col2 FROM tab0 AS cor0
----
-18
36
47

onlyif mysql # use DIV operator for integer division
query I rowsort label-7034
SELECT col0 DIV col1 + + col0 + cor0.col0 FROM tab2 AS cor0
----
14
157
162

skipif mysql # not compatible
query I rowsort label-7034
SELECT col0 / col1 + + col0 + cor0.col0 FROM tab2 AS cor0
----
14
157
162

query I rowsort
SELECT + col1 * col1 + col0 FROM tab0 AS cor0
----
7420
8370
9444

query I rowsort
SELECT ALL 34 + + 58 AS col1 FROM tab2
----
92
92
92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7037
SELECT + col2 * col2 + col1 + CAST( col0 AS SIGNED ) * - col2 FROM tab0
----
-483
383
63

skipif mysql # not compatible
query I rowsort label-7037
SELECT + col2 * col2 + col1 + CAST ( col0 AS INTEGER ) * - col2 FROM tab0
----
-483
383
63

query I rowsort
SELECT ALL 94 + + col0 AS col0 FROM tab0
----
118
129
183

query I rowsort
SELECT + col1 + + col2 * 44 FROM tab2 AS cor0
----
1203
1219
1689

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 82 col2 FROM tab0, tab2 cor0
----
9 values hashing to f318fd9dac2de7af4b82cc7574bbca2c

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7041
SELECT DISTINCT + CAST( NULL AS SIGNED ) + col2 AS col2 FROM tab2
----
NULL

skipif mysql # not compatible
query I rowsort label-7041
SELECT DISTINCT + CAST ( NULL AS INTEGER ) + col2 AS col2 FROM tab2
----
NULL

query I rowsort
SELECT 99 FROM tab1, tab2 AS cor0
----
9 values hashing to 4b77467dd5f346109d29f6364a7bb8db

query I rowsort
SELECT DISTINCT ( - tab2.col1 ) + - col1 * + tab2.col1 + tab2.col0 * tab2.col0 FROM tab2
----
-943
2544
5935

query I rowsort
SELECT col2 * col2 * 20 FROM tab2
----
13520
14580
28880

query I rowsort
SELECT - 91 * + col0 FROM tab0
----
-2184
-3185
-8099

query I rowsort
SELECT ( - col0 + col0 ) AS col1 FROM tab1
----
0
0
0

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 44 col1 FROM tab0, tab2 AS cor0, tab1 AS cor1
----
27 values hashing to 0cc3e52e781e46962291c3060c6ae73b

query I rowsort
SELECT DISTINCT 83 * col1 AS col0 FROM tab0
----
7138
7553
8051

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + tab2.col2 * + col1 col0 FROM tab2
----
1534
646
837

query I rowsort
SELECT - ( + cor0.col1 * cor0.col0 ) FROM tab1, tab1 AS cor0
----
9 values hashing to 0cea1be551fb4bd88f4da0b7d676ee2f

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - - col1 + 87 col2 FROM tab2 cor0
----
104
118
146

onlyif mysql # use DIV operator for integer division
query I rowsort label-7052
SELECT DISTINCT col2 DIV - 11 AS col0 FROM tab0
----
-3
-7
0

skipif mysql # not compatible
query I rowsort label-7052
SELECT DISTINCT col2 / - 11 AS col0 FROM tab0
----
-3
-7
0

query I rowsort
SELECT 64 FROM tab0, tab0 cor0
----
9 values hashing to 60ab040e931c5c85db7ba19364eacc8e

onlyif mysql # use DIV operator for integer division
query I rowsort label-7054
SELECT ALL col1 DIV + CAST( ( - col0 ) AS SIGNED ) FROM tab0
----
-1
-2
-3

skipif mysql # not compatible
query I rowsort label-7054
SELECT ALL col1 / + CAST ( ( - col0 ) AS INTEGER ) FROM tab0
----
-1
-2
-3

query I rowsort
SELECT ALL cor0.col1 * col1 FROM tab0 AS cor0
----
7396
8281
9409

query I rowsort
SELECT + + col0 + col2 * col0 AS col2 FROM tab2 AS cor0
----
196
2106
3081

query I rowsort
SELECT DISTINCT + ( + col1 ) * + col2 FROM tab1 AS cor0
----
1248
1404
570

query I rowsort
SELECT ALL + ( 12 ) * cor0.col1 FROM tab2 AS cor0
----
204
372
708

query I rowsort
SELECT ALL 54 AS col0 FROM tab2
----
54
54
54

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + ( - col2 ) * + col1 col2 FROM tab0 AS cor0
----
-2838
-7462
-97

query I rowsort
SELECT - + col2 * - ( col1 ) AS col2 FROM tab0 AS cor0
----
2838
7462
97

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - - 30 col1 FROM tab1 AS cor0
----
30
30
30

query I rowsort
SELECT DISTINCT - - 73 + + col2 FROM tab0 AS cor0
----
106
155
74

query I rowsort
SELECT ( col2 ) * + col0 AS col0 FROM tab1 AS cor0
----
162
3648
7680

query I rowsort
SELECT ALL + ( ( col0 ) ) * col0 FROM tab1 AS cor0
----
4096
6400
9

query I rowsort
SELECT + col1 * 32 + + col1 FROM tab0 AS cor0
----
2838
3003
3201

onlyif mysql # use DIV operator for integer division
query I rowsort label-7067
SELECT DISTINCT - col0 DIV - col1 + - col1 DIV col1 AS col0 FROM tab0
----
-1

skipif mysql # not compatible
query I rowsort label-7067
SELECT DISTINCT - col0 / - col1 + - col1 / col1 AS col0 FROM tab0
----
-1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT col2 + - tab0.col1 * - col0 col1 FROM tab0
----
2097
3396
8181

query I rowsort
SELECT ALL - cor0.col2 + + 36 FROM tab2, tab0 cor0
----
9 values hashing to e39cc3381b2c1955067ded21489f579e

query I rowsort
SELECT DISTINCT + 74 AS col0 FROM tab1
----
74

onlyif mysql # use DIV operator for integer division
query I rowsort label-7071
SELECT cor0.col1 DIV + 89 FROM tab0, tab0 cor0, tab0 AS cor1
----
27 values hashing to 3daf191600c64328f2c60722189235c6

skipif mysql # not compatible
query I rowsort label-7071
SELECT cor0.col1 / + 89 FROM tab0, tab0 cor0, tab0 AS cor1
----
27 values hashing to 3daf191600c64328f2c60722189235c6

query I rowsort
SELECT ALL ( col0 + col1 ) FROM tab0
----
110
132
180

query I rowsort
SELECT 85 + 55 AS col2 FROM tab2
----
140
140
140

query I rowsort
SELECT + 23 AS col2 FROM tab0 AS cor0
----
23
23
23

query I rowsort
SELECT - cor0.col1 * cor0.col2 + 83 FROM tab2, tab2 AS cor0
----
9 values hashing to 4fa05fb56bbcf70e7c0472ce1b233f4b

query I rowsort
SELECT DISTINCT - 3 FROM tab0
----
-3

query I rowsort
SELECT DISTINCT + - 1 AS col2 FROM tab1, tab2, tab2 AS cor0
----
-1

query I rowsort
SELECT - ( 23 ) AS col1 FROM tab2, tab0 AS cor0, tab2 AS cor1
----
27 values hashing to 9bd721f99d79dce21b1de2860fd51ed5

onlyif mysql # use DIV operator for integer division
query I rowsort label-7079
SELECT DISTINCT + col1 DIV col2 FROM tab0
----
1
2
97

skipif mysql # not compatible
query I rowsort label-7079
SELECT DISTINCT + col1 / col2 FROM tab0
----
1
2
97

query I rowsort
SELECT DISTINCT + ( - col2 ) * - tab1.col2 FROM tab1
----
2916
3249
9216

onlyif mysql # use DIV operator for integer division
query I rowsort label-7081
SELECT ALL 35 DIV col1 AS col2 FROM tab2
----
0
1
2

skipif mysql # not compatible
query I rowsort label-7081
SELECT ALL 35 / col1 AS col2 FROM tab2
----
0
1
2

query I rowsort
SELECT DISTINCT - 51 FROM tab0, tab2, tab2 AS cor0
----
-51

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT 80 - - 64 col2 FROM tab2, tab0 AS cor0, tab0 AS cor1
----
27 values hashing to 3c0aa9b5ec9df595bcb1b06b56de3514

query I rowsort
SELECT 63 + - col1 + col0 AS col2 FROM tab0
----
1
1
61

onlyif mysql # use DIV operator for integer division
query I rowsort label-7085
SELECT DISTINCT col2 DIV + col1 + + col1 - ( + col2 ) AS col0 FROM tab1
----
-26
-42
-76

skipif mysql # not compatible
query I rowsort label-7085
SELECT DISTINCT col2 / + col1 + + col1 - ( + col2 ) AS col0 FROM tab1
----
-26
-42
-76

query I rowsort
SELECT - tab2.col1 AS col0 FROM tab2, tab1 AS cor0
----
9 values hashing to ccaa5dd3388d9ee0fea676fa35299fe5

query I rowsort
SELECT + col1 + + 33 FROM tab2 AS cor0
----
50
64
92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7088
SELECT - - col2 + + CAST( 89 AS SIGNED ) col1 FROM tab0 cor0
----
122
171
90

skipif postgresql # PostgreSQL requires AS when renaming output columns
skipif mysql # not compatible
query I rowsort label-7088
SELECT - - col2 + + CAST ( 89 AS INTEGER ) col1 FROM tab0 cor0
----
122
171
90

query I rowsort
SELECT - - col2 + col0 * cor0.col0 FROM tab2 AS cor0
----
6110
6279
76

query I rowsort
SELECT + + col1 + ( - cor0.col0 ) FROM tab0 cor0
----
2
62
62

query I rowsort
SELECT DISTINCT + + col0 + ( + col0 ) AS col1 FROM tab1 cor0
----
128
160
6

onlyif mysql # use DIV operator for integer division
query I rowsort label-7092
SELECT - cor0.col2 DIV + ( + col2 ) FROM tab0 AS cor0
----
-1
-1
-1

skipif mysql # not compatible
query I rowsort label-7092
SELECT - cor0.col2 / + ( + col2 ) FROM tab0 AS cor0
----
-1
-1
-1

query I rowsort
SELECT DISTINCT - - cor0.col2 + + ( col2 ) FROM tab1 cor0
----
108
114
192

query I rowsort
SELECT col1 * - col0 * cor0.col0 + col1 * col0 AS col0 FROM tab2 cor0
----
-104754
-1302
-354354

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7095
SELECT + - col1 + CAST( NULL AS SIGNED ) FROM tab0 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7095
SELECT + - col1 + CAST ( NULL AS INTEGER ) FROM tab0 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + col2 * + 12 AS col1 FROM tab2 AS cor0
----
-312
-324
-456

query I rowsort
SELECT ALL col1 * 89 AS col2 FROM tab0 AS cor0
----
7654
8099
8633

query I rowsort
SELECT DISTINCT + col2 + + col1 AS col1 FROM tab2 cor0
----
55
58
85

query I rowsort
SELECT ALL + - cor0.col1 + col1 * 0 FROM tab2 AS cor0
----
-17
-31
-59

skipif mysql # not compatible
query I rowsort
SELECT + CAST ( 62 AS REAL ) - cor0.col2 FROM tab2, tab0 AS cor0
----
9 values hashing to e18085d0ed5f5a27fe670655e34171dc

query I rowsort
SELECT ALL col0 + + 47 * 79 FROM tab1
----
3716
3777
3793

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7102
SELECT DISTINCT - col1 + CAST( NULL AS DECIMAL ) FROM tab1
----
NULL

skipif mysql # not compatible
query I rowsort label-7102
SELECT DISTINCT - col1 + CAST ( NULL AS REAL ) FROM tab1
----
NULL

onlyif mysql # use DIV operator for integer division
query I rowsort label-7103
SELECT ALL col0 DIV tab1.col0 + - col0 * - col0 AS col1 FROM tab1
----
10
4097
6401

skipif mysql # not compatible
query I rowsort label-7103
SELECT ALL col0 / tab1.col0 + - col0 * - col0 AS col1 FROM tab1
----
10
4097
6401

query I rowsort
SELECT col1 + + ( - col0 ) AS col2 FROM tab0 cor0
----
2
62
62

query I rowsort
SELECT ALL + col0 * - 89 + - col2 * col0 FROM tab1 AS cor0
----
-14800
-429
-9344

query I rowsort
SELECT - col1 + 37 FROM tab1 AS cor0
----
11
24
27

query I rowsort
SELECT ALL + col0 * col1 + col1 AS col0 FROM tab1 AS cor0
----
104
1053
650

query I rowsort
SELECT - cor0.col2 * - col1 + - col2 AS col1 FROM tab1 AS cor0
----
1152
1350
513

query I rowsort
SELECT + + 61 * col2 AS col0 FROM tab2 AS cor0
----
1586
1647
2318

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7110
SELECT ALL + - CAST( NULL AS SIGNED ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7110
SELECT ALL + - CAST ( NULL AS INTEGER ) AS col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT + 3 AS col0 FROM tab0 AS cor0
----
3

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 51 + - 59 col2 FROM tab2 AS cor0
----
-8
-8
-8

query I rowsort
SELECT ALL + col0 + 9 * + col0 AS col2 FROM tab1 AS cor0
----
30
640
800

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT - cor0.col0 * 16 col1 FROM tab2 AS cor0
----
-112
-1248
-1264

query I rowsort
SELECT DISTINCT col0 + col0 AS col2 FROM tab1 cor0
----
128
160
6

query I rowsort
SELECT - + ( + col0 ) * col2 AS col1 FROM tab0 AS cor0
----
-35
-7298
-792

query I rowsort
SELECT - + ( + col1 ) + + col1 * 14 FROM tab1 AS cor0
----
130
169
338

query I rowsort
SELECT ALL col0 + + col2 * + col1 AS col2 FROM tab2 AS cor0
----
1612
725
844

query I rowsort
SELECT - - col1 * - ( col1 ) + + col0 FROM tab2 AS cor0
----
-210
-3403
-954

onlyif mysql # use DIV operator for integer division
query I rowsort label-7120
SELECT ALL - - col2 DIV col1 AS col2 FROM tab0 cor0
----
0
0
0

skipif mysql # not compatible
query I rowsort label-7120
SELECT ALL - - col2 / col1 AS col2 FROM tab0 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + + 85 + - col1 AS col2 FROM tab0 AS cor0
----
-1
-12
-6

query I rowsort
SELECT DISTINCT ( + col2 ) * cor0.col0 + + 31 AS col2 FROM tab2 AS cor0
----
2059
220
3033

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7123
SELECT DISTINCT + col0 + - CAST( col1 * + col2 AS SIGNED ) + col1 FROM tab0
----
-2728
-7282
35

skipif mysql # not compatible
query I rowsort label-7123
SELECT DISTINCT + col0 + - CAST ( col1 * + col2 AS INTEGER ) + col1 FROM tab0
----
-2728
-7282
35

query I rowsort
SELECT col0 * col1 + col1 FROM tab2
----
1360
248
4661

query I rowsort
SELECT ALL col0 * + tab1.col2 + - 68 FROM tab1
----
3580
7612
94

query I rowsort
SELECT DISTINCT + col2 + - col2 AS col2 FROM tab0
----
0

query I rowsort
SELECT + 88 - 73 * cor0.col0 FROM tab0, tab0 AS cor0
----
9 values hashing to 65c4d518f34e0119c16f55b907b46e1c

query I rowsort
SELECT ALL col1 * - 23 FROM tab2 AS cor0
----
-1357
-391
-713

onlyif mysql # use DIV operator for integer division
query I rowsort label-7129
SELECT DISTINCT - + 18 DIV - 80 AS col0 FROM tab2 AS cor0
----
0

skipif mysql # not compatible
query I rowsort label-7129
SELECT DISTINCT - + 18 / - 80 AS col0 FROM tab2 AS cor0
----
0

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7130
SELECT - + CAST( NULL AS SIGNED ) * 84 + - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7130
SELECT - + CAST ( NULL AS INTEGER ) * 84 + - col1 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT DISTINCT col0 + col0 + - 34 FROM tab1 AS cor0
----
-28
126
94

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + + cor0.col2 * col0 + col1 col0 FROM tab0 AS cor0
----
132
7389
878

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL cor0.col2 + col0 col0 FROM tab1 cor0
----
121
176
57

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - + col2 + + col2 col0 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT - + col2 + + col2 * 84 FROM tab1 AS cor0
----
4482
4731
7968

query I rowsort
SELECT DISTINCT - col2 - col1 FROM tab0 cor0
----
-119
-173
-98

query I rowsort
SELECT ALL + + col0 + col2 FROM tab1 cor0
----
121
176
57

onlyif mysql # use DIV operator for integer division
query I rowsort label-7138
SELECT ALL - - cor0.col2 * - col2 DIV + col2 FROM tab1 AS cor0
----
-54
-57
-96

skipif mysql # not compatible
query I rowsort label-7138
SELECT ALL - - cor0.col2 * - col2 / + col2 FROM tab1 AS cor0
----
-54
-57
-96

query I rowsort
SELECT + 27 + col1 AS col1 FROM tab1 AS cor0
----
37
40
53

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT - cor0.col2 + col1 * cor0.col2 col2 FROM tab0 AS cor0
----
2805
7380
96

query I rowsort
SELECT DISTINCT - col2 * col2 + col1 + + 94 FROM tab0 AS cor0
----
-6539
-909
190

query I rowsort
SELECT ALL - col2 * - col2 - cor0.col2 AS col0 FROM tab1 cor0
----
2862
3192
9120

query I rowsort
SELECT ALL + cor0.col2 + - col2 FROM tab1 cor0
----
0
0
0

query I rowsort
SELECT DISTINCT + + col2 * + col1 + 96 FROM tab1 AS cor0
----
1344
1500
666

query I rowsort
SELECT DISTINCT + 47 FROM tab0 AS cor0
----
47

query I rowsort
SELECT ALL + - 13 + col1 AS col2 FROM tab0 AS cor0
----
73
78
84

query I rowsort
SELECT - - cor0.col2 * col1 + - col0 FROM tab2 cor0
----
1456
567
830

query I rowsort
SELECT DISTINCT - col0 + col0 - col2 * - 37 AS col0 FROM tab0
----
1221
3034
37

query I rowsort
SELECT ALL + cor0.col1 * + 84 + + col1 FROM tab0 AS cor0
----
7310
7735
8245

onlyif mysql # use DIV operator for integer division
query I rowsort label-7150
SELECT col2 * ( col1 ) DIV col0 - 7 * col1 FROM tab2 cor0
----
-111
-394
-98

skipif mysql # not compatible
query I rowsort label-7150
SELECT col2 * ( col1 ) / col0 - 7 * col1 FROM tab2 cor0
----
-111
-394
-98

query I rowsort
SELECT ALL + cor0.col2 * - col1 + col0 FROM tab1 AS cor0
----
-1168
-1401
-506

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7152
SELECT - cor0.col2 - CAST( col0 AS SIGNED ) * col0 FROM tab1 AS cor0
----
-4153
-63
-6496

skipif mysql # not compatible
query I rowsort label-7152
SELECT - cor0.col2 - CAST ( col0 AS INTEGER ) * col0 FROM tab1 AS cor0
----
-4153
-63
-6496

query I rowsort
SELECT DISTINCT col2 - + ( col1 ) * col2 FROM tab2 AS cor0
----
-1508
-608
-810

query I rowsort
SELECT 12 AS col2 FROM tab2, tab2 AS cor0, tab2 AS cor1
----
27 values hashing to 702478c53caf2f7ebb9fff96d800f5a6

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7155
SELECT CAST( NULL AS SIGNED ) + + cor0.col0 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

skipif mysql # not compatible
query I rowsort label-7155
SELECT CAST ( NULL AS INTEGER ) + + cor0.col0 AS col1 FROM tab1 AS cor0 CROSS JOIN tab2 AS cor1
----
9 values hashing to cd7a7901e47c15155404aff0d216fe0b

query I rowsort
SELECT DISTINCT + col1 + - 87 FROM tab2
----
-28
-56
-70

query I rowsort
SELECT ALL + tab2.col0 + - col1 * + tab2.col1 * col1 AS col2 FROM tab2
----
-205301
-29784
-4834

query I rowsort
SELECT col0 * col0 + + ( col2 ) * col2 AS col0 FROM tab0 AS cor0
----
1226
14645
1665

query I rowsort
SELECT + cor0.col2 + col0 + - col2 * col1 AS col0 FROM tab0 AS cor0
----
-2781
-61
-7291

query I rowsort
SELECT ( col2 ) + + tab0.col0 + col0 FROM tab0
----
260
71
81

query I rowsort
SELECT DISTINCT - ( - col1 ) + col0 + - col0 FROM tab1
----
10
13
26

query I rowsort
SELECT ALL col0 * col2 + - col0 AS col0 FROM tab2
----
182
1950
2923

query I rowsort
SELECT - 7 FROM tab1, tab2 cor0
----
9 values hashing to ba940cd66e21e94e95aada5f28e1faf5

query I rowsort
SELECT + col2 + col0 + 85 AS col1 FROM tab0 AS cor0
----
121
142
256

query I rowsort
SELECT ALL + + 97 * + col0 * col0 + 16 - col0 * ( - col0 ) FROM tab2 AS cor0
----
4818
596248
611634

query I rowsort
SELECT 8 + - col2 * - col1 FROM tab0 AS cor0
----
105
2846
7470

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1 AS cor0 CROSS JOIN tab1, tab2 AS cor1, tab2 AS cor2
----
972 values hashing to 64ce0e736818e884f0a9ecd075da5eb7

query IIIIIIIIIIIIIII rowsort
SELECT * FROM tab2 AS cor0 CROSS JOIN tab2, tab1 AS cor1, tab0, tab1 AS cor2
----
3645 values hashing to 73edaf471aef3f42e9a0b0be98b79374

query I rowsort
SELECT ( 97 ) AS col2 FROM tab1, tab0 AS cor0
----
9 values hashing to 5e0d31ac41981bcdf6a665538a71a09c

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 + + col1 col1 FROM tab2 AS cor0
----
118
34
62

onlyif mysql # use DIV operator for integer division
query I rowsort label-7171
SELECT DISTINCT - - col1 DIV - col0 + + col0 * + col2 AS col2 FROM tab2 AS cor0
----
185
2028
3002

skipif mysql # not compatible
query I rowsort label-7171
SELECT DISTINCT - - col1 / - col0 + + col0 * + col2 AS col2 FROM tab2 AS cor0
----
185
2028
3002

query I rowsort
SELECT ALL + - col0 * col0 + col0 * cor0.col0 AS col2 FROM tab2 AS cor0
----
0
0
0

onlyif mysql # use DIV operator for integer division
query I rowsort label-7173
SELECT ALL - col0 DIV - 1 AS col2 FROM tab1 AS cor0
----
3
64
80

skipif mysql # not compatible
query I rowsort label-7173
SELECT ALL - col0 / - 1 AS col2 FROM tab1 AS cor0
----
3
64
80

query I rowsort
SELECT DISTINCT - col1 + + ( col1 * + col1 ) FROM tab0 AS cor0
----
7310
8190
9312

query I rowsort
SELECT DISTINCT + col2 * + cor0.col0 AS col1 FROM tab1 cor0
----
162
3648
7680

query I rowsort
SELECT + col0 * + cor0.col2 AS col0 FROM tab1 AS cor0
----
162
3648
7680

onlyif mysql # use DIV operator for integer division
query I rowsort label-7177
SELECT DISTINCT + - col2 + - col0 DIV + col1 FROM tab2 AS cor0
----
-27
-42

skipif mysql # not compatible
query I rowsort label-7177
SELECT DISTINCT + - col2 + - col0 / + col1 FROM tab2 AS cor0
----
-27
-42

query I rowsort
SELECT + + col2 * - ( - 91 ) FROM tab2 AS cor0
----
2366
2457
3458

onlyif mysql # use DIV operator for integer division
query I rowsort label-7179
SELECT col2 DIV + col0 + + col0 + + 3 * col1 FROM tab1 AS cor0
----
120
94
99

skipif mysql # not compatible
query I rowsort label-7179
SELECT col2 / + col0 + + col0 + + 3 * col1 FROM tab1 AS cor0
----
120
94
99

query I rowsort
SELECT DISTINCT + col2 * 4 FROM tab2 AS cor0
----
104
108
152

query I rowsort
SELECT + col0 * + 78 + - col1 * - col0 FROM tab0 AS cor0
----
15041
3936
6125

query I rowsort
SELECT ALL 67 * col0 FROM tab2 AS cor0
----
469
5226
5293

query I rowsort
SELECT + ( - 89 ) + col1 FROM tab0 AS cor0
----
-3
2
8

query I rowsort
SELECT ALL - cor1.col0 AS col2 FROM tab0, tab2 AS cor0, tab1 cor1
----
27 values hashing to 729c1edda9332398299f39cd174ed840

query IIIIIIIIIIII rowsort
SELECT ALL * FROM tab1, tab1 AS cor0, tab1 cor1, tab2 AS cor2
----
972 values hashing to 72eb3d4d523f5d0c69d1b855edd18f4a

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT DISTINCT cor1.col1 col2 FROM tab0, tab0 AS cor0, tab1 cor1
----
10
13
26

query I rowsort
SELECT col0 + col0 + + cor0.col1 AS col0 FROM tab2 AS cor0
----
175
215
45

query I rowsort
SELECT + cor0.col1 * cor0.col2 + cor0.col2 AS col2 FROM tab0, tab1 AS cor0
----
9 values hashing to 564dfe9f90d68715248af08e36c5b0c2

query I rowsort
SELECT col1 * + ( col1 ) FROM tab1 AS cor0
----
100
169
676

query I rowsort
SELECT 44 + - col0 FROM tab1 AS cor0
----
-20
-36
41

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT + 39 * col0 col0 FROM tab0 AS cor0
----
1365
3471
936

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7192
SELECT CAST( NULL AS SIGNED ) + cor0.col0 / - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7192
SELECT CAST ( NULL AS INTEGER ) + cor0.col0 / - col0 FROM tab2 AS cor0
----
NULL
NULL
NULL

query I rowsort
SELECT - + 7 * col1 + col2 * col1 * col2 AS col0 FROM tab2 AS cor0
----
22382
24429
39471

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 - 55 * col0 + + col1 FROM tab1 AS cor0
----
-139
-3510
-4387

query I rowsort
SELECT DISTINCT col2 + col0 * - 20 AS col0 FROM tab1 AS cor0
----
-1223
-1504
-6

query I rowsort
SELECT DISTINCT + cor0.col1 FROM tab1, tab1 AS cor0, tab2, tab2 AS cor1
----
10
13
26

query I rowsort
SELECT + col0 * ( - col1 ) + cor0.col1 FROM tab2 AS cor0
----
-1326
-186
-4543

query I rowsort
SELECT ALL - 22 AS col1 FROM tab0, tab1 AS cor0
----
9 values hashing to fae46f8148b02964f7145eb6ed5819f9

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7200
SELECT + + CAST( col2 AS SIGNED ) AS col1 FROM tab1 AS cor0
----
54
57
96

skipif mysql # not compatible
query I rowsort label-7200
SELECT + + CAST ( col2 AS INTEGER ) AS col1 FROM tab1 AS cor0
----
54
57
96

query I rowsort
SELECT DISTINCT - col2 * + col1 + col1 AS col0 FROM tab0 AS cor0
----
-2752
-7371
0

query I rowsort
SELECT ALL + col2 * + ( 40 ) FROM tab1
----
2160
2280
3840

query I rowsort
SELECT 38 * 12 FROM tab0, tab1 AS cor0
----
9 values hashing to cf4dccd74afeb1a295d889ddbf6f21bf

query I rowsort
SELECT + 45 + - col0 AS col2 FROM tab0 cor0
----
-44
10
21

query I rowsort
SELECT DISTINCT + col1 * col2 + + ( - ( - cor0.col2 ) ) AS col1 FROM tab2 cor0
----
1560
684
864

query I rowsort
SELECT ALL - - 60 * col0 + - ( - ( - col0 ) ) - - col2 FROM tab0 AS cor0
----
1449
2066
5333

query I rowsort
SELECT - ( - col0 ) * - col2 * col2 + col1 FROM tab1 AS cor0
----
-207926
-737267
-8722

query I rowsort
SELECT + 80 * col2 + - ( col1 ) AS col1 FROM tab0 AS cor0
----
-17
2554
6469

query I rowsort
SELECT 47 FROM tab1, tab0 cor0
----
9 values hashing to 4fe192f296791e1e40ea00a68aa8dab7

query I rowsort
SELECT - 29 AS col0 FROM tab0 AS cor0
----
-29
-29
-29

query I rowsort
SELECT DISTINCT + + 5 * col0 + - cor0.col1 * col1 - - cor0.col0 FROM tab1 AS cor0
----
-658
284
311

query I rowsort
SELECT + 31 * col2 AS col0 FROM tab1
----
1674
1767
2976

query I rowsort
SELECT DISTINCT 97 + + col0 FROM tab2
----
104
175
176

query I rowsort
SELECT DISTINCT col0 * col2 + ( ( col2 ) + 72 ) AS col0 FROM tab2
----
2126
288
3112

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL - col2 * - col0 col2 FROM tab0 AS cor0
----
35
7298
792

onlyif mysql # use DIV operator for integer division
query I rowsort label-7216
SELECT DISTINCT col1 * col2 + + col0 DIV col0 FROM tab1 AS cor0
----
1249
1405
571

skipif mysql # not compatible
query I rowsort label-7216
SELECT DISTINCT col1 * col2 + + col0 / col0 FROM tab1 AS cor0
----
1249
1405
571

query I rowsort
SELECT ALL - + col1 - 85 AS col2 FROM tab1 AS cor0
----
-111
-95
-98

query I rowsort
SELECT DISTINCT col0 + 9 FROM tab0 AS cor0
----
33
44
98

query I rowsort
SELECT - col1 * + ( + cor0.col1 ) FROM tab1 AS cor0
----
-100
-169
-676

onlyif mysql # use DIV operator for integer division
query I rowsort label-7220
SELECT ALL + col1 * col2 - - col0 DIV col1 FROM tab0 AS cor0
----
2838
7462
97

skipif mysql # not compatible
query I rowsort label-7220
SELECT ALL + col1 * col2 - - col0 / col1 FROM tab0 AS cor0
----
2838
7462
97

query I rowsort
SELECT - col0 - + col2 AS col2 FROM tab0
----
-171
-36
-57

query I rowsort
SELECT DISTINCT + col1 * ( + col2 * ( + cor0.col0 ) ) + - col0 AS col0 FROM tab0 AS cor0
----
3360
664029
68088

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7223
SELECT ALL - + CAST( col1 AS SIGNED ) * col2 * CAST( NULL AS DECIMAL ) - - 78 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif mysql # not compatible
query I rowsort label-7223
SELECT ALL - + CAST ( col1 AS INTEGER ) * col2 * CAST ( NULL AS REAL ) - - 78 AS col0 FROM tab1 AS cor0
----
NULL
NULL
NULL

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col1 * - tab0.col1 col1 FROM tab0
----
-7396
-8281
-9409

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL + ( - col0 ) * + col0 + 98 col2 FROM tab0 AS cor0
----
-1127
-478
-7823

onlyif mysql # use DIV operator for integer division
query I rowsort label-7226
SELECT 49 * 30 + - col2 + 85 DIV - 2 AS col0 FROM tab2 cor0
----
1390
1401
1402

skipif mysql # not compatible
query I rowsort label-7226
SELECT 49 * 30 + - col2 + 85 / - 2 AS col0 FROM tab2 cor0
----
1390
1401
1402

query I rowsort
SELECT DISTINCT col2 * 85 AS col2 FROM tab1 cor0
----
4590
4845
8160

query I rowsort
SELECT DISTINCT + - 92 AS col1 FROM tab2 AS cor0
----
-92

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7229
SELECT ALL - CAST( - col0 AS SIGNED ) AS col0 FROM tab2 AS cor0
----
7
78
79

skipif mysql # not compatible
query I rowsort label-7229
SELECT ALL - CAST ( - col0 AS INTEGER ) AS col0 FROM tab2 AS cor0
----
7
78
79

query I rowsort
SELECT ALL ( - cor0.col0 ) FROM tab0 AS cor0
----
-24
-35
-89

query I rowsort
SELECT + 58 + + col2 + + col0 AS col2 FROM tab2 cor0
----
162
175
92

onlyif mysql # use DIV operator for integer division
query I rowsort label-7232
SELECT DISTINCT - col1 DIV - col1 FROM tab1
----
1

skipif mysql # not compatible
query I rowsort label-7232
SELECT DISTINCT - col1 / - col1 FROM tab1
----
1

onlyif mysql # use DIV operator for integer division
query I rowsort label-7233
SELECT ALL - col2 DIV - col2 AS col2 FROM tab1
----
1
1
1

skipif mysql # not compatible
query I rowsort label-7233
SELECT ALL - col2 / - col2 AS col2 FROM tab1
----
1
1
1

skipif postgresql # PostgreSQL requires AS when renaming output columns
query I rowsort
SELECT ALL col2 * col1 * tab2.col1 col0 FROM tab2
----
10982
25947
90506

query I rowsort
SELECT ALL col0 * col2 - + col2 FROM tab0
----
34
7216
759

onlyif mysql # support for MySQL specific system types and syntax
query I rowsort label-7236
SELECT ALL CAST( 28 AS SIGNED ) FROM tab0
----
28
28
28

skipif mysql # not compatible
query I rowsort label-7236
SELECT ALL CAST ( 28 AS INTEGER ) FROM tab0
----